Ver Fonte

2021-8-30

hwq há 4 anos atrás
pai
commit
45a78c1697

+ 17 - 0
api/product.js

@@ -62,3 +62,20 @@ export function details(data,id) {
 		data
 	});
 }
+//质押矿机
+export function mortgage(data,id) {
+	return request({
+		url: '/api/mining/mortgage/'+id,
+		method: 'post',
+		data
+	});
+}
+
+//赎回矿机
+export function redeem(data,id) {
+	return request({
+		url: '/api/mining/redeem/'+id,
+		method: 'post',
+		data
+	});
+}

+ 8 - 0
api/set.js

@@ -41,6 +41,14 @@ export function buyPoint(data,id) {
 		data
 	});
 }
+//实名认证
+export function realName(data) {
+	return request({
+		url: '/api/real_name',
+		method: 'POST',
+		data
+	});
+}
 //设置下级服务费比例
 export function setServiceRatio(uid,data) {
 	return request({

+ 9 - 0
api/wallet.js

@@ -9,6 +9,15 @@ export function spreadCommission(data,state) {
 	});
 }
 
+// 获取汇总数据
+export function finance(data,state) {
+	return request({
+		url: '/api/finance',
+		method: 'get',
+		data
+	});
+}
+
 // 获取账户余额
 export function userBalance(data) {
 	return request({

Diff do ficheiro suprimidas por serem muito extensas
+ 8 - 0
hybrid/html/cropper/cropper.min.css


Diff do ficheiro suprimidas por serem muito extensas
+ 9 - 0
hybrid/html/cropper/cropper.min.js


+ 41 - 0
hybrid/html/cropper/index.html

@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<style type="text/css">
+	.input-label{
+		margin: 0 auto !important;
+		height: 250px !important;
+		width: 250px !important;
+	}
+</style>
+<html lang="zh">
+	<head>
+		<meta charset="UTF-8" />
+		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+		<meta http-equiv="X-UA-Compatible" content="ie=edge" />
+		<title>图片裁剪</title>
+		<link rel="stylesheet" href="cropper.min.css" />
+		<link rel="stylesheet" href="style.css" />
+		<script src="cropper.min.js"></script>
+		<script src="uni.webview.1.5.2.js"></script>
+	</head>
+	<body>
+		<div class="file-upload-box">
+			<input id="my-input" type="file" class="hidden-input" accept="image/png, image/jpeg, image/webp" />
+			<label for="my-input" class="input-label">+</label>
+		</div>
+
+		<div class="img-crop-area"></div>
+
+		<!-- <div class="previewAll">
+			<div class="preview"></div>
+			<div class="preview"></div>
+			<div class="preview"></div>
+			<div class="preview"></div>
+		</div> -->
+
+		<p>
+			<button class="btn disabled" id="save">确定</button>
+			<button class="btn disabled" id="spin" onclick='spin()'>旋转</button>
+		</p>
+		<script src="index.js"></script>
+	</body>
+</html>

+ 270 - 0
hybrid/html/cropper/index.js

@@ -0,0 +1,270 @@
+// 宽高比
+const aspectRatio = 3 / 4;
+// 自动裁剪区域, 默认为 50%
+const autoCropAre = 0.5;
+// 裁剪宽度
+const croppedWidth = 200;
+// 裁剪高度
+const croppedHeight = croppedWidth * aspectRatio;
+// 是否裁剪为圆形
+const roundedCrop = false;
+// 导出图片格式
+const imgType ='image/jpeg';
+let cropper = ''; //保存cropee对象
+
+// 旋转
+function spin(e) {
+	cropper.rotate(90)
+}
+
+const fileUploadBox = document.querySelector(".file-upload-box");
+const spinBtn = document.querySelector("#spin"); //获取旋转按钮对象
+const saveBtn = document.querySelector("#save");
+const previews = document.querySelectorAll(".preview");
+let previewReady = false;
+let croppable = false;
+
+document.addEventListener("UniAppJSBridgeReady", Init);
+
+// 初始化
+async function Init(params) {
+	console.log(`uniAppSDK loaded`);
+
+	const env = await getEnv();
+	console.log("当前环境:" + JSON.stringify(env));
+
+	const imgDataUrl = await selectFile(env);
+
+	// hidden input box
+	fileUploadBox.style.display = "none";
+
+	// create image
+	const image = new Image();
+	image.src = imgDataUrl;
+	image.crossorigin = true;
+	document.querySelector(".img-crop-area").appendChild(image);
+
+	image.onload = function() {
+		const options = {
+			aspectRatio: aspectRatio,
+			autoCropAre: autoCropAre,
+			viewMode: 1,
+			ready: function() {
+				let clone = this.cloneNode();
+
+				clone.className = "";
+				clone.style.cssText =
+					"display: block;" +
+					"width: 100%;" +
+					"min-width: 0;" +
+					"min-height: 0;" +
+					"max-width: none;" +
+					"max-height: none;";
+
+				each(previews, function(elem) {
+					elem.appendChild(clone.cloneNode());
+				});
+
+				croppable = true;
+				previewReady = true;
+				saveBtn.classList.remove("disabled");
+				spinBtn.classList.remove("disabled");
+				if (roundedCrop) {
+					const elements = document.querySelectorAll(
+						".cropper-view-box, .cropper-face"
+					);
+					for (let item of elements) {
+						item.style.borderRadius = "50%";
+					}
+				}
+			},
+			crop: function(event) {
+				if (!previewReady) {
+					return;
+				}
+
+				let data = event.detail;
+				let cropper = this.cropper;
+				let imageData = cropper.getImageData();
+				let previewAspectRatio = data.width / data.height;
+
+				each(previews, function(elem) {
+					let previewImage = elem.getElementsByTagName("img").item(0);
+
+					let previewWidth = elem.offsetWidth;
+					let previewHeight = previewWidth / previewAspectRatio;
+					let imageScaledRatio = data.width / previewWidth;
+
+					if (roundedCrop) {
+						elem.style.borderRadius = "50%";
+					}
+
+					elem.style.height = previewHeight + "px";
+					previewImage.style.width =
+						imageData.naturalWidth / imageScaledRatio + "px";
+					previewImage.style.height =
+						imageData.naturalHeight / imageScaledRatio + "px";
+					previewImage.style.marginLeft = -data.x / imageScaledRatio + "px";
+					previewImage.style.marginTop = -data.y / imageScaledRatio + "px";
+				});
+			},
+		};
+		// 保存cropper对象
+		cropper = new Cropper(image, options);
+
+		save.addEventListener("click", () => {
+			if (!croppable) {
+				return;
+			}
+
+			let croppedCanvas = cropper.getCroppedCanvas({
+				width: croppedWidth,
+				height: croppedHeight,
+			});
+
+			if (roundedCrop) {
+				croppedCanvas = getRoundedCanvas(croppedCanvas);
+			}
+
+			const postData = {
+				data: {
+					type: "croppedData",
+					dataUrl: croppedCanvas.toDataURL(imgType),
+				},
+			};
+
+
+			if (env.plus) {
+				uni.postMessage(postData);
+			} else if (env.h5) {
+				top.postMessage(postData);
+			} else if (env.miniprogram) {
+				// 小程序
+				top.postMessage(postData);
+			}
+			// // 	// back to previous page
+			uni.navigateBack({
+				delta: 1,
+			});
+		});
+	};
+}
+
+function getRoundedCanvas(sourceCanvas) {
+	let canvas = document.createElement("canvas");
+	let context = canvas.getContext("2d");
+	let width = sourceCanvas.width;
+	let height = sourceCanvas.height;
+
+	canvas.width = width;
+	canvas.height = height;
+	context.imageSmoothingEnabled = true;
+	context.drawImage(sourceCanvas, 0, 0, width, height);
+	context.globalCompositeOperation = "destination-in";
+	context.beginPath();
+	context.arc(
+		width / 2,
+		height / 2,
+		Math.min(width, height) / 2,
+		0,
+		2 * Math.PI,
+		true
+	);
+	context.fill();
+	return canvas;
+}
+
+function each(arr, callback) {
+	let length = arr.length;
+	let i;
+
+	for (i = 0; i < length; i++) {
+		callback.call(arr, arr[i], i, arr);
+	}
+
+	return arr;
+}
+
+async function selectFile(env) {
+	const fileInput = document.querySelector("#my-input");
+	return new Promise((resolve, reject) => {
+		fileInput.addEventListener("change", async (event) => {
+			let result;
+			result = await getDataUrlFromReader(event);
+			resolve(result);
+		});
+	});
+}
+
+async function getDataUrlFromReader(event) {
+	const files = event.target.files;
+	return new Promise((resolve, reject) => {
+		const reader = new FileReader();
+		reader.addEventListener("loadend", () => {
+			resolve(reader.result);
+		});
+		reader.readAsDataURL(files[0]);
+	});
+}
+
+async function getEnv() {
+	return new Promise((resolve, reject) => {
+		uni.getEnv((res) => {
+			resolve(res);
+		});
+	});
+}
+
+// TODO:
+async function chooseWithPlusApi() {
+	const btnArray = [{
+			title: "拍照",
+		},
+		{
+			title: "从手机相册选择",
+		},
+	];
+
+	return new Promise((resolve, reject) => {
+		plus.nativeUI.actionSheet({
+				cancel: "取消",
+				buttons: btnArray,
+			},
+			function(e) {
+				let index = e.index;
+				switch (index) {
+					case 0:
+						break;
+					case 1:
+						let camera = plus.camera.getCamera();
+						camera.captureImage(
+							function(file) {
+								resolve(file);
+							},
+							function() {
+								console.log("从相机获取照片失败");
+								reject("从相机获取照片失败");
+							}, {
+								filename: "_doc/photo/",
+								index: 1,
+							}
+						);
+						break;
+					case 2:
+						plus.gallery.pick(
+							function(file) {
+								resolve(file);
+							},
+							function() {
+								console.log("取消图片选择");
+								reject("取消图片选择");
+							}, {
+								multiple: false,
+							}
+						);
+						break;
+				}
+			}
+		);
+	});
+}

+ 149 - 0
hybrid/html/cropper/style.css

@@ -0,0 +1,149 @@
+/* button styles */
+.btn {
+  box-sizing: border-box;
+  position: relative;
+  display: inline-block;
+  font-weight: 400;
+  line-height: 1.5;
+  color: #000;
+  text-align: center;
+  text-decoration: none;
+  vertical-align: middle;
+  cursor: pointer;
+  user-select: none;
+  background-color: #e9ecef;
+  border: 1px solid #e9ecef;
+  padding: 0.375rem 0.75rem;
+  font-size: 1rem;
+  border-radius: 4px;
+  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
+    border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
+}
+.btn *,
+.btn *::before,
+.btn *::after {
+  box-sizing: inherit;
+}
+.btn img,
+.btn svg {
+  display: inline-flex;
+  vertical-align: -0.125em;
+  width: 1em;
+  height: 1em;
+}
+.btn:hover {
+  text-decoration: none;
+  background-color: #cbd3da;
+}
+.btn:focus {
+  outline: none;
+}
+.btn.disabled,
+.btn:disabled {
+  opacity: 0.65;
+  pointer-events: none;
+}
+
+.btn.primary {
+  background-color: #007bff;
+  border-color: #007bff;
+  color: #fff;
+}
+.btn.primary:hover {
+  text-decoration: none;
+  background-color: #0062cc;
+}
+
+.btn.outline {
+  background-color: transparent;
+  border-color: #e9ecef;
+}
+.btn.outline:hover {
+  text-decoration: none;
+  background-color: #e9ecef;
+}
+
+.btn.link {
+  background-color: transparent;
+  color: #007bff;
+  border-color: transparent;
+}
+.btn.link:hover {
+  background-color: #e9ecef;
+}
+
+.btn.block {
+  width: 100%;
+  display: block;
+}
+
+.btn.small {
+  padding: 0.1rem 0.4rem;
+}
+
+/* index.html */
+
+*,
+*::before,
+*::after {
+  box-sizing: border-box;
+}
+
+body,
+html {
+  padding: 0;
+  margin: 0;
+}
+
+body {
+  padding: 0.5rem;
+}
+
+img {
+  display: block;
+  /* This rule is very important, please don't ignore this */
+  max-width: 100%;
+  max-height: 400px;
+  width: 100%;
+}
+
+.previewAll {
+  display: grid;
+  grid-template-columns: 4fr 3fr 2fr 1fr;
+  gap: 0.5rem;
+  margin-top: 0.5rem;
+}
+
+.previewAll .preview {
+  overflow: hidden;
+}
+
+/* file input */
+
+.file-upload-box {
+  position: relative;
+}
+.file-upload-box .hidden-input {
+  position: absolute !important;
+  width: 1px;
+  height: 1px;
+  overflow: hidden;
+  clip: rect(1px 1px 1px 1px);
+}
+.file-upload-box input.hidden-input:focus + label {
+  outline: thin dotted;
+}
+.file-upload-box input.hidden-input:focus-within + label {
+  outline: thin dotted;
+}
+.file-upload-box .input-label {
+  border: 1px solid #eee;
+  width: 80px;
+  height: 80px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-size: 2rem;
+  font-weight: lighter;
+  color: #555;
+}

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
hybrid/html/cropper/uni.webview.1.5.2.js


+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "Lala NFT",
     "appid" : "__UNI__3CDE968",
     "description" : "",
-    "versionName" : "1.1.0",
-    "versionCode" : 110,
+    "versionName" : "1.1.9",
+    "versionCode" : 119,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */

+ 29 - 0
pages.json

@@ -36,6 +36,18 @@
 				"navigationBarTitleText": "我的矿机"
 			}
 		},
+		{
+			"path": "pages/index/teachList",
+			"style": {
+				"navigationBarTitleText": "新手教程"
+			}
+		},
+		{
+			"path": "pages/index/teachD",
+			"style": {
+				"navigationBarTitleText": "教程详情"
+			}
+		},
 		{
 			"path": "pages/index/info",
 			"style": {
@@ -96,6 +108,12 @@
 				"navigationBarTitleText": "列表"
 			}
 		},
+		{
+			"path": "pages/user/approve",
+			"style": {
+				"navigationBarTitleText": "实名认证"
+			}
+		},
 		{
 			"path": "pages/public/register",
 			"style": {
@@ -107,6 +125,17 @@
 				}
 			}
 		}, 
+		{
+			"path": "pages/set/cropper",
+			"style": {
+				"navigationBarTitleText": "裁剪",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		}, 
 		{
 			"path": "pages/index/appointment",
 			"style": {

+ 26 - 4
pages/assets/details.vue

@@ -29,6 +29,7 @@
 				<view class="tpl-time" v-if="ls.status == 0">待发放</view>
 			</view>
 		</view>
+		<u-loadmore :status="loadType"></u-loadmore>
 		<view class="empty-box" v-show="list.length == 0"><u-empty></u-empty></view>
 		<view class="flex submit-box">
 			<view class="submit" @click="recharge" v-if="moneyData.isTi">充币</view>
@@ -86,7 +87,8 @@ export default {
 			pm: '',
 			less: '',
 			page: 1,
-			limit: 5,
+			limit: 10,
+			loadType:'loadmore',
 			isLast: true,
 			name: '', //币名称
 			moneyData: {
@@ -98,6 +100,9 @@ export default {
 			}
 		};
 	},
+	onReachBottom(){
+		this.getdata();
+	},
 	onLoad(option) {
 		this.name = option.name;
 		this.moneyType();
@@ -110,10 +115,21 @@ export default {
 			uni.showLoading({
 				title: '加载中'
 			});
+			this.getdata()
+		},
+		getdata(){
+			let obj = this;
+			if(obj.loadType == 'nomore'){
+				return
+			}
+			if(obj.loadType == "loading"){
+				return
+			}
+			obj.loadType = "loading"
 			moneyLog(
 				{
-					page: 1,
-					limit: 10000,
+					page: obj.page,
+					limit: obj.limit,
 					type: obj.type
 				},
 				obj.name
@@ -123,8 +139,14 @@ export default {
 					title:'全部',
 					type:''
 				})
-				obj.list = data.list;
+				obj.list = obj.list.concat(data.list);
 				console.log(obj.list);
+				if(data.list.length == obj.limit){
+					obj.loadType = 'loadmore';
+					obj.page++
+				}else {
+					obj.loadType = 'nomore'
+				}
 				uni.hideLoading();
 			});
 		},

+ 9 - 3
pages/index/appointmentD.vue

@@ -89,8 +89,14 @@ export default {
 				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);
+					let time = Date.parse(new Date()).toString(); //获取到毫秒的时间戳,精确到毫秒
+					time = time.substr(0, 10);
+					let date = data.my.valid_time - time;
+					obj.list.js = (date / (3600 * 24)).toFixed(0);
+					if (date % (3600 * 24) != 0){
+						obj.list.js = 1 + obj.list.js*1
+					}
+					console.log(time, date, '123465789');
 					if (data.my.status == 1) {
 						obj.checkedAuto = true;
 					}
@@ -103,7 +109,7 @@ export default {
 					}
 				}
 				console.log(obj.list);
-				uni.hideLoading()
+				uni.hideLoading();
 			});
 		},
 		buy() {

+ 47 - 1
pages/index/index.vue

@@ -134,6 +134,16 @@
 				</view>
 			</view>
 		</u-popup>
+		<view class="tishi" v-if="tishi">
+			<view class="closeBox" @click="closetishi()">
+				<view class="close">
+					<image src="../../static/img/indexClose.png" mode=""></image>
+				</view>
+			</view>
+			<view class="main" @click="nav('/pages/index/teachList')">
+				<image src="../../static/img/teach.png" mode=""></image>
+			</view>
+		</view>
 	</view>
 </template>
 <script>
@@ -143,6 +153,7 @@ import { loadIndexs } from '@/api/user.js';
 export default {
 	data() {
 		return {
+			tishi:true,//是否显示教程框
 			show: false, //支付数量
 			show1: false, //支付密码
 			password: '',
@@ -161,13 +172,15 @@ export default {
 	},
 	//页面加载即刻发生
 	onShow() {
+		this.tishi = true,
 		this.loadDate();
 	},
 	methods: {
 		async loadDate() {
 			const obj = this;
 			uni.showLoading({
-				title: '加载中'
+				title: '加载中',
+				// mask: true
 			});
 			loadIndexs({})
 				.then(({ data }) => {
@@ -232,6 +245,9 @@ export default {
 					uni.stopPullDownRefresh();
 				});
 		},
+		closetishi() {
+			this.tishi = false
+		},
 		nav(url) {
 			console.log(url);
 			uni.navigateTo({
@@ -683,4 +699,34 @@ export default {
 		color: #45969b;
 	}
 }
+.tishi {
+	position: fixed;
+	bottom: 400rpx;
+	right: 20rpx;
+	z-index: 100;
+	image {
+		width: 100%;
+		height: 100%;
+	}
+	.closeBox {
+		position: absolute;
+		top: 0;
+		right: 0;
+		width: 50rpx;
+		height: 50rpx;
+		padding-top: 10rpx;
+		.close {
+			width: 30rpx;
+			height: 30rpx;
+			margin:auto ;
+		}
+	}
+	.main {
+		top: 40rpx;
+		right: 20rpx;
+		position: absolute;
+		width: 100rpx;
+		height: 100rpx;
+	}
+}
 </style>

+ 188 - 49
pages/index/info.vue

@@ -11,37 +11,37 @@
 				<view class="left">
 					<view class="item-font">
 						流通量:
-						<span>0000</span>
+						<span>{{ hui_zong_shu_ju.liu_tong_liang || '0000' }}</span>
 					</view>
 					<view class="item-font">
 						持币地址数:
-						<span>0000</span>
+						<span>{{ hui_zong_shu_ju.chi_bi_di_zhi_shu || '0000' }}</span>
 					</view>
 					<view class="item-font">
 						当前质押:
-						<span>0000</span>
+						<span>{{ hui_zong_shu_ju.dang_qian_zhi_ya_liang || '0' }}</span>
 					</view>
 					<view class="item-font">
 						昨日销毁量:
-						<span>0000</span>
+						<span>{{ hui_zong_shu_ju.zuo_ri_xiao_hui_liang * 1 || '0000' }}</span>
 					</view>
 				</view>
 				<view class="right">
 					<view class="item-font">
 						当天价格:
-						<span>0000</span>
+						<span>{{ hui_zong_shu_ju.dang_tian_jia_ge * 1 || '0000' }}</span>
 					</view>
 					<view class="item-font">
 						节点数:
-						<span>0000</span>
+						<span>{{ hui_zong_shu_ju.jie_dian_shu * 1 || '0000' }}</span>
 					</view>
 					<view class="item-font">
 						合伙人数:
-						<span>0000</span>
+						<span>{{ hui_zong_shu_ju.he_huo_ren_shu || '0000' }}</span>
 					</view>
 					<view class="item-font">
 						累计销毁量:
-						<span>0000</span>
+						<span>{{ hui_zong_shu_ju.lei_ji_xiao_hui_liang * 1 || '0000' }}</span>
 					</view>
 				</view>
 			</view>
@@ -53,15 +53,40 @@
 			</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">
+						拼团数:
+						<span>{{ zuo_ri_jing_ying.pin_tuan_shu || '0' }}</span>
+					</view>
+					<view class="item-font">
+						业 绩:
+						<span>{{ zuo_ri_jing_ying.ye_ji * 1 || '0000' }}</span>
+					</view>
+					<view class="item-font">
+						参与人数:
+						<span>{{ zuo_ri_jing_ying.can_yu_ren_shu * 1 || '0' }}</span>
+					</view>
+					<view class="item-font">
+						转账手续费:
+						<span>{{ zuo_ri_jing_ying.zhuan_zhang_shou_xu_fei || '0' }}</span>
+					</view>
+					<view class="item-font">
+						转账销毁数:
+						<span>{{ zuo_ri_jing_ying.zhuan_zhang_xiao_hui_shu || '0' }}</span>
+					</view>
 				</view>
 				<view class="right">
-					<view class="item-font">门票数:0000</view>
-					<view class="item-font">问票销毁数:0000</view>
-					<view class="item-font">门票分红:0000</view>
+					<view class="item-font">
+						门票数:
+						<span>{{ zuo_ri_jing_ying.men_piao_shu * 1 || '0000' }}</span>
+					</view>
+					<view class="item-font">
+						门票销毁数:
+						<span>{{ zuo_ri_jing_ying.men_piao_xiao_hui_shu * 1 || '0000' }}</span>
+					</view>
+					<view class="item-font">
+						门票分红:
+						<span>{{ (zuo_ri_jing_ying.men_piao_fen_hong * 1).toFixed(2) || '0000' }}</span>
+					</view>
 				</view>
 			</view>
 		</view>
@@ -72,16 +97,40 @@
 			</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 class="item-font">
+						拼团数:
+						<span>{{ le_ji_jing_ying.pin_tuan_shu || '0' }}</span>
+					</view>
+					<view class="item-font">
+						总业绩:
+						<span>{{ le_ji_jing_ying.ye_ji * 1 || '0000' }}</span>
+					</view>
+					<view class="item-font">
+						参与人数:
+						<span>{{ le_ji_jing_ying.can_yu_ren_shu * 1 || '0' }}</span>
+					</view>
+					<view class="item-font">
+						转账手续费:
+						<span>{{ le_ji_jing_ying.zhuan_zhang_shou_xu_fei || '0' }}</span>
+					</view>
+					<view class="item-font">
+						转账销毁数:
+						<span>{{ le_ji_jing_ying.zhuan_zhang_xiao_hui_shu || '0' }}</span>
+					</view>
 				</view>
 				<view class="right">
-					<view class="item-font">门票数:0000</view>
-					<view class="item-font">问票销毁数:0000</view>
-					<view class="item-font">门票分红:0000</view>
+					<view class="item-font">
+						门票数:
+						<span>{{ le_ji_jing_ying.men_piao_shu * 1 || '0000' }}</span>
+					</view>
+					<view class="item-font">
+						门票销毁数:
+						<span>{{ le_ji_jing_ying.men_piao_xiao_hui_shu * 1 || '0000' }}</span>
+					</view>
+					<view class="item-font">
+						门票分红:
+						<span>{{ (le_ji_jing_ying.men_piao_fen_hong * 1).toFixed(2) || '0000' }}</span>
+					</view>
 				</view>
 			</view>
 		</view>
@@ -98,15 +147,21 @@
 				<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 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="join">
+			<view class="xian"></view>
+			<view class="join-font">通证模型</view>
+		</view>
+		<view class="image"><image src="../../static/img/info-image.png" mode=""></image></view>
 		<view class="box">
 			<view class="top flex">
 				<view class="top-bg"><image src="../../static/img/index4.png"></image></view>
@@ -128,30 +183,100 @@
 </template>
 
 <script>
+import { finance } from '@/api/wallet';
 export default {
 	data() {
 		return {
-			list:[
+			list: [
+				{
+					name: '质押挖矿池',
+					num: '3.2亿',
+					bi: '16%',
+					now: ' ',
+					bian: '%',
+					time: ''
+				},
+				{
+					name: '流动性挖矿池',
+					num: '6.4亿',
+					bi: '32%',
+					now: ' ',
+					bian: '%',
+					time: ''
+				},
 				{
-					name:'质押挖矿池',
+					name: '交易挖矿矿池',
 					num: '3.2亿',
-					bi:'16%',
-					now:'2亿',
-					bian:'10%',
-					time:'2021-8-16'
+					bi: '16%',
+					now: ' ',
+					bian: '%',
+					time: ''
 				},
 				{
-					name:'质押挖矿池',
+					name: '链商挖矿',
 					num: '3.2亿',
-					bi:'16%',
-					now:'2亿',
-					bian:'10%',
-					time:'2021-8-16'
+					bi: '16%',
+					now: ' ',
+					bian: '%',
+					time: ''
+				},
+				{
+					name: '平台社区',
+					num: '1.6亿',
+					bi: '8%',
+					now: ' ',
+					bian: '%',
+					time: ''
+				},
+				{
+					name: '推广挖矿',
+					num: '0.4亿',
+					bi: '2%',
+					now: ' ',
+					bian: '%',
+					time: ''
+				},
+				{
+					name: '团队池',
+					num: '1亿',
+					bi: '5%',
+					now: ' ',
+					bian: '%',
+					time: ''
 				},
-			]
+				{
+					name: '节点合伙人池',
+					num: '1亿',
+					bi: '5%',
+					now: '',
+					bian: '%',
+					time: ''
+				}
+			],
+			hui_zong_shu_ju: '',
+			le_ji_jing_ying: '',
+			zuo_ri_jing_ying: ''
+		};
+	},
+	onLoad() {
+		this.loadData();
+	},
+	methods: {
+		async loadData() {
+			uni.showLoading({
+				title: '加载中',
+				mask: true
+			});
+			finance().then(({ data }) => {
+				console.log(data);
+				this.hui_zong_shu_ju = data.hui_zong_shu_ju;
+				this.le_ji_jing_ying = data.le_ji_jing_ying;
+				this.zuo_ri_jing_ying = data.zuo_ri_jing_ying;
+				uni.hideLoading();
+			});
 		}
 	}
-}
+};
 </script>
 
 <style lang="scss">
@@ -240,6 +365,19 @@ page {
 		color: #0f253a;
 	}
 }
+.image {
+	width: 690rpx;
+	height: 489rpx;
+	border-radius: 20rpx;
+	background: #FFFFFF;
+	box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.05);
+	margin: 26rpx auto 0;
+	image {
+		border-radius: 20rpx;
+		width: 690rpx;
+		height: 480rpx;
+	}
+}
 .tabBox {
 	margin: 30rpx auto 0;
 	width: 690rpx;
@@ -272,22 +410,23 @@ page {
 			color: #0f253a;
 		}
 		.one {
-			width: 147rpx!important;
+			width: 160rpx !important;
 		}
 		.two {
-			width: 134rpx!important;
+			width: 134rpx !important;
 		}
 		.three {
-			width: 65rpx!important;
+			width: 65rpx !important;
 		}
 		.four {
-			width: 110rpx!important;
+			height: 70rpx;
+			width: 110rpx !important;
 		}
 		.five {
-			width: 64rpx!important;
+			width: 64rpx !important;
 		}
 		.six {
-			width: 170rpx!important;
+			width: 170rpx !important;
 		}
 	}
 }

+ 15 - 14
pages/index/node.vue

@@ -5,17 +5,17 @@
 				<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>股权分红。
+					1、每份投资{{list.buy_price*1}}U,有效直推3人<br>
+					2、49份组成一个社区节点<br>
+					3、总节点合伙人1024名,每期49人,分21期招募
 			</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>
+					1、赠送1T FiL矿机1080天标准产币收益,技术服务费30% <br>
+					2、赠送LALA积分通证10万枚,每天1%释放。LALA上交易所前每天1%上涨,总100天<br>
+					3、享受LALA门票50%合伙人加权分红(扣除销毁后的门票,门票销毁按照市场情况动态调整,系数在10~50%之间)。<br>
+					4、享受项目总50%的股权加权分红(包括门票、手续费等)。<br>
+					5、享受LALA社区会员A2级别权益。<br>
+					6、赠送LALA NFT创世勋章一枚。
 			</view>
 			<view class="rule">
 					1、LALA NFT平台节点合伙人共分21期,即21个主节点。<br>
@@ -33,7 +33,7 @@
 					<u-line-progress :show-percent="false" inactive-color="#BBBBBB" active-color="#29F3FD" :percent="zuiduo"></u-line-progress>
 				</view>
 				<view class="yue-num">
-					仅剩{{zuiduo}}%
+					仅剩{{ zuiduo }}%
 				</view>
 				
 			</view>
@@ -59,7 +59,7 @@ export default {
 	data() {
 		return {
 			mun: 1,
-			zuiduo:49,
+			zuiduo:0,
 			id:'',
 			list:'',
 			show1: false, //支付密码
@@ -75,6 +75,7 @@ export default {
 				console.log(data)
 				this.list = data[0]
 				this.zuiduo = (data[0].stock * 1 / data[0].all_stock) * 100
+				this.zuiduo = this.zuiduo.toFixed(2)
 				this.id = data[0].id
 			})
 		},
@@ -136,7 +137,7 @@ page {
 	.rengou {
 		position: relative;
 		z-index: 10;
-		padding-top: 1140rpx;
+		padding-top: 1120rpx;
 		margin: 0 auto;
 		width: 460rpx;
 		font-size: 24rpx;
@@ -144,7 +145,7 @@ page {
 		font-family: PingFang SC;
 		font-weight: bold;
 		color: #FFFFFF;
-		height: 1400rpx;
+		height: 1260rpx;
 	}
 	.quanyi {
 		position: relative;
@@ -158,7 +159,7 @@ page {
 		font-family: PingFang SC;
 		font-weight: bold;
 		color: #FFFFFF;
-		height: 288rpx;
+		height: 420rpx;
 	}
 	.rule {
 		position: relative;

+ 91 - 0
pages/index/teachD.vue

@@ -0,0 +1,91 @@
+<template>
+	<view class="center">
+		<view class="bg">
+			<image :src="src" mode=""></image>
+		</view>
+		<view class="title">
+			{{ title }}
+		</view>
+		<view v-html="synopsis" class="content">
+			{{ synopsis }}
+		</view>
+	</view>
+</template>
+
+<script>
+import { details } from '@/api/product.js'
+export default {
+	data(){
+		return{
+			src: '',
+			title: '',
+			synopsis:'',
+			time:'',
+		}
+	},
+	onLoad(option) {
+		this.loadData(option.id);
+	},
+	methods: {
+		async loadData(id){
+			let obj = this;
+			details({},id).then(e =>{
+				console.log(e);
+				obj.src = e.data.image_input[0];
+				obj.title = e.data.title;
+				obj.synopsis = e.data.content
+				obj.time = e.data.add_time;
+			})
+		}
+	}
+}
+</script>
+
+<style lang="scss">
+	.center{
+		height: 100%;
+	}
+	.bg{
+		width: 100%;
+		height: 474rpx;
+		image{
+			width: 100%;
+			height: 100%;
+		}
+	}
+	.title{
+		width: 90%;
+		margin: 0 auto;
+		font-size: 40rpx;
+		font-weight: 500;
+		color: #171313;
+		text-overflow: -o-ellipsis-lastline;
+		overflow: hidden;
+		display: -webkit-box;
+		-webkit-line-clamp: 2;
+		-webkit-box-orient: vertical;
+	}
+	.time {
+		width: 90%;
+		margin: 0 auto;
+		margin-top: 16rpx;
+		font-size: 24rpx;
+		font-weight: 500;
+		color: #656b6c;
+	}
+	.content{
+		width: 90%;
+		margin:0 auto;
+		margin-top: 20rpx;
+		font-size: 32rpx;
+		font-weight: 500;
+		color:#777777;
+	}
+	/deep/ .content{
+		img{
+			width: 100%;
+			height: 100%;
+		}
+	}
+</style>
+

+ 88 - 0
pages/index/teachList.vue

@@ -0,0 +1,88 @@
+<template>
+	<view class="container">
+		<view v-if="list.length > 0" class="list-box flex_item" v-for="(ls,index) in list" :key='index' @click="nav(index)">
+			<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>
+		</view>
+		<view class="empty-box" v-show="list.length === 0"><u-empty></u-empty></view>
+	</view>
+</template>
+<script>
+import { article } from '@/api/user.js';
+export default {
+	data() {
+		return {
+			list:''
+		};
+	},
+	onLoad(option){
+		this.loadData();
+	},
+	onShow() {
+		
+	},
+	methods: {
+		// 请求载入数据
+		async loadData() {
+			let obj = this;
+			article({
+				page:1,
+				limit:10000,
+			},3).then(({ data }) => {
+				console.log(data)
+				obj.list = data;
+			});
+		},
+		nav(index){
+			uni.navigateTo({
+				url: '/pages/index/article?id=' + this.list[index].id
+			})
+		},
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	min-height: 100%;
+	background-color: #ffffff;
+	.container {
+		width: 100%;
+		padding: 25rpx 27rpx;
+		
+	}
+}
+.empty-box{
+	margin-top: 100rpx;
+	width: 100%;
+	height: 500rpx;
+}
+.list-box{
+	border-bottom: 1rpx solid #E3E3E3;
+	margin-bottom: 25rpx;
+	padding-bottom: 25rpx;
+	image{
+		width: 200rpx;
+		height: 160rpx;
+		border-radius: 15rpx;
+	}
+	.list-item{
+		padding-left: 16rpx;
+		width: 80%;
+		.title{
+			height: 80rpx;
+			color: #333333;
+			font-size: 30rpx;
+			font-weight: 500;
+		}
+		.time{
+			padding-top: 40rpx;
+			color: #999999;
+			font-size: 24rpx;
+		}
+	}
+}
+</style>

+ 2 - 2
pages/market/duihuan.vue

@@ -3,7 +3,7 @@
 		<view class="rule-box">
 			<view class="rule-title">兑换规则</view>
 			<view class="rule-main">
-				每{{ list.sp_exchange_origin_cost * 1 }}{{ list.sp_exchange_origin }}+{{ list.sp_exchange_bingo_time }}幸运值可兑换{{ list.sp_exchange_origin_cost * 1
+				每{{ list.sp_exchange_origin_cost * 1 }}{{ list.sp_exchange_origin }}+{{ list.sp_exchange_bingo_time }}幸运值可兑换{{ list.sp_exchange_target_get * 1
 				}}{{ list.sp_exchange_target }}+{{ list.sp_exchange_bingo_time }}荣誉值
 			</view>
 		</view>
@@ -29,7 +29,7 @@
 				</view>
 				<view class="left flex">
 					<view class="top font">
-						<span>{{ list.sp_exchange_origin_cost * 1 || 0 }}</span>
+						<span>{{ list.sp_exchange_target_get * 1 || 0 }}</span>
 						{{ list.sp_exchange_target }}
 					</view>
 					<view class="zong font">+</view>

+ 246 - 42
pages/market/myCalculation.vue

@@ -37,58 +37,63 @@
 				<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 class="item" v-if="ls.redeem_money*1 > 0 && ls.status == 3">
+				<view class="item-name">赎回价格</view>
+				<view class="item-val">{{ls.redeem_money*1*ls.num}}{{ls.redeem_money_type}}</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 class="item" v-if="ls.mortgage_money*1 >0 && ls.status != 3">
+				<view class="item-name"></view>
+				<view class="btn" @click="buy(ls,1)">
+					质押
 				</view>
 			</view>
-			<view class="cell-info flex">
-				<view class="tip">到期时间:{{ls.mining_end_time}}</view>
+			<view class="item" v-if=" ls.status == 3">
+				<view class="item-name"></view>
+				<view class="btn" @click="shu(ls,2)">
+					赎回
+				</view>
 			</view>
-			<view class="cell-info flex">
-				<view class="tip">购买时间:{{ls._pay_time}}</view>
+			
+		</view>
+		<view class="empty-box" v-show="list.length === 0"><u-empty></u-empty></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>
-			<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>
+		</u-popup>
+		<uni-popup ref="mation" type="center">
+			<view class="popup">
+				<view class="cancel flex" @click="close2"><view class="tip"></view></view>
+				<view class="list-boxs">
+					<view class="textBox flex">
+						<view class="font">质押金额:</view>
+						<view class="number">{{ zhiya * 1*num }} {{ zhiyaType }}</view>
+					</view>
+					<view class="xian"></view>
+					<view class="textBox flex">
+						<view class="font">赎回金额:</view>
+						<view class="number">{{ shuhui * 1 *num }} {{ shuhuiType }}</view>
+					</view>
+					<view class="xian"></view>
+					<view class="tishi">您是否质押该框机</view>
+					<view class="btnBox flex">
+						<view class="btn1" @click="close()">取消</view>
+						<view class="btn2" @click="mai()">确定</view>
+					</view>
+				</view>
 			</view>
-		</view> -->
-		<view class="empty-box" v-show="list.length === 0"><u-empty></u-empty></view>
+		</uni-popup>
 	</view>
 </template>
 <script>
 import { mymining } from '@/api/market.js';
 import { timeComputed } from '@/utils/rocessor.js';
+import { redeem,mortgage } from '@/api/product.js';
 import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
 export default {
 	components: {
@@ -96,7 +101,16 @@ export default {
 	},
 	data() {
 		return {
+			type: '',//判断是质押还是赎回
+			show1: false,//是否显示密码框
+			password:'',//交易密码
 			list:'',
+			num:'',//矿机数量
+			id:'',//需要的id
+			zhiya:'',//质押金额
+			zhiyaType:'',//质押单位
+			shuhui:'',//赎回金额
+			shuhuiType:'',//赎回单位
 		};
 	},
 	onLoad(option){
@@ -161,6 +175,73 @@ export default {
 		},
 		isTime(index) {
 			this.list[index].status = 1
+		},
+		buy(data,type){
+			this.type = type
+			this.id = data.id;
+			this.num = data.num*1;
+			this.zhiya = data.mortgage_money
+			this.zhiyaType = data.mortgage_money_type
+			this.shuhui = data.redeem_money
+			this.shuhuiType = data.redeem_money_type
+			this.$refs.mation.open();
+		},
+		close(){
+			this.type = '';
+			this.id = "";
+			this.zhiya = "";
+			this.zhiyaType = "";
+			this.shuhui = "";
+			this.shuhuiType = "";
+			this.$refs.mation.close();
+		},
+		mai(){
+			this.$refs.mation.close();
+			this.show1 = true
+		},
+		shu(data,type){
+			this.type = type
+			this.id = data.id;
+			this.show1 = true
+		},
+		cancel() {
+			this.type = '';
+			this.password = '';
+			this.id = "";
+			this.zhiya = "";
+			this.zhiyaType = "";
+			this.shuhui = "";
+			this.shuhuiType = "";
+			this.show1 = false;
+		},
+		pswQd() {
+			if (this.type == 1){
+				mortgage({trade_psw: this.password},this.id).then(e => {
+					this.password = '';
+					this.id = "";
+					this.zhiya = "";
+					this.zhiyaType = "";
+					this.shuhui = "";
+					this.shuhuiType = "";
+					this.show1 = false;
+					this.$api.msg('质押成功');
+				}).catch(e =>{
+					console.log(e)
+				})
+			}else {
+				redeem({trade_psw: this.password},this.id).then(e => {
+					this.password = '';
+					this.id = "";
+					this.zhiya = "";
+					this.zhiyaType = "";
+					this.shuhui = "";
+					this.shuhuiType = "";
+					this.show1 = false;
+					this.$api.msg('赎回成功');
+				}).catch(e =>{
+					console.log(e)
+				})
+			}
 		}
 	}
 };
@@ -172,7 +253,7 @@ page {
 	background-color: #ffffff;
 	.container {
 		width: 100%;
-		
+		padding-bottom: 20rpx;
 	}
 }
 .list-cell{
@@ -239,6 +320,7 @@ page {
 		height: 500rpx;
 	}
 	.item-wrapper {
+		position: relative;
 		padding: 0 35rpx;
 		width: 690rpx;
 		height: 748rpx;
@@ -269,4 +351,126 @@ page {
 	.jg {
 		height: 20rpx;
 	}
+	.btn {
+		background-color: #44969d;
+		width: 150rpx;
+		text-align: center;
+		line-height: 60rpx;
+		font-size: 26rpx;
+		border-radius: 50rpx;
+		color: #ffffff;
+	}
+	.popup {
+		height: 618rpx;
+		background: #ffffff;
+		box-shadow: 3rpx 3rpx 6rpx 0rpx rgba(31, 31, 31, 0.17);
+		border-radius: 40rpx;
+		width: 700rpx;
+		.cancel {
+			text-align: center;
+			width: 100%;
+			line-height: 60rpx;
+			position: relative;
+			.tip {
+				color: #000000;
+				border-radius: 40rpx;
+				width: 70rpx;
+				height: 70rpx;
+				position: absolute;
+				top: 0;
+				right: 0;
+				background-color: #fff;
+			}
+		}
+		.list-boxs {
+			width: 90%;
+			margin: 0 auto;
+			margin-top: 100rpx;
+			.tishi {
+				padding-top: 50rpx;
+				font-size: 30rpx;
+				font-weight: bold;
+				width: 100%;
+				text-align: center;
+			}
+			.textBox {
+				padding: 24rpx 18rpx;
+				.font {
+					font-size: 28rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #4f4f4f;
+				}
+				.number {
+					font-size: 28rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #fb3a2f;
+				}
+				.text {
+					text-indent: 2em;
+					font-size: 28rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #4f4f4f;
+				}
+			}
+			.btnBox {
+				padding: 60rpx 30rpx;
+				.btn1 {
+					width: 200rpx;
+					padding: 20rpx;
+					text-align: center;
+					border:1px solid #44969d;
+					border-radius: 40rpx;
+					
+				}
+				.btn2 {
+					width: 200rpx;
+					padding: 20rpx;
+					text-align: center;
+					color: #fff;
+					background: #44969d;
+					border-radius: 40rpx;
+				}
+			}
+			.xian {
+				width: 100%;
+				height: 1px;
+				background: #e7dfe8;
+			}
+		}
+	}
+	.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>

+ 3 - 3
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>
@@ -48,7 +48,7 @@ export default {
 			let obj = this;
 			obj.logining = true;
 			if (obj.phone == '') {
-				obj.$api.msg('请输入邮箱');
+				obj.$api.msg('请输入账号');
 				return;
 			}
 			if (obj.password == '') {

+ 7 - 7
pages/public/register.vue

@@ -5,7 +5,7 @@
 		<view class="loginText">请认真填写个人信息</view>
 		<view class="login-box">
 			<view class="username">账号</view>
-			<input class="input-box" type="text" v-model="phone" placeholder="请输入邮箱" />
+			<input class="input-box" type="text" v-model="phone" placeholder="请输入邮箱/电话" />
 		</view>
 		<view class="login-box">
 			<view class="username">验证码</view>
@@ -61,11 +61,11 @@ export default {
 		register() {
 			let obj = this;
 			if (obj.phone == '') {
-				obj.$api.msg('请输入邮箱号码');
+				obj.$api.msg('请输入账号');
 				return;
 			}
-			if (!/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/.test(obj.phone)) {
-				obj.$api.msg('请输入正确的邮箱');
+			if (!/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/.test(obj.phone) && (!/(^1[3|4|5|7|8|9][0-9]{9}$)/.test(this.phone))) {
+				obj.$api.msg('请输入正确的邮箱或手机');
 				return;
 			}
 			if (obj.loginPass == '') {
@@ -113,11 +113,11 @@ export default {
 		verification() {
 			let obj = this;
 			if (this.phone == '') {
-				this.$api.msg('请输入邮箱');
+				this.$api.msg('请输入账号');
 				return;
 			}
-			if (!/^([a-zA-Z]|[0-9])(\w|\-|\.)+@[a-zA-Z0-9]+(\.([a-zA-Z]{2,4}))+$/.test(obj.phone)) {
-				obj.$api.msg('请输入正确的邮箱');
+			if (!/^([a-zA-Z]|[0-9])(\w|\-|\.)+@[a-zA-Z0-9]+(\.([a-zA-Z]{2,4}))+$/.test(obj.phone) && (!/(^1[3|4|5|7|8|9][0-9]{9}$)/.test(this.phone))) {
+				obj.$api.msg('请输入正确的账号');
 				return;
 			}
 			// 判断是否在倒计时

+ 73 - 0
pages/set/cropper.vue

@@ -0,0 +1,73 @@
+<template>
+  <view class="container">
+    <web-view
+      :webview-styles="webviewStyles"
+      @message="handleMessage"
+      :src="webviewSrc"
+    >
+    </web-view>
+  </view>
+</template>
+
+<script>
+
+export default {
+  name: "buuug7-img-cropper",
+  data() {
+    return {
+      webviewStyles: {},
+      platform: "",
+      webviewSrc:
+        "/hybrid/html/cropper/index.html",
+    };
+  },
+
+  mounted() {
+    const { platform } = uni.getSystemInfoSync();
+    this.platform = platform;
+    console.log(platform,'获取系统对象');
+
+    if (platform === "windows" || platform === "mac") {
+      this.handleH5Message();
+    }
+	// #ifdef H5
+	window.addEventListener("message", this.handleMessage, false);
+	// #endif
+  },
+
+  methods: {
+    handleMessage(event) {
+	  console.log('消息传输',event);
+	  // uni.navigateBack({
+	  // 	delta: 1,
+	  // });
+      const platform = this.platform;
+	  // #ifdef H5
+	  if(!event.data.data.type){
+		 return; 
+	  }
+      const data = event.data.data;
+	  // #endif
+	  // #ifndef H5
+	  const data = event.detail.data[0];
+	  // #endif
+      if (platform === "android" || platform === "ios") {
+        const eventChannel = this.getOpenerEventChannel();
+        eventChannel.emit("imgCropped", { data: data.dataUrl });
+      }
+    },
+    handleH5Message(e) {
+      console.log(`H5Message`);
+      window.addEventListener("message", (event) => {
+        const data = event.data.data;
+        if (data && data.type === "croppedData") {
+          const eventChannel = this.getOpenerEventChannel();
+          eventChannel.emit("imgCropped", { data: data.dataUrl });
+        }
+      });
+    },
+  },
+};
+</script>
+
+<style></style>

+ 197 - 0
pages/user/approve.vue

@@ -0,0 +1,197 @@
+<template>
+	<view class="content">
+		<view class="bgimg"><image class="img" src="../../static/img/bgRz.png" mode="widthFix"></image></view>
+		<u-form class="user" :model="form" ref="uForm">
+			<u-form-item label="姓名"><u-input v-model="form.name" placeholder="请输入真实姓名" /></u-form-item>
+			<u-form-item label="身份证号" label-width="150"><u-input placeholder="请输入身份证号" v-model="form.card" /></u-form-item>
+		</u-form>
+		<view class="userBox">
+			<view class="title">上传人脸正面照片</view>
+			<view class="imgUp" @click.stop="upImg"><image class="img" :src="form.img || '../../static/img/upImgbg.png'" mode="scaleToFill"></image></view>
+		</view>
+		<button class="add-btn" @click="pushData('add')">提交</button>
+	</view>
+</template>
+
+<script>
+import { realName } from '@/api/set.js';
+export default {
+	data() {
+		return {
+			loding: false, //判断是否在点击中
+			form: {
+				name: '',
+				card: '',
+				img: ''
+			}
+		};
+	},
+	onLoad(option) {},
+	methods: {
+		upImg(e) {
+			console.log('上传图片');
+			const that = this;
+			uni.navigateTo({
+				url: '/pages/set/cropper',
+				events: {
+					imgCropped(event) {
+						// 监听裁剪完成
+						// 返回的 event 中包含了已经裁剪好图片的base64编码字符串
+						// 你可以使用 <image :src="imgDataUrl" mode="aspectFit"></image> 组件来展示裁剪后的图片
+						// 或者你可以将该字符串通过接口上传给服务器用来保存
+						that.$nextTick(function() {
+							that.form.img = event.data;
+							console.log(that.form.img, '图片');
+						});
+					}
+				},
+				fail(e) {
+					console.log(e, '错误');
+				}
+			});
+		},
+		ToIndex() {
+			let obj = this;
+			let ur = uni.getStorageSync('present') || '/pages/index/index';
+			// 用于处理缓存bug
+			if (ur == 'pages/product/product') {
+				ur = '/pages/index/index';
+			}
+			uni.switchTab({
+				url: ur,
+				fail(e) {
+					uni.navigateTo({
+						url: ur,
+						fail(e) {
+							uni.navigateTo({
+								url: '/pages/index/index'
+							});
+						}
+					});
+				}
+			});
+		},
+		pushData() {
+			const da = this.form;
+			if (this.loding) {
+				return;
+			}
+			if (!da.name) {
+				uni.showModal({
+					title: '提示',
+					content: '请填写名称',
+					showCancel: false
+				});
+				return;
+			}
+			if (!da.card) {
+				uni.showModal({
+					title: '提示',
+					content: '请填写身份证',
+					showCancel: false
+				});
+				return;
+			}
+			if (!da.img) {
+				uni.showModal({
+					title: '提示',
+					content: '请选择图片',
+					showCancel: false
+				});
+				return;
+			}
+			const data = {
+				face_image: da.img.replace(/^data:image\/[a-z,A-Z]*;base64,/, ''),
+				real_name: da.name,
+				id_card: da.card
+			};
+			uni.showLoading({
+				title: '审核中',
+				mask: true
+			});
+			this.loding = true;
+			// 上传
+			realName(data)
+				.then(e => {
+					uni.showModal({
+						title: '提示',
+						content: '实名成功过',
+						showCancel: false,
+						success: res => {
+							uni.switchTab({
+								url: '/pages/index/index'
+							});
+						}
+					});
+					uni.hideLoading();
+					this.loding = false;
+					console.log(e);
+				})
+				.catch(e => {
+					this.loding = false;
+					console.log(e);
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.content {
+	height: 100%;
+	padding: 0 $page-row-spacing;
+}
+.add-btn {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 690rpx;
+	height: 80rpx;
+	margin: 60rpx auto;
+	font-size: $font-lg;
+	color: #fff;
+	background: $bg-green-gradual;
+	border-radius: 10rpx;
+	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+}
+.bgimg {
+	text-align: center;
+	width: 1200rpx;
+	margin-left: -260rpx;
+	height: 400rpx;
+	background: $bg-green-gradual;
+	border-bottom-right-radius: 999999rpx;
+	border-bottom-left-radius: 999999rpx;
+	.img {
+		width: 400rpx;
+		margin-top: 50rpx;
+	}
+}
+.user {
+	margin-top: -50rpx;
+	border-radius: 10rpx;
+}
+.userBox,
+.user {
+	box-shadow: 0px 2px 16px 1px rgba(89, 89, 89, 0.24);
+	padding: 0 $page-row-spacing;
+	background-color: white;
+}
+.userBox {
+	margin-top: 20rpx;
+	padding: 30rpx;
+	.imgUp {
+		min-height: 100rpx;
+		text-align: center;
+		margin-top: 30rpx;
+		.img {
+			width: 300rpx;
+			height: 400rpx;
+		}
+	}
+}
+.imglist /deep/ * {
+	margin-left: auto !important;
+	margin-right: auto !important;
+}
+</style>

+ 1 - 1
pages/user/extension.vue

@@ -63,7 +63,7 @@
 			</view>
 			<view class="box-item flex">
 				<view class="box-left">累计团队奖励</view>
-				<view class="box-right">{{all.goup || 0}}USDT</view>
+				<view class="box-right">{{all.group || 0}}USDT</view>
 			</view>
 		</view>
 		<view class="liebiao flex" @click="navto('/pages/user/extensionList')">

+ 3 - 2
pages/user/extensionList.vue

@@ -45,13 +45,14 @@ export default {
 	},
 	methods: {
 		async loadData() {
+			
 			if (this.loadingType == 'nomore' || this.loadingType == 'loading') {
 				return;
 			}
 			this.loadingType = 'loading';
 			spread({
-				limit: 10,
-				page: 1
+				limit: this.limit,
+				page: this.page
 			}).then(({ data }) => {
 				this.all = data.total;
 				this.orderList = data.list;

+ 1 - 1
pages/user/fuli.vue

@@ -18,7 +18,7 @@
 		<view class="rule">
 			<view class="rule-title">福利兑换规则</view>
 			<view class="rule-main">
-				每{{ list.sp_exchange_origin_cost * 1 }}{{ list.sp_exchange_origin }}+{{ list.sp_exchange_bingo_time }}幸运值可兑换{{ list.sp_exchange_origin_cost * 1}}{{ list.sp_exchange_target }}+{{ list.sp_exchange_bingo_time }}荣誉值
+				每{{ list.sp_exchange_origin_cost * 1 }}{{ list.sp_exchange_origin }}+{{ list.sp_exchange_bingo_time }}幸运值可兑换{{ list.sp_exchange_target_get * 1}}{{ list.sp_exchange_target }}+{{ list.sp_exchange_bingo_time }}荣誉值
 			</view>
 		</view>
 		<view class="main-title">

+ 1 - 1
pages/user/myNote.vue

@@ -203,7 +203,7 @@ page {
 				background-position: right bottom;
 				background-size: 140rpx 115rpx;
 				flex-grow: 1;
-				min-width: 40%;
+				width: 100%;
 				margin-bottom: 30rpx;
 				border-radius: 15rpx;
 				background-color: #ffffff;

+ 12 - 1
pages/user/user.vue

@@ -41,7 +41,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/index/info')">
+				<view class="tt-box" @click="nav('/pages/index/info')" v-if="userInfo.level >=4"> 
 					<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>
@@ -71,6 +71,11 @@
 					<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/approve')">
+					<image src="../../static/img/real_name.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="server()">
 					<image src="../../static/img/kefu.png" class="tt-icon1" mode=""></image>
 					<view class="tt-txt">联系客服</view>
@@ -82,6 +87,9 @@
 					<image src="../../static/img/jiantou.png" class="next-icon" mode=""></image>
 				</view>
 			</view>
+			<view class="kb">
+				
+			</view>
 		</view>
 
 		<uni-popup ref="popup" type="center">
@@ -239,6 +247,9 @@ page {
 	height: 100%;
 	background: #ffffff;
 }
+.kb {
+	height: 100rpx;
+}
 .top {
 	width: 100%;
 	height: 340rpx;

BIN
static/img/bgRz.png


BIN
static/img/indexClose.png


BIN
static/img/info-image.png


BIN
static/img/real_name.png


BIN
static/img/rengou.png


BIN
static/img/teach.png


BIN
static/img/upImgbg.png


BIN
unpackage/启动图/qidongtu.9.png


+ 4 - 5
utils/upApp.js

@@ -15,10 +15,10 @@ export function getUpApp () {
 	if (hj === 'android') {
 		// 设置默认显示数据
 		app = true;
-		store.commit('changeState', {
-			name: 'app',
-			value: app
-		});
+		// store.commit('changeState', {
+		// 	name: 'app',
+		// 	value: app
+		// });
 	}
 	let token = uni.getStorageSync('token') || '';
 	var timestamp = new Date().getTime();
@@ -85,7 +85,6 @@ export function getUpApp () {
 									}
 								}
 							});
-							break;
 							return;
 						}
 					}

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff