hwq 1 рік тому
батько
коміт
cd633d902e

+ 45 - 0
api/sign.js

@@ -24,4 +24,49 @@ export function signUser(data) {
 		method: 'post',
 		data
 	});
+}
+
+// 抽奖详情
+export function getgacha(data) {
+	return request({
+		url: '/api/gacha',
+		method: 'get',
+		data
+	});
+}
+
+// 抽奖结果
+export function gacha(data) {
+	return request({
+		url: '/api/gacha',
+		method: 'post',
+		data
+	});
+}
+
+// 抽奖记录
+export function gachalog(data) {
+	return request({
+		url: '/api/gacha/log',
+		method: 'get',
+		data
+	});
+}
+
+// 兑换积分
+export function dhjp(data, id) {
+	return request({
+		url: '/api/gacha/get/' + id,
+		method: 'post',
+		data
+	});
+}
+
+// 核销奖品
+export function writer(data) {
+	return request({
+		url: '/api/admin/gacha/writer',
+		method: 'post',
+		data
+	});
 }

+ 312 - 0
components/its-calendar/its-calendar.vue

@@ -0,0 +1,312 @@
+<template>
+	<view>
+		<view class="calendar">
+			<scroll-view scroll-x="true" class="top-wrap">
+				<view class="time-wrap" v-for="(dayitem,dayindex) in dayArr" :key="dayindex"
+					:class="{'action':day_index ==dayindex }" @click.stop="dayList(dayitem,dayindex)">
+					<view class="time-xq">{{dayitem.weeks}}</view>
+					<view class="time-val">{{dayitem.days}}</view>
+				</view>
+			</scroll-view>
+			<view scroll-y class="calendar_time">
+				<view class="time_x" :class="host_index == item.timeStamp ? 'time_x_sty' : ''"
+					v-for="(item, index) in hostArr[day_index]" :key="index"
+					@click="nowTimes < item.timeStamp ? hosts(item) : ''"
+					:style="{'color': (nowTimes > item.timeStamp ? '#999999' : '')}">{{item.hours}}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			sta_num: {
+				type: Number | String,
+				default: 8
+			},
+			end_num: {
+				type: Number | String,
+				default: 23
+			},
+			int_num: {
+				type: Number | String,
+				default: 30
+			},
+		},
+		watch: {
+			sta_num(xin, low) {
+				console.log('改变了')
+				this.sxym()
+			}
+		},
+		data() {
+			return {
+				dayArr: [],
+				hostArr: [],
+				day_index: 0,
+				host_index: '',
+				host_All: [],
+				nowTimes: '',
+			}
+		},
+		mounted() {
+			this.sxym()
+		},
+		methods: {
+			sxym() {
+				console.log('执行获取', this.sta_num, this.end_num)
+				try {
+					let dateArr = [];
+					let today = new Date();
+					let nowTime = today.getTime() // 当前时间戳
+					this.nowTimes = parseInt(nowTime / 1000)
+					for (let i = 0; i < 6; i++) {
+						let newDate = new Date(today.getTime() + i * 1000 * 60 * 60 * 24);
+						let month = (parseInt(newDate.getMonth()) + 1) > 9 ? (parseInt(newDate.getMonth()) + 1) : "0" + (
+							parseInt(
+								newDate.getMonth()) + 1); // 当前月份
+						let day = (newDate.getDate()) > 9 ? newDate.getDate() : "0" + newDate.getDate(); //当前日期
+						let backTime = newDate.getTime(); // 几天后时间戳
+						let backDays = newDate.getDay(); // 几天后周几
+						let remTime = (backTime - nowTime) / 1000; // 距离今天几天
+						let week = '';
+						// if (remTime == 0) {
+						// 	week = "今天"
+						// } else if (remTime == 86400) {
+						// 	week = "明天"
+						// } else if (remTime == 172800) {
+						// 	week = "后天"
+						// } else {
+						if (backDays == 0) {
+							week = "周日";
+						} else if (backDays == 1) {
+							week = "周一";
+						} else if (backDays == 2) {
+							week = "周二";
+						} else if (backDays == 3) {
+							week = "周三";
+						} else if (backDays == 4) {
+							week = "周四";
+						} else if (backDays == 5) {
+							week = "周五";
+						} else if (backDays == 6) {
+							week = "周六";
+						}
+						// }
+						// let fullDate = `${month}-${day}`;
+						let fullDate = `${day}`;
+						let ass = {
+							weeks: week,
+							days: fullDate
+						};
+						dateArr.push(ass);
+					}
+					this.dayArr = dateArr;
+
+					let timeArr = [];
+					for (let i = 0; i < 6; i++) {
+						// let as = new Date(new Date().toLocaleDateString()).getTime() / 1000
+						let as = new Date(new Date().toLocaleDateString()).getTime() / 1000 + i * 60 * 60 * 24;
+						let staTime = this.sta_num * 60 * 60 + as;
+						let endTime = this.end_num * 60 * 60 + as;
+						let int = this.int_num * 60;
+						let timeArr_s = [];
+						for (staTime; staTime < endTime - int; staTime + int) {
+							staTime = staTime + int;
+							let hours = this.times(staTime);
+							let asb = {
+								hours,
+								timeStamp: staTime
+							};
+							timeArr_s.push(asb);
+						}
+						timeArr.push(timeArr_s);
+					}
+					this.hostArr = timeArr;
+					console.log(this.hostArr, 'hostArr')
+				} catch (e) {
+					//TODO handle the exception
+					console.log(e)
+				}
+
+			},
+			// 点击日期
+			dayList(e, index) {
+				this.day_index = index;
+			},
+			// 点击时间
+			hosts(e) {
+				this.host_All = e;
+				this.host_index = e.timeStamp;
+				this.sub()
+			},
+			// 点击立即预约
+			sub() {
+				if (this.host_index == '') {
+					this.$tool.toast('请选择时间');
+				} else {
+					let day = this.dayArr[this.day_index];
+					let time = this.time(this.host_index);
+					let comTime = {
+						days: day.days,
+						weeks: day.weeks,
+						hours: this.host_All.hours,
+						timeStamp: this.host_All.timeStamp,
+						time: time
+					};
+					this.$emit('getTime', comTime);
+				}
+			},
+			// 格式化时间
+			times(data) {
+				let date = new Date(data * 1000);
+				//时间戳为10位需*1000,时间戳为13位的话不需乘1000
+				let h = date.getHours();
+				h = h < 10 ? ('0' + h) : h; //小时补0
+				let m = date.getMinutes();
+				m = m < 10 ? ('0' + m) : m; //分钟补0
+				return h + ':' + m;
+			},
+			time(data, type) {
+				let date = new Date(data * 1000);
+				//时间戳为10位需*1000,时间戳为13位的话不需乘1000
+				let y = date.getFullYear();
+				let MM = date.getMonth() + 1;
+				MM = MM < 10 ? ('0' + MM) : MM; //月补0
+				let d = date.getDate();
+				d = d < 10 ? ('0' + d) : d; //天补0
+				let h = date.getHours();
+				h = h < 10 ? ('0' + h) : h; //小时补0
+				let m = date.getMinutes();
+				m = m < 10 ? ('0' + m) : m; //分钟补0
+				let s = date.getSeconds();
+				s = s < 10 ? ('0' + s) : s; //秒补0
+				if (type == 'yymmdd') {
+					return y + '-' + MM + '-' + d;
+				} else if (type == 'hhmmss') {
+					return h + ':' + m + ':' + s;
+				} else {
+					return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background-color: #F4F4F4;
+	}
+
+	.calendar {
+		width: 710rpx;
+		height: 590rpx;
+		background-color: #FFFFFF;
+		margin: 20rpx auto 10rpx;
+		border-radius: 8rpx;
+	}
+
+	.calendar_day {
+		display: flex;
+		width: 100%;
+		height: 120rpx;
+
+		.day_x {
+			display: flex;
+			// flex-flow: column nowrap;
+			flex-flow: nowrap;
+			justify-content: center;
+			align-items: center;
+			width: 20%;
+			height: 100%;
+			font-size: 30rpx;
+			color: #333333;
+		}
+	}
+
+	.calendar_time {
+		display: flex;
+		width: 88%;
+		height: 448rpx;
+		flex-flow: row wrap;
+		align-content: flex-start;
+		margin: 20rpx auto;
+		overflow-y: auto;
+
+		.time_x {
+			display: flex;
+			flex-flow: row;
+			justify-content: center;
+			align-items: center;
+			width: 138rpx;
+			height: 119rpx;
+			border-radius: 20rpx;
+			border: 1px solid #D1D1D1;
+			margin: 10rpx;
+			font-size: 30rpx;
+			color: #333333;
+		}
+
+		.time_x_sty {
+			background-color: #52c696;
+			border: none;
+			color: #fff !important;
+		}
+	}
+
+	.sub {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		width: 710rpx;
+		height: 100rpx;
+		border-radius: 50rpx;
+		margin: 30rpx auto;
+		color: #FFFFFF;
+		font-size: 36rpx;
+		// background-color: #FE3B3C;
+	}
+
+	.top-wrap {
+
+		white-space: nowrap;
+		width: 700rpx;
+		// height: 100rpx;
+		padding: 20rpx 0;
+
+		.time-wrap {
+			margin: auto 50rpx;
+			display: inline-block;
+			text-align: center;
+			padding-bottom: 10rpx;
+
+			.time-xq {
+				font-size: 20rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+			}
+
+			.time-val {
+				margin-top: 16rpx;
+				font-size: 27rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
+		}
+
+		.action {
+			border-bottom: 2px solid #52C696;
+
+			.time-xq {
+				color: #52C696;
+			}
+
+			.time-val {
+				color: #52C696;
+			}
+		}
+	}
+</style>

BIN
components/ljs-turntable/images/ico_close.png


+ 0 - 182
components/ljs-turntable/index.js

@@ -1,182 +0,0 @@
-const powerMax = 200; // 最大力量值
-const powerMin = Math.floor(powerMax/2) + 1; // 最小力量值
-const decline = powerMax/10000; // 衰退
-export default {
-	data() {
-		return {
-			truntableData: [], // 转盘数据
-			color: ["#014EB5","#A800FF","#e82edb","#B5454C","#443bff","#e8a425","#ff7aab","#e84b1e","#552ce2","#e8861e","#d441ff","#9c7aff","#014EB5","#A800FF","#e82edb","#B5454C","#443bff","#e8a425","#ff7aab","#e84b1e","#552ce2","#e8861e","#d441ff","#9c7aff","#014EB5","#A800FF","#e82edb","#B5454C","#443bff","#e8a425","#ff7aab","#e84b1e","#552ce2","#e8861e","#d441ff","#9c7aff","#014EB5","#A800FF","#e82edb","#B5454C","#443bff","#e8a425","#ff7aab","#e84b1e","#552ce2","#e8861e","#d441ff","#9c7aff","#014EB5","#A800FF","#e82edb","#B5454C","#443bff","#e8a425","#ff7aab","#e84b1e","#552ce2","#e8861e","#d441ff","#9c7aff","#014EB5","#A800FF","#e82edb","#B5454C","#443bff","#e8a425","#ff7aab","#e84b1e","#552ce2","#e8861e","#d441ff","#9c7aff"],
-			timerRun: false, // 工具是否已开始
-			transform: null, 
-			allPower: [], // 力量集合
-		}
-	},
-	props: {
-		list: Array, // 转盘基础数据。基础数据参照‘list参数’
-		show: Boolean, // 显示组件:默认不显示
-		// 每次转完是否默认回起始位置
-		startPosition: {
-			type: Boolean,
-			default: true
-		},
-		// 是否启用概率算法,默认按照扇形面积占比的大小出奖。开启概率算法,需要同时设置startPosition为true,否则会出现异常。
-		probabilityTag: {
-			type: Boolean,
-			default: false
-		},
-	},
-	mounted() {
-		this.init();
-	},
-	methods: {
-		// 隐藏组件
-		close(){
-			if(this.timerRun){
-				uni.showToast({
-					title: '请耐心等待',
-					duration: 1500,
-					icon: "none"
-				});
-				return
-			}
-			this.$emit("turntableState", false);
-		},
-		// 点击开始按钮
-		go(){
-			if(this.timerRun){
-				uni.showToast({
-					title: '请耐心等待',
-					duration: 1500,
-					icon: "none"
-				});
-				return
-			}
-			this.timerRun = true;
-			let power = 0;
-			if (this.probabilityTag) {
-				power = this.allPower[Math.floor((Math.random()*this.allPower.length))]; //随机获取一个力量值 - 有概率
-			} else {
-				power = this.rand(powerMin, powerMax); //随机获取一个力量值 - 无概率
-			}
-			let jiaodu = 0; // 旋转的角度
-			let timer = setInterval(()=>{
-				if(Number(power.toFixed(4)) <= 0){
-					clearInterval(timer);
-					this.getData(jiaodu%360);
-				}
-				jiaodu += power;
-				// #ifdef H5
-				document.getElementById("rotateBoard").style.transform = 'rotate('+ jiaodu +'deg)';
-				// #endif
-				// #ifdef MP-WEIXIN || APP-PLUS
-				this.transform = 'rotate('+ jiaodu +'deg)'
-				// #endif
-				
-				power = (power - power*decline) < decline?0:power - power*decline;
-				// console.log(power)
-			}, 10)
-		},
-		// 获取[m, n]的随机数
-		rand(m, n)  {
-		    return Math.ceil(Math.random() * (n-m+1) + m-1)
-		},
-		// 按照概率获取力量的中奖数据集合
-		getPowerResult() {
-			const allPower = [];
-			for(let i = powerMin; i <= powerMax; i++){
-				allPower.push(i);
-			}
-			this.allPower = this.getModeResult(allPower);
-		},
-		// 获取模拟结果
-		getModeResult(allPower){
-			const powerPrizes = [];
-			const tempJs = powerMax - powerMin + 1;
-			allPower.forEach((item) => {
-				let power = item; //随机获取一个力量值
-				let jiaodu = 0; // 旋转的角度
-				while (Number(power.toFixed(4)) > 0) {
-					jiaodu += power;				
-					power = (power - power*decline) < decline?0:power - power*decline;
-				}
-				const deg = 360 - jiaodu%360;
-				let prize = null;
-				let nums = this.list.length;
-				for(let i = 0; i < nums; i++){
-					if(this.list[i].start <= deg && deg < this.list[i].start + this.list[i].prop*10){
-						if (this.list[i].result.length/tempJs < this.list[i].probability) {
-							this.list[i].result.push(item);
-							powerPrizes.push(item);
-						}
-						break;
-					}
-				}
-			});
-			// 不够的进行补入
-			let nums = this.list.length;
-			for(let i = 0; i < nums; i++){
-				if (this.list[i].result.length/tempJs < this.list[i].probability) {
-					const n = Number((Number((this.list[i].probability - this.list[i].result.length/tempJs).toFixed(2)) * tempJs).toFixed(0));
-					for(let j = 0; j < n; j++){
-						this.list[i].result.push(this.list[i].result[0]);
-						powerPrizes.push(this.list[i].result[0]);
-					}
-				}
-			}
-			return powerPrizes;
-		},
-		// 通过旋转得角度,获取当前指向得奖品
-		getData(deg){
-			deg = 360 - deg;
-			let prize = null;
-			let nums = this.list.length;
-			for(let i = 0; i < nums; i++){
-				if(this.list[i].start <= deg && deg < this.list[i].start + this.list[i].prop*10){
-					prize = this.list[i];
-					
-					this.$emit("getPrize", prize.state, prize.id, prize.name)
-					this.timerRun = false;
-					if (this.startPosition) {
-						this.initJiaodu();
-					}
-					// this.BASE.msg(prize.name, 2000);
-					break;
-				}
-			}
-		},
-		// 重置角度
-		initJiaodu(){
-			const jiaodu = 0;
-			setTimeout(() => {
-				// #ifdef H5
-				document.getElementById("rotateBoard").style.transform = 'rotate('+ jiaodu +'deg)';
-				// #endif
-				// #ifdef MP-WEIXIN || APP-PLUS
-				this.transform = 'rotate('+ jiaodu +'deg)'
-				// #endif
-			}, 10);
-		},
-		init(){
-			let tempStart = 0;
-			let tempScale = 0;
-			this.list.forEach((item, i)=>{
-				item["result"] = []; // 中奖的力量集合
-				item["scale"] = item.prop*10 - 90; // 所占弧度的度数
-				item["scaleText"] = tempScale + (90 + (item.prop*10 - 90))/2; // 文字的回旋角度
-				item["sin"] = Math.sin(Math.PI*2*item.scaleText/360)*160; // 正弦
-				item["cos"] = Math.cos(Math.PI*2*item.scaleText/360)*160; // 余弦
-				tempScale = tempScale + 90 + (item.prop*10 - 90);
-				if(i !== 0){
-					tempStart = tempStart + this.list[i - 1].prop*10;
-				}
-				item["start"] = tempStart;
-			});
-			this.truntableData = this.list;
-			
-			// 按照概率获取力量的中奖数据集合
-			if (this.probabilityTag) {
-				this.getPowerResult();
-			}
-		},
-	}
-}

+ 0 - 35
components/ljs-turntable/ljs-turntable.vue

@@ -1,35 +0,0 @@
-<template>
-	<view class="ljs-turntable" v-if="show">
-		<!-- <view class="close" @click="close">
-			<image class="ico" :src="require('./images/ico_close.png')"></image>
-		</view> -->
-		<view class="box">
-		</view>
-		<view class="box2">
-		</view>
-		<view class="but" @click="go">
-			<image class="pic" src="../../static/user/prizebtn.png">
-			</image>
-		</view>
-		<view class="rotateBoard" id="rotateBoard" ref="rotateBoard"
-			:style="transform !== null?'transform:'+ transform:''">
-			<view v-for="(item, i) in truntableData" :key="i" class="sector"
-				:style="{'transform': `rotate(${item.start}deg) skewY(${item.scale}deg)`, 'background': color[i]}">
-			</view>
-			<view class="name" v-for="(item, i) in truntableData" :key="`t${i}`"
-				:style="{'transform': `rotate(${item.scaleText}deg)`, 'left': (310 + item.sin) + 'rpx', 'top': (160 - item.cos) +'rpx'}">
-				{{item.name}}
-			</view>
-		</view>
-
-	</view>
-</template>
-
-<script>
-	import index from './index.js'
-	export default index
-</script>
-
-<style lang="scss" scoped>
-	@import "./style.scss"
-</style>

Різницю між файлами не показано, бо вона завелика
+ 0 - 38
components/ljs-turntable/style.scss


+ 231 - 0
components/pt-lottery/pt-lottery.vue

@@ -0,0 +1,231 @@
+<template>
+	<view class="pt-lottery">
+		<view class="pt-lottery-box">
+			<view :animation="animationData" class="pt-lottery-bg">
+				<image :src="lotteryBg" class='pt-lottery-bg-img'></image>
+				<view class="prize-list">
+					<view class="prize-item" v-for="(data,index) in showPrizeList" :key="index">
+						<view class="prize-item-info" :style="{'transform': 'rotate('+data.turn+')'}">
+							<view class="prize-name">{{data.prizeName}}</view>
+							<view v-if="data.prizeIcon" class="prize-icon">
+								<image :src="data.prizeIcon" mode="aspectFit"></image>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view @click="throttle(getLottery,gapTimes)" class="pt-lottery-btn">
+				<image :src="lotteryBtn"></image>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	/** 参数
+	 * lotteryBg 大转盘背景,不用纯色块,界面不好看
+	 * lotteryBtn 点击抽奖按钮
+	 * prizeList 奖品列表 [{prizeName,prizeIcon}]
+	 * times 抽奖次数
+	 * gapTimes 几秒钟内触发1次
+	 *	runTimes 转盘旋转时间与转动的速度
+	 */
+	let timer, flag;
+	export default {
+		props: {
+			lotteryBg: {
+				type: String,
+				default: ''
+			},
+			lotteryBtn: {
+				type: String,
+				default: ''
+			},
+			prizeList: {
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			gapTimes: {
+				type: Number,
+				default: 2000
+			},
+			runTimes: {
+				type: Number,
+				default: 5000
+			}
+		},
+		data() {
+			return {
+				animationData: {},
+				runDegs: '',
+				is_lottery: false,
+				showPrizeList: [],
+				showTimes: ''
+			}
+		},
+		created() {
+			this.showTimes = this.times
+			var awardsConfig = this.prizeList,
+				len = awardsConfig.length,
+				awardsList = [],
+				turnNum = 1 / len
+			for (var i = 0; i < len; i++) {
+				awardsList.push({
+					turn: i * turnNum + 'turn',
+					prizeName: awardsConfig[i].prizeName,
+					prizeIcon: awardsConfig[i].prizeIcon,
+				});
+			}
+			this.showPrizeList = awardsList
+		},
+		methods: {
+			// 节流,防止多次点击,目前设定的是2秒中内只触发一次,按需修改
+			throttle(func, wait = 500, immediate = true) {
+				if (immediate) {
+					if (!flag) {
+						flag = true;
+						typeof func === 'function' && func();
+						timer = setTimeout(() => {
+							flag = false;
+						}, wait);
+					}
+				} else {
+					if (!flag) {
+						flag = true
+						timer = setTimeout(() => {
+							flag = false
+							typeof func === 'function' && func();
+						}, wait);
+					}
+				}
+			},
+			// 点击抽奖按钮
+			getLottery() {
+				this.$emit('start')
+			},
+			// 开始旋转
+			init(index) {
+				let _this = this
+				if (this.is_lottery) {
+					console.log('正在抽奖中,请等待本轮抽奖结束再进行下次抽奖')
+					return
+				}
+				this.is_lottery = true
+				if (this.showTimes) {
+					if (this.showTimes > 0) {
+						this.showTimes--
+					} else {
+						return uni.showToast({
+							icon: 'none',
+							title: '您未获得抽奖机会!'
+						})
+					}
+				}
+				var awardIndex = 0;
+				if (index) {
+					awardIndex = index
+				} else {
+					awardIndex = Math.ceil(Math.random() * this.showPrizeList.length - 1)
+				}
+				console.log(awardIndex, '123456');
+				this.runDegs = this.runDegs || 0
+				this.runDegs = this.runDegs + (360 - this.runDegs % 360) + (360 * this.showPrizeList.length - awardIndex *
+					(360 / this.showPrizeList.length))
+				var animationRun = uni.createAnimation({
+					duration: _this.runTimes,
+					timingFunction: 'ease'
+				})
+				animationRun.rotate(this.runDegs).step()
+				this.animationData = animationRun.export()
+				setTimeout(() => {
+					this.is_lottery = false
+					this.$emit('end')
+				}, _this.runTimes)
+			}
+		}
+	}
+</script>
+<style>
+	.pt-lottery-times {
+		text-align: center;
+		padding: 40rpx 0;
+	}
+
+	.pt-lottery-box {
+		position: relative;
+		width: 650rpx;
+		height: 650rpx;
+		margin: 0 auto;
+		border-radius: 50%;
+		overflow: hidden;
+	}
+
+	.pt-lottery-bg {
+		position: absolute;
+		width: 650rpx;
+		height: 650rpx;
+		left: 0;
+		top: 0;
+		z-index: 1;
+		background-clip: padding-box;
+	}
+
+	.pt-lottery-bg-img {
+		width: 650rpx;
+		height: 650rpx;
+	}
+
+	.prize-list {
+		position: absolute;
+		left: 0;
+		top: 0;
+		width: 650rpx;
+		height: 650rpx;
+		z-index: 9999;
+	}
+
+	.prize-item {
+		position: absolute;
+		left: 0;
+		top: 0;
+		width: 100%;
+		height: 100%;
+		font-weight: 600;
+		text-shadow: 0 1px 1px rgba(255, 255, 255, 0.6);
+		overflow: hidden;
+	}
+
+	.prize-item-info {
+		position: relative;
+		display: block;
+		margin: 0 auto;
+		text-align: center;
+		transform-origin: 50% 325rpx;
+		font-size: 24rpx;
+		padding-top: 95rpx;
+		color: #947600;
+	}
+
+	.prize-icon image {
+		width: 80rpx;
+		height: 80rpx;
+		margin-top: 10rpx;
+	}
+
+	.pt-lottery-btn {
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		transform: translate(-50%, -50%);
+		z-index: 10;
+		width: 212rpx;
+		height: 228rpx;
+	}
+
+	.pt-lottery-btn image {
+		width: 212rpx;
+		height: 228rpx;
+	}
+</style>

+ 25 - 5
pages.json

@@ -342,7 +342,7 @@
 		}, {
 			"path": "pages/award/award",
 			"style": {
-				"navigationBarTitleText": "我的佣金",
+				"navigationBarTitleText": "我的绿积分",
 				"app-plus": {
 					"titleNView": false
 				}
@@ -350,7 +350,7 @@
 		}, {
 			"path": "pages/award/withdrawal",
 			"style": {
-				"navigationBarTitleText": "奖励提现"
+				"navigationBarTitleText": "奖励兑换"
 			}
 		}, {
 			"path": "pages/scoreAccumulate/scoreAccumulate",
@@ -444,13 +444,13 @@
 		{
 			"path": "pages/wallet/account",
 			"style": {
-				"navigationBarTitleText": "提现账号"
+				"navigationBarTitleText": "兑换账号"
 			}
 		},
 		{
 			"path": "pages/wallet/withdrawal",
 			"style": {
-				"navigationBarTitleText": "余额提现"
+				"navigationBarTitleText": "余额兑换"
 			}
 		},
 		{
@@ -481,6 +481,12 @@
 				"navigationBarTitleText": "抽奖"
 			}
 		},
+		{
+			"path": "pages/sign/info",
+			"style": {
+				"navigationBarTitleText": "抽奖记录"
+			}
+		},
 		{
 			"path": "pages/redirect/redirect",
 			"style": {
@@ -671,6 +677,20 @@
 
 			}
 		},
+		{
+			"path": "pages/shoping/shopDetail",
+			"style": {
+				"navigationBarTitleText": "养发馆"
+
+			}
+		},
+		{
+			"path": "pages/shoping/booked",
+			"style": {
+				"navigationBarTitleText": "到店时间"
+
+			}
+		},
 		{
 			"path": "pages/contract/agreement",
 			"style": {
@@ -717,7 +737,7 @@
 			"style": {
 				"navigationBarBackgroundColor": "#72E3B4",
 				"navigationBarTextStyle": "white",
-				"navigationBarTitleText": "店铺提现",
+				"navigationBarTitleText": "店铺兑换",
 				"enablePullDownRefresh": false
 			}
 

+ 314 - 277
pages/award/award.vue

@@ -2,10 +2,14 @@
 	<view class="content">
 		<view class="content-money">
 			<view class="money-box">
-				<view class="bg"><image src="../../static/img/yong.png" mode=""></image></view>
+				<view class="bg">
+					<image src="../../static/img/yong.png" mode=""></image>
+				</view>
 				<view class="body-title">
-					<view class="goback-box" @click="toBack"><image class="goback" src="../../static/icon/fanhui.png" mode=""></image></view>
-					<view class="header">我的佣金</view>
+					<view class="goback-box" @click="toBack">
+						<image class="goback" src="../../static/icon/fanhui.png" mode=""></image>
+					</view>
+					<view class="header">我的绿积分</view>
 				</view>
 				<view>
 					<view class="money">{{ money | getMoneyStyle }}</view>
@@ -26,9 +30,11 @@
 			</view> -->
 		</view>
 		<view class="navbar">
-			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+			<view v-for="(item, index) in navList" :key="index" class="nav-item"
+				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
 		</view>
-		<swiper :current="tabCurrentIndex" :style="{ height: maxheight + 'px' }" class="swiper-box" duration="300" @change="changeTab">
+		<swiper :current="tabCurrentIndex" :style="{ height: maxheight + 'px' }" class="swiper-box" duration="300"
+			@change="changeTab">
 			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
 				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
 					<!-- 空白页 -->
@@ -52,314 +58,345 @@
 				</scroll-view>
 			</swiper-item>
 		</swiper>
-		<view class="btn" @click="navto('/pages/award/withdrawal?type=brokerage_price')">立即提现</view>
+		<view class="btn" @click="navto('/pages/award/withdrawal?type=brokerage_price')">立即兑换</view>
 	</view>
 </template>
 
 <script>
-import { spreadCommission, extractBank } from '@/api/wallet.js';
-import { mapState, mapMutations } from 'vuex';
-import { getMoneyStyle } from '@/utils/rocessor.js';
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import empty from '@/components/empty';
-export default {
-	filters: {
+	import {
+		spreadCommission,
+		extractBank
+	} from '@/api/wallet.js';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
 		getMoneyStyle
-	},
-	components: {
-		empty,
-		uniLoadMore
-	},
-	onReady() {
-		// 初始化获取页面宽度
-		uni.createSelectorQuery()
-			.select('.content')
-			.fields(
-				{
-					size: true
-				},
-				data => {
-					// 保存头部高度
-					this.maxheight = data.height - Math.floor((data.width / 750) * 570);
-					console.log(this.maxheight);
-				}
-			)
-			.exec();
-	},
-	data() {
-		return {
-			// 头部图高度
-			maxheight: '',
-			tabCurrentIndex: 0,
-			navList: [
-				{
-					state: 0,
-					text: '收入',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 1,
-					text: '支出',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}
-			],
-			money: '', //可提现佣金
-			freezeMoney: '' //冻结中的佣金
-		};
-	},
-	onLoad(options) {},
-	onShow() {
-		this.loadData();
-		// 获取用户余额
-		extractBank({}).then(({ data }) => {
-			this.money = data.brokerage_price;
-			// 冻结佣金
-			this.freezeMoney = data.freezePrice;
-		});
-	},
-	methods: {
-		// 页面跳转
-		navto(e) {
-			console.log(e);
-			uni.navigateTo({
-				url: e
-			});
+	} from '@/utils/rocessor.js';
+	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	import empty from '@/components/empty';
+	export default {
+		filters: {
+			getMoneyStyle
 		},
-		//返回上一页面
-		toBack() {
-			console.log(111);
-			uni.navigateBack({});
+		components: {
+			empty,
+			uniLoadMore
 		},
-		//获取收入支出信息
-		async loadData(source) {
-			//这里是将订单挂载到tab列表下
-			let index = this.tabCurrentIndex;
-			let navItem = this.navList[index];
-			let state = navItem.state + 3;
-			if (source === 'tabChange' && navItem.loaded === true) {
-				//tab切换只有第一次需要加载数据
-				return;
-			}
-			if (navItem.loadingType === 'loading') {
-				//防止重复加载
-				return;
-			}
-			// 修改当前对象状态为加载中
-			navItem.loadingType = 'loading';
-
-			spreadCommission(
-				{
-					page: navItem.page,
-					limit: navItem.limit
-				},
-				state
-			)
-				.then(({ data }) => {
-					if (data.length > 0) {
-						navItem.orderList = navItem.orderList.concat(data[0].list);
-						console.log(navItem.orderList);
-						navItem.page++;
+		onReady() {
+			// 初始化获取页面宽度
+			uni.createSelectorQuery()
+				.select('.content')
+				.fields({
+						size: true
+					},
+					data => {
+						// 保存头部高度
+						this.maxheight = data.height - Math.floor((data.width / 750) * 570);
+						console.log(this.maxheight);
 					}
-					if (navItem.limit == data.length) {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'more';
-						return;
-					} else {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'noMore';
+				)
+				.exec();
+		},
+		data() {
+			return {
+				// 头部图高度
+				maxheight: '',
+				tabCurrentIndex: 0,
+				navList: [{
+						state: 0,
+						text: '收入',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					{
+						state: 1,
+						text: '支出',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
 					}
-					uni.hideLoading();
-					this.$set(navItem, 'loaded', true);
-				})
-				.catch(e => {
-					console.log(e);
-				});
+				],
+				money: '', //可提现佣金
+				freezeMoney: '' //冻结中的佣金
+			};
 		},
-
-		//swiper 切换
-		changeTab(e) {
-			this.tabCurrentIndex = e.target.current;
-			this.loadData('tabChange');
+		onLoad(options) {},
+		onShow() {
+			this.loadData();
+			// 获取用户余额
+			extractBank({}).then(({
+				data
+			}) => {
+				this.money = data.brokerage_price;
+				// 冻结佣金
+				this.freezeMoney = data.freezePrice;
+			});
 		},
-		//顶部tab点击
-		tabClick(index) {
-			this.tabCurrentIndex = index;
+		methods: {
+			// 页面跳转
+			navto(e) {
+				console.log(e);
+				uni.navigateTo({
+					url: e
+				});
+			},
+			//返回上一页面
+			toBack() {
+				console.log(111);
+				uni.navigateBack({});
+			},
+			//获取收入支出信息
+			async loadData(source) {
+				//这里是将订单挂载到tab列表下
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				let state = navItem.state + 3;
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+
+				spreadCommission({
+							page: navItem.page,
+							limit: navItem.limit
+						},
+						state
+					)
+					.then(({
+						data
+					}) => {
+						if (data.length > 0) {
+							navItem.orderList = navItem.orderList.concat(data[0].list);
+							console.log(navItem.orderList);
+							navItem.page++;
+						}
+						if (navItem.limit == data.length) {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							navItem.loadingType = 'more';
+							return;
+						} else {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							navItem.loadingType = 'noMore';
+						}
+						uni.hideLoading();
+						this.$set(navItem, 'loaded', true);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+
+			//swiper 切换
+			changeTab(e) {
+				this.tabCurrentIndex = e.target.current;
+				this.loadData('tabChange');
+			},
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-page {
-	background: #ffffff;
-	height: 100%;
-}
-.content-money {
-	padding-bottom: 30rpx;
-	background: $page-color-base;
-	.moneyTx {
-		position: absolute;
-		z-index: 10;
-		top: 150rpx;
-		right: 0rpx;
-		width: 160rpx;
-		padding: 10rpx 30rpx;
-		border: 2px solid #ffffff;
-		border-top-left-radius: 99rpx;
-		border-bottom-left-radius: 99rpx;
-		color: #ffffff;
-		line-height: 1;
-		font-size: $font-base;
+	page {
+		background: #ffffff;
+		height: 100%;
 	}
-}
-.money-box {
-	background-color: $base-color;
-	padding-top: var(--status-bar-height);
-	height: 468rpx;
-	color: #ffffff;
-	text-align: center;
-	justify-content: center;
-	position: relative;
-	.body-title {
-		height: 80rpx;
+
+	.content-money {
+		padding-bottom: 30rpx;
+		background: $page-color-base;
+
+		.moneyTx {
+			position: absolute;
+			z-index: 10;
+			top: 150rpx;
+			right: 0rpx;
+			width: 160rpx;
+			padding: 10rpx 30rpx;
+			border: 2px solid #ffffff;
+			border-top-left-radius: 99rpx;
+			border-bottom-left-radius: 99rpx;
+			color: #ffffff;
+			line-height: 1;
+			font-size: $font-base;
+		}
+	}
+
+	.money-box {
+		background-color: $base-color;
+		padding-top: var(--status-bar-height);
+		height: 468rpx;
+		color: #ffffff;
 		text-align: center;
-		font-size: 35rpx;
+		justify-content: center;
 		position: relative;
-		.header {
-			position: absolute;
-			left: 0;
-			top: 0;
-			width: 100%;
-			font-size: 36rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #fffeff;
+
+		.body-title {
 			height: 80rpx;
-			font-size: 32rpx;
-			font-weight: 700;
-			z-index: 9;
-			display: flex;
-			justify-content: center;
-			align-items: center;
+			text-align: center;
+			font-size: 35rpx;
+			position: relative;
+
+			.header {
+				position: absolute;
+				left: 0;
+				top: 0;
+				width: 100%;
+				font-size: 36rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #fffeff;
+				height: 80rpx;
+				font-size: 32rpx;
+				font-weight: 700;
+				z-index: 9;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+			}
+
+			.goback-box {
+				position: absolute;
+				z-index: 10;
+				left: 24rpx;
+				top: 0;
+				height: 80rpx;
+				display: flex;
+				align-items: center;
+			}
+
+			.goback {
+				width: 30rpx;
+				height: 36rpx;
+			}
 		}
-		.goback-box {
+
+		.bg {
 			position: absolute;
-			z-index: 10;
-			left: 24rpx;
 			top: 0;
-			height: 80rpx;
-			display: flex;
-			align-items: center;
-		}
-		.goback {
-			width: 30rpx;
-			height: 36rpx;
-		}
-	}
-	.bg {
-		position: absolute;
-		top: 0;
-		left: 0;
-		width: 100%;
-		height: 100%;
-		image {
+			left: 0;
 			width: 100%;
 			height: 100%;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.money {
+			position: relative;
+			z-index: 10;
+			font-size: 56rpx;
+			height: 388rpx;
+			line-height: 288rpx;
 		}
 	}
-	.money {
-		position: relative;
-		z-index: 10;
-		font-size: 56rpx;
-		height: 388rpx;
-		line-height: 288rpx;
-	}
-}
 
-.navbar {
-	display: flex;
-	height: 40px;
-	padding: 0 5px;
-	background: #fff;
-	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-	position: relative;
-	z-index: 10;
-	.nav-item {
-		flex: 1;
+	.navbar {
 		display: flex;
-		justify-content: center;
-		align-items: center;
-		height: 100%;
-		font-size: 15px;
-		color: $font-color-dark;
+		height: 40px;
+		padding: 0 5px;
+		background: #fff;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
 		position: relative;
-		&.current {
-			color: $base-color;
-			&:after {
-				content: '';
-				position: absolute;
-				left: 50%;
-				bottom: 0;
-				transform: translateX(-50%);
-				width: 44px;
-				height: 0;
-				border-bottom: 2px solid $base-color;
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 15px;
+			color: $font-color-dark;
+			position: relative;
+
+			&.current {
+				color: $base-color;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid $base-color;
+				}
 			}
 		}
 	}
-}
-// 列表
 
-.swiper-box {
-	padding-top: 10rpx;
-	.order-item {
-		padding: 20rpx 30rpx;
-		line-height: 1.5;
-		.title-box {
-			.title {
-				font-size: $font-lg;
-				color: $font-color-base;
+	// 列表
+
+	.swiper-box {
+		padding-top: 10rpx;
+
+		.order-item {
+			padding: 20rpx 30rpx;
+			line-height: 1.5;
+
+			.title-box {
+				.title {
+					font-size: $font-lg;
+					color: $font-color-base;
+				}
+
+				.time {
+					font-size: $font-base;
+					color: $font-color-light;
+				}
 			}
-			.time {
-				font-size: $font-base;
-				color: $font-color-light;
+
+			.money {
+				color: #fd5b23;
+				font-size: $font-lg;
 			}
 		}
-		.money {
-			color: #fd5b23;
-			font-size: $font-lg;
+	}
+
+	.list-scroll-content {
+		height: 100%;
+	}
+
+	.content {
+		height: 100%;
+
+		.empty-content {
+			background-color: #ffffff;
 		}
 	}
-}
-.list-scroll-content {
-	height: 100%;
-}
-.content {
-	height: 100%;
-	.empty-content {
-		background-color: #ffffff;
+
+	.btn {
+		position: fixed;
+		bottom: 40rpx;
+		left: 50%;
+		width: 674rpx;
+		height: 88rpx;
+		background: #52c696;
+		border-radius: 44rpx;
+		margin-left: -337rpx;
+		font-size: 36rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		text-align: center;
+		line-height: 88rpx;
+		color: #ffffff;
 	}
-}
-.btn {
-	position: fixed;
-	bottom: 40rpx;
-	left: 50%;
-	width: 674rpx;
-	height: 88rpx;
-	background: #52c696;
-	border-radius: 44rpx;
-	margin-left: -337rpx;
-	font-size: 36rpx;
-	font-family: PingFang SC;
-	font-weight: bold;
-	text-align: center;
-	line-height: 88rpx;
-	color: #ffffff;
-}
-</style>
+</style>

+ 243 - 209
pages/award/withdmoenys.vue

@@ -5,12 +5,12 @@
 			<view class="flex ">
 				<view class="buttom">
 					<view class="icon">{{ money | getMoneyStyle }}</view>
-					<text class="text">可提现佣金</text>
+					<text class="text">可兑换绿积分</text>
 				</view>
 				<view class="interval"></view>
 				<view class="buttom">
 					<view class=" icon">{{ freeze | getMoneyStyle }}</view>
-					<text class="text">待审核提现佣金</text>
+					<text class="text">待审核绿积分</text>
 				</view>
 				<!-- <view class="interval"></view>
 				<view class="buttom">
@@ -23,7 +23,8 @@
 			<view class="title">转账金额</view>
 			<view class="row">
 				<text class="tit">¥</text>
-				<input class="input" type="number" v-model="withdrawal" placeholder="转入金额" placeholder-class="placeholder" />
+				<input class="input" type="number" v-model="withdrawal" placeholder="转入金额"
+					placeholder-class="placeholder" />
 				<view class="buttom" @click="withdrawal = money">全部转账</view>
 			</view>
 		</view>
@@ -79,239 +80,272 @@
 </template>
 
 <script>
-import { getMoneyStyle } from '@/utils/rocessor.js';
-import { extractCashs, extractBank, aliInfo, bankInfo } from '@/api/wallet.js';
-import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
-export default {
-	filters: {
+	import {
 		getMoneyStyle
-	},
-	components: {
-		uniNoticeBar
-	},
-	data() {
-		return {
-			type: 'bank', //提现方式
-			money: '0.00', //可提现金额
-			freeze: '0.0', //冻结金额
-			withdrawal: '', //提现金额
-			minPrice: '', //最少提现金额
-			aliData: {},
-			bankData: {},
+	} from '@/utils/rocessor.js';
+	import {
+		extractCashs,
+		extractBank,
+		aliInfo,
+		bankInfo
+	} from '@/api/wallet.js';
+	import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		components: {
+			uniNoticeBar
+		},
+		data() {
+			return {
+				type: 'bank', //提现方式
+				money: '0.00', //可提现金额
+				freeze: '0.0', //冻结金额
+				withdrawal: '', //提现金额
+				minPrice: '', //最少提现金额
+				aliData: {},
+				bankData: {},
+				// #ifdef H5
+				weichatBsrowser: false,
+				// #endif
+				loding: false
+			};
+		},
+		onLoad(options) {
 			// #ifdef H5
-			weichatBsrowser: false,
+			this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
 			// #endif
-			loding: false
-		};
-	},
-	onLoad(options) {
-		// #ifdef H5
-		this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
-		// #endif
-		//加载提现信息
-		this.loadData();
-		// 加载提款账号信息
-		this.loadAli();
-		this.loadBank();
-	},
-	methods: {
-		// 更新数据
-		dataUp() {
+			//加载提现信息
+			this.loadData();
+			// 加载提款账号信息
 			this.loadAli();
 			this.loadBank();
 		},
-		//加载数据
-		async loadAli(source) {
-			aliInfo({}).then(e => {
-				this.aliData = e.data;
-			});
-		},
-		// 加载银行卡信息
-		async loadBank() {
-			bankInfo({}).then(e => {
-				this.bankData = e.data;
-			});
-		},
-		// 加载余额信息
-		async loadData() {
-			extractBank({}).then(({ data }) => {
-				this.money = data.commissionCount;
-				this.freeze = data.broken_commission;
-			});
-		},
-		// 跳转
-		navTo(url) {
-			uni.navigateTo({
-				url: url
-			});
-		},
-		// 切换选中对象
-		tabRadio(e) {
-			this.type = e.detail.value;
-		},
-		// 提交
-		confirm() {
-			let obj = this;
-			obj.loding = true;
-			let data = {
-				from: 'weixinh5', //
-				price: this.withdrawal, //金额
-				type: 1 //0佣金1余额
-			};
-			extractCashs(data)
-				.then(e => {
-					// 允许按钮点击
-					obj.loding = false;
-					// 初始化提现金额
-					obj.withdrawal = '';
-					uni.showToast({
-						title: '提交成功',
-						duration: 2000,
-						position: 'top'
-					});
-				})
-				.catch(e => {
-					obj.loding = false;
-					console.log();
+		methods: {
+			// 更新数据
+			dataUp() {
+				this.loadAli();
+				this.loadBank();
+			},
+			//加载数据
+			async loadAli(source) {
+				aliInfo({}).then(e => {
+					this.aliData = e.data;
+				});
+			},
+			// 加载银行卡信息
+			async loadBank() {
+				bankInfo({}).then(e => {
+					this.bankData = e.data;
+				});
+			},
+			// 加载余额信息
+			async loadData() {
+				extractBank({}).then(({
+					data
+				}) => {
+					this.money = data.commissionCount;
+					this.freeze = data.broken_commission;
 				});
+			},
+			// 跳转
+			navTo(url) {
+				uni.navigateTo({
+					url: url
+				});
+			},
+			// 切换选中对象
+			tabRadio(e) {
+				this.type = e.detail.value;
+			},
+			// 提交
+			confirm() {
+				let obj = this;
+				obj.loding = true;
+				let data = {
+					from: 'weixinh5', //
+					price: this.withdrawal, //金额
+					type: 1 //0佣金1余额
+				};
+				extractCashs(data)
+					.then(e => {
+						// 允许按钮点击
+						obj.loding = false;
+						// 初始化提现金额
+						obj.withdrawal = '';
+						uni.showToast({
+							title: '提交成功',
+							duration: 2000,
+							position: 'top'
+						});
+					})
+					.catch(e => {
+						obj.loding = false;
+						console.log();
+					});
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-page {
-	height: 100%;
-}
-.content-money {
-	padding: 30rpx 0;
-	background: #ffffff;
-}
-.flex {
-	background-color: #ffffff;
-	text-align: center;
-	margin: 0 30rpx;
-	border-radius: $border-radius-sm;
-	.buttom {
-		font-size: $font-lg;
-		width: 50%;
-	}
-	.interval {
-		width: 2px;
-		height: 60rpx;
-		background-color: #eeeeee;
-	}
-	.icon {
-		background-size: 100%;
-		font-size: 42rpx;
-		color: $font-color-dark;
-		font-weight: bold;
-		background-repeat: no-repeat;
-		background-position: center;
+	page {
+		height: 100%;
 	}
-	.text {
-		color: $font-color-light;
-	}
-}
 
-.row-box {
-	margin-top: 30rpx;
-	padding: 20rpx 30rpx;
-	background: #fff;
-	.title {
-		font-size: $font-base + 2rpx;
-		color: $font-color-dark;
+	.content-money {
+		padding: 30rpx 0;
+		background: #ffffff;
 	}
-	.row {
-		display: flex;
-		align-items: center;
-		position: relative;
-		height: 80rpx;
-		.tit {
-			flex-shrink: 0;
-			width: 40rpx;
-			font-size: 30rpx;
-			color: $font-color-dark;
+
+	.flex {
+		background-color: #ffffff;
+		text-align: center;
+		margin: 0 30rpx;
+		border-radius: $border-radius-sm;
+
+		.buttom {
+			font-size: $font-lg;
+			width: 50%;
+		}
+
+		.interval {
+			width: 2px;
+			height: 60rpx;
+			background-color: #eeeeee;
 		}
-		.input {
-			flex: 1;
-			font-size: 30rpx;
+
+		.icon {
+			background-size: 100%;
+			font-size: 42rpx;
 			color: $font-color-dark;
+			font-weight: bold;
+			background-repeat: no-repeat;
+			background-position: center;
 		}
-		.iconlocation {
-			font-size: 36rpx;
+
+		.text {
 			color: $font-color-light;
 		}
+	}
 
-		.buttom {
-			color: $font-color-spec;
-			font-size: $font-base;
+	.row-box {
+		margin-top: 30rpx;
+		padding: 20rpx 30rpx;
+		background: #fff;
+
+		.title {
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
 		}
-	}
-}
-.add-btn {
-	&.modified {
-		color: $base-color;
-	}
-	&.up {
-		background-color: $base-color;
-		color: #fff;
-	}
-	&.action {
-		background-color: $color-gray;
-	}
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 690rpx;
-	height: 80rpx;
-	margin: 0 auto;
-	margin-top: 30rpx;
-	font-size: $font-lg;
-	border-radius: 10rpx;
-	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
-}
 
-.list {
-	padding-left: 30rpx;
-	margin-top: 30rpx;
-	background-color: #ffffff;
-	.box {
-		display: flex;
-		align-items: center;
-		width: 100%;
-		height: 120rpx;
-		border-bottom: 1px solid $border-color-light;
-		.icon {
-			font-size: 48rpx;
-			padding-right: 20rpx;
-			.icon-img {
-				height: 50rpx;
-				width: 50rpx;
+		.row {
+			display: flex;
+			align-items: center;
+			position: relative;
+			height: 80rpx;
+
+			.tit {
+				flex-shrink: 0;
+				width: 40rpx;
+				font-size: 30rpx;
+				color: $font-color-dark;
+			}
+
+			.input {
+				flex: 1;
+				font-size: 30rpx;
+				color: $font-color-dark;
+			}
+
+			.iconlocation {
+				font-size: 36rpx;
+				color: $font-color-light;
+			}
+
+			.buttom {
+				color: $font-color-spec;
+				font-size: $font-base;
 			}
 		}
-		.iconweixin1 {
-			color: #18bf16;
+	}
+
+	.add-btn {
+		&.modified {
+			color: $base-color;
 		}
-		.iconzhifubao {
-			color: #08aaec;
+
+		&.up {
+			background-color: $base-color;
+			color: #fff;
+		}
+
+		&.action {
+			background-color: $color-gray;
 		}
-		.title-box {
-			flex-grow: 1;
-			text-align: left;
-			.title {
-				font-size: $font-base + 2rpx;
-				color: $font-color-base;
+
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 690rpx;
+		height: 80rpx;
+		margin: 0 auto;
+		margin-top: 30rpx;
+		font-size: $font-lg;
+		border-radius: 10rpx;
+		// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+	}
+
+	.list {
+		padding-left: 30rpx;
+		margin-top: 30rpx;
+		background-color: #ffffff;
+
+		.box {
+			display: flex;
+			align-items: center;
+			width: 100%;
+			height: 120rpx;
+			border-bottom: 1px solid $border-color-light;
+
+			.icon {
+				font-size: 48rpx;
+				padding-right: 20rpx;
+
+				.icon-img {
+					height: 50rpx;
+					width: 50rpx;
+				}
 			}
-			.node {
-				font-size: $font-sm;
-				color: $font-color-light;
+
+			.iconweixin1 {
+				color: #18bf16;
+			}
+
+			.iconzhifubao {
+				color: #08aaec;
+			}
+
+			.title-box {
+				flex-grow: 1;
+				text-align: left;
+
+				.title {
+					font-size: $font-base + 2rpx;
+					color: $font-color-base;
+				}
+
+				.node {
+					font-size: $font-sm;
+					color: $font-color-light;
+				}
 			}
 		}
 	}
-}
-/deep/ .uni-radio-input {
-	width: 45rpx;
-	height: 45rpx;
-}
-</style>
+
+	/deep/ .uni-radio-input {
+		width: 45rpx;
+		height: 45rpx;
+	}
+</style>

+ 369 - 319
pages/award/withdrawal.vue

@@ -5,12 +5,12 @@
 			<view class="flex ">
 				<view class="buttom">
 					<view class="icon">{{ moneyYong | getMoneyStyle }}</view>
-					<text class="text">可提现佣金</text>
+					<text class="text">可兑换绿积分</text>
 				</view>
 				<view class="interval"></view>
 				<view class="buttom">
 					<view class=" icon">{{ freeze | getMoneyStyle }}</view>
-					<text class="text">待审核提现佣金</text>
+					<text class="text">待审核绿积分</text>
 				</view>
 				<view class="interval"></view>
 				<view class="buttom">
@@ -23,17 +23,18 @@
 			<view class="flex">
 				<view class="buttom1">
 					<view class="icon">{{ money | getMoneyStyle }}</view>
-					<text class="text">可提现余额</text>
+					<text class="text">可兑换余额</text>
 				</view>
 			</view>
 		</view>
 		<view class="row-box">
-			<view class="title">提现金额</view>
+			<view class="title">兑换金额</view>
 			<view class="row">
 				<text class="tit">¥</text>
-				<input class="input" type="number" v-model="withdrawal" :placeholder="'最低提现金额' + minPrice + '元'" placeholder-class="placeholder" />
-				<view class="buttom" v-if="type1 != 'brokerage_price'" @click="withdrawal = money">全部提现</view>
-				<view class="buttom" v-if="type1 == 'brokerage_price'" @click="withdrawal = moneyYong">全部提现</view>
+				<input class="input" type="number" v-model="withdrawal" :placeholder="'最低兑换金额' + minPrice + '元'"
+					placeholder-class="placeholder" />
+				<view class="buttom" v-if="type1 != 'brokerage_price'" @click="withdrawal = money">全部兑换</view>
+				<view class="buttom" v-if="type1 == 'brokerage_price'" @click="withdrawal = moneyYong">全部兑换</view>
 			</view>
 		</view>
 		<view class="tip" v-if="withdrawal != 0 && type1 == 'brokerage_price'">
@@ -56,9 +57,11 @@
 					<view class="box">
 						<view class="icon iconfont iconweixin1"></view>
 						<view class="title-box">
-							<view class="title"><text>提现至微信</text></view>
+							<view class="title"><text>兑换至微信</text></view>
+						</view>
+						<view class="right">
+							<radio value="weixin" color="#5dbc7c" :checked="type == 'weixin'" />
 						</view>
-						<view class="right"><radio value="weixin" color="#5dbc7c" :checked="type == 'weixin'" /></view>
 					</view>
 				</label>
 				<label>
@@ -66,19 +69,23 @@
 						<view class="icon iconfont iconzhifubao"></view>
 						<view class="title-box">
 							<view class="title">
-								<text v-if="aliData.fullname">提现至支付宝</text>
+								<text v-if="aliData.fullname">兑换至支付宝</text>
 								<text v-else>请创建支付宝账号</text>
 							</view>
 							<view class="node">
 								<text v-if="aliData.fullname">真实姓名({{ aliData.fullname }})</text>
 							</view>
 						</view>
-						<view class="right"><radio value="alipay" color="#5dbc7c" :checked="type == 'alipay'" /></view>
+						<view class="right">
+							<radio value="alipay" color="#5dbc7c" :checked="type == 'alipay'" />
+						</view>
 					</view>
 				</label>
 				<label>
 					<view class="box">
-						<view class="icon iconfont"><image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image></view>
+						<view class="icon iconfont">
+							<image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image>
+						</view>
 						<view class="title-box">
 							<view class="title">
 								<text v-if="bankData.bankno">{{ bankData.bank + ' ' + bankData.bankno }}</text>
@@ -88,7 +95,9 @@
 								<text v-if="bankData.fullname">真实姓名({{ bankData.fullname }})</text>
 							</view>
 						</view>
-						<view class="right"><radio value="bank" color="#5dbc7c" :checked="type == 'bank'" /></view>
+						<view class="right">
+							<radio value="bank" color="#5dbc7c" :checked="type == 'bank'" />
+						</view>
 					</view>
 				</label>
 			</radio-group>
@@ -105,347 +114,388 @@
 </template>
 
 <script>
-import { mapState, mapMutations } from 'vuex';
-import { getMoneyStyle } from '@/utils/rocessor.js';
-import { extractCash, extractBank, aliInfo, bankInfo, userBalance } from '@/api/wallet.js';
-import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
-export default {
-	filters: {
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
 		getMoneyStyle
-	},
-	components: {
-		uniNoticeBar
-	},
-	data() {
-		return {
-			type1: '',
-			type: '',
-			isTing: false,
-			type: 'alipay', //提现方式
-			money: '0.00', //可提现余额
-			moneyYong: '0.00', //可提现佣金
-			freeze: '0.0', //冻结金额
-			withdrawal: '', //提现金额
-			minPrice: '', //最少提现金额
-			reall: '', //实际到账
-			sxfl: '', //手续费率
-			xfql: '', //消费券率
-			gfl: '', //股份率
-			yuel: '', //余额率
-			aliData: {},
-			bankData: {},
-			weixin: '',
-			charge: 0,
-			// #ifdef H5
-			weichatBsrowser: false
-			// #endif
-		};
-	},
-	onLoad(options) {
-		this.type1 = options.type;
-		// #ifdef H5
-		this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
-		// #endif
-		//加载提现信息
-		this.loadData();
-		// 加载提款账号信息
-		this.loadAli();
-		this.loadBank();
-	},
-	computed: {
-		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
-		real() {
-			return (this.withdrawal * this.reall).toFixed(2) * 1;
+	} from '@/utils/rocessor.js';
+	import {
+		extractCash,
+		extractBank,
+		aliInfo,
+		bankInfo,
+		userBalance
+	} from '@/api/wallet.js';
+	import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
+	export default {
+		filters: {
+			getMoneyStyle
 		},
-		sxf() {
-			return (this.withdrawal * this.sxfl).toFixed(2) * 1;
+		components: {
+			uniNoticeBar
 		},
-		xfq() {
-			return (this.withdrawal * this.xfql).toFixed(2) * 1;
+		data() {
+			return {
+				type1: '',
+				type: '',
+				isTing: false,
+				type: 'alipay', //提现方式
+				money: '0.00', //可提现余额
+				moneyYong: '0.00', //可提现佣金
+				freeze: '0.0', //冻结金额
+				withdrawal: '', //提现金额
+				minPrice: '', //最少提现金额
+				reall: '', //实际到账
+				sxfl: '', //手续费率
+				xfql: '', //消费券率
+				gfl: '', //股份率
+				yuel: '', //余额率
+				aliData: {},
+				bankData: {},
+				weixin: '',
+				charge: 0,
+				// #ifdef H5
+				weichatBsrowser: false
+				// #endif
+			};
 		},
-		gf() {
-			return (this.withdrawal * this.gfl).toFixed(2) * 1;
-		},
-		yue() {
-			return (this.withdrawal * this.yuel).toFixed(2) * 1;
-		}
-	},
-	methods: {
-		// 更新数据
-		dataUp() {
+		onLoad(options) {
+			this.type1 = options.type;
+			// #ifdef H5
+			this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
+			// #endif
+			//加载提现信息
+			this.loadData();
+			// 加载提款账号信息
 			this.loadAli();
 			this.loadBank();
 		},
-		//加载数据
-		async loadAli(source) {
-			aliInfo({}).then(e => {
-				this.aliData = e.data;
-			});
-		},
-		// 加载银行卡信息
-		async loadBank() {
-			bankInfo({}).then(e => {
-				this.bankData = e.data;
-			});
-		},
-		// 加载余额信息
-		async loadData() {
-			extractBank({}).then(({ data }) => {
-				this.moneyYong = data.commissionCount;
-				this.minPrice = data.minPrice;
-				this.freeze = data.broken_commission;
-				this.charge = data.cash_out;
-				this.sxfl = (data.commission / 100).toFixed(2) * 1;
-				this.xfql = (data.commission_consumer / 100).toFixed(5) * 1;
-				this.gfl = (data.commission_gf / 100).toFixed(2) * 1;
-				this.yuel = (data.commission_yue / 100).toFixed(2) * 1;
-				this.reall = (1 - this.sxfl - this.xfql - this.gfl - this.yuel).toFixed(2) * 1;
-			});
-			userBalance({}).then(({ data }) => {
-				this.money = data.now_money;
-			});
-		},
-		// 跳转
-		navTo(url) {
-			uni.navigateTo({
-				url: url
-			});
-		},
-		// 切换选中对象
-		tabRadio(e) {
-			this.type = e.detail.value;
-		},
-		// 提交
-		confirm() {
-			let obj = this;
-			if (obj.isTing) {
-				console.log('jing');
-				return;
-			}
-			let data;
-			if (obj.type1 == 'brokerage_price') {
-				data = {
-					extract_type: obj.type, //bank -银行卡 alipay-支付宝 weixin-微信
-					money: obj.withdrawal, //金额
-					money_type: 0, //0佣金1余额
-					from: obj.type1
-				};
-			} else {
-				data = {
-					extract_type: obj.type, //bank -银行卡 alipay-支付宝 weixin-微信
-					money: obj.withdrawal, //金额
-					money_type: 1, //0佣金1余额
-					from: obj.type1
-				};
+		computed: {
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
+			real() {
+				return (this.withdrawal * this.reall).toFixed(2) * 1;
+			},
+			sxf() {
+				return (this.withdrawal * this.sxfl).toFixed(2) * 1;
+			},
+			xfq() {
+				return (this.withdrawal * this.xfql).toFixed(2) * 1;
+			},
+			gf() {
+				return (this.withdrawal * this.gfl).toFixed(2) * 1;
+			},
+			yue() {
+				return (this.withdrawal * this.yuel).toFixed(2) * 1;
 			}
-			if (+obj.withdrawal < +obj.minPrice) {
-				uni.showToast({
-					title: '提现金额不可少于' + obj.minPrice,
-					duration: 2000,
-					mask: false,
-					icon: 'none'
+		},
+		methods: {
+			// 更新数据
+			dataUp() {
+				this.loadAli();
+				this.loadBank();
+			},
+			//加载数据
+			async loadAli(source) {
+				aliInfo({}).then(e => {
+					this.aliData = e.data;
 				});
-				return;
-			}
-			if (obj.type == 'alipay') {
-				data.name = obj.aliData.fullname;
-				data.alipay_code = obj.aliData.alino;
-			}
-			if (obj.type == 'weixin') {
-				data.weixin = '123456';
-			}
-			if (obj.type == 'bank') {
-				data.name = obj.bankData.fullname;
-				data.bankname = obj.bankData.bank;
-				data.cardnum = obj.bankData.bankno;
-			}
-
-			obj.isTing = true;
-			extractCash(data)
-				.then(e => {
+			},
+			// 加载银行卡信息
+			async loadBank() {
+				bankInfo({}).then(e => {
+					this.bankData = e.data;
+				});
+			},
+			// 加载余额信息
+			async loadData() {
+				extractBank({}).then(({
+					data
+				}) => {
+					this.moneyYong = data.commissionCount;
+					this.minPrice = data.minPrice;
+					this.freeze = data.broken_commission;
+					this.charge = data.cash_out;
+					this.sxfl = (data.commission / 100).toFixed(2) * 1;
+					this.xfql = (data.commission_consumer / 100).toFixed(5) * 1;
+					this.gfl = (data.commission_gf / 100).toFixed(2) * 1;
+					this.yuel = (data.commission_yue / 100).toFixed(2) * 1;
+					this.reall = (1 - this.sxfl - this.xfql - this.gfl - this.yuel).toFixed(2) * 1;
+				});
+				userBalance({}).then(({
+					data
+				}) => {
+					this.money = data.now_money;
+				});
+			},
+			// 跳转
+			navTo(url) {
+				uni.navigateTo({
+					url: url
+				});
+			},
+			// 切换选中对象
+			tabRadio(e) {
+				this.type = e.detail.value;
+			},
+			// 提交
+			confirm() {
+				let obj = this;
+				if (obj.isTing) {
+					console.log('jing');
+					return;
+				}
+				let data;
+				if (obj.type1 == 'brokerage_price') {
+					data = {
+						extract_type: obj.type, //bank -银行卡 alipay-支付宝 weixin-微信
+						money: obj.withdrawal, //金额
+						money_type: 0, //0佣金1余额
+						from: obj.type1
+					};
+				} else {
+					data = {
+						extract_type: obj.type, //bank -银行卡 alipay-支付宝 weixin-微信
+						money: obj.withdrawal, //金额
+						money_type: 1, //0佣金1余额
+						from: obj.type1
+					};
+				}
+				if (+obj.withdrawal < +obj.minPrice) {
 					uni.showToast({
-						title: '提交成功',
+						title: '兑换金额不可少于' + obj.minPrice,
 						duration: 2000,
-						position: 'top'
+						mask: false,
+						icon: 'none'
 					});
-					obj.isTing = false;
-					// 清空提现金额
-					obj.withdrawal = '';
-				})
-				.catch(e => {
-					obj.isTing = false;
-					console.log();
-				});
+					return;
+				}
+				if (obj.type == 'alipay') {
+					data.name = obj.aliData.fullname;
+					data.alipay_code = obj.aliData.alino;
+				}
+				if (obj.type == 'weixin') {
+					data.weixin = '123456';
+				}
+				if (obj.type == 'bank') {
+					data.name = obj.bankData.fullname;
+					data.bankname = obj.bankData.bank;
+					data.cardnum = obj.bankData.bankno;
+				}
+
+				obj.isTing = true;
+				extractCash(data)
+					.then(e => {
+						uni.showToast({
+							title: '提交成功',
+							duration: 2000,
+							position: 'top'
+						});
+						obj.isTing = false;
+						// 清空提现金额
+						obj.withdrawal = '';
+					})
+					.catch(e => {
+						obj.isTing = false;
+						console.log();
+					});
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-page {
-	height: 100%;
-}
-.content-money {
-	padding: 30rpx 0;
-	background: #ffffff;
-}
-.flex {
-	background-color: #ffffff;
-	text-align: center;
-	margin: 0 30rpx;
-	border-radius: $border-radius-sm;
-	.buttom {
-		font-size: $font-lg;
-		width: 50%;
-	}
-	.buttom1 {
-		font-size: $font-lg;
-		width: 100%;
-	}
-	.interval {
-		width: 2px;
-		height: 60rpx;
-		background-color: #eeeeee;
+	page {
+		height: 100%;
 	}
-	.icon {
-		background-size: 100%;
-		font-size: 42rpx;
-		color: $font-color-dark;
-		font-weight: bold;
-		background-repeat: no-repeat;
-		background-position: center;
-	}
-	.text {
-		font-size: 30rpx;
-		color: $font-color-light;
-	}
-}
-
-.row-box {
-	margin-top: 30rpx;
-	padding: 20rpx 30rpx;
-	background: #fff;
-	.title {
-		font-size: $font-base + 2rpx;
-		color: $font-color-dark;
+
+	.content-money {
+		padding: 30rpx 0;
+		background: #ffffff;
 	}
-	.row {
-		display: flex;
-		align-items: center;
-		position: relative;
-		height: 80rpx;
-		.tit {
-			flex-shrink: 0;
-			width: 40rpx;
-			font-size: 30rpx;
-			color: $font-color-dark;
+
+	.flex {
+		background-color: #ffffff;
+		text-align: center;
+		margin: 0 30rpx;
+		border-radius: $border-radius-sm;
+
+		.buttom {
+			font-size: $font-lg;
+			width: 50%;
 		}
-		.input {
-			flex: 1;
-			font-size: 30rpx;
+
+		.buttom1 {
+			font-size: $font-lg;
+			width: 100%;
+		}
+
+		.interval {
+			width: 2px;
+			height: 60rpx;
+			background-color: #eeeeee;
+		}
+
+		.icon {
+			background-size: 100%;
+			font-size: 42rpx;
 			color: $font-color-dark;
+			font-weight: bold;
+			background-repeat: no-repeat;
+			background-position: center;
 		}
-		.iconlocation {
-			font-size: 36rpx;
+
+		.text {
+			font-size: 30rpx;
 			color: $font-color-light;
 		}
+	}
 
-		.buttom {
-			color: $font-color-spec;
-			font-size: $font-base;
+	.row-box {
+		margin-top: 30rpx;
+		padding: 20rpx 30rpx;
+		background: #fff;
+
+		.title {
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+		}
+
+		.row {
+			display: flex;
+			align-items: center;
+			position: relative;
+			height: 80rpx;
+
+			.tit {
+				flex-shrink: 0;
+				width: 40rpx;
+				font-size: 30rpx;
+				color: $font-color-dark;
+			}
+
+			.input {
+				flex: 1;
+				font-size: 30rpx;
+				color: $font-color-dark;
+			}
+
+			.iconlocation {
+				font-size: 36rpx;
+				color: $font-color-light;
+			}
+
+			.buttom {
+				color: $font-color-spec;
+				font-size: $font-base;
+			}
 		}
 	}
-}
-.tip {
-	padding: 20rpx;
-	color: #e51c23;
-}
-.add-btn {
-	&.modified {
-		color: $base-color;
-	}
-	&.up {
-		background-color: $base-color;
-		color: #fff;
+
+	.tip {
+		padding: 20rpx;
+		color: #e51c23;
 	}
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 690rpx;
-	height: 80rpx;
-	margin: 0 auto;
-	margin-top: 30rpx;
-	font-size: $font-lg;
-	border-radius: 10rpx;
-	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
-}
-
-.list {
-	padding-left: 30rpx;
-	margin-top: 30rpx;
-	background-color: #ffffff;
-	.box {
+
+	.add-btn {
+		&.modified {
+			color: $base-color;
+		}
+
+		&.up {
+			background-color: $base-color;
+			color: #fff;
+		}
+
 		display: flex;
 		align-items: center;
-		width: 100%;
-		height: 120rpx;
-		border-bottom: 1px solid $border-color-light;
-		.icon {
-			font-size: 48rpx;
-			padding-right: 20rpx;
-			.icon-img {
-				height: 50rpx;
-				width: 50rpx;
+		justify-content: center;
+		width: 690rpx;
+		height: 80rpx;
+		margin: 0 auto;
+		margin-top: 30rpx;
+		font-size: $font-lg;
+		border-radius: 10rpx;
+		// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+	}
+
+	.list {
+		padding-left: 30rpx;
+		margin-top: 30rpx;
+		background-color: #ffffff;
+
+		.box {
+			display: flex;
+			align-items: center;
+			width: 100%;
+			height: 120rpx;
+			border-bottom: 1px solid $border-color-light;
+
+			.icon {
+				font-size: 48rpx;
+				padding-right: 20rpx;
+
+				.icon-img {
+					height: 50rpx;
+					width: 50rpx;
+				}
 			}
-		}
-		.iconweixin1 {
-			color: #18bf16;
-		}
-		.iconzhifubao {
-			color: #08aaec;
-		}
-		.title-box {
-			flex-grow: 1;
-			text-align: left;
-			.title {
-				font-size: $font-base + 2rpx;
-				color: $font-color-base;
+
+			.iconweixin1 {
+				color: #18bf16;
 			}
-			.node {
-				font-size: $font-sm;
-				color: $font-color-light;
+
+			.iconzhifubao {
+				color: #08aaec;
+			}
+
+			.title-box {
+				flex-grow: 1;
+				text-align: left;
+
+				.title {
+					font-size: $font-base + 2rpx;
+					color: $font-color-base;
+				}
+
+				.node {
+					font-size: $font-sm;
+					color: $font-color-light;
+				}
 			}
 		}
 	}
-}
-/deep/ .uni-radio-input {
-	width: 45rpx;
-	height: 45rpx;
-}
-.row {
-	display: flex;
-	align-items: center;
-	position: relative;
-	padding: 0 30upx;
-	height: 110upx;
-	background: #fff;
-
-	.tit {
-		flex-shrink: 0;
-		width: 250upx;
-		font-size: 30upx;
-		color: $font-color-dark;
-	}
 
-	.input {
-		flex: 1;
-		font-size: 30upx;
-		color: $font-color-dark;
+	/deep/ .uni-radio-input {
+		width: 45rpx;
+		height: 45rpx;
 	}
 
-	.iconlocation {
-		font-size: 36upx;
-		color: $font-color-light;
+	.row {
+		display: flex;
+		align-items: center;
+		position: relative;
+		padding: 0 30upx;
+		height: 110upx;
+		background: #fff;
+
+		.tit {
+			flex-shrink: 0;
+			width: 250upx;
+			font-size: 30upx;
+			color: $font-color-dark;
+		}
+
+		.input {
+			flex: 1;
+			font-size: 30upx;
+			color: $font-color-dark;
+		}
+
+		.iconlocation {
+			font-size: 36upx;
+			color: $font-color-light;
+		}
 	}
-}
-</style>
+</style>

+ 1 - 1
pages/index/index.vue

@@ -51,7 +51,7 @@
 				<image src="../../static/icon/in5.png"></image>
 				<text>消费券商城</text>
 			</view>
-			<view class="cate-item" @click="navTo('/pages/shoping/shopService','2')">
+			<view class="cate-item" @click="navTo('/pages/shoping/shopService','1')">
 				<image src="../../static/icon/in6.png"></image>
 				<text>养发馆</text>
 			</view>

+ 325 - 258
pages/merchant/merchant.vue

@@ -4,7 +4,9 @@
 		<view class="content">
 			<view class="userInfo">
 				<view class="userInfo-box">
-					<view class="userInfo-img"><image class="portrait" :src="image || '../../static/error/missing-face.png'"></image></view>
+					<view class="userInfo-img">
+						<image class="portrait" :src="image || '../../static/error/missing-face.png'"></image>
+					</view>
 					<view class="userInfo-xinxi">
 						<view class="title clamp">
 							<text>{{ name }}</text>
@@ -18,354 +20,419 @@
 			</view>
 			<view class="userInfoList">
 				<view class="userInfoList-top" @click="sao()">
-					<view class="top"><image src="../../static/merchant/saoma.png" mode=""></image></view>
+					<view class="top">
+						<image src="../../static/merchant/saoma.png" mode=""></image>
+					</view>
 					扫码核销
 				</view>
 				<view class="userInfoList-top" @click="navTo('/pages/merchant/storeQr')">
-					<view class="top"><image src="../../static/merchant/erweima.png" mode=""></image></view>
+					<view class="top">
+						<image src="../../static/merchant/erweima.png" mode=""></image>
+					</view>
 					店铺二维码
 				</view>
 				<view class="userInfoList-bottom" @click="navTo('/pages/merchant/finance')">
-					<view class="bottom"><image src="../../static/merchant/money.png" mode=""></image></view>
+					<view class="bottom">
+						<image src="../../static/merchant/money.png" mode=""></image>
+					</view>
 					店铺财务
 				</view>
 				<view class="userInfoList-bottom" @click="navTo('/pages/merchant/order')">
-					<view class="bottom"><image src="../../static/merchant/order.png" mode=""></image></view>
+					<view class="bottom">
+						<image src="../../static/merchant/order.png" mode=""></image>
+					</view>
 					订单管理
 				</view>
 				<view class="userInfoList-bottom" @click="navTo('/pages/merchant/commodity')">
-					<view class="bottom"><image src="../../static/merchant/shop.png" mode=""></image></view>
+					<view class="bottom">
+						<image src="../../static/merchant/shop.png" mode=""></image>
+					</view>
 					商品管理
 				</view>
 				<view class="userInfoList-bottom" @click="navTo('/pages/merchant/vipDetail')">
-					<view class="bottom"><image src="../../static/merchant/vip.png" mode=""></image></view>
+					<view class="bottom">
+						<image src="../../static/merchant/vip.png" mode=""></image>
+					</view>
 					店铺会员
 				</view>
 				<view class="userInfoList-bottom" @click="navTo('/pages/merchant/storeData')">
-					<view class="bottom"><image src="../../static/merchant/dianpu.png" mode=""></image></view>
+					<view class="bottom">
+						<image src="../../static/merchant/dianpu.png" mode=""></image>
+					</view>
 					店铺数据
 				</view>
 				<view class="userInfoList-bottom" @click="navTo('/pages/merchant/newfinance')" v-if="type == 1">
-					<view class="bottom"><image src="../../static/merchant/xiadan.png" mode=""></image></view>
+					<view class="bottom">
+						<image src="../../static/merchant/xiadan.png" mode=""></image>
+					</view>
 					店铺收益
 				</view>
 			</view>
 		</view>
 		<uni-popup ref="popuphx" class="agree-wrapper">
 			<view class="hx-wrapper">
-				<view class="hx-img"><image src="../../static/img/hxbg.png" mode=""></image></view>
+				<view class="hx-img">
+					<image src="../../static/img/hxbg.png" mode=""></image>
+				</view>
 				<view class="hx-body">
 					<view class="hx-title">输入核销码核销</view>
 					<input type="text" v-model="code" placeholder="请输入核销码" placeholder-class="hx-placeholder" />
 					<view class="hx-btn" @click="qhx">立即核销</view>
 				</view>
-				<view class="hx-close" @click="close"><image src="../../static/icon/close.png" mode=""></image></view>
+				<view class="hx-close" @click="close">
+					<image src="../../static/icon/close.png" mode=""></image>
+				</view>
 			</view>
 		</uni-popup>
 	</view>
 </template>
 
 <script>
-import { my, verific } from '@/api/merchant.js';
-import { storeIndex } from '@/api/merchant.js';
-import uniPopup from '@/components/uni-popup/uni-popup.vue';
-export default {
-	components: {
-		uniPopup
-	},
-	data() {
-		return {
-			type: '',
-			image: '',
-			name: '',
-			phone: '',
-			address: '',
-			code: ''
-		};
-	},
-	onLoad() {
-		const obj = this;
-		my({}).then(({ data }) => {
-			this.image = data.image;
-			this.name = data.name;
-			this.phone = data.phone;
-			this.address = data.detailed_address;
-		});
-		storeIndex({}).then(e => {
-			if (!e.data.apply) {
-				obj.type = -1;
-				if (e.data.store_info) {
-					obj.type = 1;
+	import {
+		my,
+		verific
+	} from '@/api/merchant.js';
+	import {
+		storeIndex
+	} from '@/api/merchant.js';
+	import {
+		writer
+	} from '@/api/sign.js'
+	import uniPopup from '@/components/uni-popup/uni-popup.vue';
+	export default {
+		components: {
+			uniPopup
+		},
+		data() {
+			return {
+				lx: '', //0是普通商品核销码,1是抽奖商品兑换码
+				type: '',
+				image: '',
+				name: '',
+				phone: '',
+				address: '',
+				code: ''
+			};
+		},
+		onLoad() {
+			const obj = this;
+			my({}).then(({
+				data
+			}) => {
+				this.image = data.image;
+				this.name = data.name;
+				this.phone = data.phone;
+				this.address = data.detailed_address;
+			});
+			storeIndex({}).then(e => {
+				if (!e.data.apply) {
+					obj.type = -1;
+					if (e.data.store_info) {
+						obj.type = 1;
+					}
+				} else {
+					obj.type = e.data.apply.status;
 				}
-			} else {
-				obj.type = e.data.apply.status;
-			}
-		});
-	},
-	methods: {
-		//跳转
-		navTo(url) {
-			uni.navigateTo({
-				url
 			});
 		},
-		close() {
-			this.$refs.popuphx.close();
-			this.code = '';
-		},
-		qhx() {
-			verific({
-				verify_code: this.code,
-				is_confirm: 1 //1是核销,0是查看
-			})
-				.then(e => {
-					this.$api.msg('核销成功');
-					this.close();
-				})
-				.catch(e => {
-					console.log(e);
+		methods: {
+			//跳转
+			navTo(url) {
+				uni.navigateTo({
+					url
 				});
-		},
-		//调取扫描二维码
-		sao() {
-			let obj = this;
-			// #ifndef H5
-			uni.scanCode({
-				success(e) {
-					obj.code = e.result;
-					obj.$refs.popuphx.open();
+			},
+			close() {
+				this.$refs.popuphx.close();
+				this.code = '';
+			},
+			qhx() {
+				if (this.lx == 0) {
+					verific({
+							verify_code: this.code,
+							is_confirm: 1 //1是核销,0是查看
+						})
+						.then(e => {
+							this.$api.msg('核销成功');
+							this.close();
+						})
+						.catch(e => {
+							console.log(e);
+						});
 				}
-			});
-			// #endif
-			// #ifdef H5
-			let wx = require('jweixin-module');
-			wx.scanQRCode({
-				needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
-				scanType: ['qrCode', 'barCode'], // 可以指定扫二维码还是一维码,默认二者都有
-				success: function(res) {
-					obj.code = res.resultStr; // 当needResult 为 1 时,扫码返回的结果
-					obj.$refs.popuphx.open();
+				if (this.lx == 1) {
+					writer({
+							verify_code: this.code,
+							is_confirm: 0 //0是核销,1是查看
+						})
+						.then(e => {
+							this.$api.msg('核销成功');
+							this.close();
+						})
+						.catch(e => {
+							console.log(e);
+						});
 				}
-			});
-			// #endif
+
+			},
+			//调取扫描二维码
+			sao() {
+				let obj = this;
+				// #ifndef H5
+				uni.scanCode({
+					success(e) {
+						let sz = e.result.split('&')
+						if (sz.length == 1) {
+							obj.lx == 0
+						} else {
+							obj.lx == 1
+						}
+						obj.code = sz[0];
+						obj.$refs.popuphx.open();
+					}
+				});
+				// #endif
+				// #ifdef H5
+				let wx = require('jweixin-module');
+				wx.scanQRCode({
+					needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
+					scanType: ['qrCode', 'barCode'], // 可以指定扫二维码还是一维码,默认二者都有
+					success: function(res) {
+						let sz = res.resultStr.split('&')
+						if (sz.length == 1) {
+							obj.lx == 0
+						} else {
+							obj.lx == 1
+						}
+						obj.code = sz[0];
+						obj.$refs.popuphx.open();
+					}
+				});
+				// #endif
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-page {
-	height: 100%;
-	background-color: #eeeded;
-	padding: 0;
-	margin: 0;
-}
-// 弹窗
-.hx-wrapper {
-	width: 536rpx;
-	height: 630rpx;
-	position: relative;
+	page {
+		height: 100%;
+		background-color: #eeeded;
+		padding: 0;
+		margin: 0;
+	}
 
-	// background-color: #fff;
-	.hx-img {
+	// 弹窗
+	.hx-wrapper {
 		width: 536rpx;
-		height: 281rpx;
+		height: 630rpx;
+		position: relative;
 
-		image {
+		// background-color: #fff;
+		.hx-img {
 			width: 536rpx;
 			height: 281rpx;
-		}
-	}
 
-	.hx-close {
-		position: absolute;
-		left: 243rpx;
-		bottom: -80rpx;
-		width: 52rpx;
-		height: 52rpx;
+			image {
+				width: 536rpx;
+				height: 281rpx;
+			}
+		}
 
-		image {
+		.hx-close {
+			position: absolute;
+			left: 243rpx;
+			bottom: -80rpx;
 			width: 52rpx;
 			height: 52rpx;
-		}
-	}
 
-	.hx-body {
-		width: 536rpx;
-		height: 349rpx;
-		background-color: #fff;
-		border-radius: 0 0 10rpx 10rpx;
-
-		.hx-title {
-			width: 536rpx;
-			font-size: 36rpx;
-			font-weight: 500;
-			color: #333333;
-			line-height: 1;
-			padding-top: 42rpx;
-			text-align: center;
+			image {
+				width: 52rpx;
+				height: 52rpx;
+			}
 		}
 
-		input {
-			width: 439rpx;
-			height: 68rpx;
-			background: #dbf3e9;
-			border-radius: 10rpx;
-			margin: 39rpx auto 0;
-			padding-left: 26rpx;
+		.hx-body {
+			width: 536rpx;
+			height: 349rpx;
+			background-color: #fff;
+			border-radius: 0 0 10rpx 10rpx;
 
-			.hx-placeholder {
-				font-size: 26rpx;
+			.hx-title {
+				width: 536rpx;
+				font-size: 36rpx;
 				font-weight: 500;
-				color: #52c696;
+				color: #333333;
+				line-height: 1;
+				padding-top: 42rpx;
+				text-align: center;
 			}
-		}
 
-		.hx-btn {
-			margin: 44rpx auto 0;
-			width: 353rpx;
-			height: 71rpx;
-			background: #52c696;
-			border-radius: 34rpx;
-			font-size: 36rpx;
-			font-weight: 500;
-			color: #f8f9f9;
-			line-height: 71rpx;
-			text-align: center;
+			input {
+				width: 439rpx;
+				height: 68rpx;
+				background: #dbf3e9;
+				border-radius: 10rpx;
+				margin: 39rpx auto 0;
+				padding-left: 26rpx;
+
+				.hx-placeholder {
+					font-size: 26rpx;
+					font-weight: 500;
+					color: #52c696;
+				}
+			}
+
+			.hx-btn {
+				margin: 44rpx auto 0;
+				width: 353rpx;
+				height: 71rpx;
+				background: #52c696;
+				border-radius: 34rpx;
+				font-size: 36rpx;
+				font-weight: 500;
+				color: #f8f9f9;
+				line-height: 71rpx;
+				text-align: center;
+			}
 		}
 	}
-}
-
-.content {
-	background-color: #eeeded;
-	margin: 0 30rpx;
-	display: flex;
-	flex-direction: column;
-}
 
-.background {
-	width: 100%;
-	height: 220rpx;
-	background-color: #75e5b6;
-}
+	.content {
+		background-color: #eeeded;
+		margin: 0 30rpx;
+		display: flex;
+		flex-direction: column;
+	}
 
-.userInfo {
-	margin-top: -110rpx;
-	display: flex;
-	flex-direction: column;
-	align-items: center;
-	background-color: #f9f9f9;
-	border-radius: 19rpx;
-	width: 100%;
-	height: 300rpx;
+	.background {
+		width: 100%;
+		height: 220rpx;
+		background-color: #75e5b6;
+	}
 
-	.userInfo-box {
+	.userInfo {
+		margin-top: -110rpx;
 		display: flex;
 		flex-direction: column;
 		align-items: center;
+		background-color: #f9f9f9;
+		border-radius: 19rpx;
+		width: 100%;
+		height: 300rpx;
 
-		.userInfo-img {
-			margin: -65rpx 0 0 0;
-			width: 130rpx;
-			height: 130rpx;
-			border: 5rpx solid #fff;
-			border-radius: 50%;
+		.userInfo-box {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
 
-			image {
+			.userInfo-img {
+				margin: -65rpx 0 0 0;
+				width: 130rpx;
+				height: 130rpx;
+				border: 5rpx solid #fff;
 				border-radius: 50%;
-				width: 100%;
-				height: 100%;
+
+				image {
+					border-radius: 50%;
+					width: 100%;
+					height: 100%;
+				}
 			}
-		}
 
-		.userInfo-xinxi {
-			.title {
-				margin: 20rpx 0;
-				font-size: 32rpx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #333333;
-				text-align: center;
+			.userInfo-xinxi {
+				.title {
+					margin: 20rpx 0;
+					font-size: 32rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #333333;
+					text-align: center;
+				}
+
+				.phone {
+					font-size: 28rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					line-height: 21rpx;
+				}
 			}
 
-			.phone {
+			.balance {
+				margin-top: 10rpx;
+				text-align: center;
+				width: 500rpx;
+				height: 60rpx;
+				background: #52c696;
+				border-radius: 30rpx;
 				font-size: 28rpx;
 				font-family: PingFang SC;
 				font-weight: 500;
-				color: #666666;
-				line-height: 21rpx;
+				color: #ffffff;
+				line-height: 60rpx;
 			}
 		}
-
-		.balance {
-			margin-top: 10rpx;
-			text-align: center;
-			width: 500rpx;
-			height: 60rpx;
-			background: #52c696;
-			border-radius: 30rpx;
-			font-size: 28rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #ffffff;
-			line-height: 60rpx;
-		}
 	}
-}
 
-.userInfoList {
-	display: flex;
-	flex-wrap: wrap;
-	justify-content: space-between;
-	.userInfoList-top {
-		position: relative;
-		margin: 15rpx 0;
+	.userInfoList {
 		display: flex;
+		flex-wrap: wrap;
+		justify-content: space-between;
 
-		justify-content: center;
-		align-items: center;
-		width: 340rpx;
-		height: 100rpx;
-		background: #ffffff;
-		border-radius: 20rpx;
-		font-size: 30rpx;
-		font-family: PingFang SC;
-		font-weight: 500;
-		color: #4d4d4d;
-		line-height: 21rpx;
+		.userInfoList-top {
+			position: relative;
+			margin: 15rpx 0;
+			display: flex;
 
-		.top {
-			position: absolute;
-			top: 50%;
-			left: 30rpx;
-			margin-top: -25rpx;
-			width: 50rpx;
-			height: 50rpx;
-			image {
-				width: 100%;
-				height: 100%;
+			justify-content: center;
+			align-items: center;
+			width: 340rpx;
+			height: 100rpx;
+			background: #ffffff;
+			border-radius: 20rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #4d4d4d;
+			line-height: 21rpx;
+
+			.top {
+				position: absolute;
+				top: 50%;
+				left: 30rpx;
+				margin-top: -25rpx;
+				width: 50rpx;
+				height: 50rpx;
+
+				image {
+					width: 100%;
+					height: 100%;
+				}
 			}
 		}
-	}
-	.userInfoList-bottom {
-		margin-bottom: 15rpx;
-		width: 340rpx;
-		height: 250rpx;
-		background: #f9f9f9;
-		border-radius: 20rpx;
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		align-items: center;
-		.bottom {
-			margin-bottom: 20rpx;
-			width: 68rpx;
-			height: 68rpx;
-			image {
-				width: 100%;
-				height: 100%;
+
+		.userInfoList-bottom {
+			margin-bottom: 15rpx;
+			width: 340rpx;
+			height: 250rpx;
+			background: #f9f9f9;
+			border-radius: 20rpx;
+			display: flex;
+			flex-direction: column;
+			justify-content: center;
+			align-items: center;
+
+			.bottom {
+				margin-bottom: 20rpx;
+				width: 68rpx;
+				height: 68rpx;
+
+				image {
+					width: 100%;
+					height: 100%;
+				}
 			}
 		}
 	}
-}
-</style>
+</style>

+ 333 - 281
pages/merchant/withdrawal.vue

@@ -5,19 +5,21 @@
 			<view class="flex">
 				<view class="buttom1">
 					<view class="icon">{{ money | getMoneyStyle }}</view>
-					<text class="text">可提现余额</text>
+					<text class="text">可兑换余额</text>
 				</view>
 			</view>
 		</view>
 		<view class="row-box">
-			<view class="title">提现金额</view>
+			<view class="title">兑换金额</view>
 			<view class="row">
 				<text class="tit">¥</text>
-				<input class="input" type="number" v-model="withdrawal" placeholder="请输入提现金额" placeholder-class="placeholder" />
-				<view class="buttom" @click="withdrawal = money">全部提现</view>
+				<input class="input" type="number" v-model="withdrawal" placeholder="请输入兑换金额"
+					placeholder-class="placeholder" />
+				<view class="buttom" @click="withdrawal = money">全部兑换</view>
 			</view>
 		</view>
-		<view class="tip" v-if="withdrawal != 0">实际到账{{ (withdrawal * (1 - sxfl) * 1).toFixed(2) }}元,手续费{{ (withdrawal * sxfl * 1).toFixed(2) }}元</view>
+		<view class="tip" v-if="withdrawal != 0">
+			实际到账{{ (withdrawal * (1 - sxfl) * 1).toFixed(2) }}元,手续费{{ (withdrawal * sxfl * 1).toFixed(2) }}元</view>
 		<!-- <view class="row-box">
 			<view class="title">手续费</view>
 			<view class="row">
@@ -32,9 +34,11 @@
 					<view class="box">
 						<view class="icon iconfont iconweixin1"></view>
 						<view class="title-box">
-							<view class="title"><text>提现至微信</text></view>
+							<view class="title"><text>兑换至微信</text></view>
+						</view>
+						<view class="right">
+							<radio value="weixin" color="#5dbc7c" :checked="type == 'weixin'" />
 						</view>
-						<view class="right"><radio value="weixin" color="#5dbc7c" :checked="type == 'weixin'" /></view>
 					</view>
 				</label>
 				<label>
@@ -42,19 +46,23 @@
 						<view class="icon iconfont iconzhifubao"></view>
 						<view class="title-box">
 							<view class="title">
-								<text v-if="aliData.fullname">提现至支付宝</text>
+								<text v-if="aliData.fullname">兑换至支付宝</text>
 								<text v-else>请创建支付宝账号</text>
 							</view>
 							<view class="node">
 								<text v-if="aliData.fullname">真实姓名({{ aliData.fullname }})</text>
 							</view>
 						</view>
-						<view class="right"><radio value="alipay" color="#5dbc7c" :checked="type == 'alipay'" /></view>
+						<view class="right">
+							<radio value="alipay" color="#5dbc7c" :checked="type == 'alipay'" />
+						</view>
 					</view>
 				</label>
 				<label>
 					<view class="box">
-						<view class="icon iconfont"><image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image></view>
+						<view class="icon iconfont">
+							<image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image>
+						</view>
 						<view class="title-box">
 							<view class="title">
 								<text v-if="bankData.bankno">{{ bankData.bank + ' ' + bankData.bankno }}</text>
@@ -64,7 +72,9 @@
 								<text v-if="bankData.fullname">真实姓名({{ bankData.fullname }})</text>
 							</view>
 						</view>
-						<view class="right"><radio value="bank" color="#5dbc7c" :checked="type == 'bank'" /></view>
+						<view class="right">
+							<radio value="bank" color="#5dbc7c" :checked="type == 'bank'" />
+						</view>
 					</view>
 				</label>
 			</radio-group>
@@ -81,310 +91,352 @@
 </template>
 
 <script>
-import { mapState, mapMutations } from 'vuex';
-import { getMoneyStyle } from '@/utils/rocessor.js';
-import { extractCash, extractBank, aliInfo, bankInfo, userBalance } from '@/api/wallet.js';
-import { extract, storeIndex } from '@/api/merchant.js';
-import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
-export default {
-	filters: {
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
 		getMoneyStyle
-	},
-	components: {
-		uniNoticeBar
-	},
-	data() {
-		return {
-			isTing: false,
-			type: 'alipay', //提现方式
-			money: '0.00', //可提现余额
-			withdrawal: '', //提现金额
-			reall: '', //实际到账
-			sxfl: '', //手续费率
-			aliData: {},
-			bankData: {},
-			weixin: '',
-			charge: 0,
+	} from '@/utils/rocessor.js';
+	import {
+		extractCash,
+		extractBank,
+		aliInfo,
+		bankInfo,
+		userBalance
+	} from '@/api/wallet.js';
+	import {
+		extract,
+		storeIndex
+	} from '@/api/merchant.js';
+	import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		components: {
+			uniNoticeBar
+		},
+		data() {
+			return {
+				isTing: false,
+				type: 'alipay', //提现方式
+				money: '0.00', //可提现余额
+				withdrawal: '', //提现金额
+				reall: '', //实际到账
+				sxfl: '', //手续费率
+				aliData: {},
+				bankData: {},
+				weixin: '',
+				charge: 0,
+				// #ifdef H5
+				weichatBsrowser: false
+				// #endif
+			};
+		},
+		onLoad(options) {
 			// #ifdef H5
-			weichatBsrowser: false
+			this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
 			// #endif
-		};
-	},
-	onLoad(options) {
-		// #ifdef H5
-		this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
-		// #endif
-		//加载提现信息
-		this.loadData();
-		// 加载提款账号信息
-		this.loadAli();
-		this.loadBank();
-	},
-	computed: {
-		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
-	},
-	methods: {
-		// 更新数据
-		dataUp() {
+			//加载提现信息
+			this.loadData();
+			// 加载提款账号信息
 			this.loadAli();
 			this.loadBank();
 		},
-		//加载数据
-		async loadAli(source) {
-			aliInfo({}).then(e => {
-				this.aliData = e.data;
-			});
-		},
-		// 加载银行卡信息
-		async loadBank() {
-			bankInfo({}).then(e => {
-				this.bankData = e.data;
-			});
+		computed: {
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
 		},
-		// 加载余额信息
-		async loadData() {
-			storeIndex({}).then(({ data }) => {
-				this.money = data.balance;
-				this.sxfl = ((data.store_info.commission * 1) / 100).toFixed(2);
-			});
-		},
-		// 跳转
-		navTo(url) {
-			uni.navigateTo({
-				url: url
-			});
-		},
-		// 切换选中对象
-		tabRadio(e) {
-			this.type = e.detail.value;
-		},
-		// 提交
-		confirm() {
-			let obj = this;
-			if (obj.isTing) {
-				console.log('jing');
-				return;
-			}
-			let data;
-			if (obj.type1 == 'brokerage_price') {
-				data = {
-					extract_type: obj.type, //bank -银行卡 alipay-支付宝 weixin-微信
-					money: obj.withdrawal //金额
-				};
-			} else {
-				data = {
-					extract_type: obj.type, //bank -银行卡 alipay-支付宝 weixin-微信
-					money: obj.withdrawal //金额
-				};
-			}
-			if (+obj.withdrawal < +obj.minPrice) {
-				uni.showToast({
-					title: '提现金额不可少于' + obj.minPrice,
-					duration: 2000,
-					mask: false,
-					icon: 'none'
+		methods: {
+			// 更新数据
+			dataUp() {
+				this.loadAli();
+				this.loadBank();
+			},
+			//加载数据
+			async loadAli(source) {
+				aliInfo({}).then(e => {
+					this.aliData = e.data;
 				});
-				return;
-			}
-			if (obj.type == 'alipay') {
-				data.name = obj.aliData.fullname;
-				data.alipay_code = obj.aliData.alino;
-			}
-			if (obj.type == 'weixin') {
-				data.weixin = '123456';
-			}
-			if (obj.type == 'bank') {
-				data.name = obj.bankData.fullname;
-				data.bankname = obj.bankData.bank;
-				data.cardnum = obj.bankData.bankno;
-			}
-
-			obj.isTing = true;
-			extract(data)
-				.then(e => {
+			},
+			// 加载银行卡信息
+			async loadBank() {
+				bankInfo({}).then(e => {
+					this.bankData = e.data;
+				});
+			},
+			// 加载余额信息
+			async loadData() {
+				storeIndex({}).then(({
+					data
+				}) => {
+					this.money = data.balance;
+					this.sxfl = ((data.store_info.commission * 1) / 100).toFixed(2);
+				});
+			},
+			// 跳转
+			navTo(url) {
+				uni.navigateTo({
+					url: url
+				});
+			},
+			// 切换选中对象
+			tabRadio(e) {
+				this.type = e.detail.value;
+			},
+			// 提交
+			confirm() {
+				let obj = this;
+				if (obj.isTing) {
+					console.log('jing');
+					return;
+				}
+				let data;
+				if (obj.type1 == 'brokerage_price') {
+					data = {
+						extract_type: obj.type, //bank -银行卡 alipay-支付宝 weixin-微信
+						money: obj.withdrawal //金额
+					};
+				} else {
+					data = {
+						extract_type: obj.type, //bank -银行卡 alipay-支付宝 weixin-微信
+						money: obj.withdrawal //金额
+					};
+				}
+				if (+obj.withdrawal < +obj.minPrice) {
 					uni.showToast({
-						title: '提交成功',
+						title: '兑换金额不可少于' + obj.minPrice,
 						duration: 2000,
-						position: 'top'
+						mask: false,
+						icon: 'none'
 					});
-					obj.isTing = false;
-					// 清空提现金额
-					obj.withdrawal = '';
-				})
-				.catch(e => {
-					obj.isTing = false;
-					console.log();
-				});
+					return;
+				}
+				if (obj.type == 'alipay') {
+					data.name = obj.aliData.fullname;
+					data.alipay_code = obj.aliData.alino;
+				}
+				if (obj.type == 'weixin') {
+					data.weixin = '123456';
+				}
+				if (obj.type == 'bank') {
+					data.name = obj.bankData.fullname;
+					data.bankname = obj.bankData.bank;
+					data.cardnum = obj.bankData.bankno;
+				}
+
+				obj.isTing = true;
+				extract(data)
+					.then(e => {
+						uni.showToast({
+							title: '提交成功',
+							duration: 2000,
+							position: 'top'
+						});
+						obj.isTing = false;
+						// 清空提现金额
+						obj.withdrawal = '';
+					})
+					.catch(e => {
+						obj.isTing = false;
+						console.log();
+					});
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-page {
-	height: 100%;
-}
-.content-money {
-	padding: 30rpx 0;
-	background: #ffffff;
-}
-.flex {
-	background-color: #ffffff;
-	text-align: center;
-	margin: 0 30rpx;
-	border-radius: $border-radius-sm;
-	.buttom {
-		font-size: $font-lg;
-		width: 50%;
-	}
-	.buttom1 {
-		font-size: $font-lg;
-		width: 100%;
+	page {
+		height: 100%;
 	}
-	.interval {
-		width: 2px;
-		height: 60rpx;
-		background-color: #eeeeee;
-	}
-	.icon {
-		background-size: 100%;
-		font-size: 42rpx;
-		color: $font-color-dark;
-		font-weight: bold;
-		background-repeat: no-repeat;
-		background-position: center;
-	}
-	.text {
-		font-size: 30rpx;
-		color: $font-color-light;
-	}
-}
-
-.row-box {
-	margin-top: 30rpx;
-	padding: 20rpx 30rpx;
-	background: #fff;
-	.title {
-		font-size: $font-base + 2rpx;
-		color: $font-color-dark;
+
+	.content-money {
+		padding: 30rpx 0;
+		background: #ffffff;
 	}
-	.row {
-		display: flex;
-		align-items: center;
-		position: relative;
-		height: 80rpx;
-		.tit {
-			flex-shrink: 0;
-			width: 40rpx;
-			font-size: 30rpx;
-			color: $font-color-dark;
+
+	.flex {
+		background-color: #ffffff;
+		text-align: center;
+		margin: 0 30rpx;
+		border-radius: $border-radius-sm;
+
+		.buttom {
+			font-size: $font-lg;
+			width: 50%;
 		}
-		.input {
-			flex: 1;
-			font-size: 30rpx;
+
+		.buttom1 {
+			font-size: $font-lg;
+			width: 100%;
+		}
+
+		.interval {
+			width: 2px;
+			height: 60rpx;
+			background-color: #eeeeee;
+		}
+
+		.icon {
+			background-size: 100%;
+			font-size: 42rpx;
 			color: $font-color-dark;
+			font-weight: bold;
+			background-repeat: no-repeat;
+			background-position: center;
 		}
-		.iconlocation {
-			font-size: 36rpx;
+
+		.text {
+			font-size: 30rpx;
 			color: $font-color-light;
 		}
+	}
+
+	.row-box {
+		margin-top: 30rpx;
+		padding: 20rpx 30rpx;
+		background: #fff;
+
+		.title {
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+		}
 
-		.buttom {
-			color: $font-color-spec;
-			font-size: $font-base;
+		.row {
+			display: flex;
+			align-items: center;
+			position: relative;
+			height: 80rpx;
+
+			.tit {
+				flex-shrink: 0;
+				width: 40rpx;
+				font-size: 30rpx;
+				color: $font-color-dark;
+			}
+
+			.input {
+				flex: 1;
+				font-size: 30rpx;
+				color: $font-color-dark;
+			}
+
+			.iconlocation {
+				font-size: 36rpx;
+				color: $font-color-light;
+			}
+
+			.buttom {
+				color: $font-color-spec;
+				font-size: $font-base;
+			}
 		}
 	}
-}
-.tip {
-	padding: 20rpx;
-	color: #e51c23;
-}
-.add-btn {
-	&.modified {
-		color: $base-color;
-	}
-	&.up {
-		background-color: $base-color;
-		color: #fff;
+
+	.tip {
+		padding: 20rpx;
+		color: #e51c23;
 	}
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 690rpx;
-	height: 80rpx;
-	margin: 0 auto;
-	margin-top: 30rpx;
-	font-size: $font-lg;
-	border-radius: 10rpx;
-	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
-}
-
-.list {
-	padding-left: 30rpx;
-	margin-top: 30rpx;
-	background-color: #ffffff;
-	.box {
+
+	.add-btn {
+		&.modified {
+			color: $base-color;
+		}
+
+		&.up {
+			background-color: $base-color;
+			color: #fff;
+		}
+
 		display: flex;
 		align-items: center;
-		width: 100%;
-		height: 120rpx;
-		border-bottom: 1px solid $border-color-light;
-		.icon {
-			font-size: 48rpx;
-			padding-right: 20rpx;
-			.icon-img {
-				height: 50rpx;
-				width: 50rpx;
+		justify-content: center;
+		width: 690rpx;
+		height: 80rpx;
+		margin: 0 auto;
+		margin-top: 30rpx;
+		font-size: $font-lg;
+		border-radius: 10rpx;
+		// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+	}
+
+	.list {
+		padding-left: 30rpx;
+		margin-top: 30rpx;
+		background-color: #ffffff;
+
+		.box {
+			display: flex;
+			align-items: center;
+			width: 100%;
+			height: 120rpx;
+			border-bottom: 1px solid $border-color-light;
+
+			.icon {
+				font-size: 48rpx;
+				padding-right: 20rpx;
+
+				.icon-img {
+					height: 50rpx;
+					width: 50rpx;
+				}
 			}
-		}
-		.iconweixin1 {
-			color: #18bf16;
-		}
-		.iconzhifubao {
-			color: #08aaec;
-		}
-		.title-box {
-			flex-grow: 1;
-			text-align: left;
-			.title {
-				font-size: $font-base + 2rpx;
-				color: $font-color-base;
+
+			.iconweixin1 {
+				color: #18bf16;
 			}
-			.node {
-				font-size: $font-sm;
-				color: $font-color-light;
+
+			.iconzhifubao {
+				color: #08aaec;
+			}
+
+			.title-box {
+				flex-grow: 1;
+				text-align: left;
+
+				.title {
+					font-size: $font-base + 2rpx;
+					color: $font-color-base;
+				}
+
+				.node {
+					font-size: $font-sm;
+					color: $font-color-light;
+				}
 			}
 		}
 	}
-}
-/deep/ .uni-radio-input {
-	width: 45rpx;
-	height: 45rpx;
-}
-.row {
-	display: flex;
-	align-items: center;
-	position: relative;
-	padding: 0 30upx;
-	height: 110upx;
-	background: #fff;
-
-	.tit {
-		flex-shrink: 0;
-		width: 250upx;
-		font-size: 30upx;
-		color: $font-color-dark;
-	}
 
-	.input {
-		flex: 1;
-		font-size: 30upx;
-		color: $font-color-dark;
+	/deep/ .uni-radio-input {
+		width: 45rpx;
+		height: 45rpx;
 	}
 
-	.iconlocation {
-		font-size: 36upx;
-		color: $font-color-light;
+	.row {
+		display: flex;
+		align-items: center;
+		position: relative;
+		padding: 0 30upx;
+		height: 110upx;
+		background: #fff;
+
+		.tit {
+			flex-shrink: 0;
+			width: 250upx;
+			font-size: 30upx;
+			color: $font-color-dark;
+		}
+
+		.input {
+			flex: 1;
+			font-size: 30upx;
+			color: $font-color-dark;
+		}
+
+		.iconlocation {
+			font-size: 36upx;
+			color: $font-color-light;
+		}
 	}
-}
-</style>
+</style>

+ 2 - 1
pages/received/index.vue

@@ -405,7 +405,7 @@
 			},
 			// 绑定上级
 			cast() {
-				if (this.spread_uid) {
+				if (!this.spread_uid) {
 					return this.$api.msg('请输入上级ID');
 				}
 				m_spread({
@@ -413,6 +413,7 @@
 				}).then(e => {
 					this.getUserInfo();
 					this.$api.msg('绑定成功');
+					this.cancelpass();
 				});
 			},
 			// 判断付款码是否可以使用

+ 134 - 0
pages/shoping/booked.vue

@@ -0,0 +1,134 @@
+<template>
+	<view class="content">
+		<view class="title">
+			服务日期
+		</view>
+		<its-calendar :sta_num="start_time" :end_num="end_time" :int_num="30" @getTime="getTime"></its-calendar>
+		<view class="info">
+			<view class="info-title">
+				预约人信息
+			</view>
+			<view class="info-info flex">
+				<view class="info-left">
+					手机号
+				</view>
+				<view class="info-right">
+					<input type="number" placeholder-class="pla" placeholder="请输入预约人手机号" v-model="phone">
+				</view>
+			</view>
+			<view class="info-info flex">
+				<view class="info-left">
+					预约人数
+				</view>
+				<view class="info-right">
+					<input type="number" placeholder="请输入预约预约人数" placeholder-class="pla" v-model="num">
+				</view>
+			</view>
+		</view>
+		<view class="btn">
+			确认预约
+		</view>
+	</view>
+</template>
+
+<script>
+	import its from '@/components/its-calendar/its-calendar.vue'
+	export default {
+		components: {
+			its
+		},
+		data() {
+			return {
+				start_time: 0,
+				end_time: 24,
+				phone: '',
+				num: ''
+			};
+		},
+		onLoad() {},
+		onShow() {},
+		onReachBottom() {},
+		onReady() {},
+		methods: {
+			getTime(e) {
+				console.log(e);
+				this.timed = true
+				this.choose_time = e.time.split(' ')[0]
+				this.choose_time_detail = e.time.split(' ')[1]
+
+			},
+		}
+	};
+</script>
+
+<style lang="scss">
+	page,
+	.content {
+		min-height: 100%;
+		height: auto;
+		background: #ffffff;
+	}
+
+	.title {
+		padding: 55rpx 35rpx 44rpx;
+		font-size: 32rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #000000;
+	}
+
+	.info {
+		padding: 0 34rpx;
+
+		.info-title {
+			padding-top: 28rpx;
+			border-top: 1px solid #F8F8F8;
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #000000;
+		}
+
+		.info-info {
+			padding: 28rpx 0;
+			border-bottom: 1px solid #F8F8F8;
+
+			.info-left {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #333333;
+			}
+
+			.info-right {
+				text-align: right;
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #333333;
+			}
+
+			.pla {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+			}
+		}
+	}
+
+	.btn {
+		width: 579rpx;
+		height: 80rpx;
+		background: #52c696;
+		border-radius: 15rpx;
+		margin: 124rpx auto 0;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+		line-height: 24rpx;
+	}
+</style>

+ 300 - 0
pages/shoping/shopDetail.vue

@@ -0,0 +1,300 @@
+<template>
+	<view class="content">
+		<view class="banner">
+			<image src="../../static/img/tc1.png" mode=""></image>
+		</view>
+		<view class="title">满园春养发店</view>
+		<view class="tip flex">
+			<view class="time">营业中 周一至周日 11:30-01:00</view>
+			<view class="num">780人消费</view>
+		</view>
+		<view class="address-box flex">
+			<view class="address-title">
+				<view class="address">康平路星星村综合楼20号</view>
+				<view class="ql">距您780m</view>
+			</view>
+			<view class="btn-box">
+				<view class="btn-item">
+					<image class="btn-image" src="../../static/icon/call.png" mode=""></image>
+					<view class="btn-font">电话</view>
+				</view>
+				<view class="btn-item">
+					<image class="btn-image" src="../../static/icon/dh.png" mode=""></image>
+					<view class="btn-font">导航</view>
+				</view>
+			</view>
+		</view>
+		<view class="appointment flex" @click="navTo('/pages/shoping/booked')">
+			<view class="appointment-left">
+				<image class="appointment-icon" src="../../static/icon/dh.png" mode=""></image>
+				<view class="appointment-title">预约到店</view>
+			</view>
+			<view class="appointment-right">
+				<view class="appointment-tip">近半年到店200人</view>
+				<image class="appointment-jt" src="../../static/user/right.png" mode=""></image>
+			</view>
+		</view>
+		<view class="xian"></view>
+		<view class="shop-box">
+			<view class="shop-item" v-for="(item,index) in 10">
+				<image class="shop-img" src="../../static/icon/hym.png" mode=""></image>
+				<view class="shop-info flex">
+					<view class="shop-main">
+						<view class="shop-title">【舒缓神经】头皮护理I深层清洁</view>
+						<view class="shop-tip">80分钟 I 足部 I 足疗</view>
+						<view class="shop-pirce">¥189</view>
+					</view>
+					<view class="shop-right">
+						<view class="btn">抢购</view>
+						<view class="people">1425人已购买</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {};
+		},
+		onLoad() {},
+		onShow() {},
+		onReachBottom() {},
+		onReady() {},
+		methods: {
+			navTo(url) {
+				uni.navigateTo({
+					url
+				})
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page,
+	.content {
+		min-height: 100%;
+		height: auto;
+		background: #ffffff;
+	}
+
+	.banner {
+		margin: 20rpx auto 0;
+		width: 697rpx;
+		height: 391rpx;
+		background: #FF4C4C;
+		border-radius: 20rpx;
+
+		image {
+			width: 100%;
+			height: 100%;
+			border-radius: 20rpx;
+		}
+	}
+
+	.title {
+		padding: 20rpx 26rpx 0;
+		font-size: 34rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #101010;
+	}
+
+	.tip {
+		margin: 0 26rpx;
+		padding: 20rpx 0 24rpx;
+		border-bottom: 1px solid #F1F1F1;
+
+		.time {
+			font-size: 24rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #101010;
+		}
+
+		.num {
+			font-size: 24rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #666666;
+		}
+	}
+
+	.address-box {
+		padding: 32rpx 0;
+		margin: 0 26rpx;
+		line-height: 1;
+		border-bottom: 1px solid #F1F1F1;
+
+		.address {
+			font-size: 24rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #101010;
+		}
+
+		.ql {
+			margin-top: 10rpx;
+			font-size: 24rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #666666;
+		}
+
+		.btn-box {
+			display: flex;
+			justify-content: flex-end;
+			align-items: center;
+
+			.btn-item {
+				margin-left: 50rpx;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+
+				.btn-image {
+					width: 46rpx;
+					height: 46rpx;
+				}
+
+				.btn-font {
+					margin-top: 8rpx;
+					font-size: 16rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+					line-height: 24rpx;
+				}
+			}
+		}
+	}
+
+	.appointment {
+		padding: 24rpx 26rpx 32rpx;
+
+		.appointment-left {
+			display: flex;
+			align-items: center;
+
+			.appointment-icon {
+				width: 36rpx;
+				height: 36rpx;
+			}
+
+			.appointment-title {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #101010;
+				margin-left: 14rpx;
+			}
+		}
+
+		.appointment-right {
+			display: flex;
+			align-items: center;
+
+			.appointment-tip {
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+				margin-right: 10rpx;
+			}
+
+			.appointment-jt {
+				width: 13rpx;
+				height: 23rpx;
+			}
+		}
+	}
+
+	.xian {
+		height: 20rpx;
+		width: 750rpx;
+		background: #F5F5F5;
+	}
+
+	.shop-box {
+		padding: 0 30rpx 50rpx 38rpx;
+
+		.shop-item {
+			border-bottom: 1px solid #EFEFEF;
+			display: flex;
+			align-items: center;
+			padding: 20rpx 0;
+
+			.shop-img {
+				flex-shrink: 0;
+				width: 120rpx;
+				height: 120rpx;
+				border-radius: 10rpx;
+			}
+
+			.shop-info {
+				width: 100%;
+				margin-left: 14rpx;
+				align-items: flex-end;
+
+				.shop-main {
+					line-height: 1;
+
+					.shop-title {
+						font-size: 26rpx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #000000;
+					}
+
+					.shop-tip {
+						margin-top: 20rpx;
+						font-size: 20rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+					}
+
+					.shop-pirce {
+						margin-top: 16rpx;
+						font-size: 28rpx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #F65920;
+					}
+				}
+
+				.shop-right {
+					display: flex;
+					flex-direction: column;
+					justify-content: flex-end;
+					align-items: flex-end;
+
+					.btn {
+						width: 105rpx;
+						height: 47rpx;
+						background: #FF4C4C;
+						border-radius: 24rpx;
+						display: flex;
+						justify-content: center;
+						align-items: center;
+						font-size: 28rpx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FFFFFF;
+					}
+
+					.people {
+						margin-top: 22rpx;
+						font-size: 24rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 8 - 2
pages/shoping/shopService.vue

@@ -10,7 +10,7 @@
 			</view>
 		</view>
 		<view class="shoplist">
-			<view class="shoplist-item flex" v-for="(item,index) in 10">
+			<view class="shoplist-item flex" v-for="(item,index) in 10" @click="navTo('/pages/shoping/shopDetail')">
 				<image class="shoplist-image" src="../../static/icon/hym.png" mode=""></image>
 				<view class="shoplist-info">
 					<view class="info-top">
@@ -55,7 +55,13 @@
 		onShow() {},
 		onReachBottom() {},
 		onReady() {},
-		methods: {}
+		methods: {
+			navTo(url) {
+				uni.navigateTo({
+					url
+				})
+			}
+		}
 	};
 </script>
 

+ 195 - 0
pages/sign/info.vue

@@ -0,0 +1,195 @@
+<template>
+	<view class="content">
+		<view class="main">
+			<view class="main-list" v-for="(item,index) in list" :key="index">
+				<view class="list-top flex">
+					<view class="list-title">
+						获得{{item.award}}{{item.award_type ==1?'积分':''}}
+					</view>
+					<view class="list-btn" :class="{current: item.status != 0}" @click="dh(item)">
+						{{item.status == 0?'兑换' : '已兑换'}}
+					</view>
+				</view>
+				<view class="list-bottom flex">
+					<view class="list-time">
+						抽奖时间:{{item.add}}
+					</view>
+					<view class="list-time">
+						过期时间:{{item.limit}}
+					</view>
+				</view>
+			</view>
+		</view>
+		<uni-popup ref="ewm" type="center">
+			<view class="hym-wrap">
+				<view class="hym-tit">
+					兑换码
+				</view>
+				<view class="hym-tip">
+					{{wwrdhm}}
+				</view>
+				<view class="hym-val">
+					<tki-qrcode :key="dhm" cid="tki-qrcode-canvas" ref="qrcode" :val="dhm" :size="300" unit="upx"
+						background="#ffffff" foreground="#333333" pdground="#333333" icon="" :iconSize="0" :lv="3"
+						:onval="true" :loadMake="true" :usingComponents="true" />
+				</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	import empty from '@/components/empty';
+	import {
+		getTime
+	} from '@/utils/rocessor.js'
+	import {
+		gachalog,
+		dhjp
+	} from '@/api/sign.js'
+	import tkiQrcodes from '@/components/tki-qrcode/tki-qrcode.vue';
+	export default {
+		components: {
+			empty,
+			uniLoadMore,
+			tkiQrcodes
+		},
+		data() {
+			return {
+				page: 1,
+				limit: 10,
+				loadingType: 'more',
+				list: [],
+				dhm: ''
+			};
+		},
+		onLoad() {},
+		onShow() {
+			this.loadData()
+		},
+		onReachBottom() {
+			this.loadData()
+		},
+		onReady() {},
+		methods: {
+			loadData() {
+				if (this.loadingType == 'nomore' || this.loadingType == 'loading') {
+					return
+				}
+				this.loadingType = 'loading'
+				gachalog({
+					page: this.page,
+					limit: this.limit
+				}).then(({
+					data
+				}) => {
+					data.list.forEach(e => {
+						e.add = getTime(e.add_time)
+						e.limit = getTime(e.limit_time)
+					})
+					this.list = this.list.concat(data.list);
+					console.log(this.list);
+					this.page++
+					if (this.limit == data.list.length) {
+						this.loadingType = 'more'
+					} else {
+						this.loadingType = 'nomore'
+					}
+				})
+			},
+			dh(item) {
+				if (item.award_type == 1) {
+					dhjp({}, item.id).then(e => {
+						item.status = 1
+						this.$api.msg('兑换成功')
+					})
+				} else {
+					this.wwrdhm = item.unicode
+					this.dhm = item.unicode + '&lhlswez'
+					this.$refs.ewm.open()
+				}
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page,
+	.content {
+		min-height: 100%;
+		height: auto;
+	}
+
+	.main {
+		padding: 20rpx;
+
+		.main-list {
+			padding: 20rpx;
+			background: #ffffff;
+			margin-top: 20rpx;
+			border-radius: 20rpx;
+
+			.list-top {
+				line-height: 1;
+
+				.list-title {
+					font-size: $font-lg;
+					color: $font-color-base;
+				}
+
+				.list-btn {
+					padding: 20rpx 50rpx;
+					border-radius: 40rpx;
+					background: #52c696;
+					color: #ffffff;
+				}
+
+				.current {
+					background: #e7ebf2;
+				}
+
+			}
+
+			.list-bottom {
+				margin-top: 20rpx;
+
+				.list-time {
+					font-size: 24rpx;
+					color: $font-color-light;
+				}
+			}
+		}
+	}
+
+	.hym-wrap {
+		width: 500rpx;
+		background-color: #fff;
+		text-align: center;
+		border-radius: 20rpx;
+		padding: 20rpx;
+
+		.hym-tit {
+			color: $base-color;
+			font-size: 48rpx;
+		}
+
+		.hym-tip {
+			padding: 20rpx;
+			font-size: 24rpx;
+			word-wrap: break-word;
+		}
+
+		.hym-val {
+			width: 300rpx;
+			height: 300rpx;
+			margin: auto;
+		}
+
+		.hym-num {
+			font-size: 28rpx;
+			font-weight: bold;
+			padding-top: 20rpx;
+		}
+	}
+</style>

+ 82 - 53
pages/sign/prize.vue

@@ -6,75 +6,87 @@
 		<view class="title">
 			<image src="../../static/user/prizetitle.png" mode=""></image>
 		</view>
-		<view class="zp">
-			<ljs-turntable :show="true" @getPrize="getPrize" :startPosition="false" :list="awardList" />
+		<view class="zp" v-if="show == 0">
+			<pt-lottery ref="pt-lottery" lotteryBg="../../static/user/prizezhuan.png"
+				lotteryBtn="../../static/user/prizebtn.png" :times="3" :prizeList="prizeList" @start="start"
+				@end="end"></pt-lottery>
+		</view>
+		<view class="btn" @click="navTo('/pages/sign/info')">
+			抽奖记录
 		</view>
-
 	</view>
 </template>
 
 <script>
-	import ljsTurntable from '@/components/ljs-turntable/ljs-turntable.vue'
+	import {
+		getgacha,
+		gacha
+	} from '@/api/sign.js'
+	import ptLottery from '@/components/pt-lottery/pt-lottery.vue'
 	export default {
 		comments: {
-			ljsTurntable
+			ptLottery
 		},
 		data() {
 			return {
-				award: 1,
-				awardList: [{
-						name: "Iphone 13",
-						prop: 2,
-						probability: 0.01, // 概率,所有项和必须等于1。
-						state: true, // 是否中奖
-						id: 1
-					},
-					{
-						name: "谢谢参与",
-						prop: 5,
-						probability: 0.27,
-						state: true, // 是否中奖
-						id: 5
-					},
-					{
-						name: "10个积分",
-						prop: 12,
-						probability: 0.3,
-						state: true, // 是否中奖
-						id: 3
-					},
-					{
-						name: "蓝牙耳机",
-						prop: 5,
-						probability: 0.02,
-						state: true, // 是否中奖
-						id: 5
-					},
-					{
-						name: "66个积分",
-						prop: 4.5,
-						probability: 0.1,
-						state: true, // 是否中奖
-						id: 4
-					},
-					{
-						name: "精美大礼包",
-						prop: 7.5,
-						probability: 0.3,
-						state: true, // 是否中奖
-						id: 5
-					},
-				]
+				prizeList: [],
+				show: 1,
+				zj: ''
 			};
 		},
 		onLoad() {},
-		onShow() {},
+		onShow() {
+			this.loadData();
+		},
 		onReachBottom() {},
 		onReady() {},
 		methods: {
-			getPrize(state, id, prizeName) {
-				console.log(state, id, prizeName)
+			start() {
+				const obj = this;
+				gacha().then(e => {
+					console.log(e);
+					for (let i = 0; i < obj.prizeList.length; i++) {
+						if (e.data.gacha_res.award == obj.prizeList[i].value) {
+							obj.$refs['pt-lottery'].init(i + '')
+							this.zj = obj.prizeList[i]
+							break;
+						}
+					}
+				})
+
+			},
+			end() {
+				this.$api.msg('恭喜抽中' + this.zj.prizeName)
+			},
+			navTo(url) {
+				uni.navigateTo({
+					url
+				})
 			},
+			loadData() {
+				const obj = this
+				getgacha().then(({
+					data
+				}) => {
+					data.award.forEach(e => {
+						console.log(e);
+						let ar = {
+							prizeName: '',
+							value: ''
+						}
+						if (e.award_type == 1) {
+							ar.prizeName = e.award + '积分';
+							ar.value = e.award
+
+						} else {
+							ar.prizeName = e.award
+							ar.value = e.award
+						}
+						obj.prizeList.push(ar)
+					})
+					obj.show = 0
+				})
+			}
 		}
 	};
 </script>
@@ -113,8 +125,25 @@
 	}
 
 	.zp {
-		margin: 50rpx auto 0;
+		margin: 100rpx auto 0;
 		width: 750rpx;
 		height: 750rpx;
 	}
+
+	.btn {
+		position: relative;
+		z-index: 2;
+		margin: 50rpx auto 0;
+		width: 476rpx;
+		height: 83rpx;
+		background: #FF5421;
+		border-radius: 42rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		font-size: 28rpx;
+		font-family: Source Han Sans SC;
+		font-weight: 400;
+		color: #FFFFFF;
+	}
 </style>

+ 885 - 776
pages/wallet/openMember.vue

@@ -1,11 +1,15 @@
 <template>
 	<view class="conter">
 		<view class="top">
-			<view class="bg"><view class="bg-item"></view></view>
+			<view class="bg">
+				<view class="bg-item"></view>
+			</view>
 			<view class="card">
 				<view class="opennow">{{ userInfo.level > 0 ? '已开通' : '立即开通' }}</view>
 				<view class="card-top flex">
-					<view class="avtur"><image :src="userInfo.avatar || '/static/error/missing-face.png'" mode=""></image></view>
+					<view class="avtur">
+						<image :src="userInfo.avatar || '/static/error/missing-face.png'" mode=""></image>
+					</view>
 					<view class="main">
 						<view class="name">{{ userInfo.nickname }}</view>
 						<view class="tip" v-if="userInfo.level == 0">尚未开通会员</view>
@@ -25,9 +29,13 @@
 		</view>
 		<view class="vip">
 			<view class="system-title">
-				<view class="img" style="margin-right: 45rpx;"><image class="img" src="../../static/img/vip-left.png"></image></view>
+				<view class="img" style="margin-right: 45rpx;">
+					<image class="img" src="../../static/img/vip-left.png"></image>
+				</view>
 				<view class="title">会员特权</view>
-				<view class="img" style="margin-left: 45rpx;"><image class="img" src="../../static/img/vip-right.png"></image></view>
+				<view class="img" style="margin-left: 45rpx;">
+					<image class="img" src="../../static/img/vip-right.png"></image>
+				</view>
 			</view>
 			<view class="item-box flex">
 				<view class="item" v-for="(item, index) in viplist" :key="index">
@@ -40,12 +48,17 @@
 		<view class="store" @click="chooseStore" v-if="choose == 0">选择门店: {{ storeInfo1.name || '请选择门店' }}</view>
 		<view class="vip">
 			<view class="system-title">
-				<view class="img" style="margin-right: 45rpx;"><image class="img" src="../../static/img/vip-left.png"></image></view>
+				<view class="img" style="margin-right: 45rpx;">
+					<image class="img" src="../../static/img/vip-left.png"></image>
+				</view>
 				<view class="title">会员特权</view>
-				<view class="img" style="margin-left: 45rpx;"><image class="img" src="../../static/img/vip-right.png"></image></view>
+				<view class="img" style="margin-left: 45rpx;">
+					<image class="img" src="../../static/img/vip-right.png"></image>
+				</view>
 			</view>
 			<view class="money-box flex">
-				<view class="money" v-for="(item, index) in payList" @click="changevip(item, index)" :class="{ current: index == choose }">
+				<view class="money" v-for="(item, index) in payList" @click="changevip(item, index)"
+					:class="{ current: index == choose }">
 					<view class="money-name">{{ item.name }}</view>
 					<view class="now-money">
@@ -74,7 +87,9 @@
 				<view class="popup-pay">
 					<view class="paybox-top flex">
 						<view class="type">选择支付方式</view>
-						<view class="image" @click="close"><image src="https://zhibo.liuniu946.com/img/x.png" mode="aspectFill"></image></view>
+						<view class="image" @click="close">
+							<image src="https://zhibo.liuniu946.com/img/x.png" mode="aspectFill"></image>
+						</view>
 					</view>
 					<!-- #ifndef APP-PLUS -->
 					<view class="paybox-main flex" @click="changePayType(1)">
@@ -82,7 +97,10 @@
 							<image src="https://zhibo.liuniu946.com/img/weixin.png" mode="aspectFill"></image>
 							<view class="zf">微信支付</view>
 						</view>
-						<label class="radio1"><radio style="transform:scale(0.7)" value="" :checked="payType == 1" color="#52C696"></radio></label>
+						<label class="radio1">
+							<radio style="transform:scale(0.7)" value="" :checked="payType == 1" color="#52C696">
+							</radio>
+						</label>
 					</view>
 					<!-- #endif -->
 					<!-- #ifdef APP-PLUS -->
@@ -91,7 +109,10 @@
 							<view class="icon iconfont iconzhifubao"></view>
 							<view class="zf">支付宝支付</view>
 						</view>
-						<label class="radio1"><radio style="transform:scale(0.7)" value="" :checked="payType == 3" color="#52C696"></radio></label>
+						<label class="radio1">
+							<radio style="transform:scale(0.7)" value="" :checked="payType == 3" color="#52C696">
+							</radio>
+						</label>
 					</view>
 					<!-- #endif -->
 					<view class="paybox-main flex" @click="changePayType(2)">
@@ -99,7 +120,10 @@
 							<image src="https://zhibo.liuniu946.com/img/yue.png" mode="aspectFill"></image>
 							<view class="zf">余额支付</view>
 						</view>
-						<label class="radio"><radio style="transform:scale(0.7)" class="rad" value="" :checked="payType == 2" color="#52C696"></radio></label>
+						<label class="radio">
+							<radio style="transform:scale(0.7)" class="rad" value="" :checked="payType == 2"
+								color="#52C696"></radio>
+						</label>
 					</view>
 				</view>
 				<view class="buttom flex">
@@ -118,860 +142,945 @@
 </template>
 
 <script>
-import { mapState, mapMutations } from 'vuex';
-import { becomeVip, getVip, setUserRed, claseauto } from '@/api/user.js';
-import { getUserInfo } from '@/api/user.js';
-import { timeComputed } from '@/utils/rocessor.js';
-// #ifdef H5
-import weixinObj from '@/plugin/jweixin-module/index.js';
-// #endif
-
-export default {
-	computed: {
-		...mapState(['weichatObj', 'storeInfo', 'canChange']),
-		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
-	},
-	onLoad(option) {
-		this.state = option.state;
-		this.getVip();
-		console.log(this.userInfo);
-		this.checkedAuto = +this.userInfo.red_packet == 0 ? false : true;
-		if (this.userInfo.pay_valid_time != null) {
-			let TimeObj = timeComputed(this.userInfo.pay_valid_time * 1000);
-			this.type = TimeObj.type == 0 ? true : false;
-			this.day = TimeObj.day;
-		}
-		if (this.storeInfo != '') {
-			this.storeInfo1 = this.storeInfo;
-		}
-	},
-	data() {
-		return {
-			storeInfo1: {
-				name: ''
-			},
-			checkedZdLoding: false, //自动拼团是否加载中
-			checkedAutoZd: 1, //开启关闭自动拼团
-			timeEnd: true, //判断会员是否超时
-			viplist: [
-				{
-					pic: '../../static/img/yjjl.png',
-					title: '佣金奖励',
-					tip: '更多佣金奖励'
-				},
-				{
-					pic: '../../static/img/zszk.png',
-					title: '专属折扣',
-					tip: '优享会员折扣'
-				},
-				{
-					pic: '../../static/img/tdjl.png',
-					title: '团队奖励',
-					tip: '更多团队奖励'
-				}
-			],
-			state: '',
-			// #ifndef APP-PLUS
-			payType: 1,
-			payName: 'weixin',
-			// #endif
-			// #ifdef APP-PLUS
-			payType: 2,
-			payName: 'yue',
-			// #endif
-			day: '', //会员的天数
-			name: '',
-			payList: [],
-			froms: '',
-			money: 0,
-			explain: '',
-			now_money: '', // 当前余额
-			payLoding: false, //判断是否支付中
-			choose: 0,
-			level_id: '',
-			checkedAuto: false, //是否开启自动领红包
-			checkedLoding: false, //请求自动加载设置保存中
-			store: {
-				name: ''
-			}
-		};
-	},
-	methods: {
-		...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
-		// 开启关闭自动拼团
-		autoOut(e) {
-			uni.showLoading({
-				title: '关闭中...',
-				mask: true
-			});
-			claseauto()
-				.then(e => {
-					uni.hideLoading();
-					uni.showToast({
-						title: '成功关闭!'
-					});
-				})
-				.catch(e => {
-					uni.hideLoading();
-				});
-		}, //自动拼团是否加载中
-		// 获取vip等级
-		getVip() {
-			getVip({}).then(({ data }) => {
-				console.log(data);
-				this.payList = data;
-				// 设置默认选中的对象
-				this.level_id = data[0].id;
-				this.money = data[0].money;
-				console.log(this.payList);
-			});
-		},
-		// 开启关闭自动加载
-		changeAuto(e) {
-			console.log(e);
-			if (this.checkedLoding) {
-				return;
-			}
-			this.checkedLoding = true;
-			setUserRed({
-				red_packet: e
-			})
-				.then(e => {
-					uni.showToast({
-						title: '设置成功!'
-					});
-					this.checkedLoding = false;
-				})
-				.catch(e => {
-					this.checkedAuto = false;
-					this.checkedLoding = false;
-				});
-		},
-		submit() {
-			// if (this.money == 0) {
-			// 	uni.showModal({
-			// 		title: '提示',
-			// 		content: '请选择要开通的会员'
-			// 	});
-			// } else {
-			// }
-			if (this.choose == 0) {
-				if (!this.storeInfo1.name) {
-					return this.$api.msg('请选择门店');
-				}
-			}
-			console.log('打开支付弹窗');
-			this.$refs.popupPay.open();
-		},
-		close() {
-			this.$refs.popupPay.close();
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		becomeVip,
+		getVip,
+		setUserRed,
+		claseauto
+	} from '@/api/user.js';
+	import {
+		getUserInfo
+	} from '@/api/user.js';
+	import {
+		timeComputed
+	} from '@/utils/rocessor.js';
+	// #ifdef H5
+	import weixinObj from '@/plugin/jweixin-module/index.js';
+	// #endif
+
+	export default {
+		computed: {
+			...mapState(['weichatObj', 'storeInfo', 'canChange']),
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
 		},
-		changePayType(type) {
-			this.payType = type;
-			console.log('this.payType', this.payType);
-			if (this.payType == 1) {
-				this.payName = 'weixin';
-				console.log('weixin', this.payName);
+		onLoad(option) {
+			this.state = option.state;
+			this.getVip();
+			console.log(this.userInfo);
+			this.checkedAuto = +this.userInfo.red_packet == 0 ? false : true;
+			if (this.userInfo.pay_valid_time != null) {
+				let TimeObj = timeComputed(this.userInfo.pay_valid_time * 1000);
+				this.type = TimeObj.type == 0 ? true : false;
+				this.day = TimeObj.day;
 			}
-			if (this.payType == 2) {
-				this.payName = 'yue';
-				console.log('yue', this.payName);
+			if (this.storeInfo != '') {
+				this.storeInfo1 = this.storeInfo;
 			}
-			if (this.payType == 3) {
-				this.payName = 'ali';
-				console.log('ali', this.payName);
-			}
-		},
-		readyPay() {
-			// this.$refs.popup.open();
-			this.pay();
 		},
-		changevip(item, index) {
-			this.level_id = item.id;
-			this.choose = index;
-			console.log(this.level_id);
-			this.money = item.money;
-		},
-		getUserInfoB() {
-			getUserInfo({})
-				.then(({ data }) => {
-					this.setUserInfo(data);
-					// if (this.state == 1) {
-					// 	uni.switchTa({
-					// 		url: '/pages/user/user'
-					// 	});
-					// } else {
-					// 	uni.navigateBack();
-					// }
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-		// 选择门店
-		chooseStore() {
-			if (this.canChange == 0) {
-				return;
-			} else {
-				uni.navigateTo({
-					url: '/pages/shoping/list?type=6'
-				});
-			}
-		},
-		pay() {
-			let obj = this;
-			console.log('点击');
-			try {
-				let obj = this;
-				obj.payLoding = true;
-				// #ifdef H5
-				// 获取当前是否为微信浏览器
-				obj.froms = uni.getStorageSync('weichatBrowser') || '';
+		data() {
+			return {
+				storeInfo1: {
+					name: ''
+				},
+				checkedZdLoding: false, //自动拼团是否加载中
+				checkedAutoZd: 1, //开启关闭自动拼团
+				timeEnd: true, //判断会员是否超时
+				viplist: [{
+						pic: '../../static/img/yjjl.png',
+						title: '绿积分奖励',
+						tip: '更多绿积分奖励'
+					},
+					{
+						pic: '../../static/img/zszk.png',
+						title: '专属折扣',
+						tip: '优享会员折扣'
+					},
+					{
+						pic: '../../static/img/tdjl.png',
+						title: '团队奖励',
+						tip: '更多团队奖励'
+					}
+				],
+				state: '',
+				// #ifndef APP-PLUS
+				payType: 1,
+				payName: 'weixin',
+				// #endif
+				// #ifdef APP-PLUS
+				payType: 2,
+				payName: 'yue',
 				// #endif
+				day: '', //会员的天数
+				name: '',
+				payList: [],
+				froms: '',
+				money: 0,
+				explain: '',
+				now_money: '', // 当前余额
+				payLoding: false, //判断是否支付中
+				choose: 0,
+				level_id: '',
+				checkedAuto: false, //是否开启自动领红包
+				checkedLoding: false, //请求自动加载设置保存中
+				store: {
+					name: ''
+				}
+			};
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
+			// 开启关闭自动拼团
+			autoOut(e) {
 				uni.showLoading({
-					title: '支付中',
+					title: '关闭中...',
 					mask: true
 				});
-				console.log(obj.storeInfo1, '654321');
-				if (obj.choose == 0 && !obj.storeInfo1.name) {
-					this.$api.msg('请选择门店');
+				claseauto()
+					.then(e => {
+						uni.hideLoading();
+						uni.showToast({
+							title: '成功关闭!'
+						});
+					})
+					.catch(e => {
+						uni.hideLoading();
+					});
+			}, //自动拼团是否加载中
+			// 获取vip等级
+			getVip() {
+				getVip({}).then(({
+					data
+				}) => {
+					console.log(data);
+					this.payList = data;
+					// 设置默认选中的对象
+					this.level_id = data[0].id;
+					this.money = data[0].money;
+					console.log(this.payList);
+				});
+			},
+			// 开启关闭自动加载
+			changeAuto(e) {
+				console.log(e);
+				if (this.checkedLoding) {
 					return;
 				}
-				let data;
-				if (obj.choose == 0) {
-					data = {
-						store_id: obj.storeInfo1.id,
-						pay_type: this.payName,
-						level_id: obj.level_id,
-						// #ifdef H5
-						from: obj.froms ? 'weixin' : 'H5', //来源
-						// #endif
-						// #ifdef MP-WEIXIN
-						from: 'routine', //来源
-						// #endif
-						// #ifdef APP-PLUS
-						from: 'app' //来源
-						// #endif
-					};
-				} else {
-					data = {
-						pay_type: this.payName,
-						level_id: obj.level_id,
-						// #ifdef H5
-						from: obj.froms ? 'weixin' : 'H5', //来源
-						// #endif
-						// #ifdef MP-WEIXIN
-						from: 'routine', //来源
-						// #endif
-						// #ifdef APP-PLUS
-						from: 'app' //来源
-						// #endif
-					};
-				}
-				console.log(data, '传值');
-				becomeVip(data).then(({ data }) => {
-					console.log('fufei', data);
-					uni.hideLoading();
-					if (obj.payName == 'ali') {
-						const url = data.data;
-						console.log(url, 'url');
-						uni.requestPayment({
-							provider: 'alipay',
-							orderInfo: url,
-							success: res => {
-								console.log(res);
-								uni.showToast({
-									title: '充值成功',
-									duration: 2000
-								});
-							},
-							fail: e => {
-								console.log(e);
-							},
-							complete: () => {}
+				this.checkedLoding = true;
+				setUserRed({
+						red_packet: e
+					})
+					.then(e => {
+						uni.showToast({
+							title: '设置成功!'
 						});
-						obj.payLoding = false;
-					}
-					if (data.status == 'PAY_ERROR') {
-						console.log(data);
+						this.checkedLoding = false;
+					})
+					.catch(e => {
+						this.checkedAuto = false;
+						this.checkedLoding = false;
+					});
+			},
+			submit() {
+				// if (this.money == 0) {
+				// 	uni.showModal({
+				// 		title: '提示',
+				// 		content: '请选择要开通的会员'
+				// 	});
+				// } else {
+				// }
+				if (this.choose == 0) {
+					if (!this.storeInfo1.name) {
+						return this.$api.msg('请选择门店');
 					}
-					if (data.status == 'SUCCESS') {
-						obj.$refs.popupPay.close();
-						obj.getUserInfoB();
-						// getUserInfo({})
-						// 	.then(({ data }) => {
-						// 		obj.setUserInfo(data);
-						// 		if (obj.state == 1) {
-						// 			uni.navigateTo({
-						// 				url: '/pages/vip/success'
-						// 			});
-						// 		} else {
-						// 			uni.navigateBack();
-						// 		}
-						// 	})
-						// 	.catch(e => {
-						// 		console.log(e);
+				}
+				console.log('打开支付弹窗');
+				this.$refs.popupPay.open();
+			},
+			close() {
+				this.$refs.popupPay.close();
+			},
+			changePayType(type) {
+				this.payType = type;
+				console.log('this.payType', this.payType);
+				if (this.payType == 1) {
+					this.payName = 'weixin';
+					console.log('weixin', this.payName);
+				}
+				if (this.payType == 2) {
+					this.payName = 'yue';
+					console.log('yue', this.payName);
+				}
+				if (this.payType == 3) {
+					this.payName = 'ali';
+					console.log('ali', this.payName);
+				}
+			},
+			readyPay() {
+				// this.$refs.popup.open();
+				this.pay();
+			},
+			changevip(item, index) {
+				this.level_id = item.id;
+				this.choose = index;
+				console.log(this.level_id);
+				this.money = item.money;
+			},
+			getUserInfoB() {
+				getUserInfo({})
+					.then(({
+						data
+					}) => {
+						this.setUserInfo(data);
+						// if (this.state == 1) {
+						// 	uni.switchTa({
+						// 		url: '/pages/user/user'
 						// 	});
+						// } else {
+						// 	uni.navigateBack();
+						// }
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			// 选择门店
+			chooseStore() {
+				if (this.canChange == 0) {
+					return;
+				} else {
+					uni.navigateTo({
+						url: '/pages/shoping/list?type=6'
+					});
+				}
+			},
+			pay() {
+				let obj = this;
+				console.log('点击');
+				try {
+					let obj = this;
+					obj.payLoding = true;
+					// #ifdef H5
+					// 获取当前是否为微信浏览器
+					obj.froms = uni.getStorageSync('weichatBrowser') || '';
+					// #endif
+					uni.showLoading({
+						title: '支付中',
+						mask: true
+					});
+					console.log(obj.storeInfo1, '654321');
+					if (obj.choose == 0 && !obj.storeInfo1.name) {
+						this.$api.msg('请选择门店');
+						return;
 					}
-					console.log('-----', data);
-					let da = data.result.jsConfig;
-					if (obj.payName == 'weixin' || obj.payName == 'routine') {
-						// let da = data.result.jsConfig;
-						console.log('--da--', da);
-						let data = {
+					let data;
+					if (obj.choose == 0) {
+						data = {
+							store_id: obj.storeInfo1.id,
+							pay_type: this.payName,
+							level_id: obj.level_id,
 							// #ifdef H5
-							timestamp: da.timestamp,
+							from: obj.froms ? 'weixin' : 'H5', //来源
 							// #endif
-							// #ifdef MP
-							timeStamp: da.timestamp,
+							// #ifdef MP-WEIXIN
+							from: 'routine', //来源
 							// #endif
-							nonceStr: da.nonceStr,
-							package: da.package,
-							signType: da.signType,
-							paySign: da.paySign,
-							success: function(res) {
-								console.log(res);
-								// obj.getUserInfoB();
-								getUserInfo({})
-									.then(({ data }) => {
-										obj.setUserInfo(data);
-										uni.showToast({
-											title: '开通成功',
-											duration: 2000
-										});
-										setTimeout(function() {
-											uni.navigateBack();
-										}, 1500);
-									})
-									.catch(e => {
-										console.log(e);
+							// #ifdef APP-PLUS
+							from: 'app' //来源
+							// #endif
+						};
+					} else {
+						data = {
+							pay_type: this.payName,
+							level_id: obj.level_id,
+							// #ifdef H5
+							from: obj.froms ? 'weixin' : 'H5', //来源
+							// #endif
+							// #ifdef MP-WEIXIN
+							from: 'routine', //来源
+							// #endif
+							// #ifdef APP-PLUS
+							from: 'app' //来源
+							// #endif
+						};
+					}
+					console.log(data, '传值');
+					becomeVip(data).then(({
+						data
+					}) => {
+						console.log('fufei', data);
+						uni.hideLoading();
+						if (obj.payName == 'ali') {
+							const url = data.data;
+							console.log(url, 'url');
+							uni.requestPayment({
+								provider: 'alipay',
+								orderInfo: url,
+								success: res => {
+									console.log(res);
+									uni.showToast({
+										title: '充值成功',
+										duration: 2000
 									});
-							},
-							fail: e => {
-								console.log(e);
+								},
+								fail: e => {
+									console.log(e);
+								},
+								complete: () => {}
+							});
+							obj.payLoding = false;
+						}
+						if (data.status == 'PAY_ERROR') {
+							console.log(data);
+						}
+						if (data.status == 'SUCCESS') {
+							obj.$refs.popupPay.close();
+							obj.getUserInfoB();
+							// getUserInfo({})
+							// 	.then(({ data }) => {
+							// 		obj.setUserInfo(data);
+							// 		if (obj.state == 1) {
+							// 			uni.navigateTo({
+							// 				url: '/pages/vip/success'
+							// 			});
+							// 		} else {
+							// 			uni.navigateBack();
+							// 		}
+							// 	})
+							// 	.catch(e => {
+							// 		console.log(e);
+							// 	});
+						}
+						console.log('-----', data);
+						let da = data.result.jsConfig;
+						if (obj.payName == 'weixin' || obj.payName == 'routine') {
+							// let da = data.result.jsConfig;
+							console.log('--da--', da);
+							let data = {
+								// #ifdef H5
+								timestamp: da.timestamp,
+								// #endif
+								// #ifdef MP
+								timeStamp: da.timestamp,
+								// #endif
+								nonceStr: da.nonceStr,
+								package: da.package,
+								signType: da.signType,
+								paySign: da.paySign,
+								success: function(res) {
+									console.log(res);
+									// obj.getUserInfoB();
+									getUserInfo({})
+										.then(({
+											data
+										}) => {
+											obj.setUserInfo(data);
+											uni.showToast({
+												title: '开通成功',
+												duration: 2000
+											});
+											setTimeout(function() {
+												uni.navigateBack();
+											}, 1500);
+										})
+										.catch(e => {
+											console.log(e);
+										});
+								},
+								fail: e => {
+									console.log(e);
+								}
+							};
+							console.log('--data--', data);
+							// #ifdef MP
+							wx.requestPayment(data);
+							// #endif
+							// #ifdef H5
+							if (obj.payName == 'weixin') {
+								weixinObj.chooseWXPay(data);
 							}
-						};
-						console.log('--data--', data);
-						// #ifdef MP
-						wx.requestPayment(data);
-						// #endif
-						// #ifdef H5
-						if (obj.payName == 'weixin') {
-							weixinObj.chooseWXPay(data);
+							// #endif
 						}
-						// #endif
-					}
 
-					uni.hideLoading();
-					// #ifdef H5
-					if (data.status == 'PAY_ERROR') {
-						console.log(data);
-					}
-					if (data.status == 'SUCCESS') {
-						obj.$refs.popupPay.close();
-						obj.getUserInfoB();
-						getUserInfo({})
-							.then(({ data }) => {
-								obj.setUserInfo(data);
-								uni.showToast({
-									title: '开通成功',
-									duration: 2000
+						uni.hideLoading();
+						// #ifdef H5
+						if (data.status == 'PAY_ERROR') {
+							console.log(data);
+						}
+						if (data.status == 'SUCCESS') {
+							obj.$refs.popupPay.close();
+							obj.getUserInfoB();
+							getUserInfo({})
+								.then(({
+									data
+								}) => {
+									obj.setUserInfo(data);
+									uni.showToast({
+										title: '开通成功',
+										duration: 2000
+									});
+									setTimeout(function() {
+										uni.navigateBack();
+									}, 1500);
+								})
+								.catch(e => {
+									console.log(e);
 								});
-								setTimeout(function() {
-									uni.navigateBack();
-								}, 1500);
-							})
-							.catch(e => {
-								console.log(e);
-							});
-					}
-					// #endif
-				});
-			} catch (e) {
-				console.log('fufiecw', e);
-				//TODO handle the exception
+						}
+						// #endif
+					});
+				} catch (e) {
+					console.log('fufiecw', e);
+					//TODO handle the exception
+				}
 			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-.outBottom {
-	width: 190rpx;
-	height: 69rpx;
-	background: #3a3a3b;
-	border-radius: 35rpx;
-	color: #ffffff;
-	line-height: 69rpx;
-	text-align: center;
-	font-size: 27rpx;
-	font-family: PingFang SC;
-	font-weight: 500;
-}
-.top {
-	width: 750rpx;
-	background-color: #fff;
-	padding-top: 45rpx;
-	padding-bottom: 45rpx;
-	// height: 626rpx;
-	.bg {
-		position: absolute;
-		top: 0;
-		left: 0;
-		right: 0;
-		width: 750rpx;
-		height: 200rpx;
-		overflow: hidden;
-		.bg-item {
-			width: 750rpx;
-			height: 145rpx;
-			background-color: #363533;
-			border-radius: 0 0 25% 25%;
-			// position: absolute;
-			// bottom: 0;
-			// top: -2200rpx;
-			// left: 0;
-			// right: 0;
-			// margin:0 auto;
-		}
-	}
-	.title {
-		position: relative;
-		z-index: 10;
-		width: 100%;
-		padding-top: 20rpx;
+	.outBottom {
+		width: 190rpx;
+		height: 69rpx;
+		background: #3a3a3b;
+		border-radius: 35rpx;
+		color: #ffffff;
+		line-height: 69rpx;
 		text-align: center;
-		font-size: 34rpx;
+		font-size: 27rpx;
 		font-family: PingFang SC;
-		font-weight: bold;
-		color: #333333;
+		font-weight: 500;
 	}
-	.card {
-		position: relative;
-		margin: 0 auto 0;
-		z-index: 10;
-		width: 655rpx;
-		// height: 324rpx;
-		background: linear-gradient(225deg, #ffeed2 0%, #fed591 100%);
-		border-radius: 24rpx;
-		padding: 28rpx 25rpx 30rpx 36rpx;
-		.opennow {
-			width: 190rpx;
-			line-height: 69rpx;
-			background: #3a3a3b;
-			border-radius: 35rpx;
+
+	.top {
+		width: 750rpx;
+		background-color: #fff;
+		padding-top: 45rpx;
+		padding-bottom: 45rpx;
+
+		// height: 626rpx;
+		.bg {
 			position: absolute;
-			top: 39rpx;
-			right: 25rpx;
-			font-size: 30rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #ffffff;
+			top: 0;
+			left: 0;
+			right: 0;
+			width: 750rpx;
+			height: 200rpx;
+			overflow: hidden;
+
+			.bg-item {
+				width: 750rpx;
+				height: 145rpx;
+				background-color: #363533;
+				border-radius: 0 0 25% 25%;
+				// position: absolute;
+				// bottom: 0;
+				// top: -2200rpx;
+				// left: 0;
+				// right: 0;
+				// margin:0 auto;
+			}
+		}
+
+		.title {
+			position: relative;
+			z-index: 10;
+			width: 100%;
+			padding-top: 20rpx;
 			text-align: center;
+			font-size: 34rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
 		}
-		.card-top {
-			justify-content: flex-start;
-			.avtur {
-				width: 90rpx;
-				height: 90rpx;
-				border-radius: 50%;
-				margin-right: 10rpx;
-				image {
-					background-color: #eee;
-					width: 100%;
-					height: 100%;
+
+		.card {
+			position: relative;
+			margin: 0 auto 0;
+			z-index: 10;
+			width: 655rpx;
+			// height: 324rpx;
+			background: linear-gradient(225deg, #ffeed2 0%, #fed591 100%);
+			border-radius: 24rpx;
+			padding: 28rpx 25rpx 30rpx 36rpx;
+
+			.opennow {
+				width: 190rpx;
+				line-height: 69rpx;
+				background: #3a3a3b;
+				border-radius: 35rpx;
+				position: absolute;
+				top: 39rpx;
+				right: 25rpx;
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #ffffff;
+				text-align: center;
+			}
+
+			.card-top {
+				justify-content: flex-start;
+
+				.avtur {
+					width: 90rpx;
+					height: 90rpx;
 					border-radius: 50%;
+					margin-right: 10rpx;
+
+					image {
+						background-color: #eee;
+						width: 100%;
+						height: 100%;
+						border-radius: 50%;
+					}
+				}
+
+				.name {
+					font-size: 30rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #333333;
+				}
+
+				.tip {
+					font-size: 20rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #333333;
+					opacity: 0.52;
 				}
 			}
-			.name {
+
+			.btn {
+				position: absolute;
+				top: 40rpx;
+				right: 24rpx;
+				width: 190rpx;
+				height: 69rpx;
+				background: #3a3a3b;
+				border-radius: 35rpx;
 				font-size: 30rpx;
 				font-family: PingFang SC;
 				font-weight: 500;
+				color: #ffffff;
+				line-height: 69rpx;
+				text-align: center;
+			}
+		}
+
+		.bottom {
+			margin-top: 40rpx;
+
+			.font-title {
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
 				color: #333333;
 			}
-			.tip {
-				font-size: 20rpx;
+
+			.font-tip {
+				font-size: 22rpx;
 				font-family: PingFang SC;
 				font-weight: 500;
-				color: #333333;
-				opacity: 0.52;
+				color: #343434;
 			}
 		}
-		.btn {
-			position: absolute;
-			top: 40rpx;
-			right: 24rpx;
-			width: 190rpx;
-			height: 69rpx;
-			background: #3a3a3b;
-			border-radius: 35rpx;
-			font-size: 30rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #ffffff;
-			line-height: 69rpx;
-			text-align: center;
-		}
-	}
-	.bottom {
-		margin-top: 40rpx;
-		.font-title {
+
+		.turn {
+			width: 108rpx;
+			height: 51rpx;
+			background: #ffffff;
+			border-radius: 26rpx;
+			padding: 10rpx;
 			font-size: 30rpx;
 			font-family: PingFang SC;
 			font-weight: bold;
 			color: #333333;
-		}
-		.font-tip {
-			font-size: 22rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #343434;
+			display: flex;
+			align-items: center;
+
+			.yuan {
+				display: inline-block;
+				width: 35rpx;
+				height: 35rpx;
+				background: linear-gradient(112deg, #ffe5bb, #fed591);
+				border-radius: 50%;
+				margin-right: 12rpx;
+			}
 		}
 	}
-	.turn {
-		width: 108rpx;
-		height: 51rpx;
+
+	.vip {
+		margin-top: 20rpx;
 		background: #ffffff;
-		border-radius: 26rpx;
-		padding: 10rpx;
-		font-size: 30rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #333333;
-		display: flex;
-		align-items: center;
-		.yuan {
-			display: inline-block;
-			width: 35rpx;
-			height: 35rpx;
-			background: linear-gradient(112deg, #ffe5bb, #fed591);
-			border-radius: 50%;
-			margin-right: 12rpx;
-		}
-	}
-}
-.vip {
-	margin-top: 20rpx;
-	background: #ffffff;
-	padding-bottom: 54rpx;
-	.system-title {
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		padding-top: 40rpx;
-		.title {
-			font-size: 32rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #1d2023;
-		}
+		padding-bottom: 54rpx;
 
-		.img {
-			width: 170rpx;
-			height: 2rpx;
-			display: block;
-		}
-	}
-	.item-box {
-		margin-top: 40rpx;
-		justify-content: center;
-		align-items: center;
-		.item {
-			flex: 1;
+		.system-title {
 			display: flex;
-			flex-direction: column;
+			justify-content: center;
 			align-items: center;
-			image {
-				width: 100rpx;
-				height: 100rpx;
-			}
-			.item-title {
-				margin-top: 14rpx;
-				font-size: 24rpx;
+			padding-top: 40rpx;
+
+			.title {
+				font-size: 32rpx;
 				font-family: PingFang SC;
-				font-weight: 500;
-				color: #333333;
+				font-weight: bold;
+				color: #1d2023;
 			}
-			.item-tip {
-				margin-top: 10rpx;
-				font-size: 20rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #999999;
+
+			.img {
+				width: 170rpx;
+				height: 2rpx;
+				display: block;
 			}
 		}
-	}
-	.money-box {
-		margin-top: 40rpx;
-		justify-content: center;
-		align-items: center;
-		padding: 0 47rpx 50rpx 25rpx;
-		.current {
-			border: 1rpx solid #fed591 !important;
-			background: #fff8ec !important;
-		}
-		.money {
-			margin-left: 22rpx;
-			flex: 1;
-			display: flex;
-			flex-direction: column;
+
+		.item-box {
+			margin-top: 40rpx;
+			justify-content: center;
 			align-items: center;
-			width: 204rpx;
-			height: 296rpx;
-			background: #f5f5f5;
-			border: 1rpx solid #ffffff;
-			border-radius: 20rpx;
-			position: relative;
-			.tj {
-				position: absolute;
-				top: 0;
-				left: 0;
-				width: 90rpx;
-				height: 44rpx;
-				text-align: center;
-				line-height: 44rpx;
-				font-size: 25rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #ffffff;
-				.tj-bg {
-					width: 90rpx;
-					height: 44rpx;
+
+			.item {
+				flex: 1;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+
+				image {
+					width: 100rpx;
+					height: 100rpx;
 				}
-				text {
-					display: inline-block;
-					position: relative;
-					top: -56rpx;
+
+				.item-title {
+					margin-top: 14rpx;
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #333333;
 				}
-			}
-			.money-name {
-				margin-top: 58rpx;
-				font-size: 33rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #644931;
-			}
-			.now-money {
-				font-size: 30rpx;
-				font-family: FZCuHeiSongS-B-GB;
-				font-weight: 400;
-				color: #f7cf9c;
-				text {
-					font-size: 50rpx;
+
+				.item-tip {
+					margin-top: 10rpx;
+					font-size: 20rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
 				}
 			}
-			.bf-money {
-				font-size: 33rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				text-decoration: line-through;
-				color: #9a5a12;
-				opacity: 0.35;
-			}
-			.moneyc {
-				background: #f7cf9c !important;
-				color: #ffffff !important;
+		}
+
+		.money-box {
+			margin-top: 40rpx;
+			justify-content: center;
+			align-items: center;
+			padding: 0 47rpx 50rpx 25rpx;
+
+			.current {
+				border: 1rpx solid #fed591 !important;
+				background: #fff8ec !important;
 			}
-			.money-tip {
-				margin-top: 10rpx;
-				width: 158rpx;
-				height: 45rpx;
+
+			.money {
+				margin-left: 22rpx;
+				flex: 1;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				width: 204rpx;
+				height: 296rpx;
 				background: #f5f5f5;
-				border: 1px solid #f7cf9c;
-				border-radius: 23rpx;
-				padding: 5rpx 10rpx;
-				font-size: 25rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #f7cf9c;
-				image {
-					position: relative;
-					top: 2rpx;
-					width: 23rpx;
-					height: 23rpx;
+				border: 1rpx solid #ffffff;
+				border-radius: 20rpx;
+				position: relative;
+
+				.tj {
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 90rpx;
+					height: 44rpx;
+					text-align: center;
+					line-height: 44rpx;
+					font-size: 25rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #ffffff;
+
+					.tj-bg {
+						width: 90rpx;
+						height: 44rpx;
+					}
+
+					text {
+						display: inline-block;
+						position: relative;
+						top: -56rpx;
+					}
+				}
+
+				.money-name {
+					margin-top: 58rpx;
+					font-size: 33rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #644931;
+				}
+
+				.now-money {
+					font-size: 30rpx;
+					font-family: FZCuHeiSongS-B-GB;
+					font-weight: 400;
+					color: #f7cf9c;
+
+					text {
+						font-size: 50rpx;
+					}
+				}
+
+				.bf-money {
+					font-size: 33rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					text-decoration: line-through;
+					color: #9a5a12;
+					opacity: 0.35;
+				}
+
+				.moneyc {
+					background: #f7cf9c !important;
+					color: #ffffff !important;
+				}
+
+				.money-tip {
+					margin-top: 10rpx;
+					width: 158rpx;
+					height: 45rpx;
+					background: #f5f5f5;
+					border: 1px solid #f7cf9c;
+					border-radius: 23rpx;
+					padding: 5rpx 10rpx;
+					font-size: 25rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #f7cf9c;
+
+					image {
+						position: relative;
+						top: 2rpx;
+						width: 23rpx;
+						height: 23rpx;
+					}
 				}
 			}
 		}
 	}
-}
-.zw {
-	height: 98rpx;
-	width: 750rpx;
-}
-.box-buttom {
-	width: 750rpx;
-	height: 98rpx;
-
-	// position: absolute;
-	// buttom:0;
-	position: fixed;
-	bottom: 0;
-	right: 0;
-	// position: absolute;
-	// buttom:100rpx;
-	display: flex;
-	align-items: center;
-	background: #34332f;
-	.price-left {
-		display: flex;
-		.entrepreneurship {
-			font-size: 24rpx;
-			font-weight: 500;
-			color: #bbbbbb;
-			margin-left: 16rpx;
-			text {
-				font-size: 30rpx;
-				color: #ffffff;
-			}
-		}
-	}
-	.price-right {
-		position: absolute;
-		bottom: 0;
-		right: 0;
-		// position: fixed;
-		// buttom: 0;
-		// right: 0;
-		width: 280rpx;
-		height: 108rpx;
-		background: #fed591;
-		font-size: 36rpx;
-		font-weight: bold;
-		color: #000000;
-		display: flex;
-		justify-content: center;
-		align-items: center;
+
+	.zw {
+		height: 98rpx;
+		width: 750rpx;
 	}
-	.price-right1 {
-		position: absolute;
+
+	.box-buttom {
+		width: 750rpx;
+		height: 98rpx;
+
+		// position: absolute;
+		// buttom:0;
+		position: fixed;
 		bottom: 0;
 		right: 0;
-		// position: fixed;
-		// buttom: 0;
-		// right: 0;
-		width: 280rpx;
-		height: 108rpx;
-		background: #b5b5b5;
-		font-size: 36rpx;
-		font-weight: bold;
-		color: #ffffff;
+		// position: absolute;
+		// buttom:100rpx;
 		display: flex;
-		justify-content: center;
 		align-items: center;
-	}
-}
-.popup-box {
-	width: 100%;
-	height: 450rpx;
-	background: #ffffff;
-}
-.popup-pay {
-	position: relative;
-	justify-content: space-between;
-	padding: 0rpx 25rpx 32rpx 25rpx;
-	.paybox-top {
-		padding-top: 38rpx;
-		width: 100%;
-		.type {
-			font-size: 28rpx;
-			font-family: PingFang SC;
+		background: #34332f;
+
+		.price-left {
+			display: flex;
+
+			.entrepreneurship {
+				font-size: 24rpx;
+				font-weight: 500;
+				color: #bbbbbb;
+				margin-left: 16rpx;
+
+				text {
+					font-size: 30rpx;
+					color: #ffffff;
+				}
+			}
+		}
+
+		.price-right {
+			position: absolute;
+			bottom: 0;
+			right: 0;
+			// position: fixed;
+			// buttom: 0;
+			// right: 0;
+			width: 280rpx;
+			height: 108rpx;
+			background: #fed591;
+			font-size: 36rpx;
 			font-weight: bold;
-			color: #333333;
+			color: #000000;
+			display: flex;
+			justify-content: center;
+			align-items: center;
 		}
-		.image {
-			padding-right: 24rpx;
-			padding-bottom: 10rpx;
-			image {
-				width: 16rpx;
-				height: 16rpx;
-			}
+
+		.price-right1 {
+			position: absolute;
+			bottom: 0;
+			right: 0;
+			// position: fixed;
+			// buttom: 0;
+			// right: 0;
+			width: 280rpx;
+			height: 108rpx;
+			background: #b5b5b5;
+			font-size: 36rpx;
+			font-weight: bold;
+			color: #ffffff;
+			display: flex;
+			justify-content: center;
+			align-items: center;
 		}
 	}
-	.paybox-main {
+
+	.popup-box {
 		width: 100%;
-		margin-top: 54rpx;
-		.zftype {
-			padding-left: 5rpx;
-			image {
-				width: 38rpx;
-				height: 40rpx;
-			}
-			.zf {
-				padding-left: 18rpx;
+		height: 450rpx;
+		background: #ffffff;
+	}
+
+	.popup-pay {
+		position: relative;
+		justify-content: space-between;
+		padding: 0rpx 25rpx 32rpx 25rpx;
+
+		.paybox-top {
+			padding-top: 38rpx;
+			width: 100%;
+
+			.type {
 				font-size: 28rpx;
 				font-family: PingFang SC;
-				font-weight: 400;
-				color: #3f454b;
+				font-weight: bold;
+				color: #333333;
+			}
+
+			.image {
+				padding-right: 24rpx;
+				padding-bottom: 10rpx;
+
+				image {
+					width: 16rpx;
+					height: 16rpx;
+				}
+			}
+		}
+
+		.paybox-main {
+			width: 100%;
+			margin-top: 54rpx;
+
+			.zftype {
+				padding-left: 5rpx;
+
+				image {
+					width: 38rpx;
+					height: 40rpx;
+				}
+
+				.zf {
+					padding-left: 18rpx;
+					font-size: 28rpx;
+					font-family: PingFang SC;
+					font-weight: 400;
+					color: #3f454b;
+				}
 			}
 		}
 	}
-}
-.buttom {
-	width: 100%;
-	height: 113rpx;
-	padding-top: 20rpx;
-	align-items: center;
-	.heji {
-		height: 100%;
-		width: 50%;
-		padding-left: 23rpx;
+
+	.buttom {
+		width: 100%;
+		height: 113rpx;
 		padding-top: 20rpx;
-		font-size: 28rpx;
-		font-family: PingFang SC;
-		font-weight: 400;
-		color: #3f454b;
-		text {
-			font-size: 24rpx;
+		align-items: center;
+
+		.heji {
+			height: 100%;
+			width: 50%;
+			padding-left: 23rpx;
+			padding-top: 20rpx;
+			font-size: 28rpx;
 			font-family: PingFang SC;
-			font-weight: bold;
-			color: #ff0000;
-			.money {
-				font-size: 36rpx;
+			font-weight: 400;
+			color: #3f454b;
+
+			text {
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #ff0000;
+
+				.money {
+					font-size: 36rpx;
+				}
 			}
 		}
+
+		.zhifu {
+			width: 50%;
+			height: 92rpx;
+			background: #52c696;
+			text-align: center;
+			line-height: 92rpx;
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ffffff;
+		}
 	}
-	.zhifu {
-		width: 50%;
-		height: 92rpx;
-		background: #52c696;
-		text-align: center;
-		line-height: 92rpx;
-		font-size: 32rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #ffffff;
-	}
-}
-.ling-box {
-	position: relative;
-	z-index: 10;
-	width: 654rpx;
-	height: auto;
-	background: #fff8ec;
-	border: 1px solid #fed591;
-	border-radius: 24rpx;
-	margin: 20rpx auto 0;
-	padding: 20rpx 24rpx 15rpx 42rpx;
-	.ling-title {
-		font-size: 30rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #644931;
+
+	.ling-box {
+		position: relative;
+		z-index: 10;
+		width: 654rpx;
+		height: auto;
+		background: #fff8ec;
+		border: 1px solid #fed591;
+		border-radius: 24rpx;
+		margin: 20rpx auto 0;
+		padding: 20rpx 24rpx 15rpx 42rpx;
+
+		.ling-title {
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #644931;
+		}
+
+		.ling-tip {
+			font-size: 22rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #644931;
+			line-height: 24px;
+			opacity: 0.67;
+		}
 	}
-	.ling-tip {
-		font-size: 22rpx;
-		font-family: PingFang SC;
-		font-weight: 500;
-		color: #644931;
-		line-height: 24px;
-		opacity: 0.67;
+
+	.store {
+		width: 750rpx;
+		margin-top: 20rpx;
+		padding: 20rpx;
+		background: #ffffff;
 	}
-}
-.store {
-	width: 750rpx;
-	margin-top: 20rpx;
-	padding: 20rpx;
-	background: #ffffff;
-}
-</style>
+</style>

+ 277 - 236
pages/wallet/withdrawal.vue

@@ -1,25 +1,26 @@
 <template>
 	<view class="content">
-		<uni-notice-bar single="true" text="每月25号到月底可提现上月结算余额"></uni-notice-bar>
+		<uni-notice-bar single="true" text="每月25号到月底可兑换上月结算余额"></uni-notice-bar>
 		<view class="content-money">
 			<view class="flex ">
 				<view class="buttom">
 					<view class="icon">{{ money | getMoneyStyle }}</view>
-					<text class="text">可提现金额</text>
+					<text class="text">可兑换金额</text>
 				</view>
 				<view class="interval"></view>
 				<view class="buttom">
 					<view class=" icon">{{ freeze | getMoneyStyle }}</view>
-					<text class="text">待审核提现金额</text>
+					<text class="text">待审核金额</text>
 				</view>
 			</view>
 		</view>
 		<view class="row-box">
-			<view class="title">提现金额</view>
+			<view class="title">兑换金额</view>
 			<view class="row">
 				<text class="tit">¥</text>
-				<input class="input" type="number" v-model="withdrawal" :placeholder="'最低提现金额' + minPrice + '元'" placeholder-class="placeholder" />
-				<view class="buttom" @click="withdrawal = money">全部提现</view>
+				<input class="input" type="number" v-model="withdrawal" :placeholder="'最低兑换金额' + minPrice + '元'"
+					placeholder-class="placeholder" />
+				<view class="buttom" @click="withdrawal = money">全部兑换</view>
 			</view>
 		</view>
 		<view class="row-box">
@@ -36,9 +37,11 @@
 					<view class="box">
 						<view class="icon iconfont iconweixin1"></view>
 						<view class="title-box">
-							<view class="title"><text>提现至微信</text></view>
+							<view class="title"><text>兑换至微信</text></view>
+						</view>
+						<view class="right">
+							<radio value="weixin" color="#5dbc7c" :checked="type == 'weixin'" />
 						</view>
-						<view class="right"><radio value="weixin" color="#5dbc7c" :checked="type == 'weixin'" /></view>
 					</view>
 				</label>
 				<label>
@@ -46,19 +49,23 @@
 						<view class="icon iconfont iconzhifubao"></view>
 						<view class="title-box">
 							<view class="title">
-								<text v-if="aliData.fullname">提现至支付宝</text>
+								<text v-if="aliData.fullname">兑换至支付宝</text>
 								<text v-else>请创建支付宝账号</text>
 							</view>
 							<view class="node">
 								<text v-if="aliData.fullname">真实姓名({{ aliData.fullname }})</text>
 							</view>
 						</view>
-						<view class="right"><radio value="alipay" color="#5dbc7c" :checked="type == 'alipay'" /></view>
+						<view class="right">
+							<radio value="alipay" color="#5dbc7c" :checked="type == 'alipay'" />
+						</view>
 					</view>
 				</label>
 				<label>
 					<view class="box">
-						<view class="icon iconfont"><image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image></view>
+						<view class="icon iconfont">
+							<image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image>
+						</view>
 						<view class="title-box">
 							<view class="title">
 								<text v-if="bankData.bankno">{{ bankData.bank + ' ' + bankData.bankno }}</text>
@@ -68,7 +75,9 @@
 								<text v-if="bankData.fullname">真实姓名({{ bankData.fullname }})</text>
 							</view>
 						</view>
-						<view class="right"><radio value="bank" color="#5dbc7c" :checked="type == 'bank'" /></view>
+						<view class="right">
+							<radio value="bank" color="#5dbc7c" :checked="type == 'bank'" />
+						</view>
 					</view>
 				</label>
 			</radio-group>
@@ -80,261 +89,293 @@
 </template>
 
 <script>
-import { getMoneyStyle } from '@/utils/rocessor.js';
-import { extractCash, extractBank, aliInfo, bankInfo } from '@/api/wallet.js';
-import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
-export default {
-	filters: {
+	import {
 		getMoneyStyle
-	},
-	components: {
-		uniNoticeBar
-	},
-	data() {
-		return {
-			type: 'weixin', //提现方式
-			money: '0.00', //可提现金额
-			freeze: '0.0', //冻结金额
-			withdrawal: '', //提现金额
-			minPrice: '', //最少提现金额
-			aliData: {},
-			bankData: {},
-			charge:0,
-			weichatBsrowser: false
+	} from '@/utils/rocessor.js';
+	import {
+		extractCash,
+		extractBank,
+		aliInfo,
+		bankInfo
+	} from '@/api/wallet.js';
+	import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		components: {
+			uniNoticeBar
+		},
+		data() {
+			return {
+				type: 'weixin', //提现方式
+				money: '0.00', //可提现金额
+				freeze: '0.0', //冻结金额
+				withdrawal: '', //提现金额
+				minPrice: '', //最少提现金额
+				aliData: {},
+				bankData: {},
+				charge: 0,
+				weichatBsrowser: false
+				// #ifdef H5
+				// weichatBsrowser: false
+				// #endif
+			};
+		},
+		onLoad(options) {
 			// #ifdef H5
-			// weichatBsrowser: false
+			// this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
 			// #endif
-		};
-	},
-	onLoad(options) {
-		// #ifdef H5
-		// this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
-		// #endif
-		//加载提现信息
-		this.loadData();
-		// 加载提款账号信息
-		this.loadAli();
-		this.loadBank();
-	},
-	onShow() {
-		this.loadData();
-	},
-	methods: {
-		// 更新数据
-		dataUp(){
+			//加载提现信息
+			this.loadData();
+			// 加载提款账号信息
 			this.loadAli();
 			this.loadBank();
 		},
-		//加载数据
-		async loadAli(source) {
-			aliInfo({}).then(e => {
-				this.aliData = e.data;
-			});
-		},
-		// 加载银行卡信息
-		async loadBank() {
-			bankInfo({}).then(e => {
-				this.bankData = e.data;
-			});
-		},
-		// 加载余额信息
-		async loadData() {
-			extractBank({}).then(({ data }) => {
-				this.money = data.nowMoneyCount;//可提现余额
-				this.minPrice = data.minPrice;//最小提现
-				this.freeze =data.innowMoneyCount//提现中的余额
-				this.charge = data.now_cash;
-			});
-		},
-		// 跳转
-		navTo(url) {
-			uni.navigateTo({
-				url: url
-			});
+		onShow() {
+			this.loadData();
 		},
-		// 切换选中对象
-		tabRadio(e) {
-			this.type = e.detail.value;
-		},
-		// 提交
-		confirm() {
-			let obj = this;
-			let data = {
-				extract_type: obj.type, //bank -银行卡 alipay-支付宝 weixin-微信
-				money: obj.withdrawal, //金额
-				money_type: 1//0佣金1余额
-			}
-			if (obj.type=='alipay') {
-				data.name = obj.aliData.fullname;
-				data.alipay_code = obj.aliData.alino;
-			}
-			if (obj.type=='bank') {
-				data.name = obj.bankData.fullname;
-				data.bankname = obj.bankData.bank;
-				data.cardnum = obj.bankData.bankno;
-			}
-			if (+obj.withdrawal < +obj.minPrice) {
-				uni.showToast({
-					title: '提现金额不可少于' + obj.minPrice,
-					duration: 2000,
-					mask: false,
-					icon: 'none'
+		methods: {
+			// 更新数据
+			dataUp() {
+				this.loadAli();
+				this.loadBank();
+			},
+			//加载数据
+			async loadAli(source) {
+				aliInfo({}).then(e => {
+					this.aliData = e.data;
 				});
-				return;
-			}
-			extractCash(data)
-				.then(e => {
+			},
+			// 加载银行卡信息
+			async loadBank() {
+				bankInfo({}).then(e => {
+					this.bankData = e.data;
+				});
+			},
+			// 加载余额信息
+			async loadData() {
+				extractBank({}).then(({
+					data
+				}) => {
+					this.money = data.nowMoneyCount; //可提现余额
+					this.minPrice = data.minPrice; //最小提现
+					this.freeze = data.innowMoneyCount //提现中的余额
+					this.charge = data.now_cash;
+				});
+			},
+			// 跳转
+			navTo(url) {
+				uni.navigateTo({
+					url: url
+				});
+			},
+			// 切换选中对象
+			tabRadio(e) {
+				this.type = e.detail.value;
+			},
+			// 提交
+			confirm() {
+				let obj = this;
+				let data = {
+					extract_type: obj.type, //bank -银行卡 alipay-支付宝 weixin-微信
+					money: obj.withdrawal, //金额
+					money_type: 1 //0佣金1余额
+				}
+				if (obj.type == 'alipay') {
+					data.name = obj.aliData.fullname;
+					data.alipay_code = obj.aliData.alino;
+				}
+				if (obj.type == 'bank') {
+					data.name = obj.bankData.fullname;
+					data.bankname = obj.bankData.bank;
+					data.cardnum = obj.bankData.bankno;
+				}
+				if (+obj.withdrawal < +obj.minPrice) {
 					uni.showToast({
-						title: '提交成功',
+						title: '兑换金额不可少于' + obj.minPrice,
 						duration: 2000,
-						position: 'top'
+						mask: false,
+						icon: 'none'
 					});
-					// 初始化提现金额
-					obj.withdrawal = '';
-					obj.loadData();
-					
-				})
-				.catch(e => {
-					console.log(e);
-				});
+					return;
+				}
+				extractCash(data)
+					.then(e => {
+						uni.showToast({
+							title: '提交成功',
+							duration: 2000,
+							position: 'top'
+						});
+						// 初始化提现金额
+						obj.withdrawal = '';
+						obj.loadData();
+
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-page {
-	height: 100%;
-}
-.content-money {
-	padding: 30rpx 0;
-	background: #ffffff;
-}
-.flex {
-	background-color: #ffffff;
-	text-align: center;
-	margin: 0 30rpx;
-	border-radius: $border-radius-sm;
-	.buttom {
-		font-size: $font-lg;
-		width: 50%;
-	}
-	.interval {
-		width: 2px;
-		height: 60rpx;
-		background-color: #eeeeee;
-		position: absolute;
-		top: -99999;
-		left: -99999;
+	page {
+		height: 100%;
 	}
-	.icon {
-		background-size: 100%;
-		font-size: 42rpx;
-		color: $font-color-dark;
-		font-weight: bold;
-		background-repeat: no-repeat;
-		background-position: center;
-	}
-	.text {
-		color: $font-color-light;
-	}
-}
 
-.row-box {
-	margin-top: 30rpx;
-	padding: 20rpx 30rpx;
-	background: #fff;
-	.title {
-		font-size: $font-base + 2rpx;
-		color: $font-color-dark;
+	.content-money {
+		padding: 30rpx 0;
+		background: #ffffff;
 	}
-	.row {
-		display: flex;
-		align-items: center;
-		position: relative;
-		height: 80rpx;
-		.tit {
-			flex-shrink: 0;
-			width: 40rpx;
-			font-size: 30rpx;
-			color: $font-color-dark;
+
+	.flex {
+		background-color: #ffffff;
+		text-align: center;
+		margin: 0 30rpx;
+		border-radius: $border-radius-sm;
+
+		.buttom {
+			font-size: $font-lg;
+			width: 50%;
+		}
+
+		.interval {
+			width: 2px;
+			height: 60rpx;
+			background-color: #eeeeee;
+			position: absolute;
+			top: -99999;
+			left: -99999;
 		}
-		.input {
-			flex: 1;
-			font-size: 30rpx;
+
+		.icon {
+			background-size: 100%;
+			font-size: 42rpx;
 			color: $font-color-dark;
+			font-weight: bold;
+			background-repeat: no-repeat;
+			background-position: center;
 		}
-		.iconlocation {
-			font-size: 36rpx;
+
+		.text {
 			color: $font-color-light;
 		}
+	}
+
+	.row-box {
+		margin-top: 30rpx;
+		padding: 20rpx 30rpx;
+		background: #fff;
+
+		.title {
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+		}
 
-		.buttom {
-			color: $font-color-spec;
-			font-size: $font-base;
+		.row {
+			display: flex;
+			align-items: center;
+			position: relative;
+			height: 80rpx;
+
+			.tit {
+				flex-shrink: 0;
+				width: 40rpx;
+				font-size: 30rpx;
+				color: $font-color-dark;
+			}
+
+			.input {
+				flex: 1;
+				font-size: 30rpx;
+				color: $font-color-dark;
+			}
+
+			.iconlocation {
+				font-size: 36rpx;
+				color: $font-color-light;
+			}
+
+			.buttom {
+				color: $font-color-spec;
+				font-size: $font-base;
+			}
 		}
 	}
-}
-.add-btn {
-	&.modified {
-		color: $base-color;
-	}
-	&.up {
-		background-color: $base-color;
-		color: #fff;
-	}
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 690rpx;
-	height: 80rpx;
-	margin: 0 auto;
-	margin-top: 30rpx;
-	font-size: $font-lg;
-	border-radius: 10rpx;
-	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
-}
 
-.list {
-	padding-left: 30rpx;
-	margin-top: 30rpx;
-	background-color: #ffffff;
-	.box {
+	.add-btn {
+		&.modified {
+			color: $base-color;
+		}
+
+		&.up {
+			background-color: $base-color;
+			color: #fff;
+		}
+
 		display: flex;
 		align-items: center;
-		width: 100%;
-		height: 120rpx;
-		border-bottom: 1px solid $border-color-light;
-		.icon {
-			font-size: 48rpx;
-			padding-right: 20rpx;
-			.icon-img {
-				height: 50rpx;
-				width: 50rpx;
+		justify-content: center;
+		width: 690rpx;
+		height: 80rpx;
+		margin: 0 auto;
+		margin-top: 30rpx;
+		font-size: $font-lg;
+		border-radius: 10rpx;
+		// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+	}
+
+	.list {
+		padding-left: 30rpx;
+		margin-top: 30rpx;
+		background-color: #ffffff;
+
+		.box {
+			display: flex;
+			align-items: center;
+			width: 100%;
+			height: 120rpx;
+			border-bottom: 1px solid $border-color-light;
+
+			.icon {
+				font-size: 48rpx;
+				padding-right: 20rpx;
+
+				.icon-img {
+					height: 50rpx;
+					width: 50rpx;
+				}
 			}
-		}
-		.iconweixin1 {
-			color: #18bf16;
-		}
-		.iconzhifubao {
-			color: #08aaec;
-		}
-		.title-box {
-			flex-grow: 1;
-			text-align: left;
-			.title {
-				font-size: $font-base + 2rpx;
-				color: $font-color-base;
+
+			.iconweixin1 {
+				color: #18bf16;
 			}
-			.node {
-				font-size: $font-sm;
-				color: $font-color-light;
+
+			.iconzhifubao {
+				color: #08aaec;
+			}
+
+			.title-box {
+				flex-grow: 1;
+				text-align: left;
+
+				.title {
+					font-size: $font-base + 2rpx;
+					color: $font-color-base;
+				}
+
+				.node {
+					font-size: $font-sm;
+					color: $font-color-light;
+				}
 			}
 		}
 	}
-}
-/deep/ .uni-radio-input {
-	width: 45rpx;
-	height: 45rpx;
-}
-</style>
+
+	/deep/ .uni-radio-input {
+		width: 45rpx;
+		height: 45rpx;
+	}
+</style>

BIN
static/user/prizezhuan.png


+ 30 - 11
utils/rocessor.js

@@ -5,13 +5,13 @@ export function isCardNo(card) {
 	if (reg.test(card) === false) {
 		console.log(card);
 		return false;
-		
+
 	}
 	return true
 }
 
 
-export function getMoneyStyle(value=0) {
+export function getMoneyStyle(value = 0) {
 	if (typeof value == 'string') {
 		value = (+value).toFixed(2)
 	}
@@ -40,18 +40,18 @@ export function timeComputed(time) {
 	// 获取当前时间
 	let actTime = (new Date()).getTime();
 	// 获取到期时间
-	let stopTime = time-actTime;
+	let stopTime = time - actTime;
 	// 判断是否小于0
-	if(stopTime <0){
-		stopTime  = stopTime*-1
+	if (stopTime < 0) {
+		stopTime = stopTime * -1
 	}
-	let hours = Math.floor((stopTime/1000/60/60)%24);//获取剩余小时数
-	let minutes =  Math.floor((stopTime/1000/60)%60);//获取分钟
-	let seconds = Math.floor((stopTime/1000)%60);//获取秒数
+	let hours = Math.floor((stopTime / 1000 / 60 / 60) % 24); //获取剩余小时数
+	let minutes = Math.floor((stopTime / 1000 / 60) % 60); //获取分钟
+	let seconds = Math.floor((stopTime / 1000) % 60); //获取秒数
 	return {
-		hours,//倒计时小时数
-		minutes,//倒计时分钟数
-		seconds//倒计时秒数
+		hours, //倒计时小时数
+		minutes, //倒计时分钟数
+		seconds //倒计时秒数
 	}
 }
 
@@ -97,4 +97,23 @@ export function openMap(e) {
 			}
 		})
 	})
+}
+
+//时间戳转换成时间
+export function getTime(time) {
+	const num = 13 - (time + '').length;
+	let l = 1; //倍数
+	for (let i = 0; i < num; i++) {
+		l += '0';
+	}
+	// 重新解析为数字
+	l = parseInt(l)
+	const date = new Date(parseInt(time) * l);
+	const year = date.getFullYear();
+	const mon = date.getMonth() + 1;
+	const day = date.getDate();
+	const hours = date.getHours();
+	const minu = date.getMinutes();
+	const sec = date.getSeconds();
+	return year + '-' + mon + '-' + day + ' ' + hours + ':' + minu + ':' + sec;
 }

Деякі файли не було показано, через те що забагато файлів було змінено