Browse Source

2021-8-30

cmy 3 years ago
parent
commit
c863d3cdfc
100 changed files with 9353 additions and 3201 deletions
  1. 7 0
      api/finance.js
  2. 44 0
      api/market.js
  3. 55 0
      api/product.js
  4. 40 0
      api/set.js
  5. 47 1
      api/user.js
  6. 9 0
      api/wallet.js
  7. 33 0
      components/js_sdk/xb-copy/uni-copy.js
  8. 1201 0
      components/tki-qrcode/qrcode.js
  9. 210 0
      components/tki-qrcode/tki-qrcode.vue
  10. 195 0
      components/uni-countdown/uni-countdown.vue
  11. 196 0
      components/uni-number-box.vue
  12. 8 0
      hybrid/html/cropper/cropper.min.css
  13. 9 0
      hybrid/html/cropper/cropper.min.js
  14. 41 0
      hybrid/html/cropper/index.html
  15. 270 0
      hybrid/html/cropper/index.js
  16. 149 0
      hybrid/html/cropper/style.css
  17. 0 0
      hybrid/html/cropper/uni.webview.1.5.2.js
  18. 1 1
      main.js
  19. 31 19
      manifest.json
  20. 121 54
      pages.json
  21. 19 10
      pages/assets/assets.vue
  22. 49 44
      pages/assets/details.vue
  23. 18 10
      pages/assets/myPing.vue
  24. 99 57
      pages/assets/recharge.vue
  25. 19 11
      pages/assets/teamDetails.vue
  26. 15 10
      pages/assets/transfer.vue
  27. 70 43
      pages/assets/withdraw.vue
  28. 95 121
      pages/index/appointment.vue
  29. 331 0
      pages/index/appointmentD.vue
  30. 91 0
      pages/index/article.vue
  31. 24 3
      pages/index/convert.vue
  32. 156 211
      pages/index/datile.vue
  33. 348 120
      pages/index/index.vue
  34. 433 0
      pages/index/info.vue
  35. 218 277
      pages/index/node.vue
  36. 88 0
      pages/index/nodeList.vue
  37. 91 0
      pages/index/teachD.vue
  38. 88 0
      pages/index/teachList.vue
  39. 485 0
      pages/market/details.vue
  40. 242 0
      pages/market/duihuan.vue
  41. 514 2
      pages/market/market.vue
  42. 476 0
      pages/market/myCalculation.vue
  43. 404 0
      pages/market/pay.vue
  44. 3 3
      pages/money/paySuccess.vue
  45. 6 12
      pages/money/payment.vue
  46. 70 61
      pages/public/forget.vue
  47. 5 3
      pages/public/login.vue
  48. 172 160
      pages/public/register.vue
  49. 0 208
      pages/set/address.vue
  50. 0 219
      pages/set/addressManage.vue
  51. 73 0
      pages/set/cropper.vue
  52. 157 98
      pages/set/password.vue
  53. 0 161
      pages/set/phone.vue
  54. 0 113
      pages/set/set.vue
  55. 1 1
      pages/set/userinfo.vue
  56. 197 0
      pages/user/approve.vue
  57. 0 310
      pages/user/coupon.vue
  58. 199 83
      pages/user/extension.vue
  59. 137 0
      pages/user/extensionList.vue
  60. 0 156
      pages/user/favorites.vue
  61. 244 0
      pages/user/fuli.vue
  62. 116 0
      pages/user/fulilist.vue
  63. 265 0
      pages/user/myNote.vue
  64. 354 0
      pages/user/rake.vue
  65. 0 200
      pages/user/scoreAccumulate.vue
  66. 99 65
      pages/user/shareQrCode.vue
  67. 165 33
      pages/user/user.vue
  68. 0 321
      pages/user/withdrawal.vue
  69. BIN
      static/img/auto.png
  70. BIN
      static/img/bgRz.png
  71. BIN
      static/img/data.png
  72. BIN
      static/img/duhuanbg.png
  73. BIN
      static/img/gift.png
  74. BIN
      static/img/img01.png
  75. BIN
      static/img/img28.png
  76. BIN
      static/img/img51.png
  77. BIN
      static/img/index2.png
  78. BIN
      static/img/index3.png
  79. BIN
      static/img/index6.png
  80. BIN
      static/img/indexClose.png
  81. BIN
      static/img/info-image.png
  82. BIN
      static/img/ling.png
  83. BIN
      static/img/myKJ.png
  84. BIN
      static/img/myPoint.png
  85. BIN
      static/img/real_name.png
  86. BIN
      static/img/rengou.png
  87. BIN
      static/img/teach.png
  88. BIN
      static/img/tongz-bg.png
  89. BIN
      static/img/upImgbg.png
  90. 37 0
      store/index.js
  91. BIN
      unpackage/cache/apk/__UNI__3CDE968_cm.apk
  92. 1 0
      unpackage/cache/apk/apkurl
  93. 0 0
      unpackage/cache/apk/cmManifestCache.json
  94. 9 0
      unpackage/cache/appleConfig.ini
  95. 3 0
      unpackage/cache/certdata
  96. BIN
      unpackage/cache/wgt/__UNI__3CDE968/.manifest/appstore.png
  97. BIN
      unpackage/cache/wgt/__UNI__3CDE968/.manifest/google-keystore.keystore
  98. BIN
      unpackage/cache/wgt/__UNI__3CDE968/.manifest/icon-android-hdpi.png
  99. BIN
      unpackage/cache/wgt/__UNI__3CDE968/.manifest/icon-android-xhdpi.png
  100. BIN
      unpackage/cache/wgt/__UNI__3CDE968/.manifest/icon-android-xxhdpi.png

+ 7 - 0
api/finance.js

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

+ 44 - 0
api/market.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+export function mining(data) {
+	return request({
+		url: '/api/mining',
+		method: 'get',
+		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,
+		method: 'post',
+		data
+	});
+}
+export function miningDateils(data,id) {
+	return request({
+		url: '/api/mining/'+id,
+		method: 'get',
+		data
+	});
+}
+export function getSp(data,id) {
+	return request({
+		url: '/api/lala/sp_exchange/'+id,
+		method: 'get',
+		data
+	});
+}
+export function spExchange(data,id) {
+	return request({
+		url: '/api/lala/sp_exchange/'+id,
+		method: 'post',
+		data
+	});
+}

+ 55 - 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({
@@ -24,3 +55,27 @@ export function buylala(data,id) {
 		data
 	});
 }
+export function details(data,id) {
+	return request({
+		url: '/api/article/details/'+id,
+		method: 'GET',
+		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
+	});
+}

+ 40 - 0
api/set.js

@@ -25,7 +25,47 @@ 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 realName(data) {
+	return request({
+		url: '/api/real_name',
+		method: 'POST',
+		data
+	});
+}
+//设置下级服务费比例
+export function setServiceRatio(uid,data) {
+	return request({
+		url: '/api/spread/service/'+uid,
+		method: 'post',
+		data
+	})
+}
 
+//设置下级佣金比例
+export function setRatio(uid,data) {
+	return request({
+		url: '/api/spread/ratio/'+uid,
+		method: 'post',
+		data
+	})
+}
 //绑定手机
 export function binding(data) {
 	return request({

+ 47 - 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({
@@ -59,3 +66,42 @@ export function uploads(data){
 		data
 	});
 }
+// 获取首页信息
+export function loadIndexs(data) {
+	return request({
+		url: '/api/index',
+		method: 'get',
+		data
+	});
+}
+//获取版本
+export function version(data) {
+	return request({
+		url: '/api/version',
+		method: 'GET',
+		data
+	})
+}
+
+//获取二维码
+export function service(data) {
+	return request({
+		url: '/api/service',
+		method: 'GET',
+		data
+	})
+}
+export function gitExtension(data) {
+	return request({
+		url: '/api/bill_info',
+		method: 'GET',
+		data
+	})
+}
+export function article(data,id) {
+	return request({
+		url: '/api/article/list/'+id,
+		method: 'GET',
+		data
+	});
+}

+ 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({

+ 33 - 0
components/js_sdk/xb-copy/uni-copy.js

@@ -0,0 +1,33 @@
+export default function uniCopy(content) {
+	/**
+	 * 小程序端 和 app端的复制逻辑
+	 */
+	//#ifndef H5
+	uni.setClipboardData({
+		data: content,
+		success: function() {
+			console.log('success');
+			return true
+		}
+	});
+	//#endif
+	
+	/**
+	 * H5端的复制逻辑
+	 */
+	// #ifdef H5
+	if (!document.queryCommandSupported('copy')) { //为了兼容有些浏览器 queryCommandSupported 的判断
+		// 不支持
+		return false
+	}
+	let textarea = document.createElement("textarea")
+	textarea.value = content
+	textarea.readOnly = "readOnly"
+	document.body.appendChild(textarea)
+	textarea.select() // 选择对象
+	textarea.setSelectionRange(0, content.length) //核心
+	let result = document.execCommand("copy") // 执行浏览器复制命令
+	textarea.remove()
+	return result
+	// #endif
+}

+ 1201 - 0
components/tki-qrcode/qrcode.js

@@ -0,0 +1,1201 @@
+let QRCode = {};
+(function () {
+    /**
+     * 获取单个字符的utf8编码
+     * unicode BMP平面约65535个字符
+     * @param {num} code
+     * return {array}
+     */
+    function unicodeFormat8(code) {
+        // 1 byte
+        var c0, c1, c2;
+        if (code < 128) {
+            return [code];
+            // 2 bytes
+        } else if (code < 2048) {
+            c0 = 192 + (code >> 6);
+            c1 = 128 + (code & 63);
+            return [c0, c1];
+            // 3 bytes
+        } else {
+            c0 = 224 + (code >> 12);
+            c1 = 128 + (code >> 6 & 63);
+            c2 = 128 + (code & 63);
+            return [c0, c1, c2];
+        }
+    }
+    /**
+     * 获取字符串的utf8编码字节串
+     * @param {string} string
+     * @return {array}
+     */
+    function getUTF8Bytes(string) {
+        var utf8codes = [];
+        for (var i = 0; i < string.length; i++) {
+            var code = string.charCodeAt(i);
+            var utf8 = unicodeFormat8(code);
+            for (var j = 0; j < utf8.length; j++) {
+                utf8codes.push(utf8[j]);
+            }
+        }
+        return utf8codes;
+    }
+    /**
+     * 二维码算法实现
+     * @param {string} data              要编码的信息字符串
+     * @param {num} errorCorrectLevel 纠错等级
+     */
+    function QRCodeAlg(data, errorCorrectLevel) {
+        this.typeNumber = -1; //版本
+        this.errorCorrectLevel = errorCorrectLevel;
+        this.modules = null; //二维矩阵,存放最终结果
+        this.moduleCount = 0; //矩阵大小
+        this.dataCache = null; //数据缓存
+        this.rsBlocks = null; //版本数据信息
+        this.totalDataCount = -1; //可使用的数据量
+        this.data = data;
+        this.utf8bytes = getUTF8Bytes(data);
+        this.make();
+    }
+    QRCodeAlg.prototype = {
+        constructor: QRCodeAlg,
+        /**
+         * 获取二维码矩阵大小
+         * @return {num} 矩阵大小
+         */
+        getModuleCount: function () {
+            return this.moduleCount;
+        },
+        /**
+         * 编码
+         */
+        make: function () {
+            this.getRightType();
+            this.dataCache = this.createData();
+            this.createQrcode();
+        },
+        /**
+         * 设置二位矩阵功能图形
+         * @param  {bool} test 表示是否在寻找最好掩膜阶段
+         * @param  {num} maskPattern 掩膜的版本
+         */
+        makeImpl: function (maskPattern) {
+            this.moduleCount = this.typeNumber * 4 + 17;
+            this.modules = new Array(this.moduleCount);
+            for (var row = 0; row < this.moduleCount; row++) {
+                this.modules[row] = new Array(this.moduleCount);
+            }
+            this.setupPositionProbePattern(0, 0);
+            this.setupPositionProbePattern(this.moduleCount - 7, 0);
+            this.setupPositionProbePattern(0, this.moduleCount - 7);
+            this.setupPositionAdjustPattern();
+            this.setupTimingPattern();
+            this.setupTypeInfo(true, maskPattern);
+            if (this.typeNumber >= 7) {
+                this.setupTypeNumber(true);
+            }
+            this.mapData(this.dataCache, maskPattern);
+        },
+        /**
+         * 设置二维码的位置探测图形
+         * @param  {num} row 探测图形的中心横坐标
+         * @param  {num} col 探测图形的中心纵坐标
+         */
+        setupPositionProbePattern: function (row, col) {
+            for (var r = -1; r <= 7; r++) {
+                if (row + r <= -1 || this.moduleCount <= row + r) continue;
+                for (var c = -1; c <= 7; c++) {
+                    if (col + c <= -1 || this.moduleCount <= col + c) continue;
+                    if ((0 <= r && r <= 6 && (c == 0 || c == 6)) || (0 <= c && c <= 6 && (r == 0 || r == 6)) || (2 <= r && r <= 4 && 2 <= c && c <= 4)) {
+                        this.modules[row + r][col + c] = true;
+                    } else {
+                        this.modules[row + r][col + c] = false;
+                    }
+                }
+            }
+        },
+        /**
+         * 创建二维码
+         * @return {[type]} [description]
+         */
+        createQrcode: function () {
+            var minLostPoint = 0;
+            var pattern = 0;
+            var bestModules = null;
+            for (var i = 0; i < 8; i++) {
+                this.makeImpl(i);
+                var lostPoint = QRUtil.getLostPoint(this);
+                if (i == 0 || minLostPoint > lostPoint) {
+                    minLostPoint = lostPoint;
+                    pattern = i;
+                    bestModules = this.modules;
+                }
+            }
+            this.modules = bestModules;
+            this.setupTypeInfo(false, pattern);
+            if (this.typeNumber >= 7) {
+                this.setupTypeNumber(false);
+            }
+        },
+        /**
+         * 设置定位图形
+         * @return {[type]} [description]
+         */
+        setupTimingPattern: function () {
+            for (var r = 8; r < this.moduleCount - 8; r++) {
+                if (this.modules[r][6] != null) {
+                    continue;
+                }
+                this.modules[r][6] = (r % 2 == 0);
+                if (this.modules[6][r] != null) {
+                    continue;
+                }
+                this.modules[6][r] = (r % 2 == 0);
+            }
+        },
+        /**
+         * 设置矫正图形
+         * @return {[type]} [description]
+         */
+        setupPositionAdjustPattern: function () {
+            var pos = QRUtil.getPatternPosition(this.typeNumber);
+            for (var i = 0; i < pos.length; i++) {
+                for (var j = 0; j < pos.length; j++) {
+                    var row = pos[i];
+                    var col = pos[j];
+                    if (this.modules[row][col] != null) {
+                        continue;
+                    }
+                    for (var r = -2; r <= 2; r++) {
+                        for (var c = -2; c <= 2; c++) {
+                            if (r == -2 || r == 2 || c == -2 || c == 2 || (r == 0 && c == 0)) {
+                                this.modules[row + r][col + c] = true;
+                            } else {
+                                this.modules[row + r][col + c] = false;
+                            }
+                        }
+                    }
+                }
+            }
+        },
+        /**
+         * 设置版本信息(7以上版本才有)
+         * @param  {bool} test 是否处于判断最佳掩膜阶段
+         * @return {[type]}      [description]
+         */
+        setupTypeNumber: function (test) {
+            var bits = QRUtil.getBCHTypeNumber(this.typeNumber);
+            for (var i = 0; i < 18; i++) {
+                var mod = (!test && ((bits >> i) & 1) == 1);
+                this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod;
+                this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod;
+            }
+        },
+        /**
+         * 设置格式信息(纠错等级和掩膜版本)
+         * @param  {bool} test
+         * @param  {num} maskPattern 掩膜版本
+         * @return {}
+         */
+        setupTypeInfo: function (test, maskPattern) {
+            var data = (QRErrorCorrectLevel[this.errorCorrectLevel] << 3) | maskPattern;
+            var bits = QRUtil.getBCHTypeInfo(data);
+            // vertical
+            for (var i = 0; i < 15; i++) {
+                var mod = (!test && ((bits >> i) & 1) == 1);
+                if (i < 6) {
+                    this.modules[i][8] = mod;
+                } else if (i < 8) {
+                    this.modules[i + 1][8] = mod;
+                } else {
+                    this.modules[this.moduleCount - 15 + i][8] = mod;
+                }
+                // horizontal
+                var mod = (!test && ((bits >> i) & 1) == 1);
+                if (i < 8) {
+                    this.modules[8][this.moduleCount - i - 1] = mod;
+                } else if (i < 9) {
+                    this.modules[8][15 - i - 1 + 1] = mod;
+                } else {
+                    this.modules[8][15 - i - 1] = mod;
+                }
+            }
+            // fixed module
+            this.modules[this.moduleCount - 8][8] = (!test);
+        },
+        /**
+         * 数据编码
+         * @return {[type]} [description]
+         */
+        createData: function () {
+            var buffer = new QRBitBuffer();
+            var lengthBits = this.typeNumber > 9 ? 16 : 8;
+            buffer.put(4, 4); //添加模式
+            buffer.put(this.utf8bytes.length, lengthBits);
+            for (var i = 0, l = this.utf8bytes.length; i < l; i++) {
+                buffer.put(this.utf8bytes[i], 8);
+            }
+            if (buffer.length + 4 <= this.totalDataCount * 8) {
+                buffer.put(0, 4);
+            }
+            // padding
+            while (buffer.length % 8 != 0) {
+                buffer.putBit(false);
+            }
+            // padding
+            while (true) {
+                if (buffer.length >= this.totalDataCount * 8) {
+                    break;
+                }
+                buffer.put(QRCodeAlg.PAD0, 8);
+                if (buffer.length >= this.totalDataCount * 8) {
+                    break;
+                }
+                buffer.put(QRCodeAlg.PAD1, 8);
+            }
+            return this.createBytes(buffer);
+        },
+        /**
+         * 纠错码编码
+         * @param  {buffer} buffer 数据编码
+         * @return {[type]}
+         */
+        createBytes: function (buffer) {
+            var offset = 0;
+            var maxDcCount = 0;
+            var maxEcCount = 0;
+            var length = this.rsBlock.length / 3;
+            var rsBlocks = new Array();
+            for (var i = 0; i < length; i++) {
+                var count = this.rsBlock[i * 3 + 0];
+                var totalCount = this.rsBlock[i * 3 + 1];
+                var dataCount = this.rsBlock[i * 3 + 2];
+                for (var j = 0; j < count; j++) {
+                    rsBlocks.push([dataCount, totalCount]);
+                }
+            }
+            var dcdata = new Array(rsBlocks.length);
+            var ecdata = new Array(rsBlocks.length);
+            for (var r = 0; r < rsBlocks.length; r++) {
+                var dcCount = rsBlocks[r][0];
+                var ecCount = rsBlocks[r][1] - dcCount;
+                maxDcCount = Math.max(maxDcCount, dcCount);
+                maxEcCount = Math.max(maxEcCount, ecCount);
+                dcdata[r] = new Array(dcCount);
+                for (var i = 0; i < dcdata[r].length; i++) {
+                    dcdata[r][i] = 0xff & buffer.buffer[i + offset];
+                }
+                offset += dcCount;
+                var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
+                var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1);
+                var modPoly = rawPoly.mod(rsPoly);
+                ecdata[r] = new Array(rsPoly.getLength() - 1);
+                for (var i = 0; i < ecdata[r].length; i++) {
+                    var modIndex = i + modPoly.getLength() - ecdata[r].length;
+                    ecdata[r][i] = (modIndex >= 0) ? modPoly.get(modIndex) : 0;
+                }
+            }
+            var data = new Array(this.totalDataCount);
+            var index = 0;
+            for (var i = 0; i < maxDcCount; i++) {
+                for (var r = 0; r < rsBlocks.length; r++) {
+                    if (i < dcdata[r].length) {
+                        data[index++] = dcdata[r][i];
+                    }
+                }
+            }
+            for (var i = 0; i < maxEcCount; i++) {
+                for (var r = 0; r < rsBlocks.length; r++) {
+                    if (i < ecdata[r].length) {
+                        data[index++] = ecdata[r][i];
+                    }
+                }
+            }
+            return data;
+
+        },
+        /**
+         * 布置模块,构建最终信息
+         * @param  {} data
+         * @param  {} maskPattern
+         * @return {}
+         */
+        mapData: function (data, maskPattern) {
+            var inc = -1;
+            var row = this.moduleCount - 1;
+            var bitIndex = 7;
+            var byteIndex = 0;
+            for (var col = this.moduleCount - 1; col > 0; col -= 2) {
+                if (col == 6) col--;
+                while (true) {
+                    for (var c = 0; c < 2; c++) {
+                        if (this.modules[row][col - c] == null) {
+                            var dark = false;
+                            if (byteIndex < data.length) {
+                                dark = (((data[byteIndex] >>> bitIndex) & 1) == 1);
+                            }
+                            var mask = QRUtil.getMask(maskPattern, row, col - c);
+                            if (mask) {
+                                dark = !dark;
+                            }
+                            this.modules[row][col - c] = dark;
+                            bitIndex--;
+                            if (bitIndex == -1) {
+                                byteIndex++;
+                                bitIndex = 7;
+                            }
+                        }
+                    }
+                    row += inc;
+                    if (row < 0 || this.moduleCount <= row) {
+                        row -= inc;
+                        inc = -inc;
+                        break;
+                    }
+                }
+            }
+        }
+    };
+    /**
+     * 填充字段
+     */
+    QRCodeAlg.PAD0 = 0xEC;
+    QRCodeAlg.PAD1 = 0x11;
+    //---------------------------------------------------------------------
+    // 纠错等级对应的编码
+    //---------------------------------------------------------------------
+    var QRErrorCorrectLevel = [1, 0, 3, 2];
+    //---------------------------------------------------------------------
+    // 掩膜版本
+    //---------------------------------------------------------------------
+    var QRMaskPattern = {
+        PATTERN000: 0,
+        PATTERN001: 1,
+        PATTERN010: 2,
+        PATTERN011: 3,
+        PATTERN100: 4,
+        PATTERN101: 5,
+        PATTERN110: 6,
+        PATTERN111: 7
+    };
+    //---------------------------------------------------------------------
+    // 工具类
+    //---------------------------------------------------------------------
+    var QRUtil = {
+        /*
+        每个版本矫正图形的位置
+         */
+        PATTERN_POSITION_TABLE: [
+            [],
+            [6, 18],
+            [6, 22],
+            [6, 26],
+            [6, 30],
+            [6, 34],
+            [6, 22, 38],
+            [6, 24, 42],
+            [6, 26, 46],
+            [6, 28, 50],
+            [6, 30, 54],
+            [6, 32, 58],
+            [6, 34, 62],
+            [6, 26, 46, 66],
+            [6, 26, 48, 70],
+            [6, 26, 50, 74],
+            [6, 30, 54, 78],
+            [6, 30, 56, 82],
+            [6, 30, 58, 86],
+            [6, 34, 62, 90],
+            [6, 28, 50, 72, 94],
+            [6, 26, 50, 74, 98],
+            [6, 30, 54, 78, 102],
+            [6, 28, 54, 80, 106],
+            [6, 32, 58, 84, 110],
+            [6, 30, 58, 86, 114],
+            [6, 34, 62, 90, 118],
+            [6, 26, 50, 74, 98, 122],
+            [6, 30, 54, 78, 102, 126],
+            [6, 26, 52, 78, 104, 130],
+            [6, 30, 56, 82, 108, 134],
+            [6, 34, 60, 86, 112, 138],
+            [6, 30, 58, 86, 114, 142],
+            [6, 34, 62, 90, 118, 146],
+            [6, 30, 54, 78, 102, 126, 150],
+            [6, 24, 50, 76, 102, 128, 154],
+            [6, 28, 54, 80, 106, 132, 158],
+            [6, 32, 58, 84, 110, 136, 162],
+            [6, 26, 54, 82, 110, 138, 166],
+            [6, 30, 58, 86, 114, 142, 170]
+        ],
+        G15: (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0),
+        G18: (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0),
+        G15_MASK: (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1),
+        /*
+        BCH编码格式信息
+         */
+        getBCHTypeInfo: function (data) {
+            var d = data << 10;
+            while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {
+                d ^= (QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15)));
+            }
+            return ((data << 10) | d) ^ QRUtil.G15_MASK;
+        },
+        /*
+        BCH编码版本信息
+         */
+        getBCHTypeNumber: function (data) {
+            var d = data << 12;
+            while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {
+                d ^= (QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18)));
+            }
+            return (data << 12) | d;
+        },
+        /*
+        获取BCH位信息
+         */
+        getBCHDigit: function (data) {
+            var digit = 0;
+            while (data != 0) {
+                digit++;
+                data >>>= 1;
+            }
+            return digit;
+        },
+        /*
+        获取版本对应的矫正图形位置
+         */
+        getPatternPosition: function (typeNumber) {
+            return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];
+        },
+        /*
+        掩膜算法
+         */
+        getMask: function (maskPattern, i, j) {
+            switch (maskPattern) {
+                case QRMaskPattern.PATTERN000:
+                    return (i + j) % 2 == 0;
+                case QRMaskPattern.PATTERN001:
+                    return i % 2 == 0;
+                case QRMaskPattern.PATTERN010:
+                    return j % 3 == 0;
+                case QRMaskPattern.PATTERN011:
+                    return (i + j) % 3 == 0;
+                case QRMaskPattern.PATTERN100:
+                    return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 == 0;
+                case QRMaskPattern.PATTERN101:
+                    return (i * j) % 2 + (i * j) % 3 == 0;
+                case QRMaskPattern.PATTERN110:
+                    return ((i * j) % 2 + (i * j) % 3) % 2 == 0;
+                case QRMaskPattern.PATTERN111:
+                    return ((i * j) % 3 + (i + j) % 2) % 2 == 0;
+                default:
+                    throw new Error("bad maskPattern:" + maskPattern);
+            }
+        },
+        /*
+        获取RS的纠错多项式
+         */
+        getErrorCorrectPolynomial: function (errorCorrectLength) {
+            var a = new QRPolynomial([1], 0);
+            for (var i = 0; i < errorCorrectLength; i++) {
+                a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0));
+            }
+            return a;
+        },
+        /*
+        获取评价
+         */
+        getLostPoint: function (qrCode) {
+            var moduleCount = qrCode.getModuleCount(),
+                lostPoint = 0,
+                darkCount = 0;
+            for (var row = 0; row < moduleCount; row++) {
+                var sameCount = 0;
+                var head = qrCode.modules[row][0];
+                for (var col = 0; col < moduleCount; col++) {
+                    var current = qrCode.modules[row][col];
+                    //level 3 评价
+                    if (col < moduleCount - 6) {
+                        if (current && !qrCode.modules[row][col + 1] && qrCode.modules[row][col + 2] && qrCode.modules[row][col + 3] && qrCode.modules[row][col + 4] && !qrCode.modules[row][col + 5] && qrCode.modules[row][col + 6]) {
+                            if (col < moduleCount - 10) {
+                                if (qrCode.modules[row][col + 7] && qrCode.modules[row][col + 8] && qrCode.modules[row][col + 9] && qrCode.modules[row][col + 10]) {
+                                    lostPoint += 40;
+                                }
+                            } else if (col > 3) {
+                                if (qrCode.modules[row][col - 1] && qrCode.modules[row][col - 2] && qrCode.modules[row][col - 3] && qrCode.modules[row][col - 4]) {
+                                    lostPoint += 40;
+                                }
+                            }
+                        }
+                    }
+                    //level 2 评价
+                    if ((row < moduleCount - 1) && (col < moduleCount - 1)) {
+                        var count = 0;
+                        if (current) count++;
+                        if (qrCode.modules[row + 1][col]) count++;
+                        if (qrCode.modules[row][col + 1]) count++;
+                        if (qrCode.modules[row + 1][col + 1]) count++;
+                        if (count == 0 || count == 4) {
+                            lostPoint += 3;
+                        }
+                    }
+                    //level 1 评价
+                    if (head ^ current) {
+                        sameCount++;
+                    } else {
+                        head = current;
+                        if (sameCount >= 5) {
+                            lostPoint += (3 + sameCount - 5);
+                        }
+                        sameCount = 1;
+                    }
+                    //level 4 评价
+                    if (current) {
+                        darkCount++;
+                    }
+                }
+            }
+            for (var col = 0; col < moduleCount; col++) {
+                var sameCount = 0;
+                var head = qrCode.modules[0][col];
+                for (var row = 0; row < moduleCount; row++) {
+                    var current = qrCode.modules[row][col];
+                    //level 3 评价
+                    if (row < moduleCount - 6) {
+                        if (current && !qrCode.modules[row + 1][col] && qrCode.modules[row + 2][col] && qrCode.modules[row + 3][col] && qrCode.modules[row + 4][col] && !qrCode.modules[row + 5][col] && qrCode.modules[row + 6][col]) {
+                            if (row < moduleCount - 10) {
+                                if (qrCode.modules[row + 7][col] && qrCode.modules[row + 8][col] && qrCode.modules[row + 9][col] && qrCode.modules[row + 10][col]) {
+                                    lostPoint += 40;
+                                }
+                            } else if (row > 3) {
+                                if (qrCode.modules[row - 1][col] && qrCode.modules[row - 2][col] && qrCode.modules[row - 3][col] && qrCode.modules[row - 4][col]) {
+                                    lostPoint += 40;
+                                }
+                            }
+                        }
+                    }
+                    //level 1 评价
+                    if (head ^ current) {
+                        sameCount++;
+                    } else {
+                        head = current;
+                        if (sameCount >= 5) {
+                            lostPoint += (3 + sameCount - 5);
+                        }
+                        sameCount = 1;
+                    }
+                }
+            }
+            // LEVEL4
+            var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;
+            lostPoint += ratio * 10;
+            return lostPoint;
+        }
+
+    };
+    //---------------------------------------------------------------------
+    // QRMath使用的数学工具
+    //---------------------------------------------------------------------
+    var QRMath = {
+        /*
+        将n转化为a^m
+         */
+        glog: function (n) {
+            if (n < 1) {
+                throw new Error("glog(" + n + ")");
+            }
+            return QRMath.LOG_TABLE[n];
+        },
+        /*
+        将a^m转化为n
+         */
+        gexp: function (n) {
+            while (n < 0) {
+                n += 255;
+            }
+            while (n >= 256) {
+                n -= 255;
+            }
+            return QRMath.EXP_TABLE[n];
+        },
+        EXP_TABLE: new Array(256),
+        LOG_TABLE: new Array(256)
+
+    };
+    for (var i = 0; i < 8; i++) {
+        QRMath.EXP_TABLE[i] = 1 << i;
+    }
+    for (var i = 8; i < 256; i++) {
+        QRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4] ^ QRMath.EXP_TABLE[i - 5] ^ QRMath.EXP_TABLE[i - 6] ^ QRMath.EXP_TABLE[i - 8];
+    }
+    for (var i = 0; i < 255; i++) {
+        QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]] = i;
+    }
+    //---------------------------------------------------------------------
+    // QRPolynomial 多项式
+    //---------------------------------------------------------------------
+    /**
+     * 多项式类
+     * @param {Array} num   系数
+     * @param {num} shift a^shift
+     */
+    function QRPolynomial(num, shift) {
+        if (num.length == undefined) {
+            throw new Error(num.length + "/" + shift);
+        }
+        var offset = 0;
+        while (offset < num.length && num[offset] == 0) {
+            offset++;
+        }
+        this.num = new Array(num.length - offset + shift);
+        for (var i = 0; i < num.length - offset; i++) {
+            this.num[i] = num[i + offset];
+        }
+    }
+    QRPolynomial.prototype = {
+        get: function (index) {
+            return this.num[index];
+        },
+        getLength: function () {
+            return this.num.length;
+        },
+        /**
+         * 多项式乘法
+         * @param  {QRPolynomial} e 被乘多项式
+         * @return {[type]}   [description]
+         */
+        multiply: function (e) {
+            var num = new Array(this.getLength() + e.getLength() - 1);
+            for (var i = 0; i < this.getLength(); i++) {
+                for (var j = 0; j < e.getLength(); j++) {
+                    num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i)) + QRMath.glog(e.get(j)));
+                }
+            }
+            return new QRPolynomial(num, 0);
+        },
+        /**
+         * 多项式模运算
+         * @param  {QRPolynomial} e 模多项式
+         * @return {}
+         */
+        mod: function (e) {
+            var tl = this.getLength(),
+                el = e.getLength();
+            if (tl - el < 0) {
+                return this;
+            }
+            var num = new Array(tl);
+            for (var i = 0; i < tl; i++) {
+                num[i] = this.get(i);
+            }
+            while (num.length >= el) {
+                var ratio = QRMath.glog(num[0]) - QRMath.glog(e.get(0));
+
+                for (var i = 0; i < e.getLength(); i++) {
+                    num[i] ^= QRMath.gexp(QRMath.glog(e.get(i)) + ratio);
+                }
+                while (num[0] == 0) {
+                    num.shift();
+                }
+            }
+            return new QRPolynomial(num, 0);
+        }
+    };
+
+    //---------------------------------------------------------------------
+    // RS_BLOCK_TABLE
+    //---------------------------------------------------------------------
+    /*
+    二维码各个版本信息[块数, 每块中的数据块数, 每块中的信息块数]
+     */
+    var RS_BLOCK_TABLE = [
+        // L
+        // M
+        // Q
+        // H
+        // 1
+        [1, 26, 19],
+        [1, 26, 16],
+        [1, 26, 13],
+        [1, 26, 9],
+
+        // 2
+        [1, 44, 34],
+        [1, 44, 28],
+        [1, 44, 22],
+        [1, 44, 16],
+
+        // 3
+        [1, 70, 55],
+        [1, 70, 44],
+        [2, 35, 17],
+        [2, 35, 13],
+
+        // 4
+        [1, 100, 80],
+        [2, 50, 32],
+        [2, 50, 24],
+        [4, 25, 9],
+
+        // 5
+        [1, 134, 108],
+        [2, 67, 43],
+        [2, 33, 15, 2, 34, 16],
+        [2, 33, 11, 2, 34, 12],
+
+        // 6
+        [2, 86, 68],
+        [4, 43, 27],
+        [4, 43, 19],
+        [4, 43, 15],
+
+        // 7
+        [2, 98, 78],
+        [4, 49, 31],
+        [2, 32, 14, 4, 33, 15],
+        [4, 39, 13, 1, 40, 14],
+
+        // 8
+        [2, 121, 97],
+        [2, 60, 38, 2, 61, 39],
+        [4, 40, 18, 2, 41, 19],
+        [4, 40, 14, 2, 41, 15],
+
+        // 9
+        [2, 146, 116],
+        [3, 58, 36, 2, 59, 37],
+        [4, 36, 16, 4, 37, 17],
+        [4, 36, 12, 4, 37, 13],
+
+        // 10
+        [2, 86, 68, 2, 87, 69],
+        [4, 69, 43, 1, 70, 44],
+        [6, 43, 19, 2, 44, 20],
+        [6, 43, 15, 2, 44, 16],
+
+        // 11
+        [4, 101, 81],
+        [1, 80, 50, 4, 81, 51],
+        [4, 50, 22, 4, 51, 23],
+        [3, 36, 12, 8, 37, 13],
+
+        // 12
+        [2, 116, 92, 2, 117, 93],
+        [6, 58, 36, 2, 59, 37],
+        [4, 46, 20, 6, 47, 21],
+        [7, 42, 14, 4, 43, 15],
+
+        // 13
+        [4, 133, 107],
+        [8, 59, 37, 1, 60, 38],
+        [8, 44, 20, 4, 45, 21],
+        [12, 33, 11, 4, 34, 12],
+
+        // 14
+        [3, 145, 115, 1, 146, 116],
+        [4, 64, 40, 5, 65, 41],
+        [11, 36, 16, 5, 37, 17],
+        [11, 36, 12, 5, 37, 13],
+
+        // 15
+        [5, 109, 87, 1, 110, 88],
+        [5, 65, 41, 5, 66, 42],
+        [5, 54, 24, 7, 55, 25],
+        [11, 36, 12],
+
+        // 16
+        [5, 122, 98, 1, 123, 99],
+        [7, 73, 45, 3, 74, 46],
+        [15, 43, 19, 2, 44, 20],
+        [3, 45, 15, 13, 46, 16],
+
+        // 17
+        [1, 135, 107, 5, 136, 108],
+        [10, 74, 46, 1, 75, 47],
+        [1, 50, 22, 15, 51, 23],
+        [2, 42, 14, 17, 43, 15],
+
+        // 18
+        [5, 150, 120, 1, 151, 121],
+        [9, 69, 43, 4, 70, 44],
+        [17, 50, 22, 1, 51, 23],
+        [2, 42, 14, 19, 43, 15],
+
+        // 19
+        [3, 141, 113, 4, 142, 114],
+        [3, 70, 44, 11, 71, 45],
+        [17, 47, 21, 4, 48, 22],
+        [9, 39, 13, 16, 40, 14],
+
+        // 20
+        [3, 135, 107, 5, 136, 108],
+        [3, 67, 41, 13, 68, 42],
+        [15, 54, 24, 5, 55, 25],
+        [15, 43, 15, 10, 44, 16],
+
+        // 21
+        [4, 144, 116, 4, 145, 117],
+        [17, 68, 42],
+        [17, 50, 22, 6, 51, 23],
+        [19, 46, 16, 6, 47, 17],
+
+        // 22
+        [2, 139, 111, 7, 140, 112],
+        [17, 74, 46],
+        [7, 54, 24, 16, 55, 25],
+        [34, 37, 13],
+
+        // 23
+        [4, 151, 121, 5, 152, 122],
+        [4, 75, 47, 14, 76, 48],
+        [11, 54, 24, 14, 55, 25],
+        [16, 45, 15, 14, 46, 16],
+
+        // 24
+        [6, 147, 117, 4, 148, 118],
+        [6, 73, 45, 14, 74, 46],
+        [11, 54, 24, 16, 55, 25],
+        [30, 46, 16, 2, 47, 17],
+
+        // 25
+        [8, 132, 106, 4, 133, 107],
+        [8, 75, 47, 13, 76, 48],
+        [7, 54, 24, 22, 55, 25],
+        [22, 45, 15, 13, 46, 16],
+
+        // 26
+        [10, 142, 114, 2, 143, 115],
+        [19, 74, 46, 4, 75, 47],
+        [28, 50, 22, 6, 51, 23],
+        [33, 46, 16, 4, 47, 17],
+
+        // 27
+        [8, 152, 122, 4, 153, 123],
+        [22, 73, 45, 3, 74, 46],
+        [8, 53, 23, 26, 54, 24],
+        [12, 45, 15, 28, 46, 16],
+
+        // 28
+        [3, 147, 117, 10, 148, 118],
+        [3, 73, 45, 23, 74, 46],
+        [4, 54, 24, 31, 55, 25],
+        [11, 45, 15, 31, 46, 16],
+
+        // 29
+        [7, 146, 116, 7, 147, 117],
+        [21, 73, 45, 7, 74, 46],
+        [1, 53, 23, 37, 54, 24],
+        [19, 45, 15, 26, 46, 16],
+
+        // 30
+        [5, 145, 115, 10, 146, 116],
+        [19, 75, 47, 10, 76, 48],
+        [15, 54, 24, 25, 55, 25],
+        [23, 45, 15, 25, 46, 16],
+
+        // 31
+        [13, 145, 115, 3, 146, 116],
+        [2, 74, 46, 29, 75, 47],
+        [42, 54, 24, 1, 55, 25],
+        [23, 45, 15, 28, 46, 16],
+
+        // 32
+        [17, 145, 115],
+        [10, 74, 46, 23, 75, 47],
+        [10, 54, 24, 35, 55, 25],
+        [19, 45, 15, 35, 46, 16],
+
+        // 33
+        [17, 145, 115, 1, 146, 116],
+        [14, 74, 46, 21, 75, 47],
+        [29, 54, 24, 19, 55, 25],
+        [11, 45, 15, 46, 46, 16],
+
+        // 34
+        [13, 145, 115, 6, 146, 116],
+        [14, 74, 46, 23, 75, 47],
+        [44, 54, 24, 7, 55, 25],
+        [59, 46, 16, 1, 47, 17],
+
+        // 35
+        [12, 151, 121, 7, 152, 122],
+        [12, 75, 47, 26, 76, 48],
+        [39, 54, 24, 14, 55, 25],
+        [22, 45, 15, 41, 46, 16],
+
+        // 36
+        [6, 151, 121, 14, 152, 122],
+        [6, 75, 47, 34, 76, 48],
+        [46, 54, 24, 10, 55, 25],
+        [2, 45, 15, 64, 46, 16],
+
+        // 37
+        [17, 152, 122, 4, 153, 123],
+        [29, 74, 46, 14, 75, 47],
+        [49, 54, 24, 10, 55, 25],
+        [24, 45, 15, 46, 46, 16],
+
+        // 38
+        [4, 152, 122, 18, 153, 123],
+        [13, 74, 46, 32, 75, 47],
+        [48, 54, 24, 14, 55, 25],
+        [42, 45, 15, 32, 46, 16],
+
+        // 39
+        [20, 147, 117, 4, 148, 118],
+        [40, 75, 47, 7, 76, 48],
+        [43, 54, 24, 22, 55, 25],
+        [10, 45, 15, 67, 46, 16],
+
+        // 40
+        [19, 148, 118, 6, 149, 119],
+        [18, 75, 47, 31, 76, 48],
+        [34, 54, 24, 34, 55, 25],
+        [20, 45, 15, 61, 46, 16]
+    ];
+
+    /**
+     * 根据数据获取对应版本
+     * @return {[type]} [description]
+     */
+    QRCodeAlg.prototype.getRightType = function () {
+        for (var typeNumber = 1; typeNumber < 41; typeNumber++) {
+            var rsBlock = RS_BLOCK_TABLE[(typeNumber - 1) * 4 + this.errorCorrectLevel];
+            if (rsBlock == undefined) {
+                throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + this.errorCorrectLevel);
+            }
+            var length = rsBlock.length / 3;
+            var totalDataCount = 0;
+            for (var i = 0; i < length; i++) {
+                var count = rsBlock[i * 3 + 0];
+                var dataCount = rsBlock[i * 3 + 2];
+                totalDataCount += dataCount * count;
+            }
+            var lengthBytes = typeNumber > 9 ? 2 : 1;
+            if (this.utf8bytes.length + lengthBytes < totalDataCount || typeNumber == 40) {
+                this.typeNumber = typeNumber;
+                this.rsBlock = rsBlock;
+                this.totalDataCount = totalDataCount;
+                break;
+            }
+        }
+    };
+
+    //---------------------------------------------------------------------
+    // QRBitBuffer
+    //---------------------------------------------------------------------
+    function QRBitBuffer() {
+        this.buffer = new Array();
+        this.length = 0;
+    }
+    QRBitBuffer.prototype = {
+        get: function (index) {
+            var bufIndex = Math.floor(index / 8);
+            return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1);
+        },
+        put: function (num, length) {
+            for (var i = 0; i < length; i++) {
+                this.putBit(((num >>> (length - i - 1)) & 1));
+            }
+        },
+        putBit: function (bit) {
+            var bufIndex = Math.floor(this.length / 8);
+            if (this.buffer.length <= bufIndex) {
+                this.buffer.push(0);
+            }
+            if (bit) {
+                this.buffer[bufIndex] |= (0x80 >>> (this.length % 8));
+            }
+            this.length++;
+        }
+    };
+
+
+
+    // xzedit
+    let qrcodeAlgObjCache = [];
+    /**
+     * 二维码构造函数,主要用于绘制
+     * @param  {参数列表} opt 传递参数
+     * @return {}
+     */
+    QRCode = function (opt) {
+        //设置默认参数
+        this.options = {
+            text: '',
+            size: 256,
+            correctLevel: 3,
+            background: '#ffffff',
+            foreground: '#000000',
+            pdground: '#000000',
+            image: '',
+            imageSize: 30,
+            canvasId: opt.canvasId,
+            context: opt.context,
+            usingComponents: opt.usingComponents,
+            showLoading: opt.showLoading,
+            loadingText: opt.loadingText,
+        };
+        if (typeof opt === 'string') { // 只编码ASCII字符串
+            opt = {
+                text: opt
+            };
+        }
+        if (opt) {
+            for (var i in opt) {
+                this.options[i] = opt[i];
+            }
+        }
+        //使用QRCodeAlg创建二维码结构
+        var qrCodeAlg = null;
+        for (var i = 0, l = qrcodeAlgObjCache.length; i < l; i++) {
+            if (qrcodeAlgObjCache[i].text == this.options.text && qrcodeAlgObjCache[i].text.correctLevel == this.options.correctLevel) {
+                qrCodeAlg = qrcodeAlgObjCache[i].obj;
+                break;
+            }
+        }
+        if (i == l) {
+            qrCodeAlg = new QRCodeAlg(this.options.text, this.options.correctLevel);
+            qrcodeAlgObjCache.push({
+                text: this.options.text,
+                correctLevel: this.options.correctLevel,
+                obj: qrCodeAlg
+            });
+        }
+        /**
+         * 计算矩阵点的前景色
+         * @param {Obj} config
+         * @param {Number} config.row 点x坐标
+         * @param {Number} config.col 点y坐标
+         * @param {Number} config.count 矩阵大小
+         * @param {Number} config.options 组件的options
+         * @return {String}
+         */
+        let getForeGround = function (config) {
+            var options = config.options;
+            if (options.pdground && (
+                (config.row > 1 && config.row < 5 && config.col > 1 && config.col < 5) ||
+                (config.row > (config.count - 6) && config.row < (config.count - 2) && config.col > 1 && config.col < 5) ||
+                (config.row > 1 && config.row < 5 && config.col > (config.count - 6) && config.col < (config.count - 2))
+            )) {
+                return options.pdground;
+            }
+            return options.foreground;
+        }
+        // 创建canvas
+        let createCanvas = function (options) {
+            if (options.showLoading) {
+                uni.showLoading({
+                    title: options.loadingText,
+                    mask: true
+                });
+            }
+            var ctx = uni.createCanvasContext(options.canvasId, options.context);
+            var count = qrCodeAlg.getModuleCount();
+            var ratioSize = options.size;
+            var ratioImgSize = options.imageSize;
+            //计算每个点的长宽
+            var tileW = (ratioSize / count).toPrecision(4);
+            var tileH = (ratioSize / count).toPrecision(4);
+            //绘制
+            for (var row = 0; row < count; row++) {
+                for (var col = 0; col < count; col++) {
+                    var w = (Math.ceil((col + 1) * tileW) - Math.floor(col * tileW));
+                    var h = (Math.ceil((row + 1) * tileW) - Math.floor(row * tileW));
+                    var foreground = getForeGround({
+                        row: row,
+                        col: col,
+                        count: count,
+                        options: options
+                    });
+                    ctx.setFillStyle(qrCodeAlg.modules[row][col] ? foreground : options.background);
+                    ctx.fillRect(Math.round(col * tileW), Math.round(row * tileH), w, h);
+                }
+            }
+            if (options.image) {
+                var x = Number(((ratioSize - ratioImgSize) / 2).toFixed(2));
+                var y = Number(((ratioSize - ratioImgSize) / 2).toFixed(2));
+                drawRoundedRect(ctx, x, y, ratioImgSize, ratioImgSize, 2, 6, true, true)
+                ctx.drawImage(options.image, x, y, ratioImgSize, ratioImgSize);
+                // 画圆角矩形
+                function drawRoundedRect(ctxi, x, y, width, height, r, lineWidth, fill, stroke) {
+                    ctxi.setLineWidth(lineWidth);
+                    ctxi.setFillStyle(options.background);
+                    ctxi.setStrokeStyle(options.background);
+                    ctxi.beginPath(); // draw top and top right corner 
+                    ctxi.moveTo(x + r, y);
+                    ctxi.arcTo(x + width, y, x + width, y + r, r); // draw right side and bottom right corner 
+                    ctxi.arcTo(x + width, y + height, x + width - r, y + height, r); // draw bottom and bottom left corner 
+                    ctxi.arcTo(x, y + height, x, y + height - r, r); // draw left and top left corner 
+                    ctxi.arcTo(x, y, x + r, y, r);
+                    ctxi.closePath();
+                    if (fill) {
+                        ctxi.fill();
+                    }
+                    if (stroke) {
+                        ctxi.stroke();
+                    }
+                }
+            }
+            setTimeout(() => {
+                ctx.draw(true, () => {
+                    // 保存到临时区域
+                    setTimeout(() => {
+                        uni.canvasToTempFilePath({
+                            width: options.width,
+                            height: options.height,
+                            destWidth: options.width,
+                            destHeight: options.height,
+                            canvasId: options.canvasId,
+                            quality: Number(1),
+                            success: function (res) {
+                                if (options.cbResult) {
+                                    options.cbResult(res.tempFilePath)
+                                }
+                            },
+                            fail: function (res) {
+                                if (options.cbResult) {
+                                    options.cbResult(res)
+                                }
+                            },
+                            complete: function () {
+                                if (options.showLoading){
+                                    uni.hideLoading();
+                                }
+                            },
+                        }, options.context);
+                    }, options.text.length + 100);
+                });
+            }, options.usingComponents ? 0 : 150);
+        }
+        createCanvas(this.options);
+        // 空判定
+        let empty = function (v) {
+            let tp = typeof v,
+                rt = false;
+            if (tp == "number" && String(v) == "") {
+                rt = true
+            } else if (tp == "undefined") {
+                rt = true
+            } else if (tp == "object") {
+                if (JSON.stringify(v) == "{}" || JSON.stringify(v) == "[]" || v == null) rt = true
+            } else if (tp == "string") {
+                if (v == "" || v == "undefined" || v == "null" || v == "{}" || v == "[]") rt = true
+            } else if (tp == "function") {
+                rt = false
+            }
+            return rt
+        }
+    };
+    QRCode.prototype.clear = function (fn) {
+        var ctx = uni.createCanvasContext(this.options.canvasId, this.options.context)
+        ctx.clearRect(0, 0, this.options.size, this.options.size)
+        ctx.draw(false, () => {
+            if (fn) {
+                fn()
+            }
+        })
+    };
+})()
+
+export default QRCode

