|
@@ -52,7 +52,9 @@
|
|
|
<view class="">客服电话:18050125110</view>
|
|
<view class="">客服电话:18050125110</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
|
|
+ <view class="box-guanzhu3" v-if="loginShow">
|
|
|
|
|
+ <view class="guanzhu-1" @click="loginPopUp()">点击登录,获取更多资讯</view>
|
|
|
|
|
+ </view>
|
|
|
<u-modal :show="modifyShow" title="修改昵称和头像" @close="modifyShow = false" :showCancelButton="true" @cancel="modifyShow = false" @confirm="isOk">
|
|
<u-modal :show="modifyShow" title="修改昵称和头像" @close="modifyShow = false" :showCancelButton="true" @cancel="modifyShow = false" @confirm="isOk">
|
|
|
<view class="slot-content" style="text-align: center">
|
|
<view class="slot-content" style="text-align: center">
|
|
|
<view>
|
|
<view>
|
|
@@ -76,6 +78,7 @@
|
|
|
</view> -->
|
|
</view> -->
|
|
|
</view>
|
|
</view>
|
|
|
</u-modal>
|
|
</u-modal>
|
|
|
|
|
+
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
@@ -87,6 +90,8 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
modifyShow: false /*修改资料 */,
|
|
modifyShow: false /*修改资料 */,
|
|
|
face: '',
|
|
face: '',
|
|
|
|
|
+
|
|
|
|
|
+ loginShow:false,
|
|
|
mainBodyUserInfo: {
|
|
mainBodyUserInfo: {
|
|
|
nickname: '',
|
|
nickname: '',
|
|
|
avatar: 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'
|
|
avatar: 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'
|
|
@@ -144,38 +149,43 @@ export default {
|
|
|
if (this.user && this.user.nickname.indexOf('微信') >= 0) {
|
|
if (this.user && this.user.nickname.indexOf('微信') >= 0) {
|
|
|
this.getFace = true;
|
|
this.getFace = true;
|
|
|
}
|
|
}
|
|
|
- },
|
|
|
|
|
- onLoad(option) {
|
|
|
|
|
- /* 来到我的页面判断用户是否登录 */
|
|
|
|
|
- _this = this;
|
|
|
|
|
- this.user = this.$common.userInfo();
|
|
|
|
|
this.mainBodyUserInfo = this.$db.get('mainBodyUserInfo');
|
|
this.mainBodyUserInfo = this.$db.get('mainBodyUserInfo');
|
|
|
// console.log(this.user);
|
|
// console.log(this.user);
|
|
|
- if (this.user === 'undefined' || this.user === '' || this.user === [] || this.user === null) {
|
|
|
|
|
|
|
+ if (this.user === 'undefined' || this.user === '' || this.user === [] || this.user === null || this.user === false) {
|
|
|
/* 跳转到登录页 */
|
|
/* 跳转到登录页 */
|
|
|
- //this.$common.toLogin();
|
|
|
|
|
|
|
+ // this.$common.toLogin();
|
|
|
|
|
+ this.loginShow=true;
|
|
|
} else {
|
|
} else {
|
|
|
/* 刷新 */
|
|
/* 刷新 */
|
|
|
- this.$api.refreshUser(
|
|
|
|
|
- {
|
|
|
|
|
- main_body_id: 1
|
|
|
|
|
- },
|
|
|
|
|
- (val) => {
|
|
|
|
|
- console.log(val, 999);
|
|
|
|
|
- if (val.code == 401) {
|
|
|
|
|
- this.$common.navigateTo('/pages/user/login');
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ if(this.loginShow){
|
|
|
|
|
+ this.$api.refreshUser(
|
|
|
|
|
+ {
|
|
|
|
|
+ main_body_id: 1
|
|
|
|
|
+ },
|
|
|
|
|
+ (val) => {
|
|
|
|
|
+ console.log(val, 999);
|
|
|
|
|
+ if (val.code == 401) {
|
|
|
|
|
+ this.$common.navigateTo('/pages/user/login');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.user = val.data.user;
|
|
|
|
|
+ // this.avatarUrl = this.user.avatar;
|
|
|
|
|
+ this.auth = val.data.auth;
|
|
|
|
|
+ this.$db.set('user', val.data.user);
|
|
|
|
|
+ this.$db.set('auth', val.data.auth);
|
|
|
|
|
+ _this.$db.set('mainBodyUserInfo', val.data.mainBodyUserInfo);
|
|
|
|
|
+ this.mainBodyUserInfo = this.$db.get('mainBodyUserInfo');
|
|
|
|
|
+ this.loginShow=false;
|
|
|
}
|
|
}
|
|
|
- this.user = val.data.user;
|
|
|
|
|
- // this.avatarUrl = this.user.avatar;
|
|
|
|
|
- this.auth = val.data.auth;
|
|
|
|
|
- this.$db.set('user', val.data.user);
|
|
|
|
|
- this.$db.set('auth', val.data.auth);
|
|
|
|
|
- _this.$db.set('mainBodyUserInfo', val.data.mainBodyUserInfo);
|
|
|
|
|
- this.mainBodyUserInfo = this.$db.get('mainBodyUserInfo');
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
+ },
|
|
|
|
|
+ onLoad(option) {
|
|
|
|
|
+ /* 来到我的页面判断用户是否登录 */
|
|
|
|
|
+ _this = this;
|
|
|
|
|
+
|
|
|
// this.getMainBodyUser()
|
|
// this.getMainBodyUser()
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -186,6 +196,9 @@ export default {
|
|
|
// console.log(res,78787878)
|
|
// console.log(res,78787878)
|
|
|
// })
|
|
// })
|
|
|
// },
|
|
// },
|
|
|
|
|
+ loginPopUp(){
|
|
|
|
|
+ this.$common.toLogin();
|
|
|
|
|
+ },
|
|
|
handleTopBoxClick() {
|
|
handleTopBoxClick() {
|
|
|
// 检查登录状态
|
|
// 检查登录状态
|
|
|
this.user = this.$common.userInfo();
|
|
this.user = this.$common.userInfo();
|
|
@@ -389,4 +402,22 @@ button {
|
|
|
-webkit-background-clip: text;
|
|
-webkit-background-clip: text;
|
|
|
-webkit-text-fill-color: transparent;
|
|
-webkit-text-fill-color: transparent;
|
|
|
}
|
|
}
|
|
|
|
|
+.box-guanzhu3{
|
|
|
|
|
+ background-image: linear-gradient(160deg, rgba(162, 255, 146, 1.0) 0, rgba(84, 218, 255, 1.0) 100%);
|
|
|
|
|
+ border-radius: 52rpx;
|
|
|
|
|
+ height: 55rpx;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
+ justify-self: center;
|
|
|
|
|
+ width: 80%;
|
|
|
|
|
+ position: fixed;
|
|
|
|
|
+ bottom: 95rpx;
|
|
|
|
|
+ right: 66rpx;
|
|
|
|
|
+ z-index:999;
|
|
|
|
|
+}
|
|
|
|
|
+.guanzhu-1{
|
|
|
|
|
+ flex-grow: 5;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ margin-top: 10rpx;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|