hwq 3 years ago
parent
commit
20489a353d

+ 7 - 0
api/finance.js

@@ -47,6 +47,13 @@ export function cash(data) {
 		data
 	});
 }
+export function shan(data) {
+	return request({
+		url: '/api/money/exchange',
+		method: 'POST',
+		data
+	});
+}
 export function goPay(data) {
 	return request({
 		url: '/api/trade/go_pay',

+ 8 - 0
api/user.js

@@ -59,3 +59,11 @@ export function uploads(data){
 		data
 	});
 }
+// 获取首页信息
+export function loadIndexs(data) {
+	return request({
+		url: '/api/index',
+		method: 'get',
+		data
+	});
+}

+ 6 - 9
manifest.json

@@ -1,6 +1,6 @@
 {
-    "name" : "基础项目",
-    "appid" : "__UNI__F0EBD91",
+    "name" : "Lala NFT",
+    "appid" : "__UNI__3CDE968",
     "description" : "",
     "versionName" : "1.0.0",
     "versionCode" : "100",
@@ -25,14 +25,10 @@
                     "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
                     "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
                     "<uses-permission android:name=\"android.permission.CAMERA\"/>",
-                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
                     "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
                     "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>"
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>"
                 ],
                 "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
             },
@@ -48,7 +44,8 @@
                         "appsecret" : "",
                         "UniversalLinks" : ""
                     }
