会员问题修改

version/0412
shuxiaoquan 8 months ago
parent d2057121e1
commit 78af96cecd
  1. 1
      pages/goods/list.vue
  2. 2
      pages/member/index.vue
  3. 26
      pages/serve/index.vue

@ -249,7 +249,6 @@
this.setShowView()
//
this.setWxofficialShareData()
console.log(111,options.categoryId!= 'undefined')
if(options.categoryId != 'undefined'){
this.getGoodsTypeList(options.categoryId)
}

@ -110,7 +110,7 @@
{{item.price}}
</view>
<view class="avePrice">
{{Number(item.price)/Number(item.month)}}/
{{(Number(item.price)/Number(item.month)).toFixed(2)}}/
</view>
</view>
</view>

@ -49,7 +49,8 @@
开通立享多重特权
</view>
<view class="opera">
<text class="price"><text class="number">99</text></text>
<text class="price" v-if="userInfo.user_id && packageList.price">¥<text class="number">{{packageList.price}}</text>/{{packageList.month}}</text>
<text class="price" v-else><text class="number">99</text></text>
<view class="operaBtn" @click="openPage1()">
立即开通
</view>
@ -61,32 +62,51 @@
</template>
<script>
import * as newFunApi from '@/api/newFun'
import * as member from '@/api/member/index.js';
export default{
data (){
return{
list: [],
userInfo: {},
packageList: {},
timestamp: new Date().getTime(),
}
},
mounted() {
this.getList();
},
onShow() {
this.userInfo = uni.getStorageSync("userInfo")?uni.getStorageSync("userInfo"): ""
if(uni.getStorageSync("userInfo").user_id){
this.getMemberList();
}
},
methods:{
openPage1(){
if(!uni.getStorageSync("AccessToken")){
if(!uni.getStorageSync("userInfo").user_id){
uni.navigateTo({
url: "/pages/login/index"
})
return ;
}
uni.navigateTo({
url: "/pages/member/index"
url: "/pages/member/index?type=hy"
})
},
getMemberList() {
const that = this;
const params = {
client: 'MP-WEIXIN'
}
member.info(params)
.then(res => {
if (res.status == 200) {
that.packageList = res.data.list.list&& res.data.list.list.length >0?res.data.list.list[0]:[];
console.log(that.packageList)
}
})
},
openPage(a){
uni.navigateTo({
url: "/pages/activity/intimate?index="+a

Loading…
Cancel
Save