diff --git a/pages/index/center.vue b/pages/index/center.vue index 346d0fb..db3acc8 100644 --- a/pages/index/center.vue +++ b/pages/index/center.vue @@ -231,36 +231,8 @@ this.$store.commit('getUserInfo') //判断如果是登录状态则获取信息 this.getUserCenterData(); - }, 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(){ this.$api('getUserCenterData',{}, res =>{ diff --git a/pages/index/index.vue b/pages/index/index.vue index 2e73560..682f5f9 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -61,6 +61,17 @@ + + + + + + @@ -132,6 +143,10 @@ search(){ }, + // 切换身份 + switchIdentity(){ + this.$store.commit('setRole', !this.role) + }, } } @@ -221,5 +236,13 @@ } } + .switchIdentity{ + position: fixed; + right: 30rpx; + bottom: 300rpx; + image{ + width: 100rpx; + } + } } diff --git a/static/image/home/x1.png b/static/image/home/x1.png new file mode 100644 index 0000000..4cbc3e7 Binary files /dev/null and b/static/image/home/x1.png differ diff --git a/static/image/home/x2.png b/static/image/home/x2.png new file mode 100644 index 0000000..e396877 Binary files /dev/null and b/static/image/home/x2.png differ