会员、预约基本完成

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"
:activity-list="state.activityList"
/>
/> -->
<!-- 详情 tabbar -->
<detail-tabbar v-model="state.goodsInfo">

View File

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

View File

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

View File

@ -101,13 +101,14 @@
</button>
<button class="ss-reset-button btn-box ss-flex-col" @tap="state.showSelectSku = true"
: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'
: '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 v-if="timeStatusEnum === TimeStatusEnum.STARTED">
<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>立即秒杀</view>
</view>

View File

@ -84,6 +84,8 @@
</view>
</view>
<view style="clear:both;"></view>
</view>
<view class="title" style="margin-top:10px;">
@ -296,11 +298,11 @@
showLoading: false,
},
}).then((res) => {
if(res){
if (res) {
}
console.log(this.brandList3,"------brandList3---------");
console.log(res,"------brandList3---------");
console.log(this.brandList3, "------brandList3---------");
console.log(res, "------brandList3---------");
this.brandList3 = res.data
for (var i = 0; i < this.brandList3.length; i++) {
this.brandNameList3.push(this.brandList3[i].name)
@ -371,7 +373,7 @@
//
selectDate(index) {
console.log(this.brandList3, "brandList3")
if(this.brandId3 == ''){
if (this.brandId3 == '') {
sheep.$helper.toast('请先选择套餐')
return;
}
@ -595,7 +597,7 @@
// background-color: #ff5541;
.weekday {
color: black;
font-size: 8px;
font-size: 14px;
}
}
@ -620,10 +622,10 @@
border-radius: 8px;
float: left;
margin: 5px;
padding: 5px;
width: 26px;
height: 30px;
border: 1px solid rgba(229, 229, 229);
padding: 8px 0;
width: 59px;
height: 46px;
border: 1px solid #e5e5e5;
cursor: pointer;
display: flex;
background-color: white;
@ -641,12 +643,12 @@
}
.date {
font-size: 8px;
font-size: 12px;
}
.weekday {
margin-top: 5px;
font-size: 8px;
font-size: 12px;
color: #666;
}
}

View File

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

View File

@ -68,9 +68,7 @@
<view v-if="type === 'UserOrder'" class="new-huiy" @click="
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 == 2">立即查看</view>
<view class="new-button" v-if="userInfo.activate == 3">永久</view>
<view class="new-button" v-if="userInfo.activate">已开通</view>
<view class="new-button" v-if="userInfo.activate == 0">立即开通</view>
<image class="seckill1" mode="aspectFit"
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="avatar-box ss-m-r-24">
<image class="avatar-img" :src="
isLogin
? sheep.$url.cdn(userInfo.avatar)
: defaultAvatar
" mode="aspectFill" @tap="sheep.$router.go('/pages/user/info')"></image>
isLogin
? sheep.$url.cdn(userInfo.avatar)
: defaultAvatar
" 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 style="z-index:22222;">
<view class="nickname-box ss-flex ss-col-center">
<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 class="nickname-box ss-flex ss-col-center">
<view class="nick-name ss-m-r-20">{{ userInfo?.mobile || mobile }}</view>
@ -108,7 +115,17 @@
</script>
<style lang="scss" scoped>
.qiandao{
.vipImg {
width: 42px;
height: 16px;
.img {
width: 100%;
height: 100%;
}
}
.qiandao {
width: 50px;
height: 30px;
background: yellow;
@ -125,12 +142,26 @@
.avatar-box {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
overflow: hidden;
position: relative;
.avatar-img {
width: 97%;
height: 93%;
left: 1px;
top: 1px;
border-radius: 50%;
display: block;
margin: 0 auto;
position: absolute;
}
.vipCard {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: -2px;
}
}
@ -180,12 +211,13 @@
color: #ffffff;
}
}
.seckill {
width: 100%;
position: absolute;
top:0;
left:0;
height:217px;
z-index:0;
top: 0;
left: 0;
height: 217px;
z-index: 0;
}
</style>