会员优化与页面开关

version/0412
shuxiaoquan 8 months ago
parent 78af96cecd
commit 1cb989daf1
  1. 4
      api/home/index.js
  2. 5
      pages/goods/list.vue
  3. 35
      pages/index/index.vue
  4. 32
      pages/member/index.vue
  5. 2
      pages/user/index.vue

@ -11,6 +11,10 @@ const api = {
search:'goods/hotWord',
chartsGoodsJing:'goods/chartsGoodsJing'
}
// 小程序配置
export const wxAppSetting = (param, option) => {
return request.post('index/wxAppSetting', param, option)
}
// benner列表
export const getBannerList = (param, option) => {
return request.get(api.getBannerList, param, option)

@ -348,10 +348,11 @@
const param = {
sortType: app.sortType,
sortPrice: Number(app.sortPrice),
categoryId: app.options.categoryId || 0,
categoryId: app.options.categoryId != 'undefined'?app.options.categoryId :"",
goodsName: app.options.search || '',
page: pageNo,
keywords: keywords.length > 0 ? keywords.join(',') : ''
keywords: keywords.length > 0 ? keywords.join(',') : '',
keyword: app.options.search || ''
}
console.log(param)
return new Promise((resolve, reject) => {

@ -72,7 +72,7 @@
<u-icon v-else style="margin-left: 10rpx;" name="arrow-up"></u-icon>
</view>
</view>
<view class="firstContent" @click="goNewUser">
<view class="firstContent" @click="goNewUser" v-if="wxAppSetting.new_first_gift">
<image :src="$picUrl+'/static/index/new.png?t='+timestamp" class="firstBg"></image>
<view class="firstInfo">
<view class="fTitle">
@ -103,6 +103,7 @@
</view>
</view>
<template v-if="wxAppSetting.big_brand">
<view class="dapai" v-if="dapaiList && dapaiList.length>0">
<!-- <image src="/static/index/dapaibg.png" mode="widthFix" class="dapaibg"></image> -->
<view class="dapaiBox">
@ -136,6 +137,7 @@
</view>
</view>
</template>
<view class="qianggou" v-if="seckillList && seckillList.length>0">
<view class="title" @click="seckill">
<image :src="$picUrl+'/static/index/limitBuy.png'" mode="widthFix"></image>
@ -181,12 +183,12 @@
</view>
</view>
<view class="activity">
<view class="left" @click="goNews">
<view class="left" @click="goNews" v-if="wxAppSetting.service">
<image :src="$picUrl+'/static/index/activity.png?t='+timestamp" mode="widthFix"></image>
</view>
<view class="right">
<!-- <view class="rightContent"> -->
<view class="rightItem1">
<view class="rightItem1" v-if="wxAppSetting.new_product">
<view style="margin-bottom: 10rpx;">
<image :src="$picUrl+'/static/index/xinpin.png'" mode="widthFix" @click="goNewGoods"
class="title"></image>
@ -209,7 +211,7 @@
</scroll-view>
</view>
</view>
<view class="rightItem2">
<view class="rightItem2" v-if="wxAppSetting.ranking_list">
<view style="margin-bottom: 10rpx;">
<image :src="$picUrl+'/static/index/paihangbang.png'" mode="widthFix" @click="rankIng"
class="title"></image>
@ -565,10 +567,30 @@
couList: [],
timeData: {},
tabbar: [],
curTabIndex: 0
curTabIndex: 0,
wxAppSetting: {}
}
},
methods: {
/**
* 获取小程序配置
*/
async queryWxAppSetting() {
let {
status,
data
} = await GoodsApi.wxAppSetting({});
if (status == 200) {
this.wxAppSetting = data;
this.list = data.same_city?[{
name: '首页'
}, {
name: '同城送'
}]: [{
name: '首页'
}]
}
},
onChangeSeckillCutDownTime(e) {
this.timeData = e
},
@ -967,7 +989,8 @@
this.getCoupons();
this.getServeList();
this.queryBannerList();
this.getStore()
this.getStore();
this.queryWxAppSetting();
},
onShow() {
this.isLogin = uni.getStorageSync("AccessToken") ? true : false

@ -17,8 +17,8 @@
{{userInfo.user_type_text}}
</view>
</view>
<view class="time">
会员有效期至{{userInfo.effective_time}}
<view class="time" v-if="userInfo.user_type == 20 || userInfo.user_type == 30">
会员有效期至{{type == 'hy'?userInfo.effective_time:userInfo.fx_effective_time}}
</view>
</view>
<view class="buyInfo" @click="goBuyInfo">
@ -94,7 +94,7 @@
</view>
<view class="choseType">
<view class="typeTitle">
选择 <text v-if="userInfo.effective_time">续费</text> <text v-if="!userInfo.effective_time">开卡</text> 套餐
选择 <text v-if="userInfo.user_type==20 || userInfo.user_type==30">续费</text> <text v-if="userInfo.user_type==10">开卡</text> 套餐
</view>
<view class="typeList">
<view class="first common" v-for="(item,index) in packageList" :key="index"
@ -141,9 +141,9 @@
<view class="ys" v-if="choseItem.cheap_price!=0">
已省 <text>{{choseItem.cheap_price}}</text>
</view>
<view class="yj">
<!-- <view class="yj">
原价 {{choseItem.price}}
</view>
</view> -->
</view>
<view class="btn" style="opacity:0.6" v-if="user.user_type == 40">
<text>{{choseItem.price}}</text>开卡{{choseItem.month}}个月
@ -264,6 +264,7 @@
})
.then((result) => {
console.log(result)
that.getMemberInfo();
})
.catch(err => {
console.log(err)
@ -283,6 +284,7 @@
member.submit(params)
.then(res => {
that.$toast(res.message)
that.getMemberInfo();
})
.finally(() => that.isLoading = false)
},
@ -338,24 +340,26 @@
.headIcon {
width: 114rpx;
height: 114rpx;
margin-right: 30rpx;
margin-right: 20rpx;
margin-top: 12rpx;
border-radius: 50%;
}
.meInfo {
width: 360rpx;
.info {
display: flex;
margin-bottom: 26rpx;
align-items: center;
.name {
height: 50rpx;
font-size: 36rpx;
font-family: PingFang SC, PingFang SC;
font-size: 31rpx;
font-weight: 500;
color: #785B45;
line-height: 50rpx;
margin-right: 18rpx;
margin-right: 15rpx;
max-width: 250rpx;
overflow: hidden;
white-space: nowrap;
}
.hy {
@ -381,6 +385,7 @@
font-weight: 400;
color: #785B45;
line-height: 34rpx;
margin-top: 26rpx;
}
}
@ -582,7 +587,7 @@
background-color: #fff;
.fLeft {
margin: 24rpx 0 0 74rpx;
margin: 24rpx 0 0 44rpx;
.ys {
height: 40rpx;
@ -591,7 +596,7 @@
font-weight: 400;
color: #7D2D21;
line-height: 40rpx;
width: 230rpx;
text {
height: 40rpx;
font-size: 28rpx;
@ -603,6 +608,7 @@
}
.yj {
width: 230rpx;
height: 34rpx;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;

@ -53,7 +53,7 @@
会员
</view>
<view class="leftBottom">
{{userInfo.effective_time}}到期
{{userInfo.user_type==20?userInfo.effective_time:userInfo.fx_effective_time}}到期
</view>
</view>
<view class="plusLine"></view>

Loading…
Cancel
Save