a1140836302 %!s(int64=2) %!d(string=hai) anos
achega
9302b44679
Modificáronse 100 ficheiros con 7380 adicións e 0 borrados
  1. 16 0
      .gitignore
  2. 16 0
      .hbuilderx/launch.json
  3. 24 0
      App.vue
  4. 0 0
      common/area-data-min.js
  5. 32 0
      common/check.js
  6. 39 0
      common/common.js
  7. 352 0
      common/html-parser.js
  8. 31 0
      common/http.js
  9. 311 0
      common/payment.js
  10. 126 0
      common/poster.js
  11. 0 0
      common/qqmap-wx-jssdk.min.js
  12. 57 0
      common/request.js
  13. 31 0
      common/sessionStorage.js
  14. 13 0
      common/spread.js
  15. 31 0
      common/storage.js
  16. 121 0
      common/subscribe.js
  17. 39 0
      common/toutiao.js
  18. 269 0
      common/utils.js
  19. 125 0
      common/websocket.js
  20. 61 0
      common/wechat.js
  21. 89 0
      components/authorize/authorize.vue
  22. 96 0
      components/getmobile/getmobile.vue
  23. 61 0
      components/power-change-header/power-change-header.vue
  24. 153 0
      components/progress/progress.vue
  25. 126 0
      components/tab-bar/tab-bar.vue
  26. 113 0
      components/top-box/top-box.vue
  27. 6 0
      config.js
  28. 20 0
      index.html
  29. 21 0
      main.js
  30. 78 0
      manifest.json
  31. 322 0
      package-lock.json
  32. 5 0
      package.json
  33. 113 0
      pages.json
  34. 74 0
      pages/batteryinfo/index.vue
  35. 71 0
      pages/carinfo/index.vue
  36. 314 0
      pages/index/index.vue
  37. 140 0
      pages/monitoring/index.vue
  38. 172 0
      pages/public/login.vue
  39. 270 0
      pages/scan/index.vue
  40. 126 0
      pages/ucenter/car.vue
  41. 214 0
      pages/ucenter/index.vue
  42. 22 0
      pages/ucenter/record.vue
  43. 44 0
      project.config.json
  44. 7 0
      project.private.config.json
  45. BIN=BIN
      static/battery-info.png
  46. BIN=BIN
      static/bbg.png
  47. BIN=BIN
      static/car-bg.png
  48. BIN=BIN
      static/car-info.png
  49. BIN=BIN
      static/car.jpg
  50. BIN=BIN
      static/change-bg.png
  51. BIN=BIN
      static/code.jpg
  52. BIN=BIN
      static/icon-car.png
  53. BIN=BIN
      static/icon1.png
  54. BIN=BIN
      static/icon2.png
  55. BIN=BIN
      static/icon3.png
  56. BIN=BIN
      static/icon4.png
  57. BIN=BIN
      static/icon5.png
  58. BIN=BIN
      static/icon7.png
  59. BIN=BIN
      static/line.png
  60. BIN=BIN
      static/logo.png
  61. BIN=BIN
      static/no-login.png
  62. BIN=BIN
      static/p1.png
  63. BIN=BIN
      static/p2.png
  64. BIN=BIN
      static/p3.png
  65. BIN=BIN
      static/p4.png
  66. BIN=BIN
      static/p5.png
  67. BIN=BIN
      static/pic.jpg
  68. BIN=BIN
      static/tabbar/menu-1.png
  69. BIN=BIN
      static/tabbar/menu-2.png
  70. BIN=BIN
      static/tabbar/menu-3.png
  71. BIN=BIN
      static/ucenter/big-avatar.png
  72. BIN=BIN
      static/ucenter/icon1.png
  73. BIN=BIN
      static/ucenter/icon2.png
  74. BIN=BIN
      static/ucenter/icon3.png
  75. BIN=BIN
      static/ucenter/icon4.png
  76. BIN=BIN
      static/ucenter/icon5.png
  77. BIN=BIN
      static/ucenter/icon6.png
  78. BIN=BIN
      static/ucenter/icon7.png
  79. BIN=BIN
      static/ucenter/icon8.png
  80. BIN=BIN
      static/ucenter/icon9.png
  81. 103 0
      store/index.js
  82. 76 0
      uni.scss
  83. 22 0
      uni_modules/uni-icons/changelog.md
  84. 1169 0
      uni_modules/uni-icons/components/uni-icons/icons.js
  85. 96 0
      uni_modules/uni-icons/components/uni-icons/uni-icons.vue
  86. 663 0
      uni_modules/uni-icons/components/uni-icons/uniicons.css
  87. BIN=BIN
      uni_modules/uni-icons/components/uni-icons/uniicons.ttf
  88. 86 0
      uni_modules/uni-icons/package.json
  89. 8 0
      uni_modules/uni-icons/readme.md
  90. 60 0
      uni_modules/uni-popup/changelog.md
  91. 45 0
      uni_modules/uni-popup/components/uni-popup-dialog/keypress.js
  92. 271 0
      uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue
  93. 143 0
      uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue
  94. 187 0
      uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue
  95. 7 0
      uni_modules/uni-popup/components/uni-popup/i18n/en.json
  96. 8 0
      uni_modules/uni-popup/components/uni-popup/i18n/index.js
  97. 7 0
      uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json
  98. 7 0
      uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json
  99. 45 0
      uni_modules/uni-popup/components/uni-popup/keypress.js
  100. 26 0
      uni_modules/uni-popup/components/uni-popup/popup.js

+ 16 - 0
.gitignore

@@ -0,0 +1,16 @@
+.DS_Store
+node_modules/
+/dist/
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+/test/unit/coverage/
+/hbuilderx
+/tupian
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln

+ 16 - 0
.hbuilderx/launch.json

@@ -0,0 +1,16 @@
+{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+  // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+    "version": "0.0",
+    "configurations": [{
+     	"default" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"mp-weixin" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"type" : "uniCloud"
+     }
+    ]
+}

+ 24 - 0
App.vue

@@ -0,0 +1,24 @@
+<script>
+	export default {
+		onLaunch: function() {
+
+		},
+		onShow: function() {
+			console.log('App Show')
+		},
+		onHide: function() {
+			console.log('App Hide')
+		},
+	}
+</script>
+
+<style lang="scss">
+	/*每个页面公共css */
+	page{
+		background-color: #f8f9fb;
+		// background-color: #d5f1da;
+		max-width: 750rpx;
+		color: #1d2129;
+	}
+	
+</style>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
common/area-data-min.js


+ 32 - 0
common/check.js

@@ -0,0 +1,32 @@
+
+/**
+ * 手机验证
+ */
+export function checkPhone(value){
+	if(/^1\d{10}$/.test(value)){
+		return true;
+	}
+	return false
+}
+
+/**
+ * 身份证验证
+ */
+export function checkIdCard(value){
+	let reg =/^\d{15}|\d{18}$/
+	if(reg.test(value)){
+		return true;
+	}
+	return false
+}
+/**
+ * 银行卡验证
+ */
+export function checkBankCard(value){
+	let reg =/^([1-9]{1})(\d{14}|\d{15}|\d{16}|\d{18})$/
+	if(reg.test(value)){
+		return true;
+	}
+	return false
+}
+

+ 39 - 0
common/common.js

@@ -0,0 +1,39 @@
+import * as utils from './utils';
+
+export function jump(value){
+	if(value.url == ""){
+		return ;
+	}
+	
+	switch (value.type+"") {
+		case "1":
+			//window.location.href = value.url;
+			uni.navigateTo({ url: value.url });
+			break;
+		case "2":
+			utils.navigateTo("goods/view",{ id: value.url });
+			break;
+		case "3":
+			utils.navigateTo("news/view",{ id: value.url });
+			break;
+		case "4":
+			utils.navigateTo("news/list",{ id: value.url });
+			break;
+		case "5":
+			if(value.url == "collect"){
+				utils.navigateTo("ucenter/collect");
+			}else if(value.url == "category"){
+				utils.navigateTo("category/index");
+			}else if(value.url == "sign"){
+				utils.navigateTo("sign/index");
+			}else if(value.url == "luckdraw"){
+				utils.navigateTo("luckdraw/index");
+			}else{
+				utils.navigateTo(value.url+"/index");
+			}
+			break;
+		case "6":
+			utils.navigateTo("index/custom",{ id: value.url });
+			break;
+	}
+}

+ 352 - 0
common/html-parser.js

@@ -0,0 +1,352 @@
+/*
+ * HTML5 Parser By Sam Blowes
+ *
+ * Designed for HTML5 documents
+ *
+ * Original code by John Resig (ejohn.org)
+ * http://ejohn.org/blog/pure-javascript-html-parser/
+ * Original code by Erik Arvidsson, Mozilla Public License
+ * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
+ *
+ * ----------------------------------------------------------------------------
+ * License
+ * ----------------------------------------------------------------------------
+ *
+ * This code is triple licensed using Apache Software License 2.0,
+ * Mozilla Public License or GNU Public License
+ *
+ * ////////////////////////////////////////////////////////////////////////////
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License.  You may obtain a copy
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * ////////////////////////////////////////////////////////////////////////////
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * The Original Code is Simple HTML Parser.
+ *
+ * The Initial Developer of the Original Code is Erik Arvidsson.
+ * Portions created by Erik Arvidssson are Copyright (C) 2004. All Rights
+ * Reserved.
+ *
+ * ////////////////////////////////////////////////////////////////////////////
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ * ----------------------------------------------------------------------------
+ * Usage
+ * ----------------------------------------------------------------------------
+ *
+ * // Use like so:
+ * HTMLParser(htmlString, {
+ *     start: function(tag, attrs, unary) {},
+ *     end: function(tag) {},
+ *     chars: function(text) {},
+ *     comment: function(text) {}
+ * });
+ *
+ * // or to get an XML string:
+ * HTMLtoXML(htmlString);
+ *
+ * // or to get an XML DOM Document
+ * HTMLtoDOM(htmlString);
+ *
+ * // or to inject into an existing document/DOM node
+ * HTMLtoDOM(htmlString, document);
+ * HTMLtoDOM(htmlString, document.body);
+ *
+ */
+// Regular Expressions for parsing tags and attributes
+var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/;
+var endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/;
+var attr = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g; // Empty Elements - HTML 5
+
+var empty = makeMap('area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr'); // Block Elements - HTML 5
+// fixed by xxx 将 ins 标签从块级名单中移除
+
+var block = makeMap('a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video'); // Inline Elements - HTML 5
+
+var inline = makeMap('abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var'); // Elements that you can, intentionally, leave open
+// (and which close themselves)
+
+var closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); // Attributes that have their values filled in disabled="disabled"
+
+var fillAttrs = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected'); // Special Elements (can contain anything)
+
+var special = makeMap('script,style');
+function HTMLParser(html, handler) {
+  var index;
+  var chars;
+  var match;
+  var stack = [];
+  var last = html;
+
+  stack.last = function () {
+    return this[this.length - 1];
+  };
+
+  while (html) {
+    chars = true; // Make sure we're not in a script or style element
+
+    if (!stack.last() || !special[stack.last()]) {
+      // Comment
+      if (html.indexOf('<!--') == 0) {
+        index = html.indexOf('-->');
+
+        if (index >= 0) {
+          if (handler.comment) {
+            handler.comment(html.substring(4, index));
+          }
+
+          html = html.substring(index + 3);
+          chars = false;
+        } // end tag
+
+      } else if (html.indexOf('</') == 0) {
+        match = html.match(endTag);
+
+        if (match) {
+          html = html.substring(match[0].length);
+          match[0].replace(endTag, parseEndTag);
+          chars = false;
+        } // start tag
+
+      } else if (html.indexOf('<') == 0) {
+        match = html.match(startTag);
+
+        if (match) {
+          html = html.substring(match[0].length);
+          match[0].replace(startTag, parseStartTag);
+          chars = false;
+        }
+      }
+
+      if (chars) {
+        index = html.indexOf('<');
+        var text = index < 0 ? html : html.substring(0, index);
+        html = index < 0 ? '' : html.substring(index);
+
+        if (handler.chars) {
+          handler.chars(text);
+        }
+      }
+    } else {
+      html = html.replace(new RegExp('([\\s\\S]*?)<\/' + stack.last() + '[^>]*>'), function (all, text) {
+        text = text.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g, '$1$2');
+
+        if (handler.chars) {
+          handler.chars(text);
+        }
+
+        return '';
+      });
+      parseEndTag('', stack.last());
+    }
+
+    if (html == last) {
+      throw 'Parse Error: ' + html;
+    }
+
+    last = html;
+  } // Clean up any remaining tags
+
+
+  parseEndTag();
+
+  function parseStartTag(tag, tagName, rest, unary) {
+    tagName = tagName.toLowerCase();
+
+    if (block[tagName]) {
+      while (stack.last() && inline[stack.last()]) {
+        parseEndTag('', stack.last());
+      }
+    }
+
+    if (closeSelf[tagName] && stack.last() == tagName) {
+      parseEndTag('', tagName);
+    }
+
+    unary = empty[tagName] || !!unary;
+
+    if (!unary) {
+      stack.push(tagName);
+    }
+
+    if (handler.start) {
+      var attrs = [];
+      rest.replace(attr, function (match, name) {
+        var value = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : fillAttrs[name] ? name : '';
+        attrs.push({
+          name: name,
+          value: value,
+          escaped: value.replace(/(^|[^\\])"/g, '$1\\\"') // "
+
+        });
+      });
+
+      if (handler.start) {
+        handler.start(tagName, attrs, unary);
+      }
+    }
+  }
+
+  function parseEndTag(tag, tagName) {
+    // If no tag name is provided, clean shop
+    if (!tagName) {
+      var pos = 0;
+    } // Find the closest opened tag of the same type
+    else {
+        for (var pos = stack.length - 1; pos >= 0; pos--) {
+          if (stack[pos] == tagName) {
+            break;
+          }
+        }
+      }
+
+    if (pos >= 0) {
+      // Close all the open elements, up the stack
+      for (var i = stack.length - 1; i >= pos; i--) {
+        if (handler.end) {
+          handler.end(stack[i]);
+        }
+      } // Remove the open elements from the stack
+
+
+      stack.length = pos;
+    }
+  }
+}
+
+function makeMap(str) {
+  var obj = {};
+  var items = str.split(',');
+
+  for (var i = 0; i < items.length; i++) {
+    obj[items[i]] = true;
+  }
+
+  return obj;
+}
+
+function removeDOCTYPE(html) {
+  return html.replace(/<\?xml.*\?>\n/, '').replace(/<!doctype.*>\n/, '').replace(/<!DOCTYPE.*>\n/, '');
+}
+
+function parseAttrs(attrs) {
+  return attrs.reduce(function (pre, attr) {
+    var value = attr.value;
+    var name = attr.name;
+
+    if (pre[name]) {
+			pre[name] = pre[name] + " " + value;
+    } else {
+			pre[name] = value;
+    }
+
+    return pre;
+  }, {});
+}
+
+function parseHtml(html) {
+  html = removeDOCTYPE(html);
+  var stacks = [];
+  var results = {
+    node: 'root',
+    children: []
+  };
+  HTMLParser(html, {
+    start: function start(tag, attrs, unary) {
+      var node = {
+        name: tag
+      };
+
+      if (attrs.length !== 0) {
+        node.attrs = parseAttrs(attrs);
+      }
+
+      if (unary) {
+        var parent = stacks[0] || results;
+
+        if (!parent.children) {
+          parent.children = [];
+        }
+
+        parent.children.push(node);
+      } else {
+        stacks.unshift(node);
+      }
+    },
+    end: function end(tag) {
+      var node = stacks.shift();
+      if (node.name !== tag) console.error('invalid state: mismatch end tag');
+
+      if (stacks.length === 0) {
+        results.children.push(node);
+      } else {
+        var parent = stacks[0];
+
+        if (!parent.children) {
+          parent.children = [];
+        }
+
+        parent.children.push(node);
+      }
+    },
+    chars: function chars(text) {
+      var node = {
+        type: 'text',
+        text: text
+      };
+
+      if (stacks.length === 0) {
+        results.children.push(node);
+      } else {
+        var parent = stacks[0];
+
+        if (!parent.children) {
+          parent.children = [];
+        }
+
+        parent.children.push(node);
+      }
+    },
+    comment: function comment(text) {
+      var node = {
+        node: 'comment',
+        text: text
+      };
+      var parent = stacks[0];
+
+      if (!parent.children) {
+        parent.children = [];
+      }
+
+      parent.children.push(node);
+    }
+  });
+  return results.children;
+}
+
+export default parseHtml;

+ 31 - 0
common/http.js

@@ -0,0 +1,31 @@
+import request from './request'
+import storage from './storage'
+
+
+export function wxgetCode(params) {
+    return new Promise((resolve, reject) => {
+		// let spread_id = parseInt(storage.get('spread_id'));
+		// if(spread_id > 0){
+		// 	params.spread_id = spread_id;
+		// }
+        request.post("/user/session",params).then(result=>{
+            resolve(result)
+        }).catch(err=>{
+            reject(err)
+        });
+    })
+}
+
+export function wxLogin(params) {
+    return new Promise((resolve, reject) => {
+		// let spread_id = parseInt(storage.get('spread_id'));
+		// if(spread_id > 0){
+		// 	params.spread_id = spread_id;
+		// }
+        request.post("/user/login",params).then(result=>{
+            resolve(result)
+        }).catch(err=>{
+            reject(err)
+        });
+    })
+}

+ 311 - 0
common/payment.js

@@ -0,0 +1,311 @@
+import { getPaymentMethod } from "./http";
+import * as utils from "./utils";
+import store from "../store/index";
+import storage from 'common/storage';
+// #ifdef H5
+import wx from "weixin-js-sdk";
+// #endif
+
+export default {
+	
+	// pay,order,rechange
+	payType: 'pay',
+	
+	setPayType(str){
+		this.payType = str;
+		return this;
+	},
+	
+	getPaymentType(){
+		let platformAgent = utils.platformAgent();
+		if(platformAgent.isMini){
+			return 3;
+		}else if(platformAgent.type == "h5"){
+			if(platformAgent.isWechat){
+				return 2;
+			}
+			
+			return 1;
+		}else if(platformAgent.type == "app"){
+			return 4;
+		}
+	},
+	
+	getPaymentList(pay_type){
+		let payType = pay_type || "order";
+		let providerList = [];
+		
+		let type = "";
+		let platformAgent = utils.platformAgent();
+		if(platformAgent.isMini){
+			type = "mp";
+			// #ifdef MP-TOUTIAO
+			type = "tt";
+			// #endif
+		}else if(platformAgent.type == "h5"){
+			type = platformAgent.isWechat ? "wechat" : "h5";
+		}else if(platformAgent.type == "app"){
+			type = "app";
+		}
+		
+		return new Promise((resolve, reject)=>{
+			getPaymentMethod({
+				type: type,pay_type: payType
+			}).then(res=>{
+				this.getAppPayment(res.data).then(rs=>{
+					resolve(rs);
+				}).catch(err=>{
+					reject(err);
+				});
+			}).catch(err=>{
+				reject(err);
+			});
+		});
+	},
+	
+	getAppPayment(providerList){
+		return new Promise((resolve, reject)=>{
+			uni.getProvider({
+				service: 'payment',
+				success: (e) => {
+					let data = []
+					for (let i = 0; i < e.provider.length; i++) {
+						switch (e.provider[i]) {
+							case 'wxpay':
+								data.push("wechat")
+								break;
+							case 'alipay':
+								data.push("alipay")
+								break;
+							// case 'appleiap':
+							// 	data.push({
+							// 		id: 'appleiap',
+							// 		class: 'fa fa-apple',
+							// 		name: '苹果支付',
+							//      text: '\ue62c',
+							// 		sort:0
+							// 	})
+							// 	break;
+							default:
+								break;
+						}
+					}
+					
+					let array = [];
+					if(data.length <= 0){
+						resolve(providerList);
+					}else{
+						for(let i=0; i<providerList.length; i++){
+							if(utils.in_array(providerList[i].id,data)){
+								array.push(providerList[i]);
+							}else if(providerList[i].id == "balance"){
+								array.push(providerList[i]);
+							}
+						}
+						resolve(array);
+					}
+				},
+				fail: (e) => {
+					reject("获取支付通道失败");
+				}
+			});
+		});
+	},
+	
+	crreateOrder(data,updateCart){
+		let updateCartCount = updateCart || false;
+		if(updateCartCount){
+			store.commit("UPDATECART",data.shop_count);
+			if(data.shop_count > 0){
+				uni.setTabBarBadge({ index: 3, text: data.shop_count.toString() });
+			}else{
+				uni.removeTabBarBadge({ index: 3 });
+			}
+		}
+		
+		if(data.pay == 0){
+			utils.redirectTo('order/detail',{ id: data.order_id });
+			return true;
+		}else if(data.pay == 99){
+			if(this.payType == "pay"){
+				storage.set("order_msg",data.msg);
+				storage.set("order_id",data.order_id);
+				utils.redirectTo('cart/info');
+			}else if(this.payType == "order" || this.payType == "rechange"){
+				utils.msg(data.msg);
+			}
+			return true;
+		}
+		
+		let platformAgent = utils.platformAgent();
+		if(platformAgent.isMini){
+			this.createMpPayment(data);
+		}else if(platformAgent.type == "h5"){
+			this.createWebPayment(data);
+		}else if(platformAgent.type == "app"){
+			this.createAppPayment(data);
+		}
+	},
+	
+	createMpPayment(data){
+		let that = this;
+		switch (data.pay+"") {
+			case "1":
+				let params = data.result.params;
+				wx.requestPayment({
+					timeStamp: params.timeStamp,
+					nonceStr: params.nonceStr,
+					package: params.package,
+					signType: params.signType,
+					paySign: params.paySign,
+					success (res) { 
+						uni.showToast({
+							title: "您己支付成功!",
+							success: function (res){
+								if(that.payType == "pay" || that.payType == "order"){
+									utils.redirectTo('order/detail',{ id: data.order_id });
+								}else{
+									utils.redirectTo('bill/fund');
+								}
+							}
+						});
+					},
+					fail (res) { 
+						uni.showModal({
+							content: "支付失败,原因:" + JSON.stringify(res),
+							showCancel: false
+						})
+					}
+				});
+				break;
+			case "2": // 头条支付
+				tt.pay({
+				  orderInfo: data.result.orderInfo,
+				  service: 5,
+				  success(res) {
+					if(res.code==0){
+						uni.showToast({
+							title: "您己支付成功!",
+							success: function (st){
+								if(that.payType == "pay" || that.payType == "order"){
+									utils.redirectTo('order/detail',{ id: data.order_id });
+								}else{
+									utils.redirectTo('bill/fund');
+								}
+							}
+						});
+					}else{
+						switch(res.code){
+							case 1:
+								utils.msg("支付超时");
+								break;
+							case 2:
+								utils.msg("支付失败");
+								break;
+							case 3:
+								utils.msg("支付关闭");
+								break;
+							case 4:
+								break;
+							case 9:
+							default:
+								utils.msg("支付错误 code: " + res.code);
+								break;
+						}
+					}
+				  },
+				  fail(res) {
+					utils.msg('调起收银台失败-'+res.errMsg);
+				  }
+				});
+				break;
+		}
+	},
+	
+	createWebPayment(data){
+		let that = this;
+		switch (data.pay+"") {
+			case "1":
+				wx.config(data.result.config);
+				let options = data.result.options;
+				let that = this;
+				options.success = function(){
+					uni.showToast({
+						title: "您己支付成功!",
+						success: function (res){
+							if(that.payType == "pay" || that.payType == "order"){
+								utils.redirectTo('order/detail',{ id: data.order_id });
+							}else{
+								utils.redirectTo('bill/fund');
+							}
+						}
+					});
+				}
+				wx.chooseWXPay(options);
+				break;
+			case "2":
+				if(that.payType == "pay" || that.payType == "order"){
+					location.href = data.result.url+"&redirect_url="+location.origin+'/wap/pages/order/detail/'+data.order_id;
+				}else{
+					location.href = data.result.url+"&redirect_url="+location.origin+'/wap/pages/bill/fund';
+				}
+				break;
+			case "3":
+				utils.showLoading();
+				let div = document.createElement('div');
+				div.innerHTML = data.result;
+				document.body.appendChild(div);
+				document.forms.alipaysubmit.submit();
+				break;
+		}
+	},
+	
+	createAppPayment(data){
+		switch (data.pay+"") {
+			case "1":
+				this.requestPayment(data.result.params,"wxpay",{ id: data.order_id });
+				break;
+			case "2":
+				this.requestPayment(data.result.params,"alipay",{ id: data.order_id });
+				break;
+		}
+	},
+	
+	/**
+	 * 调起APP支付
+	 */
+	async requestPayment(orderInfo,type,orderParams) {
+		if(!orderInfo) {
+			uni.showModal({
+				content: '获取支付信息失败',
+				showCancel: false
+			})
+			return
+		}
+		
+		let that = this;
+		uni.requestPayment({
+			provider: type,
+			orderInfo: orderInfo,
+			success: (e) => {
+				uni.showToast({
+					title: "您己支付成功!",
+					success: function (res){
+						if(that.payType == "pay" || that.payType == "order"){
+							utils.redirectTo('order/detail',orderParams);
+						}else{
+							utils.redirectTo('bill/fund');
+						}
+					}
+				})
+			},
+			fail: (e) => {
+				uni.showModal({
+					content: "支付失败,原因为: " + e.errMsg,
+					showCancel: false
+				})
+			}
+		})
+	}
+	
+}

