Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/new_app into test
This commit is contained in:
@@ -9,14 +9,12 @@
|
|||||||
<image class="img" src="/static/logo.png" mode="widthFix"></image>
|
<image class="img" src="/static/logo.png" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="quick-menu">
|
<view class="quick-menu">
|
||||||
<image class="icon" src="/static/me/logo_btn1.png" mode="aspectFit" @click="linkTo('/pages/share/index')"></image>
|
<image class="icon" src="/static/me/logo_btn1.png" mode="aspectFit" @click="linkTo('/pages/share/index', true)"></image>
|
||||||
<image class="icon" src="/static/me/logo_btn2.png" mode="aspectFit" @click="linkTo('/pages/me/message', true)"></image>
|
<image class="icon" src="/static/me/logo_btn2.png" mode="aspectFit" @click="linkTo('/pages/me/message', true)"></image>
|
||||||
<navigator hover-class="none" url="/pages/me/contact">
|
<image class="icon" src="/static/me/logo_btn3.png" mode="aspectFit" @click="linkTo('/pages/me/contact', true)"></image>
|
||||||
<image class="icon" src="/static/me/logo_btn3.png" mode="aspectFit"></image>
|
|
||||||
</navigator>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="top" @click="linkTo('/pages/me/userInfo')">
|
<view class="top" @click="linkTo(userInfo.phone?'/pages/me/userInfo':'/pages/login/login')">
|
||||||
<image class="avatar" :src="userInfo.avatar || '/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="info-wrap">
|
||||||
<view class="name">{{ userInfo.phone || '请登录' }}</view>
|
<view class="name">{{ userInfo.phone || '请登录' }}</view>
|
||||||
@@ -31,7 +29,7 @@
|
|||||||
<view class="title">我的追剧</view>
|
<view class="title">我的追剧</view>
|
||||||
<view class="num">{{ likeData.collectCount }}</view>
|
<view class="num">{{ likeData.collectCount }}</view>
|
||||||
</navigator>
|
</navigator>
|
||||||
<view class="item" v-if="$common.isIosExamine()" @click="linkTo('/pages/me/withdraw/index')">
|
<view class="item" v-if="$common.isIosExamine()" @click="linkTo('/pages/me/withdraw/index', true)">
|
||||||
<view class="title">我的红包</view>
|
<view class="title">我的红包</view>
|
||||||
<view class="num">{{ amount || 0 }}</view>
|
<view class="num">{{ amount || 0 }}</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -43,16 +41,18 @@
|
|||||||
<image class="icon" src="/static/me/gold_icon.png" mode="aspectFit"></image>
|
<image class="icon" src="/static/me/gold_icon.png" mode="aspectFit"></image>
|
||||||
<view class="num">{{ gold }}</view>
|
<view class="num">{{ gold }}</view>
|
||||||
</view>
|
</view>
|
||||||
<navigator hover-class="none" url="/pages/me/gold_record">
|
<div @click="linkTo('/pages/me/gold_record', true)">
|
||||||
<view class="btn">金币明细</view>
|
<view class="btn">金币明细</view>
|
||||||
</navigator>
|
</div>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<navigator class="title-wrap" hover-class="none" url="/pages/watching_history/watching_history?type=3">
|
<div class="title-wrap" @click="linkTo('/pages/watching_history/watching_history?type=3', true)">
|
||||||
<view class="a">
|
<view class="a">
|
||||||
<view class="t">观看历史</view>
|
<view class="t">观看历史</view>
|
||||||
<up-icon name="arrow-right"></up-icon>
|
<up-icon name="arrow-right"></up-icon>
|
||||||
</view>
|
</view>
|
||||||
</navigator>
|
</div>
|
||||||
|
|
||||||
<view class="history-list">
|
<view class="history-list">
|
||||||
<view
|
<view
|
||||||
class="item"
|
class="item"
|
||||||
@@ -111,19 +111,21 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive } from 'vue';
|
import { ref, reactive } from 'vue';
|
||||||
import { onLoad, onShow, onPullDownRefresh } from '@dcloudio/uni-app';
|
import { onLoad,onShow, onPullDownRefresh } from '@dcloudio/uni-app';
|
||||||
import { selectByUserId, collectVideoSummary, selectUserMoney } from '@/api/me/me.js';
|
import { selectByUserId, collectVideoSummary, selectUserMoney } from '@/api/me/me.js';
|
||||||
import { linkTo } from '@/utils/app.js';
|
import { linkTo } from '@/utils/app.js';
|
||||||
import { useCommonStore } from '@/store/common.js';
|
import {
|
||||||
const $common = useCommonStore();
|
useCommonStore
|
||||||
|
} from '@/store/common.js'
|
||||||
|
const $common = useCommonStore()
|
||||||
const userInfo = ref({});
|
const userInfo = ref({});
|
||||||
|
|
||||||
// 获取最近的三条观看历史
|
// 获取最近的三条观看历史
|
||||||
const recordThree = ref([]);
|
const recordThree = ref([]);
|
||||||
onShow(() => {
|
onShow(()=>{
|
||||||
// 判断ios是否审核
|
// 判断ios是否审核
|
||||||
$common.init();
|
$common.init()
|
||||||
});
|
})
|
||||||
async function selectByUserIdAjax() {
|
async function selectByUserIdAjax() {
|
||||||
try {
|
try {
|
||||||
const res = await selectByUserId({ page: 1, limit: 3, classify: 3 });
|
const res = await selectByUserId({ page: 1, limit: 3, classify: 3 });
|
||||||
@@ -177,11 +179,14 @@ onPullDownRefresh(async () => {
|
|||||||
}, 500);
|
}, 500);
|
||||||
});
|
});
|
||||||
|
|
||||||
onShow(() => {
|
onLoad(() => {
|
||||||
|
if(uni.getStorageSync('token')){
|
||||||
selectByUserIdAjax();
|
selectByUserIdAjax();
|
||||||
collectVideoSummaryAjax();
|
collectVideoSummaryAjax();
|
||||||
selectUserMoneyAjax();
|
selectUserMoneyAjax();
|
||||||
userInfo.value = uni.getStorageSync('userInfo');
|
userInfo.value = uni.getStorageSync('userInfo');
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="item" @click="linkTo('/pages/login/bind')">
|
<view class="item" @click="linkTo('/pages/login/bind',true)">
|
||||||
<view class="title">修改手机号</view>
|
<view class="title">修改手机号</view>
|
||||||
<up-icon name="arrow-right" />
|
<up-icon name="arrow-right" />
|
||||||
</view>
|
</view>
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
<view class="title">帮助中心</view>
|
<view class="title">帮助中心</view>
|
||||||
<up-icon name="arrow-right" />
|
<up-icon name="arrow-right" />
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="linkTo('/pages/me/feedback')">
|
<view class="item" @click="linkTo('/pages/me/feedback',true)">
|
||||||
<view class="title">意见反馈</view>
|
<view class="title">意见反馈</view>
|
||||||
<up-icon name="arrow-right" />
|
<up-icon name="arrow-right" />
|
||||||
</view>
|
</view>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
<view class="title">隐私协议</view>
|
<view class="title">隐私协议</view>
|
||||||
<up-icon name="arrow-right" />
|
<up-icon name="arrow-right" />
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="logout">
|
<view class="item" @click="logout" v-if="token">
|
||||||
<view class="title">退出登录</view>
|
<view class="title">退出登录</view>
|
||||||
<up-icon name="arrow-right" />
|
<up-icon name="arrow-right" />
|
||||||
</view>
|
</view>
|
||||||
@@ -36,6 +36,7 @@ import { linkTo } from '@/utils/app.js';
|
|||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
|
|
||||||
const version = ref('');
|
const version = ref('');
|
||||||
|
const token = ref('');
|
||||||
|
|
||||||
// 退出登录
|
// 退出登录
|
||||||
function logout() {
|
function logout() {
|
||||||
@@ -54,6 +55,7 @@ function logout() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
|
token.value = uni.getStorageSync('token');
|
||||||
const systemInfo = uni.getSystemInfoSync();
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
//#ifdef APP-PLUS
|
//#ifdef APP-PLUS
|
||||||
version.value = systemInfo.appWgtVersion;
|
version.value = systemInfo.appWgtVersion;
|
||||||
|
|||||||
Reference in New Issue
Block a user