|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<view class="me-content_box app-content">
|
|
|
<image :src="`${constant.imgUrl}/ghs/me/bg.png`" class="me-content_bg" ></image>
|
|
|
- <template v-if="!$util.isEmpty(shopInfo)">
|
|
|
+ <template>
|
|
|
<view class="me-user_box">
|
|
|
<view class="user-info_item">
|
|
|
<view v-if="shopInfo.shopAdminId > 0"> <view class="name"> {{ shopInfo.adminName }} </view> <view class="mobile"> ID:{{ shopInfo.shopAdminId }} </view> </view>
|
|
|
@@ -35,8 +35,8 @@
|
|
|
<view class="account-info_box content_box">
|
|
|
<view class="info-lf_box">
|
|
|
<view> 账户余额(元) </view>
|
|
|
- <view> <text>¥ </text> {{ shopInfo.balance }} </view>
|
|
|
- <view> 可提现余额 ¥ {{ shopInfo.txBalance }} <text v-if="shopInfo.txBalance > 0" @click="checkToApplyCash" class="to-cash">提现</text> </view>
|
|
|
+ <view> <text>¥ </text> {{ shopInfo.balance||0 }} </view>
|
|
|
+ <view> 可提现余额 ¥ {{ shopInfo.txBalance||0 }} <text v-if="shopInfo.txBalance > 0" @click="checkToApplyCash" class="to-cash">提现</text> </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="module-com content_box user-open_bx">
|
|
|
@@ -78,18 +78,13 @@
|
|
|
<div class="tui-title">新手教程</div>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
- <tui-list-cell @click="getCustomService()" class="line-cell" :hover="false" :arrow="true">
|
|
|
- <div class="tui-title">联系客服</div>
|
|
|
- </tui-list-cell>
|
|
|
-
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
- <DorpdownSelect ref="dorpdownSelect" :menuObj.sync="menuObj" top="0upx" :isShowTit="false" :selectItemId.sync="shopId" @selectSussess="selectSussess" ></DorpdownSelect>
|
|
|
+ <DorpdownSelect ref="dorpdownSelect" :menuObj.sync="menuObj" top="0upx" :isShowTit="false" :selectItemId.sync="shopId" @selectSussess="changeShop()" ></DorpdownSelect>
|
|
|
</view>
|
|
|
</template>
|
|
|
-
|
|
|
<script>
|
|
|
import AppAvatarModule from "@/components/module/app-avatar";
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
@@ -101,7 +96,7 @@ import { getUser } from "@/utils/auth";
|
|
|
import { list } from "@/mixins";
|
|
|
import { mapGetters } from "vuex";
|
|
|
export default {
|
|
|
- name: "Me",
|
|
|
+ name: "me",
|
|
|
components: {
|
|
|
AppAvatarModule,
|
|
|
TuiListCell,
|
|
|
@@ -113,22 +108,19 @@ export default {
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
- constant: this.$constant,
|
|
|
- shopInfo: {},
|
|
|
+ constant:this.$constant,
|
|
|
+ shopInfo:{},
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh () {
|
|
|
- this.init()
|
|
|
+ this.getMyInfo()
|
|
|
},
|
|
|
onShow () {
|
|
|
- if(uni.getStorageSync('switchTabQuery').refresh == '1') {
|
|
|
- this.init()
|
|
|
- uni.removeStorageSync('switchTabQuery')
|
|
|
- }
|
|
|
+ this.getMyInfo()
|
|
|
},
|
|
|
methods: {
|
|
|
getCustomService(){
|
|
|
- let self = this;
|
|
|
+ let that = this;
|
|
|
uni.showModal({
|
|
|
title: "客服电话微信",
|
|
|
content: "15280215347",
|
|
|
@@ -139,7 +131,7 @@ export default {
|
|
|
uni.setClipboardData({
|
|
|
data: "15280215347",
|
|
|
success: function() {
|
|
|
- self.$msg("已复制")
|
|
|
+ that.$msg("已复制")
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
@@ -150,30 +142,25 @@ export default {
|
|
|
this.shopId = this.getLoginInfo.shopId;
|
|
|
this.$refs.dorpdownSelect.dropdownShow = true;
|
|
|
},
|
|
|
- async init () {
|
|
|
- try {
|
|
|
- const { data } = await mainMy();
|
|
|
- this.shopInfo = data;
|
|
|
- //不要删除此输出,方法查看 shish 20210512
|
|
|
- console.log('商家ID',data.sjId,'门店ID',data.shopId)
|
|
|
- uni.stopPullDownRefresh();
|
|
|
- } finally {
|
|
|
+ getMyInfo () {
|
|
|
+ console.log('uuuuuuu')
|
|
|
+ mainMy().then(res=>{
|
|
|
+ console.log(res)
|
|
|
+ console.log('------')
|
|
|
+ if(res.code == 1){
|
|
|
+ this.shopInfo = res.data
|
|
|
}
|
|
|
+ })
|
|
|
+ console.log('hhhhhhhhh')
|
|
|
+ console.log('3333')
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
},
|
|
|
- async selectSussess () {
|
|
|
- uni.showLoading({
|
|
|
- title: "加载中",
|
|
|
- });
|
|
|
- try {
|
|
|
+ async changeShop() {
|
|
|
+ uni.showLoading()
|
|
|
await toggleShop({ shopId: this.shopId })
|
|
|
-
|
|
|
- //这个切换得更彻底
|
|
|
this.$store.commit("setLoginInfo", {})
|
|
|
this.$util.pageTo({url: "/admin/home/me",type: 3})
|
|
|
-
|
|
|
- } finally {
|
|
|
- uni.hideLoading();
|
|
|
- }
|
|
|
+ uni.hideLoading()
|
|
|
},
|
|
|
checkToApplyCash () {
|
|
|
let self = this;
|
|
|
@@ -211,7 +198,6 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
-
|
|
|
<style lang="scss" scoped>
|
|
|
.me-content_box {
|
|
|
position: relative;
|
|
|
@@ -290,7 +276,6 @@ export default {
|
|
|
position: absolute;
|
|
|
right: 20upx;
|
|
|
top: 40upx;
|
|
|
- // text-align: center;
|
|
|
& .iconqiehuan1 {
|
|
|
margin-right: 10upx;
|
|
|
box-sizing: border-box;
|