+ 126 - 0
common/poster.js

@@ -0,0 +1,126 @@
+import setting from '../config';
+import storage from './storage';
+import { getWxPoster } from './http';
+import { getShareUrl } from './utils';
+
+export default {
+	
+	config(data){
+		let views = [];
+		data.url = getShareUrl(data.url);
+		
+		views.push({
+			type: 'view',
+			css: {
+				left: '0rpx',
+				top: '0rpx',
+				background: '#eeeeee',
+				width: '650rpx',
+				height: '950rpx',
+				borderRadius: '30rpx'
+			}
+		});
+		
+		views.push({
+			type: 'image',
+			src: data.goods_image,
+			css: {
+				left: '30rpx',
+				top: '30rpx',
+				width: '590rpx',
+				height: '500rpx',
+				radius: '5rpx'
+			}
+		});
+		
+		views.push({
+			type: 'text',
+			text: data.goods_name,
+			css: {
+				maxLines: 2,
+				width: '590rpx',
+				color: '#555555',
+				left: '30rpx',
+				top: '550rpx',
+				fontSize: '30rpx',
+				lineHeight: '40rpx'
+			}
+		});
+		
+		views.push({
+			type: 'text',
+			text: "¥"+data.sell_price,
+			css: {
+				color: '#FF0000',
+				left: '30rpx',
+				top: '670rpx',
+				fontSize: '45rpx',
+				fontWeight: 'bold'
+			}
+		});
+		
+		views.push({
+			type: 'text',
+			text: "¥"+data.market_price,
+			css: {
+				color: '#999999',
+				left: (data.sell_price.length * 30 + 90)+'rpx',
+				top: '680rpx',
+				fontSize: '35rpx',
+				textDecoration: 'line-through'
+			}
+		});
+		
+		// #ifdef H5 || APP-PLUS
+		views.push({
+			type: 'qrcode',
+			text: setting.uni_app_web_url + data.url,
+			css: {
+				left: '472rpx',
+				top: '750rpx',
+				width: '150rpx',
+				height: '150rpx',
+				color: '#555555'
+			}
+		});
+		// #endif
+		
+		// #ifdef MP-WEIXIN || MP-TOUTIAO
+		getWxPoster({
+			// #ifdef MP-WEIXIN
+			client: "mp",
+			// #endif
+			// #ifdef MP-TOUTIAO
+			client: "toutiao",
+			// #endif
+			type:  data.goods_type,
+			id:    data.goods_id
+		}).then(res=>{
+			views.push({
+				type: 'image',
+				src: res.data,
+				css: {
+					left: '470rpx',
+					top: '750rpx',
+					width: '150rpx',
+					height: '150rpx'
+				}
+			});
+		});
+		// #endif
+		
+		views.push({
+			type: 'text',
+			text: '长按或扫一扫',
+			css: {
+				color: '#999999',
+				left: '473rpx',
+				top: '900rpx',
+				fontSize: '25rpx'
+			}
+		});
+		
+		return views;
+	}
+	
+};

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
common/qqmap-wx-jssdk.min.js


+ 57 - 0
common/request.js

@@ -0,0 +1,57 @@
+import config from "@/config";
+
+export default {
+	console(options){
+		// if(config.debug){
+		// 	console.log("====================【request start】===========================");
+		// 	console.log("header: " + JSON.stringify(options.header));
+		// 	console.log("method: " + options.method + " URL: " + options.url);
+		// 	console.log(options.data);
+		// 	console.log("====================【request   end】===========================");
+		// } 
+	},
+	domain(){
+		return config.uni_app_web_api_url.replace("api","");
+	},
+	send(options={}){
+		options.url = config.uni_app_web_url + '' + options.url;
+		options.method = options.method || "GET";
+		
+		// let users = storage.getJson("users");
+		// if(users != null){
+		// 	options.header = { "Auth-Token" : 'Bearer ' + users.token };
+		// }
+		// this.console(options);
+		return new Promise((resolve, reject) =>{
+			uni.request(options).then(data=>{
+				var [error, res]  = data;
+				this.console(res);
+				if(error != null){
+					reject(error);
+				}else{
+					if(res.data.status == '-1001'){
+						uni.hideLoading();
+						uni.navigateTo({
+						    url: '/pages/public/login'
+						});
+					}else{
+						resolve(res.data); 
+					}
+				}
+			});
+		});
+	},
+	get(url="",data={}){
+		return this.send({
+			url: url,
+			data: data
+		});
+	},
+	post(url="",data={}){
+		return this.send({
+			url: url,
+			data: data,
+			method: "POST",
+		});
+	}
+};

+ 31 - 0
common/sessionStorage.js

@@ -0,0 +1,31 @@
+export default {
+	
+	set(name,value){
+		sessionStorage.setItem(name,vlaue);
+	},
+	
+	setJson(name,value){
+		sessionStorage.setItem(name,JSON.stringify(value));
+	},
+	
+	get(name){
+		return sessionStorage.getItem(name);
+	},
+	
+	getJson(name){
+		const content = sessionStorage.getItem(name);
+		if(!content){
+			return null;
+		}
+		
+		return JSON.parse(content);
+	},
+	
+	remove(name){
+		sessionStorage.removeItem(name);
+	},
+	
+	clear(){
+		sessionStorage.clear();
+	}
+};

+ 13 - 0
common/spread.js

@@ -0,0 +1,13 @@
+import storage from './storage';
+
+export function setSpreadUsers(options){
+	if(options == null || options == undefined){
+	  return ;
+	}
+
+	if((options.u == null || options.u == undefined) || options.u <= 0){
+	  return ;
+	}
+	
+	storage.set('spread_id',options.u);
+}

+ 31 - 0
common/storage.js

@@ -0,0 +1,31 @@
+export default {
+	
+	set(name,value){
+		uni.setStorageSync(name,value);
+	},
+	
+	get(name){
+		return uni.getStorageSync(name);
+	},
+	
+	setJson(name,value){
+		uni.setStorageSync(name,JSON.stringify(value));
+	},
+	
+	getJson(name){
+		const content = uni.getStorageSync(name);
+		if(!content){
+			return null;
+		}
+		
+		return JSON.parse(content);
+	},
+	
+	remove(name){
+		uni.removeStorageSync(name);
+	},
+	
+	clear(){
+		uni.clearStorageSync();
+	}
+};

+ 121 - 0
common/subscribe.js

@@ -0,0 +1,121 @@
+import storage from './storage';
+
+export default {
+	
+	getSubscribeTemplate(field=null){
+		let cache = storage.getJson('template');
+		if(field == null){
+		  return cache;
+		}
+		
+		return cache[field] != undefined ? cache[field] : null;
+	},
+	
+	order(){
+		let that = this;
+		// #ifdef MP-WEIXIN
+		let subscribeTemplate = this.getSubscribeTemplate();
+		if(Object.keys(subscribeTemplate).length > 0){
+			wx.getSetting({
+			  withSubscriptions: true,
+			  success(res){
+				if(res.subscriptionsSetting && res.subscriptionsSetting.mainSwitch){
+					let delivery_notice = that.getSubscribeTemplate("delivery_notice");
+					let order_complete = that.getSubscribeTemplate("order_complete");
+					let order_pay_success = that.getSubscribeTemplate("order_pay_success");
+					let flag = true;
+					let arr = [];
+				  
+					if (!res.subscriptionsSetting.itemSettings) {
+						arr.push(delivery_notice);
+						arr.push(order_complete);
+						arr.push(order_pay_success);
+					}else if(res.subscriptionsSetting.itemSettings){
+						if(!res.subscriptionsSetting.itemSettings[delivery_notice]){
+							arr.push(delivery_notice);
+						}
+		
+						if(!res.subscriptionsSetting.itemSettings[order_complete]){
+						  arr.push(order_complete);
+						}
+		
+						if(!res.subscriptionsSetting.itemSettings[order_pay_success]){
+						  arr.push(order_pay_success);
+						}
+		
+						if(arr.length <= 0){
+						  flag = false;
+						}
+				  }
+		
+				  if(flag){
+					wx.showModal({
+					  title: "授权",
+					  content: "订阅消息授权",
+					  success(res){
+						if (res.confirm) {
+						  wx.requestSubscribeMessage({
+							tmplIds: arr,
+							success(res){
+							  console.log(res)
+							}
+						  });
+						}
+					  }
+					});
+				  }
+				}
+			  }
+			});
+		}
+		// #endif
+	},
+	
+	refund(){
+		let that = this;
+		// #ifdef MP-WEIXIN
+		if(this.getSubscribeTemplate("refund_notice") != null){
+			wx.getSetting({
+			  withSubscriptions: true,
+			  success(res){
+				if(res.subscriptionsSetting && res.subscriptionsSetting.mainSwitch){
+				  let refund_notice = that.getSubscribeTemplate("refund_notice");
+				  let flag = true;
+				  let arr = [];
+				  
+				  if (!res.subscriptionsSetting.itemSettings) {
+					arr.push(refund_notice);
+				  }else if(res.subscriptionsSetting.itemSettings){
+					if(!res.subscriptionsSetting.itemSettings[refund_notice]){
+					  arr.push(refund_notice);
+					}
+			
+					if(arr.length <= 0){
+					  flag = false;
+					}
+				  }
+			
+				  if(flag){
+					wx.showModal({
+					  title: "授权",
+					  content: "订阅消息授权",
+					  success(res){
+						if (res.confirm) {
+						  wx.requestSubscribeMessage({
+							tmplIds: arr,
+							success(res){
+							  console.log(res)
+							}
+						  });
+						}
+					  }
+					});
+				  }
+				}
+			  }
+			})
+		}
+		// #endif
+	}
+	
+}

+ 39 - 0
common/toutiao.js

@@ -0,0 +1,39 @@
+import { touTiaoLogin,getTouTiaoUserInfo } from "./http";
+import { msg } from "./utils";
+
+export function ttLogin(params){
+	return new Promise((resolve, reject)=>{
+		touTiaoLogin(params).then(res=>{ 
+			if(res.status){
+				if(typeof res.data == "string"){
+					tt.getUserInfo({
+						withCredentials: true,
+						success(result){
+							getTouTiaoUserInfo({ 
+								encrypted_data: result.encryptedData,session_key: res.data,iv: result.iv,
+								raw_data: result.rawData,signature: result.signature
+							}).then(user=>{
+								if(user.status){
+									resolve(user.data);
+								}else{
+									reject(user.msg);
+								}
+							}).catch(err=>{
+								reject(err);
+							});
+						},
+						fail(res){
+							reject(res.errMsg);
+						}
+					});
+				}else{
+					resolve(res.data);
+				}
+			}else{
+				reject(res.msg);
+			}
+		}).catch(err=>{
+			reject(err);
+		});
+	});
+}

+ 269 - 0
common/utils.js

@@ -0,0 +1,269 @@
+import storage from './storage';
+
+export function msg(content,time=3000){
+	uni.showToast({
+		icon:'none',
+		title: content,
+		duration: time
+	});
+}
+
+export function showLoading(content="加载数据中...",mask=true){
+	uni.showLoading({
+	    title: content,
+		mask: mask
+	});
+}
+
+export function hideLoading(timer=0){
+	if(timer > 0){
+		var t = setTimeout(function () {
+		    uni.hideLoading();
+			clearTimeout(t);
+		}, timer);
+	}else{
+		uni.hideLoading();
+	}
+}
+
+export function in_array(search,array){
+	let flag = false;
+	for(let i in array){
+		if(array[i]==search){
+			flag = true;
+			break;
+		}
+	}
+
+	return flag;
+}
+
+export function isDataType(data,type){
+	return Object.prototype.toString.call(data) === '[object '+type+']';
+}
+
+export function ltrim(str,char){
+	let pos = str.indexOf(char);
+	let sonstr = str.substr(pos+1);
+	return sonstr;
+}
+
+export function rtrim(str,char){
+	let pos = str.lastIndexOf(char);
+	let sonstr = str.substr(0,pos);
+	return sonstr;
+}
+
+/**
+ * 保留当前页面,跳转到应用内的某个页面,使用uni.navigateBack可以返回到原页面。
+ */
+export function navigateTo(url,params){
+	uni.navigateTo({
+		url: parseUrl(url,params)
+	})
+}
+
+/**
+ * 关闭当前页面,跳转到应用内的某个页面。
+ */
+export function redirectTo(url,params){
+	uni.redirectTo({
+		url: parseUrl(url,params)
+	});
+}
+
+/**
+ * 关闭所有页面,打开到应用内的某个页面。
+ */
+export function reLaunch(url,params){
+	uni.reLaunch({
+		url: parseUrl(url,params)
+	});
+}
+
+/**
+ * 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面。
+ */
+export function switchTab(url,params){
+	uni.switchTab({
+		url: parseUrl(url,params)
+	});
+}
+
+/**
+ * 关闭当前页面,返回上一页面或多级页面
+ */
+export function navigateBack(delta){
+	uni.navigateBack({
+		delta: delta
+	});
+}
+
+/**
+ * 预加载页面,是一种性能优化技术。被预载的页面,在打开时速度更快。
+ */
+export function preloadPage(){
+	uni.preloadPage({
+		url: parseUrl(url,params)
+	});
+}
+
+export function prePage(){
+	let pages = getCurrentPages();
+	let prePage = pages[pages.length - 2];
+	// #ifdef H5
+	return prePage;
+	// #endif
+	return prePage.$vm;
+}
+
+/**
+ * rpx转px
+ * @param int|float num
+ */
+export function rpx2px(num){
+	// const info = uni.getSystemInfoSync()
+	// let scale = 750 / info.windowWidth;
+	// return (Number.isNaN(parseFloat(num)) ? 0 : parseFloat(num)) / scale;
+	return uni.upx2px(num);
+}
+
+/**
+ * @param int|float num
+ */
+export function px2rpx(num){
+	return num/(uni.upx2px(num)/num);
+}
+
+export function getSystemInfo(){
+	const info = uni.getSystemInfoSync();
+	return {
+		w: info.windowWidth,
+		h: info.windowHeight
+	};
+}
+
+function parseUrl(url,params){
+	let arr = [];
+	let string = '';
+	for(let i in params){
+		arr.push(i + "=" + params[i]);
+	}
+	
+	string = "/pages/" + url;
+	if(arr.length > 0){
+		string += "?" + arr.join("&");
+	}
+	
+	return string;
+}
+
+export function platformAgent(){
+	let obj = { type: "", name: "", isWechat: false, isMini: false };
+	
+	// #ifdef APP-PLUS
+	let platform = uni.getSystemInfoSync().platform;
+	obj.type = "app";
+	obj.name = platform;
+	// #endif
+	
+	// #ifdef H5
+	obj.type = "h5";
+	obj.name = window.navigator.userAgent;
+	obj.isWechat = window.navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1; // 检查是否在微信公众号打开
+	// #endif
+	
+	// #ifdef MP
+	obj.isMini = true;
+	// #endif
+	
+	// #ifdef MP-WEIXIN
+	obj.type = "mp-weixin";
+	obj.name = "微信小程序";
+	// #endif
+	
+	// #ifdef MP-ALIPAY
+	obj.type = "mp-alipay";
+	obj.name = "支付宝小程序";
+	// #endif
+	
+	// #ifdef MP-BAIDU
+	obj.type = "mp-baidu";
+	obj.name = "百度小程序";
+	// #endif
+	
+	// #ifdef MP-TOUTIAO
+	obj.type = "mp-toutiao";
+	obj.name = "字节跳动小程序";
+	// #endif
+	
+	// #ifdef MP-QQ
+	obj.type = "mp-qq";
+	obj.name = "QQ小程序";
+	// #endif
+	
+	// #ifdef MP-360
+	obj.type = "mp-360";
+	obj.name = "360小程序";
+	// #endif
+	
+	return obj;
+}
+
+export function isIOS(){
+	return !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
+}
+
+export function getShareUrl(url){
+	let users = storage.getJson("users");
+	
+	// #ifdef H5 || APP-PLUS
+	if(users != null){
+		url += '#u=' + users.id;
+	}
+	// #endif
+	
+	return url;
+}
+
+export function iCopy(content){ 
+	return new Promise((resolve, reject)=>{
+		if(!content) {
+			reject('复制的内容不能为空 !');
+		}else{
+			// H5端的复制逻辑
+			// #ifdef H5
+			if (!document.queryCommandSupported('copy')) {
+				reject('浏览器不支持');
+			}else{
+				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")
+				if(result){
+					resolve("内容复制成功")
+				}else{
+					reject("复制失败,请检查h5中调用该方法的方式,是不是用户点击的方式调用的,如果不是请改为用户点击的方式触发该方法,因为h5中安全性,不能js直接调用!")
+				}	
+				textarea.remove()
+			}
+			// #endif
+			
+			// 小程序端 和 app端的复制功能
+			//#ifndef H5
+			uni.setClipboardData({
+				data: content,
+				success: function() {
+					resolve("复制成功")
+				},
+				fail:function(){
+					reject("复制失败")
+				}
+			});
+			//#endif
+		}
+	});
+}

+ 125 - 0
common/websocket.js

@@ -0,0 +1,125 @@
+import config from '../config'
+import storage from './storage'
+import {navigateTo} from './utils'
+
+export default {
+	
+	connected: false,
+	connecting: false,
+	socketTask: false,
+	timer: 3000,
+	link:0,
+	
+	/**
+	 * 创建 WebSocket 连接。
+	 */
+	connect(kf_id){
+		let users = storage.getJson("users");
+		if(users == null){
+			navigateTo("public/login");
+			return false;
+		}
+		
+		if(this.isConnect()){
+			return false;
+		}
+		
+		this.connecting = true;
+		this.socketTask = uni.connectSocket({
+			url: config.web_socket_url,
+			header: {
+				'content-type': 'application/json'
+			},
+			complete: ()=> {}
+		});
+		
+		// 监听WebSocket连接打开事件。
+		this.socketTask.onOpen((res) => {
+			this.connecting = false
+			this.connected = true
+			this.send({type:"login", auth:users.token,service_id:kf_id});
+		});
+		
+		this.error();
+		
+		this.close();
+	},
+	
+	/**
+	 * 检查是否己连接
+	 */
+	isConnect(){
+		if (this.connected || this.connecting) {
+			return true;
+		}
+		
+		return false;
+	},
+	
+	/**
+	 * 重新连接websocket
+	 */
+	reConnect(){
+		this.close();
+		this.connect();
+	},
+	
+	/**
+	 * 监听 WebSocket 接受到服务器的消息事件
+	 * @param {Object} callback
+	 */
+	message(callback){
+		if(this.socketTask != null && this.socketTask.onMessage){
+			this.socketTask.onMessage(callback);
+		}
+	},
+	
+	send(data){
+		if(typeof data == "object"){
+			data = JSON.stringify(data);
+		}
+		
+		let that = this;
+		return new Promise((resolve, reject)=>{
+			that.socketTask.send({
+				data:data,
+				success(res){
+					resolve(res);
+				},
+				fail(err){
+					reject(err);
+				}
+			})
+		});
+	},
+	
+	error(){
+		this.socketTask.onError((err) => {
+			this.connecting = false
+			this.connected = false
+			// uni.hideLoading()
+			// uni.showModal({
+			// 	content: '与服务器断开连接,请稍后再试',
+			// 	showCancel: false
+			// });
+		});
+	},
+	
+	close(){
+		if(this.link > 2) {
+			return ;
+		}
+		
+		if (this.socketTask && this.socketTask.close) {
+			
+			this.socketTask.onClose((res) => {
+				this.connected = false;
+				this.socketTask = false;
+				this.link+=1;
+				setTimeout(()=>{
+					//this.connect();
+				},this.timer);
+			})
+		}
+	}
+}

+ 61 - 0
common/wechat.js

@@ -0,0 +1,61 @@
+import { wechatLogin,getShareConfig } from './http';
+import { getShareUrl,isIOS,platformAgent } from './utils';
+import wx from "weixin-js-sdk";
+
+export function login(){
+	return new Promise((resolve, reject)=>{
+		wechatLogin().then(res=>{
+			if(res.status == 1){
+				location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${res.data.appid}&redirect_uri=${res.data.url}/pages/public/login&response_type=code&scope=snsapi_userinfo&state=${res.data.state}#wechat_redirect`;
+			}
+		}).catch(err=>{
+			reject(err);
+		});
+	});
+}
+
+export function shareConfig(page){
+	if(!platformAgent().isWechat){
+		return false;
+	}
+	
+	if(isIOS() && page != "home"){
+		return false;
+	}
+	
+	let url = getShareUrl(window.location.href);
+	getShareConfig({
+		url: url
+	}).then((res)=>{
+		if(res.status){
+			wx.config(res.data);
+		}else{
+			console.log("获取wx分享配置失败");
+		}
+	});
+}
+
+export function setShareData(data){
+	if(!platformAgent().isWechat){
+		return false;
+	}
+	
+	let url = getShareUrl(window.location.href);
+	wx.ready(function () {
+		wx.updateAppMessageShareData({
+			title: data.title, // 分享标题
+			desc: data.desc || '', // 分享描述
+			link: url, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
+			imgUrl: data.imgUrl, // 分享图标
+			success: function () {}
+		});
+
+		wx.updateTimelineShareData({
+			title: data.title, // 分享标题
+			link: url, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
+			imgUrl: data.imgUrl, // 分享图标
+			success: function () {}
+		});
+	});
+}
+

+ 89 - 0
components/authorize/authorize.vue

