会员充值与设置密码

This commit is contained in:
魏啾 2024-05-22 15:13:29 +08:00
parent 75ac4e967c
commit 83413a2776
8 changed files with 1828 additions and 89 deletions

View File

@ -149,4 +149,10 @@ export default {
upUserInfo(data) {
return uni.api.post("/login/upUserInfo", data);
},
loginresetPwd(data) { // 重置资金密码
return uni.api.post("/login/resetPwd", data);
},
paygetActive(data) { // 获取充值活动
return uni.api.get("/pay/getActive", data);
},
}

View File

@ -106,6 +106,11 @@
}
},
{
"path": "pages/member/list",
"style": {
"navigationBarTitleText": "会员列表"
}
},{
"path": "pages/make/make",
"style": {
"navigationBarTitleText": "在线预定"
@ -118,6 +123,13 @@
"navigationBarBackgroundColor": "#FFD158",
"navigationBarTextStyle": "white"
}
}, {
"path": "pages/user/repairpassword",
"style": {
"navigationBarTitleText": "设置安全密码",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/pay_code/pay_code",

View File

@ -1,24 +1,18 @@
<template>
<view class="content">
<view class="towcontentitem">
<!-- <image class="towcontentitemimage" src="@/static/recharges.png" mode="widthFix"></image> -->
<view class="towcontentitemone flex-start">
<image class="towcontentitemoneimage" :src="userInfo.avatar" mode="aspectFill"></image>
<image class="towcontentitemoneimage" :src="userInfo.headImg" mode="aspectFill"></image>
<view class="towcontentitemonetext flex-colum-start">
<text class="towcontentitemonetextone">{{userInfo.nickName || '暂无昵称'}}</text>
</view>
</view>
<view class="towcontentitemthere flex-start">
余额<text class="towcontentitemtheretext">{{memberlist.vip_number || '0.00'}}</text>
</view>
<view class="towcontentitemprogress">
<!-- 可用余额:{{memberlist.money || '0.00'}}
<text style="font-size: 16rpx; color:#000 ; margin-left: 10rpx;">冻结金额:{{memberlist.freeze_money}}</text>
<view class="towcontentitemoneabsolute">
加购
</view> -->
</view>
<view class="towcontentitemtow flex-between">
<text class="towcontentitemtowetext">{{memberlist.vip_number}}</text>
<!-- <text class="towcontentitemtowetext" style="color: #fff;">保洁清洗卡</text> -->
<text class="towcontentitemtowetext">{{memberlist.vip_number || '无'}}</text>
</view>
</view>
<view class="therecontent">
@ -28,12 +22,12 @@
<view class="fourcontentlnage" v-for="(item,index) in listdata" :key="index">
<view class="flex-colum" :class="index == inputshow?'fourcontentitems':'fourcontentitem'"
@click="clickinput(item,index)">
<text>{{item.amount}}</text>
<!-- <text style="margin-top: 10rpx;">{{item.deliver}}</text> -->
<text>{{item.minNum}}</text>
<text style="margin-top: 10rpx;">{{item.minNum}}{{item.handselNum}}</text>
</view>
</view>
</view>
<view class="fivecontent" @click="userbalancerechangesub">
<view class="fivecontent" @tap="$u.debounce(userbalancerechangesub, 500)">
立即充值
</view>
</view>
@ -45,20 +39,7 @@
return {
inputshow: 0,
memberlist: {},
listdata: [{
amount: 100
},{
amount: 200
},{
amount:300
},{
amount:400
},{
amount:500
},{
amount:1000
}
],
listdata: [],
amount: '',
shopUser: {},
userInfo: {}
@ -66,9 +47,23 @@
},
onLoad(e) {
// this.shopUser = uni.cache.get('shopUser')
// this.userInfo = uni.cache.get('userInfo')
this.userInfo = uni.cache.get('userInfo')
this.paygetActive()
},
methods: {
async paygetActive() {
let res = await this.api.paygetActive({
shopId: uni.cache.get('shopUser'),
page: 1,
pageSize: 10
})
try {
this.listdata = res.data.list
this.amount = res.data.list[0].minNum
} catch (e) {
//TODO handle the exception
}
},
async userbalancerechangesub() {
if (this.amount == null || this.amount == '') {
uni.showToast({
@ -85,26 +80,28 @@
// #ifdef MP-WEIXIN
uni.requestPayment({
provider: 'wxpay', //-
partnerid: res.data.payAppId, //
timeStamp: res.data.payTimeStamp, //
nonceStr: res.data.paynonceStr, //
package: res.data.payPackage, //
signType: res.data.paySignType, //
partnerid: res.data.appId, //
timeStamp: res.data.timeStamp, //
nonceStr: res.data.nonceStr, //
package: res.data.package, //
signType: res.data.signType, //
paySign: res.data.paySign, //
success: (res) => {
uni.showToast({
title: "支付成功"
})
uni.navigateBack()
setTimeout(res => {
uni.navigateBack()
}, 1000)
},
fail: (err) => {
uni.showToast({
icon: 'none',
title: '支付失败'
})
setTimeout(res => {
uni.showToast({
icon: 'none',
title: '支付失败'
})
uni.hideLoading()
}, 2000)
}, 1000)
}
});
// #endif
@ -113,7 +110,7 @@
clickinput(a, b) {
console.log(a, b)
this.inputshow = b
this.amount = a.amount
this.amount = a.minNum
},
eeInfo(e) {
uni.pro.navigateTo('my/member/memberinfo', {
@ -137,21 +134,19 @@
position: relative;
padding: 32rpx;
border-radius: 12rpx;
background: linear-gradient(126deg, #FFFBF2 0%, #F2D093 100%);
border-radius: 12rpx 12rpx 12rpx 12rpx;
.fourcontentitemabsolute {
z-index: 9;
&::after {
position: absolute;
right: 0;
top: 0;
padding: 6rpx 28rpx;
font-size: 20rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #FFFFFF;
text-shadow: 0px 6rpx 12rpx rgba(255, 255, 255, 0.19);
background: linear-gradient(NaNdeg, #4A4A4A 0%, #919191 100%);
border-radius: 0px 12rpx 0px 12rpx;
opacity: 1;
bottom: 0;
right: 68rpx;
content: '';
display: inline-block;
width: 240rpx;
height: 232rpx;
background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/member.png) no-repeat;
background-size: 100% 100%;
}
.towcontentitemimage {
@ -165,7 +160,6 @@
}
.towcontentitemone {
margin-top: 42rpx;
width: 100%;
position: relative;
z-index: 9;
@ -183,10 +177,10 @@
margin-left: 16rpx;
.towcontentitemonetextone {
font-size: 32rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
color: #422A07;
font-size: 36rpx;
color: #333333;
}
.towcontentitemonetexttow {
@ -206,44 +200,28 @@
margin-top: 54rpx;
}
.towcontentitemprogress {
z-index: 10;
position: relative;
margin-top: 24rpx;
border-radius: 28rpx;
font-size: 32rpx;
height: 56rpx;
line-height: 56rpx;
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
font-weight: bold;
color: #333;
.towcontentitemoneabsolute {
position: absolute;
padding: 0 44rpx;
height: 56rpx;
line-height: 56rpx;
top: 0;
right: 0;
font-size: 28rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #FFFFFF;
background: linear-gradient(130deg, #F4AE46 0%, #EE9437 100%);
box-shadow: 0px 4rpx 8rpx 2rpx rgba(243, 169, 67, 0.37);
border-radius: 28rpx;
}
}
.towcontentitemtow {
z-index: 10;
position: relative;
margin-top: 42rpx;
font-size: 24rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #422A07;
}
.towcontentitemthere {
margin-left: 92rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: Medium;
font-size: 24rpx;
color: #333333;
.towcontentitemtheretext {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: bold;
font-size: 36rpx;
color: #333333;
}
}
}
.therecontent {

176
pages/member/list.vue Normal file
View File

@ -0,0 +1,176 @@
<template>
<view class="content">
<view class="onecontentone">
我的会员卡<text v-if="list.length!=0">({{list.length}})</text>
</view>
<view class="flex-colum">
<view class="towcontentitem" v-if="list.length>0" v-for="(item,index) in list" :key="index"
@click="eeInfo(item)">
<image class="towcontentitemimage"
src="https://ointmentweapp.oss-cn-beijing.aliyuncs.com/my/recharge.png" mode="aspectFill"></image>
<view class="towcontentitemone flex-start">
<image class="towcontentitemoneimage" :src="item.store_avatar" mode="aspectFill"></image>
<text class="towcontentitemonetext" style="color: #333333;">{{item.store_title}}</text>
</view>
<view class="towcontentitemtow flex-between">
<text class="towcontentitemtowetext" style="color:#333333;">{{item.vip_number}}</text>
<text>{{item.end_time}}</text>
</view>
</view>
</view>
<view v-if="list.length==0 && is_end == true" class="flex-colum">
<image :src="bgnothave" mode="aspectFill">
</image>
</view>
<u-loadmore :status="form.status" />
</view>
</template>
<script>
export default {
data() {
return {
bgnothave:uni.getStorageSync('bgnothave'),
list: [],
is_end: false,
nickname: uni.cache.get('loginuser').userinfo.nickname,
form: {
page: 1,
status: 'loadmore',
},
}
},
onShow() {
this.userusercarlist()
},
onReachBottom() {
this.userusercarlist()
},
computed: {
},
methods: {
async userusercarlist() {
let res = await this.api.userusercarlist({
page: this.form.page,
store_id:uni.cache.get('store_id')
})
if (res.length == 0) {
this.is_end = true
this.form.status = 'nomore'
return false;
} else {
this.form.status = 'loading';
this.form.page = ++this.form.page;
setTimeout(() => {
this.list = [...this.list, ...res];
if (res.length == 10) {
this.form.status = 'loading';
} else {
this.is_end = true;
this.form.status = 'nomore';
}
}, 500)
}
},
eeInfo(e) {
uni.pro.navigateTo('my/member/memberinfo',{
id: e.vip_id,
lang:1
})
},
}
}
</script>
<style lang="scss">
page {
background: #FFFFFF;
}
.content {
border-top: 16rpx solid #f7f7f7;
padding: 28rpx;
padding-bottom: 40rpx;
.flex-colum_image {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
text {
margin-top: 30rpx;
font-size: 32rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #666666;
}
}
.onecontentone {
font-size: 32rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #333333;
}
.flex-colum {
.towcontentitem {
margin-top: 22rpx;
width: 96%;
position: relative;
height: 224rpx;
padding: 32rpx;
border-radius: 12rpx;
.towcontentitemimage {
top: 0;
left: 0;
position: absolute;
width: 100%;
height: 100%;
border-radius: 12rpx;
z-index: 9;
}
.towcontentitemone {
position: relative;
z-index: 10;
.towcontentitemoneimage {
width: 76rpx;
height: 76rpx;
border-radius: 50%;
}
.towcontentitemonetext {
width: 60%;
margin-left: 16rpx;
font-size: 32rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #422A07;
}
}
.towcontentitemtow {
z-index: 10;
position: absolute;
width: 100%;
left: 0;
bottom: 18rpx;
padding:0 32rpx;
// margin-top: 52rpx;
font-size: 24rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #422A07;
}
}
}
}
</style>

399
pages/member/memberinfo.vue Normal file
View File

@ -0,0 +1,399 @@
<template>
<view class="content">
<view class="towcontentitem">
<image class="towcontentitemimage" :src="data.img" mode="aspectFill"></image>
<view class="fourcontentitemabsolute">
<!-- 年卡会员 -->
</view>
<view class="towcontentitemone flex-start">
<image class="towcontentitemoneimage" :src="data.store_avatar" mode="aspectFill"></image>
<view class="towcontentitemonetext flex-colum-start">
<text class="towcontentitemonetextone">{{data.title}}</text>
<text class="towcontentitemonetexttow">{{data.show}}</text>
</view>
<view class="towcontentitemoneabsolute" @click="overlayshow = true">
加购
</view>
</view>
<view class="towcontentitemprogress">
{{Number(data.user_sec_y_frequ)}}/{{Number(data.user_sec_z_frequ)}}
</view>
<view class="towcontentitemtow flex-between">
<text class="towcontentitemtowetext">{{data.vip_number || ''}}</text>
<text class="towcontentitemtowetext">{{data.end_time}}</text>
</view>
</view>
<view class="therecontentitem">
<view class="therecontentitemtext">
会员详情
</view>
<view class="therecontentitemone">
<!-- <view class="therecontentitemoneiten flex-between" @click="order">
<text class="therecontentitemoneitentetxt">账单明细</text>
<u-icon name="arrow-right" color="#808080" size="18"></u-icon>
</view> -->
<view class="therecontentitemoneiten flex-between" @click="overlayshow = true">
<text class="therecontentitemoneitentetxt">订单明细</text>
<u-icon name="arrow-right" color="#808080" size="18"></u-icon>
</view>
</view>
</view>
<u-overlay :show="overlayshow" @click="overlayshow = false">
<view class="warp">
<view class="rect" @tap.stop>
<view class="onerect flex-center">
<view>{{data.store_title}}</view>
<u-icon @click="overlayshow = false" class="onerecticon" name="backspace" color="#000000"
size="28"></u-icon>
</view>
<view class="towrect">
商品
</view>
<view class="thererect flex-between">
<view class="thererectone">
{{data.title}}
</view>
<view class="thererecttow">
<text></text>{{data.price}}
</view>
</view>
<view class="fourrect flex-between">
<view class="fourrectone">
<text>共计:</text>{{data.price}}
</view>
<view class="fourrecttow" @tap="$u.debounce(showpopupclick,1000)">
立即购买
</view>
</view>
</view>
</view>
</u-overlay>
</view>
</template>
<script>
export default {
data() {
return {
overlayshow: false,
numberbox: "",
data: {}
}
},
async onLoad(e) {
console.log(e)
let res = await this.api.reservationvipdetail({
id: e.id
})
this.data = res
console.log(this.data)
},
methods: {
async showpopupclick() {
try {
let res = await this.api.useropenuserseccrd({
id: this.data.id
}) //
if (res) {
// #ifdef MP-WEIXIN
uni.requestPayment({
provider: 'wxpay', //-
partnerid: res.payAppId, //
timeStamp: res.payTimeStamp, //
nonceStr: res.paynonceStr, //
package: res.payPackage, //
signType: res.paySignType, //
paySign: res.paySign, //
success: (res) => {
uni.showToast({
title: "支付成功"
})
uni.redirectTo({
url: "/my/member/index?e=" + 1,
});
},
fail: (err) => {
setTimeout(res => {
uni.showToast({
icon: 'none',
title: '支付失败'
})
uni.hideLoading()
}, 2000)
uni.redirectTo({
url: "/my/member/index?e=" + 1,
});
}
});
// #endif
}
} catch (e) {
//TODO handle the exception
}
},
order(e) {
uni.pro.navigateTo('my/order/index', {
e: 0
})
}
}
}
</script>
<style lang="scss">
page {
background: #F9F9F9;
}
.content {
padding: 32rpx 28rpx;
.towcontentitem {
margin-top: 22rpx;
width: 100%;
position: relative;
padding: 32rpx;
border-radius: 12rpx;
.fourcontentitemabsolute {
z-index: 9;
position: absolute;
right: 0;
top: 0;
padding: 6rpx 28rpx;
font-size: 20rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #FFFFFF;
text-shadow: 0px 6rpx 12rpx rgba(255, 255, 255, 0.19);
background: linear-gradient(NaNdeg, #4A4A4A 0%, #919191 100%);
border-radius: 0px 12rpx 0px 12rpx;
opacity: 1;
}
.towcontentitemimage {
top: 0;
left: 0;
position: absolute;
width: 100%;
height: 100%;
border-radius: 12rpx;
z-index: 0;
}
.towcontentitemone {
width: 100%;
position: relative;
z-index: 9;
.towcontentitemoneimage {
width: 76rpx;
height: 76rpx;
border-radius: 50%;
}
.towcontentitemoneabsolute {
position: absolute;
padding: 8rpx 44rpx;
right: 0;
font-size: 28rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #FFFFFF;
background: linear-gradient(130deg, #F4AE46 0%, #EE9437 100%);
box-shadow: 0px 4rpx 8rpx 2rpx rgba(243, 169, 67, 0.37);
border-radius: 28rpx;
}
.towcontentitemonetext {
width: 80%;
height: 76rpx;
margin-left: 16rpx;
.towcontentitemonetextone {
width: 80%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 32rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #422A07;
}
.towcontentitemonetexttow {
width: 80%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width:400rpx;
font-size: 24rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #422A07;
}
}
}
.towcontentitemprogressa {
padding: 8rpx 44rpx;
width: 50%;
z-index: 10;
position: relative;
margin-top: 54rpx;
}
.towcontentitemprogress {
position: relative;
z-index: 99;
margin-top: 24rpx;
border-radius: 28rpx;
font-size: 28rpx;
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
font-weight: bold;
color: #000;
}
.towcontentitemtow {
z-index: 10;
position: relative;
margin-top: 68rpx;
font-size: 24rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #422A07;
}
}
.therecontentitem {
margin-top: 32rpx;
width: 100%;
padding: 32rpx 32rpx 0 32rpx;
background: #FFFFFF;
border-radius: 24rpx;
.therecontentitemtext {
font-size: 32rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #333333;
}
.therecontentitemone {
.therecontentitemoneiten:nth-child(1) {
border-top: none !important;
}
.therecontentitemoneiten {
padding: 32rpx 0;
border-top: 1px solid #F7F7F7;
.therecontentitemoneitentetxt {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
}
}
}
.warp {
position: relative;
height: 100%;
.rect {
position: absolute;
bottom: 0;
width: 100%;
background: #FFFFFF;
border-radius: 60rpx 60rpx 0px 0px;
padding: 48rpx 32rpx 32rpx 32rpx;
.onerect {
position: relative;
padding-bottom: 48rpx;
image {
width: 124rpx;
height: 124rpx;
}
view {
margin-left: 16rpx;
font-size: 32rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #1A1A1A;
}
.onerecticon {
position: absolute;
top: 0;
right: 0;
}
}
.towrect {
font-size: 32rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #333333;
}
.thererect {
margin-top: 16rpx;
.thererectone {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
.thererecttow {
text {
font-size: 16rpx;
}
font-size: 32rpx;
font-family: PingFang SC-Heavy,
PingFang SC;
font-weight: 800;
color: #333333;
}
}
.fourrect {
margin-top: 44rpx;
.fourrectone {
text {
font-size: 24rpx;
color: #333333;
}
font-size: 40rpx;
font-family: PingFang SC-Bold,
PingFang SC;
font-weight: bold;
color: #FC5F69;
}
.fourrecttow {
background: linear-gradient(143deg, #8689AF 0%, #494A5F 100%);
border-radius: 34rpx;
padding: 10rpx 44rpx;
font-size: 32rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #FFFFFF;
}
}
}
}
}
</style>

View File

@ -0,0 +1,600 @@
<template>
<view class="content" :style="[theme]">
<view class="towcontentitem">
<image class="towcontentitemimage" :src="data.img" mode="aspectFill"></image>
<view class="towcontentitemone flex-start">
<view class="towcontentitemonetext flex-colum-start">
<text class="towcontentitemonetextone" style="color: #fff;">{{data.title}}</text>
<text class="towcontentitemonetexttow" style="color: #fff;">{{data.show}}</text>
</view>
</view>
<view class="towcontentitemtow flex-between">
<text class="towcontentitemtowetext" style="color: #fff;">{{data.price}}<text
class="towcontentitemtowetexts" style="color: #fff;">/{{data.frequ}}</text></text>
<text class="towcontentitemtowetext_s" style="color: #fff;">{{data.end_time}}</text>
</view>
</view>
<view class="therecontentitem">
<view class="therecontentitemtext">
商品
</view>
<view class="therecontentitemtextitem flex-between">
<view class="therecontentitemtextitem_left">
{{data.title}}
</view>
<view class="therecontentitemtextitem_right">
{{data.price}}
</view>
</view>
<view class="therecontentitemtextitemt_one">
{{data.show}}
</view>
<view class="therecontentitemtext" style="margin-top: 14rpx;">
权益
</view>
<view class="therecontentitemtextitemt_one">
<text style="color: #333333;">{{data.frequ}}</text>{{data.show}}
</view>
</view>
<view class="therecontentitem">
<view class="therecontentitem_tow flex-start">
手机号码<text>{{data.mobile}}</text>
</view>
<view class="therecontentitem_tows">
该号码不会提供给商家仅用于接收平台通知信息
</view>
</view>
<view class="therecontentitem">
<view class="therecontentitemtext">
使用说明
</view>
<view class="therecontentitemtextthere" style="margin-top: 14rpx;margin-bottom: 30rpx;"
v-html="data.notice">
</view>
</view>
<view class="fixedview flex-between">
<view class="fixedview_one flex-start">
<view class="fixedview_oneone">
应付金额
</view>
<view class="fixedview_onetow flex-colum-start">
<text>{{data.price}}</text>
</view>
</view>
<view v-if="mobile" class="fixedview_tow" @tap="$u.debounce(showpopupclick,1000)">
立即付款
</view>
<view v-else class="fixedview_tow">
<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
立即付款
</button>
</view>
</view>
<u-overlay :show="overlayshow" @click="overlayshow = false">
<view class="warp">
<view class="rect" @tap.stop>
<view class="onerect flex-center">
<view>洗剪吹新娘造型</view>
<u-icon @click="overlayshow = false" class="onerecticon" name="backspace" color="#000000"
size="28"></u-icon>
</view>
<view class="towrect">
商品
</view>
<view class="thererect flex-between">
<view class="thererectone">
年卡会员
</view>
<view class="thererecttow">
<text></text>300
</view>
</view>
<view class="fourrect flex-between">
<view class="fourrectone">
<text>共计:</text>300
</view>
<view class="fourrecttow">
立即购买
</view>
</view>
</view>
</view>
</u-overlay>
</view>
</template>
<script>
export default {
data() {
return {
mobile: uni.cache.get('loginuser').userinfo.mobile,
overlayshow: false,
numberbox: "",
data: {
mobile: ''
}
}
},
computed: {
theme() {
return this.$store.getters.theme
},
},
async onLoad(e) {
console.log(e)
let res = await this.api.reservationvipdetail({
id: e.id
})
try {
this.data = res
this.data.notice = res.notice.replace(/\<img/g, '<img style="max-width:100%;height:auto" ');
this.data.mobile = uni.cache.get('loginuser').userinfo.mobile
} catch (e) {
//TODO handle the exception
}
},
async onShow() {
this.$store.dispatch('storeuseruserinfo')
},
mounted() {
var query = uni.createSelectorQuery().in(this).select('.fixedview')
query.boundingClientRect(ele => {
var that = this;
uni.getSystemInfo({
success(res) {
that.height = (ele.height) + "px";
that = null;
}
})
}).exec();
},
methods: {
async getPhoneNumber(res) { //
var resdataa = res
// #ifdef MP-WEIXIN
uni.login({
provider: 'weixin',
success: async (data) => {
let resdata = await this.api.usergetwechatphone({
code: data.code,
iv: resdataa.detail.iv,
encryptedData: resdataa.detail.encryptedData
})
try {
this.mobile = resdata.mobile
} catch (e) {
uni.showToast({
title: '获取失败'
})
}
}
});
// #endif
},
async showpopupclick() {
try {
let res = await this.api.useropenuserseccrd({
id: this.data.id
}) //
if (res) {
// #ifdef MP-WEIXIN
uni.requestPayment({
provider: 'wxpay', //-
partnerid: res.payAppId, //
timeStamp: res.payTimeStamp, //
nonceStr: res.paynonceStr, //
package: res.payPackage, //
signType: res.paySignType, //
paySign: res.paySign, //
success: (res) => {
uni.showToast({
title: "支付成功"
})
uni.redirectTo({
url: "/my/member/index?e=" + 1,
});
},
fail: (err) => {
setTimeout(res => {
uni.showToast({
icon: 'none',
title: '支付失败'
})
uni.hideLoading()
}, 2000)
uni.redirectTo({
url: "/my/member/index?e=" + 1,
});
}
});
// #endif
}
} catch (e) {
//TODO handle the exception
}
},
order(e) {
uni.pro.navigateTo('my/order/index', {
e: 0
})
}
}
}
</script>
<style lang="scss">
page {
background: #F9F9F9;
}
.content {
padding: 32rpx 28rpx;
.towcontentitem {
margin-top: 22rpx;
width: 100%;
position: relative;
padding: 32rpx;
border-radius: 12rpx;
.fourcontentitemabsolute {
z-index: 9;
position: absolute;
right: 0;
top: 0;
padding: 6rpx 28rpx;
font-size: 20rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #FFFFFF;
text-shadow: 0px 6rpx 12rpx rgba(255, 255, 255, 0.19);
background: linear-gradient(NaNdeg, #4A4A4A 0%, #919191 100%);
border-radius: 0px 12rpx 0px 12rpx;
opacity: 1;
}
.towcontentitemimage {
top: 0;
left: 0;
position: absolute;
width: 100%;
height: 100%;
border-radius: 12rpx;
z-index: 5;
}
.towcontentitemone {
width: 100%;
position: relative;
z-index: 9;
.towcontentitemoneimage {
width: 76rpx;
height: 76rpx;
}
.towcontentitemoneabsolute {
position: absolute;
padding: 8rpx 44rpx;
right: 0;
font-size: 28rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #FFFFFF;
background: linear-gradient(130deg, #F4AE46 0%, #EE9437 100%);
box-shadow: 0px 4rpx 8rpx 2rpx rgba(243, 169, 67, 0.37);
border-radius: 28rpx;
}
.towcontentitemonetext {
margin-left: 16rpx;
.towcontentitemonetextone {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 32rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #422A07;
}
.towcontentitemonetexttow {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-top: 16rpx;
font-size: 24rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #422A07;
}
}
}
.towcontentitemprogressa {
padding: 8rpx 44rpx;
width: 50%;
z-index: 10;
position: relative;
margin-top: 54rpx;
}
.towcontentitemprogress {
margin-top: 24rpx;
background: linear-gradient(318deg, #6E6E6E 0%, #404040 100%);
box-shadow: 0px 4rpx 8rpx 2rpx #8D8D8D;
border-radius: 28rpx;
font-size: 28rpx;
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
font-weight: bold;
color: #FFFFFF;
}
.towcontentitemtow {
z-index: 10;
position: relative;
margin-top: 68rpx;
font-size: 24rpx;
.towcontentitemtowetext {
font-size: 30rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: bold;
color: #333333;
.towcontentitemtowetexts {
font-size: 20rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #333333;
}
}
.towcontentitemtowetext_s {
font-size: 24rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #333333;
}
}
}
.therecontentitem {
margin-top: 32rpx;
width: 100%;
padding: 32rpx 32rpx 0 32rpx;
background: #FFFFFF;
border-radius: 12rpx;
.therecontentitem_tow {
font-size: 32rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #999999;
text {
margin-left: 20rpx;
font-size: 32rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #333333;
}
}
.therecontentitem_tows {
margin-top: 16rpx;
font-size: 24rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #999999;
padding-bottom: 30rpx;
}
.therecontentitemtext {
font-size: 32rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #333333;
}
.therecontentitemtextthere {
font-size: 24rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
}
.therecontentitemtextitem {
margin-top: 24rpx;
.therecontentitemtextitem_left {
font-size: 28rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #333333;
}
.therecontentitemtextitem_right {
font-size: 32rpx;
font-family: Roboto-Bold, Roboto;
font-weight: bold;
color: #333333;
}
}
.therecontentitemtextitemt_one {
margin-top: 6rpx;
font-size: 24rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
padding-bottom: 16rpx;
border-bottom: 1rpx dashed #F7F7F7;
}
}
.fixedview {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
padding: 24rpx 28rpx;
background: #FFFFFF;
.fixedview_one {
.fixedview_oneone {
font-size: 28rpx;
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
font-weight: normal;
color: #333333;
}
.fixedview_onetow {
font-size: 44rpx;
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
font-weight: normal;
color: #F45C4C;
font-weight: bold;
text {
font-size: 28rpx;
}
}
}
.fixedview_tow {
background: var(--bg-color-button);
border-radius: 34rpx;
padding: 10rpx 44rpx;
font-size: 32rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #FFFFFF;
button::after {
border-radius: 34rpx;
padding: 0 !important;
margin: 0 !important;
}
button {
background-color: var(--bg-color-button) !important;
padding: 0 !important;
line-height: inherit !important;
margin: 0 !important;
width: auto !important;
font-weight: 500 !important;
border-radius: none !important;
color: #FFFFFF;
}
}
}
.warp {
position: relative;
height: 100%;
.rect {
position: absolute;
bottom: 0;
width: 100%;
background: #FFFFFF;
border-radius: 60rpx 60rpx 0px 0px;
padding: 48rpx 32rpx 32rpx 32rpx;
.onerect {
position: relative;
padding-bottom: 48rpx;
image {
width: 124rpx;
height: 124rpx;
}
view {
margin-left: 16rpx;
font-size: 32rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #1A1A1A;
}
.onerecticon {
position: absolute;
top: 0;
right: 0;
}
}
.towrect {
font-size: 32rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #333333;
}
.thererect {
margin-top: 16rpx;
.thererectone {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
.thererecttow {
text {
font-size: 16rpx;
}
font-size: 32rpx;
font-family: PingFang SC-Heavy,
PingFang SC;
font-weight: 800;
color: #333333;
}
}
.fourrect {
margin-top: 44rpx;
.fourrectone {
text {
font-size: 24rpx;
color: #333333;
}
font-size: 40rpx;
font-family: PingFang SC-Bold,
PingFang SC;
font-weight: bold;
color: #FC5F69;
}
.fourrecttow {
background: linear-gradient(143deg, #8689AF 0%, #494A5F 100%);
border-radius: 34rpx;
padding: 10rpx 44rpx;
font-size: 32rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #FFFFFF;
}
}
}
}
}
</style>

339
pages/member/memberone.vue Normal file
View File

@ -0,0 +1,339 @@
<template>
<view class="content" :style="[theme]">
<view class="towcontentitem">
<image class="towcontentitemimage" src="https://ointmentweapp.oss-cn-beijing.aliyuncs.com/my/recharges.png"
mode="widthFix"></image>
<!-- <view class="fourcontentitemabsolute">
{{memberlist.store_title}}
</view> -->
<view class="towcontentitemone flex-start">
<image class="towcontentitemoneimage" :src="memberlist.store_avatar" mode="aspectFill"></image>
<view class="towcontentitemonetext flex-colum-start">
<text class="towcontentitemonetextone">{{nickname || '暂无昵称'}}</text>
</view>
</view>
<view class="towcontentitemprogress">
可用余额:{{memberlist.money || '0.00'}}
<!-- <text style="font-size: 16rpx; color:#000 ; margin-left: 10rpx;">冻结金额:{{memberlist.freeze_money}}</text> -->
<!-- <view class="towcontentitemoneabsolute">
加购
</view> -->
</view>
<view class="towcontentitemtow flex-between">
<text class="towcontentitemtowetext">{{memberlist.vip_number}}</text>
<!-- <text class="towcontentitemtowetext" style="color: #fff;">保洁清洗卡</text> -->
</view>
</view>
<view class="therecontent">
<input type="number" v-model="amount" placeholder="自定义金额">
</view>
<view class="fourcontent flex-start">
<view class="fourcontentlnage" v-for="(item,index) in listdata" :key="index">
<view class="flex-colum" :class="index == inputshow?'fourcontentitems':'fourcontentitem'"
@click="clickinput(item,index)">
<text>{{item.amount}}</text>
<text style="margin-top: 10rpx;">{{item.deliver}}</text>
</view>
</view>
</view>
<view class="fivecontent" @click="userbalancerechangesub">
立即充值
</view>
</view>
</template>
<script>
export default {
data() {
return {
nickname: uni.cache.get('loginuser').userinfo.nickname,
inputshow: 0,
memberlist: {},
listdata: [],
amount: '',
}
},
onLoad(e) {
// console.log(e)
// this.memberlist = e
this.useruserbalance()
},
onShow() {
this.userbalancerechange()
},
computed: {
theme() {
return this.$store.getters.theme
},
},
methods: {
async useruserbalance(){
let res = await this.api.useruserbalance({
store_id: uni.cache.get('store_id') // ,
})
this.memberlist = res
},
async userbalancerechange() {
let res = await this.api.userbalancerechange({
store_id: uni.cache.get('store_id') // ,
})
this.listdata = res
this.amount = res[0].amount
},
async userbalancerechangesub() {
if (this.amount == null || this.amount == '') {
uni.showToast({
title: '金额不能为空',
icon: 'none'
});
return false;
}
let res = await this.api.userbalancerechangesub({
amount: this.amount,
store_id: this.memberlist.store_id
})
if (res) {
// #ifdef MP-WEIXIN
uni.requestPayment({
provider: 'wxpay', //-
partnerid: res.payAppId, //
timeStamp: res.payTimeStamp, //
nonceStr: res.paynonceStr, //
package: res.payPackage, //
signType: res.paySignType, //
paySign: res.paySign, //
success: (res) => {
uni.showToast({
title: "支付成功"
})
uni.navigateBack()
},
fail: (err) => {
setTimeout(res => {
uni.showToast({
icon: 'none',
title: '支付失败'
})
uni.hideLoading()
}, 2000)
}
});
// #endif
}
},
clickinput(a, b) {
console.log(a, b)
this.inputshow = b
this.amount = a.amount
},
eeInfo(e) {
uni.pro.navigateTo('my/member/memberinfo', {
id: e,
})
},
}
}
</script>
<style lang="scss">
page {
background: #F9F9F9;
}
.content {
padding: 0 28rpx;
.towcontentitem {
width: 100%;
position: relative;
padding: 32rpx;
border-radius: 12rpx;
.fourcontentitemabsolute {
z-index: 9;
position: absolute;
right: 0;
top: 0;
padding: 6rpx 28rpx;
font-size: 20rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #FFFFFF;
text-shadow: 0px 6rpx 12rpx rgba(255, 255, 255, 0.19);
background: linear-gradient(NaNdeg, #4A4A4A 0%, #919191 100%);
border-radius: 0px 12rpx 0px 12rpx;
opacity: 1;
}
.towcontentitemimage {
top: 0;
left: 0;
position: absolute;
width: 100%;
height: 100%;
border-radius: 12rpx;
z-index: 5;
}
.towcontentitemone {
margin-top: 42rpx;
width: 100%;
position: relative;
z-index: 9;
.towcontentitemoneimage {
width: 76rpx;
height: 76rpx;
border-radius: 50%;
}
.towcontentitemonetext {
height: 76rpx;
margin-left: 16rpx;
.towcontentitemonetextone {
font-size: 32rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #422A07;
}
.towcontentitemonetexttow {
font-size: 24rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #422A07;
}
}
}
.towcontentitemprogressa {
padding: 8rpx 44rpx;
z-index: 10;
position: relative;
margin-top: 54rpx;
}
.towcontentitemprogress {
z-index: 10;
position: relative;
margin-top: 24rpx;
border-radius: 28rpx;
font-size: 32rpx;
height: 56rpx;
line-height: 56rpx;
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
font-weight: bold;
color: #333;
.towcontentitemoneabsolute {
position: absolute;
padding: 0 44rpx;
height: 56rpx;
line-height: 56rpx;
top: 0;
right: 0;
font-size: 28rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #FFFFFF;
background: linear-gradient(130deg, #F4AE46 0%, #EE9437 100%);
box-shadow: 0px 4rpx 8rpx 2rpx rgba(243, 169, 67, 0.37);
border-radius: 28rpx;
}
}
.towcontentitemtow {
z-index: 10;
position: relative;
margin-top: 42rpx;
font-size: 24rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #422A07;
}
}
.therecontent {
margin-top: 32rpx;
position: relative;
padding: 22rpx 32rpx;
width: 100%;
background: #FFFFFF;
border-radius: 8rpx;
input {
padding-left: 30rpx;
text-align: right;
font-size: 28rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #666666;
}
}
.therecontent::after {
position: absolute;
top: 50%;
left: 32rpx;
transform: translateY(-50%);
content: '¥';
display: inline-block;
width: 28rpx;
height: 40rpx;
font-size: 28rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #333333;
}
.fourcontent {
.fourcontentlnage {
width: 33.33%;
.fourcontentitem {
margin: 24rpx 10rpx;
padding: 16rpx 0;
text-align: center;
background: #FFFFFF;
border-radius: 8rpx;
border: 1rpx solid #333333;
font-size: 28rpx;
font-family: Roboto-Medium, Roboto;
font-weight: 500;
color: #333333;
}
.fourcontentitems {
margin: 24rpx 10rpx;
padding: 16rpx 0;
text-align: center;
border-radius: 8rpx;
background: var(--bg-color-button);
font-size: 28rpx;
font-family: Roboto-Medium, Roboto;
font-weight: 500;
color: #FFFFFF;
}
}
}
.fivecontent {
margin-top: 62rpx;
padding: 20rpx 0;
text-align: center;
width: 100%;
font-size: 36rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #FFFFFF;
border-radius: 8rpx;
background: var(--bg-color-button);
}
}
</style>

View File

@ -0,0 +1,229 @@
<template>
<view class="Box">
<view class="box_one">安全密码用于商户推广提现/订单退款确保资金安全</view>
<view class="box_box">
<view class="box_item flex-between">
<text class="top_box_one_text">手机号码</text>
<input type="number" v-model="form.mobile" placeholder="请输入手机号" maxlength="11" disabled="disabled" />
</view>
<view class="box_item flex-between">
<text class="top_box_one_text">密码</text>
<input type="number" v-model="form.password" placeholder="密码必须是6位" maxlength="6"
:password="!passwords" />
</view>
<view class="box_item flex-between">
<text class="top_box_one_text">确认密码</text>
<input type="number" v-model="form.payPassword" placeholder="确认密码必须是6位" maxlength="6"
:password="!payPasswords" />
</view>
<view class="box_item flex-between" style="position:relative;">
<text class="top_box_one_text">验证码</text>
<input type="number" v-model="form.checkCode" placeholder="请输入验证码" style="padding-right: 140rpx;" />
<view class="top_box_one_texts">
<view v-if="showText == true" class="yzm" @click="CodeRegister">{{ Recapture }}</view>
<view v-else style="color: #ccc; background-color: #f9f9f9; border-radius:16px; padding: 10rpx;">
{{ second }}s重新发送
</view>
</view>
</view>
</view>
<view class="flex-colum">
<view class="Box_bottom" @click="userInfosavePayPassword">确定</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
form: {
mobile: uni.cache.get('userInfo').telephone,
password: '',
payPassword: '',
checkCode: ''
},
passwords: false,
payPasswords: false,
//
second: 60,
showText: true,
Recapture: '发送验证码'
};
},
onLoad() {},
methods: {
async CodeRegister() {
const res = await this.api.phoneValidateCode({
// post
phone: this.form.mobile
});
if (res) {
uni.showToast({
title: '验证码获取成功',
icon: 'none'
});
//
this.showText = false;
this.Recapture = '重新获取';
var interval = setInterval(() => {
let times = --this.second;
this.second = times < 10 ? '0' + times : times; //10 0
}, 1000);
setTimeout(() => {
clearInterval(interval);
this.second = 60;
this.showText = true;
}, 60000);
}
},
async userInfosavePayPassword() {
console.log(this.form.payPassword, this.form.password)
if (this.form.mobile.length != 11) {
uni.showToast({
title: '手机号必须是11位',
icon: 'none'
});
return false;
}
if (this.form.password == null || this.form.password == '') {
uni.showToast({
title: '请输入密码',
icon: 'none'
});
return false;
}
if (this.form.payPassword == null || this.form.payPassword == '') {
uni.showToast({
title: '请输入确认密码',
icon: 'none'
});
return false;
}
if (this.form.password.length != 6 || this.form.payPassword.length != 6) {
uni.showToast({
title: '密码必须是6位',
icon: 'none'
});
return false;
}
if (this.form.payPassword != this.form.password) {
uni.showToast({
title: '密码和确认密码不一致',
icon: 'none'
});
return false;
}
if (this.form.checkCode == null || this.form.checkCode == '') {
uni.showToast({
title: '请输入验证码',
icon: 'none'
});
return false;
}
let res = await this.api.loginresetPwd({
pwd: this.form.password,
shopId: uni.cache.get('shopUser'),
code: this.form.checkCode
})
if (res == 1) {
uni.showToast({
title: '修改成功',
icon: 'none'
});
setTimeout(() => {
uni.navigateBack();
}, 1000);
}
}
}
};
</script>
<style lang="scss">
page {
background: #f9f9f9;
}
.Box {
padding: 0 28rpx;
.box_one {
margin-top: 26rpx;
font-size: 24rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #999999;
}
.box_box {
background: #fff;
padding: 0 32rpx;
.box_item {
.top_box_one_text {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
input {
padding: 26rpx 0;
width: 75%;
font-size: 24rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #999999;
border-bottom: 1rpx solid #E5E5E5;
}
.repeat {
position: absolute;
bottom: 26rpx;
right: 0;
width: 25rpx;
height: 17rpx;
}
.top_box_one_texts {
position: absolute;
right: 32rpx;
font-size: 28rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #5082fd;
.yzm {
padding: 6rpx 10rpx;
background: #FFD158;
border-radius: 6px 6px 6px 6px;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 12px;
color: #333333;
}
}
}
}
.flex-colum {
width: 100%;
margin-top: 156rpx;
.Box_bottom {
width: 558rpx;
height: 72rpx;
background: #FFD158;
border-radius: 50rpx;
font-size: 36rpx;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #ffffff;
line-height: 72rpx;
text-align: center;
}
}
}
</style>