会员、预约基本完成

This commit is contained in:
77 2024-10-24 18:04:16 +08:00
parent b38f44530e
commit 7720d11dd4
8 changed files with 167 additions and 107 deletions

View File

@ -101,10 +101,10 @@
/> />
<!-- 活动跳转拼团/秒杀/砍价活动 --> <!-- 活动跳转拼团/秒杀/砍价活动 -->
<detail-activity-tip <!-- <detail-activity-tip
v-if="state.activityList.length > 0" v-if="state.activityList.length > 0"
:activity-list="state.activityList" :activity-list="state.activityList"
/> /> -->
<!-- 详情 tabbar --> <!-- 详情 tabbar -->
<detail-tabbar v-model="state.goodsInfo"> <detail-tabbar v-model="state.goodsInfo">

View File

@ -1,11 +1,15 @@
<template> <template>
<!-- <s-layout
navbar="normal"
:leftWidth="0"
:rightWidth="0"
tools="search"
:defaultSearch="state.keyword"
@search="onSearch"
> -->
<s-layout <s-layout
navbar="normal" navbar="normal"
:leftWidth="0" title="商品列表"
:rightWidth="0"
tools="search"
:defaultSearch="state.keyword"
@search="onSearch"
> >
<!-- 筛选 --> <!-- 筛选 -->
<su-sticky bgColor="#fff"> <su-sticky bgColor="#fff">

View File

@ -388,7 +388,7 @@
font-size: 24rpx; font-size: 24rpx;
font-weight: 600; font-weight: 600;
margin-left: -36rpx; margin-left: -36rpx;
background-image: v-bind(disabledBtnBg); background-image: url('@/static/images/activity-btn-disabled.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
color: #999999; color: #999999;

View File

@ -101,13 +101,14 @@
</button> </button>
<button class="ss-reset-button btn-box ss-flex-col" @tap="state.showSelectSku = true" <button class="ss-reset-button btn-box ss-flex-col" @tap="state.showSelectSku = true"
:class=" :class="
timeStatusEnum === TimeStatusEnum.STARTED && state.goodsInfo.stock != 0 && activity.remainingPurchases != 0 timeStatusEnum === TimeStatusEnum.STARTED && state.goodsInfo.stock != 0 && activity.remainingPurchases != 0 && endTime.ms > 0
? 'check-btn-box' ? 'check-btn-box'
: 'disabled-btn-box' : 'disabled-btn-box'
" :disabled="state.goodsInfo.stock === 0 || timeStatusEnum !== TimeStatusEnum.STARTED || activity.remainingPurchases == 0"> " :disabled="state.goodsInfo.stock === 0 || timeStatusEnum !== TimeStatusEnum.STARTED || activity.remainingPurchases == 0 || endTime.ms < 0">
<view class="btn-price">{{ fen2yuan(state.goodsInfo.price) }}</view> <view class="btn-price">{{ fen2yuan(state.goodsInfo.price) }}</view>
<view v-if="timeStatusEnum === TimeStatusEnum.STARTED"> <view v-if="timeStatusEnum === TimeStatusEnum.STARTED">
<view v-if="state.goodsInfo.stock === 0">已售罄</view> <view v-if="state.goodsInfo.stock === 0">已售罄</view>
<view v-else-if="endTime.ms < 0">活动已结束</view>
<!-- <view v-else-if=" activity.remainingPurchases == 0">立即秒杀</view> --> <!-- <view v-else-if=" activity.remainingPurchases == 0">立即秒杀</view> -->
<view v-else>立即秒杀</view> <view v-else>立即秒杀</view>
</view> </view>

View File

@ -84,6 +84,8 @@
</view> </view>
</view> </view>
<view style="clear:both;"></view>
</view> </view>
<view class="title" style="margin-top:10px;"> <view class="title" style="margin-top:10px;">
@ -182,7 +184,7 @@
this.isLogin = computed(() => sheep.$store('user').isLogin); this.isLogin = computed(() => sheep.$store('user').isLogin);
this.memberId = computed(() => sheep.$store('user').userInfo).value.id this.memberId = computed(() => sheep.$store('user').userInfo).value.id
this.brandlists(); // this.brandlists(); //
}, },
methods: { methods: {
onClinicChange(event) { onClinicChange(event) {
@ -208,7 +210,7 @@
this.brandlists2(); this.brandlists2();
}, },
onClinicChange2(event) { onClinicChange2(event) {
const selectedClinicIndex = event.detail.value; const selectedClinicIndex = event.detail.value;
this.selectedClinicIndex2 = selectedClinicIndex; this.selectedClinicIndex2 = selectedClinicIndex;
this.ll2 = this.brandList2[selectedClinicIndex].name this.ll2 = this.brandList2[selectedClinicIndex].name
@ -217,8 +219,8 @@
this.brandlists3(); this.brandlists3();
}, },
onClinicChange3(event) { onClinicChange3(event) {
const selectedClinicIndex = event.detail.value; const selectedClinicIndex = event.detail.value;
this.selectedClinicIndex3 = selectedClinicIndex; this.selectedClinicIndex3 = selectedClinicIndex;
this.ll3 = this.brandList3[selectedClinicIndex].name this.ll3 = this.brandList3[selectedClinicIndex].name
@ -296,11 +298,11 @@
showLoading: false, showLoading: false,
}, },
}).then((res) => { }).then((res) => {
if(res){ if (res) {
} }
console.log(this.brandList3,"------brandList3---------"); console.log(this.brandList3, "------brandList3---------");
console.log(res,"------brandList3---------"); console.log(res, "------brandList3---------");
this.brandList3 = res.data this.brandList3 = res.data
for (var i = 0; i < this.brandList3.length; i++) { for (var i = 0; i < this.brandList3.length; i++) {
this.brandNameList3.push(this.brandList3[i].name) this.brandNameList3.push(this.brandList3[i].name)
@ -371,7 +373,7 @@
// //
selectDate(index) { selectDate(index) {
console.log(this.brandList3, "brandList3") console.log(this.brandList3, "brandList3")
if(this.brandId3 == ''){ if (this.brandId3 == '') {
sheep.$helper.toast('请先选择套餐') sheep.$helper.toast('请先选择套餐')
return; return;
} }
@ -595,7 +597,7 @@
// background-color: #ff5541; // background-color: #ff5541;
.weekday { .weekday {
color: black; color: black;
font-size: 8px; font-size: 14px;
} }
} }
@ -620,10 +622,10 @@
border-radius: 8px; border-radius: 8px;
float: left; float: left;
margin: 5px; margin: 5px;
padding: 5px; padding: 8px 0;
width: 26px; width: 59px;
height: 30px; height: 46px;
border: 1px solid rgba(229, 229, 229); border: 1px solid #e5e5e5;
cursor: pointer; cursor: pointer;
display: flex; display: flex;
background-color: white; background-color: white;
@ -641,12 +643,12 @@
} }
.date { .date {
font-size: 8px; font-size: 12px;
} }
.weekday { .weekday {
margin-top: 5px; margin-top: 5px;
font-size: 8px; font-size: 12px;
color: #666; color: #666;
} }
} }