-                }
+                },
+                "ad" : {}
             },
             "splashscreen" : {
                 "androidStyle" : "default",
@@ -114,7 +111,7 @@
         "devServer" : {
             "proxy" : {
                 "/api" : {
-                    "target" : "http://rpg.liuniu946.com/api",
+                    "target" : "http://rpg.frp.liuniu946.com/api",
                     // "changeOrigin": true,
                     "pathRewrite" : {
                         "/api" : "" // rewrite path

+ 2 - 6
pages.json

@@ -94,12 +94,8 @@
 		{
 			"path": "pages/public/forget",
 			"style": {
-				"navigationBarTitleText": "忘记密码",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
+				"navigationBarTitleText": "忘记密码"
+				
 			}
 		},
 		{

+ 11 - 7
pages/assets/assets.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="container">
+		<view class="status_bar"></view>
 		<view class="title">资产</view>
 		<view>
 			<view class="list-box">
@@ -151,11 +152,10 @@ export default {
 			});
 		},
 		toDateils(ls) {
-			console.log(ls,'55');
+			console.log(ls, '55');
 			let wayaddress = {};
 			uni.navigateTo({
-				url:
-					'/pages/assets/details?name=' +ls.name
+				url: '/pages/assets/details?name=' + ls.name
 			});
 		}
 	}
@@ -171,6 +171,10 @@ page {
 		padding: 25rpx 40rpx;
 	}
 }
+.status_bar {
+	height: var(--status-bar-height);
+	width: 100%;
+}
 .title {
 	font-size: 46rpx;
 	font-family: PingFang SC;
@@ -275,12 +279,12 @@ page {
 			font-size: 34rpx;
 			font-weight: 500;
 			color: #5771df;
-			.logo{
+			.logo {
 				border-radius: 99rpx;
-				width:50rpx ;
-				height:50rpx ;
+				width: 50rpx;
+				height: 50rpx;
 			}
-			.name{
+			.name {
 				margin-left: 20rpx;
 				color: $font-color-dark;
 				font-weight: bold;

+ 14 - 38
pages/assets/details.vue

@@ -34,23 +34,6 @@
 			<view class="tip" v-if="moneyData.type==1"></view>
 			<view class="submit" @click="withdraw" v-if="moneyData.type==1">提币</view>
 		</view>
-		<!-- <uni-popup ref="popup" type="center">
-			<view class="popup">
-				<view class="cancel flex" @click="close">
-					<view></view>
-					<view class="tip">x</view>
-				</view>
-				<view class="list-boxs">
-					<view class="popup-text">购买数量:</view>
-					<view class="password"><input type="number" v-model="num" placeholder="请输入算力数量" /></view>
-					<view class="popup-text">币种选择:</view>
-					<view class="content" @click="useOutClickSide">
-						<easy-select ref="easySelect" :options="moneyTypeList" :value="moneyData.name" @selectOne="selectOne"></easy-select>
-					</view>
-					<view class="confirm-btn" @click="pay"><text>确认充币</text></view>
-				</view>
-			</view>
-		</uni-popup> -->
 		<uni-popup ref="mation" type="center">
 			<view class="popup">
 				<view class="cancel flex" @click="close2"><view class="tip">x</view></view>
@@ -123,6 +106,9 @@ export default {
 	methods: {
 		async loadData() {
 			let obj = this;
+			uni.showLoading({
+				title: '加载中'
+			});
 			moneyLog(
 				{
 					page: 1,
@@ -138,10 +124,12 @@ export default {
 				})
 				obj.list = data.list;
 				console.log(obj.list);
+				uni.hideLoading();
 			});
 		},
 		// 所有币种
 		async moneyType() {
+			
 			let obj = this;
 			wallet({}).then(({ data }) => {
 				const dat = data.back[this.name];
@@ -152,25 +140,6 @@ export default {
 				obj.moneyData.type = +dat.can_cash
 			});
 		},
-		// pay() {
-		// 	let obj = this;
-		// 	recharge(
-		// 		{
-		// 			num: obj.num,
-		// 			money_type: obj.moneyData.code
-		// 		},
-		// 		obj.name
-		// 	)
-		// 		.then(({ data }) => {
-		// 			obj.$api.msg(data.msg);
-		// 			obj.$refs.popup.close();
-		// 			obj.num = '';
-		// 			obj.moneyData.code = '';
-		// 		})
-		// 		.catch(e => {
-		// 			obj.$refs.popup.close();
-		// 		});
-		// },
 		selectOne(options) {
 			this.name = options.name;
 			this.moneyData.code = options.code;
@@ -193,7 +162,14 @@ export default {
 		handleCancel(e) {},
 		// 充币按钮跳转页面
 		recharge() {
-			
+			uni.navigateTo({
+				url:'/pages/assets/recharge'
+			})
+		},
+		withdraw() {
+			uni.navigateTo({
+				url:'/pages/assets/withdraw?name=' + this.name
+			})
 		},
 		close() {
 			this.$refs.popup.close();
@@ -338,7 +314,7 @@ page {
 	bottom: 0;
 	left: 0;
 	width: 100%;
-	background-color: #5771df;
+	background: linear-gradient(90deg, #60BAB0, #45969B);
 	color: #ffffff;
 	text-align: center;
 	.submit {

+ 8 - 4
pages/assets/myPing.vue

@@ -42,7 +42,7 @@
 						<text v-if="item.status == 3">已失败</text>
 					</view>
 				</view>
-				<view class="more">详情</view>
+				<view class="more" v-if="item.status != 0">详情</view>
 			</view>
 			<view class="main">
 				<view class="main-info">
@@ -148,9 +148,13 @@ export default {
 				});
 		},
 		nav(e) {
-			uni.navigateTo({
-				url: '/pages/assets/teamDetails?id=' + e.id
-			});
+			if(e.status == 0){
+				
+			}else {
+				uni.navigateTo({
+					url: '/pages/assets/teamDetails?id=' + e.id
+				});
+			}
 		}
 	}
 };

+ 6 - 3
pages/assets/teamDetails.vue

@@ -75,15 +75,17 @@ export default {
 		getDate() {
 			pinkLogDate({}, this.id)
 				.then(e => {
+					console.log(e)
 					const ls = e.data;
 					const lun = ls.group_num > 0 ? ls.group_num + '轮' : '';
 					const time = new Date(ls.pay_time * 1000);
 					let sy = ls.join_award*ls.cost/100+'';
 					const num = sy.split('.')[1]
+					console.log(sy,"1111111111")
 					// 判断小数点是否超过8位数标
-					if(num&&num.length>8){
-						sy = (+sy).toFixed(8);
-					}
+					// if(num&&num.length>8){
+					// 	sy = (+sy).toFixed(8);
+					// }
 					this.item = {
 						name: ls.activity.name,
 						lun,
@@ -104,6 +106,7 @@ export default {
 						join_award:+sy,
 						order_id:ls.order_id
 					};
+					console.log(this.item)
 				})
 				.catch(e => {
 					console.log(e);

+ 13 - 8
pages/assets/transfer.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="container">
+		<view class="status_bar"><!-- 这里是状态栏 --></view>
 		<view class="goback-box" @click="toBack"><image class="goback" src="../../static/img/fanhui.png" mode=""></image></view>
 		<view class="header">转账</view>
 
@@ -82,11 +83,10 @@ export default {
 
 				obj.moneyTypeList = ar.filter(e => {
 					console.log(e);
-					if(e.can_trade == 1){
+					if (e.can_trade == 1) {
 						return e;
-					}
-					else{
-						return ;
+					} else {
+						return;
 					}
 				});
 				console.log(obj.moneyTypeList);
@@ -145,14 +145,19 @@ export default {
 		},
 		toBack() {
 			uni.switchTab({
-				url:'/pages/assets/assets'
-			})
+				url: '/pages/assets/assets'
+			});
 		}
 	}
 };
 </script>
 
 <style lang="scss">
+.status_bar {
+	height: var(--status-bar-height);
+	width: 100%;
+	background: linear-gradient(90deg, #60bab0, #45969b);
+}
 page {
 	min-height: 100%;
 	background-color: #ffffff;
@@ -254,7 +259,7 @@ page {
 .goback-box {
 	position: absolute;
 	left: 18rpx;
-	top: 0;
+	top: var(--status-bar-height);
 	height: 80rpx;
 	display: flex;
 	align-items: center;
@@ -268,7 +273,7 @@ page {
 	color: #ffffff;
 	position: absolute;
 	left: 0;
-	top: 0;
+	top: var(--status-bar-height);
 	width: 100%;
 	height: 80rpx;
 	font-size: 32rpx;

+ 28 - 14
pages/assets/withdraw.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="container">
+		<view class="status_bar"><!-- 这里是状态栏 --></view>
 		<view class="goback-box" @click="toBack"><image class="goback" src="../../static/img/fanhui.png" mode=""></image></view>
 		<view class="header">提币</view>
 
@@ -72,10 +73,6 @@ export default {
 		console.log(option);
 		if (option.name) {
 			this.name = option.name;
-			this.logo = option.logo;
-			this.code = option.code;
-			this.money = option.money;
-			this.less = option.less;
 		}
 		this.moneyType();
 	},
@@ -106,11 +103,24 @@ export default {
 					}
 				});
 				console.log(obj.moneyTypeList);
-				obj.logo = obj.moneyTypeList[0].LOGO;
-				obj.name = obj.moneyTypeList[0].name;
-				obj.code = obj.moneyTypeList[0].code;
-				obj.money = obj.moneyTypeList[0].money.money;
-				obj.less = obj.moneyTypeList[0].less;
+				if (obj.name == '') {
+					obj.logo = obj.moneyTypeList[0].LOGO;
+					obj.name = obj.moneyTypeList[0].name;
+					obj.code = obj.moneyTypeList[0].code;
+					obj.money = obj.moneyTypeList[0].money.money;
+					obj.less = obj.moneyTypeList[0].less;
+				} else {
+					for (let i = 0; i < obj.moneyTypeList.length; i++) {
+						if (obj.moneyTypeList[i].name == this.name) {
+							obj.logo = obj.moneyTypeList[i].LOGO;
+							obj.name = obj.moneyTypeList[i].name;
+							obj.code = obj.moneyTypeList[i].code;
+							obj.money = obj.moneyTypeList[i].money.money;
+							obj.less = obj.moneyTypeList[i].less;
+							break;
+						}
+					}
+				}
 			});
 		},
 		calculator() {
@@ -183,8 +193,8 @@ export default {
 		},
 		toBack() {
 			uni.switchTab({
-				url:'/pages/assets/assets'
-			})
+				url: '/pages/assets/assets'
+			});
 		}
 	}
 };
@@ -198,7 +208,11 @@ page {
 		width: 100%;
 	}
 }
-
+.status_bar {
+	height: var(--status-bar-height);
+	width: 100%;
+	background: linear-gradient(90deg, #60bab0, #45969b);
+}
 .list-box {
 	padding: 104rpx 30rpx 60rpx;
 	height: 350rpx;
@@ -339,7 +353,7 @@ page {
 .goback-box {
 	position: absolute;
 	left: 18rpx;
-	top: 0;
+	top: var(--status-bar-height);
 	height: 80rpx;
 	display: flex;
 	align-items: center;
@@ -353,7 +367,7 @@ page {
 	color: #ffffff;
 	position: absolute;
 	left: 0;
-	top: 0;
+	top: var(--status-bar-height);
 	width: 100%;
 	height: 80rpx;
 	font-size: 32rpx;

+ 23 - 3
pages/index/convert.vue

@@ -32,7 +32,7 @@
 	</view>
 </template>
 <script>
-import { recharge, wallet, moneyType } from '@/api/finance.js';
+import { recharge, wallet, moneyType,shan } from '@/api/finance.js';
 export default {
 	data() {
 		return {
@@ -41,7 +41,8 @@ export default {
 			add: { LOGO: '', name: '' }, //兑入币种
 			pushMoney: '',//要兑换的金额
 			lodingType: false, //判断是否已经载入币种分类分类数据
-			show: false
+			show: false,
+			buying: false,
 		};
 	},
 	computed: {
@@ -60,7 +61,7 @@ export default {
 				console.log(e);
 				return '加载中...';
 			}
-		}
+		},
 	},
 	//页面加载即刻发生
 	onLoad() {
@@ -121,6 +122,25 @@ export default {
 						console.log(e);
 					}
 				});
+		},
+		//确认兑换
+		buy(){
+			if (this.buying){
+				
+			}else {
+				this.buying = true
+				shan({
+					money_type: this.add.name,
+					num: this.pushMoney,
+				}).then(({data}) => {
+					console.log(data)
+					this.buying = false
+					this.$api.msg("闪兑成功")
+				}).catch(e =>{
+					this.buying = false
+					console.log(e)
+				})
+			}
 		}
 	}
 };

+ 154 - 212
pages/index/datile.vue

@@ -1,14 +1,16 @@
 <template>
 	<view class="center">
 		<scroll-view scroll-y="true" style="padding-bottom: 20rpx;">
-			<view class="shopBox">
-				<view class="shopBox-top">
-					<view class="left"><image src="../../static/img/index4.png" mode=""></image></view>
-					<view class="between" style="margin-left: -340rpx;">
-						<text id="one">{{ list.data?list.data.name:'' }}</text>
-						<text id="two">{{ list.lun }}轮</text>
+			<view class="shopBox" v-for="(item, index) in list.open_times" :key="index" v-if="item.ifShow">
+				<view class="shopBox-top flex" >
+					<view class="left-box flex">
+						<view class="left-bg"><image src="../../static/img/index4.png" mode=""></image></view>
+						<view class="one">{{ list.data ? list.data.name : '' }}</view>
+						<view class="two">{{ index+1 }}轮</view>
 					</view>
-					<text id="three">预约中</text>
+					<view class="three" style="color: #FF4C4C;" v-if="item.type == 1">预约中</view>
+					<view class="three" style="color: ##44969D;" v-if="item.type == 2">待上架</view>
+					<view class="three" style="color: ##6D7C88;" v-if="item.type == 3">已开奖</view>
 				</view>
 				<view class="shopBox-between">
 					<view class="number">
@@ -29,96 +31,15 @@
 					</view>
 					<view class="appointmentTime">
 						预约时间:
-						<text>{{ list.start }}-{{ list.end }}</text>
+						<text>{{ list.start }}-{{ item.end }}</text>
 					</view>
 					<view class="lotteryTime">
 						开奖时间:
-						<text>{{ list.jiang }}</text>
-					</view>
-				</view>
-				<view class="btn-box flex">
-					<view class="submit" @click="buy()">预购</view>
-				</view>
-			</view>
-			<view class="shopBox">
-				<view class="shopBox-top">
-					<view class="left"><image src="../../static/img/index4.png" mode=""></image></view>
-					<view class="between" style="margin-left: -340rpx;">
-						<text id="one">{{ list.data?list.data.name:'' }}</text>
-						<text id="two">{{ list.lun+1 }}轮</text>
-					</view>
-					<text id="three" style="color: #44969D;">待上架</text>
-				</view>
-				<view class="shopBox-between">
-					<view class="number">
-						<text class="number-left">{{ 1 * list.data.cost }}</text>
-						<text class="number-right">{{ list.data.cost_money_type }}/份</text>
-					</view>
-					<view class="quotient"><text class="quotient-children">每轮限购1组,每组限购一份</text></view>
-				</view>
-				<image :src="list.data.background_image" style="width: 635rpx; height: 170rpx; margin: 40rpx 0;" mode=""></image>
-				<view class="shopBox-bottom">
-					<view class="forward">
-						<view class="forward-left"></view>
-						<view class="forward-right">每组分数:&nbsp {{ list.data.join_number }}份</view>
-					</view>
-					<view class="consume">
-						GAS消耗:
-						<text>{{ 1 * list.data.ticket }}{{ list.data.ticket_money_type }}</text>
-					</view>
-					<view class="appointmentTime">
-						预约时间:
-						<text>{{ list.nstart }}-{{ list.nend }}</text>
-					</view>
-					<view class="lotteryTime">
-						开奖时间:
-						<text>{{ list.njiang }}</text>
-					</view>
-				</view>
-				<view class="btn-box flex">
-					<view class="submit1">带上架</view>
-				</view>
-			</view>
-			<view v-if="'history'">
-				<view class="shopBox" v-for="(item,index) in list.history_list" :key="index" v-if="item.group_num*1 != 0">
-					<view class="shopBox-top">
-						<view class="left"><image src="../../static/img/index4.png" mode=""></image></view>
-						<view class="between" style="margin-left: -340rpx;">
-							<text id="one">{{ list.data?list.data.name:'' }}</text>
-							<text id="two">{{ item.group_num*1 }}轮</text>
-						</view>
-						<text id="three" style="color: #6D7C88;">已开奖</text>
-					</view>
-					<view class="shopBox-between">
-						<view class="number">
-							<text class="number-left">{{ 1 * list.data.cost }}</text>
-							<text class="number-right">{{ list.data.cost_money_type }}/份</text>
-						</view>
-						<view class="quotient"><text class="quotient-children">每轮限购1组,每组限购一份</text></view>
-					</view>
-					<image :src="list.data.background_image" style="width: 635rpx; height: 170rpx; margin: 40rpx 0;" mode=""></image>
-					<view class="shopBox-bottom">
-						<view class="forward">
-							<view class="forward-left"></view>
-							<view class="forward-right">每组分数:&nbsp {{ list.data.join_number }}份</view>
-						</view>
-						<view class="consume">
-							GAS消耗:
-							<text>{{ 1 * list.data.ticket }}{{ list.data.ticket_money_type }}</text>
-						</view>
-						<view class="appointmentTime">
-							预约时间:
-							<text>{{ item.hstart }}-{{ item.hend }}</text>
-						</view>
-						<view class="lotteryTime">
-							开奖时间:
-							<text>{{ item.hjiang }}</text>
-						</view>
-					</view>
-					<view class="btn-box flex">
-						<view class="submit1">已开奖</view>
+						<text>{{ item.name }}</text>
 					</view>
 				</view>
+				<view class="btn-box flex" v-if="item.type == 1" @click="buy()"><view class="submit" >预约</view></view>
+				<view class="btn-box flex" v-else ><view class="submit1" >{{item.type == 2 ? '待上架' : '已开奖'}}</view></view>
 			</view>
 		</scroll-view>
 		<u-popup v-model="show" mode="bottom" border-radius="40" height="868rpx" :closeable="true">
@@ -137,11 +58,11 @@
 					</view>
 					<view class="info-box">
 						<view class="info-left">预约金额:</view>
-						<view class="info-right">{{money}}</view>
+						<view class="info-right">{{ money }}</view>
 					</view>
 					<view class="info-box">
 						<view class="info-left">预约手续费:</view>
-						<view class="info-right">{{souxu}}</view>
+						<view class="info-right">{{ souxu }}</view>
 					</view>
 				</view>
 				<view class="btn" @click="submit()">确定</view>
@@ -161,8 +82,8 @@
 </template>
 
 <script>
-import { lalaDetial,buylala } from '@/api/product.js';
-import {getTime} from '@/utils/rocessor.js'
+import { lalaDetial, buylala } from '@/api/product.js';
+import { getTime } from '@/utils/rocessor.js';
 export default {
 	data() {
 		return {
@@ -171,19 +92,19 @@ export default {
 			page: 1,
 			id: '',
 			list: {
-				data:{
-					name:'',
-					cost:''
+				data: {
+					name: '',
+					cost: ''
 				}
 			},
-			history:false,
+			history: false,
 			show: false, //支付数量
 			show1: false, //支付密码
 			password: '',
 			value: 1,
-			money:'',
-			souxu:'',
-			max: 1,
+			money: '',
+			souxu: '',
+			max: 1
 		};
 	},
 	onLoad(option) {
@@ -192,10 +113,10 @@ export default {
 	},
 	methods: {
 		loadData() {
-			 uni.showLoading({
-			 	title:'加载中'
-			 })
-			const obj = this
+			uni.showLoading({
+				title: '加载中'
+			});
+			const obj = this;
 			if (obj.loding == 'nomore') {
 				return;
 			}
@@ -205,55 +126,58 @@ export default {
 					limit: obj.limit
 				},
 				obj.id
-			).then(({ data }) => {
-				
-				obj.list = data;
-				if('history_list' in data){
-					obj.history = true;
-					obj.list.lun = 1*data.history_list[0].group_num+1
-					obj.list.history_list.forEach(e => {
-						let hjiang = getTime(e.open_time*1)
-						let hend = getTime(e.open_time*1 - data.close_join*60);
-						let hstart = getTime(e.open_time*1 - data.close_join*60 - 2*60*60);
-						obj.$set(e,'hend',hend)
-						obj.$set(e,'hstart',hstart)
-						obj.$set(e,'hjiang',hjiang)
+			)
+				.then(({ data }) => {
+					let date = data.open_times[0].name.split(" ")
+					let start = date[0] + ' ' + data.lala_pink_open
+					
+					obj.$set(data, 'start', start);
+					// data.open_times.filter(e => {
+					// 	return this.isToday(e.value*1000)
+					// })
+					data.open_times.forEach((e,index) => {
+						let end = getTime(e.value - data.close_join*60)
+						let type = 0 
+						
+						console.log();
+						
+						if (e.value == data.next_pink.value){
+							type = 1
+							console.log(1)
+						}else if(e.value > data.next_pink.value){
+							type = 2
+							console.log(2)
+						}else if(e.value < data.next_pink.value){
+							 type =3
+							console.log(3)
+						}
+						e.end = end
+						if(this.isToday(e.value*1000)){
+							e.ifShow = true;
+						}else{
+							e.ifShow = false;
+						}
+						e.type = type
 					})
-				}else{
-					obj.history = false;
-					obj.list.lun = 1
-				}
-				let end = getTime(data.next_pink - data.close_join*60);
-				let start = getTime(data.next_pink - data.close_join*60 - 2*60*60);
-				let jiang = getTime(data.next_pink);
-				obj.$set(obj.list,'end',end)
-				obj.$set(obj.list,'start',start)
-				obj.$set(obj.list,'jiang',jiang)
-				let nend = getTime(data.next_next_pink - data.close_join*60);
-				let nstart = getTime(data.next_next_pink - data.close_join*60 - 2*60*60);
-				let njiang = getTime(data.next_next_pink);
-				obj.$set(obj.list,'nend',nend)
-				obj.$set(obj.list,'nstart',nstart)
-				obj.$set(obj.list,'njiang',njiang)
-				uni.hideLoading();
-				console.log(obj.list);
-			}).catch(e =>{
-				console.log(e)
-			});
+					obj.list = data;
+					
+					console.log(obj.list)
+					uni.hideLoading();
+				})
+				.catch(e => {
+					console.log(e);
+				});
 		},
 		buy() {
-			this.money = (1*this.list.data.cost) + this.list.data.cost_money_type;
-			this.souxu = this.list.data.ticket+this.list.data.ticket_money_type;
+			this.money = 1 * this.list.data.cost + this.list.data.cost_money_type;
+			this.souxu = this.list.data.ticket + this.list.data.ticket_money_type;
 			this.show = true;
 		},
-		valChange(e) {
-			
-		},
+		valChange(e) {},
 		submit() {
-			if(this.value == 0){
-				this.$api.msg("预约份数不能为0")
-			}
-			else{
+			if (this.value == 0) {
+				this.$api.msg('预约份数不能为0');
+			} else {
 				this.show = false;
 				this.show1 = true;
 			}
@@ -263,18 +187,30 @@ export default {
 			this.show1 = false;
 		},
 		pswQd() {
-			buylala({
-				trade_psw: this.password
-			},this.id).then(e => {
-				this.password = ''
-				this.show1 = false;
-				console.log(e)
-			}).catch(e => {
-				this.password = ''
-				this.show1 = false;
-				console.log(e)
-			})
+			buylala(
+				{
+					trade_psw: this.password
+				},
+				this.id
+			)
+				.then(e => {
+					this.password = '';
+					this.show1 = false;
+					console.log(e);
+				})
+				.catch(e => {
+					this.password = '';
+					this.show1 = false;
+					console.log(e);
+				});
 		},
+		isToday(str) {
+		    if (new Date(str).toDateString() === new Date().toDateString()) {
+				return true
+		    } else{
+		        return false
+		    }
+		}
 	}
 };
 </script>
@@ -292,29 +228,35 @@ export default {
 
 	.shopBox-top {
 		padding-top: 26rpx;
-		display: flex;
 		justify-content: space-between;
 		align-items: center;
-
-		image {
-			height: 46rpx;
-			width: 48rpx;
-		}
-
-		#one {
-			font-size: 34rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #0f253a;
-		}
-
-		#two {
-			margin-left: 11rpx;
-			font-size: 26rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #6d7c88;
+		.left-box {
+			justify-content: flex-start;
+			align-items: center;
+			.left-bg {
+				height: 46rpx;
+				width: 48rpx;
+				image {
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.one {
+				margin-left: 10rpx;
+				font-size: 34rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #0f253a;
+			}
+			.two {
+				margin-left: 10rpx;
+				font-size: 26rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #6d7c88;
+			}
 		}
+		
 
 		#three {
 			font-size: 26rpx;
@@ -387,7 +329,7 @@ export default {
 	.consume > text,
 	.appointmentTime > text,
 	.lotteryTime > text {
-		font-size: 10rpx;
+		font-size: 24rpx;
 		font-family: PingFang SC;
 		font-weight: 500;
 		color: #000000;
@@ -408,7 +350,7 @@ export default {
 	.submit1 {
 		width: 600px;
 		height: 70rpx;
-		background: #ECECEC;
+		background: #ececec;
 		border-radius: 35rpx;
 		font-size: 32rpx;
 		font-family: PingFang SC;
@@ -480,34 +422,34 @@ export default {
 	}
 }
 .psw-wrapper {
-		width: 548rpx;
-		height: 344rpx;
-		background-color: #FFFFFF;
-		.psw-title {
-			width: 100%;
-			font-size: 35rpx;
-			padding: 43rpx 0 49rpx;
-			text-align: center;
-			font-weight: 800;
-		}
-		.psw-ipt {
-			display: block;
-			background-color: #dce3ed;
-			height: 90rpx;
-			width: 464rpx;
-			padding-left: 30rpx;
-			margin: 0 auto;
-			font-size: 80rpx;
-		}
-		.psw-btn text{
-			display: inline-block;
-			text-align: center;
-			width: 50%;
-			padding-top: 29rpx;
-			font-size: 35rpx;
-		}
-		.psw-qd {
-			color:#45969B;
-		}
+	width: 548rpx;
+	height: 344rpx;
+	background-color: #ffffff;
+	.psw-title {
+		width: 100%;
+		font-size: 35rpx;
+		padding: 43rpx 0 49rpx;
+		text-align: center;
+		font-weight: 800;
+	}
+	.psw-ipt {
+		display: block;
+		background-color: #dce3ed;
+		height: 90rpx;
+		width: 464rpx;
+		padding-left: 30rpx;
+		margin: 0 auto;
+		font-size: 80rpx;
 	}
+	.psw-btn text {
+		display: inline-block;
+		text-align: center;
+		width: 50%;
+		padding-top: 29rpx;
+		font-size: 35rpx;
+	}
+	.psw-qd {
+		color: #45969b;
+	}
+}
 </style>

+ 234 - 114
pages/index/index.vue

@@ -1,6 +1,32 @@
 <template>
 	<view class="center">
-		<view class="box-title"><image src="../../static/img/index7.png" mode=""></image></view>
+		<view class="status_bar"><!-- 这里是状态栏 --></view>
+		<view class="carousel">
+			<swiper autoplay="true" duration="400" interval="5000" @change="swiperChange" class="bor">
+				<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item"><image :src="item.pic" /></swiper-item>
+			</swiper>
+		</view>
+		<view class="swiper-dot">
+			<template v-for="item in swiperLength">
+				<view class="swiper-dots-item" :key="item" :class="{ action: swiperCurrent + 1 === item }"></view>
+			</template>
+		</view>
+		<view class="tongz flex">
+			<view>
+				<view class="tongz-bg">
+					<image src="../../static/img/tongz-bg.png" mode=""></image>
+				</view>
+				<view class="tongz-left flex">
+					<image class="image-left" src="../../static/img/ling.png" mode=""></image>
+					<view class="tongz-font">
+						这是一条系统通知消息
+					</view>
+				</view>
+			</view>
+			<view class="tongz-right">
+				<image src="../../static/img/img16.png" mode=""></image>
+			</view>
+		</view>
 		<view class="box-body">
 			<view class="navBox">
 				<view class="navBox-left">
@@ -17,19 +43,19 @@
 					</view>
 				</view>
 			</view>
-			<view class="shopBox" v-for="(item,index) in list" :key="index">
+			<view class="shopBox" v-for="(item, index) in list" :key="index">
 				<view class="shopBox-top">
 					<view class="left"><image src="../../static/img/index4.png" mode=""></image></view>
 					<view class="between" style="margin-left: -340rpx;">
-						<text id="one">{{item.name}}</text>
-						<text id="two">{{item.lun}}轮</text>
+						<text id="one">{{ item.name }}</text>
+						<text id="two">{{ item.lun }}轮</text>
 					</view>
 					<text id="three">预约中</text>
 				</view>
 				<view class="shopBox-between">
 					<view class="number">
-						<text class="number-left">{{1*item.cost}}</text>
-						<text class="number-right">{{item.cost_money_type}}/份</text>
+						<text class="number-left">{{ 1 * item.cost }}</text>
+						<text class="number-right">{{ item.cost_money_type }}/份</text>
 					</view>
 					<view class="quotient"><text class="quotient-children">每轮限购1组,每组限购一份</text></view>
 				</view>
@@ -37,19 +63,19 @@
 				<view class="shopBox-bottom">
 					<view class="forward">
 						<view class="forward-left"></view>
-						<view class="forward-right">每组分数:&nbsp {{item.join_number}}份</view>
+						<view class="forward-right">每组分数:&nbsp {{ item.join_number }}份</view>
 					</view>
 					<view class="consume">
 						GAS消耗:
-						<text>{{1*item.ticket}}{{item.ticket_money_type}}</text>
+						<text>{{ 1 * item.ticket }}{{ item.ticket_money_type }}</text>
 					</view>
 					<view class="appointmentTime">
 						预约时间:
-						<text>{{ item.start }}-{{ item.end}}</text>
+						<text>{{ item.start }}-{{ item.end }}</text>
 					</view>
 					<view class="lotteryTime">
 						开奖时间:
-						<text>{{item.jiang}}</text>
+						<text>{{ item.childList ? item.childList.next_pink.name : '' }}</text>
 					</view>
 				</view>
 				<view class="btn-box flex">
@@ -74,11 +100,11 @@
 					</view>
 					<view class="info-box">
 						<view class="info-left">预约金额:</view>
-						<view class="info-right">{{money}}</view>
+						<view class="info-right">{{ money }}</view>
 					</view>
 					<view class="info-box">
 						<view class="info-left">预约手续费:</view>
-						<view class="info-right">{{souxu}}</view>
+						<view class="info-right">{{ souxu }}</view>
 					</view>
 				</view>
 				<view class="btn" @click="submit()">确定</view>
@@ -97,8 +123,9 @@
 	</view>
 </template>
 <script>
-import { lala,lalaDetial,buylala } from '@/api/product.js'
-import {getTime} from '@/utils/rocessor.js'
+import { lala, lalaDetial, buylala } from '@/api/product.js';
+import { getTime } from '@/utils/rocessor.js';
+import { loadIndexs } from '@/api/user.js';
 export default {
 	data() {
 		return {
@@ -106,52 +133,56 @@ export default {
 			show1: false, //支付密码
 			password: '',
 			value: 1,
-			list:[],
-			money:'',//预约金额
-			souxu:'',//预约手续费
-			id:'',//购买产品
-			max:1
+			list: [],
+			money: '', //预约金额
+			souxu: '', //预约手续费
+			id: '', //购买产品
+			max: 1,
+			carouselList: [],
+			swiperLength: 0,
+			swiperCurrent: 0
 		};
 	},
 	//页面加载即刻发生
 	onShow() {
 		this.loadDate();
 	},
-	onLoad() {
-		this.loadDate();
-	},
 	methods: {
 		async loadDate() {
 			const obj = this;
-			lala(
-			{
-				page:1,
-				limit:10,
-			}).then(({data}) => {
-				obj.list = data.list.data
-				obj.list.forEach((e,index) => {
-					lalaDetial({page:1,limit:1},e.id)
-					.then(les =>{
-						console.log(les)
-						let end = getTime(les.data.next_pink - les.data.close_join*60);
-						let start = getTime(les.data.next_pink - les.data.close_join*60 - 2*60*60);
-						let jiang = getTime(les.data.next_pink);
-						e.end = end;
-						e.start = start;
-						e.jiang = jiang;
-						// les.data.next_pink
-						if('history_list' in les.data){
-							e.lun = 1*les.data.history_list[0].group_num+1
-						}else{
-							e.lun = 1
-						}
-						obj.$set(e,'childList',les.data)
-						// e.childList = les.data
-						console.log(obj.list,"1111111")
-					})
+			loadIndexs({})
+				.then(({ data }) => {
+					console.log(data);
+					obj.carouselList = data.banner;
+					obj.swiperLength = data.banner.length;
+					uni.stopPullDownRefresh();
 				})
+				.catch(e => {
+					uni.stopPullDownRefresh();
+				});
+			lala({
+				page: 1,
+				limit: 10
+			}).then(({ data }) => {
 				
-			})
+				data.list.data.forEach((e, index) => {
+					lalaDetial({ page: 1, limit: 1 }, e.id).then(les => {
+						// e.childList = les.data
+						let date = les.data.open_times[0].name.split(' ')
+						e.start = date[0] + ' ' + les.data.lala_pink_open
+						e.end = getTime(les.data.next_pink.value - les.data.close_join * 60)
+						for(let i = 0;i<les.data.open_times.length;i++){
+							if(les.data.open_times[i].value == les.data.next_pink.value){
+								e.lun = i+1
+							}
+						}
+						obj.$set(e, 'childList', les.data);
+						
+					});
+				});
+				obj.list = data.list.data;
+				console.log(obj.list,"1111111")
+			});
 		},
 		nav(url) {
 			uni.navigateTo({
@@ -159,26 +190,24 @@ export default {
 			});
 		},
 		buy(item) {
-			this.money = (1*item.cost) + item.cost_money_type;
-			this.souxu = item.ticket+item.ticket_money_type;
+			this.money = 1 * item.cost + item.cost_money_type;
+			this.souxu = item.ticket + item.ticket_money_type;
 			this.id = item.id;
 			this.show = true;
 		},
 		valChange(e) {
 			console.log(e);
-			if(this.value > 1){
-				e.value = 1
+			if (this.value > 1) {
+				e.value = 1;
 				this.value = 1;
-				console.log(this.value)
-				this.$api.msg("每组限购一份");
+				console.log(this.value);
+				this.$api.msg('每组限购一份');
 			}
-			
 		},
 		submit() {
-			if(this.value == 0){
-				this.$api.msg("预约份数不能为0")
-			}
-			else{
+			if (this.value == 0) {
+				this.$api.msg('预约份数不能为0');
+			} else {
 				this.show = false;
 				this.show1 = true;
 			}
@@ -188,26 +217,37 @@ export default {
 			this.show1 = false;
 		},
 		pswQd() {
-			buylala({
-				trade_psw: this.password
-			},this.id).then(e => {
-				this.password = ''
-				this.show1 = false;
-				obj.$api.msg(data.msg);
-			}).catch(e => {
-				this.password = ''
-				this.show1 = false;
-				console.log(e)
-			})
+			buylala(
+				{
+					trade_psw: this.password
+				},
+				this.id
+			)
+				.then(e => {
+					this.password = '';
+					this.show1 = false;
+					obj.$api.msg(data.msg);
+				})
+				.catch(e => {
+					this.password = '';
+					this.show1 = false;
+					console.log(e);
+				});
 		},
-		node(){
-			this.$api.msg("敬请期待")
+		node() {
+			this.$api.msg('敬请期待');
 		},
 		lalaDetial(id) {
 			uni.navigateTo({
 				url: '/pages/index/datile?id=' + id
-			})
-		}
+			});
+		},
+		//轮播图切换修改背景色
+		swiperChange(e) {
+			const index = e.detail.current;
+			this.swiperCurrent = index;
+			this.titleNViewBackground = this.carouselList[index].background;
+		},
 	}
 };
 </script>
@@ -217,6 +257,89 @@ export default {
 	min-height: 100%;
 	background-color: #ffffff;
 }
+.status_bar {
+	height: var(--status-bar-height);
+	width: 100%;
+}
+.carousel {
+	width: 690rpx;
+	height: 300rpx;
+	border-radius: 10rpx;
+	margin: 26rpx auto 0;
+	.bor {
+		border-radius: 10rpx;
+		.carousel-item {
+			image {
+				width: 100%;
+				height: 100%;
+				border-radius: 10rpx;
+			}
+		}
+	}
+}
+.swiper-dot {
+	position: relative;
+	z-index: 10;
+	margin-top: -40rpx;
+	display: flex;
+	justify-content: center;
+
+	.swiper-dots-item {
+		width: 14rpx;
+		height: 14rpx;
+		background: #AAAAAA;
+		border-radius: 50%;
+		margin: 0 16rpx;
+		// z-index: 999;
+	}
+
+	.action {
+		background-color: #FFFFFF;
+	}
+}
+.tongz{
+	width: 690rpx;
+	height: 70rpx;
+	margin: 48rpx auto 0;
+	padding: 18rpx 30rpx 18rpx 24rpx;
+	align-items: center;
+	position: relative;
+	.tongz-bg{
+		position: absolute;
+		top: 0;
+		right: 0;
+		left: 0;
+		width: 690rpx;
+		height: 70rpx;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+	.tongz-left {
+		.image-left {
+			width: 28rpx;
+			height: 34rpx;
+		}
+		.tongz-font {
+			margin-left: 22rpx;
+			font-size: 28rpx;
+			font-family: Source Han Sans CN;
+			font-weight: 400;
+			color: #0F253A;
+		}
+	}
+	.tongz-right {
+		position: relative;
+		z-index: 11;
+		width: 12rpx;
+		height: 26rpx;
+		image{
+			width: 100%;
+			height: 100%;
+		}
+	}
+}
 .box-title {
 	position: relative;
 	z-index: 1;
@@ -237,9 +360,7 @@ export default {
 	height: 100%;
 	position: relative;
 	z-index: 10;
-	margin-top: -40rpx;
-	border-top-left-radius: 40rpx;
-	border-top-right-radius: 40rpx;
+	margin-top: 20rpx;
 	background: #f8fbfe;
 
 	.navBox {
@@ -276,13 +397,12 @@ export default {
 
 	.shopBox {
 		padding: 0 30rpx;
-		margin-top: 45rpx;
 		width: 690rpx;
 		// height: 770rpx;
 		background: #ffffff;
 		box-shadow: 0rpx 0rpx 17rpx 0rpx rgba(0, 0, 0, 0.05);
 		border-radius: 10px;
-		margin: 0 auto;
+		margin: 45rpx auto 0;
 
 		.shopBox-top {
 			margin-top: 26rpx;
@@ -382,13 +502,13 @@ export default {
 		.consume > text,
 		.appointmentTime > text,
 		.lotteryTime > text {
-			font-size: 10rpx;
+			font-size: 24rpx;
 			font-family: PingFang SC;
 			font-weight: 500;
 			color: #000000;
 		}
 		.submit {
-			width:295rpx;
+			width: 280rpx;
 			height: 70rpx;
 			background: linear-gradient(90deg, #60bab0, #45969b);
 			border-radius: 35rpx;
@@ -401,17 +521,17 @@ export default {
 			margin: 40rpx 10rpx;
 		}
 		.submit1 {
-			width:295rpx;
+			width: 280rpx;
 			height: 70rpx;
+			background: #FFFFFF;
 			border: 1px solid #60bab0;
-			background: #fff;
 			border-radius: 35rpx;
 			font-size: 32rpx;
 			font-family: PingFang SC;
 			font-weight: 500;
 			color: #60bab0;
 			text-align: center;
-			line-height: 70rpx;
+			line-height: 72rpx;
 			margin: 40rpx 10rpx;
 		}
 	}
@@ -477,34 +597,34 @@ export default {
 	}
 }
 .psw-wrapper {
-		width: 548rpx;
-		height: 344rpx;
-		background-color: #FFFFFF;
-		.psw-title {
-			width: 100%;
-			font-size: 35rpx;
-			padding: 43rpx 0 49rpx;
-			text-align: center;
-			font-weight: 800;
-		}
-		.psw-ipt {
-			display: block;
-			background-color: #dce3ed;
-			height: 90rpx;
-			width: 464rpx;
-			padding-left: 30rpx;
-			margin: 0 auto;
-			font-size: 80rpx;
-		}
-		.psw-btn text{
-			display: inline-block;
-			text-align: center;
-			width: 50%;
-			padding-top: 29rpx;
-			font-size: 35rpx;
-		}
-		.psw-qd {
-			color:#45969B;
-		}
+	width: 548rpx;
+	height: 344rpx;
+	background-color: #ffffff;
+	.psw-title {
+		width: 100%;
+		font-size: 35rpx;
+		padding: 43rpx 0 49rpx;
+		text-align: center;
+		font-weight: 800;
+	}
+	.psw-ipt {
+		display: block;
+		background-color: #dce3ed;
+		height: 90rpx;
+		width: 464rpx;
+		padding-left: 30rpx;
+		margin: 0 auto;
+		font-size: 80rpx;
 	}
+	.psw-btn text {
+		display: inline-block;
+		text-align: center;
+		width: 50%;
+		padding-top: 29rpx;
+		font-size: 35rpx;
+	}
+	.psw-qd {
+		color: #45969b;
+	}
+}
 </style>

+ 6 - 4
pages/money/payment.vue

@@ -25,7 +25,7 @@
 	</view>
 </template>
 <script>
-import { updatalogin } from '@/api/set.js';
+import { registerReset } from '@/api/set.js';
 import { verify } from '@/api/login.js';
 export default {
 	data() {
@@ -38,9 +38,10 @@ export default {
 			countDown: 0 //倒计时
 		};
 	},
-	onLoad(option){
+	onLoad(){
 		let userInfo = uni.getStorageSync('userInfo') || '';
-		this.phone = userInfo.account
+		console.log(userInfo)
+		this.phone = userInfo.phone
 	},
 	onShow() {
 		
@@ -76,7 +77,7 @@ export default {
 				obj.$api.msg('请输入验证码');
 				return;
 			}
-			updatalogin({
+			registerReset({
 				account: obj.phone, //账号
 				password:obj.password,
 				password2:obj.password2,
@@ -94,6 +95,7 @@ export default {
 		//发送验证码
 		verification() {
 			let obj = this;
+			console.log(obj.phone)
 			if (this.phone == '') {
 				this.$api.msg('请输入电话号码');
 				return;

+ 54 - 52
pages/public/forget.vue

@@ -27,15 +27,15 @@
 	</view>
 </template>
 <script>
-import { updatalogin } from '@/api/set.js';
+import { registerReset } from '@/api/set.js';
 import { verify } from '@/api/login.js';
 export default {
 	data() {
 		return {
 			phone: '', //用户
 			code: '', //验证码
-			password2:'',
-			password:'',
+			password2: '',
+			password: '',
 			time: '', //保存倒计时对象
 			countDown: 0 //倒计时
 		};
@@ -76,20 +76,22 @@ export default {
 				obj.$api.msg('请输入验证码');
 				return;
 			}
-			updatalogin({
+			registerReset({
 				account: obj.phone, //账号
-				password:obj.password,
-				password2:obj.password2,
-				type:1,
+				password: obj.password,
+				password2: obj.password2,
+				type: 1,
 				captcha: obj.code
-			}).then(function(e) {
-				obj.$api.msg(e.msg);
-				uni.navigateTo({
-					url: '/pages/public/login'
+			})
+				.then(function(e) {
+					obj.$api.msg(e.msg);
+					uni.navigateTo({
+						url: '/pages/public/login'
+					});
+				})
+				.catch(e => {
+					console.log(e);
 				});
-			}).catch((e) => {
-				console.log(e);
-			});
 		},
 		//发送验证码
 		verification() {
@@ -120,55 +122,56 @@ export default {
 						console.log(err);
 					});
 			}
-		},
+		}
 	}
 };
 </script>
 
 <style lang="scss">
 page {
-		min-height: 100%;
-		background-color: #ffffff;
-		.container {
-			width: 100%;
-			padding: 60rpx 70rpx;
-		}
+	min-height: 100%;
+	background-color: #ffffff;
+	.container {
+		width: 100%;
+		padding: 60rpx 70rpx;
 	}
-	.logo-img{
+}
+.logo-img {
+	width: 161rpx;
+	height: 161rpx;
+	margin:auto;
+	margin-top: 52rpx !important;
+	margin-bottom: 15rpx !important;
+	box-shadow: 0px 12rpx 13rpx 0px rgba(68, 150, 157, 0.47);
+	border-radius: 50%;
+	image {
 		width: 161rpx;
 		height: 161rpx;
-		margin: auto;
-		margin-bottom: 15rpx !important;
-		box-shadow: 0px 12rpx 13rpx 0px rgba(68, 150, 157, 0.47);
 		border-radius: 50%;
-		image{
-			width: 161rpx;
-			height: 161rpx;	
-			border-radius: 50%;
-		}
-	}
-	.logo{
-		font-size: 36rpx;
-		font-weight: 400;
-		color: #44969D;
-		text-align: center;
-	}
-	.phone{
-		height: 43rpx !important;
-		width: 27rpx !important;
-	}
-	.codeimg{
-		height: 39rpx !important;
-		width: 31rpx !important;
 	}
+}
+.logo {
+	font-size: 36rpx;
+	font-weight: 400;
+	color: #44969d;
+	text-align: center;
+}
+.phone {
+	height: 43rpx !important;
+	width: 27rpx !important;
+}
+.codeimg {
+	height: 39rpx !important;
+	width: 31rpx !important;
+}
 .login_text {
 	border-radius: 20rpx;
 	margin-top: 80rpx;
 	.login_input {
 		// border-bottom: 1px solid #C5CEE0;
-		margin-bottom:35rpx;
+		margin-bottom: 35rpx;
 		padding-bottom: 60rpx;
-		.login_img  {
+		.login_img {
 			height: 35rpx;
 			width: 31rpx;
 			margin-right: 20rpx;
@@ -180,12 +183,12 @@ page {
 		.uni-input {
 			text-align: left;
 			width: 400rpx;
-			font-size:32rpx !important;
+			font-size: 32rpx !important;
 		}
 		.login_name {
 			color: #333333;
 			.code {
-				color: #60BAB0;
+				color: #60bab0;
 				font-size: 23rpx;
 				border-left: 1px solid #eeeeee;
 				width: 150rpx;
@@ -196,13 +199,12 @@ page {
 	}
 }
 
-.login{
-	background: linear-gradient(90deg, #60BAB0, #60BAB0, #45969B);
+.login {
+	background: linear-gradient(90deg, #60bab0, #60bab0, #45969b);
 	margin-top: 96rpx;
-	color: #FFFFFF;
+	color: #ffffff;
 	text-align: center;
 	padding: 26rpx 0rpx;
 	border-radius: 20rpx;
 }
-
 </style>

+ 160 - 159
pages/public/register.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="container">
+		<view class="status_bar"><!-- 这里是状态栏 --></view>
 		<view class="loginTitle">欢迎注册LALA</view>
 		<view class="loginText">请认真填写个人信息</view>
 		<view class="login-box">
@@ -15,190 +16,190 @@
 		</view>
 		<view class="login-box">
 			<view class="username">登录密码</view>
-			<input class="input-box" type="password" v-model="loginPass"  placeholder="请输入登录密码" />
+			<input class="input-box" type="password" v-model="loginPass" placeholder="请输入登录密码" />
 		</view>
 		<view class="login-box">
-			<view class="username">支付密码</view>
-			<input class="input-box" type="password" v-model="payPass" placeholder="请输入支付密码" />
+			<view class="username">交易密码</view>
+			<input class="input-box" type="password" v-model="payPass" placeholder="请输入交易密码" />
 		</view>
 		<view class="login-box">
 			<view class="username">邀请码</view>
-			<input class="input-box" type="password" v-model="invitation"  placeholder="请输入邀请码" />
+			<input class="input-box" type="text" v-model="invitation" placeholder="请输入邀请码" />
 		</view>
 		<view class="login" @click="register">注册</view>
 	</view>
 </template>
 
 <script>
-	import { register, verify } from '@/api/login.js';
-	export default {
-		data() {
-			return {
-				phone: '', //用户
-				loginPass: '', //密码
-				payPass: '',
-				invitation: '', //邀请码
-				code: '', //验证码
-				time: '', //保存倒计时对象
-				countDown: 0, //倒计时
-			};
-		},
-		onLoad() {
-			// 获取扫码邀请人id
-			this.invitation = uni.getStorageSync('spread') || '';
-		},
-		watch: {
-			// 监听倒计时
-			countDown(i) {
-				if (i == 0) {
-					clearInterval(this.time);
-				}
+import { register, verify } from '@/api/login.js';
+export default {
+	data() {
+		return {
+			phone: '', //用户
+			loginPass: '', //密码
+			payPass: '',
+			invitation: '', //邀请码
+			code: '', //验证码
+			time: '', //保存倒计时对象
+			countDown: 0 //倒计时
+		};
+	},
+	onLoad() {
+		// 获取扫码邀请人id
+		this.invitation = uni.getStorageSync('spread') || '';
+	},
+	watch: {
+		// 监听倒计时
+		countDown(i) {
+			if (i == 0) {
+				clearInterval(this.time);
+			}
+		}
+	},
+	methods: {
+		// 注册
+		register() {
+			let obj = this;
+			if (obj.phone == '') {
+				obj.$api.msg('请输入电话号码');
+				return;
+			}
+			if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(obj.phone)) {
+				obj.$api.msg('请输入正确的手机号');
+				return;
+			}
+			if (obj.loginPass == '') {
+				obj.$api.msg('请输入登录密码');
+				return;
+			}
+			if (obj.payPass == '') {
+				obj.$api.msg('请输入支付密码');
+				return;
 			}
+			if (obj.code == '') {
+				obj.$api.msg('请输入验证码');
+				return;
+			}
+			if (obj.invitation == '') {
+				obj.$api.msg('请输入邀请码');
+				return;
+			}
+			register({
+				account: obj.phone, //账号
+				captcha: obj.code, //验证码
+				password: obj.loginPass,
+				trade_password: obj.payPass,
+				spread: obj.invitation
+			}).then(function(e) {
+				uni.showToast({
+					title: '注册成功',
+					duration: 2000,
+					position: 'top',
+					icon: 'none'
+				});
+				setTimeout(function() {
+					uni.navigateTo({
+						url: '/pages/public/login'
+					});
+				}, 1000);
+			});
+			//调用注册接口,成功跳转登录页
 		},
-		methods: {
-			// 注册
-			register() {
-				let obj = this;
-				if (obj.phone == '') {
-					obj.$api.msg('请输入电话号码');
-					return;
-				}
-				if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(obj.phone)) {
-					obj.$api.msg('请输入正确的手机号');
-					return;
-				}
-				if (obj.loginPass == '') {
-					obj.$api.msg('请输入登录密码');
-					return;
-				}
-				if (obj.payPass == '') {
-					obj.$api.msg('请输入支付密码');
-					return;
-				}
-				if (obj.code == '') {
-					obj.$api.msg('请输入验证码');
-					return;
-				}
-				if (obj.invitation == '') {
-					obj.$api.msg('请输入邀请码');
-					return;
-				}
-				register({
-					account: obj.phone, //账号
-					captcha: obj.code, //验证码
-					password:obj.loginPass,
-					trade_password:obj.payPass,
-					invite_code:obj.invitation
-				}).then(function(e) {
-					uni.showToast({
-						title: '注册成功',
-						duration: 2000,
-						position: 'top',
-						icon: 'none'
+		//发送验证码
+		verification() {
+			let obj = this;
+			if (this.phone == '') {
+				this.$api.msg('请输入电话号码');
+				return;
+			}
+			if (this.phone.length < 11) {
+				this.$api.msg('请输入正确的手机号');
+				return;
+			}
+			// 判断是否在倒计时
+			if (obj.countDown > 0) {
+				return false;
+			} else {
+				obj.countDown = 60;
+				obj.time = setInterval(() => {
+					obj.countDown--;
+				}, 1000);
+				//调用验证码接口
+				verify({
+					phone: obj.phone,
+					type: 'register'
+				})
+					.then(({ data }) => {})
+					.catch(err => {
+						console.log(err);
 					});
-					setTimeout(function() {
-						uni.navigateTo({
-							url: '/pages/public/login'
-						});
-					}, 1000)
-
-				});
-				//调用注册接口,成功跳转登录页
-			},
-			//发送验证码
-			verification() {
-				let obj = this;
-				if (this.phone == '') {
-					this.$api.msg('请输入电话号码');
-					return;
-				}
-				if (this.phone.length < 11) {
-					this.$api.msg('请输入正确的手机号');
-					return;
-				}
-				// 判断是否在倒计时
-				if (obj.countDown > 0) {
-					return false;
-				} else {
-					obj.countDown = 60;
-					obj.time = setInterval(() => {
-						obj.countDown--;
-					}, 1000);
-					//调用验证码接口
-					verify({
-							phone: obj.phone,
-							type: 'register'
-						})
-						.then(({
-							data
-						}) => {})
-						.catch(err => {
-							console.log(err);
-						});
-				}
-			},
+			}
 		}
-	};
+	}
+};
 </script>
 
 <style lang="scss">
-	page {
-		min-height: 100%;
-		background-color: #ffffff;
+page {
+	min-height: 100%;
+	background-color: #ffffff;
 
-		.container {
-			width: 100%;
-			padding: 10% 60rpx 0rpx 60rpx;
-		}
+	.container {
+		width: 100%;
+		padding: 10% 60rpx 0rpx 60rpx;
 	}
+}
+.status_bar {
+	height: var(--status-bar-height);
+	width: 100%;
+}
+.loginTitle {
+	font-weight: bold;
+	color: #333333;
+	font-size: 58rpx;
+	padding-bottom: 25rpx;
+}
 
-	.loginTitle {
-		font-weight: bold;
-		color: #333333;
-		font-size: 58rpx;
-		padding-bottom: 25rpx;
-	}
+.loginText {
+	font-weight: 500;
+	color: #333333;
+	font-size: 34rpx;
+}
 
-	.loginText {
+.login-box {
+	padding-top: 70rpx;
+	.username {
+		padding-bottom: 25rpx;
 		font-weight: 500;
 		color: #333333;
-		font-size: 34rpx;
-	}
-
-	.login-box {
-		padding-top: 70rpx;
-		.username {
-			padding-bottom: 25rpx;
-			font-weight: 500;
-			color: #333333;
-			font-size: 32rpx;
-		}
+		font-size: 32rpx;
 	}
+}
 
-	.login {
-		background: linear-gradient(90deg, #60BAB0, #60BAB0, #45969B);
-		margin-top: 20rpx;
-		color: #FFFFFF;
-		text-align: center;
-		padding: 26rpx 0rpx;
-		border-radius: 50rpx;
-		margin-top: 60rpx;
-	}
-    .code{
-		background: linear-gradient(90deg, #60BAB0, #60BAB0, #45969B);
-		color: #FFFFFF;
-		border-radius: 10rpx;
-		font-weight: 500;
-		color: #FFFFFF;
-		font-size: 26rpx;
-		padding: 12rpx 19rpx;
-	}
-	// /* input 样式 */
-	// .input-placeholder {
-	// 	color: #ffffff;
-	// }
+.login {
+	background: linear-gradient(90deg, #60bab0, #60bab0, #45969b);
+	margin-top: 20rpx;
+	color: #ffffff;
+	text-align: center;
+	padding: 26rpx 0rpx;
+	border-radius: 50rpx;
+	margin-top: 60rpx;
+}
+.code {
+	background: linear-gradient(90deg, #60bab0, #60bab0, #45969b);
+	color: #ffffff;
+	border-radius: 10rpx;
+	font-weight: 500;
+	color: #ffffff;
+	font-size: 26rpx;
+	padding: 12rpx 19rpx;
+}
+// /* input 样式 */
+// .input-placeholder {
+// 	color: #ffffff;
+// }
 
-	// .placeholder {
-	// 	color: #ffffff;
-	// }
+// .placeholder {
+// 	color: #ffffff;
+// }
 </style>

+ 148 - 99
pages/set/password.vue

@@ -1,48 +1,46 @@
 <template>
 	<view class="container">
-		<view class="row b-b">
-			<text class="tit">手机号</text>
-			<input class="input" v-model="account" type="text" placeholder="请填写手机号" placeholder-class="placeholder" />
+		<view class="logo-img"><image src="../../static/img/log.png" mode=""></image></view>
+		<view class="logo">LOGO</view>
+		<view class="login_text">
+			<view class="login_input flex_item">
+				<view class="login_img"><image class="phone" src="/static/img/phone.png"></image></view>
+				<view class="login_name"><input class="uni-input" type="number" v-model="phone" focus placeholder="请输入手机号码" /></view>
+			</view>
+			<view class="login_input flex_item">
+				<view class="login_img"><image src="/static/img/password.png"></image></view>
+				<view class="login_name"><input class="uni-input" type="password" v-model="password" focus placeholder=" 请输入新的不少于6位的密码" /></view>
+			</view>
+			<view class="login_input flex_item">
+				<view class="login_img"><image src="/static/img/password.png"></image></view>
+				<view class="login_name"><input class="uni-input" type="password" v-model="password2" focus placeholder="请重复输入新密码" /></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img"><image class="codeimg" src="/static/img/yan.png"></image></view>
+				<view class="login_name flex">
+					<input class="uni-input width" v-model="code" type="number" focus placeholder="请输入验证码" />
+					<view class="code" @click="verification">{{ countDown == 0 ? '发送验证码' : countDown }}</view>
+				</view>
+			</view>
 		</view>
-		<view class="row b-b">
-			<text class="tit">验证码</text>
-			<input class="input" v-model="captcha" type="text" placeholder="请填写验证码" placeholder-class="placeholder" />
-			<view class="code" @click="verification">{{ countDown == 0 ? '验证码' : countDown }}</view>
-		</view>
-		<view class="row b-b">
-			<text class="tit">新密码</text>
-			<input class="input" v-model="password" type="password" placeholder="请填写新密码" placeholder-class="placeholder" />
-		</view>
-		<button class="add-btn" :class="{'bg-gray':loding}" @click="loding?'':confirm()">提交</button>
+		<view class="login" @click="updatalogin">确认修改</view>
 	</view>
 </template>
-
 <script>
-import { verify } from '@/api/login.js';
-import { mapState } from 'vuex';
 import { registerReset } from '@/api/set.js';
+import { verify } from '@/api/login.js';
 export default {
 	data() {
 		return {
+			phone: '', //用户
+			code: '', //验证码
+			password2: '',
+			password: '',
 			time: '', //保存倒计时对象
-			countDown: 0, //倒计时
-			account: '', //手机号
-			captcha: '', //验证码
-			password: '' ,//新密码
-			loding:false,//是否载入中
+			countDown: 0 //倒计时
 		};
 	},
-	computed: {
-		...mapState(['userInfo'])
-	},
-	onLoad() {
-		if(this.userInfo.phone == null){
-			this.account = '';
-		}else{
-			this.account = this.userInfo.phone;
-			this.show = false;
-		}
-	},
+	onLoad() {},
 	watch: {
 		// 监听倒计时
 		countDown(i) {
@@ -52,14 +50,57 @@ export default {
 		}
 	},
 	methods: {
+		updatalogin() {
+			let obj = this;
+			if (obj.phone == '') {
+				obj.$api.msg('请输入手机号码');
+				return;
+			}
+			if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(obj.phone)) {
+				obj.$api.msg('请输入正确的手机号');
+				return;
+			}
+			if (obj.password == '') {
+				obj.$api.msg('请输入密码');
+				return;
+			}
+			if (obj.password2 == '') {
+				obj.$api.msg('请再次输入密码');
+				return;
+			}
+			if (obj.password2 != obj.password) {
+				obj.$api.msg('两次密码不正确');
+				return;
+			}
+			if (obj.code == '') {
+				obj.$api.msg('请输入验证码');
+				return;
+			}
+			registerReset({
+				account: obj.phone, //账号
+				password: obj.password,
+				password2: obj.password2,
+				type: 1,
+				captcha: obj.code
+			})
+				.then(function(e) {
+					obj.$api.msg(e.msg);
+					uni.navigateTo({
+						url: '/pages/public/login'
+					});
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
 		//发送验证码
 		verification() {
 			let obj = this;
-			if (this.account == '') {
+			if (this.phone == '') {
 				this.$api.msg('请输入电话号码');
 				return;
 			}
-			if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.account)) {
+			if (this.phone.length < 11) {
 				this.$api.msg('请输入正确的手机号');
 				return;
 			}
@@ -73,30 +114,14 @@ export default {
 				}, 1000);
 				//调用验证码接口
 				verify({
-					phone: obj.account,
-					type: ''
+					phone: obj.phone,
+					type: 'login'
 				})
 					.then(({ data }) => {})
 					.catch(err => {
 						console.log(err);
 					});
 			}
-		},
-		confirm(e) {
-			this.loding = true;
-			registerReset({
-				account: this.account,
-				captcha: this.captcha,
-				password: this.password,
-			})
-				.then(({ data }) => {
-					this.loding = false;
-					this.$api.msg('修改成功');
-				})
-				.catch(err => {
-					this.loding = false;
-					console.log(err);
-				});
 		}
 	}
 };
@@ -104,58 +129,82 @@ export default {
 
 <style lang="scss">
 page {
-	background: $page-color-base;
-}
-.container {
-	padding-top: 30rpx;
-}
-.row {
-	display: flex;
-	align-items: center;
-	position: relative;
-	padding: 0 30rpx;
-	height: 110rpx;
-	background: #fff;
-
-	.tit {
-		flex-shrink: 0;
-		width: 120rpx;
-		font-size: 30rpx;
-		color: $font-color-dark;
-	}
-	.input {
-		flex: 1;
-		font-size: 30rpx;
-		color: $font-color-dark;
+	min-height: 100%;
+	background-color: #ffffff;
+	.container {
+		width: 100%;
+		padding: 60rpx 70rpx;
 	}
-	.iconlocation {
-		font-size: 36rpx;
-		color: $font-color-light;
+}
+.logo-img {
+	width: 161rpx;
+	height: 161rpx;
+	margin:auto;
+	margin-top: 52rpx !important;
+	margin-bottom: 15rpx !important;
+	box-shadow: 0px 12rpx 13rpx 0px rgba(68, 150, 157, 0.47);
+	border-radius: 50%;
+	image {
+		width: 161rpx;
+		height: 161rpx;
+		border-radius: 50%;
 	}
 }
-.add-btn {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 690rpx;
-	height: 80rpx;
-	margin: 60rpx auto;
-	font-size: $font-lg;
-	color: #fff;
-	background-color: $base-color;
-	border-radius: 10rpx;
-	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+.logo {
+	font-size: 36rpx;
+	font-weight: 400;
+	color: #44969d;
+	text-align: center;
 }
-
-.bg-gray{
-	background-color: $color-gray;
+.phone {
+	height: 43rpx !important;
+	width: 27rpx !important;
+}
+.codeimg {
+	height: 39rpx !important;
+	width: 31rpx !important;
+}
+.login_text {
+	border-radius: 20rpx;
+	margin-top: 80rpx;
+	.login_input {
+		// border-bottom: 1px solid #C5CEE0;
+		margin-bottom: 35rpx;
+		padding-bottom: 60rpx;
+		.login_img {
+			height: 35rpx;
+			width: 31rpx;
+			margin-right: 20rpx;
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+		.uni-input {
+			text-align: left;
+			width: 400rpx;
+			font-size: 32rpx !important;
+		}
+		.login_name {
+			color: #333333;
+			.code {
+				color: #60bab0;
+				font-size: 23rpx;
+				border-left: 1px solid #eeeeee;
+				width: 150rpx;
+				flex-shrink: 0;
+				text-align: center;
+			}
+		}
+	}
 }
-.code {
-	color: #5dbc7c;
-	font-size: 23rpx;
-	border-left: 1px solid #eeeeee;
-	width: 150rpx;
-	flex-shrink: 0;
+
+.login {
+	background: linear-gradient(90deg, #60bab0, #60bab0, #45969b);
+	margin-top: 96rpx;
+	color: #ffffff;
 	text-align: center;
+	padding: 26rpx 0rpx;
+	border-radius: 20rpx;
 }
 </style>

+ 275 - 284
pages/user/extension.vue

@@ -1,10 +1,9 @@
 <template>
 	<view class="content">
+		<view class="status_bar"><!-- 这里是状态栏 --></view>
 		<view class="content-money">
 			<view class="money-box">
-				<view class="goback-box" @click="toBack">
-					<image class="goback" src="../../static/img/fanhui.png" mode=""></image>
-				</view>
+				<view class="goback-box" @click="toBack"><image class="goback" src="../../static/img/fanhui.png" mode=""></image></view>
 				<view class="header">我的推广</view>
 				<image class="tuiguang_bg" src="../../static/img/share-bg.png"></image>
 				<!--  <view class="money_img"><image :src="list.avatar || img"></image></view> -->
@@ -20,14 +19,11 @@
 		<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
 			<!-- 空白页 -->
 			<view class="empty-box"><empty v-if="orderList.length === 0"></empty></view>
-			
 
 			<!-- 订单列表 -->
 			<view v-for="(item, index) in orderList" :key="index" class="order-item flex">
 				<view class="title-box flex_item">
-					<view class="title-avatar">
-						<image :src="item.avatar"></image>
-					</view>
+					<view class="title-avatar"><image :src="item.avatar"></image></view>
 					<view class="list_tpl">
 						<view class="title">
 							<text>{{ item.nickname }}</text>
@@ -43,335 +39,330 @@
 	</view>
 </template>
 <script>
-	import {
-		spread
-	} from '@/api/finance.js'
-	import {
-		mapState,
-		mapMutations
-	} from 'vuex';
-	import uniLoadMore from '@/uview-ui/components/u-loading-page/u-loading-page.vue';
-	import empty from '@/uview-ui/components/u-empty/u-empty.vue';
-	export default {
-		components: {
-			empty,
-			uniLoadMore
-		},
-		onReady() {
-			// 初始化获取页面宽度
-			uni.createSelectorQuery()
-				.select('.content')
-				.fields({
-						size: true
-					},
-					data => {
-						// console.log(data);
-						// console.log(Math.floor((data.width / 750) * 300));
-						// 保存头部高度
-						this.maxheight = data.height - Math.floor((data.width / 750) * 470) - 44;
-						// console.log(this.maxheight);
-					}
-				)
-				.exec();
-		},
-		data() {
-			return {
-				
-				// 头部图高度
-				maxheight: '',
-				orderList: [{}],
-				all: '', //推广人数
-				loadingType: 'more', //页面加载即时刷新
-				page: 1, //默认展示一行
-				limit: 10, //一行展示10条数据
-				loadingType:'more'
-			};
-		},
-		onLoad(options) {
-			this.loadData(); //onload只是在第一次进入页面会刷新数据,从二级页面回来不会重新加载数据
+import { spread } from '@/api/finance.js';
+import { mapState, mapMutations } from 'vuex';
+import uniLoadMore from '@/uview-ui/components/u-loading-page/u-loading-page.vue';
+import empty from '@/uview-ui/components/u-empty/u-empty.vue';
+export default {
+	components: {
+		empty,
+		uniLoadMore
+	},
+	onReady() {
+		// 初始化获取页面宽度
+		uni.createSelectorQuery()
+			.select('.content')
+			.fields(
+				{
+					size: true
+				},
+				data => {
+					// console.log(data);
+					// console.log(Math.floor((data.width / 750) * 300));
+					// 保存头部高度
+					this.maxheight = data.height - Math.floor((data.width / 750) * 470) - 44;
+					// console.log(this.maxheight);
+				}
+			)
+			.exec();
+	},
+	data() {
+		return {
+			// 头部图高度
+			maxheight: '',
+			orderList: [{}],
+			all: '', //推广人数
+			loadingType: 'more', //页面加载即时刷新
+			page: 1, //默认展示一行
+			limit: 10, //一行展示10条数据
+			loadingType: 'more'
+		};
+	},
+	onLoad(options) {
+		this.loadData(); //onload只是在第一次进入页面会刷新数据,从二级页面回来不会重新加载数据
+	},
+
+	onShow() {
+		//onShow没有参数
+		this.loadData(); //onshow在每次打开页面都会加载数据,可以用于数据在需要刷新的环境下
+	},
+	methods: {
+		async loadData() {
+			if (this.loadingType == 'nomore') {
+				return;
+			}
+			spread({
+				limit: 10,
+				page: 1
+			}).then(({ data }) => {
+				this.all = data.total;
+				this.orderList = data.list;
+				if (data.length != this.limit) {
+					this.loadingType = 'nomore';
+				} else {
+					this.page++;
+				}
+			});
 		},
 
-		onShow() { //onShow没有参数
-			this.loadData(); //onshow在每次打开页面都会加载数据,可以用于数据在需要刷新的环境下
+		// 页面跳转
+		navto(e) {
+			uni.navigateTo({
+				url: e
+			});
 		},
-		methods: {
-			async loadData() {
-				if (this.loadingType == "nomore") {
-					return;
-				}
-				spread({
-					limit: 10,
-					page: 1
-				}).then(({
-					data
-				}) => {
-					this.all = data.total;
-					this.orderList = data.list;
-					if (data.length != this.limit) {
-						this.loadingType = 'nomore'
-					} else {
-						this.page++;
-					}
-				})
-			},
-			
-			
-			// 页面跳转
-			navto(e) {
-				uni.navigateTo({
-					url: e
-				});
-			},
-			// 点击返回 我的页面
-			toBack() {
-				uni.switchTab({
-					url: '/pages/user/user'
-				});
-			}
-			
+		// 点击返回 我的页面
+		toBack() {
+			uni.switchTab({
+				url: '/pages/user/user'
+			});
 		}
-	};
+	}
+};
 </script>
 
 <style lang="scss">
-	page {
-		background: #ffffff;
-		height: 100%;
-	}
-
-	.content-money {
-		padding-bottom: 30rpx;
-		background: $page-color-base;
-
-		.buttom-box {
-			position: relative;
-			background-color: #ffffff;
-			text-align: center;
-			margin: 0 30rpx;
-			padding: 30rpx 0;
-			border-radius: $border-radius-sm;
-			margin-top: -80rpx;
+.status_bar {
+	height: var(--status-bar-height);
+	width: 100%;
+	background: linear-gradient(90deg, #60bab0, #45969b);
+}
+page {
+	background: #ffffff;
+	height: 100%;
+}
+
+.content-money {
+	padding-bottom: 30rpx;
+	background: $page-color-base;
+
+	.buttom-box {
+		position: relative;
+		background-color: #ffffff;
+		text-align: center;
+		margin: 0 30rpx;
+		padding: 30rpx 0;
+		border-radius: $border-radius-sm;
+		margin-top: -80rpx;
 
-			.buttom {
-				font-size: $font-lg;
-				flex-grow: 1;
+		.buttom {
+			font-size: $font-lg;
+			flex-grow: 1;
 
-				.money {
-					font-weight: bold;
-					font-size: 32rpx;
-					color: #ff0000;
-				}
+			.money {
+				font-weight: bold;
+				font-size: 32rpx;
+				color: #ff0000;
 			}
+		}
 
-			.text {
-				color: #666666;
-			}
+		.text {
+			color: #666666;
+		}
 
-			.interval {
-				width: 2rpx;
-				height: 60rpx;
-				background-color: #eeeeee;
-			}
+		.interval {
+			width: 2rpx;
+			height: 60rpx;
+			background-color: #eeeeee;
+		}
 
-			.icon {
-				height: 50rpx;
-				width: 48rpx;
-				margin: 0 auto;
+		.icon {
+			height: 50rpx;
+			width: 48rpx;
+			margin: 0 auto;
 
-				.icon-img {
-					width: 100%;
-					height: 100%;
-				}
+			.icon-img {
+				width: 100%;
+				height: 100%;
 			}
 		}
 	}
+}
+
+.money-box {
+	// background: $base-color;
+	height: 424rpx;
+	color: #ffffff;
+	text-align: center;
+	font-size: 35rpx;
+	position: relative;
+
+	// padding-top: 60rpx;
+	.header {
+		position: absolute;
+		left: 0;
+		top: 0;
+		width: 100%;
+		height: 80rpx;
+		font-size: 32rpx;
+		font-weight: 700;
+		z-index: 99;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
 
-	.money-box {
-		// background: $base-color;
-		height: 424rpx;
-		color: #ffffff;
-		text-align: center;
-		font-size: 35rpx;
-		position: relative;
-
-		// padding-top: 60rpx;
-		.header {
-			position: absolute;
-			left: 0;
-			top: 0;
-			width: 100%;
-			height: 80rpx;
-			font-size: 32rpx;
-			font-weight: 700;
-			z-index: 99;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-		}
+	.goback-box {
+		position: absolute;
+		left: 18rpx;
+		top: 0;
+		height: 80rpx;
+		display: flex;
+		align-items: center;
+	}
 
-		.goback-box {
-			position: absolute;
-			left: 18rpx;
-			top: 0;
-			height: 80rpx;
-			display: flex;
-			align-items: center;
-		}
+	.goback {
+		z-index: 100;
+		width: 34rpx;
+		height: 34rpx;
+	}
 
-		.goback {
-			z-index: 100;
-			width: 34rpx;
-			height: 34rpx;
-		}
+	.tuiguang_bg {
+		width: 100%;
+		height: 424rpx;
+		position: relative;
+	}
 
-		.tuiguang_bg {
-			width: 100%;
-			height: 424rpx;
-			position: relative;
-		}
+	.money_img {
+		width: 100%;
+		height: 120rpx;
+		text-align: center;
+		padding-top: 50rpx;
+		padding-bottom: 135rpx;
 
-		.money_img {
-			width: 100%;
+		image {
+			width: 120rpx;
 			height: 120rpx;
-			text-align: center;
-			padding-top: 50rpx;
-			padding-bottom: 135rpx;
-
-			image {
-				width: 120rpx;
-				height: 120rpx;
-				border: 4rpx solid #fd5f6f;
-				border-radius: 50%;
-			}
+			border: 4rpx solid #fd5f6f;
+			border-radius: 50%;
 		}
+	}
 
-		.money-frame {
-			position: absolute;
-			top: 0;
-			width: 100%;
-			padding-top: 120rpx;
-			// left: 30rpx;
-			// height: 460rpx;
-			// display: flex;
-			// align-items: flex-start;
-			// flex-direction: column;
-			// justify-content: center;
-		}
+	.money-frame {
+		position: absolute;
+		top: 0;
+		width: 100%;
+		padding-top: 120rpx;
+		// left: 30rpx;
+		// height: 460rpx;
+		// display: flex;
+		// align-items: flex-start;
+		// flex-direction: column;
+		// justify-content: center;
+	}
 
-		.money_name {
-			width: 100%;
-			text-align: center;
-			font-size: 32rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #ffffff;
-		}
+	.money_name {
+		width: 100%;
+		text-align: center;
+		font-size: 32rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #ffffff;
+	}
 
-		.money_num {
-			font-size: 72rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #ffffff;
+	.money_num {
+		font-size: 72rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #ffffff;
 
-			.money_ren {
-				font-size: 36rpx;
-			}
+		.money_ren {
+			font-size: 36rpx;
 		}
 	}
-
-	.navbar {
+}
+
+.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;
 		display: flex;
-		height: 40px;
-		padding: 0 5px;
-		background: #fff;
-		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		justify-content: center;
+		align-items: center;
+		height: 100%;
+		font-size: 15px;
+		color: $font-color-dark;
 		position: relative;
-		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: #ff0000;
 
-				&:after {
-					content: '';
-					position: absolute;
-					left: 50%;
-					bottom: 0;
-					transform: translateX(-50%);
-					width: 44px;
-					height: 0;
-					border-bottom: 2px solid #ff0000;
-				}
+		&.current {
+			color: #ff0000;
+
+			&:after {
+				content: '';
+				position: absolute;
+				left: 50%;
+				bottom: 0;
+				transform: translateX(-50%);
+				width: 44px;
+				height: 0;
+				border-bottom: 2px solid #ff0000;
 			}
 		}
 	}
+}
 
-	// 列表
+// 列表
 
+.order-item {
+	padding: 20rpx 30rpx;
+	line-height: 1.5;
 
-	.order-item {
-		padding: 20rpx 30rpx;
-		line-height: 1.5;
+	.title-box {
+		width: 100%;
 
-		.title-box {
-			width: 100%;
+		.title-avatar {
+			width: 100rpx;
+			height: 100rpx;
+			margin-right: 25rpx;
+			border-radius: 100%;
 
-			.title-avatar {
-				width: 100rpx;
-				height: 100rpx;
-				margin-right: 25rpx;
-				background: #03A9F4;
+			image {
+				width: 100%;
+				height: 100%;
 				border-radius: 100%;
-
-				image {
-					width: 100%;
-					height: 100%;
-					border-radius: 100%;
-				}
 			}
+		}
 
-			.list_tpl {
-				width: 85%;
-
-				.title {
-					font-size: $font-lg;
-					color: $font-color-base;
-					overflow: hidden; //超出的文本隐藏
-					text-overflow: ellipsis; //溢出用省略号显示
-					white-space: nowrap;
-				}
+		.list_tpl {
+			width: 85%;
 
-				.time {
-					font-size: $font-base;
-					color: $font-color-light;
-				}
+			.title {
+				font-size: $font-lg;
+				color: $font-color-base;
+				overflow: hidden; //超出的文本隐藏
+				text-overflow: ellipsis; //溢出用省略号显示
+				white-space: nowrap;
 			}
-		}
 
-		.money {
-			color: #db1935;
-			font-size: $font-lg;
+			.time {
+				font-size: $font-base;
+				color: $font-color-light;
+			}
 		}
 	}
 
-	.list-scroll-content {
-		height: auto;
+	.money {
+		color: #db1935;
+		font-size: $font-lg;
 	}
+}
 
-	.content {
-		height: 100%;
+.list-scroll-content {
+	height: auto;
+}
 
-		.empty-content {
-			background-color: #ffffff;
-		}
+.content {
+	height: 100%;
+
+	.empty-content {
+		background-color: #ffffff;
 	}
+}
 </style>

+ 99 - 65
pages/user/shareQrCode.vue

@@ -1,9 +1,7 @@
 <template>
-	<view class="content">
-		<u-swiper img-mode='scaleToFill' effect3d-previous-margin='80' :list="imgArr" height='800' :autoplay='false' :effect3d="true"  :circular="true" name='wap_poster'></u-swiper>
-		<view class="share-bottom flex" :class="{ 'action-share-bottom': !loading }">
-			<text>长按图片下载</text>
-		</view>
+	<view class="container">
+		<image @longtap="bc_code" class="backImg" :src="backImg"></image>
+		<view class="tki-qrcode"><canvas @longtap="bc_code" canvas-id="qrcode" /></view>
 	</view>
 </template>
 
@@ -13,77 +11,113 @@ export default {
 	// components: { tkiQrcode },
 	data() {
 		return {
-			loading: true,//是否载入图片中
-			imgArr:[]
+			url: '',
+			backImg:'',
+			userInfo:''
 		};
 	},
 	onLoad() {
-		this.loadCodeList()
+		this.spread();
+	},
+	computed: {
+			cpSize() {
+				if(this.unit == "upx"){
+					return uni.upx2px(this.size)
+				}else{
+					return this.size
+				}
+			}
 	},
 	methods: {
-		loadCodeList() {
-			uni.showLoading({
-				title: '载入中',
-				mask: true
-			});
-			// 加载二维码信息
+		spread(){
+			let obj = this;
 			spreadBanner({
-				// #ifdef H5
-				type: 2,
-				// #endif
-				// #ifdef MP
-				type: 1
-				// #endif
-			}).then(e => {
-				uni.hideLoading()
-				this.imgArr = e.data;
-				
-			}).catch((e) => {
-					uni.showModal({
-						title: '生成失败请刷新页面',
-						showCancel: false
-					});
-					uni.hideLoading();
-				});;
+				type:2
+			}).then(({ data }) => {
+				console.log(data)
+				obj.backImg = data[0].wap_poster;
+			});
 		},
-	}
-};
+		bc_code(){
+			let that = this;
+			console.log('保存二维码',this.backImg)
+			uni.downloadFile({           //获得二维码的临时地址
+				url:this.backImg,
+				success:(res)=>{
+					//console.log('获取url',res)
+					if(res.statusCode == 200){
+						uni.saveImageToPhotosAlbum({
+							filePath:res.tempFilePath,//传入临时地址
+							success() {
+								that.$api.msg('保存成功')//封装的提示
+							},
+							fail() {
+								that.$api.msg('保存失败')
+							}
+						})
+					}
+				}
+			})
+		},
+	},
+}
 </script>
 
 <style lang="scss">
-.content {
-	padding-top: 30rpx;
+	page{
+		width: 100%;
+		min-height: 100%;
+		.container{
+			width: 100%;
+			height: 100%;	
+		}
+	}
+	.backImg{
+		position: absolute;
+		width: 100%;
+		height: 100%;
+	}
+.portrait{
+	width: 100%;
+	text-align: center;
+	padding-top: 80rpx;
+	padding-bottom: 30rpx;
+	image{
+		width: 250rpx;
+		height: 250rpx;
+	}
 }
-// #qrShareBox {
-// 	position: absolute;
-// 	left: -9999rpx;
-// 	top: -9999rpx;
-// }
-
-.qrimg {
-	position: absolute;
-	left: -9999rpx;
-	top: -9999rpx;
+.text{
+	text-align: center;
+	width: 100%;
+	color: #FFFFFF;
+	font-size:55rpx;
+	letter-spacing:15rpx;
 }
-.tki-qrcode-canvas {
-	// width: 700rpx;
-	// height: 1245rpx;
-	width: 532rpx;
-	height: 945rpx;
-	margin: 0 auto;
+.uid-name{
+	padding: 50rpx 0rpx;
+	text-align: center;
+	width: 100%;
+	color: #FFFFFF;
 }
-.share-bottom {
-	width: 560rpx;
-	height: 80rpx;
-	color: #ffffff;
-	background-color: $base-color;
-	margin: 0 auto;
-	font-size: $font-lg - 2rpx;
-	margin-top: 30rpx;
-	border-radius: 99rpx;
-	justify-content: center;
-	&.action-share-bottom {
-		background-color: $color-gray;
-	}
+.copy-btn{
+	color: #FFFFFF;
+	background-color: #4BA6ED;
+	border-radius: 50rpx;
+	width: 170rpx;
+	line-height: 70rpx;
+	margin: 0rpx auto;
+	text-align: center;
+}
+.tki-qrcode{
+	position: fixed;
+	bottom: 10%;
+	left: 30%;
+}
+canvas{
+	width:150px;
+	height: 150px;
+	margin: auto;
+	
 }
-</style>
+</style>

+ 2 - 1
pages/user/user.vue

@@ -30,7 +30,7 @@
 					<view class="tt-txt">支付密码</view>
 					<image src="../../static/img/jiantou.png" class="next-icon" mode=""></image>
 				</view>
-				<view class="tt-box" @click="nav('/pages/public/forget')">
+				<view class="tt-box" @click="nav('/pages/set/password')">
 					<image src="../../static/img/pwd.png" class="tt-icon1" mode=""></image>
 					<view class="tt-txt">登录密码</view>
 					<image src="../../static/img/jiantou.png" class="next-icon" mode=""></image>
@@ -102,6 +102,7 @@ export default {
 	methods: {
 		...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
 		loadBaseData() {
+			console.log(this.userInfo)
 			getUserInfo({}).then(({
 				data
 			}) => {

BIN
static/img/index2.png


BIN
static/img/index3.png


BIN
static/img/index6.png


BIN
static/img/ling.png


BIN
static/img/tongz-bg.png