|
|
|
@ -7,8 +7,8 @@ |
|
|
|
<image :src="userInfo.img" mode=""></image> |
|
|
|
</view> |
|
|
|
<view class="right"> |
|
|
|
<view class="username" v-if="userInfo.username" @click="getUserInfoLogin">{{userInfo.username}}</view> |
|
|
|
<view class="login-btn uni-primary" v-else @click="getUserInfoLogin">点击登录</view> |
|
|
|
<view class="username" v-if="userInfo.username">{{userInfo.username}}</view> |
|
|
|
<view class="login-btn uni-primary" v-else @click="$noMultipleClicks(getUserInfoLogin)">点击登录</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -29,6 +29,14 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="share-box"> |
|
|
|
<button title="联系我们" @click="$noMultipleClicks(linkToUs)"> |
|
|
|
<view class="list-menu-item"> |
|
|
|
<uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-zhifeiji" size="20" :color="primaryColor" /> |
|
|
|
<view class="text">联系我们</view> |
|
|
|
<uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons> |
|
|
|
</view> |
|
|
|
</button> |
|
|
|
|
|
|
|
<button title="分享" open-type="share"> |
|
|
|
<view class="list-menu-item"> |
|
|
|
<uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-fenxiang1" size="20" :color="primaryColor" /> |
|
|
|
@ -49,6 +57,7 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons |
|
|
|
data() { |
|
|
|
return { |
|
|
|
userInfo: {}, |
|
|
|
noClick:true, //防止重复提交 |
|
|
|
primaryColor: "#1a94bc", |
|
|
|
menus: [ |
|
|
|
{ |
|
|
|
@ -56,11 +65,6 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons |
|
|
|
icon: "icon-wenti-", |
|
|
|
url: "/pages/userInfo/question/question" |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "联系我们", |
|
|
|
icon: "icon-zhifeiji", |
|
|
|
url: "/pages/userInfo/contactUs/contactUs" |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "设置", |
|
|
|
icon: "icon-chilun", |
|
|
|
@ -69,8 +73,11 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
// onReady() { |
|
|
|
// //this.userInfo = uni.getStorageSync('userInfo') |
|
|
|
// }, |
|
|
|
onShow(){ |
|
|
|
this.userInfo = uni.getStorage('userInfo') |
|
|
|
this.userInfo = uni.getStorageSync('userInfo') |
|
|
|
}, |
|
|
|
onShareAppMessage(res) { |
|
|
|
if (res.from === 'button') { // 来自页面内分享按钮 |
|
|
|
@ -98,7 +105,13 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons |
|
|
|
this.userInfo = res.data.data.userInfo; |
|
|
|
uni.setStorage({ |
|
|
|
key: 'token', |
|
|
|
data: res.data.data.access_token |
|
|
|
data: res.data.data.access_token, |
|
|
|
success() { |
|
|
|
uni.showToast({ |
|
|
|
title: '登录成功!', |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
@ -202,6 +215,16 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//打开抖音关注页 |
|
|
|
linkToUs(){ |
|
|
|
uni.showToast({ |
|
|
|
title: '敬请期待', |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
//tt.openAwemeUserProfile(options); |
|
|
|
//console.log('options',options) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|