会员相关功能更新
This commit is contained in:
@@ -86,6 +86,10 @@ export default {
|
||||
shopUserInfo(data) {
|
||||
return uni.api.get("/user/shopUserInfo", data);
|
||||
},
|
||||
// 注册会员
|
||||
openMember(data) {
|
||||
return uni.api.post("/user/openMember", data);
|
||||
},
|
||||
// 优惠券数量
|
||||
userCoupon(data) {
|
||||
return uni.api.get("/user/userCoupon", data);
|
||||
|
||||
@@ -15,7 +15,18 @@
|
||||
:style="{'height':HeighT.customBar+'px','marginTop':HeighT.heightBar+'px','padding-right':HeighT.custwidth + 'px'}">
|
||||
<!-- #endif -->
|
||||
<!-- 标题搜索框 -->
|
||||
<view class="flex-between" @click="clicknavigateBack">
|
||||
<view v-if="search&&opacity">
|
||||
<u--input
|
||||
class="search"
|
||||
v-model="searchVal"
|
||||
placeholder="想吃什么搜一搜"
|
||||
@confirm="confirmSearch"
|
||||
prefixIcon="search"
|
||||
prefixIconStyle="font-size: 22px;color: #909399"
|
||||
:customStyle="{height:'100%',marginLeft:'20rpx',backgroundColor:'#eee',padding: '0'}"
|
||||
></u--input>
|
||||
</view>
|
||||
<view class="flex-between" @click="clicknavigateBack" v-else>
|
||||
<view class="navbar_tow_one flex-start" v-if="iconshow">
|
||||
<u-icon name="arrow-left" :color="iconcolor" size="40"></u-icon>
|
||||
</view>
|
||||
@@ -42,7 +53,8 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
Topdistance: ''
|
||||
Topdistance: '',
|
||||
searchVal: ""
|
||||
};
|
||||
},
|
||||
props: {
|
||||
@@ -54,6 +66,10 @@
|
||||
type: String,
|
||||
default: '#333333'
|
||||
},
|
||||
search: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
opacity: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
@@ -104,6 +120,9 @@
|
||||
} else {
|
||||
uni.navigateBack()
|
||||
}
|
||||
},
|
||||
confirmSearch () {
|
||||
this.$emit('searchVal', this.searchVal)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
21
pages.json
21
pages.json
@@ -119,6 +119,22 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员列表"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/member/storedManage",
|
||||
"style": {
|
||||
"navigationBarTitleText": "储值管理"
|
||||
}
|
||||
},{
|
||||
"path": "pages/member/setPassword",
|
||||
"style": {
|
||||
"navigationBarTitleText": "密码设置"
|
||||
}
|
||||
},{
|
||||
"path": "pages/member/instructions",
|
||||
"style": {
|
||||
"navigationBarTitleText": "使用须知"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/make/make",
|
||||
"style": {
|
||||
@@ -175,7 +191,7 @@
|
||||
{
|
||||
"path": "pages/user/coupon",
|
||||
"style": {
|
||||
"navigationBarTitleText": "优惠券"
|
||||
"navigationBarTitleText": "我的优惠券"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -272,7 +288,8 @@
|
||||
{
|
||||
"path": "pages/member/billDetails",
|
||||
"style": {
|
||||
"navigationBarTitleText": "账单明细"
|
||||
"navigationBarTitleText": "账单明细",
|
||||
"navigationBarBackgroundColor": "#E9B385"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
180
pages/member/billDetails - 副本.vue
Normal file
180
pages/member/billDetails - 副本.vue
Normal file
@@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<!-- 账单明细 -->
|
||||
<view>
|
||||
<view class="bild">
|
||||
<view class="bildLeft">
|
||||
<text>我的余额</text>
|
||||
<view>{{info.amount}}</view>
|
||||
</view>
|
||||
<view class="bildRight">
|
||||
<text>我的积分</text>
|
||||
<view>{{info.levelConsume}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="navTop">
|
||||
<view @click="clickEvent(1)" :class="[active==1?'fonts':'']">
|
||||
余额明细
|
||||
<view :class="[active==1?'xian':'']" style="left: 36rpx;"> </view>
|
||||
</view>
|
||||
<view @click="clickEvent(2)" :class="[active==2?'fonts':'']">
|
||||
积分明细
|
||||
<view :class="[active==2?'xian':'']" style="left: 36rpx;"> </view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="listStyle" v-for="(item,i) in list" :key="i">
|
||||
<!-- <image :src="require('')" style="width: 76rpx;height: 76rpx;float: left;" mode=""></image> -->
|
||||
<view class="listrigth">
|
||||
<view>{{item.biz_name}}</view>
|
||||
<view :class="[item.type == '+'?'colorStyle':'']">{{item.type}}{{item.amount}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="listrigth2">
|
||||
<view>{{$u.timeFormat(item.create_time, 'yyyy-mm-dd hh:MM:ss')}}</view>
|
||||
<view>余额:{{item.balance}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
active: 1,
|
||||
list: [],
|
||||
form: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
memberId: null
|
||||
},
|
||||
info: null
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.info = e
|
||||
this.form.memberId = e.memberId
|
||||
this.getlist()
|
||||
},
|
||||
onReachBottom() {
|
||||
this.getlist()
|
||||
},
|
||||
methods: {
|
||||
// 检测是否包含In
|
||||
checkIn(str) {
|
||||
let reg = RegExp(/In/)
|
||||
return str.match(reg)
|
||||
},
|
||||
async getlist() {
|
||||
if (this.active == 1) {
|
||||
let res = await this.api.queryMemberAccount(this.form)
|
||||
if (res.code == 0) {
|
||||
if (this.form.page == 1) {
|
||||
this.list = res.data.list
|
||||
} else {
|
||||
this.form.page++
|
||||
this.list.push(res.data.list)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.list = []
|
||||
}
|
||||
},
|
||||
clickEvent(i) {
|
||||
this.active = i
|
||||
this.getlist()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.bild {
|
||||
height: 320rpx;
|
||||
background-image: url('https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/czmxbg.png');
|
||||
background-size: 750rpx 320rpx;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
|
||||
.bildLeft,
|
||||
.bildRight {
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
|
||||
>view,
|
||||
>text {
|
||||
text-align: center;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
>view {
|
||||
margin-top: 34rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navTop {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
color: #333;
|
||||
margin-top: -60rpx;
|
||||
padding: 0 120rpx;
|
||||
|
||||
.fonts {
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
>view {
|
||||
position: relative;
|
||||
|
||||
.xian {
|
||||
width: 58rpx;
|
||||
height: 6rpx;
|
||||
background: #FFAA62;
|
||||
border-radius: 2rpx 2rpx 2rpx 2rpx;
|
||||
position: absolute;
|
||||
bottom: -16rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.listStyle {
|
||||
padding: 28rpx;
|
||||
padding-top: 50rpx;
|
||||
width: 100%;
|
||||
|
||||
.listrigth,
|
||||
.listrigth2 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
// padding-left: 32rpx;
|
||||
}
|
||||
|
||||
.listrigth {
|
||||
.colorStyle {
|
||||
color: #FF7127;
|
||||
}
|
||||
|
||||
>view {
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.listrigth2 {
|
||||
margin-top: 6rpx;
|
||||
|
||||
>view {
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -91,7 +91,7 @@
|
||||
<style scoped lang="less">
|
||||
.bild {
|
||||
height: 320rpx;
|
||||
background-image: url('https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/czmxbg.png');
|
||||
background-image: url('https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/billingDetails.png');
|
||||
background-size: 750rpx 320rpx;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
@@ -122,9 +122,10 @@
|
||||
color: #333;
|
||||
margin-top: -60rpx;
|
||||
padding: 0 120rpx;
|
||||
|
||||
font-size: 28rpx;
|
||||
.fonts {
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
>view {
|
||||
@@ -133,7 +134,7 @@
|
||||
.xian {
|
||||
width: 58rpx;
|
||||
height: 6rpx;
|
||||
background: #FFAA62;
|
||||
background: #333;
|
||||
border-radius: 2rpx 2rpx 2rpx 2rpx;
|
||||
position: absolute;
|
||||
bottom: -16rpx;
|
||||
@@ -157,7 +158,7 @@
|
||||
|
||||
.listrigth {
|
||||
.colorStyle {
|
||||
color: #FF7127;
|
||||
// color: #FF7127;
|
||||
}
|
||||
|
||||
>view {
|
||||
|
||||
318
pages/member/components/registermember.vue
Normal file
318
pages/member/components/registermember.vue
Normal file
@@ -0,0 +1,318 @@
|
||||
<template>
|
||||
<!-- 店铺详情 -->
|
||||
<u-popup :show="show" :round="20" overlayOpacity="0.8" mode="bottom" @close="showClose" height="500">
|
||||
<view class="register-member-wrap">
|
||||
<view class="register-title">欢迎加入双屿</view>
|
||||
<view class="register-tip">请完善个人信息完成会员注册</view>
|
||||
<view class="register-content">
|
||||
<view class="reg-head">
|
||||
<view class="reg-head-img">
|
||||
<button class="reg-head-img" type="default" open-type="chooseAvatar" @chooseavatar="uploadImg">
|
||||
<image class="reg-head-img" :src="userHeadImg || 'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/head_default.png'" mode="aspectFill"></image>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="reg-cell">
|
||||
<view class="lable">昵称<text style="color: #CD1A1A;">*</text></view>
|
||||
<u-input class="value" v-model="nickName" fontSize="14px" type="text" input-align="left" placeholder="请输入昵称" :custom-style="{border:'none'}" placeholderStyle="color:#999;font-size: 28rpx"/>
|
||||
</view>
|
||||
<view class="reg-cell">
|
||||
<view class="lable">生日</view>
|
||||
<view class="value" :style="{color: birthDay ? '#333' : '#999'}" @click="calendarShow = true">{{ birthDay || '请选择日期'}}</view>
|
||||
<!-- <u-calendar @close="calendarShow = false" monthNum="99" minDate="1945-01-01" maxDate="2055-12-12" :show="calendarShow" mode="single" @confirm="confirmCalendar"></u-calendar> -->
|
||||
<!-- <u-picker :show="calendarShow" ref="uPicker" :columns="columns" @confirm="confirm" @change="changeHandler"></u-picker> -->
|
||||
<!-- <picker :show="calendarShow" mode="date"></picker> -->
|
||||
<u-datetime-picker
|
||||
mode="date"
|
||||
@cancel="calendarShow = false"
|
||||
:show="calendarShow"
|
||||
:minDate="-2208988800000"
|
||||
v-model="value1"
|
||||
@confirm="confirmTime"
|
||||
></u-datetime-picker>
|
||||
<u-icon name="arrow-down-fill" color="#000" size="23"></u-icon>
|
||||
</view>
|
||||
<view class="reg-cell">
|
||||
<view class="lable">手机号</view>
|
||||
<u-input class="value" v-model="telephone" fontSize="14px" type="text" input-align="left" readonly placeholder="获取微信手机号" :custom-style="{border:'none'}" placeholder-style="color:#999;font-size: 28rpx"/>
|
||||
<button class="getPhone" open-type="getPhoneNumber" @getphonenumber="getPhone">
|
||||
<view class="text">{{phonetitle || '获取微信手机号'}}</view>
|
||||
</button>
|
||||
</view>
|
||||
<view class="agreement">
|
||||
<view class="agreement_tip">我已阅读并同意以下内容</view>
|
||||
<view class="agreement_item">
|
||||
<u-checkbox-group>
|
||||
<u-checkbox shape="circle" activeColor="#E3AD7F" @change="radioChange" size="30"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<text @click="viewProtocol(1)" class="agreement_item_text">用户协议/隐私条款</text>
|
||||
</view>
|
||||
<!-- <view class="agreement_item">
|
||||
<u-checkbox-group>
|
||||
<u-checkbox shape="circle" activeColor="#E3AD7F" @change="radioChange" size="30"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<text class="agreement_item_text">隐私条款</text>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="register_btn" @tap="$u.debounce(registerMember, 500)" >快速注册</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ['userInfo','show',"shopId"],
|
||||
data() {
|
||||
return {
|
||||
value1: Number(new Date()),
|
||||
calendarShow: false,
|
||||
userId: null,
|
||||
userHeadImg: "",
|
||||
nickName: "",
|
||||
telephone: "",
|
||||
birthDay: "",
|
||||
isProtocol: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.userInfo = uni.cache.get('userInfo')
|
||||
this.userId = this.userInfo.id;
|
||||
this.userHeadImg = this.userInfo.headImg;
|
||||
this.nickName = this.userInfo.nickName && this.userInfo.nickName != '微信用户' ? this.userInfo.nickName : '';
|
||||
this.telephone = this.userInfo.telephone;
|
||||
this.birthDay = this.userInfo.birthDay
|
||||
console.log(this.userInfo, '调试1113');
|
||||
},
|
||||
methods: {
|
||||
showClose (){
|
||||
console.log(2)
|
||||
uni.navigateBack()
|
||||
},
|
||||
radioChange(n) {
|
||||
//是否同意
|
||||
console.log(n);
|
||||
this.isProtocol = n;
|
||||
},
|
||||
/**
|
||||
* 查看协议
|
||||
*/
|
||||
viewProtocol (){
|
||||
wx.openPrivacyContract({
|
||||
success: () => {}, // 打开成功
|
||||
fail: () => {}, // 打开失败
|
||||
complete: () => {}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 上传头像
|
||||
* @param {Object} e
|
||||
*/
|
||||
uploadImg(e) {
|
||||
console.log(e)
|
||||
const {
|
||||
avatarUrl
|
||||
} = e.detail
|
||||
console.log(e)
|
||||
console.log(e.detail)
|
||||
// this.userHeadImg = avatarUrl
|
||||
uni.uploadFile({
|
||||
url: 'https://wxcashiertest.sxczgkj.cn/cashierService/common/upload',
|
||||
// url: uni.conf.baseUrl + '/common/upload',
|
||||
filePath: avatarUrl,
|
||||
header: {
|
||||
environment: 'app',
|
||||
type: 'android',
|
||||
version: '1.7.3',
|
||||
},
|
||||
name: "file",
|
||||
formData: {
|
||||
file: avatarUrl,
|
||||
},
|
||||
success: (uploadFileRes) => {
|
||||
let { data } = JSON.parse(uploadFileRes.data)
|
||||
this.userHeadImg = data
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 确定生日
|
||||
* @param {Object} e
|
||||
*/
|
||||
confirmTime(e) {
|
||||
this.calendarShow = false;
|
||||
this.birthDay = this.getDate(e.value);
|
||||
// console.log(this.getDate(e.value))
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取手机号
|
||||
* @param {Object} d
|
||||
*/
|
||||
async getPhone(d) {
|
||||
if (d.detail.iv) {
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: async (data) => {
|
||||
console.log(data)
|
||||
let res = await this.api.userwxlogins({
|
||||
code: data.code,
|
||||
encryptedData: d.detail.encryptedData,
|
||||
iv: d.detail.iv,
|
||||
})
|
||||
this.phonetitle = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 格式化时间戳
|
||||
* @param {Object} time
|
||||
*/
|
||||
getDate(time) {
|
||||
const date = new Date(time);
|
||||
// const date = new Date();
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
|
||||
|
||||
month = month > 9 ? month : '0' + month;
|
||||
day = day > 9 ? day : '0' + day;
|
||||
return `${year}-${month}-${day}`;
|
||||
},
|
||||
|
||||
/**
|
||||
* 注册会员
|
||||
*/
|
||||
async registerMember () {
|
||||
console.log(this.userInfo)
|
||||
if ( !this.isProtocol ) {
|
||||
uni.showToast({
|
||||
title: '请勾选协议',
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
let res = await this.api.openMember({
|
||||
id: this.userId,
|
||||
shopId: this.shopId,
|
||||
nickName: this.nickName,
|
||||
headImg: this.userHeadImg,
|
||||
telephone: this.telephone,
|
||||
birthDay: this.birthDay
|
||||
})
|
||||
if ( res.code == 0 ) {
|
||||
this.$emit('getRegisterMember', false)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.register-member-wrap{
|
||||
padding: 64rpx 24rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.register-title{
|
||||
font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
color: #333333;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.register-tip{
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.register-content{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.reg-head{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 64rpx;
|
||||
.reg-head-img{
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
position: relative;
|
||||
}
|
||||
.reg-head-edit{
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 14rpx;
|
||||
}
|
||||
}
|
||||
.reg-cell{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 2rpx solid #E5E5E5;
|
||||
.lable{
|
||||
width: 120rpx;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.value{
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
padding: 12rpx 0 12rpx 18rpx;
|
||||
}
|
||||
.u-input{
|
||||
input{
|
||||
font-size: 28rpx!important;
|
||||
}
|
||||
}
|
||||
.getPhone{
|
||||
line-height: initial;
|
||||
background-color: none;
|
||||
border: 2rpx solid #E3AD7F;
|
||||
color: #E3AD7F;
|
||||
font-size: 28rpx;
|
||||
padding: 5rpx 10rpx;
|
||||
}
|
||||
}
|
||||
.agreement{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 48rpx;
|
||||
.agreement_tip{
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
.agreement_item{
|
||||
display: flex;
|
||||
margin-bottom: 16rpx;
|
||||
.agreement_item_text{
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #E3AD7F;
|
||||
}
|
||||
}
|
||||
}
|
||||
.register_btn{
|
||||
width: 572rpx;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
text-align: center;
|
||||
background: #E3AD7F;
|
||||
border-radius: 48rpx 48rpx 48rpx 48rpx;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
margin: 30rpx auto 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -12,7 +12,7 @@
|
||||
<view class="card_info_con flex-between">
|
||||
<view class="balance">{{userInfo.amount || '0.00'}}</view>
|
||||
<view class="card_info_con_right flex-end">
|
||||
<view class="card_info_con_right_item flex-colum" v-for="(item,index) in cardManageList" :key="index">
|
||||
<view class="card_info_con_right_item flex-colum" @click="handleClick(item)" v-for="(item,index) in cardManageList" :key="index">
|
||||
<image class="card_info_con_right_item_icon" :src="item.icon" mode="aspectFill"></image>
|
||||
<text class="card_info_con_right_item_text">{{item.name}}</text>
|
||||
</view>
|
||||
@@ -41,6 +41,17 @@
|
||||
|
||||
</viwe>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="gift" v-if="giftList && giftList.length > 0">
|
||||
<view class="gift_title">您将获得:</view>
|
||||
<view class="gift_list">
|
||||
<view class="gift_list_item" v-for="(item,index) in giftList" :key="index">
|
||||
<text class="icon"></text>
|
||||
<text class="text"> {{ item }} </text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="explain">
|
||||
@@ -57,28 +68,40 @@
|
||||
</view>
|
||||
|
||||
<view class="rechargeBox">
|
||||
<view class="agreement">
|
||||
<u-checkbox-group>
|
||||
<u-checkbox shape="circle" activeColor="#E3AD7F" @change="radioChange" size="30"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<text>已同意</text>
|
||||
<text class="agreement_text" @click="Privacy(1)">《用户储值协议》</text>
|
||||
<text class="agreement_text" @click="Privacy(3)">《用户授权协议》</text>
|
||||
</view>
|
||||
<view class="recharge" @tap="$u.debounce(userbalancerechangesub, 500)">立即充值</view>
|
||||
</view>
|
||||
|
||||
<registermember :show="memberOpen" :shopId="shopId" :userInfo="userInfo" @getRegisterMember="getRegisterMember"></registermember>
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import registermember from './components/registermember.vue'
|
||||
export default {
|
||||
components: {
|
||||
registermember
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
inputshow: 0,
|
||||
memberOpen: false,
|
||||
isProtocol: false,
|
||||
listdata: [],
|
||||
amount: '',
|
||||
userInfo: {},
|
||||
shopId: '',
|
||||
|
||||
giftList: [],
|
||||
cardManageList: [
|
||||
{name: "明细",icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/detail.png"},
|
||||
{name: "管理",icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/manage.png"}
|
||||
{name: "明细", url: "member/billDetails",icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/detail.png"},
|
||||
{name: "管理", url: "member/storedManage",icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/manage.png"}
|
||||
],
|
||||
|
||||
}
|
||||
@@ -104,9 +127,9 @@
|
||||
console.log(this.shopId)
|
||||
},
|
||||
methods: {
|
||||
|
||||
openLocation () {
|
||||
},
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
async init() {
|
||||
let res = await this.api.shopUserInfo({
|
||||
"shopId": this.shopId,
|
||||
@@ -122,50 +145,98 @@
|
||||
this.paygetShopByMember(this.shopId)
|
||||
this.paygetActive()
|
||||
},
|
||||
memberCancel () {
|
||||
let pages = getCurrentPages()
|
||||
if ( pages.length > 1) {
|
||||
uni.navigateBack()
|
||||
|
||||
/**
|
||||
* 获取充值金额列表
|
||||
*/
|
||||
async paygetActive() {
|
||||
let res = await this.api.paygetActive({
|
||||
shopId: this.shopId,
|
||||
page: 1,
|
||||
pageSize: 10
|
||||
})
|
||||
|
||||
try {
|
||||
this.listdata = res.data.list;
|
||||
this.giftList = this.listdata[0].giftList;
|
||||
this.amount = res.data.list[0].minNum
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 进入明细\管理
|
||||
* @param {Object} e
|
||||
*/
|
||||
handleClick (item) {
|
||||
uni.pro.navigateTo(item.url, this.userInfo)
|
||||
},
|
||||
|
||||
async Privacy(e) {
|
||||
if (e == 1) {
|
||||
//用户协议
|
||||
let res = await this.api.agreementgetAgreementOne({
|
||||
discern: 0
|
||||
});
|
||||
uni.pro.navigateTo('my/about/agreement', {
|
||||
discern: 0,
|
||||
list: res.data.content
|
||||
});
|
||||
} else {
|
||||
uni.exitMiniProgram({
|
||||
success: function () {
|
||||
console.log('退出成功');
|
||||
},
|
||||
fail: function () {
|
||||
console.log('退出失败');
|
||||
}
|
||||
let res3 = await this.api.agreementgetAgreementOne({
|
||||
discern: 3
|
||||
});
|
||||
uni.pro.navigateTo('my/about/agreement', {
|
||||
discern: 3,
|
||||
list: res3.data.content
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 是否同意协议
|
||||
* @param {Object} n
|
||||
*/
|
||||
radioChange(n) {
|
||||
this.isProtocol = n;
|
||||
},
|
||||
|
||||
/**
|
||||
* 注册会员卡
|
||||
* @param {Object} e
|
||||
*/
|
||||
getRegisterMember (e) {
|
||||
this.memberOpen = e;
|
||||
this.paygetShopByMember()
|
||||
this.paygetActive()
|
||||
},
|
||||
|
||||
/**
|
||||
* 拉起地图
|
||||
*/
|
||||
openLocation () {
|
||||
|
||||
uni.openLocation({
|
||||
latitude: Number(this.userInfo.lat), // 目的地的纬度,浮点数,范围为-90~90
|
||||
longitude: Number(this.userInfo.lng), // 目的地的经度,浮点数,范围为-180~180
|
||||
scale: 18, // 缩放比例,范围5~18
|
||||
name: this.userInfo.shopName, // 位置名
|
||||
address: this.userInfo.address, // 地址的详细说明
|
||||
success() {
|
||||
console.log('导航启动成功');
|
||||
},
|
||||
fail(error) {
|
||||
console.log('导航启动失败', error);
|
||||
}
|
||||
});
|
||||
},
|
||||
sumbit(d) {
|
||||
if (d.detail.iv) {
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: async (data) => {
|
||||
let res = await this.api.userwxlogins({
|
||||
code: data.code,
|
||||
encryptedData: d.detail.encryptedData,
|
||||
iv: d.detail.iv,
|
||||
shopId: this.shopId
|
||||
})
|
||||
if (res.code == 0) {
|
||||
let resdata = await this.api.loginwxuserInfo({
|
||||
userId: uni.cache.get('userInfo').id
|
||||
})
|
||||
if (resdata.code == 0) {
|
||||
uni.cache.set('userInfo', resdata .data);
|
||||
this.memberOpen = false
|
||||
this.paygetShopByMember(this.shopId)
|
||||
this.paygetActive()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 解析地址传参
|
||||
* @param {Object} url
|
||||
* @param {Object} name
|
||||
*/
|
||||
getQueryString(url, name) { //解码
|
||||
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
|
||||
var r = url.substr(1).match(reg)
|
||||
@@ -174,6 +245,11 @@
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取门店会员信息
|
||||
* @param {Object} w
|
||||
*/
|
||||
async paygetShopByMember(w) {
|
||||
let res = await this.api.paygetShopByMember({
|
||||
page: 1,
|
||||
@@ -183,20 +259,24 @@
|
||||
})
|
||||
this.userInfo = res.data.list[0]
|
||||
},
|
||||
async paygetActive() {
|
||||
let res = await this.api.paygetActive({
|
||||
shopId: this.shopId,
|
||||
page: 1,
|
||||
pageSize: 10
|
||||
})
|
||||
|
||||
try {
|
||||
this.listdata = res.data.list
|
||||
this.amount = res.data.list[0].minNum
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 充值金额切换
|
||||
* @param {Object} a
|
||||
* @param {Object} b
|
||||
*/
|
||||
clickinput(a, b) {
|
||||
console.log(a, b)
|
||||
this.inputshow = b;
|
||||
this.amount = a.minNum;
|
||||
this.giftList = a.giftList;
|
||||
},
|
||||
|
||||
/**
|
||||
* 充值
|
||||
*/
|
||||
async userbalancerechangesub() {
|
||||
if (this.amount == null || this.amount == '') {
|
||||
uni.showToast({
|
||||
@@ -257,11 +337,8 @@
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
clickinput(a, b) {
|
||||
console.log(a, b)
|
||||
this.inputshow = b
|
||||
this.amount = a.minNum
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -386,13 +463,13 @@
|
||||
justify-content: center;
|
||||
text:nth-child(1){
|
||||
font-weight: bold;
|
||||
font-size: 24rpx;
|
||||
color: #C14D3A;
|
||||
font-size: 20rpx;
|
||||
color: #fff;
|
||||
}
|
||||
text:nth-child(2){
|
||||
font-weight: 400;
|
||||
font-size: 20rpx;
|
||||
color: #F7664E;
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -426,6 +503,39 @@
|
||||
}
|
||||
}
|
||||
|
||||
.gift{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0 22rpx;
|
||||
margin-bottom: 48rpx;
|
||||
.gift_title{
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.gift_list{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.gift_list_item{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.icon{
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #F7853D;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
.text{
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.explain{
|
||||
background-color: #fff;
|
||||
border-radius: 12rpx;
|
||||
@@ -471,6 +581,18 @@
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
.agreement{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 20rpx;
|
||||
text{
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.agreement_text{
|
||||
color: #E3AD7F;
|
||||
}
|
||||
}
|
||||
.recharge {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
|
||||
136
pages/member/instructions.vue
Normal file
136
pages/member/instructions.vue
Normal file
@@ -0,0 +1,136 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="list">
|
||||
<view class="list_item" @click="handleClick(item)" v-for="(item,index) in list" :key="index">
|
||||
<view class="list_item_title">{{ item.title }}</view>
|
||||
<view class="list-cell">
|
||||
<view class="list-cell-item" v-for="(item1,index1) in item.list" :key="index1">
|
||||
<view class="list-cell-item-title"> {{ item1.title }}</view>
|
||||
<viwe class="list-cell-item-content">
|
||||
<viwe class="list-cell-item-content-text" v-for="(item2,index2) in item1.list" :key="index2">{{item2}}</viwe>
|
||||
</viwe>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userInfo: null,
|
||||
list: [
|
||||
{
|
||||
title: "充值规则",
|
||||
list: [
|
||||
{
|
||||
title: "满赠规则",
|
||||
list: [
|
||||
"充300元送15元+0积分+0元券",
|
||||
"充500元送40元+0积分+0元券",
|
||||
"充1000元送100元+0积分+0元券",
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "适用门店",
|
||||
list: [
|
||||
"适用于1家门店",
|
||||
]
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "使用规则",
|
||||
list: [
|
||||
{
|
||||
title: "使用须知",
|
||||
list: [
|
||||
"按比例",
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "免密支付",
|
||||
list: [
|
||||
"免密支付已开通",
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "适用商品",
|
||||
list: [
|
||||
"全部商品可用",
|
||||
]
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.userInfo = e
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 跳转
|
||||
*/
|
||||
handleClick ( item ) {
|
||||
uni.pro.navigateTo(item.url, this.userInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
page{
|
||||
background-color: #fff;
|
||||
}
|
||||
.container{
|
||||
padding: 48rpx 20rpx;
|
||||
.list{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.list_item{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 32rpx;
|
||||
.list_item_title{
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
.list-cell{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.list-cell-item{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-bottom: 2rpx solid #E5E5E5;
|
||||
padding-bottom: 32rpx;
|
||||
margin-bottom: 32rpx;
|
||||
.list-cell-item-title{
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.list-cell-item-content{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.list-cell-item-content-text{
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.list_item:last-child .list-cell-item:last-child{
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
304
pages/member/memberdetails - 副本.vue
Normal file
304
pages/member/memberdetails - 副本.vue
Normal file
@@ -0,0 +1,304 @@
|
||||
<template>
|
||||
<!-- 会员详情 -->
|
||||
<view class="content">
|
||||
<card :userInfo="userInfo"></card>
|
||||
<view class="memberdetailsStyle">
|
||||
<text>会员详情</text>
|
||||
<view @click="goUrl('member/billDetails')">
|
||||
<text>账单明细</text>
|
||||
<uni-icons type="right" style="color: #333;" size="20"></uni-icons>
|
||||
</view>
|
||||
<view @click="goUrlinfo('member/index')">
|
||||
<text>会员充值</text>
|
||||
<uni-icons type="right" style="color: #333;" size="20"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import card from './components/card.vue'
|
||||
export default {
|
||||
components: {
|
||||
card
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
shopId_id: null,
|
||||
inputshow: 0,
|
||||
memberlist: {},
|
||||
listdata: [],
|
||||
amount: '',
|
||||
userInfo: {},
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log(e)
|
||||
this.shopId_id = e.shopId_id
|
||||
},
|
||||
onShow() {
|
||||
this.paygetShopByMember(this.shopId_id)
|
||||
},
|
||||
methods: {
|
||||
async paygetShopByMember(w) {
|
||||
let res = await this.api.paygetShopByMember({
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
userId: uni.cache.get('userInfo').id,
|
||||
shopId: w
|
||||
})
|
||||
this.userInfo = res.data.list[0]
|
||||
},
|
||||
clickinput(a, b) {
|
||||
console.log(a, b)
|
||||
this.inputshow = b
|
||||
this.amount = a.minNum
|
||||
},
|
||||
goUrl(url) {
|
||||
uni.pro.navigateTo(url, this.userInfo)
|
||||
},
|
||||
goUrlinfo(url) {
|
||||
uni.pro.navigateTo(url, {
|
||||
shopId: this.shopId_id,
|
||||
type: 'list'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0 28rpx;
|
||||
|
||||
.towcontentitem {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
padding: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
background: linear-gradient(126deg, #FFFBF2 0%, #F2D093 100%);
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
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 {
|
||||
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;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.towcontentitemonetext {
|
||||
height: 76rpx;
|
||||
margin-left: 16rpx;
|
||||
|
||||
.towcontentitemonetextone {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.towcontentitemtow {
|
||||
margin-top: 84rpx;
|
||||
z-index: 10;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #422A07;
|
||||
}
|
||||
|
||||
.towcontentitevip {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 92rpx;
|
||||
height: 40rpx;
|
||||
font-size: 20rpx;
|
||||
background: #F4C380;
|
||||
border-radius: 0rpx 12rpx 0rpx 12rpx;
|
||||
text-align: center;
|
||||
line-height: 40rpx;
|
||||
color: #fff;
|
||||
font-family: Source Han Sans CN-Medium;
|
||||
font-weight: Medium;
|
||||
|
||||
}
|
||||
|
||||
.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 {
|
||||
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: #F1CB66;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
border: 2rpx solid #F1CB66;
|
||||
font-size: 28rpx;
|
||||
font-family: Roboto-Medium, Roboto;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.fivecontent {
|
||||
position: relative;
|
||||
bottom: 44rpx;
|
||||
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: #F1CB66;
|
||||
}
|
||||
|
||||
// 会员详情
|
||||
.memberdetailsStyle {
|
||||
margin-top: 32rpx;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
background-color: #fff;
|
||||
padding: 32rpx;
|
||||
height: 252rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
|
||||
>text {
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
>view {
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -1,71 +1,138 @@
|
||||
<template>
|
||||
<!-- 会员详情 -->
|
||||
<view class="content">
|
||||
<card :userInfo="userInfo"></card>
|
||||
<view class="memberdetailsStyle">
|
||||
<text>会员详情</text>
|
||||
<view @click="goUrl('member/billDetails')">
|
||||
<text>账单明细</text>
|
||||
<uni-icons type="right" style="color: #333;" size="20"></uni-icons>
|
||||
</view>
|
||||
<view @click="goUrlinfo('member/index')">
|
||||
<text>会员充值</text>
|
||||
<uni-icons type="right" style="color: #333;" size="20"></uni-icons>
|
||||
<!-- <card :userInfo="userInfo"></card> -->
|
||||
<view class="card_info">
|
||||
<image class="card_info_bg" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/member_bg.png" mode="aspectFill"></image>
|
||||
<view class="card_content">
|
||||
<view class="card_head">
|
||||
<view class="card_head_left">
|
||||
<image class="card_head_left_head" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/member_head.png" mode="aspectFill"></image>
|
||||
<text class="card_head_left_name">{{userInfo.shopName}}会员卡</text>
|
||||
<view class="card_head_left_icon_box" v-if="userInfo.isVip != 0">
|
||||
<image class="card_head_left_icon1" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/member_icon1.png" mode="aspectFill"></image>
|
||||
<text class="card_head_left_iconText">VL1</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card_head_right" @click="clickEvent" v-if="userInfo.isVip != 0">
|
||||
<image class="card_head_left_qrCode" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/member_qrCode.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card_cen">
|
||||
<view class="card_cen_left">{{ userInfo.isVip == 0 ? '尚未开通会员暂无法享受会员权益' : '欢迎加入本店会员~'}}</view>
|
||||
<view class="card_cen_right" v-if="userInfo.isVip != 0">查看特权</view>
|
||||
</view>
|
||||
<view class="card_bom" v-if="userInfo.isVip != 0">
|
||||
<view class="card_bom_item">
|
||||
<text>{{userInfo.amount || '0.00'}}</text><text>储值</text>
|
||||
</view>
|
||||
<view class="card_bom_item">
|
||||
<text>0</text><text>积分</text>
|
||||
</view>
|
||||
<view class="card_bom_item">
|
||||
<text>0</text><text>优惠券</text>
|
||||
</view>
|
||||
<view class="card_bom_item">
|
||||
<text>0</text><text>权益卡</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="card_bottom" :class="userInfo.isVip == 0 ? 'n' : ''">
|
||||
<view class="card_bottom_Box" v-if="userInfo.isVip != 0">
|
||||
<view class="card_bottom_left flex-start">
|
||||
<image class="card_bottom_head" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/member_head2.png" mode="aspectFill"></image>
|
||||
<view class="">
|
||||
<view class="card_bottom_title">感谢你 2 天陪伴</view>
|
||||
<view class="flex-start">
|
||||
<view class="card_bottom_text">您今天的幸运词:<text class="luckyWord">林波微步</text></view>
|
||||
<image class="card_bottom_icon" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/member_icon2.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<image class="card_bottom_right_img" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/member_img3.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="card_bottom_Box" v-else >
|
||||
<view class="card_bottom_equity">
|
||||
<view class="card_bottom_equity_title">专享2项权益</view>
|
||||
<view class="card_bottom_equity_list">
|
||||
<view class="card_bottom_equity_list_item">
|
||||
<image class="list_item_icon" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/member_icon01.png" mode="aspectFill"></image>
|
||||
<text class="list_item_text">会员专属活动</text>
|
||||
</view>
|
||||
<view class="card_bottom_equity_list_item">
|
||||
<image class="list_item_icon" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/member_icon02.png" mode="aspectFill"></image>
|
||||
<text class="list_item_text">福利商品</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<registermember :show="memberOpen" :shopId="shopId_id" :userInfo="userInfo" @getRegisterMember="getRegisterMember"></registermember>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import card from './components/card.vue'
|
||||
import registermember from './components/registermember.vue'
|
||||
export default {
|
||||
components: {
|
||||
card
|
||||
registermember
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
shopId_id: null,
|
||||
inputshow: 0,
|
||||
memberlist: {},
|
||||
listdata: [],
|
||||
memberOpen: false,
|
||||
amount: '',
|
||||
userInfo: {},
|
||||
|
||||
lucky: {
|
||||
list: ['鸿运当头',"财运亨通","时来运转","否极泰来","花逢时发"],
|
||||
index: 0,
|
||||
text: ""
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log(e)
|
||||
this.shopId_id = e.shopId_id
|
||||
},
|
||||
onShow() {
|
||||
this.paygetShopByMember(this.shopId_id)
|
||||
this.paygetShopByMember()
|
||||
},
|
||||
methods: {
|
||||
async paygetShopByMember(w) {
|
||||
/**
|
||||
* 获取会员卡信息
|
||||
*/
|
||||
async paygetShopByMember() {
|
||||
let res = await this.api.paygetShopByMember({
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
userId: uni.cache.get('userInfo').id,
|
||||
shopId: w
|
||||
shopId: this.shopId_id
|
||||
})
|
||||
this.userInfo = res.data.list[0]
|
||||
this.userInfo = res.data.list[0];
|
||||
if ( this.userInfo.isVip == 0 ) {
|
||||
this.memberOpen = true;
|
||||
return;
|
||||
}
|
||||
},
|
||||
clickinput(a, b) {
|
||||
console.log(a, b)
|
||||
this.inputshow = b
|
||||
this.amount = a.minNum
|
||||
/**
|
||||
* 注册会员卡
|
||||
* @param {Object} e
|
||||
*/
|
||||
getRegisterMember (e) {
|
||||
this.memberOpen = e;
|
||||
this.paygetShopByMember()
|
||||
},
|
||||
goUrl(url) {
|
||||
uni.pro.navigateTo(url, this.userInfo)
|
||||
},
|
||||
goUrlinfo(url) {
|
||||
uni.pro.navigateTo(url, {
|
||||
shopId: this.shopId_id,
|
||||
type: 'list'
|
||||
|
||||
clickEvent() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/pay_code/pay_code?shopInfo=' + JSON.stringify(this.userInfo)
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -77,7 +144,197 @@
|
||||
|
||||
.content {
|
||||
padding: 0 28rpx;
|
||||
|
||||
font-size: 12rpx;
|
||||
|
||||
.card_info{
|
||||
width: 630rpx;
|
||||
height: 304rpx;
|
||||
margin: auto;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
.card_info_bg{
|
||||
width: 630rpx;
|
||||
height: 304rpx;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
.card_content{
|
||||
position: relative;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
color: #fff;
|
||||
padding: 30rpx;
|
||||
.card_head{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.card_head_left{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.card_head_left_head{
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
.card_head_left_name{
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
.card_head_left_icon_box{
|
||||
width: 64.23rpx;
|
||||
height: 26.56rpx;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.card_head_left_icon1{
|
||||
width: 64.23rpx;
|
||||
height: 26.56rpx;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
.card_head_left_iconText{
|
||||
font-weight: bold;
|
||||
font-size: 18rpx;
|
||||
color: #FFFFFF;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.card_head_right{
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
border-radius: 50%;
|
||||
background: #000000;
|
||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0,0,0,0.16);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.card_head_left_qrCode{
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.card_cen{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-weight: 400;
|
||||
font-size: 20rpx;
|
||||
color: #FFFFFF;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.card_bom{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 60rpx;
|
||||
.card_bom_item{
|
||||
width: 25%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
font-weight: 400;
|
||||
text:nth-child(1){
|
||||
font-size: 30rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
text:nth-child(2){
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card_bottom{
|
||||
width: 100%;
|
||||
height: 280rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 24rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin-top: -120rpx;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
padding: 16rpx 42rpx;
|
||||
.card_bottom_Box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
.card_bottom_left{
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.card_bottom_head{
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
margin-right: 14rpx;
|
||||
}
|
||||
.card_bottom_title{
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.card_bottom_text{
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
.card_bottom_icon{
|
||||
width: 22.7rpx;
|
||||
height: 22.18rpx;
|
||||
}
|
||||
.card_bottom_right_img{
|
||||
width: 132rpx;
|
||||
height: 132rpx;
|
||||
}
|
||||
|
||||
|
||||
.card_bottom_equity{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.card_bottom_equity_title{
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.card_bottom_equity_list{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 32rpx;
|
||||
.card_bottom_equity_list_item{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-right: 56rpx;
|
||||
.list_item_icon{
|
||||
width: 52rpx;
|
||||
height: 46rpx;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
.list_item_text{
|
||||
font-weight: 500;
|
||||
font-size: 22rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.card_bottom.n{
|
||||
padding: 24rpx 42rpx;
|
||||
margin-top: -80rpx;
|
||||
}
|
||||
|
||||
.towcontentitem {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
|
||||
251
pages/member/setPassword.vue
Normal file
251
pages/member/setPassword.vue
Normal file
@@ -0,0 +1,251 @@
|
||||
<template>
|
||||
<view class="Box">
|
||||
<view class="box_box">
|
||||
<view class="box_item flex-between">
|
||||
<text class="top_box_one_text">当前账号</text>
|
||||
<input type="number" v-model="mobile" placeholder="请输入手机号" maxlength="11" disabled="disabled" />
|
||||
</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 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="请再次输入密码" maxlength="6"
|
||||
:password="!payPasswords" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="flex-colum">
|
||||
<view class="Box_bottom" @click="userInfosavePayPassword">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isPwd: uni.cache.get('userInfo').isPwd,
|
||||
mobile: uni.cache.get('userInfo').telephone.slice(0, 3)+'****'+uni.cache.get('userInfo').telephone.slice(7),
|
||||
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 loginwxuserInfo() {
|
||||
let res = await this.api.loginwxuserInfo({
|
||||
userId: uni.cache.get('userInfo').id
|
||||
})
|
||||
if (res.code == 0) {
|
||||
uni.cache.set('userInfo', res.data);
|
||||
}
|
||||
},
|
||||
async userInfosavePayPassword() {
|
||||
|
||||
if (this.form.mobile.length != 11 && this.isPwd == 0) {
|
||||
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,
|
||||
code: this.form.checkCode
|
||||
})
|
||||
|
||||
if (res.code == 0) {
|
||||
if (uni.cache.get('userInfo').isPwd != 0) {
|
||||
uni.showToast({
|
||||
title: '修改成功',
|
||||
icon: 'none'
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '设置成功',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
// 获取用户信息
|
||||
this.loginwxuserInfo()
|
||||
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 {
|
||||
border-bottom: 1rpx solid #E5E5E5;
|
||||
.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: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
|
||||
.top_box_one_texts {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #5082fd;
|
||||
|
||||
.yzm {
|
||||
padding: 8rpx 20rpx;
|
||||
background: #E5E5E5;
|
||||
border-radius: 24rpx;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
.box_item:nth-child(1){
|
||||
border-bottom: none;
|
||||
border-top: 1rpx solid #E5E5E5;
|
||||
input{
|
||||
border-bottom: 1rpx solid #E5E5E5;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.flex-colum {
|
||||
width: 100%;
|
||||
margin-top: 56rpx;
|
||||
|
||||
.Box_bottom {
|
||||
width: 100%;
|
||||
height: 96rpx;
|
||||
line-height: 96rpx;
|
||||
background: #999;
|
||||
border-radius: 48rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
68
pages/member/storedManage.vue
Normal file
68
pages/member/storedManage.vue
Normal file
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="list">
|
||||
<view class="list_item" @click="handleClick(item)" v-for="(item,index) in list" :key="index">
|
||||
<view>{{ item.name }}</view>
|
||||
<u-icon name="arrow-right" color="#575B66" size="28"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userInfo: null,
|
||||
list: [
|
||||
{name: "余额明细", url: "member/billDetails"},
|
||||
{name: "密码设置", url: "member/setPassword"},
|
||||
{name: "使用须知", url: "member/instructions"},
|
||||
]
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.userInfo = e
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 跳转
|
||||
*/
|
||||
handleClick ( item ) {
|
||||
uni.pro.navigateTo(item.url, this.userInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
page{
|
||||
|
||||
}
|
||||
.container{
|
||||
padding: 48rpx 20rpx;
|
||||
.list{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
border-radius: 24rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
.list_item{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-bottom: 2rpx solid #E5E5E5;;
|
||||
padding: 24rpx 0;
|
||||
view{
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
.list_item:last-child{
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -9,7 +9,7 @@
|
||||
</view>
|
||||
<!-- 顶部面板 -->
|
||||
<view class="top--panel">
|
||||
<navseat :opacity='opacity' :titleshow='true' @navigateBacknav='navigateBacknav'
|
||||
<navseat :opacity='opacity' :search="true" @searchVal="searchVal" :titleshow='true' @navigateBacknav='navigateBacknav'
|
||||
:navigateBacknavtitle='true'></navseat>
|
||||
<!-- 顶部面板,可添加所需要放在页面顶部的内容代码。比如banner图 -->
|
||||
<image class="panelimgbackground"
|
||||
@@ -55,34 +55,58 @@
|
||||
<view class="panelfiveitemfive">
|
||||
月售{{item.stockNumber}}
|
||||
</view>
|
||||
<view class="panelfiveitemsex flex-between">
|
||||
<view class="panelfiveitemsex_oen">
|
||||
<text>¥</text>
|
||||
<text>{{item.lowPrice}}</text>
|
||||
<text>/份</text>
|
||||
<text v-if="item.suit > 1">「{{item.suit}}份起点」</text>
|
||||
|
||||
|
||||
|
||||
|
||||
<view v-if="item.isPauseSale != 0 " class="flex-between" style="margin-top: 32rpx;margin-bottom: 48rpx;">
|
||||
<view class="panelfiveitemsex flex-between">
|
||||
<view class="panelfiveitemsex_oen"><text>¥</text><text>{{item.lowPrice}}</text><text>/份</text></view>
|
||||
</view>
|
||||
<!-- <u-icon name="plus-circle-fill" color="#E9AB7A" size="40"></u-icon> -->
|
||||
|
||||
</view>
|
||||
<view class="panelfiveitemNum">
|
||||
<view class="sku-wrap flex-center" v-if="item.productSkuResult != null"
|
||||
@click.stop="clickspecifications(item,index,index1)">
|
||||
<text class="t">选规格</text>
|
||||
<text class="dot num"
|
||||
v-if="item.cartNumber != '0'">{{item.cartNumber<99?item.cartNumber:'99+'}}</text>
|
||||
</view>
|
||||
<view class="Controls" v-else>
|
||||
<view v-if="item.cartNumber != '0'"
|
||||
@click.stop="cartadd(item,'-',item.productSkuResult == null ? '单规格':'',$event)">
|
||||
<u-icon name="minus-circle-fill" color="#E9AB7A" size="50"></u-icon>
|
||||
</view>
|
||||
<text class="num"> {{ item.cartNumber }} </text>
|
||||
<view @click.stop="cartadd(item,'+',item.productSkuResult == null ? '单规格':'')">
|
||||
<u-icon name="plus-circle-fill" color="#E9AB7A" size="50"></u-icon>
|
||||
|
||||
<view class="panelfiveitemNum" >
|
||||
<view class="sku-wrap flex-center" style="background-color: #CECECE;">
|
||||
<text class="t">已售罄</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="flex-between" style="margin-top: 32rpx;margin-bottom: 48rpx;">
|
||||
<view class="panelfiveitemsex flex-between">
|
||||
<view class="panelfiveitemsex_oen"><text>¥</text><text>{{item.lowPrice}}</text><text>/份</text></view>
|
||||
</view>
|
||||
<view v-if="item.suit > 1">
|
||||
<view class="panelfiveitemNum">
|
||||
<view class="sku-wrap flex-center" @click.stop="clickspecifications(item,index,index1)">
|
||||
<text class="t">{{item.suit}}份起点</text>
|
||||
<text class="dot num" v-if="item.cartNumber != '0'">{{item.cartNumber<99?item.cartNumber:'99+'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view v-else >
|
||||
<view class="panelfiveitemNum">
|
||||
<view class="sku-wrap flex-center" v-if="item.productSkuResult != null"
|
||||
@click.stop="clickspecifications(item,index,index1)">
|
||||
<text class="t">选规格</text>
|
||||
<text class="dot num"
|
||||
v-if="item.cartNumber != '0'">{{item.cartNumber<99?item.cartNumber:'99+'}}</text>
|
||||
</view>
|
||||
<view class="Controls" v-else>
|
||||
<view class="btn" v-if="item.cartNumber != '0'">
|
||||
<u-icon name="minus-circle-fill" color="#E9AB7A" size="50"></u-icon>
|
||||
<view class="btnClick" @click.stop="cartadd(item,'-',item.productSkuResult == null ? '单规格':'',$event)"></view>
|
||||
</view>
|
||||
<text class="num"> {{ item.cartNumber }} </text>
|
||||
<view class="btn">
|
||||
<u-icon name="plus-circle-fill" color="#E9AB7A" size="50"></u-icon>
|
||||
<view class="btnClick" @click.stop="cartadd(item,'+',item.productSkuResult == null ? '单规格':'')"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view v-if="item.isPauseSale != 0 " style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;background-color: rgba(255,255,255,0.5);"></view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -120,35 +144,59 @@
|
||||
<view v-if="item.name=='热销'" class="topSort" :class="'c'+(index1+1)">TOP{{index1+1}}
|
||||
</view>
|
||||
<view class="goods_right">
|
||||
<!-- <text class="suit" v-if="item1.suit > 1">「{{item1.suit}}份起点」</text> -->
|
||||
<view class="name">{{ item1.name }}</view>
|
||||
<view class="lookBack" v-if="item.name=='热销'">本店回头客第{{index1+1}}名</view>
|
||||
<view class="describe"> {{item1.shortTitle?item1.shortTitle:''}} </view>
|
||||
<view class="monthlySale">月售{{item1.stockNumber}}</view>
|
||||
<view class="money">¥<text class="money_num">{{ item1.lowPrice }}</text>/份<text
|
||||
class="suit" v-if="item1.suit > 1">「{{item1.suit}}份起点」</text></view>
|
||||
|
||||
<view class="flex-end" v-if="item1.productSkuResult != null">
|
||||
<view class="sku-wrap flex-center"
|
||||
@click.stop="clickspecifications(item1,index,index1)">
|
||||
<text class="t">选规格</text>
|
||||
<text class="dot num"
|
||||
v-if="item1.cartNumber != '0'">{{item1.cartNumber<99?item1.cartNumber:'99+'}}</text>
|
||||
|
||||
|
||||
<view v-if="item1.isPauseSale != 0 " class="flex-between">
|
||||
<view class="money">¥<text class="money_num">{{ item1.lowPrice }}</text>/份</view>
|
||||
<view class="flex-end" >
|
||||
<view class="sku-wrap flex-center" style="background-color: #CECECE;">
|
||||
<text class="t">已售罄</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="Controls" v-else>
|
||||
<view v-if="item1.cartNumber != '0'"
|
||||
@click.stop="cartadd(item1,'-',item1.productSkuResult == null ? '单规格':'',$event)">
|
||||
<u-icon name="minus-circle-fill" color="#E9AB7A" size="50"></u-icon>
|
||||
<view v-else class="flex-between">
|
||||
<view class="money">¥<text class="money_num">{{ item1.lowPrice }}</text>/份</view>
|
||||
<view v-if="item1.suit > 1">
|
||||
<view class="flex-end" >
|
||||
<view class="sku-wrap flex-center"
|
||||
@click.stop="clickspecifications(item1,index,index1)">
|
||||
<text class="t">{{item1.suit}}份起点</text>
|
||||
<text class="dot num"
|
||||
v-if="item1.cartNumber != '0'">{{item1.cartNumber<99?item1.cartNumber:'99+'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<text class="num"> {{ item1.cartNumber }} </text>
|
||||
<view
|
||||
@click.stop="cartadd(item1,'+',item1.productSkuResult == null ? '单规格':'')">
|
||||
<u-icon name="plus-circle-fill" color="#E9AB7A" size="50"></u-icon>
|
||||
<view v-else >
|
||||
<view class="flex-end" v-if="item1.productSkuResult != null">
|
||||
<view class="sku-wrap flex-center"
|
||||
@click.stop="clickspecifications(item1,index,index1)">
|
||||
<text class="t">选规格</text>
|
||||
<text class="dot num"
|
||||
v-if="item1.cartNumber != '0'">{{item1.cartNumber<99?item1.cartNumber:'99+'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="Controls" v-else>
|
||||
<view class="btn" v-if="item1.cartNumber != '0'">
|
||||
<u-icon name="minus-circle-fill" color="#E9AB7A" size="50"></u-icon>
|
||||
<view class="btnClick" @click.stop="cartadd(item1,'-',item1.productSkuResult == null ? '单规格':'',$event)"></view>
|
||||
</view>
|
||||
<text class="num"> {{ item1.cartNumber }} </text>
|
||||
<view class="btn">
|
||||
<u-icon name="plus-circle-fill" color="#E9AB7A" size="50"></u-icon>
|
||||
<view class="btnClick" @click.stop="cartadd(item1,'+',item1.productSkuResult == null ? '单规格':'')"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view v-if="item1.isPauseSale != 0 " style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;background-color: rgba(255,255,255,0.5);"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fill-last" :style="{ 'height':fillHeight + 'px' }"></view>
|
||||
@@ -205,12 +253,14 @@
|
||||
<text class="num">{{ item.salePrice }}</text>
|
||||
</view>
|
||||
<view class="operation-wrap">
|
||||
<view class="btn" v-if="item.number" @click="cartListadd(item,index,'-')">
|
||||
<view class="btn" v-if="item.number" >
|
||||
<u-icon name="minus-circle-fill" color="#E9AB7A" size="50"></u-icon>
|
||||
<view class="btnClick" @click="cartListadd(item,index,'-')"></view>
|
||||
</view>
|
||||
<text class="num" v-if="item.number">{{ item.number }}</text>
|
||||
<view class="btn" @click="cartListadd(item,index,'+')">
|
||||
<view class="btn">
|
||||
<u-icon name="plus-circle-fill" color="#E9AB7A" size="50"></u-icon>
|
||||
<view class="btnClick" @click="cartListadd(item,index,'+')"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -296,14 +346,14 @@
|
||||
</view>
|
||||
<view class="operation-wrap">
|
||||
|
||||
<view class="btn"
|
||||
@click="shopAdd(specifications,specifications.indexa,specifications.indexb,'-',specifications.tagSnap == null ? '单规格':'')">
|
||||
<view class="btn">
|
||||
<u-icon name="minus-circle-fill" color="#E9AB7A" size="50"></u-icon>
|
||||
<view class="btnClick" @click="shopAdd(specifications,specifications.indexa,specifications.indexb,'-',specifications.tagSnap == null ? '单规格':'')"></view>
|
||||
</view>
|
||||
<text class="num">{{amountcartNumber}}</text>
|
||||
<view class="btn"
|
||||
@click="shopAdd(specifications,specifications.indexa,specifications.indexb,'+',specifications.tagSnap == null ? '单规格':'')">
|
||||
<view class="btn" >
|
||||
<u-icon name="plus-circle-fill" color="#E9AB7A" size="50"></u-icon>
|
||||
<view class="btnClick" @click="shopAdd(specifications,specifications.indexa,specifications.indexb,'+',specifications.tagSnap == null ? '单规格':'')"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -513,6 +563,10 @@
|
||||
// e.currentTarget.src
|
||||
},
|
||||
|
||||
searchVal (e) {
|
||||
console.log(e)
|
||||
},
|
||||
|
||||
/**
|
||||
* 商品数量增加/减少
|
||||
* @param {Object} item
|
||||
@@ -614,7 +668,7 @@
|
||||
if (res.code == 0) {
|
||||
this.showShopsku = false;
|
||||
this.pagemetashow = false;
|
||||
this.$set(this, 'amountcartNumber', 0)
|
||||
// this.$set(this, 'amountcartNumber', 0)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -682,6 +736,9 @@
|
||||
* @param {Object} index1
|
||||
*/
|
||||
async clickspecifications(item1, index, index1, type) {
|
||||
if ( item1.isPauseSale != 0 ) {
|
||||
return;
|
||||
}
|
||||
this.skuidname = []
|
||||
this.specifications = item1
|
||||
this.specifications.indexa = index
|
||||
@@ -854,7 +911,15 @@
|
||||
this.showShopsku = true //打开弹框
|
||||
this.pagemetashow = true
|
||||
}
|
||||
this.$set(this, 'amountcartNumber', 0)
|
||||
this.$set(this, 'amountcartNumber', 0);
|
||||
if ( this.isSpec ) {
|
||||
if ( this.skuSuit > 1) {
|
||||
this.$set(this, 'amountcartNumber', 0);
|
||||
} else {
|
||||
this.$set(this, 'amountcartNumber', 1);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (e) {}
|
||||
},
|
||||
|
||||
@@ -1204,7 +1269,6 @@
|
||||
}
|
||||
|
||||
.panelfiveitemsex {
|
||||
margin-top: 32rpx;
|
||||
|
||||
.panelfiveitemsex_oen {
|
||||
text:nth-child(1) {
|
||||
@@ -1241,7 +1305,6 @@
|
||||
// position: absolute;
|
||||
// bottom: 82rpx;
|
||||
// right: 0;
|
||||
padding-bottom: 48rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
@@ -1282,6 +1345,18 @@
|
||||
.num {
|
||||
margin: 8rpx 8rpx 0 8rpx;
|
||||
}
|
||||
.btn{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
.btnClick{
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
position: absolute;
|
||||
// bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1471,7 +1546,18 @@
|
||||
padding: 0 16upx;
|
||||
}
|
||||
|
||||
|
||||
.btn{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
.btnClick{
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
position: absolute;
|
||||
// bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.addShopping {
|
||||
@@ -1562,16 +1648,20 @@
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 160rpx;
|
||||
height: 64rpx;
|
||||
background: #E7AE7B;
|
||||
border-radius: 36rpx 36rpx 36rpx 36rpx;
|
||||
border: 2rpx solid #E8AD7B;
|
||||
height: 100%;
|
||||
width: 40%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
justify-content: flex-end;
|
||||
|
||||
.t {
|
||||
width: 160rpx;
|
||||
height: 64rpx;
|
||||
line-height: 64rpx;
|
||||
text-align: center;
|
||||
background: #E7AE7B;
|
||||
border-radius: 36rpx 36rpx 36rpx 36rpx;
|
||||
border: 2rpx solid #E8AD7B;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
@@ -1728,8 +1818,19 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
|
||||
position: relative;
|
||||
.btnClick{
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
position: absolute;
|
||||
// bottom: 0;
|
||||
}
|
||||
.btnClick.l{
|
||||
right: 0;
|
||||
}
|
||||
.btnClick.r{
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2016,7 +2117,20 @@
|
||||
// bottom: 10rpx;
|
||||
// right: 20rpx;
|
||||
.num {
|
||||
margin: auto 8rpx;
|
||||
|
||||
margin: auto 16rpx;
|
||||
}
|
||||
.btn{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
.btnClick{
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
position: absolute;
|
||||
// bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
353
pages/user/coupon - 副本.vue
Normal file
353
pages/user/coupon - 副本.vue
Normal file
@@ -0,0 +1,353 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="towcontent">
|
||||
<view class="towcontentlistxitem flex-start">
|
||||
<view class="towcontentlistxitembox flex-colum"
|
||||
:class="towcontentclickindex == index?'towcontentlistxitemboxopacity':''"
|
||||
v-for="(item,index) in listbox" :key="index" @click="towcontentclick(index,item)">
|
||||
<text>{{item.name}}</text>
|
||||
<image v-if="towcontentclickindex == index"
|
||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/today/dg.png" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="containertop">
|
||||
<view class="containertopbox">
|
||||
<view class="containertopboxitem flex-start" v-for="(item,index) in list" :key="index">
|
||||
<view class="containertopboxitemleft flex-colum"
|
||||
:class="item.status == 0?'':'containertopboxitemlefts'">
|
||||
<view class="containertopboxitemleft_one"
|
||||
:class="item.status == 0?'':'containertopboxitemleft_ones'">
|
||||
<text style="font-size: 28rpx;">¥</text>
|
||||
<text>{{item.couponsAmount || 0}}</text>
|
||||
</view>
|
||||
<view class="containertopboxitemleft_tow"
|
||||
:class="item.status == 0?'':'containertopboxitemleft_tows'">
|
||||
优惠券(元)
|
||||
</view>
|
||||
</view>
|
||||
<view class="containertopboxitemright">
|
||||
<view class="containertopboxitemright_one">
|
||||
无门槛使用
|
||||
</view>
|
||||
<view class="containertopboxitemright_tow">
|
||||
通用红包券
|
||||
</view>
|
||||
<view class="containertopboxitemright_there">
|
||||
有效期至:{{$u.timeFormat(item.endTime, 'yyyy/mm/dd') || '0'}}
|
||||
</view>
|
||||
<view
|
||||
:class="item.status == 0?'containertopboxitemright_four':'containertopboxitemright_fours'">
|
||||
{{item.status == 0 ? '兑换积分':'已过期'}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<image style="margin:32rpx auto;" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png"
|
||||
v-if="is_end" mode="aspectFill"></image>
|
||||
<u-loadmore :status="form.status" iconSize='24' fontSize='24' height='40' />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
listbox: [{
|
||||
name: '全部',
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: '未使用',
|
||||
type: '0'
|
||||
},
|
||||
{
|
||||
name: '已过期',
|
||||
type: '1'
|
||||
}
|
||||
],
|
||||
towcontentclickindex: 0,
|
||||
list: [],
|
||||
is_end:false,
|
||||
form: {
|
||||
page: 1, //页数
|
||||
size: 10, //页容量
|
||||
status: 'loadmore',
|
||||
statuses: ''
|
||||
},
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.ordermineCouponsthis()
|
||||
},
|
||||
onReachBottom() {
|
||||
this.ordermineCouponsthis()
|
||||
},
|
||||
methods: {
|
||||
init_fn(e) {
|
||||
this.list = []
|
||||
this.form = {
|
||||
page: 1, //页数
|
||||
size: 10, //页容量
|
||||
status: 'loadmore',
|
||||
statuses: ''
|
||||
}
|
||||
try {
|
||||
if (e) {
|
||||
this.form.statuses = e
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
this.ordermineCouponsthis()
|
||||
},
|
||||
async ordermineCouponsthis() {
|
||||
try {
|
||||
let res = await this.api.ordermineCoupons({
|
||||
userId: uni.cache.get('userInfo').id,
|
||||
status: this.form.statuses,
|
||||
page: this.form.page,
|
||||
size: this.form.size,
|
||||
orderId:""
|
||||
})
|
||||
if (res.data.pages < this.form.page) {
|
||||
this.form.status = 'nomore'
|
||||
if (this.form.page == 1 && res.data.list == 0) {
|
||||
this.is_end = true
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
this.form.page = ++this.form.page;
|
||||
setTimeout(() => {
|
||||
this.list = [...this.list, ...res.data.list];
|
||||
this.form.status = 'loading';
|
||||
if (res.data.pageNum == res.data.pages) {
|
||||
this.form.status = 'nomore';
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
},
|
||||
towcontentclick(index, item) {
|
||||
this.towcontentclickindex = index
|
||||
this.form.statuses = item.type
|
||||
this.init_fn(item.type)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.container {
|
||||
.towcontent {
|
||||
padding: 0 28rpx;
|
||||
border-top: 16rpx solid #F9F9F9;
|
||||
|
||||
.towcontentlistxitem {
|
||||
width: 100%;
|
||||
margin-top: 32rpx;
|
||||
|
||||
.towcontentlistxitembox {
|
||||
width: 33%;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
|
||||
image {
|
||||
margin-top: 6rpx;
|
||||
width: 38.83rpx;
|
||||
height: 8.62rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentlistxitemboxopacity {
|
||||
width: 33%;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
|
||||
image {
|
||||
width: 38.83rpx;
|
||||
height: 8.62rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.containertop {
|
||||
padding: 40rpx 32rpx;
|
||||
|
||||
.containertopbox {
|
||||
.containertopboxitem::after {
|
||||
position: absolute;
|
||||
bottom: 14rpx;
|
||||
left: 14rpx;
|
||||
content: '';
|
||||
display: inline-block;
|
||||
background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/coupontop.png) no-repeat;
|
||||
width: 72.83rpx;
|
||||
height: 77.14rpx;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.containertopboxitem {
|
||||
margin-top: 20rpx;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
|
||||
.containertopboxitemleft {
|
||||
position: relative;
|
||||
width: 182rpx;
|
||||
height: 192rpx;
|
||||
background: #F1CB66;
|
||||
border-radius: 18rpx 0rpx 0rpx 18rpx;
|
||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
||||
|
||||
::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
left: 166rpx;
|
||||
background: #f9f9f9;
|
||||
display: inline-block;
|
||||
width: 32rpx;
|
||||
height: 16rpx;
|
||||
border-radius: 0 0 32rpx 32rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0rpx;
|
||||
left: 166rpx;
|
||||
background: #f9f9f9;
|
||||
display: inline-block;
|
||||
width: 32rpx;
|
||||
height: 16rpx;
|
||||
line-height: 32rpx;
|
||||
border-radius: 32rpx 32rpx 0 0;
|
||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(255, 255, 255, 0.16);
|
||||
z-index: 999;
|
||||
|
||||
}
|
||||
|
||||
.containertopboxitemleft_one {
|
||||
text {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 60rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.containertopboxitemleft_ones {
|
||||
text {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.containertopboxitemleft_tow {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.containertopboxitemleft_tows {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.containertopboxitemlefts {
|
||||
background: #F7F7F7;
|
||||
}
|
||||
|
||||
.containertopboxitemright {
|
||||
position: relative;
|
||||
padding: 0 32rpx;
|
||||
flex: auto;
|
||||
height: 192rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
||||
border-radius: 0rpx 18rpx 18rpx 0rpx;
|
||||
|
||||
.containertopboxitemright_one {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
padding: 12rpx 0;
|
||||
border-bottom: 1rpx dotted #707070;
|
||||
}
|
||||
|
||||
.containertopboxitemright_tow {
|
||||
margin-top: 14rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.containertopboxitemright_there {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.containertopboxitemright_four {
|
||||
position: absolute;
|
||||
right: 32rpx;
|
||||
top: 50%;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
padding: 0 14rpx;
|
||||
height: 48rpx;
|
||||
line-height: 48rpx;
|
||||
text-align: center;
|
||||
background: #FE665E;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
}
|
||||
|
||||
.containertopboxitemright_fours {
|
||||
position: absolute;
|
||||
right: 32rpx;
|
||||
top: 50%;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
padding: 0 14rpx;
|
||||
height: 48rpx;
|
||||
line-height: 48rpx;
|
||||
text-align: center;
|
||||
background: #F7F7F7;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -5,7 +5,7 @@
|
||||
<view class="towcontentlistxitembox flex-colum"
|
||||
:class="towcontentclickindex == index?'towcontentlistxitemboxopacity':''"
|
||||
v-for="(item,index) in listbox" :key="index" @click="towcontentclick(index,item)">
|
||||
<text>{{item.name}}</text>
|
||||
<text class="title">{{item.name}}</text>
|
||||
<image v-if="towcontentclickindex == index"
|
||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/today/dg.png" mode="widthFix">
|
||||
</image>
|
||||
@@ -144,7 +144,7 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
@@ -152,8 +152,7 @@
|
||||
.container {
|
||||
.towcontent {
|
||||
padding: 0 28rpx;
|
||||
border-top: 16rpx solid #F9F9F9;
|
||||
|
||||
border-top: 16rpx solid #f7f7f7;
|
||||
.towcontentlistxitem {
|
||||
width: 100%;
|
||||
margin-top: 32rpx;
|
||||
@@ -176,9 +175,9 @@
|
||||
width: 33%;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
|
||||
text{
|
||||
color: #E3AD7F;
|
||||
}
|
||||
image {
|
||||
width: 38.83rpx;
|
||||
height: 8.62rpx;
|
||||
@@ -191,7 +190,6 @@
|
||||
|
||||
.containertop {
|
||||
padding: 40rpx 32rpx;
|
||||
|
||||
.containertopbox {
|
||||
.containertopboxitem::after {
|
||||
position: absolute;
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<view class="list_item">
|
||||
<view class="list_item_left">生日</view>
|
||||
<view class="list_item_right flex-center">
|
||||
<view class="place r" @click="calendarShow = true">生日一旦填写不能修改</view>
|
||||
<view class="place r" @click="calendarShow = (birthDay ? false : true)"> {{ birthDay || '生日一旦填写不能修改'}}</view>
|
||||
<!-- <u-calendar @close="calendarShow = false" monthNum="99" minDate="1945-01-01" maxDate="2055-12-12" :show="calendarShow" mode="single" @confirm="confirmCalendar"></u-calendar> -->
|
||||
<!-- <u-picker :show="calendarShow" ref="uPicker" :columns="columns" @confirm="confirm" @change="changeHandler"></u-picker> -->
|
||||
<!-- <picker :show="calendarShow" mode="date"></picker> -->
|
||||
@@ -95,7 +95,7 @@
|
||||
label: '男'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
value: 0,
|
||||
label: '女'
|
||||
},]
|
||||
],
|
||||
@@ -103,6 +103,7 @@
|
||||
userInfo: uni.cache.get('userInfo'),
|
||||
userHeadImg: "",
|
||||
nickName: '',
|
||||
birthDay: "",
|
||||
phonetitle: ""
|
||||
};
|
||||
},
|
||||
@@ -114,6 +115,10 @@
|
||||
this.userHeadImg = this.userInfo.headImg;
|
||||
this.nickName = this.userInfo.nickName;
|
||||
this.sex = this.userInfo.sex;
|
||||
if ( this.userInfo.sex != null ) {
|
||||
this.sexText = this.userInfo.sex == 1 ? '男' : '女';
|
||||
}
|
||||
this.birthDay = this.userInfo.birthDay;
|
||||
this.phonetitle = this.userInfo.telephone ? (this.userInfo.telephone.substr(0, 3) + "****" + this.userInfo.telephone.substr(7)) : ""
|
||||
this.date = this.getDate({ format: true})
|
||||
},
|
||||
@@ -125,8 +130,8 @@
|
||||
* @param {Object} e
|
||||
*/
|
||||
confirmTime(e) {
|
||||
console.log(e);
|
||||
console.log(this.getDate(e.value))
|
||||
this.calendarShow = false;
|
||||
this.birthDay = this.getDate(e.value);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -158,6 +163,9 @@
|
||||
* @param {Object} d
|
||||
*/
|
||||
async getPhone(d) {
|
||||
if ( this.phonetitle ) {
|
||||
return;
|
||||
}
|
||||
if (d.detail.iv) {
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
@@ -202,12 +210,7 @@
|
||||
* @param {Object} e
|
||||
*/
|
||||
uploadImg(e) {
|
||||
console.log(e)
|
||||
const {
|
||||
avatarUrl
|
||||
} = e.detail
|
||||
console.log(e)
|
||||
console.log(e.detail)
|
||||
const { avatarUrl } = e.detail
|
||||
// this.userHeadImg = avatarUrl
|
||||
uni.uploadFile({
|
||||
url: 'https://wxcashiertest.sxczgkj.cn/cashierService/common/upload',
|
||||
@@ -239,6 +242,7 @@
|
||||
headImg: this.userHeadImg,
|
||||
nickName: this.nickName,
|
||||
sex: this.sex,
|
||||
birthDay: this.birthDay,
|
||||
telephone: this.phonetitle == '请授权手机号' ? '' : this.phonetitle
|
||||
})
|
||||
if (res.code == 0) {
|
||||
|
||||
@@ -57,9 +57,9 @@
|
||||
teblist: [],
|
||||
myAssetsList: [
|
||||
{ name: "储值", type: "recharge", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/storedValue.png"},
|
||||
{ name: "积分", type: "my_coupon", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/points.png"},
|
||||
{ name: "积分", type: "", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/points.png"},
|
||||
{ name: "优惠券", type: "my_coupon", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/coupon.png"},
|
||||
{ name: "权益卡", type: "my_coupon", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/equityCard.png"}
|
||||
{ name: "权益卡", type: "", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/equityCard.png"}
|
||||
],
|
||||
myFunList: [
|
||||
{ name: "我的优惠券", type: "my_coupon", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_coupon.png"},
|
||||
|
||||
Reference in New Issue
Block a user