MrShi
16 小时以前 8250384a6b443df940062f99064127d77e72c1ec
mini-program/pages/settings/settings.vue
@@ -32,7 +32,7 @@
               <image src="/static/icon/ar_next@2x.png" mode="widthFix"></image>
            </view>
         </view>
         <view class="list-item">
         <view class="list-item" @click="jumpxy">
            <view class="list-item-label">协议与说明</view>
            <view class="list-item-val">
               <image src="/static/icon/ar_next@2x.png" mode="widthFix"></image>
@@ -87,6 +87,11 @@
         this.form.imgurl = this.userInfo.imgurl
      },
      methods: {
         jumpxy() {
            uni.navigateTo({
               url: '/pages/agreement-description/agreement-description'
            })
         },
         returnPhone(phone) {
            return formatPhoneStar(phone)
         },
@@ -123,10 +128,18 @@
            this.$u.api.updateMember(this.form)
               .then(res => {
                  if (res.code === 200) {
                     console.log(res)
                     this.setUserInfo()
                  }
               })
         },
         // 缓存最新用户信息
         async setUserInfo() {
            let res = await this.$u.api.getUserInfo()
            if (res.code === 200) {
               await this.$store.commit('setUserInfo', res.data)
               await this.$store.commit('setOpenId', res.data.openId)
            }
         },
         // 退出登录
         tuichu() {
            this.$u.api.logOut()