|
@@ -125,8 +125,17 @@
|
|
|
<view class="tn-flex tn-flex-row-between tn-bg-white about-shadow tn-margin-top-xl">
|
|
|
<view class="tn-padding-sm tn-margin-xs" @click="tn('/pages/mine/need')">
|
|
|
<view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center tn-margin-left">
|
|
|
- <view class="icon15__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur" style="background-color: #F3F2F7;color: #7C8191;">
|
|
|
- <view class="tn-icon-like"></view>
|
|
|
+ <view class="icon15__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur" style="background-color: #F3F2F7;color: #7C8191;position: relative;">
|
|
|
+ <!-- <tn-badge absolute="true" v-if="needNum>0">
|
|
|
+ <span style="color: #fff;font-size: 11px;
|
|
|
+ background: #E83A30;
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ text-align: center;
|
|
|
+ border-radius: 20px;
|
|
|
+ line-height: 20px;">{{needNum}}</span>
|
|
|
+ </tn-badge> -->
|
|
|
+ <view class="tn-icon-like"></view>
|
|
|
</view>
|
|
|
<view class="tn-text-center">
|
|
|
<text class="tn-text-ellipsis">我的需求</text>
|
|
@@ -135,8 +144,17 @@
|
|
|
</view>
|
|
|
<view class="tn-padding-sm tn-margin-xs" @click="tn('/pages/mine/share')">
|
|
|
<view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
|
|
|
- <view class="icon15__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur" style="background-color: #F3F2F7;color: #7C8191;">
|
|
|
- <view class="tn-icon-share-triangle"></view>
|
|
|
+ <view class="icon15__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur" style="background-color: #F3F2F7;color: #7C8191;position: relative;">
|
|
|
+ <!-- <tn-badge absolute="true" v-if="shareNum>0">
|
|
|
+ <span style="color: #fff;font-size: 11px;
|
|
|
+ background: #E83A30;
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ text-align: center;
|
|
|
+ border-radius: 20px;
|
|
|
+ line-height: 20px;">{{shareNum}}</span>
|
|
|
+ </tn-badge> -->
|
|
|
+ <view class="tn-icon-share-triangle"></view>
|
|
|
</view>
|
|
|
<view class="tn-text-center">
|
|
|
<text class="tn-text-ellipsis">我的供应</text>
|
|
@@ -221,7 +239,7 @@
|
|
|
<view class="tn-flex tn-flex-col-center">
|
|
|
<view
|
|
|
class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center" style="color: #7C8191;">
|
|
|
- <view class="tn-icon-logout"></view>
|
|
|
+ <view class="tn-icon-my-reduce"></view>
|
|
|
</view>
|
|
|
<view class="tn-margin-left-sm tn-flex-1">注销账户</view>
|
|
|
<view class="tn-color-gray tn-icon-right"></view>
|
|
@@ -229,6 +247,21 @@
|
|
|
</tn-list-cell>
|
|
|
|
|
|
</view>
|
|
|
+
|
|
|
+ <view class="about-shadow tn-margin-top-lg tn-margin-bottom-lg tn-padding-top-sm tn-padding-bottom-sm" v-if="!showLogin">
|
|
|
+
|
|
|
+ <tn-list-cell :hover="true" :unlined="true" :radius="true" :fontSize="30" @click="showLogout()">
|
|
|
+ <view class="tn-flex tn-flex-col-center">
|
|
|
+ <view
|
|
|
+ class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center" style="color: #7C8191;">
|
|
|
+ <view class="tn-icon-logout"></view>
|
|
|
+ </view>
|
|
|
+ <view class="tn-margin-left-sm tn-flex-1">退出登录</view>
|
|
|
+ <view class="tn-color-gray tn-icon-right"></view>
|
|
|
+ </view>
|
|
|
+ </tn-list-cell>
|
|
|
+
|
|
|
+ </view>
|
|
|
|
|
|
</view>
|
|
|
<uni-popup ref="alertDialog" type="dialog">
|
|
@@ -251,7 +284,9 @@
|
|
|
return {
|
|
|
personInfo: uni.getStorageSync('userInfo')?JSON.parse(uni.getStorageSync('userInfo')):{},
|
|
|
showLogin: false,
|
|
|
- msgType:''
|
|
|
+ msgType:'',
|
|
|
+ shareNum:0,
|
|
|
+ needNum:0
|
|
|
}
|
|
|
},
|
|
|
onReady() {
|
|
@@ -259,16 +294,33 @@
|
|
|
this.$nextTick(() => {
|
|
|
if(!uni.getStorageSync('userNo')){
|
|
|
this.showLogin = true;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if(!uni.getStorageSync('loginOut')){
|
|
|
+ this.getContentRectInfo()
|
|
|
+ // this.loadNum();
|
|
|
+ // this.loadNum2();
|
|
|
}
|
|
|
- this.getContentRectInfo()
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ fetchData(){
|
|
|
+ if(!uni.getStorageSync('userNo')){
|
|
|
+ this.showLogin = true;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if(!uni.getStorageSync('loginOut')){
|
|
|
+ this.getContentRectInfo()
|
|
|
+ // this.loadNum();
|
|
|
+ // this.loadNum2();
|
|
|
+ }
|
|
|
+ },
|
|
|
// 获取内容容器的信息
|
|
|
getContentRectInfo() {
|
|
|
let that = this;
|
|
|
+
|
|
|
request.post('/slbWxma/getPersonlInfo', {
|
|
|
|
|
|
}).then(res => {
|
|
@@ -282,7 +334,29 @@
|
|
|
})
|
|
|
|
|
|
},
|
|
|
-
|
|
|
+ loadNum(){
|
|
|
+ let that = this;
|
|
|
+
|
|
|
+ request.post('/slbResourceDemand/show/my', {
|
|
|
+
|
|
|
+ }).then(res => {
|
|
|
+ if(res&&res.resultMap){
|
|
|
+ that.needNum = res.resultMap.passNum||0
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ loadNum2(){
|
|
|
+ let that = this;
|
|
|
+
|
|
|
+ request.post('/slbResourceShare/show/my', {
|
|
|
+
|
|
|
+ }).then(res => {
|
|
|
+ if(res&&res.resultMap){
|
|
|
+ that.shareNum = res.resultMap.passNum||0
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
|
|
|
// 跳转
|
|
|
tn(e) {
|
|
@@ -355,9 +429,32 @@
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ showLogout(){
|
|
|
+ let that = this;
|
|
|
|
|
|
-
|
|
|
+ uniShowModal('确定退出登录吗?', '', {
|
|
|
+ showCancel: true,
|
|
|
+ success: (res) => {
|
|
|
+ console.error(res);
|
|
|
+ if(res.confirm){
|
|
|
+ uni.setStorageSync('loginStatus', 'false');
|
|
|
+ uni.setStorageSync('loginOut', 'true');
|
|
|
+ uni.removeStorageSync('userMap');
|
|
|
+ uni.removeStorageSync('userNo');
|
|
|
+ uni.removeStorageSync('userInfo');
|
|
|
+ that.showLogin = true;
|
|
|
+ that.shareNum = 0;
|
|
|
+ that.needNum = 0;
|
|
|
+ that.personInfo = {};
|
|
|
+ // uni.reLaunch({
|
|
|
+ // url:'/pages/index/index'
|
|
|
+ // })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
//注销
|
|
|
logOff(){
|
|
@@ -366,6 +463,15 @@
|
|
|
userNo: uni.getStorageSync('userNo'),
|
|
|
}).then(res => {
|
|
|
if (res&&res.success) {
|
|
|
+ uni.setStorageSync('loginStatus', 'false');
|
|
|
+ uni.setStorageSync('loginOut', 'true');
|
|
|
+ uni.removeStorageSync('userMap');
|
|
|
+ uni.removeStorageSync('userNo');
|
|
|
+ uni.removeStorageSync('userInfo');
|
|
|
+ that.showLogin = true;
|
|
|
+
|
|
|
+ that.personInfo = {};
|
|
|
+
|
|
|
uni.showToast({
|
|
|
title: '注销成功',
|
|
|
icon: 'none'
|