+ 210 - 0
components/tki-qrcode/tki-qrcode.vue

@@ -0,0 +1,210 @@
+<template xlang="wxml" minapp="mpvue">
+	<view class="tki-qrcode">
+		<!-- #ifndef MP-ALIPAY -->
+		<canvas class="tki-qrcode-canvas" :canvas-id="cid" :style="{width:cpSize+'px',height:cpSize+'px'}" />
+		<!-- #endif -->
+		<!-- #ifdef MP-ALIPAY -->
+		<canvas :id="cid" :width="cpSize" :height="cpSize" class="tki-qrcode-canvas" />
+		<!-- #endif -->
+		<image v-show="show" :src="result" :style="{width:cpSize+'px',height:cpSize+'px'}" />
+	</view>
+</template>
+
+<script>
+import QRCode from "./qrcode.js"
+let qrcode
+export default {
+	name: "tki-qrcode",
+	props: {
+		cid: {
+			type: String,
+			default: 'tki-qrcode-canvas'
+		},
+		size: {
+			type: Number,
+			default: 200
+		},
+		unit: {
+			type: String,
+			default: 'upx'
+		},
+		show: {
+			type: Boolean,
+			default: true
+		},
+		val: {
+			type: String,
+			default: ''
+		},
+		background: {
+			type: String,
+			default: '#ffffff'
+		},
+		foreground: {
+			type: String,
+			default: '#000000'
+		},
+		pdground: {
+			type: String,
+			default: '#000000'
+		},
+		icon: {
+			type: String,
+			default: ''
+		},
+		iconSize: {
+			type: Number,
+			default: 40
+		},
+		lv: {
+			type: Number,
+			default: 3
+		},
+		onval: {
+			type: Boolean,
+			default: false
+		},
+		loadMake: {
+			type: Boolean,
+			default: false
+		},
+		usingComponents: {
+			type: Boolean,
+			default: true
+		},
+		showLoading: {
+			type: Boolean,
+			default: true
+		},
+		loadingText: {
+			type: String,
+			default: '二维码生成中'
+		},
+	},
+	data() {
+		return {
+			result: '',
+		}
+	},
+	methods: {
+		_makeCode() {
+			let that = this
+			if (!this._empty(this.val)) {
+				qrcode = new QRCode({
+					context: that, // 上下文环境
+					canvasId:that.cid, // canvas-id
+					usingComponents: that.usingComponents, // 是否是自定义组件
+					showLoading: that.showLoading, // 是否显示loading
+					loadingText: that.loadingText, // loading文字
+					text: that.val, // 生成内容
+					size: that.cpSize, // 二维码大小
+					background: that.background, // 背景色
+					foreground: that.foreground, // 前景色
+					pdground: that.pdground, // 定位角点颜色
+					correctLevel: that.lv, // 容错级别
+					image: that.icon, // 二维码图标
+					imageSize: that.iconSize,// 二维码图标大小
+					cbResult: function (res) { // 生成二维码的回调
+						that._result(res)
+					},
+				});
+			} else {
+				uni.showToast({
+					title: '二维码内容不能为空',
+					icon: 'none',
+					duration: 2000
+				});
+			}
+		},
+		_clearCode() {
+			this._result('')
+			qrcode.clear()
+		},
+		_saveCode() {
+			let that = this;
+			if (this.result != "") {
+				uni.saveImageToPhotosAlbum({
+					filePath: that.result,
+					success: function () {
+						uni.showToast({
+							title: '二维码保存成功',
+							icon: 'success',
+							duration: 2000
+						});
+					}
+				});
+			}
+		},
+		_result(res) {
+			this.result = res;
+			this.$emit('result', res)
+		},
+		_empty(v) {
+			let tp = typeof v,
+				rt = false;
+			if (tp == "number" && String(v) == "") {
+				rt = true
+			} else if (tp == "undefined") {
+				rt = true
+			} else if (tp == "object") {
+				if (JSON.stringify(v) == "{}" || JSON.stringify(v) == "[]" || v == null) rt = true
+			} else if (tp == "string") {
+				if (v == "" || v == "undefined" || v == "null" || v == "{}" || v == "[]") rt = true
+			} else if (tp == "function") {
+				rt = false
+			}
+			return rt
+		}
+	},
+	watch: {
+		size: function (n, o) {
+			if (n != o && !this._empty(n)) {
+				this.cSize = n
+				if (!this._empty(this.val)) {
+					setTimeout(() => {
+						this._makeCode()
+					}, 100);
+				}
+			}
+		},
+		val: function (n, o) {
+			if (this.onval) {
+				if (n != o && !this._empty(n)) {
+					setTimeout(() => {
+						this._makeCode()
+					}, 0);
+				}
+			}
+		}
+	},
+	computed: {
+		cpSize() {
+			if(this.unit == "upx"){
+				return uni.upx2px(this.size)
+			}else{
+				return this.size
+			}
+		}
+	},
+	mounted: function () {
+		if (this.loadMake) {
+			if (!this._empty(this.val)) {
+				setTimeout(() => {
+					this._makeCode()
+				}, 0);
+			}
+		}
+	},
+}
+</script>
+<style>
+.tki-qrcode {
+  position: relative;
+}
+.tki-qrcode-canvas {
+  position: fixed;
+  top: -99999upx;
+  left: -99999upx;
+  z-index: -99999;
+}
+</style>

+ 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>

+ 196 - 0
components/uni-number-box.vue

@@ -0,0 +1,196 @@
+<template>
+	<view class="uni-numbox">
+		<view class="uni-numbox-minus" 
+			@click="_calcValue('subtract')"
+		>
+			<text class="iconfont iconmove" :class="minDisabled?'uni-numbox-disabled': ''" ></text>
+		</view>
+		<input 
+			class="uni-numbox-value" 
+			type="number"  
+			:disabled="disabled"
+			:value="inputValue" 
+			@blur="_onBlur"
+		>
+		<view 
+			class="uni-numbox-plus" 
+			@click="_calcValue('add')"
+		>
+			<text class="iconfont iconadd" :class="maxDisabled?'uni-numbox-disabled': ''" ></text>
+		</view>
+	</view>
+</template>
+<script>
+	export default {
+		name: 'uni-number-box',
+		props: {
+			isMax: {
+				type: Boolean,
+				default: false
+			},
+			isMin: {
+				type: Boolean,
+				default: false
+			},
+			index: {
+				type: Number,
+				default: 0
+			},
+			value: {
+				type: Number,
+				default: 0
+			},
+			min: {
+				type: Number,
+				default: 1
+			},
+			max: {
+				type: Number,
+				default: Infinity
+			},
+			step: {
+				type: Number,
+				default: 1
+			},
+			disabled: {
+				type: Boolean,
+				default: false
+			}
+		},
+		data() {
+			return {
+				inputValue: this.value,
+				minDisabled: false,
+				maxDisabled: false
+			}
+		},
+		created(){
+			this.maxDisabled = this.isMax;
+			this.minDisabled = this.isMin;
+		},
+		computed: {
+
+		},
+		watch: {
+			inputValue(number) {
+				const data = {
+					number: number,
+					index: this.index
+				}
+				this.$emit('eventChange', data);
+			}
+		},
+		methods: {
+			_calcValue(type) {
+				const scale = this._getDecimalScale();
+				let value = this.inputValue * scale;
+				let newValue = 0;
+				let step = this.step * scale;
+				
+				if(type === 'subtract'){
+					newValue = value - step;
+					if (newValue <= this.min){
+						this.minDisabled = true;
+					}
+					if(newValue < this.min){
+						newValue = this.min
+					}
+					if(newValue < this.max && this.maxDisabled === true){
+						this.maxDisabled = false;
+					}
+				}else if(type === 'add'){
+					newValue = value + step;
+					if (newValue >= this.max){
+						this.maxDisabled = true;
+					}
+					if(newValue > this.max){
+						newValue = this.max
+					}
+					if(newValue > this.min && this.minDisabled === true){
+						this.minDisabled = false;
+					}
+				}
+				if(newValue === value){
+					return;
+				}
+				this.inputValue = newValue / scale;
+			},
+			_getDecimalScale() {
+				let scale = 1;
+				// 浮点型
+				if (~~this.step !== this.step) {
+					scale = Math.pow(10, (this.step + '').split('.')[1].length);
+				}
+				return scale;
+			},
+			_onBlur(event) {
+				let value = event.detail.value;
+				if (!value) {
+					this.inputValue = 0;
+					return
+				}
+				value = +value;
+				if (value > this.max) {
+					value = this.max;
+				} else if (value < this.min) {
+					value = this.min
+				}
+
+				this.inputValue = value
+			}
+		}
+	}
+</script>
+<style>
+	.uni-numbox {
+		/* position:absolute; */
+		/* left: 30rpx; */
+		/* bottom: 0; */
+		display: flex;
+		justify-content: flex-start;
+		align-items: center;
+	}
+
+	.uni-numbox-minus,
+	.uni-numbox-plus {
+		margin: 0;
+		background-color: #f5f5f5;
+		width: 70rpx;
+		height: 100%;
+		line-height: 70rpx;
+		text-align: center;
+		position: relative;
+	}
+	.uni-numbox-minus .yticon,
+	.uni-numbox-plus .yticon{
+		font-size: 36rpx;
+		color: #555;
+	}
+
+	.uni-numbox-minus {
+		border-right: none;
+		border-top-left-radius: 6rpx;
+		border-bottom-left-radius: 6rpx;
+	}
+
+	.uni-numbox-plus {
+		border-left: none;
+		border-top-right-radius: 6rpx;
+		border-bottom-right-radius: 6rpx;
+	}
+
+	.uni-numbox-value {
+		position: relative;
+		width: 91rpx;
+		height: 51rpx;
+		text-align: center;
+		color: #FFFFFF;
+		font-size: 33rpx;
+		background-color: #5771DF;
+		margin: 0rpx 10rpx;
+	}
+
+	.uni-numbox-disabled.iconfont {
+		color: #d6d6d6;
+	}
+</style>

File diff suppressed because it is too large
+ 8 - 0
hybrid/html/cropper/cropper.min.css


File diff suppressed because it is too large
+ 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;
+}

File diff suppressed because it is too large
+ 0 - 0
hybrid/html/cropper/uni.webview.1.5.2.js


+ 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;

+ 31 - 19
manifest.json

@@ -1,9 +1,9 @@
 {
-    "name" : "基础项目",
-    "appid" : "__UNI__F0EBD91",
+    "name" : "Lala NFT",
+    "appid" : "__UNI__3CDE968",
     "description" : "",
-    "versionName" : "1.0.0",
-    "versionCode" : "100",
+    "versionName" : "1.1.9",
+    "versionCode" : 119,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */
@@ -21,20 +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.CHANGE_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
-                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
                     "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>"
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>"
                 ],
