会员问题修改

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.setShowView()
// //
this.setWxofficialShareData() this.setWxofficialShareData()
console.log(111,options.categoryId!= 'undefined')
if(options.categoryId != 'undefined'){ if(options.categoryId != 'undefined'){
this.getGoodsTypeList(options.categoryId) this.getGoodsTypeList(options.categoryId)
} }

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

@ -49,7 +49,8 @@
开通立享多重特权 开通立享多重特权
</view> </view>
<view class="opera"> <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 class="operaBtn" @click="openPage1()">
立即开通 立即开通
</view> </view>
@ -61,32 +62,51 @@
</template> </template>
<script> <script>
import * as newFunApi from '@/api/newFun' import * as newFunApi from '@/api/newFun'
import * as member from '@/api/member/index.js';
export default{ export default{
data (){ data (){
return{ return{
list: [], list: [],
userInfo: {}, userInfo: {},
packageList: {},
timestamp: new Date().getTime(), timestamp: new Date().getTime(),
} }
}, },
mounted() { mounted() {
this.getList(); this.getList();
}, },
onShow() { onShow() {
this.userInfo = uni.getStorageSync("userInfo")?uni.getStorageSync("userInfo"): "" this.userInfo = uni.getStorageSync("userInfo")?uni.getStorageSync("userInfo"): ""
if(uni.getStorageSync("userInfo").user_id){
this.getMemberList();
}
}, },
methods:{ methods:{
openPage1(){ openPage1(){
if(!uni.getStorageSync("AccessToken")){ if(!uni.getStorageSync("userInfo").user_id){
uni.navigateTo({ uni.navigateTo({
url: "/pages/login/index" url: "/pages/login/index"
}) })
return ; return ;
} }
uni.navigateTo({ 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){ openPage(a){
uni.navigateTo({ uni.navigateTo({
url: "/pages/activity/intimate?index="+a url: "/pages/activity/intimate?index="+a

Loading…
Cancel
Save