@@ -0,0 +1,89 @@
+<template>
+	<view>
+		<view class='popup-box' >
+		   <view class='title'>申请授权</view>
+		   <view class='tip'>获得你的公开信息(昵称、头像等),以便为您提供更好的服务</view>
+		   <view class='bottom flex'>
+		      <view class='item' @click="close">随便逛逛</view>
+			  <button class='item grant' type="primary" @click="login">去授权</button>
+		   </view>
+		</view>
+		<view class='mask'></view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name:"authorize",
+		data() {
+			return {
+				
+			};
+		},
+		methods:{
+			login(){
+				uni.navigateTo({
+					url: "/pages/public/login"
+				})
+			},
+		}
+	}
+</script>
+
+<style>
+	.popup-box{
+	  width:500rpx;
+	  background-color:#fff;
+	  position:fixed;
+	  top:50%;
+	  left:50%;
+	  margin-left:-250rpx;
+	  transform:translateY(-50%);
+	  z-index:311220;
+	}
+	.popup-box .title{
+	  font-size:28rpx;
+	  color:#000;
+	  text-align:center;
+	  margin-top: 30rpx;
+	}
+	.popup-box .tip{
+	  font-size:22rpx;
+	  color:#555;
+	  padding:0 24rpx;
+	  margin-top:25rpx;
+	}
+	.popup-box .bottom .item{
+	  width:50%;
+	  height:80rpx;
+	  background-color:#eeeeee;
+	  text-align:center;
+	  line-height:80rpx;
+	  font-size:24rpx;
+	  color:#666;
+	  margin-top:54rpx;
+	}
+	.popup-box .bottom .item.on{
+	  width: 100%;
+	}
+	.flex{
+	  display:flex;
+	}
+	.popup-box .bottom .item.grant{
+	  font-size:28rpx;
+	  color:#fff;
+	  font-weight:bold;
+	  background-color:#58be6b;
+	  border-radius:0;
+	  padding:0;
+	}
+	.mask{
+	  position:fixed;
+	  top:0;
+	  right:0;
+	  left:0;
+	  bottom:0;
+	  background-color:rgba(0,0,0,0.3);
+	  z-index:311110;
+	}
+</style>

+ 96 - 0
components/getmobile/getmobile.vue

@@ -0,0 +1,96 @@
+<template>
+	<view>
+		<uni-popup ref="telmodal" type="bottom" :mask-click="false">
+			<view class="getphone">
+				<view @click="close"><text>×</text></view>
+				<view>手机号授权提醒</view>
+				<view>获取司机手机号码授权,同步换电云数据</view>
+				<view><button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">请授权获取手机号码</button></view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	export default {
+		name:"getmobile",
+		props:['updatetopinfo'],
+		data() {
+			return {
+				
+			};
+		},
+		mounted() {
+			this.$refs.telmodal.open('bottom')
+		},
+		methods:{
+			close(){
+				// this.$refs.telmodal.close()
+				this.$utils.switchTab('index/index');
+			},
+			getPhoneNumber(e){
+				// console.log(e.detail.errMsg)                                       // 判断用户是否允许获取手机号
+				// console.log(e);
+				// let pc = new WXBizDataCrypt('appid',this.session_key);
+				// let data = pc.decryptData(e.detail.encryptedData,e.detail.iv);  
+				// console.log(this.$store.state.users)       //data就是最终解密的用户信息  
+				const userinfo=this.$store.state.users;
+				if(userinfo && e.detail.errMsg == "getPhoneNumber:ok"){
+					let params={
+						encryptedData:e.detail.encryptedData,
+						iv:e.detail.iv,
+						openId:userinfo.openId,
+						nickName:userinfo.nickName,
+						avatar:userinfo.avatarUrl
+					}
+					this.$http.wxLogin(params).then(res=>{
+						if(res.data){
+							this.$store.commit("UPDATETOKEN",res.data.token);
+							this.$store.commit("UPDATEMOBILE",res.data.telephone);
+							this.$store.commit("UPDATEUSERS",res.data);
+							this.$refs.telmodal.close();
+							// this.$emit('updatetopinfo',res.data)
+						}
+					}).catch(error=>{
+						this.$utils.msg(error);
+					});
+				}else{
+					this.$utils.msg('请授权获取手机号');
+				}
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.getphone{
+	background-color: #fff;
+	border-top-left-radius: 20rpx;
+	border-top-right-radius: 20rpx;
+	display: flex;
+	flex-direction: column;
+	text-align: center;
+	position: relative;
+	view:first-child{
+		right: 10rpx;
+		top:-10rpx;
+		font-size: 54rpx;
+		color: #7e7e80;
+		position: absolute;
+	}
+	view:nth-child(2){
+		font-weight: bold;
+		padding-top: 30rpx;
+	}
+	view:nth-child(3){
+		color: #7e7e80;
+		padding-top: 20rpx;
+	}
+	button{
+		width: 80%;
+		margin: 25rpx auto;
+		background-color:#58be6b ;
+		color: #fff;
+	}
+}
+</style>

+ 61 - 0
components/power-change-header/power-change-header.vue

@@ -0,0 +1,61 @@
+<template>
+	<view class="header">
+		<navigator url="/pages/monitoring/index" open-type="redirect" :class="{'active':currentPage===1}">换电流程</navigator>
+		<navigator url="/pages/carinfo/index" open-type="redirect" :class="{'active':currentPage===2}">车辆信息</navigator>
+		<navigator url="/pages/batteryinfo/index" open-type="redirect" :class="{'active':currentPage===3}">电池信息</navigator>
+	</view>
+</template>
+
+<script>
+	export default {
+		name:"power-change-header",
+		data() {
+			return {
+				currentPage:0
+			};
+		},
+		mounted() {
+			this.getRoute()
+		},
+		methods:{
+			getRoute(){
+				let curPage = getCurrentPages();
+				let route = curPage[curPage.length - 1].route
+				if(route === 'pages/monitoring/index'){
+					this.currentPage=1
+				}else if(route === 'pages/carinfo/index'){
+					this.currentPage=2
+				}else if(route === 'pages/batteryinfo/index'){
+					this.currentPage=3
+				}
+				
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.header{
+	display: flex;
+	padding: 30rpx;
+	width: 690rpx;
+	color:#86909c;
+	font-size: 32rpx;
+	justify-content: space-around;
+	.active{
+		color:#1d2129;
+		font-weight: bold;
+		position: relative;
+	}
+	.active::after{
+		content: '';
+		background-image: url('@/static/line.png');
+		background-size: 100% 100%;
+		width: 52rpx;
+		height: 9rpx;
+		position: absolute;
+		bottom: -25rpx;
+		left: 32%;
+	}
+}
+</style>

+ 153 - 0
components/progress/progress.vue

@@ -0,0 +1,153 @@
+<template>
+	<view class="progress_box">
+		<canvas class="progress_bg" canvas-id="cpbg"></canvas>
+		<canvas class="progress_bar" canvas-id="cpbar"></canvas>
+		<canvas class="progress_line" canvas-id="cpline"></canvas>
+		<view class="progress_txt">
+			<view class="progress_info">{{ progress_txt }}%</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			progress_txt: {
+				type: Number,
+				default: 80
+			}
+		},
+		name:"progress",
+		mounted() {
+			this.drawProgressbg();
+			this.drawCircle(this.progress_txt); //参数为1-100
+			this.drawLine();
+		},
+		data() {
+			return {
+				
+			};
+		},
+		methods:{
+			drawProgressbg(){
+				// 自定义组件实例 this ,表示在这个自定义组件下查找拥有 canvas-id 的 <canvas/>
+				var ctx = uni.createCanvasContext('cpbg', this);
+				ctx.setLineWidth(12); // 设置圆环的宽度
+				ctx.setStrokeStyle('#E9E9E9'); // 设置圆环的颜色
+				ctx.setLineCap('round'); // 设置圆环端点的形状
+				ctx.setLineCap('square'); // 设置圆环端点的形状
+				ctx.beginPath(); //开始一个新的路径
+				ctx.arc(110, 110, 70, 0 * Math.PI, 2 * Math.PI, false);
+				//设置一个原点(110,110),半径为100的圆的路径到当前路径
+				ctx.stroke(); //对当前路径进行描边
+				ctx.draw();
+			},
+			drawCircle(step){
+				var ctx = uni.createCanvasContext('cpbar', this);
+				// 进度条的渐变(中心x坐标-半径-边宽,中心Y坐标,中心x坐标+半径+边宽,中心Y坐标)
+				var gradient = ctx.createLinearGradient(0, 0, 130, 0);
+
+				let increase = 0.05;
+				let end = (step / 100) * 2 * Math.PI - Math.PI / 2; // 最后的角度
+				let current = -Math.PI / 2; // 起始角度
+				let timer = setInterval(() => {
+					gradient.addColorStop('0', '#00F2FE');
+					gradient.addColorStop('1.0', '#4FACFE');
+					ctx.setLineWidth(12);
+					ctx.setStrokeStyle(gradient);
+					ctx.setLineCap('square');
+					ctx.beginPath();
+					// 参数step 为绘制的百分比
+					if (current < end) {
+						current = current + increase;
+					}
+					if (current >= end) {
+						current = end;
+						clearInterval(timer);
+					}
+					ctx.arc(110, 110, 70, -Math.PI / 2, current, false);
+					ctx.stroke();
+					ctx.draw();
+				}, 20);
+			},
+			drawLine(){
+				var context = uni.createCanvasContext("cpline",this);
+				var r = 70;
+				var x0 = 110;
+				var y0 = 110;
+				var x;
+				var y;
+				var lineWidth = 12;
+	
+				for (let i = 0; i < 60; i++) {
+				  context.beginPath();
+				  context.setLineWidth(lineWidth);
+				  context.setStrokeStyle("#FFFFFF");
+					
+				  x = x0 - r * Math.sin(((6 * (i + 1) - 3) * Math.PI) / 180);
+				  y = y0 - r * Math.cos(((6 * (i + 1) - 3) * Math.PI) / 180);
+	
+				  // console.log('x0:' + x0 + '   y0:' + y0 + '    x:' + x + '    y:' + y);
+				  context.moveTo(x, y);
+				  context.arc(
+					x0,
+					y0,
+					r,
+					((270 - 6 * (i + 1) + 3) * Math.PI) / 180,
+					((270 - 6 * i) * Math.PI) / 180,
+					false
+				  );
+				  context.stroke();
+				  context.closePath();
+				}
+				context.stroke();
+				context.draw();
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.progress_box {
+		position: relative;
+		width: 400rpx;
+		height: 400rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		text-align: center;
+	}
+	.progress_bg {
+		position: absolute;
+		width: 220px;
+		height: 220px;
+	}
+	.progress_bar {
+		position: absolute;
+		width: 220px;
+		height: 220px;
+	}
+	.progress_line {
+		position: absolute;
+		width: 220px;
+		height: 220px;
+	}
+	.progress_txt {
+		position: absolute;
+		font-size: 28upx;
+		color: #999999;
+	}
+	.progress_info {
+		font-size: 36upx;
+		padding-left: 16upx;
+		letter-spacing: 2upx;
+		font-size: 52upx;
+		color: #333333;
+	}
+	.progress_dot {
+		width: 16upx;
+		height: 16upx;
+		border-radius: 50%;
+		background-color: #fb9126;
+	}
+</style>

+ 126 - 0
components/tab-bar/tab-bar.vue

@@ -0,0 +1,126 @@
+<template>
+	<view class="footer">
+		<view class="index" @click="swithTab(1)">
+			<view><image src="../../static/tabbar/menu-1.png"></image></view>
+			<view :class="[currentPage === 1?'current':'']">首页</view>
+		</view>
+		<view class="scan" @click="swithTab(2)">
+			<view><image src="../../static/tabbar/menu-2.png"></image></view>
+			<view class="hover">扫码换电</view>
+		</view>
+		<view class="index" @click="swithTab(3)">
+			<view><image src="../../static/tabbar/menu-3.png"></image></view>
+			<view :class="[currentPage === 3?'current':'']">我的</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name:"tab-bar",
+		data() {
+			return {
+				currentPage:0,
+			};
+		},
+		mounted() {
+			this.getRoute()
+		},
+		onLoad() {
+			
+		},
+		methods:{
+			swithTab(num){
+				if(num === 1){
+					uni.switchTab({
+						url: '/pages/index/index',
+					});
+				}else if(num === 2){
+					if(this.$store.state.users){
+						uni.scanCode({
+							success: function (res) {
+								console.log('条码内容:' + res.result.split("=")[1]);
+							}
+						});
+					}else{
+						uni.navigateTo({
+							url: '/pages/public/login?item=sancode',
+						});
+					}
+				}else{
+					if(this.$store.state.users){
+						uni.switchTab({
+							url: '/pages/ucenter/index',
+						});
+					}else{
+						uni.navigateTo({
+							url: '/pages/public/login?item=ucenter',
+						});
+					}
+				}
+			},
+			getRoute(){
+				let curPage = getCurrentPages();
+				let route = curPage[curPage.length - 1].route
+				if(route === 'pages/index/index'){
+					this.currentPage=1
+				}else if(route === 'pages/ucenter/index'){
+					this.currentPage=3
+				}
+				
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.footer{
+		width: 100%;
+		height: 106rpx;
+		background-image: url('https://xcx.xnymzx.com/zkstation/bbg.png');
+		background-size: 100% 100%;
+		position: fixed;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		display: flex;
+		justify-content: space-around;
+		padding-top: 15rpx;
+		box-sizing: border-box;
+		font-size: 26rpx;
+		image{
+			width: 39rpx;
+			height: 39rpx;
+		}
+		.index{
+			width: 300rpx;
+			text-align: center;
+		}
+		.scan{
+			position: relative;
+			display: flex;
+			flex: 1;
+			text-align: center;
+			view:first-child{
+				position: absolute;
+				bottom: 30rpx;
+				width: 100%;
+			}
+			view:last-child{
+				position: absolute;
+				bottom: 6rpx;
+				width: 100%;
+			}
+			image{
+				width: 106rpx;
+				height: 106rpx;
+			}
+		}
+		.hover{
+			color: #58be6b;
+		}
+		.current{
+			color: #959ea8;
+		}
+	}
+</style>

+ 113 - 0
components/top-box/top-box.vue

@@ -0,0 +1,113 @@
+<template>
+	<view>
+		<view class="no-login" v-if="!token">
+			<view class="avatar"><image src="../../static/no-login.png"></image></view>
+			<view class="context">您好,请授权登录</view>
+		</view>
+		<view class="login" v-else>
+			<view class="avatar"><image :src="userinfo.avatarUrl"></image></view>
+			<view class="info">
+				<view class="name">{{userinfo.nickName}}</view>
+				<view class="phone">
+					<view><image src="../../static/ucenter/icon2.png"></image></view>
+					<view>{{userinfo.mobile}}</view>
+				</view>
+			</view>
+			<view class="join">
+				<image src="../../static/ucenter/icon1.png"></image>
+				<view class="days">已加入156天</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name:"top-box",
+		data(){
+			return{
+				token:this.$store.getters.getToken,
+				user:null
+			}
+		},
+		watch:{
+			token(val){
+				console.log(val)
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.no-login{
+		margin-top: 15rpx;
+		display: flex;
+		.avatar image{
+			width: 70rpx;
+			height: 70rpx;
+			margin: 0 20rpx;
+		}
+		.context{
+			color: #58be6b;
+			font-size: 32rpx;
+			font-weight: bold;
+			line-height: 70rpx;
+		}
+	}
+	.login{
+		margin-top: 15rpx;
+		display: flex;
+		.avatar image{
+			width: 110rpx;
+			height: 110rpx;
+			margin: 0 30rpx;
+			border-radius: 50%;
+		}
+		.info{
+			display: flex;
+			flex-direction: column;
+			height: 100rpx;
+			justify-content: space-around;
+			padding-top: 10rpx;
+			margin-left: 5rpx;
+			.name{
+				color: #1d2129;
+				font-size: 36rpx;
+				font-weight: bold;
+			}
+			.phone{
+				display: flex;
+				font-size: 24rpx;
+				color: #86909c;
+				line-height: 36rpx;
+				image{
+					width: 36rpx;
+					height: 36rpx;
+				}
+			}
+		}
+		.join{
+			display: flex;
+			padding-top: 15rpx;
+			margin-left: 20rpx;
+			position: relative;
+			image{
+				width: 42rpx;
+				height: 48rpx;
+				position: absolute;
+			}
+			.days{
+				background-color: #f5f5f5;
+				height: 44rpx;
+				padding: 0 20rpx;
+				margin-left: 20rpx;
+				margin-top: 5rpx;
+				border-top-right-radius:20rpx;
+				border-bottom-right-radius:20rpx;
+				font-size: 24rpx;
+				color: #86909c;
+				line-height: 44rpx;
+			}
+		}
+	}
+</style>

+ 6 - 0
config.js

@@ -0,0 +1,6 @@
+export default {
+	web_name: "重卡智能换电",
+	uni_app_web_url: "http://172.16.12.84:8088", // h5域名或者PC域名,用于分享图片时使用,结尾必须加 “/”
+	uni_app_web_api_url: "http://172.16.12.84:8088/api", // 请求地址 
+	debug: true
+}

+ 20 - 0
index.html

@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <script>
+      var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
+        CSS.supports('top: constant(a)'))
+      document.write(
+        '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
+        (coverSupport ? ', viewport-fit=cover' : '') + '" />')
+    </script>
+    <title></title>
+    <!--preload-links-->
+    <!--app-context-->
+  </head>
+  <body>
+    <div id="app"><!--app-html--></div>
+    <script type="module" src="/main.js"></script>
+  </body>
+</html>

+ 21 - 0
main.js

@@ -0,0 +1,21 @@
+import Vue from 'vue'
+import App from './App'
+import * as http from './common/http'
+import config from './config.js'
+import * as utils from './common/utils'
+import store from './store'
+import storage from 'common/storage'
+
+Vue.config.productionTip = false
+Vue.prototype.$config = config
+Vue.prototype.$utils=utils
+Vue.prototype.$http = http
+Vue.prototype.$store = store
+Vue.prototype.$storage = storage
+
+App.mpType = 'app'
+
+const app = new Vue({
+    ...App
+})
+app.$mount()

+ 78 - 0
manifest.json

@@ -0,0 +1,78 @@
+{
+    "name" : "重卡换电",
+    "appid" : "__UNI__310AE05",
+    "description" : "",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : false,
+    /* 5+App特有相关 */
+    "app-plus" : {
+        "usingComponents" : true,
+        "nvueStyleCompiler" : "uni-app",
+        "compilerVersion" : 3,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        /* 模块配置 */
+        "modules" : {},
+        /* 应用发布信息 */
+        "distribute" : {
+            /* android打包配置 */
+            "android" : {
+                "permissions" : [
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ]
+            },
+            /* ios打包配置 */
+            "ios" : {},
+            /* SDK配置 */
+            "sdkConfigs" : {}
+        }
+    },
+    /* 快应用特有相关 */
+    "quickapp" : {},
+    /* 小程序特有相关 */
+    "mp-weixin" : {
+        "appid" : "wx9790f2f1843d1a5d",
+        "setting" : {
+            "urlCheck" : true,
+            "minified" : true
+        },
+        "usingComponents" : true,
+        "permission" : {
+            "scope.userLocation" : {
+                "desc" : "用户获取用户经纬度"
+            }
+        }
+    },
+    "mp-alipay" : {
+        "usingComponents" : true
+    },
+    "mp-baidu" : {
+        "usingComponents" : true
+    },
+    "mp-toutiao" : {
+        "usingComponents" : true
+    },
+    "uniStatistics" : {
+        "enable" : false
+    },
+    "vueVersion" : "2"
+}

+ 322 - 0
package-lock.json

@@ -0,0 +1,322 @@
+{
+  "name": "xcx_zkstation",
+  "lockfileVersion": 2,
+  "requires": true,
+  "packages": {
+    "": {
+      "dependencies": {
+        "element-ui": "^2.15.10"
+      }
+    },
+    "node_modules/@babel/parser": {
+      "version": "7.20.3",
+      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.3.tgz",
+      "integrity": "sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg==",
+      "peer": true,
+      "bin": {
+        "parser": "bin/babel-parser.js"
+      },
+      "engines": {
+        "node": ">=6.0.0"
+      }
+    },
+    "node_modules/@vue/compiler-sfc": {
+      "version": "2.7.14",
+      "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.14.tgz",
+      "integrity": "sha512-aNmNHyLPsw+sVvlQFQ2/8sjNuLtK54TC6cuKnVzAY93ks4ZBrvwQSnkkIh7bsbNhum5hJBS00wSDipQ937f5DA==",
+      "peer": true,
+      "dependencies": {
+        "@babel/parser": "^7.18.4",
+        "postcss": "^8.4.14",
+        "source-map": "^0.6.1"
+      }
+    },
+    "node_modules/async-validator": {
+      "version": "1.8.5",
+      "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.5.tgz",
+      "integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
+      "dependencies": {
+        "babel-runtime": "6.x"
+      }
+    },
+    "node_modules/babel-helper-vue-jsx-merge-props": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
+      "integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=="
+    },
+    "node_modules/babel-runtime": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
+      "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==",
+      "dependencies": {
+        "core-js": "^2.4.0",
+        "regenerator-runtime": "^0.11.0"
+      }
+    },
+    "node_modules/core-js": {
+      "version": "2.6.12",
+      "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
+      "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
+      "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.",
+      "hasInstallScript": true
+    },
+    "node_modules/csstype": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz",
+      "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==",
+      "peer": true
+    },
+    "node_modules/deepmerge": {
+      "version": "1.5.2",
+      "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz",
+      "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/element-ui": {
+      "version": "2.15.10",
+      "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.10.tgz",
+      "integrity": "sha512-jmD++mU2wKXbisvx4fxOl2mHaU+HWHTAq/3Wf8x9Bwyu4GdDZPLABb+CGi3DWN6fPqdgRcd74aX39DO+YHObLw==",
+      "dependencies": {
+        "async-validator": "~1.8.1",
+        "babel-helper-vue-jsx-merge-props": "^2.0.0",
+        "deepmerge": "^1.2.0",
+        "normalize-wheel": "^1.0.1",
+        "resize-observer-polyfill": "^1.5.0",
+        "throttle-debounce": "^1.0.1"
+      },
+      "peerDependencies": {
+        "vue": "^2.5.17"
+      }
+    },
+    "node_modules/nanoid": {
+      "version": "3.3.4",
+      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
+      "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
+      "peer": true,
+      "bin": {
+        "nanoid": "bin/nanoid.cjs"
+      },
+      "engines": {
+        "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+      }
+    },
+    "node_modules/normalize-wheel": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
+      "integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
+    },
+    "node_modules/picocolors": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
+      "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
+      "peer": true
+    },
+    "node_modules/postcss": {
+      "version": "8.4.19",
+      "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.19.tgz",
+      "integrity": "sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA==",
+      "funding": [
+        {
+          "type": "opencollective",
+          "url": "https://opencollective.com/postcss/"
+        },
+        {
+          "type": "tidelift",
+          "url": "https://tidelift.com/funding/github/npm/postcss"
+        }
+      ],
+      "peer": true,
+      "dependencies": {
+        "nanoid": "^3.3.4",
+        "picocolors": "^1.0.0",
+        "source-map-js": "^1.0.2"
+      },
+      "engines": {
+        "node": "^10 || ^12 || >=14"
+      }
+    },
+    "node_modules/regenerator-runtime": {
+      "version": "0.11.1",
+      "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
+      "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
+    },
+    "node_modules/resize-observer-polyfill": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
+      "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
+    },
+    "node_modules/source-map": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+      "peer": true,
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/source-map-js": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
+      "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
+      "peer": true,
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/throttle-debounce": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
+      "integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg==",
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/vue": {
+      "version": "2.7.14",
+      "resolved": "https://registry.npmjs.org/vue/-/vue-2.7.14.tgz",
+      "integrity": "sha512-b2qkFyOM0kwqWFuQmgd4o+uHGU7T+2z3T+WQp8UBjADfEv2n4FEMffzBmCKNP0IGzOEEfYjvtcC62xaSKeQDrQ==",
+      "peer": true,
+      "dependencies": {
+        "@vue/compiler-sfc": "2.7.14",
+        "csstype": "^3.1.0"
+      }
+    }
+  },
+  "dependencies": {
+    "@babel/parser": {
+      "version": "7.20.3",
+      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.3.tgz",
+      "integrity": "sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg==",
+      "peer": true
+    },
+    "@vue/compiler-sfc": {
+      "version": "2.7.14",
+      "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.14.tgz",
+      "integrity": "sha512-aNmNHyLPsw+sVvlQFQ2/8sjNuLtK54TC6cuKnVzAY93ks4ZBrvwQSnkkIh7bsbNhum5hJBS00wSDipQ937f5DA==",
+      "peer": true,
+      "requires": {
+        "@babel/parser": "^7.18.4",
+        "postcss": "^8.4.14",
+        "source-map": "^0.6.1"
+      }
+    },
+    "async-validator": {
+      "version": "1.8.5",
+      "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.5.tgz",
+      "integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
+      "requires": {
+        "babel-runtime": "6.x"
+      }
+    },
+    "babel-helper-vue-jsx-merge-props": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
+      "integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=="
+    },
+    "babel-runtime": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
+      "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==",
+      "requires": {
+        "core-js": "^2.4.0",
+        "regenerator-runtime": "^0.11.0"
+      }
+    },
+    "core-js": {
+      "version": "2.6.12",
+      "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
+      "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ=="
+    },
+    "csstype": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz",
+      "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==",
+      "peer": true
+    },
+    "deepmerge": {
+      "version": "1.5.2",
+      "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz",
+      "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ=="
+    },
+    "element-ui": {
+      "version": "2.15.10",
+      "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.10.tgz",
+      "integrity": "sha512-jmD++mU2wKXbisvx4fxOl2mHaU+HWHTAq/3Wf8x9Bwyu4GdDZPLABb+CGi3DWN6fPqdgRcd74aX39DO+YHObLw==",
+      "requires": {
+        "async-validator": "~1.8.1",
+        "babel-helper-vue-jsx-merge-props": "^2.0.0",
+        "deepmerge": "^1.2.0",
+        "normalize-wheel": "^1.0.1",
+        "resize-observer-polyfill": "^1.5.0",
+        "throttle-debounce": "^1.0.1"
+      }
+    },
+    "nanoid": {
+      "version": "3.3.4",
+      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
+      "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
+      "peer": true
+    },
+    "normalize-wheel": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
+      "integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
+    },
+    "picocolors": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
+      "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
+      "peer": true
+    },
+    "postcss": {
+      "version": "8.4.19",
+      "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.19.tgz",
+      "integrity": "sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA==",
+      "peer": true,
+      "requires": {
+        "nanoid": "^3.3.4",
+        "picocolors": "^1.0.0",
+        "source-map-js": "^1.0.2"
+      }
+    },
+    "regenerator-runtime": {
+      "version": "0.11.1",
+      "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
+      "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
+    },
+    "resize-observer-polyfill": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
+      "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
+    },
+    "source-map": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+      "peer": true
+    },
+    "source-map-js": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
+      "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
+      "peer": true
+    },
+    "throttle-debounce": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
+      "integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg=="
+    },
+    "vue": {
+      "version": "2.7.14",
+      "resolved": "https://registry.npmjs.org/vue/-/vue-2.7.14.tgz",
+      "integrity": "sha512-b2qkFyOM0kwqWFuQmgd4o+uHGU7T+2z3T+WQp8UBjADfEv2n4FEMffzBmCKNP0IGzOEEfYjvtcC62xaSKeQDrQ==",
+      "peer": true,
+      "requires": {
+        "@vue/compiler-sfc": "2.7.14",
+        "csstype": "^3.1.0"
+      }
+    }
+  }
+}

