commit a37ec9b1ce8ea5dac74636a12495956c3e1e7005 Author: RainSun Date: Wed Nov 13 12:02:33 2019 +0800 update diff --git a/app.js b/app.js new file mode 100644 index 0000000..d56c9a3 --- /dev/null +++ b/app.js @@ -0,0 +1,30 @@ +//app.js +App({ + onLaunch: function () { + //设置高度 + wx.getSystemInfo({ + success: e => { + this.globalData.rpx = e.windowWidth/750; + this.globalData.StatusBar = e.statusBarHeight; + let custom = wx.getMenuButtonBoundingClientRect(); + this.globalData.Custom = custom; + this.globalData.CustomBar = custom.bottom + custom.top - e.statusBarHeight; + } + }) + + this.globalData.bgIndex = Math.floor(Math.random()*this.globalData.bgs.length) + }, + globalData: { + StatusBar: null, + Custom:null, + CustomBar: null, + bgIndex:null, + rpx:null, + bgs: ['https://uploadfile.bizhizu.cn/up/8a/8a/5c/8a8a5c23470344cb2abd24d52f9e2e7a.jpg', + 'https://uploadfile.bizhizu.cn/up/ba/a1/40/baa1401b6e6744d8e29b6d5f1a058a30.jpg.source.jpg', + 'https://uploadfile.bizhizu.cn/up/b5/6c/d6/b56cd6b931485f0aad80c44a6bd2144b.jpg.source.jpg', + 'https://uploadfile.bizhizu.cn/up/6e/15/00/6e1500c4e6b135af47ec257b43640c5d.jpg.source.jpg', + 'https://uploadfile.bizhizu.cn/up/f4/c7/ba/f4c7ba7cda104509a25043cc335c1a44.jpg', + 'https://uploadfile.bizhizu.cn/2017/0913/319cdd716a5f5d6f9201dd44f5ca9755.jpg'] + } +}) \ No newline at end of file diff --git a/app.json b/app.json new file mode 100644 index 0000000..fb2e7e5 --- /dev/null +++ b/app.json @@ -0,0 +1,16 @@ +{ + "pages": [ + "pages/welcome/welcome", + "pages/home/home" + + ], + "window": { + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTitleText": "WeChat", + "navigationBarTextStyle": "white", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + }, + "sitemapLocation": "sitemap.json" +} \ No newline at end of file diff --git a/app.wxss b/app.wxss new file mode 100644 index 0000000..06c6fc9 --- /dev/null +++ b/app.wxss @@ -0,0 +1,10 @@ +/**app.wxss**/ +.container { + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-between; + padding: 200rpx 0; + box-sizing: border-box; +} diff --git a/lib/api.js b/lib/api.js new file mode 100644 index 0000000..44dad23 --- /dev/null +++ b/lib/api.js @@ -0,0 +1,193 @@ +var util = require('./util') + +const getyiyian = callBack => { + wx.request({ + url: 'https://v1.hitokoto.cn/', + success: function (res) { + if (res.data.hitokoto.length > 30) { //如果长度大于30就重新获取 + getyiyian(callBack); + } else { + callBack && callBack() + wx.setStorageSync('yiyan', res.data); + } + } + }) +} + +const login = callBack => { + wx.login({ + success: function (res) { + if (res.code) { + wx.request({ + url: 'https://qr.powerrain.cn/login', + method: 'POST', + header: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + data: { + code: res.code, + sign: util.getMD5(res.code) + }, + success: function (res) { + if (res.data.errcode !== 200) { + wx.hideLoading() + wx.showToast({ + title: "登录失败", + icon: "none" + }) + } else { + wx.hideLoading() + callBack && callBack(JSON.parse(res.data.userInfo),res.data.openid) + } + }, + fail: function () { + wx.hideLoading(); + wx.showToast({ + title: "登录失败", + icon: "none" + }) + } + }) + } else { + wx.hideLoading(); + wx.showToast({ + title: res.errMsg, + icon: "none" + }) + } + } + }) +} + +const createOder = (totalFee, data, callBack) => { + wx.request({ + url: 'https://qr.powerrain.cn/newOrder', + method: 'POST', + header: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + data: { + totalFee: totalFee, + data:JSON.stringify(data), + }, + success: function (res) { + if (res.data.errcode !== 200) { + wx.hideLoading(); + wx.showToast({ + title: "创建订单失败", + icon: "none" + }) + } else { + callBack && callBack(res.data.params); + } + }, + }) +} + +const delCode = (id, callBack) => { + wx.request({ + url: 'https://qr.powerrain.cn/del', + method: 'POST', + header: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + data: { + id: id, + sign: util.getMD5(id) + }, + success: function (res) { + console.log(res) + if (res.data.errcode !== 200) { + wx.hideLoading(); + wx.showToast({ + title: "删除失败", + icon: "none" + }) + } else { + wx.hideLoading(); + callBack && callBack() + } + }, + fail: function () { + wx.hideLoading(); + wx.showToast({ + title: "删除失败", + icon: "none" + }) + } + }) +} + +const reflash = (openId, callBack) => { + wx.request({ + url: 'https://qr.powerrain.cn/reflash', + method: 'POST', + header: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + data: { + openId: openId, + sign: util.getMD5(openId) + }, + success: function (res) { + if(res.data.errcode !== 200) { + wx.hideLoading(); + wx.showToast({ + title: "刷新失败", + icon: "none" + }) + } else { + wx.hideLoading(); + callBack && callBack(JSON.parse(res.data.userInfo)) + } + }, + fail: function () { + wx.hideLoading(); + wx.showToast({ + title: "刷新失败", + icon: "none" + }) + } + }) +} + +const checkOrder = (out_trade_no, callBack) => { + wx.request({ + url: 'https://qr.powerrain.cn/checkOrder', + method: 'POST', + header: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + data: { + out_trade_no: out_trade_no + }, + success: function (res) { + if(res.data.errcode !== 200) { + wx.hideLoading(); + wx.showToast({ + title: "订单状态获取失败", + icon: "none" + }) + } else { + wx.hideLoading(); + callBack && callBack(res.data.order_id) + } + }, + fail: function () { + wx.hideLoading(); + wx.showToast({ + title: "订单状态获取失败", + icon: "none" + }) + } + }) +} + +module.exports = { + getyiyian: getyiyian, // callBack() + login: login, // callBack(res.data) + createOder: createOder, // totalFee, data, callBack(res.data.params) + delCode: delCode, // id, callBack() + reflash: reflash, // openId, callBack(userInfo) + checkOrder: checkOrder // out_trade_no, callBack(order_id) +} diff --git a/lib/md5.js b/lib/md5.js new file mode 100644 index 0000000..0d2fff5 --- /dev/null +++ b/lib/md5.js @@ -0,0 +1,596 @@ +/** + +* + +* MD5 (Message-Digest Algorithm) + +* http://www.webtoolkit.info/ + +* + +**/ + + + + +var MD5 = function (string) { + + + + + function RotateLeft(lValue, iShiftBits) { + + + return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits)); + + + } + + + + + function AddUnsigned(lX, lY) { + + + var lX4, lY4, lX8, lY8, lResult; + + + lX8 = (lX & 0x80000000); + + + lY8 = (lY & 0x80000000); + + + lX4 = (lX & 0x40000000); + + + lY4 = (lY & 0x40000000); + + + lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF); + + + if (lX4 & lY4) { + + + return (lResult ^ 0x80000000 ^ lX8 ^ lY8); + + + } + + + if (lX4 | lY4) { + + + if (lResult & 0x40000000) { + + + return (lResult ^ 0xC0000000 ^ lX8 ^ lY8); + + + } else { + + + return (lResult ^ 0x40000000 ^ lX8 ^ lY8); + + + } + + + } else { + + + return (lResult ^ lX8 ^ lY8); + + + } + + + } + + + + + function F(x, y, z) { return (x & y) | ((~x) & z); } + + + function G(x, y, z) { return (x & z) | (y & (~z)); } + + + function H(x, y, z) { return (x ^ y ^ z); } + + + function I(x, y, z) { return (y ^ (x | (~z))); } + + + + + function FF(a, b, c, d, x, s, ac) { + + + a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac)); + + + return AddUnsigned(RotateLeft(a, s), b); + + + }; + + + + + function GG(a, b, c, d, x, s, ac) { + + + a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac)); + + + return AddUnsigned(RotateLeft(a, s), b); + + + }; + + + + + function HH(a, b, c, d, x, s, ac) { + + + a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac)); + + + return AddUnsigned(RotateLeft(a, s), b); + + + }; + + + + + function II(a, b, c, d, x, s, ac) { + + + a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac)); + + + return AddUnsigned(RotateLeft(a, s), b); + + + }; + + + + + function ConvertToWordArray(string) { + + + var lWordCount; + + + var lMessageLength = string.length; + + + var lNumberOfWords_temp1 = lMessageLength + 8; + + + var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64; + + + var lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16; + + + var lWordArray = Array(lNumberOfWords - 1); + + + var lBytePosition = 0; + + + var lByteCount = 0; + + + while (lByteCount < lMessageLength) { + + + lWordCount = (lByteCount - (lByteCount % 4)) / 4; + + + lBytePosition = (lByteCount % 4) * 8; + + + lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition)); + + + lByteCount++; + + + } + + + lWordCount = (lByteCount - (lByteCount % 4)) / 4; + + + lBytePosition = (lByteCount % 4) * 8; + + + lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition); + + + lWordArray[lNumberOfWords - 2] = lMessageLength << 3; + + + lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29; + + + return lWordArray; + + + }; + + + + + function WordToHex(lValue) { + + + var WordToHexValue = "", WordToHexValue_temp = "", lByte, lCount; + + + for (lCount = 0; lCount <= 3; lCount++) { + + + lByte = (lValue >>> (lCount * 8)) & 255; + + + WordToHexValue_temp = "0" + lByte.toString(16); + + + WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length - 2, 2); + + + } + + + return WordToHexValue; + + + }; + + + + + function Utf8Encode(string) { + + + string = string.replace(/\r\n/g, "\n"); + + + var utftext = ""; + + + + + for (var n = 0; n < string.length; n++) { + + + + + var c = string.charCodeAt(n); + + + + + if (c < 128) { + + + utftext += String.fromCharCode(c); + + + } + + + else if ((c > 127) && (c < 2048)) { + + + utftext += String.fromCharCode((c >> 6) | 192); + + + utftext += String.fromCharCode((c & 63) | 128); + + + } + + + else { + + + utftext += String.fromCharCode((c >> 12) | 224); + + + utftext += String.fromCharCode(((c >> 6) & 63) | 128); + + + utftext += String.fromCharCode((c & 63) | 128); + + + } + + + + + } + + + + + return utftext; + + + }; + + + + + var x = Array(); + + + var k, AA, BB, CC, DD, a, b, c, d; + + + var S11 = 7, S12 = 12, S13 = 17, S14 = 22; + + + var S21 = 5, S22 = 9, S23 = 14, S24 = 20; + + + var S31 = 4, S32 = 11, S33 = 16, S34 = 23; + + + var S41 = 6, S42 = 10, S43 = 15, S44 = 21; + + + + + string = Utf8Encode(string); + + + + + x = ConvertToWordArray(string); + + + + + a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476; + + + + + for (k = 0; k < x.length; k += 16) { + + + AA = a; BB = b; CC = c; DD = d; + + + a = FF(a, b, c, d, x[k + 0], S11, 0xD76AA478); + + + d = FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756); + + + c = FF(c, d, a, b, x[k + 2], S13, 0x242070DB); + + + b = FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE); + + + a = FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF); + + + d = FF(d, a, b, c, x[k + 5], S12, 0x4787C62A); + + + c = FF(c, d, a, b, x[k + 6], S13, 0xA8304613); + + + b = FF(b, c, d, a, x[k + 7], S14, 0xFD469501); + + + a = FF(a, b, c, d, x[k + 8], S11, 0x698098D8); + + + d = FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF); + + + c = FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1); + + + b = FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE); + + + a = FF(a, b, c, d, x[k + 12], S11, 0x6B901122); + + + d = FF(d, a, b, c, x[k + 13], S12, 0xFD987193); + + + c = FF(c, d, a, b, x[k + 14], S13, 0xA679438E); + + + b = FF(b, c, d, a, x[k + 15], S14, 0x49B40821); + + + a = GG(a, b, c, d, x[k + 1], S21, 0xF61E2562); + + + d = GG(d, a, b, c, x[k + 6], S22, 0xC040B340); + + + c = GG(c, d, a, b, x[k + 11], S23, 0x265E5A51); + + + b = GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA); + + + a = GG(a, b, c, d, x[k + 5], S21, 0xD62F105D); + + + d = GG(d, a, b, c, x[k + 10], S22, 0x2441453); + + + c = GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681); + + + b = GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8); + + + a = GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6); + + + d = GG(d, a, b, c, x[k + 14], S22, 0xC33707D6); + + + c = GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87); + + + b = GG(b, c, d, a, x[k + 8], S24, 0x455A14ED); + + + a = GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905); + + + d = GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8); + + + c = GG(c, d, a, b, x[k + 7], S23, 0x676F02D9); + + + b = GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A); + + + a = HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942); + + + d = HH(d, a, b, c, x[k + 8], S32, 0x8771F681); + + + c = HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122); + + + b = HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C); + + + a = HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44); + + + d = HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9); + + + c = HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60); + + + b = HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70); + + + a = HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6); + + + d = HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA); + + + c = HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085); + + + b = HH(b, c, d, a, x[k + 6], S34, 0x4881D05); + + + a = HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039); + + + d = HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5); + + + c = HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8); + + + b = HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665); + + + a = II(a, b, c, d, x[k + 0], S41, 0xF4292244); + + + d = II(d, a, b, c, x[k + 7], S42, 0x432AFF97); + + + c = II(c, d, a, b, x[k + 14], S43, 0xAB9423A7); + + + b = II(b, c, d, a, x[k + 5], S44, 0xFC93A039); + + + a = II(a, b, c, d, x[k + 12], S41, 0x655B59C3); + + + d = II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92); + + + c = II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D); + + + b = II(b, c, d, a, x[k + 1], S44, 0x85845DD1); + + + a = II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F); + + + d = II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0); + + + c = II(c, d, a, b, x[k + 6], S43, 0xA3014314); + + + b = II(b, c, d, a, x[k + 13], S44, 0x4E0811A1); + + + a = II(a, b, c, d, x[k + 4], S41, 0xF7537E82); + + + d = II(d, a, b, c, x[k + 11], S42, 0xBD3AF235); + + + c = II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB); + + + b = II(b, c, d, a, x[k + 9], S44, 0xEB86D391); + + + a = AddUnsigned(a, AA); + + + b = AddUnsigned(b, BB); + + + c = AddUnsigned(c, CC); + + + d = AddUnsigned(d, DD); + + + } + + + + + var temp = WordToHex(a) + WordToHex(b) + WordToHex(c) + WordToHex(d); + + + + + return temp.toLowerCase(); + +} + +module.exports = { + MD5, + md5: MD5 +} + diff --git a/lib/util.js b/lib/util.js new file mode 100644 index 0000000..624eb63 --- /dev/null +++ b/lib/util.js @@ -0,0 +1,120 @@ +const formatTime = date => { + const year = date.getFullYear() + const month = date.getMonth() + 1 + const day = date.getDate() + const hour = date.getHours() + const minute = date.getMinutes() + const second = date.getSeconds() + return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':') +} + +const formatNumber = n => { + n = n.toString() + return n[1] ? n : '0' + n +} + +const getMD5 = obj => { + let secret = 'wx0df150c438e4c8f0' + let keys = Object.keys(obj) + keys.sort() + + let params = [] + + keys.forEach(e => { + if (obj[e] != null) { + params.push(e + '=' + obj[e]) + } + }) + + params.push('key=' + secret) + + let paramStr = params.join('&') + + const md5Util = require('./md5.js') + let signResult = md5Util.md5(paramStr).toUpperCase() + + return signResult +} + +const checkFlag = (arg,flag, callBack) => { + flag-- + console.log(arg) + console.log(flag) + if(flag == 0) { + callBack && callBack() + } + return flag +} + +const checkInput = (type,content) => { + switch(type) { + case 'alcode': { + return 'alcode' + } + case 'qqcode': { + return 'qqcode' + } + case 'wxcode': { + return 'wxcode' + } + case 'username': { + return 'username' + } + case 'node': { + return 'node' + } + case 'month': { + return 'month' + } + } +} + + +const checkSubmit = (c) => { + var codeStatus = 0 + if (c.wxcode) codeStatus++ + if (c.qqcode) codeStatus++ + if (c.alcode) codeStatus++ + if (codeStatus < 2) { + wx.showToast({ + title:'请至少录入两张二维码呦', + icon: 'none' + }) + return false + } + if (!c.username) { + wx.showToast({ + title:'请输入您的标题', + icon: 'none' + }) + return false + } + if(!c.month) { + wx.showToast({ + title: '请输入您的使用时长', + icon: 'none' + }) + return false + } + var data = {} + data['wxcode'] = c.wxcode + data['alcode'] = c.alcode + data['qqcode'] = c.qqcode + data['username'] = c.username + data['openId'] = c.openId + data['node'] = c.node + data['timeout'] = ((new Date()).getTime() + 1000*60*60*24*30*c.month).toString() + var totalFee = c.month * 0.5 + return { + data: data, + totalFee: totalFee + } +} + +module.exports = { + formatTime: formatTime, + getMD5: getMD5, + checkFlag: checkFlag, + checkSubmit: checkSubmit, + checkInput: checkInput +} diff --git a/pages/home/home.js b/pages/home/home.js new file mode 100644 index 0000000..92179aa --- /dev/null +++ b/pages/home/home.js @@ -0,0 +1,387 @@ +// pages/home/home.js +const api = require('../../lib/api') +const util = require('../../lib/util') +const app = getApp() +const g = app.globalData +Page({ + + /** + * 页面的初始数据 + */ + data: { + CustomBar: g.CustomBar, //顶部到胶囊底部的高度 + StatusBar: g.StatusBar, //安卓bar高度 + src: g.bgs[g.bgIndex], //背景图片地址 + yiyan:null, //一言 + show: false, //控制utils页面的显示动画 + display:{ //显示页面状态控制 + 'createBox':true, + 'store':false, + 'safe':false, + 'start':false, + 'example':false, + 'maked':false + }, + animating: false, //动画进行时,ture->禁止触发下个动画 + codes: [], //已完成的用户二维码 + codeSrc:null, //预览用图片地址 + createCode: { //创建二维码所用数据 + wxcode: '', + qqcode: '', + alcode: '', + username: '', + openId: wx.getStorageSync('openid'), + node: '', + timeout: '', + month: 0 + } + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.setData({ + yiyan : wx.getStorageSync('yiyan'), + }) + if(this.data.yiyan.hitokoto.length > 15) { + this.setData({ + hitokotoStyle: "text-indent:2em;" + }) + } + this.manageCodes() + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + + // 各种界面展示的动画处理 + showUtils: function(e) { + var type = e.currentTarget.dataset.type + if(this.data.animating) return + var that = this + this.data.animating = true + if(this.data.show) { + //拉起主页 + this.data.codeSrc = null + let display = this.data.display + for(var i in display) { + if(i != 'createBox') display[i] = false + } + display['createBox'] = true + this.setData({ + display: display, + show:false + }) + setTimeout(function(){ + that.data.animating = false + },500) + } else { + //拉起utils页 + //阻止点击返回键 + if(!type) { + this.data.animating = false + return + } + this.setData({ + show: true, + }) + let display = this.data.display + for(var i in display) { + if(i != type) display[i] = false + } + display[type] = true + setTimeout(function(){ + that.setData({ + display: display + }) + that.data.animating = false + if(type == 'example') that.rouseQRcode(true,null) + },500) + } + }, + + //处理数据 + manageCodes:function() { + let codes = wx.getStorageSync('codes') + for( let i in codes) { + let end = this.TimeDown(codes[i]['timeout']) + codes[i]['end'] = end; + } + this.setData({ + codes: codes + }) + }, + //时间处理辅助轮 + TimeDown: function(arg) { + arg = parseInt(arg) + //结束时间 + var endDate = new Date(arg); + //当前时间 + var nowDate = new Date(); + //相差的总秒数 + var totalSeconds = parseInt((endDate - nowDate) / 1000); + //天数 + var days = Math.floor(totalSeconds / (60 * 60 * 24)); + //取模(余数) + var modulo = totalSeconds % (60 * 60 * 24); + //小时数 + var hours = Math.floor(modulo / (60 * 60)); + + return days + "天" + hours + "小时" + }, + + //删除二维码 + delCode:function(e) { + var id = e.currentTarget.dataset.id + console.log(id) + wx.showModal({ + title: '警告', + content: '此操作不可恢复,并且不会返还费用', + success (res) { + if (res.confirm) { + wx.showLoading({ + title: '操作中', + mask:true + }) + api.delCode(id,function(){ + wx.showToast({ + title: "删除成功" + }) + }) + } else if (res.cancel) { + console.log('用户点击取消') + } + } + }) + }, + + //从已完成跳转二维码显示 + bindToRouse:function(e) { + var data = e.currentTarget.dataset.data + this.rouseQRcode(false,data) + }, + + //唤起二维码(参数制作) + rouseQRcode:function(isExample,data) { + //isExample == true 是从示例进来的 + //isExample == false 是从创建完或者已创建进来的 + wx.showLoading({ + title: '绘制中', + mask:true + }) + if(isExample) { + var status = { + wx: true, + qq: true, + al: true + } + var text = '英博' + var id = '5dc6d61074d52b3774ab3e25' + } + else { + // 在这里还要完成页面的切换操作 + // 只改display + var display = this.data.display + for(var i in display) { + if(i != 'example') display[i] = false + } + display['example'] = true + this.setData({ + display:display + }) + console.log(this.data.display) + // data 的内容是一条记录的row + var id = data._id['$oid'] + var text = data.username + var status = { + wx: data.wxcode? true:false, + qq: data.qqcode? true:false, + al: data.alcode? true:false + } + } + this.drawQRcode(status,text,id) + }, + + //绘制二维码 + drawQRcode:function(status,text,id) { + //传入的信息 + // var status = { + // wx: true, + // qq: true, + // al: true + // } + // var text = '英博' + // var id = '5dc6d61074d52b3774ab3e25' + //基本的信息 + var canvasimgbg = null + var rpx = g.rpx + var fontSet1 = 'bold ' + parseInt(50*rpx) +'px sans-serif' + var fontSet2 = parseInt(35*rpx) + 'px sans-serif' + var that = this + var app = [] + if(status.wx) app.push(25) + if(status.qq) app.push(279) + if(status.al) app.push(153) + wx.downloadFile({ + url: that.data.src, + success: function (res) { + canvasimgbg = res.tempFilePath + var canvas = wx.createCanvasContext('qrcode'); + canvas.drawImage(canvasimgbg, 0, 0, 632*rpx, 1054*rpx); + wx.downloadFile({ + url: 'https://api.ooopn.com/qr/api.php?text=https%3A%2F%2Fqr.powerrain.cn%2Fqr%3Fid%3D'+id, + success:function(res) { + canvasimgbg = res.tempFilePath + canvas.drawImage(canvasimgbg, 66*rpx, 66*rpx, 500*rpx, 500*rpx); + canvas.font = fontSet1; + canvas.textAlign = 'center'; + canvas.setFillStyle('white') + canvas.fillText(text, 316*rpx, 660*rpx) + canvas.font = fontSet2; + canvas.fillText('本二维码支持以下APP向我付款', 316*rpx, 760*rpx) + wx.downloadFile({ + url: 'https://gss0.baidu.com/9fo3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/b64543a98226cffc74a50341b4014a90f703eab2.jpg', + success:function(res) { + canvasimgbg = res.tempFilePath + //先画左右,再画中间 + canvas.drawImage(canvasimgbg, app[0], 0, 103, 100, 66*rpx, 830*rpx, 100*rpx, 100*rpx); + canvas.drawImage(canvasimgbg, app[1], 0, 103, 100, 463*rpx, 830*rpx, 100*rpx, 100*rpx); + if(app[2]) + canvas.drawImage(canvasimgbg, app[2], 0, 103, 100, 264*rpx, 830*rpx, 100*rpx, 100*rpx); + canvas.draw(true,()=>{}); + // 导出为临时图片 + wx.canvasToTempFilePath({ + x: 0, + y: 0, + width: 632*rpx, + height: 1054*rpx, + destWidth: 1264, + destHeight: 2108, + canvasId: 'qrcode', + success: function (res) { + console.log(res) + that.data.codeSrc = res.tempFilePath + console.log(that.data.codeSrc) + wx.hideLoading() + wx.showModal({ + title: '提示', + content: '单击图片即可预览,预览界面长按即可保存', + }) + } + }) + } + }) + } + }) + } + }) + }, + + preview: function() { + console.log(this.data.codeSrc) + wx.previewImage({ + urls: [this.data.codeSrc], + }) + }, + + //上传支付宝二维码 + scanCode: function(e) { + var type = e.currentTarget.dataset.type + var that = this + wx.scanCode({ + success (res) { + //utils里边写个校验,返回true false + //写入 + var check = util.checkInput(type,res.result) + console.log(check) + that.data.createCode[type] = res.result + that.setData({ + createCode: that.data.createCode + }) + wx.showToast({ + title: '录入成功', + icon: 'success', + }) + }, + fail (err) { + console.log(err) + wx.showToast({ + title: '扫码失败', + icon: 'none', + }) + } + }) + }, + + //输入用户名,月份啥的 + inputChange: function(e) { + var type = e.currentTarget.dataset.type + var value = e.detail.value + var check = util.checkInput(type,value) + console.log(check) + this.data.createCode[type] = value + this.setData({ + createCode: this.data.createCode + }) + //utils校验,返回的东西直接装进createCode + //return value + console.log(e) + }, + + //提交 + submit: function() { + var res = util.checkSubmit(this.data.createCode) + if (!res) return + console.log(res) + //showLoading + //api.newOrder + } +}) + diff --git a/pages/home/home.json b/pages/home/home.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/home/home.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/home/home.wxml b/pages/home/home.wxml new file mode 100644 index 0000000..6f9406c --- /dev/null +++ b/pages/home/home.wxml @@ -0,0 +1,109 @@ + + + + + + + + 「一言」 + {{yiyan.hitokoto}} + -「{{yiyan.creator}}」 + + + + + 新建 + + + + + + 安全保障 + + + + + + 开始合并 + + + + + + 最佳案例 + + + + + + + + 名称:{{item.username}} + 备注:{{item.node?item.node:'您没写呀'}} + 剩余时间:{{item.end}} + + + + + + + + + + 功能开发中 + + 安全保障 + + + 新建 + + + + + {{createCode.alcode?'录入成功':'待录入'}} + + + + + {{createCode.wxcode?'录入成功':'待录入'}} + + + + + {{createCode.qqcode?'录入成功':'待录入'}} + + + + + 标题 + + + + + 备注 + + + + + 使用时长(月) + + + + 确认合并 + + + + + + + + + 背景商店 + + + + 已完成 + {{codes.length}} 个 + + + \ No newline at end of file diff --git a/pages/home/home.wxss b/pages/home/home.wxss new file mode 100644 index 0000000..fb842c1 --- /dev/null +++ b/pages/home/home.wxss @@ -0,0 +1,486 @@ +/* pages/home/home.wxss */ +page { + background: #000; + position: relative; + height:100%; +} + +.header { + display: flex; + align-items: center; + padding-left: 30rpx; + position: absolute; + left: 0; + margin-bottom:50rpx; + z-index: 100; + width: 100%; +} + +.back { + height:50rpx; + width: 50rpx; + background-image: url("data:image/svg+xml,%3Csvg t='1573481958784' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='33151' width='200' height='200'%3E%3Cpath d='M17.5 0v1024' fill='%23ffffff' p-id='33152'%3E%3C/path%3E%3Cpath d='M33.5 0v1024' fill='%23ffffff' p-id='33153'%3E%3C/path%3E%3Cpath d='M49.5 0v1024' fill='%23ffffff' p-id='33154'%3E%3C/path%3E%3Cpath d='M65.5 0v1024' fill='%23ffffff' p-id='33155'%3E%3C/path%3E%3Cpath d='M81.5 0v1024' fill='%23ffffff' p-id='33156'%3E%3C/path%3E%3Cpath d='M97.5 0v1024' fill='%23ffffff' p-id='33157'%3E%3C/path%3E%3Cpath d='M113.5 0v1024' fill='%23ffffff' p-id='33158'%3E%3C/path%3E%3Cpath d='M129.5 0v1024' fill='%23ffffff' p-id='33159'%3E%3C/path%3E%3Cpath d='M145.5 0v1024' fill='%23ffffff' p-id='33160'%3E%3C/path%3E%3Cpath d='M161.5 0v1024' fill='%23ffffff' p-id='33161'%3E%3C/path%3E%3Cpath d='M177.5 0v1024' fill='%23ffffff' p-id='33162'%3E%3C/path%3E%3Cpath d='M193.5 0v1024' fill='%23ffffff' p-id='33163'%3E%3C/path%3E%3Cpath d='M209.5 0v1024' fill='%23ffffff' p-id='33164'%3E%3C/path%3E%3Cpath d='M225.5 0v1024' fill='%23ffffff' p-id='33165'%3E%3C/path%3E%3Cpath d='M241.5 0v1024' fill='%23ffffff' p-id='33166'%3E%3C/path%3E%3Cpath d='M257.5 0v1024' fill='%23ffffff' p-id='33167'%3E%3C/path%3E%3Cpath d='M273.5 0v1024' fill='%23ffffff' p-id='33168'%3E%3C/path%3E%3Cpath d='M289.5 0v1024' fill='%23ffffff' p-id='33169'%3E%3C/path%3E%3Cpath d='M305.5 0v1024' fill='%23ffffff' p-id='33170'%3E%3C/path%3E%3Cpath d='M321.5 0v1024' fill='%23ffffff' p-id='33171'%3E%3C/path%3E%3Cpath d='M337.5 0v1024' fill='%23ffffff' p-id='33172'%3E%3C/path%3E%3Cpath d='M353.5 0v1024' fill='%23ffffff' p-id='33173'%3E%3C/path%3E%3Cpath d='M369.5 0v1024' fill='%23ffffff' p-id='33174'%3E%3C/path%3E%3Cpath d='M385.5 0v1024' fill='%23ffffff' p-id='33175'%3E%3C/path%3E%3Cpath d='M401.5 0v1024' fill='%23ffffff' p-id='33176'%3E%3C/path%3E%3Cpath d='M417.5 0v1024' fill='%23ffffff' p-id='33177'%3E%3C/path%3E%3Cpath d='M433.5 0v1024' fill='%23ffffff' p-id='33178'%3E%3C/path%3E%3Cpath d='M449.5 0v1024' fill='%23ffffff' p-id='33179'%3E%3C/path%3E%3Cpath d='M465.5 0v1024' fill='%23ffffff' p-id='33180'%3E%3C/path%3E%3Cpath d='M481.5 0v1024' fill='%23ffffff' p-id='33181'%3E%3C/path%3E%3Cpath d='M497.5 0v1024' fill='%23ffffff' p-id='33182'%3E%3C/path%3E%3Cpath d='M513.5 0v1024' fill='%23ffffff' p-id='33183'%3E%3C/path%3E%3Cpath d='M529.5 0v1024' fill='%23ffffff' p-id='33184'%3E%3C/path%3E%3Cpath d='M545.5 0v1024' fill='%23ffffff' p-id='33185'%3E%3C/path%3E%3Cpath d='M561.5 0v1024' fill='%23ffffff' p-id='33186'%3E%3C/path%3E%3Cpath d='M577.5 0v1024' fill='%23ffffff' p-id='33187'%3E%3C/path%3E%3Cpath d='M593.5 0v1024' fill='%23ffffff' p-id='33188'%3E%3C/path%3E%3Cpath d='M609.5 0v1024' fill='%23ffffff' p-id='33189'%3E%3C/path%3E%3Cpath d='M625.5 0v1024' fill='%23ffffff' p-id='33190'%3E%3C/path%3E%3Cpath d='M641.5 0v1024' fill='%23ffffff' p-id='33191'%3E%3C/path%3E%3Cpath d='M657.5 0v1024' fill='%23ffffff' p-id='33192'%3E%3C/path%3E%3Cpath d='M673.5 0v1024' fill='%23ffffff' p-id='33193'%3E%3C/path%3E%3Cpath d='M689.5 0v1024' fill='%23ffffff' p-id='33194'%3E%3C/path%3E%3Cpath d='M705.5 0v1024' fill='%23ffffff' p-id='33195'%3E%3C/path%3E%3Cpath d='M721.5 0v1024' fill='%23ffffff' p-id='33196'%3E%3C/path%3E%3Cpath d='M737.5 0v1024' fill='%23ffffff' p-id='33197'%3E%3C/path%3E%3Cpath d='M753.5 0v1024' fill='%23ffffff' p-id='33198'%3E%3C/path%3E%3Cpath d='M769.5 0v1024' fill='%23ffffff' p-id='33199'%3E%3C/path%3E%3Cpath d='M785.5 0v1024' fill='%23ffffff' p-id='33200'%3E%3C/path%3E%3Cpath d='M801.5 0v1024' fill='%23ffffff' p-id='33201'%3E%3C/path%3E%3Cpath d='M817.5 0v1024' fill='%23ffffff' p-id='33202'%3E%3C/path%3E%3Cpath d='M833.5 0v1024' fill='%23ffffff' p-id='33203'%3E%3C/path%3E%3Cpath d='M849.5 0v1024' fill='%23ffffff' p-id='33204'%3E%3C/path%3E%3Cpath d='M865.5 0v1024' fill='%23ffffff' p-id='33205'%3E%3C/path%3E%3Cpath d='M881.5 0v1024' fill='%23ffffff' p-id='33206'%3E%3C/path%3E%3Cpath d='M897.5 0v1024' fill='%23ffffff' p-id='33207'%3E%3C/path%3E%3Cpath d='M913.5 0v1024' fill='%23ffffff' p-id='33208'%3E%3C/path%3E%3Cpath d='M929.5 0v1024' fill='%23ffffff' p-id='33209'%3E%3C/path%3E%3Cpath d='M945.5 0v1024' fill='%23ffffff' p-id='33210'%3E%3C/path%3E%3Cpath d='M961.5 0v1024' fill='%23ffffff' p-id='33211'%3E%3C/path%3E%3Cpath d='M977.5 0v1024' fill='%23ffffff' p-id='33212'%3E%3C/path%3E%3Cpath d='M993.5 0v1024' fill='%23ffffff' p-id='33213'%3E%3C/path%3E%3Cpath d='M1009.5 0v1024M1.5 16h1021' fill='%23ffffff' p-id='33214'%3E%3C/path%3E%3Cpath d='M1.5 32h1021' fill='%23ffffff' p-id='33215'%3E%3C/path%3E%3Cpath d='M1.5 48h1021' fill='%23ffffff' p-id='33216'%3E%3C/path%3E%3Cpath d='M1.5 64h1021' fill='%23ffffff' p-id='33217'%3E%3C/path%3E%3Cpath d='M1.5 80h1021' fill='%23ffffff' p-id='33218'%3E%3C/path%3E%3Cpath d='M1.5 96h1021' fill='%23ffffff' p-id='33219'%3E%3C/path%3E%3Cpath d='M1.5 112h1021' fill='%23ffffff' p-id='33220'%3E%3C/path%3E%3Cpath d='M1.5 128h1021' fill='%23ffffff' p-id='33221'%3E%3C/path%3E%3Cpath d='M1.5 144h1021' fill='%23ffffff' p-id='33222'%3E%3C/path%3E%3Cpath d='M1.5 160h1021' fill='%23ffffff' p-id='33223'%3E%3C/path%3E%3Cpath d='M1.5 176h1021' fill='%23ffffff' p-id='33224'%3E%3C/path%3E%3Cpath d='M1.5 192h1021' fill='%23ffffff' p-id='33225'%3E%3C/path%3E%3Cpath d='M1.5 208h1021' fill='%23ffffff' p-id='33226'%3E%3C/path%3E%3Cpath d='M1.5 224h1021' fill='%23ffffff' p-id='33227'%3E%3C/path%3E%3Cpath d='M1.5 240h1021' fill='%23ffffff' p-id='33228'%3E%3C/path%3E%3Cpath d='M1.5 256h1021' fill='%23ffffff' p-id='33229'%3E%3C/path%3E%3Cpath d='M1.5 272h1021' fill='%23ffffff' p-id='33230'%3E%3C/path%3E%3Cpath d='M1.5 288h1021' fill='%23ffffff' p-id='33231'%3E%3C/path%3E%3Cpath d='M1.5 304h1021' fill='%23ffffff' p-id='33232'%3E%3C/path%3E%3Cpath d='M1.5 320h1021' fill='%23ffffff' p-id='33233'%3E%3C/path%3E%3Cpath d='M1.5 336h1021' fill='%23ffffff' p-id='33234'%3E%3C/path%3E%3Cpath d='M1.5 352h1021' fill='%23ffffff' p-id='33235'%3E%3C/path%3E%3Cpath d='M1.5 368h1021' fill='%23ffffff' p-id='33236'%3E%3C/path%3E%3Cpath d='M1.5 384h1021' fill='%23ffffff' p-id='33237'%3E%3C/path%3E%3Cpath d='M1.5 400h1021' fill='%23ffffff' p-id='33238'%3E%3C/path%3E%3Cpath d='M1.5 416h1021' fill='%23ffffff' p-id='33239'%3E%3C/path%3E%3Cpath d='M1.5 432h1021' fill='%23ffffff' p-id='33240'%3E%3C/path%3E%3Cpath d='M1.5 448h1021' fill='%23ffffff' p-id='33241'%3E%3C/path%3E%3Cpath d='M1.5 464h1021' fill='%23ffffff' p-id='33242'%3E%3C/path%3E%3Cpath d='M1.5 480h1021' fill='%23ffffff' p-id='33243'%3E%3C/path%3E%3Cpath d='M1.5 496h1021' fill='%23ffffff' p-id='33244'%3E%3C/path%3E%3Cpath d='M1.5 512h1021' fill='%23ffffff' p-id='33245'%3E%3C/path%3E%3Cpath d='M1.5 528h1021' fill='%23ffffff' p-id='33246'%3E%3C/path%3E%3Cpath d='M1.5 544h1021' fill='%23ffffff' p-id='33247'%3E%3C/path%3E%3Cpath d='M1.5 560h1021' fill='%23ffffff' p-id='33248'%3E%3C/path%3E%3Cpath d='M1.5 576h1021' fill='%23ffffff' p-id='33249'%3E%3C/path%3E%3Cpath d='M1.5 592h1021' fill='%23ffffff' p-id='33250'%3E%3C/path%3E%3Cpath d='M1.5 608h1021' fill='%23ffffff' p-id='33251'%3E%3C/path%3E%3Cpath d='M1.5 624h1021' fill='%23ffffff' p-id='33252'%3E%3C/path%3E%3Cpath d='M1.5 640h1021' fill='%23ffffff' p-id='33253'%3E%3C/path%3E%3Cpath d='M1.5 656h1021' fill='%23ffffff' p-id='33254'%3E%3C/path%3E%3Cpath d='M1.5 672h1021' fill='%23ffffff' p-id='33255'%3E%3C/path%3E%3Cpath d='M1.5 688h1021' fill='%23ffffff' p-id='33256'%3E%3C/path%3E%3Cpath d='M1.5 704h1021' fill='%23ffffff' p-id='33257'%3E%3C/path%3E%3Cpath d='M1.5 720h1021' fill='%23ffffff' p-id='33258'%3E%3C/path%3E%3Cpath d='M1.5 736h1021' fill='%23ffffff' p-id='33259'%3E%3C/path%3E%3Cpath d='M1.5 752h1021' fill='%23ffffff' p-id='33260'%3E%3C/path%3E%3Cpath d='M1.5 768h1021' fill='%23ffffff' p-id='33261'%3E%3C/path%3E%3Cpath d='M1.5 784h1021' fill='%23ffffff' p-id='33262'%3E%3C/path%3E%3Cpath d='M1.5 800h1021' fill='%23ffffff' p-id='33263'%3E%3C/path%3E%3Cpath d='M1.5 816h1021' fill='%23ffffff' p-id='33264'%3E%3C/path%3E%3Cpath d='M1.5 832h1021' fill='%23ffffff' p-id='33265'%3E%3C/path%3E%3Cpath d='M1.5 848h1021' fill='%23ffffff' p-id='33266'%3E%3C/path%3E%3Cpath d='M1.5 864h1021' fill='%23ffffff' p-id='33267'%3E%3C/path%3E%3Cpath d='M1.5 880h1021' fill='%23ffffff' p-id='33268'%3E%3C/path%3E%3Cpath d='M1.5 896h1021' fill='%23ffffff' p-id='33269'%3E%3C/path%3E%3Cpath d='M1.5 912h1021' fill='%23ffffff' p-id='33270'%3E%3C/path%3E%3Cpath d='M1.5 928h1021' fill='%23ffffff' p-id='33271'%3E%3C/path%3E%3Cpath d='M1.5 944h1021' fill='%23ffffff' p-id='33272'%3E%3C/path%3E%3Cpath d='M1.5 960h1021' fill='%23ffffff' p-id='33273'%3E%3C/path%3E%3Cpath d='M1.5 976h1021' fill='%23ffffff' p-id='33274'%3E%3C/path%3E%3Cpath d='M1.5 992h1021' fill='%23ffffff' p-id='33275'%3E%3C/path%3E%3Cpath d='M1.5 1008h1021' fill='%23ffffff' p-id='33276'%3E%3C/path%3E%3Cpath d='M978.595 450.2H294.677c-18.54 0-26.782-22.658-14.422-35.018l197.76-197.76c12.36-12.36 12.36-30.9 0-43.26l-45.322-45.322c-12.36-12.36-30.9-12.36-43.26 0L28.931 491.398c-12.36 12.36-12.36 30.9 0 43.26L389.433 895.16c12.36 12.36 30.9 12.36 43.26 0l43.26-43.26c12.36-12.36 12.36-30.9 0-43.26l-197.76-197.76c-12.36-14.422-4.118-37.08 14.422-37.08h683.918c16.478 0 30.9-12.36 30.9-28.838v-61.8c0-16.478-12.36-32.962-28.838-32.962z' fill='%23ffffff' p-id='33277'%3E%3C/path%3E%3C/svg%3E"); + background-size: 100% 100%; + display: inline-block; +} + +.bg { + position: fixed; + top:0; + left:0; + z-index: -100; + height:100%; + width:100%; +} +.bg:after{ + position: absolute; + top: 0; + left: 0; + content: ""; + background-color: black; + opacity: 0.3; + z-index: 1; + width: 100%; + height: 100%; +} + +.yiyan { + display: flex; + flex-direction: column; + align-items: center; + margin:0 auto; + width:90%; + margin-top:30rpx; +} + +.yiyan .title { + font-size: 50rpx; + color: #fff; + text-align: center; +} + +.yiyan .content { + /* text-indent:2em; */ + margin-top:50rpx; + font-size: 40rpx; + color: #fff; + text-align: left; +} + +.yiyan .creator { + margin-top:50rpx; + font-size: 30rpx; + color:#fff; + text-align: right; + width:100%; +} + +.main { + position: fixed; + bottom: 0; + left:0; + width: 100%; + height: 100%; + box-sizing: border-box; + padding: 80rpx 30rpx; + display: flex; + flex-direction: column; + justify-content: flex-end; +} + +.main .main-box { + flex:1; + display: flex; + flex-direction: column; + justify-content: flex-end; +} + +.main .create-warp { + background: #fff; + border-radius: 20rpx; + padding: 30rpx; + overflow: hidden; + height: 350rpx; +} + +.main .create-warp .title { + margin-bottom: 50rpx; + font-size: 40rpx; + font-weight: 600; +} + +.main .create-warp .content-box { + display: flex; + align-items: center; + justify-content: space-around; +} + +.main .create-warp .content { + display: flex; + flex-direction: column; + justify-content: space-around; + align-items: center; + margin-bottom: 30rpx; +} + +.main .create-warp .content .content-circle { + height: 150rpx; + width: 150rpx; + border-radius: 50%; + margin-bottom: 20rpx; + display: flex; + align-items: center; + justify-content: center; +} + +.main .create-warp .content .content-circle text { + background-size: 100% 100%; + display: inline-block; +} + +.main .create-warp .content:first-of-type .content-circle { + /* background: #ea0037; */ + background-image: linear-gradient(to top right, #ea0037 , #f43d68, #f46e8d); +} + +.main .create-warp .content:first-of-type .content-circle text { + height: 70rpx; + width: 70rpx; + background-image: url("data:image/svg+xml,%3Csvg t='1573464056981' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='23871' width='200' height='200'%3E%3Cpath d='M520.606476 1023.609905h-16.896c-6.192762-0.877714-12.434286-1.584762-18.602666-2.608762-33.475048-5.436952-64.658286-17.554286-94.69562-32.914286-58.806857-29.988571-110.689524-69.656381-157.330285-116.272762-44.324571-44.27581-82.285714-93.379048-110.08-149.918476C100.425143 676.010667 86.308571 627.98019 86.381714 576.219429 86.552381 435.833905 86.454857 295.448381 86.454857 155.062857v-5.12c0.804571-0.414476 1.072762-0.658286 1.365333-0.682667 1.462857-0.146286 2.950095-0.316952 4.437334-0.341333 38.765714-0.609524 77.287619-3.169524 115.516952-10.386286 36.59581-6.92419 72.655238-15.847619 107.398095-29.379047 47.591619-18.480762 93.062095-41.398857 136.972191-67.486476A458.264381 458.264381 0 0 0 511.658667 0.390095h0.975238c1.536 1.26781 2.998857 2.584381 4.534857 3.803429 33.353143 26.282667 69.827048 47.469714 107.422476 66.755047 49.249524 25.283048 99.815619 47.201524 153.868191 60.099048 28.038095 6.680381 56.246857 12.141714 84.967619 14.384762 19.772952 1.536 39.619048 2.096762 59.440762 3.072l15.018666 0.731429v6.046476c0 140.190476 0 280.380952-0.073143 420.571428 0 10.654476-0.365714 21.333333-1.536 31.914667-3.974095 36.181333-14.701714 70.485333-29.842285 103.448381-21.699048 47.201524-50.712381 89.526857-84.992 128.26819-57.904762 65.511619-124.708571 119.369143-204.092953 156.550096-23.28381 10.898286-47.420952 19.431619-72.777143 23.990857-7.94819 1.462857-15.969524 2.389333-23.966476 3.584M157.013333 220.745143v3.608381c0 119.417905-0.146286 238.83581 0.195048 358.229333 0.048762 13.702095 1.852952 27.599238 4.534857 41.057524 7.875048 39.399619 25.35619 74.776381 47.250286 108.007619 43.934476 66.681905 100.303238 120.978286 165.473524 166.229333 30.159238 20.967619 61.854476 39.107048 96.889904 50.712381 18.748952 6.217143 37.790476 9.386667 57.58781 5.583238 26.624-5.12 51.053714-15.896381 74.630095-28.769523 50.809905-27.818667 95.914667-63.317333 136.777143-104.350477 38.180571-38.278095 71.460571-80.359619 95.695238-129.121523 17.481143-35.230476 28.696381-72.094476 28.647619-111.981715-0.146286-118.076952-0.048762-236.153905-0.048762-354.230857v-5.193143c-16.725333-2.535619-32.768-4.681143-48.737524-7.43619-44.739048-7.655619-88.478476-19.236571-130.657523-36.205714a1041.871238 1041.871238 0 0 1-169.813334-87.113143c-2.486857-1.560381-4.242286-1.511619-6.680381 0.024381-40.057905 25.429333-82.041905 47.201524-125.049904 67.047619a719.481905 719.481905 0 0 1-169.496381 54.491428c-18.822095 3.535238-37.790476 6.241524-57.197715 9.411048' fill='%23ffffff' p-id='23872'%3E%3C/path%3E%3Cpath d='M702.659048 361.910857l62.73219 58.148572-276.821333 320.926476-181.223619-154.819048 55.832381-66.169905 116.711619 98.645334 220.964571-254.780953 1.77981-1.950476z' fill='%23ffffff' p-id='23873'%3E%3C/path%3E%3C/svg%3E"); +} + +.main .create-warp .content:nth-of-type(2) .content-circle{ + /* background: #ff5600; */ + background-image: linear-gradient(to top right, #ff5600 , #ff8040, #ffa273); + +} + +.main .create-warp .content:nth-of-type(2) .content-circle text { + height: 100rpx; + width: 100rpx; + background-image: url("data:image/svg+xml,%3Csvg t='1573464191757' class='icon' viewBox='0 0 1536 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='25578' width='200' height='200'%3E%3Cpath d='M1231.872 856.576c4.096 15.872 3.072 30.72-2.56 45.056-5.632 14.336-14.336 26.624-26.112 37.888-11.776 10.752-26.624 19.456-43.52 25.6-17.408 6.144-35.84 9.216-55.296 9.216-124.928 0.512-236.544 1.024-334.848 1.024H432.128c-23.552 0-44.544-4.096-62.976-12.8-17.92-8.704-32.768-18.944-43.52-31.744-10.752-12.8-18.432-26.112-22.016-40.96-3.584-14.848-3.072-28.16 1.536-39.936 4.096-9.216 7.68-18.944 11.776-28.672 3.072-8.704 7.168-18.432 11.776-29.184 4.608-10.752 9.728-22.016 14.848-33.28l37.888-91.136h113.152l-42.496 124.928H1090.56l-42.496-124.928h108.032c13.824 33.792 26.624 64 37.888 91.136 4.608 11.776 9.216 23.552 13.824 34.816 4.608 11.264 8.704 21.504 12.288 30.208 3.584 8.704 6.656 16.384 8.704 23.04 2.048 5.632 3.072 9.216 3.072 9.728z' fill='%23ffffff' p-id='25579'%3E%3C/path%3E%3Cpath d='M733.696 70.144c11.776-14.336 23.04-21.504 34.304-21.504 10.752 0.512 22.016 8.192 34.304 23.04 13.312 16.384 28.16 36.352 45.056 58.88 16.896 23.04 33.792 46.08 51.712 70.144 17.408 24.064 34.304 47.616 51.2 69.632 16.384 22.528 31.232 41.472 43.52 57.344 11.776 15.36 15.36 27.648 10.24 37.376-5.12 9.728-16.384 14.336-34.304 14.336-10.752 0-23.04 0.512-37.376 1.024s-26.112 1.024-36.352 1.024c-13.824-0.512-22.528 4.608-26.624 16.384-4.096 11.776-6.144 27.136-6.144 46.08v46.592c0 17.408 0 34.304-0.512 51.712-0.512 17.408-0.512 33.28-0.512 48.64v38.4c-0.512 22.528-4.608 38.912-12.288 49.152s-22.528 15.36-44.032 15.36c-15.36 0-28.672 0-39.936-0.512-11.776-0.512-24.064-0.512-38.4-0.512-11.776 0-21.504-2.048-28.16-6.144-7.168-4.096-12.288-8.704-15.872-14.848-3.584-6.144-6.144-12.8-7.168-19.968-1.024-7.168-1.536-14.336-1.536-20.992 0-15.36 0-31.744 0.512-49.664 0.512-17.92 0.512-35.84 0.512-54.272 0-18.432 0-36.352 0.512-53.76 0.512-17.408 0.512-33.28 0.512-48.128 0-13.312-1.536-23.552-5.12-31.744-3.072-7.68-11.776-11.776-24.576-11.776-11.776 0-26.624-0.512-44.544-1.536-17.92-1.024-32.256-1.024-42.496-0.512-18.944 0-30.208-5.632-33.792-17.408-3.072-11.776 2.56-26.112 17.92-44.032 13.312-16.384 28.16-35.84 45.056-58.368 16.896-22.528 33.792-45.056 51.2-68.608 17.408-23.04 33.792-45.568 50.176-67.584 15.872-20.992 30.208-38.912 43.008-53.248z' fill='%23ffffff' p-id='25580'%3E%3C/path%3E%3C/svg%3E"); +} + +.main .create-warp .content:last-of-type .content-circle { + /* background: #b40097; */ + /* background: #c7007d; */ + background-image: linear-gradient(to top right, #c7007d , #e339a4, #e366b5); + +} + +.main .create-warp .content:last-of-type .content-circle text { + height: 70rpx; + width: 70rpx; + background-image: url("data:image/svg+xml,%3Csvg t='1573464265589' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='28839' width='200' height='200'%3E%3Cpath d='M407.746606 0H55.60181C27.800905 0 0 27.800905 0 55.60181v347.511312C0 435.547511 27.800905 463.348416 55.60181 463.348416h347.511312c32.434389 0 60.235294-27.800905 60.235294-55.60181V55.60181C463.348416 27.800905 435.547511 0 407.746606 0z m-13.900452 393.846154h-324.343892v-324.343892h324.343892v324.343892zM407.746606 556.0181H55.60181c-27.800905 0-55.60181 27.800905-55.60181 55.60181v347.511312c0 32.434389 27.800905 60.235294 55.60181 60.235294h347.511312c32.434389 0 55.60181-27.800905 55.60181-55.60181v-347.511312c4.633484-32.434389-23.167421-60.235294-50.968326-60.235294z m-13.900452 393.846153h-324.343892v-324.343891h324.343892v324.343891zM982.298643 556.0181c-18.533937 0-37.067873 13.900452-37.067874 37.067873v111.20362h-129.737556v-111.20362c0-18.533937-13.900452-37.067873-37.067874-37.067873h-194.606334c-18.533937 0-37.067873 13.900452-37.067874 37.067873v393.846154c0 18.533937 13.900452 37.067873 37.067874 37.067873s37.067873-13.900452 37.067873-37.067873v-361.411765h125.104072v111.20362c0 18.533937 13.900452 37.067873 37.067874 37.067873h199.239819c18.533937 0 37.067873-13.900452 37.067873-37.067873v-143.638009c0-23.167421-13.900452-37.067873-37.067873-37.067873zM982.298643 834.027149c-18.533937 0-37.067873 13.900452-37.067874 37.067874v115.837104c0 18.533937 13.900452 37.067873 37.067874 37.067873s37.067873-13.900452 37.067873-37.067873v-115.837104c0-23.167421-18.533937-37.067873-37.067873-37.067874z' fill='%23ffffff' p-id='28840'%3E%3C/path%3E%3Cpath d='M880.361991 949.864253h-106.570136v-83.402715c0-18.533937-13.900452-37.067873-37.067873-37.067873s-37.067873 13.900452-37.067873 37.067873v115.837105c0 18.533937 13.900452 37.067873 37.067873 37.067873H880.361991c18.533937 0 37.067873-13.900452 37.067873-37.067873s-18.533937-32.434389-37.067873-32.43439zM963.764706 0h-347.511312c-32.434389 0-60.235294 27.800905-60.235294 55.60181v347.511312c0 32.434389 27.800905 55.60181 55.60181 55.60181h347.511312c32.434389 0 55.60181-27.800905 55.60181-55.60181V55.60181C1019.366516 27.800905 991.565611 0 963.764706 0z m-13.900453 393.846154h-324.343891v-324.343892h324.343891v324.343892z' fill='%23ffffff' p-id='28841'%3E%3C/path%3E%3C/svg%3E"); +} + +.main .create-warp .content .lable { + font-size: 30rpx; +} + +.main .code-warp ,.main .store-warp, .main .safe-warp, .main .start-warp, .main .safe-warp, .main .example-warp{ + background: #fff; + border-radius: 20rpx; + padding: 30rpx; + height: 90%; + overflow: auto; +} + +.main .code-warp .code-main { + height: 100%; + width: 100%; + position: relative; +} + +.main .code-warp .code-card { + width: 100%; + box-sizing: border-box; + padding: 30rpx; + margin-bottom: 50rpx; + border: 1px #eee solid; + border-radius: 20rpx; + box-shadow: #eee 10rpx 10rpx 30rpx; + display: flex; +} + +.main .code-warp .left { + width: 80%; + padding-right: 30rpx; + border-right: 1px #eee solid; + margin-right: 30rpx; +} + +.main .code-warp .right { + flex:1; + display: flex; + align-items: center; + justify-content: center; +} + +.main .code-warp .right text { + background-image: url("data:image/svg+xml,%3Csvg t='1573529126688' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='5820' width='200' height='200'%3E%3Cpath d='M511.852322 1024a511.852322 511.852322 0 1 1 512.147678-512.147678 512.443034 512.443034 0 0 1-512.147678 512.147678z m0-935.393135a423.245457 423.245457 0 1 0 423.540813 423.245457A423.83617 423.83617 0 0 0 511.852322 88.606865z' fill='%23f44c59' p-id='5821'%3E%3C/path%3E%3Cpath d='M277.04413 468.434958m43.417364 0l383.077012 0q43.417364 0 43.417364 43.417364l0 0q0 43.417364-43.417364 43.417364l-383.077012 0q-43.417364 0-43.417364-43.417364l0 0q0-43.417364 43.417364-43.417364Z' fill='%23f44c59' p-id='5822'%3E%3C/path%3E%3C/svg%3E"); + background-size: 100% 100%; + display: inline-block; + height:50rpx; + width:50rpx; +} + +.main .store-warp { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + +.main .store-warp text { + background-image: url("data:image/svg+xml,%3Csvg t='1573483723194' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='37757' width='200' height='200'%3E%3Cpath d='M195.072 726.528c9.728-5.12 20.992-8.192 32.256-8.192 16.384 0 31.744 5.632 43.52 16.384 19.968-31.232 54.272-51.712 94.72-51.712 43.52 0 81.92 25.088 99.84 61.44 13.824-12.8 31.744-20.992 51.712-20.992 9.728 0 18.944 2.048 27.648 5.12 12.8-11.264 30.72-17.92 48.64-17.92 28.672 0 53.248 16.384 66.048 39.424 10.24-7.168 23.552-11.264 36.864-11.264 5.12 0 9.728 0.512 14.848 2.048 10.24-29.184 38.4-50.176 70.656-50.176 13.824 0 26.112 4.096 36.864 9.728 19.456-38.912 60.416-66.048 107.008-66.048 17.408 0 33.792 4.096 48.64 10.24-62.464-205.824-253.44-355.328-479.744-355.328-214.016 0-396.8 134.144-468.992 323.584 9.728-2.56 20.992-4.096 32.256-4.096 70.144 0.512 127.488 51.712 137.216 117.76z' fill='%23CFF0FF' p-id='37758'%3E%3C/path%3E%3Cpath d='M403.968 283.648c-58.368 75.776-119.808 160.768-156.16 250.88-4.608 10.24 5.12 19.456 14.848 16.896l111.104-31.232m222.72-236.544c58.368 75.776 119.808 160.768 156.16 250.88 4.608 10.24-5.12 19.456-14.848 16.896l-111.104-31.232' fill='%23F9DA3E' p-id='37759'%3E%3C/path%3E%3Cpath d='M635.904 620.544H361.984c-22.016-72.192-27.136-147.968-11.264-221.184C370.176 315.392 409.6 236.544 467.456 169.984l5.632-6.656c13.824-16.384 38.4-16.384 51.2 0l5.632 6.656c58.368 66.048 97.28 145.408 116.224 228.864 16.896 73.728 11.776 149.504-10.24 221.696z' fill='%2378C5FD' p-id='37760'%3E%3C/path%3E%3Cpath d='M463.36 590.336c-41.984 0-78.336-31.232-84.48-72.704-6.656-50.176-5.12-99.84 5.12-148.48 17.408-78.336 53.248-153.088 104.96-216.576-6.656 2.048-12.8 5.12-16.896 10.24l-5.632 6.656C410.112 235.52 370.176 314.368 351.744 398.336c-16.384 73.216-11.264 150.016 11.264 221.184h273.92c3.072-10.24 5.632-19.456 8.192-29.696H463.36v0.512z' fill='%23568EC8' p-id='37761'%3E%3C/path%3E%3Cpath d='M400.896 628.736h195.072v46.592H400.896v-46.592z' fill='%2378C5FD' p-id='37762'%3E%3C/path%3E%3Cpath d='M580.608 681.984h-163.84L499.2 814.08l81.408-132.096z' fill='%23F9DA3E' p-id='37763'%3E%3C/path%3E%3Cpath d='M432.128 385.024c0 23.552 12.8 45.568 33.28 56.832 20.992 11.776 46.08 11.776 66.56 0s33.28-33.792 33.28-56.832c0-36.352-29.696-66.048-66.56-66.048-36.352 0.512-66.56 29.696-66.56 66.048z' fill='%23F6FDFF' p-id='37764'%3E%3C/path%3E%3Cpath d='M546.816 388.096c-2.56 0.512-5.12-1.536-5.12-4.096-2.048-13.824-10.24-24.576-21.504-31.232-2.048-1.536-3.072-4.096-2.048-6.656 1.536-2.56 4.096-3.072 6.656-2.048 13.824 7.68 23.552 21.504 26.112 38.4 0.512 2.56-1.024 5.12-4.096 5.632zM499.2 339.968c0 3.072 2.56 5.632 5.632 5.632 3.072 0 5.632-2.56 5.632-5.632 0-3.072-2.56-5.632-5.632-5.632-3.072 0-5.632 2.56-5.632 5.632z' fill='%23CFF0FF' p-id='37765'%3E%3C/path%3E%3Cpath d='M101.376 257.024l10.24 18.944 18.944 10.24-18.944 10.24-10.24 29.184-10.24-29.184-18.944-10.24 18.944-10.24 10.24-18.944z' fill='%23DCF0FE' p-id='37766'%3E%3C/path%3E%3Cpath d='M311.808 820.224l7.68 14.336 14.336 7.68-14.336 7.68-7.68 22.528-7.68-22.528-14.336-7.68 14.336-7.68 7.68-14.336z' fill='%23AEDCFE' p-id='37767'%3E%3C/path%3E%3Cpath d='M961.024 429.056l13.824 24.064 24.576 12.8-24.576 12.8-13.824 37.376-13.824-37.376-24.576-12.8 24.576-12.8 13.824-24.064z' fill='%23CCE9FE' p-id='37768'%3E%3C/path%3E%3C/svg%3E"); + display: block; + background-size: 100% 100%; + height: 150rpx; + width: 150rpx; +} + +.main .store-warp view { + font-size: 40rpx; + +} + + + + +.main .util-box { + margin-top: 30rpx; + display: flex; + align-items: center; + justify-content: space-between; +} + +.main .util-box > view { + display: flex; + align-items: center; + justify-content: space-between; + padding: 30rpx; + margin-right: 30rpx; + background: #fff; + border-radius: 20rpx; + flex: 1; + height: 50rpx; +} + +.main .util-box .store-box .store-icon { + background-image: url("data:image/svg+xml,%3Csvg t='1573462921677' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='20022' id='mx_n_1573462921679' width='200' height='200'%3E%3Cpath d='M763.776 968.576H261.504C147.456 968.576 55.04 876.16 55.04 762.112V259.84c0-114.048 92.416-206.464 206.464-206.464h502.272C877.824 53.376 970.24 145.792 970.24 259.84v502.272c0 114.048-92.416 206.464-206.464 206.464z' fill='%23f44c59' p-id='20023' data-spm-anchor-id='a313x.7781069.0.i27' class='selected'%3E%3C/path%3E%3Cpath d='M529.792 586.496h-100.48l75.648-130.56 7.68-13.312 51.84-89.088 9.984-17.408 21.504-36.864c9.472-16.128 9.728-36.864-1.024-52.096-9.216-13.056-22.4-18.304-35.456-18.304-15.36 0-30.336 7.936-38.784 22.272l-7.68 13.568-7.936-13.568c-8.448-14.336-23.552-22.272-38.784-22.272-7.68 0-15.36 1.792-22.528 5.888-21.248 12.288-28.544 39.808-16.128 61.056l33.408 57.728-135.168 233.216H238.08c-26.88 0.256-48.384 24.064-44.16 52.096 3.328 22.016 23.936 37.376 46.208 37.376h33.92l103.424-0.256H583.936c3.84 0 7.68-1.664 9.984-4.736 11.776-15.744 20.48-40.192-8.32-65.408-15.232-13.44-35.584-19.328-55.808-19.328z' fill='%23FFFFFF' p-id='20024'%3E%3C/path%3E%3Cpath d='M785.28 586.24h-86.016l-115.072-198.528c-2.048-3.456-6.656-4.608-9.856-2.304-16.128 11.648-25.6 27.904-30.464 45.824-8.192 30.208-1.408 62.592 14.208 89.728l24.704 42.88 13.056 22.784 51.84 89.344 5.376 8.96 49.792 86.016c8.448 14.336 23.296 22.272 38.528 22.272 7.68 0 15.616-2.048 22.784-6.144 21.248-12.288 28.544-39.552 16.128-61.056l-29.056-50.304h36.224c26.88 0 48.256-24.32 43.904-52.352-3.584-21.888-23.936-37.12-46.08-37.12zM319.616 687.616c-15.744-6.4-30.592-5.632-42.496-2.304-6.528 1.792-11.904 6.272-15.232 12.032l-16.64 28.416c-12.544 21.504-5.12 48.768 16.128 61.056 7.168 4.096 15.104 6.144 22.784 6.144 15.36 0 30.08-7.936 38.272-22.272l18.944-32.64c4.608-8.064 5.504-17.792 2.048-26.368-3.84-9.6-11.008-18.816-23.808-24.064z' fill='%23FFFFFF' p-id='20025'%3E%3C/path%3E%3C/svg%3E"); + display: inline-block; + width: 50rpx; + height: 50rpx; + background-size: 100% 100%; +} +.main .util-box .maked-box { + margin-right: 0; +} + +.main .util-box > view > .title { + font-size: 30rpx; + font-weight: 600; +} + +.main .start-warp .start-main .start-title { + font-size: 40rpx; + font-weight: 600; + margin-bottom: 50rpx; +} + +.main .start-warp .start-main .icon-box { + display: flex; + justify-content: space-around; + align-items: center; +} + +.main .start-warp .start-main .icon-box .item { + display: flex; + flex-direction: column; + justify-content: space-around; + align-items: center; + margin-bottom: 30rpx; +} + +.main .start-warp .start-main .icon-box .item text { + background-size: 100% 100%; + display: inline-block; + height: 150rpx; + width:150rpx; + margin-bottom: 20rpx; +} + +.main .start-warp .start-main .icon-box .item view { + text-align: center; + font-size: 30rpx; +} + +.main .start-warp .start-main .icon-box .item:first-of-type text{ + background-image: url("data:image/svg+xml,%3Csvg t='1573571884791' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='1890' width='200' height='200'%3E%3Cpath d='M512 512m-479.4 0a479.4 479.4 0 1 0 958.8 0 479.4 479.4 0 1 0-958.8 0Z' fill='%23FFFFFF' p-id='1891'%3E%3C/path%3E%3Cpath d='M583.3 661.4s-71.3 57.1-97.2 72c-22.8 13.1-44.2 21.9-63.3 27.9-19.1 6.1-35.8 9.9-50.2 11.4-14.4 1.6-26.2 2.6-35.7 3-0.9 0.4-2 0.7-3.4 0.7h-10.8c-24.7 0-47.9-2.9-69.6-8.8-21.8-5.8-40.7-14.5-56.9-25.9-16.2-11.4-28.9-25.8-38.4-43.1-9.4-17.3-14.1-37.4-14.1-60.2 0.4-19.7 5.8-37.7 16.1-53.8 10.3-16.2 23.7-29.8 40.1-41.1 16.4-11.2 34.5-19.7 54.5-25.6 20-5.8 40-8.3 60.2-7.4 19.7 0.9 38.8 3.2 57.2 7 18.4 3.8 36 8.4 52.8 13.8 16.8 5.4 32.7 11.2 47.8 17.5 15 6.3 29.3 12.3 42.7 18.2 5.4 2.2 11 4.5 16.8 6.7 5.8 2.2 11.9 4.5 18.2 6.7 13-16.6 24-32.9 33-48.8 9-15.9 16.4-30.5 22.2-43.7 5.8-13.2 10.3-24.3 13.5-33.3 3.1-9 5.1-15.2 6.1-18.8h-292v-32.3h138V329H279.1v-32.3h191.8v-60.6c0-4 2.2-7.3 6.7-9.8 4.5-2.5 9.7-4.1 15.5-5 6.7-1.4 14.4-2 22.9-2h51.8v77.4H765V329H567.8v74.7h156.7c0-0.2 0.1-0.4 0.1-0.7v0.7h-0.1c-3.2 20-8.5 41.1-16 63.3-6.3 19.3-15.6 41.3-27.9 65.9-12.3 24.7-28.6 50-48.8 76.1 0 0 154.4 73.9 317.5 99.9 27.1-60 42.2-126.7 42.2-196.8 0-264.7-214.6-479.4-479.4-479.4C247.2 32.6 32.6 247.2 32.6 512c0 264.7 214.6 479.4 479.4 479.4 164.2 0 309.2-82.6 395.6-208.5-87.9-19.1-181.1-57.9-324.3-121.5m-376.9-21.5c-1.8 82.3 91.3 88.4 105.6 88.8 47.4 1.5 85.7-16.5 115.6-34.2 29.8-17.7 78.5-63.5 80.3-65.1 1.8-1.6 3.6-3.2 5.4-5-13-7.2-25.8-13.8-38.4-19.9-12.5-6.1-76.4-40.3-133-46.2-107.2-11.1-134.9 56.6-135.5 81.6m0 0' fill='%2300AAEE' p-id='1892'%3E%3C/path%3E%3C/svg%3E"); +} + +.main .start-warp .start-main .icon-box .item:nth-of-type(2) text { + background-image: url("data:image/svg+xml,%3Csvg t='1573571887659' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='9353' width='200' height='200'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='%231BB723' p-id='9354'%3E%3C/path%3E%3Cpath d='M831.890286 585.603657c0-90.528914-90.594743-164.322743-192.336457-164.322743-107.739429 0-192.599771 73.793829-192.599772 164.322743 0 90.682514 84.860343 164.322743 192.599772 164.322743 22.542629 0 45.282743-5.6832 67.935085-11.359086l62.112915 34.004115-17.020343-56.590629c45.443657-34.091886 79.3088-79.316114 79.3088-130.377143z m-254.785829-28.335543c-11.278629 0-22.652343-11.227429-22.652343-22.674285 0-11.278629 11.373714-22.637714 22.652343-22.637715 17.122743 0 28.350171 11.359086 28.350172 22.637715 0 11.446857-11.227429 22.674286-28.350172 22.674285z m124.5696 0c-11.2128 0-22.498743-11.227429-22.498743-22.674285 0-11.278629 11.285943-22.637714 22.498743-22.637715 16.954514 0 28.328229 11.359086 28.328229 22.637715 0 11.446857-11.373714 22.674286-28.328229 22.674285z' fill='%23FFFFFF' p-id='9355'%3E%3C/path%3E%3Cpath d='M418.552686 251.428571c-124.481829 0-226.442971 84.845714-226.442972 192.577829 0 62.193371 33.923657 113.261714 90.609372 152.861257l-22.652343 68.117943 79.162514-39.701943c28.328229 5.610057 51.0464 11.373714 79.316114 11.373714 7.109486 0 14.153143-0.3584 21.138286-0.899657-4.425143-15.125943-6.992457-30.990629-6.992457-47.440457 0-98.933029 84.955429-179.214629 192.519314-179.214628 7.336229 0 14.606629 0.548571 21.803886 1.338514-19.587657-91.223771-117.116343-159.012571-228.461714-159.012572zM344.992914 404.319086c-16.969143 0-34.0992-11.373714-34.0992-28.342857 0-17.042286 17.130057-28.2624 34.0992-28.2624s28.2624 11.220114 28.2624 28.2624c0 16.969143-11.293257 28.342857-28.2624 28.342857z m158.471315 0c-16.976457 0-34.004114-11.373714-34.004115-28.342857 0-17.042286 17.027657-28.2624 34.004115-28.2624 17.0496 0 28.342857 11.220114 28.342857 28.2624 0.007314 16.969143-11.293257 28.342857-28.342857 28.342857z' fill='%23FFFFFF' p-id='9356'%3E%3C/path%3E%3C/svg%3E"); +} + +.main .start-warp .start-main .icon-box .item:last-of-type text { + background-image: url("data:image/svg+xml,%3Csvg t='1573571954588' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='4093' width='200' height='200'%3E%3Cpath d='M0 512.512C0 794.978462 229.021538 1024 511.488 1024c282.505846 0 511.527385-229.021538 511.527385-511.488C1023.015385 230.006154 793.993846 0.984615 511.488 0.984615 229.021538 0.984615 0 230.006154 0 512.512z' fill='%2352CDFB' p-id='4094'%3E%3C/path%3E%3Cpath d='M718.532923 510.424615c10.633846 14.099692 20.676923 31.350154 28.553846 50.412308 23.315692 55.571692 14.336 113.821538 1.811693 116.499692-10.476308 1.851077-30.72-15.832615-50.491077-43.086769-4.174769 30.129231-18.668308 57.580308-40.52677 79.950769 37.021538 11.815385 61.715692 34.422154 58.840616 56.950154-3.623385 28.475077-49.939692 46.040615-103.424 39.187693-37.966769-4.844308-69.316923-20.637538-83.062154-39.581539a226.619077 226.619077 0 0 1-26.584615 0.393846c-13.272615 19.298462-46.001231 35.091692-86.212924 39.660308-55.532308 6.262154-103.030154-11.657846-107.52-40.329846-3.544615-21.937231 21.464615-43.835077 59.47077-55.650462-22.961231-23.158154-37.927385-51.948308-41.55077-83.495384-22.449231 27.175385-45.174154 41.905231-53.720615 37.021538-17.014154-8.940308-20.598154-64.472615 6.301539-119.138461 10.161231-20.046769 22.528-37.415385 35.131076-50.884924a60.455385 60.455385 0 0 1-5.592615-26.151384c0-15.044923 4.923077-28.947692 12.996923-36.470154a25.206154 25.206154 0 0 1 1.890462-1.614769 190.424615 190.424615 0 0 1-2.363077-29.971693c0-105.708308 86.882462-191.724308 193.496615-191.724307 107.52 0 193.496615 86.016 193.496616 191.724307 0 8.782769-0.590769 17.447385-1.772308 25.954462 4.489846 0 8.940308 1.890462 12.996923 5.632 7.995077 7.522462 12.957538 21.425231 12.957538 36.470154s-4.962462 28.947692-12.996923 36.470154a25.009231 25.009231 0 0 1-2.126769 1.772307z' fill='%23FFFFFF' p-id='4095'%3E%3C/path%3E%3C/svg%3E"); +} + +.main .start-warp .start-main .input-box { + margin-top: 50rpx; +} + +.main .start-warp .start-main .input-box .lable { + font-size: 30rpx; +} + +.main .start-warp .start-main .input-box input { + font-size: 30rpx; + line-height: 80rpx; + height:80rpx; + margin-top:10rpx; + border-bottom: 1px #eee solid; +} + +.main .start-warp .start-main .submit { + width: 300rpx; + height: 80rpx; + margin: 0 auto; + margin-top: 70rpx; + background-color: #1bb723; + color: #fff; + font-size: 35rpx; + text-align: center; + line-height: 80rpx; + border-radius: 20rpx; +} + +/* 动画 */ +.show-boxs .create-warp{ + animation :toHigh .5s ease; + animation-fill-mode:forwards; +} + +.hide-boxs .create-warp{ + animation :toLow 1s ease; + animation-fill-mode:forwards; +} + +.show-boxs .create-warp .title, .show-boxs .create-warp .content-box { + animation: toHide .5s ease ; + animation-fill-mode:forwards +} + +.hide-boxs .create-warp .title, .hide-boxs .create-warp .content-box { + animation: toShow 1s ease ; + animation-fill-mode:forwards +} + +.show-boxs .code-warp .code-main { + animation: showCode .5s ease ; + animation-fill-mode:forwards +} + +.show-boxs .start-warp .start-main { + animation: toShow .5s ease ; + animation-fill-mode:forwards +} + +.show-boxs .util-box { + animation: down .5s ease ; + animation-fill-mode:forwards +} + +.hide-boxs .util-box { + animation: up 1s ease ; + animation-fill-mode:forwards +} + +.toHide{ + animation: toHide 1s ease ; + animation-fill-mode:forwards +} + +.toShow{ + animation: toShow 1s ease ; + animation-fill-mode:forwards +} + + +@keyframes toHigh +{ + 0% { + height: 350rpx; + } + 100% { + height: 90%; + } +} + +@keyframes toLow +{ + 0% { + height: 90%; + } + 100% { + height: 350rpx; + } +} + +@keyframes toHide +{ + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} + +@keyframes toShow +{ + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +@keyframes showCode +{ + 0% { + opacity: 0; + margin-top: 50rpx; + } + 100% { + opacity: 1; + margin-top: 0rpx; + } +} + +@keyframes down +{ + 0% { + opacity: 1; + margin-bottom: 0rpx; + } + 100% { + opacity: 0; + margin-bottom: -135rpx; + } +} + +@keyframes up +{ + 0% { + opacity: 0; + margin-bottom: -135rpx; + } + 100% { + opacity: 1; + margin-bottom: 0rpx; + } +} \ No newline at end of file diff --git a/pages/welcome/welcome.js b/pages/welcome/welcome.js new file mode 100644 index 0000000..25f1168 --- /dev/null +++ b/pages/welcome/welcome.js @@ -0,0 +1,125 @@ +// pages/welcome/welcome.js +const api = require('../../lib/api') +const util = require('../../lib/util') +const app = getApp() +const g = app.globalData +Page({ + + /** + * 页面的初始数据 + */ + data: { + flag: null, //两个异步请求 + StatusBar: g.StatusBar, //安卓bar高度 + CustomBar: g.CustomBar, //顶部到胶囊底部的高度 + showButton: false, + src: g.bgs[g.bgIndex] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.init(); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + + //初始化 + init : function() { + // 一共三个进程 + this.flag = 3 + // 登录 + var that = this + api.login(function(info,openid) { + wx.setStorageSync('codes', info); + wx.setStorageSync('openid', openid); + that.flag = util.checkFlag('login',that.flag,that.jumpToHome) + }) + //获取一言 + api.getyiyian(()=> { + that.flag = util.checkFlag('yiyan',that.flag,that.jumpToHome) + }) + this.getSystemUserInfo() + }, + + //获取用户信息以及权限 + getSystemUserInfo() { + var that = this; + wx.getSetting({ + success(res) { + if (res.authSetting['scope.userInfo']) { + // 已经授权,可以直接调用 getUserInfo 获取头像昵称 + wx.getUserInfo({ + success(res) { + wx.setStorageSync('userInfo', res.userInfo); + that.setData({ + showButton:false + }) + that.flag = util.checkFlag('信息',that.flag,that.jumpToHome) + } + }) + } else { + that.setData({ + showButton:true + }) + } + } + }) + }, + + // 跳到主页 + jumpToHome() { + wx.reLaunch({ + url: '../home/home' + }) + // console.log('全部完成') + } +}) \ No newline at end of file diff --git a/pages/welcome/welcome.json b/pages/welcome/welcome.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/welcome/welcome.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/welcome/welcome.wxml b/pages/welcome/welcome.wxml new file mode 100644 index 0000000..93a04b5 --- /dev/null +++ b/pages/welcome/welcome.wxml @@ -0,0 +1,16 @@ + + + + + + + + + 欢迎 + + + + + diff --git a/pages/welcome/welcome.wxss b/pages/welcome/welcome.wxss new file mode 100644 index 0000000..0cf6064 --- /dev/null +++ b/pages/welcome/welcome.wxss @@ -0,0 +1,92 @@ +/* pages/welcome/welcome.wxss */ +page { + background: #000; + position: relative; + height:100%; +} + +.bg { + position: fixed; + top:0; + left:0; + z-index: -100; + height:100%; + width:100%; +} + +.bg:after{ + position: absolute; + top: 0; + left: 0; + content: ""; + background-color: black; + opacity: 0.5; + z-index: 1; + width: 100%; + height: 100%; +} + +.main-page { + width:100%; + height:auto; + box-sizing: border-box; + padding-left:20rpx; + padding-right:20rpx; + color:#fff; +} + +.userAvatar-box { + height:200rpx; + width:200rpx; + border-radius: 50%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + overflow: hidden; + margin: 0 auto; +} + +.welcome { + font-size: 70rpx; + margin-top:20rpx; + height: 100rpx; + text-align: center; +} + +.btn-box { + display: flex; + justify-content: center; + margin-top: 200rpx; +} + +.loading { + display: inline-block; + margin-top: -15rpx; + width: 180rpx; + height: 180rpx; + background-image: url("data:image/svg+xml, %3Csvg class='lds-gooeyring' width='80' height='80' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid' style='animation-play-state:running;animation-delay:0s;background:0 0'%3E%3Cdefs style='animation-play-state:running;animation-delay:0s'%3E%3Cfilter id='a' x='-100%25' y='-100%25' width='300%25' height='300%25' color-interpolation-filters='sRGB' style='animation-play-state:running;animation-delay:0s'%3E%3CfeGaussianBlur in='SourceGraphic' stdDeviation='4' style='animation-play-state:running;animation-delay:0s'/%3E%3CfeComponentTransfer result='cutoff' style='animation-play-state:running;animation-delay:0s'%3E%3CfeFuncA type='linear' slope='10' intercept='-5'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23a)' style='animation-play-state:running;animation-delay:0s' transform='translate(50 50)'%3E%3Cg transform='rotate(258)' style='animation-play-state:running;animation-delay:0s'%3E%3Ccircle cx='25' r='10.533' fill='%23fcb711' style='animation-play-state:running;animation-delay:0s'%3E%3Canimate attributeName='r' keyTimes='0;0.5;1' values='6;14;6' dur='4s' repeatCount='indefinite' begin='-4s'/%3E%3C/circle%3E%3CanimateTransform attributeName='transform' type='rotate' keyTimes='0;1' values='0;360' dur='4s' repeatCount='indefinite' begin='0s'/%3E%3C/g%3E%3Cg transform='rotate(276)' style='animation-play-state:running;animation-delay:0s'%3E%3Ccircle cx='25' r='7.6' fill='%23f37021' style='animation-play-state:running;animation-delay:0s'%3E%3Canimate attributeName='r' keyTimes='0;0.5;1' values='6;14;6' dur='2s' repeatCount='indefinite' begin='-3.3333333333333335s'/%3E%3C/circle%3E%3CanimateTransform attributeName='transform' type='rotate' keyTimes='0;1' values='0;360' dur='2s' repeatCount='indefinite' begin='-0.6666666666666666s'/%3E%3C/g%3E%3Cg transform='rotate(54)' style='animation-play-state:running;animation-delay:0s'%3E%3Ccircle cx='25' r='8.4' fill='%23cc004c' style='animation-play-state:running;animation-delay:0s'%3E%3Canimate attributeName='r' keyTimes='0;0.5;1' values='6;14;6' dur='1.3333333333333333s' repeatCount='indefinite' begin='-2.6666666666666665s'/%3E%3C/circle%3E%3CanimateTransform attributeName='transform' type='rotate' keyTimes='0;1' values='0;360' dur='1.3333333333333333s' repeatCount='indefinite' begin='-1.3333333333333333s'/%3E%3C/g%3E%3Cg transform='rotate(312)' style='animation-play-state:running;animation-delay:0s'%3E%3Ccircle cx='25' r='8.133' fill='%236460aa' style='animation-play-state:running;animation-delay:0s'%3E%3Canimate attributeName='r' keyTimes='0;0.5;1' values='6;14;6' dur='1s' repeatCount='indefinite' begin='-2s'/%3E%3C/circle%3E%3CanimateTransform attributeName='transform' type='rotate' keyTimes='0;1' values='0;360' dur='1s' repeatCount='indefinite' begin='-2s'/%3E%3C/g%3E%3Cg transform='rotate(330)' style='animation-play-state:running;animation-delay:0s'%3E%3Ccircle cx='25' r='10' fill='%230089d0' style='animation-play-state:running;animation-delay:0s'%3E%3Canimate attributeName='r' keyTimes='0;0.5;1' values='6;14;6' dur='0.8s' repeatCount='indefinite' begin='-1.3333333333333333s'/%3E%3C/circle%3E%3CanimateTransform attributeName='transform' type='rotate' keyTimes='0;1' values='0;360' dur='0.8s' repeatCount='indefinite' begin='-2.6666666666666665s'/%3E%3C/g%3E%3Cg transform='rotate(108)' style='animation-play-state:running;animation-delay:0s'%3E%3Ccircle cx='25' r='10.8' fill='%230db14b' style='animation-play-state:running;animation-delay:0s'%3E%3Canimate attributeName='r' keyTimes='0;0.5;1' values='6;14;6' dur='0.6666666666666666s' repeatCount='indefinite' begin='-0.6666666666666666s'/%3E%3C/circle%3E%3CanimateTransform attributeName='transform' type='rotate' keyTimes='0;1' values='0;360' dur='0.6666666666666666s' repeatCount='indefinite' begin='-3.3333333333333335s'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); + background-size: 100% 100%; +} + +.get-info { + display: inline-block; + width: 150rpx; + height: 150rpx; + color: #fff; + background: #ff365f; + border-radius: 50%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + +.get-info text { + display: inline-block; + width: 70rpx; + height: 70rpx; + background-image: url("data:image/svg+xml,%3Csvg t='1573441316704' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='2471' width='200' height='200'%3E%3Cpath d='M0.05952 448m64 0l896 0q64 0 64 64l0 0q0 64-64 64l-896 0q-64 0-64-64l0 0q0-64 64-64Z' fill='%23ffffff' p-id='2472'%3E%3C/path%3E%3Cpath d='M153.33952 512L557.49952 915.712c24.8 24.768 24.8 64.96 0 89.696a63.552 63.552 0 0 1-89.792 0L18.61952 556.864a63.392 63.392 0 0 1 0-89.728L467.67552 18.592a63.552 63.552 0 0 1 89.792 0c24.8 24.768 24.8 64.928 0 89.696L153.33952 512z' fill='%23ffffff' p-id='2473'%3E%3C/path%3E%3C/svg%3E"); + background-size: 100% 100%; + transform:rotate(180deg); +} \ No newline at end of file diff --git a/project.config.json b/project.config.json new file mode 100644 index 0000000..d519ec5 --- /dev/null +++ b/project.config.json @@ -0,0 +1,51 @@ +{ + "description": "项目配置文件", + "packOptions": { + "ignore": [] + }, + "setting": { + "urlCheck": false, + "es6": true, + "postcss": true, + "minified": true, + "newFeature": true, + "coverView": true, + "autoAudits": false, + "checkInvalidKey": true, + "checkSiteMap": false, + "uploadWithSourceMap": true, + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + } + }, + "compileType": "miniprogram", + "libVersion": "2.9.2", + "appid": "wx0df150c438e4c8f0", + "projectname": "%E4%BA%8C%E7%BB%B4%E7%A0%81%E5%90%88%E5%B9%B6", + "debugOptions": { + "hidedInDevtools": [] + }, + "isGameTourist": false, + "simulatorType": "wechat", + "simulatorPluginLibVersion": {}, + "condition": { + "search": { + "current": -1, + "list": [] + }, + "conversation": { + "current": -1, + "list": [] + }, + "game": { + "currentL": -1, + "list": [] + }, + "miniprogram": { + "current": -1, + "list": [] + } + } +} \ No newline at end of file diff --git a/sitemap.json b/sitemap.json new file mode 100644 index 0000000..d7a86e8 --- /dev/null +++ b/sitemap.json @@ -0,0 +1,7 @@ +{ + "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", + "rules": [{ + "action": "disallow", + "page": "*" + }] +} \ No newline at end of file