新增意见反馈、帮助中心
This commit is contained in:
@@ -11,27 +11,29 @@
|
||||
<view class="quick-menu">
|
||||
<image class="icon" src="/static/me/logo_btn1.png" mode="aspectFit"></image>
|
||||
<image class="icon" src="/static/me/logo_btn2.png" mode="aspectFit"></image>
|
||||
<image class="icon" src="/static/me/logo_btn3.png" mode="aspectFit"></image>
|
||||
<navigator hover-class="none" url="/pages/me/contact">
|
||||
<image class="icon" src="/static/me/logo_btn3.png" mode="aspectFit"></image>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<view class="top">
|
||||
<image class="avatar" src="/static/default_avatar.png" mode="aspectFill"></image>
|
||||
<image class="avatar" :src="userInfo.avatar || '/static/default_avatar.png'" mode="aspectFill"></image>
|
||||
<view class="info-wrap">
|
||||
<view class="name">159****3331</view>
|
||||
<view class="name">{{ userInfo.phone || '请登录' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btm">
|
||||
<view class="item">
|
||||
<navigator class="item" hover-class="none" url="/pages/watching_history/watching_history?type=2">
|
||||
<view class="title">我的喜欢</view>
|
||||
<view class="num">0</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="num">{{ likeData.likeCount }}</view>
|
||||
</navigator>
|
||||
<navigator class="item" hover-class="none" url="/pages/watching_history/watching_history?type=1">
|
||||
<view class="title">我的追剧</view>
|
||||
<view class="num">0</view>
|
||||
</view>
|
||||
<view class="num">{{ likeData.collectCount }}</view>
|
||||
</navigator>
|
||||
<view class="item">
|
||||
<view class="title">我的红包</view>
|
||||
<view class="num">0</view>
|
||||
<view class="num">{{ amount || 0 }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -39,47 +41,44 @@
|
||||
<view class="gold-wrap">
|
||||
<view class="left">
|
||||
<image class="icon" src="/static/me/gold_icon.png" mode="aspectFit"></image>
|
||||
<view class="num">123133.00</view>
|
||||
<view class="num">{{ gold }}</view>
|
||||
</view>
|
||||
<view class="btn">金币明细</view>
|
||||
</view>
|
||||
<view class="title-wrap">
|
||||
<view class="t">观看历史</view>
|
||||
<up-icon name="arrow-right"></up-icon>
|
||||
<navigator hover-class="none" url="/pages/me/gold_record">
|
||||
<view class="btn">金币明细</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<navigator class="title-wrap" hover-class="none" url="/pages/watching_history/watching_history?type=3">
|
||||
<view class="a">
|
||||
<view class="t">观看历史</view>
|
||||
<up-icon name="arrow-right"></up-icon>
|
||||
</view>
|
||||
</navigator>
|
||||
<view class="history-list">
|
||||
<view class="item">
|
||||
<image class="cover" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
|
||||
<view class="name">我在八零年代当后妈</view>
|
||||
<view class="t">看到8集</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<image class="cover" src="https://img2.baidu.com/it/u=3352094756,2708106394&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1422" mode="aspectFill"></image>
|
||||
<view class="name">姜小姐的反击</view>
|
||||
<view class="t">看到12集</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<image class="cover" src="https://q0.itc.cn/images01/20240806/a14af4ece3354215be6294f3d2c264a4.jpeg" mode="aspectFill"></image>
|
||||
<view class="name">霸道载誉归来</view>
|
||||
<view class="t">看到3集</view>
|
||||
<view class="item" v-for="item in recordThree" :key="item.id">
|
||||
<image class="cover" :src="item.titleImg" mode="aspectFill"></image>
|
||||
<view class="name">{{ item.title }}</view>
|
||||
<view class="t">看到{{ item.courseDetailsName }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="empty" style="padding-bottom: 20px" v-if="!recordThree.length">
|
||||
<emprty-card></emprty-card>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card-wrap">
|
||||
<view class="menu-list">
|
||||
<view class="item">
|
||||
<view class="item" @click="toTask">
|
||||
<image class="icon" src="/static/me/menu_icon1.png" mode="aspectFit"></image>
|
||||
<view class="name">任务中心</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item" @click="linkTo('/pages/me/setting')">
|
||||
<image class="icon" src="/static/me/menu_icon2.png" mode="aspectFit"></image>
|
||||
<view class="name">设置中心</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item" @click="linkTo('/pages/me/feedback', true)">
|
||||
<image class="icon" src="/static/me/menu_icon3.png" mode="aspectFit"></image>
|
||||
<view class="name">意见反馈</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item" @click="linkTo('/pages/me/help_center')">
|
||||
<image class="icon" src="/static/me/menu_icon4.png" mode="aspectFit"></image>
|
||||
<view class="name">帮助中心</view>
|
||||
</view>
|
||||
@@ -105,7 +104,66 @@
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup></script>
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { selectByUserId, collectVideoSummary, selectUserMoney } from '@/api/me/me.js';
|
||||
import { linkTo } from '@/utils/app.js';
|
||||
|
||||
const userInfo = ref({});
|
||||
|
||||
// 获取最近的三条观看历史
|
||||
const recordThree = ref([]);
|
||||
async function selectByUserIdAjax() {
|
||||
try {
|
||||
const res = await selectByUserId({ page: 1, limit: 3, classify: 3 });
|
||||
recordThree.value = res.records;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
// 我的喜欢 我的追剧
|
||||
const likeData = reactive({
|
||||
likeCount: 0,
|
||||
collectCount: 0
|
||||
});
|
||||
async function collectVideoSummaryAjax() {
|
||||
try {
|
||||
const res = await collectVideoSummary();
|
||||
likeData.likeCount = res.likeCount;
|
||||
likeData.collectCount = res.collectCount;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
// 金币
|
||||
const gold = ref(0);
|
||||
const amount = ref(0);
|
||||
async function selectUserMoneyAjax() {
|
||||
try {
|
||||
const res = await selectUserMoney();
|
||||
gold.value = res.money;
|
||||
amount.value = res.amount;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
// 跳转任务中心
|
||||
function toTask() {
|
||||
uni.switchTab({
|
||||
url: '/pages/task/index'
|
||||
});
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
userInfo.value = uni.getStorageSync('userInfo');
|
||||
selectByUserIdAjax();
|
||||
collectVideoSummaryAjax();
|
||||
selectUserMoneyAjax();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
$bgColor: #f5f7ff;
|
||||
@@ -173,7 +231,7 @@ page {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-size: 28upx;
|
||||
font-size: 32upx;
|
||||
}
|
||||
}
|
||||
.btm {
|
||||
@@ -190,6 +248,8 @@ page {
|
||||
}
|
||||
.num {
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -247,19 +307,23 @@ page {
|
||||
}
|
||||
.title-wrap {
|
||||
padding: 28upx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.t {
|
||||
font-size: 28upx;
|
||||
.a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.t {
|
||||
font-size: 28upx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.history-list {
|
||||
padding: 0 28upx 28upx;
|
||||
display: flex;
|
||||
gap: 28upx;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
grid-template-rows: 1fr;
|
||||
grid-column-gap: 28upx;
|
||||
grid-row-gap: 28upx;
|
||||
.item {
|
||||
flex: 1;
|
||||
.cover {
|
||||
width: 100%;
|
||||
height: 280upx;
|
||||
|
||||
Reference in New Issue
Block a user