-                "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
+                "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
+                "autoSdkPermissions" : true
             },
             "ios" : {
                 "idfa" : false
@@ -48,15 +40,35 @@
                         "appsecret" : "",
                         "UniversalLinks" : ""
                     }
+                },
+                "ad" : {},
+                "geolocation" : {},
+                "payment" : {},
+                "push" : {},
+                "share" : {},
+                "speech" : {
+                    "ifly" : {}
                 }
             },
             "splashscreen" : {
                 "androidStyle" : "default",
                 "iosStyle" : "common",
                 "android" : {
-                    "hdpi" : "unpackage/pz/启动图/qd480x762.png",
-                    "xhdpi" : "unpackage/pz/启动图/qd720x1242.png",
-                    "xxhdpi" : "unpackage/pz/启动图/qd1080x1882.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" : {
+                        "portrait-896h@3x" : "unpackage/pz/启动图/qd1242x2688.png",
+                        "portrait-896h@2x" : "unpackage/pz/启动图/qd828x1792.png",
+                        "iphonex" : "unpackage/pz/启动图/qd1125x2436.png",
+                        "retina55" : "unpackage/pz/启动图/qd1242x2208.png",
+                        "retina47" : "unpackage/pz/启动图/qd750x1334.png",
+                        "retina40" : "unpackage/pz/启动图/qd640x1136.png",
+                        "retina35" : "unpackage/pz/启动图/qd640x960.png"
+                    },
+                    "storyboard" : "C:/Users/Administrator/Desktop/苹果/LALA.zip"
                 }
             },
             "icons" : {
@@ -114,7 +126,7 @@
         "devServer" : {
             "proxy" : {
                 "/api" : {
-                    "target" : "http://rpg.frp.liuniu946.com/api",
+                    "target" : "http://www.lalanft.net/api",
                     // "changeOrigin": true,
                     "pathRewrite" : {
                         "/api" : "" // rewrite path

+ 121 - 54
pages.json

@@ -5,7 +5,7 @@
 	"pages": [{
 			"path": "pages/index/index",
 			"style": {
-				"enablePullDownRefresh": true,
+				"enablePullDownRefresh": false,
 				// #ifdef MP
 				"navigationStyle": "custom",
 				// #endif
@@ -24,24 +24,96 @@
 				}
 			}
 		},
+		{
+			"path": "pages/user/myNote",
+			"style": {
+				"navigationBarTitleText": "我的节点"
+			}
+		},
+		{
+			"path": "pages/market/myCalculation",
+			"style": {
+				"navigationBarTitleText": "我的矿机"
+			}
+		},
+		{
+			"path": "pages/index/teachList",
+			"style": {
+				"navigationBarTitleText": "新手教程"
+			}
+		},
+		{
+			"path": "pages/index/teachD",
+			"style": {
+				"navigationBarTitleText": "教程详情"
+			}
+		},
+		{
+			"path": "pages/index/info",
+			"style": {
+				"navigationBarTitleText": "汇总数据"
+			}
+		},
 		{
 			"path": "pages/assets/details",
 			"style": {
 				"navigationBarTitleText": "资金流水"
 			}
 		},
+		{
+			"path": "pages/index/nodeList",
+			"style": {
+				"navigationBarTitleText": "通知列表"
+			}
+		},
+		{
+			"path": "pages/user/extensionList",
+			"style": {
+				"navigationBarTitleText": "推广列表"
+			}
+		},
+		{
+			"path": "pages/market/duihuan",
+			"style": {
+				"navigationBarTitleText": "兑换"
+			}
+		},
+		{
+			"path": "pages/market/pay",
+			"style": {
+				"navigationBarTitleText": "运算力租赁"
+			}
+		},
 		{
 			"path": "pages/index/convert",
 			"style": {
 				"navigationBarTitleText": "兑换"
 			}
 		},
+		{
+			"path": "pages/market/details",
+			"style": {
+				"navigationBarTitleText": "云算力详情"
+			}
+		},
+		{
+			"path": "pages/user/rake",
+			"style": {
+				"navigationBarTitleText": "矿机列表"
+			}
+		},
 		{
 			"path": "pages/index/datile",
 			"style": {
 				"navigationBarTitleText": "列表"
 			}
 		},
+		{
+			"path": "pages/user/approve",
+			"style": {
+				"navigationBarTitleText": "实名认证"
+			}
+		},
 		{
 			"path": "pages/public/register",
 			"style": {
@@ -53,6 +125,17 @@
 				}
 			}
 		}, 
+		{
+			"path": "pages/set/cropper",
+			"style": {
+				"navigationBarTitleText": "裁剪",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		}, 
 		{
 			"path": "pages/index/appointment",
 			"style": {
@@ -63,7 +146,19 @@
 					}
 				}
 			}
-		},{
+		},
+		{
+			"path": "pages/index/appointmentD",
+			"style": {
+				"navigationBarTitleText": "自动预约",
+				"app-plus": {
+					"titleNView": {
+						
+					}
+				}
+			}
+		},
+		{
 			"path": "pages/public/login",
 			"style": {
 				"navigationBarTitleText": "登录",
@@ -88,32 +183,31 @@
 		{
 			"path": "pages/money/payment",
 			"style": {
-				"navigationBarTitleText": "支付密码"
+				"navigationBarTitleText": "修改交易密码"
 			}
 		},
 		{
 			"path": "pages/public/forget",
 			"style": {
-				"navigationBarTitleText": "忘记密码",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
+				"navigationBarTitleText": "忘记密码"
+				
 			}
 		},
 		{
-			"path": "pages/set/set",
+			"path": "pages/user/fuli",
 			"style": {
-				"navigationBarTitleText": "设置"
+				"navigationBarTitleText": "拼购福利"
+				
 			}
 		},
 		{
-			"path": "pages/set/address",
+			"path": "pages/user/fulilist",
 			"style": {
-				"navigationBarTitleText": "收货地址"
+				"navigationBarTitleText": "拼购福利"
+				
 			}
 		},
+		
 		{
 			"path": "pages/assets/myPing",
 			"style": {
@@ -151,12 +245,7 @@
 				}
 			}
 		},
-		{
-			"path": "pages/set/addressManage",
-			"style": {
-				"navigationBarTitleText": ""
-			}
-		},
+		
 		{
 			"path": "pages/user/extension",
 			"style": {
@@ -166,12 +255,7 @@
 				}
 			}
 		},
-		{
-			"path": "pages/set/phone",
-			"style": {
-				"navigationBarTitleText": "实名认证"
-			}
-		},
+		
 		{
 			"path": "pages/set/password",
 			"style": {
@@ -205,35 +289,12 @@
 				}
 			}
 		},
-		{
-			"path": "pages/user/withdrawal",
-			"style": {
-				"navigationBarTitleText": "奖励提现"
-			}
-		},
 		{
 			"path": "pages/user/notice",
 			"style": {
 				"navigationBarTitleText": "通知"
 			}
 		},
-		{
-			"path": "pages/user/favorites",
-			"style": {
-				"navigationBarTitleText": "收藏夹"
-			}
-		}, {
-			"path": "pages/user/coupon",
-			"style": {
-				"navigationBarTitleText": "我的卡卷"
-			}
-		},
-		{
-			"path": "pages/user/scoreAccumulate",
-			"style": {
-				"navigationBarTitleText": "积分明细"
-			}
-		},
 		{
 			"path": "pages/market/market",
 			"style": {
@@ -280,6 +341,12 @@
 				"navigationBarTitleText": "提现账号"
 			}
 		},
+		{
+			"path": "pages/index/article",
+			"style": {
+				"navigationBarTitleText": "通知"
+			}
+		},
 		{
 			"path": "pages/money/withdrawal",
 			"style": {
@@ -327,12 +394,12 @@
 				"selectedIconPath": "static/tabBar/tab-home-current.png",
 				"text": "首页"
 			},
-			// {
-			// 	"pagePath": "pages/market/market",
-			// 	"iconPath": "static/tabBar/tab-market.png",
-			// 	"selectedIconPath": "static/tabBar/tab-market-current.png",
-			// 	"text": "市场"
-			// },
+			{
+				"pagePath": "pages/market/market",
+				"iconPath": "static/tabBar/tab-market.png",
+				"selectedIconPath": "static/tabBar/tab-market-current.png",
+				"text": "市场"
+			},
 			{
 				"pagePath": "pages/assets/assets",
 				"iconPath": "static/tabBar/tab-assets.png",

+ 19 - 10
pages/assets/assets.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="container">
+		<view class="status_bar"></view>
 		<view class="title">资产</view>
 		<view>
 			<view class="list-box">
@@ -56,6 +57,10 @@
 						<view class="name">可用</view>
 						<view class="tpl">{{ ls.money.money * 1 }}</view>
 					</view>
+					<view class="cell-tpl tips">
+						<view class="name">冻结中</view>
+						<view class="tpl">{{ ls.lock_money * 1 }}</view>
+					</view>
 					<view class="cell-tpl tip-box">
 						<view class="name">折合(USDT)</view>
 						<view class="tpl clamp">{{ ls.usdt * 1 }}</view>
@@ -151,11 +156,10 @@ export default {
 			});
 		},
 		toDateils(ls) {
-			console.log(ls,'55');
+			console.log(ls, '55');
 			let wayaddress = {};
 			uni.navigateTo({
-				url:
-					'/pages/assets/details?name=' +ls.name
+				url: '/pages/assets/details?name=' + ls.name
 			});
 		}
 	}
@@ -171,6 +175,10 @@ page {
 		padding: 25rpx 40rpx;
 	}
 }
