添加会员开关

feature/v-xuexi
wangdong 8 months ago
parent b80cad0e58
commit bb7622cf95
  1. 7
      components/JoinVip/index.vue
  2. 9
      components/PayDialog/index.vue
  3. 12
      pages/index/index.vue
  4. 9
      pages/mine/index.vue
  5. 2
      pages/special/details.vue

@ -1,5 +1,5 @@
<template>
<view class="member-section flex" @click="joinVip">
<view v-if="openMember" class="member-section flex" @click="joinVip">
<view>
<image mode="aspectFill" src="@/static/images/vip.png" />
<text>v</text>
@ -13,6 +13,11 @@
<script>
export default {
computed: {
openMember() {
return Number(uni.getStorageSync('openMember')) === 1
},
},
methods: {
joinVip() {
this.$util.checkLogin(

@ -23,7 +23,7 @@
</template>
</view>
<view class="dialog-ft">
<view v-if="!isMember && isMembership" class="member" @click="getUrl">
<view v-if="!isMember && isMembership && openMember" class="member" @click="getUrl">
<div class="news">开通会员本单可减<span class="money">{{this.$operation.minus(money,memberMoney)}} </span></div>
<i class="iconfont iconxiangyou"></i>
</view>
@ -164,7 +164,12 @@ export default {
WeixinOpenTagsError: false, // 使
};
},
watch: {
computed: {
openMember() {
return Number(uni.getStorageSync('openMember')) === 1
},
},
watch: {
isBalance() {
this.payOptions[2].canuse = this.isBalance;
},

@ -556,7 +556,7 @@
import { getNews, getIndexData } from "@/api/index";
import { groupWorks, getSpecialList } from "@/api/special";
import { getGoodsList } from "@/api/store";
import { unReadMsgNum } from '@/api/user';
import { unReadMsgNum, getCopyrightInfo } from '@/api/user';
import RecommendMaterial from "@/components/RecommendMaterial/index.vue";
import RecommendPoster from "@/components/RecommendPoster/index.vue";
import RecommendProblem from "@/components/RecommendProblem/index.vue";
@ -642,6 +642,7 @@ export default {
this.getNewsList();
this.getgroupWork();
this.getUnReadMsgNum();
this.get_copyright();
},
created() {
//#ifdef MP-WEIXIN
@ -663,6 +664,15 @@ export default {
return {};
},
methods: {
//
async get_copyright() {
try {
const { data } = await getCopyrightInfo();
uni.setStorageSync('openMember', data.is_open_member);
} catch (err) {
uni.setStorageSync('openMember', 0);
}
},
getPositionAddress(longitude, latitude,) {
qqmapsdk.reverseGeocoder({
location: {

@ -9,11 +9,11 @@
<view class="text-wrap">
<template v-if="isLogin">
<view class="name">{{ userInfo.nickname }}</view>
<view class="info info-vip" v-if="userInfo.level == 0">
<view class="info info-vip" v-if="userInfo.level == 0 && openMember">
<image mode="aspectFill" class="icon" :src="getImgPath('/static/frontend/vip.png')" />
<text>vip会员</text>
</view>
<view class="info" v-else>
<view class="info" v-if="openMember && userInfo.level != 0">
<text>尚未开通会员</text>
</view>
</template>
@ -27,7 +27,7 @@
</view>
</view>
<view class="member-section" @click="memberUrl">
<view v-if="openMember" class="member-section" @click="memberUrl">
<view>
<image mode="aspectFill" src="@/static/images/vip.png" />
<text>V</text>
@ -193,6 +193,9 @@
url() {
return this.isWechat ? "/pages/index/login" : "/pages/login/phone_check";
},
openMember() {
return Number(uni.getStorageSync('openMember')) === 1
},
},
onShow() {

@ -738,7 +738,7 @@
@image-upload="imageUpload" @image-delete="imageDelete" @evaluate-submit="evaluateSubmit" />
<!-- 分享返佣 -->
<RebateGuide v-if="rebateMoney && isShareDisplaySwitch" :rebate-money="rebateMoney" @rebate-action="rebateAction" />
<!-- <RebateGuide v-if="rebateMoney && isShareDisplaySwitch" :rebate-money="rebateMoney" @rebate-action="rebateAction" /> -->
<TkiQrcode loadMake v-if="infoLoading && isQrcodeCanvasVisable" ref="qrcode" :showLoading="false" :val="qrcodeText"
@result="handleQrcodeCreateSuccess" />

Loading…
Cancel
Save