小程序bug

This commit is contained in:
魏啾
2024-07-06 18:28:07 +08:00
parent 380a6312f8
commit 07c7562628
6 changed files with 79 additions and 15 deletions

View File

@@ -226,7 +226,7 @@
</view>
<indexs v-if="!showindex" :usershopUserinfo='usershopUserinfo'></indexs>
<indexs v-if="!showindex" :usershopUserinfo='usershopUserinfo' :userInfo='userInfo'></indexs>
</view>
</template>
<script>
@@ -252,6 +252,7 @@
data() {
return {
showindex: false,
userInfo:'',//个人信息
NAME: uni.cache.get('NAME'),
timersetInterval: '0', //定时器
isFixedTop: false, //吸顶是否显示
@@ -340,6 +341,7 @@
if (res.code == 0) {
this.usershopUserinfo = res.data
}
this.loginwxuserInfo() //个人信息接口
} else {
uni.getLocation({
type: 'wgs84',
@@ -391,6 +393,16 @@
}
},
methods: {
// 个人信息
async loginwxuserInfo() {
let res = await this.api.loginwxuserInfo({
userId: uni.cache.get('userInfo').id
})
if (res.code == 0) {
uni.cache.set('userInfo', res.data);
this.userInfo = uni.cache.get('userInfo')
}
},
closeproductlist() {
this.showproductlist = false
// console.log('close');