+.status_bar {
+	height: var(--status-bar-height);
+	width: 100%;
+}
 .title {
 	font-size: 46rpx;
 	font-family: PingFang SC;
@@ -275,12 +283,12 @@ page {
 			font-size: 34rpx;
 			font-weight: 500;
 			color: #5771df;
-			.logo{
+			.logo {
 				border-radius: 99rpx;
-				width:50rpx ;
-				height:50rpx ;
+				width: 50rpx;
+				height: 50rpx;
 			}
-			.name{
+			.name {
 				margin-left: 20rpx;
 				color: $font-color-dark;
 				font-weight: bold;
@@ -289,6 +297,7 @@ page {
 	}
 	.cell-list {
 		width: 100%;
+		justify-content: space-between;
 		.cell-tpl {
 			text-align: left;
 			.name {
@@ -300,14 +309,14 @@ page {
 		}
 		.tip-box {
 			text-align: right;
-			width: 40%;
+			// width: 40%;
 		}
 		.tip-tpl {
 			text-align: center;
-			width: 30%;
+			// width: 30%;
 		}
 		.tips {
-			width: 30%;
+			// width: 30%;
 		}
 	}
 }

+ 49 - 44
pages/assets/details.vue

@@ -25,32 +25,17 @@
 					<view class="num clamp" v-if="ls.pm === 0">- {{ ls.number }}</view>
 					<view class="num clamp" v-else>+ {{ ls.number }}</view>
 				</view>
-				<view class="tpl-time">{{ ls.add_time }}</view>
+				<view class="tpl-time" v-if="ls.status == 1">{{ ls.add_time }}</view>
+				<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">充币</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>
-		<!-- <uni-popup ref="popup" type="center">
-			<view class="popup">
-				<view class="cancel flex" @click="close">
-					<view></view>
-					<view class="tip">x</view>
-				</view>
-				<view class="list-boxs">
-					<view class="popup-text">购买数量:</view>
-					<view class="password"><input type="number" v-model="num" placeholder="请输入算力数量" /></view>
-					<view class="popup-text">币种选择:</view>
-					<view class="content" @click="useOutClickSide">
-						<easy-select ref="easySelect" :options="moneyTypeList" :value="moneyData.name" @selectOne="selectOne"></easy-select>
-					</view>
-					<view class="confirm-btn" @click="pay"><text>确认充币</text></view>
-				</view>
-			</view>
-		</uni-popup> -->
 		<uni-popup ref="mation" type="center">
 			<view class="popup">
 				<view class="cancel flex" @click="close2"><view class="tip">x</view></view>
@@ -102,7 +87,8 @@ export default {
 			pm: '',
 			less: '',
 			page: 1,
-			limit: 5,
+			limit: 10,
+			loadType:'loadmore',
 			isLast: true,
 			name: '', //币名称
 			moneyData: {
@@ -114,6 +100,9 @@ export default {
 			}
 		};
 	},
+	onReachBottom(){
+		this.getdata();
+	},
 	onLoad(option) {
 		this.name = option.name;
 		this.moneyType();
@@ -123,10 +112,24 @@ export default {
 	methods: {
 		async loadData() {
 			let obj = this;
+			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
@@ -136,12 +139,20 @@ 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();
 			});
 		},
 		// 所有币种
 		async moneyType() {
+			
 			let obj = this;
 			wallet({}).then(({ data }) => {
 				const dat = data.back[this.name];
@@ -150,27 +161,14 @@ 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)
 			});
 		},
-		// pay() {
-		// 	let obj = this;
-		// 	recharge(
-		// 		{
-		// 			num: obj.num,
-		// 			money_type: obj.moneyData.code
-		// 		},
-		// 		obj.name
-		// 	)
-		// 		.then(({ data }) => {
-		// 			obj.$api.msg(data.msg);
-		// 			obj.$refs.popup.close();
-		// 			obj.num = '';
-		// 			obj.moneyData.code = '';
-		// 		})
-		// 		.catch(e => {
-		// 			obj.$refs.popup.close();
-		// 		});
-		// },
 		selectOne(options) {
 			this.name = options.name;
 			this.moneyData.code = options.code;
@@ -193,7 +191,14 @@ export default {
 		handleCancel(e) {},
 		// 充币按钮跳转页面
 		recharge() {
-			
+			uni.navigateTo({
+				url:'/pages/assets/recharge'
+			})
+		},
+		withdraw() {
+			uni.navigateTo({
+				url:'/pages/assets/withdraw?name=' + this.name
+			})
 		},
 		close() {
 			this.$refs.popup.close();
@@ -338,7 +343,7 @@ page {
 	bottom: 0;
 	left: 0;
 	width: 100%;
-	background-color: #5771df;
+	background: linear-gradient(90deg, #60BAB0, #45969B);
 	color: #ffffff;
 	text-align: center;
 	.submit {

+ 18 - 10
pages/assets/myPing.vue

@@ -8,7 +8,7 @@
 			</view> -->
 			<view class="info" v-for="ls in listType">
 				<view class="info-num">{{ ls.num || '0.00' }}</view>
-				<view class="info-font">昨日{{ ls.name }}分红值</view>
+				<view class="info-font">奖金池</view>
 			</view>
 			<!-- <view class="info">
 				<view class="info-num">{{honor || '0.00' }}</view>
@@ -35,14 +35,14 @@
 					<view class="log"><image src="../../static/img/pgTip.png" mode="scaleToFill"></image></view>
 					<view class="name clamp">{{ item.name }}</view>
 					<view class="lun">
-						<text>{{ item.lun }}</text>
-						<text v-if="item.status == 0">未开始</text>
+						<text>{{ item.lun }}{{ item.table }}</text>
+						<text v-if="item.status == 0">待开团</text>
 						<text v-if="item.status == 1">已拼中</text>
 						<text v-if="item.status == 2">未拼中</text>
 						<text v-if="item.status == 3">已失败</text>
 					</view>
 				</view>
-				<view class="more">详情</view>
+				<view class="more" v-if="item.status != 0">详情</view>
 			</view>
 			<view class="main">
 				<view class="main-info">
@@ -68,8 +68,8 @@ import { pinkLog, systemWallet } from '@/api/finance.js';
 export default {
 	data() {
 		return {
-			// happy: '0.00',
-			// luck: '0.00',
+			happy: '0.00',
+			luck: '0.00',
 			// honor: '0.00',
 			// usdt: '0.00',
 			// fil: '0.00',
@@ -120,11 +120,14 @@ export default {
 			})
 				.then(e => {
 					const data = e.data.list.map(ls => {
-						const lun = ls.group_num > 0 ? ls.group_num + '轮' : '';
+						const lun = ls.group_num > 0 ? '第'+ ls.group_num + '轮' : '';
+						console.log(ls.table)
+						const table = ls.table_id > 0 ? '第'+ ls.table_id + '桌' : '';
 						const time = new Date(ls.pay_time * 1000);
 						return {
 							name: ls.activity.name,
 							lun,
+							table,
 							fen: 1,
 							money: +ls.cost,
 							type: ls.cost_money_type,
@@ -135,6 +138,7 @@ export default {
 						};
 					});
 					that.list.push(...data);
+					console.log(that.list,"xiangqing")
 					// 判断是否还有数据
 					if (that.list.length >= that.limit) {
 						that.page++;
@@ -148,9 +152,13 @@ export default {
 				});
 		},
 		nav(e) {
-			uni.navigateTo({
-				url: '/pages/assets/teamDetails?id=' + e.id
-			});
+			if(e.status == 0){
+				
+			}else {
+				uni.navigateTo({
+					url: '/pages/assets/teamDetails?id=' + e.id
+				});
+			}
 		}
 	}
 };

+ 99 - 57
pages/assets/recharge.vue

@@ -3,101 +3,143 @@
 		<view class="top">
 			<view class="title flex">
 				<view class="xian"></view>
-				<view class="title-font">
-					充币二维码TRC20
-				</view>
+				<view class="title-font">充币二维码TRC20</view>
 			</view>
 			<view class="erweima-box">
-				<view class="erweima-font">
-					请转入USDT
-				</view>
+				<view class="erweima-font">请转入USDT</view>
 				<view class="erweima">
-					<image :src="image" mode="scaleToFill"></image>
+					<tki-qrcode
+						:cid="cid"
+						ref="qrcode"
+						:val="num"
+						:size="size"
+						:unit="unit"
+						:background="background"
+						:foreground="foreground"
+						:pdground="pdground"
+						:iconSize="iconSize"
+						:lv="lv"
+						:onval="onval"
+						:loadMake="loadMake"
+						:usingComponents="usingComponents"
+						@result="qrR"
+					/>
 				</view>
+				
 			</view>
-			<view class="btn" @click="domFile">
-				保存二维码
-			</view>
+			<view class="btn" @click="domFile">保存二维码</view>
 		</view>
 		<view class="top">
 			<view class="title flex">
 				<view class="xian"></view>
-				<view class="title-font">
-					充币地址
-				</view>
-			</view>
-			<view class="address">
-				{{num}}
-			</view>
-			<view class="btn" style="margin-top: 50rpx;" @click="setData">
-				复制充币地址
+				<view class="title-font">充币地址</view>
 			</view>
+			<view class="address">{{ num }}</view>
+			<view class="btn" style="margin-top: 50rpx;" @click="setData">复制充币地址</view>
 		</view>
 		<view class="top info">
-			请勿向上述地址充值人任何非USDT资产,否则资产将不可追回。<br>
-			USDT冲币仅支持ERC2.0以太坊上的资产,其他USDT将无法上帐,请您谅解。<br>
-			您充值至上述地址后,需要整个网络节点确认,1次网络确认后到账,2次网络确认后即可提币。<br>
-			最小充值金额:100USDT,小于最小金额的充值将不会上帐且无法退回。<br>
+			请勿向上述地址充值人任何非USDT资产,否则资产将不可追回。
+			<br />
+			USDT冲币仅支持TRC2.0以太坊上的资产,其他USDT将无法上帐,请您谅解。
+			<br />
+			您充值至上述地址后,需要整个网络节点确认,1次网络确认后到账,2次网络确认后即可提币。
+			<br />
+			最小充值金额:100USDT,小于最小金额的充值将不会上帐且无法退回。
+			<br />
 			请通过IMTOKEN充值,充值时在备注栏填写 个人的用户ID,如果用户ID错误,将导致您无法入账,请注意确认。
 		</view>
 	</view>
 </template>
 
 <script>
+import { wallet } from '@/api/finance.js';
+import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue';
 export default {
 	data() {
 		return {
-				num:"TEn1gLWumRj1FfjQ927vSoQrUCqKhuiWV2",
-				image:'../../static/re/re1.png'
-		}
+			num: '',
+			image: '../../static/re/re1.png',
+			cid: 'cid',
+			size: 150,
+			unit: '150',
+			background: '#FFFFFF',
+			foreground: '#000000',
+			pdground: '#000000',
+			icon: '',
+			iconSize: 40,
+			lv: 3,
+			onval: true,
+			loadMake: true,
+			usingComponents: true,
+		};
+	},
+	onLoad() {
+		this.loadData();
 	},
-	methods:{
-		domFile(){
+	methods: {
+		async loadData() {
+			wallet().then(({ data }) => {
+				console.log(data);
+				const arr = Object.keys(data.back);
+				console.log(arr);
+				let ar = [];
+				arr.forEach(e => {
+					console.log(e)
+					ar.push(data.back[e]);
+				});
+				console.log(ar)
+				this.num = ar[0].money.address
+			});
+		},
+		domFile() {
 			uni.downloadFile({
-				url:this.image,
-				success:(e) => {
+				url: this.image,
+				success: e => {
 					console.log(e);
 					uni.showToast({
-						title:'下载成功!'
-					})
+						title: '下载成功!'
+					});
 				},
 				fail(e) {
 					uni.showToast({
-						title:'复制失败',
-						icon:false
-					})
+						title: '复制失败',
+						icon: false
+					});
 					console.log(e);
 				}
-			})
+			});
 		},
-		setData(){
+		qrR(res) {
+			this.src = res;
+		},
+		setData() {
 			// #ifdef APP-PLUS
 			uni.setClipboardData({
-				data:this.num,
-				success: (e) => {
+				data: this.num,
+				success: e => {
 					uni.showToast({
-						title:'复制成功!',
-					})
+						title: '复制成功!'
+					});
 				},
 				fail(e) {
 					uni.showToast({
-						title:'复制失败',
-						icon:false
-					})
+						title: '复制失败',
+						icon: false
+					});
 					console.log(e);
 				}
-			})
+			});
 			// #endif
-			
 		}
 	}
-}
+};
 </script>
 
 <style lang="scss">
-.center,page {
+.center,
+page {
 	height: 100%;
-	background: #F3F3F3;
+	background: #f3f3f3;
 }
 .top:first-child {
 	margin-top: 0;
@@ -106,10 +148,10 @@ export default {
 	margin-top: 20rpx;
 	width: 100%;
 	height: auto;
-	background: #FFFFFF;
+	background: #ffffff;
 	padding: 26rpx 30rpx 50rpx;
 	.erweima-box {
-		margin-top: 77rpx ;
+		margin-top: 77rpx;
 		.erweima-font {
 			text-align: center;
 			font-size: 30rpx;
@@ -119,8 +161,8 @@ export default {
 		}
 		.erweima {
 			margin: 16rpx auto 0;
-			width: 188rpx;
-			height: 188rpx;
+			width: 300rpx;
+			height: 300rpx;
 			image {
 				width: 100%;
 				height: 100%;
@@ -138,7 +180,7 @@ export default {
 	.xian {
 		width: 2rpx;
 		height: 30rpx;
-		background: linear-gradient(90deg, #F95B2F, #60BAB0, #45969B);
+		background: linear-gradient(90deg, #f95b2f, #60bab0, #45969b);
 	}
 	.title-font {
 		padding-left: 16rpx;
@@ -148,18 +190,18 @@ export default {
 		color: #333333;
 	}
 }
-.btn{
+.btn {
 	margin: 36rpx auto 0;
 	width: 500rpx;
 	height: 60rpx;
-	background: linear-gradient(90deg, #60BAB0, #60BAB0, #45969B);
+	background: linear-gradient(90deg, #60bab0, #60bab0, #45969b);
 	border-radius: 30px;
 	line-height: 60rpx;
 	text-align: center;
 	font-size: 26rpx;
 	font-family: PingFang SC;
 	font-weight: 500;
-	color: #FFFFFF;
+	color: #ffffff;
 }
 .info {
 	font-size: 24rpx;

+ 19 - 11
pages/assets/teamDetails.vue

@@ -14,7 +14,7 @@
 				<view class="main-info rule">每轮限购1组,每组限购1份</view>
 				<view class="main-info time">
 					开奖时间:
-					<text>{{item.stopTime}}</text>
+					<text>{{item.time}}</text>
 				</view>
 				<view class="main-info new">该轮预约{{item.bingos+item.fails}}份,拼中{{item.bingos}}份,退回{{item.fails}}份</view>
 			</view>
@@ -34,7 +34,7 @@
 						<view class="yu-font">回退本金</view>
 						<view class="yu-num">{{item.cost+item.type}}</view>
 					</view>
-					<view class="info">
+					<view class="info" v-if="item.status != 3">
 						<view class="yu-font">收益</view>
 						<view class="yu-num">{{item.join_award+item.type}}</view>
 					</view>
@@ -46,20 +46,21 @@
 					</view>
 				</view>
 			</view>
-			<view class="boom">
+			<!-- <view class="boom">
 				<view class="boom-font">当前组爆快</view>
-				<!-- <view class="boom-num">
+				<view class="boom-num">
 					LALA122002552000
 					<br />
 					LALA122002552000
-				</view> -->
-			</view>
+				</view>
+			</view> -->
 		</view>
 	</view>
 </template>
 
 <script>
 import { pinkLogDate } from '@/api/finance.js';
+import { getTime } from '@/utils/rocessor.js';
 export default {
 	data() {
 		return {
@@ -73,24 +74,29 @@ export default {
 	},
 	methods: {
 		getDate() {
+			uni.showLoading({
+				title: '加载中'
+			});
 			pinkLogDate({}, this.id)
 				.then(e => {
+					console.log(e)
 					const ls = e.data;
 					const lun = ls.group_num > 0 ? ls.group_num + '轮' : '';
-					const time = new Date(ls.pay_time * 1000);
+					const time = getTime(ls.open_time);
 					let sy = ls.join_award*ls.cost/100+'';
 					const num = sy.split('.')[1]
+					console.log(sy,"1111111111")
 					// 判断小数点是否超过8位数标
-					if(num&&num.length>8){
-						sy = (+sy).toFixed(8);
-					}
+					// if(num&&num.length>8){
+					// 	sy = (+sy).toFixed(8);
+					// }
 					this.item = {
 						name: ls.activity.name,
 						lun,
 						fen: 1,
 						money: +ls.cost,
 						type: ls.cost_money_type,
-						time: time.getFullYear() + '-' + (time.getMonth() + 1) + '-' + time.getDate(),
+						time: time,
 						stopTime:'',
 						image: ls.activity.background_image,
 						id: ls.id,
@@ -104,6 +110,8 @@ export default {
 						join_award:+sy,
 						order_id:ls.order_id
 					};
+					console.log(this.item)
+					uni.hideLoading();
 				})
 				.catch(e => {
 					console.log(e);

+ 15 - 10
pages/assets/transfer.vue

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

+ 70 - 43
pages/assets/withdraw.vue

@@ -1,7 +1,8 @@
 <template>
 	<view class="container">
+		<view class="status_bar"><!-- 这里是状态栏 --></view>
 		<view class="goback-box" @click="toBack"><image class="goback" src="../../static/img/fanhui.png" mode=""></image></view>
-		<view class="header">提币 </view>
+		<view class="header">提币</view>
 
 		<view class="list-box">
 			<view class="img"><image src="../../static/img/zhuanzhang-bg.png" mode=""></image></view>
@@ -30,7 +31,7 @@
 				{{ name }}
 			</view>
 			<view class="submit" @click="cash">确定</view>
-			
+
 			<view class="tpl-box" v-show="showText == true">提币数量在{{ less }}-10000.0个之间,认真核对提币地址;手续费:{{ data.service }}{{ data.service_type }}</view>
 		</view>
 		<view class="curtain" :class="{ ishiden: isHiden }" @touchmove.stop.prevent="moveHandle">
@@ -46,7 +47,7 @@
 	</view>
 </template>
 <script>
-import { cash, cashmoney_type, calculator } from '@/api/finance.js';
+import { cash, cashmoney_type, calculator, wallet } from '@/api/finance.js';
 import selectss from '@/components/select.vue';
 export default {
 	components: {
@@ -72,10 +73,6 @@ export default {
 		console.log(option);
 		if (option.name) {
 			this.name = option.name;
-			this.logo = option.logo;
-			this.code = option.code;
-			this.money = option.money;
-			this.less = option.less;
 		}
 		this.moneyType();
 	},
@@ -89,14 +86,40 @@ export default {
 		// 所有币种
 		async moneyType() {
 			let obj = this;
-			cashmoney_type({}).then(({ data }) => {
-				obj.moneyTypeList = data;
-				if (obj.logo == '') {
+			wallet({}).then(({ data }) => {
+				const arr = Object.keys(data.back);
+				console.log(arr);
+				let ar = [];
+				arr.forEach(e => {
+					ar.push(data.back[e]);
+				});
+
+				obj.moneyTypeList = ar.filter(e => {
+					console.log(e);
+					if (e.can_cash == 1) {
+						return e;
+					} else {
+						return;
+					}
+				});
+				console.log(obj.moneyTypeList);
+				if (obj.name == '') {
 					obj.logo = obj.moneyTypeList[0].LOGO;
 					obj.name = obj.moneyTypeList[0].name;
 					obj.code = obj.moneyTypeList[0].code;
-					obj.money = obj.moneyTypeList[0].wallet.money;
+					obj.money = obj.moneyTypeList[0].money.money;
 					obj.less = obj.moneyTypeList[0].less;
+				} else {
+					for (let i = 0; i < obj.moneyTypeList.length; i++) {
+						if (obj.moneyTypeList[i].name == this.name) {
+							obj.logo = obj.moneyTypeList[i].LOGO;
+							obj.name = obj.moneyTypeList[i].name;
+							obj.code = obj.moneyTypeList[i].code;
+							obj.money = obj.moneyTypeList[i].money.money;
+							obj.less = obj.moneyTypeList[i].less;
+							break;
+						}
+					}
 				}
 			});
 		},
@@ -168,9 +191,9 @@ export default {
 				url: url
 			});
 		},
-		toBack(){
-			uni.navigateBack({
-			    delta: 1
+		toBack() {
+			uni.switchTab({
+				url: '/pages/assets/assets'
 			});
 		}
 	}
@@ -185,7 +208,11 @@ page {
 		width: 100%;
 	}
 }
-
+.status_bar {
+	height: var(--status-bar-height);
+	width: 100%;
+	background: linear-gradient(90deg, #60bab0, #45969b);
+}
 .list-box {
 	padding: 104rpx 30rpx 60rpx;
 	height: 350rpx;
@@ -247,7 +274,7 @@ page {
 	.all {
 		font-size: 30rpx;
 		font-weight: 500;
-		color: #44969D;
+		color: #44969d;
 	}
 	.all-num {
 		font-size: 24rpx;
@@ -255,7 +282,7 @@ page {
 		color: #333333;
 	}
 	.submit {
-		background: linear-gradient(90deg, #60BAB0, #60BAB0, #45969B);
+		background: linear-gradient(90deg, #60bab0, #60bab0, #45969b);
 		margin-top: 165rpx;
 		color: #ffffff;
 		text-align: center;
@@ -324,30 +351,30 @@ page {
 	display: none;
 }
 .goback-box {
-		position: absolute;
-		left: 18rpx;
-		top: 0;
-		height: 80rpx;
-		display: flex;
-		align-items: center;
-	}
-	.goback {
-		z-index: 100;
-		width: 34rpx;
-		height: 34rpx;
-	}
-	.header {
-		color: #FFFFFF;
-		position: absolute;
-		left: 0;
-		top: 0;
-		width: 100%;
-		height: 80rpx;
-		font-size: 32rpx;
-		font-weight: 700;
-		z-index: 99;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-	}
+	position: absolute;
+	left: 18rpx;
+	top: var(--status-bar-height);
+	height: 80rpx;
+	display: flex;
+	align-items: center;
+}
+.goback {
+	z-index: 100;
+	width: 34rpx;
+	height: 34rpx;
+}
+.header {
+	color: #ffffff;
+	position: absolute;
+	left: 0;
+	top: var(--status-bar-height);
+	width: 100%;
+	height: 80rpx;
+	font-size: 32rpx;
+	font-weight: 700;
+	z-index: 99;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+}
 </style>

+ 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>

+ 331 - 0
pages/index/appointmentD.vue

@@ -0,0 +1,331 @@
+<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 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;
+					}
+				}
+				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>

+ 91 - 0
pages/index/article.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>
+

+ 24 - 3
pages/index/convert.vue

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

+ 156 - 211
pages/index/datile.vue

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

+ 348 - 120
pages/index/index.vue

@@ -1,35 +1,67 @@
 <template>
 	<view class="center">
-		<view class="box-title"><image src="../../static/img/index7.png" mode=""></image></view>
+		<view class="status_bar"><!-- 这里是状态栏 --></view>
+		<view class="carousel">
+			<swiper autoplay="true" duration="400" interval="5000" @change="swiperChange" class="bor">
+				<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item"><image :src="item.pic" /></swiper-item>
+			</swiper>
+		</view>
+		<view class="swiper-dot">
+			<template v-for="item in swiperLength">
+				<view class="swiper-dots-item" :key="item" :class="{ action: swiperCurrent + 1 === item }"></view>
+			</template>
+		</view>
+		<!-- 通知栏 -->
+		<view class="tongz flex">
+			<view>
+				<view class="tongz-bg"><image src="../../static/img/tongz-bg.png" mode=""></image></view>
+				<view class="tongz-left flex">
+					<image class="image-left" src="../../static/img/ling.png" mode=""></image>
+					<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">
+			<view class="shopBox" v-for="(item, index) in list" :key="index">
 				<view class="shopBox-top">
 					<view class="left"><image src="../../static/img/index4.png" mode=""></image></view>
 					<view class="between" style="margin-left: -340rpx;">
-						<text id="one">{{item.name}}</text>
-						<text id="two">{{item.lun}}轮</text>
+						<text id="one">{{ item.name }}</text>
+						<text id="two">{{ item.lun }}轮</text>
 					</view>
-					<text id="three">预约中</text>
+					<view 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>
+					</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">
-						<text class="number-left">{{1*item.cost}}</text>
-						<text class="number-right">{{item.cost_money_type}}/份</text>
+						<text class="number-left">{{ 1 * item.cost }}</text>
+						<text class="number-right">{{ item.cost_money_type }}/份</text>
 					</view>
 					<view class="quotient"><text class="quotient-children">每轮限购1组,每组限购一份</text></view>
 				</view>
@@ -37,24 +69,32 @@
 				<view class="shopBox-bottom">
 					<view class="forward">
 						<view class="forward-left"></view>
-						<view class="forward-right">每组分数:&nbsp {{item.join_number}}份</view>
+						<view class="forward-right">每组分数:&nbsp {{ item.join_number }}份</view>
 					</view>
 					<view class="consume">
 						GAS消耗:
-						<text>{{1*item.ticket}}{{item.ticket_money_type}}</text>
+						<text>{{ 1 * item.ticket }}{{ item.ticket_money_type }}</text>
 					</view>
 					<view class="appointmentTime">
-						预约时间:
-						<text>{{ item.start }}-{{ item.end}}</text>
+						预约开始时间:
+						<text>{{ item.start }}</text>
+					</view>
+					<view class="appointmentTime">
+						预约结束时间:
+						<text>{{ item.end }}</text>
 					</view>
 					<view class="lotteryTime">
 						开奖时间:
-						<text>{{item.jiang}}</text>
+						<text>{{ item.childList ? item.childList.next_pink.name : '' }}</text>
 					</view>
 				</view>
 				<view class="btn-box flex">
-					<view class="submit1" @click="lalaDetial(item.id)">查看更多</view>
-					<view class="submit" @click="buy(item)">预购</view>
+					<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>
+					<view v-if="item.type == 2"><view class="submit">未开始</view></view>
 				</view>
 			</view>
 		</view>
@@ -74,11 +114,11 @@
 					</view>
 					<view class="info-box">
 						<view class="info-left">预约金额:</view>
-						<view class="info-right">{{money}}</view>
+						<view class="info-right">{{ money }}</view>
 					</view>
 					<view class="info-box">
-						<view class="info-left">预约手续费:</view>
-						<view class="info-right">{{souxu}}</view>
+						<view class="info-left">预约门票:</view>
+						<view class="info-right">{{ souxu }}</view>
 					</view>
 				</view>
 				<view class="btn" @click="submit()">确定</view>
@@ -94,88 +134,148 @@
 				</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>
-import { lala,lalaDetial,buylala } from '@/api/product.js'
-import {getTime} from '@/utils/rocessor.js'
+import { lala, lalaDetial, buylala } from '@/api/product.js';
+import { getTime } from '@/utils/rocessor.js';
+import { loadIndexs } from '@/api/user.js';
 export default {
 	data() {
 		return {
+			tishi:true,//是否显示教程框
 			show: false, //支付数量
 			show1: false, //支付密码
 			password: '',
 			value: 1,
-			list:[],
-			money:'',//预约金额
-			souxu:'',//预约手续费
-			id:'',//购买产品
-			max:1
+			list: [],
+			money: '', //预约金额
+			souxu: '', //预约手续费
+			id: '', //购买产品
+			max: 1,
+			carouselList: [],
+			swiperLength: 0,
+			swiperCurrent: 0,
+			showList: [],
+			start: '' //平团开始时间
 		};
 	},
 	//页面加载即刻发生
 	onShow() {
+<<<<<<< HEAD
+=======
+		this.tishi = true,
+>>>>>>> 52a7e9ac801e5bdec57490748e56d954e229ebe5
 		this.loadDate();
 	},
 	methods: {
 		async loadDate() {
 			const obj = this;
-			lala(
-			{
-				page:1,
-				limit:10,
-			}).then(({data}) => {
-				obj.list = data.list.data
-				obj.list.forEach((e,index) => {
-					lalaDetial({page:1,limit:1},e.id)
-					.then(les =>{
-						console.log(les)
-						let end = getTime(les.data.next_pink - les.data.close_join*60);
-						let start = getTime(les.data.next_pink - les.data.close_join*60 - 2*60*60);
-						let jiang = getTime(les.data.next_pink);
-						e.end = end;
-						e.start = start;
-						e.jiang = jiang;
-						// les.data.next_pink
-						if('history_list' in les.data){
-							e.lun = 1*les.data.history_list[0].group_num+1
-						}else{
-							e.lun = 1
-						}
-						obj.$set(e,'childList',les.data)
-						// e.childList = les.data
-						console.log(obj.list,"1111111")
-					})
+			uni.showLoading({
+				title: '加载中',
+				// mask: true
+			});
+			loadIndexs({})
+				.then(({ data }) => {
+					console.log(data);
+					obj.carouselList = data.banner;
+					obj.swiperLength = data.banner.length;
+					let arr = data.roll;
+					let ar = [];
+					arr.forEach(e => {
+						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(' ');
+								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');
+						uni.stopPullDownRefresh();
+						uni.hideLoading();
+					});
 				})
-				
-			})
+				.catch(e => {
+					uni.stopPullDownRefresh();
+				});
+		},
+		closetishi() {
+			this.tishi = false
 		},
 		nav(url) {
+			console.log(url);
 			uni.navigateTo({
 				url: url
 			});
 		},
 		buy(item) {
-			this.money = (1*item.cost) + item.cost_money_type;
-			this.souxu = item.ticket+item.ticket_money_type;
+			this.money = 1 * item.cost + item.cost_money_type;
+			this.souxu = 1 * item.ticket + item.ticket_money_type;
 			this.id = item.id;
 			this.show = true;
 		},
 		valChange(e) {
 			console.log(e);
-			if(this.value > 1){
-				e.value = 1
+			if (this.value > 1) {
+				e.value = 1;
 				this.value = 1;
-				console.log(this.value)
-				this.$api.msg("每组限购一份");
+				console.log(this.value);
+				this.$api.msg('每组限购一份');
 			}
-			
 		},
 		submit() {
-			if(this.value == 0){
-				this.$api.msg("预约份数不能为0")
-			}
-			else{
+			if (this.value == 0) {
+				this.$api.msg('预约份数不能为0');
+			} else {
 				this.show = false;
 				this.show1 = true;
 			}
@@ -185,25 +285,42 @@ export default {
 			this.show1 = false;
 		},
 		pswQd() {
-			buylala({
-				trade_psw: this.password
-			},this.id).then(e => {
-				this.password = ''
-				this.show1 = false;
-				obj.$api.msg(data.msg);
-			}).catch(e => {
-				this.password = ''
-				this.show1 = false;
-				console.log(e)
-			})
+			const obj = this;
+			buylala(
+				{
+					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);
+				});
 		},
-		node(){
-			this.$api.msg("敬请期待")
+		node() {
+			this.$api.msg('敬请期待');
 		},
 		lalaDetial(id) {
 			uni.navigateTo({
 				url: '/pages/index/datile?id=' + id
-			})
+			});
+		},
+		//轮播图切换修改背景色
+		swiperChange(e) {
+			const index = e.detail.current;
+			this.swiperCurrent = index;
+			this.titleNViewBackground = this.carouselList[index].background;
+		},
+		goDetails(e) {
+			uni.navigateTo({
+				url: this.showList[e].url
+			});
 		}
 	}
 };
@@ -214,6 +331,90 @@ export default {
 	min-height: 100%;
 	background-color: #ffffff;
 }
+.status_bar {
+	height: var(--status-bar-height);
+	width: 100%;
+}
+.carousel {
+	width: 690rpx;
+	height: 300rpx;
+	border-radius: 10rpx;
+	margin: 26rpx auto 0;
+	.bor {
+		border-radius: 10rpx;
+		.carousel-item {
+			image {
+				width: 100%;
+				height: 100%;
+				border-radius: 10rpx;
+			}
+		}
+	}
+}
+.swiper-dot {
+	position: relative;
+	z-index: 10;
+	margin-top: -40rpx;
+	display: flex;
+	justify-content: center;
+
+	.swiper-dots-item {
+		width: 14rpx;
+		height: 14rpx;
+		background: #aaaaaa;
+		border-radius: 50%;
+		margin: 0 16rpx;
+		// z-index: 999;
+	}
+
+	.action {
+		background-color: #ffffff;
+	}
+}
+.tongz {
+	width: 690rpx;
+	height: 70rpx;
+	margin: 48rpx auto 0;
+	padding: 18rpx 30rpx 18rpx 24rpx;
+	align-items: center;
+	position: relative;
+	.tongz-bg {
+		position: absolute;
+		top: 0;
+		right: 0;
+		left: 0;
+		width: 690rpx;
+		height: 70rpx;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+	.tongz-left {
+		width: 640rpx;
+		.image-left {
+			width: 28rpx;
+			height: 34rpx;
+		}
+		.tongz-font {
+			margin-left: 22rpx;
+			font-size: 28rpx;
+			font-family: Source Han Sans CN;
+			font-weight: 400;
+			color: #0f253a;
+		}
+	}
+	.tongz-right {
+		position: relative;
+		z-index: 11;
+		width: 12rpx;
+		height: 26rpx;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+}
 .box-title {
 	position: relative;
 	z-index: 1;
@@ -234,9 +435,7 @@ export default {
 	height: 100%;
 	position: relative;
 	z-index: 10;
-	margin-top: -40rpx;
-	border-top-left-radius: 40rpx;
-	border-top-right-radius: 40rpx;
+	margin-top: 20rpx;
 	background: #f8fbfe;
 
 	.navBox {
@@ -273,13 +472,12 @@ export default {
 
 	.shopBox {
 		padding: 0 30rpx;
-		margin-top: 45rpx;
 		width: 690rpx;
 		// height: 770rpx;
 		background: #ffffff;
 		box-shadow: 0rpx 0rpx 17rpx 0rpx rgba(0, 0, 0, 0.05);
 		border-radius: 10px;
-		margin: 0 auto;
+		margin: 45rpx auto 0;
 
 		.shopBox-top {
 			margin-top: 26rpx;
@@ -379,13 +577,13 @@ export default {
 		.consume > text,
 		.appointmentTime > text,
 		.lotteryTime > text {
-			font-size: 10rpx;
+			font-size: 24rpx;
 			font-family: PingFang SC;
 			font-weight: 500;
 			color: #000000;
 		}
 		.submit {
-			width:295rpx;
+			width: 280rpx;
 			height: 70rpx;
 			background: linear-gradient(90deg, #60bab0, #45969b);
 			border-radius: 35rpx;
@@ -398,10 +596,10 @@ export default {
 			margin: 40rpx 10rpx;
 		}
 		.submit1 {
-			width:295rpx;
+			width: 280rpx;
 			height: 70rpx;
+			background: #ffffff;
 			border: 1px solid #60bab0;
-			background: #fff;
 			border-radius: 35rpx;
 			font-size: 32rpx;
 			font-family: PingFang SC;
@@ -474,34 +672,64 @@ export default {
 	}
 }
 .psw-wrapper {
-		width: 548rpx;
-		height: 344rpx;
-		background-color: #FFFFFF;
-		.psw-title {
-			width: 100%;
-			font-size: 35rpx;
-			padding: 43rpx 0 49rpx;
-			text-align: center;
-			font-weight: 800;
-		}
-		.psw-ipt {
-			display: block;
-			background-color: #dce3ed;
-			height: 90rpx;
-			width: 464rpx;
-			padding-left: 30rpx;
-			margin: 0 auto;
-			font-size: 80rpx;
-		}
-		.psw-btn text{
-			display: inline-block;
-			text-align: center;
-			width: 50%;
-			padding-top: 29rpx;
-			font-size: 35rpx;
-		}
-		.psw-qd {
-			color:#45969B;
+	width: 548rpx;
+	height: 344rpx;
+	background-color: #ffffff;
+	.psw-title {
+		width: 100%;
+		font-size: 35rpx;
+		padding: 43rpx 0 49rpx;
+		text-align: center;
+		font-weight: 800;
+	}
+	.psw-ipt {
+		display: block;
+		background-color: #dce3ed;
+		height: 90rpx;
+		width: 464rpx;
+		padding-left: 30rpx;
+		margin: 0 auto;
+		font-size: 80rpx;
+	}
+	.psw-btn text {
+		display: inline-block;
+		text-align: center;
+		width: 50%;
+		padding-top: 29rpx;
+		font-size: 35rpx;
+	}
+	.psw-qd {
+		color: #45969b;
+	}
+}
+.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>

+ 433 - 0
pages/index/info.vue

@@ -0,0 +1,433 @@
+<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>{{ hui_zong_shu_ju.liu_tong_liang || '0000' }}</span>
+					</view>
+					<view class="item-font">
+						持币地址数:
+						<span>{{ hui_zong_shu_ju.chi_bi_di_zhi_shu || '0000' }}</span>
+					</view>
+					<view class="item-font">
+						当前质押:
+						<span>{{ hui_zong_shu_ju.dang_qian_zhi_ya_liang || '0' }}</span>
+					</view>
+					<view class="item-font">
+						昨日销毁量:
+						<span>{{ hui_zong_shu_ju.zuo_ri_xiao_hui_liang * 1 || '0000' }}</span>
+					</view>
+				</view>
+				<view class="right">
+					<view class="item-font">
+						当天价格:
+						<span>{{ hui_zong_shu_ju.dang_tian_jia_ge * 1 || '0000' }}</span>
+					</view>
+					<view class="item-font">
+						节点数:
+						<span>{{ hui_zong_shu_ju.jie_dian_shu * 1 || '0000' }}</span>
+					</view>
+					<view class="item-font">
+						合伙人数:
+						<span>{{ hui_zong_shu_ju.he_huo_ren_shu || '0000' }}</span>
+					</view>
+					<view class="item-font">
+						累计销毁量:
+						<span>{{ hui_zong_shu_ju.lei_ji_xiao_hui_liang * 1 || '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">
+						拼团数:
+						<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">
+						门票数:
+						<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>
+		<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">
+						拼团数:
+						<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">
+						门票数:
+						<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>
+		<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="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>
+				<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>
+import { finance } from '@/api/wallet';
+export default {
+	data() {
+		return {
+			list: [
+				{
+					name: '质押挖矿池',
+					num: '3.2亿',
+					bi: '16%',
+					now: ' ',
+					bian: '%',
+					time: ''
+				},
+				{
+					name: '流动性挖矿池',
+					num: '6.4亿',
+					bi: '32%',
+					now: ' ',
+					bian: '%',
+					time: ''
+				},
+				{
+					name: '交易挖矿矿池',
+					num: '3.2亿',
+					bi: '16%',
+					now: ' ',
+					bian: '%',
+					time: ''
+				},
+				{
+					name: '链商挖矿',
+					num: '3.2亿',
+					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">
+.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;
+	}
+}
+.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;
+	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: 160rpx !important;
+		}
+		.two {
+			width: 134rpx !important;
+		}
+		.three {
+			width: 65rpx !important;
+		}
+		.four {
+			height: 70rpx;
+			width: 110rpx !important;
+		}
+		.five {
+			width: 64rpx !important;
+		}
+		.six {
+			width: 170rpx !important;
+		}
+	}
+}
+</style>

+ 218 - 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、每份投资{{list.buy_price*1}}U,有效直推3人<br>
+					2、49份组成一个社区节点<br>
+					3、总节点合伙人1024名,每期49人,分21期招募
+			</view>
+			<view class="quanyi">
+					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>
+					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,207 @@
 	</view>
 </template>
 <script>
+import { getPoint,buyPoint } from '@/api/set.js'
 export default {
 	data() {
 		return {
-			show: false,
+			mun: 1,
+			zuiduo:0,
+			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.zuiduo = this.zuiduo.toFixed(2)
+				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: 1120rpx;
+		margin: 0 auto;
+		width: 460rpx;
+		font-size: 24rpx;
+		line-height: 36rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+		height: 1260rpx;
+	}
+	.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: 420rpx;
+	}
+	.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>

+ 88 - 0
pages/index/nodeList.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
+			}).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>

+ 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>

+ 485 - 0
pages/market/details.vue

@@ -0,0 +1,485 @@
+<template>
+	<view class="container">
+		<!-- 状态栏占位 -->
+		<!-- <view class="status_bar"></view> -->
+		<!-- <view class="topbar-box">
+			<view class="topbar">
+				<view class="topbar-left"><image src="../../static/img/img16.png" mode=""></image></view>
+				<view class="topbar-center"></view>
+				<view class="topbar-right"></view>
+			</view>
+		</view> -->
+		<!-- 自定义导航栏 -->
+		<!-- <uni-nav-bar left-icon="back" class="nav-bar" @clickLeft="back">
+			<view class="topbar-center">
+				<view :class="{ action: current === 0 }" @click="changeCurrent(0)">商品</view>
+				<view :class="{ action: current === 1 }" @click="changeCurrent(1)">参数</view>
+				<view :class="{ action: current === 2 }" @click="changeCurrent(2)">介绍</view>
+			</view>
+		</uni-nav-bar> -->
+		<!-- <view class="list-box"></view> -->
+		<view class="good-img">
+			<image :src="list.logo"></image>
+		</view>
+		<view class="param-box">
+			<view class="param-price">{{ list.cost_money * 1 }}{{ list._cost_money_type }}</view>
+			<view class="param-name">{{ list.name }}</view>
+			<view class="param-list">
+					<view class="list-item">
+						<view class="item-title">使用周期</view>
+						<view class="item-val">{{ list.first_step_time + list.second_step_time }}天 + {{list.third_step_time}}天</view>
+					</view>
+					<view class="list-item">
+						<view class="item-title">电费</view>
+						<view class="item-val">{{list.elect_fee|keept}}元/天</view>
+					</view>
+					<view class="list-item">
+						<view class="item-title">预计日产出</view>
+						<view class="item-val">{{list._day_get | daiding}}</view>
+					</view>
+					<view class="list-item">
+						<view class="item-title">算力</view>
+						<view class="item-val" v-if="list.get_money_type == 'BZZ'">{{+list.step}}节点</view>
+						<view class="item-val" v-else>{{ +list.step}}TB</view>
+					</view>
+					<view class="list-item">
+						<view class="item-title">管理费</view>
+						<view class="item-val">{{ list.service_ratio }}%</view>
+					</view>
+					<view class="list-item">
+						<view class="item-title">上架期</view>
+						<view class="item-val">{{ list.stand_time }}天</view>
+					</view>
+					<view class="list-item">
+						<view class="item-title">宽带费</view>
+						<view class="item-val">{{ list.broadband || 0 }}元/月</view>
+					</view>
+					<view class="list-item">
+						<view class="item-title">IP地址费</view>
+						<view class="item-val">{{ list.ip_address || 0 }}元/月</view>
+					</view>
+					<view class="list-item">
+						<view class="item-title">质押币</view>
+						<view class="item-val">{{ list.pledge || 0 }}个</view>
+					</view>
+			</view>
+		</view>
+		<view class="list">
+			<view class="explain"><rich-text :nodes="list.detail"></rich-text></view>
+		</view>
+		
+		<!-- <view class="list"> -->
+		<!-- <view class="list-title">{{ list.name }}</view>
+			<view class="flex list-item">
+				<view class="item-name">价格</view>
+				<view class="item-tpl">{{ list.cost_money * 1 }}{{ list._cost_money_type }}</view>
+			</view>
+			<view class="flex list-item" v-if="list.stand_money > 0">
+				<view class="item-name">质押FIL数量(用户自行支付)</view>
+				<view class="item-tpl">{{ list.stand_money * 1 }}</view>
+			</view>
+			<view class="flex list-item">
+				<view class="item-name">托管运维费</view>
+				<view class="item-tpl">{{ list.service_ratio }}%</view>
+			</view>
+			<view class="flex list-item">
+				<view class="item-name">上架期</view>
+				<view class="item-tpl">{{ list.stand_time }}天</view>
+			</view> -->
+		<!-- <view class="flex list-item">
+				<view class="item-name">封装期</view>
+				<view class="item-tpl">{{list.first_step_time}}</view>
+			</view> -->
+		<!-- 			<view class="flex list-item">
+				<view class="item-name">合约期</view>
+				<view class="item-tpl">{{ list.first_step_time + list.second_step_time + list.third_step_time }}天</view>
+			</view> -->
+		<!-- <view class="tpl" v-if="list.stand_money > 0">需完成应质押的FIL后,才能开始进入50天封装期</view> -->
+
+		<!-- <view class="list-title">IPFS独享算力包-1T</view> -->
+		<!-- 产品说明 -->
+		<!-- <view class="tips">说明:</view> -->
+
+		<!-- <view class="explain"><rich-text :nodes="list.detail"></rich-text></view> -->
+		<!-- <view class="num-box flex">
+				<view class="num-title">购买数量({{ list.step * 1 }}T)</view>
+				<uni-number-box class="step" :value="num" :disabled="false" @eventChange="numberChange"></uni-number-box>
+			</view>
+			<view class="flex money-box">
+				<view class="money-name">购买总数</view>
+				<view class="money-num">{{ list.step * 1 * num}}T</view>
+			</view>
+			<view class="flex money-box">
+				<view class="money-name">金额</view>
+				<view class="money-num">{{ money * 1 }}{{ list._cost_money_type }}</view>
+			</view>
+			
+			<view class="pay-box">支付方式:{{ list._cost_money_type }}</view>
+			<view class="flex money-box">
+				<view class="money-name">交易密码</view>
+				<view class="money-num"><input class="input-box" type="password" v-model="password" placeholder="请输入交易密码" /></view>
+			</view>
+			<view class="check_box flex_item">
+				<view><radio style="transform: scale(0.75)" @click="Getcheckbox" color="#6786FB" :checked="checked" /></view>
+				<view class="">
+					请阅读并同意
+					<text @click="ToIndex">《矿机租赁协议》</text>
+				</view>
+			</view> -->
+		<!-- </view> -->
+		<view class="submit-box">
+			<view class="submit" @click="buy">{{ type == 3 ? '立即质押' : '立即购买' }}</view>
+		</view>
+	</view>
+</template>
+<script>
+import { miningDateils, buyMining } from '@/api/market.js';
+import uniNumberBox from '@/components/uni-number-box.vue';
+export default {
+	components: {
+		uniNumberBox
+	},
+	data() {
+		return {
+			id: '',
+			type: '',
+			num: 1,
+			step: 0,
+			password: '',
+
+			price: '',
+			list: {},
+			checked: false,
+			current: 0
+		};
+	},
+	filters: {
+		Keept(value) {
+			if(!value) {
+				return '0.00'
+			}
+			value = Math.round(value* 100)/100;
+			return value
+		},
+		daiding(value) {
+			let num = parseFloat(value)
+			if(num === 0){
+				return '待定'
+			}else {
+				return value
+			}
+		}
+	},
+	onLoad(option) {
+		this.id = option.id;
+		this.type = option.type;
+		this.loadData();
+	},
+
+	computed: {
+		money() {
+			return this.num * this.price * this.step;
+		}
+	},
+	onShow() {},
+	methods: {
+		async loadData() {
+			let obj = this;
+			miningDateils({}, obj.id).then(({ data }) => {
+				obj.list = data;
+				// obj.money = obj.list.cost_money;
+				obj.price = obj.list.cost_money;
+				obj.step = obj.list.step;
+				console.log(obj.list);
+			});
+		},
+		//阅读并同意
+		Getcheckbox() {
+			let obj = this;
+			obj.checked = !obj.checked;
+		},
+		ToIndex() {
+			uni.navigateTo({
+				url: '/pages/finance/xieyi'
+			});
+		},
+		pay() {
+			let obj = this;
+			if (obj.password == '') {
+				obj.$api.msg('请输入交易密码!');
+				return;
+			}
+			if (obj.checked == false) {
+				obj.$api.msg('请阅读并同意协议!');
+				return;
+			}
+			buyMining(
+				{
+					num: obj.num * obj.step,
+					trade_psw: obj.password
+				},
+				obj.id
+			)
+				.then(data => {
+					obj.$api.msg(data.msg);
+					obj.password = '';
+					obj.num = 1;
+				})
+				.catch(e => {
+					obj.password = '';
+					obj.num = 1;
+					if (e.msg == '交易密码错误') {
+						return;
+					}
+					console.log(e);
+					var reg = new RegExp('购买矿机所需的');
+					if (e.msg.match(reg) == -1) {
+					} else {
+						setTimeout(function() {
+							uni.navigateTo({
+								url: '/pages/finance/recharge'
+							});
+						}, 1000);
+					}
+				});
+		},
+		numberChange(data) {
+			let obj = this;
+			obj.num = data.number;
+		},
+		buy() {
+			// let list = JSON.stringify(this.list)
+			uni.navigateTo({
+				url: '/pages/market/pay?&id=' + this.id + '&type=' + this.type
+			});
+			// console.log(this.list,'--------------***********')
+			// console.log('buy click')
+		},
+		changeCurrent(index) {
+			this.current = index;
+		},
+		back() {
+			uni.navigateBack({
+				url: '/pages/calculation/buyCalculation'
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+page {
+	min-height: 100%;
+	background-color: #ffffff;
+	.container {
+		width: 100%;
+	}
+}
+.list-box {
+	// background-color: #5771df;
+	width: 100%;
+	height: 100rpx;
+}
+.list {
+	// margin: 0rpx 31rpx;
+	// padding: 45rpx 35rpx;
+	// background-color: #ffffff;
+	// border-radius: 15rpx;
+	// position: relative;
+	// top: -100rpx;
+	.list-title {
+		font-size: 34rpx;
+		font-weight: 500;
+		color: #333333;
+		padding-bottom: 35rpx;
+	}
+	.list-item {
+		font-size: 24rpx;
+		font-weight: 500;
+		color: #666666;
+		padding-bottom: 35rpx;
+		.item-tpl {
+			font-size: 24rpx;
+			font-weight: bold;
+			color: #333333;
+		}
+		.tpls {
+			color: #faba38;
+		}
+	}
+	.tpl {
+		font-size: 26rpx;
+		font-weight: 500;
+		color: #faba38;
+		padding-bottom: 98rpx;
+	}
+	.num-box {
+		font-size: 30rpx;
+		font-weight: 500;
+		color: #333333;
+		padding-bottom: 83rpx;
+	}
+	.money-box {
+		font-size: 32rpx;
+		font-weight: 500;
+		color: #333333;
+		padding-bottom: 102rpx;
+		.money-num {
+			font-weight: bold;
+			.input-box {
+				text-align: right;
+			}
+		}
+	}
+	.pay-box {
+		font-size: 32rpx;
+		font-weight: 500;
+		color: #333333;
+		padding-bottom: 60rpx;
+	}
+	.tips {
+		font-size: 26rpx;
+		font-weight: 500;
+		color: #5771df;
+		padding-bottom: 25rpx;
+	}
+	.explain {
+		// word-wrap: break-word;
+		// font-size: 26rpx;
+		// font-weight: 500;
+		// color: #666666;
+		// line-height: 38rpx;
+		width: 662rpx;
+		margin: 0 auto;
+		padding-bottom: 141rpx;
+	}
+}
+.submit-box {
+	position: fixed;
+	bottom: 0;
+	padding: 25rpx 0;
+	width: 100%;
+	background-color: #fff;
+	// border-top: 1px solid rgba(0,0,0,0.1);
+	.submit {
+		box-sizing: border-box;
+		width: 662rpx;
+		height: 91rpx;
+		line-height: 91rpx;
+		margin: 0 auto;
+		background: linear-gradient(90deg, #60BAB0, #60BAB0, #45969B);
+		color: #ffffff;
+		text-align: center;
+		// padding: 25rpx 0rpx;
+		border-radius: 50rpx;
+	}
+}
+.check_box {
+	padding: 25rpx 25rpx;
+	font-size: 28rpx;
+	padding-bottom: 60rpx;
+	text {
+		color: #6786fb;
+	}
+}
+.status_bar {
+	position: fixed;
+	top: 0;
+	background-color: #ffffff;
+	z-index: 999;
+	height: var(--status-bar-height);
+	width: 100%;
+}
+// .topbar-box {
+// 	background-color: #bfa;
+// 	height: 100rpx;
+// 	width: 100%;
+// 	position: fixed;
+// 	top: var(--status-bar-height);
+// 	.topbar {
+// 		.topbar-left {
+
+// 		}
+// 		.topbar-center {
+
+// 		}
+// 		.topbar-right {
+
+// 		}
+// 	}
+// }
+.nav-bar {
+	position: fixed;
+	width: 100%;
+	top: var(--status-bar-height);
+	background-color: #fff;
+	z-index: 999;
+	.topbar-center {
+		// width: 450rpx;
+		height: 41px;
+		margin: 0 auto;
+		display: flex;
+		justify-content: space-around;
+		color: #9d989e;
+		font-weight: bold;
+		view {
+			margin: 0 40rpx;
+		}
+		.action {
+			color: #000;
+			border-bottom: 3px #cc6551 solid;
+		}
+	}
+}
+
+.good-img {
+	width: 330rpx;
+	height: 330rpx;
+	margin: 0 auto;
+	image {
+		width: 100%;
+		height: 100%;
+	}
+}
+.param-box {
+	width: 660rpx;
+	margin: 0 auto 20rpx;
+	.param-price {
+		font-size: 40rpx;
+		font-weight: bold;
+		color: #dc4423;
+		padding: 34rpx 0;
+	}
+	.param-name {
+		font-size: 32rpx;
+		font-weight: bold;
+		padding-bottom: 30rpx;
+	}
+	.param-list {
+		box-sizing: border-box;
+		background-color: #f7f8fc;
+		color: #000;
+		display: flex;
+		flex-wrap: wrap;
+		padding-bottom: 24rpx;
+		// margin: 0 19rpx;
+		.list-item {
+			width: 33%;
+			padding: 5rpx 0 0 5rpx;
+			text-align: center;
+			// height: 122rpx;
+			.item-title {
+				font-size: 30rpx;
+				padding: 20rpx 0;
+				color: #8c8b90;
+			}
+			.item-val {
+				font-size: 30rpx;
+				font-weight: bold;
+				padding-bottom: 14rpx;
+			}
+			
+		}
+	}
+}
+</style>

+ 242 - 0
pages/market/duihuan.vue

@@ -0,0 +1,242 @@
+<template>
+	<view class="center">
+		<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_target_get * 1
+				}}{{ list.sp_exchange_target }}+{{ list.sp_exchange_bingo_time }}荣誉值
+			</view>
+		</view>
+		<view class="main">
+			<view class="main-title flex">
+				<view class="shu"></view>
+				<view class="main-font">福利兑换</view>
+			</view>
+			<view class="main-main flex">
+				<view class="left flex">
+					<view class="top font">
+						<span>{{ list.sp_exchange_origin_cost * 1 || 0 }}</span>
+						{{ list.sp_exchange_origin }}
+					</view>
+					<view class="zong font">+</view>
+					<view class="bottom font">
+						<span>{{ list.sp_exchange_bingo_time || 0 }}</span>
+						幸运值
+					</view>
+				</view>
+				<view class="bg">
+					<image src="../../static/img/duhuanbg.png" mode=""></image>
+				</view>
+				<view class="left flex">
+					<view class="top font">
+						<span>{{ list.sp_exchange_target_get * 1 || 0 }}</span>
+						{{ list.sp_exchange_target }}
+					</view>
+					<view class="zong font">+</view>
+					<view class="bottom font">
+						<span>{{ list.sp_exchange_bingo_time || 0 }}</span>
+						荣誉值
+					</view>
+				</view>
+			</view>
+			<view class="sheng">
+				当前剩余USDL
+				<span>{{ USDL || 0 }}</span>
+				幸运值
+				<span>{{ lucky || 0 }}</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 { lalaDetial } from '@/api/product.js';
+import { wallet } from '@/api/finance.js';
+import { spExchange } from '@/api/market.js';
+export default {
+	data() {
+		return {
+			id: '',
+			list: '',
+			lucky: '',
+			USDL: '',
+			show1: false, //支付密码
+			password: ''
+		};
+	},
+	onLoad(option) {
+		this.id = option.id;
+		this.loadData();
+	},
+	methods: {
+		async loadData() {
+			lalaDetial({}, this.id)
+				.then(({ data }) => {
+					console.log(data);
+					this.list = data.data;
+					this.lucky = data.luck_point - data.exchange_point;
+				})
+				.catch(e => {
+					console.log(e);
+				});
+			wallet({}).then(({ data }) => {
+				this.USDL = data.back['USDL'].money.money * 1 - data.back['USDL'].money.only_pink *1;
+			});
+		},
+		buy() {
+			// this.show1 = true;
+			spExchange({}, this.id).then(e => {
+				uni.navigateTo({
+					url:'/pages/money/paySuccess?type=1' 
+				})
+			});
+		},
+		pswQd() {
+			spExchange({}, this.id).then(e => {});
+		},
+		cancel() {
+			this.show1 = false;
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.rule-box {
+	width: 750px;
+	padding: 30rpx;
+	background: #ffffff;
+	.rule-title {
+		font-size: 26rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #0f253a;
+	}
+	.rule-main {
+		margin-top: 10rpx;
+		font-size: 26rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #6d7c88;
+	}
+}
+.main {
+	margin-top: 15rpx;
+	width: 100%;
+	background: #fff;
+	padding-bottom: 220rpx;
+	.main-title {
+		padding: 20rpx 0 27rpx 30rpx;
+		justify-content: flex-start;
+		align-items: center;
+		border-bottom: 1px #f3f3f3 solid;
+		.shu {
+			width: 2rpx;
+			height: 30rpx;
+			background: #44969d;
+		}
+		.main-font {
+			margin-left: 16rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #0f253a;
+		}
+	}
+	.main-main {
+		padding: 62rpx;
+		.left {
+			flex-direction: column;
+			align-items: center;
+			.font {
+				font-size: 42rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #000000;
+				span {
+					color: #44969d;
+				}
+			}
+			.zong {
+				margin-top: 20rpx;
+			}
+			.bottom {
+				margin-top: 40rpx;
+			}
+		}
+		.bg{
+			width: 70rpx;
+			height: 70rpx;
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+	}
+	.sheng {
+		padding: 30rpx 0 0 28rpx;
+		font-size: 26rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #6d7c88;
+		span {
+			color: #44969d;
+		}
+	}
+}
+.btn {
+	margin: 130rpx auto;
+	width: 674rpx;
+	height: 88rpx;
+	background: linear-gradient(90deg, #60bab0, #60bab0, #45969b);
+	border-radius: 44rpx;
+	font-size: 36rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #ffffff;
+	text-align: center;
+	line-height: 88rpx;
+}
+.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>

+ 514 - 2
pages/market/market.vue

@@ -1,8 +1,520 @@
 <template>
+	<view class="container">
+		<image class="logo-img" src="../../static/img/img01.png"></image>
+		<view class="list-box">
+			<scroll-view scroll-x class="list-title">
+				<!-- <view class="title" :class="{ blue: tabCurrent == '全部' }" @click="tabClick('全部', 1)">全部</view> -->
+				<view
+					class="title"
+					v-for="(ls, index) in moneyTypeList"
+					:key="index"
+					:class="{ blue: tabCurrent == ls.code, grey: ls.has_mining == 0 }"
+					@click="tabClick(ls.code, ls.has_mining)"
+					v-if="ls.name === 'FIL'"
+				>
+					{{ ls.name }}
+				</view>
+			</scroll-view>
+			<view class="flex_item list-name" v-if="tabCurrent !== '全部'">
+				<view class="name" :class="{ black: tabType == 1 }" @click="tabTypeClick(1)">算力包</view>
+				<!--<view class="name" :class="{ black: tabType == 2 }" @click="tabTypeClick(2)">独享矿机</view>
+				<view class="name" :class="{ black: tabType == 3 }" @click="tabTypeClick(3)">联合挖矿</view> -->
+				<!-- <view class='name' :class="{'black':tabCurrent==4}">分类名称</view> -->
+			</view>
+			<view class="jg" v-else></view>
+			<view class="list-cell" v-if="list.length > 0" v-for="(ls, index) in list" :key="index" :class="{ 'mini-list-cell': tabCurrent === '全部' }">
+				<view class="flex">
+					<view>
+						<view class="cell-title flex">
+							<image :src="ls.logo"></image>
+							<view class="title">{{ ls.name }}</view>
+						</view>
+						<view class="tags">
+							<!-- <view class="cell-tip">{{ ls.first_step_time + ls.second_step_time + ls.third_step_time }}天矿机</view> -->
+							<template v-if="ls.tags[0] !== '0'">
+								<view class="cell-tip" v-for="item in ls.tags" :key="item">{{ item }}</view>
+								<!-- <view class="cell-tag">特价</view> -->
+							</template>
+						</view>
+					</view>
+					<image v-if="ls.stock == 0" class="all-list" src="../../static/img/img51.png"></image>
+				</view>
+				<view class="flex cell-tpl">
+					<view class="tpl">
+						<view class="">单价</view>
+						<view class="" v-if="ls.get_money_type == 'BZZ'">{{ ls._cost_money }}/节点</view>
+						<view class="" v-else>{{ ls._cost_money }}/T</view>
+					</view>
+					<view class="tpl">
+						<view class="">有效算力</view>
+						<view class="" v-if="ls.get_money_type == 'BZZ'">{{ ls.step }}节点</view>
+						<view class="" v-else>{{ ls.step }}T</view>
+					</view>
+					<view class="tpl">
+						<view class="">合约周期</view>
+						<view class="">{{ ls.first_step_time + ls.second_step_time }}天 + {{ ls.third_step_time }}天</view>
+					</view>
+					<!-- <view class="tpl">
+						<view class="">上架期</view>
+						<view class="">{{ ls.stand_time }}天</view>
+					</view> -->
+				</view>
+				<view class="cell-info flex">
+					<view class="tip">剩余数量:{{ ls | dataStock }}</view>
+					<view class="zhiya-btn" v-if="ls.stock > 0" @click="ToBuy(ls)">{{ ls.type == 3 ? '立即质押' : '立即购买' }}</view>
+					<view class="zhiya-btn grey" v-if="ls.stock == 0">已售罄</view>
+				</view>
+				<view class="luckbox">
+					购买当前矿机所需幸运值<span>{{ls.cost_times}}</span>,您当前拥有的幸运值为<span>{{ls.luck_point - ls.exchange_point}}</span>
+				</view>
+			</view>
+			<view class="empty-box" v-show="list.length === 0"><u-empty text="敬请期待" mode="data"></u-empty></view>
+		</view>
+		<uni-popup ref="popup" type="center">
+			<view class="popup">
+				<view class="cancel flex" @click="close">
+					<view></view>
+					<view class="tip">x</view>
+				</view>
+				<view class="list-box">
+					<view class="popup-text">购买数量:</view>
+					<view class="password"><input type="number" v-model="num" /></view>
+					<view class="popup-text">支付密码:</view>
+					<view class="password"><input type="password" v-model="password" /></view>
+					<view class="confirm-btn" @click="pay"><text>确认购买</text></view>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
 </template>
-
 <script>
+import { mining, buyMining } from '@/api/market.js';
+import { wallet } from '@/api/finance.js';
+export default {
+	filters: {
+		dataStock: function(ls) {
+			let type = 'T';
+			// if (+ls.stock >= 1024) {
+			// 	// type = 'P';
+			// 	return `${ls.stock/1024 }/${ls.all_stock/1024 }${type}`;
+			// } else {
+			// 	return `${ls.stock}/${ls.all_stock}${type}`;
+			// }
+			return `${+ls.stock}${type}/${+ls.all_stock}${type}`;
+		}
+	},
+	data() {
+		return {
+			tabCurrent: '全部',
+			tabType: 1,
+			moneyTypeList: [],
+			list: [],
+			buyId: '',
+			password: '',
+			num: ''
+		};
+	},
+	onLoad(option) {
+		this.moneyType();
+		this.loadData();
+	},
+	onShow() {},
+	//下拉刷新
+	onPullDownRefresh() {
+		this.moneyType();
+	},
+	methods: {
+		// 所有币种
+		async moneyType() {
+			let obj = this;
+			// console.log(obj.moneyTypeList);
+			wallet({}).then(({ data }) => {
+				console.log(data);
+				obj.like_rmb = data.all_rmb;
+				obj.like_usdt = data.all_usdt;
+				const arr = Object.keys(data.back);
+				console.log(arr);
+				let ar = [];
+				arr.forEach(e => {
+					ar.push(data.back[e]);
+				});
+				obj.moneyTypeList = ar;
+				console.log(obj.moneyTypeList, 'swpie');
+			});
+		},
+		// 请求载入数据
+		async loadData() {
+			let obj = this;
+			uni.showLoading({
+				title: '加载中...'
+			});
+			if (obj.tabCurrent === '全部') {
+				obj.list = [];
+				mining({
+					page: 1,
+					limit: 1000
+				}).then(({ data }) => {
+					uni.hideLoading();
+					console.log(data.data, '9999999999999999999999999999999999');
+					obj.list = data.data.map(e => {
+						e.step = +e.step;
+						e._cost_money = +e._cost_money.replace(e.cost_money_type, '') + e.cost_money_type;
+						return e;
+					});
+					console.log(obj.list, 'obj.list++++++++++++');
+				});
+				// for(let i = 0 ; i<obj.moneyTypeList.length;i++){
+				// 	if(obj.moneyTypeList[i].has_mining !==0){
+				// 		mining({
+				// 			page:1,
+				// 			limit:1000,
+				// 			type: obj.tabType,
+				// 			get_money_type: obj.moneyTypeList[i].code
+				// 		}).then(({ data }) => {
+				// 			console.log(data)
+				// 			let arr = data.data.map(e => {
+				// 				e.step = +e.step;
+				// 				e._cost_money = +e._cost_money.replace(e.cost_money_type, '') + e.cost_money_type;
+				// 				return e;
+				// 			});
+				// 			obj.list = obj.list.concat(arr)
+				// 			// console.log( obj.list.length)
+				// 			let len = obj.list.length
+				// 			for (let i = 0; i < len; i++) {
+				// 				// obj.list[i].tags = obj.list[i].tags.splice(',')
+				// 				for (let j = 0; j < len; j++) {
+				// 					if (obj.list[i].step > obj.list[j].step) {
+				// 						let z = obj.list[i];
+				// 						obj.list[i] = obj.list[j];
+				// 						obj.list[j] = z;
+				// 					}
+				// 				}
+				// 			}
+				// 			// console.log(obj.list, 'new obj.list-------------')
+				// 			uni.hideLoading();
+
+				// 		})
+				// 	}
+
+				// }
+				// let len = obj.list.length;
+			} else {
+				mining({
+					page: 1,
+					limit: 1000,
+					type: obj.tabType,
+					get_money_type: obj.tabCurrent
+				}).then(({ data }) => {
+					console.log(data, '1111');
+					obj.list = data.data.map(e => {
+						e.step = +e.step;
+						e._cost_money = +e._cost_money.replace(e.cost_money_type, '') + e.cost_money_type;
+						return e;
+					});
+					console.log(obj.list, 'obj.list++++++++++++');
+					let len = obj.list.length;
+
+					for (let i = 0; i < len; i++) {
+						// obj.list[i].tags = obj.list[i].tags.splice(',')
+						for (let j = 0; j < len; j++) {
+							if (obj.list[i].step > obj.list[j].step) {
+								let z = obj.list[i];
+								obj.list[i] = obj.list[j];
+								obj.list[j] = z;
+							}
+						}
+					}
+
+					console.log(obj.list, 'new obj.list-------------');
+					uni.hideLoading();
+				});
+			}
+		},
+		ToBuy(ls) {
+			// let obj = this;
+			// obj.buyId = id;
+			// this.$refs.popup.open();
+			uni.navigateTo({
+				url: '/pages/market/details?id=' + ls.id + '&type=' + ls.type
+			});
+		},
+		pay() {
+			let obj = this;
+			buyMining(
+				{
+					num: obj.num,
+					trade_psw: obj.password
+				},
+				obj.buyId
+			)
+				.then(({ data }) => {
+					obj.$api.msg('购买成功!');
+					obj.loadData();
+					obj.password = '';
+					obj.num = '';
+					obj.$refs.popup.close();
+				})
+				.catch(e => {
+					obj.loadData();
+					obj.password = '';
+					obj.num = '';
+					obj.$refs.popup.close();
+				});
+		},
+		close() {
+			this.$refs.popup.close();
+		},
+		tabClick(index, has_mining) {
+			if (index === '全部') {
+				console.log('ddddddddd');
+			}
+			if (has_mining == 0) {
+				this.$api.msg('敬请期待!');
+			} else {
+				this.tabCurrent = index;
+				this.loadData();
+			}
+		},
+		tabTypeClick(index) {
+			this.tabType = index;
+			this.loadData();
+		}
+	}
+};
 </script>
 
-<style>
+<style lang="scss">
+page {
+	min-height: 100%;
+	background-color: #ffffff;
+	.container {
+		width: 100%;
+	}
+}
+.logo-img {
+	margin: 40rpx 6%;
+	width: 88%;
+	height: 209rpx;
+}
+.list-box {
+	.list-title {
+		overflow: hidden;
+		white-space: nowrap;
+		.title {
+			display: inline-block;
+			background-color: #44969d;
+			font-size: 30rpx;
+			font-weight: bold;
+			color: #ffffff;
+			width: 24.49%;
+			margin-right: 5rpx;
+			text-align: center;
+			line-height: 60rpx;
+		}
+		.blue {
+			background-color: #44969d;
+		}
+		.grey {
+			background-color: #dbdbdb !important;
+		}
+	}
+	.list-name {
+		padding: 24rpx 50rpx;
+		.name {
+			font-size: 28rpx;
+			margin-right: 15%;
+			font-weight: 500;
+			color: #666666;
+		}
+		.black {
+			color: #333333;
+			border-bottom: 2rpx solid #5771df;
+			padding-bottom: 10rpx;
+			font-size: 30rpx;
+			font-weight: bold;
+		}
+	}
+}
+.more {
+	color: #606266;
+	font-size: 24rpx;
+	font-weight: normal;
+	border-bottom: 1rpx solid #606266;
+}
+.all-list {
+	width: 180rpx;
+	height: 180rpx;
+	position: absolute;
+	top: 10rpx;
+	right: 10rpx;
+}
+.list-cell {
+	box-sizing: border-box;
+	width: 670rpx;
+	margin: 0 auto;
+	padding: 40rpx 40rpx;
+	border-radius: 30rpx 30rpx;
+	background: #f3feff;
+	margin-bottom: 20rpx;
+	position: relative;
+	.cell-title {
+		padding: 29rpx 38rpx 29rpx 15rpx;
+		font-size: 38rpx;
+		font-weight: bold;
+		color: #333333;
+		image {
+			width: 40rpx;
+			height: 40rpx;
+			margin-right: 15rpx;
+		}
+	}
+	.tags {
+		.cell-tip {
+			display: inline-block;
+			padding: 11rpx 18rpx 9rpx 20rpx;
+			font-size: 30rpx;
+			font-weight: bold;
+			color: #0ec1a1;
+			background-color: #e3f6fa;
+			border-radius: 24rpx 24rpx;
+			margin-right: 20rpx;
+			margin-top: 15rpx;
+		}
+		.cell-tag {
+			display: inline-block;
+			margin-left: 20rpx;
+			padding: 4rpx 18rpx 3rpx 20rpx;
+			font-size: 30rpx;
+			font-weight: bold;
+			color: red;
+			// background-color: #fff;
+			// border-radius: 24rpx 24rpx;
+			border: 4rpx red solid;
+		}
+	}
+
+	.cell-tpl {
+		padding: 50rpx 0rpx 34rpx;
+		font-size: 30rpx;
+		font-weight: bold;
+		color: #333333;
+		line-height: 40rpx;
+		// text-align: center;
+	}
+	.cell-info {
+		.tip {
+			font-size: 34rpx;
+			font-weight: bold;
+			color: #44969d;
+			line-height: 55px;
+		}
+		.zhiya-btn {
+			background-color: #44969d;
+			width: 150rpx;
+			text-align: center;
+			line-height: 60rpx;
+			font-size: 26rpx;
+			border-radius: 50rpx;
+			color: #ffffff;
+		}
+		.grey {
+			background-color: #999999;
+		}
+	}
+	.luckbox {
+		margin-left: -40rpx;
+		width: 670rpx;
+		background: #7bbbc0;
+		border-radius: 0px 0px 10rpx 10rpx;
+		padding: 32rpx;
+		font-size: 24rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #333333;
+		span {
+			font-size: 30rpx;
+			color: #ff0000;
+		}
+	}
+}
+
+.empty-box {
+	width: 100%;
+	height: 500rpx;
+}
+//弹窗
+.popup {
+	background-color: #ffffff;
+	border-radius: 25rpx;
+	font-size: 30rpx;
+	.cancel {
+		text-align: center;
+		width: 100%;
+		line-height: 60rpx;
+		.tip {
+			background-color: #5771df;
+			color: #ffffff;
+			width: 70rpx;
+			height: 70rpx;
+			border-top-right-radius: 25rpx;
+		}
+	}
+	.list-box {
+		padding: 0rpx 80rpx;
+		.password {
+			padding: 50rpx 0rpx;
+			width: 100%;
+			input {
+				width: 70%;
+				height: 80rpx;
+				border: 2rpx solid #999999;
+				padding-left: 25rpx;
+				box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.27);
+				border-radius: 11rpx;
+			}
+		}
+		.confirm-btn {
+			padding-bottom: 120rpx;
+			padding-top: 30rpx;
+			text {
+				background-color: #44969d;
+				color: #ffffff;
+				width: 70%;
+				text-align: center;
+				padding: 25rpx 90rpx;
+				border-radius: 15rpx;
+			}
+		}
+	}
+}
+.jg {
+	height: 20rpx;
+}
+.mini-list-cell {
+	padding: 0rpx 40rpx 10rpx;
+	.cell-tpl {
+		padding: 10rpx 0 8rpx;
+	}
+	.cell-info {
+		.tip {
+			font-size: 34rpx;
+			font-weight: bold;
+			color: #44969d;
+			opacity: 0;
+			line-height: 40px;
+		}
+		.zhiya-btn {
+			background-color: #44969d;
+			width: 150rpx;
+			text-align: center;
+			line-height: 60rpx;
+			font-size: 26rpx;
+			border-radius: 50rpx;
+			color: #ffffff;
+		}
+		.grey {
+			background-color: #999999;
+		}
+	}
+}
 </style>

+ 476 - 0
pages/market/myCalculation.vue

@@ -0,0 +1,476 @@
+<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 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="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="item" v-if=" ls.status == 3">
+				<view class="item-name"></view>
+				<view class="btn" @click="shu(ls,2)">
+					赎回
+				</view>
+			</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>
+		</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>
+		</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: {
+		uniCountdown
+	},
+	data() {
+		return {
+			type: '',//判断是质押还是赎回
+			show1: false,//是否显示密码框
+			password:'',//交易密码
+			list:'',
+			num:'',//矿机数量
+			id:'',//需要的id
+			zhiya:'',//质押金额
+			zhiyaType:'',//质押单位
+			shuhui:'',//赎回金额
+			shuhuiType:'',//赎回单位
+		};
+	},
+	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
+		},
+		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)
+				})
+			}
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	min-height: 100%;
+	background-color: #ffffff;
+	.container {
+		width: 100%;
+		padding-bottom: 20rpx;
+	}
+}
+.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 {
+		position: relative;
+		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;
+	}
+	.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>

+ 404 - 0
pages/market/pay.vue

@@ -0,0 +1,404 @@
+<template>
+	<view class="container">
+		<view class="list-box"></view>
+		<view class="list">
+			<view class="list-title">{{ list.name }}</view>
+			<view class="flex list-item">
+				<view class="item-name">价格</view>
+				<view class="item-tpl">{{ list.cost_money * 1 }}{{ list._cost_money_type }}</view>
+			</view>
+			<view class="flex list-item">
+				<view class="item-name">所需幸运值</view>
+				<view class="item-tpl">{{ list.cost_times }}</view>
+			</view>
+			<view class="flex list-item" v-if="list.stand_money > 0">
+				<view class="item-name">质押FIL数量(用户自行支付)</view>
+				<view class="item-tpl">{{ list.stand_money * 1 }}</view>
+			</view>
+			<view class="flex list-item">
+				<view class="item-name">托管运维费</view>
+				<view class="item-tpl">{{ list.service_ratio }}%</view>
+			</view>
+			<view class="flex list-item">
+				<view class="item-name">上架期</view>
+				<view class="item-tpl">{{ list.stand_time }}天</view>
+			</view>
+			<!-- <view class="flex list-item">
+				<view class="item-name">封装期</view>
+				<view class="item-tpl">{{list.first_step_time}}</view>
+			</view> -->
+			<view class="flex list-item">
+				<view class="item-name">合约期</view>
+				<view class="item-tpl">{{ list.first_step_time + list.second_step_time}}天 + {{list.third_step_time}}天</view>
+			</view>
+			<view class="flex list-item">
+				<view class="item-name">电费</view>
+				<view class="item-tpl">{{list.elect_fee|keept}}元/天</view>
+			</view>
+			<!-- <view class="tpl" v-if="list.stand_money > 0">需完成应质押的FIL后,才能开始进入50天封装期</view> -->
+			<view class="num-box flex">
+				<view class="num-title" v-if="list.get_money_type == 'BZZ'">购买数量({{ list.step * 1 }}节点)</view>
+				<view class="num-title" v-else>购买数量({{ list.step * 1 }}T)</view>
+				<uni-number-box class="step" :value="num" :disabled="false" @eventChange="numberChange"></uni-number-box>
+			</view>
+			<view class="flex money-box">
+				<view class="money-name">购买总数</view>
+				<view class="money-num" v-if="list.get_money_type == 'BZZ'">{{ list.step * 1 * num}}节点</view>
+				<view class="money-num" v-else>{{ list.step * 1 * num}}T</view>
+			</view>
+			<view class="flex money-box">
+				<view class="money-name">金额</view>
+				<view class="money-num">{{ money * 1 }}{{ list._cost_money_type }}</view>
+			</view>
+			<!-- 交易密码 -->
+			<!-- <view class="flex money-box">
+				<view class="money-name">交易密码</view>
+				<view class="money-num"><input class="input-box" type="password" v-model="password" placeholder="请输入交易密码" /></view>
+			</view> -->
+			<view class="pay-box">支付方式:{{ list._cost_money_type }}</view>
+			<!-- <view class="list-title">IPFS独享算力包-1T</view> -->
+<!-- 			<view class="tips">说明:</view>
+			<view class="explain"><rich-text :nodes="list.detail"></rich-text></view> -->
+			<view class="check_box flex_item">
+				<view><radio style="transform: scale(0.75)" @click="Getcheckbox" color="#60BAB0" :checked="checked" /></view>
+				<view class="">
+					请阅读并同意
+					<text @click="ToIndex">《矿机租赁协议》</text>
+				</view>
+			</view>
+			<view class="submit-box">
+				<view class="submit" @click="pay()">{{ type == 3 ? '立即质押' : '立即购买' }}</view>
+			</view>
+		</view>
+		<!-- 交易密码框 -->
+		<view class="curtain" :class="{'ishiden':isHiden}" @touchmove.stop.prevent="moveHandle">
+			<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>
+	</view>
+</template>
+<script>
+import { miningDateils, buyMining } from '@/api/market.js';
+import uniNumberBox from '@/components/uni-number-box.vue';
+export default {
+	components: {
+		uniNumberBox
+	},
+	data() {
+		return {
+			id: '',
+			type: '',
+			num: 1,
+			step: 0,
+			password: '',
+			
+			price: '',
+			list: {
+				
+			},
+			checked: false,
+			isHiden: true
+		};
+	},
+	filters: {
+		Keept(value) {
+			if(!value) {
+				return '0.00'
+			}
+			value = Math.round(value* 100)/100;
+			return value
+		}
+	},
+	onLoad(option) {
+		// this.list = JSON.parse(option.list)
+		// console.log(this.list)
+		this.id = option.id;
+		this.type = option.type;
+		
+		this.loadData();
+	},
+	
+	computed: {
+		money() {
+			return this.num * this.price *this.step ;
+		}
+	},
+	onShow() {},
+	methods: {
+		async loadData() {
+			let obj = this;
+			miningDateils({}, obj.id).then(({ data }) => {
+				obj.list = data;
+				// obj.money = obj.list.cost_money;
+				obj.price = obj.list.cost_money;
+				obj.step = obj.list.step;
+			});
+		},
+		//阅读并同意
+		Getcheckbox() {
+			let obj = this;
+			obj.checked = !obj.checked;
+		},
+		ToIndex() {
+			uni.navigateTo({
+				url: '/pages/finance/xieyi'
+			});
+		},
+		pay() {
+			let obj = this;
+			// if (obj.password == '') {
+			// 	obj.$api.msg('请输入交易密码!');
+			// 	return;
+			// }
+			if (obj.checked == false) {
+				obj.$api.msg('请阅读并同意协议!');
+				return;
+			}
+			console.log()
+			if (obj.list.cost_times > (obj.list.luck_point - obj.list.exchange_point)) {
+				obj.$api.msg('所需荣誉值不足!');
+				return;
+			}
+			//弹出输入交易密码
+			this.isHiden = false
+			// buyMining(
+			// 	{
+			// 		num: obj.num * obj.step,
+			// 		trade_psw: obj.password
+			// 	},
+			// 	obj.id
+			// )
+			// 	.then(data => {
+			// 		obj.$api.msg(data.msg);
+			// 		obj.password = '';
+			// 		obj.num = 1;
+			// 	})
+			// 	.catch(e => {
+			// 		obj.password = '';
+			// 		obj.num = 1;
+			// 		if (e.msg == '交易密码错误') {
+			// 			return;
+			// 		}
+			// 		console.log(e);
+			// 		var reg = new RegExp('购买矿机所需的');
+			// 		if (e.msg.match(reg) == -1) {
+			// 		} else {
+			// 			setTimeout(function() {
+			// 				uni.navigateTo({
+			// 					url: '/pages/finance/recharge'
+			// 				});
+			// 			}, 1000);
+			// 		}
+			// 	});
+		},
+		numberChange(data) {
+			let obj = this;
+			obj.num = data.number;
+		},
+		cancel() {
+			this.password = ''
+			this.isHiden = true
+		},
+		pswQd() {
+			let obj = this;
+			if( obj.password === '' ) {
+				obj.$api.msg('请输入交易密码!');
+				return
+			}
+			obj.isHiden = true
+			
+			
+			buyMining(
+				{
+					num: obj.num * obj.step,
+					trade_psw: obj.password
+				},
+				obj.id
+			)
+				.then(data => {
+					obj.$api.msg(data.msg);
+					obj.password = '';
+					obj.num = 1;
+					setTimeout(function() {
+						uni.navigateTo({
+							url: '/pages/calculation/myCalculation'
+						});
+					}, 1500);
+				})
+				.catch(e => {
+					obj.password = '';
+					obj.num = 1;
+					if (e.msg == '交易密码错误') {
+						return;
+					}
+					console.log(e);
+					var reg = new RegExp('购买矿机所需的');
+					if (e.msg.match(reg) == -1) {
+					} else {
+						setTimeout(function() {
+							uni.navigateTo({
+								url: '/pages/finance/recharge'
+							});
+						}, 1500);
+					}
+				});
+		},
+		moveHandle() {}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+page {
+	min-height: 100%;
+	background-color: #ffffff;
+	.container {
+		width: 100%;
+	}
+}
+.list-box {
+	background: linear-gradient(90deg, #60BAB0, #60BAB0, #45969B);
+	width: 100%;
+	height: 200rpx;
+}
+.list {
+	margin: 0rpx 31rpx;
+	padding: 45rpx 35rpx;
+	background-color: #ffffff;
+	border-radius: 15rpx;
+	position: relative;
+	top: -100rpx;
+	.list-title {
+		font-size: 34rpx;
+		font-weight: 500;
+		color: #333333;
+		padding-bottom: 35rpx;
+	}
+	.list-item {
+		font-size: 24rpx;
+		font-weight: 500;
+		color: #666666;
+		padding-bottom: 35rpx;
+		.item-tpl {
+			font-size: 24rpx;
+			font-weight: bold;
+			color: #333333;
+		}
+		.tpls {
+			color: #faba38;
+		}
+	}
+	.tpl {
+		font-size: 26rpx;
+		font-weight: 500;
+		color: #faba38;
+		padding-bottom: 98rpx;
+	}
+	.num-box {
+		font-size: 30rpx;
+		font-weight: 500;
+		color: #333333;
+		padding-bottom: 83rpx;
+	}
+	.money-box {
+		font-size: 32rpx;
+		font-weight: 500;
+		color: #333333;
+		padding-bottom: 102rpx;
+		.money-num {
+			font-weight: bold;
+			.input-box {
+				text-align: right;
+			}
+		}
+	}
+	.pay-box {
+		font-size: 32rpx;
+		font-weight: 500;
+		color: #333333;
+		padding-bottom: 60rpx;
+	}
+	.tips {
+		font-size: 26rpx;
+		font-weight: 500;
+		color: #60BAB0;
+		padding-bottom: 25rpx;
+	}
+	.explain {
+		word-wrap: break-word;
+		font-size: 26rpx;
+		font-weight: 500;
+		color: #666666;
+		line-height: 38rpx;
+	}
+}
+.submit-box {
+	.submit {
+		background-color: #60BAB0;
+		color: #ffffff;
+		text-align: center;
+		padding: 25rpx 0rpx;
+		border-radius: 50rpx;
+	}
+}
+.check_box {
+	padding: 25rpx 25rpx;
+	font-size: 28rpx;
+	padding-bottom: 60rpx;
+	text {
+		color: #60BAB0;
+	}
+}
+.curtain {
+	position: fixed;
+	width: 100%;
+	height: 100%;
+	top: 0;
+	background-color: rgba($color: #000000, $alpha: 0.2);
+	.psw-wrapper {
+		position: fixed;
+		top: 50%;
+		left: 50%;
+		transform: translate(-50%,-100%);
+		width: 548.6rpx;
+		height: 344.4rpx;
+		background-color: #FFFFFF;
+		border-radius: 15rpx 15rpx;
+		.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:#60BAB0;
+		}
+	}
+}
+.ishiden {
+	display: none;
+}
+</style>

+ 3 - 3
pages/money/paySuccess.vue

@@ -4,7 +4,7 @@
 		<text class="tit" v-if="type == 1">订单支付成功</text>
 		<text class="tit" v-else>订单预约成功</text>
 		<view class="btn-group">
-			<navigator url="/pages/index/node" open-type="redirect" class="mix-btn" v-if="type == 1">我的节点</navigator>
+			<navigator url="/pages/user/fulilist" open-type="redirect" class="mix-btn" v-if="type == 1">继续兑换</navigator>
 			<navigator url="/pages/assets/myPing" open-type="redirect" class="mix-btn" v-else>我的拼购</navigator>
 			<navigator url="/pages/index/index" open-type="switchTab" class="mix-btn hollow">返回首页</navigator>
 		</view>
@@ -15,7 +15,7 @@
 	export default {
 		data() {
 			return {
-				type: 2//1为节点支付成功2为预购成功
+				type: 2//1为兑换支付成功2为预购成功
 			}
 		},
 		onLoad(opt) {
@@ -26,7 +26,7 @@
 			}
 			if (this.type == 1){
 				uni.setNavigationBarTitle({
-				  title:"支付成功"
+				  title:"兑换成功"
 				})
 			}
 			if (this.type == 2) {

+ 6 - 12
pages/money/payment.vue

@@ -7,7 +7,7 @@
 			</view>
 			<view class="list-cell flex_item">
 				<view class="cell-name">新密码</view>
-				<input type="password" v-model="password" placeholder="请输入不小于6位数的密码" />
+				<input type="password" v-model="password" placeholder="请输入6位数的密码" />
 			</view>
 			<view class="list-cell flex_item">
 				<view class="cell-name">重复密码</view>
@@ -25,7 +25,7 @@
 	</view>
 </template>
 <script>
-import { updatalogin } from '@/api/set.js';
+import { registerReset } from '@/api/set.js';
 import { verify } from '@/api/login.js';
 export default {
 	data() {
@@ -38,9 +38,11 @@ export default {
 			countDown: 0 //倒计时
 		};
 	},
-	onLoad(option){
+	onLoad(){
 		let userInfo = uni.getStorageSync('userInfo') || '';
 		this.phone = userInfo.account
+		
+		
 	},
 	onShow() {
 		
@@ -76,7 +78,7 @@ export default {
 				obj.$api.msg('请输入验证码');
 				return;
 			}
-			updatalogin({
+			registerReset({
 				account: obj.phone, //账号
 				password:obj.password,
 				password2:obj.password2,
@@ -94,14 +96,6 @@ export default {
 		//发送验证码
 		verification() {
 			let obj = this;
-			if (this.phone == '') {
-				this.$api.msg('请输入电话号码');
-				return;
-			}
-			if (this.phone.length < 11) {
-				this.$api.msg('请输入正确的手机号');
-				return;
-			}
 			// 判断是否在倒计时
 			if (obj.countDown > 0) {
 				return false;

+ 70 - 61
pages/public/forget.vue

@@ -1,11 +1,11 @@
 <template>
 	<view class="container">
 		<view class="logo-img"><image src="../../static/img/log.png" mode=""></image></view>
-		<view class="logo">LOGO</view>
+		<view class="logo">LALA</view>
 		<view class="login_text">
 			<view class="login_input flex_item">
 				<view class="login_img"><image class="phone" src="/static/img/phone.png"></image></view>
-				<view class="login_name"><input class="uni-input" type="number" v-model="phone" focus placeholder="请输入手机号码" /></view>
+				<view class="login_name"><input class="uni-input" type="text" v-model="phone" focus placeholder="请输入邮箱" /></view>
 			</view>
 			<view class="login_input flex_item">
 				<view class="login_img"><image src="/static/img/password.png"></image></view>
@@ -27,15 +27,15 @@
 	</view>
 </template>
 <script>
-import { updatalogin } from '@/api/set.js';
+import { registerReset } from '@/api/set.js';
 import { verify } from '@/api/login.js';
 export default {
 	data() {
 		return {
 			phone: '', //用户
 			code: '', //验证码
-			password2:'',
-			password:'',
+			password2: '',
+			password: '',
 			time: '', //保存倒计时对象
 			countDown: 0 //倒计时
 		};
@@ -53,11 +53,11 @@ export default {
 		updatalogin() {
 			let obj = this;
 			if (obj.phone == '') {
-				obj.$api.msg('请输入手机号码');
+				obj.$api.msg('请输入邮箱');
 				return;
 			}
-			if (!/(^1[3|4|5|7|8][0-9]{9}$)/.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)) {
+				obj.$api.msg('请输入正确的邮箱');
 				return;
 			}
 			if (obj.password == '') {
@@ -76,30 +76,32 @@ export default {
 				obj.$api.msg('请输入验证码');
 				return;
 			}
-			updatalogin({
+			registerReset({
 				account: obj.phone, //账号
-				password:obj.password,
-				password2:obj.password2,
-				type:1,
+				password: obj.password,
+				password2: obj.password2,
+				type: 1,
 				captcha: obj.code
-			}).then(function(e) {
-				obj.$api.msg(e.msg);
-				uni.navigateTo({
-					url: '/pages/public/login'
+			})
+				.then(function(e) {
+					obj.$api.msg(e.msg);
+					uni.navigateTo({
+						url: '/pages/public/login'
+					});
+				})
+				.catch(e => {
+					console.log(e);
 				});
-			}).catch((e) => {
-				console.log(e);
-			});
 		},
 		//发送验证码
 		verification() {
 			let obj = this;
 			if (this.phone == '') {
-				this.$api.msg('请输入电话号码');
+				this.$api.msg('请输入邮箱号码');
 				return;
 			}
-			if (this.phone.length < 11) {
-				this.$api.msg('请输入正确的手机号');
+			if (!/^([a-zA-Z]|[0-9])(\w|\-|\.)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(obj.phone)) {
+				obj.$api.msg('请输入正确的邮箱');
 				return;
 			}
 			// 判断是否在倒计时
@@ -115,60 +117,68 @@ export default {
 					phone: obj.phone,
 					type: 'login'
 				})
-					.then(({ data }) => {})
+					.then(({ data }) => {
+						uni.showToast({
+							title: '验证码已发送',
+							duration: 2000,
+							position: 'top',
+							icon: 'none'
+						});
+					})
 					.catch(err => {
 						console.log(err);
 					});
 			}
-		},
+		}
 	}
 };
 </script>
 
 <style lang="scss">
 page {
-		min-height: 100%;
-		background-color: #ffffff;
-		.container {
-			width: 100%;
-			padding: 60rpx 70rpx;
-		}
+	min-height: 100%;
+	background-color: #ffffff;
+	.container {
+		width: 100%;
+		padding: 60rpx 70rpx;
 	}
-	.logo-img{
+}
+.logo-img {
+	width: 161rpx;
+	height: 161rpx;
+	margin:auto;
+	margin-top: 52rpx !important;
+	margin-bottom: 15rpx !important;
+	box-shadow: 0px 12rpx 13rpx 0px rgba(68, 150, 157, 0.47);
+	border-radius: 50%;
+	image {
 		width: 161rpx;
 		height: 161rpx;
-		margin: auto;
-		margin-bottom: 15rpx !important;
-		box-shadow: 0px 12rpx 13rpx 0px rgba(68, 150, 157, 0.47);
 		border-radius: 50%;
-		image{
-			width: 161rpx;
-			height: 161rpx;	
-			border-radius: 50%;
-		}
-	}
-	.logo{
-		font-size: 36rpx;
-		font-weight: 400;
-		color: #44969D;
-		text-align: center;
-	}
-	.phone{
-		height: 43rpx !important;
-		width: 27rpx !important;
-	}
-	.codeimg{
-		height: 39rpx !important;
-		width: 31rpx !important;
 	}
+}
+.logo {
+	font-size: 36rpx;
+	font-weight: 400;
+	color: #44969d;
+	text-align: center;
+}
+.phone {
+	height: 43rpx !important;
+	width: 27rpx !important;
+}
+.codeimg {
+	height: 39rpx !important;
+	width: 31rpx !important;
+}
 .login_text {
 	border-radius: 20rpx;
 	margin-top: 80rpx;
 	.login_input {
 		// border-bottom: 1px solid #C5CEE0;
-		margin-bottom:35rpx;
+		margin-bottom: 35rpx;
 		padding-bottom: 60rpx;
-		.login_img  {
+		.login_img {
 			height: 35rpx;
 			width: 31rpx;
 			margin-right: 20rpx;
@@ -180,12 +190,12 @@ page {
 		.uni-input {
 			text-align: left;
 			width: 400rpx;
-			font-size:32rpx !important;
+			font-size: 32rpx !important;
 		}
 		.login_name {
 			color: #333333;
 			.code {
-				color: #60BAB0;
+				color: #60bab0;
 				font-size: 23rpx;
 				border-left: 1px solid #eeeeee;
 				width: 150rpx;
@@ -196,13 +206,12 @@ page {
 	}
 }
 
-.login{
-	background: linear-gradient(90deg, #60BAB0, #60BAB0, #45969B);
+.login {
+	background: linear-gradient(90deg, #60bab0, #60bab0, #45969b);
 	margin-top: 96rpx;
-	color: #FFFFFF;
+	color: #ffffff;
 	text-align: center;
 	padding: 26rpx 0rpx;
 	border-radius: 20rpx;
 }
-
 </style>

+ 5 - 3
pages/public/login.vue

@@ -4,7 +4,7 @@
 		<view class="loginText">请使用您的账号登录</view>
 		<view class="login-box">
 			<view class="username">账号</view>
-			<input class="input-box" type="number" v-model="phone" placeholder="请输入账号" />
+			<input class="input-box" type="text" v-model="phone" placeholder="请输入账号" />
 		</view>
 		<view class="login-box">
 			<view class="username">密码</view>
@@ -34,7 +34,9 @@ export default {
 			password: '',
 		};
 	},
-	onLoad() {},
+	onLoad() {
+		uni.hideLoading();
+	},
 	
 	methods: {
 		...mapMutations('user', ['setUserInfo', 'login']),
@@ -46,7 +48,7 @@ export default {
 			let obj = this;
 			obj.logining = true;
 			if (obj.phone == '') {
-				obj.$api.msg('请输入手机号');
+				obj.$api.msg('请输入号');
 				return;
 			}
 			if (obj.password == '') {

+ 172 - 160
pages/public/register.vue

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

+ 0 - 208
pages/set/address.vue

@@ -1,208 +0,0 @@
-<template>
-	<view class="content b-t">
-		<view class="list" v-for="(item, index) in addressList" :key="index" @click="checkAddress(item)">
-			<view class="wrapper">
-				<view class="address-box">
-					<text class="name">{{ item.real_name }}</text>
-					<text class="mobile">{{ item.phone }}</text>
-				</view>
-				<view class="u-box">
-					<text class="address">{{ item.province + item.city + item.district }} {{ item.detail }}</text>
-				</view>
-			</view>
-			<view class="buttom">
-				<view class="default-buttom" @click.stop="defaultUp(item,index)">
-					<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.is_default == 1 }"></view>
-					<text class="text">设为默认地址</text>
-				</view>
-				<view class="operation">
-					<view @click.stop="addAddress('edit', item)">
-						<text class="iconfont iconedit"></text>
-						<text class="text">编辑</text>
-					</view>
-					<view class="blank"></view>
-					<view @click.stop="delAddress(item)">
-						<text class="iconfont icondelete"></text>
-						<text class="text">删除</text>
-					</view>
-				</view>
-			</view>
-		</view>
-		<button class="add-btn" @click="addAddress('add')">新增地址</button>
-	</view>
-</template>
-
-<script>
-import { getAddressList,setAddressDefault,addressDel } from '@/api/user.js';
-export default {
-	data() {
-		return {
-			source: 0,
-			addressList: []
-		};
-	},
-	onLoad(option) {
-		this.source = option.source||0
-		this.loadAddress();
-	},
-	methods: {
-		// 加载地址
-		loadAddress() {
-			getAddressList({
-				page: 1,
-				limit: 100
-			}).then(({ data }) => {
-				this.addressList = data;
-			});
-		},
-		// 设为默认地址
-		defaultUp(data,ind) {
-			this.addressList=this.addressList.map((e) => {
-				e.is_default=0
-				return e
-			})
-			this.addressList[ind].is_default=1
-			setAddressDefault({
-				id: data.id
-			}).then(({ data }) => {
-				this.loadAddress();
-			}).catch((e) => {
-				console.log(e);
-			});
-		},
-		//删除地址
-		delAddress(item) {
-			addressDel({
-				id:item.id
-			}).then(({data})=>{
-				this.$api.msg('删除成功')
-			})
-			let s = this.addressList.indexOf(item);
-			this.addressList.splice(s, 1);
-		},
-		//选择地址
-		checkAddress(item) {
-			if (this.source == 1) {
-				//this.$api.prePage()获取上一页实例,在App.vue定义
-				this.$api.prePage().addressData = item;
-				uni.navigateBack();
-			}
-		},
-		// 添加地址
-		addAddress(type, item) {
-			uni.navigateTo({
-				url: `/pages/set/addressManage?type=${type}&data=${JSON.stringify(item)}`
-			});
-		},
-		//添加或修改成功之后回调
-		refreshList() {
-			// 重新加载地址
-			this.loadAddress()
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page {
-	padding-bottom: 120rpx;
-	padding-top: 20rpx;
-	background-color: $page-color-base;
-}
-.content {
-	position: relative;
-}
-.list {
-	align-items: center;
-	padding: 20rpx 30rpx;
-	background: #fff;
-	margin: 20rpx;
-	margin-top: 0;
-	.buttom {
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		padding-top: 10rpx;
-		.checkbox {
-			font-size: 44rpx;
-			line-height: 1;
-			padding: 4rpx;
-			color: $font-color-disabled;
-			background: #fff;
-			border-radius: 50px;
-		}
-		.checkbox.checked {
-			color: $base-color;
-		}
-		.default-buttom {
-			display: flex;
-			align-items: center;
-		}
-		.operation {
-			display: flex;
-			align-items: center;
-			.blank {
-				width: 30rpx;
-			}
-		}
-		.text {
-			padding-left: 10rpx;
-			font-size: 24rpx;
-			color: #666666;
-		}
-	}
-}
-.wrapper {
-	display: flex;
-	flex-direction: column;
-	flex: 1;
-	border-bottom: 1px solid #f0f0f0;
-	padding-bottom: 20rpx;
-}
-.address-box {
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
-	.address {
-		font-size: $font-base + 2rpx;
-		color: $font-color-dark;
-	}
-	.mobile {
-		font-size: $font-base;
-		color: rgba(51, 51, 51, 1);
-	}
-}
-.u-box {
-	font-size: $font-base;
-	color: $font-color-light;
-	margin-top: 16rpx;
-	.name {
-		margin-right: 30rpx;
-	}
-}
-.icon-bianji {
-	display: flex;
-	align-items: center;
-	height: 80rpx;
-	font-size: 40rpx;
-	color: $font-color-light;
-	padding-left: 30rpx;
-}
-
-.add-btn {
-	position: fixed;
-	left: 30rpx;
-	right: 30rpx;
-	bottom: 16rpx;
-	z-index: 95;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 690rpx;
-	height: 80rpx;
-	font-size: $font-lg;
-	color: #fff;
-	background-color: $base-color;
-	border-radius: 10rpx;
-}
-</style>

+ 0 - 219
pages/set/addressManage.vue

@@ -1,219 +0,0 @@
-<template>
-	<view class="content">
-		<view class="row b-b">
-			<text class="tit">联系人</text>
-			<input class="input" type="text" v-model="addressData.name" placeholder="收货人姓名" placeholder-class="placeholder" />
-		</view>
-		<view class="row b-b">
-			<text class="tit">手机号</text>
-			<input class="input" type="number" v-model="addressData.mobile" placeholder="收货人手机号码" placeholder-class="placeholder" />
-		</view>
-		<view class="row b-b">
-			<text class="tit">地址</text>
-			<pickerAddress class="input" @change="onCityClick">{{addressDetail||'请选择地址'}}</pickerAddress>
-			<text class="iconfont iconlocation"></text>
-		</view>
-		<view class="row b-b">
-			<text class="tit">门牌号</text>
-			<input class="input" type="text" v-model="addressData.area" placeholder="楼号、门牌" placeholder-class="placeholder" />
-		</view>
-
-		<uni-list class="margin-t-20">
-			<uni-list-item
-				title="设为默认"
-				:switch-checked="addressData.default"
-				:show-switch="true"
-				:show-arrow="false"
-				switch-color="#5dbc7c"
-				@switchChange="switchChange"
-			></uni-list-item>
-		</uni-list>
-
-		<button class="add-btn" @click="confirm">提交</button>
-	</view>
-</template>
-
-<script>
-import uniList from '@/components/uni-list/uni-list.vue';
-import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
-import uniPopup from '@/uview-ui/components/u-popup/u-popup.vue';
-import  pickerAddress from '@/components/wangding-pickerAddress/wangding-pickerAddress.vue';
-import { addressEdit } from '@/api/user.js';
-export default {
-	components: {
-		uniList,
-		uniListItem,
-		pickerAddress,
-		uniPopup
-	},
-	data() {
-		return {
-			addressDetail: '',
-			addressData: {
-				name: '',
-				mobile: '',
-				address: {
-					province: '',
-					city: '',
-					district: ''
-				},
-				area: '',
-				default: false
-			}
-		};
-	},
-	onLoad(option) {
-		let title = '新增收货地址';
-		if (option.type === 'edit') {
-			title = '编辑收货地址';
-			let data = JSON.parse(option.data);
-			console.log(data);
-
-			this.addressData = {
-				name: data.real_name,
-				mobile: data.phone,
-				address: {
-					province: data.province,
-					city: data.city,
-					district: data.district
-				},
-				area: data.detail,
-				default: data.is_default == 1,
-				id: data.id
-			};
-			this.addressDetail = data.province + data.city + data.district;
-		}
-		this.manageType = option.type;
-		uni.setNavigationBarTitle({
-			title
-		});
-	},
-	methods: {
-		// 选中城市切换
-		onCityClick({data}) {
-			let address = this.addressData.address;
-			address.province = data[0];
-			address.city = data[1];
-			address.district = data[2];
-			this.addressDetail = data.join('');
-		},
-		//地图选择地址
-		chooseLocation() {
-			uni.chooseLocation({
-				success: data => {
-					console.log(data);
-					this.addressData.addressName = data.name;
-					this.addressData.address = data.name;
-				}
-			});
-		},
-		// 设置是否为默认地址
-		switchChange(e) {
-			this.addressData.default = e.value;
-		},
-		//提交
-		confirm() {
-			let obj = this;
-			let data = this.addressData;
-			if (!data.name) {
-				this.$api.msg('请填写收货人姓名');
-				return;
-			}
-			if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(data.mobile)) {
-				this.$api.msg('请输入正确的手机号码');
-				return;
-			}
-			if (!data.address) {
-				this.$api.msg('请在地图选择所在位置');
-				return;
-			}
-			if (!data.area) {
-				this.$api.msg('请填写门牌号信息');
-				return;
-			}
-
-			//this.$api.prePage()获取上一页实例,可直接调用上页所有数据和方法,在App.vue定义
-			addressEdit({
-				real_name: data.name,
-				phone: data.mobile,
-				address: {
-					province: data.address.province,
-					city: data.address.city,
-					district: data.address.district
-				},
-				detail: data.area,
-				is_default: data.default,
-				id: data.id||"",
-				type:1
-			}).then(function(e) {
-				obj.$api.prePage().refreshList();
-				uni.showToast({
-					title:'提交成功',
-					duration:2000
-				});
-				setTimeout(function() {
-					uni.navigateBack();
-				}, 800);
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page {
-	background: $page-color-base;
-	padding-top: 16rpx;
-}
-
-.row {
-	display: flex;
-	align-items: center;
-	position: relative;
-	padding: 0 30rpx;
-	height: 110rpx;
-	background: #fff;
-
-	.tit {
-		flex-shrink: 0;
-		width: 120rpx;
-		font-size: 30rpx;
-		color: $font-color-dark;
-	}
-	.input {
-		flex: 1;
-		font-size: 30rpx;
-		color: $font-color-dark;
-	}
-	.iconlocation {
-		font-size: 36rpx;
-		color: $font-color-light;
-	}
-}
-.default-row {
-	margin-top: 16rpx;
-	.tit {
-		flex: 1;
-	}
-	switch {
-		transform: translateX(16rpx) scale(0.9);
-	}
-}
-.add-btn {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 690rpx;
-	height: 80rpx;
-	margin: 60rpx auto;
-	font-size: $font-lg;
-	color: #fff;
-	background-color: $base-color;
-	border-radius: 10rpx;
-	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
-}
-
-.alert-box {
-	background-color: #ffffff;
-}
-</style>

+ 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>

+ 157 - 98
pages/set/password.vue

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

+ 0 - 161
pages/set/phone.vue

@@ -1,161 +0,0 @@
-<template>
-	<view class="container">
-		<view class="row b-b">
-			<text class="tit">手机号</text>
-			<input class="input" v-model="account" type="text" placeholder="请填写手机号" placeholder-class="placeholder" />
-		</view>
-		<view>
-			<view class="row b-b">
-				<text class="tit">验证码</text>
-				<input class="input" v-model="captcha" type="text" placeholder="请填写验证码" placeholder-class="placeholder" />
-				<view class="code" @click="verification">{{ countDown == 0 ? '验证码' : countDown }}</view>
-			</view>
-			<button class="add-btn" :class="{ 'bg-gray': loding }" @click="loding ? '' : confirm()">提交</button>
-		</view>
-	</view>
-</template>
-
-<script>
-import { verify } from '@/api/login.js';
-import { mapState } from 'vuex';
-import { registerReset, binding } from '@/api/set.js';
-export default {
-	data() {
-		return {
-			time: '', //保存倒计时对象
-			countDown: 0, //倒计时
-			account: '', //手机号
-			captcha: '', //验证码
-			password: '', //新密码
-			loding: false //是否载入中
-		};
-	},
-	watch: {
-		// 监听倒计时
-		countDown(i) {
-			if (i == 0) {
-				clearInterval(this.time);
-			}
-		}
-	},
-	computed: {
-		...mapState(['userInfo'])
-	},
-	onLoad() {
-		if (this.userInfo.phone == null) {
-			this.account = '';
-		} else {
-			this.account = this.userInfo.phone;
-			this.show = false;
-		}
-	},
-	methods: {
-		//发送验证码
-		verification() {
-			let obj = this;
-			if (this.account == '') {
-				this.$api.msg('请输入电话号码');
-				return;
-			}
-			if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.account)) {
-				this.$api.msg('请输入正确的手机号');
-				return;
-			}
-			// 判断是否在倒计时
-			if (obj.countDown > 0) {
-				return false;
-			} else {
-				obj.countDown = 60;
-				obj.time = setInterval(() => {
-					obj.countDown--;
-				}, 1000);
-				//调用验证码接口
-				verify({
-					phone: obj.account,
-					type: 'BDING_CODE'
-				})
-					.then(({ data }) => {})
-					.catch(err => {
-						console.log(err);
-					});
-			}
-		},
-		confirm(e) {
-			let obj = this;
-			obj.loding = true;
-			binding({
-				phone: obj.account,
-				captcha: obj.captcha
-			})
-				.then(({ data }) => {
-					obj.$api.msg('绑定成功!');
-					setTimeout(function() {
-						obj.loding = false;
-						uni.switchTab({
-							url: '/pages/user/user'
-						});
-					}, 1000);
-				})
-				.catch(err => {
-					obj.loding = false;
-					console.log(err);
-				});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page {
-	background: $page-color-base;
-}
-.row {
-	display: flex;
-	align-items: center;
-	position: relative;
-	padding: 0 30rpx;
-	height: 110rpx;
-	background: #fff;
-
-	.tit {
-		flex-shrink: 0;
-		width: 120rpx;
-		font-size: 30rpx;
-		color: $font-color-dark;
-	}
-	.input {
-		flex: 1;
-		font-size: 30rpx;
-		color: $font-color-dark;
-	}
-	.iconlocation {
-		font-size: 36rpx;
-		color: $font-color-light;
-	}
-}
-.add-btn {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 690rpx;
-	height: 80rpx;
-	margin: 60rpx auto;
-	font-size: $font-lg;
-	color: #fff;
-	background-color: $base-color;
-	border-radius: 10rpx;
-	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
-}
-
-.bg-gray {
-	background-color: $color-gray;
-}
-.code {
-	color: #5dbc7c;
-	font-size: 23rpx;
-	border-left: 1px solid #eeeeee;
-	width: 150rpx;
-	flex-shrink: 0;
-	text-align: center;
-}
-</style>

+ 0 - 113
pages/set/set.vue

@@ -1,113 +0,0 @@
-<template>
-	<view class="container">
-		<uni-list>
-		    <uni-list-item title="个人资料" @click="navTo('/pages/set/userinfo')" ></uni-list-item>
-			<uni-list-item title="修改密码" @click="navTo('/pages/set/password')" ></uni-list-item>
-		    <uni-list-item title="实名认证" @click="navTo('/pages/set/phone')" ></uni-list-item>
-		    <uni-list-item title="收货地址" @click="navTo('/pages/set/address')" ></uni-list-item>
-		</uni-list>
-		<uni-list class="margin-t-20">
-		    <uni-list-item title="消息推送" :switch-checked='true' :show-switch="true" :show-arrow="false" switch-color='#5dbc7c'  @switchChange='switchChange'> 
-			</uni-list-item>
-		</uni-list>
-		
-		<uni-list class="margin-t-20">
-		    <uni-list-item title="清除缓存" ></uni-list-item>
-		    <uni-list-item title="检查更新" >
-				<template slot="right">
-					当前版本 1.0.3
-				</template>
-			</uni-list-item>
-		</uni-list>
-		<view class="list-cell log-out-btn" @click="toLogout">
-			<text class="cell-tit">退出登录</text>
-		</view>
-	</view>
-</template>
-
-<script>
-	import uniList from "@/components/uni-list/uni-list.vue"
-	import uniListItem from "@/components/uni-list-item/uni-list-item.vue"
-	import { logout } from '@/api/set.js';
-	import {  
-	    mapMutations  
-	} from 'vuex';
-	export default {
-		components: {
-			uniList,uniListItem
-		},
-		data() {
-			return {
-				
-			};
-		},
-		methods:{
-			...mapMutations('user',['logout']),
-			navTo(url){
-				uni.navigateTo({
-					url:url
-				})
-			},
-			//退出登录
-			toLogout(){
-				let obj = this;
-				uni.showModal({
-				    content: '确定要退出登录么',
-				    success: (e)=>{
-				    	if(e.confirm){
-							logout({}).then((e) => {
-								uni.navigateBack();
-							}).catch((e) => {
-								console.log(e);
-							})
-				    		obj.logout();
-				    	}
-				    }
-				});
-			},
-			//switch切换触发方法
-			switchChange(e){
-				console.log(e);
-				let statusTip = e.value ? '打开': '关闭';
-				this.$api.msg(`${statusTip}消息推送`);
-			},
-
-		}
-	}
-</script>
-
-<style lang='scss'>
-	page{
-		background: $page-color-base;
-	}
-	.list-cell{
-		display:flex;
-		align-items:baseline;
-		padding: 20rpx $page-row-spacing;
-		line-height:60rpx;
-		position:relative;
-		background: #fff;
-		justify-content: center;
-		&.log-out-btn{
-			margin-top: 40rpx;
-			.cell-tit{
-				color: $uni-color-primary;
-				text-align: center;
-				margin-right: 0;
-			}
-		}
-		.cell-tit{
-			flex: 1;
-			font-size: $font-base + 2rpx;
-			color: $font-color-dark;
-			margin-right:10rpx;
-		}
-		.cell-tip{
-			font-size: $font-base;
-			color: $font-color-light;
-		}
-		switch{
-			transform: translateX(16rpx) scale(.84);
-		}
-	}
-</style>

+ 1 - 1
pages/set/userinfo.vue

@@ -14,7 +14,7 @@
 		</view>
 		<view class="row">
 			<text class="tit">账户</text>
-			<input class="input" type="text"  disabled="true" v-model="userInfo.phone" placeholder-class="placeholder" />
+			<input class="input" type="text"  disabled="true" v-model="userInfo.account" placeholder-class="placeholder" />
 		</view>
 		<view class="add-btn" @click="confirm">提交</view>
 		<view class="out" @click="toLogout">退出登录</view>

+ 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>

+ 0 - 310
pages/user/coupon.vue

@@ -1,310 +0,0 @@
-<template>
-	<view class="content">
-		<view class="navbar">
-			<view v-for="(item,index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
-		</view>
-		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<!-- 空白页 -->
-				<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-				<view v-for="(item, index) in tabItem.orderList" :key="index" class="row flex">
-					<view class="list-money flex">
-						<image :src="item._type == 2 ? '/static/img/img03.png' : '/static/img/img02.png'" mode="scaleToFill"></image>
-						<view class="list-money-text">
-							<view class="tit" :class="{ action: item._type} == 2">
-								<text>{{ item.coupon_price }}</text>
-							</view>
-							<view class="price">
-								<text>满{{ item.use_min_price }}元</text>
-							</view>
-						</view>
-					</view>
-					<view class="list-interval position-relative">
-						<view class="bottom"></view>
-						<view class="top"></view>
-					</view>
-					<view class="row_list_right">
-						<view class="right_top">
-							<text class="right_title" :class="{ action: item._type == 2}">{{ item.coupon_title }}</text>
-						</view>
-						<view class="right_time">
-							<text>{{ item._add_time }}-{{ item.end_time }}</text>
-						</view>
-						<view class="right_use action" v-if="item._type == 2">
-							<text>{{ item._msg }}</text>
-						</view>
-						<view class="right_use noAction" v-if="item._type == 0">
-							<text>{{ item._msg }}</text>
-						</view>
-					</view>
-				</view>
-				<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-
-<script>
-import uniLoadMore from '@/uview-ui/components/u-loadmore/u-loadmore.vue';
-import empty from '@/uview-ui/components/u-empty/u-empty.vue';
-// import { getCouponsList } from '@/api/order.js';
-export default{
-	components: {
-		uniLoadMore,
-		empty
-	},
-	data() {
-		return {
-			tabCurrentIndex: 0,
-			navList:[
-				{
-					state: 0,
-					text: '全部',
-					loadingType: 'more',
-					orderList: [],
-					page: 1,//当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 1,
-					text: '未使用',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 2,
-					text: '已使用',
-					loadingType: 'more',
-					orderList: [],
-					page: 1,//当前页数
-					limit: 10 //每次信息条数
-				}
-			]
-		};
-	},
-	onLoad(options) {
-		this.loadData();
-	},
-	methods: {
-		//返回首页
-		navTo(){
-			uni.switchTab({
-				url: '/pages/index/index'
-			});
-		},
-		//获取订单列表
-		loadData(source) {
-			//将订单挂载到tab列表下
-			let index = this.tabCurrentIndex;
-			let navItem = this.navList[index];
-			let state = navItem.state;
-			if (source === 'tabChange' && navItem.loaded === true) {
-				//tab切换只有第一次需要加载数据
-				return;
-			}
-			if (navItem.loadingType === 'loading'){
-				//防止重复加载
-				return;
-			}
-			//修改当前对象状态为加载中
-			navItem.loadingType = 'loading';
-			getCouponsList(
-				{
-					page: navItem.page,
-					limit: navItem.limit
-				},
-				index
-			)
-				.then(({ data }) => {
-					let da = data.map(e => {
-						e.coupon_price = +e.coupon_price.replace(',', '');
-						e.use_min_price = +e.use_min_price.replace(',', '');
-						return e
-					});
-					navItem.orderList = navItem.orderList.concat(da);
-					console.log(navItem.orderList);
-					navItem.page++;
-					if (navItem.limit == data.length) {
-						// 判断是否还有数据,有改为more,没有改为noMore
-						navItem.loadingType = 'more';
-						return;
-					}else {
-						navItem.loadingType = 'noMore';
-					}
-					uni.hideLoading();
-					this.$set(navItem, 'loaded', true);
-				})
-				.catch(e => {
-					console.log(e);
-				})
-		},
-		//swiper 切换
-		changeTab(e) {
-			this.tabCurrentIndex = e.target.current;
-			this.loadData('tabChange');
-		},
-		//顶部tab点击
-		tabClick(index) {
-			this.tabCurrentIndex = index;
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-// 卡卷可用时颜色
-$card-color-action: #fc4141;
-page,
-.content {
-	background: $page-color-base;
-	height: 100%;
-}
-
-.navbar {
-	display: flex;
-	height: 40px;
-	padding: 0 5px;
-	background: #fff;
-	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-	position: relative;
-	z-index: 10;
-	.nav-item {
-		flex: 1;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		height: 100%;
-		font-size: 15px;
-		color: $font-color-dark;
-		position: relative;
-		&.current {
-			color: #bc253a;
-			&:after {
-				content: '';
-				position: absolute;
-				left: 50%;
-				bottom: 0;
-				transform: translateX(-50%);
-				width: 44px;
-				height: 0;
-				border-bottom: 2px solid #bc253a;
-			}
-		}
-	}
-}
-
-.swiper-box {
-	height: calc(100% - 40px);
-	.tab-content {
-		padding: 25rpx 0px;
-		font-size: 28rpx;
-		color: #1b1b1b;
-	}
-}
-
-.row {
-	border-radius: 15rpx;
-	margin: 0 25rpx;
-	margin-bottom: 25rpx;
-	height: 200rpx;
-	overflow: hidden;
-	background-color: #ffffff;
-	.list-interval {
-		border: 1px dashed $border-color-light;
-		height: 100%;
-		.top,
-		.bottom {
-			border-radius: 100rpx;
-			width: 30rpx;
-			height: 30rpx;
-			position: absolute;
-			background-color: $page-color-base;
-			right: -15rpx;
-		}
-		.top {
-			top: -18rpx;
-		}
-		.bottom {
-			bottom: -18rpx;
-		}
-	}
-	.list-money {
-		height: 100%;
-		image {
-			height: 100%;
-			width: 20rpx;
-		}
-		.list-money-text {
-			width: 220rpx;
-			padding: 0 25rpx;
-			text-align: center;
-			color: $font-color-light;
-			.tit {
-				padding: 15rpx 0rpx;
-				font-size: 55rpx;
-				font-weight: bold;
-				&.action {
-					color: $card-color-action;
-				}
-			}
-			.price {
-				padding-bottom: 25rpx;
-			}
-		}
-	}
-	.row_list_right {
-		flex-grow: 1;
-		padding-left: 25rpx;
-		line-height: 1;
-		.right_time {
-			color: $font-color-light;
-			font-size: $font-sm;
-		}
-		.right_use {
-			margin: 15rpx 0;
-			padding: 10rpx;
-			width: 140rpx;
-			text_align: center;
-			border-radius: 50rpx;
-			color: #fff;
-			font-size: $font-sm - 4rpx;
-			&.action {
-				background-color: $card-color-action;
-			}
-			&.noAction {
-				background-color: $color-gray;
-			}
-		}
-		.right_top {
-			margin: 15rpx 0;
-			font-size: $font-lg;
-			height: 50rpx;
-			color: $font-color-light;
-			.right_name {
-				font-weight: bold;
-			}
-			.right_title {
-				font-weight: bold;
-				&.action {
-					color: $font-color-base;
-				}
-			}
-		}
-	}
-	
-	.iconlocation {
-		font-size: 36rpx;
-		color: $font-color-light;
-	}
-}
-// uni-load-more
-.uni-load-more {
-	display: flex;
-	flex-direction: row;
-	height: 80rpx;
-	align-items: center;
-	justify-content: center;
-}
-</style>

+ 199 - 83
pages/user/extension.vue

@@ -1,53 +1,85 @@
 <template>
 	<view class="content">
+		<view class="status_bar"><!-- 这里是状态栏 --></view>
 		<view class="content-money">
 			<view class="money-box">
-				<view class="goback-box" @click="toBack">
-					<image class="goback" src="../../static/img/fanhui.png" mode=""></image>
-				</view>
+				<view class="goback-box" @click="toBack"><image class="goback" src="../../static/img/fanhui.png" mode=""></image></view>
 				<view class="header">我的推广</view>
 				<image class="tuiguang_bg" src="../../static/img/share-bg.png"></image>
 				<!--  <view class="money_img"><image :src="list.avatar || img"></image></view> -->
 				<view class="money-frame">
 					<!-- <view class="money_name">我的推广</view> -->
 					<view class="money_num">
-						{{ all || '0' }}
+						{{ team || '0' }}
 						<text class="money_ren">人</text>
 					</view>
 				</view>
 			</view>
 		</view>
-		<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
-			<!-- 空白页 -->
-			<empty v-if="orderList.length === 0"></empty>
-
-			<!-- 订单列表 -->
-			<view v-for="(item, index) in orderList" :key="index" class="order-item flex">
-				<view class="title-box flex_item">
-					<view class="title-avatar"><image :src="item.avatar"></image></view>
-					<view class="list_tpl">
-						<view class="title">
-							<text>{{ item.nickname }}</text>
-						</view>
-						<view class="time">
-							<text>{{ item.time }}</text>
-						</view>
-					</view>
+		<view class="main">
+			<view class="main-box flex">
+				<view class="item">
+					<view class="num">{{myPerformance || 0}}</view>
+					<view class="font ">我的业绩</view>
+				</view>
+				<view class="item">
+					<view class="num">{{plotPerformance || 0}}</view>
+					<view class="font ">小区业绩</view>
+				</view>
+			</view>
+			<view class="main-box bottom flex">
+				<view class="item">
+					<view class="num">{{push || 0}}</view>
+					<view class="font ">直推人数</view>
+				</view>
+				<view class="item">
+					<view class="num">{{team || 0}}</view>
+					<view class="font ">团队人数</view>
 				</view>
 			</view>
-			<uni-load-more :status="loadingType"></uni-load-more>
-		</scroll-view>
+		</view>
+		<view class="box">
+			<view class="box-item flex">
+				<view class="box-left">昨日拼购奖励</view>
+				<view class="box-right">{{yesterday.pink || 0}}USDT</view>
+			</view>
+			<view class="box-item flex">
+				<view class="box-left">昨日分享奖励</view>
+				<view class="box-right">{{yesterday.recommend || 0}}USDT</view>
+			</view>
+			<view class="box-item flex">
+				<view class="box-left">昨日团队奖励</view>
+				<view class="box-right">{{yesterday.group || 0}}USDT</view>
+			</view>
+		</view>
+		<view class="box">
+			<view class="box-item flex">
+				<view class="box-left">累计拼购奖励</view>
+				<view class="box-right">{{all.pink || 0}}USDT</view>
+			</view>
+			<view class="box-item flex">
+				<view class="box-left">累计分享奖励</view>
+				<view class="box-right">{{all.recommend || 0}}USDT</view>
+			</view>
+			<view class="box-item flex">
+				<view class="box-left">累计团队奖励</view>
+				<view class="box-right">{{all.group || 0}}USDT</view>
+			</view>
+		</view>
+		<view class="liebiao flex" @click="navto('/pages/user/extensionList')">
+			<view class="left flex">
+				<image src="../../static/img/myTeam.png" mode=""></image>
+				<view class="leibiao-font">推广列表</view>
+			</view>
+			<image src="../../static/img/jiantou.png" mode=""></image>
+		</view>
 	</view>
 </template>
 <script>
+import { spread } from '@/api/finance.js';
 import { mapState, mapMutations } from 'vuex';
-import uniLoadMore from '@/uview-ui/components/u-loading-page/u-loading-page.vue';
-import empty from '@/uview-ui/components/u-empty/u-empty.vue';
+import { gitExtension } from '@/api/user.js';
 export default {
-	components: {
-		empty,
-		uniLoadMore
-	},
 	onReady() {
 		// 初始化获取页面宽度
 		uni.createSelectorQuery()
@@ -70,23 +102,36 @@ export default {
 		return {
 			// 头部图高度
 			maxheight: '',
-			orderList: [
-				{
-					nickname:'lan',
-					time:'2021-9-9'
-				}
-			],
-			all: '',
-			loadingType:'',
-			page: 1,
-			limit: 10,
+			myPerformance:'',//我的业绩
+			plotPerformance:'',//小区业绩
+			push:'',//直推人数
+			team:'',//团队人数
+			all: '', //累计奖励
+			yesterday:'',//昨日
 		};
 	},
-	onLoad(options) {},
+	onLoad(options) {
+		this.loadData(); //onload只是在第一次进入页面会刷新数据,从二级页面回来不会重新加载数据
+	},
+
 	onShow() {
-		
+		//onShow没有参数
+		this.loadData(); //onshow在每次打开页面都会加载数据,可以用于数据在需要刷新的环境下
 	},
 	methods: {
+		async loadData() {
+			gitExtension({}).then(({data}) => {
+				console.log(data)
+				this.myPerformance = data.achievement;
+				this.plotPerformance = data.small_achivement;
+				this.push = data.recommend_num;
+				this.team = data.group_num;
+				this.all = data.all;
+				this.yesterday = data.yesterday;
+			})
+			
+		},
+
 		// 页面跳转
 		navto(e) {
 			uni.navigateTo({
@@ -98,19 +143,27 @@ export default {
 			uni.switchTab({
 				url: '/pages/user/user'
 			});
-		}
+		},
+		
 	}
 };
 </script>
 
 <style lang="scss">
+.status_bar {
+	height: var(--status-bar-height);
+	width: 100%;
+	background: linear-gradient(90deg, #60bab0, #45969b);
+}
 page {
-	background: #ffffff;
+	background: #f8f8f8;
 	height: 100%;
 }
+
 .content-money {
 	padding-bottom: 30rpx;
 	background: $page-color-base;
+
 	.buttom-box {
 		position: relative;
 		background-color: #ffffff;
@@ -119,27 +172,33 @@ page {
 		padding: 30rpx 0;
 		border-radius: $border-radius-sm;
 		margin-top: -80rpx;
+
 		.buttom {
 			font-size: $font-lg;
 			flex-grow: 1;
+
 			.money {
 				font-weight: bold;
 				font-size: 32rpx;
 				color: #ff0000;
 			}
 		}
+
 		.text {
 			color: #666666;
 		}
+
 		.interval {
 			width: 2rpx;
 			height: 60rpx;
 			background-color: #eeeeee;
 		}
+
 		.icon {
 			height: 50rpx;
 			width: 48rpx;
 			margin: 0 auto;
+
 			.icon-img {
 				width: 100%;
 				height: 100%;
@@ -147,6 +206,7 @@ page {
 		}
 	}
 }
+
 .money-box {
 	// background: $base-color;
 	height: 424rpx;
@@ -154,6 +214,7 @@ page {
 	text-align: center;
 	font-size: 35rpx;
 	position: relative;
+
 	// padding-top: 60rpx;
 	.header {
 		position: absolute;
@@ -168,6 +229,7 @@ page {
 		justify-content: center;
 		align-items: center;
 	}
+
 	.goback-box {
 		position: absolute;
 		left: 18rpx;
@@ -176,22 +238,26 @@ page {
 		display: flex;
 		align-items: center;
 	}
+
 	.goback {
 		z-index: 100;
 		width: 34rpx;
 		height: 34rpx;
 	}
+
 	.tuiguang_bg {
 		width: 100%;
 		height: 424rpx;
 		position: relative;
 	}
+
 	.money_img {
 		width: 100%;
 		height: 120rpx;
 		text-align: center;
 		padding-top: 50rpx;
 		padding-bottom: 135rpx;
+
 		image {
 			width: 120rpx;
 			height: 120rpx;
@@ -199,6 +265,7 @@ page {
 			border-radius: 50%;
 		}
 	}
+
 	.money-frame {
 		position: absolute;
 		top: 0;
@@ -211,6 +278,7 @@ page {
 		// flex-direction: column;
 		// justify-content: center;
 	}
+
 	.money_name {
 		width: 100%;
 		text-align: center;
@@ -219,11 +287,13 @@ page {
 		font-weight: bold;
 		color: #ffffff;
 	}
+
 	.money_num {
 		font-size: 72rpx;
 		font-family: PingFang SC;
 		font-weight: bold;
 		color: #ffffff;
+
 		.money_ren {
 			font-size: 36rpx;
 		}
@@ -238,6 +308,7 @@ page {
 	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
 	position: relative;
 	z-index: 10;
+
 	.nav-item {
 		flex: 1;
 		display: flex;
@@ -247,8 +318,10 @@ page {
 		font-size: 15px;
 		color: $font-color-dark;
 		position: relative;
+
 		&.current {
 			color: #ff0000;
+
 			&:after {
 				content: '';
 				position: absolute;
@@ -262,54 +335,97 @@ page {
 		}
 	}
 }
-// 列表
 
-
-	.order-item {
-		padding: 20rpx 30rpx;
-		line-height: 1.5;
-		.title-box {
-			width: 100%;
-			.title-avatar {
-				width: 100rpx;
-				height: 100rpx;
-				margin-right: 25rpx;
-				background: #03A9F4;
-				border-radius: 100%;
-				image {
-					width: 100%;
-					height: 100%;
-					border-radius: 100%;
-				}
+.main {
+	position: relative;
+	z-index: 10;
+	width: 691rpx;
+	height: auto;
+	background: #ffffff;
+	box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+	border-radius: 20rpx;
+	margin: -160rpx auto 0;
+	padding: 40rpx 100rpx;
+	.bottom {
+		margin-top: 50rpx;
+	}
+	.main-box {
+		justify-content: space-between;
+		align-items: center;
+		.item {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			.num {
+				font-size: 38rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #0f253a;
 			}
-			.list_tpl {
-				width: 85%;
-				.title {
-					font-size: $font-lg;
-					color: $font-color-base;
-					overflow: hidden; //超出的文本隐藏
-					text-overflow: ellipsis; //溢出用省略号显示
-					white-space: nowrap;
-				}
-				.time {
-					font-size: $font-base;
-					color: $font-color-light;
-				}
+			.font {
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #6d7c88;
+				margin-top: 18rpx;
 			}
 		}
-		.money {
-			color: #db1935;
-			font-size: $font-lg;
+	}
+}
+.box {
+	width: 690rpx;
+	background: #FFFFFF;
+	box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.05);
+	border-radius: 20rpx;
+	margin: 20rpx auto;
+	padding: 34rpx;
+	.box-item:first-child{
+		margin-top: 0;
+	}
+	.box-item {
+		margin-top: 20rpx;
+		justify-content: space-between;
+		align-items: center;
+		.box-left {
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #6D7C88;
+		}
+		.box-right {
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #0F253A;
 		}
 	}
-
-.list-scroll-content {
-	height: 100%;
 }
-.content {
-	height: 100%;
-	.empty-content {
-		background-color: #ffffff;
+.liebiao {
+	width: 692rpx;
+	background: #FFFFFF;
+	box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+	border-radius: 20rpx;
+	padding: 34rpx;
+	margin: 24rpx auto 0;
+	align-items: center;
+	.left {
+		justify-content: flex-start;
+		align-items: center;
+		image {
+			width: 46rpx;
+			height: 36rpx;
+		}
+		.leibiao-font{
+			margin-left: 10rpx;
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+		}
+	}
+	image {
+		width: 15rpx;
+		height: 27rpx;
 	}
 }
 </style>

+ 137 - 0
pages/user/extensionList.vue

@@ -0,0 +1,137 @@
+<template>
+	<view class="center">
+		<view class="empty-box"><u-empty v-if="orderList.length === 0 && loadingType == 'nomore'"></u-empty></view>
+		<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
+			<!-- 空白页 -->
+			
+
+			<!-- 订单列表 -->
+			<view v-for="(item, index) in orderList" :key="index" class="order-item flex" @click="nav(item)">
+				<view class="title-box flex_item">
+					<view class="title-avatar"><image :src="item.avatar"></image></view>
+					<view class="list_tpl">
+						<view class="title">
+							<text>{{ item.email || item.phone }}</text>
+						</view>
+						<view class="time">
+							<text>{{ item.time }}</text>
+						</view>
+					</view>
+				</view>
+			</view>
+			<u-loadmore v-if="orderList.length != 0" :status="loadingType" />
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+import { spread } from '@/api/finance.js';
+export default {
+	data() {
+		return {
+			orderList: [{}],
+			loadingType: 'loadmore', //页面加载即时刷新
+			page: 1, //默认展示一行
+			limit: 10 //一行展示10条数据
+		};
+	},
+	onLoad(options) {
+		this.loadData(); //onload只是在第一次进入页面会刷新数据,从二级页面回来不会重新加载数据
+	},
+
+	onShow() {
+		//onShow没有参数
+		this.loadData(); //onshow在每次打开页面都会加载数据,可以用于数据在需要刷新的环境下
+	},
+	methods: {
+		async loadData() {
+			
+			if (this.loadingType == 'nomore' || this.loadingType == 'loading') {
+				return;
+			}
+			this.loadingType = 'loading';
+			spread({
+				limit: this.limit,
+				page: this.page
+			}).then(({ data }) => {
+				this.all = data.total;
+				this.orderList = data.list;
+				if (data.length != this.limit) {
+					this.loadingType = 'nomore';
+				} else {
+					this.page++;
+					this.loadingType = 'loadmore';
+				}
+			});
+		},
+		nav(e){
+			uni.navigateTo({
+				url:'/pages/user/rake?uid=' + e.uid
+			})
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.list-scroll-content {
+	height: auto;
+}
+.order-item {
+	padding: 20rpx 30rpx;
+	line-height: 1.5;
+
+	.title-box {
+		width: 100%;
+
+		.title-avatar {
+			width: 100rpx;
+			height: 100rpx;
+			margin-right: 25rpx;
+			border-radius: 100%;
+			image {
+				width: 100%;
+				height: 100%;
+				border-radius: 100%;
+			}
+		}
+
+		.list_tpl {
+			width: 85%;
+
+			.title {
+				font-size: $font-lg;
+				color: $font-color-base;
+				overflow: hidden; //超出的文本隐藏
+				text-overflow: ellipsis; //溢出用省略号显示
+				white-space: nowrap;
+			}
+
+			.time {
+				font-size: $font-base;
+				color: $font-color-light;
+			}
+		}
+	}
+
+	.money {
+		color: #db1935;
+		font-size: $font-lg;
+	}
+}
+.content {
+	height: 100%;
+
+	.empty-content {
+		background-color: #ffffff;
+	}
+}
+.empty-box {
+	position: absolute;
+	top: 0;
+	left: 0;
+	right: 0;
+	width: 100%;
+	height: 100%;
+}
+</style>

+ 0 - 156
pages/user/favorites.vue

@@ -1,156 +0,0 @@
-<template>
-	<view class="container">
-		<!-- 空白页 -->
-		<empty v-if="favoriteList.length < 1"></empty>
-		<view class="favorites flex" v-for="ls in favoriteList" @click="toproduct(ls.pid)">
-			<view class="favorites_img"><image :src="ls.image"></image></view>
-			<view class="favorites_list">
-				<view class="favorites_name">{{ ls.store_name }}</view>
-				<view class="favorites_peice flex">
-					<view>
-						<text>¥{{ ls.price }}</text>
-					</view>
-					<view class="icon_del" @click.prevent.stop="del(ls.pid)" v-show="delshow">
-						<text class="iconfont icondelete"></text>
-						<text>取消</text>
-					</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-import { getcollectList, delcollect } from '@/api/user.js';
-import uniLoadMore from '@/uview-ui/components/u-loadmore/u-loadmore.vue';
-import empty from '@/uview-ui/components/u-empty/u-empty.vue';
-export default {
-	components: {
-		uniLoadMore,
-		empty
-	},
-	data() {
-		return {
-			tabCurrentIndex: 0,
-			favoriteList: '',
-			delshow: true
-		};
-	},
-	onLoad() {
-		this.loadData();
-	},
-	methods: {
-		//获取收藏夹列表
-		loadData() {
-			let obj = this;
-			getcollectList({
-				page: '1',
-				limit: '10'
-			})
-				.then(function(e) {
-					obj.favoriteList = e.data;
-					console.log(obj.favoriteList);
-				})
-				.catch(function(e) {
-					console.log(e);
-				});
-		},
-		//跳转商品详情页
-		toproduct(item) {
-			let id = item;
-			uni.navigateTo({
-				url: `/pages/product/product?id=${id}`
-			})
-		},
-		//删除收藏夹商品
-		del(item) {
-			let obj = this;
-			uni.showModal({
-				title: '提示',
-				content: '是否取消收藏该商品',
-				success: e => {
-					if (e.confirm) {
-						delcollect({
-							id: item,
-							category: 'product'
-						})
-							.then(function(e) {
-								uni.showToast({
-									title: '已取消收藏',
-									duration: 1500,
-								});
-								obj.loadData();
-							})
-							.catch(function(e) {
-								console.log(e);
-							});
-					}
-				}
-			});
-		},
-	}
-}
-</script>
-
-<style lang="scss">
-page {
-	height: 100%;
-}
-%flex-center {
-	display: flex;
-	flex-direction: column;
-	justify-content: center;
-	align-items: center;
-}
-%section {
-	display: flex;
-	justify-content: space-around;
-	align-content: center;
-	background: #fff;
-	border-radius: 10rpx;
-}
-.container {
-	height: 100%;
-	background-color: $page-color-base;
-	padding: 15rpx 0rpx;
-	font-size: 28rpx;
-}
-.favorites {
-	width: 90%;
-	background-color: #ffffff;
-	border-radius: 15rpx;
-	margin: 15rpx auto;
-	padding: 25rpx 25rpx;
-	margin-bottom: 25rpx;
-}
-.favorites_img {
-	width: 80px !important;
-	height: 80px;
-}
-.favorites_img image {
-	width: 100%;
-	height: 100%;
-}
-.favorites_list {
-	width: 70%;
-	padding-left: 20rpx;
-}
-.icon_del {
-	color: $font-color-base;
-	z-index: 9999;
-	font-weight: bold;
-}
-.favorites_name {
-	height: 80rpx;
-	overflow: hidden;
-	text-overflow: ellipsis;
-	display: -webkit-box;
-	-webkit-box-orient: vertial;
-	-webkit-line-clamp: 2;
-}
-.favorites_peice {
-	margin-top: 25rpx;
-	color: #db1935;
-	font-weight: bold;
-}
-</style>

+ 244 - 0
pages/user/fuli.vue

@@ -0,0 +1,244 @@
+<template>
+	<view class="center">
+		<view class="bg"></view>
+		<view class="zong flex">
+			<view class="info">
+				<view class="info-num">{{ USDL || '0' }}</view>
+				<view class="info-font">USDL</view>
+			</view>
+			<view class="info">
+				<view class="info-num">{{ lucky || '0' }}</view>
+				<view class="info-font">幸运值</view>
+			</view>
+			<view class="info">
+				<view class="info-num">{{ honor || '0' }}</view>
+				<view class="info-font">荣誉值</view>
+			</view>
+		</view>
+		<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_target_get * 1}}{{ list.sp_exchange_target }}+{{ list.sp_exchange_bingo_time }}荣誉值
+			</view>
+		</view>
+		<view class="main-title">
+			<view class="shu"></view>
+			<view class="m-title">兑换记录</view>
+		</view>
+		<scroll-view scroll-y class="list-box" @scrolltolower="getList()">
+			<!-- <view class="empty-box"><empty v-if="exchange.length === 0 || loadingType == 'nomore'"></empty></view> -->
+			<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">{{item.time}}</view>
+				</view>
+				<view class="list-right">已兑换</view>
+			</view>
+			<u-loadmore :status="loadingType" />
+		</scroll-view>
+		<view class="btn" @click="nav()">立即兑换</view>
+	</view>
+</template>
+
+<script>
+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 {
+			id: '',
+			lucky: '',
+			honor: '',
+			list: '',
+			USDL: '',
+			exchange: [],
+			page: 1,
+			limit: 10,
+			loadingType: 'loadmore'
+		};
+	},
+	onLoad(option) {
+		this.id = option.id;
+		this.loadData();
+		this.getList();
+	},
+	methods: {
+		async loadData() {
+			lalaDetial({}, this.id)
+				.then(({ data }) => {
+					console.log(data);
+					this.honor = data.exchange_point;
+					this.lucky = data.luck_point-data.exchange_point;
+					this.list = data.data;
+				})
+				.catch(e => {
+					console.log(e);
+				});
+			wallet({}).then(({ data }) => {
+				this.USDL = data.back['USDL'].money.money * 1;
+			});
+		},
+		getList() {
+			if (this.loadingType == 'nomore' || this.loadingType == 'loading') {
+				return;
+			}
+			this.loadingType = 'loading';
+			getSp(
+				{
+					page: this.page,
+					limit: this.limit
+				},
+				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';
+				} else {
+					this.page++;
+					this.loadingType = 'loadmore';
+				}
+			});
+		},
+		nav() {
+			uni.navigateTo({
+				url: '/pages/market/duihuan?id=' + this.id
+			});
+		}
+	}
+};
+</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;
+}
+.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-between;
+	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;
+		}
+	}
+}
+.rule {
+	width: 690rpx;
+	background: #ffffff;
+	box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.05);
+	border-radius: 20rpx;
+	margin: 16rpx auto 0;
+	padding: 26rpx 36rpx;
+	.rule-title {
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #44969d;
+	}
+	.rule-main {
+		font-size: 26rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #0f253a;
+		margin-top: 10rpx;
+	}
+}
+.main-title {
+	margin-top: 36rpx;
+	display: flex;
+	justify-content: flex-start;
+	align-items: center;
+	.shu {
+		margin-left: 30rpx;
+		width: 5rpx;
+		height: 29rpx;
+		background: #0f253a;
+		border-radius: 3rpx;
+	}
+	.m-title {
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #0f253a;
+		margin-left: 16rpx;
+	}
+}
+.list-box {
+	margin-top: 34rpx;
+	height: calc(100% - 260px);
+	background-color: #ffffff;
+	.list-item {
+		padding: 25rpx 50rpx;
+		border-bottom: 1px solid #f0f4f8;
+		.list-title {
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #666666;
+		}
+		.time {
+			margin-top: 10rpx;
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #aeaeae;
+		}
+		.list-right {
+			font-size: 27rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+		}
+	}
+}
+.btn {
+	position: fixed;
+	bottom: 28rpx;
+	left: 0;
+	right: 0;
+	margin: 0 auto;
+	width: 674rpx;
+	height: 88rpx;
+	background: linear-gradient(90deg, #60bab0, #60bab0, #45969b);
+	border-radius: 44rpx;
+	font-size: 36rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #ffffff;
+	text-align: center;
+	line-height: 88rpx;
+}
+</style>

+ 116 - 0
pages/user/fulilist.vue

@@ -0,0 +1,116 @@
+<template>
+	<view class="center">
+		<view class="box" v-for="(item,index) in list" :key="index" @click="nav(item.id)">
+			<view class="shopBox-top">
+				<view class="left"><image src="../../static/img/index4.png" mode=""></image></view>
+				<view class="between">
+					<text  class="one">{{ item.name }}</text>
+				</view>
+				<view>
+					<text class="three">查看详情</text>
+				</view>
+			</view>
+			<view class="shopBox-between">
+				<view class="number">
+					<text class="number-left">{{ 1 * item.cost }}</text>
+					<text class="number-right">{{ item.cost_money_type }}/份</text>
+				</view>
+				<view class="quotient"><text class="quotient-children">每轮限购1组,每组限购一份</text></view>
+			</view>
+			<image :src="item.background_image" style="width: 635rpx; height: 170rpx; margin: 40rpx 0;" mode=""></image>
+		</view>
+	</view>
+</template>
+
+<script>
+import { lala } from '@/api/product.js';
+export default {
+	data() {
+		return{
+			list:[],
+		}
+	},
+	onLoad() {
+		this.loadData()
+	},
+	methods: {
+		async loadData(){
+			lala({}).then(({data}) =>{
+				this.list = data.list.data
+			})
+		},
+		nav(id) {
+			uni.navigateTo({
+				url: '/pages/user/fuli?id=' + id
+			})
+		}
+	}
+}
+</script>
+
+<style lang="scss">
+.center , page {
+	background: #f5f5f5;
+}
+.box {
+	margin: 20rpx auto 0;
+	width: 690rpx;
+	padding: 20rpx;
+	background: #FFFFFF;
+	box-shadow: 0px 0px 17rpx 0px rgba(0, 0, 0, 0.05);
+	border-radius: 20rpx;
+	.shopBox-top {
+		margin-top: 26rpx;
+		display: flex;
+		justify-content: flex-start;
+		align-items: center;
+		image {
+			height: 46rpx;
+			width: 48rpx;
+		}
+		.one {
+			margin-left: 10rpx;
+			font-size: 34rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #0f253a;
+		}
+		.three {
+			margin-left: 350rpx;
+			color: #6D7C88;
+		}
+	}
+	.shopBox-between {
+		margin-top: 20rpx;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+	
+		.number {
+			.number-left {
+				font-size: 40rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #44969d;
+			}
+	
+			.number-right {
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #44969d;
+			}
+		}
+	
+		.quotient {
+			.quotient-children {
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #6d7c88;
+			}
+		}
+	}
+	
+}
+</style>

+ 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;
+				width: 100%;
+				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>

+ 354 - 0
pages/user/rake.vue

@@ -0,0 +1,354 @@
+<template>
+	<view class="rake">
+		<view class="item" v-for="(ls,index) in list" v-if="ls.stock != 0">
+			<view class="top">
+				<view class="info-title">
+					<image :src="ls.logo" mode=""></image>
+					<view class="">{{ ls.name }}</view>
+				</view>
+				<view class="tags">
+					<view class="tag" v-for="it in ls.tags" :key="it">{{ it }}</view>
+				</view>
+				<view class="base-info">
+					<view class="info-item">
+						<view class="tit">单价</view>
+						<view class="val">{{ +ls.cost_money }}{{ls.cost_money_type}}/{{ ls.get_money_type === 'BZZ' ? '节点' : 'T' }}</view>
+					</view>
+					<view class="info-item">
+						<view class="tit">有效算力</view>
+						<view class="val">{{ ls.step }} {{ ls.get_money_type === 'BZZ' ? '节点' : 'T' }}</view>
+					</view>
+					<view class="info-item">
+						<view class="tit">周期</view>
+						<view class="val">{{ ls.first_step_time + ls.second_step_time }}天 + {{ ls.third_step_time }}天</view>
+					</view>
+				</view>
+			</view>
+			<view class="btn-wrapper">
+				<view class="btn">
+					服务费:{{ls.user_service_ratio*1}}%
+					<text @click="+ls.lower_service_ratio<= +mList[index].user_service_ratio ? '': set(index,ls,0)" :class="{'black':+ls.lower_service_ratio<= +mList[index].user_service_ratio }">设置</text>
+					
+				</view>
+<!-- 				<view class="btn">
+					佣金:{{ls.award_ratio*1}}%
+					<text @click="ls.lower_award_ratio*1 < mList[index].award_ratio*1 ? set(index,ls,1):''" :class="{'black':+ls.lower_award_ratio >= +mList[index].award_ratio }">设置</text>
+				</view> -->
+			</view>
+			
+		</view>
+		<view class="jg" v-if="list.length !== 0"></view>
+		<u-empty v-if="list.length == 0"></u-empty>
+		<uni-popup ref="popup" type="center">
+			<view class="wrapper">
+				<view class="title">
+					设置{{setType === 0? '服务费比例':'佣金比例'}}
+				</view>
+				<input type="number" v-model="setVal" :placeholder="placeTitle" class="inp" />
+				<view class="btn-wrapper">
+					<view class="cansel" @click="close()">取消</view>
+					<view class="qr" @click="sub()">确定</view>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+import { mining, buyMining } from '@/api/market.js';
+import {setServiceRatio ,setRatio} from '@/api/set.js'
+export default {
+	data() {
+		return {
+			height: 0,
+			setType: 0,
+			setVal: null,
+			list: [],
+			mList: [],
+			m_service_ratio: 0,
+			uid:0,
+			max_ratio: 0,
+			min_ratio: 0,
+			item: {}
+		};
+	},
+	computed: {
+		placeTitle() {
+			return `可设置比例为${this.min_ratio}%~${this.max_ratio}%`;
+		}
+	},
+	onReady(res) {
+		// var _this = this;
+		// uni.getSystemInfo({
+		// 	success: resu => {
+		// 		const query = uni.createSelectorQuery();
+		// 		query.select('.list-cell').boundingClientRect();
+		// 		query.exec(function(res) {
+		// 			console.log(res, 'ddddddddddddd');
+		// 			_this.height = resu.windowHeight - res[0].top + 'px';
+		// 			console.log('打印页面的剩余高度', _this.height);
+		// 		});
+		// 	},
+		// 	fail: res => {}
+		// });
+	},
+	onLoad(opt) {
+		if(opt) {
+			this.uid = opt.uid
+		}
+		// uni.showLoading({
+		// 	title: '加载中'
+		// })
+		this.loadMlist()
+		
+	},
+	methods: {
+		set(index,ls,num) {
+			console.log(index)
+			this.setType = num
+			this.item = ls
+			if(this.setType === 0) {
+				this.min_ratio = +this.mList[index].user_service_ratio
+				this.max_ratio = +this.list[index].lower_service_ratio
+				console.log(this.min_ratio,this.max_ratio,'5555555555555555555555555')
+				if(this.min_ratio  === this.max_ratio) {
+					this.$api.msg('当前无法设置')
+				}else {
+					this.$refs.popup.open();
+				}
+				
+				console.log(this.min_ratio,this.max_ratio)
+			}else {
+				this.min_ratio = +this.list[index].lower_award_ratio
+				this.max_ratio = +this.mList[index].award_ratio
+				console.log(this.min_ratio,this.max_ratio,'5555555555555555555555555')
+				if(this.min_ratio  === this.max_ratio) {
+					this.$api.msg('当前无法设置')
+				}else {
+					this.$refs.popup.open();
+				}
+			}
+			
+			
+		},
+		close() {
+			this.$refs.popup.close();
+			this.setVal = null;
+		},
+		sub() {
+			console.log();
+			this.$refs.popup.close();
+			if(this.setType === 0){
+				setServiceRatio(this.uid,{
+					ratio: this.setVal,
+					mid: this.item.id
+				}).then(res => {
+					this.$api.msg(res.msg)
+					this.loadData()
+				})
+			}else {
+				setRatio(this.uid,{
+					ratio: this.setVal,
+					mid: this.item.id
+				}).then(res => {
+					this.$api.msg(res.msg)
+					this.loadData()
+				})
+			}
+
+			this.setVal = null
+			
+			
+			
+		},
+		loadData() {
+			mining({
+				uid: this.uid,
+				page: 1,
+				limit: 1000
+			}).then(({ data }) => {
+				this.list = data.data;
+				// uni.hideLoading()
+				console.log(this.list, '88888888888888');
+			});
+		},
+		loadMlist() {
+			mining({
+				// uid: this.uid,
+				page: 1,
+				limit: 1000
+			}).then(({ data }) => {
+				this.mList = data.data;
+				console.log(this.mList, '999999999999999999999999999999999999');
+				this.loadData();
+			});
+		}
+		
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+page {
+	height: 100%;
+	// padding-top: 20rpx;
+}
+.rake {
+	height: 100%;
+	// padding-top: 30rpx;
+}
+.item {
+	margin: 20rpx auto;
+	width: 670rpx;
+	// height: 438rpx;
+	background: #f7f6fb;
+	border-radius: 10rpx;
+	box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.2);
+	.top {
+		// height: 347rpx;
+		width: 100%;
+		padding: 40rpx 30rpx 0;
+		.info-title {
+			display: flex;
+
+			image {
+				display: inline-block;
+				width: 38rpx;
+				height: 38rpx;
+				margin-left: 10rpx;
+				flex-shrink: 0;
+			}
+			view {
+				padding-left: 12rpx;
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
+		}
+		.tags {
+			padding-top: 20rpx;
+			display: flex;
+			flex-wrap: wrap;
+			.tag {
+				display: inline-block;
+				padding: 0 20rpx;
+				text-align: center;
+				line-height: 43rpx;
+				background: #e3f6fa;
+				border-radius: 22rpx;
+				margin: 10rpx 10rpx 0;
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #0ec1a1;
+			}
+		}
+		.base-info {
+			padding-top: 30rpx;
+			display: flex;
+			justify-content: space-between;
+			// text-align: center;
+			font-size: 24rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+			padding-bottom: 30rpx;
+		}
+		.end-time {
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #5771df;
+			padding-bottom: 24rpx;
+		}
+	}
+	.btn-wrapper {
+		// width: 670rpx;
+		height: 95rpx;
+		background: #ffffff;
+		border-radius: 0px 0px 10rpx 10rpx;
+		display: flex;
+		justify-content: flex-end;
+		// justify-content: space-between;
+		align-items: center;
+		padding-right: 20rpx;
+		.btn {
+			// display: flex;
+			padding-left: 10rpx;
+			text {
+				
+				display: inline-block;
+				width: 108rpx;
+				height: 39rpx;
+				background: #5771df;
+				border: 1rpx solid #5771df;
+				box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(0, 0, 0, 0.1);
+				border-radius: 20rpx;
+				text-align: center;
+				line-height: 35rpx;
+				margin-left: 11rpx;
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #ffffff;
+			}
+			.black {
+				background-color: #999;
+				border-color: #999;
+			}
+		}
+	}
+}
+.list-cell {
+	width: 100%;
+	height: 100%;
+	background-color: #f8f8f8;
+}
+.wrapper {
+	width: 549rpx;
+	height: 344rpx;
+	background: #ffffff;
+	border-radius: 14rpx;
+	.title {
+		text-align: center;
+		padding-top: 40rpx;
+		font-size: 37rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #333333;
+	}
+	.inp {
+		display: block;
+		margin: 60rpx auto;
+		width: 439rpx;
+		height: 68rpx;
+		background: #f6f6f6;
+		border-radius: 10rpx;
+		padding-left: 13rpx;
+	}
+	.btn-wrapper {
+		display: flex;
+	
+		view {
+			width: 50%;
+			text-align: center;
+		}
+		.cansel {
+			font-size: 37rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #333333;
+		}
+		.qr {
+			font-size: 37rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #5771df;
+		}
+	}
+}
+.jg {
+	height: 20rpx;
+}
+</style>

+ 0 - 200
pages/user/scoreAccumulate.vue

@@ -1,200 +0,0 @@
-<template>
-	<view class="content">
-		<!-- <view class="navbar">
-			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
-		</view> -->
-		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
-					<!-- 空白页 -->
-					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-
-					<!-- 订单列表 -->
-					<view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item flex">
-						<view class="title-box">
-							<view class="title">
-								<text>{{ item.mark }}</text>
-							</view>
-							<view class="time">
-								<text>{{ item.add_time }}</text>
-							</view>
-						</view>
-						<view class="money">
-							<text>{{ (item.pm == 0 ? '-' : '+') + item.number }}</text>
-						</view>
-					</view>
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-
-<script>
-	
-// import { integrallist } from '@/api/functionalUnit.js';
-import uniLoadMore from '@/uview-ui/components/u-loadmore/u-loadmore.vue';
-import empty from '@/uview-ui/components/u-empty/u-empty.vue';
-export default {
-	components: {
-		empty,
-		uniLoadMore
-	},
-	onReady() {
-		
-	},
-	data() {
-		return {
-			tabCurrentIndex: 0,
-			navList: [
-				{
-					state: 0,
-					text: '全部',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-			],
-		};
-	},
-	onShow() {
-		// 载入积分数据
-		this.loadData();
-	},
-	methods: {
-		// 页面跳转
-		navto(e) {
-			uni.navigateTo({
-				url: e
-			});
-		},
-		//获取收入支出信息
-		async loadData(source) {
-			//这里是将订单挂载到tab列表下
-			let index = this.tabCurrentIndex;
-			let navItem = this.navList[index];
-			let state = navItem.state;
-			if (source === 'tabChange' && navItem.loaded === true) {
-				//tab切换只有第一次需要加载数据
-				return;
-			}
-			if (navItem.loadingType === 'loading') {
-				//防止重复加载
-				return;
-			}
-			// 修改当前对象状态为加载中
-			navItem.loadingType = 'loading';
-
-			integrallist(
-				{
-					page: navItem.page,
-					limit: navItem.limit
-				},
-				state
-			)
-				.then(({ data }) => {
-					if (data.length > 0) {
-						navItem.orderList = navItem.orderList.concat(data);
-						navItem.page++;
-					}
-					if (navItem.limit == data.length) {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'more';
-						return;
-					} else {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'noMore';
-					}
-					uni.hideLoading();
-					this.$set(navItem, 'loaded', true);
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-
-		//swiper 切换
-		changeTab(e) {
-			this.tabCurrentIndex = e.target.current;
-			this.loadData('tabChange');
-		},
-		//顶部tab点击
-		tabClick(index) {
-			this.tabCurrentIndex = index;
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page {
-	background: #ffffff;
-	height: 100%;
-}
-.navbar {
-	display: flex;
-	height: 40px;
-	padding: 0 5px;
-	background: #fff;
-	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-	position: relative;
-	z-index: 10;
-	.nav-item {
-		flex: 1;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		height: 100%;
-		font-size: 15px;
-		color: $font-color-dark;
-		position: relative;
-		&.current {
-			color: $base-color;
-			&:after {
-				content: '';
-				position: absolute;
-				left: 50%;
-				bottom: 0;
-				transform: translateX(-50%);
-				width: 44px;
-				height: 0;
-				border-bottom: 2px solid $base-color;
-			}
-		}
-	}
-}
-// 列表
-
-.swiper-box {
-	height: calc(100% - 44px);
-	padding-top: 10rpx;
-	.order-item {
-		padding: 20rpx 30rpx;
-		line-height: 1.5;
-		.title-box {
-			.title {
-				font-size: $font-lg;
-				color: $font-color-base;
-			}
-			.time {
-				font-size: $font-base;
-				color: $font-color-light;
-			}
-		}
-		.money {
-			color: #fd5b23;
-			font-size: $font-lg;
-		}
-	}
-}
-.list-scroll-content {
-	height: 100%;
-}
-.content {
-	height: 100%;
-	.empty-content {
-		background-color: #ffffff;
-	}
-}
-</style>

+ 99 - 65
pages/user/shareQrCode.vue

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

+ 165 - 33
pages/user/user.vue

@@ -4,7 +4,21 @@
 			<view class="bg"><image class="imgBg" src="../../static/img/user-bg.png" mode=""></image></view>
 			<view class="user">
 				<view class="avtor"><image class="portrait" :src="userInfo.avatar || '/static/img/missing-face.png'"></image></view>
-				<view class="name">{{ userInfo.nickname || '游客' }}</view>
+				<view class="">
+					<view class="name">{{ userInfo.phone || userInfo.email || '游客' }}</view>
+					<view class="id">uid:{{ userInfo.uid }}</view>
+					<view class="id-box flex">
+						
+						<view class="level-box">
+							<image class="image" src="../../static/img/img28.png"></image>
+							<view class="level" v-if="userInfo.level">{{ userInfo.level_info.name }}</view>
+							<view class="level" v-else>
+								V0
+							</view>
+						</view>
+						
+					</view>
+				</view>
 			</view>
 		</view>
 		<view class="main">
@@ -15,6 +29,28 @@
 					<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')" 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>
+				</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>
+					<image src="../../static/img/jiantou.png" class="next-icon" mode=""></image>
+				</view>
 				<view class="tt-box" @click="nav('/pages/user/extension')">
 					<image src="../../static/img/myTeam.png" class="tt-icon2" mode=""></image>
 					<view class="tt-txt">我的团队</view>
@@ -27,14 +63,19 @@
 				</view>
 				<view class="tt-box" @click="nav('/pages/money/payment')">
 					<image src="../../static/img/zfpwd.png" class="tt-icon4" mode=""></image>
-					<view class="tt-txt">支付密码</view>
+					<view class="tt-txt">交易密码</view>
 					<image src="../../static/img/jiantou.png" class="next-icon" mode=""></image>
 				</view>
-				<view class="tt-box" @click="nav('/pages/public/forget')">
+				<view class="tt-box" @click="nav('/pages/set/password')">
 					<image src="../../static/img/pwd.png" class="tt-icon1" mode=""></image>
 					<view class="tt-txt">登录密码</view>
 					<image src="../../static/img/jiantou.png" class="next-icon" mode=""></image>
 				</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>
@@ -46,15 +87,23 @@
 					<image src="../../static/img/jiantou.png" class="next-icon" mode=""></image>
 				</view>
 			</view>
+			<view class="kb">
+				
+			</view>
 		</view>
-		
+
 		<uni-popup ref="popup" type="center">
 			<view class="popup">
 				<view class="popup-dox">
 					<image class="popup-logo" src="../../static/img/lianxi.png"></image>
 					<view class="pop-title">已为您定制专属客服</view>
-					<image class="popup-text" src=""></image>
-					<view class="pop-tip flex"><view class="weixin"><image src="../../static/img/weixin.png" mode=""></image></view><view>长按识别咨询客服</view></view>
+					<view >{{ weixin }}</view>
+					<image class="popup-text" @longtap="bc_code" :src="erweima"></image>
+					<view class="btn" @click="copy(weixin)">复制微信号</view>
+					<view class="pop-tip flex">
+						<view class="weixin"><image src="../../static/img/weixin.png" mode=""></image></view>
+						<view>长按保存二维码</view>
+					</view>
 				</view>
 			</view>
 			<view class="close_icon" @click="close"><image src="../../static/img/Close.png"></image></view>
@@ -62,10 +111,11 @@
 	</view>
 </template>
 <script>
+import uniCopy from '@/components/js_sdk/xb-copy/uni-copy.js';
 import { mapState, mapMutations } from 'vuex';
 import uniList from '@/components/uni-list/uni-list.vue';
 import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
-import { orderData, getUserInfo } from '@/api/user.js';
+import { orderData, getUserInfo,service } from '@/api/user.js';
 import { saveUrl, interceptor } from '@/utils/loginUtils.js';
 import uniPopup from '@/components/uni-popup/uni-popup.vue';
 export default {
@@ -75,13 +125,16 @@ export default {
 		uniPopup
 	},
 	data() {
-		return {};
+		return {
+			erweima:'',
+			weixin:''
+		};
 	},
 	onShow() {
 		//判断是否已经登录
 		if (this.hasLogin) {
 			this.loadBaseData();
-		}else{
+		} else {
 			uni.showModal({
 				title: '登录',
 				content: '您未登录,是否马上登陆?',
@@ -102,30 +155,33 @@ export default {
 	methods: {
 		...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
 		loadBaseData() {
-			getUserInfo({}).then(({
-				data
-			}) => {
+			console.log(this.userInfo);
+			getUserInfo({}).then(({ data }) => {
 				this.setUserInfo(data);
 			});
+			service({}).then(({data}) =>{
+				this.erweima = data.service_qr;
+				this.weixin = data.service_wechat;
+			})
 		},
-		server(){
+		server() {
 			this.$refs.popup.open();
 		},
-		close(){
+		close() {
 			this.$refs.popup.close();
 		},
 		nav(url) {
 			// 判断是否已经登录
 			// if (this.hasLogin) {
-				console.log(url)
-				uni.navigateTo({
-					url: url,
-					fail() {
-						uni.switchTab({
-							url:url
-						})
-					}
-				})
+			console.log(url);
+			uni.navigateTo({
+				url: url,
+				fail() {
+					uni.switchTab({
+						url: url
+					});
+				}
+			});
 			// }else {
 			// 	uni.showModal({
 			// 		title: '登录',
@@ -140,7 +196,44 @@ export default {
 			// 		}
 			// 	});
 			// }
-
+		},
+		bc_code(){
+			let that = this;
+			console.log('保存二维码',this.erweima)
+			uni.downloadFile({           //获得二维码的临时地址
+				url:this.erweima,
+				success:(res)=>{
+					//console.log('获取url',res)
+					if(res.statusCode == 200){
+						uni.saveImageToPhotosAlbum({
+							filePath:res.tempFilePath,//传入临时地址
+							success() {
+								that.$api.msg('保存成功')//封装的提示
+							},
+							fail() {
+								that.$api.msg('保存失败')
+							}
+						})
+					}
+				}
+			})
+		},
+		copy(value) {
+			let obj = this;
+			let content = value; //需要复制的内容
+			console.log('复制的内容:', content);
+			// content = typeof content === 'string' ? content : content.toString(); // 复制内容,必须字符串,数字需要转换为字符串
+			const result = uniCopy(content);
+			if (result === false) {
+				uni.showToast({
+					title: '不支持'
+				});
+			} else {
+				uni.showToast({
+					title: '复制成功',
+					icon: 'none'
+				});
+			}
 		}
 	}
 };
@@ -154,14 +247,17 @@ page {
 	height: 100%;
 	background: #ffffff;
 }
+.kb {
+	height: 100rpx;
+}
 .top {
 	width: 100%;
-	height: 320rpx;
+	height: 340rpx;
 	position: relative;
 	.bg {
 		position: absolute;
 		width: 100%;
-		height: 320rpx;
+		height: 340rpx;
 		left: 0;
 		top: 0;
 		right: 0;
@@ -195,6 +291,33 @@ page {
 			font-weight: 500;
 			color: #ffffff;
 		}
+		.id {
+			margin-left: 30rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #ffffff;
+		}
+		.level-box {
+			
+			margin-left: 30rpx;
+			margin-top: 10rpx;
+			position: relative;
+			.image {
+				width: 128rpx;
+				height: 45rpx;
+			}
+			.level {
+				position: absolute;
+				top: 0;
+				left: 62rpx;
+				height: 44rpx;
+				line-height: 48rpx;
+				font-size: 24rpx;
+				color: #826740;
+				font-weight: bold;
+			}
+		}
 	}
 }
 .main {
@@ -269,39 +392,48 @@ page {
 }
 .popup {
 	width: 640rpx;
-	background-color: #FFFFFF;
+	background-color: #ffffff;
 	border-radius: 15rpx;
 	text-align: center;
-	.popup-dox{
+	.popup-dox {
 		position: relative;
 		top: -60rpx;
 		.popup-logo {
 			width: 460rpx;
 			height: 132rpx;
 		}
-		.pop-title{
+		.pop-title {
 			font-size: 40rpx;
 			font-weight: bold;
 			color: #333333;
 			padding: 25rpx 0rpx;
 			margin-bottom: 50rpx;
 		}
-		.popup-text{
+		.popup-text {
 			width: 400rpx;
 			height: 400rpx;
 			margin-bottom: 50rpx;
 		}
-		.pop-tip{
+		.btn{
+			width: 300rpx;
+			height: 50rpx;
+			line-height: 50rpx;
+			background: linear-gradient(90deg, #60BAB0, #60BAB0, #45969B);
+			margin: 0 auto;
+			color: #FFFFFF;
+			border-radius: 25rpx;
+		}
+		.pop-tip {
 			font-size: 30rpx;
 			font-weight: 500;
 			color: #333333;
 			justify-content: center;
-			
+			margin-top: 20rpx;
 			.weixin {
 				width: 48rpx;
 				height: 40rpx;
 				margin-right: 14rpx;
-				image{
+				image {
 					width: 48rpx;
 					height: 40rpx;
 				}

+ 0 - 321
pages/user/withdrawal.vue

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

BIN
static/img/auto.png


BIN
static/img/bgRz.png


BIN
static/img/data.png


BIN
static/img/duhuanbg.png


BIN
static/img/gift.png


BIN
static/img/img01.png


BIN
static/img/img28.png


BIN
static/img/img51.png


BIN
static/img/index2.png


BIN
static/img/index3.png


BIN
static/img/index6.png


BIN
static/img/indexClose.png


BIN
static/img/info-image.png


BIN
static/img/ling.png


BIN
static/img/myKJ.png


BIN
static/img/myPoint.png


BIN
static/img/real_name.png


BIN
static/img/rengou.png


BIN
static/img/teach.png


BIN
static/img/tongz-bg.png


BIN
static/img/upImgbg.png


+ 37 - 0
store/index.js

@@ -1,3 +1,4 @@
+<<<<<<< HEAD
 import Vue from 'vue'
 import Vuex from 'vuex'
 import user from './model/user'
@@ -38,3 +39,39 @@ const store = new Vuex.Store({
 })
 
 export default store
+=======
+import Vue from 'vue'
+import Vuex from 'vuex'
+import user from './model/user'
+Vue.use(Vuex)
+
+const store = new Vuex.Store({
+	state: {
+		// baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置 
+		baseURL:"http://www.lalanft.net",//请求地址配置 
+		urlFile:'/index',//项目部署所在文件夹
+		userInfo: {}, //登录信息
+		loginInterceptor:false,//是否打开强制登录
+		// #ifdef H5 || MP-WEIXIN
+		weichatInfo:{},//保存微信注册信息
+		weichatObj:'',//微信对象
+		// #endif
+	},
+	mutations: {
+		//保存微信信息
+		setWeiChatInfo(state, provider) {
+			state.weichatInfo = provider;
+		},
+		//保存微信对象
+		setWeiChatObj(state, provider) {
+			state.weichatObj = provider;
+		}
+	},
+	modules:{
+		user
+	},
+	actions: {}
+})
+
+export default store
+>>>>>>> 52a7e9ac801e5bdec57490748e56d954e229ebe5

BIN
unpackage/cache/apk/__UNI__3CDE968_cm.apk


+ 1 - 0
unpackage/cache/apk/apkurl

@@ -0,0 +1 @@
+https://service.dcloud.net.cn/build/download/cc3ea320-f739-11eb-acda-5b652b64987e

File diff suppressed because it is too large
+ 0 - 0
unpackage/cache/apk/cmManifestCache.json


+ 9 - 0
unpackage/cache/appleConfig.ini

@@ -0,0 +1,9 @@
+[appleAppid]
+appleAppid=uni.UNIF0EBD91
+
+[iosStyle]
+iosStyle=common
+
+[universalLinks]
+universalLinks=
+spaceid=

+ 3 - 0
unpackage/cache/certdata

@@ -0,0 +1,3 @@
+andrCertfile=D:/工作/项目2/nft拼团/NFT/unpackage/pz/nft.keystore
+andrCertAlias=nft.inc
+andrCertPass=7IwuiYJfyRjKKTfhI7sjzw==

BIN
unpackage/cache/wgt/__UNI__3CDE968/.manifest/appstore.png


BIN
unpackage/cache/wgt/__UNI__3CDE968/.manifest/google-keystore.keystore


BIN
unpackage/cache/wgt/__UNI__3CDE968/.manifest/icon-android-hdpi.png


BIN
unpackage/cache/wgt/__UNI__3CDE968/.manifest/icon-android-xhdpi.png


BIN
unpackage/cache/wgt/__UNI__3CDE968/.manifest/icon-android-xxhdpi.png


Some files were not shown because too many files changed in this diff