|
|
@@ -123,26 +123,26 @@
|
|
|
</navigator>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="fun mar_t30">
|
|
|
+ <view class="fun mar_t30" v-if="isBusinessCenter">
|
|
|
<view class="fun_title">商家中心</view>
|
|
|
<view class="fun_con mar_t50 flex_r flex_ac">
|
|
|
- <navigator class="fun_list flex_c flex_ac" url="/pagesC/settledMerchant/myShop" hover-class="none">
|
|
|
+ <navigator v-if="merchantSetlet.shop" class="fun_list flex_c flex_ac" url="/pagesC/settledMerchant/myShop" hover-class="none">
|
|
|
<image class="fun_img" src="/static/my/store.png"></image>
|
|
|
<view class="fun_text">我的店铺</view>
|
|
|
</navigator>
|
|
|
- <navigator class="fun_list flex_c flex_ac" url="/pagesB/my/addShop" hover-class="none">
|
|
|
+ <navigator v-if="merchantSetlet.settled" class="fun_list flex_c flex_ac" url="/pagesB/my/addShop" hover-class="none">
|
|
|
<image class="fun_img" src="/static/my/merchant.png"></image>
|
|
|
<view class="fun_text">商家入驻</view>
|
|
|
</navigator>
|
|
|
- <navigator class="fun_list flex_c flex_ac" url="/pagesC/settledMerchant/myBusiness" hover-class="none">
|
|
|
+ <navigator v-if="merchantSetlet.settled" class="fun_list flex_c flex_ac" url="/pagesC/settledMerchant/myBusiness" hover-class="none">
|
|
|
<image class="fun_img" src="/static/my/merchant2.png"></image>
|
|
|
<view class="fun_text">我的商家</view>
|
|
|
</navigator>
|
|
|
- <navigator class="fun_list flex_c flex_ac" url="/pagesC/settledMerchant/business" hover-class="none">
|
|
|
+ <navigator v-if="merchantSetlet.region" class="fun_list flex_c flex_ac" url="/pagesC/settledMerchant/business" hover-class="none">
|
|
|
<image class="fun_img" src="/static/my/merchant3.png"></image>
|
|
|
<view class="fun_text">区域商家</view>
|
|
|
</navigator>
|
|
|
- <navigator class="fun_list flex_c flex_ac" hover-class="none">
|
|
|
+ <navigator v-if="false" class="fun_list flex_c flex_ac" hover-class="none">
|
|
|
<image class="fun_img" src="/static/my/operator.png"></image>
|
|
|
<view class="fun_text">申请运营商</view>
|
|
|
</navigator>
|
|
|
@@ -215,9 +215,10 @@ export default {
|
|
|
userinfo: {}, // 获取用户信息
|
|
|
unid: "",
|
|
|
invited: "",
|
|
|
- allChaYou: "",
|
|
|
isAuthentication: uni.getStorageSync("isAuthentication"), //是否开启实名模块
|
|
|
localInfo: {}, //数智生活信息
|
|
|
+ merchantSetlet: {},
|
|
|
+ isBusinessCenter: false,
|
|
|
};
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
@@ -229,8 +230,8 @@ export default {
|
|
|
let token = uni.getStorageSync("token");
|
|
|
if (!token) this.login()
|
|
|
else {
|
|
|
+ this.merchantSet();
|
|
|
this.getuserInfo();
|
|
|
- this.getchayou(); //获取茶友
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -294,14 +295,10 @@ export default {
|
|
|
goToAutonym() {
|
|
|
this.goto("/pages/autonym-submit/index")
|
|
|
},
|
|
|
- // 关闭实名信息 提示
|
|
|
+ // 关闭实名信息提示
|
|
|
closeAuto() {
|
|
|
this.isShiMing = false;
|
|
|
},
|
|
|
- // 未开放提示信息
|
|
|
- SetHint() {
|
|
|
- this.goto('/pages/agreement/index', { tit: '用户身份及权益', type: 24 })
|
|
|
- },
|
|
|
// 跳转到分享页面
|
|
|
getImgPage() {
|
|
|
if (this.isAuthentication) {
|
|
|
@@ -336,24 +333,6 @@ export default {
|
|
|
error: (e) => {},
|
|
|
});
|
|
|
},
|
|
|
- // 跳转到用户设置页面
|
|
|
- getToSetting: function() {
|
|
|
- uni.navigateTo({
|
|
|
- url: "/pages/setting/index",
|
|
|
- });
|
|
|
- },
|
|
|
- // 跳转到拼豆页面
|
|
|
- getToBean: function() {
|
|
|
- uni.navigateTo({
|
|
|
- url: "/pages/bean-info/index",
|
|
|
- });
|
|
|
- },
|
|
|
- // 跳转到拼团金页面
|
|
|
- getToAccMoney: function() {
|
|
|
- uni.navigateTo({
|
|
|
- url: "/pages/my-acc-money/my-acc-money",
|
|
|
- });
|
|
|
- },
|
|
|
// 点击头像
|
|
|
upheadimg() {
|
|
|
let that = this;
|
|
|
@@ -362,14 +341,6 @@ export default {
|
|
|
current: 0,
|
|
|
});
|
|
|
},
|
|
|
- // 获取茶友
|
|
|
- getchayou() {
|
|
|
- post("v1/my/chayou").then((res) => {
|
|
|
- if (res.code === 0) {
|
|
|
- this.allChaYou = res.data.data.below + res.data.data.lower_level;
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
activation() {
|
|
|
this.$refs.activation.open()
|
|
|
},
|
|
|
@@ -383,6 +354,20 @@ export default {
|
|
|
default:
|
|
|
return ""
|
|
|
}
|
|
|
+ },
|
|
|
+ // 商家中心权限
|
|
|
+ merchantSet(){
|
|
|
+ post("v1/merchant/settled").then((res) => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ this.merchantSetlet = res.data
|
|
|
+ for (const i in res.data) {
|
|
|
+ if(res.data[i]) {
|
|
|
+ this.isBusinessCenter = true
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
};
|