主管理员 2 months ago
parent
commit
32c2c061c3
4 changed files with 23 additions and 28 deletions
  1. +0
    -28
      pages/index/center.vue
  2. +23
    -0
      pages/index/index.vue
  3. BIN
      static/image/home/x1.png
  4. BIN
      static/image/home/x2.png

+ 0
- 28
pages/index/center.vue View File

@ -231,36 +231,8 @@
this.$store.commit('getUserInfo') this.$store.commit('getUserInfo')
// //
this.getUserCenterData(); this.getUserCenterData();
}, },
methods: { methods: {
headBtn() {
let self = this
uni.showModal({
title: '演示切换角色之后的效果',
success(res) {
if (res.confirm) {
self.$store.state.shop = !self.$store.state.shop
}
}
})
},
//
contactUs() {
this.show = true
},
confirm() {
this.show = false
},
cancle() {
this.show = false
},
// //
getUserCenterData(){ getUserCenterData(){
this.$api('getUserCenterData',{}, res =>{ this.$api('getUserCenterData',{}, res =>{


+ 23
- 0
pages/index/index.vue View File

@ -61,6 +61,17 @@
</view> </view>
</view> </view>
<view class="switchIdentity"
@click="switchIdentity">
<image src="/static/image/home/x1.png"
v-if="role"
mode="widthFix"></image>
<image src="/static/image/home/x1.png"
v-else
mode="widthFix"></image>
</view>
<checkinScore ref="checkinScore"/> <checkinScore ref="checkinScore"/>
<PrivacyAgreementPoup/> <PrivacyAgreementPoup/>
@ -132,6 +143,10 @@
search(){ search(){
}, },
//
switchIdentity(){
this.$store.commit('setRole', !this.role)
},
} }
} }
</script> </script>
@ -221,5 +236,13 @@
} }
} }
.switchIdentity{
position: fixed;
right: 30rpx;
bottom: 300rpx;
image{
width: 100rpx;
}
}
} }
</style> </style>

BIN
static/image/home/x1.png View File

Before After
Width: 120  |  Height: 158  |  Size: 15 KiB

BIN
static/image/home/x2.png View File

Before After
Width: 120  |  Height: 158  |  Size: 15 KiB

Loading…
Cancel
Save