请求接口
This commit is contained in:
11
api/me/me.js
Normal file
11
api/me/me.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import http from '@/http/http.js'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最近观看
|
||||||
|
*/
|
||||||
|
export const selectByUserId = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/courseCollect/selectByUserId',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -104,7 +104,23 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup></script>
|
<script setup>
|
||||||
|
import { selectByUserId } from '@/api/me/me.js';
|
||||||
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
|
|
||||||
|
async function selectByUserIdAjax() {
|
||||||
|
try {
|
||||||
|
const res = await selectByUserId();
|
||||||
|
console.log(res);
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
selectByUserId();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
page {
|
page {
|
||||||
@@ -137,10 +153,8 @@ page {
|
|||||||
grid-template-rows: repeat(auto, 1fr);
|
grid-template-rows: repeat(auto, 1fr);
|
||||||
grid-column-gap: 28upx;
|
grid-column-gap: 28upx;
|
||||||
grid-row-gap: 28upx;
|
grid-row-gap: 28upx;
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 0 28upx;
|
padding: 0 28upx;
|
||||||
.item {
|
.item {
|
||||||
box-sizing: border-box;
|
|
||||||
.item-content {
|
.item-content {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|||||||
@@ -256,10 +256,10 @@ page {
|
|||||||
}
|
}
|
||||||
.name {
|
.name {
|
||||||
font-size: 28upx;
|
font-size: 28upx;
|
||||||
// width: 160upx;
|
width: 160upx;
|
||||||
// overflow: hidden;
|
overflow: hidden;
|
||||||
// text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
// white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.t {
|
.t {
|
||||||
color: #999;
|
color: #999;
|
||||||
@@ -277,7 +277,7 @@ page {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-bottom: 28upx;
|
margin-bottom: 32upx;
|
||||||
.icon {
|
.icon {
|
||||||
$size: 56upx;
|
$size: 56upx;
|
||||||
width: $size;
|
width: $size;
|
||||||
|
|||||||
Reference in New Issue
Block a user