瀏覽代碼

2021-8-16

hwq 4 年之前
父節點
當前提交
b88f3ee4ff

+ 7 - 1
api/market.js

@@ -7,7 +7,13 @@ export function mining(data) {
 		data
 	});
 }
-
+export function mymining(data) {
+	return request({
+		url: '/api/my_mining',
+		method: 'get',
+		data
+	});
+}
 export function buyMining(data,id) {
 	return request({
 		url: '/api/mining/'+id,

+ 31 - 0
api/product.js

@@ -8,6 +8,37 @@ export function lala(data) {
 		data
 	});
 }
+// 可拼团列表
+export function auto(data) {
+	return request({
+		url: '/api/lala/auto_pink',
+		method: 'get',
+		data
+	});
+}
+//拼团详情
+export function autoDetails(data,id) {
+	return request({
+		url: '/api/lala/auto_pink/'+ id,
+		method: 'get',
+		data
+	});
+}
+//购买自动拼团
+export function buyauto(data,id) {
+	return request({
+		url: '/api/lala/auto_pink/'+id,
+		method: 'post',
+		data
+	});
+}
+export function openclose(data,id) {
+	return request({
+		url: '/api/lala/auto_pink/switch/'+id,
+		method: 'post',
+		data
+	});
+}
 // 商品详情
 export function lalaDetial(data,id) {
 	return request({

+ 16 - 0
api/set.js

@@ -25,6 +25,22 @@ export function registerReset(data) {
 		data
 	});
 }
+//节点计划列表
+export function getPoint(data) {
+	return request({
+		url: '/api/point_plan',
+		method: 'GET',
+		data
+	});
+}
+//购买节点
+export function buyPoint(data,id) {
+	return request({
+		url: '/api/point_plan/' + id,
+		method: 'POST',
+		data
+	});
+}
 //设置下级服务费比例
 export function setServiceRatio(uid,data) {
 	return request({

+ 8 - 1
api/user.js

@@ -9,7 +9,14 @@ export function getUserInfo(data) {
 		data
 	});
 }
-
+// 获取用户节点信息
+export function myPiont(data) {
+	return request({
+		url: '/api/my_point',
+		method: 'get',
+		data
+	});
+}
 // 用户分享图
 export function spreadBanner(data) {
 	return request({

+ 195 - 0
components/uni-countdown/uni-countdown.vue

@@ -0,0 +1,195 @@
+<template>
+	<view class="uni-countdown">
+		<text v-if="showDay" :style="{ borderColor: borderColor, color: color, backgroundColor: backgroundColor }" class="uni-countdown__number">{{ d }}</text>
+		<text v-if="showDay" :style="{ color: splitorColor }" class="uni-countdown__splitor">天</text>
+		<text :style="{ borderColor: borderColor, color: color, backgroundColor: backgroundColor }" class="uni-countdown__number">{{ h }}</text>
+		<text :style="{ color: splitorColor }" class="uni-countdown__splitor">{{ showColon ? ':' : '时' }}</text>
+		<text :style="{ borderColor: borderColor, color: color, backgroundColor: backgroundColor }" class="uni-countdown__number">{{ i }}</text>
+		<text :style="{ color: splitorColor }" class="uni-countdown__splitor">{{ showColon ? ':' : '分' }}</text>
+		<text :style="{ borderColor: borderColor, color: color, backgroundColor: backgroundColor }" class="uni-countdown__number">{{ s }}</text>
+		<text v-if="!showColon" :style="{ color: splitorColor }" class="uni-countdown__splitor">秒</text>
+	</view>
+</template>
+<script>
+	export default {
+		name: 'UniCountdown',
+		props: {
+			showDay: {
+				type: Boolean,
+				default: true
+			},
+			showColon: {
+				type: Boolean,
+				default: true
+			},
+			backgroundColor: {
+				type: String,
+				default: '#FFFFFF'
+			},
+			borderColor: {
+				type: String,
+				default: '#000000'
+			},
+			color: {
+				type: String,
+				default: '#000000'
+			},
+			splitorColor: {
+				type: String,
+				default: '#000000'
+			},
+			day: {
+				type: Number,
+				default: 0
+			},
+			hour: {
+				type: Number,
+				default: 0
+			},
+			minute: {
+				type: Number,
+				default: 0
+			},
+			second: {
+				type: Number,
+				default: 0
+			},
+			index: {
+				type:Number,
+				default: 0
+			}
+		},
+		data() {
+			return {
+				timer: null,
+				syncFlag: false,
+				d: '00',
+				h: '00',
+				i: '00',
+				s: '00',
+				leftTime: 0,
+				seconds: 0
+			}
+		},
+		watch: {
+			day(val) {
+				this.changeFlag()
+			},
+			hour(val) {
+				this.changeFlag()
+			},
+			minute(val) {
+				this.changeFlag()
+			},
+			second(val) {
+				this.changeFlag()
+			}
+		},
+		created: function(e) {
+			this.startData();
+		},
+		beforeDestroy() {
+			clearInterval(this.timer)
+		},
+		methods: {
+			toSeconds(day, hours, minutes, seconds) {
+				return day * 60 * 60 * 24 + hours * 60 * 60 + minutes * 60 + seconds
+			},
+			timeUp() {
+				clearInterval(this.timer)
+				this.$emit('timeup')
+			},
+			countDown() {
+				let seconds = this.seconds
+				let [day, hour, minute, second] = [0, 0, 0, 0]
+				if (seconds > 0) {
+					day = Math.floor(seconds / (60 * 60 * 24))
+					hour = Math.floor(seconds / (60 * 60)) - (day * 24)
+					minute = Math.floor(seconds / 60) - (day * 24 * 60) - (hour * 60)
+					second = Math.floor(seconds) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60)
+				} else {
+					this.timeUp()
+				}
+				if (day < 10) {
+					day = '0' + day
+				}
+				if (hour < 10) {
+					hour = '0' + hour
+				}
+				if (minute < 10) {
+					minute = '0' + minute
+				}
+				if (second < 10) {
+					second = '0' + second
+				}
+				this.d = day
+				this.h = hour
+				this.i = minute
+				this.s = second
+			},
+			startData() {
+				this.seconds = this.toSeconds(this.day, this.hour, this.minute, this.second)
+				if (this.seconds <= 0) {
+					return
+				}
+				this.countDown()
+				this.timer = setInterval(() => {
+					this.seconds--
+					if (this.seconds < 0) {
+						this.timeUp()
+						return
+					}
+					this.countDown()
+					if(this.d === '00' && this.h === '00' && this.i === '00' && this.s === '00'){
+						this.$emit('timeover',this.index)
+					}
+				}, 1000)
+			},
+			changeFlag() {
+				if (!this.syncFlag) {
+					this.seconds = this.toSeconds(this.day, this.hour, this.minute, this.second)
+					this.startData();
+					this.syncFlag = true;
+				}
+			}
+		}
+	}
+</script>
+<style lang="scss" scoped>
+	@import '~@/uni.scss';
+	$countdown-height: 48rpx;
+	$countdown-width: 52rpx;
+
+	.uni-countdown {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: flex-start;
+		padding: 2rpx 0;
+	}
+
+	.uni-countdown__splitor {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		justify-content: center;
+		line-height: $countdown-height;
+		padding: 5rpx;
+		font-size: $uni-font-size-sm;
+	}
+
+	.uni-countdown__number {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		justify-content: center;
+		align-items: center;
+		width: $countdown-width;
+		height: $countdown-height;
+		line-height: $countdown-height;
+		margin: 5rpx;
+		text-align: center;
+		font-size: $uni-font-size-sm;
+	}
+</style>

+ 1 - 1
main.js

@@ -10,7 +10,7 @@ import App from './App'
  *  css部分使用了App.vue下的全局样式和iconfont图标,有需要图标库的可以留言。
  *  示例使用了uni.scss下的变量, 除变量外已尽量移除特有语法,可直接替换为其他预处理器使用
  */
-const msg = (title, duration=1500, mask=false, icon='none')=>{
+const msg = (title, duration=3000, mask=false, icon='none')=>{
 	//统一提示方便全局修改
 	if(Boolean(title) === false){
 		return;

+ 15 - 12
manifest.json

@@ -2,8 +2,8 @@
     "name" : "Lala NFT",
     "appid" : "__UNI__3CDE968",
     "description" : "",
-    "versionName" : "1.0.3",
-    "versionCode" : 103,
+    "versionName" : "1.1.0",
+    "versionCode" : 110,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */
@@ -21,16 +21,12 @@
             "android" : {
                 /* android打包配置 */
                 "permissions" : [
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
-                    "<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.FLASHLIGHT\"/>",
-                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
                     "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
                     "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>"
                 ],
-                "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
+                "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
+                "autoSdkPermissions" : true
             },
             "ios" : {
                 "idfa" : false
@@ -45,15 +41,22 @@
                         "UniversalLinks" : ""
                     }
                 },
-                "ad" : {}
+                "ad" : {},
+                "geolocation" : {},
+                "payment" : {},
+                "push" : {},
+                "share" : {},
+                "speech" : {
+                    "ifly" : {}
+                }
             },
             "splashscreen" : {
                 "androidStyle" : "default",
                 "iosStyle" : "common",
                 "android" : {
-                    "hdpi" : "C:/Users/Administrator/Desktop/137a955def8d57faac7e2f62492c22d.png",
-                    "xhdpi" : "C:/Users/Administrator/Desktop/137a955def8d57faac7e2f62492c22d.png",
-                    "xxhdpi" : "C:/Users/Administrator/Desktop/137a955def8d57faac7e2f62492c22d.png"
+                    "hdpi" : "C:/Users/Administrator/Desktop/qidongtu.9.png",
+                    "xhdpi" : "C:/Users/Administrator/Desktop/qidongtu.9.png",
+                    "xxhdpi" : "C:/Users/Administrator/Desktop/qidongtu.9.png"
                 },
                 "ios" : {
                     "iphone" : {

+ 31 - 1
pages.json

@@ -24,6 +24,24 @@
 				}
 			}
 		},
+		{
+			"path": "pages/user/myNote",
+			"style": {
+				"navigationBarTitleText": "我的节点"
+			}
+		},
+		{
+			"path": "pages/market/myCalculation",
+			"style": {
+				"navigationBarTitleText": "我的矿机"
+			}
+		},
+		{
+			"path": "pages/index/info",
+			"style": {
+				"navigationBarTitleText": "汇总数据"
+			}
+		},
 		{
 			"path": "pages/assets/details",
 			"style": {
@@ -99,7 +117,19 @@
 					}
 				}
 			}
-		},{
+		},
+		{
+			"path": "pages/index/appointmentD",
+			"style": {
+				"navigationBarTitleText": "自动预约",
+				"app-plus": {
+					"titleNView": {
+						
+					}
+				}
+			}
+		},
+		{
 			"path": "pages/public/login",
 			"style": {
 				"navigationBarTitleText": "登录",

+ 7 - 1
pages/assets/details.vue

@@ -31,7 +31,7 @@
 		</view>
 		<view class="empty-box" v-show="list.length == 0"><u-empty></u-empty></view>
 		<view class="flex submit-box">
-			<view class="submit" @click="recharge">充币</view>
+			<view class="submit" @click="recharge" v-if="moneyData.isTi">充币</view>
 			<view class="tip" v-if="moneyData.type==1"></view>
 			<view class="submit" @click="withdraw" v-if="moneyData.type==1">提币</view>
 		</view>
@@ -139,6 +139,12 @@ export default {
 				obj.moneyData.code = dat.code;
 				obj.moneyData.money = dat.money.money;
 				obj.moneyData.type = +dat.can_cash
+				if(dat.money.address){
+					obj.moneyData.isTi = true
+				}else {
+					obj.moneyData.isTi = false
+				}
+				console.log(obj.moneyData)
 			});
 		},
 		selectOne(options) {

+ 2 - 2
pages/assets/transfer.vue

@@ -94,7 +94,7 @@ export default {
 					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.money = obj.moneyTypeList[0].money.money - obj.moneyTypeList[0].money.only_pink*1;
 				}
 			});
 		},
@@ -138,7 +138,7 @@ export default {
 			this.logo = options.LOGO;
 			this.name = options.name;
 			this.code = options.code;
-			this.money = options.money.money;
+			this.money = options.money.money - options.money.only_pink;
 		},
 		useOutClickSide() {
 			this.$refs.easySelect.hideOptions && this.$refs.easySelect.hideOptions();

+ 95 - 121
pages/index/appointment.vue

@@ -1,142 +1,116 @@
 <template>
-	<view class="appointment">
-
-
-		<view class="appointment-top">
-			<view class="button">
-				自动预约
-				<u-switch v-model="checked" active-color="#44969D" inactive-color="#eee"></u-switch>
+	<view class="center">
+		<view class="box" v-for="(item, index) in list" :key="index" @click="nav(item.id)">
+			<view class="top flex">
+				<view class="bg"><image src=".../../static/img/index4.png" mode=""></image></view>
+				<view class="title">{{ item.name }}</view>
 			</view>
-			<view class="setting">
-				每轮抢购设置
-				<view class="select">
-					每期最大预约份数
-					<view class="select-img">
-						<image src="../../static/img/appointment1.png" mode=""></image>
-					</view>
-				</view>
+			<view class="main-bg">
+				<image src="../../static/img/auto.png" mode=""></image>
 			</view>
-		</view>
-		<view class="appointment-between">
-			开启后讲自动预约,默认最大份额预约。可设置自定义预约份额。
-			可开启自动预约
-		</view>
-		<view class="commit">
-			提交修改
+			<view class="font">
+				预约消耗:<span class="money">{{ item.money * 1}}{{ item.money_type }}</span>
+			</view>
+			<view class="font" style="margin-top: 10rpx;">
+				预约时间:<span class="time" >{{item.is_forever == 1? '永久' : item.valid_date+'天'}}</span>
+			</view>
+			<view class="btn">查看详情</view>
 		</view>
 	</view>
 </template>
 
 <script>
-	// import uSwitch from 
-	export default {
-		data() {
-			return {
-				checked: false
-			};
+import { auto } from '@/api/product.js';
+export default {
+	data() {
+		return {
+			list: []
+		};
+	},
+	onLoad() {
+		this.loadData();
+	},
+	methods: {
+		async loadData() {
+			auto({}).then(({ data }) => {
+				this.list = data.data;
+			});
 		},
-		methods: {
-			//switch打开或者关闭时触发,值为true或者false
-			//即使不监听此事件,this.checked此时也会相应的变成true或者false
+		nav(id) {
+			uni.navigateTo({
+				url: '/pages/index/appointmentD?id=' + id
+			});
 		}
 	}
+};
 </script>
 
 <style lang="scss">
-	.appointment {
-		width: 100%;
-		height: 100%;
-		margin: 0;
-		padding: 0;
-		padding: 0 30rpx;
-
-		.appointment-top {
-			width: 690rpx;
-			height: 200rpx;
-			padding: 0 30rpx;
-			background: #FFFFFF;
-			border-radius: 20rpx;
-			margin: 25rpx auto;
-
-			.button {
-				border-bottom:2rpx solid #ECECEC;
-				padding: 20rpx 0;
-				display: flex;
-				justify-content: space-between;
-				align-items: center;
-				font-size: 28rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #0F253A;
-				line-height: 42rpx;
-
-			}
-
-			.setting {
-				padding: 30rpx 0;
-				display: flex;
-				justify-content: space-between;
-				align-items: center;
-				font-size: 28rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #0F253A;
-				line-height: 42rpx;
-
-				.select {
-					display: flex;
-
-					font-size: 18rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #44969D;
-					line-height: 42rpx;
-					border: 1px solid #44969D;
-					border-radius: 1rpx;
-
-					.select-img {
-						width: 40rpx;
-						height: 48rpx;
-						background: #44969D;
-						display: flex;
-						justify-content: center;
-						align-items: center;
-
-
-						image {
-							width: 22rpx;
-							height: 11rpx;
-
-						}
-					}
-				}
+.center,
+page {
+	background: #f5f5f5;
+}
+.box {
+	margin: 20rpx auto 0;
+	width: 690rpx;
+	padding: 20rpx 20rpx 52rpx 30rpx;
+	background: #ffffff;
+	box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.05);
+	border-radius: 20rpx;
+	.top {
+		justify-content: flex-start;
+		align-items: center;
+		.bg {
+			width: 48rpx;
+			height: 46rpx;
+			image {
+				width: 100%;
+				height: 100%;
 			}
 		}
-
-		.appointment-between {
-			margin: 50rpx 25rpx 0 25rpx;
-			font-size: 24rpx;
+		.title {
+			margin-left: 10rpx;
+			font-size: 34rpx;
 			font-family: PingFang SC;
-			font-weight: 500;
-			color: #6D7C88;
-			line-height: 30rpx;
+			font-weight: bold;
+			color: #0F253A;
 		}
-
-		.commit {
-			margin-top: 200rpx;
-			width: 688rpx;
-			height: 88rpx;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			height: 88rpx;
-			background: linear-gradient(90deg,  #60BAB0, #45969B);
-			border-radius: 10rpx;
-			font-size: 36rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #FFFFFF;
-			line-height: 30rpx;
+	}
+	.main-bg {
+		width: 520rpx;
+		height: 165rpx;
+		margin: 55rpx auto 0;
+		image{
+			width: 100%;
+			height: 100%;
+		}
+	}
+	.font {
+		margin-top: 62rpx;
+		font-size: 26rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #6D7C88;
+		.money {
+			font-size: 30rpx;
+			color: #44969D;
+		}
+		.time {
+			color:#0F253A;
 		}
 	}
+	.btn {
+		width: 558rpx;
+		height: 80rpx;
+		background: linear-gradient(90deg, #60BAB0, #60BAB0, #45969B);
+		border-radius: 40rpx;
+		margin: 49rpx auto 0;
+		text-align: center;
+		line-height: 80rpx;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #FFFFFF;
+	}
+}
 </style>

+ 325 - 0
pages/index/appointmentD.vue

@@ -0,0 +1,325 @@
+<template>
+	<view class="center">
+		<view class="card">
+			<view class="bor">
+				<view class="bor-top flex">
+					<view class="user flex">
+						<view class="avtor"><image class="portrait" :src="userInfo.avatar || '/static/img/missing-face.png'"></image></view>
+						<view class="name-box">
+							<view class="name clamp">{{ userInfo.phone || userInfo.email || '游客' }}</view>
+							<view class="tip" style="margin-top: 10rpx;" v-if="list.my">距离到期还有{{ list.js }}天</view>
+							<view class="tip" style="margin-top: 10rpx;" v-else>尚未开通</view>
+						</view>
+					</view>
+					<view class="type">{{ list.my ? '已开通' : '未开通' }}</view>
+				</view>
+				<view class="ling-box flex">
+					<view class="ling-left"><view class="ling-title">开启自动拼团</view></view>
+					<view class="flex">
+						<u-switch :loading="checkedLoding" v-model="checkedAuto" active-color="#FED591" active-value="1" inactive-value="0" @change="changeTye"></u-switch>
+						<text style="margin-left: -40rpx; z-index: 0;font-weight: bold;font-size: 30rpx;font-family: PingFang SC;font-weight: bold;color: #333333;">关</text>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="box">
+			<view class="top flex">
+				<view class="bg"><image src=".../../static/img/index4.png" mode=""></image></view>
+				<view class="title">{{ list.name }}</view>
+			</view>
+			<view class="main-bg"><image src="../../static/img/auto.png" mode=""></image></view>
+			<view class="font">
+				预约消耗:
+				<span class="money">{{ list.money * 1 }}{{ list.money_type }}</span>
+			</view>
+			<view class="font" style="margin-top: 10rpx;">
+				预约时间:
+				<span class="time">{{ list.is_forever == 1 ? '永久' : list.valid_date + '天' }}</span>
+			</view>
+			<view class="font" style="margin-top: 10rpx;">
+				适用拼购:
+				<span class="time">{{ list.lalaname }}</span>
+			</view>
+			<view class="btn" @click="buy()">立即购买</view>
+		</view>
+		<u-popup v-model="show1" mode="center" width="548rpx" border-radius="14">
+			<view class="psw-wrapper">
+				<view class="psw-title">请输入支付密码</view>
+				<input type="password" v-model="password" class="psw-ipt" />
+				<view class="psw-btn">
+					<text @click="cancel">取消</text>
+					<text class="psw-qd" @click="pswQd">确定</text>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+import { mapState, mapMutations } from 'vuex';
+import { autoDetails, buyauto, openclose } from '@/api/product.js';
+export default {
+	data() {
+		return {
+			id: '',
+			list: '',
+			show1: false,
+			password: '',
+			autoid: '',
+			checkedAuto: false, //是否开启自动领红包
+			checkedLoding: false //请求自动加载设置保存中
+		};
+	},
+	onLoad(option) {
+		this.id = option.id;
+		this.loadData();
+	},
+	computed: {
+		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+	},
+	methods: {
+		async loadData() {
+			const obj = this;
+			uni.showLoading({
+				title: '加载中',
+				mask: true
+			});
+			autoDetails({}, this.id).then(({ data }) => {
+				obj.list = data;
+				obj.list.lalaname = '';
+				if (data.my) {
+					obj.autoid = data.my.id;
+					let date = data.my.valid_time - data.my.add_time;
+					obj.list.js = date / (3600 * 24);
+					if (data.my.status == 1) {
+						obj.checkedAuto = true;
+					}
+				}
+				for (let i = 0; i < data.lalas.length; i++) {
+					if (i == 0) {
+						obj.list.lalaname += data.lalas[i].name;
+					} else {
+						obj.list.lalaname += ',' + data.lalas[i].name;
+					}
+				}
+				console.log(obj.list);
+				uni.hideLoading()
+			});
+		},
+		buy() {
+			this.show1 = true;
+		},
+		cancel() {
+			this.password = '';
+			this.show1 = false;
+		},
+		pswQd() {
+			const obj = this;
+			buyauto(
+				{
+					trade_psw: this.password
+				},
+				this.id
+			)
+				.then(e => {
+					this.password = '';
+					this.show1 = false;
+					this.$api.msg('购买自动拼团成功');
+				})
+				.catch(e => {
+					this.password = '';
+					this.show1 = false;
+					console.log(e);
+				});
+		},
+		changeTye(e) {
+			if (this.checkedLoding) {
+				return;
+			}
+			this.checkedLoding = true;
+			if (this.autoid == '') {
+				this.$api.msg('还未够买该服务或该服务已过期');
+				this.checkedLoding = false;
+				this.checkedAuto = false;
+			} else {
+				openclose({}, this.autoid)
+					.then(e => {
+						uni.showToast({
+							title: '设置成功!'
+						});
+						this.checkedLoding = false;
+						// this.checkedAuto = !this.checkedAuto
+					})
+					.catch(e => {
+						console.log(e);
+						this.checkedLoding = false;
+					});
+			}
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.card {
+	padding: 12rpx;
+	width: 700rpx;
+	background: linear-gradient(270deg, #ffeacb 0%, #fed591 100%);
+	border-radius: 20rpx;
+	margin: 26rpx auto;
+	.bor {
+		border: 1px solid rgba(205, 180, 122, 0.38);
+		border-radius: 20rpx;
+		padding: 28rpx 25rpx 39rpx 32rpx;
+		.bor-top {
+			justify-content: space-between;
+			.user {
+				justify-content: flex-start;
+				.avtor {
+					width: 100rpx;
+					height: 100rpx;
+					border-radius: 50%;
+					image {
+						width: 100%;
+						height: 100%;
+						border-radius: 50%;
+					}
+				}
+				.name-box {
+					margin-left: 22rpx;
+					.name {
+						width: 356rpx;
+						font-size: 32rpx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #333333;
+					}
+					.tip {
+						margin-top: 6rpx;
+						font-size: 24rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #a89575;
+					}
+				}
+			}
+			.type {
+				width: 180rpx;
+				height: 64rpx;
+				background: rgba(215, 160, 116, 0.29);
+				border-radius: 32px;
+				text-align: center;
+				line-height: 64rpx;
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #6e482b;
+				opacity: 0.47;
+			}
+		}
+		.ling-box {
+			margin-top: 60rpx;
+			.ling-title {
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #644931;
+			}
+		}
+	}
+}
+.box {
+	margin: 20rpx auto 0;
+	width: 690rpx;
+	padding: 20rpx 20rpx 52rpx 30rpx;
+	background: #ffffff;
+	box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.05);
+	border-radius: 20rpx;
+	.top {
+		justify-content: flex-start;
+		align-items: center;
+		.bg {
+			width: 48rpx;
+			height: 46rpx;
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+		.title {
+			margin-left: 10rpx;
+			font-size: 34rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #0f253a;
+		}
+	}
+	.main-bg {
+		width: 520rpx;
+		height: 165rpx;
+		margin: 55rpx auto 0;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+	.font {
+		margin-top: 62rpx;
+		font-size: 26rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #6d7c88;
+		.money {
+			font-size: 30rpx;
+			color: #44969d;
+		}
+		.time {
+			color: #0f253a;
+		}
+	}
+	.btn {
+		width: 558rpx;
+		height: 80rpx;
+		background: linear-gradient(90deg, #60bab0, #60bab0, #45969b);
+		border-radius: 40rpx;
+		margin: 49rpx auto 0;
+		text-align: center;
+		line-height: 80rpx;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #ffffff;
+	}
+}
+.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;
+	}
+}
+</style>

+ 14 - 11
pages/index/datile.vue

@@ -8,7 +8,7 @@
 						<view class="one">{{ list.data ? list.data.name : '' }}</view>
 						<view class="two">{{ index+1 }}轮</view>
 					</view>
-					<view class="three" style="color: #FF4C4C;" v-if="item.type == 1">拼购中</view>
+					<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>
@@ -30,15 +30,19 @@
 						<text>{{ 1 * list.data.ticket }}{{ list.data.ticket_money_type }}</text>
 					</view>
 					<view class="appointmentTime">
-						预约时间:
-						<text>{{ list.start }}-{{ item.end }}</text>
+						预约开始时间:
+						<text>{{ item.start }}</text>
+					</view>
+					<view class="appointmentTime">
+						预约结束时间:
+						<text>{{ item.end }}</text>
 					</view>
 					<view class="lotteryTime">
 						开奖时间:
 						<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-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>
@@ -129,16 +133,15 @@ export default {
 			)
 				.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 
-						
+						if (index == 0) {
+							e.start = date[0] + ' ' + data.lala_pink_open +':00'
+						}else {
+							let i = index - 1
+							e.start = data.open_times[i].name
+						}
 						console.log();
 						
 						if (e.value == data.next_pink.value){

+ 78 - 47
pages/index/index.vue

@@ -13,30 +13,36 @@
 		</view>
 		<!-- 通知栏 -->
 		<view class="tongz flex">
-			<view >
-				<view class="tongz-bg">
-					<image src="../../static/img/tongz-bg.png" mode=""></image>
-				</view>
+			<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>
-					<u-notice-bar style="width: 100%;" mode="vertical" type="none" :volume-icon="false" :more-icon="true" :list="showList.infoList" @click="goDetails" @getMore="nav('/pages/index/nodeList')"></u-notice-bar>
+					<u-notice-bar
+						style="width: 100%;"
+						mode="vertical"
+						type="none"
+						:volume-icon="false"
+						:more-icon="true"
+						:list="showList.infoList"
+						@click="goDetails"
+						@getMore="nav('/pages/index/nodeList')"
+					></u-notice-bar>
 				</view>
 			</view>
 		</view>
 		<view class="box-body">
 			<view class="navBox">
 				<view class="navBox-left">
-					<!-- <view class="navBox-item" @click="nav('./node')"><image src="../../static/img/index2.png" style="width: 385rpx; height: 398rpx;" mode=""></image></view> -->
-					<view class="navBox-item" @click="node()"><image src="../../static/img/index2.png" style="width: 385rpx; height: 398rpx;" mode=""></image></view>
+					<view class="navBox-item" @click="nav('./node')"><image src="../../static/img/index2.png" style="width: 385rpx; height: 398rpx;" mode=""></image></view>
 				</view>
 				<view class="navBox-right">
 					<view class="navBox-item" @click="nav('./convert')"><image src="../../static/img/index3.png" style="width: 385rpx; height: 216rpx; " mode=""></image></view>
-					<!-- <view class="navBox-item" @click="nav('/pages/index/appointment')">
-						<image src="../../static/img/index6.png" style="width: 339rpx; height: 170rpx; margin-top: -12rpx;" mode=""></image>
-					</view> -->
-					<view class="navBox-item" @click="node()">
+					<view class="navBox-item" @click="nav('/pages/index/appointment')">
 						<image src="../../static/img/index6.png" style="width: 339rpx; height: 170rpx; margin-top: -12rpx;" mode=""></image>
 					</view>
+					<!-- <view class="navBox-item" @click="node()">
+						<image src="../../static/img/index6.png" style="width: 339rpx; height: 170rpx; margin-top: -12rpx;" mode=""></image>
+					</view> -->
 				</view>
 			</view>
 			<view class="shopBox" v-for="(item, index) in list" :key="index">
@@ -46,10 +52,11 @@
 						<text id="one">{{ item.name }}</text>
 						<text id="two">{{ item.lun }}轮</text>
 					</view>
-					<view v-if="'childList' in item">
+					<view v-if="'childList' in item && item.type == 1">
 						<text id="three" v-if="item.childList.next_pink_status">待开团</text>
-						<text id="three" v-else>拼购中</text>
+						<text id="three" v-else>预约中</text>
 					</view>
+					<view v-if="item.type == 2"><text id="three" v-if="item.childList.next_pink_status">未开始</text></view>
 				</view>
 				<view class="shopBox-between">
 					<view class="number">
@@ -69,7 +76,11 @@
 						<text>{{ 1 * item.ticket }}{{ item.ticket_money_type }}</text>
 					</view>
 					<view class="appointmentTime">
-						预约时间:
+						预约开始时间:
+						<text>{{ item.start }}</text>
+					</view>
+					<view class="appointmentTime">
+						预约结束时间:
 						<text>{{ item.end }}</text>
 					</view>
 					<view class="lotteryTime">
@@ -78,12 +89,12 @@
 					</view>
 				</view>
 				<view class="btn-box flex">
-					<view class="submit1" @click="lalaDetial(item.id)">当天拼购</view>
-					<view v-if="'childList' in item">
+					<view class="submit1" @click="lalaDetial(item.id)">当天预约</view>
+					<view v-if="'childList' in item && item.type == 1">
 						<view class="submit" v-if="item.childList.next_pink_status">待开团</view>
-						<view class="submit" @click="buy(item)" v-else>拼购</view>
+						<view class="submit" @click="buy(item)" v-else>预约</view>
 					</view>
-					
+					<view v-if="item.type == 2"><view class="submit">未开始</view></view>
 				</view>
 			</view>
 		</view>
@@ -144,7 +155,8 @@ export default {
 			carouselList: [],
 			swiperLength: 0,
 			swiperCurrent: 0,
-			showList:[]
+			showList: [],
+			start: '' //平团开始时间
 		};
 	},
 	//页面加载即刻发生
@@ -163,35 +175,55 @@ export default {
 					obj.carouselList = data.banner;
 					obj.swiperLength = data.banner.length;
 					let arr = data.roll;
-					let ar = []
+					let ar = [];
 					arr.forEach(e => {
-						ar.push(e.info)
-					})
+						ar.push(e.info);
+					});
 					arr.infoList = ar;
 					obj.showList = arr;
 					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)
-								console.log(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
+								//开团时间
+								let date = les.data.open_times[0].name.split(' ');
+								let start = date[0] + ' ' + les.data.lala_pink_open + ':00';
+								start = new Date(start);
+								start = start.getTime();
+								obj.start = start;
+								//当前时间
+								let dateTime = new Date().valueOf();
+								//结束时间
+								let endTime = les.data.open_times[5].value * 1000;
+								//如果当前时间在开团时间之前或在结束时间之后,显示未开始
+								if (dateTime > start || dataTime < endTime) {
+									e.type = 1;
+								} else {
+									e.type = 2;
+								}
+								//拼团结束时间
+								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;
+										//拼团开始时间
+										if (i != 0) {
+											let j = i - 1;
+											e.start = getTime(les.data.open_times[j].value);
+										} else {
+											e.start = getTime(obj.start);
+										}
 									}
 								}
 								obj.$set(e, 'childList', les.data);
-								
 							});
 						});
 						obj.list = data.list.data;
-						console.log(obj.list,"1111111")
+						console.log(obj.list, '1111111');
 						uni.stopPullDownRefresh();
 						uni.hideLoading();
 					});
@@ -199,17 +231,16 @@ export default {
 				.catch(e => {
 					uni.stopPullDownRefresh();
 				});
-			
 		},
 		nav(url) {
-			console.log(url)
+			console.log(url);
 			uni.navigateTo({
 				url: url
 			});
 		},
 		buy(item) {
 			this.money = 1 * item.cost + item.cost_money_type;
-			this.souxu = 1* item.ticket + item.ticket_money_type;
+			this.souxu = 1 * item.ticket + item.ticket_money_type;
 			this.id = item.id;
 			this.show = true;
 		},
@@ -235,7 +266,7 @@ export default {
 			this.show1 = false;
 		},
 		pswQd() {
-			const obj = this
+			const obj = this;
 			buylala(
 				{
 					trade_psw: this.password
@@ -245,7 +276,7 @@ export default {
 				.then(e => {
 					this.password = '';
 					this.show1 = false;
-					this.$api.msg("参与拼购成功");
+					this.$api.msg('参与拼购成功');
 				})
 				.catch(e => {
 					this.password = '';
@@ -267,12 +298,12 @@ export default {
 			this.swiperCurrent = index;
 			this.titleNViewBackground = this.carouselList[index].background;
 		},
-		goDetails(e){
+		goDetails(e) {
 			uni.navigateTo({
 				url: this.showList[e].url
-			})
+			});
 		}
-	},
+	}
 };
 </script>
 <style lang="scss">
@@ -311,24 +342,24 @@ export default {
 	.swiper-dots-item {
 		width: 14rpx;
 		height: 14rpx;
-		background: #AAAAAA;
+		background: #aaaaaa;
 		border-radius: 50%;
 		margin: 0 16rpx;
 		// z-index: 999;
 	}
 
 	.action {
-		background-color: #FFFFFF;
+		background-color: #ffffff;
 	}
 }
-.tongz{
+.tongz {
 	width: 690rpx;
 	height: 70rpx;
 	margin: 48rpx auto 0;
 	padding: 18rpx 30rpx 18rpx 24rpx;
 	align-items: center;
 	position: relative;
-	.tongz-bg{
+	.tongz-bg {
 		position: absolute;
 		top: 0;
 		right: 0;
@@ -351,7 +382,7 @@ export default {
 			font-size: 28rpx;
 			font-family: Source Han Sans CN;
 			font-weight: 400;
-			color: #0F253A;
+			color: #0f253a;
 		}
 	}
 	.tongz-right {
@@ -359,7 +390,7 @@ export default {
 		z-index: 11;
 		width: 12rpx;
 		height: 26rpx;
-		image{
+		image {
 			width: 100%;
 			height: 100%;
 		}
@@ -548,7 +579,7 @@ export default {
 		.submit1 {
 			width: 280rpx;
 			height: 70rpx;
-			background: #FFFFFF;
+			background: #ffffff;
 			border: 1px solid #60bab0;
 			border-radius: 35rpx;
 			font-size: 32rpx;

+ 294 - 0
pages/index/info.vue

@@ -0,0 +1,294 @@
+<template>
+	<view class="center">
+		<view class="bg"></view>
+		<view class="box first">
+			<view class="top flex">
+				<view class="top-bg"><image src="../../static/img/index4.png"></image></view>
+				<view class="top-font">汇总数据</view>
+			</view>
+			<view class="title">总发行量:20亿</view>
+			<view class="item flex">
+				<view class="left">
+					<view class="item-font">
+						流通量:
+						<span>0000</span>
+					</view>
+					<view class="item-font">
+						持币地址数:
+						<span>0000</span>
+					</view>
+					<view class="item-font">
+						当前质押:
+						<span>0000</span>
+					</view>
+					<view class="item-font">
+						昨日销毁量:
+						<span>0000</span>
+					</view>
+				</view>
+				<view class="right">
+					<view class="item-font">
+						当天价格:
+						<span>0000</span>
+					</view>
+					<view class="item-font">
+						节点数:
+						<span>0000</span>
+					</view>
+					<view class="item-font">
+						合伙人数:
+						<span>0000</span>
+					</view>
+					<view class="item-font">
+						累计销毁量:
+						<span>0000</span>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="box">
+			<view class="top flex">
+				<view class="top-bg"><image src="../../static/img/index4.png"></image></view>
+				<view class="top-font">昨日经营数据</view>
+			</view>
+			<view class="item flex">
+				<view class="left">
+					<view class="item-font">拼团数:0000</view>
+					<view class="item-font">业 绩:0000</view>
+					<view class="item-font">参与人数:0000</view>
+					<view class="item-font">转账手续费:0000</view>
+				</view>
+				<view class="right">
+					<view class="item-font">门票数:0000</view>
+					<view class="item-font">问票销毁数:0000</view>
+					<view class="item-font">门票分红:0000</view>
+				</view>
+			</view>
+		</view>
+		<view class="box">
+			<view class="top flex">
+				<view class="top-bg"><image src="../../static/img/index4.png"></image></view>
+				<view class="top-font">累计经营数据</view>
+			</view>
+			<view class="item flex">
+				<view class="left">
+					<view class="item-font">拼团数:0000</view>
+					<view class="item-font">总业绩:0000</view>
+					<view class="item-font">参与人数:0000</view>
+					<view class="item-font">转账手续费:0000</view>
+					<view class="item-font">转账销毁数:0000</view>
+				</view>
+				<view class="right">
+					<view class="item-font">门票数:0000</view>
+					<view class="item-font">问票销毁数:0000</view>
+					<view class="item-font">门票分红:0000</view>
+				</view>
+			</view>
+		</view>
+		<view class="join">
+			<view class="xian"></view>
+			<view class="join-font">流动池数据</view>
+		</view>
+		<view class="tabBox">
+			<view class="tabBox-top flex">
+				<view class="tabBox-item one">矿池类型</view>
+				<view class="tabBox-item two">初始量</view>
+				<view class="tabBox-item three">占比</view>
+				<view class="tabBox-item four">当前量</view>
+				<view class="tabBox-item five">变动</view>
+				<view class="tabBox-item six">变动时间</view>
+			</view>
+			<view v-for="(item,index) in list" class="tabBox-top flex">
+				<view class="tabBox-item one">{{item.name}}</view>
+				<view class="tabBox-item two">{{item.num}}</view>
+				<view class="tabBox-item three">{{item.bi}}</view>
+				<view class="tabBox-item four">{{item.now}}</view>
+				<view class="tabBox-item five">{{item.bian}}</view>
+				<view class="tabBox-item six">{{item.time}}</view>
+			</view>
+		</view>
+		<view class="box">
+			<view class="top flex">
+				<view class="top-bg"><image src="../../static/img/index4.png"></image></view>
+				<view class="top-font">链上数据查询</view>
+			</view>
+			<view class="item">1.合约地址查询</view>
+			<view class="item">2.销毁池查询</view>
+			<view class="item">3.持币地址查询</view>
+			<view class="item">4.流动池地址查询</view>
+			<view class="item">4.1质押挖矿池</view>
+			<view class="item">4.2流动性挖矿池</view>
+			<view class="item">4.3交易挖矿矿池</view>
+			<view class="item">4.4平台社区</view>
+			<view class="item">4.5推广挖矿</view>
+			<view class="item">4.6团队池</view>
+			<view class="item">4.7节点合伙人池</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			list:[
+				{
+					name:'质押挖矿池',
+					num: '3.2亿',
+					bi:'16%',
+					now:'2亿',
+					bian:'10%',
+					time:'2021-8-16'
+				},
+				{
+					name:'质押挖矿池',
+					num: '3.2亿',
+					bi:'16%',
+					now:'2亿',
+					bian:'10%',
+					time:'2021-8-16'
+				},
+			]
+		}
+	}
+}
+</script>
+
+<style lang="scss">
+.center,
+page {
+	height: 100%;
+	background: #f7fbfe;
+}
+.bg {
+	width: 750rpx;
+	height: 248rpx;
+	background: linear-gradient(90deg, #60bab0, #60bab0, #45969b);
+	border-bottom-left-radius: 150rpx;
+	border-bottom-right-radius: 150rpx;
+}
+.first {
+	margin-top: -160rpx !important;
+}
+.box {
+	width: 690rpx;
+	height: auto;
+	background: #ffffff;
+	box-shadow: 0rpx 0rpx 17rpx 0rpx rgba(0, 0, 0, 0.05);
+	border-radius: 20rpx;
+	margin: 20rpx auto 0;
+	padding: 33rpx 55rpx 45rpx 30rpx;
+	.top {
+		justify-content: flex-start;
+		align-items: center;
+		.top-bg {
+			width: 48rpx;
+			height: 46rpx;
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+		.top-font {
+			margin-left: 11rpx;
+			font-size: 34rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #0f253a;
+		}
+	}
+	.title {
+		font-size: 36rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #44969d;
+		margin-top: 30rpx;
+	}
+	.item {
+		align-items: flex-start;
+		margin-top: 20rpx;
+		font-size: 26rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #6d7c88;
+		text-align: left;
+		.item-font {
+			margin-top: 20rpx;
+			span {
+				color: #0f253a;
+			}
+		}
+	}
+}
+.join {
+	margin-top: 44rpx;
+	padding-left: 30rpx;
+	display: flex;
+	justify-content: flex-start;
+	align-items: center;
+	.xian {
+		width: 6rpx;
+		height: 30rpx;
+		background: #0f253a;
+		border-radius: 4rpx;
+	}
+	.join-font {
+		padding-left: 16rpx;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #0f253a;
+	}
+}
+.tabBox {
+	margin: 30rpx auto 0;
+	width: 690rpx;
+	height: auto;
+	background: #ffffff;
+	border: 2rpx solid #44969d;
+	box-shadow: 0px 0px 16rpx 0px rgba(0, 0, 0, 0.05);
+	overflow: hidden;
+	border-radius: 20rpx;
+	.tabBox-top:last-child {
+		border-bottom: none;
+	}
+	.tabBox-top {
+		justify-content: flex-start;
+		overflow: hidden;
+		width: 100%;
+		height: 70rpx;
+		border-bottom: 2rpx solid #44969d;
+		.tabBox-item:last-child {
+			border-right: none;
+		}
+		.tabBox-item {
+			overflow: hidden;
+			text-align: center;
+			line-height: 70rpx;
+			border-right: 2rpx solid #44969d;
+			font-size: 22rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #0f253a;
+		}
+		.one {
+			width: 147rpx!important;
+		}
+		.two {
+			width: 134rpx!important;
+		}
+		.three {
+			width: 65rpx!important;
+		}
+		.four {
+			width: 110rpx!important;
+		}
+		.five {
+			width: 64rpx!important;
+		}
+		.six {
+			width: 170rpx!important;
+		}
+	}
+}
+</style>

+ 217 - 277
pages/index/node.vue

@@ -1,75 +1,47 @@
 <template>
 	<view class="center">
-		<view class="tab flex">
-			<view class="left flex" @click="backIndex"><u-icon name="arrow-left" :size="40"></u-icon></view>
-			<u-tabs-swiper
-				class="tabBox"
-				ref="uTabs"
-				:height="70"
-				:show-bar="false"
-				active-color="#44969D"
-				inactive-color="#6D7C88"
-				:list="tabList"
-				:current="current"
-				@change="tabsChange"
-				:is-scroll="false"
-			></u-tabs-swiper>
-		</view>
-		<swiper class="tabSwiper" :current="current" @animationfinish="transition">
-			<swiper-item class="swiper-item">
-				<scroll-view class="boxItem" scroll-y @scrolltolower="onreachBottom">
-					<view class="item" v-for="ls in tabList[0].list">
-						<view class="flex title">
-							<view class="tip"></view>
-							<view class="name">{{ ls.name }}</view>
-						</view>
-						<view class="itemConetnt">
-							<view class="ls">
-								认购份额:
-								<text class="text">{{ ls.num + ls.type }}</text>
-							</view>
-							<view class="ls">
-								认
-								<text class="textInterval "></text>
-								购
-								<text class="textInterval "></text>
-								价:
-								<text class="text">1{{ ls.moneyType + '=' + ls.ratio + ls.type }}</text>
-							</view>
-							<view class="ls">
-								认购名额:
-								<text class="text">{{ ls.limited }}</text>
-							</view>
-							<view class="ls">
-								认购总额:
-								<text class="text">{{ ls.allMoney + ls.moneyType }}</text>
-							</view>
-						</view>
-						<view class="lsButtom" @click="buy()">立即认购</view>
-					</view>
-					<u-loadmore :status="tabList[0].loding"></u-loadmore>
-				</scroll-view>
-			</swiper-item>
-			<swiper-item class="swiper-item">
-				<scroll-view scroll-y @scrolltolower="onreachBottom">
-					<view class="boxItem flex" style=" flex-wrap: wrap;">
-						<view class="item1" v-for="ls in tabList[1].list">
-							<view class="rightTip">进行中</view>
-							<view class="ls1">
-								<view class="name1">{{ ls.name }}</view>
-								<view class="title1">{{ ls.mask }}</view>
-								<view class="title1">
-									认购份额:{{ ls.allMoney + ls.type }}
-									<text></text>
-								</view>
-							</view>
-						</view>
-					</view>
-					<u-loadmore :status="tabList[1].loding"></u-loadmore>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-		<u-popup v-model="show" mode="center" width="548rpx" border-radius="14">
+		<scroll-view class="box" scroll-y="true" >
+			<view class="bg">
+				<image src="../../static/img/rengou.png" mode=""></image>
+			</view>
+			<view class="rengou">
+					1、LALANFT节点认购资金{{list.buy_price*1}}U。<br>
+					2、认同LALA节点合伙人事业,志愿从事和支持LALANFT平台事业的发展。<br>
+					3、节点合伙人采取合伙人制度,全球主节点21个,采取分期认购方式。<br>
+					    <span class="line">每期节点限购49份,每份享受节点1%的</span>股权分红。
+			</view>
+			<view class="quanyi">
+					1、每份获得10万枚LALA NFT平台通证,每天1%释放。<br>
+					2、获得1T FIL矿机的云算力挖矿权益,有效期540天,技术服务费30%。<br>
+					3、获得LALA社区A2级别权限,享受A2级别社区权利。<br>
+					4、享受平台门票50%加权分红。<br>
+					5、享受平台手续费50%加权分红。<br>
+			</view>
+			<view class="rule">
+					1、LALA NFT平台节点合伙人共分21期,即21个主节点。<br>
+					2、LALA节点每期认购满额后,自然开启第2期节点认购。直至21个节点认购满结束。<br>
+					3、个人可以一次多份参与认购,也可参与多个节点认购,每份节点认购享受的权益相同。<br>
+			</view>
+			<view class="jiedian">
+				<view class="mun">
+					{{mun}}
+				</view>
+				<view class="font">
+					认购份数
+				</view>
+				<view class="jdt">
+					<u-line-progress :show-percent="false" inactive-color="#BBBBBB" active-color="#29F3FD" :percent="zuiduo"></u-line-progress>
+				</view>
+				<view class="yue-num">
+					仅剩{{zuiduo}}%
+				</view>
+				
+			</view>
+			<view class="btn" @click="buy()">
+				立即认购
+			</view>
+		</scroll-view>
+		<u-popup v-model="show1" mode="center" width="548rpx" border-radius="14">
 			<view class="psw-wrapper">
 				<view class="psw-title">请输入支付密码</view>
 				<input type="password" v-model="password" class="psw-ipt" />
@@ -82,238 +54,206 @@
 	</view>
 </template>
 <script>
+import { getPoint,buyPoint } from '@/api/set.js'
 export default {
 	data() {
 		return {
-			show: false,
+			mun: 1,
+			zuiduo:49,
+			id:'',
+			list:'',
+			show1: false, //支付密码
 			password: '',
-			current: 0, //当前选中的标签
-			tabList: [
-				{
-					name: '节点认购',
-					list: [
-						{
-							name: '节点认购第一期',
-							num: 1000, //认购份额
-							type: 'LALA', //认购货币类型
-							ratio: 10, //认购比例
-							limited: 20, //限购名额
-							allMoney: 20, //认购总额
-							moneyType: 'USDT' //兑换比例金额
-						}
-					],
-					pages: 1,
-					limit: 10,
-					loding: 'loadmore' //loading加载中 nomore没有数据
-				},
-				{
-					name: '我的认购',
-					pages: 1,
-					limit: 10,
-					list: [
-						{
-							name: '节点认购第一期',
-							num: 1000, //认购份额
-							type: 'LALA', //认购货币类型
-							allMoney: 20, //认购总额
-							mask: '当前第六关'
-						},
-						{
-							name: '节点认购第一期',
-							num: 1000, //认购份额
-							type: 'LALA', //认购货币类型
-							allMoney: 20, //认购总额
-							mask: '当前第六关'
-						},
-						{
-							name: '节点认购第一期',
-							num: 1000, //认购份额
-							type: 'LALA', //认购货币类型
-							allMoney: 20, //认购总额
-							mask: '当前第六关'
-						},
-						{
-							name: '节点认购第一期',
-							num: 1000, //认购份额
-							type: 'LALA', //认购货币类型
-							allMoney: 20, //认购总额
-							mask: '当前第六关'
-						}
-					],
-					loding: 'loadmore' //loading加载中 nomore没有数据
-				}
-			]
-		};
+		}
+	},
+	onLoad() {
+		this.loadData()
 	},
-	//页面加载即刻发生
-	onload() {},
 	methods: {
-		backIndex() {
-			uni.switchTab({
-				url: '/pages/index/index'
-			});
+		async loadData() {
+			getPoint().then(({data}) => {
+				console.log(data)
+				this.list = data[0]
+				this.zuiduo = (data[0].stock * 1 / data[0].all_stock) * 100
+				this.id = data[0].id
+			})
 		},
-		// 内容框切换事件
-		transition(e) {
-			console.log(e);
-			this.current = e.detail.current;
+		buy(){
+			this.show1 = true
 		},
-		// tab切换事件
-		tabsChange(e) {
-			this.current = e;
-		},
-		// 下拉到底部加载事件
-		onreachBottom(e) {
-			console.log(e);
+		cancel() {
+			this.password = '';
+			this.show1 = false;
 		},
-		buy() {
-			this.show = true;
+		pswQd() {
+			const obj = this
+			buyPoint(
+				{
+					trade_psw: this.password,
+					num: this.mun
+				},
+				this.id
+			)
+				.then(e => {
+					this.password = '';
+					this.show1 = false;
+					this.$api.msg("购买节点成功");
+				})
+				.catch(e => {
+					this.password = '';
+					this.show1 = false;
+					console.log(e);
+				});
 		},
-		cancel() {
-			this.show = false;
-		}
 	}
-};
+}
 </script>
 <style lang="scss">
 page {
 	height: 100%;
 }
-.tabBox {
-	flex-grow: 1;
-}
+
 .center {
 	height: 0;
 	min-height: 100%;
 }
-.tab {
-	background-color: #ffffff;
-	align-items: stretch;
-	.left {
-		padding-left: 10rpx;
-		padding-right: 20rpx;
-	}
-}
-.tabSwiper {
-	height: calc(100% - 70rpx);
-	.swiper-item {
-		padding: 30rpx;
-		.boxItem {
-			.item {
-				background-color: #ffffff;
-				line-height: 1;
-				padding: 30rpx;
-				margin-bottom: 30rpx;
-				.title {
-					justify-content: flex-start;
-					padding-bottom: 30rpx;
-					align-items: stretch;
-					.tip {
-						width: 7rpx;
-						border-radius: 99rpx;
-						background-color: $base-color;
-					}
-					.name {
-						margin-left: 20rpx;
-						font-size: 30rpx;
-						font-weight: bold;
-						color: $font-color-dark;
-					}
-				}
-				.itemConetnt {
-					padding: 20rpx 0;
-					font-weight: bold;
-					font-size: 28rpx;
-					border-bottom: 1px solid $border-color-light;
-					border-top: 1px solid $border-color-light;
-					.ls {
-						padding: 10rpx 0;
-						color: $font-color-light;
-						.textInterval {
-							width: 0.5em;
-						}
-						.text {
-							color: $font-color-dark;
-						}
-					}
-				}
-				.lsButtom {
-					font-size: 30rpx;
-					background-image: $bg-green-gradual;
-					text-align: center;
-					color: $font-color-white;
-					padding: 30rpx 0;
-					border-radius: 99rpx;
-					margin: 20rpx 30rpx 0rpx 30rpx;
-				}
-			}
-			.item1:nth-child(odd) {
-				margin-right: 30rpx;
-			}
-			.item1 {
-				line-height: 1;
-				background: url(../../static/img/rengouBg.png) no-repeat;
-				background-position: right bottom;
-				background-size: 140rpx 115rpx;
-				flex-grow: 1;
-				min-width: 40%;
-				margin-bottom: 30rpx;
-				border-radius: 15rpx;
-				background-color: #ffffff;
-				border: 1px solid $uni-color-primary;
-				padding: 15rpx 10rpx 35rpx 30rpx;
-				.ls1 {
-					font-weight: bold;
-					.name1 {
-						color: $font-color-dark;
-						font-size: $font-base;
-						margin-top: -10rpx;
-					}
-					.title1 {
-						margin-top: 15rpx;
-						color: $font-color-light;
-						font-size: 22rpx;
-					}
-				}
-				.rightTip {
-					color: $uni-color-primary;
-					text-align: right;
-					font-size: 24rpx;
-				}
-			}
+.box {
+	position: relative;
+	width: 100%;
+	height: 100%;
+	.bg {
+		position: absolute;
+		top: 0;
+		right: 0;
+		left: 0;
+		width: 100%;
+		height: 3456rpx;
+		image {
+			width: 100%;
+			height: 3456rpx;
 		}
 	}
-}
-.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;
+	.rengou {
+		position: relative;
+		z-index: 10;
+		padding-top: 1140rpx;
+		margin: 0 auto;
+		width: 460rpx;
+		font-size: 24rpx;
+		line-height: 36rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+		height: 1400rpx;
+	}
+	.quanyi {
+		position: relative;
+		z-index: 10;
+		// padding-top: 254rpx;
+		// margin: 0 auto;
+		margin: 240rpx auto 0;
+		width: 460rpx;
+		font-size: 24rpx;
+		line-height: 36rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+		height: 288rpx;
+	}
+	.rule {
+		position: relative;
+		z-index: 10;
+		// padding-top: 264rpx;
+		// margin: 0 auto;
+		margin: 264rpx auto 0;
+		width: 460rpx;
+		font-size: 24rpx;
+		line-height: 36rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+		height: 252rpx;
+	}
+	.jiedian {
+		text-align: center;
+		position: relative;
+		z-index: 10;
+		// padding-top: 280rpx;
+		// margin: 0 auto;
+		margin: 300rpx auto 0;
+		width: 460rpx;
+		color: #FFFFFF;
+		height: 206rpx;
+		line-height: 1;
+		.mun {
+			font-size: 50rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
 		}
-		.psw-ipt {
-			display: block;
-			background-color: #dce3ed;
-			height: 90rpx;
-			width: 464rpx;
-			padding-left: 30rpx;
-			margin: 0 auto;
-			font-size: 80rpx;
+		.font {
+			margin-top: 10rpx;
 		}
-		.psw-btn text{
-			display: inline-block;
-			text-align: center;
-			width: 50%;
-			padding-top: 29rpx;
-			font-size: 35rpx;
+		.jdt {
+			// padding: 20rpx;
+			margin: 20rpx auto 0;
+			width: 300rpx;
+			height: auto;
 		}
-		.psw-qd {
-			color:#45969B;
+		.yue-num {
+			font-size: 20rpx;
+			color: #29F3FD;
+			margin-top: 20rpx;
 		}
 	}
-
+	.btn {
+		position: relative;
+		margin: 120rpx auto 0;
+		z-index: 10;
+		width: 514rpx;
+		height: 80rpx;
+		background: #29F3FD;
+		border-radius: 40px;
+		text-align: center;
+		line-height: 80rpx;
+		font-size: 32rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #051D38;
+	}
+}
+.line {
+	display: inline-block;
+	padding-left: 20rpx;
+}
+.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;
+	}
+}
 </style>

+ 2 - 2
pages/index/nodeList.vue

@@ -4,7 +4,7 @@
 			<image :src="ls.image_input[0]"></image>
 			<view class="list-item">
 				<view class="title ellipsis">{{ls.title}}</view>
-				<!-- <view class="time">{{ls.add_time}}</view> -->
+				<view class="time">{{ls.add_time}}</view>
 			</view>
 		</view>
 		<view class="empty-box" v-show="list.length === 0"><u-empty></u-empty></view>
@@ -31,7 +31,7 @@ export default {
 			article({
 				page:1,
 				limit:10000
-			},1).then(({ data }) => {
+			}).then(({ data }) => {
 				console.log(data)
 				obj.list = data;
 			});

+ 1 - 1
pages/market/duihuan.vue

@@ -91,7 +91,7 @@ export default {
 					console.log(e);
 				});
 			wallet({}).then(({ data }) => {
-				this.USDL = data.back['USDL'].money.money * 1;
+				this.USDL = data.back['USDL'].money.money * 1 - data.back['USDL'].money.only_pink *1;
 			});
 		},
 		buy() {

+ 272 - 0
pages/market/myCalculation.vue

@@ -0,0 +1,272 @@
+<template>
+	<view class="container">
+		<view class="item-wrapper" v-if="list.length > 0" v-for="(ls,index) in list" :key='index'>
+			<view class="item">
+				<view class="item-name">设备名称</view>
+				<view class="item-val">{{ls.machine.name}}</view>
+			</view>
+			<view class="item">
+				<view class="item-name">状态</view>
+				<view class="item-val blue">{{ls.status == 0 ? '准备中' : ls.status ==  1 ? '挖矿中' : '已到期'}}</view>
+			</view>
+			<view class="item">
+				<view class="item-name">合约期限</view>
+				<view class="item-val blue">{{ls.machine.first_step_time + ls.machine.second_step_time }}天 + {{ ls.machine.third_step_time}}天</view>
+			</view>
+			<view class="item">
+				<view class="item-name">算力</view>
+				<view class="item-val blue">{{+ls.num}} {{ls.get_money_type==='BZZ'?'节点':'T'}}</view>
+			</view>
+			<view class="item">
+				<view class="item-name">管理费</view>
+				<view class="item-val">{{ls.user_service_ratio}}%</view>
+			</view>
+			<view class="item">
+				<view class="item-name">单价</view>
+				<view class="item-val">{{ls.machine.cost_money * 1}} {{ls.machine.cost_money_type}}/{{ls.get_money_type==='BZZ'?'节点':'T'}}</view>
+			</view>
+			<view class="item">
+				<view class="item-name">购买份数</view>
+				<view class="item-val">{{+ls.num}}</view>
+			</view>
+			<view class="item">
+				<view class="item-name">总价</view>
+				<view class="item-val">{{ls._cost_money}}</view>
+			</view>
+			<view class="item">
+				<view class="item-name">购买时间</view>
+				<view class="item-val">{{ls._pay_time}}</view>
+			</view>
+		</view>
+		<view class="jg" v-if="list.length !== 0"></view>
+		<!-- <view class="list-cell" v-if="list.length > 0" v-for="(ls,index) in list" :key='index'>
+			<view class="cell-title flex">
+				<view class="cellTpl flex_item">
+					<image :src="ls.machine.logo"></image>
+					<view class="title">{{ls.machine.name}}</view>
+				</view>
+				<view class="status">{{ls.status == 0 ? '准备中' : ls.status ==  1 ? '挖矿中' : '已到期'}}</view>
+			</view>
+			<view class="cell-tip">{{ls.machine.first_step_time + ls.machine.second_step_time + ls.machine.third_step_time}}天矿机</view>
+			<view class="flex cell-tpl">
+				<view class="tpl">
+					<view class="" v-if="ls.get_money_type == 'BZZ'">单价(节点)</view>
+					<view class="" v-else>单价(T)</view>
+					<view class="">{{ls.machine.cost_money * 1}} {{ls.machine.cost_money_type}}</view>
+				</view>
+				<view class="tpl">
+					<view class="">有效算力</view>
+					<view class="" v-if="ls.get_money_type == 'BZZ'">{{ls.num * 1}}节点</view>
+					<view class="" v-else>{{ls.num * 1}}T</view>
+				</view>
+				<view class="tpl">
+					<view class="">合约周期</view>
+					<view class="">{{ls.machine.first_step_time + ls.machine.second_step_time + ls.machine.third_step_time}}天</view>
+				</view>
+			</view>
+			<view class="cell-info flex">
+				<view class="tip">到期时间:{{ls.mining_end_time}}</view>
+			</view>
+			<view class="cell-info flex">
+				<view class="tip">购买时间:{{ls._pay_time}}</view>
+			</view>
+			<view class="cell-info flex" v-if="ls.status == 0">
+				<view class="tip">倒计时:<uni-countdown
+								color="#FFF"
+								background-color="#BAC1EF"
+								:day="ls.stopTimeD"
+								:hour="ls.stopTimeH"
+								:minute="ls.stopTimeM"
+								:second="ls.stopTimeS"
+								:index="index"
+								@timeover="isTime"
+							></uni-countdown></view>
+			</view>
+		</view> -->
+		<view class="empty-box" v-show="list.length === 0"><u-empty></u-empty></view>
+	</view>
+</template>
+<script>
+import { mymining } from '@/api/market.js';
+import { timeComputed } from '@/utils/rocessor.js';
+import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
+export default {
+	components: {
+		uniCountdown
+	},
+	data() {
+		return {
+			list:'',
+		};
+	},
+	onLoad(option){
+		this.loadData();
+	},
+	onShow() {
+		
+	},
+	//下拉刷新
+	onPullDownRefresh() {
+		this.loadData();
+	},
+	methods: {
+		async loadData() {
+			let obj = this;
+			uni.showLoading({
+				title:"加载中",
+			})
+			mymining({
+				page:1,
+				limit:1000,
+			}).then(({ data }) => {
+				console.log(data,"基础数据")
+				obj.list = data.data;
+				obj.list = data.data.map((e,ind) => {
+					let ar = e;
+					console.log(e,"饿");
+					// 判断是否为进行中的活动
+					if (ar.status === 0) {
+						// 计算倒计时时间
+						obj.timeComputed(ar.mining_start_time * 1000, ar);
+						console.log(ar.stopTimeD)
+					} else {
+						console.log('++++++++++')
+						// 获取距离开始还需要多少时间
+						if( ar.time){
+						let arTime = ar.time.split(':');
+						let h = arTime[0];
+						let m = arTime[1];
+						let time = new Date();
+						// 设置时间
+						time.setHours(h, m, 0);
+						// 计算倒计时时间
+						obj.timeComputed(time.getTime(), ar);}
+					}
+					
+					return e;
+				})
+				uni.hideLoading()
+			});
+		},
+		// 计算倒计时时间
+		timeComputed(da, ar) {
+			let obj = this;
+			// 计算时间,保存需要多少时间到期
+			let stopTime = timeComputed(da);
+			console.log(stopTime);
+			ar.stopTimeD = stopTime.day;
+			ar.stopTimeH = stopTime.hours;
+			ar.stopTimeM = stopTime.minutes;
+			ar.stopTimeS = stopTime.seconds;
+		},
+		isTime(index) {
+			this.list[index].status = 1
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	min-height: 100%;
+	background-color: #ffffff;
+	.container {
+		width: 100%;
+		
+	}
+}
+.list-cell{
+		padding: 40rpx 40rpx;
+		.cell-title{
+			padding: 29rpx 38rpx;
+			font-size: 30rpx;
+			font-weight: bold;
+			color: #333333;
+			.cellTpl{
+				image{
+					width: 40rpx;
+					height: 40rpx;
+					margin-right: 15rpx;
+				}
+			}
+			.status{
+				color: #E51C23;
+			}
+		}
+		.cell-tip{
+			padding: 0rpx 38rpx;
+			font-size: 24rpx;
+			font-weight: bold;
+			color: #0EC1A1;
+		}
+		.cell-tpl{
+			padding: 40rpx 31rpx;
+			font-size: 24rpx;
+			font-weight: bold;
+			color: #333333;
+			line-height: 40rpx;
+		}
+		.cell-info{
+			margin-bottom: 25rpx;
+			.tip{
+				font-size: 30rpx;
+				font-weight: bold;
+				color: #44969d;
+			}
+			.zhiya-btn{
+				background-color: #44969d;
+				padding: 12rpx 22rpx;
+				font-size: 24rpx;
+				border-radius: 50rpx;
+				color: #FFFFFF;
+			}
+		}
+		.list-tip{
+			word-wrap:break-word;
+			background-color: #BAC1EF !important;
+			font-size: 24rpx;
+			font-weight: 500;
+			color: #333333;
+			padding: 36rpx 32rpx;
+			margin-top: 15rpx;
+			border-bottom-left-radius:15rpx ;
+			border-bottom-right-radius:15rpx ;
+		}
+	}
+	.empty-box{
+		margin-top: 100rpx;
+		width: 100%;
+		height: 500rpx;
+	}
+	.item-wrapper {
+		padding: 0 35rpx;
+		width: 690rpx;
+		height: 748rpx;
+		background: #F7F6FB;
+		border: 1rpx solid #44969d;
+		border-radius: 20rpx;
+		margin: 20rpx auto;
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #333333;
+		line-height: 1;
+		display: flex;
+		flex-direction: column;
+		justify-content: space-around;
+		.item {
+			display: flex;
+			justify-content: space-between;
+			.item-val {
+				font-weight: bold;
+			}
+		}
+		.blue {
+			color: #44969d;
+			
+		}
+	}
+	.jg {
+		height: 20rpx;
+	}
+</style>

+ 2 - 2
pages/public/login.vue

@@ -3,8 +3,8 @@
 		<view class="loginTitle">WelcomeLALA</view>
 		<view class="loginText">请使用您的账号登录</view>
 		<view class="login-box">
-			<view class="username">账号</view>
-			<input class="input-box" type="text" v-model="phone" placeholder="请输入账号" />
+			<view class="username">账号/邮箱</view>
+			<input class="input-box" type="text" v-model="phone" placeholder="请输入账号/邮箱" />
 		</view>
 		<view class="login-box">
 			<view class="username">密码</view>

+ 2 - 2
pages/public/register.vue

@@ -64,7 +64,7 @@ export default {
 				obj.$api.msg('请输入邮箱号码');
 				return;
 			}
-			if (!/^([a-zA-Z]|[0-9])(\w|\-|\.)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(obj.phone)) {
+			if (!/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/.test(obj.phone)) {
 				obj.$api.msg('请输入正确的邮箱');
 				return;
 			}
@@ -116,7 +116,7 @@ export default {
 				this.$api.msg('请输入邮箱');
 				return;
 			}
-			if (!/^([a-zA-Z]|[0-9])(\w|\-|\.)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(obj.phone)) {
+			if (!/^([a-zA-Z]|[0-9])(\w|\-|\.)+@[a-zA-Z0-9]+(\.([a-zA-Z]{2,4}))+$/.test(obj.phone)) {
 				obj.$api.msg('请输入正确的邮箱');
 				return;
 			}

+ 3 - 4
pages/user/extension.vue

@@ -10,7 +10,7 @@
 				<view class="money-frame">
 					<!-- <view class="money_name">我的推广</view> -->
 					<view class="money_num">
-						{{ all || '0' }}
+						{{ team || '0' }}
 						<text class="money_ren">人</text>
 					</view>
 				</view>
@@ -106,9 +106,8 @@ export default {
 			plotPerformance:'',//小区业绩
 			push:'',//直推人数
 			team:'',//团队人数
-			all: '', //推广人数
+			all: '', //累计奖励
 			yesterday:'',//昨日
-			allList:'',//累计奖励
 		};
 	},
 	onLoad(options) {
@@ -127,7 +126,7 @@ export default {
 				this.plotPerformance = data.small_achivement;
 				this.push = data.recommend_num;
 				this.team = data.group_num;
-				this.allList = data.all;
+				this.all = data.all;
 				this.yesterday = data.yesterday;
 			})
 			

+ 8 - 2
pages/user/fuli.vue

@@ -30,7 +30,7 @@
 			<view v-for="(item, index) in exchange" :key="index" class="list-item flex">
 				<view class="list-left">
 					<view class="list-title">福利兑换</view>
-					<view class="time">2018-12-1 09:30</view>
+					<view class="time">{{item.time}}</view>
 				</view>
 				<view class="list-right">已兑换</view>
 			</view>
@@ -44,6 +44,7 @@
 import { getSp } from '@/api/market.js';
 import { lalaDetial } from '@/api/product.js';
 import { wallet } from '@/api/finance.js';
+import { getTime } from '@/utils/rocessor.js';
 export default {
 	data() {
 		return {
@@ -91,6 +92,11 @@ export default {
 				},
 				this.id
 			).then(({ data }) => {
+				if(data.count != 0){
+					data.data.forEach(e => {
+						e.time = getTime(e.add_time)
+					})
+				}
 				this.exchange = data.list;
 				if (data.length != this.limit) {
 					this.loadingType = 'nomore';
@@ -192,7 +198,7 @@ page {
 }
 .list-box {
 	margin-top: 34rpx;
-	height: 700rpx;
+	height: calc(100% - 260px);
 	background-color: #ffffff;
 	.list-item {
 		padding: 25rpx 50rpx;

+ 265 - 0
pages/user/myNote.vue

@@ -0,0 +1,265 @@
+<template>
+	<view class="center">
+		<view class="bg"></view>
+		<view class="zong flex">
+			<view class="info">
+				<view class="info-num">{{ yesterday || '0.00' }}</view>
+				<view class="info-font">昨天释放</view>
+			</view>
+			<!-- <view class="info" v-for="ls in listType">
+				<view class="info-num">{{ all || '0.00' }}</view>
+				<view class="info-font">总释放数量</view>
+			</view> -->
+			<view class="info">
+				<view class="info-num">{{ all || '0.00' }}</view>
+				<view class="info-font">累计释放</view>
+			</view>
+		</view>
+		<view class="tabSwiper">
+			<view class="swiper-item">
+				<scroll-view scroll-y @scrolltolower="onreachBottom">
+					<view class="boxItem flex" style=" flex-wrap: wrap;">
+						<view class="item1" v-for="ls in tabList">
+							<!-- <view class="rightTip">进行中</view> -->
+							<view class="ls1">
+								<view class="name1">{{ ls.plan.plan_name }}</view>
+								<!-- <view class="title1">{{ ls.mask }}</view> -->
+								<view class="title1">认购份额:{{ ls.buy_num * 1 }}</view>
+								<view class="title1">总天数:{{ ls.release_time_all * 1 }}</view>
+								<view class="title1">当前释放天数:{{ ls.release_time_now * 1 }}</view>
+							</view>
+						</view>
+					</view>
+					<u-loadmore :status="loding"></u-loadmore>
+				</scroll-view>
+			</view>
+		</view>
+
+		<!-- </swiper-item>
+		</swiper> -->
+		<u-popup v-model="show" mode="center" width="548rpx" border-radius="14">
+			<view class="psw-wrapper">
+				<view class="psw-title">请输入支付密码</view>
+				<input type="password" v-model="password" class="psw-ipt" />
+				<view class="psw-btn">
+					<text @click="cancel">取消</text>
+					<text class="psw-qd" @click="pswQd">确定</text>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+<script>
+import { myPiont } from '@/api/user.js';
+export default {
+	data() {
+		return {
+			show: false,
+			password: '',
+			current: 0, //当前选中的标签
+			tabList: [],
+			loding: 'more',
+			all:'',
+			yesterday:''
+		};
+	},
+	//页面加载即刻发生
+
+	onShow() {
+		this.loadData();
+	},
+	methods: {
+		async loadData() {
+			uni.showLoading({
+				title: '加载中'
+			});
+			myPiont().then(({ data }) => {
+				this.yesterday = data.yesterday * 1;
+				this.all = data.all * 1;
+				this.tabList = data.list;
+				console.log(data);
+				uni.hideLoading();
+			});
+		},
+		// 下拉到底部加载事件
+		onreachBottom(e) {
+			console.log(e);
+		}
+	}
+};
+</script>
+<style lang="scss">
+page {
+	height: 100%;
+}
+.tabBox {
+	flex-grow: 1;
+}
+.center {
+	height: 0;
+	min-height: 100%;
+}
+.bg {
+	width: 750rpx;
+	height: 248rpx;
+	background: linear-gradient(90deg, #60bab0, #60bab0, #45969b);
+	border-bottom-left-radius: 150rpx;
+	border-bottom-right-radius: 150rpx;
+}
+.zong {
+	width: 690rpx;
+	height: 181rpx;
+	background: #ffffff;
+	box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.05);
+	border-radius: 20rpx;
+	margin: -150rpx auto 0;
+	justify-content: space-around;
+	padding: 0rpx 36rpx;
+	.info {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		.info-num {
+			font-size: 50rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #0f253a;
+		}
+		.info-font {
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #6d7c88;
+		}
+	}
+}
+.tab {
+	background-color: #ffffff;
+	align-items: stretch;
+	.left {
+		padding-left: 10rpx;
+		padding-right: 20rpx;
+	}
+}
+.tabSwiper {
+	height: calc(100% - 70rpx);
+	.swiper-item {
+		padding: 30rpx;
+		.boxItem {
+			.item {
+				background-color: #ffffff;
+				line-height: 1;
+				padding: 30rpx;
+				margin-bottom: 30rpx;
+				.title {
+					justify-content: flex-start;
+					padding-bottom: 30rpx;
+					align-items: stretch;
+					.tip {
+						width: 7rpx;
+						border-radius: 99rpx;
+						background-color: $base-color;
+					}
+					.name {
+						margin-left: 20rpx;
+						font-size: 30rpx;
+						font-weight: bold;
+						color: $font-color-dark;
+					}
+				}
+				.itemConetnt {
+					padding: 20rpx 0;
+					font-weight: bold;
+					font-size: 28rpx;
+					border-bottom: 1px solid $border-color-light;
+					border-top: 1px solid $border-color-light;
+					.ls {
+						padding: 10rpx 0;
+						color: $font-color-light;
+						.textInterval {
+							width: 0.5em;
+						}
+						.text {
+							color: $font-color-dark;
+						}
+					}
+				}
+				.lsButtom {
+					font-size: 30rpx;
+					background-image: $bg-green-gradual;
+					text-align: center;
+					color: $font-color-white;
+					padding: 30rpx 0;
+					border-radius: 99rpx;
+					margin: 20rpx 30rpx 0rpx 30rpx;
+				}
+			}
+			// .item1:nth-child(odd) {
+			// 	margin-right: 30rpx;
+			// }
+			.item1 {
+				line-height: 1;
+				background: url(../../static/img/rengouBg.png) no-repeat;
+				background-position: right bottom;
+				background-size: 140rpx 115rpx;
+				flex-grow: 1;
+				min-width: 40%;
+				margin-bottom: 30rpx;
+				border-radius: 15rpx;
+				background-color: #ffffff;
+				border: 1px solid $uni-color-primary;
+				padding: 15rpx 10rpx 35rpx 30rpx;
+				.ls1 {
+					font-weight: bold;
+					.name1 {
+						color: $font-color-dark;
+						font-size: $font-base + 2rpx;
+						margin-top: 10rpx;
+					}
+					.title1 {
+						margin-top: 15rpx;
+						color: $font-color-light;
+						font-size: 22rpx;
+					}
+				}
+				.rightTip {
+					color: $uni-color-primary;
+					text-align: right;
+					font-size: 24rpx;
+				}
+			}
+		}
+	}
+}
+.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;
+	}
+}
+</style>

+ 23 - 3
pages/user/user.vue

@@ -11,7 +11,10 @@
 						
 						<view class="level-box">
 							<image class="image" src="../../static/img/img28.png"></image>
-							<view class="level">V{{ userInfo.level }}</view>
+							<view class="level" v-if="userInfo.level">{{ userInfo.level_info.name }}</view>
+							<view class="level" v-else>
+								V0
+							</view>
 						</view>
 						
 					</view>
@@ -26,6 +29,23 @@
 					<view class="tt-txt">我的拼购</view>
 					<image src="../../static/img/jiantou.png" class="next-icon" mode=""></image>
 				</view>
+				<view class="userInfo.point">
+					<view class="tt-box" v-if="userInfo.point.length !=0" @click="nav('/pages/user/myNote')">
+						<image src="../../static/img/myPoint.png" class="tt-icon1" mode=""></image>
+						<view class="tt-txt">我的节点</view>
+						<image src="../../static/img/jiantou.png" class="next-icon" mode=""></image>
+					</view>
+				</view>
+				<view class="tt-box" @click="nav('/pages/market/myCalculation')">
+					<image src="../../static/img/myKJ.png" class="tt-icon1" mode=""></image>
+					<view class="tt-txt">我的矿机</view>
+					<image src="../../static/img/jiantou.png" class="next-icon" mode=""></image>
+				</view>
+				<view class="tt-box" @click="nav('/pages/index/info')">
+					<image src="../../static/img/data.png" class="tt-icon1" mode=""></image>
+					<view class="tt-txt">汇总数据</view>
+					<image src="../../static/img/jiantou.png" class="next-icon" mode=""></image>
+				</view>
 				<view class="tt-box" @click="nav('/pages/user/fulilist')">
 					<image src="../../static/img/gift.png" class="tt-icon1" mode=""></image>
 					<view class="tt-txt">拼购福利</view>
@@ -171,9 +191,9 @@ export default {
 		},
 		bc_code(){
 			let that = this;
-			console.log('保存二维码',this.backImg)
+			console.log('保存二维码',this.erweima)
 			uni.downloadFile({           //获得二维码的临时地址
-				url:this.backImg,
+				url:this.erweima,
 				success:(res)=>{
 					//console.log('获取url',res)
 					if(res.statusCode == 200){

二進制
static/img/auto.png


二進制
static/img/data.png


二進制
static/img/index2.png


二進制
static/img/myKJ.png


二進制
static/img/myPoint.png


二進制
static/img/rengou.png


+ 1 - 0
unpackage/debug/.roid.ins

@@ -0,0 +1 @@
+installed

二進制
unpackage/debug/android_debug.apk


+ 1 - 0
utils/upApp.js

@@ -85,6 +85,7 @@ export function getUpApp () {
 									}
 								}
 							});
+							break;
 							return;
 						}
 					}