View File

@ -1,6 +1,7 @@
<!-- 会员信息 --> <!-- 会员信息 -->
<template> <template>
<s-layout navbar="inner" title="SVIP会员专享" :statusBar="true" :bgStyle="{ color: '#FE832A', backgroundColor:'white' }" navbarbackgroundColor="rgba(57,55,54)"> <s-layout navbar="inner" title="SVIP会员专享" :statusBar="true" :bgStyle="{ color: '#FE832A', backgroundColor:'white' }"
navbarbackgroundColor="rgba(57,55,54)">
<view class='vip-main'> <view class='vip-main'>
<view class="vip-top"> <view class="vip-top">
<image <image
@ -14,15 +15,19 @@
<view class="t">{{ userInfo.nickname }} <view class="t">{{ userInfo.nickname }}
<image src="" class="img"></image> <image src="" class="img"></image>
</view> </view>
<view class="c">您与众悦e家商场的第101天</view> <view class="c" v-if="!userInfo.activate">您与众悦e家商场的第101天</view>
<view class="b" v-if="!userInfo.activate">开通即享会员权益</view> <view class="b" v-if="!userInfo.activate">开通即享会员权益</view>
<view class="b" v-if="userInfo.activate">SVIP会员 {{userInfo.cardExpirationTime}} 到期</view>
</view> </view>
</view> </view>
<view class="r" v-if="!userInfo.activate"> <view class="r" v-if="!userInfo.activate">
<text>立即开通</text> <text>立即开通</text>
</view> </view>
<view class="r" v-if="userInfo.activate">
<text>续费会员</text>
</view>
</view> </view>
<view class="vipLv" v-if="userInfo.activate">当前卡片{{userInfo.cardName}}</view> <!-- <view class="vipLv" v-if="userInfo.activate">当前卡片{{userInfo.cardName}}</view> -->
</view> </view>
<view class="vip-zxq"> <view class="vip-zxq">
<image <image
@ -32,9 +37,7 @@
<view class="item" v-for="(item, index) in vipList2" :key="index"> <view class="item" v-for="(item, index) in vipList2" :key="index">
<view class="new-nei"> <view class="new-nei">
<view class="l"> <view class="l">
<image <image :src="item.iconUrl" class="l-img"></image>
:src="item.iconUrl"
class="l-img"></image>
</view> </view>
<view class="r"> <view class="r">
<view class="t"> <view class="t">
@ -60,7 +63,8 @@
<text class="t3" v-if="userInfo.activate">{{userInfo.cardExpirationTime}}</text> <text class="t3" v-if="userInfo.activate">{{userInfo.cardExpirationTime}}</text>
</view> </view>
<scroll-view class="scroll-view_H" scroll-x="true" @scroll="scroll" scroll-left="120"> <scroll-view class="scroll-view_H" scroll-x="true" @scroll="scroll" scroll-left="120">
<view id="demo1" @click="vipFun(index,item.name)" class="scroll-view-item_H uni-bg-red" :class="valVip == index ? 'on' : ''" v-for="(item,index) in vipList" :key="index"> <view id="demo1" @click="vipFun(index,item.name)" class="scroll-view-item_H uni-bg-red"
:class="valVip == index ? 'on' : ''" v-for="(item,index) in vipList" :key="index">
<view class="t">{{item.name}}</view> <view class="t">{{item.name}}</view>
<view class="c"><text class="tx">{{item.specialPrice}}</text></view> <view class="c"><text class="tx">{{item.specialPrice}}</text></view>
<view class="b" v-if="index==0">试用1天</view> <view class="b" v-if="index==0">试用1天</view>
@ -72,12 +76,12 @@
<view class="vip-text"> <view class="vip-text">
购买即视为同意<text class="ts">会员用户协议</text> 购买即视为同意<text class="ts">会员用户协议</text>
</view> </view>
<view class="vip-btn" @click="beclick()" v-if="!userInfo.activate"> <!-- <view class="vip-btn" @click="beclick()" v-if="!userInfo.activate">
立即试用 立即试用
</view>
<!-- <view class="vip-btn" @click="beclick()" v-else>
立即开通
</view> --> </view> -->
<view class="vip-btn" @click="beclick()">
立即开通
</view>
</view> </view>
</s-layout> </s-layout>
</template> </template>
@ -95,7 +99,7 @@
apiPath apiPath
} from '@/sheep/config'; } from '@/sheep/config';
import sheep from '@/sheep'; import sheep from '@/sheep';
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2; const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
const userInfo = computed(() => sheep.$store('user').userInfo); const userInfo = computed(() => sheep.$store('user').userInfo);
const vipList = ref([]); const vipList = ref([]);
const vipList2 = ref([]); const vipList2 = ref([]);
@ -106,30 +110,30 @@
request({ request({
url: `${baseUrl}${apiPath}/member/card/type/list`, url: `${baseUrl}${apiPath}/member/card/type/list`,
method: 'GET', method: 'GET',
params: { params: {},
},
custom: { custom: {
showLoading: false, showLoading: false,
}, },
}).then((res) => { }).then((res) => {
console.log(res,"sss") console.log(res, "sss")
vipList.value = res.data; vipList.value = res.data;
}); });
} }
// vipFun // vipFun
let data = { let data = {
cardName:nameVip.value cardName: nameVip.value
} }
function vipFun(index,name) {
function vipFun(index, name) {
valVip.value = index valVip.value = index
data.cardName = name data.cardName = name
console.log(index,name,"name") console.log(index, name, "name")
} }
// beclick // beclick
function beclick() { function beclick() {
console.log(data.cardName,"nameVip.value") console.log(data.cardName, "nameVip.value")
request({ request({
url: `${baseUrl}${apiPath}/pay/member/create`, url: `${baseUrl}${apiPath}/pay/member/create`,
method: 'post', method: 'post',
@ -138,34 +142,38 @@
showLoading: false, showLoading: false,
}, },
}).then((res) => { }).then((res) => {
console.log(res,"-----------试用---------------") console.log(res, "-----------试用---------------")
if(res.code == 0){ if (res.code == 0) {
if(data.cardName == "试用"){ if (data.cardName == "试用") {
sheep.$helper.toast('试用开通成功'); sheep.$helper.toast('试用开通成功');
sheep.$router.go('/pages/index/user') sheep.$router.go('/pages/index/user')
}else{ } else {
sheep.$router.go('/pages/pay/index', { id: res.data.payOrderId,type:'vip',vipid: res.data.id,cardName: data.cardName }) sheep.$router.go('/pages/pay/index', {
id: res.data.payOrderId,
type: 'vip',
vipid: res.data.id,
cardName: data.cardName
})
} }
}else{ } else {
sheep.$helper.toast(res.msg); sheep.$helper.toast(res.msg);
} }
}); });
} }
// 2 // 2
function getList2() { function getList2() {
request({ request({
url: `${baseUrl}${apiPath}/member/benefit/list`, url: `${baseUrl}${apiPath}/member/benefit/list`,
method: 'GET', method: 'GET',
params: { params: {},
},
custom: { custom: {
showLoading: false, showLoading: false,
}, },
}).then((res) => { }).then((res) => {
console.log(res,"sss") console.log(res, "sss")
vipList2.value = res.data; vipList2.value = res.data;
}); });
} }
@ -184,12 +192,14 @@
height: 200px; height: 200px;
// background: rgba(57, 55, 54); // background: rgba(57, 55, 54);
position: relative; position: relative;
.vipLv{
position:absolute; .vipLv {
position: absolute;
bottom: 93px; bottom: 93px;
right: 10%; right: 10%;
color: #8a745c; color: #8a745c;
} }
.img { .img {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -220,7 +230,7 @@
.text { .text {
.t { .t {
font-size: 18px; font-size: 16px;
font-weight: 700; font-weight: 700;
.img { .img {
@ -236,7 +246,7 @@
.b { .b {
color: rgba(201, 141, 99); color: rgba(201, 141, 99);
font-size: 13px; font-size: 12px;
margin-top: 7px; margin-top: 7px;
} }
} }
@ -244,18 +254,21 @@
.r { .r {
color: #8a745c; color: #8a745c;
font-size: 15px; font-size: 12px;
padding: 5px 15px; padding: 5px 10px;
background: white; background: white;
border-radius: 15px; border-radius: 0 11px 0 11px;
position: absolute;
right: 7px;
bottom: 64px;
} }
} }
} }
.vip-zxq { .vip-zxq {
.img { .img {
width: 77%; width: 63%;
height: 89px; height: 68px;
margin: 0 auto; margin: 0 auto;
display: block; display: block;
margin-top: 20px; margin-top: 20px;
@ -280,8 +293,8 @@
align-items: center; align-items: center;
.l-img { .l-img {
width: 50px; width: 40px;
height: 50px; height: 40px;
margin-right: 10px; margin-right: 10px;
} }
} }
@ -322,43 +335,52 @@
color: rgba(174, 90, 42); color: rgba(174, 90, 42);
} }
} }
.scroll-view_H { .scroll-view_H {
white-space: nowrap; white-space: nowrap;
width: 100%; width: 100%;
.scroll-view-item_H { .scroll-view-item_H {
width: 113px;
display: inline-block; display: inline-block;
background-color: white; background-color: white;
border: 1px solid rgba(214,214,214); border: 1px solid rgba(214, 214, 214);
margin-right:15px; margin-right: 15px;
border-radius: 10px; border-radius: 10px;
margin-top:15px; margin-top: 15px;
padding:15px 0; padding: 10px 3px;
&.on{ width: 100px;
background-color: rgba(254,247,236);
border: 1px solid rgba(252,194,130); &.on {
background-color: rgba(254, 247, 236);
border: 1px solid rgba(252, 194, 130);
} }
.t{
color:rgba(117,78,25); .t {
color: rgba(117, 78, 25);
font-weight: 700; font-weight: 700;
font-size:20px; font-size: 15px;
text-align: center; text-align: center;
} }
.c{
color:rgba(117,78,25); .c {
color: rgba(117, 78, 25);
// color: rgba(117, 78, 25);
font-weight: 700; font-weight: 700;
font-size:15px; font-size: 15px;
text-align: center; text-align: center;
padding:10px 0; padding: 10px 0;
.tx{
font-size:27px; .tx {
font-size: 20px;
} }
} }
.b{
color:rgba(173,173,173); .b {
font-size:16px; color: rgba(173, 173, 173);
font-size: 14px;
text-align: center; text-align: center;
&.sc{
&.sc {
text-decoration: line-through; text-decoration: line-through;
} }
} }
@ -370,6 +392,7 @@
text-align: center; text-align: center;
color: rgba(157, 157, 157); color: rgba(157, 157, 157);
margin: 15px 0; margin: 15px 0;
font-size: 13px;
.ts { .ts {
color: rgba(174, 90, 42); color: rgba(174, 90, 42);
@ -381,9 +404,9 @@
background: rgba(254, 220, 137); background: rgba(254, 220, 137);
text-align: center; text-align: center;
margin: 0 15px; margin: 0 15px;
border-radius: 20px; border-radius: 9px;
color: rgba(95, 53, 38); color: rgba(95, 53, 38);
} }
} }
</style> </style>

View File

@ -68,9 +68,7 @@
<view v-if="type === 'UserOrder'" class="new-huiy" @click=" <view v-if="type === 'UserOrder'" class="new-huiy" @click="
sheep.$router.go('/pages/user/user_vip/list') sheep.$router.go('/pages/user/user_vip/list')
"> ">
<view class="new-button" v-if="userInfo.activate == 1">正在试用</view> <view class="new-button" v-if="userInfo.activate">已开通</view>
<view class="new-button" v-if="userInfo.activate == 2">立即查看</view>
<view class="new-button" v-if="userInfo.activate == 3">永久</view>
<view class="new-button" v-if="userInfo.activate == 0">立即开通</view> <view class="new-button" v-if="userInfo.activate == 0">立即开通</view>
<image class="seckill1" mode="aspectFit" <image class="seckill1" mode="aspectFit"
src="https://zysc.fjptzykj.com:3000/shangcheng/64776e2edc3c2f15295e7c3976ba301e08f9170f99a2e845d8f33bd65179b177.png" /> src="https://zysc.fjptzykj.com:3000/shangcheng/64776e2edc3c2f15295e7c3976ba301e08f9170f99a2e845d8f33bd65179b177.png" />

View File

@ -6,14 +6,21 @@
<view class="left-box ss-flex ss-col-center ss-m-l-36"> <view class="left-box ss-flex ss-col-center ss-m-l-36">
<view class="avatar-box ss-m-r-24"> <view class="avatar-box ss-m-r-24">
<image class="avatar-img" :src=" <image class="avatar-img" :src="
isLogin isLogin
? sheep.$url.cdn(userInfo.avatar) ? sheep.$url.cdn(userInfo.avatar)
: defaultAvatar : defaultAvatar
" mode="aspectFill" @tap="sheep.$router.go('/pages/user/info')"></image> " mode="aspectFill" @tap="sheep.$router.go('/pages/user/info')"></image>
<image v-if="userInfo.activate" class="vipCard"
src="https://zysc.fjptzykj.com:3000/shangcheng/8064149c53fe05f8d20263fba31992da2d24a751877a4ddcc696d7f53b5cc771.png">
</image>
</view> </view>
<view> <view style="z-index:22222;">
<view class="nickname-box ss-flex ss-col-center"> <view class="nickname-box ss-flex ss-col-center">
<view class="nick-name ss-m-r-20">{{ userInfo?.nickname || nickname }}</view> <view class="nick-name ss-m-r-20">{{ userInfo?.nickname || nickname }}</view>
<view class="vipImg" v-if="userInfo.activate">
<image class="img"
src="https://zysc.fjptzykj.com:3000/shangcheng/0419db3d6a991486176256374c05c2834006fd42b3f5f80e3ff385b027b7c34f.png" />
</view>
</view> </view>
<view class="nickname-box ss-flex ss-col-center"> <view class="nickname-box ss-flex ss-col-center">
<view class="nick-name ss-m-r-20">{{ userInfo?.mobile || mobile }}</view> <view class="nick-name ss-m-r-20">{{ userInfo?.mobile || mobile }}</view>
@ -108,7 +115,17 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.qiandao{ .vipImg {
width: 42px;
height: 16px;
.img {
width: 100%;
height: 100%;
}
}
.qiandao {
width: 50px; width: 50px;
height: 30px; height: 30px;
background: yellow; background: yellow;
@ -125,12 +142,26 @@
.avatar-box { .avatar-box {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
border-radius: 50%;
overflow: hidden; overflow: hidden;
position: relative;
.avatar-img { .avatar-img {
width: 97%;
height: 93%;
left: 1px;
top: 1px;
border-radius: 50%;
display: block;
margin: 0 auto;
position: absolute;
}
.vipCard {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: absolute;
left: 0;
top: -2px;
} }
} }
@ -180,12 +211,13 @@
color: #ffffff; color: #ffffff;
} }
} }
.seckill { .seckill {
width: 100%; width: 100%;
position: absolute; position: absolute;
top:0; top: 0;
left:0; left: 0;
height:217px; height: 217px;
z-index:0; z-index: 0;
} }
</style> </style>