会员优化与页面开关

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', search:'goods/hotWord',
chartsGoodsJing:'goods/chartsGoodsJing' chartsGoodsJing:'goods/chartsGoodsJing'
} }
// 小程序配置
export const wxAppSetting = (param, option) => {
return request.post('index/wxAppSetting', param, option)
}
// benner列表 // benner列表
export const getBannerList = (param, option) => { export const getBannerList = (param, option) => {
return request.get(api.getBannerList, param, option) return request.get(api.getBannerList, param, option)

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

@ -72,7 +72,7 @@
<u-icon v-else style="margin-left: 10rpx;" name="arrow-up"></u-icon> <u-icon v-else style="margin-left: 10rpx;" name="arrow-up"></u-icon>
</view> </view>
</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> <image :src="$picUrl+'/static/index/new.png?t='+timestamp" class="firstBg"></image>
<view class="firstInfo"> <view class="firstInfo">
<view class="fTitle"> <view class="fTitle">
@ -103,6 +103,7 @@
</view> </view>
</view> </view>
<template v-if="wxAppSetting.big_brand">
<view class="dapai" v-if="dapaiList && dapaiList.length>0"> <view class="dapai" v-if="dapaiList && dapaiList.length>0">
<!-- <image src="/static/index/dapaibg.png" mode="widthFix" class="dapaibg"></image> --> <!-- <image src="/static/index/dapaibg.png" mode="widthFix" class="dapaibg"></image> -->
<view class="dapaiBox"> <view class="dapaiBox">
@ -136,6 +137,7 @@
</view> </view>
</view> </view>
</template>
<view class="qianggou" v-if="seckillList && seckillList.length>0"> <view class="qianggou" v-if="seckillList && seckillList.length>0">
<view class="title" @click="seckill"> <view class="title" @click="seckill">
<image :src="$picUrl+'/static/index/limitBuy.png'" mode="widthFix"></image> <image :src="$picUrl+'/static/index/limitBuy.png'" mode="widthFix"></image>
@ -181,12 +183,12 @@
</view> </view>
</view> </view>
<view class="activity"> <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> <image :src="$picUrl+'/static/index/activity.png?t='+timestamp" mode="widthFix"></image>
</view> </view>
<view class="right"> <view class="right">
<!-- <view class="rightContent"> --> <!-- <view class="rightContent"> -->
<view class="rightItem1"> <view class="rightItem1" v-if="wxAppSetting.new_product">
<view style="margin-bottom: 10rpx;"> <view style="margin-bottom: 10rpx;">
<image :src="$picUrl+'/static/index/xinpin.png'" mode="widthFix" @click="goNewGoods" <image :src="$picUrl+'/static/index/xinpin.png'" mode="widthFix" @click="goNewGoods"
class="title"></image> class="title"></image>
@ -209,7 +211,7 @@
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
<view class="rightItem2"> <view class="rightItem2" v-if="wxAppSetting.ranking_list">
<view style="margin-bottom: 10rpx;"> <view style="margin-bottom: 10rpx;">
<image :src="$picUrl+'/static/index/paihangbang.png'" mode="widthFix" @click="rankIng" <image :src="$picUrl+'/static/index/paihangbang.png'" mode="widthFix" @click="rankIng"
class="title"></image> class="title"></image>
@ -565,10 +567,30 @@
couList: [], couList: [],
timeData: {}, timeData: {},
tabbar: [], tabbar: [],
curTabIndex: 0 curTabIndex: 0,
wxAppSetting: {}
} }
}, },
methods: { 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) { onChangeSeckillCutDownTime(e) {
this.timeData = e this.timeData = e
}, },
@ -967,7 +989,8 @@
this.getCoupons(); this.getCoupons();
this.getServeList(); this.getServeList();
this.queryBannerList(); this.queryBannerList();
this.getStore() this.getStore();
this.queryWxAppSetting();
}, },
onShow() { onShow() {
this.isLogin = uni.getStorageSync("AccessToken") ? true : false this.isLogin = uni.getStorageSync("AccessToken") ? true : false

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

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

Loading…
Cancel
Save