+ 5 - 0
package.json

@@ -0,0 +1,5 @@
+{
+  "dependencies": {
+    "element-ui": "^2.15.10"
+  }
+}

+ 113 - 0
pages.json

@@ -0,0 +1,113 @@
+{
+	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+	    {
+	        "path" : "pages/ucenter/index",
+	        "style" :                                                                                    
+	        {
+	            "navigationBarTitleText": "个人中心",
+	            "enablePullDownRefresh": false
+	        }
+	        
+	    },
+		{
+	    	"path": "pages/index/index",
+	    	"style": {
+	    		"navigationBarTitleText": "重卡智能换电",
+	    		"enablePullDownRefresh": false
+	    	}
+	    },
+		{
+	        "path" : "pages/ucenter/car",
+	        "style" :                                                                                    
+	        {
+	            "navigationBarTitleText": "我的车辆",
+	            "enablePullDownRefresh": false
+	        }
+	    },
+		{
+		    "path" : "pages/scan/index",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "确认换电信息",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		},
+		{
+	        "path" : "pages/carinfo/index",
+	        "style" :                                                                                    
+	        {
+	            "navigationBarTitleText": "车辆信息",
+	            "enablePullDownRefresh": false
+	        }
+	        
+	    },
+		{
+	        "path" : "pages/monitoring/index",
+	        "style" :                                                                                    
+	        {
+	            "navigationBarTitleText": "换电监控",
+	            "enablePullDownRefresh": false
+	        }
+	        
+	    },
+		{
+            "path" : "pages/batteryinfo/index",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "电池信息",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/ucenter/record",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "我的换电记录",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/public/login",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+    ],
+	"globalStyle": {
+		"navigationBarTextStyle": "black",
+		"navigationBarTitleText": "uni-app",
+		"navigationBarBackgroundColor": "#F8F8F8",
+		"backgroundColor": "#F8F8F8"
+	},
+	"uniIdRouter": {},
+	"tabBar": {
+		"custom": true, 
+		"color": "#333",
+		"selectedColor": "#6dc67d",
+		"list": [{
+				"pagePath": "pages/index/index",
+				"iconPath": "static/tabbar/menu-1.png",
+				"selectedIconPath": "static/tabbar/menu-1.png",
+				"text": "首页"
+			},
+			{
+				"pagePath": "pages/scan/index",
+				"iconPath": "static/tabbar/menu-2.png",
+				"selectedIconPath": "static/tabbar/menu-2.png",
+				"text": "扫码换电"
+			},
+			{
+				"pagePath": "pages/ucenter/index",
+				"iconPath": "static/tabbar/menu-3.png",
+				"selectedIconPath": "static/tabbar/menu-3.png",
+				"text": "我的"
+			}
+		]
+	}
+}

+ 74 - 0
pages/batteryinfo/index.vue

@@ -0,0 +1,74 @@
+<template>
+	<view>
+		<power-change-header></power-change-header>
+		<view class="ban"><image src="../../static/battery-info.png"></image></view>
+		<view class="info-box">
+			<view class="list">
+				<view>车辆电池编号:</view><view>MDCZ6733253671514</view>
+			</view>
+			<view class="list">
+				<view>车辆电池SOC:</view><view>5.21%</view>
+			</view>
+			<view class="list">
+				<view>预计剩余里程:</view><view>20km</view>
+			</view>
+			<view class="list">
+				<view>换电电池编号:</view><view>KGCZ6733253671589</view>
+			</view>
+			<view class="list">
+				<view>换电电池SOC:</view><view>98.28%</view>
+			</view>
+			<view class="list">
+				<view>换电量:</view><view>454(kW/h)</view>
+			</view>
+			<view class="list">
+				<view>换电后预计里程:</view><view>890km</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.ban{
+	width: 547rpx;
+	height: 298rpx;
+	margin: 70rpx auto;
+	image{
+		width: 100%;
+		height: 100%;
+	}
+}
+.info-box{
+	width: 587rpx;
+	margin: 0 auto;
+	display: flex;
+	flex-direction: column;
+	.list{
+		width: 100%;
+		display: flex;
+		height: 95rpx;
+		justify-content: space-between;
+		font-size: 30rpx;
+		view:first-child{
+			color: #86909c;
+		}
+		view:last-child{
+			color: #1d2129;
+			
+		}
+	}
+}
+</style>

+ 71 - 0
pages/carinfo/index.vue

@@ -0,0 +1,71 @@
+<template>
+	<view>
+		<power-change-header></power-change-header>
+		<view class="ban"><image src="../../static/car-info.png"></image></view>
+		<view class="info-box">
+			<view class="list">
+				<view>车牌:</view><view>渝AUU988</view>
+			</view>
+			<view class="list">
+				<view>VIN码:</view><view>LSPRR083929778273</view>
+			</view>
+			<view class="list">
+				<view>累计里程:</view><view>7463km</view>
+			</view>
+			<view class="list">
+				<view>累计换电:</view><view>520次</view>
+			</view>
+			<view class="list">
+				<view>解锁状态:</view><view>已解锁</view>
+			</view>
+			<view class="list">
+				<view>上电状态:</view><view>已下电</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.ban{
+	width: 547rpx;
+	height: 298rpx;
+	margin: 70rpx auto;
+	image{
+		width: 100%;
+		height: 100%;
+	}
+}
+.info-box{
+	width: 587rpx;
+	margin: 0 auto;
+	display: flex;
+	flex-direction: column;
+	.list{
+		width: 100%;
+		display: flex;
+		height: 100rpx;
+		justify-content: space-between;
+		font-size: 30rpx;
+		view:first-child{
+			color: #86909c;
+		}
+		view:last-child{
+			color: #1d2129;
+			
+		}
+	}
+}
+</style>

+ 314 - 0
pages/index/index.vue

