Compare commits
1 Commits
master
...
xulu-visit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97ff3915c0 |
@@ -2,7 +2,7 @@
|
||||
<view>
|
||||
<view class="footer_box" :class="{ footer_bg: bg }">
|
||||
<view v-for="(item, index) of navigationList" :key="index" class="footer_item">
|
||||
<view class="footer_nav_item" @click="onPageJump(item.pagePath)">
|
||||
<view class="footer_nav_item" @click="onPageJump(item.pagePath,index+1)">
|
||||
<image v-if="item.pagePath == path" class="footer_nav_item_image footer_nav_item_image_scale"
|
||||
:src="'/' + item.selectedIconPath" mode="aspectFit"></image>
|
||||
<image v-else class="footer_nav_item_image" :src="'/' + item.iconPath" mode="aspectFit"></image>
|
||||
@@ -69,12 +69,24 @@
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
onPageJump(url) {
|
||||
onPageJump(url,num) {
|
||||
if (uni.getStorageSync("anonymous") == '0000000000' && (num == 2 || num == 3)) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请先登录'
|
||||
})
|
||||
// setTimeout(() => {
|
||||
// uni.navigateTo({
|
||||
// url: "/pages/user/login"
|
||||
// });
|
||||
// }, 1000)
|
||||
} else {
|
||||
if (this.path !== url) {
|
||||
uni.switchTab({
|
||||
url: '/' + url
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
@@ -6,10 +6,10 @@ if (process.env.NODE_ENV === 'development') {
|
||||
// socketUrl = "ws://localhost:6001/";
|
||||
// baseUrl = "https://twin-ui.com/demo/";
|
||||
// baseUrl = "http://59.110.212.44:9200/pb/";
|
||||
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
|
||||
baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
|
||||
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
||||
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑
|
||||
baseUrl = "http://192.168.110.110:9200/pb/";
|
||||
// baseUrl = "http://192.168.110.110:9200/pb/";
|
||||
// baseUrl = "http://192.168.110.38:9200/pb/"; // 吴春磊笔记本1
|
||||
// socketUrl = "ws://8.129.186.35:6001/";
|
||||
} else if (process.env.NODE_ENV === 'production') {
|
||||
|
||||
@@ -240,13 +240,13 @@ export const h5Login = function(type = "judge", callback) {
|
||||
appMutual("jumpLogin", null, function() {
|
||||
if (type == "force") {
|
||||
// 没登录跳转回登录页
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '用户信息失效,请重新登陆。'
|
||||
})
|
||||
uni.navigateTo({
|
||||
url: "/pages/user/login"
|
||||
});
|
||||
// uni.showToast({
|
||||
// icon: 'none',
|
||||
// title: '用户信息失效,请重新登陆。'
|
||||
// })
|
||||
// uni.navigateTo({
|
||||
// url: "/pages/user/login"
|
||||
// });
|
||||
}else{
|
||||
uni.showModal({
|
||||
title:"提示",
|
||||
|
||||
@@ -125,9 +125,11 @@ $http.requestStart = function(options) {
|
||||
let storeUserInfo = store.state.userInfo;
|
||||
if (!storeUserInfo.token) { // nvue页面读取不到vuex里面数据,将取缓存
|
||||
storeUserInfo = uni.getStorageSync("userInfo");
|
||||
uni.setStorageSync('anonymous', '0000000000');
|
||||
}
|
||||
if (storeUserInfo.token) {
|
||||
options.header['token'] = storeUserInfo.token;
|
||||
uni.setStorageSync('anonymous', storeUserInfo.token);
|
||||
};
|
||||
return options;
|
||||
}
|
||||
@@ -161,8 +163,9 @@ $http.dataFactory = async function(res) {
|
||||
// 返回正确的结果(then接受数据)
|
||||
return Promise.resolve(httpData);
|
||||
} else if (httpData.code == "401") {
|
||||
console.log(uni.getStorageSync("anonymous"))
|
||||
// token失效
|
||||
if (uni.getStorageSync('guidePages') == 2) {
|
||||
if (uni.getStorageSync('guidePages') == 2 && uni.getStorageSync("anonymous") != '0000000000') {
|
||||
uni.showToast({
|
||||
title: '登录失效,请重新登录',
|
||||
icon: 'none'
|
||||
|
||||
@@ -448,8 +448,18 @@
|
||||
url: '../peanut/shopping'
|
||||
});
|
||||
},
|
||||
|
||||
// 关联商品点击按钮组件
|
||||
buttonClickLink(e) {
|
||||
// 游客跳转
|
||||
if (uni.getStorageSync("anonymous") == '0000000000') {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请先登录'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
console.log('点击的是关联商品的组件')
|
||||
if (e.index == 0) {
|
||||
// 点击的是加入购物车
|
||||
@@ -484,6 +494,14 @@
|
||||
},
|
||||
// 点击按钮组间
|
||||
buttonClick(e) {
|
||||
// 游客跳转
|
||||
if (uni.getStorageSync("anonymous") == '0000000000') {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请先登录'
|
||||
})
|
||||
return
|
||||
}
|
||||
// console.log(e)
|
||||
if (e.index == 0) {
|
||||
// 点击的是加入购物车
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
<view v-if="item.clockIn != null && item.clockIn != 2" @click="goDaKa(item)">
|
||||
<image src="../../static/icon/home1.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
|
||||
<view v-else @click="noOp()">
|
||||
<image class="gray" src="../../static/icon/home1.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</view>
|
||||
|
||||
<view class="fiveIcon flexbox" style="justify-content: space-around;">
|
||||
<div class="item item1" @click="onPageJump('../acupoint/acupoint')">
|
||||
<div class="item item1" @click="anonymous?onYouAlert():onPageJump('../acupoint/acupoint')">
|
||||
<image src="../../static/icon/five1.png" mode="aspectFit"></image>
|
||||
<text>经穴检索</text>
|
||||
</div>
|
||||
@@ -24,7 +24,7 @@
|
||||
<image src="../../static/icon/five4.png" mode="aspectFit"></image>
|
||||
<text>五运六气</text>
|
||||
</div> -->
|
||||
<div class="item item1" @click="onPageJump('../peanut/searchFor')">
|
||||
<div class="item item1" @click="anonymous?onYouAlert():onPageJump('../peanut/searchFor')">
|
||||
<image src="../../static/icon/five3.png" mode="aspectFit"></image>
|
||||
<text>书名检索</text>
|
||||
</div>
|
||||
@@ -51,28 +51,28 @@
|
||||
</view>
|
||||
<!-- <view class="home_nar" v-if="showEbook"> -->
|
||||
<view class="home_nar">
|
||||
<view class="hn_cl_tit shuguan" @click="onPageJump('../clock/index')">
|
||||
<view class="hn_cl_tit shuguan" @click="anonymous?onYouAlert():onPageJump('../clock/index')">
|
||||
<image src="../../static/icon/home1-1.png" mode="aspectFit"></image>
|
||||
<!-- <text>打 卡</text> -->
|
||||
</view>
|
||||
|
||||
<view class="hn_cl_tit dianzishu" @click="onPageJump('../listen/home')">
|
||||
<view class="hn_cl_tit dianzishu" @click="anonymous?onYouAlert():onPageJump('../listen/home')">
|
||||
<image src="../../static/icon/home2-1.png" mode="aspectFit"></image>
|
||||
<!-- <text>听 书</text> -->
|
||||
</view>
|
||||
|
||||
<!-- <view class="hn_cl_tit" @click="onPageJump('../bookShop/bookShopIndex')"> -->
|
||||
<view class="hn_cl_tit shuping" @click="onPageJump('../comments/commentsList')">
|
||||
<view class="hn_cl_tit shuping" @click="anonymous?onYouAlert():onPageJump('../comments/commentsList')">
|
||||
<image src="../../static/icon/home3-1.png" mode="aspectFit"></image>
|
||||
<!-- <text>书 评</text> -->
|
||||
</view>
|
||||
|
||||
<view class="hn_cl_tit chaoshi" @click="onPageJump('../talkBook/talkBook')">
|
||||
<view class="hn_cl_tit chaoshi" @click="anonymous?onYouAlert():onPageJump('../talkBook/talkBook')">
|
||||
<image src="../../static/icon/home4-1.png" mode="aspectFit"></image>
|
||||
<!-- <text>讲 书</text> -->
|
||||
</view>
|
||||
|
||||
<view class="hn_cl_tit chaoshi" @click="onPageJump('../yian/yian')">
|
||||
<view class="hn_cl_tit chaoshi" @click="anonymous?onYouAlert():onPageJump('../yian/yian')">
|
||||
<image src="../../static/icon/home5-1.png" mode="aspectFit"></image>
|
||||
<!-- <text>讲 书</text> -->
|
||||
</view>
|
||||
@@ -221,7 +221,8 @@
|
||||
<!-- </view> -->
|
||||
<scroll-view class="scroll-view_H " scroll-x="true" scroll-left="0">
|
||||
<view class="ProTabs">
|
||||
<text v-for="item in tagList" :key="item.splId" :class="[tabsid == item.splId ? 'cur' :'']" @click="tabsChange(item)">{{item.labelName}}</text>
|
||||
<text v-for="item in tagList" :key="item.splId" :class="[tabsid == item.splId ? 'cur' :'']"
|
||||
@click="tabsChange(item)">{{item.labelName}}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- 商品展示 -->
|
||||
@@ -238,7 +239,8 @@
|
||||
{{item.productName}}
|
||||
</view>
|
||||
<view class="goodsPrice">
|
||||
<span class="price" v-if="item.activityPrice && item.activityPrice > 0">¥{{item.activityPrice}}</span>
|
||||
<span class="price"
|
||||
v-if="item.activityPrice && item.activityPrice > 0">¥{{item.activityPrice}}</span>
|
||||
<span class="price" v-else>¥{{item.price}}</span>
|
||||
<span class="Salesnum">已售:{{item.sumSales}} 件</span>
|
||||
</view>
|
||||
@@ -248,7 +250,8 @@
|
||||
<view class="">
|
||||
<view v-if="status==0" style="text-align: center;">
|
||||
<u-loading-icon style="display: inline-block;"></u-loading-icon>
|
||||
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中</font>
|
||||
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中
|
||||
</font>
|
||||
</view>
|
||||
<view v-if="status==1">
|
||||
<u-divider text="全部加载完成"></u-divider>
|
||||
@@ -278,7 +281,8 @@
|
||||
import repciptData from '@/static/json/repcipt.json'
|
||||
import $http from '@/config/requestConfig.js';
|
||||
import {
|
||||
mapState,mapMutations
|
||||
mapState,
|
||||
mapMutations
|
||||
} from 'vuex';
|
||||
export default {
|
||||
data() {
|
||||
@@ -322,7 +326,8 @@
|
||||
page: 1,
|
||||
totalPage: 0,
|
||||
tjProList: [],
|
||||
status : 3
|
||||
status: 3,
|
||||
anonymous: false, //游客
|
||||
};
|
||||
},
|
||||
onPageScroll(e) {
|
||||
@@ -347,7 +352,8 @@
|
||||
this.tjProList = []
|
||||
uni.hideTabBar();
|
||||
this.getData();
|
||||
this.getTags()
|
||||
this.getTags();
|
||||
this.anonyMo();
|
||||
},
|
||||
// 页面加载完毕
|
||||
onReady() {
|
||||
@@ -399,6 +405,14 @@
|
||||
methods: {
|
||||
...mapMutations(['setUserInfo']),
|
||||
// ...mapMutations(['setLoadingShow']),
|
||||
// 游客模式
|
||||
anonyMo() {
|
||||
if (uni.getStorageSync("anonymous") == '0000000000') {
|
||||
this.anonymous = true
|
||||
} else {
|
||||
this.anonymous = false
|
||||
}
|
||||
},
|
||||
// 获取商品标签
|
||||
getTags() {
|
||||
this.loadingNow = false
|
||||
@@ -531,7 +545,9 @@
|
||||
console.log('关闭订单成功', index);
|
||||
|
||||
if (index == this.ComplateRequestArr.length - 1) { // 最后一个支付订单
|
||||
this.setUserInfo({restoreFlag:false});
|
||||
this.setUserInfo({
|
||||
restoreFlag: false
|
||||
});
|
||||
// console.log(this.userInfo.restoreFlag,'this.ComplateRequestArr.length+++')
|
||||
}
|
||||
|
||||
@@ -709,7 +725,13 @@
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 游客跳转
|
||||
onYouAlert() {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请先登录'
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
@@ -717,46 +739,115 @@
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import '@/style/mixin.scss';
|
||||
.fiveIcon{justify-content: space-between; text-align: center;
|
||||
|
||||
.fiveIcon {
|
||||
justify-content: space-between;
|
||||
text-align: center;
|
||||
|
||||
text {
|
||||
font-size: 28rpx; color: #11a669;
|
||||
font-size: 28rpx;
|
||||
color: #11a669;
|
||||
}
|
||||
image{width: 56rpx; height: 56rpx; margin: 0 auto; }
|
||||
|
||||
image {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.hehan{width: 80%; margin: 10rpx auto;}
|
||||
}
|
||||
|
||||
.hehan {
|
||||
width: 80%;
|
||||
margin: 10rpx auto;
|
||||
}
|
||||
|
||||
.zhekou {
|
||||
.goodsName{margin-bottom: 20rpx;}
|
||||
.goodsName {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.activityPrice{font-size: 60rpx;}
|
||||
.priceAndnum{ font-size: 24rpx !important;
|
||||
.price{color: #9b9b9b !important; font-size: inherit; font-weight: normal !important; display: block;}
|
||||
}
|
||||
|
||||
.activityPrice {
|
||||
font-size: 60rpx;
|
||||
}
|
||||
|
||||
.priceAndnum {
|
||||
font-size: 24rpx !important;
|
||||
|
||||
.price {
|
||||
color: #9b9b9b !important;
|
||||
font-size: inherit;
|
||||
font-weight: normal !important;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.ProTabs {
|
||||
// margin: 20rpx 0;
|
||||
padding: 0 20rpx;
|
||||
text{padding: 8rpx 14rpx; font-size: 32rpx; display: inline-block; border-radius: 10rpx; overflow: hidden;
|
||||
|
||||
text {
|
||||
padding: 8rpx 14rpx;
|
||||
font-size: 32rpx;
|
||||
display: inline-block;
|
||||
border-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
// background-color: #eee;
|
||||
color: #55aa7f; margin-right: 10rpx;}
|
||||
text.cur{background-color:#55aa7f ; color: #fff;}
|
||||
color: #55aa7f;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
text.cur {
|
||||
background-color: #55aa7f;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
// .newBook{margin-top: 10rpx;}
|
||||
.scroll-view_H{background-color: #fff;white-space: nowrap;
|
||||
padding:10rpx ; margin-top: 12rpx;}
|
||||
.scroll-view_H {
|
||||
.item { padding: 10rpx; overflow: hidden; display: inline-block; padding-bottom: 0;
|
||||
width: 180rpx !important; margin-right: 20rpx; border-radius: 10rpx;
|
||||
background-color: #fff;
|
||||
white-space: nowrap;
|
||||
padding: 10rpx;
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
|
||||
.scroll-view_H {
|
||||
.item {
|
||||
padding: 10rpx;
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
padding-bottom: 0;
|
||||
width: 180rpx !important;
|
||||
margin-right: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
|
||||
.videoBox {
|
||||
image{display: block; width:150rpx;
|
||||
image {
|
||||
display: block;
|
||||
width: 150rpx;
|
||||
height: 170rpx;
|
||||
}
|
||||
}
|
||||
.bookName{display: block; margin-top: 6rpx; color: #666; font-size: 24rpx; white-space: nowrap;
|
||||
overflow-x: hidden; overflow: hidden;
|
||||
text-overflow: ellipsis;}
|
||||
|
||||
.bookName {
|
||||
display: block;
|
||||
margin-top: 6rpx;
|
||||
color: #666;
|
||||
font-size: 24rpx;
|
||||
white-space: nowrap;
|
||||
overflow-x: hidden;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
// .item.active{margin-right: 20rpx; border: 1px solid #55aa00; border-radius: 10rpx;}
|
||||
}
|
||||
.flexbox{display: flex;}
|
||||
|
||||
.flexbox {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.head_line {
|
||||
padding-top: 8rpx;
|
||||
margin: 12rpx 0 0 0;
|
||||
@@ -792,32 +883,56 @@
|
||||
background-size: cover;
|
||||
padding: 20rpx;
|
||||
position: relative;
|
||||
|
||||
// margin-bottom:60rpx;
|
||||
// height: 400rpx; margin-bottom: 130rpx;
|
||||
.icon_hua_1 {
|
||||
// margin: 0 auto;
|
||||
width: 100%; text-align: center;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
height: 80rpx;
|
||||
|
||||
image {
|
||||
width: 150rpx;
|
||||
height: 80rpx;
|
||||
image{width: 150rpx; height: 80rpx;}
|
||||
}
|
||||
.icon_hua{width: 100%; text-align: center; display: block;
|
||||
image{width: 150rpx; height: 150rpx; margin: 0 auto;}
|
||||
}
|
||||
.search_box { margin: 0 auto; margin-top: 20rpx; align-items: center;
|
||||
width: calc(100% - 30rpx); margin-top: 0;
|
||||
|
||||
.icon_hua {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
display: block;
|
||||
|
||||
image {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.search_box {
|
||||
margin: 0 auto;
|
||||
margin-top: 20rpx;
|
||||
align-items: center;
|
||||
width: calc(100% - 30rpx);
|
||||
margin-top: 0;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.search{height: 56upx;
|
||||
.search {
|
||||
height: 56upx;
|
||||
display: flex;
|
||||
width: 86%; margin: 0 auto;
|
||||
width: 86%;
|
||||
margin: 0 auto;
|
||||
align-items: center;
|
||||
padding: 0upx 40upx;
|
||||
background-color: #fff;
|
||||
border-radius: 20upx;
|
||||
box-shadow: 0 0px 10px 1px #54a96633;
|
||||
}
|
||||
|
||||
.prompt {
|
||||
color: #838383; font-size: 24rpx;
|
||||
color: #838383;
|
||||
font-size: 24rpx;
|
||||
|
||||
}
|
||||
|
||||
@@ -831,11 +946,15 @@
|
||||
margin-right: 20upx;
|
||||
}
|
||||
}
|
||||
|
||||
.searBtn {
|
||||
width: 80rpx; align-items: center;
|
||||
font-size: 30rpx; color: #fff;
|
||||
width: 80rpx;
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.home_nar {
|
||||
background-color: #fff;
|
||||
padding: 40rpx 10rpx;
|
||||
@@ -843,6 +962,7 @@
|
||||
display: flex;
|
||||
color: #333;
|
||||
margin-bottom: 0;
|
||||
|
||||
// .dianzishu{ margin-right:10rpx;
|
||||
// background-color:#f8d6f4 ; border: 2px solid #edcce9;
|
||||
// }
|
||||
@@ -858,6 +978,7 @@
|
||||
//display: flex;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
|
||||
image {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
@@ -865,7 +986,15 @@
|
||||
margin: 0 auto;
|
||||
// margin: 0 20rpx;
|
||||
}
|
||||
text{ display:block; text-align: center; margin-top:4rpx; font-size: 36rpx; color: #000; font-weight:blod;}
|
||||
|
||||
text {
|
||||
display: block;
|
||||
text-align: center;
|
||||
margin-top: 4rpx;
|
||||
font-size: 36rpx;
|
||||
color: #000;
|
||||
font-weight: blod;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1129,13 +1258,15 @@
|
||||
|
||||
.goods {
|
||||
width: 100%;
|
||||
margin:0 0 50rpx 0; background-color: #fff;
|
||||
margin: 0 0 50rpx 0;
|
||||
background-color: #fff;
|
||||
|
||||
.goodsItem {
|
||||
display: inline-block;
|
||||
width: 46%;
|
||||
border-radius: 20rpx;
|
||||
padding: 25rpx; padding-bottom: 5rpx;
|
||||
padding: 25rpx;
|
||||
padding-bottom: 5rpx;
|
||||
margin: 0 20rpx 20rpx 20rpx;
|
||||
background-color: #fff;
|
||||
border: 1px solid #eee;
|
||||
@@ -1157,12 +1288,17 @@
|
||||
.goodsPrice {
|
||||
font-size: 28rpx;
|
||||
margin: 5rpx 0 0 3rpx;
|
||||
display: flex; justify-content: space-between;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.price {
|
||||
font-weight: bold;
|
||||
color: #ff0000;
|
||||
}
|
||||
.Salesnum{color: #9b9b9b;}
|
||||
|
||||
.Salesnum {
|
||||
color: #9b9b9b;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
<view style="height: 50rpx;"></view>
|
||||
<view class="per_mes">
|
||||
<image :src="userMes.avatar" v-if="userMes.avatar!=null" class="per_mes_img"></image>
|
||||
<image src="../../static/icon/home_icon_1.png" v-if="userMes.avatar==null" class="per_mes_img"></image>
|
||||
<image src="../../static/icon/home_icon_1.png" v-if="userMes.avatar==null" class="per_mes_img" @click="signOut()"></image>
|
||||
<view>
|
||||
<text class="name" v-if="userMes.nickname!=null">{{userMes.nickname}}</text>
|
||||
<text class="name" v-if="userMes.nickname==null">未设置</text>
|
||||
<text class="name" v-if="userMes.nickname==null" @click="signOut()">未登录</text>
|
||||
<!-- <image v-if="userMes.vip==1" src="../../static/icon/mine_v.png" alt="" class="per_user_img"></image> -->
|
||||
<text style="margin-left: 20rpx;font-size: 22rpx;color: #888;">({{userMes.tel}})</text>
|
||||
<text style="margin-left: 20rpx;font-size: 22rpx;color: #888;" v-if="userMes.tel">({{userMes.tel}})</text>
|
||||
|
||||
<!-- <text class="tong">累计读书5本
|
||||
<span style="margin: 0 20upx;">|</span> 今日读50分钟
|
||||
@@ -35,7 +35,7 @@
|
||||
<b class="kt_btn" @click="onPageJump('./opeVip')">立即续费</b>
|
||||
</view> -->
|
||||
|
||||
<view class="chong_zhi">
|
||||
<view class="chong_zhi" v-if="!anonymous">
|
||||
<view class="zhanghu" @click="onPageJump('../user/persCount')">
|
||||
我的账户
|
||||
<text style="float: right;line-height: 85rpx;"> > </text>
|
||||
@@ -55,6 +55,7 @@
|
||||
</view>
|
||||
|
||||
<view class="xiugai">
|
||||
<view v-if="!anonymous">
|
||||
<view class="nav_list" @click="switchTab('../bookShop/orderList')">
|
||||
<text>我的订单</text>
|
||||
</view>
|
||||
@@ -102,7 +103,16 @@
|
||||
<view class="nav_list" @click="logout">
|
||||
<text>注销帐号</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="anonymous">
|
||||
<view class="nav_list" @click="newOnShare">
|
||||
<text>分享App</text>
|
||||
</view>
|
||||
<view class="nav_list" @click="onPageJump('../peanut/aboutUs')">
|
||||
<text>关于我们</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-modal :show="signShow" :content="signContent" :showCancelButton="true" @cancel="signShow=false"
|
||||
@@ -115,6 +125,7 @@
|
||||
|
||||
<music-play :playData="playData"></music-play>
|
||||
<z-navigation></z-navigation>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -123,7 +134,8 @@
|
||||
import $http from '@/config/requestConfig.js';
|
||||
// import appShare, { closeShare } from '@/uni_modules/zhouWei-APPshare/js_sdk/appShare';
|
||||
import {
|
||||
mapState,mapMutations
|
||||
mapState,
|
||||
mapMutations
|
||||
} from 'vuex';
|
||||
export default {
|
||||
data() {
|
||||
@@ -135,6 +147,7 @@
|
||||
playData: {},
|
||||
isAndorid: true,
|
||||
platform: null, // 设备系统
|
||||
anonymous: false, //游客
|
||||
};
|
||||
},
|
||||
//第一次加载
|
||||
@@ -155,6 +168,7 @@
|
||||
// 隐藏原生的tabbar
|
||||
uni.hideTabBar();
|
||||
this.getData();
|
||||
this.anonyMo();
|
||||
},
|
||||
components: {
|
||||
musicPlay
|
||||
@@ -216,6 +230,18 @@
|
||||
url: url
|
||||
});
|
||||
},
|
||||
|
||||
// 游客模式
|
||||
anonyMo() {
|
||||
if (uni.getStorageSync("anonymous") == '0000000000') {
|
||||
this.anonymous = true
|
||||
} else {
|
||||
this.anonymous = false
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
getData() {
|
||||
// 获取个人信息
|
||||
if (this.userInfo.id != undefined) {
|
||||
@@ -280,7 +306,9 @@
|
||||
// 退出登录
|
||||
signOut() {
|
||||
this.signShow = false
|
||||
this.setUserInfo({'token': null})
|
||||
this.setUserInfo({
|
||||
'token': null
|
||||
})
|
||||
uni.reLaunch({
|
||||
url: '../user/login'
|
||||
});
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.2 KiB |
Reference in New Issue
Block a user