增加隐私授权

main
yangsai 1 month ago
parent 1eaf229d43
commit 749712ee64
  1. 1
      manifest.json
  2. 5
      pages/goods_details/index.vue
  3. 12
      pages/user/components/member/template1.vue
  4. 36
      pages/user/index.vue

@ -184,6 +184,7 @@
"postcss" : true, "postcss" : true,
"es6" : true "es6" : true
}, },
"__usePrivacyCheck__" : true,
"permission" : { "permission" : {
"scope.userLocation" : { "scope.userLocation" : {
"desc" : "你的位置信息将用于和门店的距离长度" "desc" : "你的位置信息将用于和门店的距离长度"

@ -932,7 +932,10 @@
this.storeList = this.storeLists; this.storeList = this.storeLists;
this.storeLists = null; this.storeLists = null;
} }
this.getUserInfo() if (this.isLogin) {
this.getUserInfo()
}
this.store_id=uni.getStorageSync('mendianstore_id') this.store_id=uni.getStorageSync('mendianstore_id')
}, },
mounted(){ mounted(){

@ -15,7 +15,7 @@ export default {
default: 0 default: 0
} }
}, },
inject: ['intoPage', 'tapQrCode', 'goMenuPage', 'goEdit', 'bindPhone'], inject: ['intoPage', 'tapQrCode', 'goMenuPage', 'goEdit', 'bindPhone','openAuto'],
methods: {} methods: {}
}; };
</script> </script>
@ -23,17 +23,19 @@ export default {
<view class="header"> <view class="header">
<!-- 用户信息设置 --> <!-- 用户信息设置 -->
<view class="acea-row row-middle user"> <view class="acea-row row-middle user">
<image :src="userInfo.avatar" class="avatar" @click="goEdit"></image> <image v-if="userInfo.avatar" :src="userInfo.avatar" class="avatar" @click="goEdit"></image>
<image v-else src="https://bar.jiuhaosh.cn/static/images/f.png" class="avatar" @click="goEdit"></image>
<view class="name-wrap"> <view class="name-wrap">
<view class="name display-add" v-if="!userInfo.uid" @click="openAuto">请点击授权</view> <view class="name display-add" v-if="!userInfo.uid" @click="openAuto">请点击登录</view>
<view class="name" v-if="userInfo.uid">{{ userInfo.nickname }}</view> <view class="name" v-if="userInfo.uid">{{ userInfo.nickname }}</view>
<view class="bind-phone" v-if="userInfo.pay_vip_status"> <view class="bind-phone" v-if="userInfo.pay_vip_status">
<image src="https://bar.jiuhaosh.cn/static/pay_vip.png" mode="" style="width: 90rpx;height: 40rpx;"></image> <image src="https://bar.jiuhaosh.cn/static/pay_vip.png" mode="" style="width: 90rpx;height: 40rpx;"></image>
</view> </view>
<view class="phone" v-else>普通用户</view> <view class="phone" v-if="userInfo.uid" v-else>普通用户</view>
</view> </view>
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<text class="iconfont icon-a-ic_QRcode fs-40" @click="tapQrCode"><text class="tips">会员码</text></text> <text class="iconfont icon-a-ic_QRcode fs-40" v-if="userInfo.uid" @click="tapQrCode"><text class="tips">会员码</text></text>
<!-- <text class="iconfont icon-a-ic_setup1 fs-40 mx-34" @click="intoPage('/pages/users/user_set/index')"></text> <!-- <text class="iconfont icon-a-ic_setup1 fs-40 mx-34" @click="intoPage('/pages/users/user_set/index')"></text>
<view class="iconfont icon-ic_message3 fs-40" @click="intoPage('/pages/users/message_center/index')"> <view class="iconfont icon-ic_message3 fs-40" @click="intoPage('/pages/users/message_center/index')">
<uni-badge v-if="userInfo.service_num" absolute="rightTop" :custom-style="{background: '#fff',color:'var(--view-theme)',top:'-56rpx'}" :text="userInfo.service_num"></uni-badge> <uni-badge v-if="userInfo.service_num" absolute="rightTop" :custom-style="{background: '#fff',color:'var(--view-theme)',top:'-56rpx'}" :text="userInfo.service_num"></uni-badge>

@ -23,6 +23,28 @@
<image v-else :src="copyRightImg" mode="aspectFill" class="support"></image> <image v-else :src="copyRightImg" mode="aspectFill" class="support"></image>
</view> </view>
</template> </template>
<template v-else>
<user-member :userInfo="userInfo" :memberData="diyData.member" :orderAdminData="orderAdminData" :balanceStatus="balanceStatus" :isScrolling="isScrolling"></user-member>
<user-order :orderMenu="orderMenu" :orderAdminData="orderAdminData" :userInfo="userInfo" :memberData="diyData.member" :orderData="diyData.order"></user-order>
<user-order-static
v-if="isObjectData(orderAdminData) && orderAdminData.order.user_order"
:orderAdminData="orderAdminData.order"
:orderStaticData="diyData.orderStatic"
></user-order-static>
<user-poster :posterData="diyData.poster"></user-poster>
<user-menu :menuData="diyData.menu"></user-menu>
<user-mer-menu v-if="diyData.merMenu.list.length" :merMenuData="diyData.merMenu"></user-mer-menu>
<user-store-menu v-if="diyData.storeMenu.list.length" :storeMenuData="diyData.storeMenu"></user-store-menu>
<view class="copy_right pb-20">
<template v-if="copyRightText">
<image :src="copyRightImg" mode="aspectFill" class="copyRightImg"></image>
<view class="copyRightText">
{{ copyRightText }}
</view>
</template>
<image v-else :src="copyRightImg" mode="aspectFill" class="support"></image>
</view>
</template>
<!-- 店员推广码 extension--> <!-- 店员推广码 extension-->
<view class="fixed-ct w-620 h-690 bg--w111-fff rd-24rpx ml-f310 mt-f400 z-1000" v-show="isextension" @touchmove.stop.prevent> <view class="fixed-ct w-620 h-690 bg--w111-fff rd-24rpx ml-f310 mt-f400 z-1000" v-show="isextension" @touchmove.stop.prevent>
<view class="fs-32 text-#333 fw-500 mt-48 mb-48 text-center">店员推广码</view> <view class="fs-32 text-#333 fw-500 mt-48 mb-48 text-center">店员推广码</view>
@ -107,7 +129,8 @@ export default {
intoPage: this.intoPage, intoPage: this.intoPage,
goMenuPage: this.goMenuPage, goMenuPage: this.goMenuPage,
getMenuData: this.getMenuData, getMenuData: this.getMenuData,
goEdit: this.goEdit goEdit: this.goEdit,
openAuto:this.openAuto
}; };
}, },
data() { data() {
@ -217,6 +240,8 @@ export default {
// #endif // #endif
}, },
async onLoad(option) { async onLoad(option) {
if (this.isLogin) { if (this.isLogin) {
// this.getNewcomerGift(); // this.getNewcomerGift();
} }
@ -238,7 +263,7 @@ export default {
onShow() { onShow() {
if (!this.isLogin) { if (!this.isLogin) {
this.userInfo = ''; this.userInfo = '';
return; // return;
} }
if (this.cartNum > 0) { if (this.cartNum > 0) {
// uni.setTabBarBadge({ // uni.setTabBarBadge({
@ -269,10 +294,11 @@ export default {
// #endif // #endif
if (that.isLogin) { if (that.isLogin) {
this.getUserInfo(); this.getUserInfo();
this.getMyMenus();
this.setVisit(); this.setVisit();
this.getMenuData(); this.getMenuData();
} }
this.getMyMenus();
}, },
// #ifdef MP || APP-PLUS // #ifdef MP || APP-PLUS
onPageScroll(e) { onPageScroll(e) {
@ -536,7 +562,7 @@ export default {
return return
} }
console.log(url); console.log(url);
if (this.isLogin) { // if (this.isLogin) {
let arr = url.split('@APPID='); let arr = url.split('@APPID=');
if (arr.length > 1) { if (arr.length > 1) {
//#ifdef MP //#ifdef MP
@ -612,7 +638,7 @@ export default {
} }
} }
} }
} // }
} }
} }
}; };

Loading…
Cancel
Save