@@ -0,0 +1,314 @@
+<template>
+<view>
+	<top-box></top-box>
+	<view class="main-box">
+		<view class="carinfo">
+			<view class="plate">
+				<view>车牌号</view>
+				<view><image src="../../static/icon1.png"></image></view>
+				<view>电池AI云管理监控中</view>
+			</view>
+			<view class="plate-number">
+				<view>暂无信息</view>
+				<view><image src="../../static/icon2.png"></image></view>
+			</view>
+			<view class="battery-soc">
+				<view>电池SOC</view>
+				<view>
+					<view class="strip"> 
+						<!-- 第二层进度条的颜色 -->
+						<view class="blue" :style="'width:'+info.progress+'%'"> 
+							<!-- (进度条显示的图片  样式:根据父元素进行相对定位 ,本身绝对定位 ) -->
+							<text class="protext" :style="'left:'+info.progress+'%'"></text>
+							<view class="pronumber" :style="'left:'+(info.progress-6)+'%'">{{info.progress}}%</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="battery-info">
+				<view>
+					<view>0km</view>
+					<view>已行驶里程</view>
+				</view>
+				<view>
+					<view>0km</view>
+					<view>预计剩余里程</view>
+				</view>
+				<view>
+					<view>0V</view>
+					<view>电压</view>
+				</view>
+				<view>
+					<view>0A</view>
+					<view>电流</view>
+				</view>
+			</view>
+		</view>
+		<view class="change-title">
+			<view><image src="../../static/icon3.png"></image></view>
+			<view>换电站信息</view>
+		</view>
+		<view class="change-box">
+			<view class="title">三江新区沙坪换电站</view>
+			<view class="tags">
+				<view>常去地点</view><view>24小时营业</view>
+			</view>
+			<view class="piclist">
+				<view><image src="../../static/pic.jpg"></image></view>
+				<view><image src="../../static/pic.jpg"></image></view>
+			</view>
+			<view class="address">
+				<view>876m · 四川省宜宾市三江新区沙坪镇沙溪街道89号</view>
+				<view>
+					<image src="../../static/icon4.png"></image>
+					<view>电话</view>
+				</view>
+				<view @click="getposition">
+					<image src="../../static/icon5.png"></image>
+					<view>路线</view>
+				</view>
+			</view>
+			<view class="battery-num">
+				<view>可换电池</view><view>8</view>
+			</view>
+		</view>
+	</view>
+	<tab-bar></tab-bar>
+</view>
+
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				info:{
+					progress:10,	
+				},
+				// isAuthShow: true,
+			}
+		},
+		// onShow() {
+		// 	this.$store.dispatch("usersStatus").then(()=>{
+		// 		this.isAuthShow = false;
+		// 	}).catch((error)=>{
+		// 		this.isAuthShow = true;
+				
+		// 	});
+		// },
+		methods: {
+			//获取用户位置信息
+			getposition(){
+				uni.getLocation({
+					type: 'wgs84',
+					success: function (res) {
+						console.log(res)
+						
+					}
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.authorization{
+		width: 640rpx;
+		height: 840rpx;
+		background-color: #fff;
+		border-radius: 20rpx;
+	}
+	.main-box{
+		padding: 0 30rpx;
+		.carinfo{
+			width: 690rpx;
+			height: 350rpx;
+			padding: 32rpx;
+			box-sizing:border-box;
+			background-image: url('https://xcx.xnymzx.com/zkstation/car-bg.png');
+			background-size: 100% 100%;
+			display: flex;
+			flex-direction:column;
+			justify-content: space-between;
+			.plate{
+				display: flex;
+				justify-content: space-between;
+				view:first-child{
+					flex: 1;
+				}
+				image{
+					width: 24rpx;
+					height: 24rpx;
+					vertical-align: middle;
+				}
+				view:last-child{
+					width: 280rpx;
+					text-align: right;
+					color: #6cc57d;
+					font-size: 30rpx;
+				}
+			}
+			.plate-number{
+				display: flex;
+				
+				image{
+					width: 26rpx;
+					height: 26rpx;
+					vertical-align: middle;
+				}
+				view:first-child{
+					font-weight: 600;
+					font-size: 32rpx;
+					padding-right: 15rpx;
+				}
+				
+			}
+			.battery-soc{
+				display: flex;
+				
+				view:first-child{
+					width: 138rpx;
+				}
+				view:last-child{
+					flex: 1;
+					.strip {
+						/* 父元素相对定位 */
+						position: relative;
+						width: 480rpx;
+						height: 18rpx;
+						background-color: #fff;
+						top: 10rpx;
+					}
+					.blue {
+						height: 18rpx;
+						background-color: #ff7d00;
+						font-size: 28rpx;
+					}
+					.protext{
+						width:2rpx;
+						height:32rpx;
+						background: #86909c;
+						/* 子元素绝对定位   */
+						position: absolute;
+						/* 定位方向:属性值 */
+						top:-9rpx
+					}
+					.pronumber{
+						font-size: 26rpx;
+						font-weight: bold;
+						position: absolute;
+						/* 定位方向:属性值 */
+						top:30rpx;
+					}
+				}
+			}
+			.battery-info{
+				display: flex;
+				justify-content: space-between;
+				
+				text-align: center;
+				line-height: 36rpx;
+				view > view:first-child{
+					font-weight: bold;
+				}
+				view > view:last-child{
+					color: #939da7;
+					font-size: 26rpx;
+				}
+			}
+		}
+		.change-title{
+			width: 100%;
+			padding: 0 20rpx;
+			box-sizing: border-box;
+			display: flex;
+			margin: 30rpx 0;
+			image{
+				width: 9rpx;
+				height: 39rpx;
+			}
+			view:first-child{
+				padding-right: 12rpx;
+			}
+			view:last-child{
+				font-weight: bold;
+				font-size: 32rpx;
+				line-height: 32rpx;
+			}
+		}
+		.change-box{
+			width: 690rpx;
+			box-sizing: border-box;
+			border-radius: 25rpx;
+			background-color: #fff;
+			padding:20rpx 30rpx;
+			display: flex;
+			flex-direction:column;
+			overflow:hidden;
+			.title{
+				font-weight: bold;
+				color: #110d2e;
+				font-size: 34rpx;
+			}
+			.tags{
+				display: flex;
+				view{
+					background: #f5f5f5;
+					color: #979797;
+					font-size: 24rpx;
+					padding: 8rpx 15rpx;
+					margin:15rpx 12rpx 15rpx 0rpx;
+					border-radius: 5rpx;
+				}
+			}
+			.piclist{
+				display: flex;
+				justify-content: space-between;
+				margin: 18rpx 0rpx;
+				width: 630rpx;
+				overflow:hidden;
+				// view{
+				// 	margin-right: 15rpx;
+				// }
+				image{
+					width: 298rpx;
+					height: 189rpx;
+					box-sizing: border-box;
+					border-radius: 15rpx;
+				}
+			}
+			.address{
+				display: flex;
+				justify-content: space-between;
+				text-align: center;
+				color: #86909c;
+				font-size: 24rpx;
+				view:first-child{
+					width: 445rpx;
+					text-align: left;
+					font-size: 28rpx;
+					color: #333333;
+					line-height: 40rpx;
+				}
+				image{
+					width: 44rpx;
+					height: 44rpx;
+				}
+			}
+			.battery-num{
+				color: #86909c;
+				font-size:30rpx;
+				margin-top: 12rpx;
+				display: flex;
+				line-height: 36rpx;
+				view:last-child{
+					color: #000000;
+					font-weight: 600;
+					margin-left: 15rpx;
+					font-size: 36rpx;
+				}
+			}
+		}
+	}
+	
+</style>

+ 140 - 0
pages/monitoring/index.vue

@@ -0,0 +1,140 @@
+<template>
+	<view>
+		<power-change-header></power-change-header>
+		<view class="changeCurrent">
+			<view class="info">
+				<view><image src="../../static/icon7.png"></image></view>
+				<view>车辆已上锁,换电完成车辆已上锁</view>
+			</view>
+			<view class="times">
+				2022-12-14 01:32:28 | 渝AUU988
+			</view>
+		</view>
+		<view class="timeline">
+			<view class="timeinfo">
+				<view class="list" v-for="(item,index) in datetime" :key="index">
+					<view>{{item.time}}</view>
+					<view>{{item.date}}</view>
+				</view>
+			</view>
+			<view class="line">
+				<uni-steps :options="options" :active="2" direction="column"></uni-steps>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				datetime:[
+					{
+						time: '21:13:59',
+						date: '2018-11-11'
+					},
+					{
+						time: '21:13:59',
+						date: '2018-11-11'
+					},
+					{
+						time: '21:13:59',
+						date: '2018-11-11'
+					},
+					{
+						time: '21:13:59',
+						date: '2018-11-11'
+					},
+					{
+						time: '21:13:59',
+						date: '2018-11-11'
+					},
+					{
+						time: '21:13:59',
+						date: '2018-11-11'
+					},
+					{
+						time: '21:13:59',
+						date: '2018-11-11'
+					},
+					{
+						time: '21:13:59',
+						date: '2018-11-11'
+					}
+				],
+				options:[
+					{title: '车辆已上锁、换电完成'}, 
+					{title: '站内换电条件验证成功、开始自动换电'}, 
+					{title: '站内换电条件验证'}, 
+					{title: '司机发起换电申请'}, 
+					{title: '车辆已下电、车辆已解锁'}, 
+					{title: '车站连接成功,云端开始换电鉴权'}, 
+					{title: '车牌识别成功'},
+					{title: '车辆驶入初定位,开始车牌识别,开始车站连接'},
+				]
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.timeline{
+	padding:0 58rpx;
+	display: flex;
+	margin-top: 60rpx;
+	.timeinfo{
+		display: flex;
+		flex-direction: column;
+		text-align: right;
+		.list{
+			display: flex;
+			flex-direction: column;
+			width: 100%;
+			height: 102rpx;
+			color: #c9cdd4;
+			font-size: 28rpx;
+			view:first-child{
+				color:#86909c;
+			}
+		}
+	}
+	.line{
+		flex: 1;
+	}
+}
+.changeCurrent{
+	width: 690rpx;
+	margin: 30rpx auto;
+	height: 180rpx;
+	background-image: url('@/static/change-bg.png');
+	background-size: 100% 100%;
+	padding: 25rpx;
+	box-sizing: border-box;
+	display: flex;
+	flex-direction:column;
+	justify-content: space-around;
+	.info{
+		display: flex;
+		color: #fff;
+		font-size: 30rpx;
+		font-weight: bold;
+		line-height: 36rpx;
+		
+		image{
+			width: 60rpx;
+			height: 60rpx;
+			padding-right: 25rpx;
+		}
+		view:last-child{
+			padding-top: 12rpx;
+		}
+	}
+	.times{
+		color:#ededed;
+		text-indent: 10rpx;
+	}
+}
+</style>

+ 172 - 0
pages/public/login.vue

@@ -0,0 +1,172 @@
+<template>
+	<view>
+		<view class="login-wrap">
+			<view class="logo"><image src="../../static/logo.png"></image></view>
+			<view class="wechat-title">微信授权登录</view>
+			<view class="wechat-desc">获得您的公开信息(昵称、头像等),以便为您提供更好的服务</view>
+			<view class="wechat-login-btn" @click="onWxMiniLogin">授权登录</view>
+			<view class="wechat-go-home" @click="onGoHome">暂不登录</view>
+			<view class="agreement-box" style="width: 80%;">
+				<view class="agreement-text agree-text">
+					<checkbox-group @change="checkboxChange">
+						<checkbox value="1" class="protocol-check"></checkbox>我已阅读并遵守
+						<view class="agree-text">
+							<view>《用户协议》</view>
+							与
+							<view>《隐私协议》</view>
+						</view>
+					</checkbox-group>
+				</view>
+			</view>
+		</view>
+		
+		<loading v-if="isSubmit" :layer="true"></loading>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				isSubmit:false,
+				protocol: false,
+				options:null
+			}
+		},
+		onLoad(option) {
+			this.options=option.item
+		},
+		methods: {
+			onWxMiniLogin(){
+				// if(!this.protocol){
+				// 	this.isSubmit = false;
+				// 	this.$utils.msg("请同意用户协议");
+				// 	return ;
+				// }
+				
+				var that = this;
+				this.isSubmit = true;
+				wx.getUserProfile({
+				  desc: '授权',
+				  success: (res) => {
+					let userInfo = JSON.parse(res.rawData);
+					wx.login({
+					  success: function (resData){
+						let params = {};
+						params.userInfo = userInfo;
+						// params.code = resData.code;
+						const userCode={code:resData.code}
+						that.$http.wxgetCode(userCode).then(result=>{
+							if(result.code === 0){
+								const wxuserinfo={...result.data,...userInfo}
+								console.log(wxuserinfo)
+								that.$store.commit("UPDATEUSERS",wxuserinfo);
+								//有token就存储token
+								if(wxuserinfo.token){
+									that.$store.commit("UPDATETOKEN",wxuserinfo.token);
+								}
+								//有手机号就存储手机号
+								if(wxuserinfo.mobile){
+									that.$store.commit("UPDATEMOBILE",wxuserinfo.mobile);
+								}
+								if(that.options === 'sancode'){
+									that.$utils.switchTab('index/index');
+								}
+								if(that.options === 'ucenter'){
+									that.$utils.switchTab('ucenter/index');
+								}
+								that.isSubmit = false;
+							}
+							else if(result.code === 1){
+								that.$utils.msg(result.msg);
+								that.isSubmit = false;
+							}
+							else{
+								that.$utils.msg(result.message);
+								that.isSubmit = false;
+							}
+							
+						}).catch(error=>{
+							that.isSubmit = false;
+							that.$utils.msg(error);
+						});
+					  },
+					  fail:function (err){
+						that.isSubmit = false;
+						that.$utils.msg(err);
+					  }
+					})
+				  },
+				  fail: res=>{
+					that.$utils.msg("您无权限请求该接口");
+				  }
+				})
+			},
+			onGoHome(){
+				this.$utils.switchTab("index/index");
+			},
+			checkboxChange(e){
+				this.protocol = e.detail.value[0] != undefined;
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.agreement-box {
+		width: 100%;
+		margin: 30rpx auto 0;
+		flex-direction: row;
+		align-items: center;
+		justify-content: center;
+		.protocol-check {
+			position: relative;top:-2px;transform:scale(0.6)
+		}
+		.agreement-text {
+			width: 100%;
+			font-size: 26rpx;
+			font-weight: 500;
+			color: #999999;
+	
+			.agree-text {
+				display: inline-block;
+				color: #2841c2;
+				view{
+					display: inline;
+				}
+			}
+		}
+	}
+	.login-wrap {
+		.logo {
+			text-align: center;
+			padding-top: 180rpx;
+			image {
+				width: 180rpx;
+				height: 180rpx;
+			}
+		}
+		.wechat-title {
+			font-size: 35rpx;
+			font-weight: 500;
+			color: #333;
+			margin-top: 24rpx;
+			text-align: center;
+		}
+		.wechat-desc {
+			font-size: 28rpx;
+			font-weight: 500;
+			color: #999;
+			margin-top: 24rpx;
+			text-align: center;
+			padding: 10rpx 50rpx;
+		}
+		.wechat-login-btn {
+			height: 80rpx; line-height: 80rpx;
+			color: #fff; background-color: #58be6b;
+			text-align: center; border-radius: 50rpx;
+			margin: 50rpx; font-size: 32rpx;
+		}
+		.wechat-go-home { text-align: center; font-size: 30rpx; color:#666; }
+	}
+</style>

+ 270 - 0
pages/scan/index.vue

@@ -0,0 +1,270 @@
+<template>
+	<view>
+		<view class="progress_box">
+			<canvas class="progress_bg" canvas-id="cpbg"></canvas>
+			<canvas class="progress_bar" canvas-id="cpbar"></canvas>
+			<canvas class="progress_line" canvas-id="cpline"></canvas>
+			<view class="progress_txt">
+				<view class="progress_info">{{ progress_txt }}%</view>
+				<view>当前电池SOC</view>
+			</view>
+		</view>
+		<view class="battery-info">
+			<view>
+				<view>0km</view>
+				<view>预计剩余里程</view>
+			</view>
+			<view>
+				<view>220V</view>
+				<view>电压</view>
+			</view>
+			<view>
+				<view>42A</view>
+				<view>电流</view>
+			</view>
+		</view>
+		<view class="carinfo">
+			<view class="battery-list">
+				<view class="icon"><image src="../../static/p1.png"></image></view>
+				<view class="info">
+					<view class="word">车牌号</view>
+					<view class="number">京E87WH4</view>
+				</view>
+			</view>
+			<view class="battery-list">
+				<view class="icon"><image src="../../static/p2.png"></image></view>
+				<view class="info">
+					<view class="word">当前车辆电池SOC</view>
+					<view class="number">5.20%</view>
+				</view>
+			</view>
+			<view class="battery-list">
+				<view class="icon"><image src="../../static/p3.png"></image></view>
+				<view class="info">
+					<view class="word">换电电池SOC</view>
+					<view class="number">98.01%</view>
+				</view>
+			</view>
+			<view class="battery-list">
+				<view class="icon"><image src="../../static/p4.png"></image></view>
+				<view class="info">
+					<view class="word">预估换电费用</view>
+					<view class="number">90.23元</view>
+				</view>
+			</view>
+			<view class="battery-list">
+				<view class="icon"><image src="../../static/p5.png"></image></view>
+				<view class="info">
+					<view class="word">服务费</view>
+					<view class="number">15元</view>
+				</view>
+			</view>
+		</view>
+		<button type="default" @click="goto('/pages/monitoring/index')" class="submit">确认换电</button>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				progress_txt:10,
+				qrcode:null
+			}
+		},
+		mounted() {
+			this.drawProgressbg();
+			this.drawCircle(this.progress_txt); //参数为1-100
+			this.drawLine();
+		},
+		onLoad(options) {
+			this.qrcode=(decodeURIComponent(options.q)).split("=")[1]
+		},
+		methods: {
+			goto(url){
+				uni.navigateTo({
+					url:url
+				})
+			},
+			drawProgressbg(){
+				// 自定义组件实例 this ,表示在这个自定义组件下查找拥有 canvas-id 的 <canvas/>
+				var ctx = uni.createCanvasContext('cpbg', this);
+				ctx.setLineWidth(14); // 设置圆环的宽度
+				ctx.setStrokeStyle('#dadada'); // 设置圆环的颜色
+				ctx.setLineCap('round'); // 设置圆环端点的形状
+				ctx.setLineCap('square'); // 设置圆环端点的形状
+				ctx.beginPath(); //开始一个新的路径
+				ctx.arc(110, 110, 70, 0 * Math.PI, 2 * Math.PI, false);
+				//设置一个原点(110,110),半径为100的圆的路径到当前路径
+				ctx.stroke(); //对当前路径进行描边
+				ctx.draw();
+			},
+			drawCircle(step){
+				var ctx = uni.createCanvasContext('cpbar', this);
+				// 进度条的渐变(中心x坐标-半径-边宽,中心Y坐标,中心x坐标+半径+边宽,中心Y坐标)
+				var gradient = ctx.createLinearGradient(0, 0, 130, 0);
+			
+				let increase = 0.05;
+				let end = (step / 100) * 2 * Math.PI - Math.PI / 2; // 最后的角度
+				let current = -Math.PI / 2; // 起始角度
+				let timer = setInterval(() => {
+					gradient.addColorStop('0', '#58be6b');
+					gradient.addColorStop('1.0', '#58be6b');
+					ctx.setLineWidth(12);
+					ctx.setStrokeStyle(gradient);
+					ctx.setLineCap('square');
+					ctx.beginPath();
+					// 参数step 为绘制的百分比
+					if (current < end) {
+						current = current + increase;
+					}
+					if (current >= end) {
+						current = end;
+						clearInterval(timer);
+					}
+					ctx.arc(110, 110, 70, -Math.PI / 2, current, false);
+					ctx.stroke();
+					ctx.draw();
+				}, 20);
+			},
+			drawLine(){
+				var context = uni.createCanvasContext("cpline",this);
+				var r = 70;
+				var x0 = 110;
+				var y0 = 110;
+				var x;
+				var y;
+				var lineWidth = 12;
+				
+				for (let i = 0; i < 60; i++) {
+				  context.beginPath();
+				  context.setLineWidth(lineWidth);
+				  context.setStrokeStyle("#FFFFFF");
+					
+				  x = x0 - r * Math.sin(((6 * (i + 1) - 3) * Math.PI) / 180);
+				  y = y0 - r * Math.cos(((6 * (i + 1) - 3) * Math.PI) / 180);
+				
+				  // console.log('x0:' + x0 + '   y0:' + y0 + '    x:' + x + '    y:' + y);
+				  context.moveTo(x, y);
+				  context.arc(
+					x0,
+					y0,
+					r,
+					((270 - 6 * (i + 1) + 3) * Math.PI) / 180,
+					((270 - 6 * i) * Math.PI) / 180,
+					false
+				  );
+				  context.stroke();
+				  context.closePath();
+				}
+				context.stroke();
+				context.draw();
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.progress_box {
+		position: relative;
+		width: 400rpx;
+		height: 400rpx;
+		display: flex;
+		margin: 0 auto;
+		align-items: center;
+		justify-content: center;
+		text-align: center;
+	}
+	.progress_bg {
+		position: absolute;
+		width: 220px;
+		height: 220px;
+	}
+	.progress_bar {
+		position: absolute;
+		width: 220px;
+		height: 220px;
+	}
+	.progress_line {
+		position: absolute;
+		width: 220px;
+		height: 220px;
+	}
+	.progress_txt {
+		position: absolute;
+		font-size: 28upx;
+		color: #999999;
+	}
+	.progress_info {
+		font-size: 36upx;
+		padding-left: 16upx;
+		letter-spacing: 2upx;
+		font-size: 52upx;
+		color: #333333;
+	}
+	.progress_dot {
+		width: 16upx;
+		height: 16upx;
+		border-radius: 50%;
+		background-color: #fb9126;
+	}
+	.battery-info{
+		display: flex;
+		justify-content: space-between;
+		padding: 0 80rpx;
+		text-align: center;
+		line-height: 36rpx;
+		view > view:first-child{
+			font-weight: bold;
+		}
+		view > view:last-child{
+			color: #939da7;
+			font-size: 26rpx;
+		}
+	}
+	.carinfo{
+		padding-left: 45rpx;
+		width: 100%;
+		box-sizing: border-box;
+		margin-top: 90rpx;
+		.battery-list{
+			display: flex;
+			width: 100%;
+			margin-top: 36rpx;
+			.icon{
+				width: 55rpx;
+				padding-top: 5rpx;
+				image{
+					width: 32rpx;
+					height: 32rpx;
+				}
+			}
+			.info{
+				display: flex;
+				flex: 1;
+				border-bottom:#e5e5e5 solid 1px;
+				justify-content: space-between;
+				font-size: 28rpx;
+				padding-bottom: 36rpx;
+				padding-right: 40rpx;
+				box-sizing: border-box;
+				.word{
+					color: #86909c;
+				}
+				.number{
+					color: #333333;
+					font-weight: bold;
+				}
+			}
+		}
+	}
+	.submit{
+		width: 600rpx;
+		height: 88rpx;
+		margin:35rpx auto;
+		font-size: 36rpx;
+		background-color: #58be6b;
+		color: #fff;
+		border-radius: 44rpx;
+	}
+</style>

+ 126 - 0
pages/ucenter/car.vue

@@ -0,0 +1,126 @@
+<template>
+	<view>
+		<view class="car-box">
+			<uni-swiper-dot :info="info" :current="current" field="content" mode="default" :dots-styles="dotsStyles">
+				<swiper class="swiper-box" @change="change">
+					<swiper-item v-for="(item ,index) in info" :key="index">
+						<view class="swiper-item">
+							<view class="top">
+								<view>渝SUT5U8</view>
+								<view><image src="../../static/icon-car.png"></image></view>
+							</view>
+							<view class="bottom">
+								<view class="carpic"><image src="../../static/car.jpg"></image></view>
+								<view class="list">
+									<view>车型:</view><view>陕汽S5000自卸车</view>
+								</view>
+								<view class="list">
+									<view>VIN码:</view><view>LSPRR083929778273</view>
+								</view>
+								<view class="list">
+									<view>累计行驶里程:</view><view>7463km</view>
+								</view>
+								<view class="list">
+									<view>累计换电:</view><view>520次</view>
+								</view>
+								<view class="list">
+									<view>累计换电量:</view><view>10890(kW/h)</view>
+								</view>
+							</view>
+						</view>
+					</swiper-item>
+				</swiper>
+			</uni-swiper-dot>
+		</view>
+		<tab-bar></tab-bar>		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				info: [{
+					content: '内容 A'
+				}, {
+					content: '内容 B'
+				}, {
+					content: '内容 C'
+				}],
+				current: 0,
+				dotsStyles:{
+					backgroundColor: 'rgba(88, 190, 107,0.6)',
+					selectedBackgroundColor: 'rgba(88, 190, 107,0.9)',
+				}
+			}
+		},
+		methods: {
+			change(e) {
+				this.current = e.detail.current;
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.car-box{
+		padding: 0 30rpx;
+		.swiper-box{
+			width: 100%;
+			display: flex;
+			background-color:#fff;
+			border-radius: 20rpx;
+			border-top-right-radius: 40rpx;
+			min-height: 1050rpx;
+			margin-top: 15rpx;
+			.swiper-item{
+				display: flex;
+				flex-direction: column;
+				.top{
+					display: flex;
+					padding-left: 50rpx;
+					justify-content: space-between;
+					view:first-child{
+						padding-top: 40rpx;
+						font-size: 30rpx;
+						font-weight: bold;
+					}
+					image{
+						width: 110rpx;
+						height: 98rpx;
+					}
+				}
+				.bottom{
+					padding:0 30rpx;
+					display: flex;
+					flex-direction: column;
+					.carpic{
+						text-align: center;
+						margin-bottom: 30rpx;
+					}
+					image{
+						width: 630rpx;
+						height: 480rpx;
+						border-radius:28rpx;
+					}
+					.list{
+						width: 100%;
+						padding: 0 30rpx;
+						box-sizing: border-box;
+						display: flex;
+						height: 80rpx;
+						justify-content: space-between;
+						font-size: 30rpx;
+						view:first-child{
+							color: #86909c;
+						}
+						view:last-child{
+							color: #1d2129;
+							
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 214 - 0
pages/ucenter/index.vue

@@ -0,0 +1,214 @@
+<template>
+	<view>
+		<top-box></top-box>
+		<view class="ucenter">
+			<view class="mydata">我的数据(累计)</view>
+			<view class="data-box">
+				<view class="datashow">
+					<view class="icon"><image src="../../static/ucenter/icon3.png"></image></view>
+					<view class="num">87</view>
+					<view>换电次数<text>/次</text></view>
+				</view>
+				<view class="datashow">
+					<view class="icon"><image src="../../static/ucenter/icon4.png"></image></view>
+					<view class="num">10809.87</view>
+					<view class="unit">换电量<text>/(kW/h)</text></view>
+				</view>
+				<view class="datashow">
+					<view class="icon"><image src="../../static/ucenter/icon5.png"></image></view>
+					<view class="num">10800.23</view>
+					<view class="unit">预估费用<text>/元</text></view>
+				</view>
+			</view>
+			<view class="common">
+				<view class="title">常用功能</view>
+				<view class="list" @click="getqrcode">
+					<view><image src="../../static/ucenter/icon6.png"></image></view>
+					<view>下载换电二维码</view>
+					<view>></view>
+				</view>
+				<view class="list" @click="toCar">
+					<view><image src="../../static/ucenter/icon7.png"></image></view>
+					<view>我的车辆</view>
+					<view>></view>
+				</view>
+				<view class="list" @click="toRecord">
+					<view><image src="../../static/ucenter/icon8.png"></image></view>
+					<view>换电记录</view>
+					<view>></view>
+				</view>
+				<view class="list" @click="contact">
+					<view><image src="../../static/ucenter/icon9.png"></image></view>
+					<view>联系客服</view>
+					<view>></view>
+				</view>
+			</view>
+		</view>
+		<uni-popup ref="popup" background-color="#fff" type="bottom">
+			<view class="popuplist">
+				<view><image src="../../static/code.jpg"></image></view>
+				<view><text>车牌:</text> 渝AUU998</view>
+				<view><text>车辆识别码:</text> LSPR********8273</view>
+				<view>保存至相册</view>
+			</view>
+		</uni-popup>
+		<tab-bar></tab-bar>
+		<getmobile v-if="isAuthShow"></getmobile>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				qrcode:'../../static/code.jpg',
+				isAuthShow:false,
+			}
+		},
+		onShow() {
+			this.$store.dispatch("usersToken").then(()=>{
+				this.isAuthShow = false;
+				// this.token=this.$store.getters.getToken
+				// this.userinfo=this.$store.getters.getUser
+			}).catch(()=>{
+				this.isAuthShow = true;
+			});
+		},
+		methods: {
+			//更新头部信息
+			// updatetopinfo(data){
+			// 	if(this.$store.getters.getToken && this.$store.getters.getUser){
+			// 		this.token=data.token
+			// 		this.userinfo=data
+			// 	}
+			// },
+			//联系电话
+			contact(){
+				uni.showActionSheet({
+					itemList: ['呼叫:136-1111-9884'],
+					success: function (res) {
+						if(!res.tapIndex){
+							uni.makePhoneCall({
+								phoneNumber:'136-1111-9884',
+							})
+						}
+					},
+				});
+			},
+			//保存二维码到相册
+			getqrcode(){
+				this.$refs.popup.open('bottom')
+			},
+			toCar(){
+				uni.navigateTo({
+					url:'../ucenter/car'
+				})
+			},
+			toRecord(){
+				uni.navigateTo({
+					url:'../ucenter/record'
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.popuplist{
+		display: flex;
+		flex-direction: column;
+		text-align: center;
+		image{
+			width: 347rpx;
+			height: 347rpx;
+			margin-top: 20rpx;
+		}
+		text{
+			color: #888e9c;
+		}
+		view{
+			margin-top: 15rpx;
+		}
+		view:last-child{
+			padding: 25rpx 0;
+			border-top: 10rpx solid rgba(149, 150, 151, 0.5);
+		}
+	}
+	.ucenter{
+		padding: 0 30rpx;
+		.mydata{
+			color: #1d2129;
+			font-size: 32rpx;
+			font-weight: bold;
+			margin: 40rpx 0;
+			text-indent:10rpx;
+		}
+		.data-box{
+			display: flex;
+			justify-content: space-between;
+			background-color: #fff;
+			padding: 25rpx;
+			box-sizing: border-box;
+			border-radius: 30rpx;
+			.icon{
+				height: 100rpx;
+			}
+			.num{
+				color: #1d2129;
+				font-weight: bold;
+				font-size: 32rpx;
+				height: 50rpx;
+			}
+			.unit{
+				color: #666666;
+				font-size: 30rpx;
+			}
+			image{
+				width: 80rpx;
+				height: 80rpx;
+			}
+			text{
+				color: #86909c;
+				font-size: 28rpx;
+			}
+		}
+		.common{
+			display: flex;
+			margin-top: 20rpx;
+			background-color: #fff;
+			padding: 25rpx 35rpx;
+			box-sizing: border-box;
+			border-radius: 30rpx;
+			flex-direction: column;
+			height: 518rpx;
+			justify-content:space-between;
+			.title{
+				color: #1d2129;
+				font-size: 32rpx;
+				font-weight: bold;
+			}
+			.list{
+				display: flex;
+				image{
+					width: 36rpx;
+					height: 36rpx;
+				}
+				view:first-child{
+					width: 56rpx;
+					padding-top: 5rpx;
+				}
+				view:nth-child(2){
+					color: #1d2129;
+					font-size: 30rpx;
+					font-weight: 500;
+					width: 558rpx;
+				}
+				view:last-child{
+					color: #959ea8;
+					font-weight: bold;
+					font-size: 32rpx;
+				}
+			}
+		}
+	}
+</style>

+ 22 - 0
pages/ucenter/record.vue

@@ -0,0 +1,22 @@
+<template>
+	<view>
+	<tab-bar></tab-bar>	
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 44 - 0
project.config.json

@@ -0,0 +1,44 @@
+{
+    "appid": "wx9790f2f1843d1a5d",
+    "compileType": "miniprogram",
+    "libVersion": "2.27.3",
+    "packOptions": {
+        "ignore": [],
+        "include": []
+    },
+    "setting": {
+        "urlCheck": true,
+        "coverView": true,
+        "es6": true,
+        "postcss": true,
+        "lazyloadPlaceholderEnable": false,
+        "preloadBackgroundData": false,
+        "minified": true,
+        "autoAudits": false,
+        "uglifyFileName": false,
+        "uploadWithSourceMap": true,
+        "enhance": true,
+        "useMultiFrameRuntime": true,
+        "showShadowRootInWxmlPanel": true,
+        "packNpmManually": false,
+        "packNpmRelationList": [],
+        "minifyWXSS": true,
+        "useStaticServer": true,
+        "showES6CompileOption": false,
+        "checkInvalidKey": true,
+        "babelSetting": {
+            "ignore": [],
+            "disablePlugins": [],
+            "outputPath": ""
+        },
+        "disableUseStrict": false,
+        "useCompilerPlugins": false,
+        "minifyWXML": true
+    },
+    "condition": {},
+    "editorSetting": {
+        "tabIndent": "insertSpaces",
+        "tabSize": 4
+    },
+    "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
+}

+ 7 - 0
project.private.config.json

@@ -0,0 +1,7 @@
+{
+    "projectname": "xcx_zkstation",
+    "setting": {
+        "compileHotReLoad": true
+    },
+    "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
+}

BIN=BIN
static/battery-info.png


BIN=BIN
static/bbg.png


BIN=BIN
static/car-bg.png


BIN=BIN
static/car-info.png


BIN=BIN
static/car.jpg


BIN=BIN
static/change-bg.png


BIN=BIN
static/code.jpg


BIN=BIN
static/icon-car.png


BIN=BIN
static/icon1.png


BIN=BIN
static/icon2.png


BIN=BIN
static/icon3.png


BIN=BIN
static/icon4.png


BIN=BIN
static/icon5.png


BIN=BIN
static/icon7.png


BIN=BIN
static/line.png


BIN=BIN
static/logo.png


BIN=BIN
static/no-login.png


BIN=BIN
static/p1.png


BIN=BIN
static/p2.png


BIN=BIN
static/p3.png


BIN=BIN
static/p4.png


BIN=BIN
static/p5.png


BIN=BIN
static/pic.jpg


BIN=BIN
static/tabbar/menu-1.png


BIN=BIN
static/tabbar/menu-2.png


BIN=BIN
static/tabbar/menu-3.png


BIN=BIN
static/ucenter/big-avatar.png


BIN=BIN
static/ucenter/icon1.png


BIN=BIN
static/ucenter/icon2.png


BIN=BIN
static/ucenter/icon3.png


BIN=BIN
static/ucenter/icon4.png


BIN=BIN
static/ucenter/icon5.png


BIN=BIN
static/ucenter/icon6.png


BIN=BIN
static/ucenter/icon7.png


BIN=BIN
static/ucenter/icon8.png


BIN=BIN
static/ucenter/icon9.png


+ 103 - 0
store/index.js

@@ -0,0 +1,103 @@
+import Vue from 'vue'
+import Vuex from 'vuex'
+import storage from '../common/storage'
+
+Vue.use(Vuex);
+
+const store = new Vuex.Store({
+	// 属性值
+	state: {
+		users: storage.getJson("users"),
+		token: storage.getJson("token"),
+		mobile:storage.getJson("mobile"),
+	},
+	// 对外方问state属性内容
+	getters: {
+		getUser: state => {
+			let users = storage.getJson("users");
+			if(users == null){
+				return 0;
+			}
+			return users;
+		},
+		getToken: state => {
+			let token = storage.getJson("token");
+			return token;
+		},
+		getMobile: state => {
+			let mobile = storage.getJson("mobile");
+			return mobile;
+		},
+	},
+	// Mutation 必须是同步函数
+	// 更改state属性内容
+	// 使用:this.$store.commit("setUserInfo",{  });
+	mutations: {
+		UPDATEUSERS(state, data){
+			state.users = data;
+			storage.setJson("users",data);
+		},
+		DELETEUSERS(state,name){
+			state.users = null;
+			storage.remove(name);
+		},
+		UPDATETOKEN(state, data){
+			state.token = data;
+			storage.setJson("token",data);
+		},
+		DELETETOKEN(state,name){
+			state.token = null;
+			storage.remove(name);
+		},
+		UPDATEMOBILE(state, data){
+			state.token = data;
+			storage.setJson("mobile",data);
+		},
+		DELETEMOBILE(state,name){
+			state.mobile = null;
+			storage.remove(name);
+		}
+		
+	},
+	// Action 可以包含任意异步操作
+	// 通过 context.commit 可以方问mutations方法
+	// 也可以获得getters内容
+	// 通过 this.$store.dispatch("getUser") 来取得内容
+	actions: {
+		getUser(context){
+			//console.log(context.getters.cart)
+		},
+		usersStatus(context){
+			return new Promise(function (resolve, reject) {
+				let users = storage.getJson("users");
+				if(users == null){
+					reject();
+				}else{
+					resolve();
+				}
+			});
+		},
+		usersToken(context){
+			return new Promise(function (resolve, reject) {
+				let token = storage.getJson("token");
+				if(token == null){
+					reject();
+				}else{
+					resolve();
+				}
+			});
+		},
+		usersMobile(context){
+			return new Promise(function (resolve, reject) {
+				let mobile = storage.getJson("mobile");
+				if(mobile == null){
+					reject();
+				}else{
+					resolve();
+				}
+			});
+		}
+	}
+})
+
+export default store

+ 76 - 0
uni.scss

@@ -0,0 +1,76 @@
+/**
+ * 这里是uni-app内置的常用样式变量
+ *
+ * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
+ * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
+ *
+ */
+
+/**
+ * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
+ *
+ * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
+ */
+
+/* 颜色变量 */
+
+/* 行为相关颜色 */
+$uni-color-primary: #007aff;
+$uni-color-success: #4cd964;
+$uni-color-warning: #f0ad4e;
+$uni-color-error: #dd524d;
+
+/* 文字基本颜色 */
+$uni-text-color:#333;//基本色
+$uni-text-color-inverse:#fff;//反色
+$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
+$uni-text-color-placeholder: #808080;
+$uni-text-color-disable:#c0c0c0;
+
+/* 背景颜色 */
+$uni-bg-color:#ffffff;
+$uni-bg-color-grey:#f8f8f8;
+$uni-bg-color-hover:#f1f1f1;//点击状态颜色
+$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
+
+/* 边框颜色 */
+$uni-border-color:#c8c7cc;
+
+/* 尺寸变量 */
+
+/* 文字尺寸 */
+$uni-font-size-sm:12px;
+$uni-font-size-base:14px;
+$uni-font-size-lg:16;
+
+/* 图片尺寸 */
+$uni-img-size-sm:20px;
+$uni-img-size-base:26px;
+$uni-img-size-lg:40px;
+
+/* Border Radius */
+$uni-border-radius-sm: 2px;
+$uni-border-radius-base: 3px;
+$uni-border-radius-lg: 6px;
+$uni-border-radius-circle: 50%;
+
+/* 水平间距 */
+$uni-spacing-row-sm: 5px;
+$uni-spacing-row-base: 10px;
+$uni-spacing-row-lg: 15px;
+
+/* 垂直间距 */
+$uni-spacing-col-sm: 4px;
+$uni-spacing-col-base: 8px;
+$uni-spacing-col-lg: 12px;
+
+/* 透明度 */
+$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
+
+/* 文章场景相关 */
+$uni-color-title: #2C405A; // 文章标题颜色
+$uni-font-size-title:20px;
+$uni-color-subtitle: #555555; // 二级标题颜色
+$uni-font-size-subtitle:26px;
+$uni-color-paragraph: #3F536E; // 文章段落颜色
+$uni-font-size-paragraph:15px;

+ 22 - 0
uni_modules/uni-icons/changelog.md

@@ -0,0 +1,22 @@
+## 1.3.5(2022-01-24)
+- 优化 size 属性可以传入不带单位的字符串数值
+## 1.3.4(2022-01-24)
+- 优化 size 支持其他单位
+## 1.3.3(2022-01-17)
+- 修复 nvue 有些图标不显示的bug,兼容老版本图标
+## 1.3.2(2021-12-01)
+- 优化 示例可复制图标名称
+## 1.3.1(2021-11-23)
+- 优化 兼容旧组件 type 值
+## 1.3.0(2021-11-19)
+- 新增 更多图标
+- 优化 自定义图标使用方式
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons)
+## 1.1.7(2021-11-08)
+## 1.2.0(2021-07-30)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.1.5(2021-05-12)
+- 新增 组件示例地址
+## 1.1.4(2021-02-05)
+- 调整为uni_modules目录规范

+ 1169 - 0
uni_modules/uni-icons/components/uni-icons/icons.js

@@ -0,0 +1,1169 @@
+export default {
+  "id": "2852637",
+  "name": "uniui图标库",
+  "font_family": "uniicons",
+  "css_prefix_text": "uniui-",
+  "description": "",
+  "glyphs": [
+    {
+      "icon_id": "25027049",
+      "name": "yanse",
+      "font_class": "color",
+      "unicode": "e6cf",
+      "unicode_decimal": 59087
+    },
+    {
+      "icon_id": "25027048",
+      "name": "wallet",
+      "font_class": "wallet",
+      "unicode": "e6b1",
+      "unicode_decimal": 59057
+    },
+    {
+      "icon_id": "25015720",
+      "name": "settings-filled",
+      "font_class": "settings-filled",
+      "unicode": "e6ce",
+      "unicode_decimal": 59086
+    },
+    {
+      "icon_id": "25015434",
+      "name": "shimingrenzheng-filled",
+      "font_class": "auth-filled",
+      "unicode": "e6cc",
+      "unicode_decimal": 59084
+    },
+    {
+      "icon_id": "24934246",
+      "name": "shop-filled",
+      "font_class": "shop-filled",
+      "unicode": "e6cd",
+      "unicode_decimal": 59085
+    },
+    {
+      "icon_id": "24934159",
+      "name": "staff-filled-01",
+      "font_class": "staff-filled",
+      "unicode": "e6cb",
+      "unicode_decimal": 59083
+    },
+    {
+      "icon_id": "24932461",
+      "name": "VIP-filled",
+      "font_class": "vip-filled",
+      "unicode": "e6c6",
+      "unicode_decimal": 59078
+    },
+    {
+      "icon_id": "24932462",
+      "name": "plus_circle_fill",
+      "font_class": "plus-filled",
+      "unicode": "e6c7",
+      "unicode_decimal": 59079
+    },
+    {
+      "icon_id": "24932463",
+      "name": "folder_add-filled",
+      "font_class": "folder-add-filled",
+      "unicode": "e6c8",
+      "unicode_decimal": 59080
+    },
+    {
+      "icon_id": "24932464",
+      "name": "yanse-filled",
+      "font_class": "color-filled",
+      "unicode": "e6c9",
+      "unicode_decimal": 59081
+    },
+    {
+      "icon_id": "24932465",
+      "name": "tune-filled",
+      "font_class": "tune-filled",
+      "unicode": "e6ca",
+      "unicode_decimal": 59082
+    },
+    {
+      "icon_id": "24932455",
+      "name": "a-rilidaka-filled",
+      "font_class": "calendar-filled",
+      "unicode": "e6c0",
+      "unicode_decimal": 59072
+    },
+    {
+      "icon_id": "24932456",
+      "name": "notification-filled",
+      "font_class": "notification-filled",
+      "unicode": "e6c1",
+      "unicode_decimal": 59073
+    },
+    {
+      "icon_id": "24932457",
+      "name": "wallet-filled",
+      "font_class": "wallet-filled",
+      "unicode": "e6c2",
+      "unicode_decimal": 59074
+    },
+    {
+      "icon_id": "24932458",
+      "name": "paihangbang-filled",
+      "font_class": "medal-filled",
+      "unicode": "e6c3",
+      "unicode_decimal": 59075
+    },
+    {
+      "icon_id": "24932459",
+      "name": "gift-filled",
+      "font_class": "gift-filled",
+      "unicode": "e6c4",
+      "unicode_decimal": 59076
+    },
+    {
+      "icon_id": "24932460",
+      "name": "fire-filled",
+      "font_class": "fire-filled",
+      "unicode": "e6c5",
+      "unicode_decimal": 59077
+    },
+    {
+      "icon_id": "24928001",
+      "name": "refreshempty",
+      "font_class": "refreshempty",
+      "unicode": "e6bf",
+      "unicode_decimal": 59071
+    },
+    {
+      "icon_id": "24926853",
+      "name": "location-ellipse",
+      "font_class": "location-filled",
+      "unicode": "e6af",
+      "unicode_decimal": 59055
+    },
+    {
+      "icon_id": "24926735",
+      "name": "person-filled",
+      "font_class": "person-filled",
+      "unicode": "e69d",
+      "unicode_decimal": 59037
+    },
+    {
+      "icon_id": "24926703",
+      "name": "personadd-filled",
+      "font_class": "personadd-filled",
+      "unicode": "e698",
+      "unicode_decimal": 59032
+    },
+    {
+      "icon_id": "24923351",
+      "name": "back",
+      "font_class": "back",
+      "unicode": "e6b9",
+      "unicode_decimal": 59065
+    },
+    {
+      "icon_id": "24923352",
+      "name": "forward",
+      "font_class": "forward",
+      "unicode": "e6ba",
+      "unicode_decimal": 59066
+    },
+    {
+      "icon_id": "24923353",
+      "name": "arrowthinright",
+      "font_class": "arrow-right",
+      "unicode": "e6bb",
+      "unicode_decimal": 59067
+    },
+		{
+		  "icon_id": "24923353",
+		  "name": "arrowthinright",
+		  "font_class": "arrowthinright",
+		  "unicode": "e6bb",
+		  "unicode_decimal": 59067
+		},
+    {
+      "icon_id": "24923354",
+      "name": "arrowthinleft",
+      "font_class": "arrow-left",
+      "unicode": "e6bc",
+      "unicode_decimal": 59068
+    },
+		{
+		  "icon_id": "24923354",
+		  "name": "arrowthinleft",
+		  "font_class": "arrowthinleft",
+		  "unicode": "e6bc",
+		  "unicode_decimal": 59068
+		},
+    {
+      "icon_id": "24923355",
+      "name": "arrowthinup",
+      "font_class": "arrow-up",
+      "unicode": "e6bd",
+      "unicode_decimal": 59069
+    },
+		{
+		  "icon_id": "24923355",
+		  "name": "arrowthinup",
+		  "font_class": "arrowthinup",
+		  "unicode": "e6bd",
+		  "unicode_decimal": 59069
+		},
+    {
+      "icon_id": "24923356",
+      "name": "arrowthindown",
+      "font_class": "arrow-down",
+      "unicode": "e6be",
+      "unicode_decimal": 59070
+    },{
+      "icon_id": "24923356",
+      "name": "arrowthindown",
+      "font_class": "arrowthindown",
+      "unicode": "e6be",
+      "unicode_decimal": 59070
+    },
+    {
+      "icon_id": "24923349",
+      "name": "arrowdown",
+      "font_class": "bottom",
+      "unicode": "e6b8",
+      "unicode_decimal": 59064
+    },{
+      "icon_id": "24923349",
+      "name": "arrowdown",
+      "font_class": "arrowdown",
+      "unicode": "e6b8",
+      "unicode_decimal": 59064
+    },
+    {
+      "icon_id": "24923346",
+      "name": "arrowright",
+      "font_class": "right",
+      "unicode": "e6b5",
+      "unicode_decimal": 59061
+    },
+		{
+		  "icon_id": "24923346",
+		  "name": "arrowright",
+		  "font_class": "arrowright",
+		  "unicode": "e6b5",
+		  "unicode_decimal": 59061
+		},
+    {
+      "icon_id": "24923347",
+      "name": "arrowup",
+      "font_class": "top",
+      "unicode": "e6b6",
+      "unicode_decimal": 59062
+    },
+		{
+		  "icon_id": "24923347",
+		  "name": "arrowup",
+		  "font_class": "arrowup",
+		  "unicode": "e6b6",
+		  "unicode_decimal": 59062
+		},
+    {
+      "icon_id": "24923348",
+      "name": "arrowleft",
+      "font_class": "left",
+      "unicode": "e6b7",
+      "unicode_decimal": 59063
+    },
+		{
+		  "icon_id": "24923348",
+		  "name": "arrowleft",
+		  "font_class": "arrowleft",
+		  "unicode": "e6b7",
+		  "unicode_decimal": 59063
+		},
+    {
+      "icon_id": "24923334",
+      "name": "eye",
+      "font_class": "eye",
+      "unicode": "e651",
+      "unicode_decimal": 58961
+    },
+    {
+      "icon_id": "24923335",
+      "name": "eye-filled",
+      "font_class": "eye-filled",
+      "unicode": "e66a",
+      "unicode_decimal": 58986
+    },
+    {
+      "icon_id": "24923336",
+      "name": "eye-slash",
+      "font_class": "eye-slash",
+      "unicode": "e6b3",
+      "unicode_decimal": 59059
+    },
+    {
+      "icon_id": "24923337",
+      "name": "eye-slash-filled",
+      "font_class": "eye-slash-filled",
+      "unicode": "e6b4",
+      "unicode_decimal": 59060
+    },
+    {
+      "icon_id": "24923305",
+      "name": "info-filled",
+      "font_class": "info-filled",
+      "unicode": "e649",
+      "unicode_decimal": 58953
+    },
+    {
+      "icon_id": "24923299",
+      "name": "reload-01",
+      "font_class": "reload",
+      "unicode": "e6b2",
+      "unicode_decimal": 59058
+    },
+    {
+      "icon_id": "24923195",
+      "name": "mic_slash_fill",
+      "font_class": "micoff-filled",
+      "unicode": "e6b0",
+      "unicode_decimal": 59056
+    },
+    {
+      "icon_id": "24923165",
+      "name": "map-pin-ellipse",
+      "font_class": "map-pin-ellipse",
+      "unicode": "e6ac",
+      "unicode_decimal": 59052
+    },
+    {
+      "icon_id": "24923166",
+      "name": "map-pin",
+      "font_class": "map-pin",
+      "unicode": "e6ad",
+      "unicode_decimal": 59053
+    },
+    {
+      "icon_id": "24923167",
+      "name": "location",
+      "font_class": "location",
+      "unicode": "e6ae",
+      "unicode_decimal": 59054
+    },
+    {
+      "icon_id": "24923064",
+      "name": "starhalf",
+      "font_class": "starhalf",
+      "unicode": "e683",
+      "unicode_decimal": 59011
+    },
+    {
+      "icon_id": "24923065",
+      "name": "star",
+      "font_class": "star",
+      "unicode": "e688",
+      "unicode_decimal": 59016
+    },
+    {
+      "icon_id": "24923066",
+      "name": "star-filled",
+      "font_class": "star-filled",
+      "unicode": "e68f",
+      "unicode_decimal": 59023
+    },
+    {
+      "icon_id": "24899646",
+      "name": "a-rilidaka",
+      "font_class": "calendar",
+      "unicode": "e6a0",
+      "unicode_decimal": 59040
+    },
+    {
+      "icon_id": "24899647",
+      "name": "fire",
+      "font_class": "fire",
+      "unicode": "e6a1",
+      "unicode_decimal": 59041
+    },
+    {
+      "icon_id": "24899648",
+      "name": "paihangbang",
+      "font_class": "medal",
+      "unicode": "e6a2",
+      "unicode_decimal": 59042
+    },
+    {
+      "icon_id": "24899649",
+      "name": "font",
+      "font_class": "font",
+      "unicode": "e6a3",
+      "unicode_decimal": 59043
+    },
+    {
+      "icon_id": "24899650",
+      "name": "gift",
+      "font_class": "gift",
+      "unicode": "e6a4",
+      "unicode_decimal": 59044
+    },
+    {
+      "icon_id": "24899651",
+      "name": "link",
+      "font_class": "link",
+      "unicode": "e6a5",
+      "unicode_decimal": 59045
+    },
+    {
+      "icon_id": "24899652",
+      "name": "notification",
+      "font_class": "notification",
+      "unicode": "e6a6",
+      "unicode_decimal": 59046
+    },
+    {
+      "icon_id": "24899653",
+      "name": "staff",
+      "font_class": "staff",
+      "unicode": "e6a7",
+      "unicode_decimal": 59047
+    },
+    {
+      "icon_id": "24899654",
+      "name": "VIP",
+      "font_class": "vip",
+      "unicode": "e6a8",
+      "unicode_decimal": 59048
+    },
+    {
+      "icon_id": "24899655",
+      "name": "folder_add",
+      "font_class": "folder-add",
+      "unicode": "e6a9",
+      "unicode_decimal": 59049
+    },
+    {
+      "icon_id": "24899656",
+      "name": "tune",
+      "font_class": "tune",
+      "unicode": "e6aa",
+      "unicode_decimal": 59050
+    },
+    {
+      "icon_id": "24899657",
+      "name": "shimingrenzheng",
+      "font_class": "auth",
+      "unicode": "e6ab",
+      "unicode_decimal": 59051
+    },
+    {
+      "icon_id": "24899565",
+      "name": "person",
+      "font_class": "person",
+      "unicode": "e699",
+      "unicode_decimal": 59033
+    },
+    {
+      "icon_id": "24899566",
+      "name": "email-filled",
+      "font_class": "email-filled",
+      "unicode": "e69a",
+      "unicode_decimal": 59034
+    },
+    {
+      "icon_id": "24899567",
+      "name": "phone-filled",
+      "font_class": "phone-filled",
+      "unicode": "e69b",
+      "unicode_decimal": 59035
+    },
+    {
+      "icon_id": "24899568",
+      "name": "phone",
+      "font_class": "phone",
+      "unicode": "e69c",
+      "unicode_decimal": 59036
+    },
+    {
+      "icon_id": "24899570",
+      "name": "email",
+      "font_class": "email",
+      "unicode": "e69e",
+      "unicode_decimal": 59038
+    },
+    {
+      "icon_id": "24899571",
+      "name": "personadd",
+      "font_class": "personadd",
+      "unicode": "e69f",
+      "unicode_decimal": 59039
+    },
+    {
+      "icon_id": "24899558",
+      "name": "chatboxes-filled",
+      "font_class": "chatboxes-filled",
+      "unicode": "e692",
+      "unicode_decimal": 59026
+    },
+    {
+      "icon_id": "24899559",
+      "name": "contact",
+      "font_class": "contact",
+      "unicode": "e693",
+      "unicode_decimal": 59027
+    },
+    {
+      "icon_id": "24899560",
+      "name": "chatbubble-filled",
+      "font_class": "chatbubble-filled",
+      "unicode": "e694",
+      "unicode_decimal": 59028
+    },
+    {
+      "icon_id": "24899561",
+      "name": "contact-filled",
+      "font_class": "contact-filled",
+      "unicode": "e695",
+      "unicode_decimal": 59029
+    },
+    {
+      "icon_id": "24899562",
+      "name": "chatboxes",
+      "font_class": "chatboxes",
+      "unicode": "e696",
+      "unicode_decimal": 59030
+    },
+    {
+      "icon_id": "24899563",
+      "name": "chatbubble",
+      "font_class": "chatbubble",
+      "unicode": "e697",
+      "unicode_decimal": 59031
+    },
+    {
+      "icon_id": "24881290",
+      "name": "upload-filled",
+      "font_class": "upload-filled",
+      "unicode": "e68e",
+      "unicode_decimal": 59022
+    },
+    {
+      "icon_id": "24881292",
+      "name": "upload",
+      "font_class": "upload",
+      "unicode": "e690",
+      "unicode_decimal": 59024
+    },
+    {
+      "icon_id": "24881293",
+      "name": "weixin",
+      "font_class": "weixin",
+      "unicode": "e691",
+      "unicode_decimal": 59025
+    },
+    {
+      "icon_id": "24881274",
+      "name": "compose",
+      "font_class": "compose",
+      "unicode": "e67f",
+      "unicode_decimal": 59007
+    },
+    {
+      "icon_id": "24881275",
+      "name": "qq",
+      "font_class": "qq",
+      "unicode": "e680",
+      "unicode_decimal": 59008
+    },
+    {
+      "icon_id": "24881276",
+      "name": "download-filled",
+      "font_class": "download-filled",
+      "unicode": "e681",
+      "unicode_decimal": 59009
+    },
+    {
+      "icon_id": "24881277",
+      "name": "pengyouquan",
+      "font_class": "pyq",
+      "unicode": "e682",
+      "unicode_decimal": 59010
+    },
+    {
+      "icon_id": "24881279",
+      "name": "sound",
+      "font_class": "sound",
+      "unicode": "e684",
+      "unicode_decimal": 59012
+    },
+    {
+      "icon_id": "24881280",
+      "name": "trash-filled",
+      "font_class": "trash-filled",
+      "unicode": "e685",
+      "unicode_decimal": 59013
+    },
+    {
+      "icon_id": "24881281",
+      "name": "sound-filled",
+      "font_class": "sound-filled",
+      "unicode": "e686",
+      "unicode_decimal": 59014
+    },
+    {
+      "icon_id": "24881282",
+      "name": "trash",
+      "font_class": "trash",
+      "unicode": "e687",
+      "unicode_decimal": 59015
+    },
+    {
+      "icon_id": "24881284",
+      "name": "videocam-filled",
+      "font_class": "videocam-filled",
+      "unicode": "e689",
+      "unicode_decimal": 59017
+    },
+    {
+      "icon_id": "24881285",
+      "name": "spinner-cycle",
+      "font_class": "spinner-cycle",
+      "unicode": "e68a",
+      "unicode_decimal": 59018
+    },
+    {
+      "icon_id": "24881286",
+      "name": "weibo",
+      "font_class": "weibo",
+      "unicode": "e68b",
+      "unicode_decimal": 59019
+    },
+    {
+      "icon_id": "24881288",
+      "name": "videocam",
+      "font_class": "videocam",
+      "unicode": "e68c",
+      "unicode_decimal": 59020
+    },
+    {
+      "icon_id": "24881289",
+      "name": "download",
+      "font_class": "download",
+      "unicode": "e68d",
+      "unicode_decimal": 59021
+    },
+    {
+      "icon_id": "24879601",
+      "name": "help",
+      "font_class": "help",
+      "unicode": "e679",
+      "unicode_decimal": 59001
+    },
+    {
+      "icon_id": "24879602",
+      "name": "navigate-filled",
+      "font_class": "navigate-filled",
+      "unicode": "e67a",
+      "unicode_decimal": 59002
+    },
+    {
+      "icon_id": "24879603",
+      "name": "plusempty",
+      "font_class": "plusempty",
+      "unicode": "e67b",
+      "unicode_decimal": 59003
+    },
+    {
+      "icon_id": "24879604",
+      "name": "smallcircle",
+      "font_class": "smallcircle",
+      "unicode": "e67c",
+      "unicode_decimal": 59004
+    },
+    {
+      "icon_id": "24879605",
+      "name": "minus-filled",
+      "font_class": "minus-filled",
+      "unicode": "e67d",
+      "unicode_decimal": 59005
+    },
+    {
+      "icon_id": "24879606",
+      "name": "micoff",
+      "font_class": "micoff",
+      "unicode": "e67e",
+      "unicode_decimal": 59006
+    },
+    {
+      "icon_id": "24879588",
+      "name": "closeempty",
+      "font_class": "closeempty",
+      "unicode": "e66c",
+      "unicode_decimal": 58988
+    },
+    {
+      "icon_id": "24879589",
+      "name": "clear",
+      "font_class": "clear",
+      "unicode": "e66d",
+      "unicode_decimal": 58989
+    },
+    {
+      "icon_id": "24879590",
+      "name": "navigate",
+      "font_class": "navigate",
+      "unicode": "e66e",
+      "unicode_decimal": 58990
+    },
+    {
+      "icon_id": "24879591",
+      "name": "minus",
+      "font_class": "minus",
+      "unicode": "e66f",
+      "unicode_decimal": 58991
+    },
+    {
+      "icon_id": "24879592",
+      "name": "image",
+      "font_class": "image",
+      "unicode": "e670",
+      "unicode_decimal": 58992
+    },
+    {
+      "icon_id": "24879593",
+      "name": "mic",
+      "font_class": "mic",
+      "unicode": "e671",
+      "unicode_decimal": 58993
+    },
+    {
+      "icon_id": "24879594",
+      "name": "paperplane",
+      "font_class": "paperplane",
+      "unicode": "e672",
+      "unicode_decimal": 58994
+    },
+    {
+      "icon_id": "24879595",
+      "name": "close",
+      "font_class": "close",
+      "unicode": "e673",
+      "unicode_decimal": 58995
+    },
+    {
+      "icon_id": "24879596",
+      "name": "help-filled",
+      "font_class": "help-filled",
+      "unicode": "e674",
+      "unicode_decimal": 58996
+    },
+    {
+      "icon_id": "24879597",
+      "name": "plus-filled",
+      "font_class": "paperplane-filled",
+      "unicode": "e675",
+      "unicode_decimal": 58997
+    },
+    {
+      "icon_id": "24879598",
+      "name": "plus",
+      "font_class": "plus",
+      "unicode": "e676",
+      "unicode_decimal": 58998
+    },
+    {
+      "icon_id": "24879599",
+      "name": "mic-filled",
+      "font_class": "mic-filled",
+      "unicode": "e677",
+      "unicode_decimal": 58999
+    },
+    {
+      "icon_id": "24879600",
+      "name": "image-filled",
+      "font_class": "image-filled",
+      "unicode": "e678",
+      "unicode_decimal": 59000
+    },
+    {
+      "icon_id": "24855900",
+      "name": "locked-filled",
+      "font_class": "locked-filled",
+      "unicode": "e668",
+      "unicode_decimal": 58984
+    },
+    {
+      "icon_id": "24855901",
+      "name": "info",
+      "font_class": "info",
+      "unicode": "e669",
+      "unicode_decimal": 58985
+    },
+    {
+      "icon_id": "24855903",
+      "name": "locked",
+      "font_class": "locked",
+      "unicode": "e66b",
+      "unicode_decimal": 58987
+    },
+    {
+      "icon_id": "24855884",
+      "name": "camera-filled",
+      "font_class": "camera-filled",
+      "unicode": "e658",
+      "unicode_decimal": 58968
+    },
+    {
+      "icon_id": "24855885",
+      "name": "chat-filled",
+      "font_class": "chat-filled",
+      "unicode": "e659",
+      "unicode_decimal": 58969
+    },
+    {
+      "icon_id": "24855886",
+      "name": "camera",
+      "font_class": "camera",
+      "unicode": "e65a",
+      "unicode_decimal": 58970
+    },
+    {
+      "icon_id": "24855887",
+      "name": "circle",
+      "font_class": "circle",
+      "unicode": "e65b",
+      "unicode_decimal": 58971
+    },
+    {
+      "icon_id": "24855888",
+      "name": "checkmarkempty",
+      "font_class": "checkmarkempty",
+      "unicode": "e65c",
+      "unicode_decimal": 58972
+    },
+    {
+      "icon_id": "24855889",
+      "name": "chat",
+      "font_class": "chat",
+      "unicode": "e65d",
+      "unicode_decimal": 58973
+    },
+    {
+      "icon_id": "24855890",
+      "name": "circle-filled",
+      "font_class": "circle-filled",
+      "unicode": "e65e",
+      "unicode_decimal": 58974
+    },
+    {
+      "icon_id": "24855891",
+      "name": "flag",
+      "font_class": "flag",
+      "unicode": "e65f",
+      "unicode_decimal": 58975
+    },
+    {
+      "icon_id": "24855892",
+      "name": "flag-filled",
+      "font_class": "flag-filled",
+      "unicode": "e660",
+      "unicode_decimal": 58976
+    },
+    {
+      "icon_id": "24855893",
+      "name": "gear-filled",
+      "font_class": "gear-filled",
+      "unicode": "e661",
+      "unicode_decimal": 58977
+    },
+    {
+      "icon_id": "24855894",
+      "name": "home",
+      "font_class": "home",
+      "unicode": "e662",
+      "unicode_decimal": 58978
+    },
+    {
+      "icon_id": "24855895",
+      "name": "home-filled",
+      "font_class": "home-filled",
+      "unicode": "e663",
+      "unicode_decimal": 58979
+    },
+    {
+      "icon_id": "24855896",
+      "name": "gear",
+      "font_class": "gear",
+      "unicode": "e664",
+      "unicode_decimal": 58980
+    },
+    {
+      "icon_id": "24855897",
+      "name": "smallcircle-filled",
+      "font_class": "smallcircle-filled",
+      "unicode": "e665",
+      "unicode_decimal": 58981
+    },
+    {
+      "icon_id": "24855898",
+      "name": "map-filled",
+      "font_class": "map-filled",
+      "unicode": "e666",
+      "unicode_decimal": 58982
+    },
+    {
+      "icon_id": "24855899",
+      "name": "map",
+      "font_class": "map",
+      "unicode": "e667",
+      "unicode_decimal": 58983
+    },
+    {
+      "icon_id": "24855825",
+      "name": "refresh-filled",
+      "font_class": "refresh-filled",
+      "unicode": "e656",
+      "unicode_decimal": 58966
+    },
+    {
+      "icon_id": "24855826",
+      "name": "refresh",
+      "font_class": "refresh",
+      "unicode": "e657",
+      "unicode_decimal": 58967
+    },
+    {
+      "icon_id": "24855808",
+      "name": "cloud-upload",
+      "font_class": "cloud-upload",
+      "unicode": "e645",
+      "unicode_decimal": 58949
+    },
+    {
+      "icon_id": "24855809",
+      "name": "cloud-download-filled",
+      "font_class": "cloud-download-filled",
+      "unicode": "e646",
+      "unicode_decimal": 58950
+    },
+    {
+      "icon_id": "24855810",
+      "name": "cloud-download",
+      "font_class": "cloud-download",
+      "unicode": "e647",
+      "unicode_decimal": 58951
+    },
+    {
+      "icon_id": "24855811",
+      "name": "cloud-upload-filled",
+      "font_class": "cloud-upload-filled",
+      "unicode": "e648",
+      "unicode_decimal": 58952
+    },
+    {
+      "icon_id": "24855813",
+      "name": "redo",
+      "font_class": "redo",
+      "unicode": "e64a",
+      "unicode_decimal": 58954
+    },
+    {
+      "icon_id": "24855814",
+      "name": "images-filled",
+      "font_class": "images-filled",
+      "unicode": "e64b",
+      "unicode_decimal": 58955
+    },
+    {
+      "icon_id": "24855815",
+      "name": "undo-filled",
+      "font_class": "undo-filled",
+      "unicode": "e64c",
+      "unicode_decimal": 58956
+    },
+    {
+      "icon_id": "24855816",
+      "name": "more",
+      "font_class": "more",
+      "unicode": "e64d",
+      "unicode_decimal": 58957
+    },
+    {
+      "icon_id": "24855817",
+      "name": "more-filled",
+      "font_class": "more-filled",
+      "unicode": "e64e",
+      "unicode_decimal": 58958
+    },
+    {
+      "icon_id": "24855818",
+      "name": "undo",
+      "font_class": "undo",
+      "unicode": "e64f",
+      "unicode_decimal": 58959
+    },
+    {
+      "icon_id": "24855819",
+      "name": "images",
+      "font_class": "images",
+      "unicode": "e650",
+      "unicode_decimal": 58960
+    },
+    {
+      "icon_id": "24855821",
+      "name": "paperclip",
+      "font_class": "paperclip",
+      "unicode": "e652",
+      "unicode_decimal": 58962
+    },
+    {
+      "icon_id": "24855822",
+      "name": "settings",
+      "font_class": "settings",
+      "unicode": "e653",
+      "unicode_decimal": 58963
+    },
+    {
+      "icon_id": "24855823",
+      "name": "search",
+      "font_class": "search",
+      "unicode": "e654",
+      "unicode_decimal": 58964
+    },
+    {
+      "icon_id": "24855824",
+      "name": "redo-filled",
+      "font_class": "redo-filled",
+      "unicode": "e655",
+      "unicode_decimal": 58965
+    },
+    {
+      "icon_id": "24841702",
+      "name": "list",
+      "font_class": "list",
+      "unicode": "e644",
+      "unicode_decimal": 58948
+    },
+    {
+      "icon_id": "24841489",
+      "name": "mail-open-filled",
+      "font_class": "mail-open-filled",
+      "unicode": "e63a",
+      "unicode_decimal": 58938
+    },
+    {
+      "icon_id": "24841491",
+      "name": "hand-thumbsdown-filled",
+      "font_class": "hand-down-filled",
+      "unicode": "e63c",
+      "unicode_decimal": 58940
+    },
+    {
+      "icon_id": "24841492",
+      "name": "hand-thumbsdown",
+      "font_class": "hand-down",
+      "unicode": "e63d",
+      "unicode_decimal": 58941
+    },
+    {
+      "icon_id": "24841493",
+      "name": "hand-thumbsup-filled",
+      "font_class": "hand-up-filled",
+      "unicode": "e63e",
+      "unicode_decimal": 58942
+    },
+    {
+      "icon_id": "24841494",
+      "name": "hand-thumbsup",
+      "font_class": "hand-up",
+      "unicode": "e63f",
+      "unicode_decimal": 58943
+    },
+    {
+      "icon_id": "24841496",
+      "name": "heart-filled",
+      "font_class": "heart-filled",
+      "unicode": "e641",
+      "unicode_decimal": 58945
+    },
+    {
+      "icon_id": "24841498",
+      "name": "mail-open",
+      "font_class": "mail-open",
+      "unicode": "e643",
+      "unicode_decimal": 58947
+    },
+    {
+      "icon_id": "24841488",
+      "name": "heart",
+      "font_class": "heart",
+      "unicode": "e639",
+      "unicode_decimal": 58937
+    },
+    {
+      "icon_id": "24839963",
+      "name": "loop",
+      "font_class": "loop",
+      "unicode": "e633",
+      "unicode_decimal": 58931
+    },
+    {
+      "icon_id": "24839866",
+      "name": "pulldown",
+      "font_class": "pulldown",
+      "unicode": "e632",
+      "unicode_decimal": 58930
+    },
+    {
+      "icon_id": "24813798",
+      "name": "scan",
+      "font_class": "scan",
+      "unicode": "e62a",
+      "unicode_decimal": 58922
+    },
+    {
+      "icon_id": "24813786",
+      "name": "bars",
+      "font_class": "bars",
+      "unicode": "e627",
+      "unicode_decimal": 58919
+    },
+    {
+      "icon_id": "24813788",
+      "name": "cart-filled",
+      "font_class": "cart-filled",
+      "unicode": "e629",
+      "unicode_decimal": 58921
+    },
+    {
+      "icon_id": "24813790",
+      "name": "checkbox",
+      "font_class": "checkbox",
+      "unicode": "e62b",
+      "unicode_decimal": 58923
+    },
+    {
+      "icon_id": "24813791",
+      "name": "checkbox-filled",
+      "font_class": "checkbox-filled",
+      "unicode": "e62c",
+      "unicode_decimal": 58924
+    },
+    {
+      "icon_id": "24813794",
+      "name": "shop",
+      "font_class": "shop",
+      "unicode": "e62f",
+      "unicode_decimal": 58927
+    },
+    {
+      "icon_id": "24813795",
+      "name": "headphones",
+      "font_class": "headphones",
+      "unicode": "e630",
+      "unicode_decimal": 58928
+    },
+    {
+      "icon_id": "24813796",
+      "name": "cart",
+      "font_class": "cart",
+      "unicode": "e631",
+      "unicode_decimal": 58929
+    }
+  ]
+}

+ 96 - 0
uni_modules/uni-icons/components/uni-icons/uni-icons.vue

@@ -0,0 +1,96 @@
+<template>
+	<!-- #ifdef APP-NVUE -->
+	<text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" @click="_onClick">{{unicode}}</text>
+	<!-- #endif -->
+	<!-- #ifndef APP-NVUE -->
+	<text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick"></text>
+	<!-- #endif -->
+</template>
+
+<script>
+	import icons from './icons.js';
+	const getVal = (val) => {
+		const reg = /^[0-9]*$/g
+		return (typeof val === 'number' || reg.test(val) )? val + 'px' : val;
+	} 
+	// #ifdef APP-NVUE
+	var domModule = weex.requireModule('dom');
+	import iconUrl from './uniicons.ttf'
+	domModule.addRule('fontFace', {
+		'fontFamily': "uniicons",
+		'src': "url('"+iconUrl+"')"
+	});
+	// #endif
+
+	/**
+	 * Icons 图标
+	 * @description 用于展示 icons 图标
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=28
+	 * @property {Number} size 图标大小
+	 * @property {String} type 图标图案,参考示例
+	 * @property {String} color 图标颜色
+	 * @property {String} customPrefix 自定义图标
+	 * @event {Function} click 点击 Icon 触发事件
+	 */
+	export default {
+		name: 'UniIcons',
+		emits:['click'],
+		props: {
+			type: {
+				type: String,
+				default: ''
+			},
+			color: {
+				type: String,
+				default: '#333333'
+			},
+			size: {
+				type: [Number, String],
+				default: 16
+			},
+			customPrefix:{
+				type: String,
+				default: ''
+			}
+		},
+		data() {
+			return {
+				icons: icons.glyphs
+			}
+		},
+		computed:{
+			unicode(){
+				let code = this.icons.find(v=>v.font_class === this.type)
+				if(code){
+					return unescape(`%u${code.unicode}`)
+				}
+				return ''
+			},
+			iconSize(){
+				return getVal(this.size)
+			}
+		},
+		methods: {
+			_onClick() {
+				this.$emit('click')
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	/* #ifndef APP-NVUE */
+	@import './uniicons.css';
+	@font-face {
+		font-family: uniicons;
+		src: url('./uniicons.ttf') format('truetype');
+	}
+
+	/* #endif */
+	.uni-icons {
+		font-family: uniicons;
+		text-decoration: none;
+		text-align: center;
+	}
+
+</style>

+ 663 - 0
uni_modules/uni-icons/components/uni-icons/uniicons.css

@@ -0,0 +1,663 @@
+.uniui-color:before {
+  content: "\e6cf";
+}
+
+.uniui-wallet:before {
+  content: "\e6b1";
+}
+
+.uniui-settings-filled:before {
+  content: "\e6ce";
+}
+
+.uniui-auth-filled:before {
+  content: "\e6cc";
+}
+
+.uniui-shop-filled:before {
+  content: "\e6cd";
+}
+
+.uniui-staff-filled:before {
+  content: "\e6cb";
+}
+
+.uniui-vip-filled:before {
+  content: "\e6c6";
+}
+
+.uniui-plus-filled:before {
+  content: "\e6c7";
+}
+
+.uniui-folder-add-filled:before {
+  content: "\e6c8";
+}
+
+.uniui-color-filled:before {
+  content: "\e6c9";
+}
+
+.uniui-tune-filled:before {
+  content: "\e6ca";
+}
+
+.uniui-calendar-filled:before {
+  content: "\e6c0";
+}
+
+.uniui-notification-filled:before {
+  content: "\e6c1";
+}
+
+.uniui-wallet-filled:before {
+  content: "\e6c2";
+}
+
+.uniui-medal-filled:before {
+  content: "\e6c3";
+}
+
+.uniui-gift-filled:before {
+  content: "\e6c4";
+}
+
+.uniui-fire-filled:before {
+  content: "\e6c5";
+}
+
+.uniui-refreshempty:before {
+  content: "\e6bf";
+}
+
+.uniui-location-filled:before {
+  content: "\e6af";
+}
+
+.uniui-person-filled:before {
+  content: "\e69d";
+}
+
+.uniui-personadd-filled:before {
+  content: "\e698";
+}
+
+.uniui-back:before {
+  content: "\e6b9";
+}
+
+.uniui-forward:before {
+  content: "\e6ba";
+}
+
+.uniui-arrow-right:before {
+  content: "\e6bb";
+}
+
+.uniui-arrowthinright:before {
+  content: "\e6bb";
+}
+
+.uniui-arrow-left:before {
+  content: "\e6bc";
+}
+
+.uniui-arrowthinleft:before {
+  content: "\e6bc";
+}
+
+.uniui-arrow-up:before {
+  content: "\e6bd";
+}
+
+.uniui-arrowthinup:before {
+  content: "\e6bd";
+}
+
+.uniui-arrow-down:before {
+  content: "\e6be";
+}
+
+.uniui-arrowthindown:before {
+  content: "\e6be";
+}
+
+.uniui-bottom:before {
+  content: "\e6b8";
+}
+
+.uniui-arrowdown:before {
+  content: "\e6b8";
+}
+
+.uniui-right:before {
+  content: "\e6b5";
+}
+
+.uniui-arrowright:before {
+  content: "\e6b5";
+}
+
+.uniui-top:before {
+  content: "\e6b6";
+}
+
+.uniui-arrowup:before {
+  content: "\e6b6";
+}
+
+.uniui-left:before {
+  content: "\e6b7";
+}
+
+.uniui-arrowleft:before {
+  content: "\e6b7";
+}
+
+.uniui-eye:before {
+  content: "\e651";
+}
+
+.uniui-eye-filled:before {
+  content: "\e66a";
+}
+
+.uniui-eye-slash:before {
+  content: "\e6b3";
+}
+
+.uniui-eye-slash-filled:before {
+  content: "\e6b4";
+}
+
+.uniui-info-filled:before {
+  content: "\e649";
+}
+
+.uniui-reload:before {
+  content: "\e6b2";
+}
+
+.uniui-micoff-filled:before {
+  content: "\e6b0";
+}
+
+.uniui-map-pin-ellipse:before {
+  content: "\e6ac";
+}
+
+.uniui-map-pin:before {
+  content: "\e6ad";
+}
+
+.uniui-location:before {
+  content: "\e6ae";
+}
+
+.uniui-starhalf:before {
+  content: "\e683";
+}
+
+.uniui-star:before {
+  content: "\e688";
+}
+
+.uniui-star-filled:before {
+  content: "\e68f";
+}
+
+.uniui-calendar:before {
+  content: "\e6a0";
+}
+
+.uniui-fire:before {
+  content: "\e6a1";
+}
+
+.uniui-medal:before {
+  content: "\e6a2";
+}
+
+.uniui-font:before {
+  content: "\e6a3";
+}
+
+.uniui-gift:before {
+  content: "\e6a4";
+}
+
+.uniui-link:before {
+  content: "\e6a5";
+}
+
+.uniui-notification:before {
+  content: "\e6a6";
+}
+
+.uniui-staff:before {
+  content: "\e6a7";
+}
+
+.uniui-vip:before {
+  content: "\e6a8";
+}
+
+.uniui-folder-add:before {
+  content: "\e6a9";
+}
+
+.uniui-tune:before {
+  content: "\e6aa";
+}
+
+.uniui-auth:before {
+  content: "\e6ab";
+}
+
+.uniui-person:before {
+  content: "\e699";
+}
+
+.uniui-email-filled:before {
+  content: "\e69a";
+}
+
+.uniui-phone-filled:before {
+  content: "\e69b";
+}
+
+.uniui-phone:before {
+  content: "\e69c";
+}
+
+.uniui-email:before {
+  content: "\e69e";
+}
+
+.uniui-personadd:before {
+  content: "\e69f";
+}
+
+.uniui-chatboxes-filled:before {
+  content: "\e692";
+}
+
+.uniui-contact:before {
+  content: "\e693";
+}
+
+.uniui-chatbubble-filled:before {
+  content: "\e694";
+}
+
+.uniui-contact-filled:before {
+  content: "\e695";
+}
+
+.uniui-chatboxes:before {
+  content: "\e696";
+}
+
+.uniui-chatbubble:before {
+  content: "\e697";
+}
+
+.uniui-upload-filled:before {
+  content: "\e68e";
+}
+
+.uniui-upload:before {
+  content: "\e690";
+}
+
+.uniui-weixin:before {
+  content: "\e691";
+}
+
+.uniui-compose:before {
+  content: "\e67f";
+}
+
+.uniui-qq:before {
+  content: "\e680";
+}
+
+.uniui-download-filled:before {
+  content: "\e681";
+}
+
+.uniui-pyq:before {
+  content: "\e682";
+}
+
+.uniui-sound:before {
+  content: "\e684";
+}
+
+.uniui-trash-filled:before {
+  content: "\e685";
+}
+
+.uniui-sound-filled:before {
+  content: "\e686";
+}
+
+.uniui-trash:before {
+  content: "\e687";
+}
+
+.uniui-videocam-filled:before {
+  content: "\e689";
+}
+
+.uniui-spinner-cycle:before {
+  content: "\e68a";
+}
+
+.uniui-weibo:before {
+  content: "\e68b";
+}
+
+.uniui-videocam:before {
+  content: "\e68c";
+}
+
+.uniui-download:before {
+  content: "\e68d";
+}
+
+.uniui-help:before {
+  content: "\e679";
+}
+
+.uniui-navigate-filled:before {
+  content: "\e67a";
+}
+
+.uniui-plusempty:before {
+  content: "\e67b";
+}
+
+.uniui-smallcircle:before {
+  content: "\e67c";
+}
+
+.uniui-minus-filled:before {
+  content: "\e67d";
+}
+
+.uniui-micoff:before {
+  content: "\e67e";
+}
+
+.uniui-closeempty:before {
+  content: "\e66c";
+}
+
+.uniui-clear:before {
+  content: "\e66d";
+}
+
+.uniui-navigate:before {
+  content: "\e66e";
+}
+
+.uniui-minus:before {
+  content: "\e66f";
+}
+
+.uniui-image:before {
+  content: "\e670";
+}
+
+.uniui-mic:before {
+  content: "\e671";
+}
+
+.uniui-paperplane:before {
+  content: "\e672";
+}
+
+.uniui-close:before {
+  content: "\e673";
+}
+
+.uniui-help-filled:before {
+  content: "\e674";
+}
+
+.uniui-paperplane-filled:before {
+  content: "\e675";
+}
+
+.uniui-plus:before {
+  content: "\e676";
+}
+
+.uniui-mic-filled:before {
+  content: "\e677";
+}
+
+.uniui-image-filled:before {
+  content: "\e678";
+}
+
+.uniui-locked-filled:before {
+  content: "\e668";
+}
+
+.uniui-info:before {
+  content: "\e669";
+}
+
+.uniui-locked:before {
+  content: "\e66b";
+}
+
+.uniui-camera-filled:before {
+  content: "\e658";
+}
+
+.uniui-chat-filled:before {
+  content: "\e659";
+}
+
+.uniui-camera:before {
+  content: "\e65a";
+}
+
+.uniui-circle:before {
+  content: "\e65b";
+}
+
+.uniui-checkmarkempty:before {
+  content: "\e65c";
+}
+
+.uniui-chat:before {
+  content: "\e65d";
+}
+
+.uniui-circle-filled:before {
+  content: "\e65e";
+}
+
+.uniui-flag:before {
+  content: "\e65f";
+}
+
+.uniui-flag-filled:before {
+  content: "\e660";
+}
+
+.uniui-gear-filled:before {
+  content: "\e661";
+}
+
+.uniui-home:before {
+  content: "\e662";
+}
+
+.uniui-home-filled:before {
+  content: "\e663";
+}
+
+.uniui-gear:before {
+  content: "\e664";
+}
+
+.uniui-smallcircle-filled:before {
+  content: "\e665";
+}
+
+.uniui-map-filled:before {
+  content: "\e666";
+}
+
+.uniui-map:before {
+  content: "\e667";
+}
+
+.uniui-refresh-filled:before {
+  content: "\e656";
+}
+
+.uniui-refresh:before {
+  content: "\e657";
+}
+
+.uniui-cloud-upload:before {
+  content: "\e645";
+}
+
+.uniui-cloud-download-filled:before {
+  content: "\e646";
+}
+
+.uniui-cloud-download:before {
+  content: "\e647";
+}
+
+.uniui-cloud-upload-filled:before {
+  content: "\e648";
+}
+
+.uniui-redo:before {
+  content: "\e64a";
+}
+
+.uniui-images-filled:before {
+  content: "\e64b";
+}
+
+.uniui-undo-filled:before {
+  content: "\e64c";
+}
+
+.uniui-more:before {
+  content: "\e64d";
+}
+
+.uniui-more-filled:before {
+  content: "\e64e";
+}
+
+.uniui-undo:before {
+  content: "\e64f";
+}
+
+.uniui-images:before {
+  content: "\e650";
+}
+
+.uniui-paperclip:before {
+  content: "\e652";
+}
+
+.uniui-settings:before {
+  content: "\e653";
+}
+
+.uniui-search:before {
+  content: "\e654";
+}
+
+.uniui-redo-filled:before {
+  content: "\e655";
+}
+
+.uniui-list:before {
+  content: "\e644";
+}
+
+.uniui-mail-open-filled:before {
+  content: "\e63a";
+}
+
+.uniui-hand-down-filled:before {
+  content: "\e63c";
+}
+
+.uniui-hand-down:before {
+  content: "\e63d";
+}
+
+.uniui-hand-up-filled:before {
+  content: "\e63e";
+}
+
+.uniui-hand-up:before {
+  content: "\e63f";
+}
+
+.uniui-heart-filled:before {
+  content: "\e641";
+}
+
+.uniui-mail-open:before {
+  content: "\e643";
+}
+
+.uniui-heart:before {
+  content: "\e639";
+}
+
+.uniui-loop:before {
+  content: "\e633";
+}
+
+.uniui-pulldown:before {
+  content: "\e632";
+}
+
+.uniui-scan:before {
+  content: "\e62a";
+}
+
+.uniui-bars:before {
+  content: "\e627";
+}
+
+.uniui-cart-filled:before {
+  content: "\e629";
+}
+
+.uniui-checkbox:before {
+  content: "\e62b";
+}
+
+.uniui-checkbox-filled:before {
+  content: "\e62c";
+}
+
+.uniui-shop:before {
+  content: "\e62f";
+}
+
+.uniui-headphones:before {
+  content: "\e630";
+}
+
+.uniui-cart:before {
+  content: "\e631";
+}

BIN=BIN
uni_modules/uni-icons/components/uni-icons/uniicons.ttf


+ 86 - 0
uni_modules/uni-icons/package.json

@@ -0,0 +1,86 @@
+{
+  "id": "uni-icons",
+  "displayName": "uni-icons 图标",
+  "version": "1.3.5",
+  "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
+  "keywords": [
+    "uni-ui",
+    "uniui",
+    "icon",
+    "图标"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": "^3.2.14"
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "category": [
+      "前端组件",
+      "通用组件"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+  },
+  "uni_modules": {
+    "dependencies": ["uni-scss"],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "y"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "y",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "y",
+          "字节跳动": "y",
+          "QQ": "y"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

+ 8 - 0
uni_modules/uni-icons/readme.md

@@ -0,0 +1,8 @@
+## Icons 图标
+> **组件名:uni-icons**
+> 代码块: `uIcons`
+
+用于展示 icons 图标 。
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 

+ 60 - 0
uni_modules/uni-popup/changelog.md

@@ -0,0 +1,60 @@
+## 1.7.9(2022-04-02)
+- 修复 弹出层内部无法滚动的bug
+## 1.7.8(2022-03-28)
+- 修复 小程序中高度错误的bug
+## 1.7.7(2022-03-17)
+- 修复 快速调用open出现问题的Bug
+## 1.7.6(2022-02-14)
+- 修复 safeArea 属性不能设置为false的bug
+## 1.7.5(2022-01-19)
+- 修复 isMaskClick 失效的bug
+## 1.7.4(2022-01-19)
+- 新增 cancelText \ confirmText 属性 ,可自定义文本
+- 新增 maskBackgroundColor 属性 ,可以修改蒙版颜色
+- 优化 maskClick属性 更新为 isMaskClick ,解决微信小程序警告的问题
+## 1.7.3(2022-01-13)
+- 修复 设置 safeArea 属性不生效的bug
+## 1.7.2(2021-11-26)
+- 优化 组件示例
+## 1.7.1(2021-11-26)
+- 修复 vuedoc 文字错误
+## 1.7.0(2021-11-19)
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-popup](https://uniapp.dcloud.io/component/uniui/uni-popup)
+## 1.6.2(2021-08-24)
+- 新增 支持国际化
+## 1.6.1(2021-07-30)
+- 优化 vue3下事件警告的问题
+## 1.6.0(2021-07-13)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.5.0(2021-06-23)
+- 新增 mask-click 遮罩层点击事件
+## 1.4.5(2021-06-22)
+- 修复 nvue 平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug
+## 1.4.4(2021-06-18)
+- 修复 H5平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug
+## 1.4.3(2021-06-08)
+- 修复 错误的 watch 字段
+- 修复 safeArea 属性不生效的问题
+- 修复 点击内容,再点击遮罩无法关闭的Bug
+## 1.4.2(2021-05-12)
+- 新增 组件示例地址
+## 1.4.1(2021-04-29)
+- 修复 组件内放置 input 、textarea 组件,无法聚焦的问题
+## 1.4.0 (2021-04-29)
+- 新增 type 属性的 left\right 值,支持左右弹出
+- 新增 open(String:type) 方法参数 ,可以省略 type 属性 ,直接传入类型打开指定弹窗
+- 新增 backgroundColor 属性,可定义主窗口背景色,默认不显示背景色
+- 新增 safeArea 属性,是否适配底部安全区
+- 修复 App\h5\微信小程序底部安全区占位不对的Bug
+- 修复 App 端弹出等待的Bug
+- 优化 提升低配设备性能,优化动画卡顿问题
+- 优化 更简单的组件自定义方式
+## 1.2.9(2021-02-05)
+- 优化 组件引用关系,通过uni_modules引用组件
+## 1.2.8(2021-02-05)
+- 调整为uni_modules目录规范
+## 1.2.7(2021-02-05)
+- 调整为uni_modules目录规范
+- 新增 支持 PC 端
+- 新增 uni-popup-message 、uni-popup-dialog扩展组件支持 PC 端

+ 45 - 0
uni_modules/uni-popup/components/uni-popup-dialog/keypress.js

@@ -0,0 +1,45 @@
+// #ifdef H5
+export default {
+  name: 'Keypress',
+  props: {
+    disable: {
+      type: Boolean,
+      default: false
+    }
+  },
+  mounted () {
+    const keyNames = {
+      esc: ['Esc', 'Escape'],
+      tab: 'Tab',
+      enter: 'Enter',
+      space: [' ', 'Spacebar'],
+      up: ['Up', 'ArrowUp'],
+      left: ['Left', 'ArrowLeft'],
+      right: ['Right', 'ArrowRight'],
+      down: ['Down', 'ArrowDown'],
+      delete: ['Backspace', 'Delete', 'Del']
+    }
+    const listener = ($event) => {
+      if (this.disable) {
+        return
+      }
+      const keyName = Object.keys(keyNames).find(key => {
+        const keyName = $event.key
+        const value = keyNames[key]
+        return value === keyName || (Array.isArray(value) && value.includes(keyName))
+      })
+      if (keyName) {
+        // 避免和其他按键事件冲突
+        setTimeout(() => {
+          this.$emit(keyName, {})
+        }, 0)
+      }
+    }
+    document.addEventListener('keyup', listener)
+    this.$once('hook:beforeDestroy', () => {
+      document.removeEventListener('keyup', listener)
+    })
+  },
+	render: () => {}
+}
+// #endif

+ 271 - 0
uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue

@@ -0,0 +1,271 @@
+<template>
+	<view class="uni-popup-dialog">
+		<view class="uni-dialog-title">
+			<text class="uni-dialog-title-text" :class="['uni-popup__'+dialogType]">{{titleText}}</text>
+		</view>
+		<view v-if="mode === 'base'" class="uni-dialog-content">
+			<slot>
+				<text class="uni-dialog-content-text">{{content}}</text>
+			</slot>
+		</view>
+		<view v-else class="uni-dialog-content">
+			<slot>
+				<input class="uni-dialog-input" v-model="val" type="text" :placeholder="placeholderText" :focus="focus" >
+			</slot>
+		</view>
+		<view class="uni-dialog-button-group">
+			<view class="uni-dialog-button" @click="closeDialog">
+				<text class="uni-dialog-button-text">{{closeText}}</text>
+			</view>
+			<view class="uni-dialog-button uni-border-left" @click="onOk">
+				<text class="uni-dialog-button-text uni-button-color">{{okText}}</text>
+			</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	import popup from '../uni-popup/popup.js'
+	import {
+	initVueI18n
+	} from '@dcloudio/uni-i18n'
+	import messages from '../uni-popup/i18n/index.js'
+	const {	t } = initVueI18n(messages)
+	/**
+	 * PopUp 弹出层-对话框样式
+	 * @description 弹出层-对话框样式
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+	 * @property {String} value input 模式下的默认值
+	 * @property {String} placeholder input 模式下输入提示
+	 * @property {String} type = [success|warning|info|error] 主题样式
+	 *  @value success 成功
+	 * 	@value warning 提示
+	 * 	@value info 消息
+	 * 	@value error 错误
+	 * @property {String} mode = [base|input] 模式、
+	 * 	@value base 基础对话框
+	 * 	@value input 可输入对话框
+	 * @property {String} content 对话框内容
+	 * @property {Boolean} beforeClose 是否拦截取消事件
+	 * @event {Function} confirm 点击确认按钮触发
+	 * @event {Function} close 点击取消按钮触发
+	 */
+
+	export default {
+		name: "uniPopupDialog",
+		mixins: [popup],
+		emits:['confirm','close'],
+		props: {
+			value: {
+				type: [String, Number],
+				default: ''
+			},
+			placeholder: {
+				type: [String, Number],
+				default: ''
+			},
+			type: {
+				type: String,
+				default: 'error'
+			},
+			mode: {
+				type: String,
+				default: 'base'
+			},
+			title: {
+				type: String,
+				default: ''
+			},
+			content: {
+				type: String,
+				default: ''
+			},
+			beforeClose: {
+				type: Boolean,
+				default: false
+			},
+			cancelText:{
+				type: String,
+				default: ''
+			},
+			confirmText:{
+				type: String,
+				default: ''
+			}
+		},
+		data() {
+			return {
+				dialogType: 'error',
+				focus: false,
+				val: ""
+			}
+		},
+		computed: {
+			okText() {
+				return this.confirmText || t("uni-popup.ok")
+			},
+			closeText() {
+				return this.cancelText || t("uni-popup.cancel")
+			},
+			placeholderText() {
+				return this.placeholder || t("uni-popup.placeholder")
+			},
+			titleText() {
+				return this.title || t("uni-popup.title")
+			}
+		},
+		watch: {
+			type(val) {
+				this.dialogType = val
+			},
+			mode(val) {
+				if (val === 'input') {
+					this.dialogType = 'info'
+				}
+			},
+			value(val) {
+				this.val = val
+			}
+		},
+		created() {
+			// 对话框遮罩不可点击
+			this.popup.disableMask()
+			// this.popup.closeMask()
+			if (this.mode === 'input') {
+				this.dialogType = 'info'
+				this.val = this.value
+			} else {
+				this.dialogType = this.type
+			}
+		},
+		mounted() {
+			this.focus = true
+		},
+		methods: {
+			/**
+			 * 点击确认按钮
+			 */
+			onOk() {
+				if (this.mode === 'input'){
+					this.$emit('confirm', this.val)
+				}else{
+					this.$emit('confirm')
+				}
+				if(this.beforeClose) return
+				this.popup.close()
+			},
+			/**
+			 * 点击取消按钮
+			 */
+			closeDialog() {
+				this.$emit('close')
+				if(this.beforeClose) return
+				this.popup.close()
+			},
+			close(){
+				this.popup.close()
+			}
+		}
+	}
+</script>
+
+<style lang="scss" >
+	.uni-popup-dialog {
+		width: 300px;
+		border-radius: 11px;
+		background-color: #fff;
+	}
+
+	.uni-dialog-title {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+		padding-top: 25px;
+	}
+
+	.uni-dialog-title-text {
+		font-size: 16px;
+		font-weight: 500;
+	}
+
+	.uni-dialog-content {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		padding: 20px;
+	}
+
+	.uni-dialog-content-text {
+		font-size: 14px;
+		color: #6C6C6C;
+	}
+
+	.uni-dialog-button-group {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		border-top-color: #f5f5f5;
+		border-top-style: solid;
+		border-top-width: 1px;
+	}
+
+	.uni-dialog-button {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+
+		flex: 1;
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		height: 45px;
+	}
+
+	.uni-border-left {
+		border-left-color: #f0f0f0;
+		border-left-style: solid;
+		border-left-width: 1px;
+	}
+
+	.uni-dialog-button-text {
+		font-size: 16px;
+		color: #333;
+	}
+
+	.uni-button-color {
+		color: #007aff;
+	}
+
+	.uni-dialog-input {
+		flex: 1;
+		font-size: 14px;
+		border: 1px #eee solid;
+		height: 40px;
+		padding: 0 10px;
+		border-radius: 5px;
+		color: #555;
+	}
+
+	.uni-popup__success {
+		color: #4cd964;
+	}
+
+	.uni-popup__warn {
+		color: #f0ad4e;
+	}
+
+	.uni-popup__error {
+		color: #dd524d;
+	}
+
+	.uni-popup__info {
+		color: #909399;
+	}
+</style>

+ 143 - 0
uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue

@@ -0,0 +1,143 @@
+<template>
+	<view class="uni-popup-message">
+		<view class="uni-popup-message__box fixforpc-width" :class="'uni-popup__'+type">
+			<slot>
+				<text class="uni-popup-message-text" :class="'uni-popup__'+type+'-text'">{{message}}</text>
+			</slot>
+		</view>
+	</view>
+</template>
+
+<script>
+	import popup from '../uni-popup/popup.js'
+	/**
+	 * PopUp 弹出层-消息提示
+	 * @description 弹出层-消息提示
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+	 * @property {String} type = [success|warning|info|error] 主题样式
+	 *  @value success 成功
+	 * 	@value warning 提示
+	 * 	@value info 消息
+	 * 	@value error 错误
+	 * @property {String} message 消息提示文字
+	 * @property {String} duration 显示时间,设置为 0 则不会自动关闭
+	 */
+
+	export default {
+		name: 'uniPopupMessage',
+		mixins:[popup],
+		props: {
+			/**
+			 * 主题 success/warning/info/error	  默认 success
+			 */
+			type: {
+				type: String,
+				default: 'success'
+			},
+			/**
+			 * 消息文字
+			 */
+			message: {
+				type: String,
+				default: ''
+			},
+			/**
+			 * 显示时间,设置为 0 则不会自动关闭
+			 */
+			duration: {
+				type: Number,
+				default: 3000
+			},
+			maskShow:{
+				type:Boolean,
+				default:false
+			}
+		},
+		data() {
+			return {}
+		},
+		created() {
+			this.popup.maskShow = this.maskShow
+			this.popup.messageChild = this
+		},
+		methods: {
+			timerClose(){
+				if(this.duration === 0) return
+				clearTimeout(this.timer) 
+				this.timer = setTimeout(()=>{
+					this.popup.close()
+				},this.duration)
+			}
+		}
+	}
+</script>
+<style lang="scss" >
+	.uni-popup-message {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+	}
+
+	.uni-popup-message__box {
+		background-color: #e1f3d8;
+		padding: 10px 15px;
+		border-color: #eee;
+		border-style: solid;
+		border-width: 1px;
+		flex: 1;
+	}
+
+	@media screen and (min-width: 500px) {
+		.fixforpc-width {
+			margin-top: 20px;
+			border-radius: 4px;
+			flex: none;
+			min-width: 380px;
+			/* #ifndef APP-NVUE */
+			max-width: 50%;
+			/* #endif */
+			/* #ifdef APP-NVUE */
+			max-width: 500px;
+			/* #endif */
+		}
+	}
+
+	.uni-popup-message-text {
+		font-size: 14px;
+		padding: 0;
+	}
+
+	.uni-popup__success {
+		background-color: #e1f3d8;
+	}
+
+	.uni-popup__success-text {
+		color: #67C23A;
+	}
+
+	.uni-popup__warn {
+		background-color: #faecd8;
+	}
+
+	.uni-popup__warn-text {
+		color: #E6A23C;
+	}
+
+	.uni-popup__error {
+		background-color: #fde2e2;
+	}
+
+	.uni-popup__error-text {
+		color: #F56C6C;
+	}
+
+	.uni-popup__info {
+		background-color: #F2F6FC;
+	}
+
+	.uni-popup__info-text {
+		color: #909399;
+	}
+</style>

+ 187 - 0
uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue

@@ -0,0 +1,187 @@
+<template>
+	<view class="uni-popup-share">
+		<view class="uni-share-title"><text class="uni-share-title-text">{{shareTitleText}}</text></view>
+		<view class="uni-share-content">
+			<view class="uni-share-content-box">
+				<view class="uni-share-content-item" v-for="(item,index) in bottomData" :key="index" @click.stop="select(item,index)">
+					<image class="uni-share-image" :src="item.icon" mode="aspectFill"></image>
+					<text class="uni-share-text">{{item.text}}</text>
+				</view>
+
+			</view>
+		</view>
+		<view class="uni-share-button-box">
+			<button class="uni-share-button" @click="close">{{cancelText}}</button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import popup from '../uni-popup/popup.js'
+	import {
+	initVueI18n
+	} from '@dcloudio/uni-i18n'
+	import messages from '../uni-popup/i18n/index.js'
+	const {	t	} = initVueI18n(messages)
+	export default {
+		name: 'UniPopupShare',
+		mixins:[popup],
+		emits:['select'],
+		props: {
+			title: {
+				type: String,
+				default: ''
+			},
+			beforeClose: {
+				type: Boolean,
+				default: false
+			}
+		},
+		data() {
+			return {
+				bottomData: [{
+						text: '微信',
+						icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/c2b17470-50be-11eb-b680-7980c8a877b8.png',
+						name: 'wx'
+					},
+					{
+						text: '支付宝',
+						icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/d684ae40-50be-11eb-8ff1-d5dcf8779628.png',
+						name: 'wx'
+					},
+					{
+						text: 'QQ',
+						icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/e7a79520-50be-11eb-b997-9918a5dda011.png',
+						name: 'qq'
+					},
+					{
+						text: '新浪',
+						icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/0dacdbe0-50bf-11eb-8ff1-d5dcf8779628.png',
+						name: 'sina'
+					},
+					// {
+					// 	text: '百度',
+					// 	icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/1ec6e920-50bf-11eb-8a36-ebb87efcf8c0.png',
+					// 	name: 'copy'
+					// },
+					// {
+					// 	text: '其他',
+					// 	icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/2e0fdfe0-50bf-11eb-b997-9918a5dda011.png',
+					// 	name: 'more'
+					// }
+				]
+			}
+		},
+		created() {},
+		computed: {
+			cancelText() {
+				return t("uni-popup.cancel")
+			},
+		shareTitleText() {
+				return this.title || t("uni-popup.shareTitle")
+			}
+		},
+		methods: {
+			/**
+			 * 选择内容
+			 */
+			select(item, index) {
+				this.$emit('select', {
+					item,
+					index
+				})
+				this.close()
+
+			},
+			/**
+			 * 关闭窗口
+			 */
+			close() {
+				if(this.beforeClose) return
+				this.popup.close()
+			}
+		}
+	}
+</script>
+<style lang="scss" >
+	.uni-popup-share {
+		background-color: #fff;
+		border-top-left-radius: 11px;
+		border-top-right-radius: 11px;
+	}
+	.uni-share-title {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		align-items: center;
+		justify-content: center;
+		height: 40px;
+	}
+	.uni-share-title-text {
+		font-size: 14px;
+		color: #666;
+	}
+	.uni-share-content {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+		padding-top: 10px;
+	}
+
+	.uni-share-content-box {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		flex-wrap: wrap;
+		width: 360px;
+	}
+
+	.uni-share-content-item {
+		width: 90px;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		justify-content: center;
+		padding: 10px 0;
+		align-items: center;
+	}
+
+	.uni-share-content-item:active {
+		background-color: #f5f5f5;
+	}
+
+	.uni-share-image {
+		width: 30px;
+		height: 30px;
+	}
+
+	.uni-share-text {
+		margin-top: 10px;
+		font-size: 14px;
+		color: #3B4144;
+	}
+
+	.uni-share-button-box {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		padding: 10px 15px;
+	}
+
+	.uni-share-button {
+		flex: 1;
+		border-radius: 50px;
+		color: #666;
+		font-size: 16px;
+	}
+
+	.uni-share-button::after {
+		border-radius: 50px;
+	}
+</style>

+ 7 - 0
uni_modules/uni-popup/components/uni-popup/i18n/en.json

@@ -0,0 +1,7 @@
+{
+	"uni-popup.cancel": "cancel",
+	"uni-popup.ok": "ok",
+	"uni-popup.placeholder": "pleace enter",
+	"uni-popup.title": "Hint",
+	"uni-popup.shareTitle": "Share to"
+}

+ 8 - 0
uni_modules/uni-popup/components/uni-popup/i18n/index.js

@@ -0,0 +1,8 @@
+import en from './en.json'
+import zhHans from './zh-Hans.json'
+import zhHant from './zh-Hant.json'
+export default {
+	en,
+	'zh-Hans': zhHans,
+	'zh-Hant': zhHant
+}

+ 7 - 0
uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json

@@ -0,0 +1,7 @@
+{
+	"uni-popup.cancel": "取消",
+	"uni-popup.ok": "确定",
+	"uni-popup.placeholder": "请输入",
+		"uni-popup.title": "提示",
+		"uni-popup.shareTitle": "分享到"
+}

+ 7 - 0
uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json

@@ -0,0 +1,7 @@
+{
+	"uni-popup.cancel": "取消",
+	"uni-popup.ok": "確定",
+	"uni-popup.placeholder": "請輸入",
+	"uni-popup.title": "提示",
+	"uni-popup.shareTitle": "分享到"
+}

+ 45 - 0
uni_modules/uni-popup/components/uni-popup/keypress.js

@@ -0,0 +1,45 @@
+// #ifdef H5
+export default {
+  name: 'Keypress',
+  props: {
+    disable: {
+      type: Boolean,
+      default: false
+    }
+  },
+  mounted () {
+    const keyNames = {
+      esc: ['Esc', 'Escape'],
+      tab: 'Tab',
+      enter: 'Enter',
+      space: [' ', 'Spacebar'],
+      up: ['Up', 'ArrowUp'],
+      left: ['Left', 'ArrowLeft'],
+      right: ['Right', 'ArrowRight'],
+      down: ['Down', 'ArrowDown'],
+      delete: ['Backspace', 'Delete', 'Del']
+    }
+    const listener = ($event) => {
+      if (this.disable) {
+        return
+      }
+      const keyName = Object.keys(keyNames).find(key => {
+        const keyName = $event.key
+        const value = keyNames[key]
+        return value === keyName || (Array.isArray(value) && value.includes(keyName))
+      })
+      if (keyName) {
+        // 避免和其他按键事件冲突
+        setTimeout(() => {
+          this.$emit(keyName, {})
+        }, 0)
+      }
+    }
+    document.addEventListener('keyup', listener)
+    // this.$once('hook:beforeDestroy', () => {
+    //   document.removeEventListener('keyup', listener)
+    // })
+  },
+	render: () => {}
+}
+// #endif

+ 26 - 0
uni_modules/uni-popup/components/uni-popup/popup.js

@@ -0,0 +1,26 @@
+
+export default {
+	data() {
+		return {
+			
+		}
+	},
+	created(){
+		this.popup = this.getParent()
+	},
+	methods:{
+		/**
+		 * 获取父元素实例
+		 */
+		getParent(name = 'uniPopup') {
+			let parent = this.$parent;
+			let parentName = parent.$options.name;
+			while (parentName !== name) {
+				parent = parent.$parent;
+				if (!parent) return false
+				parentName = parent.$options.name;
+			}
+			return parent;
+		},
+	}
+}

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio