function extractTableData() { const table = document.querySelector('table'); const rows = table.querySelectorAll('tbody tr'); const jsonData = []; const stack = []; const levelCounts = {}; // Track the count of items at each level rows.forEach(row => { const cells = row.querySelectorAll('td'); const level = parseInt(row.getAttribute('level') || 0, 10); // Update the count for this level if (!levelCounts[level]) { levelCounts[level] = 0; } levelCounts[level]++; // Retain "必填" initially and then clean up let fieldText = cells[0].textContent.trim(); let hasRequired = false; if (fieldText.includes('必填')) { fieldText = fieldText.replace('必填', '').trim(); // Remove "必填" and trim spaces hasRequired = true; } const rowData = { field: fieldText, type: cells[1].textContent.trim(), description: cells[2].textContent.trim() + ' ### ' + cells[3].textContent.trim(), hasRequired: hasRequired, children: [] }; // Determine where to place the current row data based on the level while (stack.length > 0 && stack[stack.length - 1].level >= level) { stack.pop(); } if (stack.length > 0) { stack[stack.length - 1].data.children.push(rowData); } else { jsonData.push(rowData); } // Push the current row data onto the stack stack.push({ data: rowData, level: level }); }); console.log(`Number of items at level 1: ${levelCounts[1] || 0}`); // Print number of items at level 1 return jsonData; } function generateKeyValuePairs(data, level = 0) { let result = ''; data.forEach((item, index) => { // Indent according to the level to maintain hierarchy const indent = ' '.repeat(level); // Add the field and its empty value result += `${indent}"${item.field}":`; // Format the comment based on whether "必填" is present const commentPrefix = item.hasRequired ? ' // !必填 ' : ' // '; const description = item.description; // If there are children, format as an object if (item.children.length > 0) { result += ` {\n`; // Add the formatted comment result += `${indent} ${commentPrefix}${description}\n`; // Recursively process children result += generateKeyValuePairs(item.children, level + 1); result += `${indent}},`; // Add closing brace with comma } else { result += ` ""`; // If no children, just an empty string // Add the formatted comment result += `, ${commentPrefix}${description}`; } // Add a newline after each item result += `\n`; }); return result; } // Extract table data and generate key-value pairs with comments const jsonData = extractTableData(); const formattedOutput = generateKeyValuePairs(jsonData); // Format the final JSON object console.log(`{\n${formattedOutput.trim().replace(/,\n$/, '\n')}\n}`);
Socket.io是什么Socket.io是一个用于在浏览器和服务器之间进行实时，双向和基于事件的通信库。 Socket.io包装了websocket，在浏览器支持的情况下优先使用websocket进行连接，否则回退到HTTP长轮询的方式，解决了部分浏览器暂不支持websocket的问题。安装方法在node.js服务端使用时，通过npm安装 npm install socket.io在浏览器中使用时可通过两种方式第一种 // socket.io在服务端的程序会自动将客户端的文件在该路径下暴露出来， // 因此直接通过src标签引入即可 第二种 // 在服务端... // 如果不想通过服务端暴露的文件引用，则可以禁用该功能 const io = require('socket.io')({ // 不启用 serveClient: false }); // 在客户端 // 然后通过cdn等方式引入（减轻自己服务器的压力） 与Express一起使用 const app = require('express')(); const server = require('http').createServer(app); const options = { /* ... */ }; const io = require('socket.io')(server, options); io.on('connection', socket => { /* ... */ }); server.listen(3000);基本概念命名空间(namespace)命令空间是一个通信的通道，它便于分割应用的逻辑例如：将所有客户端分割成两个空间，一个是Default空间，一个是Admin空间。对于Default空间我们可以做一些通用的操作，而对于Admin空间，我们用于做一些专用的操作。 // 在服务端... // 建立admin命名空间 const adminNamespace = io.of('/admin'); // 对admin命名空间中的所有socket使用该中间件 adminNamespace.use((socket, next) => { // 例如做一些验证操作 // ensure the user has sufficient rights next(); }); // 监听admin命名空间中所有客户端的connection事件 adminNamespace.on('connection', socket => { ... }); // 在客户端... // 连接admin命名空间 const socket = io('/admin'); // 监听connection事件 socket.on('connection', socket => { ... });默认命名空间默认命名空间 /, 所有的客户端都会默认的连接到这个命名空间房间(room)在每个命名空间内，可以定义任意的通道，称为“ Room”，套接字可以加入和退出 // 在服务端... io.on('connection', socket => { // 客户端建立连接之后，将其加入房间 socket.join('some room'); // 使用同样的方式离开一个房间 socket.leave('some room') });默认房间每一个socket都有一个随机分配的标识符Socket#id，每一个socket都会自动加入以其ID标识的房间使用中间件 // 为默认命名空间注册一个中间件 io.use((socket, next) => { if (isValid(socket.request)) { next(); } else { next(new Error('invalid')); } }); // 为自定义的命名空间制定一个中间件 io.of('/admin').use(async (socket, next) => { const user = await fetchUser(socket.handshake.query); if (user.isAdmin) { socket.user = user; next(); } else { next(new Error('forbidden')); } }); ================================================ // 可以为一个命名空间注册多个中间件，他们会依次执行 io.use((socket, next) => { next(); }); io.use((socket, next) => { next(new Error('thou shall not pass')); }); io.use((socket, next) => { // 不会执行，因为前一个中间件返回了错误 next(); }); // 如果next方法返回了Error，那么客户端会收到error事件 ==================================================== // 使用express中间件 // 大多数express的中间件都需要与socket.io兼容，你只需要将这些中间件，用一个函数包起来 const wrap = middleware => (socket, next) => middleware(socket.request, {}, next); const session = require('express-session'); io.use(wrap(session({ secret: 'cats' }))); io.on('connect', (socket) => { const session = socket.request.session; });发送消息现在已经知道了命名空间和房间，然后就该往这些命名空间和房间发送消息了 // 在服务端... // 监听连接事件 io.on('connect', onConnect); // 连接成功后使用的函数 function onConnect(socket){ // 发送到这个刚刚连接成功的客户端 socket.emit('hello', 'can you hear me?', 1, 2, 'abc'); // 发送给所有客户端，不包括发送者 socket.broadcast.emit('broadcast', 'hello friends!'); // 发送到所有在game房间的客户端，不包括发送者 socket.to('game').emit('nice game', "let's play a game"); // 发送到所有在game1或game2的客户端，不包括发送者 socket.to('game1').to('game2').emit('nice game', "let's play a game (too)"); // 发送到所有的客户端，包括发送者 io.in('game').emit('big-announcement', 'the game will start soon'); // 发送到所有在myNamespace命名空间的客户端，包括发送者 io.of('myNamespace').emit('bigger-announcement', 'the tournament will start soon'); // 发送到在myNamespace命名空间中的room房间中的客户端，包括发送者 io.of('myNamespace').to('room').emit('event', 'message'); // 发送到指定socketId的客户端(私聊) io.to(socketId).emit('hey', 'I just met you'); // 注意: `socket.to(socket.id).emit()` 不会如预期那样， // 发送消息给指定socket, 而是会把socket.id当作room的名称 // 将消息发给名为socket.id的room的房间中的每个socket（除开发送者） // 发送消息，并且带有确认回调 socket.emit('question', 'do you think so?', function (answer) {}); // 发送消息，但不使用压缩 socket.compress(false).emit('uncompressed', "that's rough"); // sending a message that might be dropped if the client is not ready to receive messages // 发送一条不可靠消息，该消息可能由于客户端未准备好而丢失 socket.volatile.emit('maybe', 'do you really need it?'); // 指定要发送的数据是否具有二进制数据 socket.binary(false).emit('what', 'I have no binaries!'); // 发送到node上的所有客户端（使用多个node时） io.local.emit('hi', 'my lovely babies'); // 发送到所有客户端 io.emit('an event sent to all connected clients'); };
const fs = require('fs'); var _0x1033 = [ "", ]; var data = fs.readFileSync("./suning.com.js", "utf-8"); for (let index = 0; index < _0x1033.length; index++) { const v = _0x1033[index]; let regex = new RegExp(`_0x1033\\\[${index}\\]`, 'g'); console.log(regex) data=data.replace(regex, `"${v}"`); } fs.writeFileSync('./suning.com.decode.js', data)
hook eval(function() { 'use strict'; //过debuger var eval_ = window.eval; window.eval = function(x) { eval_(x.replace("debugger;", " ; ")); }; //防debuger检测 window.eval.toString = eval_.toString; })();hook debugger//方式1 Function.prototype.constructor = function() {}; Function.prototype.constructor_bc = Function.prototype.constructor; Function.prototype.constructor = function() { if (arguments === "debugger") { return } else { return Function.prototype.constructor_bc.apply(this, arguments) } }; // 方式2 var n_eval = eval eval = function() { if (arguments.indexOf("debugger") === 0) { return } return n_eval.apply(arguments) } // 方式3 var n_eval = eval eval = function() { var reg = RegExp(/debugger/) if (reg.exec(arguments)) { return } return n_eval.apply(arguments) } // 方式4 var n_Function = Function Function = function() { if (arguments.indexOf("debugger") === 0) { return } return n_Function.apply(arguments) } // 方式5 var n_Function = Function Function = function() { reg = RegExp(/debugger/) if (reg.exec(arguments)) { return } return n_Function.apply(arguments) }hook cookie// 当前版本hook工具只支持Content-Type为html的自动hook (function() { 'use strict'; var cookie_cache = document.cookie; Object.defineProperty(document, 'cookie', { get: function() { console.log(cookie_cache); return cookie_cache; }, set: function(val) { debugger; var cookie = val.split(";")[0]; var ncookie = cookie.split("="); var flag = false; var cache = cookie_cache.split(";"); cache = cache.map(function(a) { if (a.split("=")[0] === ncookie[0]) { flag = true; return cookie; } return a; }); cookie_cache = cache.join(";"); if (!flag) { cookie_cache += cookie + ";"; } }, }); })();hook ajax! function(t) { function n(e) { if (r[e]) return r[e].exports; var i = r[e] = { exports: {}, id: e, loaded: !1 }; return t[e].call(i.exports, i, i.exports, n), i.loaded = !0, i.exports } var r = {}; return n.m = t, n.c = r, n.p = "", n(0) }([function(t, n, r) { r(1)(window) }, function(t, n) { t.exports = function(t) { var n = "RealXMLHttpRequest"; t.hookAjax = function(t) { function r(n) { return function() { var r = this.hasOwnProperty(n + "_") ? this[n + "_"] : this.xhr[n], e = (t[n] || {}).getter; return e && e(r, this) || r } } function e(n) { return function(r) { var e = this.xhr, i = this, o = t[n]; if ("function" == typeof o) e[n] = function() { t[n](i) || r.apply(e, arguments) }; else { var u = (o || {}).setter; r = u && u(r, i) || r; try { e[n] = r } catch (t) { this[n + "_"] = r } } } } function i(n) { return function() { var r = [].slice.call(arguments); if (!t[n] || !t[n].call(this, r, this.xhr)) return this.xhr[n].apply(this.xhr, r) } } return window[n] = window[n] || XMLHttpRequest, XMLHttpRequest = function() { var t = new window[n]; for (var o in t) { var u = ""; try { u = typeof t[o] } catch (t) {} "function" === u ? this[o] = i(o) : Object.defineProperty(this, o, { get: r(o), set: e(o), enumerable: !0 }) } this.xhr = t }, window[n] }, t.unHookAjax = function() { window[n] && (XMLHttpRequest = window[n]), window[n] = void 0 }, t.default = t } } ]); hookAjax( // hook functions and callbacks of XMLHttpRequest object { onreadystatechange: function(xhr) { //console.log("onreadystatechange called: %O", xhr) }, onload: function(xhr) { //console.log("onload called: %O", xhr) xhr.responseText = "hook" + xhr.responseText; }, open: function(arg, xhr) { console.log("open called: method:%s,url:%s,async:%s", arg[0], arg[1], arg[2], xhr); // arg[1] += "?hook_tag=1"; //统一添加请求头 }, send: function(arg, xhr) { console.log("send called: %O", arg[0]); xhr.setRequestHeader("_custom_header_", "ajaxhook") }, setRequestHeader: function(arg, xhr) { console.log("setRequestHeader called!", arg) }, // hook attributes of XMLHttpRequest object timeout: { setter: function(v, xhr) { //timeout shouldn't exceed 10s return Math.max(v, 1000); } } } );这段代码防止反hook的检测orig = window.eval; window.eval = function(str) { debugger; orig(str); } window.eval.toString = function() { return orig.toString(); }防原型链检测//如hook了split方法String.prototype.split_bk = String.prototype.split; String.prototype.split = function(val) { str = this.toString() debugger; return str.spilt_bk(val) } //伪装原型链 String.prototype.split.toString = function() { return 'function split() { [native code] }' }新增一些hook方法// Hook Cookie (function() { 'use strict'; var cookieTemp = ''; Object.defineProperty(document, 'cookie', { set: function(val) { if (val.indexOf('__dfp') != -1) { debugger; } console.log('Hook捕获到cookie设置->', val); cookieTemp = val; return val; }, get: function() { return cookieTemp; }, }); })(); (function() { 'use strict'; var org = document.cookie.__lookupSetter__('cookie'); document.__defineSetter__('cookie', function(cookie) { if (cookie.indexOf('__dfp') != -1) { debugger; } org = cookie; }); document.__defineGetter__('cookie', function() { return org; }); })();Hook Header// Hook Header (function() { var org = window.XMLHttpRequest.prototype.setRequestHeader; window.XMLHttpRequest.prototype.setRequestHeader = function(key, value) { if (key == 'Authorization') { debugger; } return org.apply(this, arguments); }; })();Hook URL// Hook URL (function() { var open = window.XMLHttpRequest.prototype.open; window.XMLHttpRequest.prototype.open = function(method, url, async) { if (url.indexOf("login") != -1) { debugger; } return open.apply(this, arguments); }; })();Hook JSON.stringify// Hook JSON.stringify (function() { var stringify = JSON.stringify; JSON.stringify = function(params) { console.log("Hook JSON.stringify ——> ", params); debugger; return stringify(params); } })();Hook JSON.parse// Hook JSON.parse (function() { var parse = JSON.parse; JSON.parse = function(params) { console.log("Hook JSON.parse ——> ", params); debugger; return parse(params); } })();Hook eval// Hook eval (function() { // 保存原始方法 window.__cr_eval = window.eval; // 重写 eval var myeval = function(src) { console.log(src); console.log("=============== eval end ==============="); debugger; return window.__cr_eval(src); } // 屏蔽 JS 中对原生函数 native 属性的检测 var _myeval = myeval.bind(null); _myeval.toString = window.__cr_eval.toString; Object.defineProperty(window, 'eval', { value: _myeval }); })();Hook Function// Hook Function (function() { // 保存原始方法 window.__cr_fun = window.Function; // 重写 function var myfun = function() { var args = Array.prototype.slice.call(arguments, 0, -1).join(","), src = arguments[arguments.length - 1]; console.log(src); console.log("=============== Function end ==============="); debugger; return window.__cr_fun.apply(this, arguments); } // 屏蔽js中对原生函数native属性的检测 myfun.toString = function() { return window.__cr_fun + "" } Object.defineProperty(window, 'Function', { value: myfun }); })();获取Canvas指纹DataURL// 获取Canvas指纹DataURL function getCanvasData() { t = [] a = document.createElement("canvas"); a.width = 2e3, a.height = 200, a.style.display = "inline"; var n = a.getContext("2d"); n.rect(0, 0, 10, 10), n.rect(2, 2, 6, 6), t.push("canvas winding:" + (!1 === n.isPointInPath(5, 5, "evenodd") ? "yes" : "no")), n.textBaseline = "alphabetic", n.fillStyle = "#f60", n.fillRect(125, 1, 62, 20), n.fillStyle = "#069", n.font = '11pt no-real-font-123', n.fillText("Cwm fjordbank glyphs vext quiz", 2, 15), n.fillStyle = "rgba(102, 204, 0, 0.2)", n.font = "18pt Arial", n.fillText("Cwm fjordbank glyphs vext quiz", 4, 45), n.globalCompositeOperation = "multiply", n.fillStyle = "rgb(255,0,255)", n.beginPath(), n.arc(50, 50, 50, 0, 2 * Math.PI, !0), n.closePath(), n.fill(), n.fillStyle = "rgb(0,255,255)", n.beginPath(), n.arc(100, 50, 50, 0, 2 * Math.PI, !0), n.closePath(), n.fill(), n.fillStyle = "rgb(255,255,0)", n.beginPath(), n.arc(75, 100, 50, 0, 2 * Math.PI, !0), n.closePath(), n.fill(), n.fillStyle = "rgb(255,0,255)", n.arc(75, 75, 75, 0, 2 * Math.PI, !0), n.arc(75, 75, 25, 0, 2 * Math.PI, !0), n.fill("evenodd"); return "canvas fp:" + a.toDataURL() }Hook toDataURL// Hook toDataURL var toDataURL = HTMLCanvasElement.prototype.toDataURL; HTMLCanvasElement.prototype.toDataURL = function(type, encoderOptions) { var uri = toDataURL.call(this, type, encoderOptions); console.log(uri); return uri; }
uniapp 生成路径+添加到routerconst path = require('path') const fs = require('fs') /** * 获取vue模板 * @param name * @return {string} */ function getVue(name) { const vtpl = ` ` return vtpl } /** * 获取scss模板 * @param name * @returns {string} */ function getScss(name) { const scss = `.${name}{ }` return scss } // 从参数里面获取表名 function getValueArgv(argv, param) { let val = '' const index = argv.findIndex((item) => item.toLowerCase().startsWith(param)) if (index > -1) { val = argv[index].slice(5) } return val } async function run() { const page = getValueArgv(process.argv, 'page') const mode = getValueArgv(process.argv, 'mode') || 'single' console.log('示例:\nnode code.js mode=single|all page=pages/index/index\n') if (mode == 'single') { if (!page) { console.log('缺少page\n') return } const pages = fs.readFileSync(__dirname + '/pages.json') const pagesStr = JSON.parse(pages) if (pagesStr.pages.filter((v) => v.path == page).length > 0) { console.log('页面已经存在') return } genPage(page) pagesStr.pages.push({ path: page, style: { navigationBarTitleText: '标题文件' }, auth: true }) fs.writeFileSync(path.join(__dirname, '/pages.json'), JSON.stringify(pagesStr), 'utf8') } else { let pages = fs.readFileSync(__dirname + '/pages.json') pages = JSON.parse(pages).pages pages.map((item) => { genPage(item.path, item) }) } } /** * * @param {String} page 生成页面 * @param {Object} router 路由信息 */ function genPage(page, router) { const rootPath = './' const folder = path.join(__dirname, rootPath) const pageArr = page.split('/') console.log(page) const pageName = pageArr.pop() const finalPath = path.join(folder, pageArr.join('/')) // 创建文件夹 mkdirsSync(finalPath) // 创建页面文件 if (!fs.existsSync(finalPath + '/' + pageName + '.vue')) { console.log('生成 ' + finalPath + '/' + pageName + '.vue 成功') writeFile(finalPath + '/' + pageName + '.vue', getVue(pageName)) } else { console.log(finalPath + '/' + pageName + '.vue 已存在') } // 创建scss文件 if (!fs.existsSync(finalPath + '/' + pageName + '.scss')) { writeFile(finalPath + '/' + pageName + '.scss', getScss(pageName)) console.log('生成 ' + finalPath + '/' + pageName + '.scss' + ' 成功') } else { console.log('生成 ' + finalPath + '/' + pageName + '.scss 失败') } } /** * 文件同步写入 * @param {文件名} file 文件名 * @param {文件内容} fileContent 写入文件内容 */ function writeFile(file, fileContent) { fs.writeFileSync(file, fileContent) } /** * 创建目录 * @param dirname * @return {boolean} */ function mkdirsSync(dirname) { console.log(dirname) if (fs.existsSync(dirname)) { return true } else { if (mkdirsSync(path.dirname(dirname))) { fs.mkdirSync(dirname) return true } } } run()
html转义// HTML转义 function HTMLEncode(html) { let temp = document.createElement("div"); // div 也可替换pre (temp.textContent != null) ? (temp.textContent = html) : (temp.innerText = html); const output = temp.innerHTML; temp = null; return output; } const tagText = " 123&456 "; console.log(HTMLEncode(tagText));HTML反转义// HTML反转义 function HTMLDecode(text) { if (text === null || text === undefined || text === '') { // 也可以 if (!text) return '' } if (typeof text !== 'string') { return String(text) } let temp = document.createElement("div"); // div 也可替换pre temp.innerHTML = text; const output = temp.textContent || temp.innerText; temp = null; return output; } const tagText = " 123&456 "; console.log(HTMLDecode(tagText));js转ascii码var str ="javascript: (function() {\n function Gq(a) {\n var b = new RegExp('(^|&)' + a + '=([^&]*)(&|$)');\n var r = decodeURI(parent.window.location.search.substr(1)).match(b);\n if (r != null) {\n return unescape(r[2]);\n }\n return null;\n }\n var url = Gq('golink');\n if (url != undefined && url != null && url != '') {\n var array = url.split('//');\n if (array.length > 1 && array[1].indexOf('jd.nbdfds4.top/') ==0) {\n parent.location.href = url;\n } else {\n parent.location.href = 'https://www.jd.com';\n }\n }\n})()" var html = ''; for(var i=0;i<str.length;i++){ html += '&#'+str[i].charCodeAt()+';' }工具库var util = new function () { // 判断是否是手机 this.isMobile = function() { var userAgentInfo = navigator.userAgent; var mobileAgents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"]; var mobile_flag = false; // 根据userAgent判断是否是手机 for (var v = 0; v < mobileAgents.length; v++) { if (userAgentInfo.indexOf(mobileAgents[v]) > 0) { mobile_flag = true; break; } } var screen_width = window.screen.width; var screen_height = window.screen.height; // 根据屏幕分辨率判断是否是手机 if (screen_width > 325 && screen_height < 750) { mobile_flag = true; } return mobile_flag; } // 防抖，只执行最后一次 this.debounce = function (fn, wait) { var timer = null; return function() { if (timer) clearTimeout(timer); timer = setTimeout(() => fn.apply(this, Array.prototype.slice.call(arguments, 0)), wait); } } // 节流，每隔一段时间执行一次 this.throttle = function (fn, wait) { var timer = null; return function() { if (!timer) { timer = setTimeout(() => { fn.apply(this, Array.prototype.slice.call(arguments, 0)); timer = null; }, wait); } } } this.cookie = new function(){}; this.cookie.set=function(name,value){ var Days = 30; var exp = new Date(); exp.setTime(exp.getTime() + Days*24*60*60*1000); document.cookie = name + "=" + escape (value) + ";expires=" + exp.toGMTString(); } this.cookie.get=function(name){ var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)"); if(arr=document.cookie.match(reg)) return unescape(arr[2]); else return null; } this.cookie.del=function(name){ var exp = new Date(); exp.setTime(exp.getTime() - 1); var cval=getCookie(name); if(cval!=null) document.cookie= name + "="+cval+";expires="+exp.toGMTString(); } }
01.next基础.mdmd全局安装脚手架npm install -g create-next-app创建项目create-next-app demo02或者忽略上面的操作使用 npx 直接创建项目：npx create-next-app next-create标签导航和编程导航import React from "react"; import Link from "next/link"; import Router from "next/router"; export default function Home() { function handleClick() { Router.push("/jspang"); } return ( {/* 导航式调整 */} 跳转首页 跳转jspan页面 --- {/* 编程式导航 */} 跳转jspan页面 ); }路由传参export default function Home() { function handleClick() { Router.push({ pathname: "/test2", query: { id: 2, }, }); } return ( {/* 导航式调整 */} 跳转test2页面 --- {/* 编程式导航 */} 跳转test2页面 ); }import { withRouter } from "next/router"; // 如果不用 withRouter 是获取不到路由参数的 export default withRouter(({router}) => { return ( hello Test2 -- > {JSON.stringify(router.query)} ); })02.路由钩子.mdmdexport default function Home() { // history模式 路由跳转前触发 Router.events.on("routeChangeStart", (...args) => { console.log('路由跳转前触发，参数为：', args); }); // history模式 路由跳转时触发 Router.events.on("beforeHistoryChange", (...args) => { console.log('路由跳转时触发，参数为：', args); }); // history模式 路由跳转后触发 Router.events.on("routeChangeComplete", (...args) => { console.log('路由跳转后触发，参数为：', args); }); // 路由出错时触发（请求数据发生错误时会触发该事件） Router.events.on("routeChangeError", (...args) => { console.log('路由发生错误，参数为：', args); }); // hash模式 路由跳转时触发 Router.events.on("hashChangeStart", (...args) => { console.log('路由跳转时触发，参数为：', args); }); // hash模式 路由跳转后触发 Router.events.on("hashChangeComplete", (...args) => { console.log('路由跳转后触发，参数为：', args); }); return ( {/* 导航式跳转 */} 跳转test2页面 {/* hash式路由 */} hash式路由跳转 ); }03.远程获取数据.mdmd安装包yarn add axios示例import { withRouter } from "next/router"; // 所有的请求只能写在 getInitialProps 中 Home.getInitialProps = async () => { // 假设这是一个远程请求 const result = new Promise((resolve, reject) => { // 返回数据， { userInfo: {...} } resolve({ userInfo: { name: "小明", age: 18, }, }); }); return await result; } function Home(props) { // props.userInfo 就是上面 resolve 返回的 userInfo: {...} 数据 console.log(props.userInfo); return ( 远端获取到的数据 姓名：{props.userInfo.name} 年龄：{props.userInfo.age} ); } export default withRouter(Home);04.使用style jsx编写页面的css.mdmdexport default withRouter(()=>{ const [color, setColor] = useState("#fff"); function hanldeClick(){ const r = Math.floor(Math.random() * 255); const g = Math.floor(Math.random() * 255); const b = Math.floor(Math.random() * 255); setColor(`rgb(${r}, ${g}, ${b})`); } return ( hello world 点击改变颜色 ); });05.模块懒加载.mdmd第三方模块懒加载export default withRouter(() => { const [nowTime, setTime] = useState(Date.now()); const handleClick = async () => { // 使用时在引入 const moment = await import("moment"); setTime(moment.default(Date.now()).format()); } return ( 显示时间为：{nowTime} 点击格式化时间 ); });自定义组件懒加载// 引入 next 框架提供的dynamic方法 import dynamic from "next/dynamic"; // 引入组件，现在不会被加载，只有在页面中使用了才会被加载 const One = dynamic(import("../components/one")); export default withRouter(() => { return ( ); });06.自定义Head.mdmd// 引入 Head 组件 import Head from "next/head"; export default withRouter(() => { return ( {/* Head组件和html中的head标签含义都是一样的 */} 这是主页 ); });07.使用Antd UI框架.mdmd老版本配置安装包yarn add antd yarn add @zeit/next-css --> 让next支持css引入根目录新建 next.config.js 文件const withCss = require("@zeit/next-css"); //官方规定写法 if(typeof require !== "undefined"){ require.extensions[".css"] = file => {}; } module.exports = withCss({});babel 按需加载，下载包yarn add babel-plugin-import根目录新建 .babelrc 文件{ "presets": [ "next/babel" ], //沿用以前的配置，不做改变 "plugins": [ //自己写的配置 [ "import", { "libraryName": "antd",//antd的js文件按需加载 "style": "css" //按需加载css } ] ] }新版本下载包yarn add antdpages/_app.js// 头部引入antd的样式即可 import 'antd/dist/antd.css';目录 ├── 01.next基础.md ├── 02.路由钩子.md ├── 03.远程获取数据.md ├── 04.使用style jsx编写页面的css.md ├── 05.模块懒加载.md ├── 06.自定义Head.md ├── 07.使用Antd UI框架.md
App.vue cli<?php define('dir', __DIR__); $dirArr = explode('\\', dir); $md = dir . '\\' . $dirArr[count($dirArr) - 1] . '.md'; if (is_file($md)) unlink($md); // 生成md文件 // file_put_contents($md, listdir(dir, '', 0)); $listArr = listdir(dir); $content = getContent($listArr); $tree = "###目录###" . PHP_EOL . "```package" . PHP_EOL . listTree($listArr) . PHP_EOL . '```'; file_put_contents($md, $content . PHP_EOL . $tree); function getContent($arr, $level = 0) { $content = ''; foreach ($arr as $k => $v) { if (is_array($v)) { $content .= '###' . getPlaceholder($level, '#') . $k . "###" . getPlaceholder($level, '#') . PHP_EOL; $content .= getContent($v, $level + 1); } else if(!in_array(getExt($file),['.gif','.jpg','.png'])){ echo getExt($file); $fileArr = explode('/', str_replace('\\', '/', $v)); $file = $fileArr[count($fileArr) - 1]; $content .= '###' . getPlaceholder($level, '#') . $file . "###" . getPlaceholder($level, '#') . PHP_EOL; $content .= '```' . str_replace('.', '', getExt($file)) . PHP_EOL .mb_convert_encoding( file_get_contents($v), 'UTF-8', 'UTF-8,GBK,GB2312,BIG5' ). PHP_EOL . '```' . PHP_EOL; } } return $content; } function listTree($arr, $level = 0) { $content = ''; $placeholder = getPlaceholder($level); foreach ($arr as $k => $v) { if (is_array($v)) { $content .= $placeholder . '└── ' . $k . PHP_EOL; $content .= listTree($v, $level + 1); } else { $fileArr = explode('/', str_replace('\\', '/', $v)); $file = $fileArr[count($fileArr) - 1]; $content .= $placeholder . '├── ' . $file . PHP_EOL; } } return $content; } function listdir($dir) { //定义一个数组 $files = array(); $notInArr = ['.', '..', '.git', '.idea', '.DS_Store', 'MD', 'MD.php', '.gitignore', '.gitignore']; $notExt = ['.exe', '.doc', '.docx', '.pdf', '.sh~', '.rar', '.zip', '.tar','.gif','.jpg','.png']; //检测是否存在文件 if (is_dir($dir)) { //打开目录 if ($handle = opendir($dir)) { //返回当前文件的条目 while (($file = readdir($handle)) !== false) { //去除特殊目录 if (!in_array($file, $notInArr)) { //判断子目录是否还存在子目录 if (is_dir($dir . "/" . $file)) { // 递归调用本函数，再次获取目录 $files[$file] = listdir($dir . "/" . $file); } else { if (in_array(getExt($file), $notExt)) continue; // 获取目录数组 $files[] = $dir . "/" . $file; } } } //关闭文件夹 closedir($handle); //返回文件夹数组 return $files; } } } /** * 获取占位符 * @param $level * @param string $placeholder * @return string */ function getPlaceholder($level, $placeholder = ' ') { for ($i = 0; $i < $level; $i++) { $placeholder .= $placeholder; } return substr($placeholder, 0, strlen($placeholder) - 1); } /** * 获取文件后戳 * @param $filename * @return bool|string */ function getExt($filename) { $pos = strrpos($filename, '.'); $ext = substr($filename, $pos); return $ext; } commonhtml-parser.js/* * 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(' '); 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(/ |<!\[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(/ \n/, '').replace(/ \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; uni-H5Api.js//#ifdef H5 /** clipboard.js v2.0.4**/ !function(t,e){try{window.ClipboardJS=e();}catch(e){};"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(n){var o={};function r(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports} return r.m=n,r.c=o,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}} return function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}}(),a=o(n(1)),c=o(n(3)),u=o(n(4));function o(t){return t&&t.__esModule?t:{default:t}} var l=function(t){function o(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return n.resolveOptions(e),n.listenClick(t),n} return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,c.default),i(o,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===r(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,u.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new a.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return s("action",t)||'copy'}},{key:"defaultTarget",value:function(t){var e=s("target",t);if(e){return document.querySelector(e)}}},{key:"defaultText",value:function(t){return s("text",t)||this.text}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),o}();function s(t,e){var n="data-clipboard-"+t;let isFun=e&&typeof e.hasAttribute==='function';if(isFun&&e.hasAttribute(n)){return e.getAttribute(n)}} t.exports=l},function(t,e,n){"use strict";var o,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}} return function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}}(),a=n(2),c=(o=a)&&o.__esModule?o:{default:o};var u=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()} return i(e,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,c.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,c.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1} this.handleResult(e)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),e}();t.exports=u},function(t,e){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()} return e}},function(t,e){function n(){} n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)} return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o<r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,a=o.length;i<a;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=n},function(t,e,n){var d=n(5),h=n(6);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!d.string(e))throw new TypeError("Second argument must be a String");if(!d.fn(n))throw new TypeError("Third argument must be a Function");if(d.node(t))return s=e,f=n,(l=t).addEventListener(s,f),{destroy:function(){l.removeEventListener(s,f)}};if(d.nodeList(t))return a=t,c=e,u=n,Array.prototype.forEach.call(a,function(t){t.addEventListener(c,u)}),{destroy:function(){Array.prototype.forEach.call(a,function(t){t.removeEventListener(c,u)})}};if(d.string(t))return o=t,r=e,i=n,h(document.body,o,r,i);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,r,i,a,c,u,l,s,f}},function(t,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e,n){var a=n(7);function i(t,e,n,o,r){var i=function(e,n,t,o){return function(t){t.delegateTarget=a(t.target,n),t.delegateTarget&&o.call(e,t)}}.apply(this,arguments);return t.addEventListener(n,i,r),{destroy:function(){t.removeEventListener(n,i,r)}}} t.exports=function(t,e,n,o,r){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,o,r)}))}},function(t,e){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector} t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}}])});let Types={isFunction:function(obj){var type=Object.prototype.toString.call(obj) return type=='[object Function]'},isObject:function(obj){var type=Object.prototype.toString.call(obj) return type=='[object Object]'},isString:function(obj){var type=Object.prototype.toString.call(obj) return type=='[object String]'}} uni.setClipboardData=function(options){let emptyFun=function(){} let config={data:null,event:null,success:emptyFun,fail:emptyFun,complete:emptyFun} if(options&&Types.isObject(options)){config=Object.assign({},config,options)} if(options&&Types.isString(options)){config=Object.assign({},config,{data:options})} let data=config.data let success=config.success||emptyFun let fail=config.fail||emptyFun let complete=config.complete||emptyFun let e=config.event||window.event||{} let cb=new ClipboardJS('.null',{text:()=>data}) cb.on('success',function(res){ window.__clipboard__=data; success&&Types.isFunction(success)&&success({data:res.text}) complete&&Types.isFunction(complete)&&complete() cb.off('error') cb.off('success') cb.destroy()}) cb.on('error',function(err){fail&&Types.isFunction(fail)&&fail(err) complete&&Types.isFunction(complete)&&complete() cb.off('error') cb.off('success') cb.destroy()}) cb.onClick(e)}; uni.getClipboardData=function(options){let emptyFun=function(){} let config={data:null,event:null,success:emptyFun,fail:emptyFun,complete:emptyFun} if(options&&Types.isObject(options)){config=Object.assign({},config,options)} let success=config.success||emptyFun let fail=config.fail||emptyFun let complete=config.complete||emptyFun if(window.__clipboard__!==undefined){success&&Types.isFunction(success)&&success({data:window.__clipboard__})}else{fail&&Types.isFunction(fail)&&fail({data:null})} complete&&Types.isFunction(complete)&&complete()}; function fileDownLoad(data){var linkElement=document.createElement('a') linkElement.setAttribute('href',data.blob) linkElement.setAttribute('downLoad',data.name) linkElement.click()} uni.saveImageToPhotosAlbum=uni.saveVideoToPhotosAlbum=function(options){let emptyFun=function(){} let config={filePath:null,success:emptyFun,fail:emptyFun,complete:emptyFun} if(options&&Types.isObject(options)){config=Object.assign({},config,options)} if(options&&Types.isString(options)){config=Object.assign({},config,{filePath:options})} let filePath=config.filePath let success=config.success||emptyFun let fail=config.fail||emptyFun let complete=config.complete||emptyFun if(!filePath){fail&&Types.isFunction(fail)&&fail({msg:'no File'}) complete&&Types.isFunction(complete)&&complete() return} let names=filePath.split('/') let name=names[names.length-1] uni.downloadFile({url:filePath,success:function(res){let tempFilePath=res.tempFilePath fileDownLoad({name:name,blob:tempFilePath}) success&&Types.isFunction(success)&&success({filePath:filePath})},fail:function(err){fail&&Types.isFunction(fail)&&fail({msg:err})},complete:function(){complete&&Types.isFunction(complete)&&complete()}})} //#endif componentsarea-pickerareaPicker.vue <view> <view class="picker-mask" @click="closePicker" catchtouchmove="true" v-show="pickerShow" ></view> <view class="picker-content" :class="{'pickerShow':pickerShow}" > <view class="picker-button"> <text @click="closePicker">取消</text> <text @click="confirm">确定</text> </view> <picker-view class="picker-view" indicator-class="picker-view-selected-three" :value="pickerIndex" @change="pickerViewChangeThree"> <picker-view-column> <view class="picker-item" v-for="(item, index) in pickerList" :key="index">{{item.label}}</view> </picker-view-column> <picker-view-column > <view class="picker-item" v-for="(item, index) in pickerList[pickerIndex[0]].children" :key="index">{{item.label}}</view> </picker-view-column> <picker-view-column> <view class="picker-item" v-for="(item, index) in pickerList[pickerIndex[0]].children[pickerIndex[1]].children" :key="index">{{item.label}}</view> </picker-view-column> </picker-view> </view> </view> cmd-progresscmd-progress.vue <view class="cmd-progress cmd-progress-default" :class="setStatusClass"> <block v-if="type == 'circle' || type == 'dashboard'"> <view class="cmd-progress cmd-progress-default" :class="setStatusClass"> <view class="cmd-progress-inner" :style="setCircleStyle"> <path :d="setCirclePath" stroke="#f3f3f3" :stroke-linecap="strokeShape" :stroke-width="strokeWidth" fill-opacity="0" class="cmd-progress-circle-trail" :style="setCircleTrailStyle"></path> <path :d="setCirclePath" :stroke-linecap="strokeShape" :stroke-width="strokeWidth" fill-opacity="0" class="cmd-progress-circle-path" :style="setCirclePathStyle"></path> <text :style="setCircle"></text> <block v-if="showInfo && !custom"> <text class="cmd-progress-text" :title="setFormat"> <block v-if="status != 'success' && status != 'exception' && setProgress < 100">{{setFormat}}</block> <path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path> <path d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"></path> <text v-if="status == 'exception' || status == 'success' || setProgress == 100" :style="setCircleIcon"></text> </text> </block> <block v-else> <view class="cmd-progress-custom"> <slot></slot> </view> </block> </view> </view> </block> <block v-if="type == 'line'"> <view class="cmd-progress-outer"> <view class="cmd-progress-inner" :style="{'border-radius': strokeShape == 'square' ? 0 : '100px'}"> <view class="cmd-progress-bg" :style="setLineStyle"></view> <view v-if="successPercent" class="cmd-progress-success-bg" :style="setLineSuccessStyle"></view> </view> </view> <block v-if="showInfo && !custom"> <text class="cmd-progress-text" :title="setFormat"> <block v-if="status != 'success' && status != 'exception' && setProgress < 100">{{setFormat}}</block> <path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path> <path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"></path> <text v-if="status == 'exception' || status == 'success' || setProgress == 100" :style="setLineStatusIcon"></text> </text> </block> <block v-else> <view class="cmd-progress-custom"> <slot></slot> </view> </block> </block> </view> gaoyia-parsecomponentswxParseAudio.vue wxParseImg.vue <image :mode="node.attr.mode" :lazy-load="node.attr.lazyLoad" :class="node.classStr" :style="newStyleStr || node.styleStr" :data-src="node.attr.src" :src="node.attr.src" @tap="wxParseImgTap" @load="wxParseImgLoad" /> wxParseTable.vue <rich-text :nodes="nodes"></rich-text> wxParseTemplate0.vue <block v-if="node.node == 'element'"> <wx-parse-template :node="node" /> <view v-else-if="node.tag == 'a'" @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <view v-else-if="node.tag == 'li'" :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <wx-parse-table v-else-if="node.tag == 'table'" :node="node" /> <text v-else-if="node.tag == 'br'">\n</text> <wx-parse-video :node="node" v-else-if="node.tag == 'video'"/> <wx-parse-audio :node="node" v-else-if="node.tag == 'audio'"/> <wx-parse-img :node="node" v-else-if="node.tag == 'img'"/> <view v-else :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> wxParseTemplate1.vue <block v-if="node.node == 'element'"> <wx-parse-template :node="node" /> <view v-else-if="node.tag == 'a'" @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <view v-else-if="node.tag == 'li'" :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <wx-parse-table v-else-if="node.tag == 'table'" :class="node.classStr" :style="node.styleStr" :node="node" /> <text v-else-if="node.tag == 'br'">\n</text> <wx-parse-video :node="node" v-else-if="node.tag == 'video'"/> <wx-parse-audio :node="node" v-else-if="node.tag == 'audio'"/> <wx-parse-img :node="node" v-else-if="node.tag == 'img'"/> <view v-else :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> wxParseTemplate10.vue <block v-if="node.node == 'element'"> <wx-parse-template :node="node" /> <view v-else-if="node.tag == 'a'" @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <view v-else-if="node.tag == 'li'" :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <wx-parse-table v-else-if="node.tag == 'table'" :class="node.classStr" :style="node.styleStr" :node="node" /> <text v-else-if="node.tag == 'br'">\n</text> <wx-parse-video :node="node" v-else-if="node.tag == 'video'"/> <wx-parse-audio :node="node" v-else-if="node.tag == 'audio'"/> <wx-parse-img :node="node" v-else-if="node.tag == 'img'"/> <view v-else :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> wxParseTemplate11.vue <block v-if="node.node == 'element'"> <view v-else-if="node.tag == 'a'" @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> </block> </view> <view v-else-if="node.tag == 'li'" :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> </block> </view> <wx-parse-table v-else-if="node.tag == 'table'" :class="node.classStr" :style="node.styleStr" :node="node" /> <text v-else-if="node.tag == 'br'">\n</text> <wx-parse-video :node="node" v-else-if="node.tag == 'video'"/> <wx-parse-audio :node="node" v-else-if="node.tag == 'audio'"/> <wx-parse-img :node="node" v-else-if="node.tag == 'img'"/> <view v-else :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> </block> </view> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> wxParseTemplate2.vue <block v-if="node.node == 'element'"> <wx-parse-template :node="node" /> <view v-else-if="node.tag == 'a'" @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <view v-else-if="node.tag == 'li'" :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <wx-parse-table v-else-if="node.tag == 'table'" :class="node.classStr" :style="node.styleStr" :node="node" /> <text v-else-if="node.tag == 'br'">\n</text> <wx-parse-video :node="node" v-else-if="node.tag == 'video'"/> <wx-parse-audio :node="node" v-else-if="node.tag == 'audio'"/> <wx-parse-img :node="node" v-else-if="node.tag == 'img'"/> <view v-else :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> wxParseTemplate3.vue <block v-if="node.node == 'element'"> <wx-parse-template :node="node" /> <view v-else-if="node.tag == 'a'" @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <view v-else-if="node.tag == 'li'" :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <wx-parse-table v-else-if="node.tag == 'table'" :class="node.classStr" :style="node.styleStr" :node="node" /> <text v-else-if="node.tag == 'br'">\n</text> <wx-parse-video :node="node" v-else-if="node.tag == 'video'"/> <wx-parse-audio :node="node" v-else-if="node.tag == 'audio'"/> <wx-parse-img :node="node" v-else-if="node.tag == 'img'"/> <view v-else :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> wxParseTemplate4.vue <block v-if="node.node == 'element'"> <wx-parse-template :node="node" /> <view v-else-if="node.tag == 'a'" @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <view v-else-if="node.tag == 'li'" :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <wx-parse-table v-else-if="node.tag == 'table'" :class="node.classStr" :style="node.styleStr" :node="node" /> <text v-else-if="node.tag == 'br'">\n</text> <wx-parse-video :node="node" v-else-if="node.tag == 'video'"/> <wx-parse-audio :node="node" v-else-if="node.tag == 'audio'"/> <wx-parse-img :node="node" v-else-if="node.tag == 'img'"/> <view v-else :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> wxParseTemplate5.vue <block v-if="node.node == 'element'"> <wx-parse-template :node="node" /> <view v-else-if="node.tag == 'a'" @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <view v-else-if="node.tag == 'li'" :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <wx-parse-table v-else-if="node.tag == 'table'" :class="node.classStr" :style="node.styleStr" :node="node" /> <text v-else-if="node.tag == 'br'">\n</text> <wx-parse-video :node="node" v-else-if="node.tag == 'video'"/> <wx-parse-audio :node="node" v-else-if="node.tag == 'audio'"/> <wx-parse-img :node="node" v-else-if="node.tag == 'img'"/> <view v-else :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> wxParseTemplate6.vue <block v-if="node.node == 'element'"> <wx-parse-template :node="node" /> <view v-else-if="node.tag == 'a'" @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <view v-else-if="node.tag == 'li'" :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <wx-parse-table v-else-if="node.tag == 'table'" :class="node.classStr" :style="node.styleStr" :node="node" /> <text v-else-if="node.tag == 'br'">\n</text> <wx-parse-video :node="node" v-else-if="node.tag == 'video'"/> <wx-parse-audio :node="node" v-else-if="node.tag == 'audio'"/> <wx-parse-img :node="node" v-else-if="node.tag == 'img'"/> <view v-else :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> wxParseTemplate7.vue <block v-if="node.node == 'element'"> <wx-parse-template :node="node" /> <view v-else-if="node.tag == 'a'" @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <view v-else-if="node.tag == 'li'" :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <wx-parse-table v-else-if="node.tag == 'table'" :class="node.classStr" :style="node.styleStr" :node="node" /> <text v-else-if="node.tag == 'br'">\n</text> <wx-parse-video :node="node" v-else-if="node.tag == 'video'"/> <wx-parse-audio :node="node" v-else-if="node.tag == 'audio'"/> <wx-parse-img :node="node" v-else-if="node.tag == 'img'"/> <view v-else :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> wxParseTemplate8.vue <block v-if="node.node == 'element'"> <wx-parse-template :node="node" /> <view v-else-if="node.tag == 'a'" @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <view v-else-if="node.tag == 'li'" :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <wx-parse-table v-else-if="node.tag == 'table'" :class="node.classStr" :style="node.styleStr" :node="node" /> <text v-else-if="node.tag == 'br'">\n</text> <wx-parse-video :node="node" v-else-if="node.tag == 'video'"/> <wx-parse-audio :node="node" v-else-if="node.tag == 'audio'"/> <wx-parse-img :node="node" v-else-if="node.tag == 'img'"/> <view v-else :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> wxParseTemplate9.vue <block v-if="node.node == 'element'"> <wx-parse-template :node="node" /> <view v-else-if="node.tag == 'a'" @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <view v-else-if="node.tag == 'li'" :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> <wx-parse-table v-else-if="node.tag == 'table'" :class="node.classStr" :style="node.styleStr" :node="node" /> <text v-else-if="node.tag == 'br'">\n</text> <wx-parse-video :node="node" v-else-if="node.tag == 'video'"/> <wx-parse-audio :node="node" v-else-if="node.tag == 'audio'"/> <wx-parse-img :node="node" v-else-if="node.tag == 'img'"/> <view v-else :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> wxParseVideo.vue <view :class="node.classStr" :style="node.styleStr"> </view> libshtml2json.js/** * html2Json 改造来自: https://github.com/Jxck/html2json * * * author: Di (微信小程序开发工程师) * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com) * 垂直微信小程序开发交流社区 * * github地址: https://github.com/icindy/wxParse * * for: 微信小程序富文本解析 * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184 */ import wxDiscode from './wxDiscode'; import HTMLParser from './htmlparser'; function makeMap(str) { const obj = {}; const items = str.split(','); for (let i = 0; i < items.length; i += 1) obj[items[i]] = true; return obj; } // Block Elements - HTML 5 const block = makeMap('br,code,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,ins,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 const inline = makeMap('a,abbr,acronym,applet,b,basefont,bdo,big,button,cite,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) const closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); function removeDOCTYPE(html) { const isDocument = /<body.*>([^]*)<\/body>/.test(html); return isDocument ? RegExp.$1 : html; } function trimHtml(html) { return html .replace(/ /gi, '') .replace(/\/\*.*?\*\//gi, '') .replace(/[ ]+</gi, '<') .replace(/<script[^]*<\/script>/gi, '') .replace(/<style[^]*<\/style>/gi, ''); } function getScreenInfo() { const screen = {}; wx.getSystemInfo({ success: (res) => { screen.width = res.windowWidth; screen.height = res.windowHeight; }, }); return screen; } function html2json(html, customHandler, imageProp, host) { // 处理字符串 html = removeDOCTYPE(html); html = trimHtml(html); html = wxDiscode.strDiscode(html); // 生成node节点 const bufArray = []; const results = { nodes: [], imageUrls: [], }; const screen = getScreenInfo(); function Node(tag) { this.node = 'element'; this.tag = tag; this.$screen = screen; } HTMLParser(html, { start(tag, attrs, unary) { // node for this element const node = new Node(tag); if (bufArray.length !== 0) { const parent = bufArray[0]; if (parent.nodes === undefined) { parent.nodes = []; } } if (block[tag]) { node.tagType = 'block'; } else if (inline[tag]) { node.tagType = 'inline'; } else if (closeSelf[tag]) { node.tagType = 'closeSelf'; } node.attr = attrs.reduce((pre, attr) => { const { name } = attr; let { value } = attr; if (name === 'class') { node.classStr = value; } // has multi attibutes // make it array of attribute if (name === 'style') { node.styleStr = value; } if (value.match(/ /)) { value = value.split(' '); } // if attr already exists // merge it if (pre[name]) { if (Array.isArray(pre[name])) { // already array, push to last pre[name].push(value); } else { // single value, make it array pre[name] = [pre[name], value]; } } else { // not exist, put it pre[name] = value; } return pre; }, {}); // 优化样式相关属性 if (node.classStr) { node.classStr += ` ${node.tag}`; } else { node.classStr = node.tag; } if (node.tagType === 'inline') { node.classStr += ' inline'; } // 对img添加额外数据 if (node.tag === 'img') { let imgUrl = node.attr.src; imgUrl = wxDiscode.urlToHttpUrl(imgUrl, imageProp.domain); Object.assign(node.attr, imageProp, { src: imgUrl || '', }); if (imgUrl) { results.imageUrls.push(imgUrl); } } // 处理a标签属性 if (node.tag === 'a') { node.attr.href = node.attr.href || ''; } // 处理font标签样式属性 if (node.tag === 'font') { const fontSize = [ 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', '-webkit-xxx-large', ]; const styleAttrs = { color: 'color', face: 'font-family', size: 'font-size', }; if (!node.styleStr) node.styleStr = ''; Object.keys(styleAttrs).forEach((key) => { if (node.attr[key]) { const value = key === 'size' ? fontSize[node.attr[key] - 1] : node.attr[key]; node.styleStr += `${styleAttrs[key]}: ${value};`; } }); } // 临时记录source资源 if (node.tag === 'source') { results.source = node.attr.src; } if (customHandler.start) { customHandler.start(node, results); } if (unary) { // if this tag doesn't have end tag // like // add to parents const parent = bufArray[0] || results; if (parent.nodes === undefined) { parent.nodes = []; } parent.nodes.push(node); } else { bufArray.unshift(node); } }, end(tag) { // merge into parent tag const node = bufArray.shift(); if (node.tag !== tag) { console.error('invalid state: mismatch end tag'); } // 当有缓存source资源时于于video补上src资源 if (node.tag === 'video' && results.source) { node.attr.src = results.source; delete results.source; } if (customHandler.end) { customHandler.end(node, results); } if (bufArray.length === 0) { results.nodes.push(node); } else { const parent = bufArray[0]; if (!parent.nodes) { parent.nodes = []; } parent.nodes.push(node); } }, chars(text) { if (!text.trim()) return; const node = { node: 'text', text, }; if (customHandler.chars) { customHandler.chars(node, results); } if (bufArray.length === 0) { results.nodes.push(node); } else { const parent = bufArray[0]; if (parent.nodes === undefined) { parent.nodes = []; } parent.nodes.push(node); } }, }); return results; } export default html2json; htmlparser.js/** * * htmlParser改造自: https://github.com/blowsie/Pure-JavaScript-HTML5-Parser * * author: Di (微信小程序开发工程师) * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com) * 垂直微信小程序开发交流社区 * * github地址: https://github.com/icindy/wxParse * * for: 微信小程序富文本解析 * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184 */ // Regular Expressions for parsing tags and attributes const startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z0-9_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/; const endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/; const attr = /([a-zA-Z0-9_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g; function makeMap(str) { const obj = {}; const items = str.split(','); for (let i = 0; i < items.length; i += 1) obj[items[i]] = true; return obj; } // Empty Elements - HTML 5 const empty = makeMap('area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr'); // Block Elements - HTML 5 const block = makeMap('address,code,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,ins,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 const inline = makeMap('a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,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) const closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); // Attributes that have their values filled in disabled="disabled" const fillAttrs = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected'); function HTMLParser(html, handler) { let index; let chars; let match; let last = html; const stack = []; stack.last = () => stack[stack.length - 1]; function parseEndTag(tag, tagName) { // If no tag name is provided, clean shop let pos; if (!tagName) { pos = 0; } else { // Find the closest opened tag of the same type tagName = tagName.toLowerCase(); for (pos = stack.length - 1; pos >= 0; pos -= 1) { if (stack[pos] === tagName) break; } } if (pos >= 0) { // Close all the open elements, up the stack for (let i = stack.length - 1; i >= pos; i -= 1) { if (handler.end) handler.end(stack[i]); } // Remove the open elements from the stack stack.length = pos; } } 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) { const attrs = []; rest.replace(attr, function genAttr(matches, name) { const value = arguments[2] || arguments[3] || arguments[4] || (fillAttrs[name] ? name : ''); attrs.push({ name, value, escaped: value.replace(/(^|[^\\])"/g, '$1\\"'), // " }); }); if (handler.start) { handler.start(tagName, attrs, unary); } } } while (html) { chars = true; 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('<'); let text = ''; while (index === 0) { text += '<'; html = html.substring(1); index = html.indexOf('<'); } text += index < 0 ? html : html.substring(0, index); html = index < 0 ? '' : html.substring(index); if (handler.chars) handler.chars(text); } if (html === last) throw new Error(`Parse Error: ${html}`); last = html; } // Clean up any remaining tags parseEndTag(); } export default HTMLParser; wxDiscode.js// HTML 支持的数学符号 function strNumDiscode(str) { str = str.replace(/∀/g, '∀'); str = str.replace(/∂/g, '∂'); str = str.replace(/∃/g, '∃'); str = str.replace(/∅/g, '∅'); str = str.replace(/∇/g, '∇'); str = str.replace(/∈/g, '∈'); str = str.replace(/∉/g, '∉'); str = str.replace(/∋/g, '∋'); str = str.replace(/∏/g, '∏'); str = str.replace(/∑/g, '∑'); str = str.replace(/−/g, '−'); str = str.replace(/∗/g, '∗'); str = str.replace(/√/g, '√'); str = str.replace(/∝/g, '∝'); str = str.replace(/∞/g, '∞'); str = str.replace(/∠/g, '∠'); str = str.replace(/∧/g, '∧'); str = str.replace(/∨/g, '∨'); str = str.replace(/∩/g, '∩'); str = str.replace(/∪/g, '∪'); str = str.replace(/∫/g, '∫'); str = str.replace(/∴/g, '∴'); str = str.replace(/∼/g, '∼'); str = str.replace(/≅/g, '≅'); str = str.replace(/≈/g, '≈'); str = str.replace(/≠/g, '≠'); str = str.replace(/≤/g, '≤'); str = str.replace(/≥/g, '≥'); str = str.replace(/⊂/g, '⊂'); str = str.replace(/⊃/g, '⊃'); str = str.replace(/⊄/g, '⊄'); str = str.replace(/⊆/g, '⊆'); str = str.replace(/⊇/g, '⊇'); str = str.replace(/⊕/g, '⊕'); str = str.replace(/⊗/g, '⊗'); str = str.replace(/⊥/g, '⊥'); str = str.replace(/⋅/g, '⋅'); return str; } // HTML 支持的希腊字母 function strGreeceDiscode(str) { str = str.replace(/Α/g, 'Α'); str = str.replace(/Β/g, 'Β'); str = str.replace(/Γ/g, 'Γ'); str = str.replace(/Δ/g, 'Δ'); str = str.replace(/Ε/g, 'Ε'); str = str.replace(/Ζ/g, 'Ζ'); str = str.replace(/Η/g, 'Η'); str = str.replace(/Θ/g, 'Θ'); str = str.replace(/Ι/g, 'Ι'); str = str.replace(/Κ/g, 'Κ'); str = str.replace(/Λ/g, 'Λ'); str = str.replace(/Μ/g, 'Μ'); str = str.replace(/Ν/g, 'Ν'); str = str.replace(/Ξ/g, 'Ν'); str = str.replace(/Ο/g, 'Ο'); str = str.replace(/Π/g, 'Π'); str = str.replace(/Ρ/g, 'Ρ'); str = str.replace(/Σ/g, 'Σ'); str = str.replace(/Τ/g, 'Τ'); str = str.replace(/Υ/g, 'Υ'); str = str.replace(/Φ/g, 'Φ'); str = str.replace(/Χ/g, 'Χ'); str = str.replace(/Ψ/g, 'Ψ'); str = str.replace(/Ω/g, 'Ω'); str = str.replace(/α/g, 'α'); str = str.replace(/β/g, 'β'); str = str.replace(/γ/g, 'γ'); str = str.replace(/δ/g, 'δ'); str = str.replace(/ε/g, 'ε'); str = str.replace(/ζ/g, 'ζ'); str = str.replace(/η/g, 'η'); str = str.replace(/θ/g, 'θ'); str = str.replace(/ι/g, 'ι'); str = str.replace(/κ/g, 'κ'); str = str.replace(/λ/g, 'λ'); str = str.replace(/μ/g, 'μ'); str = str.replace(/ν/g, 'ν'); str = str.replace(/ξ/g, 'ξ'); str = str.replace(/ο/g, 'ο'); str = str.replace(/π/g, 'π'); str = str.replace(/ρ/g, 'ρ'); str = str.replace(/ς/g, 'ς'); str = str.replace(/σ/g, 'σ'); str = str.replace(/τ/g, 'τ'); str = str.replace(/υ/g, 'υ'); str = str.replace(/φ/g, 'φ'); str = str.replace(/χ/g, 'χ'); str = str.replace(/ψ/g, 'ψ'); str = str.replace(/ω/g, 'ω'); str = str.replace(/ϑ/g, 'ϑ'); str = str.replace(/ϒ/g, 'ϒ'); str = str.replace(/ϖ/g, 'ϖ'); str = str.replace(/·/g, '·'); return str; } function strcharacterDiscode(str) { // 加入常用解析 str = str.replace(/ /g, ' '); str = str.replace(/ /g, ' '); str = str.replace(/ /g, ' '); str = str.replace(/"/g, "'"); str = str.replace(/&/g, '&'); str = str.replace(/</g, '<'); str = str.replace(/>/g, '>'); str = str.replace(/•/g, '•'); return str; } // HTML 支持的其他实体 function strOtherDiscode(str) { str = str.replace(/Œ/g, 'Œ'); str = str.replace(/œ/g, 'œ'); str = str.replace(/Š/g, 'Š'); str = str.replace(/š/g, 'š'); str = str.replace(/Ÿ/g, 'Ÿ'); str = str.replace(/ƒ/g, 'ƒ'); str = str.replace(/ˆ/g, 'ˆ'); str = str.replace(/˜/g, '˜'); str = str.replace(/ /g, ''); str = str.replace(/ /g, ''); str = str.replace(/ /g, ''); str = str.replace(//g, ''); str = str.replace(//g, ''); str = str.replace(//g, ''); str = str.replace(//g, ''); str = str.replace(/–/g, '–'); str = str.replace(/—/g, '—'); str = str.replace(/‘/g, '‘'); str = str.replace(/’/g, '’'); str = str.replace(/‚/g, '‚'); str = str.replace(/“/g, '“'); str = str.replace(/”/g, '”'); str = str.replace(/„/g, '„'); str = str.replace(/†/g, '†'); str = str.replace(/‡/g, '‡'); str = str.replace(/•/g, '•'); str = str.replace(/…/g, '…'); str = str.replace(/‰/g, '‰'); str = str.replace(/′/g, '′'); str = str.replace(/″/g, '″'); str = str.replace(/‹/g, '‹'); str = str.replace(/›/g, '›'); str = str.replace(/‾/g, '‾'); str = str.replace(/€/g, '€'); str = str.replace(/™/g, '™'); str = str.replace(/←/g, '←'); str = str.replace(/↑/g, '↑'); str = str.replace(/→/g, '→'); str = str.replace(/↓/g, '↓'); str = str.replace(/↔/g, '↔'); str = str.replace(/↵/g, '↵'); str = str.replace(/⌈/g, '⌈'); str = str.replace(/⌉/g, '⌉'); str = str.replace(/⌊/g, '⌊'); str = str.replace(/⌋/g, '⌋'); str = str.replace(/◊/g, '◊'); str = str.replace(/♠/g, '♠'); str = str.replace(/♣/g, '♣'); str = str.replace(/♥/g, '♥'); str = str.replace(/♦/g, '♦'); str = str.replace(/'/g, "'"); return str; } function strDiscode(str) { str = strNumDiscode(str); str = strGreeceDiscode(str); str = strcharacterDiscode(str); str = strOtherDiscode(str); return str; } function urlToHttpUrl(url, domain) { if (/^\/\//.test(url)) { return `https:${url}`; } else if (/^\//.test(url)) { return `https://${domain}${url}`; } return url; } export default { strDiscode, urlToHttpUrl, }; parse.css/** * author: Di (微信小程序开发工程师) * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com) * 垂直微信小程序开发交流社区 * * github地址: https://github.com/icindy/wxParse * * for: 微信小程序富文本解析 * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184 */ /** * 请在全局下引入该文件，@import '/static/wxParse.css'; */ .wxParse { user-select:none; width: 100%; font-family: Helvetica, "PingFangSC", 'Microsoft Yahei', '微软雅黑', Arial, sans-serif; color: #333; line-height: 1.5; font-size: 1em; text-align:justify;/* //左右两端对齐 */ word-wrap: break-word;/*超出自动换行*/ } .wxParse view ,.wxParse uni-view{ word-break: break-word; } .wxParse .p { padding-bottom: 1em; clear: both; /* letter-spacing: 0;//字间距 */ } .wxParse .inline { display: inline; margin: 0; padding: 0; } .wxParse .div { margin: 0; padding: 0; display: block; } .wxParse .h1{ font-size: 2em; line-height: 1.2em; margin: 0.67em 0; } .wxParse .h2{ font-size: 1.5em; margin: 0.83em 0; } .wxParse .h3{ font-size: 1.17em; margin: 1em 0; } .wxParse .h4{ margin: 1.33em 0; } .wxParse .h5{ font-size: 0.83em; margin: 1.67em 0; } .wxParse .h6{ font-size: 0.83em; margin: 1.67em 0; } .wxParse .h1, .wxParse .h2, .wxParse .h3, .wxParse .h4, .wxParse .h5, .wxParse .h6, .wxParse .b, .wxParse .strong{ font-weight: bolder; } .wxParse .i, .wxParse .cite, .wxParse .em, .wxParse .var, .wxParse .address { font-style: italic; } .wxParse .pre, .wxParse .tt, .wxParse .code, .wxParse .kbd, .wxParse .samp { font-family: monospace; } .wxParse .pre { overflow: auto; background: #f5f5f5; padding: 16upx; white-space: pre; margin: 1em 0upx; } .wxParse .code { display: inline; background: #f5f5f5; } .wxParse .big { font-size: 1.17em; } .wxParse .small, .wxParse .sub, .wxParse .sup { font-size: 0.83em; } .wxParse .sub { vertical-align: sub; } .wxParse .sup { vertical-align: super; } .wxParse .s, .wxParse .strike, .wxParse .del { text-decoration: line-through; } .wxParse .strong, .wxParse .s { display: inline; } .wxParse .a { color: deepskyblue; } .wxParse .video { text-align: center; margin: 22upx 0; } .wxParse .video-video { width: 100%; } .wxParse .uni-image{ max-width: 100%; } .wxParse .img { display: block; max-width: 100%; margin-bottom: -1em;/* //与p标签底部padding同时修改 */ overflow: hidden; } .wxParse .blockquote { margin: 10upx 0; padding: 22upx 0 22upx 22upx; font-family: Courier, Calibri, "宋体"; background: #f5f5f5; border-left: 6upx solid #dbdbdb; } .wxParse .blockquote .p { margin: 0; } .wxParse .ul, .wxParse .ol { display: block; margin: 1em 0; padding-left: 2em; } .wxParse .ol { list-style-type: disc; } .wxParse .ol { list-style-type: decimal; } .wxParse .ol>weixin-parse-template,.wxParse .ul>weixin-parse-template { display: list-item; align-items: baseline; text-align: match-parent; } .wxParse .ol>.li,.wxParse .ul>.li { display: list-item; align-items: baseline; text-align: match-parent; } .wxParse .ul .ul, .wxParse .ol .ul { list-style-type: circle; } .wxParse .ol .ol .ul, .wxParse .ol .ul .ul, .wxParse .ul .ol .ul, .wxParse .ul .ul .ul { list-style-type: square; } .wxParse .u { text-decoration: underline; } .wxParse .hide { display: none; } .wxParse .del { display: inline; } .wxParse .figure { overflow: hidden; } .wxParse .table { border-collapse:collapse; box-sizing: border-box; /* 内边框 */ border: 1px solid #dadada; width: 100%; } .wxParse .tbody{ border-collapse:collapse; box-sizing: border-box; /* 内边框 */ border: 1px solid #dadada; } .wxParse .thead, .wxParse .tfoot, .wxParse .th{ border-collapse:collapse; box-sizing: border-box; background: #ececec; font-weight: 40; } .wxParse .tr { border-collapse:collapse; box-sizing: border-box; /* border: 2px solid #F0AD4E; */ overflow:auto; } .wxParse .th, .wxParse .td{ border-collapse:collapse; box-sizing: border-box; border: 2upx solid #dadada; overflow:auto; } .wxParse .audio, .wxParse .uni-audio-default{ display: block; } .textarea ._div{ background-color:#fff !important; } parse.vue <block v-for="(node, index) of nodes" :key="index" v-if="!loading"> <wxParseTemplate :node="node" /> </block> jihai-copyrightjihaiCopyright.vue <view class="cpr"> <view class="color-9"> 吉海科技 © jihainet.com </view> <view class="color-9"> 版权所有 </view> </view> jihai-lable.vue <view> <radio-group class="uni-list" @change="radioChange"> <view class="invoice-type-icon"> <radio class="a-radio" :id="item.name" :value="item.value" :checked="item.checked" :disabled="item.disabled"></radio> </view> <view class="invoice-type-c"> <text>{{item.name}}</text> </view> </radio-group> </view> jshopimagejshop-article.vue <view class='index-article cell-group bottom-cell-group' v-if="data.params.list && data.params.list.length > 0"> <view class='cell-item' v-for="item in data.params.list" :key="item.id" @click="articleDetail(item.id)" > <view class="cell-item-bd"> <view class="article-title "> {{ item.title }} </view> <view class="article-time"> {{ item.ctime }} </view> </view> <view class="cell-title-img"> <image :src="item.cover" mode="aspectFill"></image> </view> </view> </view> jshop-articleClassify.vue <view class='index-article cell-group bottom-cell-group' v-if="data.params.list && data.params.list.length > 0"> <view class='cell-item' v-for="item in data.params.list" :key="item.id" @click="articleDetail(item.id)" > <view class="cell-item-bd"> <view class="article-title "> {{ item.title }} </view> <view class="article-time"> {{ item.ctime }} </view> </view> <view class="cell-title-img"> <image :src="item.cover" mode="aspectFill"></image> </view> </view> </view> jshop-blank.vue <view class="blank" :style="{background:data.params.backgroundColor,height:data.params.height*2+'rpx'}"></view> jshop-content.vue <view class="content"> <u-parse :content="content" @preview="preview" @navigate="navigate" /> </view> jshop-coupon.vue <view class="coupon bottom-cell-group" v-if="data.params.list.length > 0"> <view class="coupon-item" v-for="item in data.params.list" :key="item.id" @click="receiveCoupon(item.id)"> <view class="coupon-i-l"> <view class="coupon-i-l-t"> <image class="icon" src="/static/image/element-ic.png" mode=""></image> <text>{{ item.name }}</text> </view> <view class="coupon-i-l-b"> {{ item.expression1 + item.expression2 }} </view> </view> <view class="coupon-i-r"> <image class="coupon-logo" src="/static/image/coupon-element.png" mode=""></image> </view> </view> </view> jshop-goods.vue <view class="index-goods"> <view class='img-grids bottom-cell-group' v-if="data.params.column == '2' && data.params.display == 'list' || data.params.column == '3' && data.params.display == 'list'" v-bind:class="'column'+data.params.column"> <view class='cell-item right-img' v-if="data.params.title != ''"> <view class='cell-item-hd'> <view class='cell-hd-title'>{{data.params.title}}</view> </view> <view class='cell-item-bd'> </view> <view class='cell-item-ft' v-if="data.params.lookMore == 'true'"> <image class='cell-ft-next icon' src='/static/image/right.png'></image> <text class='cell-ft-text' @click="goodsList({cat_id: data.params.classifyId,brand_id:data.params.brandId})">查看更多</text> </view> </view> <!-- <view class='img-grids'> --> <view class="" v-if="data.params.list.length"> <view class="img-grids-item" v-for="item in data.params.list" :key="item.id" @click="goodsDetail(item.id)"> <image class="img-grids-item-t have-none" :src="item.image_url" mode='aspectFill' ></image> <view class="img-grids-item-b"> <view class="goods-name grids-goods-name"> {{item.name}} </view> <view class="goods-item-c"> <view class="goods-price red-price">￥{{item.price}}</view> </view> </view> </view> </view> <view v-else-if="!data.params.list.length && !data.params.listAjax"> <view class='img-grids-item'> <image class='img-grids-item-t have-none' src='' mode=''></image> <view class='img-grids-item-b'> <view class='goods-name grids-goods-name have-none'></view> <view class='goods-item-c'> <view class='goods-price red-price have-none'></view> </view> </view> </view> <view class='img-grids-item'> <image class='img-grids-item-t have-none' src='' mode=''></image> <view class='img-grids-item-b'> <view class='goods-name grids-goods-name have-none'></view> <view class='goods-item-c'> <view class='goods-price red-price have-none'></view> </view> </view> </view> <view class='img-grids-item'> <image class='img-grids-item-t have-none' src='' mode=''></image> <view class='img-grids-item-b'> <view class='goods-name grids-goods-name have-none'></view> <view class='goods-item-c'> <view class='goods-price red-price have-none'></view> </view> </view> </view> </view> <!-- <view v-else=""> <scroll-view class='swiper-list' scroll-x="true"></scroll-view> </view> --> <!-- </view> --> </view> <view class="img-list bottom-cell-group" v-if="data.params.column == '1' && data.params.display == 'list'" > <view class='cell-item right-img' v-if="data.params.title != ''"> <view class='cell-item-hd'> <view class='cell-hd-title'>{{data.params.title}}</view> </view> <view class='cell-item-bd'> </view> <view class='cell-item-ft' v-if="data.params.lookMore == 'true'"> <image class='cell-ft-next icon' src='/static/image/right.png'></image> <text class='cell-ft-text' @click="goodsList({cat_id: data.params.classifyId,brand_id:data.params.brandId})">查看更多</text> </view> </view> <view v-if="data.params.list.length>0"> <view class="img-list-item" v-for="(item, index) in data.params.list" :key="index" @click="goodsDetail(item.id)"> <image class="img-list-item-l have-none" :src="item.image_url" mode='aspectFill'></image> <view class="img-list-item-r"> <view class="goods-name list-goods-name"> {{item.name}} </view> <view class="goods-item-c"> <view class="goods-price red-price">￥{{item.price}}</view> <view class="goods-buy"> <view class="goods-salesvolume" v-if="item.comments_count > 0">{{item.comments_count}}条评论</view> <view class="goods-salesvolume" v-else-if="item.comments_count <= 0">暂无评论</view> <image class="goods-cart" src="/static/image/ic-car.png"></image> </view> </view> </view> </view> </view> <view class="order-none" v-else> <image class="order-none-img" src="/static/image/order.png" mode=""></image> </view> </view> <view class='img-grids bottom-cell-group' v-if="data.params.column == '2' && data.params.display == 'slide' || data.params.column == '3' && data.params.display == 'slide'" v-bind:class="'slide'+data.params.column"> <view class='cell-item right-img' v-if="data.params.title != ''"> <view class='cell-item-hd'> <view class='cell-hd-title'>{{data.params.title}}</view> </view> <view class='cell-item-bd'> </view> <view class='cell-item-ft' v-if="data.params.lookMore == 'true'"> <image class='cell-ft-next icon' src='/static/image/right.png'></image> <text class='cell-ft-text' @click="goodsList({cat_id: data.params.classifyId,brand_id:data.params.brandId})">查看更多</text> </view> </view> <view class='swiper-grids'> <scroll-view class='swiper-list' scroll-x="true" v-if="data.params.list.length"> <view class='img-grids-item' v-for="item in data.params.list" :key="item.id" @click="goodsDetail(item.id)"> <image class='img-grids-item-t have-none' :src='item.image_url' mode='aspectFill'></image> <view class='img-grids-item-b'> <view class='goods-name grids-goods-name'>{{ item.name }}</view> <view class='goods-item-c'> <view class='goods-price red-price'>￥{{ item.price }}</view> </view> </view> </view> </scroll-view> <view v-else-if="!goodsListOfHotAjax && !goodsListOfHot.length"> <scroll-view class='swiper-list' scroll-x="true"> <view class='img-grids-item'> <image class='img-grids-item-t have-none' src='' mode='aspectFill'></image> <view class='img-grids-item-b'> <view class='goods-name grids-goods-name have-none'></view> <view class='goods-item-c'> <view class='goods-price red-price have-none'></view> </view> </view> </view> <view class='img-grids-item'> <image class='img-grids-item-t have-none' src='' mode='aspectFill'></image> <view class='img-grids-item-b'> <view class='goods-name grids-goods-name have-none'></view> <view class='goods-item-c'> <view class='goods-price red-price have-none'></view> </view> </view> </view> <view class='img-grids-item'> <image class='img-grids-item-t have-none' src='' mode=''></image> <view class='img-grids-item-b'> <view class='goods-name grids-goods-name have-none'></view> <view class='goods-item-c'> <view class='goods-price red-price have-none'></view> </view> </view> </view> </scroll-view> </view> <view v-else=""> <scroll-view class='swiper-list' scroll-x="true"></scroll-view> </view> </view> </view> </view> jshop-groupPurchase.vue <view class="img-list bottom-cell-group group-buying" v-if="data.params.list && data.params.list.length > 0"> <view class='cell-item right-img'> <view class='cell-item-hd group-title'> {{data.params.title}} <!-- <view class='cell-hd-title'></view> --> </view> </view> <view class='swiper-grids'> <scroll-view class='swiper-list' scroll-x="true"> <view class="img-list-item" v-if="item.goods !== 'undefined' && item.goods" v-for="(item, key) in data.params.list" :key="key"> <image class="img-list-item-l medium-img have-none" :src="item.goods.image_url" mode='aspectFill' @click="groupDetail(item.goods.id, item.goods.group_id)"></image> <view class="img-list-item-r medium-right"> <view class="goods-name list-goods-name" @click="groupDetail(item.goods.id, item.goods.group_id)">{{item.goods.name}}</view> <view class="goods-item-c"> <view class="goods-price red-price">￥{{item.goods.product.price}}</view> <view class="goods-buy"> <view class="goods-salesvolume red-price" v-if="(item.goods.lasttime != '已经结束' || item.goods.lasttime != '即将开始') && item.goods.lasttime">剩余：<uni-countdown :show-day="false" :hour="item.goods.lasttime.hour" :minute="item.goods.lasttime.minute" :second="item.goods.lasttime.second"></uni-countdown> </view> <view class="goods-salesvolume red-price" v-if="item.goods.lasttime == '已经结束'">已结束</view> <view class="goods-salesvolume red-price" v-if="item.goods.lasttime == '即将开始'">即将开始</view> <image class="goods-cart" src="/static/image/ic-car.png" @click="groupDetail(item.goods.id, item.goods.group_id)"></image> </view> </view> </view> </view> </scroll-view> </view> </view> jshop-imgSingle.vue <view class="ad jshop-imgsingle" v-if="data.params.list && data.params.list.length > 0"> <view class="" v-for="item in data.params.list" :key="item.id"> <image class="ad-img" :src="item.image" mode="widthFix" @click="showSliderInfo(item.linkType, item.linkValue)"></image> <view class="imgup-btn" v-if="item.buttonText != ''" @click="showSliderInfo(item.linkType, item.linkValue)"> {{item.buttonText}} </view> </view> </view> jshop-imgSlide.vue <view class='swiper bottom-cell-group' v-if="data.params.list && data.params.list.length > 0"> <swiper class="swiper-c" :indicator-dots="swiper.indicatorDots" :autoplay="swiper.autoplay" :interval="data.params.duration" :duration="swiper.duration"> <swiper-item class="have-none" v-for="(item, index) in data.params.list" :key="index"> <image class='' :src="item.image" @click="showSliderInfo(item.linkType, item.linkValue)" mode="aspectFill"></image> </swiper-item> </swiper> </view> jshop-imgWindow.vue <view class="imgwindow bottom-cell-group"> <view class="imgwindow-list" v-if="data.params.style == '2' ||data.params.style == '3' ||data.params.style == '4'" v-bind:class="'row'+data.params.style" :style="{margin:-data.params.margin+'px'}"> <view class="imgwindow-item" ref="imgwitem" :style="{height:height+'px',padding:data.params.margin+'px'}" v-for="(item, index) in data.params.list" :key="index"> <image :src="item.image" mode="aspectFill" @click="showSliderInfo(item.linkType, item.linkValue)"></image> </view> </view> <view class="imgwindow-list" v-if="data.params.style == '0'" v-bind:class="'row'+data.params.style" :style="{margin:-data.params.margin+'px'}"> <view class="imgwindow-item" ref="imgwitem" :style="{height:height+'px',padding:data.params.margin+'px'}" v-for="(item, index) in data.params.list" :key="index" v-if="index == 0"> <image :src="item.image" mode="aspectFill" @click="showSliderInfo(item.linkType, item.linkValue)"></image> </view> <view class="imgwindow-item" ref="imgwitem" :style="{height:height1+'px',padding:data.params.margin+'px'}" v-for="(item, index) in data.params.list" :key="index" v-if="index !== 0"> <image :src="item.image" mode="aspectFill" @click="showSliderInfo(item.linkType, item.linkValue)"></image> </view> </view> </view> jshop-navBar.vue <view class="imgnavbar bottom-cell-group"> <view class="imgnavbar-list" v-if="data.params.limit == '3' ||data.params.limit == '4' ||data.params.limit == '5'" v-bind:class="'row'+data.params.limit"> <view class="imgnavbar-item" ref="imgwitem" v-for="(item, index) in data.params.list" :key="index"> <image class="imgnavbar-item-img" :src="item.image" mode="aspectFill" @click="showSliderInfo(item.linkType, item.linkValue)"></image> <view class="imgnavbar-item-text">{{item.text}}</view> </view> </view> </view> jshop-notice.vue <view class="notice bottom-cell-group" v-if="data.params.list && data.params.list.length > 0"> <view class="notice-icon"> <image class="icon news-icon" src="/static/image/news.png" mode=""></image> </view> <swiper class="notice-c" :indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000" :vertical="true" :circular="true"> <swiper-item v-for="item in data.params.list" :key="item.id"> <view class="swiper-item" @click="goNotice(item.id)">{{ item.title }}</view> </swiper-item> </swiper> </view> jshop-pintuan.vue <view class="img-list bottom-cell-group group-buying" v-if="data.params.list && data.params.list.length > 0"> <view class='cell-item right-img'> <view class='cell-item-hd group-title'> {{data.params.title}} </view> </view> <view class='swiper-grids' > <scroll-view class='swiper-list' scroll-x="true"> <view class="img-list-item" v-if="item.goods_id !== 'undefined' && item.goods_id" v-for="(item, key) in data.params.list" :key="key"> <image class="img-list-item-l medium-img have-none" :src="item.goods_image" mode='aspectFill' @click="pintuanDetail(item.goods_id)"></image> <view class="img-list-item-r medium-right"> <view class="goods-name list-goods-name" @click="pintuanDetail(item.goods_id)">{{item.goods_name}}</view> <view class="goods-item-c"> <view class="goods-price red-price">￥{{item.pintuan_price}}</view> <view class="goods-buy"> <view class="goods-salesvolume red-price" v-if="(item.pintuan_start_status == 1) && item.lasttime">剩余：<uni-countdown :show-day="false" :hour="item.lasttime.hour" :minute="item.lasttime.minute" :second="item.lasttime.second"></uni-countdown></view> <view class="goods-salesvolume red-price" v-if="item.pintuan_start_status == 3">已结束</view> <view class="goods-salesvolume red-price" v-if="item.pintuan_start_status == 2">即将开团</view> <image class="goods-cart" src="/static/image/ic-car.png" @click="pintuanDetail(item.goods.id)"></image> </view> </view> </view> </view> </scroll-view> </view> </view> jshop-record.vue <view class="adbrathing" v-show="adbshow" v-bind:class="['adbrathing'+data.params.style.align,!hideanimation?'pc':hideanimation?'hc':'']" :style="{top:data.params.style.top+'%'}" > <view class="adbrathing-c"> <view class="adbrathing-l"> <image class="user-head-img" :src="log.avatar" mode="aspectFill"></image> <view class="user-name"> {{log.nickname}} </view> </view> <view class="adbrathing-r"> {{log.ctime}}{{log.desc}} </view> </view> </view> jshop-search.vue <view class="" > <view class="search" ref="searchBar" id="search"> <view class='search-c' @click='goSearch()'> <view class='search-input search-input-p' v-bind:class="data.params.style"> <view class="search-input-p-c"> {{data.params.keywords}} </view> </view> <image class='icon search-icon' src='/static/image/zoom.png'></image> </view> </view> <view class="search search-fixed" v-show="searchFixed"> <view class='search-c' @click='goSearch()'> <view class='search-input search-input-p' v-bind:class="data.params.style"> <view class="search-input-p-c"> {{data.params.keywords}} </view> </view> <image class='icon search-icon' src='/static/image/zoom.png'></image> </view> </view> </view> jshop-textarea.vue <view class="textarea bottom-cell-group" > <jshopContent :content="data.params" v-if="data.params"></jshopContent> </view> jshop-video.vue <view class="video bottom-cell-group" > </view> jshop.vue <view> <block v-for="(item,index) in data" :key="index"> <jshopsearch :data="item" v-if="item.widget_code=='search' "></jshopsearch> <jshopnotice :data="item" v-if="item.widget_code=='notice' "></jshopnotice> <jshopimgSlide :data="item" v-if="item.widget_code=='imgSlide' "></jshopimgSlide> <jshopcoupon :data="item" v-if="item.widget_code=='coupon' "></jshopcoupon> <jshopblank :data="item" v-if="item.widget_code=='blank' "></jshopblank> <jshoptextarea :data="item" v-if="item.widget_code=='textarea' "></jshoptextarea> <jshopvideo :data="item" v-if="item.widget_code=='video' "></jshopvideo> <jshopimgWindow :data="item" v-if="item.widget_code=='imgWindow' "></jshopimgWindow> <jshopimgSingle :data="item" v-if="item.widget_code=='imgSingle' "></jshopimgSingle> <jshopgoods :data="item" v-if="item.widget_code=='goods' "></jshopgoods> <jshoparticle :data="item" v-if="item.widget_code=='article' "></jshoparticle> <jshoparticleClassify :data="item" v-if="item.widget_code=='articleClassify' "></jshoparticleClassify> <jshopnavBar :data="item" v-if="item.widget_code=='navBar' "></jshopnavBar> <jshopgroupPurchase :data="item" v-if="item.widget_code=='groupPurchase' "></jshopgroupPurchase> <jshoprecord :data="item" v-if="item.widget_code=='record' "></jshoprecord> <jshoppintuan :data="item" v-if="item.widget_code=='pintuan' "></jshoppintuan> </block> </view> lvv-popuplvv-popup.vue <view class="lvv-popup" v-show="popshow" @touchmove.prevent> <view class="lvv-popupmark" :class="position=='top'&&!hideanimation?'pt':position=='left'&&!hideanimation?'pl':position=='right'&&!hideanimation?'pr':position=='bottom'&&!hideanimation?'pc':position=='top'&&hideanimation?'ht':position=='left'&&hideanimation?'hl':position=='right'&&hideanimation?'hr':position=='bottom'&&hideanimation?'hc':''" @click="close"></view> <view class="lvv-popupcontent" @click="close" :class="position=='top'&&!hideanimation?'pt':position=='left'&&!hideanimation?'pl':position=='right'&&!hideanimation?'pr':position=='bottom'&&!hideanimation?'pb':position=='top'&&hideanimation?'ht':position=='left'&&hideanimation?'hl':position=='right'&&hideanimation?'hr':position=='bottom'&&hideanimation?'hb':''"> <view class="realcontent" @click.stop=""> <slot></slot> </view> </view> </view> mpvue-citypickercity-dataarea.js/* eslint-disable */ var areaData = [ [ [{ "label": "东城区", "value": "110101" }, { "label": "西城区", "value": "110102" }, { "label": "朝阳区", "value": "110105" }, { "label": "丰台区", "value": "110106" }, { "label": "石景山区", "value": "110107" }, { "label": "海淀区", "value": "110108" }, { "label": "门头沟区", "value": "110109" }, { "label": "房山区", "value": "110111" }, { "label": "通州区", "value": "110112" }, { "label": "顺义区", "value": "110113" }, { "label": "昌平区", "value": "110114" }, { "label": "大兴区", "value": "110115" }, { "label": "怀柔区", "value": "110116" }, { "label": "平谷区", "value": "110117" }, { "label": "密云区", "value": "110118" }, { "label": "延庆区", "value": "110119" }] ], [ [{ "label": "和平区", "value": "120101" }, { "label": "河东区", "value": "120102" }, { "label": "河西区", "value": "120103" }, { "label": "南开区", "value": "120104" }, { "label": "河北区", "value": "120105" }, { "label": "红桥区", "value": "120106" }, { "label": "东丽区", "value": "120110" }, { "label": "西青区", "value": "120111" }, { "label": "津南区", "value": "120112" }, { "label": "北辰区", "value": "120113" }, { "label": "武清区", "value": "120114" }, { "label": "宝坻区", "value": "120115" }, { "label": "滨海新区", "value": "120116" }, { "label": "宁河区", "value": "120117" }, { "label": "静海区", "value": "120118" }, { "label": "蓟州区", "value": "120119" }] ], [ [{ "label": "市辖区", "value": "130101" }, { "label": "长安区", "value": "130102" }, { "label": "桥西区", "value": "130104" }, { "label": "新华区", "value": "130105" }, { "label": "井陉矿区", "value": "130107" }, { "label": "裕华区", "value": "130108" }, { "label": "藁城区", "value": "130109" }, { "label": "鹿泉区", "value": "130110" }, { "label": "栾城区", "value": "130111" }, { "label": "井陉县", "value": "130121" }, { "label": "正定县", "value": "130123" }, { "label": "行唐县", "value": "130125" }, { "label": "灵寿县", "value": "130126" }, { "label": "高邑县", "value": "130127" }, { "label": "深泽县", "value": "130128" }, { "label": "赞皇县", "value": "130129" }, { "label": "无极县", "value": "130130" }, { "label": "平山县", "value": "130131" }, { "label": "元氏县", "value": "130132" }, { "label": "赵县", "value": "130133" }, { "label": "晋州市", "value": "130183" }, { "label": "新乐市", "value": "130184" }], [{ "label": "市辖区", "value": "130201" }, { "label": "路南区", "value": "130202" }, { "label": "路北区", "value": "130203" }, { "label": "古冶区", "value": "130204" }, { "label": "开平区", "value": "130205" }, { "label": "丰南区", "value": "130207" }, { "label": "丰润区", "value": "130208" }, { "label": "曹妃甸区", "value": "130209" }, { "label": "滦县", "value": "130223" }, { "label": "滦南县", "value": "130224" }, { "label": "乐亭县", "value": "130225" }, { "label": "迁西县", "value": "130227" }, { "label": "玉田县", "value": "130229" }, { "label": "遵化市", "value": "130281" }, { "label": "迁安市", "value": "130283" }], [{ "label": "市辖区", "value": "130301" }, { "label": "海港区", "value": "130302" }, { "label": "山海关区", "value": "130303" }, { "label": "北戴河区", "value": "130304" }, { "label": "抚宁区", "value": "130306" }, { "label": "青龙满族自治县", "value": "130321" }, { "label": "昌黎县", "value": "130322" }, { "label": "卢龙县", "value": "130324" }], [{ "label": "市辖区", "value": "130401" }, { "label": "邯山区", "value": "130402" }, { "label": "丛台区", "value": "130403" }, { "label": "复兴区", "value": "130404" }, { "label": "峰峰矿区", "value": "130406" }, { "label": "邯郸县", "value": "130421" }, { "label": "临漳县", "value": "130423" }, { "label": "成安县", "value": "130424" }, { "label": "大名县", "value": "130425" }, { "label": "涉县", "value": "130426" }, { "label": "磁县", "value": "130427" }, { "label": "肥乡县", "value": "130428" }, { "label": "永年县", "value": "130429" }, { "label": "邱县", "value": "130430" }, { "label": "鸡泽县", "value": "130431" }, { "label": "广平县", "value": "130432" }, { "label": "馆陶县", "value": "130433" }, { "label": "魏县", "value": "130434" }, { "label": "曲周县", "value": "130435" }, { "label": "武安市", "value": "130481" }], [{ "label": "市辖区", "value": "130501" }, { "label": "桥东区", "value": "130502" }, { "label": "桥西区", "value": "130503" }, { "label": "邢台县", "value": "130521" }, { "label": "临城县", "value": "130522" }, { "label": "内丘县", "value": "130523" }, { "label": "柏乡县", "value": "130524" }, { "label": "隆尧县", "value": "130525" }, { "label": "任县", "value": "130526" }, { "label": "南和县", "value": "130527" }, { "label": "宁晋县", "value": "130528" }, { "label": "巨鹿县", "value": "130529" }, { "label": "新河县", "value": "130530" }, { "label": "广宗县", "value": "130531" }, { "label": "平乡县", "value": "130532" }, { "label": "威县", "value": "130533" }, { "label": "清河县", "value": "130534" }, { "label": "临西县", "value": "130535" }, { "label": "南宫市", "value": "130581" }, { "label": "沙河市", "value": "130582" }], [{ "label": "市辖区", "value": "130601" }, { "label": "竞秀区", "value": "130602" }, { "label": "莲池区", "value": "130606" }, { "label": "满城区", "value": "130607" }, { "label": "清苑区", "value": "130608" }, { "label": "徐水区", "value": "130609" }, { "label": "涞水县", "value": "130623" }, { "label": "阜平县", "value": "130624" }, { "label": "定兴县", "value": "130626" }, { "label": "唐县", "value": "130627" }, { "label": "高阳县", "value": "130628" }, { "label": "容城县", "value": "130629" }, { "label": "涞源县", "value": "130630" }, { "label": "望都县", "value": "130631" }, { "label": "安新县", "value": "130632" }, { "label": "易县", "value": "130633" }, { "label": "曲阳县", "value": "130634" }, { "label": "蠡县", "value": "130635" }, { "label": "顺平县", "value": "130636" }, { "label": "博野县", "value": "130637" }, { "label": "雄县", "value": "130638" }, { "label": "涿州市", "value": "130681" }, { "label": "安国市", "value": "130683" }, { "label": "高碑店市", "value": "130684" }], [{ "label": "市辖区", "value": "130701" }, { "label": "桥东区", "value": "130702" }, { "label": "桥西区", "value": "130703" }, { "label": "宣化区", "value": "130705" }, { "label": "下花园区", "value": "130706" }, { "label": "万全区", "value": "130708" }, { "label": "崇礼区", "value": "130709" }, { "label": "张北县", "value": "130722" }, { "label": "康保县", "value": "130723" }, { "label": "沽源县", "value": "130724" }, { "label": "尚义县", "value": "130725" }, { "label": "蔚县", "value": "130726" }, { "label": "阳原县", "value": "130727" }, { "label": "怀安县", "value": "130728" }, { "label": "怀来县", "value": "130730" }, { "label": "涿鹿县", "value": "130731" }, { "label": "赤城县", "value": "130732" }], [{ "label": "市辖区", "value": "130801" }, { "label": "双桥区", "value": "130802" }, { "label": "双滦区", "value": "130803" }, { "label": "鹰手营子矿区", "value": "130804" }, { "label": "承德县", "value": "130821" }, { "label": "兴隆县", "value": "130822" }, { "label": "平泉县", "value": "130823" }, { "label": "滦平县", "value": "130824" }, { "label": "隆化县", "value": "130825" }, { "label": "丰宁满族自治县", "value": "130826" }, { "label": "宽城满族自治县", "value": "130827" }, { "label": "围场满族蒙古族自治县", "value": "130828" }], [{ "label": "市辖区", "value": "130901" }, { "label": "新华区", "value": "130902" }, { "label": "运河区", "value": "130903" }, { "label": "沧县", "value": "130921" }, { "label": "青县", "value": "130922" }, { "label": "东光县", "value": "130923" }, { "label": "海兴县", "value": "130924" }, { "label": "盐山县", "value": "130925" }, { "label": "肃宁县", "value": "130926" }, { "label": "南皮县", "value": "130927" }, { "label": "吴桥县", "value": "130928" }, { "label": "献县", "value": "130929" }, { "label": "孟村回族自治县", "value": "130930" }, { "label": "泊头市", "value": "130981" }, { "label": "任丘市", "value": "130982" }, { "label": "黄骅市", "value": "130983" }, { "label": "河间市", "value": "130984" }], [{ "label": "市辖区", "value": "131001" }, { "label": "安次区", "value": "131002" }, { "label": "广阳区", "value": "131003" }, { "label": "固安县", "value": "131022" }, { "label": "永清县", "value": "131023" }, { "label": "香河县", "value": "131024" }, { "label": "大城县", "value": "131025" }, { "label": "文安县", "value": "131026" }, { "label": "大厂回族自治县", "value": "131028" }, { "label": "霸州市", "value": "131081" }, { "label": "三河市", "value": "131082" }], [{ "label": "市辖区", "value": "131101" }, { "label": "桃城区", "value": "131102" }, { "label": "冀州区", "value": "131103" }, { "label": "枣强县", "value": "131121" }, { "label": "武邑县", "value": "131122" }, { "label": "武强县", "value": "131123" }, { "label": "饶阳县", "value": "131124" }, { "label": "安平县", "value": "131125" }, { "label": "故城县", "value": "131126" }, { "label": "景县", "value": "131127" }, { "label": "阜城县", "value": "131128" }, { "label": "深州市", "value": "131182" }], [{ "label": "市辖区", "value": "139001" }, { "label": "辛集市", "value": "139002" }] ], [ [{ "label": "市辖区", "value": "140101" }, { "label": "小店区", "value": "140105" }, { "label": "迎泽区", "value": "140106" }, { "label": "杏花岭区", "value": "140107" }, { "label": "尖草坪区", "value": "140108" }, { "label": "万柏林区", "value": "140109" }, { "label": "晋源区", "value": "140110" }, { "label": "清徐县", "value": "140121" }, { "label": "阳曲县", "value": "140122" }, { "label": "娄烦县", "value": "140123" }, { "label": "古交市", "value": "140181" }], [{ "label": "市辖区", "value": "140201" }, { "label": "城区", "value": "140202" }, { "label": "矿区", "value": "140203" }, { "label": "南郊区", "value": "140211" }, { "label": "新荣区", "value": "140212" }, { "label": "阳高县", "value": "140221" }, { "label": "天镇县", "value": "140222" }, { "label": "广灵县", "value": "140223" }, { "label": "灵丘县", "value": "140224" }, { "label": "浑源县", "value": "140225" }, { "label": "左云县", "value": "140226" }, { "label": "大同县", "value": "140227" }], [{ "label": "市辖区", "value": "140301" }, { "label": "城区", "value": "140302" }, { "label": "矿区", "value": "140303" }, { "label": "郊区", "value": "140311" }, { "label": "平定县", "value": "140321" }, { "label": "盂县", "value": "140322" }], [{ "label": "市辖区", "value": "140401" }, { "label": "城区", "value": "140402" }, { "label": "郊区", "value": "140411" }, { "label": "长治县", "value": "140421" }, { "label": "襄垣县", "value": "140423" }, { "label": "屯留县", "value": "140424" }, { "label": "平顺县", "value": "140425" }, { "label": "黎城县", "value": "140426" }, { "label": "壶关县", "value": "140427" }, { "label": "长子县", "value": "140428" }, { "label": "武乡县", "value": "140429" }, { "label": "沁县", "value": "140430" }, { "label": "沁源县", "value": "140431" }, { "label": "潞城市", "value": "140481" }], [{ "label": "市辖区", "value": "140501" }, { "label": "城区", "value": "140502" }, { "label": "沁水县", "value": "140521" }, { "label": "阳城县", "value": "140522" }, { "label": "陵川县", "value": "140524" }, { "label": "泽州县", "value": "140525" }, { "label": "高平市", "value": "140581" }], [{ "label": "市辖区", "value": "140601" }, { "label": "朔城区", "value": "140602" }, { "label": "平鲁区", "value": "140603" }, { "label": "山阴县", "value": "140621" }, { "label": "应县", "value": "140622" }, { "label": "右玉县", "value": "140623" }, { "label": "怀仁县", "value": "140624" }], [{ "label": "市辖区", "value": "140701" }, { "label": "榆次区", "value": "140702" }, { "label": "榆社县", "value": "140721" }, { "label": "左权县", "value": "140722" }, { "label": "和顺县", "value": "140723" }, { "label": "昔阳县", "value": "140724" }, { "label": "寿阳县", "value": "140725" }, { "label": "太谷县", "value": "140726" }, { "label": "祁县", "value": "140727" }, { "label": "平遥县", "value": "140728" }, { "label": "灵石县", "value": "140729" }, { "label": "介休市", "value": "140781" }], [{ "label": "市辖区", "value": "140801" }, { "label": "盐湖区", "value": "140802" }, { "label": "临猗县", "value": "140821" }, { "label": "万荣县", "value": "140822" }, { "label": "闻喜县", "value": "140823" }, { "label": "稷山县", "value": "140824" }, { "label": "新绛县", "value": "140825" }, { "label": "绛县", "value": "140826" }, { "label": "垣曲县", "value": "140827" }, { "label": "夏县", "value": "140828" }, { "label": "平陆县", "value": "140829" }, { "label": "芮城县", "value": "140830" }, { "label": "永济市", "value": "140881" }, { "label": "河津市", "value": "140882" }], [{ "label": "市辖区", "value": "140901" }, { "label": "忻府区", "value": "140902" }, { "label": "定襄县", "value": "140921" }, { "label": "五台县", "value": "140922" }, { "label": "代县", "value": "140923" }, { "label": "繁峙县", "value": "140924" }, { "label": "宁武县", "value": "140925" }, { "label": "静乐县", "value": "140926" }, { "label": "神池县", "value": "140927" }, { "label": "五寨县", "value": "140928" }, { "label": "岢岚县", "value": "140929" }, { "label": "河曲县", "value": "140930" }, { "label": "保德县", "value": "140931" }, { "label": "偏关县", "value": "140932" }, { "label": "原平市", "value": "140981" }], [{ "label": "市辖区", "value": "141001" }, { "label": "尧都区", "value": "141002" }, { "label": "曲沃县", "value": "141021" }, { "label": "翼城县", "value": "141022" }, { "label": "襄汾县", "value": "141023" }, { "label": "洪洞县", "value": "141024" }, { "label": "古县", "value": "141025" }, { "label": "安泽县", "value": "141026" }, { "label": "浮山县", "value": "141027" }, { "label": "吉县", "value": "141028" }, { "label": "乡宁县", "value": "141029" }, { "label": "大宁县", "value": "141030" }, { "label": "隰县", "value": "141031" }, { "label": "永和县", "value": "141032" }, { "label": "蒲县", "value": "141033" }, { "label": "汾西县", "value": "141034" }, { "label": "侯马市", "value": "141081" }, { "label": "霍州市", "value": "141082" }], [{ "label": "市辖区", "value": "141101" }, { "label": "离石区", "value": "141102" }, { "label": "文水县", "value": "141121" }, { "label": "交城县", "value": "141122" }, { "label": "兴县", "value": "141123" }, { "label": "临县", "value": "141124" }, { "label": "柳林县", "value": "141125" }, { "label": "石楼县", "value": "141126" }, { "label": "岚县", "value": "141127" }, { "label": "方山县", "value": "141128" }, { "label": "中阳县", "value": "141129" }, { "label": "交口县", "value": "141130" }, { "label": "孝义市", "value": "141181" }, { "label": "汾阳市", "value": "141182" }] ], [ [{ "label": "市辖区", "value": "150101" }, { "label": "新城区", "value": "150102" }, { "label": "回民区", "value": "150103" }, { "label": "玉泉区", "value": "150104" }, { "label": "赛罕区", "value": "150105" }, { "label": "土默特左旗", "value": "150121" }, { "label": "托克托县", "value": "150122" }, { "label": "和林格尔县", "value": "150123" }, { "label": "清水河县", "value": "150124" }, { "label": "武川县", "value": "150125" }], [{ "label": "市辖区", "value": "150201" }, { "label": "东河区", "value": "150202" }, { "label": "昆都仑区", "value": "150203" }, { "label": "青山区", "value": "150204" }, { "label": "石拐区", "value": "150205" }, { "label": "白云鄂博矿区", "value": "150206" }, { "label": "九原区", "value": "150207" }, { "label": "土默特右旗", "value": "150221" }, { "label": "固阳县", "value": "150222" }, { "label": "达尔罕茂明安联合旗", "value": "150223" }], [{ "label": "市辖区", "value": "150301" }, { "label": "海勃湾区", "value": "150302" }, { "label": "海南区", "value": "150303" }, { "label": "乌达区", "value": "150304" }], [{ "label": "市辖区", "value": "150401" }, { "label": "红山区", "value": "150402" }, { "label": "元宝山区", "value": "150403" }, { "label": "松山区", "value": "150404" }, { "label": "阿鲁科尔沁旗", "value": "150421" }, { "label": "巴林左旗", "value": "150422" }, { "label": "巴林右旗", "value": "150423" }, { "label": "林西县", "value": "150424" }, { "label": "克什克腾旗", "value": "150425" }, { "label": "翁牛特旗", "value": "150426" }, { "label": "喀喇沁旗", "value": "150428" }, { "label": "宁城县", "value": "150429" }, { "label": "敖汉旗", "value": "150430" }], [{ "label": "市辖区", "value": "150501" }, { "label": "科尔沁区", "value": "150502" }, { "label": "科尔沁左翼中旗", "value": "150521" }, { "label": "科尔沁左翼后旗", "value": "150522" }, { "label": "开鲁县", "value": "150523" }, { "label": "库伦旗", "value": "150524" }, { "label": "奈曼旗", "value": "150525" }, { "label": "扎鲁特旗", "value": "150526" }, { "label": "霍林郭勒市", "value": "150581" }], [{ "label": "市辖区", "value": "150601" }, { "label": "东胜区", "value": "150602" }, { "label": "康巴什区", "value": "150603" }, { "label": "达拉特旗", "value": "150621" }, { "label": "准格尔旗", "value": "150622" }, { "label": "鄂托克前旗", "value": "150623" }, { "label": "鄂托克旗", "value": "150624" }, { "label": "杭锦旗", "value": "150625" }, { "label": "乌审旗", "value": "150626" }, { "label": "伊金霍洛旗", "value": "150627" }], [{ "label": "市辖区", "value": "150701" }, { "label": "海拉尔区", "value": "150702" }, { "label": "扎赉诺尔区", "value": "150703" }, { "label": "阿荣旗", "value": "150721" }, { "label": "莫力达瓦达斡尔族自治旗", "value": "150722" }, { "label": "鄂伦春自治旗", "value": "150723" }, { "label": "鄂温克族自治旗", "value": "150724" }, { "label": "陈巴尔虎旗", "value": "150725" }, { "label": "新巴尔虎左旗", "value": "150726" }, { "label": "新巴尔虎右旗", "value": "150727" }, { "label": "满洲里市", "value": "150781" }, { "label": "牙克石市", "value": "150782" }, { "label": "扎兰屯市", "value": "150783" }, { "label": "额尔古纳市", "value": "150784" }, { "label": "根河市", "value": "150785" }], [{ "label": "市辖区", "value": "150801" }, { "label": "临河区", "value": "150802" }, { "label": "五原县", "value": "150821" }, { "label": "磴口县", "value": "150822" }, { "label": "乌拉特前旗", "value": "150823" }, { "label": "乌拉特中旗", "value": "150824" }, { "label": "乌拉特后旗", "value": "150825" }, { "label": "杭锦后旗", "value": "150826" }], [{ "label": "市辖区", "value": "150901" }, { "label": "集宁区", "value": "150902" }, { "label": "卓资县", "value": "150921" }, { "label": "化德县", "value": "150922" }, { "label": "商都县", "value": "150923" }, { "label": "兴和县", "value": "150924" }, { "label": "凉城县", "value": "150925" }, { "label": "察哈尔右翼前旗", "value": "150926" }, { "label": "察哈尔右翼中旗", "value": "150927" }, { "label": "察哈尔右翼后旗", "value": "150928" }, { "label": "四子王旗", "value": "150929" }, { "label": "丰镇市", "value": "150981" }], [{ "label": "市辖区", "value": "152201" }, { "label": "阿尔山市", "value": "152202" }, { "label": "科尔沁右翼前旗", "value": "152221" }, { "label": "科尔沁右翼中旗", "value": "152222" }, { "label": "扎赉特旗", "value": "152223" }, { "label": "突泉县", "value": "152224" }], [{ "label": "市辖区", "value": "152501" }, { "label": "锡林浩特市", "value": "152502" }, { "label": "阿巴嘎旗", "value": "152522" }, { "label": "苏尼特左旗", "value": "152523" }, { "label": "苏尼特右旗", "value": "152524" }, { "label": "东乌珠穆沁旗", "value": "152525" }, { "label": "西乌珠穆沁旗", "value": "152526" }, { "label": "太仆寺旗", "value": "152527" }, { "label": "镶黄旗", "value": "152528" }, { "label": "正镶白旗", "value": "152529" }, { "label": "正蓝旗", "value": "152530" }, { "label": "多伦县", "value": "152531" }], [{ "label": "阿拉善左旗", "value": "152921" }, { "label": "阿拉善右旗", "value": "152922" }, { "label": "额济纳旗", "value": "152923" }] ], [ [{ "label": "市辖区", "value": "210101" }, { "label": "和平区", "value": "210102" }, { "label": "沈河区", "value": "210103" }, { "label": "大东区", "value": "210104" }, { "label": "皇姑区", "value": "210105" }, { "label": "铁西区", "value": "210106" }, { "label": "苏家屯区", "value": "210111" }, { "label": "浑南区", "value": "210112" }, { "label": "沈北新区", "value": "210113" }, { "label": "于洪区", "value": "210114" }, { "label": "辽中区", "value": "210115" }, { "label": "康平县", "value": "210123" }, { "label": "法库县", "value": "210124" }, { "label": "新民市", "value": "210181" }], [{ "label": "市辖区", "value": "210201" }, { "label": "中山区", "value": "210202" }, { "label": "西岗区", "value": "210203" }, { "label": "沙河口区", "value": "210204" }, { "label": "甘井子区", "value": "210211" }, { "label": "旅顺口区", "value": "210212" }, { "label": "金州区", "value": "210213" }, { "label": "普兰店区", "value": "210214" }, { "label": "长海县", "value": "210224" }, { "label": "瓦房店市", "value": "210281" }, { "label": "庄河市", "value": "210283" }], [{ "label": "市辖区", "value": "210301" }, { "label": "铁东区", "value": "210302" }, { "label": "铁西区", "value": "210303" }, { "label": "立山区", "value": "210304" }, { "label": "千山区", "value": "210311" }, { "label": "台安县", "value": "210321" }, { "label": "岫岩满族自治县", "value": "210323" }, { "label": "海城市", "value": "210381" }], [{ "label": "市辖区", "value": "210401" }, { "label": "新抚区", "value": "210402" }, { "label": "东洲区", "value": "210403" }, { "label": "望花区", "value": "210404" }, { "label": "顺城区", "value": "210411" }, { "label": "抚顺县", "value": "210421" }, { "label": "新宾满族自治县", "value": "210422" }, { "label": "清原满族自治县", "value": "210423" }], [{ "label": "市辖区", "value": "210501" }, { "label": "平山区", "value": "210502" }, { "label": "溪湖区", "value": "210503" }, { "label": "明山区", "value": "210504" }, { "label": "南芬区", "value": "210505" }, { "label": "本溪满族自治县", "value": "210521" }, { "label": "桓仁满族自治县", "value": "210522" }], [{ "label": "市辖区", "value": "210601" }, { "label": "元宝区", "value": "210602" }, { "label": "振兴区", "value": "210603" }, { "label": "振安区", "value": "210604" }, { "label": "宽甸满族自治县", "value": "210624" }, { "label": "东港市", "value": "210681" }, { "label": "凤城市", "value": "210682" }], [{ "label": "市辖区", "value": "210701" }, { "label": "古塔区", "value": "210702" }, { "label": "凌河区", "value": "210703" }, { "label": "太和区", "value": "210711" }, { "label": "黑山县", "value": "210726" }, { "label": "义县", "value": "210727" }, { "label": "凌海市", "value": "210781" }, { "label": "北镇市", "value": "210782" }], [{ "label": "市辖区", "value": "210801" }, { "label": "站前区", "value": "210802" }, { "label": "西市区", "value": "210803" }, { "label": "鲅鱼圈区", "value": "210804" }, { "label": "老边区", "value": "210811" }, { "label": "盖州市", "value": "210881" }, { "label": "大石桥市", "value": "210882" }], [{ "label": "市辖区", "value": "210901" }, { "label": "海州区", "value": "210902" }, { "label": "新邱区", "value": "210903" }, { "label": "太平区", "value": "210904" }, { "label": "清河门区", "value": "210905" }, { "label": "细河区", "value": "210911" }, { "label": "阜新蒙古族自治县", "value": "210921" }, { "label": "彰武县", "value": "210922" }], [{ "label": "市辖区", "value": "211001" }, { "label": "白塔区", "value": "211002" }, { "label": "文圣区", "value": "211003" }, { "label": "宏伟区", "value": "211004" }, { "label": "弓长岭区", "value": "211005" }, { "label": "太子河区", "value": "211011" }, { "label": "辽阳县", "value": "211021" }, { "label": "灯塔市", "value": "211081" }], [{ "label": "市辖区", "value": "211101" }, { "label": "双台子区", "value": "211102" }, { "label": "兴隆台区", "value": "211103" }, { "label": "大洼区", "value": "211104" }, { "label": "盘山县", "value": "211122" }], [{ "label": "市辖区", "value": "211201" }, { "label": "银州区", "value": "211202" }, { "label": "清河区", "value": "211204" }, { "label": "铁岭县", "value": "211221" }, { "label": "西丰县", "value": "211223" }, { "label": "昌图县", "value": "211224" }, { "label": "调兵山市", "value": "211281" }, { "label": "开原市", "value": "211282" }], [{ "label": "市辖区", "value": "211301" }, { "label": "双塔区", "value": "211302" }, { "label": "龙城区", "value": "211303" }, { "label": "朝阳县", "value": "211321" }, { "label": "建平县", "value": "211322" }, { "label": "喀喇沁左翼蒙古族自治县", "value": "211324" }, { "label": "北票市", "value": "211381" }, { "label": "凌源市", "value": "211382" }], [{ "label": "市辖区", "value": "211401" }, { "label": "连山区", "value": "211402" }, { "label": "龙港区", "value": "211403" }, { "label": "南票区", "value": "211404" }, { "label": "绥中县", "value": "211421" }, { "label": "建昌县", "value": "211422" }, { "label": "兴城市", "value": "211481" }] ], [ [{ "label": "市辖区", "value": "220101" }, { "label": "南关区", "value": "220102" }, { "label": "宽城区", "value": "220103" }, { "label": "朝阳区", "value": "220104" }, { "label": "二道区", "value": "220105" }, { "label": "绿园区", "value": "220106" }, { "label": "双阳区", "value": "220112" }, { "label": "九台区", "value": "220113" }, { "label": "农安县", "value": "220122" }, { "label": "榆树市", "value": "220182" }, { "label": "德惠市", "value": "220183" }], [{ "label": "市辖区", "value": "220201" }, { "label": "昌邑区", "value": "220202" }, { "label": "龙潭区", "value": "220203" }, { "label": "船营区", "value": "220204" }, { "label": "丰满区", "value": "220211" }, { "label": "永吉县", "value": "220221" }, { "label": "蛟河市", "value": "220281" }, { "label": "桦甸市", "value": "220282" }, { "label": "舒兰市", "value": "220283" }, { "label": "磐石市", "value": "220284" }], [{ "label": "市辖区", "value": "220301" }, { "label": "铁西区", "value": "220302" }, { "label": "铁东区", "value": "220303" }, { "label": "梨树县", "value": "220322" }, { "label": "伊通满族自治县", "value": "220323" }, { "label": "公主岭市", "value": "220381" }, { "label": "双辽市", "value": "220382" }], [{ "label": "市辖区", "value": "220401" }, { "label": "龙山区", "value": "220402" }, { "label": "西安区", "value": "220403" }, { "label": "东丰县", "value": "220421" }, { "label": "东辽县", "value": "220422" }], [{ "label": "市辖区", "value": "220501" }, { "label": "东昌区", "value": "220502" }, { "label": "二道江区", "value": "220503" }, { "label": "通化县", "value": "220521" }, { "label": "辉南县", "value": "220523" }, { "label": "柳河县", "value": "220524" }, { "label": "梅河口市", "value": "220581" }, { "label": "集安市", "value": "220582" }], [{ "label": "市辖区", "value": "220601" }, { "label": "浑江区", "value": "220602" }, { "label": "江源区", "value": "220605" }, { "label": "抚松县", "value": "220621" }, { "label": "靖宇县", "value": "220622" }, { "label": "长白朝鲜族自治县", "value": "220623" }, { "label": "临江市", "value": "220681" }], [{ "label": "市辖区", "value": "220701" }, { "label": "宁江区", "value": "220702" }, { "label": "前郭尔罗斯蒙古族自治县", "value": "220721" }, { "label": "长岭县", "value": "220722" }, { "label": "乾安县", "value": "220723" }, { "label": "扶余市", "value": "220781" }], [{ "label": "市辖区", "value": "220801" }, { "label": "洮北区", "value": "220802" }, { "label": "镇赉县", "value": "220821" }, { "label": "通榆县", "value": "220822" }, { "label": "洮南市", "value": "220881" }, { "label": "大安市", "value": "220882" }], [{ "label": "市辖区", "value": "222401" }, { "label": "图们市", "value": "222402" }, { "label": "敦化市", "value": "222403" }, { "label": "珲春市", "value": "222404" }, { "label": "龙井市", "value": "222405" }, { "label": "和龙市", "value": "222406" }, { "label": "汪清县", "value": "222424" }, { "label": "安图县", "value": "222426" }] ], [ [{ "label": "市辖区", "value": "230101" }, { "label": "道里区", "value": "230102" }, { "label": "南岗区", "value": "230103" }, { "label": "道外区", "value": "230104" }, { "label": "平房区", "value": "230108" }, { "label": "松北区", "value": "230109" }, { "label": "香坊区", "value": "230110" }, { "label": "呼兰区", "value": "230111" }, { "label": "阿城区", "value": "230112" }, { "label": "双城区", "value": "230113" }, { "label": "依兰县", "value": "230123" }, { "label": "方正县", "value": "230124" }, { "label": "宾县", "value": "230125" }, { "label": "巴彦县", "value": "230126" }, { "label": "木兰县", "value": "230127" }, { "label": "通河县", "value": "230128" }, { "label": "延寿县", "value": "230129" }, { "label": "尚志市", "value": "230183" }, { "label": "五常市", "value": "230184" }], [{ "label": "市辖区", "value": "230201" }, { "label": "龙沙区", "value": "230202" }, { "label": "建华区", "value": "230203" }, { "label": "铁锋区", "value": "230204" }, { "label": "昂昂溪区", "value": "230205" }, { "label": "富拉尔基区", "value": "230206" }, { "label": "碾子山区", "value": "230207" }, { "label": "梅里斯达斡尔族区", "value": "230208" }, { "label": "龙江县", "value": "230221" }, { "label": "依安县", "value": "230223" }, { "label": "泰来县", "value": "230224" }, { "label": "甘南县", "value": "230225" }, { "label": "富裕县", "value": "230227" }, { "label": "克山县", "value": "230229" }, { "label": "克东县", "value": "230230" }, { "label": "拜泉县", "value": "230231" }, { "label": "讷河市", "value": "230281" }], [{ "label": "市辖区", "value": "230301" }, { "label": "鸡冠区", "value": "230302" }, { "label": "恒山区", "value": "230303" }, { "label": "滴道区", "value": "230304" }, { "label": "梨树区", "value": "230305" }, { "label": "城子河区", "value": "230306" }, { "label": "麻山区", "value": "230307" }, { "label": "鸡东县", "value": "230321" }, { "label": "虎林市", "value": "230381" }, { "label": "密山市", "value": "230382" }], [{ "label": "市辖区", "value": "230401" }, { "label": "向阳区", "value": "230402" }, { "label": "工农区", "value": "230403" }, { "label": "南山区", "value": "230404" }, { "label": "兴安区", "value": "230405" }, { "label": "东山区", "value": "230406" }, { "label": "兴山区", "value": "230407" }, { "label": "萝北县", "value": "230421" }, { "label": "绥滨县", "value": "230422" }], [{ "label": "市辖区", "value": "230501" }, { "label": "尖山区", "value": "230502" }, { "label": "岭东区", "value": "230503" }, { "label": "四方台区", "value": "230505" }, { "label": "宝山区", "value": "230506" }, { "label": "集贤县", "value": "230521" }, { "label": "友谊县", "value": "230522" }, { "label": "宝清县", "value": "230523" }, { "label": "饶河县", "value": "230524" }], [{ "label": "市辖区", "value": "230601" }, { "label": "萨尔图区", "value": "230602" }, { "label": "龙凤区", "value": "230603" }, { "label": "让胡路区", "value": "230604" }, { "label": "红岗区", "value": "230605" }, { "label": "大同区", "value": "230606" }, { "label": "肇州县", "value": "230621" }, { "label": "肇源县", "value": "230622" }, { "label": "林甸县", "value": "230623" }, { "label": "杜尔伯特蒙古族自治县", "value": "230624" }], [{ "label": "市辖区", "value": "230701" }, { "label": "伊春区", "value": "230702" }, { "label": "南岔区", "value": "230703" }, { "label": "友好区", "value": "230704" }, { "label": "西林区", "value": "230705" }, { "label": "翠峦区", "value": "230706" }, { "label": "新青区", "value": "230707" }, { "label": "美溪区", "value": "230708" }, { "label": "金山屯区", "value": "230709" }, { "label": "五营区", "value": "230710" }, { "label": "乌马河区", "value": "230711" }, { "label": "汤旺河区", "value": "230712" }, { "label": "带岭区", "value": "230713" }, { "label": "乌伊岭区", "value": "230714" }, { "label": "红星区", "value": "230715" }, { "label": "上甘岭区", "value": "230716" }, { "label": "嘉荫县", "value": "230722" }, { "label": "铁力市", "value": "230781" }], [{ "label": "市辖区", "value": "230801" }, { "label": "向阳区", "value": "230803" }, { "label": "前进区", "value": "230804" }, { "label": "东风区", "value": "230805" }, { "label": "郊区", "value": "230811" }, { "label": "桦南县", "value": "230822" }, { "label": "桦川县", "value": "230826" }, { "label": "汤原县", "value": "230828" }, { "label": "同江市", "value": "230881" }, { "label": "富锦市", "value": "230882" }, { "label": "抚远市", "value": "230883" }], [{ "label": "市辖区", "value": "230901" }, { "label": "新兴区", "value": "230902" }, { "label": "桃山区", "value": "230903" }, { "label": "茄子河区", "value": "230904" }, { "label": "勃利县", "value": "230921" }], [{ "label": "市辖区", "value": "231001" }, { "label": "东安区", "value": "231002" }, { "label": "阳明区", "value": "231003" }, { "label": "爱民区", "value": "231004" }, { "label": "西安区", "value": "231005" }, { "label": "林口县", "value": "231025" }, { "label": "绥芬河市", "value": "231081" }, { "label": "海林市", "value": "231083" }, { "label": "宁安市", "value": "231084" }, { "label": "穆棱市", "value": "231085" }, { "label": "东宁市", "value": "231086" }], [{ "label": "市辖区", "value": "231101" }, { "label": "爱辉区", "value": "231102" }, { "label": "嫩江县", "value": "231121" }, { "label": "逊克县", "value": "231123" }, { "label": "孙吴县", "value": "231124" }, { "label": "北安市", "value": "231181" }, { "label": "五大连池市", "value": "231182" }], [{ "label": "市辖区", "value": "231201" }, { "label": "北林区", "value": "231202" }, { "label": "望奎县", "value": "231221" }, { "label": "兰西县", "value": "231222" }, { "label": "青冈县", "value": "231223" }, { "label": "庆安县", "value": "231224" }, { "label": "明水县", "value": "231225" }, { "label": "绥棱县", "value": "231226" }, { "label": "安达市", "value": "231281" }, { "label": "肇东市", "value": "231282" }, { "label": "海伦市", "value": "231283" }], [{ "label": "呼玛县", "value": "232721" }, { "label": "塔河县", "value": "232722" }, { "label": "漠河县", "value": "232723" }] ], [ [{ "label": "黄浦区", "value": "310101" }, { "label": "徐汇区", "value": "310104" }, { "label": "长宁区", "value": "310105" }, { "label": "静安区", "value": "310106" }, { "label": "普陀区", "value": "310107" }, { "label": "虹口区", "value": "310109" }, { "label": "杨浦区", "value": "310110" }, { "label": "闵行区", "value": "310112" }, { "label": "宝山区", "value": "310113" }, { "label": "嘉定区", "value": "310114" }, { "label": "浦东新区", "value": "310115" }, { "label": "金山区", "value": "310116" }, { "label": "松江区", "value": "310117" }, { "label": "青浦区", "value": "310118" }, { "label": "奉贤区", "value": "310120" }, { "label": "崇明区", "value": "310151" }] ], [ [{ "label": "市辖区", "value": "320101" }, { "label": "玄武区", "value": "320102" }, { "label": "秦淮区", "value": "320104" }, { "label": "建邺区", "value": "320105" }, { "label": "鼓楼区", "value": "320106" }, { "label": "浦口区", "value": "320111" }, { "label": "栖霞区", "value": "320113" }, { "label": "雨花台区", "value": "320114" }, { "label": "江宁区", "value": "320115" }, { "label": "六合区", "value": "320116" }, { "label": "溧水区", "value": "320117" }, { "label": "高淳区", "value": "320118" }], [{ "label": "市辖区", "value": "320201" }, { "label": "锡山区", "value": "320205" }, { "label": "惠山区", "value": "320206" }, { "label": "滨湖区", "value": "320211" }, { "label": "梁溪区", "value": "320213" }, { "label": "新吴区", "value": "320214" }, { "label": "江阴市", "value": "320281" }, { "label": "宜兴市", "value": "320282" }], [{ "label": "市辖区", "value": "320301" }, { "label": "鼓楼区", "value": "320302" }, { "label": "云龙区", "value": "320303" }, { "label": "贾汪区", "value": "320305" }, { "label": "泉山区", "value": "320311" }, { "label": "铜山区", "value": "320312" }, { "label": "丰县", "value": "320321" }, { "label": "沛县", "value": "320322" }, { "label": "睢宁县", "value": "320324" }, { "label": "新沂市", "value": "320381" }, { "label": "邳州市", "value": "320382" }], [{ "label": "市辖区", "value": "320401" }, { "label": "天宁区", "value": "320402" }, { "label": "钟楼区", "value": "320404" }, { "label": "新北区", "value": "320411" }, { "label": "武进区", "value": "320412" }, { "label": "金坛区", "value": "320413" }, { "label": "溧阳市", "value": "320481" }], [{ "label": "市辖区", "value": "320501" }, { "label": "虎丘区", "value": "320505" }, { "label": "吴中区", "value": "320506" }, { "label": "相城区", "value": "320507" }, { "label": "姑苏区", "value": "320508" }, { "label": "吴江区", "value": "320509" }, { "label": "常熟市", "value": "320581" }, { "label": "张家港市", "value": "320582" }, { "label": "昆山市", "value": "320583" }, { "label": "太仓市", "value": "320585" }], [{ "label": "市辖区", "value": "320601" }, { "label": "崇川区", "value": "320602" }, { "label": "港闸区", "value": "320611" }, { "label": "通州区", "value": "320612" }, { "label": "海安县", "value": "320621" }, { "label": "如东县", "value": "320623" }, { "label": "启东市", "value": "320681" }, { "label": "如皋市", "value": "320682" }, { "label": "海门市", "value": "320684" }], [{ "label": "市辖区", "value": "320701" }, { "label": "连云区", "value": "320703" }, { "label": "海州区", "value": "320706" }, { "label": "赣榆区", "value": "320707" }, { "label": "东海县", "value": "320722" }, { "label": "灌云县", "value": "320723" }, { "label": "灌南县", "value": "320724" }], [{ "label": "市辖区", "value": "320801" }, { "label": "淮安区", "value": "320803" }, { "label": "淮阴区", "value": "320804" }, { "label": "清江浦区", "value": "320812" }, { "label": "洪泽区", "value": "320813" }, { "label": "涟水县", "value": "320826" }, { "label": "盱眙县", "value": "320830" }, { "label": "金湖县", "value": "320831" }], [{ "label": "市辖区", "value": "320901" }, { "label": "亭湖区", "value": "320902" }, { "label": "盐都区", "value": "320903" }, { "label": "大丰区", "value": "320904" }, { "label": "响水县", "value": "320921" }, { "label": "滨海县", "value": "320922" }, { "label": "阜宁县", "value": "320923" }, { "label": "射阳县", "value": "320924" }, { "label": "建湖县", "value": "320925" }, { "label": "东台市", "value": "320981" }], [{ "label": "市辖区", "value": "321001" }, { "label": "广陵区", "value": "321002" }, { "label": "邗江区", "value": "321003" }, { "label": "江都区", "value": "321012" }, { "label": "宝应县", "value": "321023" }, { "label": "仪征市", "value": "321081" }, { "label": "高邮市", "value": "321084" }], [{ "label": "市辖区", "value": "321101" }, { "label": "京口区", "value": "321102" }, { "label": "润州区", "value": "321111" }, { "label": "丹徒区", "value": "321112" }, { "label": "丹阳市", "value": "321181" }, { "label": "扬中市", "value": "321182" }, { "label": "句容市", "value": "321183" }], [{ "label": "市辖区", "value": "321201" }, { "label": "海陵区", "value": "321202" }, { "label": "高港区", "value": "321203" }, { "label": "姜堰区", "value": "321204" }, { "label": "兴化市", "value": "321281" }, { "label": "靖江市", "value": "321282" }, { "label": "泰兴市", "value": "321283" }], [{ "label": "市辖区", "value": "321301" }, { "label": "宿城区", "value": "321302" }, { "label": "宿豫区", "value": "321311" }, { "label": "沭阳县", "value": "321322" }, { "label": "泗阳县", "value": "321323" }, { "label": "泗洪县", "value": "321324" }] ], [ [{ "label": "市辖区", "value": "330101" }, { "label": "上城区", "value": "330102" }, { "label": "下城区", "value": "330103" }, { "label": "江干区", "value": "330104" }, { "label": "拱墅区", "value": "330105" }, { "label": "西湖区", "value": "330106" }, { "label": "滨江区", "value": "330108" }, { "label": "萧山区", "value": "330109" }, { "label": "余杭区", "value": "330110" }, { "label": "富阳区", "value": "330111" }, { "label": "桐庐县", "value": "330122" }, { "label": "淳安县", "value": "330127" }, { "label": "建德市", "value": "330182" }, { "label": "临安市", "value": "330185" }, { "label": "富阳市", "value": "920001" }], [{ "label": "市辖区", "value": "330201" }, { "label": "海曙区", "value": "330203" }, { "label": "江东区", "value": "330204" }, { "label": "江北区", "value": "330205" }, { "label": "北仑区", "value": "330206" }, { "label": "镇海区", "value": "330211" }, { "label": "鄞州区", "value": "330212" }, { "label": "象山县", "value": "330225" }, { "label": "宁海县", "value": "330226" }, { "label": "余姚市", "value": "330281" }, { "label": "慈溪市", "value": "330282" }, { "label": "奉化市", "value": "330283" }], [{ "label": "市辖区", "value": "330301" }, { "label": "鹿城区", "value": "330302" }, { "label": "龙湾区", "value": "330303" }, { "label": "瓯海区", "value": "330304" }, { "label": "洞头区", "value": "330305" }, { "label": "永嘉县", "value": "330324" }, { "label": "平阳县", "value": "330326" }, { "label": "苍南县", "value": "330327" }, { "label": "文成县", "value": "330328" }, { "label": "泰顺县", "value": "330329" }, { "label": "瑞安市", "value": "330381" }, { "label": "乐清市", "value": "330382" }], [{ "label": "市辖区", "value": "330401" }, { "label": "南湖区", "value": "330402" }, { "label": "秀洲区", "value": "330411" }, { "label": "嘉善县", "value": "330421" }, { "label": "海盐县", "value": "330424" }, { "label": "海宁市", "value": "330481" }, { "label": "平湖市", "value": "330482" }, { "label": "桐乡市", "value": "330483" }], [{ "label": "市辖区", "value": "330501" }, { "label": "吴兴区", "value": "330502" }, { "label": "南浔区", "value": "330503" }, { "label": "德清县", "value": "330521" }, { "label": "长兴县", "value": "330522" }, { "label": "安吉县", "value": "330523" }], [{ "label": "市辖区", "value": "330601" }, { "label": "越城区", "value": "330602" }, { "label": "柯桥区", "value": "330603" }, { "label": "上虞区", "value": "330604" }, { "label": "新昌县", "value": "330624" }, { "label": "诸暨市", "value": "330681" }, { "label": "嵊州市", "value": "330683" }], [{ "label": "市辖区", "value": "330701" }, { "label": "婺城区", "value": "330702" }, { "label": "金东区", "value": "330703" }, { "label": "武义县", "value": "330723" }, { "label": "浦江县", "value": "330726" }, { "label": "磐安县", "value": "330727" }, { "label": "兰溪市", "value": "330781" }, { "label": "义乌市", "value": "330782" }, { "label": "东阳市", "value": "330783" }, { "label": "永康市", "value": "330784" }], [{ "label": "市辖区", "value": "330801" }, { "label": "柯城区", "value": "330802" }, { "label": "衢江区", "value": "330803" }, { "label": "常山县", "value": "330822" }, { "label": "开化县", "value": "330824" }, { "label": "龙游县", "value": "330825" }, { "label": "江山市", "value": "330881" }], [{ "label": "市辖区", "value": "330901" }, { "label": "定海区", "value": "330902" }, { "label": "普陀区", "value": "330903" }, { "label": "岱山县", "value": "330921" }, { "label": "嵊泗县", "value": "330922" }], [{ "label": "市辖区", "value": "331001" }, { "label": "椒江区", "value": "331002" }, { "label": "黄岩区", "value": "331003" }, { "label": "路桥区", "value": "331004" }, { "label": "玉环县", "value": "331021" }, { "label": "三门县", "value": "331022" }, { "label": "天台县", "value": "331023" }, { "label": "仙居县", "value": "331024" }, { "label": "温岭市", "value": "331081" }, { "label": "临海市", "value": "331082" }], [{ "label": "市辖区", "value": "331101" }, { "label": "莲都区", "value": "331102" }, { "label": "青田县", "value": "331121" }, { "label": "缙云县", "value": "331122" }, { "label": "遂昌县", "value": "331123" }, { "label": "松阳县", "value": "331124" }, { "label": "云和县", "value": "331125" }, { "label": "庆元县", "value": "331126" }, { "label": "景宁畲族自治县", "value": "331127" }, { "label": "龙泉市", "value": "331181" }] ], [ [{ "label": "市辖区", "value": "340101" }, { "label": "瑶海区", "value": "340102" }, { "label": "庐阳区", "value": "340103" }, { "label": "蜀山区", "value": "340104" }, { "label": "包河区", "value": "340111" }, { "label": "长丰县", "value": "340121" }, { "label": "肥东县", "value": "340122" }, { "label": "肥西县", "value": "340123" }, { "label": "庐江县", "value": "340124" }, { "label": "巢湖市", "value": "340181" }], [{ "label": "市辖区", "value": "340201" }, { "label": "镜湖区", "value": "340202" }, { "label": "弋江区", "value": "340203" }, { "label": "鸠江区", "value": "340207" }, { "label": "三山区", "value": "340208" }, { "label": "芜湖县", "value": "340221" }, { "label": "繁昌县", "value": "340222" }, { "label": "南陵县", "value": "340223" }, { "label": "无为县", "value": "340225" }], [{ "label": "市辖区", "value": "340301" }, { "label": "龙子湖区", "value": "340302" }, { "label": "蚌山区", "value": "340303" }, { "label": "禹会区", "value": "340304" }, { "label": "淮上区", "value": "340311" }, { "label": "怀远县", "value": "340321" }, { "label": "五河县", "value": "340322" }, { "label": "固镇县", "value": "340323" }], [{ "label": "市辖区", "value": "340401" }, { "label": "大通区", "value": "340402" }, { "label": "田家庵区", "value": "340403" }, { "label": "谢家集区", "value": "340404" }, { "label": "八公山区", "value": "340405" }, { "label": "潘集区", "value": "340406" }, { "label": "凤台县", "value": "340421" }, { "label": "寿县", "value": "340422" }], [{ "label": "市辖区", "value": "340501" }, { "label": "花山区", "value": "340503" }, { "label": "雨山区", "value": "340504" }, { "label": "博望区", "value": "340506" }, { "label": "当涂县", "value": "340521" }, { "label": "含山县", "value": "340522" }, { "label": "和县", "value": "340523" }], [{ "label": "市辖区", "value": "340601" }, { "label": "杜集区", "value": "340602" }, { "label": "相山区", "value": "340603" }, { "label": "烈山区", "value": "340604" }, { "label": "濉溪县", "value": "340621" }], [{ "label": "市辖区", "value": "340701" }, { "label": "铜官区", "value": "340705" }, { "label": "义安区", "value": "340706" }, { "label": "郊区", "value": "340711" }, { "label": "枞阳县", "value": "340722" }], [{ "label": "市辖区", "value": "340801" }, { "label": "迎江区", "value": "340802" }, { "label": "大观区", "value": "340803" }, { "label": "宜秀区", "value": "340811" }, { "label": "怀宁县", "value": "340822" }, { "label": "潜山县", "value": "340824" }, { "label": "太湖县", "value": "340825" }, { "label": "宿松县", "value": "340826" }, { "label": "望江县", "value": "340827" }, { "label": "岳西县", "value": "340828" }, { "label": "桐城市", "value": "340881" }], [{ "label": "市辖区", "value": "341001" }, { "label": "屯溪区", "value": "341002" }, { "label": "黄山区", "value": "341003" }, { "label": "徽州区", "value": "341004" }, { "label": "歙县", "value": "341021" }, { "label": "休宁县", "value": "341022" }, { "label": "黟县", "value": "341023" }, { "label": "祁门县", "value": "341024" }], [{ "label": "市辖区", "value": "341101" }, { "label": "琅琊区", "value": "341102" }, { "label": "南谯区", "value": "341103" }, { "label": "来安县", "value": "341122" }, { "label": "全椒县", "value": "341124" }, { "label": "定远县", "value": "341125" }, { "label": "凤阳县", "value": "341126" }, { "label": "天长市", "value": "341181" }, { "label": "明光市", "value": "341182" }], [{ "label": "市辖区", "value": "341201" }, { "label": "颍州区", "value": "341202" }, { "label": "颍东区", "value": "341203" }, { "label": "颍泉区", "value": "341204" }, { "label": "临泉县", "value": "341221" }, { "label": "太和县", "value": "341222" }, { "label": "阜南县", "value": "341225" }, { "label": "颍上县", "value": "341226" }, { "label": "界首市", "value": "341282" }], [{ "label": "市辖区", "value": "341301" }, { "label": "埇桥区", "value": "341302" }, { "label": "砀山县", "value": "341321" }, { "label": "萧县", "value": "341322" }, { "label": "灵璧县", "value": "341323" }, { "label": "泗县", "value": "341324" }], [{ "label": "市辖区", "value": "341501" }, { "label": "金安区", "value": "341502" }, { "label": "裕安区", "value": "341503" }, { "label": "叶集区", "value": "341504" }, { "label": "霍邱县", "value": "341522" }, { "label": "舒城县", "value": "341523" }, { "label": "金寨县", "value": "341524" }, { "label": "霍山县", "value": "341525" }], [{ "label": "市辖区", "value": "341601" }, { "label": "谯城区", "value": "341602" }, { "label": "涡阳县", "value": "341621" }, { "label": "蒙城县", "value": "341622" }, { "label": "利辛县", "value": "341623" }], [{ "label": "市辖区", "value": "341701" }, { "label": "贵池区", "value": "341702" }, { "label": "东至县", "value": "341721" }, { "label": "石台县", "value": "341722" }, { "label": "青阳县", "value": "341723" }], [{ "label": "市辖区", "value": "341801" }, { "label": "宣州区", "value": "341802" }, { "label": "郎溪县", "value": "341821" }, { "label": "广德县", "value": "341822" }, { "label": "泾县", "value": "341823" }, { "label": "绩溪县", "value": "341824" }, { "label": "旌德县", "value": "341825" }, { "label": "宁国市", "value": "341881" }] ], [ [{ "label": "市辖区", "value": "350101" }, { "label": "鼓楼区", "value": "350102" }, { "label": "台江区", "value": "350103" }, { "label": "仓山区", "value": "350104" }, { "label": "马尾区", "value": "350105" }, { "label": "晋安区", "value": "350111" }, { "label": "闽侯县", "value": "350121" }, { "label": "连江县", "value": "350122" }, { "label": "罗源县", "value": "350123" }, { "label": "闽清县", "value": "350124" }, { "label": "永泰县", "value": "350125" }, { "label": "平潭县", "value": "350128" }, { "label": "福清市", "value": "350181" }, { "label": "长乐市", "value": "350182" }], [{ "label": "市辖区", "value": "350201" }, { "label": "思明区", "value": "350203" }, { "label": "海沧区", "value": "350205" }, { "label": "湖里区", "value": "350206" }, { "label": "集美区", "value": "350211" }, { "label": "同安区", "value": "350212" }, { "label": "翔安区", "value": "350213" }], [{ "label": "市辖区", "value": "350301" }, { "label": "城厢区", "value": "350302" }, { "label": "涵江区", "value": "350303" }, { "label": "荔城区", "value": "350304" }, { "label": "秀屿区", "value": "350305" }, { "label": "仙游县", "value": "350322" }], [{ "label": "市辖区", "value": "350401" }, { "label": "梅列区", "value": "350402" }, { "label": "三元区", "value": "350403" }, { "label": "明溪县", "value": "350421" }, { "label": "清流县", "value": "350423" }, { "label": "宁化县", "value": "350424" }, { "label": "大田县", "value": "350425" }, { "label": "尤溪县", "value": "350426" }, { "label": "沙县", "value": "350427" }, { "label": "将乐县", "value": "350428" }, { "label": "泰宁县", "value": "350429" }, { "label": "建宁县", "value": "350430" }, { "label": "永安市", "value": "350481" }], [{ "label": "市辖区", "value": "350501" }, { "label": "鲤城区", "value": "350502" }, { "label": "丰泽区", "value": "350503" }, { "label": "洛江区", "value": "350504" }, { "label": "泉港区", "value": "350505" }, { "label": "惠安县", "value": "350521" }, { "label": "安溪县", "value": "350524" }, { "label": "永春县", "value": "350525" }, { "label": "德化县", "value": "350526" }, { "label": "金门县", "value": "350527" }, { "label": "石狮市", "value": "350581" }, { "label": "晋江市", "value": "350582" }, { "label": "南安市", "value": "350583" }], [{ "label": "市辖区", "value": "350601" }, { "label": "芗城区", "value": "350602" }, { "label": "龙文区", "value": "350603" }, { "label": "云霄县", "value": "350622" }, { "label": "漳浦县", "value": "350623" }, { "label": "诏安县", "value": "350624" }, { "label": "长泰县", "value": "350625" }, { "label": "东山县", "value": "350626" }, { "label": "南靖县", "value": "350627" }, { "label": "平和县", "value": "350628" }, { "label": "华安县", "value": "350629" }, { "label": "龙海市", "value": "350681" }], [{ "label": "市辖区", "value": "350701" }, { "label": "延平区", "value": "350702" }, { "label": "建阳区", "value": "350703" }, { "label": "顺昌县", "value": "350721" }, { "label": "浦城县", "value": "350722" }, { "label": "光泽县", "value": "350723" }, { "label": "松溪县", "value": "350724" }, { "label": "政和县", "value": "350725" }, { "label": "邵武市", "value": "350781" }, { "label": "武夷山市", "value": "350782" }, { "label": "建瓯市", "value": "350783" }], [{ "label": "市辖区", "value": "350801" }, { "label": "新罗区", "value": "350802" }, { "label": "永定区", "value": "350803" }, { "label": "长汀县", "value": "350821" }, { "label": "上杭县", "value": "350823" }, { "label": "武平县", "value": "350824" }, { "label": "连城县", "value": "350825" }, { "label": "漳平市", "value": "350881" }], [{ "label": "市辖区", "value": "350901" }, { "label": "蕉城区", "value": "350902" }, { "label": "霞浦县", "value": "350921" }, { "label": "古田县", "value": "350922" }, { "label": "屏南县", "value": "350923" }, { "label": "寿宁县", "value": "350924" }, { "label": "周宁县", "value": "350925" }, { "label": "柘荣县", "value": "350926" }, { "label": "福安市", "value": "350981" }, { "label": "福鼎市", "value": "350982" }] ], [ [{ "label": "市辖区", "value": "360101" }, { "label": "东湖区", "value": "360102" }, { "label": "西湖区", "value": "360103" }, { "label": "青云谱区", "value": "360104" }, { "label": "湾里区", "value": "360105" }, { "label": "青山湖区", "value": "360111" }, { "label": "新建区", "value": "360112" }, { "label": "南昌县", "value": "360121" }, { "label": "安义县", "value": "360123" }, { "label": "进贤县", "value": "360124" }], [{ "label": "市辖区", "value": "360201" }, { "label": "昌江区", "value": "360202" }, { "label": "珠山区", "value": "360203" }, { "label": "浮梁县", "value": "360222" }, { "label": "乐平市", "value": "360281" }], [{ "label": "市辖区", "value": "360301" }, { "label": "安源区", "value": "360302" }, { "label": "湘东区", "value": "360313" }, { "label": "莲花县", "value": "360321" }, { "label": "上栗县", "value": "360322" }, { "label": "芦溪县", "value": "360323" }], [{ "label": "市辖区", "value": "360401" }, { "label": "濂溪区", "value": "360402" }, { "label": "浔阳区", "value": "360403" }, { "label": "九江县", "value": "360421" }, { "label": "武宁县", "value": "360423" }, { "label": "修水县", "value": "360424" }, { "label": "永修县", "value": "360425" }, { "label": "德安县", "value": "360426" }, { "label": "都昌县", "value": "360428" }, { "label": "湖口县", "value": "360429" }, { "label": "彭泽县", "value": "360430" }, { "label": "瑞昌市", "value": "360481" }, { "label": "共青城市", "value": "360482" }, { "label": "庐山市", "value": "360483" }], [{ "label": "市辖区", "value": "360501" }, { "label": "渝水区", "value": "360502" }, { "label": "分宜县", "value": "360521" }], [{ "label": "市辖区", "value": "360601" }, { "label": "月湖区", "value": "360602" }, { "label": "余江县", "value": "360622" }, { "label": "贵溪市", "value": "360681" }], [{ "label": "市辖区", "value": "360701" }, { "label": "章贡区", "value": "360702" }, { "label": "南康区", "value": "360703" }, { "label": "赣县", "value": "360721" }, { "label": "信丰县", "value": "360722" }, { "label": "大余县", "value": "360723" }, { "label": "上犹县", "value": "360724" }, { "label": "崇义县", "value": "360725" }, { "label": "安远县", "value": "360726" }, { "label": "龙南县", "value": "360727" }, { "label": "定南县", "value": "360728" }, { "label": "全南县", "value": "360729" }, { "label": "宁都县", "value": "360730" }, { "label": "于都县", "value": "360731" }, { "label": "兴国县", "value": "360732" }, { "label": "会昌县", "value": "360733" }, { "label": "寻乌县", "value": "360734" }, { "label": "石城县", "value": "360735" }, { "label": "瑞金市", "value": "360781" }], [{ "label": "市辖区", "value": "360801" }, { "label": "吉州区", "value": "360802" }, { "label": "青原区", "value": "360803" }, { "label": "吉安县", "value": "360821" }, { "label": "吉水县", "value": "360822" }, { "label": "峡江县", "value": "360823" }, { "label": "新干县", "value": "360824" }, { "label": "永丰县", "value": "360825" }, { "label": "泰和县", "value": "360826" }, { "label": "遂川县", "value": "360827" }, { "label": "万安县", "value": "360828" }, { "label": "安福县", "value": "360829" }, { "label": "永新县", "value": "360830" }, { "label": "井冈山市", "value": "360881" }], [{ "label": "市辖区", "value": "360901" }, { "label": "袁州区", "value": "360902" }, { "label": "奉新县", "value": "360921" }, { "label": "万载县", "value": "360922" }, { "label": "上高县", "value": "360923" }, { "label": "宜丰县", "value": "360924" }, { "label": "靖安县", "value": "360925" }, { "label": "铜鼓县", "value": "360926" }, { "label": "丰城市", "value": "360981" }, { "label": "樟树市", "value": "360982" }, { "label": "高安市", "value": "360983" }], [{ "label": "市辖区", "value": "361001" }, { "label": "临川区", "value": "361002" }, { "label": "南城县", "value": "361021" }, { "label": "黎川县", "value": "361022" }, { "label": "南丰县", "value": "361023" }, { "label": "崇仁县", "value": "361024" }, { "label": "乐安县", "value": "361025" }, { "label": "宜黄县", "value": "361026" }, { "label": "金溪县", "value": "361027" }, { "label": "资溪县", "value": "361028" }, { "label": "东乡县", "value": "361029" }, { "label": "广昌县", "value": "361030" }], [{ "label": "市辖区", "value": "361101" }, { "label": "信州区", "value": "361102" }, { "label": "广丰区", "value": "361103" }, { "label": "上饶县", "value": "361121" }, { "label": "玉山县", "value": "361123" }, { "label": "铅山县", "value": "361124" }, { "label": "横峰县", "value": "361125" }, { "label": "弋阳县", "value": "361126" }, { "label": "余干县", "value": "361127" }, { "label": "鄱阳县", "value": "361128" }, { "label": "万年县", "value": "361129" }, { "label": "婺源县", "value": "361130" }, { "label": "德兴市", "value": "361181" }] ], [ [{ "label": "市辖区", "value": "370101" }, { "label": "历下区", "value": "370102" }, { "label": "市中区", "value": "370103" }, { "label": "槐荫区", "value": "370104" }, { "label": "天桥区", "value": "370105" }, { "label": "历城区", "value": "370112" }, { "label": "长清区", "value": "370113" }, { "label": "平阴县", "value": "370124" }, { "label": "济阳县", "value": "370125" }, { "label": "商河县", "value": "370126" }, { "label": "章丘市", "value": "370181" }], [{ "label": "市辖区", "value": "370201" }, { "label": "市南区", "value": "370202" }, { "label": "市北区", "value": "370203" }, { "label": "黄岛区", "value": "370211" }, { "label": "崂山区", "value": "370212" }, { "label": "李沧区", "value": "370213" }, { "label": "城阳区", "value": "370214" }, { "label": "胶州市", "value": "370281" }, { "label": "即墨市", "value": "370282" }, { "label": "平度市", "value": "370283" }, { "label": "莱西市", "value": "370285" }], [{ "label": "市辖区", "value": "370301" }, { "label": "淄川区", "value": "370302" }, { "label": "张店区", "value": "370303" }, { "label": "博山区", "value": "370304" }, { "label": "临淄区", "value": "370305" }, { "label": "周村区", "value": "370306" }, { "label": "桓台县", "value": "370321" }, { "label": "高青县", "value": "370322" }, { "label": "沂源县", "value": "370323" }], [{ "label": "市辖区", "value": "370401" }, { "label": "市中区", "value": "370402" }, { "label": "薛城区", "value": "370403" }, { "label": "峄城区", "value": "370404" }, { "label": "台儿庄区", "value": "370405" }, { "label": "山亭区", "value": "370406" }, { "label": "滕州市", "value": "370481" }], [{ "label": "市辖区", "value": "370501" }, { "label": "东营区", "value": "370502" }, { "label": "河口区", "value": "370503" }, { "label": "垦利区", "value": "370505" }, { "label": "利津县", "value": "370522" }, { "label": "广饶县", "value": "370523" }], [{ "label": "市辖区", "value": "370601" }, { "label": "芝罘区", "value": "370602" }, { "label": "福山区", "value": "370611" }, { "label": "牟平区", "value": "370612" }, { "label": "莱山区", "value": "370613" }, { "label": "长岛县", "value": "370634" }, { "label": "龙口市", "value": "370681" }, { "label": "莱阳市", "value": "370682" }, { "label": "莱州市", "value": "370683" }, { "label": "蓬莱市", "value": "370684" }, { "label": "招远市", "value": "370685" }, { "label": "栖霞市", "value": "370686" }, { "label": "海阳市", "value": "370687" }], [{ "label": "市辖区", "value": "370701" }, { "label": "潍城区", "value": "370702" }, { "label": "寒亭区", "value": "370703" }, { "label": "坊子区", "value": "370704" }, { "label": "奎文区", "value": "370705" }, { "label": "临朐县", "value": "370724" }, { "label": "昌乐县", "value": "370725" }, { "label": "青州市", "value": "370781" }, { "label": "诸城市", "value": "370782" }, { "label": "寿光市", "value": "370783" }, { "label": "安丘市", "value": "370784" }, { "label": "高密市", "value": "370785" }, { "label": "昌邑市", "value": "370786" }], [{ "label": "市辖区", "value": "370801" }, { "label": "任城区", "value": "370811" }, { "label": "兖州区", "value": "370812" }, { "label": "微山县", "value": "370826" }, { "label": "鱼台县", "value": "370827" }, { "label": "金乡县", "value": "370828" }, { "label": "嘉祥县", "value": "370829" }, { "label": "汶上县", "value": "370830" }, { "label": "泗水县", "value": "370831" }, { "label": "梁山县", "value": "370832" }, { "label": "曲阜市", "value": "370881" }, { "label": "邹城市", "value": "370883" }], [{ "label": "市辖区", "value": "370901" }, { "label": "泰山区", "value": "370902" }, { "label": "岱岳区", "value": "370911" }, { "label": "宁阳县", "value": "370921" }, { "label": "东平县", "value": "370923" }, { "label": "新泰市", "value": "370982" }, { "label": "肥城市", "value": "370983" }], [{ "label": "市辖区", "value": "371001" }, { "label": "环翠区", "value": "371002" }, { "label": "文登区", "value": "371003" }, { "label": "荣成市", "value": "371082" }, { "label": "乳山市", "value": "371083" }], [{ "label": "市辖区", "value": "371101" }, { "label": "东港区", "value": "371102" }, { "label": "岚山区", "value": "371103" }, { "label": "五莲县", "value": "371121" }, { "label": "莒县", "value": "371122" }], [{ "label": "市辖区", "value": "371201" }, { "label": "莱城区", "value": "371202" }, { "label": "钢城区", "value": "371203" }], [{ "label": "市辖区", "value": "371301" }, { "label": "兰山区", "value": "371302" }, { "label": "罗庄区", "value": "371311" }, { "label": "河东区", "value": "371312" }, { "label": "沂南县", "value": "371321" }, { "label": "郯城县", "value": "371322" }, { "label": "沂水县", "value": "371323" }, { "label": "兰陵县", "value": "371324" }, { "label": "费县", "value": "371325" }, { "label": "平邑县", "value": "371326" }, { "label": "莒南县", "value": "371327" }, { "label": "蒙阴县", "value": "371328" }, { "label": "临沭县", "value": "371329" }], [{ "label": "市辖区", "value": "371401" }, { "label": "德城区", "value": "371402" }, { "label": "陵城区", "value": "371403" }, { "label": "宁津县", "value": "371422" }, { "label": "庆云县", "value": "371423" }, { "label": "临邑县", "value": "371424" }, { "label": "齐河县", "value": "371425" }, { "label": "平原县", "value": "371426" }, { "label": "夏津县", "value": "371427" }, { "label": "武城县", "value": "371428" }, { "label": "乐陵市", "value": "371481" }, { "label": "禹城市", "value": "371482" }], [{ "label": "市辖区", "value": "371501" }, { "label": "东昌府区", "value": "371502" }, { "label": "阳谷县", "value": "371521" }, { "label": "莘县", "value": "371522" }, { "label": "茌平县", "value": "371523" }, { "label": "东阿县", "value": "371524" }, { "label": "冠县", "value": "371525" }, { "label": "高唐县", "value": "371526" }, { "label": "临清市", "value": "371581" }], [{ "label": "市辖区", "value": "371601" }, { "label": "滨城区", "value": "371602" }, { "label": "沾化区", "value": "371603" }, { "label": "惠民县", "value": "371621" }, { "label": "阳信县", "value": "371622" }, { "label": "无棣县", "value": "371623" }, { "label": "博兴县", "value": "371625" }, { "label": "邹平县", "value": "371626" }], [{ "label": "市辖区", "value": "371701" }, { "label": "牡丹区", "value": "371702" }, { "label": "定陶区", "value": "371703" }, { "label": "曹县", "value": "371721" }, { "label": "单县", "value": "371722" }, { "label": "成武县", "value": "371723" }, { "label": "巨野县", "value": "371724" }, { "label": "郓城县", "value": "371725" }, { "label": "鄄城县", "value": "371726" }, { "label": "东明县", "value": "371728" }] ], [ [{ "label": "市辖区", "value": "410101" }, { "label": "中原区", "value": "410102" }, { "label": "二七区", "value": "410103" }, { "label": "管城回族区", "value": "410104" }, { "label": "金水区", "value": "410105" }, { "label": "上街区", "value": "410106" }, { "label": "惠济区", "value": "410108" }, { "label": "中牟县", "value": "410122" }, { "label": "巩义市", "value": "410181" }, { "label": "荥阳市", "value": "410182" }, { "label": "新密市", "value": "410183" }, { "label": "新郑市", "value": "410184" }, { "label": "登封市", "value": "410185" }, { "label": "郑东新区", "value": "920002" }], [{ "label": "市辖区", "value": "410201" }, { "label": "龙亭区", "value": "410202" }, { "label": "顺河回族区", "value": "410203" }, { "label": "鼓楼区", "value": "410204" }, { "label": "禹王台区", "value": "410205" }, { "label": "金明区", "value": "410211" }, { "label": "祥符区", "value": "410212" }, { "label": "杞县", "value": "410221" }, { "label": "通许县", "value": "410222" }, { "label": "尉氏县", "value": "410223" }, { "label": "兰考县", "value": "410225" }], [{ "label": "市辖区", "value": "410301" }, { "label": "老城区", "value": "410302" }, { "label": "西工区", "value": "410303" }, { "label": "瀍河回族区", "value": "410304" }, { "label": "涧西区", "value": "410305" }, { "label": "吉利区", "value": "410306" }, { "label": "洛龙区", "value": "410311" }, { "label": "孟津县", "value": "410322" }, { "label": "新安县", "value": "410323" }, { "label": "栾川县", "value": "410324" }, { "label": "嵩县", "value": "410325" }, { "label": "汝阳县", "value": "410326" }, { "label": "宜阳县", "value": "410327" }, { "label": "洛宁县", "value": "410328" }, { "label": "伊川县", "value": "410329" }, { "label": "偃师市", "value": "410381" }], [{ "label": "市辖区", "value": "410401" }, { "label": "新华区", "value": "410402" }, { "label": "卫东区", "value": "410403" }, { "label": "石龙区", "value": "410404" }, { "label": "湛河区", "value": "410411" }, { "label": "宝丰县", "value": "410421" }, { "label": "叶县", "value": "410422" }, { "label": "鲁山县", "value": "410423" }, { "label": "郏县", "value": "410425" }, { "label": "舞钢市", "value": "410481" }, { "label": "汝州市", "value": "410482" }], [{ "label": "市辖区", "value": "410501" }, { "label": "文峰区", "value": "410502" }, { "label": "北关区", "value": "410503" }, { "label": "殷都区", "value": "410505" }, { "label": "龙安区", "value": "410506" }, { "label": "安阳县", "value": "410522" }, { "label": "汤阴县", "value": "410523" }, { "label": "滑县", "value": "410526" }, { "label": "内黄县", "value": "410527" }, { "label": "林州市", "value": "410581" }], [{ "label": "市辖区", "value": "410601" }, { "label": "鹤山区", "value": "410602" }, { "label": "山城区", "value": "410603" }, { "label": "淇滨区", "value": "410611" }, { "label": "浚县", "value": "410621" }, { "label": "淇县", "value": "410622" }], [{ "label": "市辖区", "value": "410701" }, { "label": "红旗区", "value": "410702" }, { "label": "卫滨区", "value": "410703" }, { "label": "凤泉区", "value": "410704" }, { "label": "牧野区", "value": "410711" }, { "label": "新乡县", "value": "410721" }, { "label": "获嘉县", "value": "410724" }, { "label": "原阳县", "value": "410725" }, { "label": "延津县", "value": "410726" }, { "label": "封丘县", "value": "410727" }, { "label": "长垣县", "value": "410728" }, { "label": "卫辉市", "value": "410781" }, { "label": "辉县市", "value": "410782" }], [{ "label": "市辖区", "value": "410801" }, { "label": "解放区", "value": "410802" }, { "label": "中站区", "value": "410803" }, { "label": "马村区", "value": "410804" }, { "label": "山阳区", "value": "410811" }, { "label": "修武县", "value": "410821" }, { "label": "博爱县", "value": "410822" }, { "label": "武陟县", "value": "410823" }, { "label": "温县", "value": "410825" }, { "label": "沁阳市", "value": "410882" }, { "label": "孟州市", "value": "410883" }], [{ "label": "市辖区", "value": "410901" }, { "label": "华龙区", "value": "410902" }, { "label": "清丰县", "value": "410922" }, { "label": "南乐县", "value": "410923" }, { "label": "范县", "value": "410926" }, { "label": "台前县", "value": "410927" }, { "label": "濮阳县", "value": "410928" }], [{ "label": "市辖区", "value": "411001" }, { "label": "魏都区", "value": "411002" }, { "label": "许昌县", "value": "411023" }, { "label": "鄢陵县", "value": "411024" }, { "label": "襄城县", "value": "411025" }, { "label": "禹州市", "value": "411081" }, { "label": "长葛市", "value": "411082" }], [{ "label": "市辖区", "value": "411101" }, { "label": "源汇区", "value": "411102" }, { "label": "郾城区", "value": "411103" }, { "label": "召陵区", "value": "411104" }, { "label": "舞阳县", "value": "411121" }, { "label": "临颍县", "value": "411122" }], [{ "label": "市辖区", "value": "411201" }, { "label": "湖滨区", "value": "411202" }, { "label": "陕州区", "value": "411203" }, { "label": "渑池县", "value": "411221" }, { "label": "卢氏县", "value": "411224" }, { "label": "义马市", "value": "411281" }, { "label": "灵宝市", "value": "411282" }], [{ "label": "市辖区", "value": "411301" }, { "label": "宛城区", "value": "411302" }, { "label": "卧龙区", "value": "411303" }, { "label": "南召县", "value": "411321" }, { "label": "方城县", "value": "411322" }, { "label": "西峡县", "value": "411323" }, { "label": "镇平县", "value": "411324" }, { "label": "内乡县", "value": "411325" }, { "label": "淅川县", "value": "411326" }, { "label": "社旗县", "value": "411327" }, { "label": "唐河县", "value": "411328" }, { "label": "新野县", "value": "411329" }, { "label": "桐柏县", "value": "411330" }, { "label": "邓州市", "value": "411381" }], [{ "label": "市辖区", "value": "411401" }, { "label": "梁园区", "value": "411402" }, { "label": "睢阳区", "value": "411403" }, { "label": "民权县", "value": "411421" }, { "label": "睢县", "value": "411422" }, { "label": "宁陵县", "value": "411423" }, { "label": "柘城县", "value": "411424" }, { "label": "虞城县", "value": "411425" }, { "label": "夏邑县", "value": "411426" }, { "label": "永城市", "value": "411481" }], [{ "label": "市辖区", "value": "411501" }, { "label": "浉河区", "value": "411502" }, { "label": "平桥区", "value": "411503" }, { "label": "罗山县", "value": "411521" }, { "label": "光山县", "value": "411522" }, { "label": "新县", "value": "411523" }, { "label": "商城县", "value": "411524" }, { "label": "固始县", "value": "411525" }, { "label": "潢川县", "value": "411526" }, { "label": "淮滨县", "value": "411527" }, { "label": "息县", "value": "411528" }], [{ "label": "市辖区", "value": "411601" }, { "label": "川汇区", "value": "411602" }, { "label": "扶沟县", "value": "411621" }, { "label": "西华县", "value": "411622" }, { "label": "商水县", "value": "411623" }, { "label": "沈丘县", "value": "411624" }, { "label": "郸城县", "value": "411625" }, { "label": "淮阳县", "value": "411626" }, { "label": "太康县", "value": "411627" }, { "label": "鹿邑县", "value": "411628" }, { "label": "项城市", "value": "411681" }], [{ "label": "市辖区", "value": "411701" }, { "label": "驿城区", "value": "411702" }, { "label": "西平县", "value": "411721" }, { "label": "上蔡县", "value": "411722" }, { "label": "平舆县", "value": "411723" }, { "label": "正阳县", "value": "411724" }, { "label": "确山县", "value": "411725" }, { "label": "泌阳县", "value": "411726" }, { "label": "汝南县", "value": "411727" }, { "label": "遂平县", "value": "411728" }, { "label": "新蔡县", "value": "411729" }], [{ "label": "市辖区", "value": "419001" }] ], [ [{ "label": "市辖区", "value": "420101" }, { "label": "江岸区", "value": "420102" }, { "label": "江汉区", "value": "420103" }, { "label": "硚口区", "value": "420104" }, { "label": "汉阳区", "value": "420105" }, { "label": "武昌区", "value": "420106" }, { "label": "青山区", "value": "420107" }, { "label": "洪山区", "value": "420111" }, { "label": "东西湖区", "value": "420112" }, { "label": "汉南区", "value": "420113" }, { "label": "蔡甸区", "value": "420114" }, { "label": "江夏区", "value": "420115" }, { "label": "黄陂区", "value": "420116" }, { "label": "新洲区", "value": "420117" }], [{ "label": "市辖区", "value": "420201" }, { "label": "黄石港区", "value": "420202" }, { "label": "西塞山区", "value": "420203" }, { "label": "下陆区", "value": "420204" }, { "label": "铁山区", "value": "420205" }, { "label": "阳新县", "value": "420222" }, { "label": "大冶市", "value": "420281" }], [{ "label": "市辖区", "value": "420301" }, { "label": "茅箭区", "value": "420302" }, { "label": "张湾区", "value": "420303" }, { "label": "郧阳区", "value": "420304" }, { "label": "郧西县", "value": "420322" }, { "label": "竹山县", "value": "420323" }, { "label": "竹溪县", "value": "420324" }, { "label": "房县", "value": "420325" }, { "label": "丹江口市", "value": "420381" }], [{ "label": "市辖区", "value": "420501" }, { "label": "西陵区", "value": "420502" }, { "label": "伍家岗区", "value": "420503" }, { "label": "点军区", "value": "420504" }, { "label": "猇亭区", "value": "420505" }, { "label": "夷陵区", "value": "420506" }, { "label": "远安县", "value": "420525" }, { "label": "兴山县", "value": "420526" }, { "label": "秭归县", "value": "420527" }, { "label": "长阳土家族自治县", "value": "420528" }, { "label": "五峰土家族自治县", "value": "420529" }, { "label": "宜都市", "value": "420581" }, { "label": "当阳市", "value": "420582" }, { "label": "枝江市", "value": "420583" }], [{ "label": "市辖区", "value": "420601" }, { "label": "襄城区", "value": "420602" }, { "label": "樊城区", "value": "420606" }, { "label": "襄州区", "value": "420607" }, { "label": "南漳县", "value": "420624" }, { "label": "谷城县", "value": "420625" }, { "label": "保康县", "value": "420626" }, { "label": "老河口市", "value": "420682" }, { "label": "枣阳市", "value": "420683" }, { "label": "宜城市", "value": "420684" }], [{ "label": "市辖区", "value": "420701" }, { "label": "梁子湖区", "value": "420702" }, { "label": "华容区", "value": "420703" }, { "label": "鄂城区", "value": "420704" }], [{ "label": "市辖区", "value": "420801" }, { "label": "东宝区", "value": "420802" }, { "label": "掇刀区", "value": "420804" }, { "label": "京山县", "value": "420821" }, { "label": "沙洋县", "value": "420822" }, { "label": "钟祥市", "value": "420881" }], [{ "label": "市辖区", "value": "420901" }, { "label": "孝南区", "value": "420902" }, { "label": "孝昌县", "value": "420921" }, { "label": "大悟县", "value": "420922" }, { "label": "云梦县", "value": "420923" }, { "label": "应城市", "value": "420981" }, { "label": "安陆市", "value": "420982" }, { "label": "汉川市", "value": "420984" }], [{ "label": "市辖区", "value": "421001" }, { "label": "沙市区", "value": "421002" }, { "label": "荆州区", "value": "421003" }, { "label": "公安县", "value": "421022" }, { "label": "监利县", "value": "421023" }, { "label": "江陵县", "value": "421024" }, { "label": "石首市", "value": "421081" }, { "label": "洪湖市", "value": "421083" }, { "label": "松滋市", "value": "421087" }], [{ "label": "市辖区", "value": "421101" }, { "label": "黄州区", "value": "421102" }, { "label": "团风县", "value": "421121" }, { "label": "红安县", "value": "421122" }, { "label": "罗田县", "value": "421123" }, { "label": "英山县", "value": "421124" }, { "label": "浠水县", "value": "421125" }, { "label": "蕲春县", "value": "421126" }, { "label": "黄梅县", "value": "421127" }, { "label": "麻城市", "value": "421181" }, { "label": "武穴市", "value": "421182" }], [{ "label": "市辖区", "value": "421201" }, { "label": "咸安区", "value": "421202" }, { "label": "嘉鱼县", "value": "421221" }, { "label": "通城县", "value": "421222" }, { "label": "崇阳县", "value": "421223" }, { "label": "通山县", "value": "421224" }, { "label": "赤壁市", "value": "421281" }], [{ "label": "市辖区", "value": "421301" }, { "label": "曾都区", "value": "421303" }, { "label": "随县", "value": "421321" }, { "label": "广水市", "value": "421381" }], [{ "label": "市辖区", "value": "422801" }, { "label": "利川市", "value": "422802" }, { "label": "建始县", "value": "422822" }, { "label": "巴东县", "value": "422823" }, { "label": "宣恩县", "value": "422825" }, { "label": "咸丰县", "value": "422826" }, { "label": "来凤县", "value": "422827" }, { "label": "鹤峰县", "value": "422828" }], [{ "label": "仙桃市", "value": "429004" }, { "label": "潜江市", "value": "429005" }, { "label": "天门市", "value": "429006" }, { "label": "神农架林区", "value": "429021" }] ], [ [{ "label": "市辖区", "value": "430101" }, { "label": "芙蓉区", "value": "430102" }, { "label": "天心区", "value": "430103" }, { "label": "岳麓区", "value": "430104" }, { "label": "开福区", "value": "430105" }, { "label": "雨花区", "value": "430111" }, { "label": "望城区", "value": "430112" }, { "label": "长沙县", "value": "430121" }, { "label": "宁乡县", "value": "430124" }, { "label": "浏阳市", "value": "430181" }], [{ "label": "市辖区", "value": "430201" }, { "label": "荷塘区", "value": "430202" }, { "label": "芦淞区", "value": "430203" }, { "label": "石峰区", "value": "430204" }, { "label": "天元区", "value": "430211" }, { "label": "株洲县", "value": "430221" }, { "label": "攸县", "value": "430223" }, { "label": "茶陵县", "value": "430224" }, { "label": "炎陵县", "value": "430225" }, { "label": "醴陵市", "value": "430281" }], [{ "label": "市辖区", "value": "430301" }, { "label": "雨湖区", "value": "430302" }, { "label": "岳塘区", "value": "430304" }, { "label": "湘潭县", "value": "430321" }, { "label": "湘乡市", "value": "430381" }, { "label": "韶山市", "value": "430382" }], [{ "label": "市辖区", "value": "430401" }, { "label": "珠晖区", "value": "430405" }, { "label": "雁峰区", "value": "430406" }, { "label": "石鼓区", "value": "430407" }, { "label": "蒸湘区", "value": "430408" }, { "label": "南岳区", "value": "430412" }, { "label": "衡阳县", "value": "430421" }, { "label": "衡南县", "value": "430422" }, { "label": "衡山县", "value": "430423" }, { "label": "衡东县", "value": "430424" }, { "label": "祁东县", "value": "430426" }, { "label": "耒阳市", "value": "430481" }, { "label": "常宁市", "value": "430482" }], [{ "label": "市辖区", "value": "430501" }, { "label": "双清区", "value": "430502" }, { "label": "大祥区", "value": "430503" }, { "label": "北塔区", "value": "430511" }, { "label": "邵东县", "value": "430521" }, { "label": "新邵县", "value": "430522" }, { "label": "邵阳县", "value": "430523" }, { "label": "隆回县", "value": "430524" }, { "label": "洞口县", "value": "430525" }, { "label": "绥宁县", "value": "430527" }, { "label": "新宁县", "value": "430528" }, { "label": "城步苗族自治县", "value": "430529" }, { "label": "武冈市", "value": "430581" }], [{ "label": "市辖区", "value": "430601" }, { "label": "岳阳楼区", "value": "430602" }, { "label": "云溪区", "value": "430603" }, { "label": "君山区", "value": "430611" }, { "label": "岳阳县", "value": "430621" }, { "label": "华容县", "value": "430623" }, { "label": "湘阴县", "value": "430624" }, { "label": "平江县", "value": "430626" }, { "label": "汨罗市", "value": "430681" }, { "label": "临湘市", "value": "430682" }], [{ "label": "市辖区", "value": "430701" }, { "label": "武陵区", "value": "430702" }, { "label": "鼎城区", "value": "430703" }, { "label": "安乡县", "value": "430721" }, { "label": "汉寿县", "value": "430722" }, { "label": "澧县", "value": "430723" }, { "label": "临澧县", "value": "430724" }, { "label": "桃源县", "value": "430725" }, { "label": "石门县", "value": "430726" }, { "label": "津市市", "value": "430781" }], [{ "label": "市辖区", "value": "430801" }, { "label": "永定区", "value": "430802" }, { "label": "武陵源区", "value": "430811" }, { "label": "慈利县", "value": "430821" }, { "label": "桑植县", "value": "430822" }], [{ "label": "市辖区", "value": "430901" }, { "label": "资阳区", "value": "430902" }, { "label": "赫山区", "value": "430903" }, { "label": "南县", "value": "430921" }, { "label": "桃江县", "value": "430922" }, { "label": "安化县", "value": "430923" }, { "label": "沅江市", "value": "430981" }], [{ "label": "市辖区", "value": "431001" }, { "label": "北湖区", "value": "431002" }, { "label": "苏仙区", "value": "431003" }, { "label": "桂阳县", "value": "431021" }, { "label": "宜章县", "value": "431022" }, { "label": "永兴县", "value": "431023" }, { "label": "嘉禾县", "value": "431024" }, { "label": "临武县", "value": "431025" }, { "label": "汝城县", "value": "431026" }, { "label": "桂东县", "value": "431027" }, { "label": "安仁县", "value": "431028" }, { "label": "资兴市", "value": "431081" }], [{ "label": "市辖区", "value": "431101" }, { "label": "零陵区", "value": "431102" }, { "label": "冷水滩区", "value": "431103" }, { "label": "祁阳县", "value": "431121" }, { "label": "东安县", "value": "431122" }, { "label": "双牌县", "value": "431123" }, { "label": "道县", "value": "431124" }, { "label": "江永县", "value": "431125" }, { "label": "宁远县", "value": "431126" }, { "label": "蓝山县", "value": "431127" }, { "label": "新田县", "value": "431128" }, { "label": "江华瑶族自治县", "value": "431129" }], [{ "label": "市辖区", "value": "431201" }, { "label": "鹤城区", "value": "431202" }, { "label": "中方县", "value": "431221" }, { "label": "沅陵县", "value": "431222" }, { "label": "辰溪县", "value": "431223" }, { "label": "溆浦县", "value": "431224" }, { "label": "会同县", "value": "431225" }, { "label": "麻阳苗族自治县", "value": "431226" }, { "label": "新晃侗族自治县", "value": "431227" }, { "label": "芷江侗族自治县", "value": "431228" }, { "label": "靖州苗族侗族自治县", "value": "431229" }, { "label": "通道侗族自治县", "value": "431230" }, { "label": "洪江市", "value": "431281" }], [{ "label": "市辖区", "value": "431301" }, { "label": "娄星区", "value": "431302" }, { "label": "双峰县", "value": "431321" }, { "label": "新化县", "value": "431322" }, { "label": "冷水江市", "value": "431381" }, { "label": "涟源市", "value": "431382" }], [{ "label": "市辖区", "value": "433101" }, { "label": "泸溪县", "value": "433122" }, { "label": "凤凰县", "value": "433123" }, { "label": "花垣县", "value": "433124" }, { "label": "保靖县", "value": "433125" }, { "label": "古丈县", "value": "433126" }, { "label": "永顺县", "value": "433127" }, { "label": "龙山县", "value": "433130" }] ], { "0": [{ "label": "市辖区", "value": "440101" }, { "label": "荔湾区", "value": "440103" }, { "label": "越秀区", "value": "440104" }, { "label": "海珠区", "value": "440105" }, { "label": "天河区", "value": "440106" }, { "label": "白云区", "value": "440111" }, { "label": "黄埔区", "value": "440112" }, { "label": "番禺区", "value": "440113" }, { "label": "花都区", "value": "440114" }, { "label": "南沙区", "value": "440115" }, { "label": "从化区", "value": "440117" }, { "label": "增城区", "value": "440118" }, { "label": "萝岗区", "value": "920003" }], "1": [{ "label": "市辖区", "value": "440201" }, { "label": "武江区", "value": "440203" }, { "label": "浈江区", "value": "440204" }, { "label": "曲江区", "value": "440205" }, { "label": "始兴县", "value": "440222" }, { "label": "仁化县", "value": "440224" }, { "label": "翁源县", "value": "440229" }, { "label": "乳源瑶族自治县", "value": "440232" }, { "label": "新丰县", "value": "440233" }, { "label": "乐昌市", "value": "440281" }, { "label": "南雄市", "value": "440282" }], "2": [{ "label": "市辖区", "value": "440301" }, { "label": "罗湖区", "value": "440303" }, { "label": "福田区", "value": "440304" }, { "label": "南山区", "value": "440305" }, { "label": "宝安区", "value": "440306" }, { "label": "龙岗区", "value": "440307" }, { "label": "盐田区", "value": "440308" }], "3": [{ "label": "市辖区", "value": "440401" }, { "label": "香洲区", "value": "440402" }, { "label": "斗门区", "value": "440403" }, { "label": "金湾区", "value": "440404" }], "4": [{ "label": "市辖区", "value": "440501" }, { "label": "龙湖区", "value": "440507" }, { "label": "金平区", "value": "440511" }, { "label": "濠江区", "value": "440512" }, { "label": "潮阳区", "value": "440513" }, { "label": "潮南区", "value": "440514" }, { "label": "澄海区", "value": "440515" }, { "label": "南澳县", "value": "440523" }], "5": [{ "label": "市辖区", "value": "440601" }, { "label": "禅城区", "value": "440604" }, { "label": "南海区", "value": "440605" }, { "label": "顺德区", "value": "440606" }, { "label": "三水区", "value": "440607" }, { "label": "高明区", "value": "440608" }], "6": [{ "label": "市辖区", "value": "440701" }, { "label": "蓬江区", "value": "440703" }, { "label": "江海区", "value": "440704" }, { "label": "新会区", "value": "440705" }, { "label": "台山市", "value": "440781" }, { "label": "开平市", "value": "440783" }, { "label": "鹤山市", "value": "440784" }, { "label": "恩平市", "value": "440785" }], "7": [{ "label": "市辖区", "value": "440801" }, { "label": "赤坎区", "value": "440802" }, { "label": "霞山区", "value": "440803" }, { "label": "坡头区", "value": "440804" }, { "label": "麻章区", "value": "440811" }, { "label": "遂溪县", "value": "440823" }, { "label": "徐闻县", "value": "440825" }, { "label": "廉江市", "value": "440881" }, { "label": "雷州市", "value": "440882" }, { "label": "吴川市", "value": "440883" }], "8": [{ "label": "市辖区", "value": "440901" }, { "label": "茂南区", "value": "440902" }, { "label": "电白区", "value": "440904" }, { "label": "高州市", "value": "440981" }, { "label": "化州市", "value": "440982" }, { "label": "信宜市", "value": "440983" }], "9": [{ "label": "市辖区", "value": "441201" }, { "label": "端州区", "value": "441202" }, { "label": "鼎湖区", "value": "441203" }, { "label": "高要区", "value": "441204" }, { "label": "广宁县", "value": "441223" }, { "label": "怀集县", "value": "441224" }, { "label": "封开县", "value": "441225" }, { "label": "德庆县", "value": "441226" }, { "label": "四会市", "value": "441284" }], "10": [{ "label": "市辖区", "value": "441301" }, { "label": "惠城区", "value": "441302" }, { "label": "惠阳区", "value": "441303" }, { "label": "博罗县", "value": "441322" }, { "label": "惠东县", "value": "441323" }, { "label": "龙门县", "value": "441324" }], "11": [{ "label": "市辖区", "value": "441401" }, { "label": "梅江区", "value": "441402" }, { "label": "梅县区", "value": "441403" }, { "label": "大埔县", "value": "441422" }, { "label": "丰顺县", "value": "441423" }, { "label": "五华县", "value": "441424" }, { "label": "平远县", "value": "441426" }, { "label": "蕉岭县", "value": "441427" }, { "label": "兴宁市", "value": "441481" }], "12": [{ "label": "市辖区", "value": "441501" }, { "label": "城区", "value": "441502" }, { "label": "海丰县", "value": "441521" }, { "label": "陆河县", "value": "441523" }, { "label": "陆丰市", "value": "441581" }], "13": [{ "label": "市辖区", "value": "441601" }, { "label": "源城区", "value": "441602" }, { "label": "紫金县", "value": "441621" }, { "label": "龙川县", "value": "441622" }, { "label": "连平县", "value": "441623" }, { "label": "和平县", "value": "441624" }, { "label": "东源县", "value": "441625" }], "14": [{ "label": "市辖区", "value": "441701" }, { "label": "江城区", "value": "441702" }, { "label": "阳东区", "value": "441704" }, { "label": "阳西县", "value": "441721" }, { "label": "阳春市", "value": "441781" }], "15": [{ "label": "市辖区", "value": "441801" }, { "label": "清城区", "value": "441802" }, { "label": "清新区", "value": "441803" }, { "label": "佛冈县", "value": "441821" }, { "label": "阳山县", "value": "441823" }, { "label": "连山壮族瑶族自治县", "value": "441825" }, { "label": "连南瑶族自治县", "value": "441826" }, { "label": "英德市", "value": "441881" }, { "label": "连州市", "value": "441882" }], "18": [{ "label": "市辖区", "value": "445101" }, { "label": "湘桥区", "value": "445102" }, { "label": "潮安区", "value": "445103" }, { "label": "饶平县", "value": "445122" }], "19": [{ "label": "市辖区", "value": "445201" }, { "label": "榕城区", "value": "445202" }, { "label": "揭东区", "value": "445203" }, { "label": "揭西县", "value": "445222" }, { "label": "惠来县", "value": "445224" }, { "label": "普宁市", "value": "445281" }], "20": [{ "label": "市辖区", "value": "445301" }, { "label": "云城区", "value": "445302" }, { "label": "云安区", "value": "445303" }, { "label": "新兴县", "value": "445321" }, { "label": "郁南县", "value": "445322" }, { "label": "罗定市", "value": "445381" }] }, [ [{ "label": "市辖区", "value": "450101" }, { "label": "兴宁区", "value": "450102" }, { "label": "青秀区", "value": "450103" }, { "label": "江南区", "value": "450105" }, { "label": "西乡塘区", "value": "450107" }, { "label": "良庆区", "value": "450108" }, { "label": "邕宁区", "value": "450109" }, { "label": "武鸣区", "value": "450110" }, { "label": "隆安县", "value": "450123" }, { "label": "马山县", "value": "450124" }, { "label": "上林县", "value": "450125" }, { "label": "宾阳县", "value": "450126" }, { "label": "横县", "value": "450127" }], [{ "label": "市辖区", "value": "450201" }, { "label": "城中区", "value": "450202" }, { "label": "鱼峰区", "value": "450203" }, { "label": "柳南区", "value": "450204" }, { "label": "柳北区", "value": "450205" }, { "label": "柳江区", "value": "450206" }, { "label": "柳城县", "value": "450222" }, { "label": "鹿寨县", "value": "450223" }, { "label": "融安县", "value": "450224" }, { "label": "融水苗族自治县", "value": "450225" }, { "label": "三江侗族自治县", "value": "450226" }], [{ "label": "市辖区", "value": "450301" }, { "label": "秀峰区", "value": "450302" }, { "label": "叠彩区", "value": "450303" }, { "label": "象山区", "value": "450304" }, { "label": "七星区", "value": "450305" }, { "label": "雁山区", "value": "450311" }, { "label": "临桂区", "value": "450312" }, { "label": "阳朔县", "value": "450321" }, { "label": "灵川县", "value": "450323" }, { "label": "全州县", "value": "450324" }, { "label": "兴安县", "value": "450325" }, { "label": "永福县", "value": "450326" }, { "label": "灌阳县", "value": "450327" }, { "label": "龙胜各族自治县", "value": "450328" }, { "label": "资源县", "value": "450329" }, { "label": "平乐县", "value": "450330" }, { "label": "荔浦县", "value": "450331" }, { "label": "恭城瑶族自治县", "value": "450332" }], [{ "label": "市辖区", "value": "450401" }, { "label": "万秀区", "value": "450403" }, { "label": "长洲区", "value": "450405" }, { "label": "龙圩区", "value": "450406" }, { "label": "苍梧县", "value": "450421" }, { "label": "藤县", "value": "450422" }, { "label": "蒙山县", "value": "450423" }, { "label": "岑溪市", "value": "450481" }], [{ "label": "市辖区", "value": "450501" }, { "label": "海城区", "value": "450502" }, { "label": "银海区", "value": "450503" }, { "label": "铁山港区", "value": "450512" }, { "label": "合浦县", "value": "450521" }], [{ "label": "市辖区", "value": "450601" }, { "label": "港口区", "value": "450602" }, { "label": "防城区", "value": "450603" }, { "label": "上思县", "value": "450621" }, { "label": "东兴市", "value": "450681" }], [{ "label": "市辖区", "value": "450701" }, { "label": "钦南区", "value": "450702" }, { "label": "钦北区", "value": "450703" }, { "label": "灵山县", "value": "450721" }, { "label": "浦北县", "value": "450722" }], [{ "label": "市辖区", "value": "450801" }, { "label": "港北区", "value": "450802" }, { "label": "港南区", "value": "450803" }, { "label": "覃塘区", "value": "450804" }, { "label": "平南县", "value": "450821" }, { "label": "桂平市", "value": "450881" }], [{ "label": "市辖区", "value": "450901" }, { "label": "玉州区", "value": "450902" }, { "label": "福绵区", "value": "450903" }, { "label": "容县", "value": "450921" }, { "label": "陆川县", "value": "450922" }, { "label": "博白县", "value": "450923" }, { "label": "兴业县", "value": "450924" }, { "label": "北流市", "value": "450981" }], [{ "label": "市辖区", "value": "451001" }, { "label": "右江区", "value": "451002" }, { "label": "田阳县", "value": "451021" }, { "label": "田东县", "value": "451022" }, { "label": "平果县", "value": "451023" }, { "label": "德保县", "value": "451024" }, { "label": "那坡县", "value": "451026" }, { "label": "凌云县", "value": "451027" }, { "label": "乐业县", "value": "451028" }, { "label": "田林县", "value": "451029" }, { "label": "西林县", "value": "451030" }, { "label": "隆林各族自治县", "value": "451031" }, { "label": "靖西市", "value": "451081" }], [{ "label": "市辖区", "value": "451101" }, { "label": "八步区", "value": "451102" }, { "label": "平桂区", "value": "451103" }, { "label": "昭平县", "value": "451121" }, { "label": "钟山县", "value": "451122" }, { "label": "富川瑶族自治县", "value": "451123" }], [{ "label": "市辖区", "value": "451201" }, { "label": "金城江区", "value": "451202" }, { "label": "南丹县", "value": "451221" }, { "label": "天峨县", "value": "451222" }, { "label": "凤山县", "value": "451223" }, { "label": "东兰县", "value": "451224" }, { "label": "罗城仫佬族自治县", "value": "451225" }, { "label": "环江毛南族自治县", "value": "451226" }, { "label": "巴马瑶族自治县", "value": "451227" }, { "label": "都安瑶族自治县", "value": "451228" }, { "label": "大化瑶族自治县", "value": "451229" }, { "label": "宜州市", "value": "451281" }], [{ "label": "市辖区", "value": "451301" }, { "label": "兴宾区", "value": "451302" }, { "label": "忻城县", "value": "451321" }, { "label": "象州县", "value": "451322" }, { "label": "武宣县", "value": "451323" }, { "label": "金秀瑶族自治县", "value": "451324" }, { "label": "合山市", "value": "451381" }], [{ "label": "市辖区", "value": "451401" }, { "label": "江州区", "value": "451402" }, { "label": "扶绥县", "value": "451421" }, { "label": "宁明县", "value": "451422" }, { "label": "龙州县", "value": "451423" }, { "label": "大新县", "value": "451424" }, { "label": "天等县", "value": "451425" }, { "label": "凭祥市", "value": "451481" }] ], { "0": [{ "label": "市辖区", "value": "460101" }, { "label": "秀英区", "value": "460105" }, { "label": "龙华区", "value": "460106" }, { "label": "琼山区", "value": "460107" }, { "label": "美兰区", "value": "460108" }], "1": [{ "label": "市辖区", "value": "460201" }, { "label": "海棠区", "value": "460202" }, { "label": "吉阳区", "value": "460203" }, { "label": "天涯区", "value": "460204" }, { "label": "崖州区", "value": "460205" }], "4": [{ "label": "市辖区", "value": "469001" }, { "label": "琼海市", "value": "469002" }, { "label": "文昌市", "value": "469005" }, { "label": "万宁市", "value": "469006" }, { "label": "东方市", "value": "469007" }, { "label": "定安县", "value": "469021" }, { "label": "屯昌县", "value": "469022" }, { "label": "澄迈县", "value": "469023" }, { "label": "临高县", "value": "469024" }, { "label": "白沙黎族自治县", "value": "469025" }, { "label": "昌江黎族自治县", "value": "469026" }, { "label": "乐东黎族自治县", "value": "469027" }, { "label": "陵水黎族自治县", "value": "469028" }, { "label": "保亭黎族苗族自治县", "value": "469029" }, { "label": "琼中黎族苗族自治县", "value": "469030" }] }, [ [{ "label": "万州区", "value": "500101" }, { "label": "涪陵区", "value": "500102" }, { "label": "渝中区", "value": "500103" }, { "label": "大渡口区", "value": "500104" }, { "label": "江北区", "value": "500105" }, { "label": "沙坪坝区", "value": "500106" }, { "label": "九龙坡区", "value": "500107" }, { "label": "南岸区", "value": "500108" }, { "label": "北碚区", "value": "500109" }, { "label": "綦江区", "value": "500110" }, { "label": "大足区", "value": "500111" }, { "label": "渝北区", "value": "500112" }, { "label": "巴南区", "value": "500113" }, { "label": "黔江区", "value": "500114" }, { "label": "长寿区", "value": "500115" }, { "label": "江津区", "value": "500116" }, { "label": "合川区", "value": "500117" }, { "label": "永川区", "value": "500118" }, { "label": "南川区", "value": "500119" }, { "label": "璧山区", "value": "500120" }, { "label": "铜梁区", "value": "500151" }, { "label": "潼南区", "value": "500152" }, { "label": "荣昌区", "value": "500153" }, { "label": "开州区", "value": "500154" }], [{ "label": "梁平县", "value": "500228" }, { "label": "城口县", "value": "500229" }, { "label": "丰都县", "value": "500230" }, { "label": "垫江县", "value": "500231" }, { "label": "武隆县", "value": "500232" }, { "label": "忠县", "value": "500233" }, { "label": "云阳县", "value": "500235" }, { "label": "奉节县", "value": "500236" }, { "label": "巫山县", "value": "500237" }, { "label": "巫溪县", "value": "500238" }, { "label": "石柱土家族自治县", "value": "500240" }, { "label": "秀山土家族苗族自治县", "value": "500241" }, { "label": "酉阳土家族苗族自治县", "value": "500242" }, { "label": "彭水苗族土家族自治县", "value": "500243" }, { "label": "静海县", "value": "920000" }] ], [ [{ "label": "市辖区", "value": "510101" }, { "label": "锦江区", "value": "510104" }, { "label": "青羊区", "value": "510105" }, { "label": "金牛区", "value": "510106" }, { "label": "武侯区", "value": "510107" }, { "label": "成华区", "value": "510108" }, { "label": "龙泉驿区", "value": "510112" }, { "label": "青白江区", "value": "510113" }, { "label": "新都区", "value": "510114" }, { "label": "温江区", "value": "510115" }, { "label": "双流区", "value": "510116" }, { "label": "金堂县", "value": "510121" }, { "label": "郫县", "value": "510124" }, { "label": "大邑县", "value": "510129" }, { "label": "蒲江县", "value": "510131" }, { "label": "新津县", "value": "510132" }, { "label": "都江堰市", "value": "510181" }, { "label": "彭州市", "value": "510182" }, { "label": "邛崃市", "value": "510183" }, { "label": "崇州市", "value": "510184" }, { "label": "简阳市", "value": "510185" }], [{ "label": "市辖区", "value": "510301" }, { "label": "自流井区", "value": "510302" }, { "label": "贡井区", "value": "510303" }, { "label": "大安区", "value": "510304" }, { "label": "沿滩区", "value": "510311" }, { "label": "荣县", "value": "510321" }, { "label": "富顺县", "value": "510322" }], [{ "label": "市辖区", "value": "510401" }, { "label": "东区", "value": "510402" }, { "label": "西区", "value": "510403" }, { "label": "仁和区", "value": "510411" }, { "label": "米易县", "value": "510421" }, { "label": "盐边县", "value": "510422" }], [{ "label": "市辖区", "value": "510501" }, { "label": "江阳区", "value": "510502" }, { "label": "纳溪区", "value": "510503" }, { "label": "龙马潭区", "value": "510504" }, { "label": "泸县", "value": "510521" }, { "label": "合江县", "value": "510522" }, { "label": "叙永县", "value": "510524" }, { "label": "古蔺县", "value": "510525" }], [{ "label": "市辖区", "value": "510601" }, { "label": "旌阳区", "value": "510603" }, { "label": "中江县", "value": "510623" }, { "label": "罗江县", "value": "510626" }, { "label": "广汉市", "value": "510681" }, { "label": "什邡市", "value": "510682" }, { "label": "绵竹市", "value": "510683" }], [{ "label": "市辖区", "value": "510701" }, { "label": "涪城区", "value": "510703" }, { "label": "游仙区", "value": "510704" }, { "label": "安州区", "value": "510705" }, { "label": "三台县", "value": "510722" }, { "label": "盐亭县", "value": "510723" }, { "label": "梓潼县", "value": "510725" }, { "label": "北川羌族自治县", "value": "510726" }, { "label": "平武县", "value": "510727" }, { "label": "江油市", "value": "510781" }], [{ "label": "市辖区", "value": "510801" }, { "label": "利州区", "value": "510802" }, { "label": "昭化区", "value": "510811" }, { "label": "朝天区", "value": "510812" }, { "label": "旺苍县", "value": "510821" }, { "label": "青川县", "value": "510822" }, { "label": "剑阁县", "value": "510823" }, { "label": "苍溪县", "value": "510824" }], [{ "label": "市辖区", "value": "510901" }, { "label": "船山区", "value": "510903" }, { "label": "安居区", "value": "510904" }, { "label": "蓬溪县", "value": "510921" }, { "label": "射洪县", "value": "510922" }, { "label": "大英县", "value": "510923" }], [{ "label": "市辖区", "value": "511001" }, { "label": "市中区", "value": "511002" }, { "label": "东兴区", "value": "511011" }, { "label": "威远县", "value": "511024" }, { "label": "资中县", "value": "511025" }, { "label": "隆昌县", "value": "511028" }], [{ "label": "市辖区", "value": "511101" }, { "label": "市中区", "value": "511102" }, { "label": "沙湾区", "value": "511111" }, { "label": "五通桥区", "value": "511112" }, { "label": "金口河区", "value": "511113" }, { "label": "犍为县", "value": "511123" }, { "label": "井研县", "value": "511124" }, { "label": "夹江县", "value": "511126" }, { "label": "沐川县", "value": "511129" }, { "label": "峨边彝族自治县", "value": "511132" }, { "label": "马边彝族自治县", "value": "511133" }, { "label": "峨眉山市", "value": "511181" }], [{ "label": "市辖区", "value": "511301" }, { "label": "顺庆区", "value": "511302" }, { "label": "高坪区", "value": "511303" }, { "label": "嘉陵区", "value": "511304" }, { "label": "南部县", "value": "511321" }, { "label": "营山县", "value": "511322" }, { "label": "蓬安县", "value": "511323" }, { "label": "仪陇县", "value": "511324" }, { "label": "西充县", "value": "511325" }, { "label": "阆中市", "value": "511381" }], [{ "label": "市辖区", "value": "511401" }, { "label": "东坡区", "value": "511402" }, { "label": "彭山区", "value": "511403" }, { "label": "仁寿县", "value": "511421" }, { "label": "洪雅县", "value": "511423" }, { "label": "丹棱县", "value": "511424" }, { "label": "青神县", "value": "511425" }], [{ "label": "市辖区", "value": "511501" }, { "label": "翠屏区", "value": "511502" }, { "label": "南溪区", "value": "511503" }, { "label": "宜宾县", "value": "511521" }, { "label": "江安县", "value": "511523" }, { "label": "长宁县", "value": "511524" }, { "label": "高县", "value": "511525" }, { "label": "珙县", "value": "511526" }, { "label": "筠连县", "value": "511527" }, { "label": "兴文县", "value": "511528" }, { "label": "屏山县", "value": "511529" }], [{ "label": "市辖区", "value": "511601" }, { "label": "广安区", "value": "511602" }, { "label": "前锋区", "value": "511603" }, { "label": "岳池县", "value": "511621" }, { "label": "武胜县", "value": "511622" }, { "label": "邻水县", "value": "511623" }, { "label": "华蓥市", "value": "511681" }], [{ "label": "市辖区", "value": "511701" }, { "label": "通川区", "value": "511702" }, { "label": "达川区", "value": "511703" }, { "label": "宣汉县", "value": "511722" }, { "label": "开江县", "value": "511723" }, { "label": "大竹县", "value": "511724" }, { "label": "渠县", "value": "511725" }, { "label": "万源市", "value": "511781" }], [{ "label": "市辖区", "value": "511801" }, { "label": "雨城区", "value": "511802" }, { "label": "名山区", "value": "511803" }, { "label": "荥经县", "value": "511822" }, { "label": "汉源县", "value": "511823" }, { "label": "石棉县", "value": "511824" }, { "label": "天全县", "value": "511825" }, { "label": "芦山县", "value": "511826" }, { "label": "宝兴县", "value": "511827" }], [{ "label": "市辖区", "value": "511901" }, { "label": "巴州区", "value": "511902" }, { "label": "恩阳区", "value": "511903" }, { "label": "通江县", "value": "511921" }, { "label": "南江县", "value": "511922" }, { "label": "平昌县", "value": "511923" }], [{ "label": "市辖区", "value": "512001" }, { "label": "雁江区", "value": "512002" }, { "label": "安岳县", "value": "512021" }, { "label": "乐至县", "value": "512022" }], [{ "label": "市辖区", "value": "513201" }, { "label": "汶川县", "value": "513221" }, { "label": "理县", "value": "513222" }, { "label": "茂县", "value": "513223" }, { "label": "松潘县", "value": "513224" }, { "label": "九寨沟县", "value": "513225" }, { "label": "金川县", "value": "513226" }, { "label": "小金县", "value": "513227" }, { "label": "黑水县", "value": "513228" }, { "label": "壤塘县", "value": "513230" }, { "label": "阿坝县", "value": "513231" }, { "label": "若尔盖县", "value": "513232" }, { "label": "红原县", "value": "513233" }], [{ "label": "市辖区", "value": "513301" }, { "label": "泸定县", "value": "513322" }, { "label": "丹巴县", "value": "513323" }, { "label": "九龙县", "value": "513324" }, { "label": "雅江县", "value": "513325" }, { "label": "道孚县", "value": "513326" }, { "label": "炉霍县", "value": "513327" }, { "label": "甘孜县", "value": "513328" }, { "label": "新龙县", "value": "513329" }, { "label": "德格县", "value": "513330" }, { "label": "白玉县", "value": "513331" }, { "label": "石渠县", "value": "513332" }, { "label": "色达县", "value": "513333" }, { "label": "理塘县", "value": "513334" }, { "label": "巴塘县", "value": "513335" }, { "label": "乡城县", "value": "513336" }, { "label": "稻城县", "value": "513337" }, { "label": "得荣县", "value": "513338" }], [{ "label": "市辖区", "value": "513401" }, { "label": "木里藏族自治县", "value": "513422" }, { "label": "盐源县", "value": "513423" }, { "label": "德昌县", "value": "513424" }, { "label": "会理县", "value": "513425" }, { "label": "会东县", "value": "513426" }, { "label": "宁南县", "value": "513427" }, { "label": "普格县", "value": "513428" }, { "label": "布拖县", "value": "513429" }, { "label": "金阳县", "value": "513430" }, { "label": "昭觉县", "value": "513431" }, { "label": "喜德县", "value": "513432" }, { "label": "冕宁县", "value": "513433" }, { "label": "越西县", "value": "513434" }, { "label": "甘洛县", "value": "513435" }, { "label": "美姑县", "value": "513436" }, { "label": "雷波县", "value": "513437" }] ], [ [{ "label": "市辖区", "value": "520101" }, { "label": "南明区", "value": "520102" }, { "label": "云岩区", "value": "520103" }, { "label": "花溪区", "value": "520111" }, { "label": "乌当区", "value": "520112" }, { "label": "白云区", "value": "520113" }, { "label": "观山湖区", "value": "520115" }, { "label": "开阳县", "value": "520121" }, { "label": "息烽县", "value": "520122" }, { "label": "修文县", "value": "520123" }, { "label": "清镇市", "value": "520181" }], [{ "label": "钟山区", "value": "520201" }, { "label": "六枝特区", "value": "520203" }, { "label": "水城县", "value": "520221" }, { "label": "盘县", "value": "520222" }], [{ "label": "市辖区", "value": "520301" }, { "label": "红花岗区", "value": "520302" }, { "label": "汇川区", "value": "520303" }, { "label": "播州区", "value": "520304" }, { "label": "桐梓县", "value": "520322" }, { "label": "绥阳县", "value": "520323" }, { "label": "正安县", "value": "520324" }, { "label": "道真仡佬族苗族自治县", "value": "520325" }, { "label": "务川仡佬族苗族自治县", "value": "520326" }, { "label": "凤冈县", "value": "520327" }, { "label": "湄潭县", "value": "520328" }, { "label": "余庆县", "value": "520329" }, { "label": "习水县", "value": "520330" }, { "label": "赤水市", "value": "520381" }, { "label": "仁怀市", "value": "520382" }], [{ "label": "市辖区", "value": "520401" }, { "label": "西秀区", "value": "520402" }, { "label": "平坝区", "value": "520403" }, { "label": "普定县", "value": "520422" }, { "label": "镇宁布依族苗族自治县", "value": "520423" }, { "label": "关岭布依族苗族自治县", "value": "520424" }, { "label": "紫云苗族布依族自治县", "value": "520425" }], [{ "label": "市辖区", "value": "520501" }, { "label": "七星关区", "value": "520502" }, { "label": "大方县", "value": "520521" }, { "label": "黔西县", "value": "520522" }, { "label": "金沙县", "value": "520523" }, { "label": "织金县", "value": "520524" }, { "label": "纳雍县", "value": "520525" }, { "label": "威宁彝族回族苗族自治县", "value": "520526" }, { "label": "赫章县", "value": "520527" }], [{ "label": "市辖区", "value": "520601" }, { "label": "碧江区", "value": "520602" }, { "label": "万山区", "value": "520603" }, { "label": "江口县", "value": "520621" }, { "label": "玉屏侗族自治县", "value": "520622" }, { "label": "石阡县", "value": "520623" }, { "label": "思南县", "value": "520624" }, { "label": "印江土家族苗族自治县", "value": "520625" }, { "label": "德江县", "value": "520626" }, { "label": "沿河土家族自治县", "value": "520627" }, { "label": "松桃苗族自治县", "value": "520628" }], [{ "label": "市辖区", "value": "522301" }, { "label": "兴仁县", "value": "522322" }, { "label": "普安县", "value": "522323" }, { "label": "晴隆县", "value": "522324" }, { "label": "贞丰县", "value": "522325" }, { "label": "望谟县", "value": "522326" }, { "label": "册亨县", "value": "522327" }, { "label": "安龙县", "value": "522328" }], [{ "label": "市辖区", "value": "522601" }, { "label": "黄平县", "value": "522622" }, { "label": "施秉县", "value": "522623" }, { "label": "三穗县", "value": "522624" }, { "label": "镇远县", "value": "522625" }, { "label": "岑巩县", "value": "522626" }, { "label": "天柱县", "value": "522627" }, { "label": "锦屏县", "value": "522628" }, { "label": "剑河县", "value": "522629" }, { "label": "台江县", "value": "522630" }, { "label": "黎平县", "value": "522631" }, { "label": "榕江县", "value": "522632" }, { "label": "从江县", "value": "522633" }, { "label": "雷山县", "value": "522634" }, { "label": "麻江县", "value": "522635" }, { "label": "丹寨县", "value": "522636" }], [{ "label": "市辖区", "value": "522701" }, { "label": "福泉市", "value": "522702" }, { "label": "荔波县", "value": "522722" }, { "label": "贵定县", "value": "522723" }, { "label": "瓮安县", "value": "522725" }, { "label": "独山县", "value": "522726" }, { "label": "平塘县", "value": "522727" }, { "label": "罗甸县", "value": "522728" }, { "label": "长顺县", "value": "522729" }, { "label": "龙里县", "value": "522730" }, { "label": "惠水县", "value": "522731" }, { "label": "三都水族自治县", "value": "522732" }] ], [ [{ "label": "市辖区", "value": "530101" }, { "label": "五华区", "value": "530102" }, { "label": "盘龙区", "value": "530103" }, { "label": "官渡区", "value": "530111" }, { "label": "西山区", "value": "530112" }, { "label": "东川区", "value": "530113" }, { "label": "呈贡区", "value": "530114" }, { "label": "晋宁县", "value": "530122" }, { "label": "富民县", "value": "530124" }, { "label": "宜良县", "value": "530125" }, { "label": "石林彝族自治县", "value": "530126" }, { "label": "嵩明县", "value": "530127" }, { "label": "禄劝彝族苗族自治县", "value": "530128" }, { "label": "寻甸回族彝族自治县", "value": "530129" }, { "label": "安宁市", "value": "530181" }], [{ "label": "市辖区", "value": "530301" }, { "label": "麒麟区", "value": "530302" }, { "label": "沾益区", "value": "530303" }, { "label": "马龙县", "value": "530321" }, { "label": "陆良县", "value": "530322" }, { "label": "师宗县", "value": "530323" }, { "label": "罗平县", "value": "530324" }, { "label": "富源县", "value": "530325" }, { "label": "会泽县", "value": "530326" }, { "label": "宣威市", "value": "530381" }], [{ "label": "市辖区", "value": "530401" }, { "label": "红塔区", "value": "530402" }, { "label": "江川区", "value": "530403" }, { "label": "澄江县", "value": "530422" }, { "label": "通海县", "value": "530423" }, { "label": "华宁县", "value": "530424" }, { "label": "易门县", "value": "530425" }, { "label": "峨山彝族自治县", "value": "530426" }, { "label": "新平彝族傣族自治县", "value": "530427" }, { "label": "元江哈尼族彝族傣族自治县", "value": "530428" }], [{ "label": "市辖区", "value": "530501" }, { "label": "隆阳区", "value": "530502" }, { "label": "施甸县", "value": "530521" }, { "label": "龙陵县", "value": "530523" }, { "label": "昌宁县", "value": "530524" }, { "label": "腾冲市", "value": "530581" }], [{ "label": "市辖区", "value": "530601" }, { "label": "昭阳区", "value": "530602" }, { "label": "鲁甸县", "value": "530621" }, { "label": "巧家县", "value": "530622" }, { "label": "盐津县", "value": "530623" }, { "label": "大关县", "value": "530624" }, { "label": "永善县", "value": "530625" }, { "label": "绥江县", "value": "530626" }, { "label": "镇雄县", "value": "530627" }, { "label": "彝良县", "value": "530628" }, { "label": "威信县", "value": "530629" }, { "label": "水富县", "value": "530630" }], [{ "label": "市辖区", "value": "530701" }, { "label": "古城区", "value": "530702" }, { "label": "玉龙纳西族自治县", "value": "530721" }, { "label": "永胜县", "value": "530722" }, { "label": "华坪县", "value": "530723" }, { "label": "宁蒗彝族自治县", "value": "530724" }], [{ "label": "市辖区", "value": "530801" }, { "label": "思茅区", "value": "530802" }, { "label": "宁洱哈尼族彝族自治县", "value": "530821" }, { "label": "墨江哈尼族自治县", "value": "530822" }, { "label": "景东彝族自治县", "value": "530823" }, { "label": "景谷傣族彝族自治县", "value": "530824" }, { "label": "镇沅彝族哈尼族拉祜族自治县", "value": "530825" }, { "label": "江城哈尼族彝族自治县", "value": "530826" }, { "label": "孟连傣族拉祜族佤族自治县", "value": "530827" }, { "label": "澜沧拉祜族自治县", "value": "530828" }, { "label": "西盟佤族自治县", "value": "530829" }], [{ "label": "市辖区", "value": "530901" }, { "label": "临翔区", "value": "530902" }, { "label": "凤庆县", "value": "530921" }, { "label": "云县", "value": "530922" }, { "label": "永德县", "value": "530923" }, { "label": "镇康县", "value": "530924" }, { "label": "双江拉祜族佤族布朗族傣族自治县", "value": "530925" }, { "label": "耿马傣族佤族自治县", "value": "530926" }, { "label": "沧源佤族自治县", "value": "530927" }], [{ "label": "市辖区", "value": "532301" }, { "label": "双柏县", "value": "532322" }, { "label": "牟定县", "value": "532323" }, { "label": "南华县", "value": "532324" }, { "label": "姚安县", "value": "532325" }, { "label": "大姚县", "value": "532326" }, { "label": "永仁县", "value": "532327" }, { "label": "元谋县", "value": "532328" }, { "label": "武定县", "value": "532329" }, { "label": "禄丰县", "value": "532331" }], [{ "label": "市辖区", "value": "532501" }, { "label": "开远市", "value": "532502" }, { "label": "蒙自市", "value": "532503" }, { "label": "弥勒市", "value": "532504" }, { "label": "屏边苗族自治县", "value": "532523" }, { "label": "建水县", "value": "532524" }, { "label": "石屏县", "value": "532525" }, { "label": "泸西县", "value": "532527" }, { "label": "元阳县", "value": "532528" }, { "label": "红河县", "value": "532529" }, { "label": "金平苗族瑶族傣族自治县", "value": "532530" }, { "label": "绿春县", "value": "532531" }, { "label": "河口瑶族自治县", "value": "532532" }], [{ "label": "市辖区", "value": "532601" }, { "label": "砚山县", "value": "532622" }, { "label": "西畴县", "value": "532623" }, { "label": "麻栗坡县", "value": "532624" }, { "label": "马关县", "value": "532625" }, { "label": "丘北县", "value": "532626" }, { "label": "广南县", "value": "532627" }, { "label": "富宁县", "value": "532628" }], [{ "label": "市辖区", "value": "532801" }, { "label": "勐海县", "value": "532822" }, { "label": "勐腊县", "value": "532823" }], [{ "label": "市辖区", "value": "532901" }, { "label": "漾濞彝族自治县", "value": "532922" }, { "label": "祥云县", "value": "532923" }, { "label": "宾川县", "value": "532924" }, { "label": "弥渡县", "value": "532925" }, { "label": "南涧彝族自治县", "value": "532926" }, { "label": "巍山彝族回族自治县", "value": "532927" }, { "label": "永平县", "value": "532928" }, { "label": "云龙县", "value": "532929" }, { "label": "洱源县", "value": "532930" }, { "label": "剑川县", "value": "532931" }, { "label": "鹤庆县", "value": "532932" }], [{ "label": "瑞丽市", "value": "533102" }, { "label": "芒市", "value": "533103" }, { "label": "梁河县", "value": "533122" }, { "label": "盈江县", "value": "533123" }, { "label": "陇川县", "value": "533124" }], [{ "label": "市辖区", "value": "533301" }, { "label": "福贡县", "value": "533323" }, { "label": "贡山独龙族怒族自治县", "value": "533324" }, { "label": "兰坪白族普米族自治县", "value": "533325" }], [{ "label": "市辖区", "value": "533401" }, { "label": "德钦县", "value": "533422" }, { "label": "维西傈僳族自治县", "value": "533423" }] ], [ [{ "label": "市辖区", "value": "540101" }, { "label": "城关区", "value": "540102" }, { "label": "堆龙德庆区", "value": "540103" }, { "label": "林周县", "value": "540121" }, { "label": "当雄县", "value": "540122" }, { "label": "尼木县", "value": "540123" }, { "label": "曲水县", "value": "540124" }, { "label": "达孜县", "value": "540126" }, { "label": "墨竹工卡县", "value": "540127" }], [{ "label": "桑珠孜区", "value": "540202" }, { "label": "南木林县", "value": "540221" }, { "label": "江孜县", "value": "540222" }, { "label": "定日县", "value": "540223" }, { "label": "萨迦县", "value": "540224" }, { "label": "拉孜县", "value": "540225" }, { "label": "昂仁县", "value": "540226" }, { "label": "谢通门县", "value": "540227" }, { "label": "白朗县", "value": "540228" }, { "label": "仁布县", "value": "540229" }, { "label": "康马县", "value": "540230" }, { "label": "定结县", "value": "540231" }, { "label": "仲巴县", "value": "540232" }, { "label": "亚东县", "value": "540233" }, { "label": "吉隆县", "value": "540234" }, { "label": "聂拉木县", "value": "540235" }, { "label": "萨嘎县", "value": "540236" }, { "label": "岗巴县", "value": "540237" }], [{ "label": "卡若区", "value": "540302" }, { "label": "江达县", "value": "540321" }, { "label": "贡觉县", "value": "540322" }, { "label": "类乌齐县", "value": "540323" }, { "label": "丁青县", "value": "540324" }, { "label": "察雅县", "value": "540325" }, { "label": "八宿县", "value": "540326" }, { "label": "左贡县", "value": "540327" }, { "label": "芒康县", "value": "540328" }, { "label": "洛隆县", "value": "540329" }, { "label": "边坝县", "value": "540330" }], [{ "label": "巴宜区", "value": "540402" }, { "label": "工布江达县", "value": "540421" }, { "label": "米林县", "value": "540422" }, { "label": "墨脱县", "value": "540423" }, { "label": "波密县", "value": "540424" }, { "label": "察隅县", "value": "540425" }, { "label": "朗县", "value": "540426" }], [{ "label": "市辖区", "value": "540501" }, { "label": "乃东区", "value": "540502" }, { "label": "扎囊县", "value": "540521" }, { "label": "贡嘎县", "value": "540522" }, { "label": "桑日县", "value": "540523" }, { "label": "琼结县", "value": "540524" }, { "label": "曲松县", "value": "540525" }, { "label": "措美县", "value": "540526" }, { "label": "洛扎县", "value": "540527" }, { "label": "加查县", "value": "540528" }, { "label": "隆子县", "value": "540529" }, { "label": "错那县", "value": "540530" }, { "label": "浪卡子县", "value": "540531" }], [{ "label": "那曲县", "value": "542421" }, { "label": "嘉黎县", "value": "542422" }, { "label": "比如县", "value": "542423" }, { "label": "聂荣县", "value": "542424" }, { "label": "安多县", "value": "542425" }, { "label": "申扎县", "value": "542426" }, { "label": "索县", "value": "542427" }, { "label": "班戈县", "value": "542428" }, { "label": "巴青县", "value": "542429" }, { "label": "尼玛县", "value": "542430" }, { "label": "双湖县", "value": "542431" }], [{ "label": "普兰县", "value": "542521" }, { "label": "札达县", "value": "542522" }, { "label": "噶尔县", "value": "542523" }, { "label": "日土县", "value": "542524" }, { "label": "革吉县", "value": "542525" }, { "label": "改则县", "value": "542526" }, { "label": "措勤县", "value": "542527" }] ], [ [{ "label": "市辖区", "value": "610101" }, { "label": "新城区", "value": "610102" }, { "label": "碑林区", "value": "610103" }, { "label": "莲湖区", "value": "610104" }, { "label": "灞桥区", "value": "610111" }, { "label": "未央区", "value": "610112" }, { "label": "雁塔区", "value": "610113" }, { "label": "阎良区", "value": "610114" }, { "label": "临潼区", "value": "610115" }, { "label": "长安区", "value": "610116" }, { "label": "高陵区", "value": "610117" }, { "label": "蓝田县", "value": "610122" }, { "label": "周至县", "value": "610124" }, { "label": "户县", "value": "610125" }], [{ "label": "市辖区", "value": "610201" }, { "label": "王益区", "value": "610202" }, { "label": "印台区", "value": "610203" }, { "label": "耀州区", "value": "610204" }, { "label": "宜君县", "value": "610222" }], [{ "label": "市辖区", "value": "610301" }, { "label": "渭滨区", "value": "610302" }, { "label": "金台区", "value": "610303" }, { "label": "陈仓区", "value": "610304" }, { "label": "凤翔县", "value": "610322" }, { "label": "岐山县", "value": "610323" }, { "label": "扶风县", "value": "610324" }, { "label": "眉县", "value": "610326" }, { "label": "陇县", "value": "610327" }, { "label": "千阳县", "value": "610328" }, { "label": "麟游县", "value": "610329" }, { "label": "凤县", "value": "610330" }, { "label": "太白县", "value": "610331" }], [{ "label": "市辖区", "value": "610401" }, { "label": "秦都区", "value": "610402" }, { "label": "杨陵区", "value": "610403" }, { "label": "渭城区", "value": "610404" }, { "label": "三原县", "value": "610422" }, { "label": "泾阳县", "value": "610423" }, { "label": "乾县", "value": "610424" }, { "label": "礼泉县", "value": "610425" }, { "label": "永寿县", "value": "610426" }, { "label": "彬县", "value": "610427" }, { "label": "长武县", "value": "610428" }, { "label": "旬邑县", "value": "610429" }, { "label": "淳化县", "value": "610430" }, { "label": "武功县", "value": "610431" }, { "label": "兴平市", "value": "610481" }], [{ "label": "市辖区", "value": "610501" }, { "label": "临渭区", "value": "610502" }, { "label": "华州区", "value": "610503" }, { "label": "潼关县", "value": "610522" }, { "label": "大荔县", "value": "610523" }, { "label": "合阳县", "value": "610524" }, { "label": "澄城县", "value": "610525" }, { "label": "蒲城县", "value": "610526" }, { "label": "白水县", "value": "610527" }, { "label": "富平县", "value": "610528" }, { "label": "韩城市", "value": "610581" }, { "label": "华阴市", "value": "610582" }], [{ "label": "市辖区", "value": "610601" }, { "label": "宝塔区", "value": "610602" }, { "label": "安塞区", "value": "610603" }, { "label": "延长县", "value": "610621" }, { "label": "延川县", "value": "610622" }, { "label": "子长县", "value": "610623" }, { "label": "志丹县", "value": "610625" }, { "label": "吴起县", "value": "610626" }, { "label": "甘泉县", "value": "610627" }, { "label": "富县", "value": "610628" }, { "label": "洛川县", "value": "610629" }, { "label": "宜川县", "value": "610630" }, { "label": "黄龙县", "value": "610631" }, { "label": "黄陵县", "value": "610632" }], [{ "label": "市辖区", "value": "610701" }, { "label": "汉台区", "value": "610702" }, { "label": "南郑县", "value": "610721" }, { "label": "城固县", "value": "610722" }, { "label": "洋县", "value": "610723" }, { "label": "西乡县", "value": "610724" }, { "label": "勉县", "value": "610725" }, { "label": "宁强县", "value": "610726" }, { "label": "略阳县", "value": "610727" }, { "label": "镇巴县", "value": "610728" }, { "label": "留坝县", "value": "610729" }, { "label": "佛坪县", "value": "610730" }], [{ "label": "市辖区", "value": "610801" }, { "label": "榆阳区", "value": "610802" }, { "label": "横山区", "value": "610803" }, { "label": "神木县", "value": "610821" }, { "label": "府谷县", "value": "610822" }, { "label": "靖边县", "value": "610824" }, { "label": "定边县", "value": "610825" }, { "label": "绥德县", "value": "610826" }, { "label": "米脂县", "value": "610827" }, { "label": "佳县", "value": "610828" }, { "label": "吴堡县", "value": "610829" }, { "label": "清涧县", "value": "610830" }, { "label": "子洲县", "value": "610831" }], [{ "label": "市辖区", "value": "610901" }, { "label": "汉滨区", "value": "610902" }, { "label": "汉阴县", "value": "610921" }, { "label": "石泉县", "value": "610922" }, { "label": "宁陕县", "value": "610923" }, { "label": "紫阳县", "value": "610924" }, { "label": "岚皋县", "value": "610925" }, { "label": "平利县", "value": "610926" }, { "label": "镇坪县", "value": "610927" }, { "label": "旬阳县", "value": "610928" }, { "label": "白河县", "value": "610929" }], [{ "label": "市辖区", "value": "611001" }, { "label": "商州区", "value": "611002" }, { "label": "洛南县", "value": "611021" }, { "label": "丹凤县", "value": "611022" }, { "label": "商南县", "value": "611023" }, { "label": "山阳县", "value": "611024" }, { "label": "镇安县", "value": "611025" }, { "label": "柞水县", "value": "611026" }] ], [ [{ "label": "市辖区", "value": "620101" }, { "label": "城关区", "value": "620102" }, { "label": "七里河区", "value": "620103" }, { "label": "西固区", "value": "620104" }, { "label": "安宁区", "value": "620105" }, { "label": "红古区", "value": "620111" }, { "label": "永登县", "value": "620121" }, { "label": "皋兰县", "value": "620122" }, { "label": "榆中县", "value": "620123" }], [{ "label": "市辖区", "value": "620201" }], [{ "label": "市辖区", "value": "620301" }, { "label": "金川区", "value": "620302" }, { "label": "永昌县", "value": "620321" }], [{ "label": "市辖区", "value": "620401" }, { "label": "白银区", "value": "620402" }, { "label": "平川区", "value": "620403" }, { "label": "靖远县", "value": "620421" }, { "label": "会宁县", "value": "620422" }, { "label": "景泰县", "value": "620423" }], [{ "label": "市辖区", "value": "620501" }, { "label": "秦州区", "value": "620502" }, { "label": "麦积区", "value": "620503" }, { "label": "清水县", "value": "620521" }, { "label": "秦安县", "value": "620522" }, { "label": "甘谷县", "value": "620523" }, { "label": "武山县", "value": "620524" }, { "label": "张家川回族自治县", "value": "620525" }], [{ "label": "市辖区", "value": "620601" }, { "label": "凉州区", "value": "620602" }, { "label": "民勤县", "value": "620621" }, { "label": "古浪县", "value": "620622" }, { "label": "天祝藏族自治县", "value": "620623" }], [{ "label": "市辖区", "value": "620701" }, { "label": "甘州区", "value": "620702" }, { "label": "肃南裕固族自治县", "value": "620721" }, { "label": "民乐县", "value": "620722" }, { "label": "临泽县", "value": "620723" }, { "label": "高台县", "value": "620724" }, { "label": "山丹县", "value": "620725" }], [{ "label": "市辖区", "value": "620801" }, { "label": "崆峒区", "value": "620802" }, { "label": "泾川县", "value": "620821" }, { "label": "灵台县", "value": "620822" }, { "label": "崇信县", "value": "620823" }, { "label": "华亭县", "value": "620824" }, { "label": "庄浪县", "value": "620825" }, { "label": "静宁县", "value": "620826" }], [{ "label": "市辖区", "value": "620901" }, { "label": "肃州区", "value": "620902" }, { "label": "金塔县", "value": "620921" }, { "label": "瓜州县", "value": "620922" }, { "label": "肃北蒙古族自治县", "value": "620923" }, { "label": "阿克塞哈萨克族自治县", "value": "620924" }, { "label": "玉门市", "value": "620981" }, { "label": "敦煌市", "value": "620982" }], [{ "label": "市辖区", "value": "621001" }, { "label": "西峰区", "value": "621002" }, { "label": "庆城县", "value": "621021" }, { "label": "环县", "value": "621022" }, { "label": "华池县", "value": "621023" }, { "label": "合水县", "value": "621024" }, { "label": "正宁县", "value": "621025" }, { "label": "宁县", "value": "621026" }, { "label": "镇原县", "value": "621027" }], [{ "label": "市辖区", "value": "621101" }, { "label": "安定区", "value": "621102" }, { "label": "通渭县", "value": "621121" }, { "label": "陇西县", "value": "621122" }, { "label": "渭源县", "value": "621123" }, { "label": "临洮县", "value": "621124" }, { "label": "漳县", "value": "621125" }, { "label": "岷县", "value": "621126" }], [{ "label": "市辖区", "value": "621201" }, { "label": "武都区", "value": "621202" }, { "label": "成县", "value": "621221" }, { "label": "文县", "value": "621222" }, { "label": "宕昌县", "value": "621223" }, { "label": "康县", "value": "621224" }, { "label": "西和县", "value": "621225" }, { "label": "礼县", "value": "621226" }, { "label": "徽县", "value": "621227" }, { "label": "两当县", "value": "621228" }], [{ "label": "市辖区", "value": "622901" }, { "label": "临夏县", "value": "622921" }, { "label": "康乐县", "value": "622922" }, { "label": "永靖县", "value": "622923" }, { "label": "广河县", "value": "622924" }, { "label": "和政县", "value": "622925" }, { "label": "东乡族自治县", "value": "622926" }, { "label": "积石山保安族东乡族撒拉族自治县", "value": "622927" }], [{ "label": "市辖区", "value": "623001" }, { "label": "临潭县", "value": "623021" }, { "label": "卓尼县", "value": "623022" }, { "label": "舟曲县", "value": "623023" }, { "label": "迭部县", "value": "623024" }, { "label": "玛曲县", "value": "623025" }, { "label": "碌曲县", "value": "623026" }, { "label": "夏河县", "value": "623027" }] ], [ [{ "label": "市辖区", "value": "630101" }, { "label": "城东区", "value": "630102" }, { "label": "城中区", "value": "630103" }, { "label": "城西区", "value": "630104" }, { "label": "城北区", "value": "630105" }, { "label": "大通回族土族自治县", "value": "630121" }, { "label": "湟中县", "value": "630122" }, { "label": "湟源县", "value": "630123" }], [{ "label": "乐都区", "value": "630202" }, { "label": "平安区", "value": "630203" }, { "label": "民和回族土族自治县", "value": "630222" }, { "label": "互助土族自治县", "value": "630223" }, { "label": "化隆回族自治县", "value": "630224" }, { "label": "循化撒拉族自治县", "value": "630225" }], [{ "label": "门源回族自治县", "value": "632221" }, { "label": "祁连县", "value": "632222" }, { "label": "海晏县", "value": "632223" }, { "label": "刚察县", "value": "632224" }], [{ "label": "同仁县", "value": "632321" }, { "label": "尖扎县", "value": "632322" }, { "label": "泽库县", "value": "632323" }, { "label": "河南蒙古族自治县", "value": "632324" }], [{ "label": "共和县", "value": "632521" }, { "label": "同德县", "value": "632522" }, { "label": "贵德县", "value": "632523" }, { "label": "兴海县", "value": "632524" }, { "label": "贵南县", "value": "632525" }], [{ "label": "玛沁县", "value": "632621" }, { "label": "班玛县", "value": "632622" }, { "label": "甘德县", "value": "632623" }, { "label": "达日县", "value": "632624" }, { "label": "久治县", "value": "632625" }, { "label": "玛多县", "value": "632626" }], [{ "label": "市辖区", "value": "632701" }, { "label": "杂多县", "value": "632722" }, { "label": "称多县", "value": "632723" }, { "label": "治多县", "value": "632724" }, { "label": "囊谦县", "value": "632725" }, { "label": "曲麻莱县", "value": "632726" }], [{ "label": "市辖区", "value": "632801" }, { "label": "德令哈市", "value": "632802" }, { "label": "乌兰县", "value": "632821" }, { "label": "都兰县", "value": "632822" }, { "label": "天峻县", "value": "632823" }] ], [ [{ "label": "市辖区", "value": "640101" }, { "label": "兴庆区", "value": "640104" }, { "label": "西夏区", "value": "640105" }, { "label": "金凤区", "value": "640106" }, { "label": "永宁县", "value": "640121" }, { "label": "贺兰县", "value": "640122" }, { "label": "灵武市", "value": "640181" }], [{ "label": "市辖区", "value": "640201" }, { "label": "大武口区", "value": "640202" }, { "label": "惠农区", "value": "640205" }, { "label": "平罗县", "value": "640221" }], [{ "label": "市辖区", "value": "640301" }, { "label": "利通区", "value": "640302" }, { "label": "红寺堡区", "value": "640303" }, { "label": "盐池县", "value": "640323" }, { "label": "同心县", "value": "640324" }, { "label": "青铜峡市", "value": "640381" }], [{ "label": "市辖区", "value": "640401" }, { "label": "原州区", "value": "640402" }, { "label": "西吉县", "value": "640422" }, { "label": "隆德县", "value": "640423" }, { "label": "泾源县", "value": "640424" }, { "label": "彭阳县", "value": "640425" }], [{ "label": "市辖区", "value": "640501" }, { "label": "沙坡头区", "value": "640502" }, { "label": "中宁县", "value": "640521" }, { "label": "海原县", "value": "640522" }] ], [ [{ "label": "市辖区", "value": "650101" }, { "label": "天山区", "value": "650102" }, { "label": "沙依巴克区", "value": "650103" }, { "label": "新市区", "value": "650104" }, { "label": "水磨沟区", "value": "650105" }, { "label": "头屯河区", "value": "650106" }, { "label": "达坂城区", "value": "650107" }, { "label": "米东区", "value": "650109" }, { "label": "乌鲁木齐县", "value": "650121" }], [{ "label": "市辖区", "value": "650201" }, { "label": "独山子区", "value": "650202" }, { "label": "克拉玛依区", "value": "650203" }, { "label": "白碱滩区", "value": "650204" }, { "label": "乌尔禾区", "value": "650205" }], [{ "label": "高昌区", "value": "650402" }, { "label": "鄯善县", "value": "650421" }, { "label": "托克逊县", "value": "650422" }], [{ "label": "伊州区", "value": "650502" }, { "label": "巴里坤哈萨克自治县", "value": "650521" }, { "label": "伊吾县", "value": "650522" }], [{ "label": "市辖区", "value": "652301" }, { "label": "阜康市", "value": "652302" }, { "label": "呼图壁县", "value": "652323" }, { "label": "玛纳斯县", "value": "652324" }, { "label": "奇台县", "value": "652325" }, { "label": "吉木萨尔县", "value": "652327" }, { "label": "木垒哈萨克自治县", "value": "652328" }], [{ "label": "市辖区", "value": "652701" }, { "label": "阿拉山口市", "value": "652702" }, { "label": "精河县", "value": "652722" }, { "label": "温泉县", "value": "652723" }], [{ "label": "市辖区", "value": "652801" }, { "label": "轮台县", "value": "652822" }, { "label": "尉犁县", "value": "652823" }, { "label": "若羌县", "value": "652824" }, { "label": "且末县", "value": "652825" }, { "label": "焉耆回族自治县", "value": "652826" }, { "label": "和静县", "value": "652827" }, { "label": "和硕县", "value": "652828" }, { "label": "博湖县", "value": "652829" }], [{ "label": "市辖区", "value": "652901" }, { "label": "温宿县", "value": "652922" }, { "label": "库车县", "value": "652923" }, { "label": "沙雅县", "value": "652924" }, { "label": "新和县", "value": "652925" }, { "label": "拜城县", "value": "652926" }, { "label": "乌什县", "value": "652927" }, { "label": "阿瓦提县", "value": "652928" }, { "label": "柯坪县", "value": "652929" }], [{ "label": "市辖区", "value": "653001" }, { "label": "阿克陶县", "value": "653022" }, { "label": "阿合奇县", "value": "653023" }, { "label": "乌恰县", "value": "653024" }], [{ "label": "市辖区", "value": "653101" }, { "label": "疏附县", "value": "653121" }, { "label": "疏勒县", "value": "653122" }, { "label": "英吉沙县", "value": "653123" }, { "label": "泽普县", "value": "653124" }, { "label": "莎车县", "value": "653125" }, { "label": "叶城县", "value": "653126" }, { "label": "麦盖提县", "value": "653127" }, { "label": "岳普湖县", "value": "653128" }, { "label": "伽师县", "value": "653129" }, { "label": "巴楚县", "value": "653130" }, { "label": "塔什库尔干塔吉克自治县", "value": "653131" }], [{ "label": "市辖区", "value": "653201" }, { "label": "和田县", "value": "653221" }, { "label": "墨玉县", "value": "653222" }, { "label": "皮山县", "value": "653223" }, { "label": "洛浦县", "value": "653224" }, { "label": "策勒县", "value": "653225" }, { "label": "于田县", "value": "653226" }, { "label": "民丰县", "value": "653227" }], [{ "label": "伊宁市", "value": "654002" }, { "label": "奎屯市", "value": "654003" }, { "label": "霍尔果斯市", "value": "654004" }, { "label": "伊宁县", "value": "654021" }, { "label": "察布查尔锡伯自治县", "value": "654022" }, { "label": "霍城县", "value": "654023" }, { "label": "巩留县", "value": "654024" }, { "label": "新源县", "value": "654025" }, { "label": "昭苏县", "value": "654026" }, { "label": "特克斯县", "value": "654027" }, { "label": "尼勒克县", "value": "654028" }], [{ "label": "市辖区", "value": "654201" }, { "label": "乌苏市", "value": "654202" }, { "label": "额敏县", "value": "654221" }, { "label": "沙湾县", "value": "654223" }, { "label": "托里县", "value": "654224" }, { "label": "裕民县", "value": "654225" }, { "label": "和布克赛尔蒙古自治县", "value": "654226" }], [{ "label": "市辖区", "value": "654301" }, { "label": "布尔津县", "value": "654321" }, { "label": "富蕴县", "value": "654322" }, { "label": "福海县", "value": "654323" }, { "label": "哈巴河县", "value": "654324" }, { "label": "青河县", "value": "654325" }, { "label": "吉木乃县", "value": "654326" }], [{ "label": "市辖区", "value": "659001" }, { "label": "阿拉尔市", "value": "659002" }, { "label": "图木舒克市", "value": "659003" }, { "label": "五家渠市", "value": "659004" }, { "label": "铁门关市", "value": "659006" }] ] ] export default areaData; city.js/* eslint-disable */ var cityData = [ [{ "label": "北京市", "value": "110100" }], [{ "label": "天津市", "value": "120100" }], [{ "label": "石家庄市", "value": "130100" }, { "label": "唐山市", "value": "130200" }, { "label": "秦皇岛市", "value": "130300" }, { "label": "邯郸市", "value": "130400" }, { "label": "邢台市", "value": "130500" }, { "label": "保定市", "value": "130600" }, { "label": "张家口市", "value": "130700" }, { "label": "承德市", "value": "130800" }, { "label": "沧州市", "value": "130900" }, { "label": "廊坊市", "value": "131000" }, { "label": "衡水市", "value": "131100" }, { "label": "省直辖县级行政区划", "value": "139000" }], [{ "label": "太原市", "value": "140100" }, { "label": "大同市", "value": "140200" }, { "label": "阳泉市", "value": "140300" }, { "label": "长治市", "value": "140400" }, { "label": "晋城市", "value": "140500" }, { "label": "朔州市", "value": "140600" }, { "label": "晋中市", "value": "140700" }, { "label": "运城市", "value": "140800" }, { "label": "忻州市", "value": "140900" }, { "label": "临汾市", "value": "141000" }, { "label": "吕梁市", "value": "141100" }], [{ "label": "呼和浩特市", "value": "150100" }, { "label": "包头市", "value": "150200" }, { "label": "乌海市", "value": "150300" }, { "label": "赤峰市", "value": "150400" }, { "label": "通辽市", "value": "150500" }, { "label": "鄂尔多斯市", "value": "150600" }, { "label": "呼伦贝尔市", "value": "150700" }, { "label": "巴彦淖尔市", "value": "150800" }, { "label": "乌兰察布市", "value": "150900" }, { "label": "兴安盟", "value": "152200" }, { "label": "锡林郭勒盟", "value": "152500" }, { "label": "阿拉善盟", "value": "152900" }], [{ "label": "沈阳市", "value": "210100" }, { "label": "大连市", "value": "210200" }, { "label": "鞍山市", "value": "210300" }, { "label": "抚顺市", "value": "210400" }, { "label": "本溪市", "value": "210500" }, { "label": "丹东市", "value": "210600" }, { "label": "锦州市", "value": "210700" }, { "label": "营口市", "value": "210800" }, { "label": "阜新市", "value": "210900" }, { "label": "辽阳市", "value": "211000" }, { "label": "盘锦市", "value": "211100" }, { "label": "铁岭市", "value": "211200" }, { "label": "朝阳市", "value": "211300" }, { "label": "葫芦岛市", "value": "211400" }], [{ "label": "长春市", "value": "220100" }, { "label": "吉林市", "value": "220200" }, { "label": "四平市", "value": "220300" }, { "label": "辽源市", "value": "220400" }, { "label": "通化市", "value": "220500" }, { "label": "白山市", "value": "220600" }, { "label": "松原市", "value": "220700" }, { "label": "白城市", "value": "220800" }, { "label": "延边朝鲜族自治州", "value": "222400" }], [{ "label": "哈尔滨市", "value": "230100" }, { "label": "齐齐哈尔市", "value": "230200" }, { "label": "鸡西市", "value": "230300" }, { "label": "鹤岗市", "value": "230400" }, { "label": "双鸭山市", "value": "230500" }, { "label": "大庆市", "value": "230600" }, { "label": "伊春市", "value": "230700" }, { "label": "佳木斯市", "value": "230800" }, { "label": "七台河市", "value": "230900" }, { "label": "牡丹江市", "value": "231000" }, { "label": "黑河市", "value": "231100" }, { "label": "绥化市", "value": "231200" }, { "label": "大兴安岭地区", "value": "232700" }], [{ "label": "上海市", "value": "310100" }], [{ "label": "南京市", "value": "320100" }, { "label": "无锡市", "value": "320200" }, { "label": "徐州市", "value": "320300" }, { "label": "常州市", "value": "320400" }, { "label": "苏州市", "value": "320500" }, { "label": "南通市", "value": "320600" }, { "label": "连云港市", "value": "320700" }, { "label": "淮安市", "value": "320800" }, { "label": "盐城市", "value": "320900" }, { "label": "扬州市", "value": "321000" }, { "label": "镇江市", "value": "321100" }, { "label": "泰州市", "value": "321200" }, { "label": "宿迁市", "value": "321300" }], [{ "label": "杭州市", "value": "330100" }, { "label": "宁波市", "value": "330200" }, { "label": "温州市", "value": "330300" }, { "label": "嘉兴市", "value": "330400" }, { "label": "湖州市", "value": "330500" }, { "label": "绍兴市", "value": "330600" }, { "label": "金华市", "value": "330700" }, { "label": "衢州市", "value": "330800" }, { "label": "舟山市", "value": "330900" }, { "label": "台州市", "value": "331000" }, { "label": "丽水市", "value": "331100" }], [{ "label": "合肥市", "value": "340100" }, { "label": "芜湖市", "value": "340200" }, { "label": "蚌埠市", "value": "340300" }, { "label": "淮南市", "value": "340400" }, { "label": "马鞍山市", "value": "340500" }, { "label": "淮北市", "value": "340600" }, { "label": "铜陵市", "value": "340700" }, { "label": "安庆市", "value": "340800" }, { "label": "黄山市", "value": "341000" }, { "label": "滁州市", "value": "341100" }, { "label": "阜阳市", "value": "341200" }, { "label": "宿州市", "value": "341300" }, { "label": "六安市", "value": "341500" }, { "label": "亳州市", "value": "341600" }, { "label": "池州市", "value": "341700" }, { "label": "宣城市", "value": "341800" }], [{ "label": "福州市", "value": "350100" }, { "label": "厦门市", "value": "350200" }, { "label": "莆田市", "value": "350300" }, { "label": "三明市", "value": "350400" }, { "label": "泉州市", "value": "350500" }, { "label": "漳州市", "value": "350600" }, { "label": "南平市", "value": "350700" }, { "label": "龙岩市", "value": "350800" }, { "label": "宁德市", "value": "350900" }], [{ "label": "南昌市", "value": "360100" }, { "label": "景德镇市", "value": "360200" }, { "label": "萍乡市", "value": "360300" }, { "label": "九江市", "value": "360400" }, { "label": "新余市", "value": "360500" }, { "label": "鹰潭市", "value": "360600" }, { "label": "赣州市", "value": "360700" }, { "label": "吉安市", "value": "360800" }, { "label": "宜春市", "value": "360900" }, { "label": "抚州市", "value": "361000" }, { "label": "上饶市", "value": "361100" }], [{ "label": "济南市", "value": "370100" }, { "label": "青岛市", "value": "370200" }, { "label": "淄博市", "value": "370300" }, { "label": "枣庄市", "value": "370400" }, { "label": "东营市", "value": "370500" }, { "label": "烟台市", "value": "370600" }, { "label": "潍坊市", "value": "370700" }, { "label": "济宁市", "value": "370800" }, { "label": "泰安市", "value": "370900" }, { "label": "威海市", "value": "371000" }, { "label": "日照市", "value": "371100" }, { "label": "莱芜市", "value": "371200" }, { "label": "临沂市", "value": "371300" }, { "label": "德州市", "value": "371400" }, { "label": "聊城市", "value": "371500" }, { "label": "滨州市", "value": "371600" }, { "label": "菏泽市", "value": "371700" }], [{ "label": "郑州市", "value": "410100" }, { "label": "开封市", "value": "410200" }, { "label": "洛阳市", "value": "410300" }, { "label": "平顶山市", "value": "410400" }, { "label": "安阳市", "value": "410500" }, { "label": "鹤壁市", "value": "410600" }, { "label": "新乡市", "value": "410700" }, { "label": "焦作市", "value": "410800" }, { "label": "濮阳市", "value": "410900" }, { "label": "许昌市", "value": "411000" }, { "label": "漯河市", "value": "411100" }, { "label": "三门峡市", "value": "411200" }, { "label": "南阳市", "value": "411300" }, { "label": "商丘市", "value": "411400" }, { "label": "信阳市", "value": "411500" }, { "label": "周口市", "value": "411600" }, { "label": "驻马店市", "value": "411700" }, { "label": "省直辖县级行政区划", "value": "419000" }], [{ "label": "武汉市", "value": "420100" }, { "label": "黄石市", "value": "420200" }, { "label": "十堰市", "value": "420300" }, { "label": "宜昌市", "value": "420500" }, { "label": "襄阳市", "value": "420600" }, { "label": "鄂州市", "value": "420700" }, { "label": "荆门市", "value": "420800" }, { "label": "孝感市", "value": "420900" }, { "label": "荆州市", "value": "421000" }, { "label": "黄冈市", "value": "421100" }, { "label": "咸宁市", "value": "421200" }, { "label": "随州市", "value": "421300" }, { "label": "恩施土家族苗族自治州", "value": "422800" }, { "label": "省直辖县级行政区划", "value": "429000" }], [{ "label": "长沙市", "value": "430100" }, { "label": "株洲市", "value": "430200" }, { "label": "湘潭市", "value": "430300" }, { "label": "衡阳市", "value": "430400" }, { "label": "邵阳市", "value": "430500" }, { "label": "岳阳市", "value": "430600" }, { "label": "常德市", "value": "430700" }, { "label": "张家界市", "value": "430800" }, { "label": "益阳市", "value": "430900" }, { "label": "郴州市", "value": "431000" }, { "label": "永州市", "value": "431100" }, { "label": "怀化市", "value": "431200" }, { "label": "娄底市", "value": "431300" }, { "label": "湘西土家族苗族自治州", "value": "433100" }], [{ "label": "广州市", "value": "440100" }, { "label": "韶关市", "value": "440200" }, { "label": "深圳市", "value": "440300" }, { "label": "珠海市", "value": "440400" }, { "label": "汕头市", "value": "440500" }, { "label": "佛山市", "value": "440600" }, { "label": "江门市", "value": "440700" }, { "label": "湛江市", "value": "440800" }, { "label": "茂名市", "value": "440900" }, { "label": "肇庆市", "value": "441200" }, { "label": "惠州市", "value": "441300" }, { "label": "梅州市", "value": "441400" }, { "label": "汕尾市", "value": "441500" }, { "label": "河源市", "value": "441600" }, { "label": "阳江市", "value": "441700" }, { "label": "清远市", "value": "441800" }, { "label": "东莞市", "value": "441900" }, { "label": "中山市", "value": "442000" }, { "label": "潮州市", "value": "445100" }, { "label": "揭阳市", "value": "445200" }, { "label": "云浮市", "value": "445300" }], [{ "label": "南宁市", "value": "450100" }, { "label": "柳州市", "value": "450200" }, { "label": "桂林市", "value": "450300" }, { "label": "梧州市", "value": "450400" }, { "label": "北海市", "value": "450500" }, { "label": "防城港市", "value": "450600" }, { "label": "钦州市", "value": "450700" }, { "label": "贵港市", "value": "450800" }, { "label": "玉林市", "value": "450900" }, { "label": "百色市", "value": "451000" }, { "label": "贺州市", "value": "451100" }, { "label": "河池市", "value": "451200" }, { "label": "来宾市", "value": "451300" }, { "label": "崇左市", "value": "451400" }], [{ "label": "海口市", "value": "460100" }, { "label": "三亚市", "value": "460200" }, { "label": "三沙市", "value": "460300" }, { "label": "儋州市", "value": "460400" }, { "label": "省直辖县级行政区划", "value": "469000" }], [{ "label": "重庆市", "value": "500100" }, { "label": "县", "value": "500200" }], [{ "label": "成都市", "value": "510100" }, { "label": "自贡市", "value": "510300" }, { "label": "攀枝花市", "value": "510400" }, { "label": "泸州市", "value": "510500" }, { "label": "德阳市", "value": "510600" }, { "label": "绵阳市", "value": "510700" }, { "label": "广元市", "value": "510800" }, { "label": "遂宁市", "value": "510900" }, { "label": "内江市", "value": "511000" }, { "label": "乐山市", "value": "511100" }, { "label": "南充市", "value": "511300" }, { "label": "眉山市", "value": "511400" }, { "label": "宜宾市", "value": "511500" }, { "label": "广安市", "value": "511600" }, { "label": "达州市", "value": "511700" }, { "label": "雅安市", "value": "511800" }, { "label": "巴中市", "value": "511900" }, { "label": "资阳市", "value": "512000" }, { "label": "阿坝藏族羌族自治州", "value": "513200" }, { "label": "甘孜藏族自治州", "value": "513300" }, { "label": "凉山彝族自治州", "value": "513400" }], [{ "label": "贵阳市", "value": "520100" }, { "label": "六盘水市", "value": "520200" }, { "label": "遵义市", "value": "520300" }, { "label": "安顺市", "value": "520400" }, { "label": "毕节市", "value": "520500" }, { "label": "铜仁市", "value": "520600" }, { "label": "黔西南布依族苗族自治州", "value": "522300" }, { "label": "黔东南苗族侗族自治州", "value": "522600" }, { "label": "黔南布依族苗族自治州", "value": "522700" }], [{ "label": "昆明市", "value": "530100" }, { "label": "曲靖市", "value": "530300" }, { "label": "玉溪市", "value": "530400" }, { "label": "保山市", "value": "530500" }, { "label": "昭通市", "value": "530600" }, { "label": "丽江市", "value": "530700" }, { "label": "普洱市", "value": "530800" }, { "label": "临沧市", "value": "530900" }, { "label": "楚雄彝族自治州", "value": "532300" }, { "label": "红河哈尼族彝族自治州", "value": "532500" }, { "label": "文山壮族苗族自治州", "value": "532600" }, { "label": "西双版纳傣族自治州", "value": "532800" }, { "label": "大理白族自治州", "value": "532900" }, { "label": "德宏傣族景颇族自治州", "value": "533100" }, { "label": "怒江傈僳族自治州", "value": "533300" }, { "label": "迪庆藏族自治州", "value": "533400" }], [{ "label": "拉萨市", "value": "540100" }, { "label": "日喀则市", "value": "540200" }, { "label": "昌都市", "value": "540300" }, { "label": "林芝市", "value": "540400" }, { "label": "山南市", "value": "540500" }, { "label": "那曲地区", "value": "542400" }, { "label": "阿里地区", "value": "542500" }], [{ "label": "西安市", "value": "610100" }, { "label": "铜川市", "value": "610200" }, { "label": "宝鸡市", "value": "610300" }, { "label": "咸阳市", "value": "610400" }, { "label": "渭南市", "value": "610500" }, { "label": "延安市", "value": "610600" }, { "label": "汉中市", "value": "610700" }, { "label": "榆林市", "value": "610800" }, { "label": "安康市", "value": "610900" }, { "label": "商洛市", "value": "611000" }], [{ "label": "兰州市", "value": "620100" }, { "label": "嘉峪关市", "value": "620200" }, { "label": "金昌市", "value": "620300" }, { "label": "白银市", "value": "620400" }, { "label": "天水市", "value": "620500" }, { "label": "武威市", "value": "620600" }, { "label": "张掖市", "value": "620700" }, { "label": "平凉市", "value": "620800" }, { "label": "酒泉市", "value": "620900" }, { "label": "庆阳市", "value": "621000" }, { "label": "定西市", "value": "621100" }, { "label": "陇南市", "value": "621200" }, { "label": "临夏回族自治州", "value": "622900" }, { "label": "甘南藏族自治州", "value": "623000" }], [{ "label": "西宁市", "value": "630100" }, { "label": "海东市", "value": "630200" }, { "label": "海北藏族自治州", "value": "632200" }, { "label": "黄南藏族自治州", "value": "632300" }, { "label": "海南藏族自治州", "value": "632500" }, { "label": "果洛藏族自治州", "value": "632600" }, { "label": "玉树藏族自治州", "value": "632700" }, { "label": "海西蒙古族藏族自治州", "value": "632800" }], [{ "label": "银川市", "value": "640100" }, { "label": "石嘴山市", "value": "640200" }, { "label": "吴忠市", "value": "640300" }, { "label": "固原市", "value": "640400" }, { "label": "中卫市", "value": "640500" }], [{ "label": "乌鲁木齐市", "value": "650100" }, { "label": "克拉玛依市", "value": "650200" }, { "label": "吐鲁番市", "value": "650400" }, { "label": "哈密市", "value": "650500" }, { "label": "昌吉回族自治州", "value": "652300" }, { "label": "博尔塔拉蒙古自治州", "value": "652700" }, { "label": "巴音郭楞蒙古自治州", "value": "652800" }, { "label": "阿克苏地区", "value": "652900" }, { "label": "克孜勒苏柯尔克孜自治州", "value": "653000" }, { "label": "喀什地区", "value": "653100" }, { "label": "和田地区", "value": "653200" }, { "label": "伊犁哈萨克自治州", "value": "654000" }, { "label": "塔城地区", "value": "654200" }, { "label": "阿勒泰地区", "value": "654300" }, { "label": "自治区直辖县级行政区划", "value": "659000" }] ] export default cityData; province.js/* eslint-disable */ var provinceData = [{ "label": "北京市", "value": "110000" }, { "label": "天津市", "value": "120000" }, { "label": "河北省", "value": "130000" }, { "label": "山西省", "value": "140000" }, { "label": "内蒙古自治区", "value": "150000" }, { "label": "辽宁省", "value": "210000" }, { "label": "吉林省", "value": "220000" }, { "label": "黑龙江省", "value": "230000" }, { "label": "上海市", "value": "310000" }, { "label": "江苏省", "value": "320000" }, { "label": "浙江省", "value": "330000" }, { "label": "安徽省", "value": "340000" }, { "label": "福建省", "value": "350000" }, { "label": "江西省", "value": "360000" }, { "label": "山东省", "value": "370000" }, { "label": "河南省", "value": "410000" }, { "label": "湖北省", "value": "420000" }, { "label": "湖南省", "value": "430000" }, { "label": "广东省", "value": "440000" }, { "label": "广西壮族自治区", "value": "450000" }, { "label": "海南省", "value": "460000" }, { "label": "重庆市", "value": "500000" }, { "label": "四川省", "value": "510000" }, { "label": "贵州省", "value": "520000" }, { "label": "云南省", "value": "530000" }, { "label": "西藏自治区", "value": "540000" }, { "label": "陕西省", "value": "610000" }, { "label": "甘肃省", "value": "620000" }, { "label": "青海省", "value": "630000" }, { "label": "宁夏回族自治区", "value": "640000" }, { "label": "新疆维吾尔自治区", "value": "650000" }, { "label": "台湾省", "value": "710000" }, { "label": "香港特别行政区", "value": "810000" }, { "label": "澳门特别行政区", "value": "820000" }] export default provinceData; mpvueCityPicker.vue 取消 确定 <picker-view indicator-style="height: 40px;" class="mpvue-picker-view" :value="pickerValue" @change="pickerChange"> <block> <picker-view-column> {{item.label}} </picker-view-column> <picker-view-column> {{item.label}} </picker-view-column> <picker-view-column> {{item.label}} </picker-view-column> </block> </picker-view> mpvue-pickermpvuePicker.vue <view class="mpvue-picker"> <view :class="{'pickerMask':showPicker}" @click="maskClick" catchtouchmove="true"></view> <view class="mpvue-picker-content " :class="{'mpvue-picker-view-show':showPicker}"> <view class="mpvue-picker__hd" catchtouchmove="true"> <view class="mpvue-picker__action" @click="pickerCancel">取消</view> <view class="mpvue-picker__action" :style="{color:themeColor}" @click="pickerConfirm">确定</view> </view> <picker-view indicator-style="height: 40px;" class="mpvue-picker-view" :value="pickerValue" @change="pickerChange" v-if="mode==='selector' && pickerValueSingleArray.length > 0"> <block> <picker-view-column> <view class="picker-item" v-for="(item,index) in pickerValueSingleArray" :key="index">{{item.label}}</view> </picker-view-column> </block> </picker-view> <picker-view indicator-style="height: 40px;" class="mpvue-picker-view" :value="pickerValue" @change="pickerChange" v-if="mode==='timeSelector'"> <block> <picker-view-column> <view class="picker-item" v-for="(item,index) in pickerValueHour" :key="index">{{item.label}}</view> </picker-view-column> <picker-view-column> <view class="picker-item" v-for="(item,index) in pickerValueMinute" :key="index">{{item.label}}</view> </picker-view-column> </block> </picker-view> <picker-view indicator-style="height: 40px;" class="mpvue-picker-view" :value="pickerValue" @change="pickerChange" v-if="mode==='multiSelector'"> <block v-for="(n,index) in pickerValueMulArray.length" :key="index"> <picker-view-column> <view class="picker-item" v-for="(item,index1) in pickerValueMulArray[n]" :key="index1">{{item.label}}</view> </picker-view-column> </block> </picker-view> <picker-view indicator-style="height: 40px;" class="mpvue-picker-view" :value="pickerValue" @change="pickerChangeMul" v-if="mode==='multiLinkageSelector' && deepLength===2"> <block> <picker-view-column> <view class="picker-item" v-for="(item,index) in pickerValueMulTwoOne" :key="index">{{item.label}}</view> </picker-view-column> <picker-view-column> <view class="picker-item" v-for="(item,index) in pickerValueMulTwoTwo" :key="index">{{item.label}}</view> </picker-view-column> </block> </picker-view> <picker-view indicator-style="height: 40px;" class="mpvue-picker-view" :value="pickerValue" @change="pickerChangeMul" v-if="mode==='multiLinkageSelector' && deepLength===3"> <block> <picker-view-column> <view class="picker-item" v-for="(item,index) in pickerValueMulThreeOne" :key="index">{{item.label}}</view> </picker-view-column> <picker-view-column> <view class="picker-item" v-for="(item,index) in pickerValueMulThreeTwo" :key="index">{{item.label}}</view> </picker-view-column> <picker-view-column> <view class="picker-item" v-for="(item,index) in pickerValueMulThreeThree" :key="index">{{item.label}}</view> </picker-view-column> </block> </picker-view> </view> </view> paymentspaymentsByAli.vue <view class='cell-group payment-method'> <view class='cell-item add-title-item' v-for="item in payments" :key="item.code" @click="toPayHandler(item.code)" v-if="!(type == 2 && item.code == 'balancepay')"> <view class='cell-item-hd'> <image class='cell-hd-icon' :src='item.icon'></image> </view> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">{{ item.name }}</text> </view> <view class="cell-bd-view"> <text class="cell-bd-text address">{{ item.memo }}</text> </view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> <view class="payment-pop" v-show="popShow"> <view class="payment-pop-c"> <image src="/static/image/wait-pay.png" style="width: 30px; height: 30px;"></image> <view class="text">支付中，请稍后...</view> </view> <view class="payment-pop-b"> 支付失败 支付成功 </view> </view> </view> paymentsByApp.vue <view class='cell-group payment-method'> <view class='cell-item add-title-item' v-for="item in payments" :key="item.code" @click="toPayHandler(item.code)" v-if="!(type == 2 && item.code == 'balancepay')"> <view class='cell-item-hd'> <image class='cell-hd-icon' :src='item.icon'></image> </view> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">{{ item.name }}</text> </view> <view class="cell-bd-view"> <text class="cell-bd-text address">{{ item.memo }}</text> </view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> <view class="payment-pop" v-show="popShow"> <view class="payment-pop-c"> <image src="/static/image/wait-pay.png" style="width: 30px; height: 30px;"></image> <view class="text">支付中，请稍后...</view> </view> <view class="payment-pop-b"> 支付失败 支付成功 </view> </view> </view> paymentsByH5.vue <view class='cell-group payment-method'> <view class='cell-item add-title-item' v-for="item in payments" :key="item.code" @click="toPayHandler(item.code)" v-if="!(type == 2 && item.code == 'balancepay')"> <view class='cell-item-hd'> <image class='cell-hd-icon' :src='item.icon'></image> </view> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">{{ item.name }}</text> </view> <view class="cell-bd-view"> <text class="cell-bd-text address">{{ item.memo }}</text> </view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> <view class="payment-pop" v-show="popShow"> <view class="payment-pop-c"> <image src="/static/image/wait-pay.png" style="width: 30px; height: 30px;"></image> <view class="text">支付中，请稍后...</view> </view> <view class="payment-pop-b"> 支付失败 支付成功 </view> </view> </view> paymentsByWx.vue <view class='cell-group payment-method payment-wx'> <view class='cell-item-hd'> <image class='cell-hd-icon' :src='item.icon'></image> </view> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">{{ item.name }}</text> </view> <view class="cell-bd-view"> <text class="cell-bd-text address">{{ item.memo }}</text> </view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> <view class="payment-pop" v-show="popShow"> <view class="payment-pop-c"> <image src="/static/image/wait-pay.png"></image> <view class="text">支付中，请稍后...</view> </view> <view class="payment-pop-b"> 支付失败 支付成功 </view> </view> </view> posters-layerindex.vue README.md# 海报生成组件 ## 组件使用 > 运行下面demo时，主要图片路径 <view> <posters-layer :postersData="postersData" @success="onSuccessCreatePosters" @error="onPostersError"> </posters-layer> </view> ## 组件参数解释 ### config字段 | 字段 | 类型 | 必填 | 描述 | | --------------- | ------------------------ | ---- | ------------------------------------------ | | width | Number(单位:px) | 是 | 画布宽度 | | height | Number(单位:px) | 是 | 画布高度 | | background | String | 否 | 画布背景颜色 | | radius | Number | 否 | 圆角 | | views | Array | 否 | 海报的所有元素 | ### views字段 #### 文本 | 字段 | 类型 | 必填 | 描述 | | --------------- | ------------------------ | ---- | ------------------------------------------ | | type | String | 是 | 类型，值：text | | width | Number(单位:px) | 是 | 宽度 | | height | Number(单位:px) | 否 | 高度 | | left | Number(单位:px) | 否 | 距离海报左边距 | | top | Number(单位:px) | 否 | 距离海报上边距 | | fontSize | Number(单位:px) | 否 | 字体大小，默认：16 | | lineHeight | Number(单位:px) | 否 | 行高，默认：20 | | breakWord | Boolean | 否 | 是否自动换行，默认：false | | bolder | Boolean | 否 | 是否加粗，默认：false | | textAlign | String | 否 | 对齐方式，可选值：left、center、right，默认：left | | color | String | 否 | 字体颜色 | | content | String | 是 | 文本内容 | | MaxLineNumber | Number | 否 | 显示多少行，超出省略 | ### 矩形 | 字段 | 类型 | 必填 | 描述 | | --------------- | ------------------------ | ---- | ------------------------------------------ | | type | String | 是 | 类型，值：rect | | width | Number(单位:px) | 是 | 宽度 | | height | Number(单位:px) | 是 | 高度 | | left | Number(单位:px) | 否 | 距离海报左边距 | | top | Number(单位:px) | 否 | 距离海报上边距 | | radius | Number(单位:px) | 否 | 圆角半径，如果radius === width / 2，则是个圆，和CSS一样 | | background | String | 否 | 填充背景色 | ### 图片 | 字段 | 类型 | 必填 | 描述 | | --------------- | ------------------------ | ---- | ------------------------------------------ | | type | String | 是 | 类型，值：image | | tailor | Number(单位:px) | 否 | 裁剪方式，可选值：center | | radius | Number(单位:px) | 否 | 圆角半径，如果radius === width / 2，则是个圆，和CSS一样 | | width | Number(单位:px) | 是 | 宽度 | | height | Number(单位:px) | 是 | 高度 | | left | Number(单位:px) | 否 | 距离海报左边距 | | top | Number(单位:px) | 否 | 距离海报上边距 | | url | String | 是 | 图片路径 | ## 事件 ### `success` 海报生成成功时触发 ### `error` 海报生成失败时触发red-bagindex.vue <view class="wrapper" v-show="redBagShow"> <view class="modal-bg" > </view> <view class="rb-wrapper"> <view class="rb-content" @click="handleBtn"> </view> <view class="close" @click="handleClose"> <image src='../../static/image/close.png' class="img"></image> </view> </view> </view> shareshare.vue <view style="width: 100%;height: 300upx;background: #FFFFFF;position: absolute;left:0;bottom: 0;"> <view class="share-pop"> <view class="share-item" v-for="(item, index) in providerList" :key="index" @click="clickHandler(item)"> <image :src="item.img" mode=""></image> <view class="">{{ item.name }}</view> </view> </view> <view class="button-bottom"> 关闭 </view> <view class="share-pop"> <view class="share-item"> <image src="../../../static/image/share-f.png" mode=""></image> <view class=""> 分享微信好友 </view> </view> <view class="share-item" @click="createPoster()"> <image src="../../../static/image/poster.png" mode=""></image> <view class="">生成海报</view> </view> </view> <view class="button-bottom"> 关闭 </view> <view class="share-pop"> <view class="share-item"> <image src="../../../static/image/share-f.png" mode=""></image> 分享给好友 </view> <view class="share-item" @click="createPoster()"> <image src="../../../static/image/poster.png" mode=""></image> <view class="">生成海报</view> </view> </view> <view class="button-bottom"> 关闭 </view> </view> shareByAli.vue <view style="width: 100%;height: 300upx;background: #FFFFFF;position: absolute;left:0;bottom: 0;"> <view class="share-pop"> <view class="share-item"> <image src="../../../static/image/share-f.png" mode=""></image> 分享给好友 </view> <view class="share-item" @click="createPoster()"> <image src="../../../static/image/poster.png" mode=""></image> <view class="">生成海报</view> </view> </view> <view class="button-bottom"> 关闭 </view> </view> shareByApp.vue <view style="width: 100%;height: 300upx;background: #FFFFFF;position: absolute;left:0;bottom: 0;"> <view class="share-pop"> <view class="share-item" v-for="(item, index) in providerList" :key="index" @click="clickHandler(item)"> <image :src="item.img" mode=""></image> <view class="">{{ item.name }}</view> </view> </view> <view class="button-bottom"> 关闭 </view> </view> shareByh5.vue <view style="width: 100%;height: 300upx;background: #FFFFFF;position: absolute;left:0;bottom: 0;"> <view class="share-pop"> <view class="share-item" @click="copyUrl()"> <image src="../../../static/image/share-f.png" mode=""></image> <view class="">复制链接</view> </view> <view class="share-item" @click="createPoster()"> <image src="../../../static/image/poster.png" mode=""></image> <view class="">生成海报</view> </view> </view> <view class="button-bottom"> 关闭 </view> </view> shareByWx.vue <view style="width: 100%;height: 300upx;background: #FFFFFF;position: absolute;left:0;bottom: 0;"> <view class="share-pop"> <view class="share-item"> <image src="../../../static/image/share-f.png" mode=""></image> <view class=""> 分享微信好友 </view> </view> <view class="share-item" @click="createPoster()"> <image src="../../../static/image/poster.png" mode=""></image> <view class="">生成海报</view> </view> </view> <view class="button-bottom"> 关闭 </view> </view> specspec.vue <view> <view class="goods-specs" v-for="(item, index) in spesData" :key="index"> <text class="pop-m-title">{{ index }}</text> <view class="pop-m-bd"> <view :class="spes.cla" v-for="(spes, key) in item" :key="key" @click="specChangeSpes(index, key)"> {{ spes.name }} </view> </view> </view> </view> tki-qrcodeqrcode.js//--------------------------------------------------------------------- // // QR Code Generator for JavaScript // // Copyright (c) 2009 Kazuhiko Arase // // URL: [url=http://www.d-project.com/]http://www.d-project.com/[/url] // // Licensed under the MIT license: // [url=http://www.opensource.org/licenses/mit-license.php]http://www.opensource.org/licenses/mit-license.php[/url] // // The word 'QR Code' is registered trademark of // DENSO WAVE INCORPORATED // [url=http://www.denso-wave.com/qrcode/faqpatent-e.html]http://www.denso-wave.com/qrcode/faqpatent-e.html[/url] // //--------------------------------------------------------------------- //--------------------------------------------------------------------- // qrcode //代码第1588行为补充代码 //修改人：chenxing //2017-02-27 16:21:32 //--------------------------------------------------------------------- /** * qrcode * @param typeNumber 1 to 40 * @param errorCorrectLevel 'L','M','Q','H' */ var qrcode = function(typeNumber, errorCorrectLevel) { var PAD0 = 0xEC; var PAD1 = 0x11; var _typeNumber = typeNumber; var _errorCorrectLevel = QRErrorCorrectLevel[errorCorrectLevel]; var _modules = null; var _moduleCount = 0; var _dataCache = null; var _dataList = new Array(); var _this = {}; var makeImpl = function(test, maskPattern) { _moduleCount = _typeNumber * 4 + 17; _modules = function(moduleCount) { var modules = new Array(moduleCount); for (var row = 0; row < moduleCount; row += 1) { modules[row] = new Array(moduleCount); for (var col = 0; col < moduleCount; col += 1) { modules[row][col] = null; } } return modules; }(_moduleCount); setupPositionProbePattern(0, 0); setupPositionProbePattern(_moduleCount - 7, 0); setupPositionProbePattern(0, _moduleCount - 7); setupPositionAdjustPattern(); setupTimingPattern(); setupTypeInfo(test, maskPattern); if (_typeNumber >= 7) { setupTypeNumber(test); } if (_dataCache == null) { _dataCache = createData(_typeNumber, _errorCorrectLevel, _dataList); } mapData(_dataCache, maskPattern); }; var setupPositionProbePattern = function(row, col) { for (var r = -1; r <= 7; r += 1) { if (row + r <= -1 || _moduleCount <= row + r) continue; for (var c = -1; c <= 7; c += 1) { if (col + c <= -1 || _moduleCount <= col + c) continue; if ( (0 <= r && r <= 6 && (c == 0 || c == 6) ) || (0 <= c && c <= 6 && (r == 0 || r == 6) ) || (2 <= r && r <= 4 && 2 <= c && c <= 4) ) { _modules[row + r][col + c] = true; } else { _modules[row + r][col + c] = false; } } } }; var getBestMaskPattern = function() { var minLostPoint = 0; var pattern = 0; for (var i = 0; i < 8; i += 1) { makeImpl(true, i); var lostPoint = QRUtil.getLostPoint(_this); if (i == 0 || minLostPoint > lostPoint) { minLostPoint = lostPoint; pattern = i; } } return pattern; }; var setupTimingPattern = function() { for (var r = 8; r < _moduleCount - 8; r += 1) { if (_modules[r][6] != null) { continue; } _modules[r][6] = (r % 2 == 0); } for (var c = 8; c < _moduleCount - 8; c += 1) { if (_modules[6][c] != null) { continue; } _modules[6][c] = (c % 2 == 0); } }; var setupPositionAdjustPattern = function() { var pos = QRUtil.getPatternPosition(_typeNumber); for (var i = 0; i < pos.length; i += 1) { for (var j = 0; j < pos.length; j += 1) { var row = pos[i]; var col = pos[j]; if (_modules[row][col] != null) { continue; } for (var r = -2; r <= 2; r += 1) { for (var c = -2; c <= 2; c += 1) { if (r == -2 || r == 2 || c == -2 || c == 2 || (r == 0 && c == 0) ) { _modules[row + r][col + c] = true; } else { _modules[row + r][col + c] = false; } } } } } }; var setupTypeNumber = function(test) { var bits = QRUtil.getBCHTypeNumber(_typeNumber); for (var i = 0; i < 18; i += 1) { var mod = (!test && ( (bits >> i) & 1) == 1); _modules[Math.floor(i / 3)][i % 3 + _moduleCount - 8 - 3] = mod; } for (var i = 0; i < 18; i += 1) { var mod = (!test && ( (bits >> i) & 1) == 1); _modules[i % 3 + _moduleCount - 8 - 3][Math.floor(i / 3)] = mod; } }; var setupTypeInfo = function(test, maskPattern) { var data = (_errorCorrectLevel << 3) | maskPattern; var bits = QRUtil.getBCHTypeInfo(data); // vertical for (var i = 0; i < 15; i += 1) { var mod = (!test && ( (bits >> i) & 1) == 1); if (i < 6) { _modules[i][8] = mod; } else if (i < 8) { _modules[i + 1][8] = mod; } else { _modules[_moduleCount - 15 + i][8] = mod; } } // horizontal for (var i = 0; i < 15; i += 1) { var mod = (!test && ( (bits >> i) & 1) == 1); if (i < 8) { _modules[8][_moduleCount - i - 1] = mod; } else if (i < 9) { _modules[8][15 - i - 1 + 1] = mod; } else { _modules[8][15 - i - 1] = mod; } } // fixed module _modules[_moduleCount - 8][8] = (!test); }; var mapData = function(data, maskPattern) { var inc = -1; var row = _moduleCount - 1; var bitIndex = 7; var byteIndex = 0; var maskFunc = QRUtil.getMaskFunction(maskPattern); for (var col = _moduleCount - 1; col > 0; col -= 2) { if (col == 6) col -= 1; while (true) { for (var c = 0; c < 2; c += 1) { if (_modules[row][col - c] == null) { var dark = false; if (byteIndex < data.length) { dark = ( ( (data[byteIndex] >>> bitIndex) & 1) == 1); } var mask = maskFunc(row, col - c); if (mask) { dark = !dark; } _modules[row][col - c] = dark; bitIndex -= 1; if (bitIndex == -1) { byteIndex += 1; bitIndex = 7; } } } row += inc; if (row < 0 || _moduleCount <= row) { row -= inc; inc = -inc; break; } } } }; var createBytes = function(buffer, rsBlocks) { var offset = 0; var maxDcCount = 0; var maxEcCount = 0; var dcdata = new Array(rsBlocks.length); var ecdata = new Array(rsBlocks.length); for (var r = 0; r < rsBlocks.length; r += 1) { var dcCount = rsBlocks[r].dataCount; var ecCount = rsBlocks[r].totalCount - dcCount; maxDcCount = Math.max(maxDcCount, dcCount); maxEcCount = Math.max(maxEcCount, ecCount); dcdata[r] = new Array(dcCount); for (var i = 0; i < dcdata[r].length; i += 1) { dcdata[r][i] = 0xff & buffer.getBuffer()[i + offset]; } offset += dcCount; var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount); var rawPoly = qrPolynomial(dcdata[r], rsPoly.getLength() - 1); var modPoly = rawPoly.mod(rsPoly); ecdata[r] = new Array(rsPoly.getLength() - 1); for (var i = 0; i < ecdata[r].length; i += 1) { var modIndex = i + modPoly.getLength() - ecdata[r].length; ecdata[r][i] = (modIndex >= 0)? modPoly.getAt(modIndex) : 0; } } var totalCodeCount = 0; for (var i = 0; i < rsBlocks.length; i += 1) { totalCodeCount += rsBlocks[i].totalCount; } var data = new Array(totalCodeCount); var index = 0; for (var i = 0; i < maxDcCount; i += 1) { for (var r = 0; r < rsBlocks.length; r += 1) { if (i < dcdata[r].length) { data[index] = dcdata[r][i]; index += 1; } } } for (var i = 0; i < maxEcCount; i += 1) { for (var r = 0; r < rsBlocks.length; r += 1) { if (i < ecdata[r].length) { data[index] = ecdata[r][i]; index += 1; } } } return data; }; var createData = function(typeNumber, errorCorrectLevel, dataList) { var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel); var buffer = qrBitBuffer(); for (var i = 0; i < dataList.length; i += 1) { var data = dataList[i]; buffer.put(data.getMode(), 4); buffer.put(data.getLength(), QRUtil.getLengthInBits(data.getMode(), typeNumber) ); data.write(buffer); } // calc num max data. var totalDataCount = 0; for (var i = 0; i < rsBlocks.length; i += 1) { totalDataCount += rsBlocks[i].dataCount; } if (buffer.getLengthInBits() > totalDataCount * 8) { throw new Error('code length overflow. (' + buffer.getLengthInBits() + '>' + totalDataCount * 8 + ')'); } // end code if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) { buffer.put(0, 4); } // padding while (buffer.getLengthInBits() % 8 != 0) { buffer.putBit(false); } // padding while (true) { if (buffer.getLengthInBits() >= totalDataCount * 8) { break; } buffer.put(PAD0, 8); if (buffer.getLengthInBits() >= totalDataCount * 8) { break; } buffer.put(PAD1, 8); } return createBytes(buffer, rsBlocks); }; _this.addData = function(data) { var newData = qr8BitByte(data); _dataList.push(newData); _dataCache = null; }; _this.isDark = function(row, col) { if (row < 0 || _moduleCount <= row || col < 0 || _moduleCount <= col) { throw new Error(row + ',' + col); } return _modules[row][col]; }; _this.getModuleCount = function() { return _moduleCount; }; _this.make = function() { makeImpl(false, getBestMaskPattern() ); }; _this.createTableTag = function(cellSize, margin) { cellSize = cellSize || 2; margin = (typeof margin == 'undefined')? cellSize * 4 : margin; var qrHtml = ''; qrHtml += ' '; qrHtml += ' '; for (var r = 0; r < _this.getModuleCount(); r += 1) { qrHtml += ' '; for (var c = 0; c < _this.getModuleCount(); c += 1) { qrHtml += ' '; } qrHtml += ' '; } qrHtml += ' '; qrHtml += ' '; return qrHtml; }; _this.createImgTag = function(cellSize, margin, size) { cellSize = cellSize || 2; margin = (typeof margin == 'undefined')? cellSize * 4 : margin; var min = margin; var max = _this.getModuleCount() * cellSize + margin; return createImgTag(size, size, function(x, y) { if (min <= x && x < max && min <= y && y < max) { var c = Math.floor( (x - min) / cellSize); var r = Math.floor( (y - min) / cellSize); return _this.isDark(r, c)? 0 : 1; } else { return 1; } } ); }; return _this; }; //--------------------------------------------------------------------- // qrcode.stringToBytes //--------------------------------------------------------------------- qrcode.stringToBytes = function(s) { var bytes = new Array(); for (var i = 0; i < s.length; i += 1) { var c = s.charCodeAt(i); bytes.push(c & 0xff); } return bytes; }; //--------------------------------------------------------------------- // qrcode.createStringToBytes //--------------------------------------------------------------------- /** * @param unicodeData base64 string of byte array. * [16bit Unicode],[16bit Bytes], ... * @param numChars */ qrcode.createStringToBytes = function(unicodeData, numChars) { // create conversion map. var unicodeMap = function() { var bin = base64DecodeInputStream(unicodeData); var read = function() { var b = bin.read(); if (b == -1) throw new Error(); return b; }; var count = 0; var unicodeMap = {}; while (true) { var b0 = bin.read(); if (b0 == -1) break; var b1 = read(); var b2 = read(); var b3 = read(); var k = String.fromCharCode( (b0 << 8) | b1); var v = (b2 << 8) | b3; unicodeMap[k] = v; count += 1; } if (count != numChars) { throw new Error(count + ' != ' + numChars); } return unicodeMap; }(); var unknownChar = '?'.charCodeAt(0); return function(s) { var bytes = new Array(); for (var i = 0; i < s.length; i += 1) { var c = s.charCodeAt(i); if (c < 128) { bytes.push(c); } else { var b = unicodeMap[s.charAt(i)]; if (typeof b == 'number') { if ( (b & 0xff) == b) { // 1byte bytes.push(b); } else { // 2bytes bytes.push(b >>> 8); bytes.push(b & 0xff); } } else { bytes.push(unknownChar); } } } return bytes; }; }; //--------------------------------------------------------------------- // QRMode //--------------------------------------------------------------------- var QRMode = { MODE_NUMBER : 1 << 0, MODE_ALPHA_NUM : 1 << 1, MODE_8BIT_BYTE : 1 << 2, MODE_KANJI : 1 << 3 }; //--------------------------------------------------------------------- // QRErrorCorrectLevel //--------------------------------------------------------------------- var QRErrorCorrectLevel = { L : 1, M : 0, Q : 3, H : 2 }; //--------------------------------------------------------------------- // QRMaskPattern //--------------------------------------------------------------------- var QRMaskPattern = { PATTERN000 : 0, PATTERN001 : 1, PATTERN010 : 2, PATTERN011 : 3, PATTERN100 : 4, PATTERN101 : 5, PATTERN110 : 6, PATTERN111 : 7 }; //--------------------------------------------------------------------- // QRUtil //--------------------------------------------------------------------- var QRUtil = function() { var PATTERN_POSITION_TABLE = [ [], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170] ]; var G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0); var G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0); var G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1); var _this = {}; var getBCHDigit = function(data) { var digit = 0; while (data != 0) { digit += 1; data >>>= 1; } return digit; }; _this.getBCHTypeInfo = function(data) { var d = data << 10; while (getBCHDigit(d) - getBCHDigit(G15) >= 0) { d ^= (G15 << (getBCHDigit(d) - getBCHDigit(G15) ) ); } return ( (data << 10) | d) ^ G15_MASK; }; _this.getBCHTypeNumber = function(data) { var d = data << 12; while (getBCHDigit(d) - getBCHDigit(G18) >= 0) { d ^= (G18 << (getBCHDigit(d) - getBCHDigit(G18) ) ); } return (data << 12) | d; }; _this.getPatternPosition = function(typeNumber) { return PATTERN_POSITION_TABLE[typeNumber - 1]; }; _this.getMaskFunction = function(maskPattern) { switch (maskPattern) { case QRMaskPattern.PATTERN000 : return function(i, j) { return (i + j) % 2 == 0; }; case QRMaskPattern.PATTERN001 : return function(i, j) { return i % 2 == 0; }; case QRMaskPattern.PATTERN010 : return function(i, j) { return j % 3 == 0; }; case QRMaskPattern.PATTERN011 : return function(i, j) { return (i + j) % 3 == 0; }; case QRMaskPattern.PATTERN100 : return function(i, j) { return (Math.floor(i / 2) + Math.floor(j / 3) ) % 2 == 0; }; case QRMaskPattern.PATTERN101 : return function(i, j) { return (i * j) % 2 + (i * j) % 3 == 0; }; case QRMaskPattern.PATTERN110 : return function(i, j) { return ( (i * j) % 2 + (i * j) % 3) % 2 == 0; }; case QRMaskPattern.PATTERN111 : return function(i, j) { return ( (i * j) % 3 + (i + j) % 2) % 2 == 0; }; default : throw new Error('bad maskPattern:' + maskPattern); } }; _this.getErrorCorrectPolynomial = function(errorCorrectLength) { var a = qrPolynomial([1], 0); for (var i = 0; i < errorCorrectLength; i += 1) { a = a.multiply(qrPolynomial([1, QRMath.gexp(i)], 0) ); } return a; }; _this.getLengthInBits = function(mode, type) { if (1 <= type && type < 10) { // 1 - 9 switch(mode) { case QRMode.MODE_NUMBER : return 10; case QRMode.MODE_ALPHA_NUM : return 9; case QRMode.MODE_8BIT_BYTE : return 8; case QRMode.MODE_KANJI : return 8; default : throw new Error('mode:' + mode); } } else if (type < 27) { // 10 - 26 switch(mode) { case QRMode.MODE_NUMBER : return 12; case QRMode.MODE_ALPHA_NUM : return 11; case QRMode.MODE_8BIT_BYTE : return 16; case QRMode.MODE_KANJI : return 10; default : throw new Error('mode:' + mode); } } else if (type < 41) { // 27 - 40 switch(mode) { case QRMode.MODE_NUMBER : return 14; case QRMode.MODE_ALPHA_NUM : return 13; case QRMode.MODE_8BIT_BYTE : return 16; case QRMode.MODE_KANJI : return 12; default : throw new Error('mode:' + mode); } } else { throw new Error('type:' + type); } }; _this.getLostPoint = function(qrcode) { var moduleCount = qrcode.getModuleCount(); var lostPoint = 0; // LEVEL1 for (var row = 0; row < moduleCount; row += 1) { for (var col = 0; col < moduleCount; col += 1) { var sameCount = 0; var dark = qrcode.isDark(row, col); for (var r = -1; r <= 1; r += 1) { if (row + r < 0 || moduleCount <= row + r) { continue; } for (var c = -1; c <= 1; c += 1) { if (col + c < 0 || moduleCount <= col + c) { continue; } if (r == 0 && c == 0) { continue; } if (dark == qrcode.isDark(row + r, col + c) ) { sameCount += 1; } } } if (sameCount > 5) { lostPoint += (3 + sameCount - 5); } } }; // LEVEL2 for (var row = 0; row < moduleCount - 1; row += 1) { for (var col = 0; col < moduleCount - 1; col += 1) { var count = 0; if (qrcode.isDark(row, col) ) count += 1; if (qrcode.isDark(row + 1, col) ) count += 1; if (qrcode.isDark(row, col + 1) ) count += 1; if (qrcode.isDark(row + 1, col + 1) ) count += 1; if (count == 0 || count == 4) { lostPoint += 3; } } } // LEVEL3 for (var row = 0; row < moduleCount; row += 1) { for (var col = 0; col < moduleCount - 6; col += 1) { if (qrcode.isDark(row, col) && !qrcode.isDark(row, col + 1) && qrcode.isDark(row, col + 2) && qrcode.isDark(row, col + 3) && qrcode.isDark(row, col + 4) && !qrcode.isDark(row, col + 5) && qrcode.isDark(row, col + 6) ) { lostPoint += 40; } } } for (var col = 0; col < moduleCount; col += 1) { for (var row = 0; row < moduleCount - 6; row += 1) { if (qrcode.isDark(row, col) && !qrcode.isDark(row + 1, col) && qrcode.isDark(row + 2, col) && qrcode.isDark(row + 3, col) && qrcode.isDark(row + 4, col) && !qrcode.isDark(row + 5, col) && qrcode.isDark(row + 6, col) ) { lostPoint += 40; } } } // LEVEL4 var darkCount = 0; for (var col = 0; col < moduleCount; col += 1) { for (var row = 0; row < moduleCount; row += 1) { if (qrcode.isDark(row, col) ) { darkCount += 1; } } } var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5; lostPoint += ratio * 10; return lostPoint; }; return _this; }(); //--------------------------------------------------------------------- // QRMath //--------------------------------------------------------------------- var QRMath = function() { var EXP_TABLE = new Array(256); var LOG_TABLE = new Array(256); // initialize tables for (var i = 0; i < 8; i += 1) { EXP_TABLE[i] = 1 << i; } for (var i = 8; i < 256; i += 1) { EXP_TABLE[i] = EXP_TABLE[i - 4] ^ EXP_TABLE[i - 5] ^ EXP_TABLE[i - 6] ^ EXP_TABLE[i - 8]; } for (var i = 0; i < 255; i += 1) { LOG_TABLE[EXP_TABLE[i] ] = i; } var _this = {}; _this.glog = function(n) { if (n < 1) { throw new Error('glog(' + n + ')'); } return LOG_TABLE[n]; }; _this.gexp = function(n) { while (n < 0) { n += 255; } while (n >= 256) { n -= 255; } return EXP_TABLE[n]; }; return _this; }(); //--------------------------------------------------------------------- // qrPolynomial //--------------------------------------------------------------------- function qrPolynomial(num, shift) { if (typeof num.length == 'undefined') { throw new Error(num.length + '/' + shift); } var _num = function() { var offset = 0; while (offset < num.length && num[offset] == 0) { offset += 1; } var _num = new Array(num.length - offset + shift); for (var i = 0; i < num.length - offset; i += 1) { _num[i] = num[i + offset]; } return _num; }(); var _this = {}; _this.getAt = function(index) { return _num[index]; }; _this.getLength = function() { return _num.length; }; _this.multiply = function(e) { var num = new Array(_this.getLength() + e.getLength() - 1); for (var i = 0; i < _this.getLength(); i += 1) { for (var j = 0; j < e.getLength(); j += 1) { num[i + j] ^= QRMath.gexp(QRMath.glog(_this.getAt(i) ) + QRMath.glog(e.getAt(j) ) ); } } return qrPolynomial(num, 0); }; _this.mod = function(e) { if (_this.getLength() - e.getLength() < 0) { return _this; } var ratio = QRMath.glog(_this.getAt(0) ) - QRMath.glog(e.getAt(0) ); var num = new Array(_this.getLength() ); for (var i = 0; i < _this.getLength(); i += 1) { num[i] = _this.getAt(i); } for (var i = 0; i < e.getLength(); i += 1) { num[i] ^= QRMath.gexp(QRMath.glog(e.getAt(i) ) + ratio); } // recursive call return qrPolynomial(num, 0).mod(e); }; return _this; }; //--------------------------------------------------------------------- // QRRSBlock //--------------------------------------------------------------------- var QRRSBlock = function() { // [1: [L, M, Q, H], ..] var RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]]; var qrRSBlock = function(totalCount, dataCount) { var _this = {}; _this.totalCount = totalCount; _this.dataCount = dataCount; return _this; }; var _this = {}; var getRsBlockTable = function(typeNumber, errorCorrectLevel) { switch(errorCorrectLevel) { case QRErrorCorrectLevel.L : return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0]; case QRErrorCorrectLevel.M : return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1]; case QRErrorCorrectLevel.Q : return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2]; case QRErrorCorrectLevel.H : return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3]; default : return undefined; } }; _this.getRSBlocks = function(typeNumber, errorCorrectLevel) { var rsBlock = getRsBlockTable(typeNumber, errorCorrectLevel); if (typeof rsBlock == 'undefined') { throw new Error('bad rs block [url=home.php?mod=space&uid=5302]@[/url] typeNumber:' + typeNumber + '/errorCorrectLevel:' + errorCorrectLevel); } var length = rsBlock.length / 3; var list = new Array(); for (var i = 0; i < length; i += 1) { var count = rsBlock[i * 3 + 0]; var totalCount = rsBlock[i * 3 + 1]; var dataCount = rsBlock[i * 3 + 2]; for (var j = 0; j < count; j += 1) { list.push(qrRSBlock(totalCount, dataCount) ); } } return list; }; return _this; }(); //--------------------------------------------------------------------- // qrBitBuffer //--------------------------------------------------------------------- var qrBitBuffer = function() { var _buffer = new Array(); var _length = 0; var _this = {}; _this.getBuffer = function() { return _buffer; }; _this.getAt = function(index) { var bufIndex = Math.floor(index / 8); return ( (_buffer[bufIndex] >>> (7 - index % 8) ) & 1) == 1; }; _this.put = function(num, length) { for (var i = 0; i < length; i += 1) { _this.putBit( ( (num >>> (length - i - 1) ) & 1) == 1); } }; _this.getLengthInBits = function() { return _length; }; _this.putBit = function(bit) { var bufIndex = Math.floor(_length / 8); if (_buffer.length <= bufIndex) { _buffer.push(0); } if (bit) { _buffer[bufIndex] |= (0x80 >>> (_length % 8) ); } _length += 1; }; return _this; }; //--------------------------------------------------------------------- // qr8BitByte //--------------------------------------------------------------------- var qr8BitByte = function(data) { var _mode = QRMode.MODE_8BIT_BYTE; var _data = data; var _parsedData = []; var _this = {}; // Added to support UTF-8 Characters for (var i = 0, l = _data.length; i < l; i++) { var byteArray = []; var code = _data.charCodeAt(i); if (code > 0x10000) { byteArray[0] = 0xF0 | ((code & 0x1C0000) >>> 18); byteArray[1] = 0x80 | ((code & 0x3F000) >>> 12); byteArray[2] = 0x80 | ((code & 0xFC0) >>> 6); byteArray[3] = 0x80 | (code & 0x3F); } else if (code > 0x800) { byteArray[0] = 0xE0 | ((code & 0xF000) >>> 12); byteArray[1] = 0x80 | ((code & 0xFC0) >>> 6); byteArray[2] = 0x80 | (code & 0x3F); } else if (code > 0x80) { byteArray[0] = 0xC0 | ((code & 0x7C0) >>> 6); byteArray[1] = 0x80 | (code & 0x3F); } else { byteArray[0] = code; } // Fix Unicode corruption bug _parsedData.push(byteArray); } _parsedData = Array.prototype.concat.apply([], _parsedData); if (_parsedData.length != _data.length) { _parsedData.unshift(191); _parsedData.unshift(187); _parsedData.unshift(239); } var _bytes = _parsedData; _this.getMode = function() { return _mode; }; _this.getLength = function(buffer) { return _bytes.length; }; _this.write = function(buffer) { for (var i = 0; i < _bytes.length; i += 1) { buffer.put(_bytes[i], 8); } }; return _this; }; //===================================================================== // GIF Support etc. // //--------------------------------------------------------------------- // byteArrayOutputStream //--------------------------------------------------------------------- var byteArrayOutputStream = function() { var _bytes = new Array(); var _this = {}; _this.writeByte = function(b) { _bytes.push(b & 0xff); }; _this.writeShort = function(i) { _this.writeByte(i); _this.writeByte(i >>> 8); }; _this.writeBytes = function(b, off, len) { off = off || 0; len = len || b.length; for (var i = 0; i < len; i += 1) { _this.writeByte(b[i + off]); } }; _this.writeString = function(s) { for (var i = 0; i < s.length; i += 1) { _this.writeByte(s.charCodeAt(i) ); } }; _this.toByteArray = function() { return _bytes; }; _this.toString = function() { var s = ''; s += '['; for (var i = 0; i < _bytes.length; i += 1) { if (i > 0) { s += ','; } s += _bytes[i]; } s += ']'; return s; }; return _this; }; //--------------------------------------------------------------------- // base64EncodeOutputStream //--------------------------------------------------------------------- var base64EncodeOutputStream = function() { var _buffer = 0; var _buflen = 0; var _length = 0; var _base64 = ''; var _this = {}; var writeEncoded = function(b) { _base64 += String.fromCharCode(encode(b & 0x3f) ); }; var encode = function(n) { if (n < 0) { // error. } else if (n < 26) { return 0x41 + n; } else if (n < 52) { return 0x61 + (n - 26); } else if (n < 62) { return 0x30 + (n - 52); } else if (n == 62) { return 0x2b; } else if (n == 63) { return 0x2f; } throw new Error('n:' + n); }; _this.writeByte = function(n) { _buffer = (_buffer << 8) | (n & 0xff); _buflen += 8; _length += 1; while (_buflen >= 6) { writeEncoded(_buffer >>> (_buflen - 6) ); _buflen -= 6; } }; _this.flush = function() { if (_buflen > 0) { writeEncoded(_buffer << (6 - _buflen) ); _buffer = 0; _buflen = 0; } if (_length % 3 != 0) { // padding var padlen = 3 - _length % 3; for (var i = 0; i < padlen; i += 1) { _base64 += '='; } } }; _this.toString = function() { return _base64; }; return _this; }; //--------------------------------------------------------------------- // base64DecodeInputStream //--------------------------------------------------------------------- var base64DecodeInputStream = function(str) { var _str = str; var _pos = 0; var _buffer = 0; var _buflen = 0; var _this = {}; _this.read = function() { while (_buflen < 8) { if (_pos >= _str.length) { if (_buflen == 0) { return -1; } throw new Error('unexpected end of file./' + _buflen); } var c = _str.charAt(_pos); _pos += 1; if (c == '=') { _buflen = 0; return -1; } else if (c.match(/^\s$/) ) { // ignore if whitespace. continue; } _buffer = (_buffer << 6) | decode(c.charCodeAt(0) ); _buflen += 6; } var n = (_buffer >>> (_buflen - 8) ) & 0xff; _buflen -= 8; return n; }; var decode = function(c) { if (0x41 <= c && c <= 0x5a) { return c - 0x41; } else if (0x61 <= c && c <= 0x7a) { return c - 0x61 + 26; } else if (0x30 <= c && c <= 0x39) { return c - 0x30 + 52; } else if (c == 0x2b) { return 62; } else if (c == 0x2f) { return 63; } else { throw new Error('c:' + c); } }; return _this; }; //--------------------------------------------------------------------- // gifImage (B/W) //--------------------------------------------------------------------- var gifImage = function(width, height) { var _width = width; var _height = height; var _data = new Array(width * height); var _this = {}; _this.setPixel = function(x, y, pixel) { _data[y * _width + x] = pixel; }; _this.write = function(out) { //--------------------------------- // GIF Signature out.writeString('GIF87a'); //--------------------------------- // Screen Descriptor out.writeShort(_width); out.writeShort(_height); out.writeByte(0x80); // 2bit out.writeByte(0); out.writeByte(0); //--------------------------------- // Global Color Map // black out.writeByte(0x00); out.writeByte(0x00); out.writeByte(0x00); // white out.writeByte(0xff); out.writeByte(0xff); out.writeByte(0xff); //--------------------------------- // Image Descriptor out.writeString(','); out.writeShort(0); out.writeShort(0); out.writeShort(_width); out.writeShort(_height); out.writeByte(0); //--------------------------------- // Local Color Map //--------------------------------- // Raster Data var lzwMinCodeSize = 2; var raster = getLZWRaster(lzwMinCodeSize); out.writeByte(lzwMinCodeSize); var offset = 0; while (raster.length - offset > 255) { out.writeByte(255); out.writeBytes(raster, offset, 255); offset += 255; } out.writeByte(raster.length - offset); out.writeBytes(raster, offset, raster.length - offset); out.writeByte(0x00); //--------------------------------- // GIF Terminator out.writeString(';'); }; var bitOutputStream = function(out) { var _out = out; var _bitLength = 0; var _bitBuffer = 0; var _this = {}; _this.write = function(data, length) { if ( (data >>> length) != 0) { throw new Error('length over'); } while (_bitLength + length >= 8) { _out.writeByte(0xff & ( (data << _bitLength) | _bitBuffer) ); length -= (8 - _bitLength); data >>>= (8 - _bitLength); _bitBuffer = 0; _bitLength = 0; } _bitBuffer = (data << _bitLength) | _bitBuffer; _bitLength = _bitLength + length; }; _this.flush = function() { if (_bitLength > 0) { _out.writeByte(_bitBuffer); } }; return _this; }; var getLZWRaster = function(lzwMinCodeSize) { var clearCode = 1 << lzwMinCodeSize; var endCode = (1 << lzwMinCodeSize) + 1; var bitLength = lzwMinCodeSize + 1; // Setup LZWTable var table = lzwTable(); for (var i = 0; i < clearCode; i += 1) { table.add(String.fromCharCode(i) ); } table.add(String.fromCharCode(clearCode) ); table.add(String.fromCharCode(endCode) ); var byteOut = byteArrayOutputStream(); var bitOut = bitOutputStream(byteOut); // clear code bitOut.write(clearCode, bitLength); var dataIndex = 0; var s = String.fromCharCode(_data[dataIndex]); dataIndex += 1; while (dataIndex < _data.length) { var c = String.fromCharCode(_data[dataIndex]); dataIndex += 1; if (table.contains(s + c) ) { s = s + c; } else { bitOut.write(table.indexOf(s), bitLength); if (table.size() < 0xfff) { if (table.size() == (1 << bitLength) ) { bitLength += 1; } table.add(s + c); } s = c; } } bitOut.write(table.indexOf(s), bitLength); // end code bitOut.write(endCode, bitLength); bitOut.flush(); return byteOut.toByteArray(); }; var lzwTable = function() { var _map = {}; var _size = 0; var _this = {}; _this.add = function(key) { if (_this.contains(key) ) { throw new Error('dup key:' + key); } _map[key] = _size; _size += 1; }; _this.size = function() { return _size; }; _this.indexOf = function(key) { return _map[key]; }; _this.contains = function(key) { return typeof _map[key] != 'undefined'; }; return _this; }; return _this; }; var createImgTag = function(width, height, getPixel, alt) { var gif = gifImage(width, height); for (var y = 0; y < height; y += 1) { for (var x = 0; x < width; x += 1) { gif.setPixel(x, y, getPixel(x, y) ); } } var b = byteArrayOutputStream(); gif.write(b); var base64 = base64EncodeOutputStream(); var bytes = b.toByteArray(); for (var i = 0; i < bytes.length; i += 1) { base64.writeByte(bytes[i]); } base64.flush(); var img = ''; img += 'data:image/gif;base64,'; img += base64; return img; }; //--------------------------------------------------------------------- // returns qrcode function. var createQrCodeImg = function(text, options) { options = options || {}; var typeNumber = options.typeNumber || 4; var errorCorrectLevel = options.errorCorrectLevel || 'M'; var size = options.size || 500; var qr; try { qr = qrcode(typeNumber, errorCorrectLevel || 'M'); qr.addData(text); qr.make(); } catch (e) { if(typeNumber >= 40) { throw new Error('Text too long to encode'); } else { return gen(text, { size: size, errorCorrectLevel: errorCorrectLevel, typeNumber: typeNumber + 1 }); } } // calc cellsize and margin var cellsize = parseInt(size / qr.getModuleCount()); var margin = parseInt((size - qr.getModuleCount() * cellsize) / 2); return qr.createImgTag(cellsize, margin, size); }; // var module = {}; 需要注释这一行，否则微信小程序无法使用 export default { createQrCodeImg }tki-qrcode.vue <view class="_qrCode"> <image v-show="show" :src="result" :style="{width:cpSize+'px',height:cpSize+'px'}" /> </view> u-chartscomponent.vue u-charts.js/* * uCharts v1.7.0.20190713 * uni-app平台高性能跨全端图表，支持H5、APP、小程序（微信/支付宝/百度/头条） * Copyright (c) 2019 QIUN秋云 https://www.ucharts.cn All rights reserved. * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) * * uCharts官方网站 * https://www.uCharts.cn * * 开源地址: * https://gitee.com/uCharts/uCharts * * uni-app插件市场地址： * http://ext.dcloud.net.cn/plugin?id=271 * * */ 'use strict'; var config = { yAxisWidth: 15, yAxisSplit: 5, xAxisHeight: 15, xAxisLineHeight: 15, legendHeight: 15, yAxisTitleWidth: 15, padding: 12, pixelRatio: 1, //适配H5高分屏 rotate: false, //横屏模式 columePadding: 3, fontSize: 13, //dataPointShape: ['diamond', 'circle', 'triangle', 'rect'], dataPointShape: ['circle', 'circle', 'circle', 'circle'], //仿F2图例样式改为圆点 colors: ['#1890ff', '#2fc25b', '#facc14', '#f04864', '#8543e0', '#90ed7d'], pieChartLinePadding: 15, pieChartTextPadding: 5, xAxisTextPadding: 3, titleColor: '#333333', titleFontSize: 20, subtitleColor: '#999999', subtitleFontSize: 15, toolTipPadding: 3, toolTipBackground: '#000000', toolTipOpacity: 0.7, toolTipLineHeight: 20, radarGridCount: 3, radarLabelTextMargin: 15, gaugeLabelTextMargin: 15 }; // Object.assign polyfill // https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign function assign(target, varArgs) { if (target == null) { // TypeError if undefined or null throw new TypeError('Cannot convert undefined or null to object'); } var to = Object(target); for (var index = 1; index < arguments.length; index++) { var nextSource = arguments[index]; if (nextSource != null) { // Skip over if undefined or null for (var nextKey in nextSource) { // Avoid bugs when hasOwnProperty is shadowed if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { to[nextKey] = nextSource[nextKey]; } } } } return to; } var util = { toFixed: function toFixed(num, limit) { limit = limit || 2; if (this.isFloat(num)) { num = num.toFixed(limit); } return num; }, isFloat: function isFloat(num) { return num % 1 !== 0; }, approximatelyEqual: function approximatelyEqual(num1, num2) { return Math.abs(num1 - num2) < 1e-10; }, isSameSign: function isSameSign(num1, num2) { return Math.abs(num1) === num1 && Math.abs(num2) === num2 || Math.abs(num1) !== num1 && Math.abs(num2) !== num2; }, isSameXCoordinateArea: function isSameXCoordinateArea(p1, p2) { return this.isSameSign(p1.x, p2.x); }, isCollision: function isCollision(obj1, obj2) { obj1.end = {}; obj1.end.x = obj1.start.x + obj1.width; obj1.end.y = obj1.start.y - obj1.height; obj2.end = {}; obj2.end.x = obj2.start.x + obj2.width; obj2.end.y = obj2.start.y - obj2.height; var flag = obj2.start.x > obj1.end.x || obj2.end.x < obj1.start.x || obj2.end.y > obj1.start.y || obj2.start.y < obj1.end.y; return !flag; } }; //兼容H5点击事件 function getH5Offset(e) { e.mp={changedTouches:[]}; e.mp.changedTouches.push({x:e.offsetX,y:e.offsetY}); return e; } // hex 转 rgba function hexToRgb(hexValue, opc) { var rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; var hex = hexValue.replace(rgx, function(m, r, g, b) { return r + r + g + g + b + b; }); var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); var r = parseInt(rgb[1], 16); var g = parseInt(rgb[2], 16); var b = parseInt(rgb[3], 16); return 'rgba(' + r + ',' + g + ',' + b + ',' + opc + ')'; } function findRange(num, type, limit) { if (isNaN(num)) { throw new Error('[wxCharts] unvalid series data!'); } limit = limit || 10; type = type ? type : 'upper'; var multiple = 1; while (limit < 1) { limit *= 10; multiple *= 10; } if (type === 'upper') { num = Math.ceil(num * multiple); } else { num = Math.floor(num * multiple); } while (num % limit !== 0) { if (type === 'upper') { num++; } else { num--; } } return num / multiple; } function calCandleMA(dayArr, nameArr, colorArr, kdata) { let seriesTemp = []; for (let k = 0; k < dayArr.length; k++) { let seriesItem = { data: [], name: nameArr[k], color: colorArr[k] }; for (let i = 0, len = kdata.length; i < len; i++) { if (i < dayArr[k]) { seriesItem.data.push(null); continue; } let sum = 0; for (let j = 0; j < dayArr[k]; j++) { sum += kdata[i - j][1]; } seriesItem.data.push(+(sum / dayArr[k]).toFixed(3)); } seriesTemp.push(seriesItem); } return seriesTemp; } function calValidDistance(distance, chartData, config, opts) { var dataChartAreaWidth = opts.width - config.padding - chartData.xAxisPoints[0]; var dataChartWidth = chartData.eachSpacing * opts.categories.length; var validDistance = distance; if (distance >= 0) { validDistance = 0; } else if (Math.abs(distance) >= dataChartWidth - dataChartAreaWidth) { validDistance = dataChartAreaWidth - dataChartWidth; } return validDistance; } function isInAngleRange(angle, startAngle, endAngle) { function adjust(angle) { while (angle < 0) { angle += 2 * Math.PI; } while (angle > 2 * Math.PI) { angle -= 2 * Math.PI; } return angle; } angle = adjust(angle); startAngle = adjust(startAngle); endAngle = adjust(endAngle); if (startAngle > endAngle) { endAngle += 2 * Math.PI; if (angle < startAngle) { angle += 2 * Math.PI; } } return angle >= startAngle && angle <= endAngle; } function calRotateTranslate(x, y, h) { var xv = x; var yv = h - y; var transX = xv + (h - yv - xv) / Math.sqrt(2); transX *= -1; var transY = (h - yv) * (Math.sqrt(2) - 1) - (h - yv - xv) / Math.sqrt(2); return { transX: transX, transY: transY }; } function createCurveControlPoints(points, i) { function isNotMiddlePoint(points, i) { if (points[i - 1] && points[i + 1]) { return points[i].y >= Math.max(points[i - 1].y, points[i + 1].y) || points[i].y <= Math.min(points[i - 1].y, points[ i + 1].y); } else { return false; } } var a = 0.2; var b = 0.2; var pAx = null; var pAy = null; var pBx = null; var pBy = null; if (i < 1) { pAx = points[0].x + (points[1].x - points[0].x) * a; pAy = points[0].y + (points[1].y - points[0].y) * a; } else { pAx = points[i].x + (points[i + 1].x - points[i - 1].x) * a; pAy = points[i].y + (points[i + 1].y - points[i - 1].y) * a; } if (i > points.length - 3) { var last = points.length - 1; pBx = points[last].x - (points[last].x - points[last - 1].x) * b; pBy = points[last].y - (points[last].y - points[last - 1].y) * b; } else { pBx = points[i + 1].x - (points[i + 2].x - points[i].x) * b; pBy = points[i + 1].y - (points[i + 2].y - points[i].y) * b; } // fix issue https://github.com/xiaolin3303/wx-charts/issues/79 if (isNotMiddlePoint(points, i + 1)) { pBy = points[i + 1].y; } if (isNotMiddlePoint(points, i)) { pAy = points[i].y; } return { ctrA: { x: pAx, y: pAy }, ctrB: { x: pBx, y: pBy } }; } function convertCoordinateOrigin(x, y, center) { return { x: center.x + x, y: center.y - y }; } function avoidCollision(obj, target) { if (target) { // is collision test while (util.isCollision(obj, target)) { if (obj.start.x > 0) { obj.start.y--; } else if (obj.start.x < 0) { obj.start.y++; } else { if (obj.start.y > 0) { obj.start.y++; } else { obj.start.y--; } } } } return obj; } function fillSeriesColor(series, config) { var index = 0; return series.map(function(item) { if (!item.color) { item.color = config.colors[index]; index = (index + 1) % config.colors.length; } return item; }); } function fillSeriesType(series, opts) { return series.map(function(item) { if (!item.type) { item.type = opts.type; } return item; }); } function getDataRange(minData, maxData) { var limit = 0; var range = maxData - minData; if (range >= 10000) { limit = 1000; } else if (range >= 1000) { limit = 100; } else if (range >= 100) { limit = 10; } else if (range >= 10) { limit = 5; } else if (range >= 1) { limit = 1; } else if (range >= 0.1) { limit = 0.1; } else { limit = 0.01; } return { minRange: findRange(minData, 'lower', limit), maxRange: findRange(maxData, 'upper', limit) }; } function measureText(text) { var fontSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : config.fontSize; // wx canvas 未实现measureText方法, 此处自行实现 // 适配修改初始字体10px为其他大小的方法 text = String(text); var text = text.split(''); var width = 0; for (let i = 0; i < text.length; i++) { let item = text[i]; if (/[a-zA-Z]/.test(item)) { width += 7; } else if (/[0-9]/.test(item)) { width += 5.5; } else if (/\./.test(item)) { width += 2.7; } else if (/-/.test(item)) { width += 3.25; } else if (/[\u4e00-\u9fa5]/.test(item)) { width += 10; } else if (/\(|\)/.test(item)) { width += 3.73; } else if (/\s/.test(item)) { width += 2.5; } else if (/%/.test(item)) { width += 8; } else { width += 10; } } return width * fontSize / 10; } function dataCombine(series) { return series.reduce(function(a, b) { return (a.data ? a.data : a).concat(b.data); }, []); } function dataCombineStack(series) { var sum = new Array(series[0].data.length); for (var j = 0; j < sum.length; j++) { sum[j] = 0; } for (var i = 0; i < series.length; i++) { for (var j = 0; j < sum.length; j++) { sum[j] += series[i].data[j]; } } return series.reduce(function(a, b) { return (a.data ? a.data : a).concat(b.data).concat(sum); }, []); } function getTouches(touches, opts, e) { let x, y; if (touches.clientX) { if (opts.rotate) { //适配横屏 y = opts.height - touches.clientX * opts.pixelRatio; x = (touches.pageY - e.currentTarget.offsetTop - (opts.height / opts.pixelRatio / 2) * (opts.pixelRatio - 1)) * opts.pixelRatio; } else { x = touches.clientX * opts.pixelRatio; y = (touches.pageY - e.currentTarget.offsetTop - (opts.height / opts.pixelRatio / 2) * (opts.pixelRatio - 1)) * opts.pixelRatio; } } else { if (opts.rotate) { //适配横屏 y = opts.height - touches.x * opts.pixelRatio; x = touches.y * opts.pixelRatio; } else { x = touches.x * opts.pixelRatio; y = touches.y * opts.pixelRatio; } } return { x: x, y: y } } function getSeriesDataItem(series, index) { var data = []; for (let i = 0; i < series.length; i++) { let item = series[i]; if (item.data[index] !== null && typeof item.data[index] !== 'undefined') { let seriesItem = {}; seriesItem.color = item.color; seriesItem.type = item.type; seriesItem.style = item.style; seriesItem.shape = item.shape; seriesItem.disableLegend = item.disableLegend; seriesItem.name = item.name; seriesItem.data = item.format ? item.format(item.data[index]) : item.data[index]; data.push(seriesItem); } } return data; } function getMaxTextListLength(list) { var lengthList = list.map(function(item) { return measureText(item); }); return Math.max.apply(null, lengthList); } function getRadarCoordinateSeries(length) { var eachAngle = 2 * Math.PI / length; var CoordinateSeries = []; for (var i = 0; i < length; i++) { CoordinateSeries.push(eachAngle * i); } return CoordinateSeries.map(function(item) { return -1 * item + Math.PI / 2; }); } function getToolTipData(seriesData, calPoints, index, categories) { var option = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; var textList = seriesData.map(function(item) { return { text: option.format ? option.format(item, categories[index]) : item.name + ': ' + item.data, color: item.color }; }); var validCalPoints = []; var offset = { x: 0, y: 0 }; for (let i = 0; i < calPoints.length; i++) { let points = calPoints[i]; if (typeof points[index] !== 'undefined' && points[index] !== null) { validCalPoints.push(points[index]); } } for (let i = 0; i < validCalPoints.length; i++) { let item = validCalPoints[i]; offset.x = Math.round(item.x); offset.y += item.y; } offset.y /= validCalPoints.length; return { textList: textList, offset: offset }; } function getMixToolTipData(seriesData, calPoints, index, categories) { var option = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; var textList = seriesData.map(function(item) { return { text: option.format ? option.format(item, categories[index]) : item.name + ': ' + item.data, color: item.color, disableLegend: item.disableLegend ? true : false }; }); textList = textList.filter(function(item) { if (item.disableLegend !== true) { return item; } }); var validCalPoints = []; var offset = { x: 0, y: 0 }; for (let i = 0; i < calPoints.length; i++) { let points = calPoints[i]; if (typeof points[index] !== 'undefined' && points[index] !== null) { validCalPoints.push(points[index]); } } for (let i = 0; i < validCalPoints.length; i++) { let item = validCalPoints[i]; offset.x = Math.round(item.x); offset.y += item.y; } offset.y /= validCalPoints.length; return { textList: textList, offset: offset }; } function getCandleToolTipData(series, seriesData, calPoints, index, categories, extra) { var option = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {}; let upColor = extra.color.upFill; let downColor = extra.color.downFill; //颜色顺序为开盘，收盘，最低，最高 let color = [upColor, upColor, downColor, upColor]; var textList = []; let text0 = { text: categories[index], color: null }; textList.push(text0); seriesData.map(function(item) { //console.log(color) if (index == 0 && item.data[1] - item.data[0] < 0) { color[1] = downColor; } else { if (item.data[0] < series[index - 1][1]) { color[0] = downColor; } if (item.data[1] < item.data[0]) { color[1] = downColor; } if (item.data[2] > series[index - 1][1]) { color[2] = upColor; } if (item.data[3] < series[index - 1][1]) { color[3] = downColor; } } let text1 = { text: '开盘：' + item.data[0], color: color[0] }; let text2 = { text: '收盘：' + item.data[1], color: color[1] }; let text3 = { text: '最低：' + item.data[2], color: color[2] }; let text4 = { text: '最高：' + item.data[3], color: color[3] }; textList.push(text1, text2, text3, text4); }); var validCalPoints = []; var offset = { x: 0, y: 0 }; for (let i = 0; i < calPoints.length; i++) { let points = calPoints[i]; if (typeof points[index] !== 'undefined' && points[index] !== null) { validCalPoints.push(points[index]); } } offset.x = Math.round(validCalPoints[0][0].x); return { textList: textList, offset: offset }; } function findCurrentIndex(currentPoints, xAxisPoints, opts, config) { var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0; var currentIndex = -1; if (isInExactChartArea(currentPoints, opts, config)) { xAxisPoints.forEach(function(item, index) { if (currentPoints.x + offset > item) { currentIndex = index; } }); } return currentIndex; } function isInExactChartArea(currentPoints, opts, config) { return currentPoints.x < opts.width - config.padding && currentPoints.x > config.padding + config.yAxisWidth + config.yAxisTitleWidth && currentPoints.y > config.padding && currentPoints.y < opts.height - config.legendHeight - config.xAxisHeight - config .padding; } function findRadarChartCurrentIndex(currentPoints, radarData, count) { var eachAngleArea = 2 * Math.PI / count; var currentIndex = -1; if (isInExactPieChartArea(currentPoints, radarData.center, radarData.radius)) { var fixAngle = function fixAngle(angle) { if (angle < 0) { angle += 2 * Math.PI; } if (angle > 2 * Math.PI) { angle -= 2 * Math.PI; } return angle; }; var angle = Math.atan2(radarData.center.y - currentPoints.y, currentPoints.x - radarData.center.x); angle = -1 * angle; if (angle < 0) { angle += 2 * Math.PI; } var angleList = radarData.angleList.map(function(item) { item = fixAngle(-1 * item); return item; }); angleList.forEach(function(item, index) { var rangeStart = fixAngle(item - eachAngleArea / 2); var rangeEnd = fixAngle(item + eachAngleArea / 2); if (rangeEnd < rangeStart) { rangeEnd += 2 * Math.PI; } if (angle >= rangeStart && angle <= rangeEnd || angle + 2 * Math.PI >= rangeStart && angle + 2 * Math.PI <= rangeEnd) { currentIndex = index; } }); } return currentIndex; } function findPieChartCurrentIndex(currentPoints, pieData) { var currentIndex = -1; if (isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) { var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x); angle = -angle; for (var i = 0, len = pieData.series.length; i < len; i++) { var item = pieData.series[i]; if (isInAngleRange(angle, item._start_, item._start_ + item._proportion_ * 2 * Math.PI)) { currentIndex = i; break; } } } return currentIndex; } function isInExactPieChartArea(currentPoints, center, radius) { return Math.pow(currentPoints.x - center.x, 2) + Math.pow(currentPoints.y - center.y, 2) <= Math.pow(radius, 2); } function splitPoints(points) { var newPoints = []; var items = []; points.forEach(function(item, index) { if (item !== null) { items.push(item); } else { if (items.length) { newPoints.push(items); } items = []; } }); if (items.length) { newPoints.push(items); } return newPoints; } function calLegendData(series, opts, config) { if (opts.legend === false) { return { legendList: [], legendHeight: 0 }; } //适配H5高分屏 var padding = 5 * opts.pixelRatio; var marginTop = 8 * opts.pixelRatio; var shapeWidth = 15 * opts.pixelRatio; var legendList = []; var widthCount = 0; var currentRow = []; for (let i = 0; i < series.length; i++) { let item = series[i]; let itemWidth = 3 * padding + shapeWidth + measureText(item.name || 'undefined'); if (widthCount + itemWidth > opts.width) { legendList.push(currentRow); widthCount = itemWidth; currentRow = [item]; } else { widthCount += itemWidth; currentRow.push(item); } } if (currentRow.length) { legendList.push(currentRow); } return { legendList: legendList, legendHeight: legendList.length * (config.fontSize + marginTop) + padding }; } function calCategoriesData(categories, opts, config) { var result = { angle: 0, xAxisHeight: config.xAxisHeight }; var _getXAxisPoints = getXAxisPoints(categories, opts, config), eachSpacing = _getXAxisPoints.eachSpacing; // get max length of categories text var categoriesTextLenth = categories.map(function(item) { return measureText(item); }); var maxTextLength = Math.max.apply(this, categoriesTextLenth); if (opts.xAxis.rotateLabel == true && maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) { result.angle = 45 * Math.PI / 180; result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle); } return result; } function getRadarDataPoints(angleList, center, radius, series, opts) { var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1; var radarOption = opts.extra.radar || {}; radarOption.max = radarOption.max || 0; var maxData = Math.max(radarOption.max, Math.max.apply(null, dataCombine(series))); var data = []; for (let i = 0; i < series.length; i++) { let each = series[i]; let listItem = {}; listItem.color = each.color; listItem.data = []; each.data.forEach(function(item, index) { let tmp = {}; tmp.angle = angleList[index]; tmp.proportion = item / maxData; tmp.position = convertCoordinateOrigin(radius * tmp.proportion * process * Math.cos(tmp.angle), radius * tmp.proportion * process * Math.sin(tmp.angle), center); listItem.data.push(tmp); }); data.push(listItem); } return data; } function getPieDataPoints(series, radius) { var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; var count = 0; var _start_ = 0; for (let i = 0; i < series.length; i++) { let item = series[i]; item.data = item.data === null ? 0 : item.data; count += item.data; } for (let i = 0; i < series.length; i++) { let item = series[i]; item.data = item.data === null ? 0 : item.data; if (count === 0) { item._proportion_ = 1 / series.length * process; } else { item._proportion_ = item.data / count * process; } item._radius_=radius; } for (let i = 0; i < series.length; i++) { let item = series[i]; item._start_ = _start_; _start_ += 2 * item._proportion_ * Math.PI; } return series; } function getRoseDataPoints(series, type, minRadius, radius) { var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; var count = 0; var _start_ = 0; var dataArr=[]; for (let i = 0; i < series.length; i++) { let item = series[i]; item.data = item.data === null ? 0 : item.data; count += item.data; dataArr.push(item.data); } var minData = dataArr.pop(); var maxData = dataArr.shift(); var radiusLength = radius - minRadius; for (let i = 0; i < series.length; i++) { let item = series[i]; item.data = item.data === null ? 0 : item.data; if (count === 0 || type == 'area') { item._proportion_ = 1 / series.length * process; } else { item._proportion_ = item.data / count * process; } item._radius_ = minRadius + radiusLength * ( (item.data - minData)/(maxData-minData) ); } for (let i = 0; i < series.length; i++) { let item = series[i]; item._start_ = _start_; _start_ += 2 * item._proportion_ * Math.PI; } return series; } function getArcbarDataPoints(series, arcbarOption) { var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; if (process == 1) { process = 0.999999; } for (let i = 0; i < series.length; i++) { let item = series[i]; item.data = item.data === null ? 0 : item.data; let totalAngle; if (arcbarOption.type == 'default') { totalAngle = arcbarOption.startAngle - arcbarOption.endAngle + 1; } else { totalAngle = 2; } item._proportion_ = totalAngle * item.data * process + arcbarOption.startAngle; if (item._proportion_ >= 2) { item._proportion_ = item._proportion_ % 2; } } return series; } function getGaugeAxisPoints(categories, startAngle, endAngle) { let totalAngle = startAngle - endAngle + 1; let tempStartAngle = startAngle; for (let i = 0; i < categories.length; i++) { categories[i].value = categories[i].value === null ? 0 : categories[i].value; categories[i]._startAngle_ = tempStartAngle; categories[i]._endAngle_ = totalAngle * categories[i].value + startAngle; if (categories[i]._endAngle_ >= 2) { categories[i]._endAngle_ = categories[i]._endAngle_ % 2; } tempStartAngle = categories[i]._endAngle_; } return categories; } function getGaugeDataPoints(series, categories, gaugeOption) { let process = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1; for (let i = 0; i < series.length; i++) { let item = series[i]; item.data = item.data === null ? 0 : item.data; if (gaugeOption.pointer.color == 'auto') { for (let i = 0; i < categories.length; i++) { if (item.data <= categories[i].value) { item.color = categories[i].color; break; } } } else { item.color = gaugeOption.pointer.color; } let totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1; item._endAngle_ = totalAngle * item.data + gaugeOption.startAngle; item._oldAngle_ = gaugeOption.oldAngle; if (gaugeOption.oldAngle < gaugeOption.endAngle) { item._oldAngle_ += 2; } if (item.data >= gaugeOption.oldData) { item._proportion_ = (item._endAngle_ - item._oldAngle_) * process + gaugeOption.oldAngle; } else { item._proportion_ = item._oldAngle_ - (item._oldAngle_ - item._endAngle_) * process; } if (item._proportion_ >= 2) { item._proportion_ = item._proportion_ % 2; } } return series; } function getPieTextMaxLength(series) { series = getPieDataPoints(series); let maxLength = 0; for (let i = 0; i < series.length; i++) { let item = series[i]; let text = item.format ? item.format(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_ * 100) + '%'; maxLength = Math.max(maxLength, measureText(text)); } return maxLength; } function fixColumeData(points, eachSpacing, columnLen, index, config, opts) { return points.map(function(item) { if (item === null) { return null; } item.width = Math.ceil((eachSpacing - 2 * config.columePadding) / columnLen); if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) { item.width = Math.min(item.width, +opts.extra.column.width); } item.x += (index + 0.5 - columnLen / 2) * item.width; return item; }); } function fixColumeMeterData(points, eachSpacing, columnLen, index, config, opts, border) { return points.map(function(item) { if (item === null) { return null; } item.width = eachSpacing - 2 * config.columePadding; if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) { item.width = Math.min(item.width, +opts.extra.column.width); } else { item.width = Math.min(item.width, 25); } if (index > 0) { item.width -= 2 * border; } return item; }); } function fixColumeStackData(points, eachSpacing, columnLen, index, config, opts, series) { return points.map(function(item, indexn) { if (item === null) { return null; } item.width = eachSpacing - 2 * config.columePadding; if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) { item.width = Math.min(item.width, +opts.extra.column.width); } else { item.width = Math.min(item.width, 25); } return item; }); } function getXAxisPoints(categories, opts, config) { var yAxisTotalWidth = config.yAxisWidth + config.yAxisTitleWidth; var spacingValid = opts.width - 2 * config.padding - yAxisTotalWidth; var dataCount = opts.enableScroll ? Math.min(opts.xAxis.itemCount, categories.length) : categories.length; var eachSpacing = spacingValid / dataCount; var xAxisPoints = []; var startX = config.padding + yAxisTotalWidth; var endX = opts.width - config.padding; categories.forEach(function(item, index) { xAxisPoints.push(startX + index * eachSpacing); }); if (opts.enableScroll === true) { xAxisPoints.push(startX + categories.length * eachSpacing); } else { xAxisPoints.push(endX); } return { xAxisPoints: xAxisPoints, startX: startX, endX: endX, eachSpacing: eachSpacing }; } function getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) { var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1; var points = []; var validHeight = opts.height - 2 * config.padding - config.xAxisHeight - config.legendHeight; data.forEach(function(item, index) { if (item === null) { points.push(null); } else { var cPoints = []; item.forEach(function(items, indexs) { var point = {}; point.x = xAxisPoints[index] + Math.round(eachSpacing / 2); var value = items.value || items; var height = validHeight * (value - minRange) / (maxRange - minRange); height *= process; point.y = opts.height - config.xAxisHeight - config.legendHeight - Math.round(height) - config.padding; cPoints.push(point); }); points.push(cPoints); } }); return points; } function getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) { var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1; var points = []; var validHeight = opts.height - 2 * config.padding - config.xAxisHeight - config.legendHeight; data.forEach(function(item, index) { if (item === null) { points.push(null); } else { var point = {}; point.color = item.color; point.x = xAxisPoints[index] + Math.round(eachSpacing / 2); var value = item; if (typeof item === 'object' && item !== null) { value = item.value } var height = validHeight * (value - minRange) / (maxRange - minRange); height *= process; point.y = opts.height - config.xAxisHeight - config.legendHeight - Math.round(height) - config.padding; points.push(point); } }); return points; } function getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) { var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1; var points = []; var validHeight = opts.height - 2 * config.padding - config.xAxisHeight - config.legendHeight; data.forEach(function(item, index) { if (item === null) { points.push(null); } else { var point = {}; point.color = item.color; point.x = xAxisPoints[index] + Math.round(eachSpacing / 2); if (seriesIndex > 0) { var value = 0; for (let i = 0; i <= seriesIndex; i++) { value += stackSeries[i].data[index]; } var value0 = value - item; var height = validHeight * (value - minRange) / (maxRange - minRange); var height0 = validHeight * (value0 - minRange) / (maxRange - minRange); } else { var value = item; var height = validHeight * (value - minRange) / (maxRange - minRange); var height0 = 0; } var heightc = height0; height *= process; heightc *= process; point.y = opts.height - config.xAxisHeight - config.legendHeight - Math.round(height) - config.padding; point.y0 = opts.height - config.xAxisHeight - config.legendHeight - Math.round(heightc) - config.padding; points.push(point); } }); return points; } function getYAxisTextList(series, opts, config, stack) { var data; if (stack == 'stack') { //data = dataCombine(series); data = dataCombineStack(series); } else { data = dataCombine(series); } var sorted = []; // remove null from data data = data.filter(function(item) { //return item !== null; if (typeof item === 'object' && item !== null) { //判断是否为数组 if (item.constructor == Array) { return item !== null; } else { return item.value !== null; } } else { return item !== null; } }); //var minData = Math.min.apply(this, data); //var maxData = Math.max.apply(this, data); data.map(function(item) { if (typeof item === 'object') { if (item.constructor == Array) { item.map(function(subitem) { sorted.push(subitem); }) } else { sorted.push(item.value); } } else { sorted.push(item); } //typeof item === 'object' ? sorted.push(item.value) : sorted.push(item) }) var minData = 0; var maxData = 0; if (sorted.length > 0) { minData = Math.min.apply(this, sorted); maxData = Math.max.apply(this, sorted); } if (typeof opts.yAxis.min === 'number') { minData = Math.min(opts.yAxis.min, minData); } if (typeof opts.yAxis.max === 'number') { maxData = Math.max(opts.yAxis.max, maxData); } // fix issue https://github.com/xiaolin3303/wx-charts/issues/9 if (minData === maxData) { var rangeSpan = maxData || 10; //minData -= rangeSpan; maxData += rangeSpan; } var dataRange = getDataRange(minData, maxData); var minRange = dataRange.minRange; var maxRange = dataRange.maxRange; var range = []; var eachRange = (maxRange - minRange) / config.yAxisSplit; for (var i = 0; i <= config.yAxisSplit; i++) { range.push(minRange + eachRange * i); } return range.reverse(); } function calYAxisData(series, opts, config) { //堆叠图重算Y轴 var columnstyle = assign({}, opts.extra.column || { "type": "" }); var ranges = getYAxisTextList(series, opts, config, columnstyle.type); var yAxisWidth = config.yAxisWidth; var rangesFormat = ranges.map(function(item) { item = util.toFixed(item, 2); item = opts.yAxis.format ? opts.yAxis.format(Number(item)) : item; yAxisWidth = Math.max(yAxisWidth, measureText(item) + 5); return item; }); if (opts.yAxis.disabled === true) { yAxisWidth = 0; } return { rangesFormat: rangesFormat, ranges: ranges, yAxisWidth: yAxisWidth }; } function calTooltipYAxisData(point, series, opts, config, eachSpacing) { var ranges = getYAxisTextList(series, opts, config); var spacingValid = opts.height - 2 * config.padding - config.xAxisHeight - config.legendHeight; let maxVal = ranges[0]; let minVal = ranges[ranges.length - 1]; let minAxis = config.padding; let maxAxis = config.padding + spacingValid; let item = maxVal - (maxVal - minVal) * (point - minAxis) / (maxAxis - minAxis); item = opts.yAxis.format ? opts.yAxis.format(Number(item)) : item; return item; } function contextRotate(context, opts) { if (opts.rotateLock !== true) { context.translate(opts.height, 0); context.rotate(90 * Math.PI / 180); } else if (opts._rotate_ !== true) { context.translate(opts.height, 0); context.rotate(90 * Math.PI / 180); opts._rotate_ = true; } } function drawPointShape(points, color, shape, context, opts) { context.beginPath(); context.setStrokeStyle("#ffffff"); context.setLineWidth(1 * opts.pixelRatio); context.setFillStyle(color); if (shape === 'diamond') { points.forEach(function(item, index) { if (item !== null) { context.moveTo(item.x, item.y - 4.5); context.lineTo(item.x - 4.5, item.y); context.lineTo(item.x, item.y + 4.5); context.lineTo(item.x + 4.5, item.y); context.lineTo(item.x, item.y - 4.5); } }); } else if (shape === 'circle') { points.forEach(function(item, index) { if (item !== null) { context.moveTo(item.x + 3.5 * opts.pixelRatio, item.y); context.arc(item.x, item.y, 4 * opts.pixelRatio, 0, 2 * Math.PI, false); } }); } else if (shape === 'rect') { points.forEach(function(item, index) { if (item !== null) { context.moveTo(item.x - 3.5, item.y - 3.5); context.rect(item.x - 3.5, item.y - 3.5, 7, 7); } }); } else if (shape === 'triangle') { points.forEach(function(item, index) { if (item !== null) { context.moveTo(item.x, item.y - 4.5); context.lineTo(item.x - 4.5, item.y + 4.5); context.lineTo(item.x + 4.5, item.y + 4.5); context.lineTo(item.x, item.y - 4.5); } }); } context.closePath(); context.fill(); context.stroke(); } function drawRingTitle(opts, config, context) { var titlefontSize = opts.title.fontSize || config.titleFontSize; var subtitlefontSize = opts.subtitle.fontSize || config.subtitleFontSize; var title = opts.title.name || ''; var subtitle = opts.subtitle.name || ''; var titleFontColor = opts.title.color || config.titleColor; var subtitleFontColor = opts.subtitle.color || config.subtitleColor; var titleHeight = title ? titlefontSize : 0; var subtitleHeight = subtitle ? subtitlefontSize : 0; var margin = 5; if (subtitle) { var textWidth = measureText(subtitle, subtitlefontSize); var startX = (opts.width - textWidth) / 2 + (opts.subtitle.offsetX || 0); var startY = ((opts.height - config.legendHeight + subtitlefontSize) / 2) + (opts.subtitle.offsetY || 0); if (title) { startY -= (titleHeight + margin) / 2; } context.beginPath(); context.setFontSize(subtitlefontSize); context.setFillStyle(subtitleFontColor); context.fillText(subtitle, startX, startY); context.closePath(); context.stroke(); } if (title) { var _textWidth = measureText(title, titlefontSize); var _startX = (opts.width - _textWidth) / 2 + (opts.title.offsetX || 0); var _startY = ((opts.height - config.legendHeight + titlefontSize) / 2) + (opts.title.offsetY || 0); if (subtitle) { _startY += (subtitleHeight + margin) / 2; } context.beginPath(); context.setFontSize(titlefontSize); context.setFillStyle(titleFontColor); context.fillText(title, _startX, _startY); context.closePath(); context.stroke(); } } function drawPointText(points, series, config, context) { // 绘制数据文案 var data = series.data; points.forEach(function(item, index) { if (item !== null) { //var formatVal = series.format ? series.format(data[index]) : data[index]; context.beginPath(); context.setFontSize(series.textSize || config.fontSize); context.setFillStyle(series.textColor || '#666666'); var value = data[index] if (typeof data[index] === 'object' && data[index] !== null) { value = data[index].value } var formatVal = series.format ? series.format(value) : value; context.fillText(formatVal, item.x - measureText(formatVal,series.textSize || config.fontSize) / 2, item.y - 2); context.closePath(); context.stroke(); } }); } function drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context) { radius -= gaugeOption.width / 2 + config.gaugeLabelTextMargin; let totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1; let splitAngle = totalAngle / gaugeOption.splitLine.splitNumber; let totalNumber = gaugeOption.endNumber - gaugeOption.startNumber; let splitNumber = totalNumber / gaugeOption.splitLine.splitNumber; let nowAngle = gaugeOption.startAngle; let nowNumber = gaugeOption.startNumber; for (let i = 0; i < gaugeOption.splitLine.splitNumber + 1; i++) { var pos = { x: radius * Math.cos(nowAngle * Math.PI), y: radius * Math.sin(nowAngle * Math.PI) }; var labelText = gaugeOption.labelFormat ? gaugeOption.labelFormat(nowNumber) : nowNumber; pos.x += centerPosition.x - measureText(labelText) / 2; pos.y += centerPosition.y; var startX = pos.x; var startY = pos.y; context.beginPath(); context.setFontSize(config.fontSize); context.setFillStyle(gaugeOption.labelColor || '#666666'); context.fillText(labelText, startX, startY + config.fontSize / 2); context.closePath(); context.stroke(); nowAngle += splitAngle; if (nowAngle >= 2) { nowAngle = nowAngle % 2; } nowNumber += splitNumber; } } function drawRadarLabel(angleList, radius, centerPosition, opts, config, context) { var radarOption = opts.extra.radar || {}; radius += config.radarLabelTextMargin; angleList.forEach(function(angle, index) { var pos = { x: radius * Math.cos(angle), y: radius * Math.sin(angle) }; var posRelativeCanvas = convertCoordinateOrigin(pos.x, pos.y, centerPosition); var startX = posRelativeCanvas.x; var startY = posRelativeCanvas.y; if (util.approximatelyEqual(pos.x, 0)) { startX -= measureText(opts.categories[index] || '') / 2; } else if (pos.x < 0) { startX -= measureText(opts.categories[index] || ''); } context.beginPath(); context.setFontSize(config.fontSize); context.setFillStyle(radarOption.labelColor || '#666666'); context.fillText(opts.categories[index] || '', startX, startY + config.fontSize / 2); context.closePath(); context.stroke(); }); } function drawPieText(series, opts, config, context, radius, center) { var lineRadius = config.pieChartLinePadding; var textObjectCollection = []; var lastTextObject = null; var seriesConvert = series.map(function(item) { var arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._proportion_ / 2); var text = item.format ? item.format(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_ * 100) + '%'; var color = item.color; var radius = item._radius_; return { arc: arc, text: text, color: color, radius: radius, textColor: item.textColor, textSize: item.textSize, }; }); for (let i = 0; i < seriesConvert.length; i++) { let item = seriesConvert[i]; // line end let orginX1 = Math.cos(item.arc) * (item.radius+lineRadius); let orginY1 = Math.sin(item.arc) * (item.radius+lineRadius); // line start let orginX2 = Math.cos(item.arc) * item.radius; let orginY2 = Math.sin(item.arc) * item.radius; // text start let orginX3 = orginX1 >= 0 ? orginX1 + config.pieChartTextPadding : orginX1 - config.pieChartTextPadding; let orginY3 = orginY1; let textWidth = measureText(item.text); let startY = orginY3; if (lastTextObject && util.isSameXCoordinateArea(lastTextObject.start, { x: orginX3 })) { if (orginX3 > 0) { startY = Math.min(orginY3, lastTextObject.start.y); } else if (orginX1 < 0) { startY = Math.max(orginY3, lastTextObject.start.y); } else { if (orginY3 > 0) { startY = Math.max(orginY3, lastTextObject.start.y); } else { startY = Math.min(orginY3, lastTextObject.start.y); } } } if (orginX3 < 0) { orginX3 -= textWidth; } let textObject = { lineStart: { x: orginX2, y: orginY2 }, lineEnd: { x: orginX1, y: orginY1 }, start: { x: orginX3, y: startY }, width: textWidth, height: config.fontSize, text: item.text, color: item.color, textColor: item.textColor, textSize: item.textSize }; lastTextObject = avoidCollision(textObject, lastTextObject); textObjectCollection.push(lastTextObject); } for (let i = 0; i < textObjectCollection.length; i++) { let item = textObjectCollection[i]; let lineStartPoistion = convertCoordinateOrigin(item.lineStart.x, item.lineStart.y, center); let lineEndPoistion = convertCoordinateOrigin(item.lineEnd.x, item.lineEnd.y, center); let textPosition = convertCoordinateOrigin(item.start.x, item.start.y, center); context.setLineWidth(1 * opts.pixelRatio); context.setFontSize(config.fontSize); context.beginPath(); context.setStrokeStyle(item.color); context.setFillStyle(item.color); context.moveTo(lineStartPoistion.x, lineStartPoistion.y); let curveStartX = item.start.x < 0 ? textPosition.x + item.width : textPosition.x; let textStartX = item.start.x < 0 ? textPosition.x - 5 : textPosition.x + 5; context.quadraticCurveTo(lineEndPoistion.x, lineEndPoistion.y, curveStartX, textPosition.y); context.moveTo(lineStartPoistion.x, lineStartPoistion.y); context.stroke(); context.closePath(); context.beginPath(); context.moveTo(textPosition.x + item.width, textPosition.y); context.arc(curveStartX, textPosition.y, 2, 0, 2 * Math.PI); context.closePath(); context.fill(); context.beginPath(); context.setFontSize(item.textSize||config.fontSize); context.setFillStyle(item.textColor||'#666666'); context.fillText(item.text, textStartX, textPosition.y + 3); context.closePath(); context.stroke(); context.closePath(); } } function drawToolTipSplitLine(offsetX, opts, config, context) { var toolTipOption = opts.extra.tooltip || {}; toolTipOption.gridType = toolTipOption.gridType == undefined ? 'solid' : toolTipOption.gridType; toolTipOption.dashLength = toolTipOption.dashLength == undefined ? 4 : toolTipOption.dashLength; var startY = config.padding; var endY = opts.height - config.padding - config.xAxisHeight - config.legendHeight; if (toolTipOption.gridType == 'dash') { context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]); } context.beginPath(); context.setStrokeStyle(toolTipOption.gridColor || '#cccccc'); context.setLineWidth(1 * opts.pixelRatio); context.moveTo(offsetX, startY); context.lineTo(offsetX, endY); context.closePath(); context.stroke(); context.setLineDash([]); if (toolTipOption.xAxisLabel) { let labelText = opts.categories[opts.tooltip.index]; context.setFontSize(config.fontSize); let textWidth = context.measureText(labelText).width; let textX = offsetX - config.toolTipPadding - 0.5 * textWidth; let textY = endY; context.beginPath(); context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity)); context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground); context.setLineWidth(1 * opts.pixelRatio); context.rect(textX, textY, textWidth + 2 * config.toolTipPadding, config.fontSize + 2 * config.toolTipPadding); context.closePath(); context.stroke(); context.fill(); context.beginPath(); context.setFontSize(config.fontSize); context.setFillStyle(toolTipOption.labelFontColor || config.fontColor); context.fillText(labelText, textX + 2 * config.toolTipPadding, textY + config.toolTipPadding + config.fontSize); context.closePath(); context.stroke(); } } function drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints) { var toolTipOption = opts.extra.tooltip || {}; toolTipOption.gridType = toolTipOption.gridType == undefined ? 'solid' : toolTipOption.gridType; toolTipOption.dashLength = toolTipOption.dashLength == undefined ? 4 : toolTipOption.dashLength; var startX = config.padding + config.yAxisWidth + config.yAxisTitleWidth; var endX = opts.width - config.padding; if (toolTipOption.gridType == 'dash') { context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]); } context.beginPath(); context.setStrokeStyle(toolTipOption.gridColor || '#cccccc'); context.setLineWidth(1 * opts.pixelRatio); context.moveTo(startX, opts.tooltip.offset.y); context.lineTo(endX, opts.tooltip.offset.y); context.closePath(); context.stroke(); context.setLineDash([]); if (toolTipOption.yAxisLabel) { let labelText = calTooltipYAxisData(opts.tooltip.offset.y, opts.series, opts, config, eachSpacing); context.setFontSize(config.fontSize); let textWidth = context.measureText(labelText).width; let textX = startX - 2 * config.toolTipPadding - textWidth; let textY = opts.tooltip.offset.y; context.beginPath(); context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity)); context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground); context.setLineWidth(1 * opts.pixelRatio); context.rect(textX, textY - 0.5 * config.fontSize - config.toolTipPadding, textWidth + 2 * config.toolTipPadding, config.fontSize + 2 * config.toolTipPadding); context.closePath(); context.stroke(); context.fill(); context.beginPath(); context.setFontSize(config.fontSize); context.setFillStyle(toolTipOption.labelFontColor || config.fontColor); context.fillText(labelText, textX + config.toolTipPadding, textY + 0.5 * config.fontSize); context.closePath(); context.stroke(); } } function drawToolTipSplitArea(offsetX, opts, config, context, eachSpacing) { var toolTipOption = opts.extra.tooltip || { activeBgColor: '#000000', activeBgOpacity: 0.08 }; toolTipOption.activeBgColor = toolTipOption.activeBgColor ? toolTipOption.activeBgColor : '#000000'; toolTipOption.activeBgOpacity = toolTipOption.activeBgOpacity ? toolTipOption.activeBgOpacity : 0.08; var startY = config.padding; var endY = opts.height - config.padding - config.xAxisHeight - config.legendHeight; context.beginPath(); context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity)); context.rect(offsetX - eachSpacing / 2, startY, eachSpacing, endY - startY); context.closePath(); context.fill(); } function drawToolTip(textList, offset, opts, config, context, eachSpacing, xAxisPoints) { var toolTipOption = opts.extra.tooltip || { bgColor: '#000000', bgOpacity: 0.7, fontColor: '#FFFFFF' }; toolTipOption.bgColor = toolTipOption.bgColor ? toolTipOption.bgColor : '#000000'; toolTipOption.bgOpacity = toolTipOption.bgOpacity ? toolTipOption.bgOpacity : 0.7; toolTipOption.fontColor = toolTipOption.fontColor ? toolTipOption.fontColor : '#FFFFFF'; var legendWidth = 4 * opts.pixelRatio; var legendMarginRight = 5 * opts.pixelRatio; var arrowWidth = 8 * opts.pixelRatio; var isOverRightBorder = false; if (opts.type == 'line' || opts.type == 'area' || opts.type == 'candle' || opts.type == 'mix') { drawToolTipSplitLine(opts.tooltip.offset.x, opts, config, context); } offset = assign({ x: 0, y: 0 }, offset); offset.y -= 8 * opts.pixelRatio; var textWidth = textList.map(function(item) { return measureText(item.text); }); var toolTipWidth = legendWidth + legendMarginRight + 4 * config.toolTipPadding + Math.max.apply(null, textWidth); var toolTipHeight = 2 * config.toolTipPadding + textList.length * config.toolTipLineHeight; // if beyond the right border if (offset.x - Math.abs(opts._scrollDistance_) + arrowWidth + toolTipWidth > opts.width) { isOverRightBorder = true; } // draw background rect context.beginPath(); context.setFillStyle(hexToRgb(toolTipOption.bgColor || config.toolTipBackground, toolTipOption.bgOpacity || config.toolTipOpacity)); if (isOverRightBorder) { context.moveTo(offset.x, offset.y + 10 * opts.pixelRatio); context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pixelRatio - 5 * opts.pixelRatio); context.lineTo(offset.x - arrowWidth, offset.y); context.lineTo(offset.x - arrowWidth - Math.round(toolTipWidth), offset.y); context.lineTo(offset.x - arrowWidth - Math.round(toolTipWidth), offset.y + toolTipHeight); context.lineTo(offset.x - arrowWidth, offset.y + toolTipHeight); context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pixelRatio + 5 * opts.pixelRatio); context.lineTo(offset.x, offset.y + 10 * opts.pixelRatio); } else { context.moveTo(offset.x, offset.y + 10 * opts.pixelRatio); context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pixelRatio - 5 * opts.pixelRatio); context.lineTo(offset.x + arrowWidth, offset.y); context.lineTo(offset.x + arrowWidth + Math.round(toolTipWidth), offset.y); context.lineTo(offset.x + arrowWidth + Math.round(toolTipWidth), offset.y + toolTipHeight); context.lineTo(offset.x + arrowWidth, offset.y + toolTipHeight); context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pixelRatio + 5 * opts.pixelRatio); context.lineTo(offset.x, offset.y + 10 * opts.pixelRatio); } context.closePath(); context.fill(); // draw legend textList.forEach(function(item, index) { if (item.color !== null) { context.beginPath(); context.setFillStyle(item.color); var startX = offset.x + arrowWidth + 2 * config.toolTipPadding; var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + config.toolTipPadding + 1; if (isOverRightBorder) { startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding; } context.fillRect(startX, startY, legendWidth, config.fontSize); context.closePath(); } }); // draw text list textList.forEach(function(item, index) { var startX = offset.x + arrowWidth + 2 * config.toolTipPadding + legendWidth + legendMarginRight; if (isOverRightBorder) { startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding + +legendWidth + legendMarginRight; } var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + config.toolTipPadding; context.beginPath(); context.setFontSize(config.fontSize); context.setFillStyle(toolTipOption.fontColor); context.fillText(item.text, startX, startY + config.fontSize); context.closePath(); context.stroke(); }); } function drawYAxisTitle(title, opts, config, context) { var startX = config.xAxisHeight + (opts.height - config.xAxisHeight - measureText(title)) / 2; context.save(); context.beginPath(); context.setFontSize(config.fontSize); context.setFillStyle(opts.yAxis.titleFontColor || '#333333'); context.translate(0, opts.height); context.rotate(-90 * Math.PI / 180); context.fillText(title, startX, config.padding + 0.5 * config.fontSize); context.closePath(); context.stroke(); context.restore(); } function drawColumnDataPoints(series, opts, config, context) { var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; var columnOption = opts.extra.column || { type: {}, meter: {} }; columnOption.type = columnOption.type == undefined ? 'group' : columnOption.type; columnOption.meter = columnOption.meter || {} columnOption.meter.border = columnOption.meter.border == undefined ? 4 : columnOption.meter.border; columnOption.meter.fillColor = columnOption.meter.fillColor == undefined ? '#FFFFFF' : columnOption.meter.fillColor; var _calYAxisData = calYAxisData(series, opts, config), ranges = _calYAxisData.ranges; var _getXAxisPoints = getXAxisPoints(opts.categories, opts, config), xAxisPoints = _getXAxisPoints.xAxisPoints, eachSpacing = _getXAxisPoints.eachSpacing; var minRange = ranges.pop(); var maxRange = ranges.shift(); var calPoints = []; context.save(); if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) { context.translate(opts._scrollDistance_, 0); } if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) { drawToolTipSplitArea(opts.tooltip.offset.x, opts, config, context, eachSpacing); } series.forEach(function(eachSeries, seriesIndex) { var data = eachSeries.data; switch (columnOption.type) { case 'group': var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); var tooltipPoints = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process); calPoints.push(tooltipPoints); points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts); points.forEach(function(item, index) { if (item !== null) { context.beginPath(); context.setFillStyle(item.color || eachSeries.color); var startX = item.x - item.width / 2 + 1; var height = opts.height - item.y - config.padding - config.xAxisHeight - config.legendHeight; context.moveTo(startX, item.y); context.fillRect(startX, item.y, item.width - 2, height); context.closePath(); context.fill(); } }); break; case 'stack': // 绘制堆叠数据图 var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process); calPoints.push(points); points = fixColumeStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series); points.forEach(function(item, index) { if (item !== null) { context.beginPath(); context.setFillStyle(item.color || eachSeries.color); var startX = item.x - item.width / 2 + 1; var height = opts.height - item.y - config.padding - config.xAxisHeight - config.legendHeight; var height0 = opts.height - item.y0 - config.padding - config.xAxisHeight - config.legendHeight; if (seriesIndex > 0) { height -= height0; } context.moveTo(startX, item.y); context.fillRect(startX, item.y, item.width - 2, height); context.closePath(); context.fill(); } }); break; case 'meter': // 绘制温度计数据图 var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); calPoints.push(points); points = fixColumeMeterData(points, eachSpacing, series.length, seriesIndex, config, opts, columnOption.meter.border); if (seriesIndex == 0) { points.forEach(function(item, index) { if (item !== null) { //画背景颜色 context.beginPath(); context.setFillStyle(columnOption.meter.fillColor); var startX = item.x - item.width / 2 ; var height = opts.height - item.y - config.padding - config.xAxisHeight - config.legendHeight; context.moveTo(startX, item.y); context.fillRect(startX, item.y, item.width, height); context.closePath(); context.fill(); //画边框线 if(columnOption.meter.border>0){ context.beginPath(); context.setStrokeStyle(eachSeries.color); context.setLineWidth(columnOption.meter.border * opts.pixelRatio); context.moveTo(startX + columnOption.meter.border*0.5, item.y + height); context.lineTo(startX + columnOption.meter.border*0.5, item.y + columnOption.meter.border*0.5); context.lineTo(startX + item.width - columnOption.meter.border*0.5, item.y + columnOption.meter.border*0.5); context.lineTo(startX + item.width - columnOption.meter.border*0.5, item.y + height); context.stroke(); } } }); } else { points.forEach(function(item, index) { if (item !== null) { context.beginPath(); context.setFillStyle(item.color || eachSeries.color); var startX = item.x - item.width / 2; var height = opts.height - item.y - config.padding - config.xAxisHeight - config.legendHeight; context.moveTo(startX, item.y); context.fillRect(startX, item.y, item.width, height); context.closePath(); context.fill(); } }); } break; } }); if (opts.dataLabel !== false && process === 1) { series.forEach(function(eachSeries, seriesIndex) { var data = eachSeries.data; switch (columnOption.type) { case 'group': var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts); drawPointText(points, eachSeries, config, context); break; case 'stack': var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process); drawPointText(points, eachSeries, config, context); break; case 'meter': var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); drawPointText(points, eachSeries, config, context); break; } }); } context.restore(); return { xAxisPoints: xAxisPoints, calPoints: calPoints, eachSpacing: eachSpacing }; } function drawCandleDataPoints(series, seriesMA, opts, config, context) { var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1; var candleOption = opts.extra.candle || { color: {}, average: {} }; candleOption.color.upLine = candleOption.color.upLine ? candleOption.color.upLine : '#f04864'; candleOption.color.upFill = candleOption.color.upFill ? candleOption.color.upFill : '#f04864'; candleOption.color.downLine = candleOption.color.downLine ? candleOption.color.downLine : '#2fc25b'; candleOption.color.downFill = candleOption.color.downFill ? candleOption.color.downFill : '#2fc25b'; candleOption.average.show = candleOption.average.show === true ? true : false; candleOption.average.name = candleOption.average.name ? candleOption.average.name : []; candleOption.average.day = candleOption.average.day ? candleOption.average.day : []; candleOption.average.color = candleOption.average.color ? candleOption.average.color : ['#1890ff', '#2fc25b', '#facc14', '#f04864', '#8543e0', '#90ed7d' ]; opts.extra.candle = candleOption; var _calYAxisData5 = calYAxisData(series, opts, config), ranges = _calYAxisData5.ranges; var _getXAxisPoints5 = getXAxisPoints(opts.categories, opts, config), xAxisPoints = _getXAxisPoints5.xAxisPoints, eachSpacing = _getXAxisPoints5.eachSpacing; var minRange = ranges.pop(); var maxRange = ranges.shift(); var calPoints = []; context.save(); if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) { context.translate(opts._scrollDistance_, 0); } //画均线 if (candleOption.average.show) { seriesMA.forEach(function(eachSeries, seriesIndex) { var data = eachSeries.data; var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); //calPoints.push(points); var splitPointList = splitPoints(points); splitPointList.forEach(function(points, index) { context.beginPath(); context.setStrokeStyle(eachSeries.color); context.setLineWidth(1); if (points.length === 1) { context.moveTo(points[0].x, points[0].y); context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI); } else { context.moveTo(points[0].x, points[0].y); points.forEach(function(item, index) { if (index > 0) { var ctrlPoint = createCurveControlPoints(points, index - 1); context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item .y); } }); context.moveTo(points[0].x, points[0].y); } context.closePath(); context.stroke(); }); }); } //画K线 series.forEach(function(eachSeries, seriesIndex) { var data = eachSeries.data; var points = getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); calPoints.push(points); var splitPointList = splitPoints(points); splitPointList = splitPointList[0]; splitPointList.forEach(function(points, index) { context.beginPath(); //如果上涨 if (data[index][1] - data[index][0] > 0) { context.setStrokeStyle(candleOption.color.upLine); context.setFillStyle(candleOption.color.upFill); context.setLineWidth(1 * opts.pixelRatio); context.moveTo(points[3].x, points[3].y); //顶点 context.lineTo(points[1].x, points[1].y); //收盘中间点 context.lineTo(points[1].x - eachSpacing / 4, points[1].y); //收盘左侧点 context.lineTo(points[0].x - eachSpacing / 4, points[0].y); //开盘左侧点 context.lineTo(points[0].x, points[0].y); //开盘中间点 context.lineTo(points[2].x, points[2].y); //底点 context.lineTo(points[0].x, points[0].y); //开盘中间点 context.lineTo(points[0].x + eachSpacing / 4, points[0].y); //开盘右侧点 context.lineTo(points[1].x + eachSpacing / 4, points[1].y); //收盘右侧点 context.lineTo(points[1].x, points[1].y); //收盘中间点 context.moveTo(points[3].x, points[3].y); //顶点 } else { context.setStrokeStyle(candleOption.color.downLine); context.setFillStyle(candleOption.color.downFill); context.setLineWidth(1 * opts.pixelRatio); context.moveTo(points[3].x, points[3].y); //顶点 context.lineTo(points[0].x, points[0].y); //开盘中间点 context.lineTo(points[0].x - eachSpacing / 4, points[0].y); //开盘左侧点 context.lineTo(points[1].x - eachSpacing / 4, points[1].y); //收盘左侧点 context.lineTo(points[1].x, points[1].y); //收盘中间点 context.lineTo(points[2].x, points[2].y); //底点 context.lineTo(points[1].x, points[1].y); //收盘中间点 context.lineTo(points[1].x + eachSpacing / 4, points[1].y); //收盘右侧点 context.lineTo(points[0].x + eachSpacing / 4, points[0].y); //开盘右侧点 context.lineTo(points[0].x, points[0].y); //开盘中间点 context.moveTo(points[3].x, points[3].y); //顶点 } context.closePath(); context.fill(); context.stroke(); }); }); context.restore(); return { xAxisPoints: xAxisPoints, calPoints: calPoints, eachSpacing: eachSpacing }; } function drawAreaDataPoints(series, opts, config, context) { var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; var areaOption = opts.extra.area || { type: 'straight', opacity: 0.5, addLine: false, width: 2 }; areaOption.type = areaOption.type ? areaOption.type : 'straight'; areaOption.opacity = areaOption.opacity ? areaOption.opacity : 0.2; areaOption.addLine = areaOption.addLine == true ? true : false; areaOption.width = areaOption.width ? areaOption.width : 2; var _calYAxisData2 = calYAxisData(series, opts, config), ranges = _calYAxisData2.ranges; var _getXAxisPoints2 = getXAxisPoints(opts.categories, opts, config), xAxisPoints = _getXAxisPoints2.xAxisPoints, eachSpacing = _getXAxisPoints2.eachSpacing; var minRange = ranges.pop(); var maxRange = ranges.shift(); var endY = opts.height - config.padding - config.xAxisHeight - config.legendHeight; var calPoints = []; context.save(); if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) { context.translate(opts._scrollDistance_, 0); } if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) { drawToolTipSplitLine(opts.tooltip.offset.x, opts, config, context); } series.forEach(function(eachSeries, seriesIndex) { let data = eachSeries.data; let points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); calPoints.push(points); let splitPointList = splitPoints(points); for (let i = 0; i < splitPointList.length; i++) { let points = splitPointList[i]; // 绘制区域数 context.beginPath(); context.setStrokeStyle(hexToRgb(eachSeries.color, areaOption.opacity)); context.setFillStyle(hexToRgb(eachSeries.color, areaOption.opacity)); context.setLineWidth(areaOption.width * opts.pixelRatio); if (points.length > 1) { let firstPoint = points[0]; let lastPoint = points[points.length - 1]; context.moveTo(firstPoint.x, firstPoint.y); if (areaOption.type === 'curve') { points.forEach(function(item, index) { if (index > 0) { let ctrlPoint = createCurveControlPoints(points, index - 1); context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item .y); } }); } else { points.forEach(function(item, index) { if (index > 0) { context.lineTo(item.x, item.y); } }); } context.lineTo(lastPoint.x, endY); context.lineTo(firstPoint.x, endY); context.lineTo(firstPoint.x, firstPoint.y); } else { let item = points[0]; context.moveTo(item.x - eachSpacing / 2, item.y); context.lineTo(item.x + eachSpacing / 2, item.y); context.lineTo(item.x + eachSpacing / 2, endY); context.lineTo(item.x - eachSpacing / 2, endY); context.moveTo(item.x - eachSpacing / 2, item.y); } context.closePath(); context.fill(); //画连线 if (areaOption.addLine) { context.beginPath(); context.setStrokeStyle(eachSeries.color); context.setLineWidth(areaOption.width * opts.pixelRatio); if (points.length === 1) { context.moveTo(points[0].x, points[0].y); context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI); } else { context.moveTo(points[0].x, points[0].y); if (areaOption.type === 'curve') { points.forEach(function(item, index) { if (index > 0) { let ctrlPoint = createCurveControlPoints(points, index - 1); context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y); } }); } else { points.forEach(function(item, index) { if (index > 0) { context.lineTo(item.x, item.y); } }); } context.moveTo(points[0].x, points[0].y); } context.closePath(); context.stroke(); } } //画点 if (opts.dataPointShape !== false) { var shape = config.dataPointShape[seriesIndex % config.dataPointShape.length]; drawPointShape(points, eachSeries.color, shape, context, opts); } }); if (opts.dataLabel !== false && process === 1) { series.forEach(function(eachSeries, seriesIndex) { var data = eachSeries.data; var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); drawPointText(points, eachSeries, config, context); }); } context.restore(); return { xAxisPoints: xAxisPoints, calPoints: calPoints, eachSpacing: eachSpacing }; } function drawLineDataPoints(series, opts, config, context) { var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; var lineOption = opts.extra.line || { type: 'straight', width: 2 }; lineOption.type = lineOption.type ? lineOption.type : 'straight'; lineOption.width = lineOption.width ? lineOption.width : 2; var _calYAxisData3 = calYAxisData(series, opts, config), ranges = _calYAxisData3.ranges; var _getXAxisPoints3 = getXAxisPoints(opts.categories, opts, config), xAxisPoints = _getXAxisPoints3.xAxisPoints, eachSpacing = _getXAxisPoints3.eachSpacing; var minRange = ranges.pop(); var maxRange = ranges.shift(); var calPoints = []; context.save(); if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) { context.translate(opts._scrollDistance_, 0); } if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) { drawToolTipSplitLine(opts.tooltip.offset.x, opts, config, context); } series.forEach(function(eachSeries, seriesIndex) { var data = eachSeries.data; var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); calPoints.push(points); var splitPointList = splitPoints(points); splitPointList.forEach(function(points, index) { context.beginPath(); context.setStrokeStyle(eachSeries.color); context.setLineWidth(lineOption.width * opts.pixelRatio); if (points.length === 1) { context.moveTo(points[0].x, points[0].y); context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI); } else { context.moveTo(points[0].x, points[0].y); if (lineOption.type === 'curve') { points.forEach(function(item, index) { if (index > 0) { var ctrlPoint = createCurveControlPoints(points, index - 1); context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item .y); } }); } else { points.forEach(function(item, index) { if (index > 0) { context.lineTo(item.x, item.y); } }); } context.moveTo(points[0].x, points[0].y); } context.closePath(); context.stroke(); }); if (opts.dataPointShape !== false) { var shape = config.dataPointShape[seriesIndex % config.dataPointShape.length]; drawPointShape(points, eachSeries.color, shape, context, opts); } }); if (opts.dataLabel !== false && process === 1) { series.forEach(function(eachSeries, seriesIndex) { var data = eachSeries.data; var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); drawPointText(points, eachSeries, config, context); }); } context.restore(); return { xAxisPoints: xAxisPoints, calPoints: calPoints, eachSpacing: eachSpacing }; } function drawMixDataPoints(series, opts, config, context) { var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; var _calYAxisData6 = calYAxisData(series, opts, config), ranges = _calYAxisData6.ranges; var _getXAxisPoints6 = getXAxisPoints(opts.categories, opts, config), xAxisPoints = _getXAxisPoints6.xAxisPoints, eachSpacing = _getXAxisPoints6.eachSpacing; var minRange = ranges.pop(); var maxRange = ranges.shift(); var endY = opts.height - config.padding - config.xAxisHeight - config.legendHeight; var calPoints = []; var columnIndex = 0; var columnLength = 0; series.forEach(function(eachSeries, seriesIndex) { if (eachSeries.type == 'column') { columnLength += 1; } }); context.save(); if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) { context.translate(opts._scrollDistance_, 0); } if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) { drawToolTipSplitLine(opts.tooltip.offset.x, opts, config, context); } series.forEach(function(eachSeries, seriesIndex) { var data = eachSeries.data; var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); calPoints.push(points); // 绘制柱状数据图 if (eachSeries.type == 'column') { points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts); points.forEach(function(item, index) { if (item !== null) { context.beginPath(); context.setFillStyle(item.color || eachSeries.color); var startX = item.x - item.width / 2 + 1; var height = opts.height - item.y - config.padding - config.xAxisHeight - config.legendHeight; context.moveTo(startX, item.y); context.rect(startX, item.y, item.width - 2, height); context.closePath(); context.fill(); } }); columnIndex += 1; } //绘制区域图数据 if (eachSeries.type == 'area') { let splitPointList = splitPoints(points); for (let i = 0; i < splitPointList.length; i++) { let points = splitPointList[i]; // 绘制区域数据 context.beginPath(); context.setStrokeStyle(eachSeries.color); context.setFillStyle(eachSeries.color); context.setGlobalAlpha(0.2); context.setLineWidth(2 * opts.pixelRatio); if (points.length > 1) { var firstPoint = points[0]; let lastPoint = points[points.length - 1]; context.moveTo(firstPoint.x, firstPoint.y); if (eachSeries.style === 'curve') { points.forEach(function(item, index) { if (index > 0) { var ctrlPoint = createCurveControlPoints(points, index - 1); context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y); } }); } else { points.forEach(function(item, index) { if (index > 0) { context.lineTo(item.x, item.y); } }); } context.lineTo(lastPoint.x, endY); context.lineTo(firstPoint.x, endY); context.lineTo(firstPoint.x, firstPoint.y); } else { let item = points[0]; context.moveTo(item.x - eachSpacing / 2, item.y); context.lineTo(item.x + eachSpacing / 2, item.y); context.lineTo(item.x + eachSpacing / 2, endY); context.lineTo(item.x - eachSpacing / 2, endY); context.moveTo(item.x - eachSpacing / 2, item.y); } context.closePath(); context.fill(); context.setGlobalAlpha(1); } } // 绘制折线数据图 if (eachSeries.type == 'line') { var splitPointList = splitPoints(points); splitPointList.forEach(function(points, index) { context.beginPath(); context.setStrokeStyle(eachSeries.color); context.setLineWidth(2 * opts.pixelRatio); if (points.length === 1) { context.moveTo(points[0].x, points[0].y); context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI); } else { context.moveTo(points[0].x, points[0].y); if (eachSeries.style == 'curve') { points.forEach(function(item, index) { if (index > 0) { var ctrlPoint = createCurveControlPoints(points, index - 1); context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y); } }); } else { points.forEach(function(item, index) { if (index > 0) { context.lineTo(item.x, item.y); } }); } context.moveTo(points[0].x, points[0].y); } context.closePath(); context.stroke(); }); } // 绘制点数据图 if (eachSeries.type == 'point') { points.forEach(function(pointsa, index) { if(pointsa){ context.beginPath(); context.setFillStyle(eachSeries.color); context.setStrokeStyle('#FFFFFF'); context.setLineWidth(1 * opts.pixelRatio); context.moveTo(pointsa.x + 3.5 * opts.pixelRatio, pointsa.y); context.arc(pointsa.x, pointsa.y, 4* opts.pixelRatio, 0, 2 * Math.PI); context.closePath(); context.fill(); context.stroke(); } }); } if (eachSeries.addPoint == true && eachSeries.type !== 'column') { var shape = config.dataPointShape[seriesIndex % config.dataPointShape.length]; drawPointShape(points, eachSeries.color, shape, context, opts); } }); if (opts.dataLabel !== false && process === 1) { var columnIndex = 0; series.forEach(function(eachSeries, seriesIndex) { var data = eachSeries.data; var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); if (eachSeries.type !== 'column') { drawPointText(points, eachSeries, config, context); } else { points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts); drawPointText(points, eachSeries, config, context); columnIndex += 1; } }); } context.restore(); return { xAxisPoints: xAxisPoints, calPoints: calPoints, eachSpacing: eachSpacing }; } function drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints) { var toolTipOption = opts.extra.tooltip || {}; if (toolTipOption.horizentalLine && opts.tooltip && process === 1 && (opts.type == 'line' || opts.type == 'area' || opts.type == 'column' || opts.type == 'candle' || opts.type == 'mix')) { drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints) } context.save(); if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) { context.translate(opts._scrollDistance_, 0); } if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) { drawToolTip(opts.tooltip.textList, opts.tooltip.offset, opts, config, context, eachSpacing, xAxisPoints); } context.restore(); } function drawXAxis(categories, opts, config, context) { var _getXAxisPoints4 = getXAxisPoints(categories, opts, config), xAxisPoints = _getXAxisPoints4.xAxisPoints, startX = _getXAxisPoints4.startX, endX = _getXAxisPoints4.endX, eachSpacing = _getXAxisPoints4.eachSpacing; var startY = opts.height - config.padding - config.xAxisHeight - config.legendHeight; var endY = config.padding; //绘制滚动条 if (opts.enableScroll && opts.xAxis.scrollShow) { var scrollY = opts.height - config.padding - config.legendHeight + 6 * opts.pixelRatio; var scrollScreenWidth = endX - startX; var scrollTotalWidth = eachSpacing * (xAxisPoints.length - 1); var scrollWidth = scrollScreenWidth * scrollScreenWidth / scrollTotalWidth; var scrollLeft = 0; if (opts._scrollDistance_) { scrollLeft = -opts._scrollDistance_ * (scrollScreenWidth) / scrollTotalWidth; } context.beginPath(); context.setLineCap('round'); context.setLineWidth(6 * opts.pixelRatio); context.setStrokeStyle(opts.xAxis.scrollBackgroundColor || "#EFEBEF"); context.moveTo(startX, scrollY); context.lineTo(endX, scrollY); context.stroke(); context.closePath(); context.beginPath(); context.setLineCap('round'); context.setLineWidth(6 * opts.pixelRatio); context.setStrokeStyle(opts.xAxis.scrollColor || "#A6A6A6"); context.moveTo(startX + scrollLeft, scrollY); context.lineTo(startX + scrollLeft + scrollWidth, scrollY); context.stroke(); context.setLineCap('butt'); context.closePath(); } context.save(); if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) { context.translate(opts._scrollDistance_, 0); } context.beginPath(); context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc"); context.setLineCap('butt'); context.setLineWidth(1 * opts.pixelRatio); if (opts.xAxis.gridType == 'dash') { context.setLineDash([opts.xAxis.dashLength, opts.xAxis.dashLength]); } if (opts.xAxis.disableGrid !== true) { if (opts.xAxis.type === 'calibration') { xAxisPoints.forEach(function(item, index) { if (index > 0) { context.moveTo(item - eachSpacing / 2, startY); context.lineTo(item - eachSpacing / 2, startY + 4 * opts.pixelRatio); } }); } else { opts.xAxis.gridEval = opts.xAxis.gridEval || 1; xAxisPoints.forEach(function(item, index) { if(index % opts.xAxis.gridEval == 0){ context.moveTo(item, startY); context.lineTo(item, endY); } }); } } context.closePath(); context.stroke(); context.setLineDash([]); //不绘制X轴 if (opts.xAxis.disabled !== true) { // 对X轴列表做抽稀处理 let validWidth = opts.width - 2 * config.padding - config.yAxisWidth - config.yAxisTitleWidth; //默认全部显示X轴标签 let maxXAxisListLength = categories.length; //如果设置了X轴单屏数量 if (opts.xAxis.labelCount) { //如果设置X轴密度 if (opts.xAxis.itemCount) { maxXAxisListLength = Math.ceil(categories.length / opts.xAxis.itemCount * opts.xAxis.labelCount); } else { maxXAxisListLength = opts.xAxis.labelCount; } maxXAxisListLength -= 1; } let ratio = Math.ceil(categories.length / maxXAxisListLength); let newCategories = []; let cgLength = categories.length; for (let i = 0; i < cgLength; i++) { if (i % ratio !== 0) { newCategories.push(""); } else { newCategories.push(categories[i]); } } newCategories[cgLength - 1] = categories[cgLength - 1]; /* categories = categories.map(function (item, index) { return index % ratio !== 0 ? '' : item; });*/ var xAxisFontSize = opts.xAxis.fontSize || config.fontSize; if (config._xAxisTextAngle_ === 0) { newCategories.forEach(function(item, index) { var offset = eachSpacing / 2 - measureText(item,xAxisFontSize) / 2; context.beginPath(); context.setFontSize(xAxisFontSize); context.setFillStyle(opts.xAxis.fontColor || '#666666'); context.fillText(item, xAxisPoints[index] + offset, startY + xAxisFontSize + 5); context.closePath(); context.stroke(); }); } else { newCategories.forEach(function(item, index) { context.save(); context.beginPath(); context.setFontSize(xAxisFontSize); context.setFillStyle(opts.xAxis.fontColor || '#666666'); var textWidth = measureText(item); var offset = eachSpacing / 2 - textWidth; var _calRotateTranslate = calRotateTranslate(xAxisPoints[index] + eachSpacing / 2, startY + xAxisFontSize / 2 + 5, opts.height), transX = _calRotateTranslate.transX, transY = _calRotateTranslate.transY; context.rotate(-1 * config._xAxisTextAngle_); context.translate(transX, transY); context.fillText(item, xAxisPoints[index] + offset, startY + xAxisFontSize + 5); context.closePath(); context.stroke(); context.restore(); }); } } context.restore(); } function drawYAxisGrid(categories, opts, config, context) { if (opts.yAxis.disableGrid === true) { return; } var spacingValid = opts.height - 2 * config.padding - config.xAxisHeight - config.legendHeight; var eachSpacing = Math.floor(spacingValid / config.yAxisSplit); var yAxisTotalWidth = config.yAxisWidth + config.yAxisTitleWidth; var startX = config.padding + yAxisTotalWidth; var _getXAxisPoints4 = getXAxisPoints(categories, opts, config), xAxisPoints = _getXAxisPoints4.xAxisPoints, xAxiseachSpacing = _getXAxisPoints4.eachSpacing; var TotalWidth = xAxiseachSpacing * (xAxisPoints.length - 1); var endX = startX + TotalWidth; var points = []; for (var i = 0; i < config.yAxisSplit; i++) { points.push(config.padding + eachSpacing * i); } points.push(config.padding + eachSpacing * config.yAxisSplit + 2); context.save(); if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) { context.translate(opts._scrollDistance_, 0); } if (opts.yAxis.gridType == 'dash') { context.setLineDash([opts.yAxis.dashLength, opts.yAxis.dashLength]); } context.beginPath(); context.setStrokeStyle(opts.yAxis.gridColor || "#cccccc"); context.setLineWidth(1 * opts.pixelRatio); points.forEach(function(item, index) { context.moveTo(startX, item); context.lineTo(endX, item); }); context.closePath(); context.stroke(); context.setLineDash([]); context.restore(); } function drawYAxis(series, opts, config, context) { if (opts.yAxis.disabled === true) { return; } var _calYAxisData4 = calYAxisData(series, opts, config), rangesFormat = _calYAxisData4.rangesFormat; var yAxisTotalWidth = config.yAxisWidth + config.yAxisTitleWidth; var spacingValid = opts.height - 2 * config.padding - config.xAxisHeight - config.legendHeight; var eachSpacing = Math.floor(spacingValid / config.yAxisSplit); var startX = config.padding + yAxisTotalWidth; var endX = opts.width - config.padding; var endY = opts.height - config.padding - config.xAxisHeight - config.legendHeight + config.xAxisTextPadding; // set YAxis background context.beginPath(); context.setFillStyle(opts.background || '#ffffff'); if (opts._scrollDistance_ < 0) { context.fillRect(0, 0, startX, endY + config.xAxisHeight); } context.fillRect(endX, 0, opts.width, endY + config.xAxisHeight); context.closePath(); context.stroke(); var points = []; for (var i = 0; i <= config.yAxisSplit; i++) { points.push(config.padding + eachSpacing * i); } var yAxisFontSize = opts.yAxis.fontSize || config.fontSize; rangesFormat.forEach(function(item, index) { var pos = points[index] ? points[index] : endY; context.beginPath(); context.setFontSize(yAxisFontSize); context.setFillStyle(opts.yAxis.fontColor || '#666666'); context.fillText(item, config.padding + config.yAxisTitleWidth, pos + yAxisFontSize / 2); context.closePath(); context.stroke(); }); if (opts.yAxis.title) { drawYAxisTitle(opts.yAxis.title, opts, config, context); } } function drawLegend(series, opts, config, context) { if (opts.legend === false) { return; } // each legend shape width 15px // the spacing between shape and text in each legend is the `padding` // each legend spacing is the `padding` // legend margin top `config.padding` var _calLegendData = calLegendData(series, opts, config), legendList = _calLegendData.legendList; var padding = 5 * opts.pixelRatio; var marginTop = 10 * opts.pixelRatio; var shapeWidth = 15 * opts.pixelRatio; legendList.forEach(function(itemList, listIndex) { var width = 0; for (let i = 0; i < itemList.length; i++) { let item = itemList[i]; item.name = item.name || 'undefined'; width += 3 * padding + measureText(item.name) + shapeWidth; } var startX = (opts.width - width) / 2 + padding; var startY = opts.height - config.padding - config.legendHeight + listIndex * (config.fontSize + marginTop) + padding + marginTop; context.setFontSize(config.fontSize); for (let i = 0; i < itemList.length; i++) { let item = itemList[i]; switch (opts.type) { case 'line': context.beginPath(); context.setLineWidth(1 * opts.pixelRatio); context.setStrokeStyle(item.color); context.setFillStyle(item.color); context.moveTo(startX + 7.5 * opts.pixelRatio, startY + 5 * opts.pixelRatio); context.arc(startX + 7.5 * opts.pixelRatio, startY + 5 * opts.pixelRatio, 6 * opts.pixelRatio, 0, 2 * Math.PI); context.closePath(); context.fill(); context.stroke(); break; case 'pie': context.beginPath(); context.setLineWidth(1 * opts.pixelRatio); context.setStrokeStyle(item.color); context.setFillStyle(item.color); context.moveTo(startX + 7.5 * opts.pixelRatio, startY + 5 * opts.pixelRatio); context.arc(startX + 7.5 * opts.pixelRatio, startY + 5 * opts.pixelRatio, 6 * opts.pixelRatio, 0, 2 * Math.PI); context.closePath(); context.fill(); context.stroke(); break; case 'ring': case 'rose': context.beginPath(); context.setLineWidth(1 * opts.pixelRatio); context.setStrokeStyle(item.color); context.setFillStyle(item.color); context.moveTo(startX + 7.5 * opts.pixelRatio, startY + 5 * opts.pixelRatio); context.arc(startX + 7.5 * opts.pixelRatio, startY + 5 * opts.pixelRatio, 6 * opts.pixelRatio, 0, 2 * Math.PI); context.closePath(); context.fill(); context.stroke(); break; //圆弧进度图不显示图例 case 'gauge': break; case 'arcbar': break; default: context.beginPath(); context.setLineWidth(1 * opts.pixelRatio); context.setStrokeStyle(item.color); context.setFillStyle(item.color); context.moveTo(startX, startY); context.fillRect(startX, startY, 15 * opts.pixelRatio, 10 * opts.pixelRatio); context.closePath(); context.fill(); context.stroke(); } startX += padding + shapeWidth; context.beginPath(); context.setFontSize(config.fontSize); context.setFillStyle(opts.extra.legendTextColor || '#333333'); context.fillText(item.name, startX, startY + 6 * opts.pixelRatio + 3 * opts.pixelRatio); context.closePath(); context.stroke(); startX += measureText(item.name) + 2 * padding; } }); } function drawPieDataPoints(series, opts, config, context) { var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; var pieOption = opts.extra.pie || {}; var centerPosition = { x: opts.width / 2, y: (opts.height - config.legendHeight) / 2 }; var radius = Math.min(centerPosition.x - config.pieChartLinePadding - config.pieChartTextPadding - config._pieTextMaxLength_, centerPosition.y - config.pieChartLinePadding - config.pieChartTextPadding); if (opts.dataLabel) { radius -= 10; } else { radius -= 2 * config.padding; } series = getPieDataPoints(series, radius, process); var activeRadius = config.pieChartLinePadding / 2; series = series.map(function(eachSeries) { eachSeries._start_ += (pieOption.offsetAngle || 0) * Math.PI / 180; return eachSeries; }); series.forEach(function(eachSeries, seriesIndex) { if (opts.tooltip) { if (opts.tooltip.index == seriesIndex) { context.beginPath(); context.setFillStyle(hexToRgb(eachSeries.color, opts.extra.pie.activeOpacity || 0.5)); context.moveTo(centerPosition.x, centerPosition.y); context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_+activeRadius, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI); context.closePath(); context.fill(); } } context.beginPath(); context.setLineWidth(2 * opts.pixelRatio); context.lineJoin = "round"; context.setStrokeStyle('#ffffff'); context.setFillStyle(eachSeries.color); context.moveTo(centerPosition.x, centerPosition.y); context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI); context.closePath(); context.fill(); if (opts.disablePieStroke !== true) { context.stroke(); } }); if (opts.type === 'ring') { var innerPieWidth = radius * 0.6; if (typeof opts.extra.pie.ringWidth === 'number' && opts.extra.pie.ringWidth > 0) { innerPieWidth = Math.max(0, radius - opts.extra.pie.ringWidth); } context.beginPath(); context.setFillStyle(opts.background || '#ffffff'); context.moveTo(centerPosition.x, centerPosition.y); context.arc(centerPosition.x, centerPosition.y, innerPieWidth, 0, 2 * Math.PI); context.closePath(); context.fill(); } if (opts.dataLabel !== false && process === 1) { var valid = false; for (var i = 0, len = series.length; i < len; i++) { if (series[i].data > 0) { valid = true; break; } } if (valid) { drawPieText(series, opts, config, context, radius, centerPosition); } } if (process === 1 && opts.type === 'ring') { drawRingTitle(opts, config, context); } return { center: centerPosition, radius: radius, series: series }; } function drawRoseDataPoints(series, opts, config, context) { var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; var roseOption = opts.extra.rose || {}; roseOption.type = roseOption.type || 'area'; var centerPosition = { x: opts.width / 2, y: (opts.height - config.legendHeight) / 2 }; var radius = Math.min(centerPosition.x - config.pieChartLinePadding - config.pieChartTextPadding - config._pieTextMaxLength_, centerPosition.y - config.pieChartLinePadding - config.pieChartTextPadding); if (opts.dataLabel) { radius -= 10; } else { radius -= 2 * config.padding; } var minRadius = roseOption.minRadius || radius*0.5; series = getRoseDataPoints(series, roseOption.type, minRadius, radius, process); var activeRadius = config.pieChartLinePadding / 2; series = series.map(function(eachSeries) { eachSeries._start_ += (roseOption.offsetAngle || 0) * Math.PI / 180; return eachSeries; }); series.forEach(function(eachSeries, seriesIndex) { if (opts.tooltip) { if (opts.tooltip.index == seriesIndex) { context.beginPath(); context.setFillStyle(hexToRgb(eachSeries.color, roseOption.activeOpacity || 0.5)); context.moveTo(centerPosition.x, centerPosition.y); context.arc(centerPosition.x, centerPosition.y, activeRadius+eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI); context.closePath(); context.fill(); } } context.beginPath(); context.setLineWidth(2 * opts.pixelRatio); context.lineJoin = "round"; context.setStrokeStyle('#ffffff'); context.setFillStyle(eachSeries.color); context.moveTo(centerPosition.x, centerPosition.y); context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_ , eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ *Math.PI); context.closePath(); context.fill(); if (opts.disablePieStroke !== true) { context.stroke(); } }); if (opts.dataLabel !== false && process === 1) { // fix https://github.com/xiaolin3303/wx-charts/issues/132 var valid = false; for (var i = 0, len = series.length; i < len; i++) { if (series[i].data > 0) { valid = true; break; } } if (valid) { drawPieText(series, opts, config, context, radius, centerPosition); } } return { center: centerPosition, radius: radius, series: series }; } function drawArcbarDataPoints(series, opts, config, context) { var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; var arcbarOption = opts.extra.arcbar || {}; arcbarOption.startAngle = arcbarOption.startAngle ? arcbarOption.startAngle : 0.75; arcbarOption.endAngle = arcbarOption.endAngle ? arcbarOption.endAngle : 0.25; arcbarOption.type = arcbarOption.type ? arcbarOption.type : 'default'; series = getArcbarDataPoints(series, arcbarOption, process); var centerPosition = { x: opts.width / 2, y: (opts.height) / 2 }; var radius = Math.min(centerPosition.x, centerPosition.y); if (typeof arcbarOption.width === 'number' && arcbarOption.width > 0) { arcbarOption.width = arcbarOption.width; } else { arcbarOption.width = 12 * opts.pixelRatio; } radius -= config.padding + arcbarOption.width / 2; //背景颜色 context.setLineWidth(arcbarOption.width); // 设置圆环的宽度 context.setStrokeStyle(arcbarOption.backgroundColor || '#E9E9E9'); // 设置圆环的颜色 context.setLineCap('round'); // 设置圆环端点的形状 context.beginPath(); //开始一个新的路径 if (arcbarOption.type == 'default') { context.arc(centerPosition.x, centerPosition.y, radius, arcbarOption.startAngle * Math.PI, arcbarOption.endAngle * Math.PI, false); } else { context.arc(centerPosition.x, centerPosition.y, radius, 0, 2 * Math.PI, false); } context.stroke(); //对当前路径进行描边 for (let i = 0; i < series.length; i++) { let eachSeries = series[i]; context.setLineWidth(arcbarOption.width); context.setStrokeStyle(eachSeries.color); context.setLineCap('round'); context.beginPath(); context.arc(centerPosition.x, centerPosition.y, radius, arcbarOption.startAngle * Math.PI, eachSeries._proportion_ * Math.PI, false); context.stroke(); } drawRingTitle(opts, config, context); return { center: centerPosition, radius: radius, series: series }; } function drawGaugeDataPoints(categories, series, opts, config, context) { var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1; var gaugeOption = opts.extra.gauge || {}; gaugeOption.startAngle = gaugeOption.startAngle ? gaugeOption.startAngle : 0.75; if (gaugeOption.oldAngle == undefined) { gaugeOption.oldAngle = gaugeOption.startAngle; } if (gaugeOption.oldData == undefined) { gaugeOption.oldData = 0; } gaugeOption.endAngle = gaugeOption.endAngle ? gaugeOption.endAngle : 0.25; categories = getGaugeAxisPoints(categories, gaugeOption.startAngle, gaugeOption.endAngle); var centerPosition = { x: opts.width / 2, y: (opts.height) / 2 }; var radius = Math.min(centerPosition.x, centerPosition.y); if (typeof gaugeOption.width === 'number' && gaugeOption.width > 0) { gaugeOption.width = gaugeOption.width; } else { gaugeOption.width = 15 * opts.pixelRatio; } radius -= config.padding + gaugeOption.width / 2; var innerRadius = radius - gaugeOption.width; //画背景 context.setLineWidth(gaugeOption.width); context.setLineCap('butt'); for (let i = 0; i < categories.length; i++) { let eachCategories = categories[i]; context.beginPath(); context.setStrokeStyle(eachCategories.color); context.arc(centerPosition.x, centerPosition.y, radius, eachCategories._startAngle_ * Math.PI, eachCategories._endAngle_ * Math.PI, false); context.stroke(); } context.save(); //画刻度线 let totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1; gaugeOption.splitLine.fixRadius = gaugeOption.splitLine.fixRadius ? gaugeOption.splitLine.fixRadius : 0; gaugeOption.splitLine.splitNumber = gaugeOption.splitLine.splitNumber ? gaugeOption.splitLine.splitNumber : 10; gaugeOption.splitLine.width = gaugeOption.splitLine.width ? gaugeOption.splitLine.width : 15 * opts.pixelRatio; gaugeOption.splitLine.color = gaugeOption.splitLine.color ? gaugeOption.splitLine.color : '#FFFFFF'; gaugeOption.splitLine.childNumber = gaugeOption.splitLine.childNumber ? gaugeOption.splitLine.childNumber : 5; gaugeOption.splitLine.childWidth = gaugeOption.splitLine.childWidth ? gaugeOption.splitLine.childWidth : 5 * opts.pixelRatio; let splitAngle = totalAngle / gaugeOption.splitLine.splitNumber; let childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber; let startX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius; let endX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width; let childendX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.childWidth; context.translate(centerPosition.x, centerPosition.y); context.rotate((gaugeOption.startAngle - 1) * Math.PI); for (let i = 0; i < gaugeOption.splitLine.splitNumber + 1; i++) { context.beginPath(); context.setStrokeStyle(gaugeOption.splitLine.color); context.setLineWidth(2 * opts.pixelRatio); context.moveTo(startX, 0); context.lineTo(endX, 0); context.stroke(); context.rotate(splitAngle * Math.PI); } context.restore(); context.save(); context.translate(centerPosition.x, centerPosition.y); context.rotate((gaugeOption.startAngle - 1) * Math.PI); for (let i = 0; i < gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1; i++) { context.beginPath(); context.setStrokeStyle(gaugeOption.splitLine.color); context.setLineWidth(1 * opts.pixelRatio); context.moveTo(startX, 0); context.lineTo(childendX, 0); context.stroke(); context.rotate(childAngle * Math.PI); } context.restore(); //画指针 gaugeOption.pointer.width = gaugeOption.pointer.width ? gaugeOption.pointer.width : 15 * opts.pixelRatio; if (gaugeOption.pointer.color == undefined || gaugeOption.pointer.color == 'auto') { gaugeOption.pointer.color == 'auto'; } else { gaugeOption.pointer.color == gaugeOption.pointer.color; } series = getGaugeDataPoints(series, categories, gaugeOption, process); for (let i = 0; i < series.length; i++) { let eachSeries = series[i]; context.save(); context.translate(centerPosition.x, centerPosition.y); context.rotate((eachSeries._proportion_ - 1) * Math.PI); context.beginPath(); context.setFillStyle(eachSeries.color); context.moveTo(gaugeOption.pointer.width, 0); context.lineTo(0, -gaugeOption.pointer.width / 2); context.lineTo(-innerRadius, 0); context.lineTo(0, gaugeOption.pointer.width / 2); context.lineTo(gaugeOption.pointer.width, 0); context.closePath(); context.fill(); context.beginPath(); context.setFillStyle('#FFFFFF'); context.arc(0, 0, gaugeOption.pointer.width / 6, 0, 2 * Math.PI, false); context.fill(); context.restore(); } if (opts.dataLabel !== false) { drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context); } drawRingTitle(opts, config, context); if (process === 1 && opts.type === 'gauge') { gaugeOption.oldAngle = series[0]._proportion_; gaugeOption.oldData = series[0].data; } return { center: centerPosition, radius: radius, innerRadius: innerRadius, categories: categories, totalAngle: totalAngle }; } function drawRadarDataPoints(series, opts, config, context) { var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; var radarOption = opts.extra.radar || {}; var coordinateAngle = getRadarCoordinateSeries(opts.categories.length); var centerPosition = { x: opts.width / 2, y: (opts.height - config.legendHeight) / 2 }; var radius = Math.min(centerPosition.x - (getMaxTextListLength(opts.categories) + config.radarLabelTextMargin), centerPosition.y - config.radarLabelTextMargin); radius -= config.padding; // draw grid context.beginPath(); context.setLineWidth(1 * opts.pixelRatio); context.setStrokeStyle(radarOption.gridColor || "#cccccc"); coordinateAngle.forEach(function (angle) { var pos = convertCoordinateOrigin(radius * Math.cos(angle), radius * Math.sin(angle), centerPosition); context.moveTo(centerPosition.x, centerPosition.y); context.lineTo(pos.x, pos.y); }); context.stroke(); context.closePath(); // draw split line grid var _loop = function _loop(i) { var startPos = {}; context.beginPath(); context.setLineWidth(1 * opts.pixelRatio); context.setStrokeStyle(radarOption.gridColor || "#cccccc"); coordinateAngle.forEach(function (angle, index) { var pos = convertCoordinateOrigin(radius / config.radarGridCount * i * Math.cos(angle), radius / config.radarGridCount * i * Math.sin(angle), centerPosition); if (index === 0) { startPos = pos; context.moveTo(pos.x, pos.y); } else { context.lineTo(pos.x, pos.y); } }); context.lineTo(startPos.x, startPos.y); context.stroke(); context.closePath(); }; for (var i = 1; i <= config.radarGridCount; i++) { _loop(i); } var radarDataPoints = getRadarDataPoints(coordinateAngle, centerPosition, radius, series, opts, process); radarDataPoints.forEach(function(eachSeries, seriesIndex) { // 绘制区域数据 context.beginPath(); context.setFillStyle(eachSeries.color); context.setGlobalAlpha(0.3); eachSeries.data.forEach(function(item, index) { if (index === 0) { context.moveTo(item.position.x, item.position.y); } else { context.lineTo(item.position.x, item.position.y); } }); context.closePath(); context.fill(); context.setGlobalAlpha(1); if (opts.dataPointShape !== false) { var shape = config.dataPointShape[seriesIndex % config.dataPointShape.length]; var points = eachSeries.data.map(function(item) { return item.position; }); drawPointShape(points, eachSeries.color, shape, context, opts); } }); // draw label text drawRadarLabel(coordinateAngle, radius, centerPosition, opts, config, context); return { center: centerPosition, radius: radius, angleList: coordinateAngle }; } function drawCanvas(opts, context) { context.draw(); } var Timing = { easeIn: function easeIn(pos) { return Math.pow(pos, 3); }, easeOut: function easeOut(pos) { return Math.pow(pos - 1, 3) + 1; }, easeInOut: function easeInOut(pos) { if ((pos /= 0.5) < 1) { return 0.5 * Math.pow(pos, 3); } else { return 0.5 * (Math.pow(pos - 2, 3) + 2); } }, linear: function linear(pos) { return pos; } }; function Animation(opts) { this.isStop = false; opts.duration = typeof opts.duration === 'undefined' ? 1000 : opts.duration; opts.timing = opts.timing || 'linear'; var delay = 17; var createAnimationFrame = function createAnimationFrame() { if (typeof requestAnimationFrame !== 'undefined') { return requestAnimationFrame; } else if (typeof setTimeout !== 'undefined') { return function(step, delay) { setTimeout(function() { var timeStamp = +new Date(); step(timeStamp); }, delay); }; } else { return function(step) { step(null); }; } }; var animationFrame = createAnimationFrame(); var startTimeStamp = null; var _step = function step(timestamp) { if (timestamp === null || this.isStop === true) { opts.onProcess && opts.onProcess(1); opts.onAnimationFinish && opts.onAnimationFinish(); return; } if (startTimeStamp === null) { startTimeStamp = timestamp; } if (timestamp - startTimeStamp < opts.duration) { var process = (timestamp - startTimeStamp) / opts.duration; var timingFunction = Timing[opts.timing]; process = timingFunction(process); opts.onProcess && opts.onProcess(process); animationFrame(_step, delay); } else { opts.onProcess && opts.onProcess(1); opts.onAnimationFinish && opts.onAnimationFinish(); } }; _step = _step.bind(this); animationFrame(_step, delay); } // stop animation immediately // and tigger onAnimationFinish Animation.prototype.stop = function() { this.isStop = true; }; function drawCharts(type, opts, config, context) { var _this = this; var series = opts.series; var categories = opts.categories; series = fillSeriesColor(series, config); series = fillSeriesType(series, opts); let seriesMA = null; if (type == 'candle') { let average = assign({}, opts.extra.candle.average); if (average.show) { seriesMA = calCandleMA(average.day, average.name, average.color, series[0].data); opts.seriesMA = seriesMA; } } var _calLegendData = calLegendData(series, opts, config), legendHeight = _calLegendData.legendHeight; config.legendHeight = legendHeight; var _calYAxisData = calYAxisData(series, opts, config), yAxisWidth = _calYAxisData.yAxisWidth; config.yAxisWidth = yAxisWidth; if (categories && categories.length) { var _calCategoriesData = calCategoriesData(categories, opts, config), xAxisHeight = _calCategoriesData.xAxisHeight, angle = _calCategoriesData.angle; config.xAxisHeight = xAxisHeight; config._xAxisTextAngle_ = angle; } if (type === 'pie' || type === 'ring' || type === 'rose') { config._pieTextMaxLength_ = opts.dataLabel === false ? 0 : getPieTextMaxLength(series); } var duration = opts.animation ? opts.duration : 0; this.animationInstance && this.animationInstance.stop(); switch (type) { case 'line': this.animationInstance = new Animation({ timing: 'easeIn', duration: duration, onProcess: function onProcess(process) { context.clearRect(0, 0, opts.width, opts.height); if (opts.rotate) { contextRotate(context, opts); } drawYAxisGrid(categories, opts, config, context); drawXAxis(categories, opts, config, context); var _drawLineDataPoints = drawLineDataPoints(series, opts, config, context, process), xAxisPoints = _drawLineDataPoints.xAxisPoints, calPoints = _drawLineDataPoints.calPoints, eachSpacing = _drawLineDataPoints.eachSpacing; _this.chartData.xAxisPoints = xAxisPoints; _this.chartData.calPoints = calPoints; _this.chartData.eachSpacing = eachSpacing; drawLegend(opts.series, opts, config, context); drawYAxis(series, opts, config, context); drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints); drawCanvas(opts, context); }, onAnimationFinish: function onAnimationFinish() { _this.event.trigger('renderComplete'); } }); break; case 'mix': this.animationInstance = new Animation({ timing: 'easeIn', duration: duration, onProcess: function onProcess(process) { context.clearRect(0, 0, opts.width, opts.height); if (opts.rotate) { contextRotate(context, opts); } drawYAxisGrid(categories, opts, config, context); drawXAxis(categories, opts, config, context); var _drawMixDataPoints = drawMixDataPoints(series, opts, config, context, process), xAxisPoints = _drawMixDataPoints.xAxisPoints, calPoints = _drawMixDataPoints.calPoints, eachSpacing = _drawMixDataPoints.eachSpacing; _this.chartData.xAxisPoints = xAxisPoints; _this.chartData.calPoints = calPoints; _this.chartData.eachSpacing = eachSpacing; drawLegend(opts.series, opts, config, context); drawYAxis(series, opts, config, context); drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints); drawCanvas(opts, context); }, onAnimationFinish: function onAnimationFinish() { _this.event.trigger('renderComplete'); } }); break; case 'column': this.animationInstance = new Animation({ timing: 'easeIn', duration: duration, onProcess: function onProcess(process) { context.clearRect(0, 0, opts.width, opts.height); if (opts.rotate) { contextRotate(context, opts); } drawYAxisGrid(categories, opts, config, context); drawXAxis(categories, opts, config, context); var _drawColumnDataPoints = drawColumnDataPoints(series, opts, config, context, process), xAxisPoints = _drawColumnDataPoints.xAxisPoints, calPoints = _drawColumnDataPoints.calPoints, eachSpacing = _drawColumnDataPoints.eachSpacing; _this.chartData.xAxisPoints = xAxisPoints; _this.chartData.calPoints = calPoints; _this.chartData.eachSpacing = eachSpacing; drawLegend(opts.series, opts, config, context); drawYAxis(series, opts, config, context); drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints); drawCanvas(opts, context); }, onAnimationFinish: function onAnimationFinish() { _this.event.trigger('renderComplete'); } }); break; case 'area': this.animationInstance = new Animation({ timing: 'easeIn', duration: duration, onProcess: function onProcess(process) { context.clearRect(0, 0, opts.width, opts.height); if (opts.rotate) { contextRotate(context, opts); } drawYAxisGrid(categories, opts, config, context); drawXAxis(categories, opts, config, context); var _drawAreaDataPoints = drawAreaDataPoints(series, opts, config, context, process), xAxisPoints = _drawAreaDataPoints.xAxisPoints, calPoints = _drawAreaDataPoints.calPoints, eachSpacing = _drawAreaDataPoints.eachSpacing; _this.chartData.xAxisPoints = xAxisPoints; _this.chartData.calPoints = calPoints; _this.chartData.eachSpacing = eachSpacing; drawLegend(opts.series, opts, config, context); drawYAxis(series, opts, config, context); drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints); drawCanvas(opts, context); }, onAnimationFinish: function onAnimationFinish() { _this.event.trigger('renderComplete'); } }); break; case 'ring': case 'pie': this.animationInstance = new Animation({ timing: 'easeInOut', duration: duration, onProcess: function onProcess(process) { context.clearRect(0, 0, opts.width, opts.height); if (opts.rotate) { contextRotate(context, opts); } _this.chartData.pieData = drawPieDataPoints(series, opts, config, context, process); drawLegend(opts.series, opts, config, context); drawToolTipBridge(opts, config, context, process); drawCanvas(opts, context); }, onAnimationFinish: function onAnimationFinish() { _this.event.trigger('renderComplete'); } }); break; case 'rose': this.animationInstance = new Animation({ timing: 'easeInOut', duration: duration, onProcess: function onProcess(process) { context.clearRect(0, 0, opts.width, opts.height); if (opts.rotate) { contextRotate(context, opts); } _this.chartData.pieData = drawRoseDataPoints(series, opts, config, context, process); drawLegend(opts.series, opts, config, context); drawToolTipBridge(opts, config, context, process); drawCanvas(opts, context); }, onAnimationFinish: function onAnimationFinish() { _this.event.trigger('renderComplete'); } }); break; case 'radar': this.animationInstance = new Animation({ timing: 'easeInOut', duration: duration, onProcess: function onProcess(process) { context.clearRect(0, 0, opts.width, opts.height); if (opts.rotate) { contextRotate(context, opts); } _this.chartData.radarData = drawRadarDataPoints(series, opts, config, context, process); drawLegend(opts.series, opts, config, context); drawToolTipBridge(opts, config, context, process); drawCanvas(opts, context); }, onAnimationFinish: function onAnimationFinish() { _this.event.trigger('renderComplete'); } }); break; case 'arcbar': this.animationInstance = new Animation({ timing: 'easeInOut', duration: duration, onProcess: function onProcess(process) { context.clearRect(0, 0, opts.width, opts.height); if (opts.rotate) { contextRotate(context, opts); } _this.chartData.arcbarData = drawArcbarDataPoints(series, opts, config, context, process); drawCanvas(opts, context); }, onAnimationFinish: function onAnimationFinish() { _this.event.trigger('renderComplete'); } }); break; case 'gauge': this.animationInstance = new Animation({ timing: 'easeInOut', duration: duration, onProcess: function onProcess(process) { context.clearRect(0, 0, opts.width, opts.height); if (opts.rotate) { contextRotate(context, opts); } _this.chartData.gaugeData = drawGaugeDataPoints(categories, series, opts, config, context, process); drawCanvas(opts, context); }, onAnimationFinish: function onAnimationFinish() { _this.event.trigger('renderComplete'); } }); break; case 'candle': this.animationInstance = new Animation({ timing: 'easeIn', duration: duration, onProcess: function onProcess(process) { context.clearRect(0, 0, opts.width, opts.height); if (opts.rotate) { contextRotate(context, opts); } drawYAxisGrid(categories, opts, config, context); drawXAxis(categories, opts, config, context); var _drawCandleDataPoints = drawCandleDataPoints(series, seriesMA, opts, config, context, process), xAxisPoints = _drawCandleDataPoints.xAxisPoints, calPoints = _drawCandleDataPoints.calPoints, eachSpacing = _drawCandleDataPoints.eachSpacing; _this.chartData.xAxisPoints = xAxisPoints; _this.chartData.calPoints = calPoints; _this.chartData.eachSpacing = eachSpacing; if (seriesMA) { drawLegend(seriesMA, opts, config, context); } else { drawLegend(opts.series, opts, config, context); } drawYAxis(series, opts, config, context); drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints); drawCanvas(opts, context); }, onAnimationFinish: function onAnimationFinish() { _this.event.trigger('renderComplete'); } }); break; } } // simple event implement function Event() { this.events = {}; } Event.prototype.addEventListener = function(type, listener) { this.events[type] = this.events[type] || []; this.events[type].push(listener); }; Event.prototype.trigger = function() { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var type = args[0]; var params = args.slice(1); if (!!this.events[type]) { this.events[type].forEach(function(listener) { try { listener.apply(null, params); } catch (e) { // console.error(e); } }); } }; var Charts = function Charts(opts) { opts.pixelRatio = opts.pixelRatio ? opts.pixelRatio : 1; opts.fontSize = opts.fontSize ? opts.fontSize * opts.pixelRatio : 13 * opts.pixelRatio; opts.title = assign({}, opts.title); opts.subtitle = assign({}, opts.subtitle); opts.yAxis = assign({}, { gridType:'solid', dashLength:4 * opts.pixelRatio },opts.yAxis); opts.xAxis = assign({}, { rotateLabel:false, type:'calibration', gridType:'solid', dashLength:4 * opts.pixelRatio, scrollAlign:'left' },opts.xAxis); opts.extra = assign({}, opts.extra); opts.rotate = opts.rotate ? true : false; opts.animation = opts.animation ? true : false; var config$$1 = assign({}, config); config$$1.yAxisTitleWidth = opts.yAxis.disabled !== true && opts.yAxis.title ? config$$1.yAxisTitleWidth : 0; if (opts.type == 'pie' || opts.type == 'ring' ) { config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.pie.labelWidth*opts.pixelRatio || config$$1.pieChartLinePadding *opts.pixelRatio; } if (opts.type == 'rose' ) { config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.rose.labelWidth*opts.pixelRatio || config$$1.pieChartLinePadding *opts.pixelRatio; } config$$1.pieChartTextPadding = opts.dataLabel === false ? 0 : config$$1.pieChartTextPadding * opts.pixelRatio; config$$1.yAxisSplit = opts.yAxis.splitNumber ? opts.yAxis.splitNumber : config.yAxisSplit; //屏幕旋转 config$$1.rotate = opts.rotate; if (opts.rotate) { let tempWidth = opts.width; let tempHeight = opts.height; opts.width = tempHeight; opts.height = tempWidth; } //适配高分屏 config$$1.yAxisWidth = config.yAxisWidth * opts.pixelRatio; config$$1.xAxisHeight = config.xAxisHeight * opts.pixelRatio; if (opts.enableScroll && opts.xAxis.scrollShow) { config$$1.xAxisHeight += 6 * opts.pixelRatio; } config$$1.xAxisLineHeight = config.xAxisLineHeight * opts.pixelRatio; config$$1.legendHeight = config.legendHeight * opts.pixelRatio; config$$1.padding = config.padding * opts.pixelRatio; config$$1.fontSize = opts.fontSize; config$$1.titleFontSize = config.titleFontSize * opts.pixelRatio; config$$1.subtitleFontSize = config.subtitleFontSize * opts.pixelRatio; config$$1.toolTipPadding = config.toolTipPadding * opts.pixelRatio; config$$1.toolTipLineHeight = config.toolTipLineHeight * opts.pixelRatio; config$$1.columePadding = config.columePadding * opts.pixelRatio; this.opts = opts; this.config = config$$1; opts.$this = opts.$this ? opts.$this : this; this.context = uni.createCanvasContext(opts.canvasId, opts.$this); /* 兼容原生H5 this.context = document.getElementById(opts.canvasId).getContext("2d"); this.context.setStrokeStyle = function(e){ return this.strokeStyle=e; } this.context.setLineWidth = function(e){ return this.lineWidth=e; } this.context.setLineCap = function(e){ return this.lineCap=e; } this.context.setFontSize = function(e){ return this.font=e+"px sans-serif"; } this.context.setFillStyle = function(e){ return this.fillStyle=e; } this.context.draw = function(){ } */ this.chartData = {}; this.event = new Event(); this.scrollOption = { currentOffset: 0, startTouchX: 0, distance: 0, lastMoveTime: 0 }; //计算右对齐偏移距离 if (opts.enableScroll && opts.xAxis.scrollAlign == 'right') { let _calYAxisData = calYAxisData(opts.series, opts, config$$1), yAxisWidth = _calYAxisData.yAxisWidth; config$$1.yAxisWidth = yAxisWidth; let offsetLeft = 0; let _getXAxisPoints0 = getXAxisPoints(opts.categories, opts, config$$1), xAxisPoints = _getXAxisPoints0.xAxisPoints, startX = _getXAxisPoints0.startX, endX = _getXAxisPoints0.endX, eachSpacing = _getXAxisPoints0.eachSpacing; let totalWidth = eachSpacing * (xAxisPoints.length - 1); let screenWidth = endX - startX; offsetLeft = screenWidth - totalWidth; this.scrollOption = { currentOffset: offsetLeft, startTouchX: offsetLeft, distance: 0, lastMoveTime: 0 }; opts._scrollDistance_ = offsetLeft; } drawCharts.call(this, opts.type, opts, config$$1, this.context); }; Charts.prototype.updateData = function() { let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; this.opts = assign({}, this.opts, data); let scrollPosition = data.scrollPosition || 'current'; switch (scrollPosition) { case 'current': this.opts._scrollDistance_ = this.scrollOption.currentOffset; break; case 'left': this.opts._scrollDistance_ = 0; this.scrollOption = { currentOffset: 0, startTouchX: 0, distance: 0, lastMoveTime: 0 }; break; case 'right': let _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config), yAxisWidth = _calYAxisData.yAxisWidth; this.config.yAxisWidth = yAxisWidth; let offsetLeft = 0; let _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config), xAxisPoints = _getXAxisPoints0.xAxisPoints, startX = _getXAxisPoints0.startX, endX = _getXAxisPoints0.endX, eachSpacing = _getXAxisPoints0.eachSpacing; let totalWidth = eachSpacing * (xAxisPoints.length - 1); let screenWidth = endX - startX; offsetLeft = screenWidth - totalWidth; this.scrollOption = { currentOffset: offsetLeft, startTouchX: offsetLeft, distance: 0, lastMoveTime: 0 }; this.opts._scrollDistance_ = offsetLeft; break; } drawCharts.call(this, this.opts.type, this.opts, this.config, this.context); }; Charts.prototype.zoom = function() { var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.opts.xAxis.itemCount; if (this.opts.enableScroll !== true) { // console.log('请启用滚动条后使用！') return; } //当前屏幕中间点 let centerPoint = Math.round(Math.abs(this.scrollOption.currentOffset) / this.chartData.eachSpacing) + Math.round( this.opts.xAxis.itemCount / 2); this.opts.animation = false; this.opts.xAxis.itemCount = val.itemCount; //重新计算x轴偏移距离 let _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config), yAxisWidth = _calYAxisData.yAxisWidth; this.config.yAxisWidth = yAxisWidth; let offsetLeft = 0; let _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config), xAxisPoints = _getXAxisPoints0.xAxisPoints, startX = _getXAxisPoints0.startX, endX = _getXAxisPoints0.endX, eachSpacing = _getXAxisPoints0.eachSpacing; let centerLeft = eachSpacing * centerPoint; let screenWidth = endX - startX; let MaxLeft = screenWidth - eachSpacing * (xAxisPoints.length - 1); offsetLeft = screenWidth / 2 - centerLeft; if (offsetLeft > 0) { offsetLeft = 0; } if (offsetLeft < MaxLeft) { offsetLeft = MaxLeft; } this.scrollOption = { currentOffset: offsetLeft, startTouchX: offsetLeft, distance: 0, lastMoveTime: 0 }; this.opts._scrollDistance_ = offsetLeft; drawCharts.call(this, this.opts.type, this.opts, this.config, this.context); }; Charts.prototype.stopAnimation = function() { this.animationInstance && this.animationInstance.stop(); }; Charts.prototype.addEventListener = function(type, listener) { this.event.addEventListener(type, listener); }; Charts.prototype.getCurrentDataIndex = function(e) { var touches = null; if(e.changedTouches){ touches = e.changedTouches[0]; }else{ touches = e.mp.changedTouches[0]; } if (touches) { var _touches$ = getTouches(touches, this.opts, e); if (this.opts.type === 'pie' || this.opts.type === 'ring' || this.opts.type === 'rose') { return findPieChartCurrentIndex({ x: _touches$.x, y: _touches$.y }, this.chartData.pieData); } else if (this.opts.type === 'radar') { return findRadarChartCurrentIndex({ x: _touches$.x, y: _touches$.y }, this.chartData.radarData, this.opts.categories.length); } else { return findCurrentIndex({ x: _touches$.x, y: _touches$.y }, this.chartData.xAxisPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset)); } } return -1; }; Charts.prototype.showToolTip = function(e) { var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var touches = null; if(e.changedTouches){ touches = e.changedTouches[0]; }else{ touches = e.mp.changedTouches[0]; } if(!touches){ // console.log("touchError"); return; } var _touches$ = getTouches(touches, this.opts, e); if (this.opts.type === 'line' || this.opts.type === 'area' || this.opts.type === 'column') { var index = this.getCurrentDataIndex(e); var currentOffset = this.scrollOption.currentOffset; var opts = assign({}, this.opts, { _scrollDistance_: currentOffset, animation: false }); if (index > -1) { var seriesData = getSeriesDataItem(this.opts.series, index); if (seriesData.length !== 0) { var _getToolTipData = getToolTipData(seriesData, this.chartData.calPoints, index, this.opts.categories, option), textList = _getToolTipData.textList, offset = _getToolTipData.offset; offset.y = _touches$.y; opts.tooltip = { textList: textList, offset: offset, option: option, index: index }; } } drawCharts.call(this, opts.type, opts, this.config, this.context); } if (this.opts.type === 'mix') { var index = this.getCurrentDataIndex(e); var currentOffset = this.scrollOption.currentOffset; var opts = assign({}, this.opts, { _scrollDistance_: currentOffset, animation: false }); if (index > -1) { var seriesData = getSeriesDataItem(this.opts.series, index); if (seriesData.length !== 0) { var _getMixToolTipData = getMixToolTipData(seriesData, this.chartData.calPoints, index, this.opts.categories,option), textList = _getMixToolTipData.textList, offset = _getMixToolTipData.offset; offset.y = _touches$.y; opts.tooltip = { textList: textList, offset: offset, option: option, index: index }; } } drawCharts.call(this, opts.type, opts, this.config, this.context); } if (this.opts.type === 'candle') { var index = this.getCurrentDataIndex(e); var currentOffset = this.scrollOption.currentOffset; var opts = assign({}, this.opts, { _scrollDistance_: currentOffset, animation: false }); if (index > -1) { var seriesData = getSeriesDataItem(this.opts.series, index); if (seriesData.length !== 0) { var _getToolTipData = getCandleToolTipData(this.opts.series[0].data, seriesData, this.chartData.calPoints, index,this.opts.categories, this.opts.extra.candle, option), textList = _getToolTipData.textList, offset = _getToolTipData.offset; offset.y = _touches$.y; opts.tooltip = { textList: textList, offset: offset, option: option, index: index }; } } drawCharts.call(this, opts.type, opts, this.config, this.context); } if (this.opts.type === 'pie' || this.opts.type === 'ring' || this.opts.type === 'rose') { var index = this.getCurrentDataIndex(e); var currentOffset = this.scrollOption.currentOffset; var opts = assign({}, this.opts, { _scrollDistance_: currentOffset, animation: false }); if (index > -1) { var seriesData = this.opts.series[index]; var textList = [{ text: option.format ? option.format(seriesData) : seriesData.name + ': ' + seriesData.data, color: seriesData.color }]; var offset = { x: _touches$.x, y: _touches$.y }; opts.tooltip = { textList: textList, offset: offset, option: option, index: index }; } drawCharts.call(this, opts.type, opts, this.config, this.context); } if (this.opts.type === 'radar') { var index = this.getCurrentDataIndex(e); var currentOffset = this.scrollOption.currentOffset; var opts = assign({}, this.opts, { _scrollDistance_: currentOffset, animation: false }); if (index > -1) { var seriesData = getSeriesDataItem(this.opts.series, index); if (seriesData.length !== 0) { var textList = seriesData.map(function(item) { return { text: option.format ? option.format(item) : item.name + ': ' + item.data, color: item.color }; }); var offset = { x: _touches$.x, y: _touches$.y }; opts.tooltip = { textList: textList, offset: offset, option: option, index: index }; } } drawCharts.call(this, opts.type, opts, this.config, this.context); } }; Charts.prototype.translate = function(distance) { this.scrollOption = { currentOffset: distance, startTouchX: distance, distance: 0, lastMoveTime: 0 }; let opts = assign({}, this.opts, { _scrollDistance_: distance, animation: false }); drawCharts.call(this, this.opts.type, opts, this.config, this.context); }; Charts.prototype.scrollStart = function(e) { var touches = null; if(e.changedTouches){ touches = e.changedTouches[0]; }else{ touches = e.mp.changedTouches[0]; } var _touches$ = getTouches(touches, this.opts, e); if (touches && this.opts.enableScroll === true) { this.scrollOption.startTouchX = _touches$.x; } }; Charts.prototype.scroll = function(e) { if (this.scrollOption.lastMoveTime === 0) { this.scrollOption.lastMoveTime = Date.now(); } let Limit = this.opts.extra.touchMoveLimit || 20; let currMoveTime = Date.now(); let duration = currMoveTime - this.scrollOption.lastMoveTime; if (duration < Math.floor(1000 / Limit)) return; this.scrollOption.lastMoveTime = currMoveTime; var touches = null; if(e.changedTouches){ touches = e.changedTouches[0]; }else{ touches = e.mp.changedTouches[0]; } var _touches$ = getTouches(touches, this.opts, e); if (touches && this.opts.enableScroll === true) { var _distance; _distance = _touches$.x - this.scrollOption.startTouchX; var currentOffset = this.scrollOption.currentOffset; var validDistance = calValidDistance(currentOffset + _distance, this.chartData, this.config, this.opts); this.scrollOption.distance = _distance = validDistance - currentOffset; var opts = assign({}, this.opts, { _scrollDistance_: currentOffset + _distance, animation: false }); drawCharts.call(this, opts.type, opts, this.config, this.context); return currentOffset + _distance; } }; Charts.prototype.scrollEnd = function(e) { if (this.opts.enableScroll === true) { var _scrollOption = this.scrollOption, currentOffset = _scrollOption.currentOffset, distance = _scrollOption.distance; this.scrollOption.currentOffset = currentOffset + distance; this.scrollOption.distance = 0; } }; if ( typeof module === "object" && typeof module.exports === "object" ) { module.exports = Charts; //export default Charts;//建议使用nodejs的module导出方式，如报错请使用export方式导出 }u-charts.min.js'use strict';var config={yAxisWidth:15,yAxisSplit:5,xAxisHeight:15,xAxisLineHeight:15,legendHeight:15,yAxisTitleWidth:15,padding:12,pixelRatio:1,rotate:!1,columePadding:3,fontSize:13,dataPointShape:["circle","circle","circle","circle"],colors:["#1890ff","#2fc25b","#facc14","#f04864","#8543e0","#90ed7d"],pieChartLinePadding:15,pieChartTextPadding:5,xAxisTextPadding:3,titleColor:"#333333",titleFontSize:20,subtitleColor:"#999999",subtitleFontSize:15,toolTipPadding:3,toolTipBackground:"#000000",toolTipOpacity:.7,toolTipLineHeight:20,radarGridCount:3,radarLabelTextMargin:15,gaugeLabelTextMargin:15};function assign(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t,i=Object(e),o=1;o<arguments.length;o++)if(t=arguments[o],null!=t)for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(i[a]=t[a]);return i}var util={toFixed:function(e,t){return t=t||2,this.isFloat(e)&&(e=e.toFixed(t)),e},isFloat:function(e){return 0!=e%1},approximatelyEqual:function(e,t){return 1e-10>Math.abs(e-t)},isSameSign:function(e,t){var i=Math.abs;return i(e)===e&&i(t)===t||i(e)!==e&&i(t)!==t},isSameXCoordinateArea:function(e,t){return this.isSameSign(e.x,t.x)},isCollision:function(e,t){e.end={},e.end.x=e.start.x+e.width,e.end.y=e.start.y-e.height,t.end={},t.end.x=t.start.x+t.width,t.end.y=t.start.y-t.height;var i=t.start.x>e.end.x||t.end.x<e.start.x||t.end.y>e.start.y||t.start.y<e.end.y;return!i}};function getH5Offset(t){return t.mp={changedTouches:[]},t.mp.changedTouches.push({x:t.offsetX,y:t.offsetY}),t}function hexToRgb(e,t){var i=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,o=e.replace(i,function(e,t,i,o){return t+t+i+i+o+o}),a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(o),n=parseInt(a[1],16),l=parseInt(a[2],16),r=parseInt(a[3],16);return"rgba("+n+","+l+","+r+","+t+")"}function findRange(e,t,i){if(isNaN(e))throw new Error("[wxCharts] unvalid series data!");i=i||10,t=t?t:"upper";for(var o=1;1>i;)i*=10,o*=10;for(e="upper"===t?Math.ceil(e*o):Math.floor(e*o);0!=e%i;)"upper"===t?e++:e--;return e/o}function calCandleMA(e,t,i,o){let a=[];for(let n,l=0;l<e.length;l++){n={data:[],name:t[l],color:i[l]};for(let t=0,i=o.length;t<i;t++){if(t<e[l]){n.data.push(null);continue}let i=0;for(let a=0;a<e[l];a++)i+=o[t-a][1];n.data.push(+(i/e[l]).toFixed(3))}a.push(n)}return a}function calValidDistance(e,t,i,o){var a=o.width-i.padding-t.xAxisPoints[0],n=t.eachSpacing*o.categories.length,l=e;return 0<=e?l=0:Math.abs(e)>=n-a&&(l=a-n),l}function isInAngleRange(e,t,i){function o(e){for(;0>e;)e+=2*a;for(;e>2*a;)e-=2*a;return e}var a=Math.PI;return e=o(e),t=o(t),i=o(i),t>i&&(i+=2*a,e<t&&(e+=2*a)),e>=t&&e<=i}function calRotateTranslate(e,t,i){var o=e,a=i-t,n=o+(i-a-o)/1.4142135623730951;n*=-1;return{transX:n,transY:(i-a)*(1.4142135623730951-1)-(i-a-o)/1.4142135623730951}}function createCurveControlPoints(e,t){function i(e,t){return!!(e[t-1]&&e[t+1])&&(e[t].y>=Math.max(e[t-1].y,e[t+1].y)||e[t].y<=Math.min(e[t-1].y,e[t+1].y))}var o=.2,a=.2,n=null,l=null,r=null,s=null;if(1>t?(n=e[0].x+(e[1].x-e[0].x)*o,l=e[0].y+(e[1].y-e[0].y)*o):(n=e[t].x+(e[t+1].x-e[t-1].x)*o,l=e[t].y+(e[t+1].y-e[t-1].y)*o),t>e.length-3){var d=e.length-1;r=e[d].x-(e[d].x-e[d-1].x)*a,s=e[d].y-(e[d].y-e[d-1].y)*a}else r=e[t+1].x-(e[t+2].x-e[t].x)*a,s=e[t+1].y-(e[t+2].y-e[t].y)*a;return i(e,t+1)&&(s=e[t+1].y),i(e,t)&&(l=e[t].y),{ctrA:{x:n,y:l},ctrB:{x:r,y:s}}}function convertCoordinateOrigin(e,t,i){return{x:i.x+e,y:i.y-t}}function avoidCollision(e,t){if(t)for(;util.isCollision(e,t);)0<e.start.x?e.start.y--:0>e.start.x?e.start.y++:0<e.start.y?e.start.y++:e.start.y--;return e}function fillSeriesColor(e,t){var i=0;return e.map(function(e){return e.color||(e.color=t.colors[i],i=(i+1)%t.colors.length),e})}function fillSeriesType(e,t){return e.map(function(e){return e.type||(e.type=t.type),e})}function getDataRange(e,t){var i=0,o=t-e;return i=1e4<=o?1e3:1e3<=o?100:100<=o?10:10<=o?5:1<=o?1:.1<=o?.1:.01,{minRange:findRange(e,"lower",i),maxRange:findRange(t,"upper",i)}}function measureText(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:config.fontSize;e=e+"";var e=e.split(""),o=0;for(let t,a=0;a<e.length;a++)t=e[a],o+=/[a-zA-Z]/.test(t)?7:/[0-9]/.test(t)?5.5:/\./.test(t)?2.7:/-/.test(t)?3.25:/[\u4e00-\u9fa5]/.test(t)?10:/\(|\)/.test(t)?3.73:/\s/.test(t)?2.5:/%/.test(t)?8:10;return o*t/10}function dataCombine(e){return e.reduce(function(e,t){return(e.data?e.data:e).concat(t.data)},[])}function dataCombineStack(e){for(var t=Array(e[0].data.length),o=0;o<t.length;o++)t[o]=0;for(var a=0;a<e.length;a++)for(var o=0;o<t.length;o++)t[o]+=e[a].data[o];return e.reduce(function(e,i){return(e.data?e.data:e).concat(i.data).concat(t)},[])}function getTouches(t,i,o){let e,a;return t.clientX?i.rotate?(a=i.height-t.clientX*i.pixelRatio,e=(t.pageY-o.currentTarget.offsetTop-i.height/i.pixelRatio/2*(i.pixelRatio-1))*i.pixelRatio):(e=t.clientX*i.pixelRatio,a=(t.pageY-o.currentTarget.offsetTop-i.height/i.pixelRatio/2*(i.pixelRatio-1))*i.pixelRatio):i.rotate?(a=i.height-t.x*i.pixelRatio,e=t.y*i.pixelRatio):(e=t.x*i.pixelRatio,a=t.y*i.pixelRatio),{x:e,y:a}}function getSeriesDataItem(e,t){var i=[];for(let o,a=0;a<e.length;a++)if(o=e[a],null!==o.data[t]&&"undefined"!=typeof o.data[t]){let e={};e.color=o.color,e.type=o.type,e.style=o.style,e.shape=o.shape,e.disableLegend=o.disableLegend,e.name=o.name,e.data=o.format?o.format(o.data[t]):o.data[t],i.push(e)}return i}function getMaxTextListLength(e){var t=e.map(function(e){return measureText(e)});return Math.max.apply(null,t)}function getRadarCoordinateSeries(e){for(var t=Math.PI,o=[],a=0;a<e;a++)o.push(2*t/e*a);return o.map(function(e){return-1*e+t/2})}function getToolTipData(e,t,o,i){var a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},n=e.map(function(e){return{text:a.format?a.format(e,i[o]):e.name+": "+e.data,color:e.color}}),l=[],r={x:0,y:0};for(let a,n=0;n<t.length;n++)a=t[n],"undefined"!=typeof a[o]&&null!==a[o]&&l.push(a[o]);for(let a,n=0;n<l.length;n++)a=l[n],r.x=Math.round(a.x),r.y+=a.y;return r.y/=l.length,{textList:n,offset:r}}function getMixToolTipData(e,t,o,i){var a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},n=e.map(function(e){return{text:a.format?a.format(e,i[o]):e.name+": "+e.data,color:e.color,disableLegend:!!e.disableLegend}});n=n.filter(function(e){if(!0!==e.disableLegend)return e});var l=[],r={x:0,y:0};for(let a,n=0;n<t.length;n++)a=t[n],"undefined"!=typeof a[o]&&null!==a[o]&&l.push(a[o]);for(let a,n=0;n<l.length;n++)a=l[n],r.x=Math.round(a.x),r.y+=a.y;return r.y/=l.length,{textList:n,offset:r}}function getCandleToolTipData(e,t,o,a,i,n){6<arguments.length&&void 0!==arguments[6]?arguments[6]:{};let l=n.color.upFill,r=n.color.downFill,s=[l,l,r,l];var d=[];let h={text:i[a],color:null};d.push(h),t.map(function(t){0==a&&0>t.data[1]-t.data[0]?s[1]=r:(t.data[0]<e[a-1][1]&&(s[0]=r),t.data[1]<t.data[0]&&(s[1]=r),t.data[2]>e[a-1][1]&&(s[2]=l),t.data[3]<e[a-1][1]&&(s[3]=r));let i={text:"\u5F00\u76D8\uFF1A"+t.data[0],color:s[0]},o={text:"\u6536\u76D8\uFF1A"+t.data[1],color:s[1]},n={text:"\u6700\u4F4E\uFF1A"+t.data[2],color:s[2]},h={text:"\u6700\u9AD8\uFF1A"+t.data[3],color:s[3]};d.push(i,o,n,h)});var c=[],x={x:0,y:0};for(let l,r=0;r<o.length;r++)l=o[r],"undefined"!=typeof l[a]&&null!==l[a]&&c.push(l[a]);return x.x=Math.round(c[0][0].x),{textList:d,offset:x}}function findCurrentIndex(e,t,i,o){var a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,n=-1;return isInExactChartArea(e,i,o)&&t.forEach(function(t,i){e.x+a>t&&(n=i)}),n}function isInExactChartArea(e,t,i){return e.x<t.width-i.padding&&e.x>i.padding+i.yAxisWidth+i.yAxisTitleWidth&&e.y>i.padding&&e.y<t.height-i.legendHeight-i.xAxisHeight-i.padding}function findRadarChartCurrentIndex(e,t,i){var o=Math.PI,a=2*o/i,n=-1;if(isInExactPieChartArea(e,t.center,t.radius)){var l=function(e){return 0>e&&(e+=2*o),e>2*o&&(e-=2*o),e},r=Math.atan2(t.center.y-e.y,e.x-t.center.x);r=-1*r,0>r&&(r+=2*o);var s=t.angleList.map(function(e){return e=l(-1*e),e});s.forEach(function(e,t){var i=l(e-a/2),s=l(e+a/2);s<i&&(s+=2*o),(r>=i&&r<=s||r+2*o>=i&&r+2*o<=s)&&(n=t)})}return n}function findPieChartCurrentIndex(e,t){var o=-1;if(isInExactPieChartArea(e,t.center,t.radius)){var a=Math.atan2(t.center.y-e.y,e.x-t.center.x);a=-a;for(var n,l=0,r=t.series.length;l<r;l++)if(n=t.series[l],isInAngleRange(a,n._start_,n._start_+2*n._proportion_*Math.PI)){o=l;break}}return o}function isInExactPieChartArea(e,t,i){var o=Math.pow;return o(e.x-t.x,2)+o(e.y-t.y,2)<=o(i,2)}function splitPoints(e){var t=[],i=[];return e.forEach(function(e){null===e?(i.length&&t.push(i),i=[]):i.push(e)}),i.length&&t.push(i),t}function calLegendData(e,t,i){if(!1===t.legend)return{legendList:[],legendHeight:0};var o=5*t.pixelRatio,a=8*t.pixelRatio,n=15*t.pixelRatio,l=[],r=0,s=[];for(let a=0;a<e.length;a++){let i=e[a],d=3*o+n+measureText(i.name||"undefined");r+d>t.width?(l.push(s),r=d,s=[i]):(r+=d,s.push(i))}return s.length&&l.push(s),{legendList:l,legendHeight:l.length*(i.fontSize+a)+o}}function calCategoriesData(e,t,i){var o={angle:0,xAxisHeight:i.xAxisHeight},a=getXAxisPoints(e,t,i),n=a.eachSpacing,l=e.map(function(e){return measureText(e)}),r=Math.max.apply(this,l);return!0==t.xAxis.rotateLabel&&r+2*i.xAxisTextPadding>n&&(o.angle=45*Math.PI/180,o.xAxisHeight=2*i.xAxisTextPadding+r*Math.sin(o.angle)),o}function getRadarDataPoints(e,t,i,o,a){var n=Math.max,l=5<arguments.length&&void 0!==arguments[5]?arguments[5]:1,r=a.extra.radar||{};r.max=r.max||0;var s=n(r.max,n.apply(null,dataCombine(o))),d=[];for(let n=0;n<o.length;n++){let a=o[n],r={};r.color=a.color,r.data=[],a.data.forEach(function(o,a){let n={};n.angle=e[a],n.proportion=o/s,n.position=convertCoordinateOrigin(i*n.proportion*l*Math.cos(n.angle),i*n.proportion*l*Math.sin(n.angle),t),r.data.push(n)}),d.push(r)}return d}function getPieDataPoints(e,t){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:1,a=0,n=0;for(let o,n=0;n<e.length;n++)o=e[n],o.data=null===o.data?0:o.data,a+=o.data;for(let n,l=0;l<e.length;l++)n=e[l],n.data=null===n.data?0:n.data,n._proportion_=0===a?1/e.length*o:n.data/a*o,n._radius_=t;for(let o,a=0;a<e.length;a++)o=e[a],o._start_=n,n+=2*o._proportion_*Math.PI;return e}function getRoseDataPoints(e,t,o,a){var n=4<arguments.length&&arguments[4]!==void 0?arguments[4]:1,l=0,r=0,s=[];for(let n,r=0;r<e.length;r++)n=e[r],n.data=null===n.data?0:n.data,l+=n.data,s.push(n.data);var d=s.pop(),h=s.shift();for(let r,s=0;s<e.length;s++)r=e[s],r.data=null===r.data?0:r.data,r._proportion_=0===l||"area"==t?1/e.length*n:r.data/l*n,r._radius_=o+(a-o)*((r.data-d)/(h-d));for(let n,l=0;l<e.length;l++)n=e[l],n._start_=r,r+=2*n._proportion_*Math.PI;return e}function getArcbarDataPoints(e,t){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:1;1==o&&(o=.999999);for(let a,n=0;n<e.length;n++){a=e[n],a.data=null===a.data?0:a.data;let i;i="default"==t.type?t.startAngle-t.endAngle+1:2,a._proportion_=i*a.data*o+t.startAngle,2<=a._proportion_&&(a._proportion_%=2)}return e}function getGaugeAxisPoints(e,t,o){let a=t;for(let n=0;n<e.length;n++)e[n].value=null===e[n].value?0:e[n].value,e[n]._startAngle_=a,e[n]._endAngle_=(t-o+1)*e[n].value+t,2<=e[n]._endAngle_&&(e[n]._endAngle_%=2),a=e[n]._endAngle_;return e}function getGaugeDataPoints(e,t,o){let a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:1;for(let n,l=0;l<e.length;l++){if(n=e[l],n.data=null===n.data?0:n.data,"auto"==o.pointer.color){for(let e=0;e<t.length;e++)if(n.data<=t[e].value){n.color=t[e].color;break}}else n.color=o.pointer.color;let i=o.startAngle-o.endAngle+1;n._endAngle_=i*n.data+o.startAngle,n._oldAngle_=o.oldAngle,o.oldAngle<o.endAngle&&(n._oldAngle_+=2),n._proportion_=n.data>=o.oldData?(n._endAngle_-n._oldAngle_)*a+o.oldAngle:n._oldAngle_-(n._oldAngle_-n._endAngle_)*a,2<=n._proportion_&&(n._proportion_%=2)}return e}function getPieTextMaxLength(e){e=getPieDataPoints(e);let t=0;for(let o=0;o<e.length;o++){let i=e[o],a=i.format?i.format(+i._proportion_.toFixed(2)):util.toFixed(100*i._proportion_)+"%";t=Math.max(t,measureText(a))}return t}function fixColumeData(e,t,i,o,a,n){return e.map(function(e){return null===e?null:(e.width=Math.ceil((t-2*a.columePadding)/i),n.extra.column&&n.extra.column.width&&0<+n.extra.column.width&&(e.width=Math.min(e.width,+n.extra.column.width)),e.x+=(o+.5-i/2)*e.width,e)})}function fixColumeMeterData(e,t,i,o,a,n,l){var r=Math.min;return e.map(function(e){return null===e?null:(e.width=t-2*a.columePadding,e.width=n.extra.column&&n.extra.column.width&&0<+n.extra.column.width?r(e.width,+n.extra.column.width):r(e.width,25),0<o&&(e.width-=2*l),e)})}function fixColumeStackData(e,t,i,o,a,n){var l=Math.min;return e.map(function(e){return null===e?null:(e.width=t-2*a.columePadding,e.width=n.extra.column&&n.extra.column.width&&0<+n.extra.column.width?l(e.width,+n.extra.column.width):l(e.width,25),e)})}function getXAxisPoints(e,t,i){var o=i.yAxisWidth+i.yAxisTitleWidth,a=t.width-2*i.padding-o,n=t.enableScroll?Math.min(t.xAxis.itemCount,e.length):e.length,l=a/n,r=[],s=i.padding+o,d=t.width-i.padding;return e.forEach(function(e,t){r.push(s+t*l)}),!0===t.enableScroll?r.push(s+e.length*l):r.push(d),{xAxisPoints:r,startX:s,endX:d,eachSpacing:l}}function getCandleDataPoints(e,t,i,o,a,n,l){var r=Math.round,s=7<arguments.length&&void 0!==arguments[7]?arguments[7]:1,d=[],h=n.height-2*l.padding-l.xAxisHeight-l.legendHeight;return e.forEach(function(e,c){if(null===e)d.push(null);else{var x=[];e.forEach(function(e){var d={x:o[c]+r(a/2)},p=e.value||e,g=h*(p-t)/(i-t);g*=s,d.y=n.height-l.xAxisHeight-l.legendHeight-r(g)-l.padding,x.push(d)}),d.push(x)}}),d}function getDataPoints(e,t,i,o,a,n,l){var r=Math.round,s=7<arguments.length&&void 0!==arguments[7]?arguments[7]:1,d=[],h=n.height-2*l.padding-l.xAxisHeight-l.legendHeight;return e.forEach(function(e,c){if(null===e)d.push(null);else{var x={color:e.color,x:o[c]+r(a/2)},p=e;"object"==typeof e&&null!=e&&(p=e.value);var g=h*(p-t)/(i-t);g*=s,x.y=n.height-l.xAxisHeight-l.legendHeight-r(g)-l.padding,d.push(x)}}),d}function getStackDataPoints(e,t,i,o,a,n,l,r,s){var d=Math.round,h=9<arguments.length&&void 0!==arguments[9]?arguments[9]:1,c=[],x=n.height-2*l.padding-l.xAxisHeight-l.legendHeight;return e.forEach(function(e,p){if(null===e)c.push(null);else{var g={color:e.color,x:o[p]+d(a/2)};if(0<r){var y=0;for(let e=0;e<=r;e++)y+=s[e].data[p];var f=y-e,u=x*(y-t)/(i-t),m=x*(f-t)/(i-t)}else var y=e,u=x*(y-t)/(i-t),m=0;var T=m;u*=h,T*=h,g.y=n.height-l.xAxisHeight-l.legendHeight-d(u)-l.padding,g.y0=n.height-l.xAxisHeight-l.legendHeight-d(T)-l.padding,c.push(g)}}),c}function getYAxisTextList(e,t,o,a){var n,l=Math.min,r=Math.max;n="stack"==a?dataCombineStack(e):dataCombine(e);var s=[];n=n.filter(function(e){return"object"==typeof e&&null!==e?e.constructor==Array?null!==e:null!==e.value:null!==e}),n.map(function(e){"object"==typeof e?e.constructor==Array?e.map(function(e){s.push(e)}):s.push(e.value):s.push(e)});var d=0,h=0;if(0<s.length&&(d=l.apply(this,s),h=r.apply(this,s)),"number"==typeof t.yAxis.min&&(d=l(t.yAxis.min,d)),"number"==typeof t.yAxis.max&&(h=r(t.yAxis.max,h)),d===h){var c=h||10;h+=c}for(var x=getDataRange(d,h),p=x.minRange,g=x.maxRange,y=[],f=(g-p)/o.yAxisSplit,u=0;u<=o.yAxisSplit;u++)y.push(p+f*u);return y.reverse()}function calYAxisData(e,t,i){var o=assign({},t.extra.column||{type:""}),a=getYAxisTextList(e,t,i,o.type),n=i.yAxisWidth,l=a.map(function(e){return e=util.toFixed(e,2),e=t.yAxis.format?t.yAxis.format(+e):e,n=Math.max(n,measureText(e)+5),e});return!0===t.yAxis.disabled&&(n=0),{rangesFormat:l,ranges:a,yAxisWidth:n}}function calTooltipYAxisData(e,t,i,o){var a=getYAxisTextList(t,i,o),n=i.height-2*o.padding-o.xAxisHeight-o.legendHeight;let l=a[0],r=a[a.length-1],s=o.padding,d=o.padding+n,h=l-(l-r)*(e-s)/(d-s);return h=i.yAxis.format?i.yAxis.format(+h):h,h}function contextRotate(e,t){var i=Math.PI;!0===t.rotateLock?!0!==t._rotate_&&(e.translate(t.height,0),e.rotate(90*i/180),t._rotate_=!0):(e.translate(t.height,0),e.rotate(90*i/180))}function drawPointShape(e,t,i,o,a){o.beginPath(),o.setStrokeStyle("#ffffff"),o.setLineWidth(1*a.pixelRatio),o.setFillStyle(t),"diamond"===i?e.forEach(function(e){null!==e&&(o.moveTo(e.x,e.y-4.5),o.lineTo(e.x-4.5,e.y),o.lineTo(e.x,e.y+4.5),o.lineTo(e.x+4.5,e.y),o.lineTo(e.x,e.y-4.5))}):"circle"===i?e.forEach(function(e){null!==e&&(o.moveTo(e.x+3.5*a.pixelRatio,e.y),o.arc(e.x,e.y,4*a.pixelRatio,0,2*Math.PI,!1))}):"rect"===i?e.forEach(function(e){null!==e&&(o.moveTo(e.x-3.5,e.y-3.5),o.rect(e.x-3.5,e.y-3.5,7,7))}):"triangle"==i&&e.forEach(function(e){null!==e&&(o.moveTo(e.x,e.y-4.5),o.lineTo(e.x-4.5,e.y+4.5),o.lineTo(e.x+4.5,e.y+4.5),o.lineTo(e.x,e.y-4.5))}),o.closePath(),o.fill(),o.stroke()}function drawRingTitle(e,t,i){var o=e.title.fontSize||t.titleFontSize,a=e.subtitle.fontSize||t.subtitleFontSize,n=e.title.name||"",l=e.subtitle.name||"",r=e.title.color||t.titleColor,s=e.subtitle.color||t.subtitleColor,d=n?o:0,h=l?a:0,c=5;if(l){var x=measureText(l,a),p=(e.width-x)/2+(e.subtitle.offsetX||0),g=(e.height-t.legendHeight+a)/2+(e.subtitle.offsetY||0);n&&(g-=(d+c)/2),i.beginPath(),i.setFontSize(a),i.setFillStyle(s),i.fillText(l,p,g),i.closePath(),i.stroke()}if(n){var y=measureText(n,o),f=(e.width-y)/2+(e.title.offsetX||0),u=(e.height-t.legendHeight+o)/2+(e.title.offsetY||0);l&&(u+=(h+c)/2),i.beginPath(),i.setFontSize(o),i.setFillStyle(r),i.fillText(n,f,u),i.closePath(),i.stroke()}}function drawPointText(e,t,i,o){var a=t.data;e.forEach(function(e,n){if(null!==e){o.beginPath(),o.setFontSize(t.textSize||i.fontSize),o.setFillStyle(t.textColor||"#666666");var l=a[n];"object"==typeof a[n]&&null!==a[n]&&(l=a[n].value);var r=t.format?t.format(l):l;o.fillText(r,e.x-measureText(r,t.textSize||i.fontSize)/2,e.y-2),o.closePath(),o.stroke()}})}function drawGaugeLabel(e,t,i,o,a,n){var l=Math.PI;t-=e.width/2+a.gaugeLabelTextMargin;let r=e.startAngle-e.endAngle+1,s=r/e.splitLine.splitNumber,d=e.endNumber-e.startNumber,h=d/e.splitLine.splitNumber,c=e.startAngle,x=e.startNumber;for(let r=0;r<e.splitLine.splitNumber+1;r++){var p={x:t*Math.cos(c*l),y:t*Math.sin(c*l)},g=e.labelFormat?e.labelFormat(x):x;p.x+=i.x-measureText(g)/2,p.y+=i.y;var y=p.x,f=p.y;n.beginPath(),n.setFontSize(a.fontSize),n.setFillStyle(e.labelColor||"#666666"),n.fillText(g,y,f+a.fontSize/2),n.closePath(),n.stroke(),c+=s,2<=c&&(c%=2),x+=h}}function drawRadarLabel(e,t,i,o,a,n){var l=o.extra.radar||{};t+=a.radarLabelTextMargin,e.forEach(function(e,r){var s={x:t*Math.cos(e),y:t*Math.sin(e)},d=convertCoordinateOrigin(s.x,s.y,i),h=d.x,c=d.y;util.approximatelyEqual(s.x,0)?h-=measureText(o.categories[r]||"")/2:0>s.x&&(h-=measureText(o.categories[r]||"")),n.beginPath(),n.setFontSize(a.fontSize),n.setFillStyle(l.labelColor||"#666666"),n.fillText(o.categories[r]||"",h,c+a.fontSize/2),n.closePath(),n.stroke()})}function drawPieText(e,t,o,a,i,n){var l=Math.cos,r=Math.sin,s=Math.min,d=Math.max,h=Math.PI,c=o.pieChartLinePadding,x=[],p=null,g=e.map(function(e){var t=2*h-(e._start_+2*h*e._proportion_/2),i=e.format?e.format(+e._proportion_.toFixed(2)):util.toFixed(100*e._proportion_)+"%",o=e.color,a=e._radius_;return{arc:t,text:i,color:o,radius:a,textColor:e.textColor,textSize:e.textSize}});for(let h=0;h<g.length;h++){let e=g[h],t=l(e.arc)*(e.radius+c),i=r(e.arc)*(e.radius+c),a=l(e.arc)*e.radius,n=r(e.arc)*e.radius,y=0<=t?t+o.pieChartTextPadding:t-o.pieChartTextPadding,f=i,u=measureText(e.text),m=f;p&&util.isSameXCoordinateArea(p.start,{x:y})&&(0<y?m=s(f,p.start.y):0>t?m=d(f,p.start.y):0<f?m=d(f,p.start.y):m=s(f,p.start.y)),0>y&&(y-=u);let T={lineStart:{x:a,y:n},lineEnd:{x:t,y:i},start:{x:y,y:m},width:u,height:o.fontSize,text:e.text,color:e.color,textColor:e.textColor,textSize:e.textSize};p=avoidCollision(T,p),x.push(p)}for(let l=0;l<x.length;l++){let e=x[l],i=convertCoordinateOrigin(e.lineStart.x,e.lineStart.y,n),r=convertCoordinateOrigin(e.lineEnd.x,e.lineEnd.y,n),s=convertCoordinateOrigin(e.start.x,e.start.y,n);a.setLineWidth(1*t.pixelRatio),a.setFontSize(o.fontSize),a.beginPath(),a.setStrokeStyle(e.color),a.setFillStyle(e.color),a.moveTo(i.x,i.y);let d=0>e.start.x?s.x+e.width:s.x,c=0>e.start.x?s.x-5:s.x+5;a.quadraticCurveTo(r.x,r.y,d,s.y),a.moveTo(i.x,i.y),a.stroke(),a.closePath(),a.beginPath(),a.moveTo(s.x+e.width,s.y),a.arc(d,s.y,2,0,2*h),a.closePath(),a.fill(),a.beginPath(),a.setFontSize(e.textSize||o.fontSize),a.setFillStyle(e.textColor||"#666666"),a.fillText(e.text,c,s.y+3),a.closePath(),a.stroke(),a.closePath()}}function drawToolTipSplitLine(e,t,i,o){var a=t.extra.tooltip||{};a.gridType=null==a.gridType?"solid":a.gridType,a.dashLength=null==a.dashLength?4:a.dashLength;var n=i.padding,l=t.height-i.padding-i.xAxisHeight-i.legendHeight;if("dash"==a.gridType&&o.setLineDash([a.dashLength,a.dashLength]),o.beginPath(),o.setStrokeStyle(a.gridColor||"#cccccc"),o.setLineWidth(1*t.pixelRatio),o.moveTo(e,n),o.lineTo(e,l),o.closePath(),o.stroke(),o.setLineDash([]),a.xAxisLabel){let n=t.categories[t.tooltip.index];o.setFontSize(i.fontSize);let r=o.measureText(n).width,s=e-i.toolTipPadding-.5*r,d=l;o.beginPath(),o.setFillStyle(hexToRgb(a.labelBgColor||i.toolTipBackground,a.labelBgOpacity||i.toolTipOpacity)),o.setStrokeStyle(a.labelBgColor||i.toolTipBackground),o.setLineWidth(1*t.pixelRatio),o.rect(s,d,r+2*i.toolTipPadding,i.fontSize+2*i.toolTipPadding),o.closePath(),o.stroke(),o.fill(),o.beginPath(),o.setFontSize(i.fontSize),o.setFillStyle(a.labelFontColor||i.fontColor),o.fillText(n,s+2*i.toolTipPadding,d+i.toolTipPadding+i.fontSize),o.closePath(),o.stroke()}}function drawToolTipHorizentalLine(e,t,i,o){var a=e.extra.tooltip||{};a.gridType=null==a.gridType?"solid":a.gridType,a.dashLength=null==a.dashLength?4:a.dashLength;var n=t.padding+t.yAxisWidth+t.yAxisTitleWidth,l=e.width-t.padding;if("dash"==a.gridType&&i.setLineDash([a.dashLength,a.dashLength]),i.beginPath(),i.setStrokeStyle(a.gridColor||"#cccccc"),i.setLineWidth(1*e.pixelRatio),i.moveTo(n,e.tooltip.offset.y),i.lineTo(l,e.tooltip.offset.y),i.closePath(),i.stroke(),i.setLineDash([]),a.yAxisLabel){let l=calTooltipYAxisData(e.tooltip.offset.y,e.series,e,t,o);i.setFontSize(t.fontSize);let r=i.measureText(l).width,s=n-2*t.toolTipPadding-r,d=e.tooltip.offset.y;i.beginPath(),i.setFillStyle(hexToRgb(a.labelBgColor||t.toolTipBackground,a.labelBgOpacity||t.toolTipOpacity)),i.setStrokeStyle(a.labelBgColor||t.toolTipBackground),i.setLineWidth(1*e.pixelRatio),i.rect(s,d-.5*t.fontSize-t.toolTipPadding,r+2*t.toolTipPadding,t.fontSize+2*t.toolTipPadding),i.closePath(),i.stroke(),i.fill(),i.beginPath(),i.setFontSize(t.fontSize),i.setFillStyle(a.labelFontColor||t.fontColor),i.fillText(l,s+t.toolTipPadding,d+.5*t.fontSize),i.closePath(),i.stroke()}}function drawToolTipSplitArea(e,t,i,o,a){var n=t.extra.tooltip||{activeBgColor:"#000000",activeBgOpacity:.08};n.activeBgColor=n.activeBgColor?n.activeBgColor:"#000000",n.activeBgOpacity=n.activeBgOpacity?n.activeBgOpacity:.08;var l=i.padding,r=t.height-i.padding-i.xAxisHeight-i.legendHeight;o.beginPath(),o.setFillStyle(hexToRgb(n.activeBgColor,n.activeBgOpacity)),o.rect(e-a/2,l,a,r-l),o.closePath(),o.fill()}function drawToolTip(e,t,i,o,a){var n=Math.round,l=i.extra.tooltip||{bgColor:"#000000",bgOpacity:.7,fontColor:"#FFFFFF"};l.bgColor=l.bgColor?l.bgColor:"#000000",l.bgOpacity=l.bgOpacity?l.bgOpacity:.7,l.fontColor=l.fontColor?l.fontColor:"#FFFFFF";var r=4*i.pixelRatio,s=5*i.pixelRatio,d=8*i.pixelRatio,h=!1;("line"==i.type||"area"==i.type||"candle"==i.type||"mix"==i.type)&&drawToolTipSplitLine(i.tooltip.offset.x,i,o,a),t=assign({x:0,y:0},t),t.y-=8*i.pixelRatio;var c=e.map(function(e){return measureText(e.text)}),x=r+s+4*o.toolTipPadding+Math.max.apply(null,c),p=2*o.toolTipPadding+e.length*o.toolTipLineHeight;t.x-Math.abs(i._scrollDistance_)+d+x>i.width&&(h=!0),a.beginPath(),a.setFillStyle(hexToRgb(l.bgColor||o.toolTipBackground,l.bgOpacity||o.toolTipOpacity)),h?(a.moveTo(t.x,t.y+10*i.pixelRatio),a.lineTo(t.x-d,t.y+10*i.pixelRatio-5*i.pixelRatio),a.lineTo(t.x-d,t.y),a.lineTo(t.x-d-n(x),t.y),a.lineTo(t.x-d-n(x),t.y+p),a.lineTo(t.x-d,t.y+p),a.lineTo(t.x-d,t.y+10*i.pixelRatio+5*i.pixelRatio),a.lineTo(t.x,t.y+10*i.pixelRatio)):(a.moveTo(t.x,t.y+10*i.pixelRatio),a.lineTo(t.x+d,t.y+10*i.pixelRatio-5*i.pixelRatio),a.lineTo(t.x+d,t.y),a.lineTo(t.x+d+n(x),t.y),a.lineTo(t.x+d+n(x),t.y+p),a.lineTo(t.x+d,t.y+p),a.lineTo(t.x+d,t.y+10*i.pixelRatio+5*i.pixelRatio),a.lineTo(t.x,t.y+10*i.pixelRatio)),a.closePath(),a.fill(),e.forEach(function(e,i){if(null!==e.color){a.beginPath(),a.setFillStyle(e.color);var n=t.x+d+2*o.toolTipPadding,l=t.y+(o.toolTipLineHeight-o.fontSize)/2+o.toolTipLineHeight*i+o.toolTipPadding+1;h&&(n=t.x-x-d+2*o.toolTipPadding),a.fillRect(n,l,r,o.fontSize),a.closePath()}}),e.forEach(function(e,i){var n=t.x+d+2*o.toolTipPadding+r+s;h&&(n=t.x-x-d+2*o.toolTipPadding+ +r+s);var c=t.y+(o.toolTipLineHeight-o.fontSize)/2+o.toolTipLineHeight*i+o.toolTipPadding;a.beginPath(),a.setFontSize(o.fontSize),a.setFillStyle(l.fontColor),a.fillText(e.text,n,c+o.fontSize),a.closePath(),a.stroke()})}function drawYAxisTitle(e,t,i,o){var a=i.xAxisHeight+(t.height-i.xAxisHeight-measureText(e))/2;o.save(),o.beginPath(),o.setFontSize(i.fontSize),o.setFillStyle(t.yAxis.titleFontColor||"#333333"),o.translate(0,t.height),o.rotate(-90*Math.PI/180),o.fillText(e,a,i.padding+.5*i.fontSize),o.closePath(),o.stroke(),o.restore()}function drawColumnDataPoints(e,t,i,o){var a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,n=t.extra.column||{type:{},meter:{}};n.type=null==n.type?"group":n.type,n.meter=n.meter||{},n.meter.border=null==n.meter.border?4:n.meter.border,n.meter.fillColor=null==n.meter.fillColor?"#FFFFFF":n.meter.fillColor;var l=calYAxisData(e,t,i),r=l.ranges,s=getXAxisPoints(t.categories,t,i),d=s.xAxisPoints,h=s.eachSpacing,c=r.pop(),x=r.shift(),p=[];return o.save(),t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&o.translate(t._scrollDistance_,0),t.tooltip&&t.tooltip.textList&&t.tooltip.textList.length&&1===a&&drawToolTipSplitArea(t.tooltip.offset.x,t,i,o,h),e.forEach(function(l,r){var s=l.data;switch(n.type){case"group":var g=getDataPoints(s,c,x,d,h,t,i,a),y=getStackDataPoints(s,c,x,d,h,t,i,r,e,a);p.push(y),g=fixColumeData(g,h,e.length,r,i,t),g.forEach(function(e){if(null!==e){o.beginPath(),o.setFillStyle(e.color||l.color);var a=e.x-e.width/2+1,n=t.height-e.y-i.padding-i.xAxisHeight-i.legendHeight;o.moveTo(a,e.y),o.fillRect(a,e.y,e.width-2,n),o.closePath(),o.fill()}});break;case"stack":var g=getStackDataPoints(s,c,x,d,h,t,i,r,e,a);p.push(g),g=fixColumeStackData(g,h,e.length,r,i,t,e),g.forEach(function(e){if(null!==e){o.beginPath(),o.setFillStyle(e.color||l.color);var a=e.x-e.width/2+1,n=t.height-e.y-i.padding-i.xAxisHeight-i.legendHeight,s=t.height-e.y0-i.padding-i.xAxisHeight-i.legendHeight;0<r&&(n-=s),o.moveTo(a,e.y),o.fillRect(a,e.y,e.width-2,n),o.closePath(),o.fill()}});break;case"meter":var g=getDataPoints(s,c,x,d,h,t,i,a);p.push(g),g=fixColumeMeterData(g,h,e.length,r,i,t,n.meter.border),0==r?g.forEach(function(e){if(null!==e){o.beginPath(),o.setFillStyle(n.meter.fillColor);var a=e.x-e.width/2,r=t.height-e.y-i.padding-i.xAxisHeight-i.legendHeight;o.moveTo(a,e.y),o.fillRect(a,e.y,e.width,r),o.closePath(),o.fill(),0<n.meter.border&&(o.beginPath(),o.setStrokeStyle(l.color),o.setLineWidth(n.meter.border*t.pixelRatio),o.moveTo(a+.5*n.meter.border,e.y+r),o.lineTo(a+.5*n.meter.border,e.y+.5*n.meter.border),o.lineTo(a+e.width-.5*n.meter.border,e.y+.5*n.meter.border),o.lineTo(a+e.width-.5*n.meter.border,e.y+r),o.stroke())}}):g.forEach(function(e){if(null!==e){o.beginPath(),o.setFillStyle(e.color||l.color);var a=e.x-e.width/2,n=t.height-e.y-i.padding-i.xAxisHeight-i.legendHeight;o.moveTo(a,e.y),o.fillRect(a,e.y,e.width,n),o.closePath(),o.fill()}});}}),!1!==t.dataLabel&&1===a&&e.forEach(function(l,r){var s=l.data;switch(n.type){case"group":var p=getDataPoints(s,c,x,d,h,t,i,a);p=fixColumeData(p,h,e.length,r,i,t),drawPointText(p,l,i,o);break;case"stack":var p=getStackDataPoints(s,c,x,d,h,t,i,r,e,a);drawPointText(p,l,i,o);break;case"meter":var p=getDataPoints(s,c,x,d,h,t,i,a);drawPointText(p,l,i,o);}}),o.restore(),{xAxisPoints:d,calPoints:p,eachSpacing:h}}function drawCandleDataPoints(e,t,i,o,a){var n=5<arguments.length&&void 0!==arguments[5]?arguments[5]:1,l=i.extra.candle||{color:{},average:{}};l.color.upLine=l.color.upLine?l.color.upLine:"#f04864",l.color.upFill=l.color.upFill?l.color.upFill:"#f04864",l.color.downLine=l.color.downLine?l.color.downLine:"#2fc25b",l.color.downFill=l.color.downFill?l.color.downFill:"#2fc25b",l.average.show=!0===l.average.show,l.average.name=l.average.name?l.average.name:[],l.average.day=l.average.day?l.average.day:[],l.average.color=l.average.color?l.average.color:["#1890ff","#2fc25b","#facc14","#f04864","#8543e0","#90ed7d"],i.extra.candle=l;var r=calYAxisData(e,i,o),s=r.ranges,d=getXAxisPoints(i.categories,i,o),h=d.xAxisPoints,c=d.eachSpacing,x=s.pop(),p=s.shift(),g=[];return a.save(),i._scrollDistance_&&0!==i._scrollDistance_&&!0===i.enableScroll&&a.translate(i._scrollDistance_,0),l.average.show&&t.forEach(function(e){var t=e.data,l=getDataPoints(t,x,p,h,c,i,o,n),r=splitPoints(l);r.forEach(function(t){a.beginPath(),a.setStrokeStyle(e.color),a.setLineWidth(1),1===t.length?(a.moveTo(t[0].x,t[0].y),a.arc(t[0].x,t[0].y,1,0,2*Math.PI)):(a.moveTo(t[0].x,t[0].y),t.forEach(function(e,i){if(0<i){var o=createCurveControlPoints(t,i-1);a.bezierCurveTo(o.ctrA.x,o.ctrA.y,o.ctrB.x,o.ctrB.y,e.x,e.y)}}),a.moveTo(t[0].x,t[0].y)),a.closePath(),a.stroke()})}),e.forEach(function(e){var t=e.data,r=getCandleDataPoints(t,x,p,h,c,i,o,n);g.push(r);var s=splitPoints(r);s=s[0],s.forEach(function(e,o){a.beginPath(),0<t[o][1]-t[o][0]?(a.setStrokeStyle(l.color.upLine),a.setFillStyle(l.color.upFill),a.setLineWidth(1*i.pixelRatio),a.moveTo(e[3].x,e[3].y),a.lineTo(e[1].x,e[1].y),a.lineTo(e[1].x-c/4,e[1].y),a.lineTo(e[0].x-c/4,e[0].y),a.lineTo(e[0].x,e[0].y),a.lineTo(e[2].x,e[2].y),a.lineTo(e[0].x,e[0].y),a.lineTo(e[0].x+c/4,e[0].y),a.lineTo(e[1].x+c/4,e[1].y),a.lineTo(e[1].x,e[1].y),a.moveTo(e[3].x,e[3].y)):(a.setStrokeStyle(l.color.downLine),a.setFillStyle(l.color.downFill),a.setLineWidth(1*i.pixelRatio),a.moveTo(e[3].x,e[3].y),a.lineTo(e[0].x,e[0].y),a.lineTo(e[0].x-c/4,e[0].y),a.lineTo(e[1].x-c/4,e[1].y),a.lineTo(e[1].x,e[1].y),a.lineTo(e[2].x,e[2].y),a.lineTo(e[1].x,e[1].y),a.lineTo(e[1].x+c/4,e[1].y),a.lineTo(e[0].x+c/4,e[0].y),a.lineTo(e[0].x,e[0].y),a.moveTo(e[3].x,e[3].y)),a.closePath(),a.fill(),a.stroke()})}),a.restore(),{xAxisPoints:h,calPoints:g,eachSpacing:c}}function drawAreaDataPoints(e,t,i,o){var a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,n=t.extra.area||{type:"straight",opacity:.5,addLine:!1,width:2};n.type=n.type?n.type:"straight",n.opacity=n.opacity?n.opacity:.2,n.addLine=!0==n.addLine,n.width=n.width?n.width:2;var l=calYAxisData(e,t,i),r=l.ranges,s=getXAxisPoints(t.categories,t,i),d=s.xAxisPoints,h=s.eachSpacing,c=r.pop(),x=r.shift(),p=t.height-i.padding-i.xAxisHeight-i.legendHeight,g=[];return o.save(),t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&o.translate(t._scrollDistance_,0),t.tooltip&&t.tooltip.textList&&t.tooltip.textList.length&&1===a&&drawToolTipSplitLine(t.tooltip.offset.x,t,i,o),e.forEach(function(e,l){let r=e.data,s=getDataPoints(r,c,x,d,h,t,i,a);g.push(s);let y=splitPoints(s);for(let a,r=0;r<y.length;r++){if(a=y[r],o.beginPath(),o.setStrokeStyle(hexToRgb(e.color,n.opacity)),o.setFillStyle(hexToRgb(e.color,n.opacity)),o.setLineWidth(n.width*t.pixelRatio),1<a.length){let e=a[0],t=a[a.length-1];o.moveTo(e.x,e.y),"curve"===n.type?a.forEach(function(e,t){if(0<t){let i=createCurveControlPoints(a,t-1);o.bezierCurveTo(i.ctrA.x,i.ctrA.y,i.ctrB.x,i.ctrB.y,e.x,e.y)}}):a.forEach(function(e,t){0<t&&o.lineTo(e.x,e.y)}),o.lineTo(t.x,p),o.lineTo(e.x,p),o.lineTo(e.x,e.y)}else{let e=a[0];o.moveTo(e.x-h/2,e.y),o.lineTo(e.x+h/2,e.y),o.lineTo(e.x+h/2,p),o.lineTo(e.x-h/2,p),o.moveTo(e.x-h/2,e.y)}o.closePath(),o.fill(),n.addLine&&(o.beginPath(),o.setStrokeStyle(e.color),o.setLineWidth(n.width*t.pixelRatio),1===a.length?(o.moveTo(a[0].x,a[0].y),o.arc(a[0].x,a[0].y,1,0,2*Math.PI)):(o.moveTo(a[0].x,a[0].y),"curve"===n.type?a.forEach(function(e,t){if(0<t){let i=createCurveControlPoints(a,t-1);o.bezierCurveTo(i.ctrA.x,i.ctrA.y,i.ctrB.x,i.ctrB.y,e.x,e.y)}}):a.forEach(function(e,t){0<t&&o.lineTo(e.x,e.y)}),o.moveTo(a[0].x,a[0].y)),o.closePath(),o.stroke())}if(!1!==t.dataPointShape){var f=i.dataPointShape[l%i.dataPointShape.length];drawPointShape(s,e.color,f,o,t)}}),!1!==t.dataLabel&&1===a&&e.forEach(function(e){var n=e.data,l=getDataPoints(n,c,x,d,h,t,i,a);drawPointText(l,e,i,o)}),o.restore(),{xAxisPoints:d,calPoints:g,eachSpacing:h}}function drawLineDataPoints(e,t,i,o){var a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,n=t.extra.line||{type:"straight",width:2};n.type=n.type?n.type:"straight",n.width=n.width?n.width:2;var l=calYAxisData(e,t,i),r=l.ranges,s=getXAxisPoints(t.categories,t,i),d=s.xAxisPoints,h=s.eachSpacing,c=r.pop(),x=r.shift(),p=[];return o.save(),t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&o.translate(t._scrollDistance_,0),t.tooltip&&t.tooltip.textList&&t.tooltip.textList.length&&1===a&&drawToolTipSplitLine(t.tooltip.offset.x,t,i,o),e.forEach(function(e,l){var r=e.data,s=getDataPoints(r,c,x,d,h,t,i,a);p.push(s);var g=splitPoints(s);if(g.forEach(function(i){o.beginPath(),o.setStrokeStyle(e.color),o.setLineWidth(n.width*t.pixelRatio),1===i.length?(o.moveTo(i[0].x,i[0].y),o.arc(i[0].x,i[0].y,1,0,2*Math.PI)):(o.moveTo(i[0].x,i[0].y),"curve"===n.type?i.forEach(function(e,t){if(0<t){var a=createCurveControlPoints(i,t-1);o.bezierCurveTo(a.ctrA.x,a.ctrA.y,a.ctrB.x,a.ctrB.y,e.x,e.y)}}):i.forEach(function(e,t){0<t&&o.lineTo(e.x,e.y)}),o.moveTo(i[0].x,i[0].y)),o.closePath(),o.stroke()}),!1!==t.dataPointShape){var y=i.dataPointShape[l%i.dataPointShape.length];drawPointShape(s,e.color,y,o,t)}}),!1!==t.dataLabel&&1===a&&e.forEach(function(e){var n=e.data,l=getDataPoints(n,c,x,d,h,t,i,a);drawPointText(l,e,i,o)}),o.restore(),{xAxisPoints:d,calPoints:p,eachSpacing:h}}function drawMixDataPoints(e,t,i,o){var a=Math.PI,n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,l=calYAxisData(e,t,i),r=l.ranges,s=getXAxisPoints(t.categories,t,i),d=s.xAxisPoints,h=s.eachSpacing,c=r.pop(),x=r.shift(),p=t.height-i.padding-i.xAxisHeight-i.legendHeight,g=[],y=0,f=0;if(e.forEach(function(e){"column"==e.type&&(f+=1)}),o.save(),t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&o.translate(t._scrollDistance_,0),t.tooltip&&t.tooltip.textList&&t.tooltip.textList.length&&1===n&&drawToolTipSplitLine(t.tooltip.offset.x,t,i,o),e.forEach(function(e,l){var r=e.data,s=getDataPoints(r,c,x,d,h,t,i,n);if(g.push(s),"column"==e.type&&(s=fixColumeData(s,h,f,y,i,t),s.forEach(function(a){if(null!==a){o.beginPath(),o.setFillStyle(a.color||e.color);var n=a.x-a.width/2+1,l=t.height-a.y-i.padding-i.xAxisHeight-i.legendHeight;o.moveTo(n,a.y),o.rect(n,a.y,a.width-2,l),o.closePath(),o.fill()}}),y+=1),"area"==e.type){let a=splitPoints(s);for(let n,l=0;l<a.length;l++){if(n=a[l],o.beginPath(),o.setStrokeStyle(e.color),o.setFillStyle(e.color),o.setGlobalAlpha(.2),o.setLineWidth(2*t.pixelRatio),1<n.length){var u=n[0];let t=n[n.length-1];o.moveTo(u.x,u.y),"curve"===e.style?n.forEach(function(e,t){if(0<t){var i=createCurveControlPoints(n,t-1);o.bezierCurveTo(i.ctrA.x,i.ctrA.y,i.ctrB.x,i.ctrB.y,e.x,e.y)}}):n.forEach(function(e,t){0<t&&o.lineTo(e.x,e.y)}),o.lineTo(t.x,p),o.lineTo(u.x,p),o.lineTo(u.x,u.y)}else{let e=n[0];o.moveTo(e.x-h/2,e.y),o.lineTo(e.x+h/2,e.y),o.lineTo(e.x+h/2,p),o.lineTo(e.x-h/2,p),o.moveTo(e.x-h/2,e.y)}o.closePath(),o.fill(),o.setGlobalAlpha(1)}}if("line"==e.type){var m=splitPoints(s);m.forEach(function(i){o.beginPath(),o.setStrokeStyle(e.color),o.setLineWidth(2*t.pixelRatio),1===i.length?(o.moveTo(i[0].x,i[0].y),o.arc(i[0].x,i[0].y,1,0,2*a)):(o.moveTo(i[0].x,i[0].y),"curve"==e.style?i.forEach(function(e,t){if(0<t){var a=createCurveControlPoints(i,t-1);o.bezierCurveTo(a.ctrA.x,a.ctrA.y,a.ctrB.x,a.ctrB.y,e.x,e.y)}}):i.forEach(function(e,t){0<t&&o.lineTo(e.x,e.y)}),o.moveTo(i[0].x,i[0].y)),o.closePath(),o.stroke()})}if("point"==e.type&&s.forEach(function(i){i&&(o.beginPath(),o.setFillStyle(e.color),o.setStrokeStyle("#FFFFFF"),o.setLineWidth(1*t.pixelRatio),o.moveTo(i.x+3.5*t.pixelRatio,i.y),o.arc(i.x,i.y,4*t.pixelRatio,0,2*a),o.closePath(),o.fill(),o.stroke())}),!0==e.addPoint&&"column"!==e.type){var T=i.dataPointShape[l%i.dataPointShape.length];drawPointShape(s,e.color,T,o,t)}}),!1!==t.dataLabel&&1===n){var y=0;e.forEach(function(e){var a=e.data,l=getDataPoints(a,c,x,d,h,t,i,n);"column"===e.type?(l=fixColumeData(l,h,f,y,i,t),drawPointText(l,e,i,o),y+=1):drawPointText(l,e,i,o)})}return o.restore(),{xAxisPoints:d,calPoints:g,eachSpacing:h}}function drawToolTipBridge(e,t,i,o,a,n){var l=e.extra.tooltip||{};l.horizentalLine&&e.tooltip&&1===o&&("line"==e.type||"area"==e.type||"column"==e.type||"candle"==e.type||"mix"==e.type)&&drawToolTipHorizentalLine(e,t,i,a,n),i.save(),e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&i.translate(e._scrollDistance_,0),e.tooltip&&e.tooltip.textList&&e.tooltip.textList.length&&1===o&&drawToolTip(e.tooltip.textList,e.tooltip.offset,e,t,i,a,n),i.restore()}function drawXAxis(e,t,i,o){var a=Math.ceil,n=getXAxisPoints(e,t,i),l=n.xAxisPoints,r=n.startX,s=n.endX,d=n.eachSpacing,h=t.height-i.padding-i.xAxisHeight-i.legendHeight,c=i.padding;if(t.enableScroll&&t.xAxis.scrollShow){var x=t.height-i.padding-i.legendHeight+6*t.pixelRatio,p=s-r,g=d*(l.length-1),y=0;t._scrollDistance_&&(y=-t._scrollDistance_*p/g),o.beginPath(),o.setLineCap("round"),o.setLineWidth(6*t.pixelRatio),o.setStrokeStyle(t.xAxis.scrollBackgroundColor||"#EFEBEF"),o.moveTo(r,x),o.lineTo(s,x),o.stroke(),o.closePath(),o.beginPath(),o.setLineCap("round"),o.setLineWidth(6*t.pixelRatio),o.setStrokeStyle(t.xAxis.scrollColor||"#A6A6A6"),o.moveTo(r+y,x),o.lineTo(r+y+p*p/g,x),o.stroke(),o.setLineCap("butt"),o.closePath()}if(o.save(),t._scrollDistance_&&0!==t._scrollDistance_&&o.translate(t._scrollDistance_,0),o.beginPath(),o.setStrokeStyle(t.xAxis.gridColor||"#cccccc"),o.setLineCap("butt"),o.setLineWidth(1*t.pixelRatio),"dash"==t.xAxis.gridType&&o.setLineDash([t.xAxis.dashLength,t.xAxis.dashLength]),!0!==t.xAxis.disableGrid&&("calibration"===t.xAxis.type?l.forEach(function(e,i){0<i&&(o.moveTo(e-d/2,h),o.lineTo(e-d/2,h+4*t.pixelRatio))}):(t.xAxis.gridEval=t.xAxis.gridEval||1,l.forEach(function(e,i){0==i%t.xAxis.gridEval&&(o.moveTo(e,h),o.lineTo(e,c))}))),o.closePath(),o.stroke(),o.setLineDash([]),!0!==t.xAxis.disabled){let n=t.width-2*i.padding-i.yAxisWidth-i.yAxisTitleWidth,r=e.length;t.xAxis.labelCount&&(r=t.xAxis.itemCount?a(e.length/t.xAxis.itemCount*t.xAxis.labelCount):t.xAxis.labelCount,r-=1);let s=a(e.length/r),c=[],x=e.length;for(let t=0;t<x;t++)0==t%s?c.push(e[t]):c.push("");c[x-1]=e[x-1];var f=t.xAxis.fontSize||i.fontSize;0===i._xAxisTextAngle_?c.forEach(function(e,i){var a=d/2-measureText(e,f)/2;o.beginPath(),o.setFontSize(f),o.setFillStyle(t.xAxis.fontColor||"#666666"),o.fillText(e,l[i]+a,h+f+5),o.closePath(),o.stroke()}):c.forEach(function(e,a){o.save(),o.beginPath(),o.setFontSize(f),o.setFillStyle(t.xAxis.fontColor||"#666666");var n=measureText(e),r=calRotateTranslate(l[a]+d/2,h+f/2+5,t.height),s=r.transX,c=r.transY;o.rotate(-1*i._xAxisTextAngle_),o.translate(s,c),o.fillText(e,l[a]+(d/2-n),h+f+5),o.closePath(),o.stroke(),o.restore()})}o.restore()}function drawYAxisGrid(e,t,o,a){if(!0!==t.yAxis.disableGrid){for(var n=t.height-2*o.padding-o.xAxisHeight-o.legendHeight,l=Math.floor(n/o.yAxisSplit),r=o.yAxisWidth+o.yAxisTitleWidth,s=o.padding+r,d=getXAxisPoints(e,t,o),h=d.xAxisPoints,c=d.eachSpacing,x=c*(h.length-1),p=s+x,g=[],y=0;y<o.yAxisSplit;y++)g.push(o.padding+l*y);g.push(o.padding+l*o.yAxisSplit+2),a.save(),t._scrollDistance_&&0!==t._scrollDistance_&&a.translate(t._scrollDistance_,0),"dash"==t.yAxis.gridType&&a.setLineDash([t.yAxis.dashLength,t.yAxis.dashLength]),a.beginPath(),a.setStrokeStyle(t.yAxis.gridColor||"#cccccc"),a.setLineWidth(1*t.pixelRatio),g.forEach(function(e){a.moveTo(s,e),a.lineTo(p,e)}),a.closePath(),a.stroke(),a.setLineDash([]),a.restore()}}function drawYAxis(e,t,o,a){if(!0!==t.yAxis.disabled){var n=calYAxisData(e,t,o),l=n.rangesFormat,r=o.yAxisWidth+o.yAxisTitleWidth,s=t.height-2*o.padding-o.xAxisHeight-o.legendHeight,d=Math.floor(s/o.yAxisSplit),h=o.padding+r,c=t.width-o.padding,x=t.height-o.padding-o.xAxisHeight-o.legendHeight+o.xAxisTextPadding;a.beginPath(),a.setFillStyle(t.background||"#ffffff"),0>t._scrollDistance_&&a.fillRect(0,0,h,x+o.xAxisHeight),a.fillRect(c,0,t.width,x+o.xAxisHeight),a.closePath(),a.stroke();for(var p=[],g=0;g<=o.yAxisSplit;g++)p.push(o.padding+d*g);var y=t.yAxis.fontSize||o.fontSize;l.forEach(function(e,i){var n=p[i]?p[i]:x;a.beginPath(),a.setFontSize(y),a.setFillStyle(t.yAxis.fontColor||"#666666"),a.fillText(e,o.padding+o.yAxisTitleWidth,n+y/2),a.closePath(),a.stroke()}),t.yAxis.title&&drawYAxisTitle(t.yAxis.title,t,o,a)}}function drawLegend(e,t,o,a){var n=Math.PI;if(!1!==t.legend){var i=calLegendData(e,t,o),l=i.legendList,r=5*t.pixelRatio,s=10*t.pixelRatio,d=15*t.pixelRatio;l.forEach(function(e,i){var l=0;for(let t,o=0;o<e.length;o++)t=e[o],t.name=t.name||"undefined",l+=3*r+measureText(t.name)+d;var h=(t.width-l)/2+r,c=t.height-o.padding-o.legendHeight+i*(o.fontSize+s)+r+s;a.setFontSize(o.fontSize);for(let l,s=0;s<e.length;s++){switch(l=e[s],t.type){case"line":a.beginPath(),a.setLineWidth(1*t.pixelRatio),a.setStrokeStyle(l.color),a.setFillStyle(l.color),a.moveTo(h+7.5*t.pixelRatio,c+5*t.pixelRatio),a.arc(h+7.5*t.pixelRatio,c+5*t.pixelRatio,6*t.pixelRatio,0,2*n),a.closePath(),a.fill(),a.stroke();break;case"pie":a.beginPath(),a.setLineWidth(1*t.pixelRatio),a.setStrokeStyle(l.color),a.setFillStyle(l.color),a.moveTo(h+7.5*t.pixelRatio,c+5*t.pixelRatio),a.arc(h+7.5*t.pixelRatio,c+5*t.pixelRatio,6*t.pixelRatio,0,2*n),a.closePath(),a.fill(),a.stroke();break;case"ring":case"rose":a.beginPath(),a.setLineWidth(1*t.pixelRatio),a.setStrokeStyle(l.color),a.setFillStyle(l.color),a.moveTo(h+7.5*t.pixelRatio,c+5*t.pixelRatio),a.arc(h+7.5*t.pixelRatio,c+5*t.pixelRatio,6*t.pixelRatio,0,2*n),a.closePath(),a.fill(),a.stroke();break;case"gauge":break;case"arcbar":break;default:a.beginPath(),a.setLineWidth(1*t.pixelRatio),a.setStrokeStyle(l.color),a.setFillStyle(l.color),a.moveTo(h,c),a.fillRect(h,c,15*t.pixelRatio,10*t.pixelRatio),a.closePath(),a.fill(),a.stroke();}h+=r+d,a.beginPath(),a.setFontSize(o.fontSize),a.setFillStyle(t.extra.legendTextColor||"#333333"),a.fillText(l.name,h,c+6*t.pixelRatio+3*t.pixelRatio),a.closePath(),a.stroke(),h+=measureText(l.name)+2*r}})}}function drawPieDataPoints(e,t,o,a){var n=Math.PI,l=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,r=t.extra.pie||{},s={x:t.width/2,y:(t.height-o.legendHeight)/2},d=Math.min(s.x-o.pieChartLinePadding-o.pieChartTextPadding-o._pieTextMaxLength_,s.y-o.pieChartLinePadding-o.pieChartTextPadding);d-=t.dataLabel?10:2*o.padding,e=getPieDataPoints(e,d,l);var h=o.pieChartLinePadding/2;if(e=e.map(function(e){return e._start_+=(r.offsetAngle||0)*n/180,e}),e.forEach(function(e,i){t.tooltip&&t.tooltip.index==i&&(a.beginPath(),a.setFillStyle(hexToRgb(e.color,t.extra.pie.activeOpacity||.5)),a.moveTo(s.x,s.y),a.arc(s.x,s.y,e._radius_+h,e._start_,e._start_+2*e._proportion_*n),a.closePath(),a.fill()),a.beginPath(),a.setLineWidth(2*t.pixelRatio),a.lineJoin="round",a.setStrokeStyle("#ffffff"),a.setFillStyle(e.color),a.moveTo(s.x,s.y),a.arc(s.x,s.y,e._radius_,e._start_,e._start_+2*e._proportion_*n),a.closePath(),a.fill(),!0!==t.disablePieStroke&&a.stroke()}),"ring"===t.type){var c=.6*d;"number"==typeof t.extra.pie.ringWidth&&0<t.extra.pie.ringWidth&&(c=Math.max(0,d-t.extra.pie.ringWidth)),a.beginPath(),a.setFillStyle(t.background||"#ffffff"),a.moveTo(s.x,s.y),a.arc(s.x,s.y,c,0,2*n),a.closePath(),a.fill()}if(!1!==t.dataLabel&&1===l){for(var x=!1,p=0,g=e.length;p<g;p++)if(0<e[p].data){x=!0;break}x&&drawPieText(e,t,o,a,d,s)}return 1===l&&"ring"===t.type&&drawRingTitle(t,o,a),{center:s,radius:d,series:e}}function drawRoseDataPoints(e,t,o,a){var n=Math.PI,l=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,r=t.extra.rose||{};r.type=r.type||"area";var s={x:t.width/2,y:(t.height-o.legendHeight)/2},d=Math.min(s.x-o.pieChartLinePadding-o.pieChartTextPadding-o._pieTextMaxLength_,s.y-o.pieChartLinePadding-o.pieChartTextPadding);d-=t.dataLabel?10:2*o.padding;var h=r.minRadius||.5*d;e=getRoseDataPoints(e,r.type,h,d,l);var c=o.pieChartLinePadding/2;if(e=e.map(function(e){return e._start_+=(r.offsetAngle||0)*n/180,e}),e.forEach(function(e,i){t.tooltip&&t.tooltip.index==i&&(a.beginPath(),a.setFillStyle(hexToRgb(e.color,r.activeOpacity||.5)),a.moveTo(s.x,s.y),a.arc(s.x,s.y,c+e._radius_,e._start_,e._start_+2*e._proportion_*n),a.closePath(),a.fill()),a.beginPath(),a.setLineWidth(2*t.pixelRatio),a.lineJoin="round",a.setStrokeStyle("#ffffff"),a.setFillStyle(e.color),a.moveTo(s.x,s.y),a.arc(s.x,s.y,e._radius_,e._start_,e._start_+2*e._proportion_*n),a.closePath(),a.fill(),!0!==t.disablePieStroke&&a.stroke()}),!1!==t.dataLabel&&1===l){for(var x=!1,p=0,g=e.length;p<g;p++)if(0<e[p].data){x=!0;break}x&&drawPieText(e,t,o,a,d,s)}return{center:s,radius:d,series:e}}function drawArcbarDataPoints(e,t,i,o){var a=Math.PI,n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,l=t.extra.arcbar||{};l.startAngle=l.startAngle?l.startAngle:.75,l.endAngle=l.endAngle?l.endAngle:.25,l.type=l.type?l.type:"default",e=getArcbarDataPoints(e,l,n);var r={x:t.width/2,y:t.height/2},s=Math.min(r.x,r.y);l.width="number"==typeof l.width&&0<l.width?l.width:12*t.pixelRatio,s-=i.padding+l.width/2,o.setLineWidth(l.width),o.setStrokeStyle(l.backgroundColor||"#E9E9E9"),o.setLineCap("round"),o.beginPath(),"default"==l.type?o.arc(r.x,r.y,s,l.startAngle*a,l.endAngle*a,!1):o.arc(r.x,r.y,s,0,2*a,!1),o.stroke();for(let n,d=0;d<e.length;d++)n=e[d],o.setLineWidth(l.width),o.setStrokeStyle(n.color),o.setLineCap("round"),o.beginPath(),o.arc(r.x,r.y,s,l.startAngle*a,n._proportion_*a,!1),o.stroke();return drawRingTitle(t,i,o),{center:r,radius:s,series:e}}function drawGaugeDataPoints(e,t,o,i,a){var n=Math.PI,l=5<arguments.length&&void 0!==arguments[5]?arguments[5]:1,r=o.extra.gauge||{};r.startAngle=r.startAngle?r.startAngle:.75,null==r.oldAngle&&(r.oldAngle=r.startAngle),null==r.oldData&&(r.oldData=0),r.endAngle=r.endAngle?r.endAngle:.25,e=getGaugeAxisPoints(e,r.startAngle,r.endAngle);var s={x:o.width/2,y:o.height/2},d=Math.min(s.x,s.y);r.width="number"==typeof r.width&&0<r.width?r.width:15*o.pixelRatio,d-=i.padding+r.width/2;var h=d-r.width;a.setLineWidth(r.width),a.setLineCap("butt");for(let l,r=0;r<e.length;r++)l=e[r],a.beginPath(),a.setStrokeStyle(l.color),a.arc(s.x,s.y,d,l._startAngle_*n,l._endAngle_*n,!1),a.stroke();a.save();let c=r.startAngle-r.endAngle+1;r.splitLine.fixRadius=r.splitLine.fixRadius?r.splitLine.fixRadius:0,r.splitLine.splitNumber=r.splitLine.splitNumber?r.splitLine.splitNumber:10,r.splitLine.width=r.splitLine.width?r.splitLine.width:15*o.pixelRatio,r.splitLine.color=r.splitLine.color?r.splitLine.color:"#FFFFFF",r.splitLine.childNumber=r.splitLine.childNumber?r.splitLine.childNumber:5,r.splitLine.childWidth=r.splitLine.childWidth?r.splitLine.childWidth:5*o.pixelRatio;let x=c/r.splitLine.splitNumber,p=c/r.splitLine.splitNumber/r.splitLine.childNumber,g=-d-.5*r.width-r.splitLine.fixRadius,y=-d-.5*r.width-r.splitLine.fixRadius+r.splitLine.width,f=-d-.5*r.width-r.splitLine.fixRadius+r.splitLine.childWidth;a.translate(s.x,s.y),a.rotate((r.startAngle-1)*n);for(let l=0;l<r.splitLine.splitNumber+1;l++)a.beginPath(),a.setStrokeStyle(r.splitLine.color),a.setLineWidth(2*o.pixelRatio),a.moveTo(g,0),a.lineTo(y,0),a.stroke(),a.rotate(x*n);a.restore(),a.save(),a.translate(s.x,s.y),a.rotate((r.startAngle-1)*n);for(let l=0;l<r.splitLine.splitNumber*r.splitLine.childNumber+1;l++)a.beginPath(),a.setStrokeStyle(r.splitLine.color),a.setLineWidth(1*o.pixelRatio),a.moveTo(g,0),a.lineTo(f,0),a.stroke(),a.rotate(p*n);a.restore(),r.pointer.width=r.pointer.width?r.pointer.width:15*o.pixelRatio,null==r.pointer.color||"auto"==r.pointer.color?"auto"==r.pointer.color:r.pointer.color==r.pointer.color,t=getGaugeDataPoints(t,e,r,l);for(let l,d=0;d<t.length;d++)l=t[d],a.save(),a.translate(s.x,s.y),a.rotate((l._proportion_-1)*n),a.beginPath(),a.setFillStyle(l.color),a.moveTo(r.pointer.width,0),a.lineTo(0,-r.pointer.width/2),a.lineTo(-h,0),a.lineTo(0,r.pointer.width/2),a.lineTo(r.pointer.width,0),a.closePath(),a.fill(),a.beginPath(),a.setFillStyle("#FFFFFF"),a.arc(0,0,r.pointer.width/6,0,2*n,!1),a.fill(),a.restore();return!1!==o.dataLabel&&drawGaugeLabel(r,d,s,o,i,a),drawRingTitle(o,i,a),1===l&&"gauge"===o.type&&(r.oldAngle=t[0]._proportion_,r.oldData=t[0].data),{center:s,radius:d,innerRadius:h,categories:e,totalAngle:c}}function drawRadarDataPoints(e,t,o,a){var n=Math.cos,l=Math.sin,r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,s=t.extra.radar||{},d=getRadarCoordinateSeries(t.categories.length),h={x:t.width/2,y:(t.height-o.legendHeight)/2},c=Math.min(h.x-(getMaxTextListLength(t.categories)+o.radarLabelTextMargin),h.y-o.radarLabelTextMargin);c-=o.padding,a.beginPath(),a.setLineWidth(1*t.pixelRatio),a.setStrokeStyle(s.gridColor||"#cccccc"),d.forEach(function(e){var t=convertCoordinateOrigin(c*n(e),c*l(e),h);a.moveTo(h.x,h.y),a.lineTo(t.x,t.y)}),a.stroke(),a.closePath();for(var x=function(e){var i={};a.beginPath(),a.setLineWidth(1*t.pixelRatio),a.setStrokeStyle(s.gridColor||"#cccccc"),d.forEach(function(t,r){var s=convertCoordinateOrigin(c/o.radarGridCount*e*n(t),c/o.radarGridCount*e*l(t),h);0===r?(i=s,a.moveTo(s.x,s.y)):a.lineTo(s.x,s.y)}),a.lineTo(i.x,i.y),a.stroke(),a.closePath()},p=1;p<=o.radarGridCount;p++)x(p);var g=getRadarDataPoints(d,h,c,e,t,r);return g.forEach(function(e,i){if(a.beginPath(),a.setFillStyle(e.color),a.setGlobalAlpha(.3),e.data.forEach(function(e,t){0===t?a.moveTo(e.position.x,e.position.y):a.lineTo(e.position.x,e.position.y)}),a.closePath(),a.fill(),a.setGlobalAlpha(1),!1!==t.dataPointShape){var n=o.dataPointShape[i%o.dataPointShape.length],l=e.data.map(function(e){return e.position});drawPointShape(l,e.color,n,a,t)}}),drawRadarLabel(d,c,h,t,o,a),{center:h,radius:c,angleList:d}}function drawCanvas(e,t){t.draw()}var Timing={easeIn:function(e){return Math.pow(e,3)},easeOut:function(e){return Math.pow(e-1,3)+1},easeInOut:function(e){var t=Math.pow;return 1>(e/=.5)?.5*t(e,3):.5*(t(e-2,3)+2)},linear:function(e){return e}};function Animation(e){this.isStop=!1,e.duration="undefined"==typeof e.duration?1e3:e.duration,e.timing=e.timing||"linear";var t=function(){return"undefined"==typeof requestAnimationFrame?"undefined"==typeof setTimeout?function(e){e(null)}:function(e,t){setTimeout(function(){var t=+new Date;e(t)},t)}:requestAnimationFrame}(),i=null,o=function(a){if(null===a||!0===this.isStop)return e.onProcess&&e.onProcess(1),void(e.onAnimationFinish&&e.onAnimationFinish());if(null===i&&(i=a),a-i<e.duration){var n=(a-i)/e.duration,l=Timing[e.timing];n=l(n),e.onProcess&&e.onProcess(n),t(o,17)}else e.onProcess&&e.onProcess(1),e.onAnimationFinish&&e.onAnimationFinish()};o=o.bind(this),t(o,17)}Animation.prototype.stop=function(){this.isStop=!0};function drawCharts(e,t,i,o){var a=this,n=t.series,l=t.categories;n=fillSeriesColor(n,i),n=fillSeriesType(n,t);let r=null;if("candle"==e){let e=assign({},t.extra.candle.average);e.show&&(r=calCandleMA(e.day,e.name,e.color,n[0].data),t.seriesMA=r)}var s=calLegendData(n,t,i),d=s.legendHeight;i.legendHeight=d;var h=calYAxisData(n,t,i),c=h.yAxisWidth;if(i.yAxisWidth=c,l&&l.length){var x=calCategoriesData(l,t,i),p=x.xAxisHeight,g=x.angle;i.xAxisHeight=p,i._xAxisTextAngle_=g}("pie"===e||"ring"===e||"rose"===e)&&(i._pieTextMaxLength_=!1===t.dataLabel?0:getPieTextMaxLength(n));var y=t.animation?t.duration:0;this.animationInstance&&this.animationInstance.stop(),"line"===e?this.animationInstance=new Animation({timing:"easeIn",duration:y,onProcess:function(e){o.clearRect(0,0,t.width,t.height),t.rotate&&contextRotate(o,t),drawYAxisGrid(l,t,i,o),drawXAxis(l,t,i,o);var r=drawLineDataPoints(n,t,i,o,e),s=r.xAxisPoints,d=r.calPoints,h=r.eachSpacing;a.chartData.xAxisPoints=s,a.chartData.calPoints=d,a.chartData.eachSpacing=h,drawLegend(t.series,t,i,o),drawYAxis(n,t,i,o),drawToolTipBridge(t,i,o,e,h,s),drawCanvas(t,o)},onAnimationFinish:function(){a.event.trigger("renderComplete")}}):"mix"===e?this.animationInstance=new Animation({timing:"easeIn",duration:y,onProcess:function(e){o.clearRect(0,0,t.width,t.height),t.rotate&&contextRotate(o,t),drawYAxisGrid(l,t,i,o),drawXAxis(l,t,i,o);var r=drawMixDataPoints(n,t,i,o,e),s=r.xAxisPoints,d=r.calPoints,h=r.eachSpacing;a.chartData.xAxisPoints=s,a.chartData.calPoints=d,a.chartData.eachSpacing=h,drawLegend(t.series,t,i,o),drawYAxis(n,t,i,o),drawToolTipBridge(t,i,o,e,h,s),drawCanvas(t,o)},onAnimationFinish:function(){a.event.trigger("renderComplete")}}):"column"===e?this.animationInstance=new Animation({timing:"easeIn",duration:y,onProcess:function(e){o.clearRect(0,0,t.width,t.height),t.rotate&&contextRotate(o,t),drawYAxisGrid(l,t,i,o),drawXAxis(l,t,i,o);var r=drawColumnDataPoints(n,t,i,o,e),s=r.xAxisPoints,d=r.calPoints,h=r.eachSpacing;a.chartData.xAxisPoints=s,a.chartData.calPoints=d,a.chartData.eachSpacing=h,drawLegend(t.series,t,i,o),drawYAxis(n,t,i,o),drawToolTipBridge(t,i,o,e,h,s),drawCanvas(t,o)},onAnimationFinish:function(){a.event.trigger("renderComplete")}}):"area"===e?this.animationInstance=new Animation({timing:"easeIn",duration:y,onProcess:function(e){o.clearRect(0,0,t.width,t.height),t.rotate&&contextRotate(o,t),drawYAxisGrid(l,t,i,o),drawXAxis(l,t,i,o);var r=drawAreaDataPoints(n,t,i,o,e),s=r.xAxisPoints,d=r.calPoints,h=r.eachSpacing;a.chartData.xAxisPoints=s,a.chartData.calPoints=d,a.chartData.eachSpacing=h,drawLegend(t.series,t,i,o),drawYAxis(n,t,i,o),drawToolTipBridge(t,i,o,e,h,s),drawCanvas(t,o)},onAnimationFinish:function(){a.event.trigger("renderComplete")}}):"ring"===e||"pie"===e?this.animationInstance=new Animation({timing:"easeInOut",duration:y,onProcess:function(e){o.clearRect(0,0,t.width,t.height),t.rotate&&contextRotate(o,t),a.chartData.pieData=drawPieDataPoints(n,t,i,o,e),drawLegend(t.series,t,i,o),drawToolTipBridge(t,i,o,e),drawCanvas(t,o)},onAnimationFinish:function(){a.event.trigger("renderComplete")}}):"rose"===e?this.animationInstance=new Animation({timing:"easeInOut",duration:y,onProcess:function(e){o.clearRect(0,0,t.width,t.height),t.rotate&&contextRotate(o,t),a.chartData.pieData=drawRoseDataPoints(n,t,i,o,e),drawLegend(t.series,t,i,o),drawToolTipBridge(t,i,o,e),drawCanvas(t,o)},onAnimationFinish:function(){a.event.trigger("renderComplete")}}):"radar"===e?this.animationInstance=new Animation({timing:"easeInOut",duration:y,onProcess:function(e){o.clearRect(0,0,t.width,t.height),t.rotate&&contextRotate(o,t),a.chartData.radarData=drawRadarDataPoints(n,t,i,o,e),drawLegend(t.series,t,i,o),drawToolTipBridge(t,i,o,e),drawCanvas(t,o)},onAnimationFinish:function(){a.event.trigger("renderComplete")}}):"arcbar"===e?this.animationInstance=new Animation({timing:"easeInOut",duration:y,onProcess:function(e){o.clearRect(0,0,t.width,t.height),t.rotate&&contextRotate(o,t),a.chartData.arcbarData=drawArcbarDataPoints(n,t,i,o,e),drawCanvas(t,o)},onAnimationFinish:function(){a.event.trigger("renderComplete")}}):"gauge"===e?this.animationInstance=new Animation({timing:"easeInOut",duration:y,onProcess:function(e){o.clearRect(0,0,t.width,t.height),t.rotate&&contextRotate(o,t),a.chartData.gaugeData=drawGaugeDataPoints(l,n,t,i,o,e),drawCanvas(t,o)},onAnimationFinish:function(){a.event.trigger("renderComplete")}}):"candle"===e?this.animationInstance=new Animation({timing:"easeIn",duration:y,onProcess:function(e){o.clearRect(0,0,t.width,t.height),t.rotate&&contextRotate(o,t),drawYAxisGrid(l,t,i,o),drawXAxis(l,t,i,o);var s=drawCandleDataPoints(n,r,t,i,o,e),d=s.xAxisPoints,h=s.calPoints,c=s.eachSpacing;a.chartData.xAxisPoints=d,a.chartData.calPoints=h,a.chartData.eachSpacing=c,r?drawLegend(r,t,i,o):drawLegend(t.series,t,i,o),drawYAxis(n,t,i,o),drawToolTipBridge(t,i,o,e,c,d),drawCanvas(t,o)},onAnimationFinish:function(){a.event.trigger("renderComplete")}}):void 0}function Event(){this.events={}}Event.prototype.addEventListener=function(e,t){this.events[e]=this.events[e]||[],this.events[e].push(t)},Event.prototype.trigger=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];var o=t[0],a=t.slice(1);!this.events[o]||this.events[o].forEach(function(e){try{e.apply(null,a)}catch(t){console.error(t)}})};var Charts=function(e){e.pixelRatio=e.pixelRatio?e.pixelRatio:1,e.fontSize=e.fontSize?e.fontSize*e.pixelRatio:13*e.pixelRatio,e.title=assign({},e.title),e.subtitle=assign({},e.subtitle),e.yAxis=assign({},{gridType:"solid",dashLength:4*e.pixelRatio},e.yAxis),e.xAxis=assign({},{rotateLabel:!1,type:"calibration",gridType:"solid",dashLength:4*e.pixelRatio,scrollAlign:"left"},e.xAxis),e.extra=assign({},e.extra),e.rotate=!!e.rotate,e.animation=!!e.animation;var t=assign({},config);if(t.yAxisTitleWidth=!0!==e.yAxis.disabled&&e.yAxis.title?t.yAxisTitleWidth:0,("pie"==e.type||"ring"==e.type)&&(t.pieChartLinePadding=!1===e.dataLabel?0:e.extra.pie.labelWidth*e.pixelRatio||t.pieChartLinePadding*e.pixelRatio),"rose"==e.type&&(t.pieChartLinePadding=!1===e.dataLabel?0:e.extra.rose.labelWidth*e.pixelRatio||t.pieChartLinePadding*e.pixelRatio),t.pieChartTextPadding=!1===e.dataLabel?0:t.pieChartTextPadding*e.pixelRatio,t.yAxisSplit=e.yAxis.splitNumber?e.yAxis.splitNumber:config.yAxisSplit,t.rotate=e.rotate,e.rotate){let t=e.width,i=e.height;e.width=i,e.height=t}if(t.yAxisWidth=config.yAxisWidth*e.pixelRatio,t.xAxisHeight=config.xAxisHeight*e.pixelRatio,e.enableScroll&&e.xAxis.scrollShow&&(t.xAxisHeight+=6*e.pixelRatio),t.xAxisLineHeight=config.xAxisLineHeight*e.pixelRatio,t.legendHeight=config.legendHeight*e.pixelRatio,t.padding=config.padding*e.pixelRatio,t.fontSize=e.fontSize,t.titleFontSize=config.titleFontSize*e.pixelRatio,t.subtitleFontSize=config.subtitleFontSize*e.pixelRatio,t.toolTipPadding=config.toolTipPadding*e.pixelRatio,t.toolTipLineHeight=config.toolTipLineHeight*e.pixelRatio,t.columePadding=config.columePadding*e.pixelRatio,this.opts=e,this.config=t,e.$this=e.$this?e.$this:this,this.context=uni.createCanvasContext(e.canvasId,e.$this),this.chartData={},this.event=new Event,this.scrollOption={currentOffset:0,startTouchX:0,distance:0,lastMoveTime:0},e.enableScroll&&"right"==e.xAxis.scrollAlign){let i=calYAxisData(e.series,e,t),o=i.yAxisWidth;t.yAxisWidth=o;let a=0,n=getXAxisPoints(e.categories,e,t),l=n.xAxisPoints,r=n.startX,s=n.endX,d=n.eachSpacing,h=d*(l.length-1);a=s-r-h,this.scrollOption={currentOffset:a,startTouchX:a,distance:0,lastMoveTime:0},e._scrollDistance_=a}drawCharts.call(this,e.type,e,t,this.context)};Charts.prototype.updateData=function(){let e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};this.opts=assign({},this.opts,e);let t=e.scrollPosition||"current";switch(t){case"current":this.opts._scrollDistance_=this.scrollOption.currentOffset;break;case"left":this.opts._scrollDistance_=0,this.scrollOption={currentOffset:0,startTouchX:0,distance:0,lastMoveTime:0};break;case"right":let e=calYAxisData(this.opts.series,this.opts,this.config),i=e.yAxisWidth;this.config.yAxisWidth=i;let o=0,a=getXAxisPoints(this.opts.categories,this.opts,this.config),n=a.xAxisPoints,l=a.startX,r=a.endX,s=a.eachSpacing,d=s*(n.length-1);o=r-l-d,this.scrollOption={currentOffset:o,startTouchX:o,distance:0,lastMoveTime:0},this.opts._scrollDistance_=o;}drawCharts.call(this,this.opts.type,this.opts,this.config,this.context)},Charts.prototype.zoom=function(){var e=Math.round,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.opts.xAxis.itemCount;if(!0!==this.opts.enableScroll)return void console.log("\u8BF7\u542F\u7528\u6EDA\u52A8\u6761\u540E\u4F7F\u7528\uFF01");let i=e(Math.abs(this.scrollOption.currentOffset)/this.chartData.eachSpacing)+e(this.opts.xAxis.itemCount/2);this.opts.animation=!1,this.opts.xAxis.itemCount=t.itemCount;let o=calYAxisData(this.opts.series,this.opts,this.config),a=o.yAxisWidth;this.config.yAxisWidth=a;let n=0,l=getXAxisPoints(this.opts.categories,this.opts,this.config),r=l.xAxisPoints,s=l.startX,d=l.endX,h=l.eachSpacing,c=d-s,x=c-h*(r.length-1);n=c/2-h*i,0<n&&(n=0),n<x&&(n=x),this.scrollOption={currentOffset:n,startTouchX:n,distance:0,lastMoveTime:0},this.opts._scrollDistance_=n,drawCharts.call(this,this.opts.type,this.opts,this.config,this.context)},Charts.prototype.stopAnimation=function(){this.animationInstance&&this.animationInstance.stop()},Charts.prototype.addEventListener=function(e,t){this.event.addEventListener(e,t)},Charts.prototype.getCurrentDataIndex=function(t){var e=null;if(e=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],e){var i=getTouches(e,this.opts,t);return"pie"===this.opts.type||"ring"===this.opts.type||"rose"===this.opts.type?findPieChartCurrentIndex({x:i.x,y:i.y},this.chartData.pieData):"radar"===this.opts.type?findRadarChartCurrentIndex({x:i.x,y:i.y},this.chartData.radarData,this.opts.categories.length):findCurrentIndex({x:i.x,y:i.y},this.chartData.xAxisPoints,this.opts,this.config,Math.abs(this.scrollOption.currentOffset))}return-1},Charts.prototype.showToolTip=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=null;if(i=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],!i)return void console.log("touchError");var o=getTouches(i,this.opts,t);if("line"===this.opts.type||"area"===this.opts.type||"column"===this.opts.type){var a=this.getCurrentDataIndex(t),n=this.scrollOption.currentOffset,l=assign({},this.opts,{_scrollDistance_:n,animation:!1});if(-1<a){var r=getSeriesDataItem(this.opts.series,a);if(0!==r.length){var s=getToolTipData(r,this.chartData.calPoints,a,this.opts.categories,e),d=s.textList,h=s.offset;h.y=o.y,l.tooltip={textList:d,offset:h,option:e,index:a}}}drawCharts.call(this,l.type,l,this.config,this.context)}if("mix"===this.opts.type){var a=this.getCurrentDataIndex(t),n=this.scrollOption.currentOffset,l=assign({},this.opts,{_scrollDistance_:n,animation:!1});if(-1<a){var r=getSeriesDataItem(this.opts.series,a);if(0!==r.length){var c=getMixToolTipData(r,this.chartData.calPoints,a,this.opts.categories,e),d=c.textList,h=c.offset;h.y=o.y,l.tooltip={textList:d,offset:h,option:e,index:a}}}drawCharts.call(this,l.type,l,this.config,this.context)}if("candle"===this.opts.type){var a=this.getCurrentDataIndex(t),n=this.scrollOption.currentOffset,l=assign({},this.opts,{_scrollDistance_:n,animation:!1});if(-1<a){var r=getSeriesDataItem(this.opts.series,a);if(0!==r.length){var s=getCandleToolTipData(this.opts.series[0].data,r,this.chartData.calPoints,a,this.opts.categories,this.opts.extra.candle,e),d=s.textList,h=s.offset;h.y=o.y,l.tooltip={textList:d,offset:h,option:e,index:a}}}drawCharts.call(this,l.type,l,this.config,this.context)}if("pie"===this.opts.type||"ring"===this.opts.type||"rose"===this.opts.type){var a=this.getCurrentDataIndex(t),n=this.scrollOption.currentOffset,l=assign({},this.opts,{_scrollDistance_:n,animation:!1});if(-1<a){var r=this.opts.series[a],d=[{text:e.format?e.format(r):r.name+": "+r.data,color:r.color}],h={x:o.x,y:o.y};l.tooltip={textList:d,offset:h,option:e,index:a}}drawCharts.call(this,l.type,l,this.config,this.context)}if("radar"===this.opts.type){var a=this.getCurrentDataIndex(t),n=this.scrollOption.currentOffset,l=assign({},this.opts,{_scrollDistance_:n,animation:!1});if(-1<a){var r=getSeriesDataItem(this.opts.series,a);if(0!==r.length){var d=r.map(function(t){return{text:e.format?e.format(t):t.name+": "+t.data,color:t.color}}),h={x:o.x,y:o.y};l.tooltip={textList:d,offset:h,option:e,index:a}}}drawCharts.call(this,l.type,l,this.config,this.context)}},Charts.prototype.translate=function(e){this.scrollOption={currentOffset:e,startTouchX:e,distance:0,lastMoveTime:0};let t=assign({},this.opts,{_scrollDistance_:e,animation:!1});drawCharts.call(this,this.opts.type,t,this.config,this.context)},Charts.prototype.scrollStart=function(t){var e=null;e=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0];var i=getTouches(e,this.opts,t);e&&!0===this.opts.enableScroll&&(this.scrollOption.startTouchX=i.x)},Charts.prototype.scroll=function(t){0===this.scrollOption.lastMoveTime&&(this.scrollOption.lastMoveTime=Date.now());let e=this.opts.extra.touchMoveLimit||20,i=Date.now(),o=i-this.scrollOption.lastMoveTime;if(!(o<Math.floor(1e3/e))){this.scrollOption.lastMoveTime=i;var a=null;a=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0];var n=getTouches(a,this.opts,t);if(a&&!0===this.opts.enableScroll){var l=n.x-this.scrollOption.startTouchX;var r=this.scrollOption.currentOffset,s=calValidDistance(r+l,this.chartData,this.config,this.opts);this.scrollOption.distance=l=s-r;var d=assign({},this.opts,{_scrollDistance_:r+l,animation:!1});return drawCharts.call(this,d.type,d,this.config,this.context),r+l}}},Charts.prototype.scrollEnd=function(){if(!0===this.opts.enableScroll){var e=this.scrollOption,t=e.currentOffset,i=e.distance;this.scrollOption.currentOffset=t+i,this.scrollOption.distance=0}},"object"==typeof module&&"object"==typeof module.exports&&(module.exports=Charts);u-parsecomponentswxParseAudio.vue wxParseImg.vue <image :mode="node.attr.mode" :lazy-load="node.attr.lazyLoad" :class="node.classStr" :style="newStyleStr || node.styleStr" :data-src="node.attr.src" :src="node.attr.src" @tap="wxParseImgTap" @load="wxParseImgLoad" /> wxParseTemplate0.vue <view> <block v-if="node.node == 'element'"> <block v-if="node.tag == 'button'"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </block> <block v-else-if="node.tag == 'li'"> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'video'"> <wx-parse-video :node="node" /> </block> <block v-else-if="node.tag == 'audio'"> <wx-parse-audio :node="node" /> </block> <block v-else-if="node.tag == 'img'"> <wx-parse-img :node="node" /> </block> <block v-else-if="node.tag == 'a'"> <view @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'table'"> <view :class="node.classStr" class="table" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'br'"> <text>\n</text> </block> <block v-else> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> </view> wxParseTemplate1.vue <view :class="(node.tag == 'li' ? node.classStr : (node.node==='text'?'text':''))"> <block v-if="node.node == 'element'"> <block v-if="node.tag == 'button'"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </block> <block v-else-if="node.tag == 'li'"> <!-- <view :class="node.classStr" :style="node.styleStr"> --> <view :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'video'"> <wx-parse-video :node="node" /> </block> <block v-else-if="node.tag == 'audio'"> <wx-parse-audio :node="node" /> </block> <block v-else-if="node.tag == 'img'"> <wx-parse-img :node="node" /> </block> <block v-else-if="node.tag == 'a'"> <view @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'br'"> <text>\n</text> </block> <block v-else> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> </view> wxParseTemplate10.vue <view> <block v-if="node.node == 'element'"> <block v-if="node.tag == 'button'"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </block> <block v-else-if="node.tag == 'li'"> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'video'"> <wx-parse-video :node="node" /> </block> <block v-else-if="node.tag == 'audio'"> <wx-parse-audio :node="node" /> </block> <block v-else-if="node.tag == 'img'"> <wx-parse-img :node="node" /> </block> <block v-else-if="node.tag == 'a'"> <view @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'br'"> <text>\n</text> </block> <block v-else> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> </view> wxParseTemplate11.vue <view> <block v-if="node.node == 'element'"> <block v-if="node.tag == 'button'"> </block> <block v-else-if="node.tag == 'li'"> <view :class="node.classStr" :style="node.styleStr"> {{node.text}} </view> </block> <block v-else-if="node.tag == 'video'"> <wx-parse-video :node="node" /> </block> <block v-else-if="node.tag == 'audio'"> <wx-parse-audio :node="node" /> </block> <block v-else-if="node.tag == 'img'"> <wx-parse-img :node="node" /> </block> <block v-else-if="node.tag == 'a'"> <view @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> {{node.text}} </view> </block> <block v-else-if="node.tag == 'br'"> <text>\n</text> </block> <block v-else> <view :class="node.classStr" :style="node.styleStr"> {{node.text}} </view> </block> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> </view> wxParseTemplate2.vue <view> <block v-if="node.node == 'element'"> <block v-if="node.tag == 'button'"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </block> <block v-else-if="node.tag == 'li'"> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'video'"> <wx-parse-video :node="node" /> </block> <block v-else-if="node.tag == 'audio'"> <wx-parse-audio :node="node" /> </block> <block v-else-if="node.tag == 'img'"> <wx-parse-img :node="node" /> </block> <block v-else-if="node.tag == 'a'"> <view @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'br'"> <text>\n</text> </block> <block v-else> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> </view> wxParseTemplate3.vue <view> <block v-if="node.node == 'element'"> <block v-if="node.tag == 'button'"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </block> <block v-else-if="node.tag == 'li'"> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'video'"> <wx-parse-video :node="node" /> </block> <block v-else-if="node.tag == 'audio'"> <wx-parse-audio :node="node" /> </block> <block v-else-if="node.tag == 'img'"> <wx-parse-img :node="node" /> </block> <block v-else-if="node.tag == 'a'"> <view @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'br'"> <text>\n</text> </block> <block v-else> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> </view> wxParseTemplate4.vue <view> <block v-if="node.node == 'element'"> <block v-if="node.tag == 'button'"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </block> <block v-else-if="node.tag == 'li'"> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'video'"> <wx-parse-video :node="node" /> </block> <block v-else-if="node.tag == 'audio'"> <wx-parse-audio :node="node" /> </block> <block v-else-if="node.tag == 'img'"> <wx-parse-img :node="node" /> </block> <block v-else-if="node.tag == 'a'"> <view @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'br'"> <text>\n</text> </block> <block v-else> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> </view> wxParseTemplate5.vue <view> <block v-if="node.node == 'element'"> <block v-if="node.tag == 'button'"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </block> <block v-else-if="node.tag == 'li'"> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'video'"> <wx-parse-video :node="node" /> </block> <block v-else-if="node.tag == 'audio'"> <wx-parse-audio :node="node" /> </block> <block v-else-if="node.tag == 'img'"> <wx-parse-img :node="node" /> </block> <block v-else-if="node.tag == 'a'"> <view @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'br'"> <text>\n</text> </block> <block v-else> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> </view> wxParseTemplate6.vue <view> <block v-if="node.node == 'element'"> <block v-if="node.tag == 'button'"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </block> <block v-else-if="node.tag == 'li'"> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'video'"> <wx-parse-video :node="node" /> </block> <block v-else-if="node.tag == 'audio'"> <wx-parse-audio :node="node" /> </block> <block v-else-if="node.tag == 'img'"> <wx-parse-img :node="node" /> </block> <block v-else-if="node.tag == 'a'"> <view @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'br'"> <text>\n</text> </block> <block v-else> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> </view> wxParseTemplate7.vue <view> <block v-if="node.node == 'element'"> <block v-if="node.tag == 'button'"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </block> <block v-else-if="node.tag == 'li'"> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'video'"> <wx-parse-video :node="node" /> </block> <block v-else-if="node.tag == 'audio'"> <wx-parse-audio :node="node" /> </block> <block v-else-if="node.tag == 'img'"> <wx-parse-img :node="node" /> </block> <block v-else-if="node.tag == 'a'"> <view @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'br'"> <text>\n</text> </block> <block v-else> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> </view> wxParseTemplate8.vue <view> <block v-if="node.node == 'element'"> <block v-if="node.tag == 'button'"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </block> <block v-else-if="node.tag == 'li'"> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'video'"> <wx-parse-video :node="node" /> </block> <block v-else-if="node.tag == 'audio'"> <wx-parse-audio :node="node" /> </block> <block v-else-if="node.tag == 'img'"> <wx-parse-img :node="node" /> </block> <block v-else-if="node.tag == 'a'"> <view @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'br'"> <text>\n</text> </block> <block v-else> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> </view> wxParseTemplate9.vue <view> <block v-if="node.node == 'element'"> <block v-if="node.tag == 'button'"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </block> <block v-else-if="node.tag == 'li'"> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'video'"> <wx-parse-video :node="node" /> </block> <block v-else-if="node.tag == 'audio'"> <wx-parse-audio :node="node" /> </block> <block v-else-if="node.tag == 'img'"> <wx-parse-img :node="node" /> </block> <block v-else-if="node.tag == 'a'"> <view @click="wxParseATap" :class="node.classStr" :data-href="node.attr.href" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> <block v-else-if="node.tag == 'br'"> <text>\n</text> </block> <block v-else> <view :class="node.classStr" :style="node.styleStr"> <block v-for="(node, index) of node.nodes" :key="index"> <wx-parse-template :node="node" /> </block> </view> </block> </block> <block v-else-if="node.node == 'text'">{{node.text}}</block> </view> wxParseVideo.vue <view :class="node.classStr" :style="node.styleStr"> </view> libshtml2json.js/** * html2Json 改造来自: https://github.com/Jxck/html2json * * * author: Di (微信小程序开发工程师) * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com) * 垂直微信小程序开发交流社区 * * github地址: https://github.com/icindy/wxParse * * for: 微信小程序富文本解析 * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184 */ import wxDiscode from './wxDiscode'; import HTMLParser from './htmlparser'; function makeMap(str) { const obj = {}; const items = str.split(','); for (let i = 0; i < items.length; i += 1) obj[items[i]] = true; return obj; } // Block Elements - HTML 5 const block = makeMap('br,code,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,ins,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 const inline = makeMap('a,abbr,acronym,applet,b,basefont,bdo,big,button,cite,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) const closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); function removeDOCTYPE(html) { const isDocument = /<body.*>([^]*)<\/body>/.test(html); return isDocument ? RegExp.$1 : html; } function trimHtml(html) { return html .replace(/ /gi, '') .replace(/\/\*.*?\*\//gi, '') .replace(/[ ]+</gi, '<') .replace(/<script[^]*<\/script>/gi, '') .replace(/<style[^]*<\/style>/gi, ''); } function getScreenInfo() { const screen = {}; wx.getSystemInfo({ success: (res) => { screen.width = res.windowWidth; screen.height = res.windowHeight; }, }); return screen; } function html2json(html, customHandler, imageProp, host) { // 处理字符串 html = removeDOCTYPE(html); html = trimHtml(html); html = wxDiscode.strDiscode(html); // 生成node节点 const bufArray = []; const results = { nodes: [], imageUrls: [], }; const screen = getScreenInfo(); function Node(tag) { this.node = 'element'; this.tag = tag; this.$screen = screen; } HTMLParser(html, { start(tag, attrs, unary) { // node for this element const node = new Node(tag); if (bufArray.length !== 0) { const parent = bufArray[0]; if (parent.nodes === undefined) { parent.nodes = []; } } if (block[tag]) { node.tagType = 'block'; } else if (inline[tag]) { node.tagType = 'inline'; } else if (closeSelf[tag]) { node.tagType = 'closeSelf'; } node.attr = attrs.reduce((pre, attr) => { const { name } = attr; let { value } = attr; if (name === 'class') { node.classStr = value; } // has multi attibutes // make it array of attribute if (name === 'style') { node.styleStr = value; } if (value.match(/ /)) { value = value.split(' '); } // if attr already exists // merge it if (pre[name]) { if (Array.isArray(pre[name])) { // already array, push to last pre[name].push(value); } else { // single value, make it array pre[name] = [pre[name], value]; } } else { // not exist, put it pre[name] = value; } return pre; }, {}); // 优化样式相关属性 if (node.classStr) { node.classStr += ` ${node.tag}`; } else { node.classStr = node.tag; } if (node.tagType === 'inline') { node.classStr += ' inline'; } // 对img添加额外数据 if (node.tag === 'img') { let imgUrl = node.attr.src; imgUrl = wxDiscode.urlToHttpUrl(imgUrl, imageProp.domain); Object.assign(node.attr, imageProp, { src: imgUrl || '', }); if (imgUrl) { results.imageUrls.push(imgUrl); } } // 处理a标签属性 if (node.tag === 'a') { node.attr.href = node.attr.href || ''; } // 处理font标签样式属性 if (node.tag === 'font') { const fontSize = [ 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', '-webkit-xxx-large', ]; const styleAttrs = { color: 'color', face: 'font-family', size: 'font-size', }; if (!node.styleStr) node.styleStr = ''; Object.keys(styleAttrs).forEach((key) => { if (node.attr[key]) { const value = key === 'size' ? fontSize[node.attr[key] - 1] : node.attr[key]; node.styleStr += `${styleAttrs[key]}: ${value};`; } }); } // 临时记录source资源 if (node.tag === 'source') { results.source = node.attr.src; } if (customHandler.start) { customHandler.start(node, results); } if (unary) { // if this tag doesn't have end tag // like // add to parents const parent = bufArray[0] || results; if (parent.nodes === undefined) { parent.nodes = []; } parent.nodes.push(node); } else { bufArray.unshift(node); } }, end(tag) { // merge into parent tag const node = bufArray.shift(); if (node.tag !== tag) { // console.error('invalid state: mismatch end tag'); } // 当有缓存source资源时于于video补上src资源 if (node.tag === 'video' && results.source) { node.attr.src = results.source; delete results.source; } if (customHandler.end) { customHandler.end(node, results); } if (bufArray.length === 0) { results.nodes.push(node); } else { const parent = bufArray[0]; if (!parent.nodes) { parent.nodes = []; } parent.nodes.push(node); } }, chars(text) { if (!text.trim()) return; const node = { node: 'text', text, }; if (customHandler.chars) { customHandler.chars(node, results); } if (bufArray.length === 0) { results.nodes.push(node); } else { const parent = bufArray[0]; if (parent.nodes === undefined) { parent.nodes = []; } parent.nodes.push(node); } }, }); return results; } export default html2json; htmlparser.js/** * * htmlParser改造自: https://github.com/blowsie/Pure-JavaScript-HTML5-Parser * * author: Di (微信小程序开发工程师) * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com) * 垂直微信小程序开发交流社区 * * github地址: https://github.com/icindy/wxParse * * for: 微信小程序富文本解析 * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184 */ // Regular Expressions for parsing tags and attributes const startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z0-9_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/; const endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/; const attr = /([a-zA-Z0-9_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g; function makeMap(str) { const obj = {}; const items = str.split(','); for (let i = 0; i < items.length; i += 1) obj[items[i]] = true; return obj; } // Empty Elements - HTML 5 const empty = makeMap('area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr'); // Block Elements - HTML 5 const block = makeMap('address,code,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,ins,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 const inline = makeMap('a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,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) const closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); // Attributes that have their values filled in disabled="disabled" const fillAttrs = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected'); function HTMLParser(html, handler) { let index; let chars; let match; let last = html; const stack = []; stack.last = () => stack[stack.length - 1]; function parseEndTag(tag, tagName) { // If no tag name is provided, clean shop let pos; if (!tagName) { pos = 0; } else { // Find the closest opened tag of the same type tagName = tagName.toLowerCase(); for (pos = stack.length - 1; pos >= 0; pos -= 1) { if (stack[pos] === tagName) break; } } if (pos >= 0) { // Close all the open elements, up the stack for (let i = stack.length - 1; i >= pos; i -= 1) { if (handler.end) handler.end(stack[i]); } // Remove the open elements from the stack stack.length = pos; } } 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) { const attrs = []; rest.replace(attr, function genAttr(matches, name) { const value = arguments[2] || arguments[3] || arguments[4] || (fillAttrs[name] ? name : ''); attrs.push({ name, value, escaped: value.replace(/(^|[^\\])"/g, '$1\\"'), // " }); }); if (handler.start) { handler.start(tagName, attrs, unary); } } } while (html) { chars = true; 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('<'); let text = ''; while (index === 0) { text += '<'; html = html.substring(1); index = html.indexOf('<'); } text += index < 0 ? html : html.substring(0, index); html = index < 0 ? '' : html.substring(index); if (handler.chars) handler.chars(text); } if (html === last) throw new Error(`Parse Error: ${html}`); last = html; } // Clean up any remaining tags parseEndTag(); } export default HTMLParser; wxDiscode.js// HTML 支持的数学符号 function strNumDiscode(str) { str = str.replace(/∀/g, '∀'); str = str.replace(/∂/g, '∂'); str = str.replace(/∃/g, '∃'); str = str.replace(/∅/g, '∅'); str = str.replace(/∇/g, '∇'); str = str.replace(/∈/g, '∈'); str = str.replace(/∉/g, '∉'); str = str.replace(/∋/g, '∋'); str = str.replace(/∏/g, '∏'); str = str.replace(/∑/g, '∑'); str = str.replace(/−/g, '−'); str = str.replace(/∗/g, '∗'); str = str.replace(/√/g, '√'); str = str.replace(/∝/g, '∝'); str = str.replace(/∞/g, '∞'); str = str.replace(/∠/g, '∠'); str = str.replace(/∧/g, '∧'); str = str.replace(/∨/g, '∨'); str = str.replace(/∩/g, '∩'); str = str.replace(/∪/g, '∪'); str = str.replace(/∫/g, '∫'); str = str.replace(/∴/g, '∴'); str = str.replace(/∼/g, '∼'); str = str.replace(/≅/g, '≅'); str = str.replace(/≈/g, '≈'); str = str.replace(/≠/g, '≠'); str = str.replace(/≤/g, '≤'); str = str.replace(/≥/g, '≥'); str = str.replace(/⊂/g, '⊂'); str = str.replace(/⊃/g, '⊃'); str = str.replace(/⊄/g, '⊄'); str = str.replace(/⊆/g, '⊆'); str = str.replace(/⊇/g, '⊇'); str = str.replace(/⊕/g, '⊕'); str = str.replace(/⊗/g, '⊗'); str = str.replace(/⊥/g, '⊥'); str = str.replace(/⋅/g, '⋅'); return str; } // HTML 支持的希腊字母 function strGreeceDiscode(str) { str = str.replace(/Α/g, 'Α'); str = str.replace(/Β/g, 'Β'); str = str.replace(/Γ/g, 'Γ'); str = str.replace(/Δ/g, 'Δ'); str = str.replace(/Ε/g, 'Ε'); str = str.replace(/Ζ/g, 'Ζ'); str = str.replace(/Η/g, 'Η'); str = str.replace(/Θ/g, 'Θ'); str = str.replace(/Ι/g, 'Ι'); str = str.replace(/Κ/g, 'Κ'); str = str.replace(/Λ/g, 'Λ'); str = str.replace(/Μ/g, 'Μ'); str = str.replace(/Ν/g, 'Ν'); str = str.replace(/Ξ/g, 'Ν'); str = str.replace(/Ο/g, 'Ο'); str = str.replace(/Π/g, 'Π'); str = str.replace(/Ρ/g, 'Ρ'); str = str.replace(/Σ/g, 'Σ'); str = str.replace(/Τ/g, 'Τ'); str = str.replace(/Υ/g, 'Υ'); str = str.replace(/Φ/g, 'Φ'); str = str.replace(/Χ/g, 'Χ'); str = str.replace(/Ψ/g, 'Ψ'); str = str.replace(/Ω/g, 'Ω'); str = str.replace(/α/g, 'α'); str = str.replace(/β/g, 'β'); str = str.replace(/γ/g, 'γ'); str = str.replace(/δ/g, 'δ'); str = str.replace(/ε/g, 'ε'); str = str.replace(/ζ/g, 'ζ'); str = str.replace(/η/g, 'η'); str = str.replace(/θ/g, 'θ'); str = str.replace(/ι/g, 'ι'); str = str.replace(/κ/g, 'κ'); str = str.replace(/λ/g, 'λ'); str = str.replace(/μ/g, 'μ'); str = str.replace(/ν/g, 'ν'); str = str.replace(/ξ/g, 'ξ'); str = str.replace(/ο/g, 'ο'); str = str.replace(/π/g, 'π'); str = str.replace(/ρ/g, 'ρ'); str = str.replace(/ς/g, 'ς'); str = str.replace(/σ/g, 'σ'); str = str.replace(/τ/g, 'τ'); str = str.replace(/υ/g, 'υ'); str = str.replace(/φ/g, 'φ'); str = str.replace(/χ/g, 'χ'); str = str.replace(/ψ/g, 'ψ'); str = str.replace(/ω/g, 'ω'); str = str.replace(/ϑ/g, 'ϑ'); str = str.replace(/ϒ/g, 'ϒ'); str = str.replace(/ϖ/g, 'ϖ'); str = str.replace(/·/g, '·'); return str; } function strcharacterDiscode(str) { // 加入常用解析 str = str.replace(/ /g, ' '); str = str.replace(/ /g, ' '); str = str.replace(/ /g, ' '); str = str.replace(/"/g, "'"); str = str.replace(/&/g, '&'); str = str.replace(/</g, '<'); str = str.replace(/>/g, '>'); str = str.replace(/•/g, '•'); return str; } // HTML 支持的其他实体 function strOtherDiscode(str) { str = str.replace(/Œ/g, 'Œ'); str = str.replace(/œ/g, 'œ'); str = str.replace(/Š/g, 'Š'); str = str.replace(/š/g, 'š'); str = str.replace(/Ÿ/g, 'Ÿ'); str = str.replace(/ƒ/g, 'ƒ'); str = str.replace(/ˆ/g, 'ˆ'); str = str.replace(/˜/g, '˜'); str = str.replace(/ /g, ''); str = str.replace(/ /g, ''); str = str.replace(/ /g, ''); str = str.replace(//g, ''); str = str.replace(//g, ''); str = str.replace(//g, ''); str = str.replace(//g, ''); str = str.replace(/–/g, '–'); str = str.replace(/—/g, '—'); str = str.replace(/‘/g, '‘'); str = str.replace(/’/g, '’'); str = str.replace(/‚/g, '‚'); str = str.replace(/“/g, '“'); str = str.replace(/”/g, '”'); str = str.replace(/„/g, '„'); str = str.replace(/†/g, '†'); str = str.replace(/‡/g, '‡'); str = str.replace(/•/g, '•'); str = str.replace(/…/g, '…'); str = str.replace(/‰/g, '‰'); str = str.replace(/′/g, '′'); str = str.replace(/″/g, '″'); str = str.replace(/‹/g, '‹'); str = str.replace(/›/g, '›'); str = str.replace(/‾/g, '‾'); str = str.replace(/€/g, '€'); str = str.replace(/™/g, '™'); str = str.replace(/←/g, '←'); str = str.replace(/↑/g, '↑'); str = str.replace(/→/g, '→'); str = str.replace(/↓/g, '↓'); str = str.replace(/↔/g, '↔'); str = str.replace(/↵/g, '↵'); str = str.replace(/⌈/g, '⌈'); str = str.replace(/⌉/g, '⌉'); str = str.replace(/⌊/g, '⌊'); str = str.replace(/⌋/g, '⌋'); str = str.replace(/◊/g, '◊'); str = str.replace(/♠/g, '♠'); str = str.replace(/♣/g, '♣'); str = str.replace(/♥/g, '♥'); str = str.replace(/♦/g, '♦'); str = str.replace(/'/g, "'"); return str; } function strDiscode(str) { str = strNumDiscode(str); str = strGreeceDiscode(str); str = strcharacterDiscode(str); str = strOtherDiscode(str); return str; } function urlToHttpUrl(url, domain) { if (/^\/\//.test(url)) { return `https:${url}`; } else if (/^\//.test(url)) { return `https://${domain}${url}`; } return url; } export default { strDiscode, urlToHttpUrl, }; readme.md## uParse 适用于 uni-app/mpvue 的富文本解析组件 > 支持 Html、Markdown 解析，Fork自: [mpvue-wxParse](https://github.com/F-loat/mpvue-wxParse) ## 属性 | 名称 | 类型 | 默认值 | 描述 | | -----------------|--------------- | ------------- | ---------------- | | loading | Boolean | false | 数据加载状态 | | className | String | — | 自定义 class 名称 | | content | String | — | 渲染内容 | | noData | String | 数据不能为空 | 空数据时的渲染展示 | | startHandler | Function | 见源码 | 自定义 parser 函数 | | endHandler | Function | null | 自定义 parser 函数 | | charsHandler | Function | null | 自定义 parser 函数 | | imageProp | Object | 见下文 | 图片相关参数 | ### 自定义 parser 函数具体介绍 * 传入的参数为当前节点 `node` 对象及解析结果 `results` 对象，例如 `startHandler(node, results)` * 无需返回值，通过对传入的参数直接操作来完成需要的改动 * 自定义函数会在原解析函数处理之后执行 ### imageProp 对象具体属性 | 名称 | 类型 | 默认值 | 描述 | | -----------------|--------------- | ------------- | ------------------ | | mode | String | 'aspectFit' | 图片裁剪、缩放的模式 | | padding | Number | 0 | 图片内边距 | | lazyLoad | Boolean | false | 图片懒加载 | | domain | String | '' | 图片服务域名 | ## 事件 | 名称 | 参数 | 描述 | | -----------------|----------------- | ---------------- | | preview | 图片地址，原始事件 | 预览图片时触发 | | navigate | 链接地址，原始事件 | 点击链接时触发 | ## 基本使用方法 <u-parse :content="article" @preview="preview" @navigate="navigate" /> ## 渲染 Markdown > 先将 markdown 转换为 html 即可 npm install markedimport marked from 'marked'import uParse from '@/components/u-parse/u-parse.vue'export default { components: {uParse}, data () {return { article: marked(`#hello, markdown!`) }}}u-parse.css/** * author: Di (微信小程序开发工程师) * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com) * 垂直微信小程序开发交流社区 * * github地址: https://github.com/icindy/wxParse * * for: 微信小程序富文本解析 * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184 */ .wxParse { width: 100%; font-family: Helvetica, sans-serif; font-size: 30upx; color: #666; line-height: 1.8; } .wxParse view { word-break: hyphenate; } .wxParse .inline { display: inline; margin: 0; padding: 0; } .wxParse .div { margin: 0; padding: 0; } .wxParse .h1 .text { font-size: 2em; margin: 0.67em 0; } .wxParse .h2 .text { font-size: 1.5em; margin: 0.83em 0; } .wxParse .h3 .text { font-size: 1.17em; margin: 1em 0; } .wxParse .h4 .text { margin: 1.33em 0; } .wxParse .h5 .text { font-size: 0.83em; margin: 1.67em 0; } .wxParse .h6 .text { font-size: 0.67em; margin: 2.33em 0; } .wxParse .h1 .text, .wxParse .h2 .text, .wxParse .h3 .text, .wxParse .h4 .text, .wxParse .h5 .text, .wxParse .h6 .text, .wxParse .b, .wxParse .strong { font-weight: bolder; } .wxParse .p { margin: 1em 0; } .wxParse .i, .wxParse .cite, .wxParse .em, .wxParse .var, .wxParse .address { font-style: italic; } .wxParse .pre, .wxParse .tt, .wxParse .code, .wxParse .kbd, .wxParse .samp { font-family: monospace; } .wxParse .pre { overflow: auto; background: #f5f5f5; padding: 16upx; white-space: pre; margin: 1em 0upx; } .wxParse .code { display: inline; background: #f5f5f5; } .wxParse .big { font-size: 1.17em; } .wxParse .small, .wxParse .sub, .wxParse .sup { font-size: 0.83em; } .wxParse .sub { vertical-align: sub; } .wxParse .sup { vertical-align: super; } .wxParse .s, .wxParse .strike, .wxParse .del { text-decoration: line-through; } .wxParse .strong, .wxParse .s { display: inline; } .wxParse .a { color: deepskyblue; } .wxParse .video { text-align: center; margin: 22upx 0; } .wxParse .video-video { width: 100%; } .wxParse .img { display: inline-block; width: 0; height: 0; max-width: 100%; overflow: hidden; } .wxParse .blockquote { margin: 10upx 0; padding: 22upx 0 22upx 22upx; font-family: Courier, Calibri, "宋体"; background: #f5f5f5; border-left: 6upx solid #dbdbdb; } .wxParse .blockquote .p { margin: 0; } .wxParse .ul, .wxParse .ol { display: block; margin: 1em 0; padding-left: 33upx; } .wxParse .ol { list-style-type: disc; } .wxParse .ol { list-style-type: decimal; } .wxParse .ol>weixin-parse-template,.wxParse .ul>weixin-parse-template { display: list-item; align-items: baseline; text-align: match-parent; } .wxParse .ol>.li,.wxParse .ul>.li { display: list-item; align-items: baseline; text-align: match-parent; } .wxParse .ul .ul, .wxParse .ol .ul { list-style-type: circle; } .wxParse .ol .ol .ul, .wxParse .ol .ul .ul, .wxParse .ul .ol .ul, .wxParse .ul .ul .ul { list-style-type: square; } .wxParse .u { text-decoration: underline; } .wxParse .hide { display: none; } .wxParse .del { display: inline; } .wxParse .figure { overflow: hidden; } .wxParse .table { width: 100%; } .wxParse .thead, .wxParse .tfoot, .wxParse .tr { display: flex; flex-direction: row; } .wxParse .tr { width:100%; display: flex; border-right: 2upx solid #e0e0e0; border-bottom: 2upx solid #e0e0e0; } .wxParse .th, .wxParse .td { display: flex; width: 1276upx; overflow: auto; flex: 1; padding: 11upx; border-left: 2upx solid #e0e0e0; } .wxParse .td:last { border-top: 2upx solid #e0e0e0; } .wxParse .th { background: #f0f0f0; border-top: 2upx solid #e0e0e0; } u-parse.vue <block v-for="(node,index) of nodes" :key="index"> <wxParseTemplate :node="node" /> </block> uni-countdownreadme.md### CountDown 倒计时 倒计时组件，组件名：``uni-countdown``，代码块： uCountDown。 **使用方式：** 在 ``script`` 中引用组件 import uniCountdown from "@/components/uni-countdown/uni-countdown.vue"export default {components: {uniCountdown}} 一般用法 <uni-countdown:day="1" :hour="1" :minute="12" :second="40"></uni-countdown> 不显示天数 <uni-countdown:show-day="false" :hour="12" :minute="12" :second="12"></uni-countdown> 修改颜色 <uni-countdowncolor="#FFFFFF" background-color="#00B26A" border-color="#00B26A" :day="1" :hour="2" :minute="30" :second="0"></uni-countdown> 实际效果参考：[https://github.com/dcloudio/uni-ui](https://github.com/dcloudio/uni-ui) **uniCountDown 属性说明：** |属性名|类型|默认值 |说明| |---|----|---|---| |background-color|String|#FFFFFF|背景色| |border-color|String|#000000|边框颜色| |color |String |#000000|文字颜色| |splitor-color|String|#000000|割符号颜色| |day|Number|0|天数| |hour|Number|0|小时| |minute|Number|0|分钟| |second|Number|0|秒| |show-day|Boolean|true|是否显示天数| |show-colon|Boolean|true|是否以冒号为分隔符| **uniCountDown 事件说明：** |事件称名|说明|返回参数| |---|----|---| |timeup|倒计时时间到触发事件|-| uni-countdown.vue <view class="uni-countdown"> <view v-if="showDay && d!=0" class="uni-countdown__number" :style="{borderColor:borderColor, color:color, background:backgroundColor}">{{d}}</view> <view v-if="showDay && d!=0" class="uni-countdown__splitor" :style="{color:textColor}">天</view> <view class="uni-countdown__number" :style="{borderColor:borderColor, color:color, background:backgroundColor}">{{h}}</view> <view class="uni-countdown__splitor" :style="{color:textColor}">{{showColon ? ':' : '时'}}</view> <view class="uni-countdown__number" :style="{borderColor:borderColor, color:color, background:backgroundColor}">{{i}}</view> <view class="uni-countdown__splitor" :style="{color:textColor}">{{showColon ? ':' : '分'}}</view> <view class="uni-countdown__number" :style="{borderColor:borderColor, color:color, background:backgroundColor}">{{s}}</view> <view v-if="!showColon" class="uni-countdown__splitor" :style="{color:textColor}">秒</view> </view> uni-fabuni-fab.vue <view> <view class="fab-box fab" :class="{ leftBottom: leftBottom, rightBottom: rightBottom, leftTop: leftTop, rightTop: rightTop }" > <view class="fab-circle" :class="{ left: horizontal === 'left' && direction === 'horizontal', top: vertical === 'top' && direction === 'vertical', bottom: vertical === 'bottom' && direction === 'vertical', right: horizontal === 'right' && direction === 'horizontal' }" :style="{ 'background-color': styles.buttonColor }" @click="open" > <image class="icon icon-jia" src="../../../static/image/menu.png" mode="" :class="{ active: showContent }"></image> <!-- <text class="icon icon-jia" :class="{ active: showContent }"></text> --> </view> <view class="fab-content" :class="{ left: horizontal === 'left', right: horizontal === 'right', flexDirection: direction === 'vertical', flexDirectionStart: flexDirectionStart, flexDirectionEnd: flexDirectionEnd }" :style="{ width: boxWidth, height: boxHeight, background: styles.backgroundColor }" > <view v-if="flexDirectionStart || horizontalLeft" class="fab-item first"></view> <view class="fab-item" v-for="(item, index) in content" :key="index" :class="{ active: showContent }" :style="{ color: item.active ? styles.selectedColor : styles.color }" @click="taps(index, item)" > <image class="content-image icon" :src="item.active ? item.selectedIconPath : item.iconPath" mode="" ></image> <text class="text">{{ item.text }}</text> </view> <view v-if="flexDirectionEnd || horizontalRight" class="fab-item first"></view> </view> </view> </view> uni-iconreadme.md### Icon 图标 用于展示 icon，组件名：``uni-icon``，代码块： uIcon。 **使用方式：** 在 ``script`` 中引用组件 import uniIcon from "@/components/uni-icon/uni-icon.vue"export default {components: {uniIcon}} 在 ``template`` 中使用组件 <uni-icon type="contact" size="30"></uni-icon> 实际效果参考：[https://github.com/dcloudio/uni-ui](https://github.com/dcloudio/uni-ui) **Icon 属性说明：** |属性名 |类型|默认值 |说明| |---|----|---|---| |type |String |-|图标图案，参考下表| |color |String |-|图标颜色 | |size |Number |24|图标大小| |@click |EventHandle|-|点击 Icon 触发事件| **type 类型：** contact person personadd contact-filled person-filled personadd-filled phone email chatbubble chatboxes phone-filled email-filled chatbubble-filled chatboxes-filled weibo weixin pengyouquan chat qq videocam camera mic location mic-filled location-filled micoff image map compose trash upload download close redo undo refresh star plus minus circle clear refresh-filled star-filled plus-filled minus-filled circle-filled checkbox-filled closeempty refreshempty reload starhalf spinner spinner-cycle search plusempty forward back checkmarkempty home navigate gear paperplane info help locked more flag home-filled gear-filled info-filled help-filled more-filled settings list bars loop paperclip eye arrowup arrowdown arrowleft arrowright arrowthinup arrowthindown arrowthinleft arrowthinright pulldown scan uni-icon.vue <view class="uni-icon" :class="['uni-icon-'+type]" :style="{color:color,'font-size':fontSize}" @click="onClick()"></view> uni-load-morereadme.md### LoadMore 加载更多 用于列表中，做滚动加载使用，展示 loading 的各种状态，组件名：``uni-load-more``，代码块： uLoadMore。 **使用方式：** 在 ``script`` 中引用组件 import uniLoadMore from "@/components/uni-load-more/uni-load-more.vue"export default {components: {uniLoadMore}} 在 ``template`` 中使用组件 <uni-load-more status="loading"></uni-load-more> 实际效果参考：[https://github.com/dcloudio/uni-ui](https://github.com/dcloudio/uni-ui) **属性说明：** |属性名 |类型|默认值 |说明| |---|----|---|---| |status |String |more|loading 的状态，可选值：more（loading前）、loading（loading中）、noMore（没有更多了）| |show-icon |Boolean |true|是否显示 loading 图标| |color |String |#777777|图标和文字颜色 | |content-text |Object |```{contentdown: "上拉显示更多",contentrefresh: "正在加载...",contentnomore: "没有更多数据了"}```|各状态文字说明| uni-load-more.vue <view class="uni-load-more"> <view class="uni-load-more__img" v-show="status === 'loading' && showIcon"> <view class="load1"> <view :style="{background:color}"></view> <view :style="{background:color}"></view> <view :style="{background:color}"></view> <view :style="{background:color}"></view> </view> <view class="load2"> <view :style="{background:color}"></view> <view :style="{background:color}"></view> <view :style="{background:color}"></view> <view :style="{background:color}"></view> </view> <view class="load3"> <view :style="{background:color}"></view> <view :style="{background:color}"></view> <view :style="{background:color}"></view> <view :style="{background:color}"></view> </view> </view> <text class="uni-load-more__text" :style="{color:color}">{{status === 'more' ? contentText.contentdown : (status === 'loading' ? contentText.contentrefresh : contentText.contentnomore)}}</text> </view> uni-number-boxreadme.md### NumberBox 数字输入框 带加减按钮的数字输入框，组件名：``uni-number-box``，代码块： uNumberBox。 **使用方式：** 在 ``script`` 中引用组件 import uniNumberBox from "@/components/uni-number-box/uni-number-box.vue"export default {components: {uniNumberBox}} 在 ``template`` 中使用组件 <uni-number-box></uni-number-box><uni-number-box :min="0" :max="9"></uni-number-box><uni-number-box @change="bindChange"></uni-number-box> 实际效果参考：[https://github.com/dcloudio/uni-ui](https://github.com/dcloudio/uni-ui) **NumberBox 属性说明：** |属性名 |类型 |默认值 |说明 | |--- |---- |--- |--- | |value |Number |0 |输入框当前值 | |min |Number |0 |最小值 | |max |Number |100 |最大值 | |step |Number |1 |每次点击改变的间隔大小 | |disabled |Boolean|false |是否为禁用状态 | **事件说明：** |事件名称 |说明 | |---|---| |change |输入框值改变时触发的事件，参数为输入框当前的 value|uni-number-box.vue <view class="uni-numbox"> <view class="uni-numbox__minus" :class="{'uni-numbox--disabled': disableSubtract||disabled}" @click="_calcValue('subtract')">-</view> <view class="uni-numbox__plus" :class="{'uni-numbox--disabled': disableAdd||disabled}" @click="_calcValue('add')">+</view> </view> uni-ratereadme.md### Rate 评分 评分组件，组件名：``uni-rate``，代码块： uRate。 **使用方式：** 在 ``script`` 中引用组件 import uniRate from "@/components/uni-rate/uni-rate.vue"export default {components: {uniRate}} 基本用法 <uni-rate value="2"></uni-rate> 自定义星星大小 <uni-rate size="18" value="5"></uni-rate> 设置评分数 <uni-rate max="10" value="5"></uni-rate> 不可点击状态 <uni-rate disabled="true" value="3.5"></uni-rate> 实际效果参考：[https://github.com/dcloudio/uni-ui](https://github.com/dcloudio/uni-ui) **属性说明：** |属性名|类型|默认值 |说明| |---|----|---|---| |value|Number|0|当前评分| |max|Number|5|最大的评分| |size|Number|24|星星的大小| |margin|Number|0|星星的间距| |color|String|#ececec|星星的颜色| |active-color|String|#ffca3e|选中状态的星星的颜色| |is-fill|Boolean|true|星星的类型，是否为实心类型| |disabled|Boolean|false|是否为不可点击状态| **事件说明：** |事件称名|说明|返回参数| |---|----|---| |change|Rate 的 value 改变时触发事件，返回参数为Rate的value|{value:Number}| uni-rate.vue <view class="uni-rate"> <view class="uni-rate-icon" v-for="(star,index) in stars" :key="index" :style="{marginLeft:margin+'px'}" @click="onClick(index)"> <uni-icon :size="size" :color="color" :type="isFill === false || isFill === 'false' ? 'star' : 'star-filled'"></uni-icon> <view class="uni-rate-icon-on" :style="{width:star.activeWitch}"> <uni-icon :size="size" :color="activeColor" type="star-filled"></uni-icon> </view> </view> </view> uni-segmented-controluni-segmented-control.vue <view class="segmented-control" :class="styleType" :style="wrapStyle"> <view v-for="(item, index) in values" class="segmented-control-item" :class="styleType" :key="index" :style="index === currentIndex ? activeStyle : itemStyle" @click="onClick(index)"> {{item}} </view> </view> uni-swipe-actionreadme.md### SwipeAction 滑动操作 通过滑动触发选项的容器，组件名：``uni-swipe-action`` **使用方式：** 在 ``script`` 中引用组件 import uniSwipeAction from "@/components/uni-swipe-action"export default {components: {uniSwipeAction}} 一般用法 <uni-swipe-action :options="[{ text: '取消', style: { backgroundColor: '#007aff' } }, { text: '确认', style: { backgroundColor: '#dd524d' } }]"><view class='cont'>SwipeAction 基础使用场景</view></uni-swipe-action> 禁止滑动 <uni-swipe-action :disabled="true" :options="[{ text: '取消', style: { backgroundColor: '#007aff' } }, { text: '确认', style: { backgroundColor: '#dd524d' } }]"><view class='cont'>点击按钮自动关闭</view></uni-swipe-action> 传递点击事件 <uni-swipe-action @click="bindClick" :options="[{ text: '取消', style: { backgroundColor: '#007aff' } }, { text: '确认', style: { backgroundColor: '#dd524d' } }]"><view class='cont'>点击选项时触发事件</view></uni-swipe-action> 与 List 组件使用 <uni-list><uni-swipe-action :options="options1"> <uni-list-item title="item1" show-arrow="false"></uni-list-item> </uni-swipe-action> <uni-swipe-action :options="options2"> <uni-list-item title="item2" show-arrow="false"></uni-list-item> </uni-swipe-action> <uni-swipe-action :options="options3"> <uni-list-item title="item3" show-arrow="false"></uni-list-item> </uni-swipe-action></uni-list> **SwipeAction 属性说明：** |属性名|类型|默认值|是否必填 |说明| |:--|:--|:--|:--|:--| |is-opened|Boolean|false|否|是否为开启状态| |disabled|Boolean|false|否|是否禁止滑动| |auto-close|Boolean|true|否|在组件开启状态时点击组件，是否自动关闭| |options|Array<Object>|-|是|组件选项内容及样式| options 参数说明 |参数|类型|是否必填|说明| |:--|:--|:--|:--| |text|String|是|按钮的文字| |style|Object|否|按钮样式{backgroundColor,color,fontSize}，backgroundColor默认为：#C7C6CD，color默认为：#FFFFFF，fontSize默认为：28upx| **SwipeAction 事件说明：** |事件称名|说明|返回参数| |:--|:---|:--| |click|点击选项按钮时触发事件|{text,style,index} ，text（按钮文字）、style（按钮的样式）、index（下标）| |opened|完全打开时触发|-| |closed|完全关闭时触发|-| uni-swipe-action.vue <view class="uni-swipe-action"> <view class="uni-swipe-action__container" :class="!isMoving ? 'animtion' : ''" @touchstart="touchStart" @touchmove="touchMove" @touchend="touchEnd" @touchcancel="touchEnd" @click="bindClickCont" :style="{'transform':transformX,'-webkit-transform':transformX}"> <view class="uni-swipe-action__content"> <slot></slot> </view> <view class="uni-swipe-action__btn-group" :id="elId"> {{item.text}} </view> </view> </view> configapi.jsimport { apiBaseUrl } from './config.js'; import * as common from './common.js' //引入common import * as db from './db.js' //引入common // 需要登陆的，都写到这里，否则就是不需要登陆的接口 const methodsToken = [ 'user.info', 'user.editinfo', 'user.changeavatar', 'user.logout', 'user.addgoodsbrowsing', 'user.delgoodsbrowsing', 'user.goodsbrowsing', 'user.goodscollection', 'user.goodscollectionlist', 'user.vuesaveusership', 'user.saveusership', 'user.getshipdetail', 'user.setdefship', 'user.editship', 'user.removeship', 'user.getusership', 'user.pay', 'user.orderevaluate', 'user.getuserdefaultship', 'user.issign', 'user.sign', 'user.mypoint', 'user.userpointlog', 'user.getbankcardlist', 'user.getdefaultbankcard', 'user.addbankcard', 'user.removebankcard', 'user.setdefaultbankcard', 'user.getbankcardinfo', 'user.editpwd', 'user.forgotpwd', 'user.recommend', 'user.balancelist', 'user.sharecode', 'user.cash', 'user.cashlist', 'user.myinvite', 'user.activationinvite', 'coupon.getcoupon', 'coupon.usercoupon', 'cart.add', 'cart.del', 'cart.getlist', 'cart.setnums', 'cart.getnumber', 'order.cancel', 'order.del', 'order.details', 'order.confirm', 'order.getlist', 'order.create', 'order.getship', 'order.getorderlist', 'order.getorderstatusnum', 'order.aftersaleslist', 'order.aftersalesinfo', 'order.aftersalesstatus', 'order.addaftersales', 'order.sendreship', 'order.iscomment', 'payments.getinfo', 'user.getuserpoint', 'coupon.getcouponkey', 'store.isclerk', 'store.storeladinglist', 'store.ladinginfo', 'store.lading', 'store.ladingdel', 'distribution_center-api-info', 'distribution_center-api-applydistribution', 'distribution_center-api-setstore', 'distribution_center-api-myorder', 'pintuan.pintuanteam', 'lottery-api-getLotteryConfig', 'lottery-api-lottery', 'lottery-api-lotteryLog' ]; const post = (method, data, callback) => { uni.showLoading({ title: '加载中' }); // 判断token是否存在 if (methodsToken.indexOf(method) >= 0) { // 获取用户token let userToken = db.get("userToken"); if (!userToken) { common.jumpToLogin(); return false; } else { data.token = userToken; } } data.method = method; uni.request({ url: apiBaseUrl + 'api.html', data: data, header: { 'Accept': 'application/json', 'Content-Type': 'application/json', // 'Content-Type': 'application/x-www-form-urlencoded', //自定义请求头信息 }, method: 'POST', success: (response) => { uni.hideLoading(); const result = response.data if (!result.status) { // 登录信息过期或者未登录 if (result.data === 14007 || result.data === 14006) { db.del("userToken"); uni.showToast({ title: result.msg, icon: 'none', duration: 1000, complete: function() { setTimeout(function() { uni.hideToast(); // #ifdef H5 || APP-PLUS uni.navigateTo({ url: '/pages/login/login/index1' }) // #endif // #ifdef MP-WEIXIN || MP-ALIPAY uni.navigateTo({ url: '/pages/login/choose/index', animationType: 'pop-in', animationDuration: 200 }); // #endif }, 1000) } }); } } callback(result); }, complete: () => { uni.hideLoading(); }, fail: (error) => { uni.hideLoading(); if (error && error.response) { showError(error.response); } }, }); } //插件post const pluginsPost = (method, data, callback) => { uni.showLoading({ title: '加载中' }); // 判断token是否存在 if (methodsToken.indexOf(method) >= 0) { // 获取用户token let userToken = db.get("userToken"); if (!userToken) { common.jumpToLogin(); return false; } else { data.token = userToken; } } uni.request({ url: apiBaseUrl + 'plugins/' + method + '.html', data: data, header: { 'Accept': 'application/json', 'Content-Type': 'application/json', // 'Content-Type': 'application/x-www-form-urlencoded', //自定义请求头信息 }, method: 'POST', success: (response) => { uni.hideLoading(); const result = response.data if (!result.status) { // 登录信息过期或者未登录 if (result.data === 14007 || result.data === 14006) { db.del("userToken"); uni.showToast({ title: result.msg, icon: 'none', duration: 1000, complete: function() { setTimeout(function() { uni.hideToast(); // #ifdef H5 || APP-PLUS uni.navigateTo({ url: '/pages/login/login/index1' }) // #endif // #ifdef MP-WEIXIN || MP-ALIPAY uni.navigateTo({ url: '/pages/login/choose/index', animationType: 'pop-in', animationDuration: 200 }); // #endif }, 1000); } }); } } callback(result); }, fail: (error) => { uni.hideLoading(); if (error && error.response) { showError(error.response); } }, complete: () => { setTimeout(function() { uni.hideLoading(); }, 250); } }); } const get = (url, callback) => { uni.showLoading({ title: '加载中' }); uni.request({ url: url, header: { 'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded', //自定义请求头信息 }, method: 'GET', success: (response) => { uni.hideLoading(); callback(response.data); }, fail: (error) => { uni.hideLoading(); if (error && error.response) { showError(error.response); } }, complete: () => { setTimeout(function() { uni.hideLoading(); }, 250); } }); } const showError = error => { let errorMsg = '' switch (error.status) { case 400: errorMsg = '请求参数错误' break case 401: errorMsg = '未授权，请登录' break case 403: errorMsg = '跨域拒绝访问' break case 404: errorMsg = `请求地址出错: ${error.config.url}` break case 408: errorMsg = '请求超时' break case 500: errorMsg = '服务器内部错误' break case 501: errorMsg = '服务未实现' break case 502: errorMsg = '网关错误' break case 503: errorMsg = '服务不可用' break case 504: errorMsg = '网关超时' break case 505: errorMsg = 'HTTP版本不受支持' break default: errorMsg = error.msg break } uni.showToast({ title: errorMsg, icon: 'none', duration: 1000, complete: function() { setTimeout(function() { uni.hideToast(); }, 1000); } }); } // 文件上传 export const uploadFiles = (callback) => { uni.chooseImage({ success: (chooseImageRes) => { uni.showLoading({ title: '上传中...' }); const tempFilePaths = chooseImageRes.tempFilePaths; const uploadTask = uni.uploadFile({ url: apiBaseUrl + 'api.html', //仅为示例，非真实的接口地址 filePath: tempFilePaths[0], fileType: 'image', name: 'file', headers: { 'Accept': 'application/json', 'Content-Type': 'multipart/form-data', }, formData: { 'method': 'images.upload', 'upfile': tempFilePaths[0] }, success: (uploadFileRes) => { callback(JSON.parse(uploadFileRes.data)); }, fail: (error) => { if (error && error.response) { showError(error.response); } }, complete: () => { setTimeout(function() { uni.hideLoading(); }, 250); } }); // uploadTask.onProgressUpdate((res) => { // console.log('上传进度' + res.progress); // console.log('已经上传的数据长度' + res.totalBytesSent); // console.log('预期需要上传的数据总长度' + res.totalBytesExpectedToSend); // // // 测试条件，取消上传任务。 // if (res.progress > 50) { // uploadTask.abort(); // } // }); } }); } // 上传图片 export const uploadImage = (num, callback) => { uni.chooseImage({ count: num, success: (res) => { uni.showLoading({ title: '上传中...' }); let tempFilePaths = res.tempFilePaths for (var i = 0; i < tempFilePaths.length; i++) { uni.uploadFile({ url: apiBaseUrl + 'api.html', filePath: tempFilePaths[i], fileType: 'image', name: 'file', headers: { 'Accept': 'application/json', 'Content-Type': 'multipart/form-data', }, formData: { 'method': 'images.upload', 'upfile': tempFilePaths[i] }, success: (uploadFileRes) => { callback(JSON.parse(uploadFileRes.data)); }, fail: (error) => { if (error && error.response) { showError(error.response); } }, complete: () => { setTimeout(function() { uni.hideLoading(); }, 250); }, }); } } }); } // 获取店铺配置 export const shopConfig = (callback) => get(apiBaseUrl + 'api/common/jshopconf', callback); // 用户注册 export const reg = (data, callback) => post('user.reg', data, callback); // 用户登录 export const login = (data, callback) => post('user.login', data, callback); // 用户信息 export const userInfo = (data, callback) => post('user.info', data, callback); // 上传头像 export const changeAvatar = (data, callback) => post('user.changeavatar', data, callback); // 编辑用户信息 export const editInfo = (data, callback) => post('user.editinfo', data, callback); // 发送短信验证码 export const sms = (data, callback) => post('user.sms', data, callback); // 短信验证码登录 export const smsLogin = (data, callback) => post('user.smslogin', data, callback); // 退出登录 export const logout = (data, callback) => post('user.logout', data, callback); // 获取首页幻灯片 export const slider = (data, callback) => post('advert.getAdvertList', data, callback); // 获取广告 export const advert = (data, callback) => post('advert.getcarousellists', data, callback); // 获取公告列表 export const notice = (data, callback) => post('notice.noticeList', data, callback); // 获取公告详情 export const noticeInfo = (data, callback) => post('notice.noticeInfo', data, callback); // 获取文章详情 export const articleInfo = (data, callback) => post('articles.getArticleDetail', data, callback); // 获取文章列表 export const articleList = (data, callback) => post('articles.getArticleList', data, callback); // 获取商品分类 export const categories = (data, callback) => post('categories.getallcat', data, callback); // 获取商品列表 export const goodsList = (data, callback) => post('goods.getlist', data, callback); // 获取商品详情 export const goodsDetail = (data, callback) => post('goods.getdetial', data, callback); // 获取商品参数信息 export const goodsParams = (data, callback) => post('goods.getgoodsparams', data, callback); // 获取设置默认货品 export const getProductInfo = (data, callback) => post('goods.getproductinfo', data, callback); // 获取商品评论信息 export const goodsComment = (data, callback) => post('goods.getgoodscomment', data, callback); // 添加购物车 export const addCart = (data, callback) => post('cart.add', data, callback); // 移除购物车 export const removeCart = (data, callback) => post('cart.del', data, callback); // 获取购物车列表 export const cartList = (data, callback) => post('cart.getlist', data, callback); // 设置购物车商品数量 export const setCartNum = (data, callback) => post('cart.setnums', data, callback); // 获取购物车数量 export const getCartNum = (data, callback) => post('cart.getnumber', data, callback); // 获取用户的收货地址列表 export const userShip = (data, callback) => post('user.getusership', data, callback); // 获取用户默认收货地址 export const userDefaultShip = (data, callback) => post('user.getuserdefaultship', data, callback); // 存储用户收货地址 export const saveUserShip = (data, callback) => post('user.vuesaveusership', data, callback); // 微信存储收货地址 export const saveUserShipWx = (data, callback) => post('user.saveusership', data, callback); //获取区域ID export const getAreaId = (data, callback) => post('user.getareaid', data, callback); // 获取收货地址详情 export const shipDetail = (data, callback) => post('user.getshipdetail', data, callback); // 收货地址编辑 export const editShip = (data, callback) => post('user.editship', data, callback); // 收货地址删除 export const removeShip = (data, callback) => post('user.removeship', data, callback); // 设置默认收货地址 export const setDefShip = (data, callback) => post('user.setdefship', data, callback); // 生成订单 export const createOrder = (data, callback) => post('order.create', data, callback); // 获取状态订单列表 export const getOrderList = (data, callback) => post('order.getlist', data, callback); // 取消订单 export const cancelOrder = (data, callback) => post('order.cancel', data, callback); // 删除订单 export const delOrder = (data, callback) => post('order.del', data, callback); // 获取订单详情 export const orderDetail = (data, callback) => post('order.details', data, callback); // 确认收货 export const confirmOrder = (data, callback) => post('order.confirm', data, callback); // 获取配送方式 export const orderShip = (data, callback) => post('order.getship', data, callback); // 获取全部订单列表 export const orderList = (data, callback) => post('order.getorderlist', data, callback); // 获取订单不同状态的数量 export const getOrderStatusSum = (data, callback) => post('order.getorderstatusnum', data, callback); // 售后单列表 export const afterSalesList = (data, callback) => post('order.aftersaleslist', data, callback); // 售后单详情 export const afterSalesInfo = (data, callback) => post('order.aftersalesinfo', data, callback); // 订单售后状态 export const afterSalesStatus = (data, callback) => post('order.aftersalesstatus', data, callback); // 添加售后单 export const addAfterSales = (data, callback) => post('order.addaftersales', data, callback); // 用户发送退货包裹 export const sendShip = (data, callback) => post('order.sendreship', data, callback); // 添加商品浏览足迹 export const addGoodsBrowsing = (data, callback) => post('user.addgoodsbrowsing', data, callback); // 删除商品浏览足迹 export const delGoodsBrowsing = (data, callback) => post('user.delgoodsbrowsing', data, callback); // 获取商品浏览足迹 export const goodsBrowsing = (data, callback) => post('user.goodsbrowsing', data, callback); // 商品收藏 关注/取消 export const goodsCollection = (data, callback) => post('user.goodscollection', data, callback); // 获取商品收藏关注列表 export const goodsCollectionList = (data, callback) => post('user.goodscollectionlist', data, callback); // 获取店铺支付方式列表 export const paymentList = (data, callback) => post('payments.getlist', data, callback); // 获取支付单详情 export const paymentInfo = (data, callback) => post('payments.getinfo', data, callback); // 支付接口 export const pay = (data, callback) => post('user.pay', data, callback); // 订单评价接口 export const orderEvaluate = (data, callback) => post('user.orderevaluate', data, callback); // 判断是否签到 export const isSign = (data, callback) => post('user.issign', data, callback); // 签到接口 export const sign = (data, callback) => post('user.sign', data, callback); // 我的积分 export const myPoint = (data, callback) => post('user.mypoint', data, callback); // 积分记录 export const pointLog = (data, callback) => post('user.userpointlog', data, callback); // 物流信息接口 export const logistics = (data, callback) => post('order.logisticbyapi', data, callback); // 优惠券列表 export const couponList = (data, callback) => post('coupon.couponlist', data, callback); // 优惠券详情 export const couponDetail = (data, callback) => post('coupon.coupondetail', data, callback); // 用户领取优惠券 export const getCoupon = (data, callback) => post('coupon.getcoupon', data, callback); // 用户已领取的优惠券列表 export const userCoupon = (data, callback) => post('coupon.usercoupon', data, callback); // 获取店铺设置 export const getSetting = (data, callback) => post('user.getsetting', data, callback); // 获取商户配置信息 export const getSellerSetting = (data, callback) => post('user.getsellersetting', data, callback); // 获取我的银行卡列表 export const getBankCardList = (data, callback) => post('user.getbankcardlist', data, callback); // 获取默认的银行卡 export const getDefaultBankCard = (data, callback) => post('user.getdefaultbankcard', data, callback); // 添加银行卡 export const addBankCard = (data, callback) => post('user.addbankcard', data, callback); // 删除银行卡 export const removeBankCard = (data, callback) => post('user.removebankcard', data, callback); // 设置默认银行卡 export const setDefaultBankCard = (data, callback) => post('user.setdefaultbankcard', data, callback); // 获取银行卡信息 export const getBankCardInfo = (data, callback) => post('user.getbankcardinfo', data, callback); // 获取银行卡组织信息 export const getBankCardOrganization = (data, callback) => post('user.getbankcardorganization', data, callback); // 用户修改密码 export const editPwd = (data, callback) => post('user.editpwd', data, callback); // 用户找回密码 export const forgotPwd = (data, callback) => post('user.forgotpwd', data, callback); // 获取用户余额明细 export const getBalanceList = (data, callback) => post('user.balancelist', data, callback); // 用户推荐列表 export const recommendList = (data, callback) => post('user.recommend', data, callback); // 邀请码 export const shareCode = (data, callback) => post('user.sharecode', data, callback); // 用户提现 export const userToCash = (data, callback) => post('user.cash', data, callback); // 用户提现列表 export const cashList = (data, callback) => post('user.cashlist', data, callback); // 绑定授权登录 export const trustBind = (data, callback) => post('user.trustbind', data, callback); // 获取用户信息 // export const trustLogin = (data, callback) => post('user.trustcallback', data, callback); // 判断用户下单可以使用多少积分 export const usablePoint = (data, callback) => post('user.getuserpoint', data, callback); // 门店列表 export const storeList = (data, callback) => post('store.getstorelist', data, callback); // 判断是否开启门店自提 export const switchStore = (data, callback) => post('store.getstoreswitch', data, callback); // 获取默认的门店 export const defaultStore = (data, callback) => post('store.getdefaultstore', data, callback); // 判断是否开启积分 export const isPoint = (data, callback) => post('user.ispoint', data, callback); // 用户输入code领取优惠券 export const couponKey = (data, callback) => post('coupon.getcouponkey', data, callback); // 判断是否是店员 export const isStoreUser = (data, callback) => post('store.isclerk', data, callback); // 获取店铺提货单列表 export const storeLadingList = (data, callback) => post('store.storeladinglist', data, callback); // 获取提货单详情 export const ladingInfo = (data, callback) => post('store.ladinginfo', data, callback); // 店铺提单操作 export const ladingExec = (data, callback) => post('store.lading', data, callback); // 提货单删除 export const ladingDel = (data, callback) => post('store.ladingdel', data, callback); // 获取活动列表 export const activityList = (data, callback) => post('group.getlist', data, callback); // 获取活动详情 export const activityDetail = (data, callback) => post('group.getgoodsdetial', data, callback); //小程序解析code export const login1 = (data, callback) => post('user.wxapplogin1', data, callback); //小程序登录第二步 export const login2 = (data, callback) => post('user.wxapplogin2', data, callback); //支付宝小程序解析code export const alilogin1 = (data, callback) => post('user.alipayapplogin1', data, callback); //取下级地址列表 export const getAreaList = (data, callback) => post('user.getarealist', data, callback); //取搜索页推荐关键字 export const getRecommendKeys = (callback) => post('store.getrecommendkeys', {}, callback); // 获取我的邀请信息 export const myInvite = (callback) => post('user.myinvite', {}, callback); // 设置我的上级邀请人 export const setMyInvite = (data, callback) => post('user.activationinvite', data, callback); // 获取小程序二维码 export const getInviteQRCode = (data, callback) => post('store.getinviteqrcode', data, callback); // 生成海报 export const createPoster = (data, callback) => post('user.getposter', data, callback); // 获取秒杀团购 export const getGroup = (data, callback) => post('group.getlist', data, callback); // 获取秒杀团购详情 export const groupInfo = (data, callback) => post('group.getgoodsdetial', data, callback); // 自定义页面 export const getPageConfig = (data, callback) => post('pages.getpageconfig', data, callback); //万能表单 export const getFormDetial = (data, callback) => post('form.getformdetial', data, callback); //提交表单 export const addSubmitForm = (data, callback) => post('form.addsubmit', data, callback); //公众号授权获取openid export const getOpenId = (data, callback) => post('user.officiallogin', data, callback); // 获取授权登录方式 export const getTrustLogin = (data, callback) => post('user.gettrustlogin', data, callback); // APP信任登录 export const appTrustLogin = (data, callback) => post('user.uniapplogin', data, callback); // 获取分销商进度状态 export const getDistributioninfo = (data, callback) => pluginsPost('distribution_center-api-info', data, callback); // 申请分销商 export const applyDistribution = (data, callback) => pluginsPost('distribution_center-api-applydistribution', data, callback); // 店铺设置 export const setStore = (data, callback) => pluginsPost('distribution_center-api-setstore', data, callback); //我的分销订单 export const getStoreInfo = (data, callback) => pluginsPost('distribution_center-api-getstoreinfo', data, callback); //我的分销订单 export const getDistributionOrder = (data, callback) => pluginsPost('distribution_center-api-myorder', data, callback); // 拼团列表 export const pintuanList = (data, callback) => post('pintuan.list', data, callback); // 拼团商品详情 export const pintuanGoodsInfo = (data, callback) => post('pintuan.goodsinfo', data, callback); // 拼团货品详情 export const pintuanProductInfo = (data, callback) => post('pintuan.productinfo', data, callback); //微信图文消息 export const messageDetail = (data, callback) => post('articles.getweixinmessage', data, callback); //获取APP版本 export const getAppVersion = (data, callback) => pluginsPost('app-api-checkVersion', data, callback); //获取APP版本 export const getOrderPintuanTeamInfo = (data, callback) => post('pintuan.pintuanteam', data, callback); //抽奖规则 export const lotteryConfig = (callback) => pluginsPost('lottery-api-getLotteryConfig', {}, callback); //抽奖操作 export const lottery = (callback) => pluginsPost('lottery-api-lottery', {}, callback); //获取我的抽奖记录 export const myLottery = (data, callback) => pluginsPost('lottery-api-lotteryLog', data, callback); //生成分享URL export const createShareUrl = (data, callback) => post('user.shareurl', data, callback);common.jsimport * as db from './db.js' //引入common import store from './../store' //把obj对象里的值覆盖到newobj里面 function deepCopy(newobj, obj) { if (typeof obj != 'object') { return obj } for (var attr in obj) { var a = {} if (newobj[attr]) { a = newobj[attr] } newobj[attr] = deepCopy(a, obj[attr]) } return newobj } //跳转到登陆页面 function jumpToLogin(method) { var now_time = Date.parse(new Date()) var value = db.get('jump_to_login') if (!value) { value = 0 } if (now_time - value > 3000) { //db.set('jump_to_login',now_time); //暂时屏蔽登录时间查询 // 将当前页面route存vuex中 登录注册后跳转 let pages = getCurrentPages() let page = pages[pages.length - 1] // 获取页面参数信息 let pagePath = '' // #ifdef H5 || MP-WEIXIN || APP-PLUS || APP-PLUS-NVUE if (page.route.indexOf('pages/goods/index/index') !== -1) { //商品详情页 if (page.goodsId) { pagePath = '/' + page.route + '?id=' + page.goodsId; } else { pagePath = '/pages/index/index'; } } if (page.route.indexOf('pages/goods/index/group') !== -1) { //团购秒杀详情页 if (page.goodsId && page.groupId) { pagePath = '/' + page.route + '?id=' + page.goodsId + '&group_id' + page.groupId; } else { pagePath = '/pages/index/index'; } } // #endif // #ifdef MP-ALIPAY if (page.__proto__.route.indexOf('pages/goods/index/index') !== -1) { //商品详情页 if (page.rootVM.goodsId) { pagePath = '/' + page.__proto__.route + '?id=' + page.rootVM.goodsId; } else { pagePath = '/pages/index/index'; } } if (page.__proto__.route.indexOf('pages/goods/index/group') !== -1) { //团购秒杀详情页 if (page.rootVM.goodsId && page.rootVM.groupId) { pagePath = '/' + page.__proto__.route + '?id=' + page.rootVM.goodsId + '&group_id' + page.rootVM.groupId; } else { pagePath = '/pages/index/index'; } } // #endif if (pagePath) { store.commit({ type: 'redirect', page: pagePath }) } uni.showToast({ title: '请先登录!', icon: 'none', duration: 1000, success: function(res) { // #ifdef H5 || APP-PLUS setTimeout(() => { uni.hideToast(); uni.navigateTo({ url: '/pages/login/login/index1' }) }, 1000) // #endif // #ifdef MP-WEIXIN || MP-ALIPAY setTimeout(() => { uni.hideToast(); uni.navigateTo({ url: '/pages/login/choose/index', animationType: 'pop-in', animationDuration: 200 }) }, 500) // #endif } }) } } //当出错的时候，显示错误信息，并且跳转 弃用 /* function errorToBack(msg = '出错了，请重试',delta=1){ uni.showToast({ title: msg, icon: 'none', duration: 2000, }); if(delta > 0){ setTimeout(function () { uni.navigateBack({ delta: delta }) }, 1000); } } */ //操作成功后，的提示信息 function successToShow(msg = '保存成功', callback = function() {}) { setTimeout(function() { uni.showToast({ title: msg, icon: 'success', duration: 1000, success() { setTimeout(function() { callback() }, 500) } }) }, 100) /* uni.showToast({ title: msg, icon: 'success', duration: 1000 }) */ } //操作失败的提示信息 function errorToShow(msg = '操作失败', callback = function() {}) { setTimeout(function() { uni.showToast({ title: msg, icon: 'none', duration: 1500, success() { setTimeout(function() { callback() }, 1500) } }) },100) } //加载显示 function loadToShow(msg = '加载中') { uni.showToast({ title: msg, icon: 'loading' }) } //加载隐藏 function loadToHide() { uni.hideToast() } // 提示框 function modelShow( title = '提示', content = '确认执行此操作吗?', callback = () => {}, showCancel = true, cancelText = '取消', confirmText = '确定' ) { uni.showModal({ title: title, content: content, showCancel: showCancel, cancelText: cancelText, confirmText: confirmText, cancelText: cancelText, success: function(res) { if (res.confirm) { // 用户点击确定操作 setTimeout(() => { callback() }, 500) } else if (res.cancel) { // 用户取消操作 } } }) } //时间戳转时间格式 function timeToDate(date, flag = false) { var date = new Date(date * 1000) //如果date为13位不需要乘1000 var Y = date.getFullYear() + '-' var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-' var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ' var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':' var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':' var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() if (flag) { return Y + M + D } else { return Y + M + D + h + m + s } } function time2date(micro_second) { var time = {} // 总秒数 var second = Math.floor(micro_second) // 天数 time.day = PrefixInteger(Math.floor(second / 3600 / 24), 2) // 小时 time.hour = PrefixInteger(Math.floor((second / 3600) % 24), 2) // 分钟 time.minute = PrefixInteger(Math.floor((second / 60) % 60), 2) // 秒 time.second = PrefixInteger(Math.floor(second % 60), 2) var newtime = '' if (time.day > 0) { newtime = time.day + '天' + time.hour + '小时' + time.minute + '分' + time.second + '秒' } else { if (time.hour != 0) { newtime = time.hour + '小时' + time.minute + '分' + time.second + '秒' } else { newtime = time.minute + '分' + time.second + '秒' } } return newtime } function timeToDateObj(micro_second) { var time = {} // 总秒数 var second = Math.floor(micro_second) // 天数 time.day = Math.floor(second / 3600 / 24) // 小时 time.hour = Math.floor((second / 3600) % 24) // 分钟 time.minute = Math.floor((second / 60) % 60) // 秒 time.second = Math.floor(second % 60) return time } //货币格式化 function formatMoney(number, places, symbol, thousand, decimal) { number = number || 0 places = !isNaN((places = Math.abs(places))) ? places : 2 symbol = symbol !== undefined ? symbol : '￥' thousand = thousand || ',' decimal = decimal || '.' var negative = number < 0 ? '-' : '', i = parseInt((number = Math.abs(+number || 0).toFixed(places)), 10) + '', j = (j = i.length) > 3 ? j % 3 : 0 return ( symbol + negative + (j ? i.substr(0, j) + thousand : '') + i.substr(j).replace(/(\d{3})(?=\d)/g, '$1' + thousand) + (places ? decimal + Math.abs(number - i) .toFixed(places) .slice(2) : '') ) } function throttle(fn, context, delay) { clearTimeout(fn.timeoutId) fn.timeoutId = setTimeout(function() { fn.call(context) }, delay) } // 时间格式化输出，如11:03 25:19 每1s都会调用一次 function dateformat(micro_second) { var time = {} // 总秒数 var second = Math.floor(micro_second / 1000) // 天数 time.day = PrefixInteger(Math.floor(second / 3600 / 24), 2) // 小时 time.hour = PrefixInteger(Math.floor((second / 3600) % 24), 2) // 分钟 time.minute = PrefixInteger(Math.floor((second / 60) % 60), 2) // 秒 time.second = PrefixInteger(Math.floor(second % 60), 2) return time } //不足位数前面补0 function PrefixInteger(num, length) { return (Array(length).join('0') + num).slice(-length) } //验证是否是手机号 function isPhoneNumber(str) { var myreg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/ if (!myreg.test(str)) { return false } else { return true } } /** * * 对象参数转为url参数 * */ function builderUrlParams(url, data) { if (typeof url == 'undefined' || url == null || url == '') { return '' } if (typeof data == 'undefined' || data == null || typeof data != 'object') { return '' } url += url.indexOf('?') != -1 ? '' : '?' for (var k in data) { url += (url.indexOf('=') != -1 ? '&' : '') + k + '=' + encodeURI(data[k]) } return url } /** * 使用循环的方式判断一个元素是否存在于一个数组中 * @param {Object} arr 数组 * @param {Object} value 元素值 */ function isInArray(arr, value) { for (var i = 0; i < arr.length; i++) { if (value === arr[i]) { return true } } return false } /** * 统一跳转 */ function navigateTo(url) { uni.navigateTo({ url: url, animationType: 'pop-in', animationDuration: 300 }) } /** * 关闭当前页面并跳转 */ function redirectTo(url) { uni.redirectTo({ url: url, animationType: 'pop-in', animationDuration: 300 }) } /** * 获取url参数 * * @param {*} name * @param {*} [url=window.location.serach] * @returns */ function getQueryString(name, url) { var url = url || window.location.href var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i') var r = url.substr(1).match(reg) if (r != null) { return r[2] } return null } /** * * 判断是否在微信浏览器 true是 */ function isWeiXinBrowser() { // #ifdef H5 // window.navigator.userAgent属性包含了浏览器类型、版本、操作系统类型、浏览器引擎类型等信息，这个属性可以用来判断浏览器类型 let ua = window.navigator.userAgent.toLowerCase() // 通过正则表达式匹配ua中是否含有MicroMessenger字符串 if (ua.match(/MicroMessenger/i) == 'micromessenger') { return true } else { return false } // #endif return false } /** * 金额相加 * @param {Object} value1 * @param {Object} value2 */ function moneySum(value1, value2) { return (parseFloat(value1) + parseFloat(value2)).toFixed(2); } /** * 金额相减 * @param {Object} value1 * @param {Object} value2 */ function moneySub(value1, value2) { let res = (parseFloat(value1) - parseFloat(value2)).toFixed(2); return res > 0 ? res : 0; } /** * 分享URL解压缩 * @param {Object} url */ function shareParameterEncode(url) { let urlArray = url.split('-'); let newUrl = 'type=' + urlArray[0] + '&invite=' + urlArray[1] + '&id=' + urlArray[2] + '&team_id=' + urlArray[3] + '&id_type=' + urlArray[4] + '&page_code=' + urlArray[5] + '&group_id=' + urlArray[6]; return newUrl; } /** * 分享URL压缩 * @param {Object} url */ function shareParameterDecode(url) { var urlArray = url.split('&'); var allParameter = { 'type': '', 'invite': '', 'id': '', 'team_id': '', 'id_type': '', 'page_code': '', 'group_id': '', }; for (var i = 0; i < urlArray.length; i++) { var parameter = urlArray[i].split('='); allParameter[parameter[0]] = parameter[1]; } var newUrl = allParameter.type + '-' + allParameter.invite + '-' + allParameter.id + '-' + allParameter.team_id + '-' + allParameter.id_type + '-' + allParameter.page_code + '-' + allParameter.group_id; return newUrl; } export { deepCopy, jumpToLogin, timeToDate, formatMoney, /* errorToBack, */ successToShow, throttle, errorToShow, time2date, isPhoneNumber, isInArray, loadToShow, loadToHide, navigateTo, redirectTo, modelShow, builderUrlParams, isWeiXinBrowser, dateformat, getQueryString, timeToDateObj, moneySum, moneySub, shareParameterEncode, shareParameterDecode } config.js export const apiBaseUrl = 'http://www.b2c.com/' // #ifdef H5 export const baseUrl=process.env.NODE_ENV === 'development'?window.location.origin+'/':apiBaseUrl // #endif export const paymentType = { //支付单类型 order: 1, //订单 recharge: 2, //充值 form_order: 5, //表单付款码 form_pay: 6 //表单订单 }db.jsimport * as common from './common.js' //引入common //取值 function get(key,sync = true) { try { if(sync){ return uni.getStorageSync(key); }else{ let data = ''; uni.getStorage({ key:key, success: function (res) { data = res.data; } }); return data; } } catch (e) { return false; } } //赋值 function set(key, value, sync = true) { try { if (sync) { return uni.setStorageSync(key, value); } else { uni.setStorage({ key: key, data: value }); } } catch (e) { } } //移除 function del(key, sync = true){ try { if (sync) { return uni.removeStorageSync(key); } else { uni.removeStorage({ key: key }); } } catch (e) { return false; } } //清空 function clear(sync = true){ try { if (sync) { return uni.clearStorageSync(); } else { uni.clearStorage(); } } catch (e) { return false; } } //获取用户token，如果缓存有，直接返回，如果没有，就先微信登陆，然后服务器登陆，最后返回token function userToken(callback) { var token = get('userToken'); if (token){ callback(token); }else{ //如果没有登陆，就去登陆 common.jumpToLogin(); } } export { get, set, del, clear, userToken }mixins.jsexport const orders = { mounted() {}, methods: { // 查看订单详情 orderDetail(orderId) { this.$common.navigateTo( '/pages/member/order/orderdetail?order_id=' + orderId ) }, // 取消订单 // 去支付 toPay(orderId) { this.$common.navigateTo( '/pages/goods/payment/index?order_id=' + orderId + '&type=1' ) }, // 确认收货 // 去评价 toEvaluate(orderId) { this.$common.navigateTo( '/pages/member/order/evaluate?order_id=' + orderId ) }, // 申请售后 // 查看物流信息 showExpress(code, no, address = '') { let params = encodeURIComponent( 'code=' + code + '&no=' + no + '&add=' + address ) this.$common.navigateTo( '/pages/member/order/express_delivery?params=' + params ) } } } /** * 商品接口信息 * */ export const goods = { mounted() {}, methods: { // 查看商品详情 goodsDetail(goodsId) { this.$common.navigateTo('/pages/goods/index/index?id=' + goodsId) }, // 跳转商品列表页 goodsList(obj = {}) { let url = '/pages/classify/index' if (Object.keys(obj).length) { url = this.$common.builderUrlParams(url, obj) } this.$common.navigateTo(url) }, // 团购秒杀详情 groupDetail(id, group_id) { this.$common.navigateTo( '/pages/goods/index/group?id=' + id + '&group_id=' + group_id ) }, //拼团详情页 pintuanDetail(id, team_id) { if (team_id) { this.$common.navigateTo( '/pages/goods/index/pintuan?id=' + id + '&team_id=' + team_id ) } else { this.$common.navigateTo('/pages/goods/index/pintuan?id=' + id) } } } } /** * * 返回操作处理 * */ export const goBack = { onBackPress(options) { if (options.from === 'navigateBack') { return false } let loginPages = ['/pages/cart/index/index', '/pages/member/index/index'] let backPage = this.$store.state.redirectPage if (loginPages.indexOf(backPage) > -1) { this.$store.commit({ type: 'redirect', page: '' }) uni.switchTab({ url: '/pages/index/index' }) return true } } } /* Function Info * Author: zhf * CreateTime: 2019/7/12 下午12:10:00 * LastEditor: zhf * ModifyTime: 2019/7/12 下午12:10:00 * Description: 登录成功统一跳转处理 */ export const jumpBackPage = { methods: { handleBack() { let redirect = this.$store.state.redirectPage this.$store.commit({ type: 'redirect', page: '' }) let switchTabs = ['/pages/index/index', '/pages/member/index/index'] if (switchTabs.indexOf(redirect) > -1) { uni.switchTab({ url: redirect }) } else if (redirect) { uni.redirectTo({ url: redirect }) } else { uni.switchTab({ url: '/pages/index/index' }) } } } } /* Function Info * Author: zhf * CreateTime: 2019/7/12 下午12:10:28 * LastEditor: zhf * ModifyTime: 2019/7/12 下午12:10:28 * Description: 操作判断登录处理 */ export const checkLogin = { methods: { checkIsLogin() { uni.showToast({ title: '请先登录!', icon: 'none', duration: 800, success: function(res) { // #ifdef H5 || APP-PLUS setTimeout(() => { uni.hideToast() uni.navigateTo({ url: '/pages/login/login/index1' }) }, 800) // #endif // #ifdef MP-WEIXIN || MP-ALIPAY setTimeout(() => { uni.hideToast() uni.navigateTo({ url: '/pages/login/choose/index', animationType: 'pop-in', animationDuration: 200 }) }, 500) // #endif } }) } } } /** * 工具函数 */ export const tools = { methods: { copyData(data) { var _this = this; uni.setClipboardData({ data: data, success: function() { _this.$common.errorToShow('复制成功') } }); } } } index.html <%= htmlWebpackPlugin.options.title %> <link rel="stylesheet" href="<%= BASE_URL %>static/index.css" /> main.jsimport Vue from 'vue' import App from './App' import * as Api from './config/api.js' import * as Common from './config/common.js' import * as Db from './config/db.js' import * as Config from './config/config.js' import store from './store' import './common/uni-H5Api' Vue.config.productionTip = false Vue.prototype.$api = Api; Vue.prototype.$common = Common; Vue.prototype.$db = Db; Vue.prototype.$config = Config; Vue.prototype.$store = store; App.mpType = 'app' const app = new Vue({ ...App }) app.$mount() manifest.json{ "name" : "Jshop云商", "appid" : "__UNI__60F611E", "description" : "Jshop云商", "versionName" : "2.0", "versionCode" : 15, "transformPx" : false, "app-plus" : { /* 5+App特有相关 */ "modules" : { "Payment" : {} }, /* 模块配置 */ "distribute" : { /* 应用发布信息 */ "android" : { /* android打包配置 */ "permissions" : [ "<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>", "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>", "<uses-permission android:name=\"android.permission.CAMERA\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", "<uses-permission android:name=\"android.permission.INTERNET\"/>", "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>", "<uses-permission android:name=\"android.permission.READ_LOGS\"/>", "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>", "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>", "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" ] }, "ios" : {}, /* ios打包配置 */ "sdkConfigs" : { "payment" : { "weixin" : { "appid" : "wxf62e2f29f15741af" }, "alipay" : { "scheme" : "" } } } }, "splashscreen" : { "waiting" : true } }, /* SDK配置 */ "quickapp" : {}, /* 快应用特有相关 */ "mp-weixin" : { "appid" : "wxaec38ca2e5cdc46a", "setting" : { "urlCheck" : true, "postcss" : true, "minified" : true, "es6" : true }, "permission" : { "scope.userLocation" : { "desc" : "用于获取您附近的门店列表" } }, "usingComponents" : false }, "h5" : { "title" : "Jshop云商", "domain" : "https://wmp.uneedabox.com", "router" : { "base" : "/wap/", "mode" : "history" }, "template" : "index.html", "devServer" : { "port" : 8080, "disableHostCheck" : true, "https" : false }, "sdkConfigs" : { "maps" : { "qqmap" : { "key" : "AEIBZ-H5TRI-A6VGA-5KRNA-QKKK6-JGB33" } } } } } pagesactivityindex.vue <view class="conbox"> <view class="container"> <image src="../../static/img/bg.png" class="cont" mode=""></image> <image src="../../static/img/caidai.png" class="caidai" mode=""></image> <view class="header"> <view class="header-title"> <view class="left"> 免费次数：<text style="color: #E4431A;">{{chishu}}</text> </view> <view class="left"> 账户积分：<text style="color: #E4431A;">{{jifen}}</text> </view> <view class="right" @click="getmyPrize"> 抽奖记录 > </view> </view> </view> <view class="main"> <view class="canvas-container"> <view :animation="animationData" class="canvas-content" id="zhuanpano" style=""> <!-- <view :animation="animationData" class="canvas-content" id="zhuanpano" :style="[{transform:'rotate('+runDeg+')'}]"> --> <view class="canvas-line"> <view class="canvas-litem" v-for="(item,index1) in awardsList" :key="index1" :style="[{transform:'rotate('+item.lineTurn+')'}]"></view> </view> <view class="canvas-list"> <view class="canvas-item" :style="[{zIndex:index2}]" v-for="(iteml,index2) in awardsList" :key="index2"> <view class="canvas-item-text" :style="[{transform:'rotate('+iteml.turn+')'}]"> <text>{{iteml.award}}</text> <image class="canvas-item-text-img" src="../../static/img/kongjiang.png" v-if="iteml.type == 0"></image> <image class="canvas-item-text-img" src="../../static/img/jifen.png" v-if="iteml.type == 1"></image> <image class="canvas-item-text-img" src="../../static/img/youhuiquan.png" v-if="iteml.type == 2"></image> <image class="canvas-item-text-img" src="../../static/img/yue.png" v-if="iteml.type == 3"></image> <image class="canvas-item-text-img" src="../../static/img/shangpin.png" v-if="iteml.type == 4"></image> </view> </view> </view> </view> <view @tap="playReward" class="canvas-btn" v-bind:class="btnDisabled">开始 </view> </view> </view> <view class="typecheckbox"></view> <view class="guize"> <view class="title"> 规则说明 </view> <view class="g_item" v-for="(v, k) in awardsConfig.rule" :key="k"> {{v}} </view> </view> <view class="typecheckbox2"></view> <view class="shadowbox" v-if="r_flg" @click="closeshadow"> <view class="myrewards" @click.stop="openshadow"> <view class="title"> 抽奖记录 </view> <view class="itembox"> <view class="item" v-for="(items,i) in myPrizelist" :key="i"> <text class="left">{{items.name}}</text> <text class="right">{{items.ctime_name}}</text> {{items.prize_content}} </view> </view> </view> </view> </view> </view> articleindex.vue <view class="content"> <view class="article"> <view class="article-title" v-if="shopLogo && shopName"> <text class='shop-name'>{{ shopName }}</text> <text class="fsz24 color-9 article-time">{{ info.ctime }}</text> </view> <!-- <view class="article-time"> </view> --> <view class="article-content"> <jshopContent :content="info.content" v-if="info.content"></jshopContent> </view> </view> </view> list.vue <view class="content"> <view class='cell-group margin-cell-group'> <view class='cell-item' v-for="item in list" :key="item.id" @click="articleDetail(item.id)" > <view class="cell-title-img"> <image :src="item.cover" mode="aspectFill"></image> </view> <view class="cell-item-bd"> <view class="article-title "> {{ item.title }} </view> <view class="article-time"> {{ item.ctime }} </view> </view> </view> </view> <uni-load-more :status="loadStatus" ></uni-load-more> </view> author.vue <view class="content"> <view class="content-c"> <image class="load-img" src="/static/image/loading.gif" mode=""></image> <view class="load-text color-9">信息加载中.....</view> </view> </view> cartindexindex.vue <view class="content" v-if="cartData.list && cartData.list.length > 0"> <view class="content-top"> <view class="cell-group margin-cell-group"> <view class="cell-item"> <view class="cell-item-hd"> <image class="cell-hd-icon" src="/static/image/homepage.png" style="width: 32upx;height: 32upx;"></image> </view> <view class="cell-item-bd"> <text class="cell-bd-text">{{ shopName }}</text> </view> <view class="cell-item-ft"> <text class="cell-bd-text" @click="editBtn" v-if="!editStatus">编辑</text> <text class="cell-bd-text" @click="editNoBtn" v-else>完成</text> <!-- <image class='cell-ft-next icon' src='/static/image/right.png'></image> --> </view> </view> </view> <view class="img-list cart-list"> <checkbox-group class="cart-checkbox" v-for="(item, index) in cartData.list" :key="index" :val="item.id" @change="checkboxChange(item.id)"> <view class=""> <view class="cart-checkbox-c"> <checkbox color="#FF7159" :checked="item.is_select" :value="item.id" :disabled="item.stockNo" v-if="item.stockNo" class="checkboxNo" /> <checkbox color="#FF7159" :checked="item.is_select" :value="item.id" v-else/> </view> <view class="img-list-item"> <image class="img-list-item-l little-img have-none" :src="item.products.image_path" mode="aspectFill"></image> <view class="img-list-item-r little-right"> <view class="little-right-t"> <view class="goods-name list-goods-name" @click="goodsDetail(item.products.goods_id)"> {{ item.products.name }} </view> <view class="goods-price red-price"> ￥{{ item.products.price }} </view> </view> <view class="romotion-tip" v-if="item.products.promotion_list"> <view class="romotion-tip-item" v-for="(v, k) in item.products.promotion_list" :key="k" :class="v.type !== 2 ? 'bg-gray' : ''"> {{v.name}} </view> </view> <view class="goods-item-c"> <view class="goods-buy"> <view class="goods-salesvolume" v-if="item.products.spes_desc"> {{ item.products.spes_desc }} </view> <view class="goods-salesvolume" v-else></view> <view class="goods-numbox"> <text v-if="item.stockNo && !editStatus" class="stockError">库存不足</text> <text v-else-if="item.stockTension && !editStatus" class="stockError stockTension">库存紧张</text> <uni-number-box v-on:change="bindChange($event, item)" :min="1" :max="item.maxStock" :value="item.nums" v-if="!editStatus"></uni-number-box> <view v-else="" @click="del(index,item.id)" class='click-del'> <image class="icon" src="/static/image/delete.png" mode=""></image> </view> </view> </view> </view> </view> </view> </view> </checkbox-group> </view> </view> <view class="cart-bottom"> <checkbox-group class="cart-checkbox" @change="checkboxAllButton"> <view class="cart-checkbox-c"> <checkbox :checked="checkboxAll" color="#FF7159" /> 全选 </view> <view class="cart-bottom-right"> <view class="cart-bottom-right-t" v-if="!editStatus"> 合计： <view class="goods-price red-price">￥{{ cartData.amount }}</view> </view> 去结算 <view v-else> 删除 </view> </view> </checkbox-group> </view> </view> <!-- <view class='cart-none' v-else-if="cartData.list && cartData.list.length < 1 && isLoad == true"> <image class="cart-none-img" src="/static/image/car.png" mode=""></image> <view class='cart-none-t'>购物车快饿瘪了 T.T</view> <view class='cart-none-m'>快给我挑点宝贝吧</view> <navigator class="cart-none-b" url='../../index/index' hover-class="btn-hover" open-type="switchTab">去逛逛</navigator> </view> --> <view class='cart-none' v-else> <image class="cart-none-img" src="/static/image/car.png" mode=""></image> <view class='cart-none-t'>购物车快饿瘪了 T.T</view> <view class='cart-none-m'>快给我挑点宝贝吧</view> <navigator class="cart-none-b" url='../../index/index' hover-class="btn-hover" open-type="switchTab">去逛逛</navigator> </view> classifyclassify.vue <view class="classify"> <view class="goods-box" v-if="cate_style == 3"> <view class="goods-list"> <scroll-view scroll-y="true"> <view class="goods-li" :class="{active:index==ins}" @click="active(index)" v-for="(tab,index) in beans" :key="index"> <view class="shelectedZhu"></view> {{tab.name}} </view> </scroll-view> </view> <view class="goods-grid"> <scroll-view class="goods-content" scroll-y="true"> <view class="goods-banner" v-if="advert.tpl1_class_banner1"> <image mode="widthFix" v-for="item in advert.tpl1_class_banner1" :key="item.id" :src="item.img" @click="showSliderInfo(item.type, item.val)"/> </view> <view class="goods-item"> <view class="goods-item-box" v-if="isChild"> <view class="goods-items" v-for="(item, index) in beans[ins].child" :key="index" @click="goClass(item.id)"> <image class="goods-item-img" :src="item.image_url" alt="" mode="aspectFill"/> <view class="goods-item-name">{{item.name}}</view> </view> </view> </view> </scroll-view> </view> </view> <view class="goods-box level1-s" v-if="cate_style == 2"> <view class="goods-grid"> <scroll-view class="goods-content" scroll-y="true"> <view class="goods-item"> <view class="goods-item-box"> <view class="goods-items" v-for="(item, index) in beans" :key="index" @click="goClass(item.id)"> <image class="goods-item-img" :src="item.image_url" alt="" mode="aspectFill"/> <view class="goods-item-name">{{item.name}}</view> </view> </view> </view> </scroll-view> </view> </view> <view class="goods-box level1-b" v-if="cate_style == 1"> <view class="goods-grid"> <scroll-view class="goods-content" scroll-y="true"> <view class="goods-item"> <view class="goods-item-box"> <view class="goods-items" v-for="(item, index) in beans" :key="index" @click="goClass(item.id)"> <image class="goods-item-img" :src="item.image_url" alt="" mode="aspectFill"/> <view class="goods-item-name">{{item.name}}</view> </view> </view> </view> </scroll-view> </view> </view> </view> index.vue <view class="content"> <view class="search"> <view class="search-c" @click="goSearch"> <view class="search-input search-input-p" v-bind:class="$store.state.searchStyle"> <view class="search-input-p-c"> {{ searchKey }} </view> </view> <image class="icon search-icon" src="/static/image/zoom.png"></image> </view> </view> <view class="screen"> <view class="screen-item" @click="comprehensive"> <text class="screen-item-text">综合</text> <view class='screen-item-icon'> <image v-if="searchData.order.key == 'sort' && searchData.order.sort == 'asc'" class="screen-item-icon-img" src="/static/image/bottom-black.png"></image> <image v-else class="screen-item-icon-img" src="/static/image/bottom-gray.png" ></image> </view> </view> <view class="screen-item" @click="priceSort"> <text class="screen-item-text">价格</text> <view class="screen-item-icon"> <image v-if="searchData.order.key == 'price' && searchData.order.sort == 'asc'" class="screen-item-icon-img" src="/static/image/top-black.png"></image> <image v-else-if="!(searchData.order.key == 'price' && searchData.order.sort == 'asc')" class="screen-item-icon-img" src="/static/image/top-gray.png"></image> <image v-if="searchData.order.key == 'price' && searchData.order.sort == 'desc'" class="screen-item-icon-img" src="/static/image/bottom-black.png"></image> <image v-if="!(searchData.order.key == 'price' && searchData.order.sort == 'desc')" class="screen-item-icon-img" src="/static/image/bottom-gray.png" ></image> </view> </view> <view class="screen-item" @click="salesVolume"> <text class="screen-item-text">销量</text> <view class="screen-item-icon"> <image v-if="searchData.order.key == 'buy_count' && searchData.order.sort == 'asc'" class="screen-item-icon-img" src="/static/image/top-black.png"></image> <image v-else-if="!(searchData.order.key == 'buy_count' && searchData.order.sort == 'asc')" class="screen-item-icon-img" src="/static/image/top-gray.png"></image> <image v-if="searchData.order.key == 'buy_count' && searchData.order.sort == 'desc'" class="screen-item-icon-img" src="/static/image/bottom-black.png"></image> <image v-if="!(searchData.order.key == 'buy_count' && searchData.order.sort == 'desc')" class="screen-item-icon-img" src="/static/image/bottom-gray.png"></image> </view> </view> <view class="screen-item"> <view class="screen-item-icon" style-type="button" :current="current" @click="listGrid"> <image class="list-grid" src="/static/image/switch-ic-side-2.png" v-if="current == 0"></image> <image class="list-grid" src="/static/image/switch-ic-list.png" v-else-if="current == 1"></image> </view> </view> <view class="screen-item screents" v-if="screents" @click="toshow()"> <text class="screen-item-text">筛选</text> <image class="filter-img" src="/static/image/top.png"></image> </view> <view class="screen-item screents" v-else-if="screentc" @click="toclose()"> <text class="screen-item-text">筛选</text> <image class="filter-img" src="/static/image/bottom.png"></image> </view> </view> <lvv-popup position="top" ref="lvvpopref" style="background: none;"> <view class="fliter-c"> <scroll-view scroll-y="true" style="height: 100%;"> <view class="fliter-item"> <view class='cell-item right-img'> <view class='cell-item-hd'> <view class='cell-hd-title'>价格区间</view> </view> </view> <view class="fliter-i-c"> <view class="fic-item"> </view> <view class="fic-item-line"></view> <view class="fic-item"> </view> </view> </view> <view class="fliter-item" v-if="cat_list.length > 0"> <view class='cell-item right-img'> <view class='cell-item-hd'> <view class='cell-hd-title'>分类</view> </view> </view> <view class="fliter-i-c"> <view v-for="item in cat_list" :key="item.goods_cat_id" v-if="item.goods_cat_id && item.name" @click="selectKey('cat_list', item.goods_cat_id)"> <view class="fic-item" v-if="!item.isSelect"> <view class="fic-item-text two-line" > {{item.name}} </view> </view> <view class="fic-item fic-item-active" v-else-if="item.isSelect"> <view class="fic-item-text two-line"> {{item.name}} </view> </view> </view> </view> </view> <view class="fliter-item" v-if="brand_list.length > 0"> <view class='cell-item right-img'> <view class='cell-item-hd'> <view class='cell-hd-title'>品牌</view> </view> </view> <view class="fliter-i-c"> <view v-for="item in brand_list" :key="item.brand_id" v-if="item.brand_id && item.name" @click="selectKey('brand_list', item.brand_id)"> <view class="fic-item" v-if="!item.isSelect"> <view class="fic-item-text two-line"> {{item.name}} </view> </view> <view class="fic-item fic-item-active" v-else-if="item.isSelect"> <view class="fic-item-text two-line"> {{item.name}} </view> </view> </view> </view> </view> <view class="fliter-item" v-if="label_list.length > 0"> <view class='cell-item right-img'> <view class='cell-item-hd'> <view class='cell-hd-title'>标签</view> </view> </view> <view class="fliter-i-c"> <view v-for="item in label_list" :key="item.id" v-if="item.id && item.name" @click="selectKey('label_list', item.id)"> <view class="fic-item" v-if="!item.isSelect"> <view class="fic-item-text two-line"> {{item.name}} </view> </view> <view class="fic-item fic-item-active" v-else-if="item.isSelect"> <view class="fic-item-text two-line"> {{item.name}} </view> </view> </view> </view> </view> </scroll-view> <view class="button-bottom"> 关闭 确定 </view> </view> </lvv-popup> <scroll-view scroll-y="true" :scroll-into-view="toView" class="scroll-Y" @scrolltolower="lower" enable-back-to-top="true" lower-threshold="45"> <view class="img-grids" v-show="current === 0"> <view v-if="goodsList.length>0"> <view class="img-grids-item" v-for="(item, index) in goodsList" :key="index" @click="goodsDetail(item.id)"> <image class="img-grids-item-t have-none" :src="item.image_url" mode='aspectFill'></image> <view class="img-grids-item-b"> <view class="goods-name grids-goods-name"> {{item.name}} </view> <view class="goods-item-c"> <view class="goods-price red-price">￥{{item.price}}</view> <image class="goods-cart" src="/static/image/ic-car.png"></image> </view> </view> </view> </view> <view class="order-none" v-else> <image class="order-none-img" src="/static/image/order.png" mode=""></image> </view> </view> <view class="img-list" v-show="current === 1"> <view v-if="goodsList.length>0"> <view class="img-list-item" v-for="(item, index) in goodsList" :key="index" @click="goodsDetail(item.id)"> <image class="img-list-item-l" :src="item.image_url" mode='aspectFill'></image> <view class="img-list-item-r"> <view class="goods-name list-goods-name"> {{item.name}} </view> <view class="goods-item-c"> <view class="goods-price red-price">￥{{item.price}}</view> <view class="goods-buy"> <view class="goods-salesvolume" v-if="item.comments_count > 0">{{item.comments_count}}条评论</view> <view class="goods-salesvolume" v-else-if="item.comments_count <= 0">暂无评论</view> <image class="goods-cart" src="/static/image/ic-car.png"></image> </view> </view> </view> </view> </view> <view class="order-none" v-else> <image class="order-none-img" src="/static/image/order.png" mode=""></image> </view> </view> </scroll-view> </view> pintuan_list.vue <view class="content"> <view class="img-list" > <view v-if="goodsList.length>0"> <view class="img-list-item" v-for="(item, index) in goodsList" :key="index" @click="goodsDetail(item.id)"> <image class="img-list-item-l" :src="item.image_url" mode='aspectFill'></image> <view class="img-list-item-r"> <view class="goods-name list-goods-name"> {{item.name}} </view> <view class="goods-item-c"> <view class="pintuan_time"> <text class="fsz24 color-9">剩余：</text><uni-countdown textColor="#999" color="#999" :day="item.lasttime.day" :hour="item.lasttime.hour" :minute="item.lasttime.minute" :second="item.lasttime.second"></uni-countdown> </view> <view class="goods-price red-price"> ￥{{item.pintuanPrice}} <text class="people-num color-9 fsz24">{{item.pintuan_rule.people_number}}人成团</text> <!-- <image class="goods-cart" src="/static/image/more.png"></image> --> </view> <view class="goods-buy"> <view class="goods-salesvolume" v-if="item.comments_count > 0">{{item.comments_count}}条评论</view> <view class="goods-salesvolume" v-else-if="item.comments_count <= 0">暂无评论</view> <image class="goods-cart" src="/static/image/more.png"></image> </view> </view> </view> </view> </view> <view class="order-none" v-else> <image class="order-none-img" src="/static/image/order.png" mode=""></image> </view> </view> </view> formdetailform.vue <view v-show="showPage"> <view class="content"> <view v-if="form.head_type==1"> <view class="banner"> <image :src='form.head_type_value_url[0]' mode='widthFix'></image> </view> </view> <view v-else-if="form.head_type == 2"> <view> <view class='sw'> <swiper> <swiper-item v-for="(item,item_index) in form.head_type_value_url" :key="item_index"> <image :src="item" class="slide-image" mode='widthFix' /> </swiper-item> </swiper> </view> </view> </view> <view v-else-if="form.head_type==3"> <view class='video'> </view> </view> <view v-if="form.desc !=''"> <view class='plaintext'> <text>{{form.desc}}</text> </view> </view> <view class="input-box"> <view v-for="(item,index) in form.items" :key="index"> <view class='goods-box-item' v-if="item.type=='goods'"> <image class='goods-img' :src='item.goods.image_url' mode='aspectFit'></image> <view class='goods-right'> <view class='goods-name'>{{item.name}}</view> <view class='goods-mid'> <text>已售{{item.goods.buy_count}}</text> </view> <view class='goods-buttom'> <view class="goods-price">￥{{item.goods.price}}</view> <view class='choose-specs' @click="specifications($event,item)" data-type='1' :data-goods="item.goods.id" :data-id="item.id" data-statu="openspecs"> 选规格 </view> <text class='order-num' v-if="item.cart_count> 0">{{item.cart_count}}</text> </view> </view> </view> <view class='form-input-box-item' v-if="item.type=='text'"> <view class='ib-item-left'> <text>{{item.name}}：</text> </view> <view class='ib-item-right'> </view> </view> <view class='form-input-box-item' v-if="item.type=='date'"> <view class='ib-item-left'> <text>{{item.name}}：</text> </view> <view class='ib-item-right'> <view class="ib-item-mid"> <picker mode="date" :name="''+item.id" :value="item.default_value" start="1949-10-01" end="2019-10-01" @change="bindDateChange($event,item)" :data-id='item.id'> <view>{{item.default_value}}</view> </picker> <image class='icon-img-right' src='/static/image/ic-unfold.png'></image> </view> </view> </view> <view class='form-input-box-item' v-if="item.type=='time'"> <view class='ib-item-left'> <text>{{item.name}}：</text> </view> <view class='ib-item-right'> <view class="ib-item-mid"> <picker class="weui-btn" :name="''+item.id" mode="time" :value="item.default_value" start="09:01" end="21:01" @change="bindTimeChange($event,item)" :data-id='item.id'> <view>{{item.default_value}}</view> </picker> <image class='icon-img-right' src='/static/image/ic-unfold.png'></image> </view> </view> </view> <view class='form-input-box-item' v-if="item.type=='checbox'"> <view class='ib-item-left'> <text>{{item.name}}：</text> </view> <view class='ib-item-right'> <view class='checkout-list'> <checkbox-group @change="checkboxChange($event,item)" :data-value="item.id" :name="''+item.id"> <view class="checkout-item-c" :class="checkbox_item.checked?'black':''"> <checkbox class="" :value="checkbox_item.value" :checked="checkbox_item.checked" /> {{checkbox_item.value}} </view> </checkbox-group> </view> </view> </view> <view class='form-input-box-item' v-if="item.type=='radio'"> <view class='ib-item-left'> <text>{{item.name}}:</text> </view> <view class='ib-item-right'> <radio-group class="uni-list" @change="radioChange($event,item)" :data-value="item.id" :name="''+item.id"> <view class="invoice-type-icon"> <radio class="a-radio" :id="radio_item" :value="radio_item" checked=true v-if="radio_item==item.default_value"></radio> <radio class="a-radio" :id="radio_item" :value="radio_item" v-if="radio_item!=item.default_value"></radio> </view> <view class="invoice-type-c"> <text>{{radio_item}}</text> </view> </radio-group> </view> </view> <view class='form-input-box-item' v-if="item.type=='area'"> <view class='ib-item-left'> <text>{{item.name}}：</text> </view> <view class='ib-item-right'> <view class="ib-item-mid"> <area-picker class="fsz26" ref="areaPicker" :areaId="areaId" :defaultIndex="defaultIndex" @onConfirm="onConfirm"></area-picker> </view> </view> </view> <view class='form-input-box-item' v-if="item.type=='money'"> <view class='ib-item-left'> <text>{{item.name}}：</text> </view> <view class='ib-item-right'> <view class="ib-item-mid"> </view> </view> </view> <view class='form-input-box-item' v-if="item.type=='password'"> <view class='ib-item-left'> <text>{{item.name}}：</text> </view> <view class='ib-item-right'> <view class="ib-item-mid"> </view> </view> </view> <view class='form-input-box-item' v-if="item.type=='image'"> <view class='form-input-box-title'>上传{{item.name}}</view> <view class='form-multiple-rows'> <view class='f-m-r-item'> <view class='upload-img-list'> <view class='upload-img-bd'> <view class='upload-img' v-for="(pic_item, i) in item.pics" :key="i"> <image @click='pic_del(item,index,i)' :data-index="i" class='del-img' src='/static/image/del.png'></image> <image class='upload-camera' :src="pic_item.src" mode='aspectFit'></image> </view> </view> <view class='upload-img-hd'> <image class='upload-camera' src="/static/image/camera.png" @click="pic_choose($event,item,index)" :data-id="item.id"></image> </view> </view> </view> </view> </view> <view class='form-input-box-item' v-if="item.type=='textarea'"> <view class='form-input-box-title'>{{item.name}}</view> <view class='form-multiple-rows'> <view class='f-m-r-item form-input-box-item'> </view> </view> </view> <view class='form-input-box-item' v-if="item.type=='coordinate'"> <view class='ib-item-left'> <text>{{item.name}}：</text> </view> <view class='ib-item-right'> <view class="ib-item-mid"> <image class='icon-img' src='/static/image/ic-location.png'></image> </view> </view> </view> </view> </view> <view class='goods-bottom' v-if="form.type==1"> <text class='goods-total'>合计 <text class='goods-total-r'>￥{{goodsTotalMoney}}</text> </text> </view> </view> <view class='bottom-btn'> {{form.button_name}} </view> <lvv-popup position="bottom" ref="lvvpopref" class="lvvpopref"> <block v-if="showSpecs"> <view class="modal-body" data-statu="closespecs" catchtouchmove="move"> <view class='specs-goods-t'> <view class='specs-goods-information'> <text class='specs-goods-name'>{{goodsInfoName}}</text> <text class='specs-goods-price'>￥{{goodsInfoPrint}}</text> </view> <view class='close-btn' @click="closeModal" :data-goods="select_goods_id" :data-id="select_id" data-type="100" data-statu="closespecs"> <image src='/static/image/close.png'></image> </view> </view> <scroll-view class='specs-goods-c' scroll-y="true"> <view class="color" v-for="(value,key) in goodsSpesDesc" :key="key"> <text class='salespromotion-service-name'>{{key}}</text> <view class='salespromotion-service-b'> <block v-for="(i,item_index) in value" :key="item_index"> <view v-if="i.is_default" class='pitch-on'>{{i.name}}</view> <view v-else-if="i.product_id != 0" :class='i.is_default ? "pitch-on" : ""' :data-key="i.product_id" :data-id="i.name" @click="selectSku">{{i.name}}</view> <view v-else class='nothing'>{{i.name}}</view> </block> </view> </view> <view class='number'> <text class='salespromotion-service-name'>数量</text> <view class="stepper"> <text :class="goodsNums==0?'disabled':'normal'" @click="bindMinus">-</text> <text :class="goodsNums==goodsInfoNumber?'disabled':'normal'" @click="bindPlus">+</text> </view> </view> </scroll-view> <view class='detail-footer'> <view class='detail-footer-right determine-next' v-if="status"> <!-- <view @click='goodsAddCart' class='determine'>确定</view> --> <view @click='goodsAddCart' class='next'>下一步</view> </view> <view class='detail-footer-right' v-else> <view class='stockno'>该商品已售罄</view> </view> </view> </view> </block> </lvv-popup> </view> goodsindexgroup.vue <view class="content"> <view class="nav-back"> <view class="back-btn" @click="backBtn()"> <image class="icon" src="/static/image/back-black.png" mode=""></image> </view> </view> <view class="content-top"> <view class='swiper'> <swiper class="swiper-c" :indicator-dots="swiper.indicatorDots" :autoplay="swiper.autoplay" :interval="swiper.interval" :duration="swiper.duration"> <swiper-item class="have-none" v-for="(item, index) in goodsInfo.album" :key="index" @click="clickImg(item)"> <image class='' :src='item' mode="aspectFill"></image> </swiper-item> </swiper> </view> <view class='cell-group'> <view class='price-salesvolume' v-if="lasttime.hour!==false"> <view class='commodity-price'> <text class='current-price'>￥{{product.price}}</text> <text class='cost-price' v-if="parseFloat(product.mktprice)>0">￥{{product.mktprice}}</text> </view> <view class='commodity-salesvolume'> <text>已售{{goodsInfo.buy_count}}件/剩余{{product.stock}}件</text> <text>累计销售{{goodsInfo.buy_count}}件</text> </view> <view class='commodity-time-img'></view> <view class='commodity-time'> <text>距结束仅剩</text> <view class='commodity-day'> <uni-countdown :show-day="false" :hour="lasttime.hour" :minute="lasttime.minute" :second="lasttime.second"></uni-countdown> </view> </view> <!-- <view class='commodity-time'> 已结束 </view> --> </view> <view class='cell-item goods-details'> <view class='cell-item-hd'> <view class='cell-hd-title'> <view class="color-3 fsz28 cell-hd-title-view"> {{ product.name }} </view> <view v-if="goodsInfo.brief" class="color-9 fsz24 cell-hd-title-view"> {{ goodsInfo.brief }} </view> </view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' @click="goShare()" src='/static/image/share.png'></image> </view> </view> <view class='cell-item goods-title-item' v-if="promotion.length"> <view class='cell-item-hd'> <view class='cell-hd-title'>促销</view> </view> <view class='cell-item-bd'> <view class="romotion-tip"> <view class="romotion-tip-item" :class="item.type !== 2 ? 'bg-gray' : ''" v-for="(item, index) in promotion" :key="index"> {{ item.name }} </view> </view> </view> </view> <view class='cell-item goods-title-item' v-if="isSpes"> <view class='cell-item-hd'> <view class='cell-hd-title'>规格</view> </view> <view class='cell-item-bd' @click="toshow()"> <text class='cell-bd-text'>{{ product.spes_desc }}</text> </view> </view> <view class='cell-item goods-title-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>说明</view> </view> <view class='cell-item-bd'> <view class="cell-bd-view"> <image class="goods-title-item-ic" src="/static/image/ic-dui.png" mode=""></image> <text class="cell-bd-text">24小时内发货</text> </view> <view class="cell-bd-view"> <image class="goods-title-item-ic" src="/static/image/ic-dui.png" mode=""></image> <text class="cell-bd-text">7天拆封无条件退货</text> </view> </view> </view> </view> <view class="goods-content"> <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" style-type="text" active-color="#333"></uni-segmented-control> <view class="goods-content-c"> <view class="goods-detail" v-if="current === 0"> <jshopContent :content="goodsInfo.intro" v-if="goodsInfo.intro"></jshopContent> </view> <view class="goods-parameter" v-else-if="current === 1"> <view class='cell-group' v-if="goodsParams.length"> <view class='cell-item' v-for="(item, index) in goodsParams" :key="index"> <view class='cell-item-hd'> <view class='cell-hd-title'>{{ item.name }}</view> </view> <view class='cell-item-bd'> <text class='cell-bd-text'>{{ item.value }}</text> </view> </view> <!-- <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>保修政策</view> </view> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">二十日内包修理或换货</text> </view> <view class="cell-bd-view"> <text class="cell-bd-text">一年内包修理</text> </view> </view> </view> --> </view> </view> <view class="goods-assess" v-else-if="current === 2"> <view v-if="goodsComments.list.length"> <view class="goods-assess-item" v-for="(item, index) in goodsComments.list" :key="index"> <view class='cell-group'> <view class='cell-item goods-title-item'> <view class='cell-item-hd'> <image class='user-head-img' :src='item.user.avatar' mode="aspectFill"></image> </view> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">{{ item.user.nickname }}</text> <view class="cell-bd-text-right"> <uni-rate size="16" disabled="true" :value="item.score"></uni-rate> </view> </view> <view class="cell-bd-view"> <text class="cell-bd-text color-9" style="margin-right: 16upx;">{{ item.ctime }}</text> <text class="cell-bd-text color-9">{{ item.addon }}</text> </view> </view> </view> </view> <view class="gai-body"> <view class="gai-body-text"> {{ item.content }} </view> <view class="gai-body-img" v-if="item.images_url.length"> <image :src="img" mode="aspectFill" v-for="(img, key) in item.images_url" :key="key" @click="clickImg(img)"></image> </view> </view> </view> <uni-load-more :status="goodsComments.loadStatus"></uni-load-more> </view> <view class="comment-none" v-else> <image class="comment-none-img" src="/static/image/order.png" mode=""></image> </view> </view> </view> </view> </view> <lvv-popup position="bottom" ref="share"> <shareByH5 :goodsId="goodsInfo.id" :shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></shareByH5> <shareByWx :goodsId="goodsInfo.id" :shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></shareByWx> <shareByAli :goodsId="goodsInfo.id" :shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></shareByAli> <shareByApp :goodsId="goodsInfo.id" :shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></shareByApp> </lvv-popup> <lvv-popup position="bottom" ref="lvvpopref"> <view style="width: 100%;max-height: 804upx;background: #FFFFFF;position: absolute;left:0;bottom: 0;"> <view class="pop-c"> <view class="pop-t"> <view class='goods-img'> <image :src='product.image_path' mode='aspectFill'></image> </view> <view class='goods-information'> <view class='pop-goods-name'>{{ product.name }}</view> <view class='pop-goods-price red-price'>￥ {{ product.price }}</view> </view> <view class='close-btn' @click="toclose()"> <image src='/static/image/close.png'></image> </view> </view> <scroll-view class="pop-m" scroll-y="true" style="max-height: 560upx;"> <spec :spesData="product.default_spes_desc" ref="spec" @changeSpes="changeSpes"></spec> <view class="goods-number"> <text class="pop-m-title">数量</text> <view class="pop-m-bd-in"> <uni-number-box :min="minNums" :max="product.stock" :value="buyNum" @change="bindChange"></uni-number-box> </view> </view> </scroll-view> <view class="pop-b"> 确定 已售罄 </view> </view> </view> </lvv-popup> <view class="goods-bottom"> <view class="goods-bottom-ic" @click="collection"> <image class="icon" :src="isfav ? favLogo[1] : favLogo[0]" mode=""></image> <view v-if="!isfav">收藏</view> <view v-if="isfav">已收藏</view> </view> <view class="goods-bottom-ic" @click="redirectCart"> <view class="badge color-f" v-if="cartNums">{{ cartNums }}</view> <image class="icon" src="/static/image/ic-me-car.png" mode=""></image> <view>购物车</view> </view> 立即{{typeName}} </view> <!-- <view class="right-ball"> <view class="" @click="goIndex()"> <image class="icon" src="/static/image/tab-ic-hom-selected.png" mode=""></image> </view> </view> --> <uni-fab :pattern="pattern" :content="content" :horizontal="horizontal" :vertical="vertical" :direction="direction" @trigger="trigger"></uni-fab> </view> index.vue <view class="content"> <view class="nav-back"> <view class="back-btn" @click="backBtn()"> <image class="icon" src="/static/image/back-black.png" mode=""></image> </view> </view> <view class="content-top"> <view class='swiper'> <swiper class="swiper-c" :indicator-dots="swiper.indicatorDots" :autoplay="swiper.autoplay" :interval="swiper.interval" :duration="swiper.duration"> <swiper-item class="have-none" v-for="(item, index) in goodsInfo.album" :key="index" @click="clickImg(item)"> <image class='' :src='item' mode="aspectFill"></image> </swiper-item> </swiper> </view> <view class='cell-group'> <view class='cell-item goods-top'> <view class='cell-item-hd'> <view class='cell-hd-title goods-price red-price'>￥{{ product.price }}</view> <view class='cell-hd-title goods-price cost-price' v-if="parseFloat(product.mktprice)>0">￥{{ product.mktprice }}</view> </view> <view class='cell-item-ft'> <text>{{ goodsInfo.buy_count }} 人已购买</text> </view> </view> <view class='cell-item goods-details'> <view class='cell-item-hd'> <view class='cell-hd-title'> <view class="color-3 fsz28 cell-hd-title-view"> {{ product.name }} </view> <text v-if="goodsInfo.brief" class="color-9 fsz24 "> {{ goodsInfo.brief }} </text> </view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' @click="goShare()" src='/static/image/share.png'></image> </view> </view> <view class='cell-item goods-title-item' v-if="promotion.length"> <view class='cell-item-hd'> <view class='cell-hd-title'>促销</view> </view> <view class='cell-item-bd'> <view class="romotion-tip"> <view class="romotion-tip-item" :class="item.type !== 2 ? 'bg-gray' : ''" v-for="(item, index) in promotion" :key="index"> {{ item.name }} </view> </view> </view> </view> <view class='cell-item goods-title-item' v-if="isSpes"> <view class='cell-item-hd'> <view class='cell-hd-title'>规格</view> </view> <view class='cell-item-bd' @click="toshow()"> <text class='cell-bd-text'>{{ product.spes_desc }}</text> </view> </view> <view class='cell-item goods-title-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>说明</view> </view> <view class='cell-item-bd'> <view class="cell-bd-view"> <image class="goods-title-item-ic" src="/static/image/ic-dui.png" mode=""></image> <text class="cell-bd-text">24小时内发货</text> </view> <view class="cell-bd-view"> <image class="goods-title-item-ic" src="/static/image/ic-dui.png" mode=""></image> <text class="cell-bd-text">7天拆封无条件退货</text> </view> </view> </view> </view> <view class="goods-content"> <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" style-type="text" active-color="#333"></uni-segmented-control> <view class="goods-content-c"> <view class="goods-detail" v-show="current === 0"> <jshopContent :content="goodsInfo.intro" v-if="goodsInfo.intro"></jshopContent> </view> <view class="goods-parameter" v-show="current === 1"> <view class='cell-group' v-if="goodsParams.length"> <view class='cell-item' v-for="(item, index) in goodsParams" :key="index"> <view class='cell-item-hd'> <view class='cell-hd-title'>{{ item.name }}</view> </view> <view class='cell-item-bd'> <text class='cell-bd-text'>{{ item.value }}</text> </view> </view> <!-- <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>保修政策</view> </view> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">二十日内包修理或换货</text> </view> <view class="cell-bd-view"> <text class="cell-bd-text">一年内包修理</text> </view> </view> </view> --> </view> </view> <view class="goods-assess" v-show="current === 2"> <view v-if="goodsComments.list.length"> <view class="goods-assess-item" v-for="(item, index) in goodsComments.list" :key="index"> <view class='cell-group'> <view class='cell-item goods-title-item'> <view class='cell-item-hd'> <image class='user-head-img' :src='item.user.avatar' mode="aspectFill"></image> </view> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">{{ (item.user.nickname && item.user.nickname != '')?item.user.nickname:item.user.mobile }}</text> <view class="cell-bd-text-right"> <uni-rate size="16" disabled="true" :value="item.score"></uni-rate> </view> </view> <view class="cell-bd-view"> <text class="cell-bd-text color-9" style="margin-right: 16upx;">{{ item.ctime }}</text> <text class="cell-bd-text color-9">{{ item.addon }}</text> </view> </view> </view> </view> <view class="gai-body"> <view class="gai-body-text"> {{ item.content }} </view> <view class="gai-body-img" v-if="item.images_url.length"> <image :src="img" mode="aspectFill" v-for="(img, key) in item.images_url" :key="key" @click="clickImg(img)"></image> </view> <view class="seller-content" v-if="item.seller_content"> <view class="seller-content-top"> <image class="seller-content-img" src="/static/image/seller-content.png"></image>掌柜回复 </view> {{item.seller_content}} </view> </view> </view> <uni-load-more :status="goodsComments.loadStatus"></uni-load-more> </view> <view class="comment-none" v-else> <image class="comment-none-img" src="/static/image/order.png" mode=""></image> </view> </view> </view> </view> </view> <lvv-popup position="bottom" ref="share"> <shareByH5 :goodsId="goodsInfo.id" :shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></shareByH5> <shareByWx :goodsId="goodsInfo.id" :shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></shareByWx> <shareByAli :goodsId="goodsInfo.id" :shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></shareByAli> <shareByApp :goodsId="goodsInfo.id" :shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></shareByApp> </lvv-popup> <lvv-popup position="bottom" ref="lvvpopref"> <view style="width: 100%;max-height: 804upx;background: #FFFFFF;position: absolute;left:0;bottom: 0;"> <view class="pop-c"> <view class="pop-t"> <view class='goods-img'> <image :src='product.image_path' mode='aspectFill'></image> </view> <view class='goods-information'> <view class='pop-goods-name'>{{ product.name }}</view> <view class='pop-goods-price red-price'>￥ {{ product.price }}</view> </view> <view class='close-btn' @click="toclose()"> <image src='/static/image/close.png'></image> </view> </view> <scroll-view class="pop-m" scroll-y="true" style="max-height: 560upx;"> <spec :spesData="product.default_spes_desc" ref="spec" @changeSpes="changeSpes"></spec> <view class="goods-number"> <text class="pop-m-title">数量</text> <view class="pop-m-bd-in"> <uni-number-box :min="minNums" :max="product.stock" :value="buyNum" @change="bindChange"></uni-number-box> </view> </view> </scroll-view> <view class="pop-b"> 确定 已售罄 </view> </view> </view> </lvv-popup> <view class="goods-bottom"> <view class="goods-bottom-ic" @click="collection"> <image class="icon" :src="isfav ? favLogo[1] : favLogo[0]" mode=""></image> <view v-if="!isfav">收藏</view> <view v-if="isfav">已收藏</view> </view> <view class="goods-bottom-ic" @click="redirectCart"> <view class="badge color-f" v-if="cartNums">{{ cartNums }}</view> <image class="icon" src="/static/image/ic-me-car.png" mode=""></image> <view>购物车</view> </view> 加入购物车 立即购买 </view> <!-- <view class="right-ball"> <view class="" @click="goIndex()"> <image class="icon" src="/static/image/tab-ic-hom-selected.png" mode=""></image> </view> </view> --> <uni-fab :pattern="pattern" :content="content" :horizontal="horizontal" :vertical="vertical" :direction="direction" @trigger="trigger"></uni-fab> </view> pintuan.vue <view class="content"> <view class="nav-back"> <view class="back-btn" @click="backBtn()"> <image class="icon" src="/static/image/back-black.png" mode=""></image> </view> </view> <view class="content-top"> <view class='swiper'> <swiper class="swiper-c" :indicator-dots="swiper.indicatorDots" :autoplay="swiper.autoplay" :interval="swiper.interval" :duration="swiper.duration"> <swiper-item class="have-none" v-for="(item, index) in goodsInfo.album" :key="index" @click="clickImg(item)"> <image class='' :src='item' mode="aspectFill"></image> </swiper-item> </swiper> </view> <view class='cell-group'> <view class='price-salesvolume' v-if="lasttime.hour!==false"> <view class='commodity-price'> <text class='current-price'>￥{{pintuanPrice}}</text> <text class='cost-price' v-if="parseFloat(product.mktprice)>0">￥{{product.mktprice}}</text> </view> <view class='commodity-salesvolume'> <text>已售{{goodsInfo.buy_count}}件/剩余{{product.stock}}件</text> <text>累计销售{{goodsInfo.buy_count}}件</text> </view> <view class='commodity-time' v-if="goodsInfo.pintuan_rule.pintuan_start_status == 1"> <text>距结束仅剩</text> <view class='commodity-day'> <uni-countdown textColor="#fce250" :day="lasttime.day" :hour="lasttime.hour" :minute="lasttime.minute" :second="lasttime.second"></uni-countdown> </view> </view> <view class='commodity-time' v-if="goodsInfo.pintuan_rule.pintuan_start_status == 2"> <text>即将开团</text> <view class='commodity-day'> <uni-countdown textColor="#fce250" :day="goodsInfo.pintuan_rule.lasttime.day" :hour="goodsInfo.pintuan_rule.lasttime.hour" :minute="goodsInfo.pintuan_rule.lasttime.minute" :second="goodsInfo.pintuan_rule.lasttime.second"></uni-countdown> </view> </view> <view class='commodity-time-img'></view> <!-- <view class='commodity-time'> 已结束 </view> --> </view> <view class='cell-item goods-details'> <view class='cell-item-hd'> <view class='cell-hd-title'> <view class="color-3 fsz28 cell-hd-title-view"> {{ product.name }} </view> <view v-if="goodsInfo.brief" class="color-9 fsz24 cell-hd-title-view"> {{ goodsInfo.brief }} </view> </view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' @click="goShare()" src='/static/image/share.png'></image> </view> </view> <view class='cell-item goods-title-item' v-if="promotion.length"> <view class='cell-item-hd'> <view class='cell-hd-title'>促销</view> </view> <view class='cell-item-bd'> <view class="romotion-tip"> <view class="romotion-tip-item" :class="item.type !== 2 ? 'bg-gray' : ''" v-for="(item, index) in promotion" :key="index"> {{ item.name }} </view> </view> </view> </view> <view class='cell-item goods-title-item' v-if="isSpes"> <view class='cell-item-hd'> <view class='cell-hd-title'>规格</view> </view> <view class='cell-item-bd' @click="toshow()"> <text class='cell-bd-text'>{{ product.spes_desc }}</text> </view> </view> <view class='cell-item goods-title-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>说明</view> </view> <view class='cell-item-bd'> <view class="cell-bd-view"> <image class="goods-title-item-ic" src="/static/image/ic-dui.png" mode=""></image> <text class="cell-bd-text">24小时内发货</text> </view> <view class="cell-bd-view"> <image class="goods-title-item-ic" src="/static/image/ic-dui.png" mode=""></image> <text class="cell-bd-text">7天拆封无条件退货</text> </view> </view> </view> </view> <view class="cell-group margin-cell-group" v-if="pintuanRecord.length>0"> <view class='cell-item right-img'> <view class='cell-item-hd'> <view class='cell-hd-title'>{{teamCount}}人在拼单，可直接参与</view> </view> <!-- <view class='cell-item-ft' > <image class='cell-ft-next icon' src='/static/image/right.png'></image> <text class='cell-ft-text'>查看更多</text> </view> --> </view> <view class="group-swiper"> <swiper class="group-swiper-c" :class="groupHeight" :indicator-dots="indicatorDots" :autoplay="autoplay" vertical="true" circular="true" :interval="interval" :duration="duration"> <swiper-item v-for="(item, index) in pintuanRecord" :key="index"> <view class="swiper-item"> <view class='cell-item'> <view class='cell-item-hd'> <image class="user-head-img cell-hd-icon have-none" :src='item[0].user_avatar' mode=""></image> <view class="cell-hd-title"> {{item[0].nickname}} </view> </view> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">还差<text class="red-price">{{item[0].team_nums}}人</text>拼成</text> </view> <view class="cell-bd-view"> <view class='commodity-day'> <text class="fsz24 color-6">剩余：</text> <uni-countdown color="#666" :day="item[0].remainder_time.day" :hour="item[0].remainder_time.hour" :minute="item[0].remainder_time.minute" :second="item[0].remainder_time.second"></uni-countdown> </view> </view> </view> <view class="cell-item-ft"> 去拼单 </view> <!-- <view class="cell-item-ft" v-else> 拼团中 </view> --> </view> <view class='cell-item' v-if="item[1]"> <view class='cell-item-hd'> <image class="user-head-img cell-hd-icon have-none" :src='item[1].user_avatar' mode=""></image> <view class="cell-hd-title"> {{item[1].nickname}} </view> </view> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">还差<text class="red-price">{{item[1].team_nums}}人</text>拼成</text> </view> <view class="cell-bd-view"> <view class='commodity-day'> <text class="fsz24 color-6">剩余：</text> <uni-countdown color="#666" :day="item[1].remainder_time.day" :hour="item[1].remainder_time.hour" :minute="item[1].remainder_time.minute" :second="item[1].remainder_time.second"></uni-countdown> </view> </view> </view> <view class="cell-item-ft"> 去拼单 </view> </view> </view> </swiper-item> </swiper> </view> </view> <view class="cell-group margin-cell-group" v-else=""> <view class='cell-item right-img'> <view class='cell-item-hd'> <view class='cell-hd-title'>暂无开团信息</view> </view> </view> </view> <view class="goods-content"> <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" style-type="text" active-color="#333"></uni-segmented-control> <view class="goods-content-c"> <view class="goods-detail" v-if="current === 0"> <jshopContent :content="goodsInfo.intro" v-if="goodsInfo.intro"></jshopContent> </view> <view class="goods-parameter" v-else-if="current === 1"> <view class='cell-group' v-if="goodsParams.length"> <view class='cell-item' v-for="(item, index) in goodsParams" :key="index"> <view class='cell-item-hd'> <view class='cell-hd-title'>{{ item.name }}</view> </view> <view class='cell-item-bd'> <text class='cell-bd-text'>{{ item.value }}</text> </view> </view> </view> </view> <view class="goods-assess" v-else-if="current === 2"> <view v-if="goodsComments.list.length"> <view class="goods-assess-item" v-for="(item, index) in goodsComments.list" :key="index"> <view class='cell-group'> <view class='cell-item goods-title-item'> <view class='cell-item-hd'> <image class='user-head-img' :src='item.user.avatar' mode="aspectFill"></image> </view> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">{{ item.user.nickname }}</text> <view class="cell-bd-text-right"> <uni-rate size="16" disabled="true" :value="item.score"></uni-rate> </view> </view> <view class="cell-bd-view"> <text class="cell-bd-text color-9" style="margin-right: 16upx;">{{ item.ctime }}</text> <text class="cell-bd-text color-9">{{ item.addon }}</text> </view> </view> </view> </view> <view class="gai-body"> <view class="gai-body-text"> {{ item.content }} </view> <view class="gai-body-img" v-if="item.images_url.length"> <image :src="img" mode="aspectFill" v-for="(img, key) in item.images_url" :key="key" @click="clickImg(img)"></image> </view> </view> </view> <uni-load-more :status="goodsComments.loadStatus"></uni-load-more> </view> <view class="comment-none" v-else> <image class="comment-none-img" src="/static/image/order.png" mode=""></image> </view> </view> </view> </view> </view> <lvv-popup position="bottom" ref="pintuanpop"> <view class="ig-top" v-if="teamInfo.list.length>0"> <view class="ig-top-t"> <view class=""> 剩余时间：<uni-countdown :day="teamInfo.team_time.day" :hour="teamInfo.team_time.hour" :minute="teamInfo.team_time.minute" :second="teamInfo.team_time.second"></uni-countdown> </view> </view> <view class="ig-top-m"> <view class="user-head-img-c" v-for="(item, index) in teamInfo.list" :key="index"> <view class="user-head-img-tip" v-if="item.id == item.team_id">拼主</view> <image class="user-head-img cell-hd-icon have-none" :src='item.user_avatar' mode=""></image> </view> <view class="user-head-img-c uhihn" v-if="teamInfo.team_nums" v-for="n in teamInfo.team_nums" :key="n"><text>?</text></view> </view> <view class="ig-top-b"> <view class="igtb-top"> 还差<text class="red-price">{{ teamInfo.team_nums }}</text>人，赶快拼单吧 </view> <view class="igtb-mid"> 参与拼团 </view> </view> </view> </lvv-popup> <lvv-popup position="bottom" ref="share"> <shareByH5 :shareType='3' :goodsId="goodsInfo.id" :shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></shareByH5> <shareByWx :shareType='3' :goodsId="goodsInfo.id" :shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></shareByWx> <shareByAli :shareType='3' :goodsId="goodsInfo.id" :shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></shareByAli> <shareByApp :shareType='3' :goodsId="goodsInfo.id" :shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></shareByApp> </lvv-popup> <lvv-popup position="bottom" ref="lvvpopref"> <view style="width: 100%;max-height: 804upx;background: #FFFFFF;position: absolute;left:0;bottom: 0;"> <view class="pop-c"> <view class="pop-t"> <view class='goods-img'> <image :src='product.image_path' mode='aspectFill'></image> </view> <view class='goods-information'> <view class='pop-goods-name'>{{ product.name }}</view> <view class='pop-goods-price red-price'>￥ {{ price }}</view> </view> <view class='close-btn' @click="toclose()"> <image src='/static/image/close.png'></image> </view> </view> <scroll-view class="pop-m" scroll-y="true" style="max-height: 560upx;"> <spec :spesData="product.default_spes_desc" ref="spec" @changeSpes="changeSpes"></spec> <view class="goods-number"> <text class="pop-m-title">数量</text> <view class="pop-m-bd-in"> <uni-number-box :min="minNums" :max="product.stock" :value="buyNum" @change="bindChange"></uni-number-box> </view> </view> </scroll-view> <view class="pop-b"> 确定 已售罄 </view> </view> </view> </lvv-popup> <view class="goods-bottom"> <view class="goods-bottom-ic" @click="collection"> <image class="icon" :src="isfav ? favLogo[1] : favLogo[0]" mode=""></image> <view v-if="!isfav">收藏</view> <view v-if="isfav">已收藏</view> </view> <view class="goods-bottom-ic" @click="redirectCart"> <view class="badge color-f" v-if="cartNums">{{ cartNums }}</view> <image class="icon" src="/static/image/ic-me-car.png" mode=""></image> <view>购物车</view> </view> <view class="btn-content"> <view class="color-6">￥{{product.price}}</view> <view class="color-6 fsz24">单独购买</view> </view> <view class="btn-content"> <view class="">￥{{pintuanPrice}}</view> <view class="fsz24">发起拼团</view> </view> <view class="btn-content"> <view class="">￥{{pintuanPrice}}</view> <view class="fsz24">即将开团</view> </view> <view class="btn-content"> <view class="">￥{{pintuanPrice}}</view> <view class="fsz24">拼团已结束</view> </view> </view> <!-- <view class="right-ball"> <view class="" @click="goIndex()"> <image class="icon" src="/static/image/tab-ic-hom-selected.png" mode=""></image> </view> </view> --> <uni-fab :pattern="pattern" :content="content" :horizontal="horizontal" :vertical="vertical" :direction="direction" @trigger="trigger"></uni-fab> </view> pintuan2.vue <view class="content"> <view class="content-top"> <view class='swiper'> <swiper class="swiper-c" :indicator-dots="swiper.indicatorDots" :autoplay="swiper.autoplay" :interval="swiper.interval" :duration="swiper.duration"> <swiper-item class="have-none" v-for="(item, index) in goodsInfo.album" :key="index" @click="clickImg(item)"> <image class='' :src='item' mode="aspectFill"></image> </swiper-item> </swiper> </view> <view class='cell-group'> <view class='price-salesvolume' v-if="lasttime.hour!==false"> <view class='commodity-price'> <text class='current-price'>￥{{ product.pintuan_price }}</text> <text class='cost-price'>￥{{product.mktprice}}</text> </view> <view class='commodity-salesvolume'> <text>已售{{goodsInfo.buy_count}}件/剩余{{product.stock}}件</text> <text>累计销售{{goodsInfo.buy_count}}件</text> </view> <view class='commodity-time-img'></view> <view class='commodity-time'> <text>距结束仅剩</text> <view class='commodity-day'> <uni-countdown :day="lasttime.day" :hour="lasttime.hour" :minute="lasttime.minute" :second="lasttime.second"></uni-countdown> </view> </view> <!-- <view class='commodity-time'> 已结束 </view> --> </view> <view class='cell-item goods-details'> <view class='cell-item-hd'> <view class='cell-hd-title'>{{ product.name }}</view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' @click="goShare()" src='../../../static/image/share.png'></image> </view> </view> <view class='cell-item goods-title-item' v-if="isSpes"> <view class='cell-item-hd'> <view class='cell-hd-title'>规格</view> </view> <view class='cell-item-bd' @click="toshow(2)"> <text class='cell-bd-text'>{{ product.spes_desc }}</text> </view> </view> <view class='cell-item goods-title-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>说明</view> </view> <view class='cell-item-bd'> <view class="cell-bd-view"> <image class="goods-title-item-ic" src="../../../static/image/ic-dui.png" mode=""></image> <text class="cell-bd-text">24小时内发货</text> </view> <view class="cell-bd-view"> <image class="goods-title-item-ic" src="../../../static/image/ic-dui.png" mode=""></image> <text class="cell-bd-text">7天拆封无条件退货</text> </view> </view> </view> </view> <view class="cell-group margin-cell-group" v-if="teamCount"> <view class='cell-item right-img'> <view class='cell-item-hd'> <view class='cell-hd-title'>{{teamCount}}人在拼单，可直接参与</view> </view> <!-- <view class='cell-item-ft' > <image class='cell-ft-next icon' src='../../../static/image/right.png'></image> <text class='cell-ft-text'>查看更多</text> </view> --> </view> <view class="group-swiper"> <swiper class="group-swiper-c" :indicator-dots="indicatorDots" :autoplay="autoplay" vertical="true" circular="true" :interval="interval" :duration="duration"> <swiper-item v-for="(item, index) in teamList" :key="index"> <view class="swiper-item"> <view class='cell-item'> <view class='cell-item-hd'> <image class="user-head-img cell-hd-icon have-none" :src='item[0].avatar' mode=""></image> <view class="cell-hd-title"> {{item[0].user_name}} </view> </view> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">还差<text class="red-price">{{item[0].peopleNums}}人</text>拼成</text> </view> <view class="cell-bd-view"> <view class='commodity-day'> <uni-countdown :day="item[0].remainder_time.day" :hour="item[0].remainder_time.hour" :minute="item[0].remainder_time.minute" :second="item[0].remainder_time.second"></uni-countdown> </view> </view> </view> <view class="cell-item-ft" v-if="!item[0].is_own"> 去拼单 </view> <view class="cell-item-ft" v-else> 拼团中 </view> </view> <view class='cell-item' v-if="item[1]"> <view class='cell-item-hd'> <image class="user-head-img cell-hd-icon have-none" :src='item[1].avatar' mode=""></image> <view class="cell-hd-title"> {{item[1].user_name}} </view> </view> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">还差<text class="red-price">{{item[1].peopleNums}}人</text>拼成</text> </view> <view class="cell-bd-view"> <view class='commodity-day'> <uni-countdown :day="item[1].remainder_time.day" :hour="item[1].remainder_time.hour" :minute="item[1].remainder_time.minute" :second="item[1].remainder_time.second"></uni-countdown> </view> </view> </view> <view class="cell-item-ft" v-if="!item[1].is_own"> 去拼单 </view> <view class="cell-item-ft" v-else> 拼团中 </view> </view> </view> </swiper-item> </swiper> </view> </view> <view class="cell-group margin-cell-group" v-else> <view class='cell-item right-img'> <view class='cell-item-hd'> <view class='cell-hd-title'>暂无开团信息</view> </view> </view> </view> <view class="goods-content"> <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" style-type="text" active-color="#333"></uni-segmented-control> <view class="goods-content-c"> <view class="goods-detail" v-if="current === 0"> <u-parse :content="goodsInfo.intro" /> </view> <view class="goods-parameter" v-else-if="current === 1"> <view class='cell-group' v-if="goodsParams.length"> <view class='cell-item' v-for="(item, index) in goodsParams" :key="index"> <view class='cell-item-hd'> <view class='cell-hd-title'>{{ item.name }}</view> </view> <view class='cell-item-bd'> <text class='cell-bd-text'>{{ item.value }}</text> </view> </view> </view> </view> <view class="goods-assess" v-else-if="current === 2"> <view v-if="goodsComments.list.length"> <view class="goods-assess-item" v-for="(item, index) in goodsComments.list" :key="index"> <view class='cell-group'> <view class='cell-item goods-title-item'> <view class='cell-item-hd'> <image class='user-head-img' :src='item.user.avatar' mode="aspectFill"></image> </view> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">{{ item.user.nickname }}</text> <view class="cell-bd-text-right"> <uni-rate size="16" disabled="true" :value="item.score"></uni-rate> </view> </view> <view class="cell-bd-view"> <text class="cell-bd-text color-9" style="margin-right: 16upx;">{{ item.ctime }}</text> <text class="cell-bd-text color-9">{{ item.addon }}</text> </view> </view> </view> </view> <view class="gai-body"> <view class="gai-body-text"> {{ item.content }} </view> <view class="gai-body-img" v-if="item.images_url.length"> <image :src="img" mode="aspectFill" v-for="(img, key) in item.images_url" :key="key" @click="clickImg(img)"></image> </view> </view> </view> <uni-load-more :status="goodsComments.loadStatus"></uni-load-more> </view> <view class="comment-none" v-else> <image class="comment-none-img" src="../../../static/image/order.png" mode=""></image> </view> </view> </view> </view> </view> <lvv-popup position="bottom" ref="share"> <shareByH5 :shareType='3' :goodsId="goodsInfo.id" :groupId="groupInfo.id" :shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></shareByH5> <shareByWx :shareType='3' :goodsId="goodsInfo.id" :groupId="groupInfo.id" :shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></shareByWx> <shareByAli :shareType='3' :goodsId="goodsInfo.id" :groupId="groupInfo.id" :shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></shareByAli> <shareByApp :shareType='3' :goodsId="goodsInfo.id" :groupId="groupInfo.id" :shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></shareByApp> </lvv-popup> <lvv-popup position="bottom" ref="lvvpopref"> <view style="width: 100%;max-height: 804upx;background: #FFFFFF;position: absolute;left:0;bottom: 0;"> <view class="pop-c"> <view class="pop-t"> <view class='goods-img'> <image :src='product.image_path' mode='aspectFill'></image> </view> <view class='goods-information'> <view class='pop-goods-name'>{{ product.name }}</view> <view class='pop-goods-price red-price'>￥ {{ product.price }}</view> </view> <view class='close-btn' @click="toclose()"> <image src='../../../static/image/close.png'></image> </view> </view> <scroll-view class="pop-m" scroll-y="true" style="max-height: 560upx;"> <spec :spesData="product.default_spes_desc" ref="spec" @changeSpes="changeSpes"></spec> <view class="goods-number"> <text class="pop-m-title">数量</text> <view class="pop-m-bd-in"> <uni-number-box :min="minNums" :max="product.stock" :value="buyNum" @change="bindChange"></uni-number-box> </view> </view> </scroll-view> <view class="pop-b" v-if="lvvpopref_type == 2"> 单独购买￥ {{ product.price }} 立即拼单￥ {{ product.pintuan_price }} </view> <view class="pop-b" v-else> 确定￥ {{ product.pintuan_price }} </view> </view> </view> </lvv-popup> <view class="goods-bottom"> <view class="goods-bottom-ic" @click="collection"> <image class="icon" :src="isfav ? favLogo[1] : favLogo[0]" mode=""></image> <view v-if="!isfav">收藏</view> <view v-if="isfav">已收藏</view> </view> <view class="goods-bottom-ic" @click="redirectCart"> <view class="badge color-f" v-if="cartNums">{{ cartNums }}</view> <image class="icon" src="../../../static/image/ic-me-car.png" mode=""></image> <view>购物车</view> </view> 立即拼单 </view> <uni-fab :pattern="pattern" :content="content" :horizontal="horizontal" :vertical="vertical" :direction="direction" @trigger="trigger"></uni-fab> </view> paymentauth.vue <view class="content"> <view class="content-c"> <image class="load-img" src="/static/image/loading.gif" mode=""></image> <view class="load-text color-9">信息加载中.....</view> </view> </view> index.vue <view class="content"> <view class='cell-group margin-cell-group'> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>订单类型</view> </view> <view class='cell-item-ft'> <text class="cell-ft-p" v-if="type == 1" @click="orderDetail(orderId)">商品订单</text> <text class="cell-ft-p" v-if="type == 2" @click="toRecharge()">充值订单</text> <text class="cell-ft-p" v-if="type == 5" >快捷下单</text> <text class="cell-ft-p" v-if="type == 6" >付款码</text> </view> </view> <view v-if="type == 1"> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>订单编号</view> </view> <view class='cell-item-ft'> <text class="cell-ft-p" @click="orderDetail(orderId)">{{ orderId }}</text> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>订单金额</view> </view> <view class='cell-item-ft'> <text class="cell-ft-p red-price">￥{{ orderInfo.order_amount }}</text> </view> </view> </view> <view v-else-if="type == 2"> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>充值金额</view> </view> <view class='cell-item-ft'> <text class="cell-ft-p red-price">￥ {{ recharge }}</text> </view> </view> </view> </view> <payments-by-h5 :orderId="orderId" :recharge="recharge" :type="type" :uid="userInfo.id" ></payments-by-h5> <payments-by-wx :orderId="orderId" :recharge="recharge" :type="type" :uid="userInfo.id" ></payments-by-wx> <payments-by-ali :orderId="orderId" :recharge="recharge" :type="type" :uid="userInfo.id" ></payments-by-ali> <payments-by-app :orderId="orderId" :recharge="recharge" :type="type" :uid="userInfo.id" ></payments-by-app> </view> result.vue <view class="content"> <view class="result succsee" v-if="status && paymentInfo.status === 2"> <image class="result-img" src="/static/image/win.png" mode=""></image> <view class="result-top"> 支付成功 </view> <view class="result-mid red-price"> {{ paymentInfo.money }} </view> <view class="result-bot"> 查看详情 </view> </view> <view class="result fail" v-else-if="status && paymentInfo.status === 1"> <image class="result-img" src="/static/image/pastdue.png" mode=""></image> <view class="result-top"> 支付失败 </view> <view class="result-mid red-price"> {{ paymentInfo.money }} </view> <view class="result-bot"> 查看详情 </view> </view> </view> place-orderindex.vue <view class="content-top"> <uni-segmented-control :current="type_current" :values="type_items" @clickItem="onTypeItem" style-type="text" active-color="#333" v-if="storeSwitch == 1"></uni-segmented-control> <view class="content"> <view v-show="type_current === 0"> <view class='cell-group margin-cell-group' v-if="userShip.id" @click="showAddressList"> <view class='cell-item add-title-item right-img'> <view class='cell-item-hd'> <image class='cell-hd-icon' src='/static/image/location.png'></image> </view> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">收货人：{{ userShip.name }}</text> <text class="cell-bd-text-right">{{ userShip.mobile }}</text> </view> <view class="cell-bd-view"> <text class="cell-bd-text address">{{ userShip.area_name }}</text> </view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> </view> <view class="cell-group margin-cell-group" v-else> <view class='cell-item add-title-items'> 添加收货地址 </view> </view> </view> <view v-show="type_current === 1"> <view v-if="store.id != 0" class='cell-group margin-cell-group' @click="goStorelist()"> <view class='cell-item add-title-item right-img'> <view class='cell-item-hd'> <image class='cell-hd-icon' src='/static/image/homepage.png'></image> </view> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">{{store.name}}</text> <text class="cell-bd-text-right">{{store.mobile}}</text> </view> <view class="cell-bd-view"> <text class="cell-bd-text address">{{store.address}}</text> </view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> </view> <view v-else class='cell-group margin-cell-group'> <view class='cell-item add-title-item right-img no-store'>暂无门店</view> </view> </view> </view> <view class='cell-group margin-cell-group' v-if="storeSwitch == 1 && type_current === 1"> <view class='cell-item user-head'> <view class='cell-item-hd'> <view class='cell-hd-title'>姓名</view> </view> <view class='cell-item-bd'> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>电话</view> </view> <view class='cell-item-bd'> </view> </view> </view> <view class='img-list'> <view class='img-list-item' v-if="item.is_select == true" v-for="(item, index) in products" :key="index"> <image class='img-list-item-l little-img have-none' :src='item.products.image_path' mode='aspectFill'></image> <view class='img-list-item-r little-right'> <view class='little-right-t'> <view class='goods-name list-goods-name' @click="goodsDetail(item.products.goods_id)">{{ item.products.name }}</view> <view class='goods-price'>￥{{ item.products.price }}</view> </view> <view class="romotion-tip" v-if="item.products.promotion_list"> <view class="romotion-tip-item" :class="v.type !== 2 ? 'bg-gray' : ''" v-for="(v, k) in item.products.promotion_list" :key="k"> {{ v.name }} </view> </view> <view class='goods-item-c'> <view class='goods-buy'> <view class='goods-salesvolume' v-if="item.products.spes_desc !== null">{{ item.products.spes_desc }}</view> <view class='goods-num'>× {{ item.nums }}</view> </view> </view> </view> </view> </view> <view class='cell-group'> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>优惠券</view> </view> <view class='cell-item-ft'> <text class="cell-ft-p" @click="toshow()">{{ usedCouponsCompute }}</text> </view> </view> <view class='cell-item add-title-item right-img' v-if="isOpenPoint === 1 && userPointNums > 0"> <view class='cell-item-bd'> <view class="cell-bd-view"> 积分抵扣 </view> <view class="cell-bd-view"> <text class="cell-bd-text address color-9">可用 {{ canUsePoint }} 积分，可抵扣 {{ pointMoney }} 元，共有 {{ userPointNums }} 积分。</text> </view> </view> <view class='cell-item-ft' @click="changePointHandle"> <radio value="1" :checked="isUsePoint" color="#FF7159"/> <!-- <radio class="radioNo" disabled="true"/> --> </view> </view> <view class='cell-item invoice right-img' v-if="invoiceSwitch == 1"> <view class='cell-item-hd'> <view class='cell-hd-title'>发票</view> </view> <view class='cell-item-ft' @click="goInvoice()"> <image class='cell-ft-next icon' src='/static/image/right.png'></image> <text class='cell-ft-text'>{{invoice.name}}</text> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-bd-view'>商品价格</view> <view class='cell-bd-view' v-if="cartData.goods_pmt_old > 0">商品优惠</view> <view class='cell-hd-view' v-if="cartData.order_pmt_old > 0">订单优惠</view> <view class='cell-hd-view' v-if="!couponIsUsed">优惠券抵扣</view> <view class='cell-hd-view' v-if="cartData.point > 0">积分抵扣</view> <view class='cell-hd-view'>运费</view> </view> <view class='cell-item-ft'> <view class="cell-ft-view red-price">{{ cartData.goods_amount }}</view> <view class="cell-ft-view" v-if="cartData.goods_pmt_old > 0">-{{ cartData.goods_pmt }}</view> <view class="cell-ft-view" v-if="cartData.order_pmt_old > 0">-{{ cartData.order_pmt }}</view> <view class="cell-ft-view" v-if="!couponIsUsed">-{{ cartData.coupon_pmt }}</view> <view class="cell-ft-view" v-if="cartData.point > 0">-{{ cartData.point_money }}</view> <view class="cell-ft-view">{{ cartData.cost_freight }}</view> </view> </view> </view> <view class='cell-group leave-message'> <view class='cell-item right-img'> <view class='cell-item-hd'> <view class='cell-hd-title'>买家留言</view> </view> </view> <view class="cell-textarea "> </view> </view> </view> <lvv-popup position="bottom" ref="lvvpopref"> <view style="width: 100%;height: 700upx;background: #F8F8F8;;position: absolute;left:0;bottom: 0;"> <view class="pop-c"> <!-- <view class="pop-t"> <view class='cell-item invoice'> <view class='cell-item-hd'> <view class='cell-hd-title'>优惠券</view> </view> <view class='cell-item-ft' @click="toclose()"> <image class='cell-ft-next icon' src='/static/image/close.png'></image> </view> </view> </view> --> <view class="pop-b"> <view class="pop-b-t"> <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" style-type="text" active-color="#333" ></uni-segmented-control> </view> <view class="" v-show="current === 0"> <scroll-view class="coupon-c" scroll-y="true" style="" v-if="userCoupons.length"> <view class="coupon-c-item" v-for="(item, index) in userCoupons" :key="index"> <view :class="item.cla"> <view class="cci-l-c color-f"> coupon </view> </view> <view class="cci-r"> <!-- <image class="cci-r-img" src="" mode=""></image> --> <view class="cci-r-c"> <view class="ccirc-t color-9"> {{ item.name }} </view> <view class="ccirc-b"> <view class="ccirc-b-l"> <view class="ccirc-b-tip"> {{ item.expression1 + item.expression2 }} </view> <view class="ccirc-b-time color-9"> 有效期：{{ item.stime + ' - ' + item.etime }} </view> </view> <view class="ccirc-b-r color-f" @click="couponHandle(index)" v-if="!item.checked && !item.disabled" > 立即使用 </view> <view class="ccirc-b-r color-f" @click="couponHandle(index)" v-else-if="item.checked && !item.disabled" > 取消使用 </view> <!-- <view class="ccirc-b-r color-f bg-c"> 不可用 </view> --> </view> </view> </view> </view> </scroll-view> <view class="coupon-none" v-else> <image class="coupon-none-img" src="/static/image/order.png" mode=""></image> </view> </view> <view class="coupon-c" v-show="current === 1"> <view class="coupon-enter"> <view class="coupon-input"> </view> <!-- <view class="coupon-code"> <image src="/static/image/ewm.png" class="icon" mode="" @click="scanCode"></image> </view> --> <view class="coupon-enter-btn" @click="useInputCouponCode" > 确认 </view> </view> </view> </view> <view class="button-bottom"> 不使用优惠卷 确定 </view> </view> </view> </lvv-popup> <view class="button-bottom"> <view class="button-bottom-c"> <view class="button-bottom-c-t">共 {{ productNums }} 件商品</view> <view class="button-bottom-c-b">合计<text class="red-price"> {{ cartData.amount }}</text></view> </view> 立即支付 </view> invoice.vue <view class="content"> <view class="content-top"> <view class='cell-group margin-cell-group'> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>发票类型</view> </view> <view class='cell-item-ft'> <view class="uni-form-item uni-column invoice-type"> <radio-group class="uni-list" @change="radioChange"> <view class="invoice-type-icon"> <radio :id="item.name" :value="item.value" :checked="item.value == type"></radio> </view> <view class="invoice-type-c"> <text>{{item.name}}</text> </view> </radio-group> </view> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>发票抬头</view> </view> <view class='cell-item-ft'> </view> </view> <view class='cell-item' v-show="type === '3'"> <view class='cell-item-hd'> <view class='cell-hd-title'>税号</view> </view> <view class='cell-item-ft'> </view> </view> </view> <view class='cell-group margin-cell-group'> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>发票内容</view> </view> <view class='cell-item-ft'> <view class="cell-ft-view">明细</view> </view> </view> </view> <view class='cell-group margin-cell-group'> <view class='cell-item right-img' @click="notNeedInvoice"> <view class='cell-item-hd'> <view class='cell-hd-title'>本次不开具发票</view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> </view> </view> <view class="button-bottom"> 保存 </view> </view> storelist.vue <view class="content"> <view class='search'> <view class='search-c'> <image class='icon search-icon' src='/static/image/zoom.png'></image> </view> 搜索 </view> <view class='cell-group margin-cell-group'> <view class='cell-item add-title-item right-img' v-for="(item, key) in storeList" :key="key" @click="selectStore(item.id, item.store_name, item.mobile, item.all_address)"> <view class="cell-item-hd"> <image class='cell-hd-icon' src='/static/image/homepage.png'></image> </view> <view class='cell-item-bd'> <view class="cell-bd-view black-text"> <text class="cell-bd-text">{{item.store_name}}</text> </view> <view class="cell-bd-view"> <text class="cell-bd-text">电话：{{item.mobile}}</text> </view> <view class="cell-bd-view"> <text class="cell-bd-text">地址：{{item.all_address}}</text> </view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/location.png'></image> <text class="cell-ft-text color-9">{{item.distance}}</text> </view> </view> </view> </view> indexcustom.vue <view class="content" style="padding-top: 0upx;"> <jshop :data="pageData"></jshop> <jihaiCopyright></jihaiCopyright> </view> index.vue <view class="content" style="padding-top: 0upx;"> <jshop :data="pageData"></jshop> <jihaiCopyright></jihaiCopyright> <red-bag v-if="redBagShow" @click="handleGet"></red-bag> </view> search.vue <view class="content"> <view class='search'> <view class='search-c'> <image class='icon search-icon' src='/static/image/zoom.png'></image> </view> 搜索 </view> <view class="history-c" v-show="keys.length > 0"> <view class="history-title"> <view class='ht-left'>历史记录</view> <view class='ht-right' @click="deleteKey">清除</view> </view> <view class="history-body"> <view class="hb-item" v-for="(item, key) in keys" :key="key" @click="toNav(item)"> {{item}} </view> </view> </view> <view class="history-c" v-show="recommend && recommend.length > 0"> <view class="history-title"> <view class='ht-left'>搜索发现</view> </view> <view class="history-body"> <view class="hb-item" v-for="(item, key) in recommend" :key="key" @click="toNav(item)"> {{item}} </view> </view> </view> </view> loginchooseindex.vue <view class="content"> <view class="login-m"> <view class="login-item"> <view class="logo"> <open-data type="userAvatarUrl"></open-data> </view> </view> <view class="login-tip"> <view class="login-tip-big"> 申请获取以下权限 </view> <view class="login-tip-small"> 获得你的公开信息 （昵称、头像等） </view> </view> </view> <view class="login-b flc"> 拒绝 允许 授权登录 </view> </view> loginindex.vue <view class="content"> <view class="login-t"> <image class="login-logo" :src="logoImage" mode="aspectFill"></image> </view> <view class="login-m"> <view class="login-item"> </view> <view class="login-item flc"> <view :class="sendCodeBtn" @click="sendCode" v-if="verification">发送验证码</view> <view class="btn btn-g" v-if="!verification">{{ timer }} 秒后重新获取</view> </view> </view> <view class="login-b"> <view v-if="user_wx_id"> 登录 </view> <view v-else> 登录 <view class="login-other flc"> <view class="fz12 item" @click="selectLoginType"> 密码登录 </view> <view class="fz12 item" @click="toReg"> 注册 </view> </view> </view> 登录 </view> </view> index1.vue <view class="content"> <view class="login-t"> <image class="login-logo" :src="logoImage" mode="aspectFill"></image> </view> <view> <view class="login-m"> <view class="login-item"> </view> <view class="login-item flc"> </view> <view class="login-item" v-if="isCaptcha"> </view> </view> <view class="login-b"> 登录 <view class="login-other flc"> <view class="fz12 item" @click="selectLoginType"> 验证码登录 </view> <view class="fz12 item" @click="toReg"> 注册 </view> </view> </view> </view> <view class="fz12 g5"> 第三方账号登录： </view> <view class="flc third-block"> <view class="third-item" v-for="(item, key,index) in thirdPartyLogins" :key="index" @click="handleThirdLogin(item)"> <image class="third-item-img" :src="getThirdLoginImg(key)" mode="aspectFill"></image> </view> </view> <view class="fz12 g5"> 第三方账号登录： </view> <view class="flc third-block" v-if="thirdPartyLogins.length>0"> <view class="third-item" v-for="(item, key,index) in thirdPartyLogins" :key="key" @click="handleThirdLoginApp(item)"> <image class="third-item-img" src="/static/image/ic-wechat.png" mode="aspectFill" v-if="item=='weixin'"></image> </view> </view> </view> registerindex.vue <view class="content"> <view class="reg-t"> <image class="reg-logo" :src="logoImage" mode="aspectFill"></image> </view> <view class="reg-m"> <view class="reg-item"> </view> <view class="reg-item flc"> <view :class="sendCodeBtn" @click="sendCode" v-if="verification">发送验证码</view> <view class="btn btn-g" v-if="!verification">{{ timer }} 秒后重新获取</view> </view> <view class="reg-item"> </view> </view> <view class="reg-b"> 注册 </view> <view class="registered-item"> <view class="btn btn-g btn-square registered" @click="toLogin">已有账号，立即登录</view> </view> </view> memberaddressindex.vue <view class="content"> <view class="content-top"> <view class='cell-group'> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>收货人</view> </view> <view class='cell-item-bd'> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>手机号</view> </view> <view class='cell-item-bd'> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>省市区</view> </view> <view class='cell-item-bd'> <area-picker ref="areaPicker" :areaId="areaId" :defaultIndex="defaultIndex" @onConfirm="onConfirm"></area-picker> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/ic-pull-down.png' @click="showThreePicker"></image> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>详细地址</view> </view> <view class='cell-item-bd'> </view> </view> <view class='cell-item' @click="defaultChange"> <view class='cell-item-hd'> <view class='cell-hd-title'>设为默认</view> </view> <view class='cell-item-ft' > <radio value="1" :checked="checked" color="#FF7159"/> </view> </view> </view> </view> <view class="button-bottom"> 删除 保存 </view> </view> list.vue <view class="content"> <view class="content-top" v-if="list.length"> <view class="uni-list-cell uni-list-cell-pd" v-for="(item, key) in list" :key="key"> <view class='cell-group min-cell-group'> <view class='cell-item'> <view class='cell-item-hd' @click="isSelect(item)"> <view class='cell-hd-title'>{{item.name}} <text class="phone-num">{{item.mobile}}</text></view> </view> <view class='cell-item-ft' v-show="type != 'order'"> <image class='cell-ft-next icon' src='/static/image/compile.png' @click="toEdit(item.id)"></image> <text class="cell-ft-text"></text> </view> </view> <view class='cell-item' @click="isSelect(item)"> <view class='cell-item-bd'> <view class="cell-bd-view"> <view class="cell-tip" v-show="item.is_def === 1">默认</view> <text class="cell-bd-text">{{item.area_name + item.address}}</text> </view> </view> </view> </view> </view> </view> <view class="address-none" v-else> <image class="address-none-img" src="/static/image/order.png" mode=""></image> </view> <view class="button-bottom"> 从微信获取 新增收货地址 </view> </view> after_saledetail.vue <view class="content"> <view class="content-top"> <!-- <view class="back-img"> <view class="back-img-c"> <view class="back-img-t">退款单状态</view> <view class="back-img-b">{{status_name}} {{refund_name}} {{reship_name}}...</view> </view> </view> --> <view class='cell-group margin-cell-group'> <view class='cell-item add-title-item'> <view class='cell-item-bd'> <view class="cell-bd-view black-text"> <text class="cell-bd-text color-3">退款单状态</text> </view> <view class="cell-bd-view"> <text class="cell-bd-text color-9">{{status_name}} {{refund_name}} {{reship_name}}...</text> </view> <view class="cell-bd-view"> <!-- <text class="cell-bd-text">下单时间：{{ orderInfo.ctime }}</text> --> </view> </view> </view> </view> <view class='cell-group margin-cell-group'> <view class='cell-item'> <view class='cell-item-hd'><view class='cell-hd-title'>售后类型</view></view> <view class='cell-item-ft'><view class="cell-ft-p">{{type_name}}</view></view> </view> <view class='cell-item'> <view class='cell-item-hd'><view class='cell-hd-title'>退款金额</view></view> <view class='cell-item-ft'><view class="cell-ft-p red-price">{{refund}}元</view></view> </view> </view> <view class='cell-group margin-cell-group' v-if="images.length > 0"> <view class='cell-item right-img'><view class='cell-item-hd'><view class='cell-hd-title'>图片凭证</view></view></view> <view class=""> <view class="evaluate-c-b"> <view class="goods-img-item" v-for="(item, key) in images" :key="key"> <image :src="item.url" mode="aspectFit" @click="clickImg(item.url)"></image> </view> </view> </view> </view> <view class='cell-group margin-cell-group'> <view class='cell-item right-img'> <view class='cell-item-hd'> <view class='cell-hd-title'>问题描述</view> </view> </view> <view class="cell-textarea"> <text v-if="reason">{{reason}}</text> <text v-else>暂无描述</text> </view> </view> <view class='cell-group margin-cell-group' v-show="status == 2 && reship_status == 1"> <view class='cell-item right-img'> <view class='cell-item-hd'> <view class='cell-hd-title'>退货邮寄信息</view> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>收件人</view> </view> <view class='cell-item-bd'> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>联系方式</view> </view> <view class='cell-item-bd'> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>邮寄地址</view> </view> <view class='cell-item-bd'> </view> </view> </view> <view class='cell-group margin-cell-group' v-show="status == 2 && reship_status == 1"> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>快递公司</view> </view> <view class='cell-item-bd'> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>物流单号</view> </view> <view class='cell-item-bd'> </view> </view> </view> <view class='cell-group margin-cell-group' v-show="status == 2 && reship_status > 1"> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>快递公司</view> </view> <view class='cell-item-bd'> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>物流单号</view> </view> <view class='cell-item-bd'> </view> </view> </view> </view> <view class="button-bottom" v-show="status == 2 && reship_status == 1"> 提交 </view> <view class="button-bottom" v-show="(order_status == 1 && status == 3) || (order_status == 1 && status == 2 && refund_status != 1 && refund_status != 0) || (order_status == 1 && status == 2 && reship_status == 3)"> 再次申请售后 </view> </view> index.vue <view class="content"> <view class="content-top"> <view class="img-list cart-list"> <checkbox-group class="cart-checkbox" @change="checkboxChange"> <view class="cart-checkbox-item" v-for="(item, key) in items" :key="key"> <view class="cart-checkbox-c"><checkbox :value='item.id' :checked="item.checked" color="#FF7159"/></view> <view class="img-list-item"> <image class="img-list-item-l little-img have-none" :src="item.image_url" mode="aspectFill"></image> <view class="img-list-item-r little-right"> <view class="little-right-t"> <view class="goods-name list-goods-name">{{item.name}}</view> </view> <view class="goods-item-c"> <view class="goods-buy"> <view class="goods-salesvolume"> {{item.addon}} x{{item.nums}} </view> </view> </view> </view> </view> </view> </checkbox-group> </view> <view class='cell-group margin-cell-group'> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>服务类型</view> </view> <view class='cell-item-ft'> <view class="uni-form-item uni-column invoice-type"> <!-- <radio-group class="uni-list" @change="radioChange"> <view> <radio :id="item.name" :value="item.name" :checked="item.checked"></radio> </view> <view> <text>{{item.value}}</text> </view> </radio-group> --> <radio-group class="uni-list" @change="radioChange"> <view class="invoice-type-icon"> <radio class="a-radio" :id="item.name" :value="item.value" :checked="item.checked" :disabled="item.disabled"></radio> </view> <view class="invoice-type-c"> <text>{{item.name}}</text> </view> </radio-group> <jhlable></jhlable> </view> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>退款金额</view> </view> <view class='cell-item-ft'> </view> </view> </view> <view class='cell-group margin-cell-group'> <view class='cell-item right-img'> <view class='cell-item-hd'> <view class='cell-hd-title'>上传凭证</view> </view> </view> <view class=""> <view class="evaluate-c-b"> <view class="goods-img-item" v-for="(item, key) in images" :key="key"> <image class="del" src="/static/image/del.png" mode="" @click="delImage(item)"></image> <image class="" :src="item.url" mode="" @click="clickImg(item.url)"></image> </view> <view class="upload-img" v-show="isImage" @click="upImage"> <image class="icon" src="/static/image/camera.png" mode=""></image> <view class="">上传照片</view> </view> </view> </view> </view> <view class='cell-group margin-cell-group'> <view class='cell-item right-img'> <view class='cell-item-hd'> <view class='cell-hd-title'>问题描述</view> </view> </view> <view class="cell-textarea "> </view> </view> </view> <view class="button-bottom"> 提交 </view> </view> list.vue <view class="content"> <view class="order-list"> <view class="goods-detail" v-for="(item, key) in order" :key="key" v-if="item.order && item.order.items"> <view class="order-item"> <view class='cell-group'> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>售后单号：{{item.aftersales_id}}</view> 复制 </view> <view class='cell-item-ft'> <text class='cell-ft-text' v-if="item.status == 1">待审核</text> <text class='cell-ft-text' v-else-if="item.status == 2">审核通过</text> <text class='cell-ft-text' v-else-if="item.status == 3">审核拒绝</text> </view> </view> </view> <view class='img-list' v-if="item.order && item.order.items"> <view class='img-list-item' v-for="(v, k) in item.order.items" :key="k" @click="showOrder(item.aftersales_id)"> <image class='img-list-item-l little-img' :src='v.image_url' mode='aspectFill'></image> <view class='img-list-item-r little-right'> <view class='little-right-t'> <view class='goods-name list-goods-name'>{{v.name}}</view> <view class='goods-price'>￥{{v.price}}</view> </view> <view class='goods-item-c'> <view class='goods-buy'> <view class='goods-salesvolume' v-if="v.addon">{{v.addon}}</view> <view class='goods-num'>× {{v.nums}}</view> </view> </view> </view> </view> </view> <!-- <view class='cell-group'> <view class='cell-item'> <view class='cell-item-ft goods-num'> <text class='cell-ft-text'>合计<text class="red-price">￥{{item.order.order_amount}}（含运费￥{{item.order.cost_freight}})</text></text> <text class='cell-ft-text'>共计{{item.countnum}}件商品</text> </view> </view> </view> --> <view class='order-list-button'> 查看详情 </view> </view> </view> <uni-load-more :status="loadStatus"></uni-load-more> </view> </view> balanceadd_bankcard.vue <view class="content"> <view class="content-top"> <view class='cell-group'> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>银行卡号</view> </view> <view class='cell-item-bd'> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>持卡人</view> </view> <view class='cell-item-bd'> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>银行名称</view> </view> <view class='cell-item-bd'> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>银行卡类型</view> </view> <view class='cell-item-bd'> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>开户行名</view> </view> <view class='cell-item-bd'> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>开户行地址</view> </view> <view class='cell-item-bd'> <area-picker ref="areaPicker" :areaId="areaId" :defaultIndex="defaultIndex" @onConfirm="onConfirm"></area-picker> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/ic-pull-down.png' @click="showThreePicker"></image> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>设为默认</view> </view> <view @click="defaultChange"> <view class='cell-item-ft'> <radio value="1" :checked="checked" color="#333"/> </view> </view> </view> </view> </view> <view class="button-bottom"> 保存 </view> </view> bankcard.vue <view class="content"> <view class="content-top" v-if="cards.length"> <view class="card-item" v-for="(item, index) in cards" :key="index" > <view class="card-item-tip" v-if="item.is_default === 1"> <view class="cit-bg"></view> <view class="cit-text">默</view> </view> <view class="card-item-body"> <view class="cib-left"> <image class="bank-logo" :src="item.bank_logo" mode=""></image> </view> <view class="cib-right"> <view class="cibr-t color-3"> {{ item.bank_name }} - {{ item.card_type }} </view> <view class="cibr-b color-9"> {{ item.card_number }} </view> </view> </view> <view class="mr-card" v-if="item.is_default === 2" @click="setDefault(item.id)" > 设为默认 </view> <view class="del-card" v-if="mold" @click="selected(index)" > 选择 </view> <view class="del-card" v-else @click="removeCard(item.id)" > 删除 </view> </view> </view> <view class="cards-none" v-else> <image class="cards-none-img" src="/static/image/order.png" mode=""></image> </view> <view class="button-bottom"> 添加银行卡 </view> </view> cashlist.vue <view class="content"> <view class='cell-group'> <view class='cell-item right-img'> <view class='cell-item-hd'> <view class='cell-hd-title color-6'>类型筛选</view> </view> <view class='cell-item-bd'> <view class="uni-list"> <view class="uni-list-cell-db color-6"> <picker @change="changeState" :value="index" :range="objectType"> <view class="uni-input">{{objectType[index]}}</view> </picker> </view> <image class='right-img icon' src='/static/image/ic-pull-down.png'></image> </view> </view> </view> </view> <view class="type-c" v-if="list.length" > <view class="cell-group margin-cell-group" v-for="(item, index) in list" :key="index" > <view class="cell-item"> <view class="cell-item-hd"> <view class='cell-hd-title'>{{ item.type }}</view> </view> <view class="cell-item-ft"> <view class="cell-ft-p color-9"> {{ item.ctime }} </view> </view> </view> <view class="cell-item"> <view class="cell-item-hd"> <view class='cell-hd-title color-9'>提现卡号：{{ item.card_number }}</view> </view> <view class="cell-item-ft red-price"> {{ item.money }} </view> </view> </view> <uni-load-more :status="loadStatus" ></uni-load-more> </view> <view class="order-none" v-else> <image class="cash-none-img" src="/static/image/order.png" mode=""></image> </view> </view> details.vue <view class="content"> <view class='cell-group'> <view class='cell-item right-img'> <view class='cell-item-hd'> <view class='cell-hd-title color-6' style="top: 0;">类型筛选</view> </view> <view class='cell-item-bd down-pull'> <view class="uni-list"> <view class="uni-list-cell-db color-6"> <picker @change="changeState" :value="index" :range="objectType"> <view class="uni-input">{{objectType[index]}}</view> </picker> </view> <image class='right-img icon' src='/static/image/ic-pull-down.png'></image> </view> </view> </view> </view> <view class="type-c" v-if="list.length" > <view class="cell-group margin-cell-group" v-for="(item, index) in list" :key="index" > <view class="cell-item"> <view class="cell-item-hd"> <view class='cell-hd-title'>{{ item.type }}</view> </view> <view class="cell-item-ft"> <view class="cell-ft-p color-9"> {{ item.ctime }} </view> </view> </view> <view class="cell-item"> <view class="cell-item-hd"> <view class='cell-hd-title color-9'>余额：{{ item.balance }}</view> </view> <view class="cell-item-ft red-price"> {{ item.money }} </view> </view> </view> <uni-load-more :status="loadStatus" ></uni-load-more> </view> <view class="order-none" v-else> <image class="balance-none-img" src="/static/image/order.png" mode=""></image> </view> </view> index.vue <view class="content"> <view class='withdrawcash-top'> <text class='withdrawcash-title'>账户余额（元）</text> <text class='withdrawcash-num'>{{ userInfo.balance }}</text> </view> <view class='cell-group margin-cell-group right-img'> <view class='cell-item'> <view class='cell-item-hd' @click="navigateToHandle('./recharge')"> <image class='cell-hd-icon' src='/static/image/topup.png'></image> <view class='cell-hd-title'>账户充值</view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> <view class='cell-item'> <view class='cell-item-hd' @click="navigateToHandle('./withdraw_cash')"> <image class='cell-hd-icon' src='/static/image/withdraw.png'></image> <view class='cell-hd-title'>余额提现</view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> <view class='cell-item'> <view class='cell-item-hd' @click="navigateToHandle('./details')"> <image class='cell-hd-icon' src='/static/image/detail.png'></image> <view class='cell-hd-title'>余额明细</view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> <view class='cell-item'> <view class='cell-item-hd' @click="navigateToHandle('./cashlist')"> <image class='cell-hd-icon' src='/static/image/record.png'></image> <view class='cell-hd-title'>提现记录</view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> <view class='cell-item'> <view class='cell-item-hd' @click="navigateToHandle('./bankcard')"> <image class='cell-hd-icon' src='/static/image/card.png'></image> <view class='cell-hd-title'>我的银行卡</view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> </view> </view> recharge.vue <view class="content"> <view class="content-top"> <view class='cell-group margin-cell-group'> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>当前金额</view> </view> <view class='cell-item-bd'> <text class="cell-bd-view">￥{{ user.balance }}</text> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>充值金额</view> </view> <view class='cell-item-bd'> </view> </view> </view> </view> <view class="button-bottom"> 去支付 </view> </view> withdraw_cash.vue <view class="content"> <view class="content-top"> <view class='cell-group margin-cell-group' v-if="userbankCard" @click="toBankCardList" > <view class='cell-item right-img'> <view class='cell-item-hd'> <image class="yl-logo" :src="cardInfo.bank_logo" mode=""></image> </view> <view class='cell-item-bd'> <text class="cell-bd-view">{{ cardInfo.card_number }}</text> </view> <view class="cell-item-ft"> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> </view> <view class='cell-group margin-cell-group' v-else @click="toBankCardList" > <view class='cell-item right-img'> <view class='cell-item-hd'> <image class="yl-logo" src="/static/image/yl.png" mode=""></image> </view> <view class='cell-item-bd'> <text class="cell-bd-view">请添加银行卡</text> </view> <view class="cell-item-ft"> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> </view> <view class='cell-group margin-cell-group'> <view class='cell-item'> <view class='cell-item-bd' v-if="tocashExplain"> <view class='cell-hd-title' style="color: #666;">{{ tocashExplain }}</view> </view> </view> <view class='cell-item'> <view class='cell-item-bd withdrawcash-input'> <view class='cell-hd-title'><text>￥</text> </view> </view> </view> <view class='cell-item'> <view class='cell-item-bd'> <view class='cell-hd-title' style="color: #666;" v-show="!isError">可用余额 {{ user.balance }} 元</view> <view class='cell-hd-title' style="color: #f00;" v-show="isError">提现金额超过可用余额</view> </view> </view> </view> </view> <view class="button-bottom"> 确认提现 确认提现 </view> </view> collectionindex.vue <view class="content"> <view class="collection" v-if="list.length"> <view class="container_of_slide" v-for="(item, index) in list" :key="index" > <view class="slide_list" @touchstart="touchStart($event,index)" @touchend="touchEnd($event,index)" @touchmove="touchMove($event,index)" @tap="recover(index)" :style="{transform:'translate3d('+item.slide_x+'px, 0, 0)'}" v-if="item.goods" > <view class="now-message-info" hover-class="uni-list-cell-hover" :style="{width:Screen_width+'px'}" @click="goodsDetail(item.goods_id)"> <view class="icon-circle"> <image class='goods-img' :src="item.goods.image_url" mode="aspectFill"></image> </view> <view class="list-right"> <view class="list-title">{{ item.goods.name }}</view> <view class="red-price">￥{{ item.goods.price }}</view> <view class="list-detail">{{ item.ctime }}</view> </view> <view class="list-right-1"> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> <view class="group-btn"> <view class="removeM btn-div" @tap="collect(index)"> 取消 </view> </view> <view style="clear:both"></view> </view> </view> <uni-load-more :status="loadStatus" ></uni-load-more> </view> <view class="collection-none" v-else> <image class="collection-none-img" src="/static/image/order.png" mode=""></image> </view> </view> couponindex.vue <view class="content"> <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" style-type="text" active-color="#333"></uni-segmented-control> <view class=""> <view class="coupon-c-item" v-for="(item, key) in listData" :key="key"> <view class="cci-l"> <view class="cci-l-c color-f" v-if="current == 0"> coupon </view> <view class="cci-l-c color-f color-b" v-if="current != 0"> coupon </view> </view> <view class="cci-r"> <view class="cci-r-c"> <view class="ccirc-t color-9"> {{item.name}} </view> <view class="ccirc-b"> <view class="ccirc-b-l"> <view class="ccirc-b-tip"> {{ item.expression1 + item.expression2 }} </view> <view class="ccirc-b-time color-9"> 有效期：{{item.stime}} - {{item.etime}} </view> </view> <view class="ccirc-b-r color-f" @click="goIndex" v-if="current == 0"> 立即使用 </view> </view> </view> </view> </view> <uni-load-more :status="loadStatus"></uni-load-more> </view> </view> distributionagreement.vue <view class="content"> <view class="article"> <view class="article-content"> <rich-text :nodes="content"></rich-text> </view> </view> </view> apply.vue <view class="content"> <view class="apply-c"> <view class="apply-top"> <view class='cell-group'> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>姓名</view> </view> <view class='cell-item-bd'> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>微信</view> </view> <view class='cell-item-bd'> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>QQ</view> </view> <view class='cell-item-bd'> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>手机</view> </view> <view class='cell-item-bd'> </view> </view> </view> <view class="apply-tip color-6 fsz26"> <radio value="1" :checked="checked" color="#FF7159"/>我已经阅读并接受 <text class="" @click="goAgreement()">"分销协议"</text> </view> </view> <view class="apply-bot"> 申请成为分销 </view> </view> </view> apply_state.vue <view class="content"> <view class="apply-c"> <view class="apply-top fsz36 color-o" v-if="info.verify==2"> 恭喜，您的申请已提交！ </view> <view class="apply-top-refuse fsz36 color-o" v-if="info.verify==3"> 抱歉，您的申请被驳回！ </view> <view class="apply-top fsz36 color-o" v-if="info.verify==1"> 恭喜，您的申请已通过！ </view> <view class="apply-bot" v-if="info.verify==2"> <view class="apply-bot-sop"> <view class="abs-img"> <image class="icon" src="/static/image/del.png" mode=""></image> </view> <view class="color-9 abs-mid" > <image class="dot" src="/static/image/dot-o.png" mode=""></image> <image class="dot" src="/static/image/dot-o.png" mode=""></image> <image class="dot" src="/static/image/dot-o.png" mode=""></image> <image class="dot" src="/static/image/dot-o.png" mode=""></image> <image class="dot" src="/static/image/dot-o.png" mode=""></image> <image class="dot" src="/static/image/dot-o.png" mode=""></image> <image class="dot" src="/static/image/dot-g.png" mode=""></image> <image class="dot" src="/static/image/dot-g.png" mode="" ></image> <image class="dot" src="/static/image/dot-g.png" mode="" ></image> <image class="dot" src="/static/image/dot-g.png" mode="" ></image> <image class="dot" src="/static/image/dot-g.png" mode="" ></image> <image class="dot" src="/static/image/dot-g.png" mode="" ></image> </view> <view class="abs-img"> <image class="icon" src="/static/image/close.png" mode=""></image> </view> </view> <view class="apply-bot-text"> <view class="abt-c"> <view class="color-6 fsz30"> 申请提交成功 </view> <view class="color-9 fsz24"> {{info.ctime}} </view> </view> <view class="abt-c"> <view class="color-6 fsz30" v-if="info.verify==2"> 等待审核 </view> <view class="color-6 fsz30" v-if="info.verify==3"> 审核驳回 </view> <view class="color-6 fsz30" v-if="info.verify==1"> 审核通过 </view> </view> </view> </view> </view> </view> index.vue <view class="content"> <view class="content-top"> <view class="dist-head"> <view class="dist-head-top"> <view class="dht-margin color-f fsz34" v-if="condition.condition_status">已达标</view> <view class="dht-margin color-f fsz34" v-if="!condition.condition_status">未达标</view> <cmd-progress class="dht-margin" :percent="condition.condition_progress" :stroke-width="23" stroke-color="linear-gradient(to right, #ef32d9, #89fffd)"></cmd-progress> <view class="dht-margin color-d fsz28">{{condition.condition_msg}}</view> </view> <view class="dist-head-tip color-f fsz24"> 注：消费金额只算实付金额部分，储值抵扣/退款退货金额不算在内。 </view> </view> <view class="dist-body"> <view class="db-title color-3 fsz34"> 分销商须知 </view> <view class="db-body color-6 fsz30"> <text class="db-item">{{distributionNotes}}</text> </view> </view> </view> <view class="button-bottom"> 申请 您的条件暂不满足 </view> </view> my_store.vue <view class="content my-store"> <view class="" ref="myStore"> <view class="my-store-t"> <view class="mst-top"> <image :src="store_banner_src" mode="widthFix"></image> </view> <view class="mst-bot"> <view class='member-grid'> <view class='member-item'> <image class='member-item-img' :src='store_logo_src'></image> </view> <view class='member-item'> <view class="color-o fsz36">{{total_goods}}</view> <text class='member-item-text'>全部宝贝</text> </view> <view class='member-item' @click="openPopup()"> <image class='member-item-icon' src='/static/image/ic-me-collect.png'></image> <text class='member-item-text'>收藏本店</text> </view> <view class='member-item'> <image class='member-item-icon' src='/static/image/qr_code.png'></image> <text class='member-item-text'>二维码</text> <image class='member-item-icon' src='/static/image/qr_code.png'></image> <text class='member-item-text'>二维码</text> </view> </view> </view> </view> <view class="my-store-m"> <view class="search"> <view class="search-c" @click="goSearch"> <view class="search-input search-input-p"> <view class="search-input-p-c"> {{ searchKey }} </view> </view> <image class="icon search-icon" src="/static/image/zoom.png"></image> </view> </view> </view> <lvv-popup position="bottom" ref="lvvpopref" @click="closePopup()"> <view class="collect-pop" @click="closePopup()"> <image v-if="isWeixinBrowser" src="/static/image/wxh5.png" mode="widthFix"></image> <image src="/static/image/wxxcx.png" mode="widthFix"></image> <view class="h5-tip color-f fsz38"> <view>请将此页面添加浏览器书签</view> <view>方便下次浏览</view> </view> </view> </lvv-popup> </view> <view class="img-grids"> <view v-if="goodsList.length>0"> <view class="img-grids-item" v-for="(item, index) in goodsList" :key="index" @click="goodsDetail(item.id)"> <image class="img-grids-item-t have-none" :src="item.image_url" mode='aspectFill'></image> <view class="img-grids-item-b"> <view class="goods-name grids-goods-name"> {{item.name}} </view> <view class="goods-item-c"> <view class="goods-price red-price">￥{{item.price}}</view> <image class="goods-cart" src="../../static/image/ic-car.png"></image> </view> </view> </view> </view> <view class="order-none" v-else> <image class="order-none-img" src="../../static/image/order.png" mode=""></image> </view> </view> <uni-load-more :status="loadStatus"></uni-load-more> </view> order.vue <view class="content"> <view class="type-c" v-if="list.length"> <view class="cell-group margin-cell-group" v-for="(item, index) in list" :key="index"> <view class="cell-item"> <view class="cell-item-hd"> <view class='cell-hd-title'>下单人:{{ item.buy_user }}</view> </view> <view class="cell-item-ft"> <view class="cell-ft-p color-9"> {{ item.ctime }} </view> </view> </view> <view class="cell-item"> <view class="cell-item-hd"> <view class='cell-hd-title color-9'>订单号:{{ item.order_id }}</view> </view> <view class="cell-item-ft red-price"> {{ item.amount }} </view> </view> </view> <uni-load-more :status="loadStatus" ></uni-load-more> </view> <view class="order-none" v-else> <image class="balance-none-img" src="/static/image/order.png" mode=""></image> </view> </view> popularize.vue <view class="content"> <view class="content-c"> <view class="content-c-top color-6 fsz28"> 将网站分享给您的好友，您的好友通过您的分享购买网站商品，你将会获得佣金。 </view> <image class="qrcode-img" src="/static/demo-img/qcode.png" mode="widthFix"></image> <view class="color-3 fsz26"> 长按保存二维码图片 </view> </view> </view> store_setting.vue <view class="content"> <view class="content-top"> <view class='cell-group'> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>名称</view> </view> <view class='cell-item-bd'> </view> </view> <view class='cell-item user-head'> <view class='cell-item-hd'> <view class='cell-hd-title'>图标</view> </view> <view class='cell-item-ft'> <image class='cell-ft-next user-head-img have-none' mode="aspectFill" :src="logo" @click="uploadLogo"></image> </view> </view> </view> <view class='cell-group'> <view class='cell-item right-img'> <view class='cell-item-hd'> <view class='cell-hd-title'>店招</view> </view> </view> <view class=""> <view class="evaluate-c-b"> <view class="goods-img-item" v-for="(item, key) in images" :key="key"> <image class="del" src="/static/image/del.png" mode="" @click="delImage(item)"></image> <image class="" :src="item.url" mode="" @click="clickImg(item.url)"></image> </view> <view class="upload-img" v-show="isImage" @click="upImage"> <image class="icon" src="/static/image/camera.png" mode=""></image> <view class="">上传照片</view> </view> </view> </view> </view> <view class='cell-group'> <view class='cell-item right-img'> <view class='cell-item-hd'> <view class='cell-hd-title'>简介</view> </view> </view> <view class="cell-textarea "> </view> </view> </view> <view class="button-bottom"> 保存 </view> </view> user.vue <view class="content"> <view class='member-top'> <!-- <image class='bg-img' src='/static/image/member-bg.png'></image> --> <view class='member-top-c'> <view class="fsz50 color-f">{{info.total_settlement_amount}}</view> <view class='fsz26 color-d'>累计收入</view> </view> </view> <view class='member-grid'> <view class='member-item' v-for="(item, index) in orderItems" :key="index"> <text class='member-item-text'>{{ item.name }}</text> <view class="color-o fsz38">{{ item.nums }}</view> </view> </view> <view class='cell-group margin-cell-group right-img'> <view class='cell-item' v-for="(item, index) in utilityMenus" :key="index"> <view class='cell-item-hd' @click="navigateToHandle(item.router)"> <image class='cell-hd-icon' :src='item.icon'></image> <view class='cell-hd-title'>{{ item.name }}</view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> <view class='cell-item'> <view class='cell-item-hd' @click="createPoster()"> <image class='cell-hd-icon' src='/static/image/extension.png'></image> <view class='cell-hd-title'>我要推广</view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> </view> <jihaiCopyright></jihaiCopyright> </view> historyindex.vue <view class="content"> <view class="collection" v-if="list.length"> <view class="container_of_slide" v-for="(item, index) in list" :key="index" > <view class="slide_list" @touchstart="touchStart($event,index)" @touchend="touchEnd($event,index)" @touchmove="touchMove($event,index)" @tap="recover(index)" :style="{transform:'translate3d('+item.slide_x+'px, 0, 0)'}" v-if="item.goods" > <view class="now-message-info" hover-class="uni-list-cell-hover" :style="{width:Screen_width+'px'}" @click="goodsDetail(item.goods_id)"> <view class="icon-circle"> <image class='goods-img' :src="item.goods.image_url" mode="aspectFill"></image> </view> <view class="list-right"> <view class="list-title">{{ item.goods.name }}</view> <view class="red-price">￥{{ item.goods.price }}</view> <view class="list-detail">{{ item.ctime }}</view> </view> <view class="list-right-1"> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> <view class="group-btn"> <view class="top btn-div" @tap="collect(index)" v-if="item.isCollection"> 取消 </view> <view class="top btn-div" @tap="collect(index)" v-if="!item.isCollection"> 收藏 </view> <view class="removeM btn-div" @tap="remove(index)"> 删除 </view> </view> <view style="clear:both"></view> </view> </view> <uni-load-more :status="loadStatus" ></uni-load-more> </view> <view class="history-none" v-else> <image class="history-none-img" src="/static/image/order.png" mode=""></image> </view> </view> indexindex.vue <view class="content"> <view class='member-top'> <image class='bg-img' src='/static/image/member-bg.png'></image> <view class='member-top-c'> <image class='user-head-img' mode="aspectFill" :src='userInfo.avatar'></image> <view class='user-name'>{{ userInfo.nickname }}</view> <view class="fz12 grade" v-if="userInfo.grade_name"> {{userInfo.grade_name}} </view> <image class='user-head-img' mode="aspectFill" :src='$store.state.config.shop_logo'></image> <view class="login-btn" @click="toLogin"> 登录/注册 </view> <view class="user-head-img"> <open-data type="userAvatarUrl"></open-data> </view> <view> 授权登录 </view> <view class="user-head-img"></view> <view> 授权登录 </view> </view> </view> <view class='cell-group'> <view class='cell-item right-img' @click="orderNavigateHandle('../order/orderlist')"> <view class='cell-item-hd'> <view class='cell-hd-title'>我的订单</view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> </view> <view class='member-grid'> <view class='member-item' v-for="(item, index) in orderItems" :key="index" @click="orderNavigateHandle('../order/orderlist', index + 1)"> <view class="badge color-f" v-if="item.nums">{{ item.nums }}</view> <image class='member-item-icon' :src='item.icon'></image> <text class='member-item-text'>{{ item.name }}</text> </view> <view class='member-item' @click="goAfterSaleList"> <view class="badge color-f" v-if="afterSaleNums != 0">{{afterSaleNums}}</view> <image class='member-item-icon' src='/static/image/me-ic-evaluate.png'></image> <text class='member-item-text'>退换货</text> </view> </view> <view class='cell-group margin-cell-group right-img'> <view class='cell-item' v-for="(item, index) in utilityMenus" :key="index" v-if="!item.unshowItem"> <view class='cell-item-hd' @click="navigateToHandle(item.router)"> <image class='cell-hd-icon' :src='item.icon'></image> <view class='cell-hd-title'>{{ item.name }}</view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> <view class='cell-item'> <view class='cell-item-hd' @click="showChat()"> <image class='cell-hd-icon' src='/static/image/me-ic-phone.png'></image> <view class='cell-hd-title'>联系客服</view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> <view class='cell-item'> <image src='/static/image/me-ic-phone.png' class='cell-hd-icon'></image> <view class='cell-hd-title'>联系客服</view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> <view class='cell-item'> <contact-button icon="/static/image/kefu2.png" size="170rpx*76rpx" tnt-inst-id="WKPKUZXG" scene="SCE00040186" class="cell-item-hd " hover-class="none" /> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> </view> <view class='cell-group margin-cell-group right-img' v-if="isClerk"> <view class='cell-item' v-for="(item, index) in clerk" :key="index"> <view class='cell-item-hd' @click="navigateToHandle(item.router)"> <image class='cell-hd-icon' :src='item.icon'></image> <view class='cell-hd-title'>{{ item.name }}</view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> </view> <jihaiCopyright></jihaiCopyright> </view> integralindex.vue <view class="content"> <view class="integral-top"> <view class="integral-top-t"> 可用积分 </view> <view class="integral-top-n"> {{ pointList.length ? pointList[0].balance : 0}} </view> <view class="integral-top-d"> {{ nowDate }} </view> </view> <view class="integral-bottom"> <view class='cell-group margin-cell-group'> <view class='cell-item add-title-item cell-title'> <view class='cell-item-bd'> <view class="cell-bd-view black-text"> <text class="cell-bd-text">积分记录</text> </view> </view> </view> <view class='cell-item add-title-item' v-for="item in pointList" :key="item.id" > <view class='cell-item-bd'> <view class="cell-bd-view black-text"> <text class="cell-bd-text">{{ item.remarks }}</text> </view> <view class="cell-bd-view"> <text class="cell-bd-text">{{ item.ctime }}</text> </view> </view> <view class="cell-item-ft"> <text class="cell-ft-p">{{ item.num > 0 ? '+' + item.num : item.num }}</text> </view> </view> <uni-load-more :status="loadStatus" :show-icon="true" ></uni-load-more> </view> </view> </view> inviteindex.vue <view class="content"> <image class="invite-bg" src="/static/image/invite-bg.png" mode=""></image> <view class="invite-c"> <view class="invite-w"> <view class='invite-w-t'>我的专属邀请码</view> <text class='invite-w-num'>{{code}}</text> <view class='invite-w-detail'>快去分享您的邀请码吧，让更多的好友加入到【{{appTitle}}】，您也可以获得丰厚的奖励！</view> <view class='invite-w-bot'> <view bindtap='commission' @click="toMoney"> <image class='invite-w-bot-ic' src='/static/image/ic-earnings.png'></image> <text class='invite-w-bot-red'>￥{{money}}元</text> <text class='invite-w-bot-gray'>邀请收益</text> </view> <view bindtap='recommendlist' @click="toList"> <image class='invite-w-bot-ic' src='/static/image/ic-number.png'></image> <text class='invite-w-bot-red'>{{number}}人</text> <text class='invite-w-bot-gray'>邀请人数</text> </view> </view> </view> <view class="invite-w" v-if="!is_superior"> <text class='invite-w-t-blue'>谁推荐你的？</text> <view class='invite-w-btn' @click="setMyInvite">提交</view> </view> <view class='invite-btn'> <image src='/static/image/ic-wechat.png'></image> <image src='/static/image/ic-link.png'></image> <image src='/static/image/ic-img.png'></image> </view> </view> </view> list.vue <view class="content"> <view class="collection"> <view class="container_of_slide" v-for="(item, index) in lists" :key="index"> <view class="slide_list"> <view class="now-message-info" hover-class="uni-list-cell-hover"> <view class="icon-circle"> <image class='goods-img' :src="item.avatar" mode="aspectFill"></image> </view> <view class="list-right"> <view class="list-title">昵称: {{ item.nickname }}</view> <view class="list-detail color-6">手机号: {{ item.mobile }}</view> <view class="list-detail">推荐时间: {{ item.ctime }}</view> </view> </view> <view style="clear:both"></view> </view> </view> <uni-load-more :status="loadStatus"></uni-load-more> </view> </view> orderevaluate.vue <view class="content"> <view class="content-top"> <view class='img-list'> <view class='img-list-item' v-for="item in info.items" :key="item.id" > <view class="img-list-item-gray"> <image class='img-list-item-l small-img' :src='item.image_url' mode='aspectFill'></image> <view class='img-list-item-r small-right' @click="goodsDetail(item.goods_id)" > <view class='little-right-t'> <view class='goods-name list-goods-name'>{{ item.name }}</view> </view> </view> </view> <view class="evaluate-num"> <view class="evaluate-num-t">商品评分</view> <view class="evaluate-num-b"> <uni-rate size="18" :id="item.id" :value="score[item.id]" @change="changeScore" ></uni-rate> </view> </view> <view class="evaluate-content"> <view class="evaluate-c-t"> </view> <view class="evaluate-c-b"> <view class="goods-img-item" v-if="images[item.id].length" v-for="(img, key) in images[item.id]" :key="key" > <image class="del" src="/static/image/del.png" mode="" @click="removeImg(item.id, key)"></image> <image class="" :src="img.url" mode="" @click="clickImg(img.url)"></image> </view> <view class="upload-img" v-show="isupload[item.id]"> <image class="icon" src="/static/image/camera.png" mode="" @click="uploadImg(item.id)"></image> <view class="">上传照片</view> </view> </view> </view> </view> </view> </view> <view class="button-bottom"> 提交评论 </view> </view> express_delivery.vue <view class="content"> <view class="ed-head color-6" v-if="add.length" > 收货地址：{{ add }} </view> <view class="ed-body"> <view v-if="isExpress"> <view class="ed-body-item" v-for="(item, index) in express.data" :key="index" > <view class="edbi-left"> <view class="edbi-date color-6"> {{ item.date }} </view> <view class="edbi-time color-9"> {{ item.utime }} </view> </view> <view class="edbi-circle last-circle" v-if="item.end"> <view>收</view> </view> <view class="edbi-circle"v-else> <view></view> </view> <view class="edbi-right"> <view class="edbi-title color-3"> {{ item.title }} </view> <view class="edbi-content color-9"> {{ item.content }} </view> </view> </view> </view> <view class="ed-none" v-else> 暂无物流信息 </view> </view> </view> invitation_group.vue <view class="content"> <view class="ig-top"> <view class="ig-top-t"> <view class=""> 剩余时间：<uni-countdown :day="lasttime.day" :hour="lasttime.hour" :minute="lasttime.minute" :second="lasttime.second"></uni-countdown> </view> </view> <view class="ig-top-m"> <view class="user-head-img-c" v-for="(item, index) in teamInfo.list" :key="index"> <view class="user-head-img-tip" v-if="item.id == item.team_id">拼主</view> <image class="user-head-img cell-hd-icon have-none" :src='item.user_avatar' mode=""></image> </view> <view class="user-head-img-c uhihn" v-if="teamInfo.team_nums" v-for="n in teamInfo.team_nums" :key="n"><text>?</text></view> </view> <view class="ig-top-b"> <view class="igtb-top"> 还差<text class="red-price">{{ teamInfo.team_nums }}</text>人，赶快邀请好友来拼单吧 </view> <view class="igtb-mid"> 邀请好友拼单 </view> <view class="igtb-bot"> 分享好友越多，成团越快 </view> </view> </view> <lvv-popup position="bottom" ref="share"> <shareByH5 :shareType='3' :goodsId="goodsInfo.goods_id" :teamId="teamInfo.team_id" :groupId="teamInfo.rule_id" :shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></shareByH5> <shareByWx :shareType='3' :goodsId="goodsInfo.goods_id" :teamId="teamInfo.team_id" :groupId="teamInfo.rule_id" :shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></shareByWx> <shareByAli :shareType='3' :goodsId="goodsInfo.goods_id" :teamId="teamInfo.team_id" :groupId="teamInfo.rule_id" :shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></shareByAli> <shareByApp :shareType='3' :goodsId="goodsInfo.goods_id" :teamId="teamInfo.team_id" :groupId="teamInfo.rule_id" :shareImg="goodsInfo.image_url" :shareTitle="goodsInfo.name" :shareContent="goodsInfo.brief" :shareHref="shareHref" @close="closeShare()"></shareByApp> </lvv-popup> <view class="cell-group margin-cell-group"> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>商品名称</view> </view> <view class='cell-item-ft'> <text class="cell-ft-text">{{ goodsInfo.name }}</text> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>拼单时间</view> </view> <view class='cell-item-ft'> <text class="cell-ft-text">{{ orderInfo.ctime }}</text> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>拼单须知</view> </view> <view class='cell-item-ft group-notice'> <text class="cell-ft-text">* 好友拼单 </text> <text class="cell-ft-text">* 人满发货 </text> <text class="cell-ft-text">* 人不满退款 </text> </view> </view> </view> </view> orderdetail.vue <view class="content"> <view class="content-top"> <view class='cell-group margin-cell-group'> <view class='cell-item add-title-item'> <view class='cell-item-bd'> <view class="cell-bd-view black-text" v-if="orderInfo.order_type != 2"> <text class="cell-bd-text">{{ orderInfo.status_name }}</text> </view> <view class="cell-bd-view"> <text class="cell-bd-text">订单号：{{ orderInfo.order_id }}</text> 复制 </view> <view class="cell-bd-view"> <text class="cell-bd-text">下单时间：{{ orderInfo.ctime }}</text> </view> </view> </view> </view> <view class='cell-group margin-cell-group'> <view class='cell-item add-title-item' v-if="isDelivery" @click="logistics"> <view class='cell-item-bd'> <view class="cell-bd-view black-text"> <text class="cell-bd-text">{{ orderInfo.express_delivery.context }}</text> </view> <view class="cell-bd-view"> <text class="cell-bd-text">{{ orderInfo.express_delivery.time }}</text> </view> </view> <view class="cell-item-ft"> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> <view class='cell-item add-title-item' v-if="!orderInfo.store"> <view class='cell-item-bd'> <view class="cell-bd-view black-text"> <text class="cell-bd-text">收件人：{{ orderInfo.ship_name }}</text> </view> <view class="cell-bd-view"> <text class="cell-bd-text">{{ orderInfo.ship_area_name + orderInfo.ship_address }}</text> </view> </view> </view> </view> <view class='cell-group margin-cell-group' v-if="orderInfo.store"> <view class='cell-item add-title-item'> <view class="cell-item-hd"> <image class='cell-hd-icon' src='/static/image/homepage.png'></image> </view> <view class='cell-item-bd'> <view class="cell-bd-view black-text"> <text class="cell-bd-text">{{orderInfo.store.store_name}}</text> </view> <view class="cell-bd-view"> <text class="cell-bd-text">门店电话：{{orderInfo.store.mobile}}</text> </view> <view class="cell-bd-view"> <text class="cell-bd-text">门店地址：{{orderInfo.store.all_address}}</text> </view> <view class="cell-bd-view"> <text class="cell-bd-text">提货人信息：{{orderInfo.ship_name}}</text><text class="cell-bd-text" style="margin-left: 10rpx;">{{orderInfo.ship_mobile}}</text> </view> <view class="cell-bd-view" v-if="lading.status"> <text class="cell-bd-text">提货码：<text class="red-price">{{lading.code}}</text></text> </view> </view> </view> </view> <view class="cell-group margin-cell-group" v-if="(orderInfo.text_status == 1 || orderInfo.text_status == 2 ) && orderInfo.order_type==2"> <view class='cell-item right-img'> <view class='cell-item-hd'> <view v-if="teamInfo.status==1" class='cell-hd-title'>待拼团，还差{{ teamInfo.team_nums }}人</view> <view v-else-if="teamInfo.status==2" class='cell-hd-title'>拼团成功，待发货</view> <view v-else-if="teamInfo.status==3" class='cell-hd-title'>拼团失败</view> </view> </view> <view class="group-swiper"> <view class='cell-item' v-if="teamInfo.current_count"> <view class='cell-item-hd'> <view class="user-head-img-c" v-for="(item, index) in teamInfo.list" :key="index"> <view class="user-head-img-tip" v-if="item.id == item.team_id">拼主</view> <image class="user-head-img cell-hd-icon have-none" :src='item.user_avatar' mode=""></image> </view> <view v-if="teamInfo.team_nums > 3"> <view class="uhihn" v-for="n in 3" :key="n">?</view> <view class="uhihn">···</view> </view> <view v-else> <view class="uhihn" v-for="n in teamInfo.team_nums" :key="n">?</view> </view> </view> <view class="cell-item-ft" v-if="teamInfo.status==1"> 邀请拼单 </view> </view> </view> </view> <view class='img-list'> <view class='img-list-item' v-for="item in orderInfo.items" :key="item.id"> <image class='img-list-item-l little-img have-none' :src='item.image_url' mode='aspectFill'></image> <view class='img-list-item-r little-right'> <view class='little-right-t'> <view class='goods-name list-goods-name' @click="goodsDetail(item.goods_id)" v-if="orderInfo.order_type == 1">{{ item.name }}</view> <view class='goods-name list-goods-name' @click="pintuanDetail(item.goods_id)" v-else-if="orderInfo.order_type == 2">{{ item.name }}</view> <view class='goods-price'>￥{{ item.price }}</view> </view> <view class="romotion-tip"> <view class="romotion-tip-item" v-for="(promotion, key) in formatPormotions(item.promotion_list)" :key="key"> {{ promotion }} </view> </view> <view class='goods-item-c'> <view class='goods-buy'> <view class='goods-salesvolume' v-if="item.addon !== null">{{ item.addon }}</view> <view class='goods-num'>× {{ item.nums }}</view> </view> </view> </view> </view> </view> <view class='cell-group margin-cell-group' v-if="orderInfo.tax_type != 1"> <view class='cell-item add-title-item'> <view class='cell-item-bd'> <view class="cell-bd-view black-text"> <text class="cell-bd-text">发票信息</text> </view> <view class="cell-bd-view" v-if="orderInfo.tax_type != 1"> <text class="cell-bd-text">发票抬头：{{orderInfo.tax_title}}</text> </view> <view class="cell-bd-view" v-if="orderInfo.tax_type == 3"> <text class="cell-bd-text">发票税号：{{orderInfo.tax_code}}</text> </view> </view> </view> </view> <view class='cell-group margin-cell-group order-offer' v-if="orderInfo.promotion_list && orderInfo.promotion_list.length > 0"> <view class='cell-item add-title-item'> <view class='cell-item-hd'> <view class="cell-bd-view promotion-title"> <text class="cell-bd-text promotion-title-text">订单优惠</text> </view> </view> <view class='cell-item-bd'> <view v-for="(item, key) in orderInfo.promotion_list" :key="key" v-show="item.type == 2" class="order-promotion">{{item.name}}</view> </view> </view> </view> <view class='cell-group margin-cell-group order-price'> <view class='cell-item add-title-item'> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">商品总价</text> </view> </view> <view class='cell-item-ft'> <text class="cell-ft-p">￥{{ orderInfo.goods_amount }}</text> </view> </view> <view class='cell-item add-title-item'> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">运费</text> </view> </view> <view class='cell-item-ft'> <text class="cell-ft-p">￥{{ orderInfo.cost_freight }}</text> </view> </view> <view class='cell-item add-title-item' v-if="orderInfo.goods_pmt > 0"> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">商品优惠</text> </view> </view> <view class='cell-item-ft'> <text class="cell-ft-p">-￥{{ orderInfo.goods_pmt }}</text> </view> </view> <view class='cell-item add-title-item' v-if="orderInfo.point_money > 0"> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">积分优惠</text> </view> </view> <view class='cell-item-ft'> <text class="cell-ft-p">-￥{{ orderInfo.point_money }}</text> </view> </view> <view class='cell-item add-title-item' v-if="orderInfo.order_pmt > 0"> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">订单优惠</text> </view> </view> <view class='cell-item-ft'> <text class="cell-ft-p">-￥{{ orderInfo.order_pmt }}</text> </view> </view> <view class='cell-item add-title-item' v-if="orderInfo.coupon_pmt > 0"> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">其他优惠</text> </view> </view> <view class='cell-item-ft'> <text class="cell-ft-p">-￥{{ orderInfo.coupon_pmt }}</text> </view> </view> <view class='cell-item add-title-item'> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">订单总价</text> </view> </view> <view class='cell-item-ft'> <text class="cell-ft-p red-price">￥{{ orderInfo.order_amount }}</text> </view> </view> <view class='cell-item add-title-item' v-if="orderInfo.pay_status > 1"> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">支付方式</text> </view> </view> <view class='cell-item-ft'> <text class="cell-ft-p">{{ orderInfo.payment_name }}</text> </view> </view> <view class='cell-item add-title-item' v-if="orderInfo.pay_status > 1"> <view class='cell-item-bd'> <view class="cell-bd-view"> <text class="cell-bd-text">支付时间</text> </view> </view> <view class='cell-item-ft'> <text class="cell-ft-p">{{ orderInfo.payment_time }}</text> </view> </view> </view> </view> <view class="button-bottom" v-if="orderInfo.text_status === 1"> 取消订单 立即支付 </view> <view class="button-bottom" v-if="orderInfo.text_status === 2"> 申请售后 查看售后 </view> <view class="button-bottom" v-if="orderInfo.text_status === 3"> 申请售后 查看售后 查看物流 确认收货 </view> <view class="button-bottom" v-if="orderInfo.text_status === 4"> 申请售后 查看售后 立即评价 </view> <view class="button-bottom" v-if="orderInfo.text_status === 5"> 申请售后 查看售后 </view> </view> orderlist.vue <view class="content"> <uni-segmented-control :current="tab" :values="items" @clickItem="onClickItem" style-type="text" active-color="#333" ></uni-segmented-control> <view class="order-list"> <view class="goods-detail" v-if="list.length"> <view class="order-item" v-for="(item, index) in list" :key="index" > <view class='cell-group'> <view class='cell-item' @click="orderDetail(item.order_id)" > <view class='cell-item-hd'> <view class='cell-hd-title'>订单编号：{{ item.order_id }}</view> </view> <view class='cell-item-ft'> <text class='cell-ft-text'>{{ item.order_status_name }}</text> </view> </view> </view> <view class='img-list'> <view class='img-list-item' v-for="(goods, key) in item.items" :key="key" > <image class='img-list-item-l little-img have-none' :src='goods.image_url' mode='aspectFill'></image> <view class='img-list-item-r little-right'> <view class='little-right-t'> <view class='goods-name list-goods-name' @click="orderDetail(item.order_id)" >{{ goods.name }}</view> <view class='goods-price'>￥{{ goods.price }}</view> </view> <view class="romotion-tip"> <view class="romotion-tip-item" v-for="(promotion, k) in formatPromotions(goods.promotion_list)" :key="k" > {{ promotion }} </view> </view> <view class='goods-item-c'> <view class='goods-buy'> <view class='goods-salesvolume' v-if="goods.addon !== null" >{{ goods.addon }}</view> <view class='goods-num'>× {{ goods.nums }}</view> </view> </view> </view> </view> </view> <view class='cell-group'> <view class='cell-item'> <view class='cell-item-ft goods-num'> <text class='cell-ft-text'>合计<text class="red-price">￥ {{ item.order_amount }}</text></text> <text class='cell-ft-text'>共 {{ item.items.length }} 件</text> </view> </view> </view> <view class='order-list-button'> 查看详情 立即支付 确认收货 立即评价 </view> </view> <uni-load-more :status="loadStatus" ></uni-load-more> </view> <view class="order-none" v-else> <image class="order-none-img" src="/static/image/order.png" mode=""></image> </view> <!-- <view class="goods-detail" v-show="current === 1"> <view class="order-none"> <image class="order-none-img" src="/static/image/order.png" mode=""></image> </view> </view> <view class="goods-detail" v-show="current === 2"> 3 </view> <view class="goods-detail" v-show="current === 3"> 4 </view> <view class="goods-detail" v-show="current === 4"> 5 </view> --> </view> </view> settingindex.vue <view class="content"> <view class="content-top"> <view class='cell-group right-img'> <view class='cell-item'> <view class='cell-item-hd' @click="navigateToHandle('./user_info/index')"> <!-- <image class='cell-hd-icon' src=''></image> --> <view class='cell-hd-title'>个人信息</view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> <view class='cell-item'> <view class='cell-item-hd' @click="navigateToHandle('./user_info/password')"> <view class='cell-hd-title'>修改密码</view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='../../../static/image/right.png'></image> </view> </view> <view class='cell-item'> <view class='cell-item-hd' @click="clearCache"> <!-- <image class='cell-hd-icon' src=''></image> --> <view class='cell-hd-title'>清除缓存</view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> <view class='cell-item'> <view class='cell-item-hd' @click="aboutUs"> <!-- <image class='cell-hd-icon' src='/static/image/me-ic-about.png'></image> --> <view class='cell-hd-title'>关于我们</view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> <view class='cell-item'> <view class='cell-item-hd' @click="logOff"> <!-- <image class='cell-hd-icon' src='/static/image/me-ic-about.png'></image> --> <view class='cell-hd-title'>退出</view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/right.png'></image> </view> </view> </view> </view> <!-- <view class="button-bottom"> 退出登录 </view> --> </view> user_infoindex.vue <view class="content"> <view class="content-top"> <view class='cell-group'> <view class='cell-item user-head'> <view class='cell-item-hd'> <view class='cell-hd-title'>头像</view> </view> <view class='cell-item-ft'> <image class='cell-ft-next user-head-img have-none' mode="aspectFill" :src="avatar" @click="uploadAvatar"></image> </view> </view> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>昵称</view> </view> <view class='cell-item-bd'> </view> </view> <view class='cell-item right-img'> <view class='cell-item-hd'> <view class='cell-hd-title'>性别</view> </view> <view class='cell-item-bd'> <view class="uni-list"> <view class="uni-list-cell-db"> <picker @change="bindPickerChange" :value="index" :range="objectSex"> <view class="uni-input">{{objectSex[sex]}}</view> </picker> </view> </view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/ic-pull-down.png'></image> </view> </view> <view class='cell-item right-img'> <view class='cell-item-hd'> <view class='cell-hd-title'>生日</view> </view> <view class='cell-item-bd'> <view class="uni-list"> <view class="uni-list-cell-db"> <picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange"> <view class="uni-input">{{birthday}}</view> </picker> </view> </view> </view> <view class='cell-item-ft'> <image class='cell-ft-next icon' src='/static/image/ic-pull-down.png'></image> </view> </view> </view> </view> <view class="button-bottom"> 保存 </view> </view> password.vue <view class="content"> <view class="content-top"> <view class='cell-group'> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>旧密码</view> </view> <view class='cell-item-bd'> </view> </view> </view> <view class='cell-group'> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>新密码</view> </view> <view class='cell-item-bd'> </view> </view> </view> <view class='cell-group'> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>确认密码</view> </view> <view class='cell-item-bd'> </view> </view> </view> </view> <view class="button-bottom"> 保存 </view> </view> take_deliveryindex.vue <view class="content"> <view class="content-top"> <view class="ad" > <image class="ad-img" src="/static/demo-img/banner.png" mode="widthFix" ></image> </view> <view class='search'> <view class='search-c'> <image class='icon search-icon' src='/static/image/zoom.png'></image> </view> 查询 </view> <view v-if="allData.length"> <checkbox-group @change="checkboxChange"> <view class="img-list"> <view class="img-list-c" v-for="(item, index) in allData" :key="index"> <view class="img-list-title"> <view class="ilt-left"> <text class="color-6">订单号:</text><text class="color-9">{{ item.order_id }}</text> </view> <view class="ilt-right color-9"> {{ item.status_name }} </view> </view> <view class="img-list-bot"> <view v-if="!item.disabled" class="img-list-checkbox"> <checkbox color="#FF7159" :value="item.id" :checked="item.checked" :disabled="item.disabled" v-if="item.disabled" class="checkboxNo"/> <checkbox color="#FF7159" :value="item.id" :checked="item.checked" :disabled="item.disabled" v-else/> </view> <view class="img-list-right"> <view class="img-list-content" v-for="(i, key) in item.goods" :key="key"> <view class="img-list-item"> <image class="img-list-item-l" :src="i.image_url" mode='aspectFill'></image> <view class="img-list-item-r"> <view class="goods-name list-goods-name">{{i.name}}</view> <view class="goods-item-c"> <view class="goods-buy"> <view class="goods-salesvolume">规格：{{i.addon}}</view> <view class="goods-salesvolume">数量：{{i.nums}}</view> <view class="goods-salesvolume">SN码：{{i.sn}}</view> <view class="goods-salesvolume">BN码：{{i.bn}}</view> </view> </view> </view> </view> </view> </view> </view> </view> </view> </checkbox-group> </view> </view> <view class="button-bottom" v-if="allData.length"> 确认核销 请选择待核销订单 </view> </view> list.vue <view class="content"> <view class="order-list"> <view class="goods-detail"> <view class="order-item" v-for="(item, key) in ladingList" :key="key"> <view class='cell-group'> <view class='cell-item' style="padding: 10upx 26upx 0 0;"> <view class='cell-item-hd'> <view class='cell-hd-title'>提货码：{{item.id}}</view> </view> <view class='cell-item-ft'> <text class='cell-ft-text'>{{item.status_name}}</text> </view> </view> </view> <view class='cell-group'> <view class='cell-item'> <view class='cell-item-hd'> <view class='cell-hd-title'>订单编号：{{item.order_id}}</view> </view> <view class='cell-item-ft'> <!-- <text class='cell-ft-text' v-if="item.status == 1">待提货</text> <text class='cell-ft-text' v-else-if="item.status === 2">已提货</text> <text class='cell-ft-text' v-else>未知状态</text> --> </view> </view> </view> <view class='img-list'> <view class='img-list-item' v-for="(v, k) in item.order_items" :key="k"> <image class='img-list-item-l little-img have-none' :src='v.image_url' mode='aspectFill'></image> <view class='img-list-item-r little-right'> <view class='little-right-t'> <view class='goods-name list-goods-name'>{{v.name}}</view> <view class='goods-price'>￥{{v.price}}</view> </view> <view class='goods-item-c'> <view class='goods-buy'> <view class='goods-salesvolume' v-show="v.addon">{{v.addon}}</view> <view class='goods-num'>×{{v.nums}}</view> </view> </view> </view> </view> </view> <view class='order-list-button'> 删除 提货单核销 </view> </view> </view> </view> </view> modelindex.vuesharejump.vue <view></view> share.vue <view class="content"> <view class="share-top"> </view> <view class="share-bot"> 长按图片保存到手机 保存到本地 返回 </view> </view> store_mapindex.vue <view class="content"> <view class="map-body"> <cover-view></cover-view> </view> <scroll-view class="store-list" scroll-y> <view class="cell-item add-title-item" v-for="(item, index) in storeList" :key="index" @click="goMarkers(item.id)"> <view class="cell-item-hd"><image class="store-img" :src="item.logo"></image></view> <view class="cell-item-bd"> <view class="cell-bd-view"> <text class="cell-bd-text fsz30">{{ item.store_name }}</text> </view> <view class="cell-bd-view"> <text class="cell-bd-text color-6 fsz24">电话：{{ item.mobile }}</text> </view> <view class="cell-bd-view"> <text class="cell-bd-text color-6 fsz24">地址：{{ item.all_address }}</text> </view> </view> <view class="cell-item-ft"><image class="cell-ft-next icon" src="/static/image/right.png"></image></view> </view> </scroll-view> </view> pages.json{ "pages": [ { "path": "pages/index/index", "style": { "navigationBarTitleText": "首页", // #ifdef H5 "titleNView": false, // #endif "enablePullDownRefresh": true } }, { "path": "pages/index/custom", "style": { "navigationBarTitleText": "页面", // #ifdef H5 "titleNView": false, // #endif "enablePullDownRefresh": true } }, { "path": "pages/index/search", "style": { "navigationBarTitleText": "搜索" } }, { "path": "pages/classify/classify", "style": { "navigationBarTitleText": "分类" } }, { "path": "pages/classify/index", "style": { "navigationBarTitleText": "商品列表" } }, { "path": "pages/cart/index/index", "style": { "navigationBarTitleText": "购物车" } }, { "path": "pages/member/index/index", "style": { // #ifdef H5 "titleNView": false, // #endif "navigationBarTitleText": "个人中心" } }, { "path": "pages/member/coupon/index", "style": { "navigationBarTitleText": "我的优惠券" } }, { "path": "pages/member/balance/index", "style": { "navigationBarTitleText": "我的余额" } }, { "path": "pages/member/balance/recharge", "style": { "navigationBarTitleText": "充值" } }, { "path": "pages/member/balance/withdraw_cash", "style": { "navigationBarTitleText": "提现" } }, { "path": "pages/member/balance/details", "style": { "navigationBarTitleText": "余额明细" } }, { "path": "pages/member/balance/cashlist", "style": { "navigationBarTitleText": "提现记录" } }, { "path": "pages/member/balance/bankcard", "style": { "navigationBarTitleText": "我的银行卡" } }, { "path": "pages/member/balance/add_bankcard", "style": { "navigationBarTitleText": "添加银行卡" } }, { "path": "pages/member/collection/index", "style": { "navigationBarTitleText": "我的收藏" } }, { "path": "pages/member/history/index", "style": { "navigationBarTitleText": "我的足迹" } }, { "path": "pages/member/address/list", "style": { "navigationBarTitleText": "地址管理" } }, { "path": "pages/member/address/index", "style": { "navigationBarTitleText": "修改地址" } }, { "path": "pages/member/setting/index", "style": { "navigationBarTitleText": "设置" } }, { "path": "pages/member/setting/user_info/index", "style": { "navigationBarTitleText": "个人信息" } }, { "path": "pages/member/setting/user_info/password", "style": { "navigationBarTitleText": "修改密码" } }, { "path": "pages/member/integral/index", "style": { "navigationBarTitleText": "我的积分" } }, { "path": "pages/member/invite/index", "style": { "navigationBarTitleText": "邀请好友" } }, { "path": "pages/member/invite/list", "style": { "navigationBarTitleText": "邀请列表" } }, { "path": "pages/member/take_delivery/index", "style": { "navigationBarTitleText": "提货单核销" } }, { "path": "pages/member/take_delivery/list", "style": { "navigationBarTitleText": "提货单列表" } }, { "path": "pages/goods/index/index", "style": { // #ifdef H5 "titleNView": false, // #endif "navigationBarTitleText": "商品详情", "navigationStyle": "custom" } }, { "path": "pages/goods/index/group", "style": { "navigationBarTitleText": "促销详情", "navigationStyle": "custom" } }, { "path": "pages/goods/place-order/index", "style": { "navigationBarTitleText": "提交订单" } }, { "path": "pages/goods/place-order/invoice", "style": { "navigationBarTitleText": "发票" } }, { "path": "pages/goods/place-order/storelist", "style": { "navigationBarTitleText": "门店列表" } }, { "path": "pages/goods/payment/index", "style": { "navigationBarTitleText": "支付" } }, { "path": "pages/goods/payment/auth", "style": { "navigationBarTitleText": "等待支付" } }, { "path": "pages/goods/payment/result", "style": { "navigationBarTitleText": "支付结果" } }, { "path": "pages/member/order/orderlist", "style": { "navigationBarTitleText": "订单列表" } }, { "path": "pages/member/order/orderdetail", "style": { "navigationBarTitleText": "订单详情" } }, { "path": "pages/member/order/invitation_group", "style": { "navigationBarTitleText": "邀请拼单" } }, { "path": "pages/member/after_sale/index", "style": { "navigationBarTitleText": "申请售后" } }, { "path": "pages/member/after_sale/list", "style": { "navigationBarTitleText": "售后列表" } }, { "path": "pages/member/after_sale/detail", "style": { "navigationBarTitleText": "售后详情" } }, { "path": "pages/member/order/evaluate", "style": { "navigationBarTitleText": "订单评价" } }, { "path": "pages/member/order/express_delivery", "style": { "navigationBarTitleText": "物流信息" } }, { "path": "pages/article/index", "style": { "navigationBarTitleText": "文章详情" } }, { "path": "pages/article/list", "style": { "navigationBarTitleText": "文章列表" } }, { "path": "pages/login/choose/index", "style": { "navigationBarTitleText": "授权登录" } }, { "path": "pages/login/login/index", "style": { "navigationBarTitleText": "登录" } }, { "path": "pages/login/login/index1", "style": { "navigationBarTitleText": "登录" } }, { "path": "pages/share", "style": { "navigationBarTitleText": "分享" } }, { "path": "pages/author", "style": { // #ifdef H5 "titleNView": false, // #endif "navigationBarTitleText": "获取授权中" } }, { "path": "pages/login/register/index", "style": { "navigationBarTitleText": "注册" } }, { "path": "pages/classify/pintuan_list", "style": { "navigationBarTitleText": "拼团列表" } }, { "path": "pages/goods/index/pintuan", "style": { "navigationBarTitleText": "拼团详情", "navigationStyle": "custom" } }, { "path": "pages/form/detail/form", "style": { "navigationBarTitleText": "万能表单" } }, { "path": "pages/member/distribution/index", "style": { "navigationBarTitleText": "分销中心" } }, { "path": "pages/member/distribution/apply", "style": { "navigationBarTitleText": "申请成为分销" } }, { "path": "pages/member/distribution/apply_state", "style": { "navigationBarTitleText": "审核状态" } }, { "path": "pages/member/distribution/user", "style": { "navigationBarTitleText": "分销中心" } }, { "path": "pages/member/distribution/agreement", "style": { "navigationBarTitleText": "分销协议" } }, { "path": "pages/member/distribution/order", "style": { "navigationBarTitleText": "推广订单" } }, { "path": "pages/member/distribution/popularize", "style": { "navigationBarTitleText": "我要推广" } }, { "path": "pages/member/distribution/my_store", "style": { "navigationBarTitleText": "我的店铺" } }, { "path": "pages/member/distribution/store_setting", "style": { "navigationBarTitleText": "店铺设置" } }, { "path": "pages/activity/index", "style": { "navigationBarTitleText": "转盘抽奖" } }, { "path": "pages/share/jump", "style": { // #ifdef H5 "titleNView": false, // #endif "navigationBarTitleText": "加载中..." } }, { "path": "pages/store_map/index", "style": { "navigationBarTitleText": "门店列表" } } ], "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "新模板", "navigationBarBackgroundColor": "#fff", "backgroundColor": "#F8F8F8" }, "tabBar": { "color": "#999", "selectedColor": "#333", "backgroundColor": "#fff", "list": [ { "pagePath": "pages/index/index", "text": "首页", "iconPath": "static/image/index_gray.png", "selectedIconPath": "static/image/index_black.png" }, { "pagePath": "pages/classify/classify", "text": "分类", "iconPath": "static/image/classify_gray.png", "selectedIconPath": "static/image/classify_black.png" }, { "pagePath": "pages/cart/index/index", "text": "购物车", "iconPath": "static/image/cart_gray.png", "selectedIconPath": "static/image/cart_black.png" }, { "pagePath": "pages/member/index/index", "text": "我的", "iconPath": "static/image/user_gray.png", "selectedIconPath": "static/image/user_black.png" } ] }, "condition": { //模式配置，仅开发期间生效 "current": 0, //当前激活的模式(list 的索引项) "list": [ { "name": "", //模式名称 "path": "", //启动页面，必选 "query": "" //启动参数，在页面的onLoad函数里面得到 } ] } } README.md# Jshop小程序uniapp前台简约模板 #### 介绍 当前版本已支持可视化操作首页 uni-app简约前台H5+小程序模板，全新UI设计，更多交互细节，我们倾尽全力为您提供更加流畅舒爽的体验。 增加对支付宝小程序、APP的支持，实现一个后台，管理5个前端。 同时又实现了一套前端代码，发布多个平台，为您的业务可以提供更加强有力的支撑！ #### Jshop小程序商城介绍 Jshop小程序商城，是一款开源的电商系统，包含微信小程序和H5端，为大中小企业提供移动电子商务优秀的解决方案。 后台采用Thinkphp5.1框架开发，执行效率、扩展性、稳定性值得信赖。并且Jshop小程序商城上手难度低，可大量节省定制化开发周期。 前台H5使用Vue开发，在页面的打开和渲染效率上更快，下单流程流畅自然，可大大增加用户体验，提升订单量。 强大的促销引擎，多种促销方式自由搭配，满足各种场景的促销方式需求，做活动更灵活简单，并且在促销的扩展上也非常方便。 #### 关于开源 这不是一款免费的系统，商用记得授权哦。 之所以不彻底免费，一方面是可以让我们有持续维护下去的动力和资源，另外一方面也是不想让您有后顾之忧，避免后期尴尬。 我们的团队水平有限，也是在探索中学习，在改进。之所以开源，就是为了方便大家，也是为了提升下该项目的质量，我们相信有您的参与，可以使我们的系统更加完善和健壮。 #### 功能介绍 + 商品管理，单规格、多规格商品管理，品牌、分类管理、商品评价 + 订单管理，订单支付、发货、取消、售后等 + 会员管理，会员列表，消息管理等 + 运营管理，广告管理、文章管理 + 微信管理，小程序管理、微信公众号管理、模板列表、公众号菜单管理 + 促销管理，商品促销、订单促销、优惠券、团购秒杀 + 财务管理，支付单、退款单管理、提现管理、账户资金管理 + 控制面板，计划任务、插件、图片、地区、消息、店铺配置、支付方式、配送方式、物流公司管理。信任登录插件、阿里云OSS插件、阿里云短信插件、微信消息模板插件、分销功能 + 门店管理，门店列表。门店核销、店员管理、提货单管理。 + 智能表单，表单列表、表单统计、表单提交管理、表单小程序码等 + 统计报表，商品销量统计、财务收款统计、订单销量统计 + 页面管理，布局管理，页面可视化操作 #### 项目演示 - H5体验地址：https://demo.jihainet.com/wap/ - 后台项目地址：https://gitee.com/hnjihai/jshop_mall - QQ交流群：823732583（开发手册、接口文档、操作手册请进群查看哦~） - 交流社区：[https://bbs.jihainet.com/](https://bbs.jihainet.com/) - H5体验二维码 ![输入图片说明](https://gitee.com/uploads/images/2019/0426/090608_1a1f0073_8503.png "H5.png") - APP体验二维码 ![输入图片说明](https://gitee.com/uploads/images/2019/0426/090622_d1d4b372_8503.png "app.png") - 微信小程序体验码 ![输入图片说明](https://gitee.com/uploads/images/2019/0426/082533_e2f315f9_8503.jpeg "gh_f9fafa5a7066_344.jpg") #### 项目截图 ![输入图片说明](https://gitee.com/uploads/images/2019/0404/180847_9615f414_8503.png "未标题-1.png") #### 目录结构 初始的目录结构如下：wap WEB部署目录（或者子目录）├─components uniapp组件目录├─pages 应用页面│ ├─article 文章相关页面│ ├─cart 购物车相关页面│ ├─classify 分类以及商品列表页面│ ├─goods 商品详情页等相关页面│ ├─index 首页以及搜索页│ ├─login 登录相关页面│ ├─member 会员中心相关页面│├─config 配置文件目录├─static 静态文件目录├─unpackage 编译后目录├─index.html 入口文件模板#### 更新说明 2019-07-31 v1.0.6 更新日志 1. 可视化图片分组添加最小高度 2. 禁止可视化垃圾桶拖拽 3. 1086短信接口改为curl 4. 增加是否绑定手机号码选项，优化后台生成用户方法 5. 修复购物车数量加减的问题 6. 生成订单的时候，有几个值没有保存成功的bug，感谢@打酱油网友提供的bug 7. 修复运费包邮bug 8. 开启规格处增加提示 9. 新增拼团功能 10. 微信登陆免手机号码校验 11. 第三方登录的时候，免手机号码验证登陆的时候，保存推荐人信息 12. 如果是第三方微信登陆，增加直接登陆 13. 用户列表显示编号 14. 修复团购秒杀删除商品后依然显示问题 15. 门店表距离获取 表前缀bug修复 16. 修复商品商品详情页品牌为空的时候，显示null的问题 17. 门店列表表前缀sql修复 18. 小程序可视化单图组件添加按钮功能 19. 订单列表加类型筛选 20. 商品详情显示优化 21. 修复库存问题 22. 可视化编辑添加文字按钮颜色 23. 小程序价格区间问题修复 24. 微信公众号无感登陆支付 25. 公众号自动登陆调整 26. 修复售后单详情查询的时候必填user_id的问题 27. 商品分类排序问题修复 28. 文章详情接口修改(文章发布时间修改为相对时间) 29. 手机号验证规则修复 30. 修复后台用户信息保存推荐人信息错误的bug 31. 修复多规格商品添加时，第一次无法保存库存问题 32. 修改可视化商品组件手动选择数据绑定 33. 修复团购秒杀问题 34. 微信和支付宝同步回调地址增加上支付单号 35. 修复门店订单有运费问题 36. 后台提货单操作,提货单详情接口修改 37. 订单售后状态简单修改 38. 修复首页多个商品组件时问题 39. 商品列表问题修复 40. 商品列表筛选调整 41. 商品分类优化 42. 页面布局修改 43. 修改商品和货品库存显示 44. 优化权限问题，修复订单支付无权限bug 45. 优化角色权限选择，可以单独选择父节点 46. 商品添加扩展分类 47. 后台商品列表动态计算库存 48. 修复公众号菜单问题 49. 修复关键词菜单 50. 图文编辑原文地址必填项问题修复，增加系统图文地址 51. 商品增加批量出库库存，改价 52. 修复商品评论，评论优化 53. 分类增加是否显示 54. 页面增加添加功能 55. 会员增加批量删除 56. 新增分销插件 57. 增加每日提现上限 58. 接口增加全局安全过滤 59. 后台登录添加背景动画，优化后台登录 60. 后台管理弹框显示修改 61. 余额变动优化，增加余额当前页统计，余额筛选类型修复 62. 修复收货地址前端输入换行问题 63. 修复后台修改管理员密码问题 64. 优化后台优化输出结构，避免节点无权限时乱码 65. 优化公众号配置地址 66. 修复原生小程序商品列表翻页问题 67. 海报生成提出来，统一处理 68. 订单发货问题优化 69. 修复vue，H5底部遮挡问题 70. 优化添加商品按钮 71. 增加加解密函数 72. 增加图片缓存，路由缓存 73. 优化分享设置，后台可设置分享 74. 后台商品列表修复高级筛选 75. 商品评价列表优化 76. 表单功能修复 77. uniapp增加智能表单 78. 表单增加提交次数限制 79. uniapp增加微信模板消息 80. 增加关于我们后台可直接配置 81. 添加批量购物车接口 82. 修复商品规格编辑问题 83. 购物车和促销价格使用精确计算 84. 微信图文增加创建和更新时间 85. 最低提现金额不能小于0.01 86. 自定义页面增加操作说明 87. 配置统一获取方法优化确保只查询一次数据库 88. 修复广告位 89. 修复编辑文章时分类问题 90. 可视化单图组件增加按钮以及颜色 2019-05-23 v1.0.5 1.修复图片组件跳转问题 2019-05-22 v1.0.4 1.增加可视化支持 2019-04-25 v1.0.3 1. 修复海报生成 2. 修复支付宝支付问题 3. 微信授权登录修复 4. 修复app登录返回问题 5. 修复支付宝绑定账户时短信验证码ip问题 #### 安装教程 1. 小程序发布教程 具体配置稍后提供 开发相关介绍：https://uniapp.dcloud.io/ 2. H5发布教程 具体配置稍后提供 开发相关开发介绍：https://uniapp.dcloud.io/ ## 配置 ### 服务器地址 config/config.js中export const baseUrl = 'http://www.b2c.com/';//注意最后斜杠,填写你的域名地址export const entId = '';//客服ID 在https://www.jihainet.com中找客服开通 ### 海报H5中保存图片跨域 nginx中添加以下配置location ~ .*\.(gif|jpg|jpeg|png)$ { add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Headers X-Requested-With; add_header Access-Control-Allow-Methods GET,POST,OPTIONS; } #### 安全&缺陷 如果你发现了一个安全漏洞或缺陷，请发送邮件到 jima@jihainet.com。所有的安全漏洞都将及时得到解决。 #### License Jshop小程序商城遵循JPPL（吉海科技Jshop系列付费产品许可）协议。 本项目包含的第三方源码和二进制文件之版权信息另行标注。 版权所有Copyright © 2019 by 吉海科技 (https://www.jihainet.com) All rights reserved。 吉海科技Jshop系列付费产品许可协议详情请参阅 [LICENSE.txt](LICENSE.txt)staticcssstyle.cssbody{ background-color: #f8f8f8; font-size: 28upx; } view{ box-sizing: border-box; } /* #ifdef MP-ALIPAY */ image{ background-size: 100% 100%; } button{ height: auto; border: none; line-height: 2.55555556; padding: 0 28upx; } input{ background: none; padding: 0; } shared-checkbox{ border-radius: 50%; } shared-checkbox{ border-radius: 50%; height: 36rpx; width: 36rpx; margin-top: -4rpx; border: 1rpx solid #d1d1d1; color: #FF7159; } shared-checkbox:checked { /* width: 36rpx; height: 36rpx; line-height: 36rpx; border-radius: 50%; text-align: center; font-size: 28rpx; color: #fff; background: transparent; transform: translate(-50%, -50%) scale(1); -webkit-transform: translate(-50%, -50%) scale(1); background-color: #FF7159; border: 1rpx solid #FF7159; */ background-color: #000; color: #000; } ._radio{ border-radius: 50%;/* 圆角 */ width: 36rpx; height: 36rpx; margin-top: -4rpx; border: 1rpx solid #d1d1d1; } /* 选中后的 背景样式 （红色背景 无边框 可根据UI需求自己修改） */ ._radio:checked{ border: 1rpx solid #FF7159; background: #FF7159; } /* 选中后的 对勾样式 （白色对勾 可根据UI需求自己修改） */ ._radio:checked::before{ border-radius: 50%;/* 圆角 */ width: 36rpx; /* 选中后对勾大小，不要超过背景的尺寸 */ height: 36rpx; /* 选中后对勾大小，不要超过背景的尺寸 */ line-height: 36rpx; text-align: center; font-size:28rpx; /* 对勾大小 30rpx */ color:#fff; /* 对勾颜色 白色 */ background: transparent; transform:translate(-50%, -50%) scale(1); -webkit-transform:translate(-50%, -50%) scale(1); } /* #endif */ uni-toast .uni-toast{ /* width: 6em; */ font-size: 24upx; border-radius: 10px; background: rgba(17,17,17,.5); } uni-input div, uni-input div div,uni-input, uni-input input{ /* min-height: 1rem !important; */ } uni-input{ /* height: 1rem; */ } uni-input div div.input-placeholder{ /* padding: 8upx 0; */ } .content-top{ margin-bottom: 116upx; } .have-none{ background-color: #f3f3f3; } .color-o{ color: #FF7159 !important; } .color-f{ color: #fff !important; } .color-d{ color: #ddd !important; } .color-3{ color: #333 !important; } .color-6{ color: #666 !important; } .color-9{ color: #999 !important; } .fsz24{ font-size: 24upx !important; } .fsz26{ font-size: 26upx !important; } .fsz28{ font-size: 28upx !important; } .fsz30{ font-size: 30upx !important; } .fsz32{ font-size: 32upx !important; } .fsz34{ font-size: 34upx !important; } .fsz36{ font-size: 36upx !important; } .fsz38{ font-size: 38upx !important; } .fsz50{ font-size: 50upx !important; } .search{ width: 100%; height: 104upx; padding: 16upx 26upx; background-color: rgba(255,255,255,1); z-index: 999; transition: all .5s; } .search-c{ width: 100%; height: 100%; position: relative; } .search-input{ background-color: #E9E9E9; width: 100%; height: 100%; box-sizing: border-box; line-height: 52upx; padding: 10upx 90upx 10upx 40upx; border-radius: 50upx; font-size: 24upx; transition: all .5s; } .search-input-p{ color: #999; width: 100%; height: 100%; } .search-input-p-c{ position: relative; top: 50%; transform: translateY(-50%); } .search-icon{ position: absolute; top: 50%; right: 30upx; transform: translateY(-50%); z-index: 99; } .swiper-c{ height: 100%; } .swiper-c image{ height: 100%; width: 100%; } .btn{ display: inline-block; box-sizing: border-box; border-radius: 0; font-size: 28upx; transform: scale(1); transition: all .5s; } /*按钮按下缩小变色*/ .btn-hover{ transform: scale(.90); transition: all .5s; opacity: .8; } /*按钮按下只变色*/ .btn-hover2{ /* transform: scale(.95); */ transition: all .1s; opacity: .6; } .btn::after{ border: none; } .btn-circle{ padding: 0upx 20upx; height: 60upx; line-height: 60upx; min-width: 140upx; /* border-radius: 6upx; */ font-size: 22upx; } .btn-square{ padding: 0upx 40upx; height: 90upx; line-height: 90upx; min-width: 150upx; border: none !important; } .btn-fillet{ border-radius: 50upx; } .btn-c{ background-color: #f7f7f7; } .btn-w{ border: 2upx solid #333; color: #333; background-color: #fff; } .btn-g{ border: 2upx solid #E0E0E0; color: #999; background-color: #fff; } .btn-b{ border: 2upx solid #333; background-color: #333; color: #fff; } .btn-o{ border: 2upx solid #FF7159; background-color: #FF7159; color: #fff; } .btn-half{ width: 50%; } .btn-all{ width: 100%; } .img-grids{ overflow: hidden; /* padding-bottom: 26upx; */ } .img-grids .goods-name{ height: 72upx; } .column3.img-grids .goods-name{ height: 68upx; } .img-grids-item{ width: 336upx; margin: 26upx; display: inline-block; background-color: #fff; float: left; min-height: 130upx; /* #ifdef MP-ALIPAY */ width: 330rpx; margin: 25rpx; min-height: 130rpx; /* #endif */ } .img-grids-item:nth-child(2n-1){ margin-right: 0; } .img-grids-item-t{ width: 336upx; height: 336upx; /* #ifdef MP-ALIPAY */ width: 330rpx; height: 330rpx; /* #endif */ } .img-grids-item-b{ padding: 0 10upx 10upx; } .goods-name{ display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: #333; width: 100%; /* height: 72upx; */ /* #ifdef MP-ALIPAY */ min-height: 20px; /* #endif */ } .grids-goods-name{ font-size: 26upx; } .goods-item-c{ overflow: hidden; margin-top: 10upx; } .goods-price{ min-width: 120upx; min-height: 40upx; color: #333; font-size: 28upx; display: inline-block; float: left; } .red-price{ color: #FF7159 !important; } .img-list{ } .img-list .goods-name{ min-height: 74upx; } .img-list-item{ padding: 30upx 26upx; background-color: #fff; margin-bottom: 2upx; overflow: hidden; } .img-list-item-l{ width: 250upx; height: 250upx; display: inline-block; float: left; } .img-list-item-r{ width: 410upx; min-height: 250upx; display: inline-block; margin-left: 26upx; float: left; padding: 10upx 0; position: relative; } .list-goods-name{ font-size: 28upx; } .img-list-item .goods-item-c{ /* position: absolute; */ /* bottom: 0; */ width: 100%; margin-top: 0; } .img-list-item .goods-price{ min-width: 150upx; min-height: 50upx; font-size: 38upx; float: none; } .goods-buy{ overflow: hidden; } .goods-salesvolume{ min-width: 100upx; height: 30upx; font-size: 20upx; color: #999; display: inline-block; } .goods-cart{ width: 40upx; height: 40upx; float: right; } .medium-img{ width: 196upx; height: 196upx; } .little-img{ width: 140upx; height: 140upx; } .small-img{ width: 120upx; height: 120upx; } .medium-right{ width: 340upx; min-height: 140upx; } .little-right{ width: 520upx; min-height: 140upx; padding: 0; } .small-right{ width: 540upx; height: 120upx; padding: 0; min-height: 60upx; } .little-right-t{ overflow: hidden; } .little-right .list-goods-name{ float: left; width: 360upx; margin-bottom: 6upx; } .small-right .list-goods-name{ width: 100%; } .little-right .goods-price{ float: right; font-size: 28upx; text-align: right; min-width: 120upx; max-width: 150upx; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-height: 40upx; } .goods-num{ float: right; color: #999; font-size: 24upx; height: 30upx; min-width: 50upx; } .goods-numbox{ float: right; } .little-right .goods-salesvolume{ font-size: 24upx; /* float: left; */ } .cell-group{ background-color: #fff; } .cell-item{ padding: 20upx 26upx 20upx 0; width: 724upx; margin-left: 26upx; border-bottom: 2upx solid #f3f3f3; position: relative; overflow: hidden; background-color: #fff; color: #333; display: table; min-height: 90upx; } .cell-item:last-child{ border: none; } .cell-item-hd{ display: table-cell; vertical-align: middle; min-width: 160upx; max-width: 180upx; font-size: 28upx; position: relative; } .cell-hd-icon{ width: 40upx; height: 40upx; display: inline-block; float: left; margin-right: 8upx; } .cell-hd-title{ float: left; display: inline-block; position: relative; /* #ifdef MP-ALIPAY */ top: 4upx; /* #endif */ /* word-wrap: break-word; */ } .cell-item-bd{ display: table-cell; vertical-align: middle; margin-left: 20upx; min-height: 30upx; overflow: hidden; min-width: 440upx; max-width: 480upx; padding-right: 50upx; } .cell-bd-view { position: relative; overflow: hidden; } .cell-bd-text{ float: left; position: relative; font-size: 24upx; } .cell-bd-text-right{ float: right; } .cell-bd-input{ display: inline-block; float: left; font-size: 26upx; } .cell-item-ft{ display: inline-block; position: absolute; top: 50%; right: 26upx; transform: translateY(-50%); overflow: hidden; } .right-img .cell-item-ft{ right: 8upx; height: 50upx; } .cell-ft-view{ position: relative; overflow: hidden; color: #666; font-size: 28upx; text-align: right; } .cell-ft-p{ font-size: 24upx; color: #666; } .cell-ft-text{ font-size: 28upx; float: right; position: relative; /* top: 8upx; */ line-height: 50upx; } .cell-ft-next{ float: right; } .margin-cell-group{ margin: 20upx 0; } .bottom-cell-group{ margin-bottom: 20upx; } .min-cell-group{ margin-bottom: 1px; padding: 20upx 0; } .min-cell-group .cell-item{ border-bottom: none; min-height: 50upx; padding: 0 26upx 0 0; } .icon{ width: 50upx; height: 50upx; /* #ifdef MP-ALIPAY */ background-size: 100% 100%; /* #endif */ } .swiper-grids .swiper-list{ white-space:nowrap; width:100%; min-height: 200upx; } .swiper-grids .img-grids-item{ float: none; margin-right: 0; width: 255upx; margin-top: 0; } .swiper-grids .img-grids-item:last-child{ margin-right: 26upx; } .swiper-grids .img-grids-item-t{ width: 255upx; height: 255upx; } .swiper-grids .goods-name{ white-space: normal; } .member-grid{ padding: 20upx 26upx; /* overflow: hidden; */ width: 100%; display: flex; } .member-item{ /* width: 20%; */ flex: 1; /* float: left; */ /* display: inline-block; */ text-align: center; position: relative; } /*会员中心图标按下事件*/ .member-item:active{ transform: scale(.90); transition: all .5s; opacity: .8; } .member-item-icon{ width: 50upx; height: 50upx; display: block; margin: 0 auto; } .member-item-text{ font-size: 24upx; color: #666; display: block; } .cart-list{ } .cart-checkbox{ position: relative; height: 100%; } .cart-checkbox-c{ display: inline-block; position: absolute; top: 50%; left: 26upx; transform: translateY(-50%); z-index: 99; } .cart-list .img-list-item{ padding-left: 90upx; } .cart-list .little-right{ width: 468upx; } .cart-list .little-right .list-goods-name{ width: 300upx; } .uni-checkbox-input{ border-radius: 50% !important; color: #fff !important; } uni-radio .uni-radio-input,uni-checkbox .uni-checkbox-input{ width: 36upx; height: 36upx; } uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked,.uni-radio-input.uni-radio-input-checked{ background-color: #FF7159 !important; border-color: #FF7159 !important; width: 36upx; height: 36upx; } uni-checkbox.checkboxNo .uni-checkbox-input{ background-color: #e1e1e1 !important; border-color: #e1e1e1 !important; } uni-radio.radioNo .uni-radio-input{ background-color: #e1e1e1 !important; border-color: #e1e1e1 !important; } uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked:before{ font-size: 36rpx; } .login-item-i-p{ color: #999; } .two-line{ display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; } .badge{ display: inline-block; position: absolute; min-width:13px; height:13px; line-height:13px; background-color:#FF7159; color:#fff; font-size:12px; border-radius:50upx; padding:0 3px; z-index: 99; } .button-bottom{ background-color: #fff; position: fixed; bottom: 0; height: 90upx; width: 100%; display: flex; z-index: 66; box-shadow: 0 0 10px #ccc; } .button-bottom .btn{ flex: 1; } .romotion-tip{ /* display: inline-block; */ overflow: hidden; } .romotion-tip-item{ display: inline-block; float: left; margin-right: 10upx; margin-bottom: 4upx; background-color: #FF7159; color: #fff; height: 34upx; font-size: 24upx; line-height: 34upx; padding: 0 10upx; } .bg-gray{ background-color: #D0D0D0; } /* #ifdef MP */ checkbox .wx-checkbox-input{ border-radius: 50%; height: 36rpx; width: 36rpx; margin-top: -4rpx; border: 1rpx solid #d1d1d1; } checkbox .wx-checkbox-input.wx-checkbox-input-checked::before { width: 36rpx; height: 36rpx; line-height: 36rpx; border-radius: 50%; text-align: center; font-size: 28rpx; color: #fff; background: transparent; transform: translate(-50%, -50%) scale(1); -webkit-transform: translate(-50%, -50%) scale(1); background-color: #FF7159; border: 1rpx solid #FF7159; } radio .wx-radio-input{ border-radius: 50%;/* 圆角 */ width: 36rpx; height: 36rpx; margin-top: -4rpx; border: 1rpx solid #d1d1d1; } /* 选中后的 背景样式 （红色背景 无边框 可根据UI需求自己修改） */ radio .wx-radio-input.wx-radio-input-checked{ border: 1rpx solid #FF7159; background: #FF7159; } /* 选中后的 对勾样式 （白色对勾 可根据UI需求自己修改） */ radio .wx-radio-input.wx-radio-input-checked::before{ border-radius: 50%;/* 圆角 */ width: 36rpx; /* 选中后对勾大小，不要超过背景的尺寸 */ height: 36rpx; /* 选中后对勾大小，不要超过背景的尺寸 */ line-height: 36rpx; text-align: center; font-size:28rpx; /* 对勾大小 30rpx */ color:#fff; /* 对勾颜色 白色 */ background: transparent; transform:translate(-50%, -50%) scale(1); -webkit-transform:translate(-50%, -50%) scale(1); } /* #endif */ .goods-bottom{ z-index: 97; } .btn-small{ padding: 0 10rpx; height: 36rpx; line-height: 32rpx; font-size: 24rpx; margin: 0 10rpx; }imageimgstoreindex.jsimport Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) const store = new Vuex.Store({ state: { config: {}, // 店铺配置信息 orderTab: 0, // 选中的订单tab页 redirectPage: '', uuid:'',//当前客户端 searchStyle: '' }, mutations: { config (state, payload) { state.config = payload }, orderTab (state, tab) { state.orderTab = tab }, redirect (state, payload) { state.redirectPage = payload.page }, searchStyle (state, style) { state.searchStyle = style } }, actions: { }, getters: { shopConfig: state => state.config, uuid: state => state.uuid, } }) export default store uni.scss/** * 这里是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:24upx; $uni-font-size-base:28upx; $uni-font-size-lg:32upx; /* 图片尺寸 */ $uni-img-size-sm:40upx; $uni-img-size-base:52upx; $uni-img-size-lg:80upx; /* Border Radius */ $uni-border-radius-sm: 4upx; $uni-border-radius-base: 6upx; $uni-border-radius-lg: 12upx; $uni-border-radius-circle: 50%; /* 水平间距 */ $uni-spacing-row-sm: 10px; $uni-spacing-row-base: 20upx; $uni-spacing-row-lg: 30upx; /* 垂直间距 */ $uni-spacing-col-sm: 8upx; $uni-spacing-col-base: 16upx; $uni-spacing-col-lg: 24upx; /* 透明度 */ $uni-opacity-disabled: 0.3; // 组件禁用态的透明度 /* 文章场景相关 */ $uni-color-title: #2C405A; // 文章标题颜色 $uni-font-size-title:40upx; $uni-color-subtitle: #555555; // 二级标题颜色 $uni-font-size-subtitle:36upx; $uni-color-paragraph: #3F536E; // 文章段落颜色 $uni-font-size-paragraph:30upx; //自定义变量 $theme-color: #28b8a1; $bg-grey: #f4f4f4; $bd-color: #f0f0f0; $color-light: #5e5e5e; $g2: #eeeeee; $g5: #9e9e9e; $fz12: 24upx; $fz16: 32upx; $fz18: 36upx; $fz20: 40upx;
apiactivity.js import request from "@utils/request"; /** * 拼团列表 */ export function getCombinationList(data) { return request.get("/combination/list", data, { login: false }); } /** * 拼团产品详情 * @param {*} id */ export function getCombinationDetail(id) { return request.get("/combination/detail/" + id, {}, { login: false }); } /** * 拼团 开团 * @param {*} id */ export function getCombinationPink(id) { return request.get("/combination/pink/" + id); } /** * 拼团 取消开团 */ export function getCombinationRemove(data) { return request.post("/combination/remove", data); } /** * 拼团海报 * @param {*} id */ export function getCombinationPoster(data) { return request.post("/combination/poster", data); } /** * 秒杀列表配置 */ export function getSeckillConfig() { return request.get("/seckill/index", {}, { login: false }); } /** * 秒杀列表 */ export function getSeckillList(time, data) { return request.get("/seckill/list/" + time, data, { login: false }); } /** * 秒杀产品详情 */ export function getSeckillDetail(id) { return request.get("/seckill/detail/" + id, {}, { login: false }); } /** * 砍价列表 * @param {*} data */ export function getBargainList(data) { return request.get("/bargain/list", data, { login: false }); } /** * 砍价产品详情 */ export function getBargainDetail(id) { return request.get("/bargain/detail/" + id); } /** * 砍价 观看/分享/参与次数 */ export function getBargainShare(data) { return request.post("/bargain/share", data); } /** * 砍价开启 * @param {*} data */ export function getBargainStart(data) { return request.post("/bargain/start", data); } /** * 砍价 帮助好友砍价 * @param {*} data */ export function getBargainHelp(data) { return request.post("/bargain/help", data); } /** * 砍价 砍掉金额 * @param {*} data */ export function getBargainHelpPrice(data) { return request.post("/bargain/help/price", data); } /** * 砍价 砍价帮总人数、剩余金额、进度条、已经砍掉的价格 * @param {*} data */ export function getBargainHelpCount(data) { return request.post("/bargain/help/count", data); } /** * 砍价 开启砍价用户信息 * @param {*} data */ export function getBargainStartUser(data) { return request.post("/bargain/start/user", data); } /** * 砍价 砍价帮 * @param {*} data */ export function getBargainHelpList(data) { return request.post("/bargain/help/list", data); } /** * 砍价海报 * @param {*} data */ export function getBargainPoster(data) { return request.post("/bargain/poster", data); } /** * 砍价列表(已参与) * @param {*} data */ export function getBargainUserList(data) { return request.get("/bargain/user/list", data); } /** * 砍价取消 */ export function getBargainUserCancel(data) { return request.post("/bargain/user/cancel", data); } order.js /* * 订单确认 * */ import request from "@utils/request"; /** * 通过购物车 id 获取订单信息 * @param cartId * @returns {*} */ export function postOrderConfirm(cartId) { return request.post("/order/confirm", { cartId }); } /** * 计算订单金额 * @param key * @param data * @returns {*} */ export function postOrderComputed(key, data) { return request.post("/order/computed/" + key, data); } /** * 获取指定金额可用优惠券 * @param price * @returns {*} */ export function getOrderCoupon(price) { return request.get("/coupons/order/" + (parseFloat(price) || 0)); } /** * 生成订单 * @param key * @param data * @returns {*} */ export function createOrder(key, data) { return request.post("/order/create/" + key, data || {}); } /** * 订单统计数据 * @returns {*} */ export function getOrderData() { return request.get("/order/data"); } /** * 订单列表 * @returns {*} */ export function getOrderList(data) { return request.get("/order/list", data); } /** * 取消订单 * @returns {*} */ export function cancelOrder(id) { return request.post("/order/cancel", { id }); } /** * 订单详情 * @returns {*} */ export function orderDetail(id) { return request.get("/order/detail/" + id); } /** * 退款理由 * @returns {*} */ export function getRefundReason() { return request.get("/order/refund/reason"); } /** * 提交退款 * @returns {*} */ export function postOrderRefund(data) { return request.post("/order/refund/verify", data); } /** * 确认收货 * @returns {*} */ export function takeOrder(uni) { return request.post("/order/take", { uni }); } /** * 删除订单 * @returns {*} */ export function delOrder(uni) { return request.post("/order/del", { uni }); } /** * 订单查询物流信息 * @returns {*} */ export function express(uni) { return request.get("order/express/" + uni); } /** * 订单查询物流信息 * @returns {*} */ export function payOrder(uni, paytype, from) { return request.post("order/pay", { uni, paytype, from }); } /** * 订单核销 * @returns {*} */ export function orderVerific(verify_code, is_confirm) { return request.post("order/order_verific", { verify_code, is_confirm }); } public.js import request from "@utils/request"; /** * 首页 * @returns {*} */ export function getHomeData() { return request.get("index", {}, { login: false }); } /** * 文章 轮播列表 * @returns {*} */ export function getArticleBanner() { return request.get("/article/banner/list", {}, { login: false }); } /** * 文章分类列表 * @returns {*} */ export function getArticleCategory() { return request.get("/article/category/list", {}, { login: false }); } /** * 文章 热门列表 * @returns {*} */ export function getArticleHotList() { return request.get("/article/hot/list", {}, { login: false }); } /** * 文章列表 * @returns {*} */ export function getArticleList(q, cid) { return request.get("/article/list/" + cid, q, { login: false }); } /** * 分享 * @returns {*} */ export function getShare() { return request.get("/share", {}, { login: false }); } /** * 文章详情 * @returns {*} */ export function getArticleDetails(id) { return request.get("/article/details/" + id, {}, { login: false }); } /** * 获取微信sdk配置 * @returns {*} */ export function getWechatConfig() { return request.get( "/wechat/config", { url: document.location.href }, { login: false } ); } /** * 获取微信sdk配置 * @returns {*} */ export function wechatAuth(code, spread, login_type) { return request.get( "/wechat/auth", { code, spread, login_type }, { login: false } ); } /** * 获取快递公司 * @returns {*} */ export function getLogistics() { return request.get("/logistics", {}, { login: false }); } /** * 获取登陆logo * @returns {*} */ export function getLogo(type) { return request.get("/wechat/get_logo", { type: type }, { login: false }); } /** * 获取图片base64 * @retins {*} * */ export function imageBase64(image, code) { return request.post( "/image_base64", { image: image, code: code }, { login: false } ); } store.js import request from "@utils/request"; /* * 商品分类 * */ export function getCategory() { return request.get("/category", {}, { login: false }); } /* * 商品详情 * */ export function getProductDetail(id) { return request.get("/product/detail/" + id, {}, { login: false }); } /* * 商品分销二维码 * */ export function getProductCode(id) { return request.get("/product/code/" + id, {}, { login: true }); } /* * 商品列表 * */ export function getProducts(q) { return request.get("/products", q, { login: false }); } /* * 购物车数量 * */ export function getCartNum() { return request.get("/cart/count"); } /* * 添加收藏 * */ export function toCollect(id, category) { return request.get("/collect/add/" + id + "/" + category); } /* * 为你推荐 * */ export function getHostProducts(page, limit) { return request.get( "/product/hot", { page: page, limit: limit }, { login: false } ); } /* * 精品、热门、首发列表 * */ export function getGroomList(type) { return request.get("/groom/list/" + type, {}, { login: false }); } /* * 购物车 添加 * */ export function postCartAdd(data) { return request.post("/cart/add", data); } /* * 购物车列表 * */ export function getCartList() { return request.get("/cart/list"); } /* * 购物车 删除 * */ export function postCartDel(ids) { return request.post("/cart/del", { ids }); } /* * 购物车 获取数量 * */ export function getCartCount(data) { return request.get("/cart/count", data); } /* * 购物车 修改商品数量 * */ export function changeCartNum(id, number) { return request.post("/cart/num", { id, number }); } /** * 搜索推荐关键字 */ export function getSearchKeyword() { return request.get("/search/keyword", {}, { login: false }); } /** * 产品评论列表 */ export function getReplyList(id, q) { return request.get("/reply/list/" + id, q, { login: false }); } /** * 产品评价数量和好评度 */ export function getReplyConfig(id) { return request.get("/reply/config/" + id, {}, { login: false }); } /** * 评价页面获取单个产品详情 */ export function postOrderProduct(unique) { return request.post("/order/product", { unique }, { login: false }); } /** * 提交评价页面； */ export function postOrderComment(data) { return request.post("/order/comment", data, { login: false }); } user.js import request from "@utils/request"; /** * 用户登录 * @param data object 用户账号密码 */ export function login(data) { return request.post("/login", data, { login: false }); } /** * 用户手机号登录 * @param data object 用户手机号 也只能 */ export function loginMobile(data) { return request.post("/login/mobile", data, { login: false }); } /** * 用户发送验证码 * @param data object 用户手机号 */ export function registerVerify(data) { return request.post("/register/verify", data, { login: false }); } /** * 用户手机号注册 * @param data object 用户手机号 验证码 密码 */ export function register(data) { return request.post("/register", data, { login: false }); } /** * 用户手机号修改密码 * @param data object 用户手机号 验证码 密码 */ export function registerReset(data) { return request.post("/register/reset", data, { login: false }); } /* * 领取优惠券列表 * */ export function getCoupon(q) { return request.get("/coupons", q, { login: false }); } /* * 点击领取优惠券 * */ export function getCouponReceive(id) { return request.post("/coupon/receive", { couponId: id }, { login: true }); } /* * 批量领取优惠券 * */ export function couponReceiveBatch(couponId) { return request.post("/coupon/receive/batch", { couponId }); } /* * 我的优惠券 * */ export function getCouponsUser(type) { return request.get("/coupons/user/" + type); } /* * 个人中心 * */ export function getUser() { return request.get("/user"); } /* * 用户信息 * */ export function getUserInfo() { return request.get("/userinfo"); } /* * 个人中心(功能列表) * */ export function getMenuUser() { return request.get("/menu/user"); } /* * 地址列表 * */ export function getAddressList(data) { return request.get("/address/list", data || {}); } /* * 删除地址 * */ export function getAddressRemove(id) { return request.post("/address/del", { id: id }); } /* * 设置默认地址 * */ export function getAddressDefaultSet(id) { return request.post("/address/default/set", { id: id }); } /* * 获取默认地址 * */ export function getAddressDefault() { return request.get("/address/default"); } /* * 获取单个地址 * */ export function getAddress(id) { return request.get("/address/detail/" + id); } /* * 修改 添加地址 * */ export function postAddress(data) { return request.post("/address/edit", data); } /* * 获取收藏产品 * */ export function getCollectUser(page, limit) { return request.get("/collect/user", { page: page, limit: limit }); } /* * 删除收藏产品 * */ export function getCollectDel(id, category) { return request.post("/collect/del", { id: id, category: category }); } /* * 批量收藏产品 * */ export function postCollectAll(data) { return request.post("/collect/all", data); } /* * 添加收藏产品 * */ export function getCollectAdd(id, category) { return request.post("collect/add", { id: id, category: category }); } /* * 签到配置 * */ export function getSignConfig() { return request.get("/sign/config"); } /* * 签到里的签到列表 * */ export function getSignList(page, limit) { return request.get("/sign/list", { page: page, limit: limit }); } /* * 签到列表 * */ export function getSignMonth(page, limit) { return request.get("/sign/month", { page: page, limit: limit }); } /* * 签到用户信息 * */ export function postSignUser(sign) { return request.post("/sign/user", sign); } /* * 签到 * */ export function postSignIntegral(sign) { return request.post("/sign/integral", sign); } /* * 推广数据 * */ export function getSpreadInfo() { return request.get("/commission"); } /* * 推广人列表 * */ export function getSpreadUser(screen) { return request.post("/spread/people", screen); } /* * 推广人订单 * */ export function getSpreadOrder(where) { return request.post("/spread/order", where); } /* * 资金明细（types|0=全部,1=消费,2=充值,3=返佣,4=提现） * */ export function getCommissionInfo(q, types) { return request.get("/spread/commission/" + types, q); } /* * 积分记录 * */ export function getIntegralList(q) { return request.get("/integral/list", q); } /* * 提现银行 * */ export function getBank() { return request.get("/extract/bank"); } /* * 提现申请 * */ export function postCashInfo(cash) { return request.post("/extract/cash", cash); } /* * 会员中心 * */ export function getVipInfo() { return request.get("/user/level/grade"); } /* * 会员等级任务 * */ export function getVipTask(id) { return request.get("/user/level/task/" + id); } /* * 资金统计 * */ export function getBalance() { return request.get("/user/balance"); } /* * 活动状态 * */ export function getActivityStatus() { return request.get("/user/activity", {}, { login: false }); } /* * 活动状态 * */ export function getSpreadImg() { return request.get("/spread/banner"); } /* * 用户修改信息 * */ export function postUserEdit(data) { return request.post("/user/edit", data); } /* * 用户修改信息 * */ export function getChatRecord(to_uid, data) { return request.get("user/service/record/" + to_uid, data); } /* * 用户修改信息 * */ export function serviceList() { return request.get("user/service/list"); } /* * 公众号充值 * */ export function rechargeWechat(data) { return request.post("/recharge/wechat", data); } /* * 退出登录 * */ export function getLogout() { return request.get("/logout"); } /* * 绑定手机号 * */ export function bindingPhone(data) { return request.post("binding", data); } /* * h5切换公众号登陆 * */ export function switchH5Login() { return request.post("switch_h5", { from: "wechat" }); } /* * 获取推广人排行 * */ export function getRankList(q) { return request.get("rank", q); } /* * 获取佣金排名 * */ export function getBrokerageRank(q) { return request.get("brokerage_rank", q); } /** * 检测会员等级 */ export function setDetection() { return request.get("user/level/detection"); } App.vue assetscssbase.css @charset "UTF-8"; /** *相关初始化 */ .font-color-red { color: #fc4141 !important; } .bg-color-red { background-color: #e93323 !important; } .icon-color { color: #ff3c2b; } .cart-color { color: #ff3700 !important; border: 1px solid #ff3700 !important; } /* padding20 */ .padding20 { padding: 0.2rem; } /* pad20 */ .pad20 { padding: 0 0.2rem; } /* padding30 */ .padding30 { padding: 0.3rem; } /*pad30 */ .pad30 { padding: 0 0.3rem; } /* layout */ .acea-row { display: -webkit-box; display: -moz-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-lines: multiple; -moz-box-lines: multiple; -o-box-lines: multiple; -webkit-flex-wrap: wrap; -ms-flex-wrap: wrap; flex-wrap: wrap; /* 辅助类 */ } .acea-row.row-middle { -webkit-box-align: center; -moz-box-align: center; -o-box-align: center; -ms-flex-align: center; -webkit-align-items: center; align-items: center; } .acea-row.row-top { -webkit-box-align: start; -moz-box-align: start; -o-box-align: start; -ms-flex-align: start; -webkit-align-items: flex-start; align-items: flex-start; } .acea-row.row-bottom { -webkit-box-align: end; -moz-box-align: end; -o-box-align: end; -ms-flex-align: end; -webkit-align-items: flex-end; align-items: flex-end; } .acea-row.row-center { -webkit-box-pack: center; -moz-box-pack: center; -o-box-pack: center; -ms-flex-pack: center; -webkit-justify-content: center; justify-content: center; } .acea-row.row-right { -webkit-box-pack: end; -moz-box-pack: end; -o-box-pack: end; -ms-flex-pack: end; -webkit-justify-content: flex-end; justify-content: flex-end; } .acea-row.row-left { -webkit-box-pack: start; -moz-box-pack: start; -o-box-pack: start; -ms-flex-pack: start; -webkit-justify-content: flex-start; justify-content: flex-start; } .acea-row.row-between { -webkit-box-pack: justify; -moz-box-pack: justify; -o-box-pack: justify; -ms-flex-pack: justify; -webkit-justify-content: space-between; justify-content: space-between; } .acea-row.row-around { justify-content: space-around; -webkit-justify-content: space-around; } .acea-row.row-column-around { -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; justify-content: space-around; -webkit-justify-content: space-around; } .acea-row.row-column { -webkit-box-orient: vertical; -moz-box-orient: vertical; -o-box-orient: vertical; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; } .acea-row.row-column-between { -webkit-box-orient: vertical; -moz-box-orient: vertical; -o-box-orient: vertical; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; -webkit-box-pack: justify; -moz-box-pack: justify; -o-box-pack: justify; -ms-flex-pack: justify; -webkit-justify-content: space-between; justify-content: space-between; } /* 上下左右垂直居中 */ .acea-row.row-center-wrapper { -webkit-box-align: center; -moz-box-align: center; -o-box-align: center; -ms-flex-align: center; -webkit-align-items: center; align-items: center; -webkit-box-pack: center; -moz-box-pack: center; -o-box-pack: center; -ms-flex-pack: center; -webkit-justify-content: center; justify-content: center; } /* 上下两边居中对齐 */ .acea-row.row-between-wrapper { -webkit-box-align: center; -moz-box-align: center; -o-box-align: center; -ms-flex-align: center; -webkit-align-items: center; align-items: center; -webkit-box-pack: justify; -moz-box-pack: justify; -o-box-pack: justify; -ms-flex-pack: justify; -webkit-justify-content: space-between; justify-content: space-between; } /* 轮播图 */ .slider-banner { position: relative; width: 100%; overflow: hidden; } .slider-banner .swiper-container { height: 100%; } .slider-banner img { display: block; width: 100%; height: auto; } .start { width: 1.22rem; height: 0.3rem; background-image: url("../images/start.png"); background-repeat: no-repeat; background-size: 1.22rem auto; } .start.star5 { background-position: 0 0.03rem; } .start.star4 { background-position: 0 -0.3rem; } .start.star3 { background-position: 0 -0.7rem; } .start.star2 { background-position: 0 -1.05rem; } .start.star1 { background-position: 0 -1.4rem; } .start.star0 { background-position: 0 -1.75rem; } /* 单选框和多选框 */ .checkbox-wrapper { position: relative; } .checkbox-wrapper input { display: none; } .checkbox-wrapper .icon { position: absolute; left: 0; top: 50%; display: inline-block; width: 18px; height: 18px; border: 1px solid #cccccc; border-radius: 50%; -webkit-transform: translate(0, -50%); -moz-transform: translate(0, -50%); -o-transform: translate(0, -50%); -ms-transform: translate(0, -50%); transform: translate(0, -50%); } .checkbox-wrapper input:checked + .icon { background-color: #e93323; border-color: #e93323; background-image: url("../images/enter.png"); -webkit-background-size: 0.21rem 0.15rem; -moz-background-size: 0.21rem 0.15rem; background-size: 0.21rem 0.15rem; background-repeat: no-repeat; background-position: center center; } .Loads { height: 0.8rem; font-size: 0.25rem; color: #000; } .Loads .iconfont { font-size: 0.3rem; margin-right: 0.1rem; height: 0.32rem; line-height: 0.32rem; } /*加载动画*/ @keyframes load { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .loadingpic { animation: load 3s linear 1s infinite; } .loading { animation: load linear 1s infinite; } reset.css body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td,select { margin:0; padding:0; } body, button, input, select, textarea {font-size:.3rem;} h1, h2, h3, h4, h5, h6{ font-size:100%; } address, cite, dfn, em, var { font-style:normal; } code, kbd, pre, samp { font-family:couriernew, courier, monospace; } small{ font-size:12px; } ul, ol { list-style:none; } sup { vertical-align:text-top; } sub{ vertical-align:text-bottom; } legend { color:#000; } fieldset, img { border:0; } button, input, select, textarea { font-size:100%; } table { border-collapse:collapse; border-spacing:0;width:100%;} /* HTML5 display-role reset for older browsers */ article, aside, details, figcaption, figure, footer, header, menu, nav, section { display: block; } input,input[type="search"],button,select,option,textarea,a{ outline:none; border:0; -webkit-appearance:none;border-radius: 0; background:none;-webkit-box-sizing:border-box;box-sizing:border-box;} /* custom */ a { text-decoration: none; -webkit-backface-visibility: hidden; color:#333; } body,input,textarea{ -webkit-text-size-adjust: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); font-family: 'PingFang SC', 'STHeitiSC-Light', 'Helvetica-Light', arial, sans-serif, 'Droid Sans Fallback'; color:#333;} div,section,header,footer{-webkit-box-sizing:border-box; box-sizing:border-box;} input{line-height: normal; box-sizing:border-box;} .fl{ float:left; } .fr{ float:right; } .clear{ clear:both; height: 0; line-height: 0; font-size: 0; } .clearfix:after{ content:"."; display:block; height:0; visibility:hidden; clear:both; overflow: hidden; } ::-webkit-scrollbar { width:0px; } ::-webkit-scrollbar-track { background-color:unset; } ::-webkit-scrollbar-thumb { background-color:unset; } ::-webkit-scrollbar-thumb:hover { background-color:unset; } ::-webkit-scrollbar-thumb:active { background-color:unset; } .flex { display: -webkit-box; display: -moz-box; display: -webkit-flex; display: -ms-flexbox; display: flex; } .con-cell{ display: table-cell; height: 100%; vertical-align: middle; } .old-price{text-decoration: line-through;} .icon { width: 1em; height: 1em; vertical-align: -0.15em; fill: currentColor; overflow: hidden; } @font-face { font-family: 'GuildfordProBook 5'; src:url('GuildfordProBook 5.otf') } [v-cloak] { display: none; } .iconfont{ font-size: .36rem; } /* 一像素边框 */ @media (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5) { .border-1px::after { -webkit-transform: scaleY(0.7); -moz-transform: scaleY(0.7); -o-transform: scaleY(0.7); -ms-transform: scaleY(0.7); transform: scaleY(0.7); } .border-1px::before { -webkit-transform: scaleY(0.7); -moz-transform: scaleY(0.7); -o-transform: scaleY(0.7); -ms-transform: scaleY(0.7); transform: scaleY(0.7); } } @media (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2) { .border-1px::after { -webkit-transform: scaleY(0.5); -moz-transform: scaleY(0.5); -o-transform: scaleY(0.5); -ms-transform: scaleY(0.5); transform: scaleY(0.5); } .border-1px::before { -webkit-transform: scaleY(0.5); -moz-transform: scaleY(0.5); -o-transform: scaleY(0.5); -ms-transform: scaleY(0.5); transform: scaleY(0.5); } } @media (-webkit-min-device-pixel-ratio: 3), (min-device-pixel-ratio: 3) { .border-1px::after { -webkit-transform: scaleY(0.33); -moz-transform: scaleY(0.33); -o-transform: scaleY(0.33); -ms-transform: scaleY(0.33); transform: scaleY(0.33); } .border-1px::before { -webkit-transform: scaleY(0.33); -moz-transform: scaleY(0.33); -o-transform: scaleY(0.33); -ms-transform: scaleY(0.33); transform: scaleY(0.33); } } .line1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width: 100%;} .line2{word-break:break-all;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;} .mask{position:fixed;top:0;left:0;right:0;bottom:0;z-index:55;background-color:rgba(0,0,0,0.5);} style.css body{font-size:0.28rem;background-color:#f5f5f5;transition: background-color .3s ease;-webkit-transition: background-color .3s ease;} /*vant-tab标签页样式修改*/ .time-tabs .van-tab{padding: 0;flex-basis: 27%!important;-webkit-flex-basis:27%!important;height:0.96rem;line-height:unset;} .time-tabs .van-tab~.van-tab{border-left: 1px solid #e3b06e;} .time-tabs .van-tab.van-tab--active .timeItem{background-color:#e93323;color:#fff;} .time-tabs .van-tab.van-tab--active .timeItem:before{content: "";width: 0;height: 0;border-left: 0.08rem solid transparent; border-right: 0.08rem solid transparent;border-top: 0.1rem solid #e93323;position: absolute; bottom: -0.09rem;z-index: 99;left: 50%;transform: translateX(-50%);-webkit-transform: translateX(-50%);-ms-transform: translateX(-50%);-moz-transform: translateX(-50%);-o-transform: translateX(-50%);} .time-tabs.van-tabs--line .van-tabs__wrap{height:1.1rem;} .newsList .newsSwitch .van-hairline--top-bottom::after{border:0;} .newsList .newsSwitch .van-tab{font-size:0.32rem;padding:0;flex-basis:unset!important;-webkit-flex-basis:unset!important;margin-right:0.46rem;} .newsList .newsSwitch .van-tabs__wrap{padding: 0 0.3rem;} #footer{position:fixed;width:100%;height:1rem;bottom:0;left:0;background-color:#fff;border-top:1px solid #eee;z-index:22;} #footer .item{flex:1;-webkit-flex:1;-o-flex:1;-ms-flex:1;text-align:center;font-size:0.2rem;color:#282828;} #footer .item.on{color:#fc4141;} #footer .item .iconfont{font-size:0.45rem;height: 0.55rem;line-height: 0.55rem;} .goodList .item{position:relative;padding-left:0.3rem;background-color:#fff;} .goodList .item .pictrue{width:1.8rem;height:1.8rem;position:relative;} .goodList .item .pictrue .image{width:100%;height:100%;border-radius:0.06rem;} .goodList .item .pictrue .numPic{position:absolute;left:0.07rem;top:0.07rem;width:0.5rem;height:0.5rem;border-radius:50%;} .goodList .item .underline{padding:0.3rem 0.3rem 0.3rem 0;border-bottom:1px solid #f5f5f5;} .goodList .item:nth-last-child(1) .underline{border-bottom:0;} .goodList .item .text{font-size:0.3rem;color:#222;width:4.89rem;text-align: left;} .goodList .item .text .money{font-size:0.26rem;font-weight:bold;margin-top:0.5rem;} .goodList .item .text .money .num{font-size:0.34rem;} .goodList .item .text .vip-money{font-size:0.24rem;color:#282828;font-weight:bold;margin-top:0.1rem;} .goodList .item .text .vip-money .vip{margin-right:0.22rem;} .goodList .item .text .vip-money .image{width:0.46rem;height:0.21rem;margin-left:0.05rem;} .goodList .item .text .vip-money .num{font-size:0.22rem;color:#aaa;font-weight:normal;margin:-0.02rem 0 0 0;} .goodList .item .iconfont{position:absolute;right:0.3rem;width:0.5rem;height:0.5rem;border-radius:50%;font-size:0.3rem;bottom:0.38rem;} .promotionGood{padding:0 0.3rem;background-color: #fff;} .promotionGood .item{border-bottom:1px solid #eee;height:2.5rem;} .promotionGood .item .pictrue{width:1.88rem;height:1.88rem;} .promotionGood .item .pictrue .image{width:100%;height:100%;border-radius:0.08rem;} .promotionGood .item .text{font-size:0.24rem;color:#999;width:4.72rem;text-align:left;} .promotionGood .item .text .name{font-size:0.3rem;color:#333;} .promotionGood .item .text .sp-money{margin:0.34rem 0 0.2rem 0;} .promotionGood .item .text .sp-money .moneyCon{padding:0 0.18rem;background-color:red;height:0.46rem;line-height:0.46rem; background-image:linear-gradient(to right,#ff6248 0%,#ff3e1e 100%);font-size:0.2rem;color:#fff; background-image: -webkit-linear-gradient(to right,#ff6248 0%,#ff3e1e 100%); background-image: -moz-linear-gradient(to right,#ff6248 0%,#ff3e1e 100%); border-radius:0.24rem 0.03rem 0.24rem 0.03rem;} .promotionGood .item .text .sp-money .moneyCon .num{font-size:0.24rem;} .promotionGood .item .text .money{text-decoration:line-through;} .recommend{background-color:#fff;} .recommend .title{height:1.35rem;font-size:0.28rem;color:#282828;} .recommend .title .name{margin:0 0.28rem;} .recommend .title .iconfont{font-size:1.7rem;color:#454545;height:0.5rem;line-height:0.5rem;} .recommend .title .iconfont.lefticon{transform:rotate(180deg);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);} .recommend .recommendList{padding:0 0.3rem;} .recommend .recommendList .item{width:3.35rem;margin-bottom:0.3rem;} .recommend .recommendList .item .pictrue{width:100%;height:3.35rem;} .recommend .recommendList .item .pictrue .image{width:100%;height:100%;border-radius:0.06rem;} .recommend .recommendList .item .name{font-size:0.28rem;color:#282828;margin-top:0.2rem;} .recommend .recommendList .item .money{font-size:0.2rem;margin-top:0.03rem;} .recommend .recommendList .item .money .num{font-size:0.28rem;} .noCommodity{padding-top: 0.75rem;} .noCommodity .noPictrue{width:4.14rem;height:3.36rem;margin:0 auto 0.3rem auto;} .noCommodity .noPictrue .image{width:100%;height:100%;} /*产品详情轮播*/ .product-bg{height:7.5rem;} .product-bg .slide-image{width:100%;height:100%;} .product-bg .pages{position:absolute;background-color:#fff;height:0.34rem;padding:0 0.1rem;border-radius:0.03rem; right:0.3rem;bottom:0.3rem;line-height:0.34rem;font-size:0.24rem;color:#050505;z-index:9;} /*评价列表公共*/ .evaluateWtapper .evaluateItem{background-color:#fff;padding-bottom:0.25rem;} .evaluateWtapper .evaluateItem~.evaluateItem{border-top:1px solid #f5f5f5;} .evaluateWtapper .evaluateItem .pic-text{font-size:0.26rem;color:#282828;height:0.95rem;padding:0 0.3rem;} .evaluateWtapper .evaluateItem .pic-text .pictrue{width:0.56rem;height:0.56rem;margin-right:0.2rem;} .evaluateWtapper .evaluateItem .pic-text .pictrue .image{width:100%;height:100%;border-radius:50%;} .evaluateWtapper .evaluateItem .pic-text .name{max-width:4.5rem;margin-right:0.15rem;} .evaluateWtapper .evaluateItem .time{font-size:0.24rem;color:#82848f;padding:0 0.3rem;} .evaluateWtapper .evaluateItem .evaluate-infor{font-size:0.28rem;color:#282828;margin-top:0.19rem;padding:0 0.3rem;} .evaluateWtapper .evaluateItem .imgList{padding:0 0.3rem 0 0.15rem;margin-top:0.25rem;} .evaluateWtapper .evaluateItem .imgList .pictrue{width:1.56rem;height:1.56rem;margin:0 0 0.15rem 0.15rem;} .evaluateWtapper .evaluateItem .imgList .pictrue .image{width:100%;height:100%;} .evaluateWtapper .evaluateItem .reply{font-size:0.26rem;color:#454545;background-color:#f7f7f7;border-radius:0.05rem; margin:0.2rem 0.3rem 0 0.3rem;padding:0.3rem;position:relative;} .evaluateWtapper .evaluateItem .reply::before{content:"";width: 0;height: 0;border-left:0.1rem solid transparent; border-right:0.1rem solid transparent;border-bottom:0.2rem solid #f7f7f7;position:absolute;top:-0.2rem;left:1rem;} /*优惠券列表公共*/ .coupon-list{padding:0 0.3rem;margin-top:0.25rem;} .coupon-list .item{width:100%;height:1.7rem;margin-bottom:0.16rem;} .coupon-list .item .money{background-image:url('../images/coupon1.png');background-repeat:no-repeat;background-size:100% 100%; width:2.4rem;height:100%;color:#fff;font-size:0.36rem;font-weight:bold;text-align:center;line-height:1.7rem;} .coupon-list .item .money.moneyGray{background-image:url('../images/coupon2.png');} .coupon-list .item .money .num{font-size:0.6rem;} .coupon-list .item .text{width:4.5rem;padding:0 0.17rem 0 0.24rem;background-color:#fff;} .coupon-list .item .text .condition{font-size:0.3rem;color:#282828;height:0.93rem;line-height:0.93rem; border-bottom:1px solid #f0f0f0;} .coupon-list .item .text .data{font-size:0.2rem;color:#999;height:0.76rem;} .coupon-list .item .text .data .bnt{width:1.36rem;height:0.44rem;border-radius:0.22rem;font-size:0.22rem;color:#fff;text-align:center;line-height:0.44rem;} .coupon-list .item .text .data .bnt.gray{background-color:#ccc;} /*优惠券列表弹窗*/ .coupon-list-window{position:fixed;bottom:0;left:0;width:100%;background-color:#f5f5f5;border-radius:0.16rem 0.16rem 0 0;z-index:111;transition:all .3s cubic-bezier(.25,.5,.5,.9);-webkit-transition:all .3s cubic-bezier(.25,.5,.5,.9);-moz-transition:all .3s cubic-bezier(.25,.5,.5,.9);-o-transition:all .3s cubic-bezier(.25,.5,.5,.9);transform:translate3d(0,100%,0); -webkit-transform:translate3d(0,100%,0);-ms-transform:translate3d(0,100%,0);-moz-transform:translate3d(0,100%,0); -o-transform:translate3d(0,100%,0);} .coupon-list-window.on{transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);} .coupon-list-window .title{height:1.24rem;width:100%;text-align:center;line-height:1.24rem;font-size:0.32rem; font-weight:bold;position:relative;color: #333;} .coupon-list-window .title .iconfont{position:absolute;right:0.3rem;top:50%;transform:translateY(-50%);font-size:0.35rem; color:#8a8a8a;font-weight:normal;} .coupon-list-window .coupon-list{margin:0 0 0.5rem 0;height:5.5rem;overflow:auto;} .coupon-list-window .pictrue{width:4.14rem;height:3.36rem;margin:0 auto 0.5rem auto;} .coupon-list-window .pictrue .image{width:100%;height:100%;} /*详情首页弹窗*/ .product-window{position:fixed;bottom:0;width:100%;left:0;background-color:#fff;z-index:88;border-radius:0.16rem 0.16rem 0 0; padding-bottom:1.4rem;transform:translate3d(0,100%,0);-webkit-transform:translate3d(0,100%,0);-ms-transform:translate3d(0,100%,0);-moz-transform:translate3d(0,100%,0); -o-transform:translate3d(0,100%,0);transition:all .3s cubic-bezier(.25,.5,.5,.9);-webkit-transition:all .3s cubic-bezier(.25,.5,.5,.9);-moz-transition:all .3s cubic-bezier(.25,.5,.5,.9);-o-transition:all .3s cubic-bezier(.25,.5,.5,.9);} .product-window.on{transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);} .product-window .textpic{padding:0 1.3rem 0 0.3rem;margin-top:0.29rem;position:relative;} .product-window .textpic .pictrue{width:1.5rem;height:1.5rem;} .product-window .textpic .pictrue .image{width:100%;height:100%;border-radius:0.1rem;} .product-window .textpic .text{width:4.1rem;font-size:0.32rem;color:#202020;} .product-window .textpic .text .money{font-size:0.24rem;margin-top:0.4rem;} .product-window .textpic .text .money .num{font-size:0.36rem;} .product-window .textpic .text .money .stock{color:#999;margin-left:0.18rem;} .product-window .textpic .iconfont{position:absolute;right:0.3rem;top:-0.05rem;font-size:0.35rem;color:#8a8a8a;} .product-window .productWinList{max-height:3.95rem;overflow:auto;margin-top:0.36rem;} .product-window .productWinList .item~.item{margin-top:0.36rem;} .product-window .productWinList .item .title{font-size:0.3rem;color:#999;padding:0 0.3rem;} .product-window .productWinList .item .listn{padding:0 0.3rem 0 0.16rem;} .product-window .productWinList .item .listn .itemn{border:1px solid #bbb;font-size:0.26rem;color:#282828; padding:0.07rem 0.33rem;border-radius:0.06rem;margin:0.14rem 0 0 0.14rem;} .product-window .productWinList .item .listn .itemn.on{color:#fff;background-color:#ff3700;border-color:#ff3700;} .product-window .cart{margin-top:0.36rem;padding:0 0.3rem;} .product-window .cart .title{font-size:0.3rem;color:#999;} .product-window .cart .carnum{height:0.54rem;margin-top:0.24rem;} .product-window .cart .carnum .item{border:1px solid #a4a4a4;width:0.84rem;text-align:center;height:100%;line-height:0.54rem; color:#a4a4a4;font-size:0.45rem;} .product-window .cart .carnum .reduce{border-right:0;border-radius:0.06rem 0 0 0.06rem;line-height:0.48rem;} .product-window .cart .carnum .reduce.on{border-color:#e3e3e3;color:#dedede;} .product-window .cart .carnum .plus{border-left:0;border-radius:0 0.06rem 0.06rem 0;line-height:0.46rem;} .product-window .cart .carnum .plus.on{border-color:#e3e3e3;color:#dedede;} .product-window .cart .carnum .num{color:#282828;font-size:0.28rem;} /*产品详情的分享红包*/ .sharing-packets{position:fixed;left:0.3rem;bottom:1.5rem;z-index:5;transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;opacity:1; transform: scale(1);-webkit-transform: scale(1);-moz-transform: scale(1);-o-transform: scale(1);-ms-transform: scale(1);} .sharing-packets.on{transform: scale(0);-webkit-transform: scale(0);-moz-transform: scale(0);-o-transform: scale(0);-ms-transform: scale(0);opacity:0;} .sharing-packets .iconfont{width:0.44rem;height:0.44rem;border-radius:50%;background-color:#999;font-size:0.2rem;color:#fff;margin:0 auto;padding-left:0.01rem;} .sharing-packets .line{width:0.02rem;height:0.4rem;background-color:#999;margin:0 auto;} .sharing-packets .sharing-con{width:1.87rem;height:2.1rem;position:relative;} .sharing-packets .sharing-con .image{width:100%;height:100%;} .sharing-packets .sharing-con .text{position:absolute;top:0.2rem;font-size:0.2rem;width:100%;text-align:center;} .sharing-packets .sharing-con .text .money{font-size:0.32rem;font-weight:bold;} .sharing-packets .sharing-con .text .money .label{font-size:0.2rem;} .sharing-packets .sharing-con .text .tip{font-size:0.18rem;color:#999;} .sharing-packets .sharing-con .text .shareBut{font-size:0.22rem;color:#fff;margin-top:0.27rem;height:0.5rem; line-height:0.5rem;} /*订单产品*/ .orderGoods{background-color:#fff;margin-top:0.12rem;} .orderGoods .total{width:100%;height:0.86rem;padding:0 0.3rem;border-bottom:0.01rem solid #eee;font-size:0.3rem;color:#282828;line-height:0.86rem;} .goodWrapper .item{margin-left:0.3rem;padding-right:0.3rem;border-bottom:0.02rem solid #f0f0f0;height:1.8rem;} .goodWrapper .item .pictrue{width:1.3rem;height:1.3rem;} .goodWrapper .item .pictrue .image{width:100%;height:100%;border-radius:0.06rem;} .goodWrapper .item .text{width:5.37rem;position:relative;} .goodWrapper .item .text .name{font-size:0.28rem;color:#282828;width:4.53rem;} .goodWrapper .item .text .num{font-size:0.26rem;color:#868686;} .goodWrapper .item .text .attr{font-size:0.2rem;color:#868686;margin-top:0.07rem;} .goodWrapper .item .text .money{font-size:0.26rem;margin-top:0.17rem;} .goodWrapper .item .text .evaluate{position:absolute;width:1.14rem;height:0.46rem;border:1px solid #e93323; color: #e93323; border-radius:0.04rem;text-align:center;line-height:0.46rem;right:0;bottom:-.1rem;} .goodWrapper .item .text .evaluate.userEvaluated{font-size:0.26rem;color:#aaa;background-color:#f7f7f7;border-color:#f7f7f7;} /*地址弹窗*/ .address-window{background-color:#fff;position:fixed;bottom:0;left:0;width:100%;z-index:99;transform:translate3d(0,100%,0);-webkit-transform:translate3d(0,100%,0);-ms-transform:translate3d(0,100%,0);-moz-transform:translate3d(0,100%,0); -o-transform:translate3d(0,100%,0);transition:all .3s cubic-bezier(.25,.5,.5,.9); -webkit-transition:all .3s cubic-bezier(.25,.5,.5,.9);-moz-transition:all .3s cubic-bezier(.25,.5,.5,.9); -o-transition:all .3s cubic-bezier(.25,.5,.5,.9);} .address-window.on{transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0); -ms-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);} .address-window .title{font-size:0.32rem;font-weight:bold;text-align:center;height:1.23rem;line-height:1.23rem; position:relative;color: #333;} .address-window .title .iconfont{position:absolute;right:0.3rem;color:#8a8a8a;font-size:0.35rem;} .address-window .list{max-height:6rem;overflow-y:auto;overflow-x:hidden;} .address-window .list .item{margin-left:0.3rem;padding-right:0.3rem;border-bottom:1px solid #eee;height:1.29rem; font-size:0.25rem;color:#333;} .address-window .list .item .iconfont{font-size:0.37rem;color:#2c2c2c;} .address-window .list .item .iconfont.icon-complete{font-size:0.3rem;color:#fff;} .address-window .list .item .addressTxt{width:5.6rem;} .address-window .list .item .addressTxt .name{font-size:0.28rem;font-weight:bold;color:#282828;margin-bottom:0.04rem;} .address-window .list .item .addressTxt .name .phone{margin-left:0.18rem;} .address-window .addressBnt{font-size:0.3rem;font-weight:bold;color:#fff;width:6.9rem;height:0.86rem;border-radius:0.43rem; text-align:center;line-height:0.86rem;margin:0.85rem auto;} .address-window .pictrue{width:4.14rem;height:3.36rem;margin:0.8rem auto;} .address-window .pictrue .image{width:100%;height:100%;} /*轮播图*/ .swiper{height:2.82rem;} .swiper .slide-image{width:100%;height:100%;} .swiper .swiper-pagination{text-align:right;padding-right:0.4rem;bottom:0.1rem;width:100%;} .swiper .swiper-pagination-bullet{width:0.12rem;height:0.12rem;border:0.02rem solid #fff;border-radius:50%;background-color:rgba(0,0,0,0);opacity:1;} .swiper .swiper-pagination-bullet~.swiper-pagination-bullet{margin-left:0.12rem;} .swiper .swiper-pagination-bullet-active{border-color:#e93323;background-color:#e93323;} /**/ .goodsStyle{background-color:#fff;padding:0.22rem 0.3rem;} .goodsStyle .pictrue{width:1.2rem;height:1.2rem;} .goodsStyle .pictrue .image{width:100%;height:100%;border-radius:0.06rem;} .goodsStyle .text{width:5.45rem;font-size:0.28rem;color:#999;} .goodsStyle .text .name{width:3.6rem;color:#282828;} .goodsStyle .text .money{text-align:right;} .goodsStyle .text .money .num{margin-top:0.07rem;} /*所有推广头部样式*/ .promoterHeader{width:100%;height:2.2rem;} .promoterHeader .headerCon{width:100%;height:100%;padding:0 0.88rem 0 0.55rem;font-size:0.28rem;color:#fff;background-image:url('../images/transparent.png');background-repeat:no-repeat;background-size:100% 100%;} .promoterHeader .headerCon .name{margin-bottom:0.02rem;} .promoterHeader .headerCon .num{font-size:0.5rem;} .promoterHeader .headerCon .iconfont{font-size:1.25rem;} /*首页优惠券弹窗*/ .coupon-window{background-image:url('../images/coupon-window.png');background-repeat:no-repeat;background-size:100% 100%;width:6.3rem;height:6.49rem;position:fixed;top:20%;z-index:99;left:50%;margin-left:-3.05rem;transform:translate3d(0,-200%,0);-webkit-transform:translate3d(0,-200%,0);-ms-transform:translate3d(0,-200%,0);-moz-transform:translate3d(0,-200%,0);-o-transform:translate3d(0,-200%,0);transition:all .3s cubic-bezier(.25,.5,.5,.9);-webkit-transition:all .3s cubic-bezier(.25,.5,.5,.9);-moz-transition:all .3s cubic-bezier(.25,.5,.5,.9);-o-transition:all .3s cubic-bezier(.25,.5,.5,.9);} .coupon-window.on{transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);} .coupon-window .couponWinList{width:4.8rem;margin:1.57rem 0 0 0.6rem;height:4.15rem;overflow:auto;} .coupon-window .couponWinList .item{width:100%;height:1.2rem;background-color:#fff;position:relative;margin-bottom:0.17rem;} .coupon-window .couponWinList .item::after{content:'';position: absolute;width:0.18rem;height: 0.18rem;border-radius: 50%;background-color: #f2443a;left:25.5%;bottom:0;margin-bottom:-0.09rem;} .coupon-window .couponWinList .item::before{content:'';position: absolute;width:0.18rem;height: 0.18rem;border-radius: 50%;background-color: #f2443a;left:25.5%;top:0;margin-top:-0.09rem;} .coupon-window .couponWinList .item .money{width:1.3rem;border-right:1px dashed #ddd;height:100%;text-align:center;line-height:1.2rem;font-size:0.26rem;font-weight:bold;} .coupon-window .couponWinList .item .money .num{font-size:0.4rem;} .coupon-window .couponWinList .item .text{width:3.49rem;font-size:0.22rem;color:#999;padding:0 0.29rem;} .coupon-window .couponWinList .item .text .name{font-size:0.26rem;color:#282828;font-weight:bold;margin-bottom:0.09rem;} .coupon-window .lid{background-image:url('../images/coupon-window2.png');background-repeat:no-repeat;background-size:100% 100%;width:5.73rem;height:2.24rem;position:fixed;left:50%;top:20%;margin:4.24rem 0 0 -2.96rem;} .coupon-window .lid .bnt{font-size:0.29rem;width:4.4rem;height:0.8rem;border-radius:0.4rem;background-color:#f9f1d3;text-align:center;line-height:0.8rem;font-weight:bold;margin:0.98rem auto 0 auto;} .coupon-window .lid .iconfont{color:#fff;font-size:0.6rem;text-align:center;margin-top:0.87rem;} /*首页*/ .index .header{height:0.98rem;width:100%;} .index .header .logo{width:1.27rem;height:0.45rem;margin-right:0.25rem;} .index .header .logo img{width:100%;height:100%;display:block;} .index .header .search{width:5rem;height:0.64rem;background-color:#f7f7f7;border-radius:0.5rem;padding:0 0.28rem; font-size:0.28rem;color:#bbb;} .index .header .search .iconfont{font-size:0.34rem;margin-right:0.16rem;} .index .banner{height:3.75rem;} .index .banner img{width:100%;height:100%;} .index .banner .swiper-pagination{bottom:0.07rem;} .index .banner .swiper-pagination-bullet{width:0.2rem;height:0.04rem;border-radius:0.03rem; background-color:#fff;opacity:0.6;} .index .banner .swiper-pagination-bullet-active{opacity:1;} .index .nav{padding-top:0.26rem;} .index .nav .item{width:25%;text-align:center;font-size:0.26rem;margin-bottom:0.35rem;} .index .nav .item .pictrue{width:0.9rem;height:0.9rem;margin:0 auto 0.15rem auto;} .index .nav .item .pictrue img{width:100%;height:100%;border-radius:50%;} .index .news{height:0.77rem;border-top:1px solid #f4f4f4;padding:0 0.3rem;box-shadow:0 0.1rem 0.3rem #f5f5f5; -webkit-box-shadow:0 0.1rem 0.3rem #f5f5f5;-moz-box-shadow:0 0.1rem 0.3rem #f5f5f5;-o-box-shadow:0 0.1rem 0.3rem #f5f5f5;} .index .news .pictrue{width:1.24rem;height:0.28rem;border-right:1px solid #ddd;padding-right:0.23rem;box-sizing:content-box;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;} .index .news .pictrue img{width:100%;height:100%;display:block;} .index .news .new-banner{width:5.23rem;overflow:hidden;height:0.77rem;} .index .news .new-banner .swiper-slide{height:100%;} .index .news .new-banner .text{width:4.8rem;height:0.77rem;} .index .news .new-banner .text .label{font-size:0.2rem;color:#ff4c48;width:0.68rem;height:0.34rem;border-radius:0.2rem; text-align:center;line-height:0.34rem;border:0.02rem solid #ff4947;} .index .news .new-banner .text .newsTitle{width:3.97rem;font-size:0.24rem;color:#666;} .index .news .new-banner .iconfont{font-size:0.28rem;color:#888;} .index .specialArea{padding:0.3rem;} .index .specialArea .assemble{width:2.6rem;height:2.6rem;position:relative;} .index .specialArea .assemble img{width:100%;height:100%;border-radius:0.05rem;} .index .specialArea .assemble .text{position:absolute;top:0.37rem;left:0.22rem;} .index .specialArea .name{font-size:0.3rem;color:#fff;} .index .specialArea .infor{font-size:0.22rem;color:rgba(255, 255, 255, 0.8);margin-top:0.05rem;} .index .specialArea .list{height:2.6rem;width:4.16rem;} .index .specialArea .item{width:100%;height:1.24rem;position:relative;} .index .specialArea .item img{width:100%;height:100%;} .index .specialArea .item .text{position:absolute;top:0.23rem;left:0.28rem;} .index .wrapper .title{border-top:1px solid #eee;padding-top:0.34rem;margin:0 0.3rem;} .index .wrapper .title .text{font-size:0.24rem;color:#999;width:5.3rem;text-align: left;} .index .wrapper .title .text .name{color:#282828;font-size:0.3rem;font-weight:bold;margin-bottom:0.05rem;position:relative;} .index .wrapper .title .text .name .new{position:absolute;top:0.02rem;left:1.3rem;font-size:0.16rem;font-weight:bold;} .index .wrapper .title .more{font-size:0.26rem;color:#333;} .index .wrapper .title .more .iconfont{margin-left:0.02rem;font-size:0.26rem;} .index .wrapper .scroll-product{white-space:nowrap;margin-top:0.38rem;padding:0 0.3rem 0.37rem 0.3rem;overflow:hidden;} .index .wrapper .scroll-product .swiper-slide{width:1.8rem;display:inline-block;margin-right:0.19rem; border-bottom:0.04rem solid #47b479;box-shadow:0 0.15rem 0.15rem -0.1rem #eee; -webkit-box-shadow:0 0.15rem 0.15rem -0.1rem #eee;-moz-box-shadow:0 0.15rem 0.15rem -0.1rem #eee;-o-box-shadow:0 0.15rem 0.15rem -0.1rem #eee;} .index .wrapper .scroll-product .swiper-slide:nth-of-type(3n){border-bottom:0.04rem solid #ff6960;} .index .wrapper .scroll-product .swiper-slide:nth-of-type(3n-1){border-bottom:0.04rem solid #579afe;} .index .wrapper .scroll-product .swiper-slide:nth-last-child(1){margin-right:0;} .index .wrapper .scroll-product .swiper-slide .img-box{width:100%;height:1.8rem;} .index .wrapper .scroll-product .swiper-slide .img-box img{width:100%;height:100%;border-radius:0.06rem 0.06rem 0 0;} .index .wrapper .scroll-product .swiper-slide .pro-info{font-size:0.24rem;color:#282828;text-align:center;height:0.6rem; line-height:0.6rem;border:1px solid #f5f5f5;border-bottom:0;border-top:0;padding:0 0.1rem;}.index .wrapper .boutique{width:6.9rem;height:2.9rem;margin:0.28rem auto 0 auto;} .index .wrapper .boutique{width:6.9rem;height:2.9rem;margin:0.28rem auto 0 auto;} .index .wrapper .boutique img{width:100%;height:2.6rem;} .index .wrapper .boutique .swiper-pagination{bottom:-0.08rem;width:100%;} .index .wrapper .boutique .swiper-pagination-bullet{width:0.07rem;height:0.07rem;border-radius:50%; background-color:#fc4141;opacity:0.3;} .index .wrapper .boutique .swiper-pagination-bullet~ .swiper-pagination-bullet{margin-left:0.1rem;} .index .wrapper .boutique .swiper-pagination-bullet-active{width:0.2rem;height:0.07rem;border-radius:0.035rem;opacity:1} .index .hotList .hot-bg{width:100%;height:2.15rem;background-image:url('../images/index-bg.png');background-repeat:no-repeat; background-size:100% 100%;padding:0 0.3rem;font-size:0.24rem;color:#fff;margin-top:0.15rem;} .index .hotList .hot-bg .title{height:0.87rem;} .index .hotList .hot-bg .title .text{width:5.75rem;} .index .hotList .hot-bg .title .text .label{font-size:0.3rem;font-weight:bold;margin-right:0.2rem;} .index .hotList .hot-bg .title .more{font-size:0.26rem;color:#fff;} .index .hotList .hot-bg .title .more .iconfont{font-size:0.25rem;vertical-align:0.02rem;margin-left:0.1rem;} .index .hotList .list{width:6.9rem;height:3.3rem;border-radius:0.2rem;background-color:#fff;margin:-1.28rem auto 0 auto; padding:0 0.22rem;box-shadow: 0 0 0.2rem -0.1rem #aaa;-moz-box-shadow:0 0 0.2rem -0.1rem #aaa; -webkit-box-shadow:0 0 0.2rem -0.1rem #aaa;-o-box-shadow:0 0 0.2rem -0.1rem #aaa;} .index .hotList .list .item{width:2rem;text-align: left;} .index .hotList .list .item~.item{margin-left:0.23rem;} .index .hotList .list .item .pictrue{width:100%;height:2rem;position:relative;} .index .hotList .list .item .pictrue img{width:100%;height:100%;border-radius:0.1rem;} .index .hotList .list .item .pictrue .numPic{width:0.5rem;height:0.5rem;border-radius:50%;position:absolute;top:0.07rem; left:0.07rem;} .index .hotList .list .item .name{font-size:0.26rem;color:#282828;margin-top:0.12rem;} .index .hotList .list .item .money{font-size:0.2rem;font-weight:bold;margin-top: 0.02rem;} .index .hotList .list .item .money .num{font-size:0.28rem;} .index .adver{width:100%;height:1.8rem;margin-top:0.37rem;} .index .adver img{width:100%;height:100%;display:block;} .index .wrapper .newProducts{white-space:nowrap;padding:0 0.3rem;margin:0.35rem 0 0.42rem 0;overflow:hidden;} .index .wrapper .newProducts .swiper-slide{display:inline-block;width:2.43rem;margin-right:0.2rem;border:1px solid #eee; border-radius:0.12rem;} .index .wrapper .newProducts .swiper-slide:nth-last-child(1){margin-right:0;} .index .wrapper .newProducts .swiper-slide .img-box{width:100%;height:2.4rem;} .index .wrapper .newProducts .swiper-slide .img-box img{width:100%;height:100%;border-radius:0.12rem 0.12rem 0 0;} .index .wrapper .newProducts .swiper-slide .pro-info{font-size:0.28rem;color:#333;text-align:center;padding:0.15rem 0.1rem 0 0.1rem;} .index .wrapper .newProducts .swiper-slide .money{padding:0 0.1rem 0.18rem 0.1rem;text-align:center;font-size:0.26rem;font-weight:bold;} /*商品列表*/ .productList .search{width:100%;height:0.86rem;padding-left:0.23rem;position:fixed;left:0;top:0;z-index:5;} .productList .search .input{width:6.4rem;height:0.6rem;background-color:#fff;border-radius:0.5rem;padding:0 0.2rem;} .productList .search .input input{width:5.48rem;height:100%;font-size:0.26rem;} .productList .search .input input::placeholder{color:#999;} .productList .search .input .iconfont{font-size:0.35rem;color:#555;} .productList .search .icon-pailie,.productList .search .icon-tupianpailie{margin: 0 auto;color:#fff;width:0.4rem;font-size:0.4rem; height:0.86rem;line-height:0.86rem;} .productList .nav{height:0.86rem;color:#454545;position:fixed;left:0;width:100%;font-size:0.28rem;background-color:#fff; top: 0.86rem;z-index:5;} .productList .nav .item{width:25%;text-align:center;} .productList .nav .item.font-color{font-weight:bold;} .productList .nav .item img{width:0.15rem;height:0.19rem;margin-left:0.1rem;} .productList .list{padding:0 0.2rem;margin-top:1.72rem;} .productList .list.on{background-color:#fff;border-top:1px solid #f6f6f6;} .productList .list .item{width:3.45rem;margin-top:0.2rem;background-color:#fff;border-radius:0.1rem;} .productList .list .item.on{width:100%;display:flex;display:-webkit-flex;display:-webkit-box;border-bottom:1px solid #f6f6f6;padding:0.3rem 0; margin:0;} .productList .list .item .pictrue{width:100%;height:3.45rem;} .productList .list .item .pictrue.on{width:1.8rem;height:1.8rem;} .productList .list .item .pictrue img{width:100%;height:100%;border-radius:0.1rem 0.1rem 0 0;} .productList .list .item .pictrue img.on{border-radius:0.06rem;} .productList .list .item .text{padding:0.2rem 0.17rem 0.26rem 0.17rem;font-size:0.3rem;color:#222;text-align: left;} .productList .list .item .text.on{width:5.08rem;padding:0 0 0 0.22rem;} .productList .list .item .text .money{font-size:0.26rem;font-weight:bold;margin-top:0.08rem;} .productList .list .item .text .money.on{margin-top:0.4rem;} .productList .list .item .text .money .num{font-size:0.34rem;} .productList .list .item .text .vip{font-size:0.22rem;color:#aaa;margin-top:0.07rem;} .productList .list .item .text .vip.on{margin-top:0.11rem;} .productList .list .item .text .vip .vip-money{font-size:0.24rem;color:#282828;font-weight:bold;} .productList .list .item .text .vip .vip-money img{width:0.46rem;height:0.21rem;margin-left:0.04rem;} /*购物车*/ .shoppingCart .labelNav{height:0.76rem;padding:0 0.3rem;font-size:0.22rem;color:#8c8c8c;position:fixed;left:0;width:100%; background-color:#f5f5f5;z-index:5;top: 0;} .shoppingCart .labelNav .item .iconfont{font-size:0.25rem;margin-right:0.1rem;} .shoppingCart .nav{width:100%;height:0.8rem;background-color:#fff;padding:0 0.3rem;font-size:0.28rem;color:#282828; position:fixed;left:0;z-index:5;top:0.76rem;border-bottom: 1px solid #f5f5f5;} .shoppingCart .nav .administrate{font-size:0.26rem;color:#282828;width:1.1rem;height:0.46rem;border-radius:0.06rem; border:1px solid #868686;} .shoppingCart .noCart{margin-top:1.71rem;background-color:#fff;padding: 0.78rem 0 0.56rem 0;} .shoppingCart .noCart .pictrue{width:4.14rem;height:3.36rem;margin:0 auto;} .shoppingCart .noCart .pictrue img{width:100%;height:100%;} .shoppingCart .list{margin-top:1.71rem;} .shoppingCart .list .item{padding:0.25rem 0.3rem;background-color:#fff;margin-bottom:0.15rem;} .shoppingCart .list .item .picTxt{width:6.27rem;position:relative;} .shoppingCart .list .item .picTxt .pictrue{width:1.6rem;height:1.6rem;} .shoppingCart .list .item .picTxt .pictrue img{width:100%;height:100%;border-radius:0.06rem;} .shoppingCart .list .item .picTxt .text{width:4.44rem;font-size:0.28rem;color:#282828;text-align:left;} .shoppingCart .list .item .picTxt .text .infor{font-size:0.24rem;color:#868686;margin-top:0.16rem;} .shoppingCart .list .item .picTxt .text .money{font-size:0.32rem;color:#282828;margin-top:0.26rem;} .shoppingCart .list .item .picTxt .carnum{height:0.44rem;position:absolute;bottom:0.07rem;right:0;} .shoppingCart .list .item .picTxt .carnum div{border:1px solid #a4a4a4;width:0.66rem;text-align:center;height:100%; line-height:0.44rem;font-size:0.28rem;color:#a4a4a4;} .shoppingCart .list .item .picTxt .carnum .reduce{border-right:0;border-radius:0.03rem 0 0 0.03rem;line-height:0.39rem;} .shoppingCart .list .item .picTxt .carnum .reduce.on{border-color:#e3e3e3;color:#dedede;} .shoppingCart .list .item .picTxt .carnum .plus{border-left:0;border-radius:0 0.03rem 0.03rem 0;line-height:0.38rem;} .shoppingCart .list .item .picTxt .carnum .num{color:#282828;} .shoppingCart .invalidGoods{background-color:#fff;} .shoppingCart .invalidGoods .goodsNav{width:100%;height:0.66rem;padding:0 0.3rem;font-size:0.28rem;color:#282828;} .shoppingCart .invalidGoods .goodsNav .iconfont{color:#424242;font-size:0.28rem;margin-right:0.17rem;} .shoppingCart .invalidGoods .goodsNav .del{font-size:0.26rem;color:#999;} .shoppingCart .invalidGoods .goodsNav .del .icon-shanchu1{color:#999;font-size:0.33rem;vertical-align:-0.02rem; margin-right:0.08rem;} .shoppingCart .invalidGoods .goodsList .item{padding:0.2rem 0.3rem;border-top:1px solid #f5f5f5;} .shoppingCart .invalidGoods .goodsList .item .invalid{font-size:0.22rem;color:#fff;width:0.7rem;height:0.36rem;background-color:#aaa;border-radius:0.03rem;} .shoppingCart .invalidGoods .goodsList .item .pictrue{width:1.4rem;height:1.4rem;} .shoppingCart .invalidGoods .goodsList .item .pictrue img{width:100%;height:100%;border-radius:0.06rem;} .shoppingCart .invalidGoods .goodsList .item .text{width:4.33rem;font-size:0.28rem;color:#999;height:1.4rem;text-align:left;} .shoppingCart .invalidGoods .goodsList .item .text .infor{font-size:0.24rem;} .shoppingCart .invalidGoods .goodsList .item .text .end{font-size:0.26rem;color:#bbb;} .shoppingCart .footer{width:100%;height:0.96rem;background-color:#fafafa;position:fixed;bottom:1rem;padding:0 0.3rem;border-top:1px solid #eee;} .shoppingCart .footer .checkAll{font-size:0.28rem;color:#282828;margin-left:0.6rem;} .shoppingCart .footer .money{font-size:0.3rem;} .shoppingCart .footer .placeOrder{color:#fff;font-size:0.3rem;width:2.26rem;height:0.7rem;border-radius:0.5rem; text-align:center;line-height:0.7rem;margin-left:0.22rem;} .shoppingCart .footer .button .bnt{font-size:0.28rem;color:#999;border-radius:0.5rem;border:1px solid #999;width:1.6rem; height:0.6rem;text-align:center;line-height:0.6rem;} .shoppingCart .footer .button .bnt~.bnt{margin-left:0.17rem;} /*个人中心*/ .user .header{padding:0 0.3rem;height:1.9rem;position:relative;} .user .header:after {position: absolute;left: 0;right: 0;bottom: -0.98rem;z-index: -1;content:'';height:1rem;width: 100%; border-radius: 0 0 50% 50%;background-color: #e93323;} .user .header .picTxt .pictrue{width:1.2rem;height:1.2rem;} .user .header .picTxt .pictrue img{width:100%;height:100%;border-radius:50%;border:0.03rem solid #f5f5f5;} .user .header .picTxt .text{width:4.34rem;color:rgba(255,255,255,1);margin-left:0.35rem;text-align:left;} .user .header .picTxt .text .name{font-size:0.32rem;max-width:2.6rem;width:unset;} .user .header .picTxt .text .member{padding:0 0.1rem;height:0.36rem;background-color:rgba(0, 0, 0, 0.2);font-size:0.2rem; border-radius:0.3rem;margin-left:0.17rem;} .user .header .picTxt .text .member img{width:0.28rem;height:0.28rem;font-size:0.2rem;margin-right:0.08rem;} .user .header .picTxt .text .id{color:rgba(255,255,255,0.6);font-size:0.26rem;margin-top:0.15rem;} .user .header .picTxt .text .id .iconfont{font-size:0.3rem;margin-left:0.12rem;} .user .header .icon-shezhi{font-size:0.36rem;color:#fff;margin-top:-0.52rem;} .user .wrapper{padding:0 0.2rem;} .user .wrapper .nav{background-color:#fff;border-radius:0.06rem;height:1.4rem;} .user .wrapper .nav .item{flex:1;-webkit-flex:1;-o-flex:1;-ms-flex:1;text-align:center;font-size:0.26rem;color:#aaa;position:relative;} .user .wrapper .nav .item~.item:after{position:absolute;content:'';left:0;width:1px;height:0.7rem;background-color:#eee; top:50%;margin-top:-0.35rem;} .user .wrapper .nav .item .num{margin-top:0.1rem;font-size:0.36rem;color:#282828;} .user .wrapper .myOrder{background-color:#fff;border-radius:0.1rem;margin-top:0.15rem;} .user .wrapper .myOrder .title,.user .wrapper .myService .title{height:0.88rem;padding:0 0.3rem;border-bottom:1px dashed #eee; font-size:0.3rem;color:#282828;} .user .wrapper .myOrder .title .allOrder{font-size:0.26rem;color:#666;} .user .wrapper .myOrder .title .allOrder .iconfont{font-size:0.25rem;margin-left:0.07rem;} .user .wrapper .myOrder .orderState{height:1.6rem;} .user .wrapper .myOrder .orderState .item{font-size:0.26rem;color:#454545;flex:1;-webkit-flex:1;-o-flex:1;-ms-flex:1;text-align:center;} .user .wrapper .myOrder .orderState .item .pictrue{width:0.49rem;height:0.42rem;margin:0 auto 0.18rem auto;} .user .wrapper .myOrder .orderState .item .pictrue img{width:100%;height:100%;} .user .wrapper .myService{background-color:#fff;margin-top:0.15rem;border-radius:0.1rem;} .user .wrapper .myService .serviceList{padding:0.08rem 0 0.27rem 0;} .user .wrapper .myService .serviceList .item{width:25%;text-align:center;font-size:0.26rem;color:#333;margin-top:0.3rem;} .user .wrapper .myService .serviceList .item .pictrue{width:0.52rem;height:0.52rem;margin:0 auto 0.16rem auto;} .user .wrapper .myService .serviceList .item .pictrue img{width:100%;height:100%;} .user .support{width:2.19rem;height:0.74rem;margin:0.54rem auto;display:block;} /*所有产品的详情公用部分*/ .product-con .wrapper{background-color:#fff;} .product-con .wrapper .share{margin:0 0.3rem;padding-top:0.25rem;} .product-con .wrapper .share .money{font-size:0.28rem;font-weight:bold;} .product-con .wrapper .share .money .num{font-size:0.48rem;} .product-con .wrapper .share .money .vip-money{color:#282828;margin-left:0.13rem;} .product-con .wrapper .share .money .image{width:0.46rem;height:0.21rem;margin-left:0.07rem;} .product-con .wrapper .share .money .vip-money{color:#282828;margin-left:0.13rem;} .product-con .wrapper .share .iconfont{color:#515151;font-size:0.4rem;margin-bottom:0.1rem;} .product-con .wrapper .introduce{font-size:0.32rem;font-weight:bold;margin:0.1rem 0.3rem 0 0.3rem;} .product-con .wrapper .label{margin:0.22rem 0.3rem 0 0.3rem;font-size:0.24rem;color:#82848f;padding-bottom: 0.25rem;} .product-con .wrapper .coupon{padding:0 0.3rem;border-top:1px solid #f5f5f5;height:0.8rem; font-size:0.26rem;color:#82848f;} .product-con .wrapper .coupon .hide{width:5.4rem;height:0.8rem;line-height:0.8rem;} .product-con .wrapper .coupon .activity{height:0.4rem;padding:0 0.2rem;border:1px solid #f2857b;color:#e93323; font-size:0.24rem;line-height:0.4rem;position:relative;margin:0.19rem 0 0.19rem 0.15rem;} .product-con .wrapper .coupon .activity:before {content: ' ';position: absolute;width:0.07rem;height:0.1rem; border-radius:0 0.07rem 0.07rem 0;border:1px solid #f2857b;background-color:#fff;bottom:50%;left:-0.02rem; margin-bottom: -0.07rem;border-left-color:#fff;} .product-con .wrapper .coupon .activity:after {content: ' ';position: absolute;width:0.07rem;height:0.1rem; border-radius:0.07rem 0 0 0.07rem;border:1px solid #f2857b;background-color:#fff;right:-0.02rem;bottom:50%; margin-bottom:-0.05rem;border-right-color:#fff;} .product-con .wrapper .coupon .iconfont{color:#7a7a7a;font-size:0.28rem;} .product-con .attribute{background-color:#fff;padding:0 0.3rem;font-size:0.26rem;color:#82848f;margin-top:0.2rem; height:0.8rem;} .product-con .attribute .atterTxt{font-size:0.28rem;color:#282828;} .product-con .attribute .iconfont{font-size:0.28rem;color:#7a7a7a;} .product-con .userEvaluation{margin-top:0.2rem;background-color:#fff;} .product-con .userEvaluation .title{height:0.86rem;border-bottom:1px solid #eee;font-size:0.28rem;color:#282828; margin-left:0.3rem;padding-right:0.3rem;} .product-con .userEvaluation .title .praise{font-size:0.28rem;color:#808080;} .product-con .userEvaluation .title .praise .iconfont{color:#7a7a7a;font-size:0.28rem;vertical-align:0.01rem; margin-left:0.08rem;} .product-con .product-intro{margin-top:0.2rem;} .product-con .product-intro .title{font-size:0.3rem;color:#282828;height:0.86rem;width:100%;background-color:#fff; text-align:center;line-height:0.86rem;} .product-con .product-intro .conter{width:100%;} .product-con .product-intro .conter img{width:100%!important;display:block!important;} /*产品详情*/ .product-con .footer{padding:0 0.2rem 0 0.3rem;position:fixed;bottom:0;width:100%;height:1rem;background-color:#fff; z-index:99;border-top:1px solid #f0f0f0;} .product-con .footer .item{font-size:0.18rem;color:#666;margin-top: 0.07rem;} .product-con .footer .item .iconfont{text-align:center;font-size:0.4rem;height: 0.4rem;line-height: 0.4rem;} .product-con .footer .item .iconfont.icon-gouwuche1{position:relative;} .product-con .footer .item .iconfont.icon-gouwuche1 .num{color:#fff;position:absolute;font-size:0.18rem; border-radius:2rem;top:-0.1rem;right:0;height:0.3rem;line-height:0.3rem;padding:0 0.08rem;min-width:0.3rem;} .product-con .footer .bnt{width:4.44rem;height:0.76rem;color:#fff;font-size:0.28rem;} .product-con .footer .bnt>div{width:2.22rem;text-align:center;line-height:0.76rem;} .product-con .footer .bnt .joinCart{border-radius:0.5rem 0 0 0.5rem; background-image:linear-gradient(to right,#fea10f 0%,#fa8013 100%); background-image:-webkit-linear-gradient(to right,#fea10f 0%,#fa8013 100%); background-image:-moz-linear-gradient(to right,#fea10f 0%,#fa8013 100%);} .product-con .footer .bnt .buy{border-radius:0 0.5rem 0.5rem 0; background-image: linear-gradient(to right,#fa6514 0%,#e93323 100%); background-image: -webkit-linear-gradient(to right,#fa6514 0%,#e93323 100%); background-image: -moz-linear-gradient(to right,#fa6514 0%,#e93323 100%);} /*订单提交*/ .order-submission .line{width:100%;height:0.03rem;} .order-submission .line img{width:100%;height:100%;display:block;} .order-submission .address{padding:0.28rem 0.3rem;background-color:#fff;} .order-submission .address .addressCon{width:6.1rem;font-size:0.26rem;color:#666;} .order-submission .address .addressCon .name{font-size:0.3rem;color:#282828;font-weight:bold;margin-bottom:0.1rem;} .order-submission .address .addressCon .name .phone{margin-left:0.5rem;} .order-submission .address .addressCon .default{margin-right:0.12rem;} .order-submission .address .addressCon .setaddress{color:#333;font-size:0.28rem;} .order-submission .address .iconfont{font-size:0.35rem;color:#707070;} .order-submission .wrapper{background-color:#fff;margin-top:0.13rem;} .order-submission .wrapper .item{padding:0.27rem 0.3rem;font-size:0.3rem;color:#282828;border-bottom:1px solid #f0f0f0;} .order-submission .wrapper .item .discount{font-size:0.3rem;color:#999;width: 5rem;text-align: right;} .order-submission .wrapper .item .discount .integral{margin-right: 0.4rem;} .order-submission .wrapper .item .discount .checkbox-wrapper .icon{right: 0;left: unset;} .order-submission .wrapper .item .discount .iconfont{color:#515151;font-size:0.3rem;margin-left:0.15rem;} .order-submission .wrapper .item .discount .num{font-size:0.32rem;margin-right:0.2rem;} .order-submission .wrapper .item textarea{background-color:#f9f9f9;width:6.9rem;height:1.4rem;border-radius:0.03rem; margin-top:0.3rem;padding:0.25rem 0.28rem;} .order-submission .wrapper .item textarea::placeholder{color:#ccc;} .order-submission .wrapper .item .list{margin-top:0.35rem;} .order-submission .wrapper .item .list .payItem{border:1px solid #eee;border-radius:0.06rem;height:0.86rem;width:100%; margin-top:0.2rem;font-size:0.28rem;color:#282828;} .order-submission .wrapper .item .list .payItem.on{border-color:#fc5445;color:#e93323;} .order-submission .wrapper .item .list .payItem .name{width:50%;text-align:center;border-right:1px solid #eee;} .order-submission .wrapper .item .list .payItem .name .iconfont{width:0.44rem;height:0.44rem;border-radius:50%; text-align:center;line-height:0.44rem;background-color:#fe960f;color:#fff;font-size:0.3rem;margin-right:0.15rem;} .order-submission .wrapper .item .list .payItem .name .iconfont.icon-weixin2{background-color:#41b035;} .order-submission .wrapper .item .list .payItem .name .iconfont.icon-yinhangqia{background-color:#eb6623;} .order-submission .wrapper .item .list .payItem .tip{width:49%;text-align:center;font-size:0.26rem;color:#aaa;} .order-submission .moneyList{margin-top:0.12rem;background-color:#fff;padding:0.3rem;} .order-submission .moneyList .item{font-size:0.28rem;color:#282828;} .order-submission .moneyList .item~.item{margin-top:0.2rem;} .order-submission .moneyList .item .money{color:#868686;} .order-submission .footer{width:100%;height:1rem;background-color:#fff;padding:0 0.3rem;font-size:0.28rem;color:#333; position:fixed;bottom:0;left:0;} .order-submission .footer .settlement{font-size:0.3rem;color:#fff;width:2.4rem;height:0.7rem;background-color:#e93323; border-radius:0.5rem;text-align:center;line-height:0.7rem;} /*地址管理*/ .address-management .line{width:100%;height:0.03rem;} .address-management .line img{width:100%;height:100%;display:block;} .address-management .item{background-color:#fff;padding:0 0.3rem;margin-bottom:0.12rem;} .address-management .item .address{padding:0.3rem 0;border-bottom:1px solid #eee;font-size:0.28rem;color:#282828;} .address-management .item .address .consignee{font-size:0.28rem;font-weight:bold;margin-bottom:0.08rem;} .address-management .item .address .consignee .phone{margin-left:0.25rem;} .address-management .item .operation{height:0.83rem;font-size:0.28rem;color:#282828;} .address-management .item .operation .default{margin-left:0.6rem;} .address-management .item .operation .iconfont{color:#2c2c2c;font-size:0.3rem;vertical-align:-0.02rem;margin-right:0.1rem;} .address-management .item .operation .iconfont.icon-shanchu{margin-left:0.4rem;font-size:0.33rem;} .address-management .footer{position:fixed;width:100%;background-color:#fff;bottom:0;height:1.06rem;padding:0 0.3rem;} .address-management .footer .addressBnt{width:3.3rem;height:0.76rem;border-radius:0.5rem;text-align:center; line-height:0.76rem;font-size:0.3rem;color:#fff;} .address-management .footer .addressBnt.on{width:6.9rem;margin:0 auto;} .address-management .footer .addressBnt .iconfont{font-size:0.35rem;margin-right:0.08rem;vertical-align:-0.01rem;} .address-management .footer .addressBnt.wxbnt{background-color:#fe960f;} /*添加地址*/ .addAddress .list{background-color:#fff;} .addAddress .list .item{padding:0 0.3rem;min-height:0.9rem;border-top:0.01rem solid #eee;font-size:0.3rem;} .addAddress .list .item .name{width:1.95rem;color:#333;} .addAddress .list .item input{width:4.75rem;font-size:0.3rem;} .addAddress .list .item input::placeholder{color:#ccc;} .addAddress .list .item .picker{width:4.75rem;} .addAddress .list .item .address{width:4.1rem;} .addAddress .list .item .picker .iconfont{font-size:0.43rem;} .addAddress .default{padding:0 0.3rem;height:0.9rem;background-color:#fff;margin-top:0.23rem;} .addAddress .default .def{margin-left:0.6rem;} .addAddress .keepBnt{width:6.9rem;height:0.86rem;border-radius:0.5rem;text-align:center;line-height:0.86rem; margin: 0.5rem auto 0.3rem auto;font-size:0.32rem;color:#fff;} .addAddress .wechatAddress{width:6.9rem;height:0.86rem;border-radius:0.5rem;text-align:center;line-height:0.86rem; margin:0 auto;font-size:0.32rem;color:#fe960f;border:1px solid #fe960f;} /*我的订单*/ .my-order .header{height:2.6rem;padding:0 0.3rem;} .my-order .header .picTxt{height:1.9rem;} .my-order .header .picTxt .text{color:rgba(255, 255, 255, 0.8);font-size:0.26rem;font-family: 'GuildfordProBook 5';} .my-order .header .picTxt .text .name{font-size:0.34rem;font-weight:bold;color:#fff;margin-bottom:0.2rem;} .my-order .header .picTxt .pictrue{width:1.22rem;height:1.09rem;} .my-order .header .picTxt .pictrue img{width:100%;height:100%;} .my-order .nav{background-color:#fff;width:6.9rem;height:1.4rem;border-radius:0.06rem;margin:-0.73rem auto 0 auto;} .my-order .nav .item{text-align:center;font-size:0.26rem;color:#282828;padding: 0.29rem 0 0.2rem 0;} .my-order .nav .item.on{font-weight:bold;border-bottom:0.05rem solid #e93323;} .my-order .nav .item .num{margin-top:0.1rem;} .my-order .list{width:6.9rem;margin:0.14rem auto 0 auto;} .my-order .list .item{background-color:#fff;border-radius:0.06rem;margin-bottom:0.14rem;} .my-order .list .item .title{height:0.84rem;padding:0 0.3rem;border-bottom:0.01rem solid #eee;font-size:0.28rem;color:#282828;} .my-order .list .item .title .sign{font-size:0.24rem;padding:0 0.07rem;height: 0.36rem;margin-right: 0.15rem;} .my-order .list .item .item-info{padding:0 0.3rem;margin-top:0.22rem;} .my-order .list .item .item-info .pictrue{width:1.2rem;height:1.2rem;} .my-order .list .item .item-info .pictrue img{width:100%;height:100%;border-radius:0.06rem;} .my-order .list .item .item-info .text{width:4.86rem;font-size:0.28rem;color:#999;margin-top:0.06rem;} .my-order .list .item .item-info .text .name{width:3.06rem;color:#282828;} .my-order .list .item .item-info .text .money{text-align:right;} .my-order .list .item .totalPrice{font-size:0.26rem;color:#282828;text-align:right;margin:0.27rem 0 0 0.3rem; padding:0 0.3rem 0.3rem 0;border-bottom:0.01rem solid #eee;} .my-order .list .item .totalPrice .money{font-size:0.28rem;font-weight:bold;} .my-order .list .item .bottom{height:1.07rem;padding:0 0.3rem;} .my-order .list .item .bottom .bnt{width:1.76rem;height:0.6rem;text-align:center;line-height:0.6rem;color:#fff; border-radius:0.5rem;font-size:0.27rem;} .my-order .list .item .bottom .bnt.cancelBnt{border:1px solid #ddd;color:#aaa;} .my-order .list .item .bottom .bnt.default{color: #444;border: 1px solid #444;} .my-order .list .item .bottom .bnt~.bnt{margin-left:0.17rem;} /*订单详情*/ .order-details .header{padding:0 0.3rem;height:1.5rem;} .order-details .header.on{background-color:#666!important;} .order-details .header .pictrue{width:1.1rem;height:1.1rem;} .order-details .header .pictrue img{width:100%;height:100%;} .order-details .header .data{color:rgba(255,255,255,0.8);font-size:0.24rem;margin-left:0.27rem;} .order-details .header.on .data{margin-left:0;} .order-details .header .data .state{font-size:0.3rem;font-weight:bold;color:#fff;margin-bottom:0.07rem;} .order-details .header .data .time{margin-left:0.2rem;} .order-details .nav{background-color:#fff;font-size:0.26rem;color:#282828;padding:0.25rem 0;} .order-details .nav .navCon{padding:0 0.4rem;} .order-details .nav .navCon .on{font-weight:bold;color:#e93323;} .order-details .nav .progress{padding:0 0.65rem;margin-top:0.1rem;} .order-details .nav .progress .line{width:1rem;height:0.02rem;background-color:#939390;} .order-details .nav .progress .iconfont{font-size:0.25rem;color:#939390;margin-top:-0.02rem;width: 0.3rem;height: 0.3rem; line-height: 0.33rem;text-align:center;} .order-details .address{font-size:0.26rem;color:#868686;background-color:#fff;padding: 0.25rem 0.3rem 0.3rem 0.3rem;} .order-details .address .name{font-size:0.3rem;color:#282828;margin-bottom:0.1rem;} .order-details .address .name .phone{margin-left:0.4rem;} .order-details .line{width:100%;height:0.03rem;} .order-details .line img{width:100%;height:100%;display:block;} .order-details .wrapper{background-color:#fff;margin-top:0.12rem;padding:0.3rem;} .order-details .wrapper .item{font-size:0.28rem;color:#282828;} .order-details .wrapper .item~.item{margin-top:0.2rem;} .order-details .wrapper .item .conter{color:#868686;width:5rem;text-align:right;} .order-details .wrapper .item .conter .copy{font-size:0.2rem;color:#333;border-radius:0.03rem;border:1px solid #666; padding:0.03rem 0.15rem;margin-left:0.24rem;} .order-details .wrapper .actualPay{border-top:0.01rem solid #eee;margin-top:0.3rem;padding-top:0.3rem;} .order-details .wrapper .actualPay .money{font-weight:bold;font-size:0.3rem;} .order-details .footer{width:100%;height:1rem;position:fixed;bottom:0;left:0;background-color:#fff;padding:0 0.3rem;border-top:1px solid #eee;} .order-details .footer .bnt{width:1.76rem;height:0.6rem;text-align:center;line-height:0.6rem;border-radius:0.5rem; color:#fff;font-size:0.27rem;} .order-details .footer .bnt.cancel{color:#aaa;border:1px solid #ddd;} .order-details .footer .bnt.default{color: #444;border: 1px solid #444;} .order-details .footer .bnt~.bnt{margin-left:0.18rem;} /*物流信息*/ .logistics .header{padding:0.23rem 0.3rem;background-color:#fff;height:1.66rem;} .logistics .header .pictrue{width:1.2rem;height:1.2rem;} .logistics .header .pictrue img{width:100%;height:100%;border-radius:0.06rem;} .logistics .header .text{width:5.4rem;font-size:0.28rem;color:#999;margin-top:0.06rem;} .logistics .header .text .name{width:3.65rem;color:#282828;} .logistics .header .text .money{text-align:right;} .logistics .logisticsCon{background-color:#fff;margin:0.12rem 0;} .logistics .logisticsCon .company{height:1.2rem;margin:0 0 0.45rem 0.3rem;padding-right:0.3rem; border-bottom:1px solid #f5f5f5;} .logistics .logisticsCon .company .picTxt{width:5.2rem;} .logistics .logisticsCon .company .picTxt .iconfont{width:0.5rem;height:0.5rem;background-color:#666;text-align:center; line-height:0.5rem;color:#fff;font-size:0.35rem;} .logistics .logisticsCon .company .picTxt .text{width:4.5rem;font-size:0.26rem;color:#282828;} .logistics .logisticsCon .company .picTxt .text .name{color:#999;} .logistics .logisticsCon .company .picTxt .text .express{margin-top:0.05rem;} .logistics .logisticsCon .company .copy{font-size:0.2rem;width:1.06rem;height:0.4rem;border-radius:0.03rem;border:1px solid #999;} .logistics .logisticsCon .item{padding:0 0.4rem;position:relative;} .logistics .logisticsCon .item .circular{width:0.2rem;height:0.2rem;border-radius:50%;position:absolute;top:-0.01rem; left:0.315rem;background-color:#ddd;} .logistics .logisticsCon .item .circular.on{background-color:#e93323;} .logistics .logisticsCon .item .text{font-size:0.26rem;color:#666;width:6.15rem;border-left:1px solid #e6e6e6; padding:0 0 0.6rem 0.38rem;} .logistics .logisticsCon .item .text.on{border-left-color:#f8c1bd;} .logistics .logisticsCon .item .text .data{font-size:0.24rem;color:#999;margin-top:0.1rem;} .logistics .logisticsCon .item .text .data .time{margin-left:0.15rem;} /*支付状态*/ .payment-status{background-color:#fff;margin:1.95rem auto 0 auto;border-radius:0.1rem;padding:0.01rem 0 0.28rem 0;width: 6.9rem;left:50%;margin-left:-3.45rem;} .payment-status .iconfont{font-size:0.7rem;width:1.4rem;height:1.4rem;border-radius:50%;color:#fff;text-align:center; line-height:1.3rem;text-shadow:0 4px 0 #df1e14;border:0.06rem solid #f5f5f5;margin:-0.76rem auto 0 auto; background-color:#999;} .payment-status .iconfont.fail{text-shadow:0 4px 0 #7a7a7a;} .payment-status .status{font-size:0.32rem;font-weight:bold;text-align:center;margin:0.25rem 0 0.37rem 0;} .payment-status .wrapper{border:1px solid #eee;margin:0 0.3rem 0.47rem 0.3rem;padding:0.35rem 0;border-left:0; border-right:0;} .payment-status .wrapper .item{font-size:0.28rem;color:#282828;} .payment-status .wrapper .item~.item{margin-top:0.2rem;} .payment-status .wrapper .item .itemCom{color:#666;} .payment-status .returnBnt{width:6.3rem;height:0.86rem;border-radius:0.5rem;color:#fff;font-size:0.3rem;text-align:center; line-height:0.86rem;margin:0 auto 0.2rem auto;} /*个人资料*/ .personal-data .wrapper{margin:0.1rem 0;background-color:#fff;padding:0.36rem 0.3rem 0.13rem 0.3rem;} .personal-data .wrapper .title{margin-bottom:0.3rem;font-size:0.32rem;color:#282828;} .personal-data .wrapper .wrapList .item{width:6.9rem;height:1.6rem;background-color:#f8f8f8;border-radius:0.2rem;margin-bottom:0.22rem;padding:0 0.3rem;position:relative;border:0.02rem solid #f8f8f8;} .personal-data .wrapper .wrapList .item.on{border-color:#e93323;border-radius:0.2rem;background:url("../images/figure.png") no-repeat;background-size:100% 100%;background-color:#fff9f9;} .personal-data .wrapper .wrapList .item .picTxt{width:4.45rem;} .personal-data .wrapper .wrapList .item .picTxt .pictrue{width:0.96rem;height:0.96rem;position:relative;} .personal-data .wrapper .wrapList .item .picTxt .pictrue img{width:100%;height:100%;border-radius:50%;} .personal-data .wrapper .wrapList .item .picTxt .pictrue .alter{width:0.3rem;height:0.3rem;border-radius:50%;position:absolute;bottom:0;right:0;} .personal-data .wrapper .wrapList .item .picTxt .text{width:3.25rem;} .personal-data .wrapper .wrapList .item .picTxt .text .name{width:100%;font-size:0.3rem;color:#282828;} .personal-data .wrapper .wrapList .item .picTxt .text .phone{font-size:0.24rem;color:#999;margin-top:0.1rem;} .personal-data .wrapper .wrapList .item .bnt{font-size:0.24rem;background-color:#fff;border-radius:0.27rem;width:1.4rem;height:0.54rem;border:0.02rem solid #e93323;} .personal-data .wrapper .wrapList .item .currentBnt{position:absolute;right:0;top:0;font-size:0.26rem;background-color:rgba(233,51,35,0.1);width:1.4rem;height:0.48rem;border-radius:0 0.2rem 0 0.2rem;} .personal-data .list{background-color:#fff;} .personal-data .list .item{padding:0.3rem 0.3rem 0.3rem 0;border-bottom:1px solid #f2f2f2;margin-left:0.3rem; font-size:0.32rem;color:#282828;} .personal-data .list .item .pictrue{width:0.88rem;height:0.88rem;} .personal-data .list .item .pictrue img{width:100%;height:100%;border-radius:50%;} .personal-data .list .item .input{width:4.15rem;text-align:right;color:#868686;} .personal-data .list .item .input input{color:#868686;text-align:right;width: 100%;} .personal-data .list .item .input .id{width:3.65rem;} .personal-data .list .item .input .iconfont{font-size:0.35rem;} .personal-data .list .item .input .iconfont.icon-xiangyou{font-size:0.3rem;margin-left:0.27rem;} .personal-data .modifyBnt{font-size:0.32rem;color:#fff;width:6.9rem;height:0.9rem;border-radius:0.5rem;text-align:center;line-height:0.9rem;margin:0.76rem auto 0 auto;} .personal-data .logOut{font-size:0.32rem;text-align:center;width:6.9rem;height:0.9rem;border-radius:0.45rem;margin:0.3rem auto 0.7rem auto;} /*拼团海报*/ .poster-poster .tip{height:0.8rem;font-size:0.26rem;color:#e8c787;text-align:center;line-height:0.8rem;} .poster-poster .tip .iconfont{font-size:0.36rem;vertical-align:-0.04rem;margin-right:0.18rem;} .poster-poster .poster{width:6.9rem;height:100%;margin:0 auto;} .poster-poster .poster img{width:100%;height:100%;display:block;} /*分销海报*/ .distribution-posters .slider-banner{width:100%;height:10rem;position:relative;margin-top:1rem;} .distribution-posters .slider-banner .swiper-slide{width:6rem!important;height:100%;} .distribution-posters .slide-image{width:100%;height:100%;border-radius:0.15rem;} .distribution-posters .keep{font-size:0.3rem;color:#fff;width:6rem;height:0.8rem;border-radius:0.5rem;text-align:center; line-height:0.8rem;margin:0.38rem auto;} /*会员中心*/ .member-center .header{background-color:#232323;width:100%;padding:0.5rem 0;} .member-center .header .slider-banner{height:3.28rem;} .member-center .header .slider-banner .swiper-slide{width:6.36rem!important;height:3.28rem;border-radius:0.16rem; color:#fff;position:relative;background-repeat:no-repeat;background-size:100% 100%;} .member-center .header .slider-banner .swiper-slide.diamonds{background-image:url("../images/diamonds.jpg");} .member-center .header .slider-banner .swiper-slide.gold{background-image:url("../images/gold.jpg");} .member-center .header .slider-banner .swiper-slide.silver{background-image:url("../images/silver.jpg");} .member-center .header .slider-banner .swiper-slide.brass{background-image:url("../images/brass.jpg");} .member-center .header .slider-banner .swiper-slide.bronze{background-image:url("../images/bronze.jpg");} .member-center .header .slider-banner .swiper-slide.ordinary{background-image:url("../images/ordinary.jpg");} .member-center .header .slider-banner .swiper-slide img{width:0.89rem;height:1.08rem;display:block;position:absolute;right:0.6rem;} .member-center .header .slider-banner .swiper-slide .name{font-size:0.46rem;font-weight:bold;padding:0.33rem 0 0 0.35rem;} .member-center .header .slider-banner .swiper-slide .discount{font-size:0.28rem;font-weight:bold;margin:0.02rem 0 0 0.35rem;} .member-center .header .slider-banner .swiper-slide .discount .iconfont{margin-left:0.1rem;font-size:0.3rem;} .member-center .header .slider-banner .swiper-slide .nav{margin-top:0.48rem;} .member-center .header .slider-banner .swiper-slide .nav .item{flex:1;-webkit-flex:1;-o-flex:1;-ms-flex:1;text-align:center; color:rgba(255, 255, 255, 0.6);position:relative;} .member-center .header .slider-banner .swiper-slide .nav .item .num{font-size:0.4rem;color:#fff;font-family: 'GuildfordProBook 5';} .member-center .header .slider-banner .swiper-slide .nav .item~.item::before{position:absolute;width:0.02rem;height:0.32rem; background-color:rgba(255, 255, 255, 0.6);content:'';left:0;top:50%;transform:translateY(-50%);-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-moz-transform:translateY(-50%);-o-transform:translateY(-50%);} .member-center .header .slider-banner .swiper-slide .lock{font-size:0.26rem;margin:0.73rem 0 0 0.35rem;} .member-center .header .slider-banner .swiper-slide .lock .iconfont{font-size:0.33rem;margin-right:0.15rem; vertical-align:-0.04rem;} .member-center .wrapper{background-color:#fff;padding-bottom:0.16rem;margin-bottom:0.2rem;} .member-center .wrapper .title{height:0.98rem;padding:0 0.3rem;font-size:0.3rem;font-weight:bold;color:#282828;} .member-center .wrapper .title .iconfont{color:#ffae06;font-weight:normal;font-size:0.4rem;margin-right:0.12rem; vertical-align:-0.02rem;} .member-center .wrapper .title .num{font-size:0.28rem;color:#999;} .member-center .wrapper .title .num .current{color:#ffae06;} .member-center .wrapper .list .item{width:6.9rem;height:1.84rem;background-color:#f9f9f9;margin:0 auto 0.2rem auto; padding:0.27rem 0 0.22rem 0;border-radius:0.12rem;} .member-center .wrapper .list .item .top{padding-right:0.27rem;font-size:0.26rem;color:#999;} .member-center .wrapper .list .item .top .name{border-left:0.06rem solid #ffae06;padding-left:0.2rem;font-size:0.28rem; color:#282828;font-weight:bold;} .member-center .wrapper .list .item .top .name .iconfont{color:#999;font-size:0.3rem;vertical-align:-0.02rem; margin-left:0.1rem;} .member-center .wrapper .list .item .cu-progress{overflow: hidden;height:0.12rem;background-color: #eee;width:6.36rem; border-radius:0.2rem;margin:0.35rem auto 0 auto;} .member-center .wrapper .list .item .cu-progress .bg-red{width:0;height:100%;transition:width 0.6s ease;-webkit-transition:width 0.6s ease;-moz-transition:width 0.6s ease;-o-transition:width 0.6s ease; background-color: #ffaa29;border-radius:0.2rem;} .member-center .wrapper .list .item .experience{margin-top:0.17rem;padding:0 0.27rem;font-size:0.24rem;color:#999;} .member-center .wrapper .list .item .experience .num{color:#ffad07;} .member-center .growthValue{background-color:#fff;border-radius:0.16rem;position:fixed;top:2.66rem;left:50%;width:5.6rem; height:7.4rem;margin-left:-2.8rem;z-index:99;transform:translate3d(0,-200%,0);-webkit-transform:translate3d(0,-200%,0);-ms-transform:translate3d(0,-200%,0);-moz-transform:translate3d(0,-200%,0); -o-transform:translate3d(0,-200%,0); transition:all .3s cubic-bezier(.25,.5,.5,.9);-webkit-transition:all .3s cubic-bezier(.25,.5,.5,.9);-moz-transition:all .3s cubic-bezier(.25,.5,.5,.9);-o-transition:all .3s cubic-bezier(.25,.5,.5,.9);} .member-center .growthValue.on{transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);} .member-center .growthValue .pictrue{width:100%;height:2.57rem;position:relative;} .member-center .growthValue .pictrue img{width:100%;height:100%;border-radius:0.16rem 0.16rem 0 0;} .member-center .growthValue .conter{padding:0 0.35rem;font-size:0.3rem;color:#333;margin-top:0.58rem;line-height:1.5; height:3.5rem;overflow:auto;} .member-center .growthValue .pictrue .iconfont{position:absolute;font-size:0.65rem;color:#fff;top:7.75rem;left:50%; transform:translateX(-50%);-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);-moz-transform:translateX(-50%);-o-transform:translateX(-50%);} /*积分详情*/ .integral-details .header{background-image:url('../images/integralbg.jpg');background-repeat:no-repeat; background-size:100% 100%;width:100%;height:4.6rem;font-size:0.72rem;color:#fff;padding:0.31rem 0 0.45rem 0; text-align:center;font-family: 'GuildfordProBook 5';} .integral-details .header .currentScore{font-size:0.26rem;color:rgba(255, 255, 255, 0.8);text-align:center;margin-bottom: 0.05rem;} .integral-details .header .line{width:0.6rem;height:0.03rem;background-color:#fff;margin:0.2rem auto 0 auto;} .integral-details .header .nav{font-size:0.22rem;color:rgba(255, 255, 255, 0.8);flex:1;-webkit-flex:1;-o-flex:1;-ms-flex:1;margin-top:0.35rem;} .integral-details .header .nav .item{width:33.33%;text-align:center;} .integral-details .header .nav .item .num{color:#fff;font-size:0.4rem;} .integral-details .wrapper .nav{flex:1;-webkit-flex:1;-o-flex:1;-ms-flex:1;width:6.9rem;border-radius:0.2rem 0.2rem 0 0; margin:-0.96rem auto 0 auto;background-color:#f7f7f7;height:0.96rem;font-size:0.3rem;color:#bbb;} .integral-details .wrapper .nav .item{text-align:center;width:50%;} .integral-details .wrapper .nav .item.on{background-color:#fff;color:#e93323;font-weight:bold;border-radius:0.2rem 0 0 0;} .integral-details .wrapper .nav .item .iconfont{font-size:0.38rem;margin-right:0.1rem;} .integral-details .wrapper .list{background-color:#fff;padding:0.24rem 0.3rem;} .integral-details .wrapper .list .tip{font-size:0.25rem;width:6.9rem;height:0.6rem;border-radius:0.5rem; background-color:#fff5e2;border:1px solid #ffeac1;color:#c8a86b;padding:0 0.2rem;margin-bottom:0.24rem;} .integral-details .wrapper .list .tip .iconfont{font-size:0.35rem;margin-right:0.15rem;} .integral-details .wrapper .list .item{height:1.24rem;border-bottom:1px solid #eee;font-size:0.24rem;color:#999;} .integral-details .wrapper .list .item .state{font-size:0.28rem;color:#282828;margin-bottom:0.08rem;} .integral-details .wrapper .list .item .num{font-size:0.36rem;font-family: 'GuildfordProBook 5';color: #16ac57;} .integral-details .wrapper .list2{background-color:#fff;padding:0.24rem 0;} .integral-details .wrapper .list2 .item{background-image:linear-gradient(to right,#fff7e7 0%,#fffdf9 100%); background-image:-webkit-linear-gradient(to right,#fff7e7 0%,#fffdf9 100%); background-image:-moz-linear-gradient(to right,#fff7e7 0%,#fffdf9 100%); width:6.9rem;height:1.8rem;position:relative;border-radius:0.1rem;margin:0 auto 0.2rem auto;padding:0 0.25rem 0 1.8rem;} .integral-details .wrapper .list2 .item .pictrue{width:0.9rem;height:1.5rem;position:absolute;bottom:0;left:0.45rem;} .integral-details .wrapper .list2 .item .pictrue img{width:100%;height:100%;} .integral-details .wrapper .list2 .item .name{width:2.85rem;font-size:0.3rem;font-weight:bold;color:#c8a86b;} .integral-details .wrapper .list2 .item .earn{font-size:0.26rem;color:#c8a86b;border:0.02rem solid #c8a86b; text-align:center;line-height:0.52rem;height:0.52rem;width:1.6rem;border-radius:0.5rem;} /*金品推荐*/ .quality-recommend .title{height:1.2rem;font-size:0.32rem;color:#282828;background-color:#f5f5f5;} .quality-recommend .title .line{width:2.3rem;height:0.02rem;background-color:#e9e9e9;} .quality-recommend .title .name{margin:0 0.2rem;} .quality-recommend .title .name .iconfont{margin-right:0.13rem;font-size:0.38rem;vertical-align:-0.04rem;} /*砍价列表*/ .bargain-list .icon-xiangzuo{font-size:0.4rem;color:#fff;position:fixed;top:0.51rem;left:0.3rem;z-index:99;} .bargain-list .header{background-image:url('../images/cut-bg.png');background-repeat:no-repeat;background-size:100% 100%;width:7.5rem; height:7.13rem;} .bargain-list .list{background-color:#fff;border:0.06rem solid #fc8b42;border-radius:0.3rem; margin:-0.45rem 0.3rem 0.66rem 0.3rem;padding:0 0.24rem;} .bargain-list .list .item{border-bottom:1px solid #eee;position:relative;height:2.23rem;} .bargain-list .list .item .pictrue{width:1.6rem;height:1.6rem;} .bargain-list .list .item .pictrue img{width:100%;height:100%;border-radius:0.06rem;} .bargain-list .list .item .text{width:4.5rem;font-size:0.3rem;color:#282828;height:1.6rem;} .bargain-list .list .item .text .num{font-size:0.26rem;color:#999;} .bargain-list .list .item .text .num .iconfont{font-size:0.35rem;margin-right:0.07rem;} .bargain-list .list .item .text .money{font-size:0.24rem;font-weight:bold;} .bargain-list .list .item .text .money .price{font-size:0.32rem;} .bargain-list .list .item .cutBnt{position:absolute;width:1.8rem;height:0.5rem;border-radius:0.5rem;font-size:0.24rem; color:#fff;text-align:center;line-height:0.46rem;right:0.24rem;bottom:0.28rem;box-shadow:0 0.07rem 0 #f8c1bd; -webkit-box-shadow: 0 0.07rem 0 #f8c1bd;-moz-box-shadow: 0 0.07rem 0 #f8c1bd;-o-box-shadow:0 0.07rem 0 #f8c1bd;} .bargain-list .list .item .cutBnt .iconfont{margin-right:0.08rem;font-size:0.3rem;} .bargain-list .list .load{font-size:0.24rem;height:0.85rem;text-align:center;line-height:0.85rem;} /*砍价*/ .bargain .icon-xiangzuo{font-size:0.4rem;color:#fff;position:fixed;top:0.51rem;left:0.3rem;z-index:99;} .bargain .header{background-image:url('../images/cut1.png');background-repeat:no-repeat;background-size:100% 100%;width:6.98rem; height:5.72rem;margin:0 auto;padding-top:0.001rem;margin-top:0.4rem} .bargain .header.on{background-image:url('../images/cut2.png');} .bargain .header .pictxt{margin:2.6rem auto 0 auto;font-size:0.26rem;color:#fff;} .bargain .header .pictxt .pictrue{width:0.56rem;height:0.56rem;margin-right:0.3rem;} .bargain .header .pictxt .pictrue img{width:100%;height:100%;border-radius:50%;border:0.02rem solid #fff;} .bargain .header .pictxt .text span{margin-left:0.2rem;} .bargain .header .time{background-image:url('../images/time.png');background-repeat:no-repeat;background-size:100% 100%; width:4.4rem;height:1.66rem;margin:2.8rem auto 0 auto;font-size:0.22rem;text-align:center;padding-top:0.09rem; color: #fc4141;} .bargain .header .people{text-align:center;color:#fff;font-size:0.2rem;margin-top:0.2rem;} .bargain .header .time .styleAll{color:#333;} .bargain .wrapper,.bargain .bargainGang,.bargain .goodsDetails{width:6.6rem;border:0.06rem solid #fc8b42; background-color:#fff;border-radius:0.2rem;margin:-1.62rem auto 0 auto;padding:0 0.24rem 0.47rem 0.24rem;position:relative;} .bargain .wrapper .pictxt{margin:0.26rem 0 0.37rem 0;} .bargain .wrapper .pictxt .pictrue{width:1.8rem;height:1.8rem;} .bargain .wrapper .pictxt .pictrue img{width:100%;height:100%;border-radius:0.06rem;} .bargain .wrapper .pictxt .text{width:3.95rem;font-size:0.28rem;color:#282828;height:1.8rem;} .bargain .wrapper .pictxt .text .money{font-weight:bold;font-size:0.24rem;} .bargain .wrapper .pictxt .text .money .num{font-size:0.36rem;} .bargain .wrapper .pictxt .text .successNum{font-size:0.22rem;color:#999;margin-right: 0.15rem;} .bargain .wrapper .cu-progress {overflow: hidden;height:0.12rem;background-color: #eee;width:100%;border-radius:0.2rem;} .bargain .wrapper .cu-progress .bg-red{width: 0;height: 100%;transition: width 0.6s ease;-webkit-transition: width 0.6s ease;-moz-transition: width 0.6s ease;-o-transition: width 0.6s ease;border-radius:0.2rem; background-image: linear-gradient(to right,#ffa363 0%,#e93323 100%); background-image: -webkit-linear-gradient(to right,#ffa363 0%,#e93323 100%); background-image: -moz-linear-gradient(to right,#ffa363 0%,#e93323 100%);} .bargain .wrapper .balance{font-size:0.22rem;color:#999;margin-top:0.15rem;} .bargain .wrapper .bargainSuccess{font-size:0.26rem;color:#282828;text-align:center;} .bargain .wrapper .bargainSuccess .iconfont{font-size:0.45rem;color:#54c762;padding-right:0.18rem;vertical-align:-0.05rem;} .bargain .wrapper .bargainBnt{font-size:0.3rem;font-weight:bold;color:#fff;width:6rem;height:0.8rem;border-radius:0.4rem; background-image: linear-gradient(to right,#f67a38 0%,#f11b09 100%);text-align:center;line-height:0.8rem; margin-top:0.32rem;} .bargain .wrapper .bargainBnt.on{border:0.02rem solid #e93323;color:#e93323; background-image: linear-gradient(to right,#fff 0%,#fff 100%); background-image: -webkit-linear-gradient(to right,#fff 0%,#fff 100%); background-image: -moz-linear-gradient(to right,#fff 0%,#fff 100%); width:5.96rem;height:0.76rem;} .bargain .wrapper .tip{font-size:0.22rem;color:#999;text-align:center;margin-top:0.2rem;} .bargain .wrapper .lock,.bargain .bargainGang .lock,.bargain .goodsDetails .lock{background-image:url('../images/lock.png'); background-repeat:no-repeat;background-size:100% 100%;width:5.48rem;height:0.66rem;position:absolute;left:50%; transform:translateX(-50%);-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);-moz-transform:translateX(-50%);-o-transform:translateX(-50%);bottom:-0.43rem;z-index:5;} .bargain .bargainGang{margin:0.13rem auto 0 auto;} .bargain .bargainGang .title,.bargain .goodsDetails .title{font-size:0.32rem;font-weight:bold;height:0.8rem; margin-top:0.3rem;} .bargain .bargainGang .title .pictrue,.bargain .goodsDetails .title .pictrue{width:0.46rem;height:0.24rem;} .bargain .bargainGang .title .pictrue.on,.bargain .goodsDetails .title .pictrue.on{transform:rotate(180deg);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);} .bargain .bargainGang .title .pictrue img,.bargain .goodsDetails .title .pictrue img{width:100%;height:100%;display:block;} .bargain .bargainGang .title .titleCon,.bargain .goodsDetails .title .titleCon{margin:0 0.2rem;} .bargain .bargainGang .list .item{border-bottom:1px dashed #ddd;height:1.12rem;} .bargain .bargainGang .list .item .pictxt{width:3.1rem;} .bargain .bargainGang .list .item .pictxt .pictrue{width:0.7rem;height:0.7rem;} .bargain .bargainGang .list .item .pictxt .pictrue img{width:100%;height:100%;border-radius:50%;border:0.02px solid #e93323;} .bargain .bargainGang .list .item .pictxt .text{width:2.25rem;font-size:0.2rem;color:#999;} .bargain .bargainGang .list .item .pictxt .text .name{font-size:0.25rem;color:#282828;margin-bottom:0.07rem;} .bargain .bargainGang .list .item .money{font-size:0.25rem;} .bargain .bargainGang .list .item .money .iconfont{font-size:0.35rem;vertical-align:middle;margin-right:0.1rem;} .bargain .bargainGang .load{font-size:0.24rem;text-align:center;line-height:0.8rem;height:0.8rem;} .bargain .goodsDetails{margin:0.13rem auto 0 auto;} .bargain .goodsDetails~.goodsDetails{margin-bottom:0.5rem;} .bargain .goodsDetails .conter{margin-top:0.2rem;} .bargain .goodsDetails .conter img{width:100%!important;display:block;} .bargain .bargainTip{position:fixed;top:50%;left:50%;width:5.6rem;margin-left:-2.8rem;z-index:99;border-radius:0.2rem; background-color:#fff;transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;opacity:0;transform: scale(0);-webkit-transform: scale(0);-ms-transform: scale(0);-moz-transform: scale(0);-o-transform: scale(0);padding-bottom:0.6rem; margin-top:-3.3rem;} .bargain .bargainTip.on{opacity:1;transform: scale(1);-webkit-transform: scale(1);-ms-transform: scale(1);-moz-transform: scale(1);-o-transform: scale(1);} .bargain .bargainTip .pictrue{width:100%;height:3.21rem;position:relative;} .bargain .bargainTip .pictrue .iconfont{position: absolute;right: 0.18rem;top: 0.18rem;color: #fff;font-size: 0.36rem; width: 0.5rem;height: 0.5rem;text-align: center;line-height: 0.5rem;} .bargain .bargainTip .pictrue img{width:100%;height:100%;border-radius:0.2rem 0.2rem 0 0;} .bargain .bargainTip .cutOff{font-size:0.3rem;color:#666;padding:0 0.29rem;text-align:center;margin-top:0.5rem;} .bargain .bargainTip .cutOff.on{margin-top:0.26rem;} .bargain .bargainTip .help{font-size:0.32rem;font-weight:bold;text-align:center;margin-top:0.4rem;} .bargain .bargainTip .tipBnt{font-size:0.32rem;color:#fff;width:3.6rem;height:0.82rem;border-radius:0.41rem; background-image:linear-gradient(to right,#f67a38 0%,#f11b09 100%); background-image:-webkit-linear-gradient(to right,#f67a38 0%,#f11b09 100%); background-image:-moz-linear-gradient(to right,#f67a38 0%,#f11b09 100%); text-align:center;line-height:0.82rem;margin:0.5rem auto 0 auto;} /*砍价记录*/ .bargain-record .item{background-color:#fff;margin-bottom:0.12rem;} .bargain-record .item .picTxt{height:2.1rem;border-bottom:1px solid #f0f0f0;padding:0 0.3rem;} .bargain-record .item .picTxt .pictrue{width:1.5rem;height:1.5rem;} .bargain-record .item .picTxt .pictrue img{width:100%;height:100%;border-radius:0.06rem;} .bargain-record .item .picTxt .text{width:5.15rem;font-size:0.3rem;color:#282828;height:1.5rem;} .bargain-record .item .picTxt .text .time{font-size:0.24rem;color:#868686;} .bargain-record .item .picTxt .text .time .styleAll{color:#fc4141;} .bargain-record .item .picTxt .text .money{font-size:0.24rem;} .bargain-record .item .picTxt .text .money .num{font-size:0.32rem;font-weight:bold;} .bargain-record .item .picTxt .text .money .symbol{font-weight:bold;} .bargain-record .item .bottom{height:1rem;padding:0 0.3rem;font-size:0.27rem;} .bargain-record .item .bottom .purple{color:#f78513;} .bargain-record .item .bottom .end{color:#999;} .bargain-record .item .bottom .success{color:#e93323;} .bargain-record .item .bottom .bnt{font-size:0.27rem;color:#fff;width:1.76rem;height:0.6rem;border-radius:0.06rem; text-align:center;line-height:0.6rem;} .bargain-record .item .bottom .bnt.cancel{color:#aaa;border:1px solid #ddd;} .bargain-record .item .bottom .bnt~.bnt{margin-left:0.18rem;} /*拼团列表*/ .group-list .header{background-image:url('../images/group.png');background-repeat:no-repeat;background-size:100% 100%; width:100%;height:4.5rem;} .group-list .list{margin-top:-1.08rem;} .group-list .list .item{width:6.9rem;height:2.08rem;background-color:#fff;border-radius:0.06rem;padding:0 0.24rem; margin:0 auto 0.2rem auto;} .group-list .list .item .pictrue{width:1.6rem;height:1.6rem;} .group-list .list .item .pictrue img{width:100%;height:100%;border-radius:0.06rem;} .group-list .list .item .text{width:4.58rem;font-size:0.3rem;color:#282828;} .group-list .list .item .text .team{height:0.4rem;border-radius:0.04rem;font-size:0.22rem;margin-top:0.2rem;} .group-list .list .item .text .team .iconfont{width:0.54rem;background-color:#ffdcd9;text-align:center;color:#dd3823; height:100%;line-height:0.38rem;} .group-list .list .item .text .team .num{text-align:center;padding:0 0.1rem;} .group-list .list .item .text .bottom{margin-top:0.07rem;} .group-list .list .item .text .bottom .money{font-size:0.24rem;font-weight:bold;color:#282828;} .group-list .list .item .text .bottom .money .num{font-size:0.32rem;} .group-list .list .item .text .bottom .money .y-money{font-size:0.24rem;color:#999;font-weight:normal; text-decoration:line-through;margin-left:0.1rem;} .group-list .list .item .text .bottom .groupBnt{font-size:0.26rem;color:#fff;width:1.46rem;height:0.54rem;text-align:center; line-height:0.54rem;border-radius:0.04rem;} .group-list .list .item .text .bottom .groupBnt .iconfont{font-size:0.25rem;margin-left:0.1rem;} /*拼团商品详情*/ .product-con .wrapper .share .money .y-money {color:#82848f;margin-left:0.13rem;text-decoration:line-through; font-weight:normal;} .product-con .notice{width:100%;height:0.62rem;background-color:#ffedeb;margin-top:0.2rem;padding:0 0.3rem;} .product-con .notice .num{font-size:0.24rem;} .product-con .notice .num .iconfont{font-size:0.3rem;vertical-align:-0.03rem;margin-right:0.2rem;} .product-con .notice .num .line{color:#282828;margin-left:0.15rem;} .product-con .notice .swiper{height:100%;width:4.7rem;line-height:0.62rem;overflow:hidden;margin-left:0.14rem;} .product-con .notice .swiper .swiper-slide{height:100%;width:100%;overflow:hidden;font-size:0.24rem;color:#282828;} .product-con .assemble{background-color:#fff;} .product-con .assemble .item{padding-right:0.3rem;margin-left:0.3rem;border-bottom:1px solid #f0f0f0;height:1.32rem;} .product-con .assemble .item .pictxt{width:2.95rem;} .product-con .assemble .item .pictxt .text{width:1.94rem;} .product-con .assemble .item .pictxt .pictrue{width:0.8rem;height:0.8rem;} .product-con .assemble .item .pictxt .pictrue img{width:100%;height:100%;border-radius:50%;} .product-con .assemble .item .right .lack{font-size:0.24rem;color:#333333;text-align: right;} .product-con .assemble .item .right .time{font-size:0.22rem;color:#82848f;margin-top:0.05rem;} .product-con .assemble .item .right .spellBnt{font-size:0.24rem;color:#fff;width:1.4rem;height:0.5rem;border-radius:0.5rem; background-image: linear-gradient(to right,#ff2358 0%,#ff0000 100%); background-image: -webkit-linear-gradient(to right,#ff2358 0%,#ff0000 100%); background-image: -moz-linear-gradient(to right,#ff2358 0%,#ff0000 100%); text-align:center;line-height:0.5rem;margin-left:0.3rem;} .product-con .assemble .item .right .spellBnt .iconfont{font-size:0.2rem;margin-left:0.05rem;} .product-con .assemble .more{font-size:0.24rem;color:#282828;text-align:center;height:0.9rem;line-height:0.9rem;} .product-con .assemble .more .iconfont{margin-left:0.13rem;font-size:0.25rem;} .product-con .playWay{background-color:#fff;padding:0 0.3rem;margin-top:0.2rem;font-size:0.28rem;color:#282828;} .product-con .playWay .title{height:0.86rem;border-bottom:1px solid #eee;} .product-con .playWay .title .iconfont{margin-left:0.13rem;font-size:0.28rem;color:#717171;} .product-con .playWay .way{min-height:1.1rem;font-size:0.26rem;color:#282828;} .product-con .playWay .way .iconfont{color:#cdcdcd;font-size:0.4rem;margin:0 0.35rem;} .product-con .playWay .way .item .num{font-size:0.3rem;margin-right:0.06rem;} .product-con .playWay .way .item .tip{font-size:0.22rem;color:#a5a5a5;} .product-con .footer-group{position:fixed;bottom:0;width:100%;height:1rem;background-color:#fff;font-size:0.18rem;color:#666; z-index:99;} .product-con .footer-group .customerSer{width:14%;font-size:0.2rem;color:#666;} .product-con .footer-group .customerSer .iconfont{font-size:0.35rem;} .product-con .footer-group .bnt{width:86%;text-align:center;line-height:1rem;height:100%;color:#fff;font-size:0.3rem;} .product-con .superior .slider-banner .swiper-pagination-bullet {background-color: #999;} .product-con .superior .slider-banner .swiper-pagination-bullet-active {background-color: #e93323;} .product-con .superior .slider-banner .swiper-container-horizontal>.swiper-pagination-bullets{bottom:0;} /*开团*/ .group-con .header{width:100%;height:1.86rem;background-color:#fff;border-top:1px solid #f5f5f5;padding:0 0.3rem; position:relative;} .group-con .header .iconfont{font-size:1rem;position:absolute;color:#ccc;right:0.33rem;bottom:0.2rem;} .group-con .header .pictrue{width:1.4rem;height:1.4rem;} .group-con .header .pictrue img{width:100%;height:100%;border-radius:0.06rem;} .group-con .header .text{width:5.25rem;font-size:0.3rem;color:#222;} .group-con .header .text .money{font-size:0.24rem;font-weight:bold;margin-top:0.15rem;} .group-con .header .text .money .num{font-size:0.32rem;} .group-con .header .text .money .team{padding:0.01rem 0.1rem;font-weight:normal;border-radius:0.5rem;font-size:0.2rem;vertical-align:0.04rem;margin-left:0.15rem;} .group-con .wrapper{background-color:#fff;margin-top:0.2rem;padding:0.02rem 0 0.35rem 0;} .group-con .wrapper .title{margin-top:0.3rem;} .group-con .wrapper .title .line{width:1.36rem;height:1px;background-color:#ddd;} .group-con .wrapper .title .name{margin:0 0.45rem;font-size:0.28rem;color:#282828;} .group-con .wrapper .title .name .time{margin:0 0.14rem;} .group-con .wrapper .title .name .timeTxt{color:#fc4141;} .group-con .wrapper .title .name .time .styleAll{background-color:#ffcfcb;text-align:center;border-radius:0.03rem;font-size:0.28rem;font-weight:bold;display: inline-block;vertical-align: middle;color:#fc4141;padding: 0.02rem 0.05rem;} .group-con .wrapper .tips{font-size:0.3rem;font-weight:bold;text-align:center;margin-top:0.3rem;color:#999;} .group-con .wrapper .list{padding:0 0.3rem;margin-top:0.45rem;} .group-con .wrapper .list.result{max-height:2.4rem;overflow:hidden;} .group-con .wrapper .list.result.on{max-height:20rem;} .group-con .wrapper .list .pictrue{width:0.94rem;height:0.94rem;margin:0 0 0.29rem 0.35rem;} .group-con .wrapper .list .pictrue img{width:100%;height:100%;border-radius:50%;border:0.02rem solid #e93323;} .group-con .wrapper .list .pictrue img.img-none{border:none;} .group-con .wrapper .lookAll{font-size:0.24rem;color:#282828;padding-top:0.1rem;} .group-con .wrapper .lookAll .iconfont{font-size:0.25rem;margin:0.02rem 0 0 0.1rem;} .group-con .wrapper .teamBnt{font-size:0.3rem;width:6.2rem;height:0.86rem;border-radius:0.5rem;text-align:center; line-height:0.86rem;color:#fff;margin:0.21rem auto 0 auto;} .group-con .wrapper .cancel,.group-con .wrapper .lookOrder{text-align:center;font-size:0.24rem;color:#282828; padding-top:0.3rem;} .group-con .wrapper .cancel .iconfont{font-size:0.35rem;color:#2c2c2c;vertical-align:-0.04rem;margin-right:0.09rem;} .group-con .wrapper .lookOrder .iconfont{font-size:0.25rem;color:#2c2c2c;margin-left:0.1rem;} .group-con .group-recommend{background-color:#fff;margin-top:0.25rem;} .group-con .group-recommend .title{padding-right:0.3rem;margin-left:0.3rem;height:0.85rem;border-bottom:1px solid #eee; font-size:0.28rem;color:#282828;} .group-con .group-recommend .title .more{color:#808080;} .group-con .group-recommend .title .more .iconfont{margin-left:0.13rem;font-size:0.28rem;} .group-con .group-recommend .list{margin-top:0.3rem;} .group-con .group-recommend .list .item{width:2.1rem;margin:0 0 0.25rem 0.3rem;} .group-con .group-recommend .list .item .pictrue{width:100%;height:2.1rem;position:relative;} .group-con .group-recommend .list .item .pictrue img{width:100%;height:100%;border-radius:0.1rem;} .group-con .group-recommend .list .item .pictrue .team{position:absolute;top:0.28rem;left:-0.05rem;min-width:1rem; height:0.36rem;line-height:0.36rem;text-align:center;border-radius:0 0.18rem 0.18rem 0;font-size:0.2rem;color:#fff; background-image:linear-gradient(to right,#fb5445 0%,#e93323 100%); background-image:-webkit-linear-gradient(to right,#fb5445 0%,#e93323 100%); background-image:-moz-linear-gradient(to right,#fb5445 0%,#e93323 100%);} .group-con .group-recommend .list .item .name{font-size:0.28rem;color:#333;margin-top:0.18rem;} .group-con .group-recommend .list .item .money{font-weight:bold;font-size:0.26rem;} /*商品评分*/ .evaluate-list .generalComment{height:0.94rem;padding:0 0.3rem;background-color:#fff;font-size:0.28rem; color:#808080;} .evaluate-list .generalComment .evaluate{margin-right:0.07rem;} .evaluate-list .nav{font-size:0.24rem;color:#282828;padding:0 0.3rem 0.15rem 0.3rem;background-color:#fff;border-bottom:1px solid #f5f5f5;} .evaluate-list .nav .item{font-size:0.24rem;color:#282828;border-radius:0.06rem;height:0.54rem;padding:0 0.2rem; background-color:#f4f4f4;line-height:0.54rem;margin:0 0.17rem 0.17rem 0;} .evaluate-list .nav .item.bg-color-red{color:#fff;} /*商品评价*/ .evaluate-con .score{background-color:#fff;border-top:1px solid #f5f5f5;font-size:0.28rem;color:#282828; padding:0.48rem 0.3rem 0.65rem 0.3rem;} .evaluate-con .score .item~.item{margin-top:0.25rem;} .evaluate-con .score .item .starsList{padding:0 0.35rem 0 0.4rem;} .evaluate-con .score .item .starsList .iconfont{font-size:0.4rem;color:#aaa;} .evaluate-con .score .item .starsList .iconfont~.iconfont{margin-left:0.2rem;} .evaluate-con .score .item .evaluate{color:#aaa;font-size:0.24rem;} .evaluate-con .score .textarea{width:6.9rem;background-color:#fafafa;border-radius:0.1rem;margin-top:0.48rem;} .evaluate-con .score .textarea textarea{font-size:0.28rem;padding:0.38rem 0.3rem 0 0.3rem;width:100%; height:1.6rem;} .evaluate-con .score .textarea textarea::placeholder{color:#bbb;} .evaluate-con .score .textarea .list{margin-top:0.25rem;padding-left:0.05rem;} .evaluate-con .score .textarea .list .pictrue{width:1.4rem;height:1.4rem;margin:0 0 0.35rem 0.25rem;position:relative; font-size:0.22rem;color:#bbb;} .evaluate-con .score .textarea .list .pictrue img{width:100%;height:100%;border-radius:0.03rem;} .evaluate-con .score .textarea .list .pictrue .icon-guanbi1{font-size:0.45rem;position:absolute;top:-0.2rem;right:-0.2rem;} .evaluate-con .score .textarea .list .pictrue .icon-icon25201{color:#bfbfbf;font-size:0.5rem;} .evaluate-con .score .evaluateBnt{font-size:0.3rem;color:#fff;width:6.9rem;height:0.86rem;border-radius:0.43rem; text-align:center;line-height:0.86rem;margin-top:0.45rem;} /*签到*/ .sign .header{width:100%;height:3.1rem;} .sign .header .headerCon{padding:0 0 0 0.3rem;height:2.34rem;} .sign .header .headerCon .left{width:5.3rem;font-size:0.32rem;color:#fff;font-weight:bold;} .sign .header .headerCon .left .integral span{font-size:0.24rem;margin-top:0.19rem;background-color:#ff9000; text-align:center;border-radius:0.06rem;font-weight:normal;padding:0.06rem 0.15rem;} .sign .header .headerCon .text{width:4.1rem;} .sign .header .headerCon .left .pictrue{width:0.86rem;height:0.86rem;border-radius:50%;border:0.04rem solid #ecddbc;} .sign .header .headerCon .left .pictrue img{width:100%;height:100%;border-radius:50%;} .sign .header .headerCon .right{width:1.42rem;height:0.66rem;background-color:#fff;border-radius:0.5rem 0 0 0.5rem; font-size:0.24rem;color:#ff9000;} .sign .header .headerCon .right .iconfont{font-size:0.33rem;padding:0 0.1rem 0 0.3rem;height: 0.35rem;line-height: 0.35rem;} .sign .wrapper{background-color:#fff;margin:-0.8rem 0.2rem 0 0.2rem;border-radius:0.15rem;padding-bottom:0.8rem; position:relative;} .sign .wrapper .list{padding:0 0.3rem;height:2.4rem;} .sign .wrapper .list .item{font-size:0.22rem;color:#8a8886;text-align:center;} .sign .wrapper .list .item .rewardTxt{width:0.74rem;height:0.32rem;background-color:#f4b409;border-radius:0.16rem; font-size:0.2rem;color:#a57d3f;line-height:0.32rem;} .sign .wrapper .list .item .num{font-size:0.3rem;color:#999;} .sign .wrapper .list .item .num.on{color:#ff9000;} .sign .wrapper .list .item .venus{background-image:url('../images/stars2.png');background-repeat:no-repeat; background-size:100% 100%;width:0.56rem;height:0.56rem;margin:0.1rem 0;} .sign .wrapper .list .item .venus.venusSelect{background-image:url('../images/stars1.png');} .sign .wrapper .list .item .venus.reward{background-image:url('../images/stars3.png');width:0.75rem;height:0.56rem;} .sign .wrapper .but{width:4rem;height:0.76rem;font-size:0.3rem;line-height:0.76rem;color:#fff;border-radius:0.5rem;text-align:center;margin:0 auto;} .sign .wrapper .but.on{background-color:#999!important;} .sign .wrapper .lock{background-image:url('../images/lock2.png');background-repeat:no-repeat;background-size:100% 100%;width:5.58rem;height:0.68rem;position:absolute;left:50%;transform: translateX(-50%);-webkit-transform: translateX(-50%);-ms-transform: translateX(-50%);-moz-transform: translateX(-50%);-o-transform: translateX(-50%);bottom:-0.41rem;z-index:9;} .sign .wrapper2{margin-top:0.15rem;padding:0.73rem 0 0 0;} .sign .wrapper2 .tip{font-size:0.3rem;color:#666;text-align:center;} .sign .wrapper2 .list2{margin:0.45rem 0 0.49rem 0;} .sign .wrapper2 .list2 .item{width:0.8rem;height:1.16rem;background-repeat:no-repeat;background-size:100% 100%;color:#fff; font-size:0.72rem;text-align:center;line-height:1.16rem;margin-right:0.19rem;background-image:url('../images/redBg.png');} .sign .wrapper2 .list2 .data{font-size:0.30rem;color:#232323;} .sign .wrapper2 .tip2{font-size:0.3rem;color:#999999;padding:0 0.55rem;text-align:center;line-height:1.5;} .sign .list3{margin:0.45rem 0.37rem 0 0.37rem;border-top:1px dashed #eee;} .sign .list3 .item{border-bottom:1px solid #eee;height:1.3rem;} .sign .list3 .item .name{color:#232323;font-size:0.3rem;width:4rem;} .sign .list3 .item .data{font-size:0.24rem;color:#bbbbbb;margin-top:0.09rem;} .sign .list3 .item .num{font-size:0.36rem;font-family: 'GuildfordProBook 5';} .sign .signTip{width:6.44rem;height:6.45rem;position:fixed;top:50%;left:50%;margin-left:-3.22rem;margin-top:-3.225rem;z-index:99;text-align:center;transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;opacity:0;transform: scale(0);-webkit-transform: scale(0);-ms-transform: scale(0);-moz-transform: scale(0);-o-transform: scale(0);} .sign .signTip .signTipLight{background-image:url('../images/light.png');background-repeat:no-repeat;background-size:100% 100%;width:100%;height:100%;} .sign .signTip.on{opacity:1;transform: scale(1);-webkit-transform: scale(1);-ms-transform: scale(1);-moz-transform: scale(1);-o-transform: scale(1);} .sign .signTip .signTipCon{background-image:url('../images/register.png');background-repeat:no-repeat;background-size:100% 100%;width:4.2rem;height:4.2rem;margin-top:-7rem;position:relative;} .sign .signTip .signTipCon .state{font-size:0.34rem;color:#fff;margin-top:1.5rem;} .sign .signTip .signTipCon .integral{font-size:0.3rem;color:rgba(255,255,255,0.6);margin-top:0.09rem;} .sign .signTip .signTipCon .signTipBnt{font-size:0.3rem;color:#eb4331;width:2.6rem;height:0.76rem;background-color:#f8d168;border-radius:0.38rem;line-height:0.76rem;margin:0.48rem auto 0 auto;} /*签到记录、账单明细列表*/ .sign-record .list .item .data{height:0.8rem;line-height:0.8rem;padding:0 0.3rem;font-size:0.24rem;color:#666;} .sign-record .list .item .listn{background-color:#fff;font-size:0.24rem;color:#999;} .sign-record .list .item .listn .itemn{height:1.2rem;border-bottom:1px solid #eee;padding-right:0.3rem;margin-left:0.3rem;} .sign-record .list .item .listn .itemn .name{width:3.9rem;font-size:0.28rem;color:#282828;margin-bottom:0.06rem;} .sign-record .list .item .listn .itemn .num{font-size:0.36rem;font-family: 'GuildfordProBook 5';color:#16ac57;} /*申请退货*/ .apply-return .list{background-color:#fff;margin-top:0.18rem;} .apply-return .list .item{margin-left:0.3rem;padding-right:0.3rem;min-height:0.9rem;border-bottom:1px solid #eee;font-size:0.3rem;color:#333;} .apply-return .list .item .num{color:#282828;width:4.27rem;text-align:right;position:relative;} .apply-return .list .item .num select{width:100%;white-space:pre-wrap;direction: rtl;padding-right:0.42rem;z-index:5;} .apply-return .list .item .num .iconfont{color:#666;font-size:0.3rem;position:absolute;right:0;top:50%;transform:translateY(-50%);-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-moz-transform:translateY(-50%);-o-transform:translateY(-50%);} .apply-return .list .item.textarea{padding:0.3rem 0.3rem 0.3rem 0;} .apply-return .list .item textarea{height:1rem;font-size:0.3rem;} .apply-return .list .item textarea::placeholder{color:#bbb;} .apply-return .list .item .title{height:0.95rem;width:100%;} .apply-return .list .item .title .tip{font-size:0.3rem;color:#bbb;} .apply-return .list .item .upload{padding-bottom:0.36rem;} .apply-return .list .item .upload .pictrue{margin:0.22rem 0.23rem 0 0;width:1.56rem;height:1.56rem;position:relative;font-size:0.24rem;color:#bbb;border: 1px solid #bbb;} .apply-return .list .item .upload .pictrue:nth-of-type(4n){margin-right:0;} .apply-return .list .item .upload .pictrue img{width:100%;height:100%;border-radius:0.03rem;} .apply-return .list .item .upload .pictrue .icon-guanbi1{position:absolute;font-size:0.45rem;top:-0.1rem;right:-0.1rem; width: 0.45rem;height: 0.45rem;line-height: 0.45rem;} .apply-return .list .item .upload .pictrue .icon-icon25201{color:#bfbfbf;font-size:0.5rem;width: 0.5rem;height: 0.6rem; line-height: 0.6rem;} .apply-return .list .item .upload .pictrue:nth-last-child(1){border:1px solid #ddd;} .apply-return .returnBnt{font-size:0.32rem;color:#fff;width:6.9rem;height:0.86rem;border-radius:0.5rem;text-align:center;line-height:0.86rem;margin:0.43rem auto;} /*退货列表*/ .return-list .goodWrapper{background-color:#fff;margin-bottom:0.13rem;position:relative;} .return-list .goodWrapper .orderNum{padding:0 0.3rem;border-bottom:1px solid #eee;height:0.87rem;line-height:0.87rem;font-size:0.3rem;color:#282828;} .return-list .goodWrapper .item{border-bottom:0;} .return-list .goodWrapper .totalSum{padding:0 0.3rem 0.32rem 0.3rem;text-align:right;font-size:0.26rem;color:#282828;} .return-list .goodWrapper .totalSum .price{font-size:0.28rem;font-weight:bold;} .return-list .goodWrapper .iconfont{position:absolute;font-size:1.09rem;top:0.07rem;right:0.3rem;color:#ccc;width: 1.09rem; height: 1.09rem;line-height: 1.09rem;} .return-list .goodWrapper .iconfont.powder{color:#f8c1bd;} /*收藏商品*/ .collectionGoods{background-color:#fff;border-top:1px solid #eee;} .collectionGoods .item{margin-left:0.3rem;padding-right:0.3rem;border-bottom:1px solid #eee;height:1.8rem;} .collectionGoods .item .pictrue{width:1.3rem;height:1.3rem;} .collectionGoods .item .pictrue img{width:100%;height:100%;border-radius:0.06rem;} .collectionGoods .item .text{width:5.35rem;height:1.3rem;font-size:0.28rem;color:#282828;} .collectionGoods .item .text .infor{width:100%;} .collectionGoods .item .text .money{font-size:0.26rem;} .collectionGoods .item .text .delete{font-size:0.26rem;color:#282828;width:1.14rem;height:0.46rem;border:1px solid #bbb;border-radius:0.04rem;text-align:center;line-height:0.46rem;} /*搜索商品*/ .searchGood .search{padding-left:0.3rem;} .searchGood .search{margin-top:0.2rem;} .searchGood .search .input{width:5.98rem;background-color:#f7f7f7;border-radius:0.33rem;padding:0 0.35rem;height:0.66rem;} .searchGood .search .input input{width:4.72rem;font-size:0.28rem;} .searchGood .search .input input::placeholder{color:#bbb;} .searchGood .search .input .iconfont{color:#000;font-size:0.35rem;} .searchGood .search .bnt{width:1.2rem;text-align:center;height:0.66rem;line-height:0.66rem;font-size:0.3rem;color:#282828;} .searchGood .title{font-size:0.28rem;color:#999;margin:0.5rem 0.3rem 0.25rem 0.3rem;} .searchGood .list{padding-left:0.1rem;} .searchGood .list .item{font-size:0.26rem;color:#454545;padding:0 0.21rem;height:0.6rem;border-radius:0.03rem;line-height:0.6rem;border:1px solid #aaa;margin:0 0 0.2rem 0.2rem;} .searchGood .line{border-bottom:1px solid #eee;margin:0.2rem 0.3rem 0 0.3rem;} /*银行卡提现*/ .cash-withdrawal .nav{height:1.3rem;box-shadow:0 0.1rem 0.1rem #f8f8f8;-webkit-box-shadow:0 0.1rem 0.1rem #f8f8f8; -moz-box-shadow: 0 0.1rem 0.1rem #f8f8f8;-o-box-shadow:0 0.1rem 0.1rem #f8f8f8;} .cash-withdrawal .nav .item{font-size:0.26rem;flex:1;-webkit-flex:1;-o-flex:1;-ms-flex:1;text-align:center;} .cash-withdrawal .nav .item~.item{border-left:1px solid #f0f0f0;} .cash-withdrawal .nav .item .iconfont{width:0.4rem;height:0.4rem;border-radius:50%;border:0.02rem solid #e93323;text-align:center;line-height:0.37rem;margin:0 auto 0.06rem auto;font-size:0.22rem;} .cash-withdrawal .nav .item .iconfont.on{background-color:#e93323;color:#fff;border-color:#e93323;} .cash-withdrawal .nav .item .line{width:0.02rem;height:0.2rem;margin:0 auto;transition:height 0.3s;-webkit-transition:height 0.3s;-moz-transition:height 0.3s;-o-transition:height 0.3s;} .cash-withdrawal .nav .item .line.on{height:0.39rem;} .cash-withdrawal .wrapper .list{padding:0 0.3rem;} .cash-withdrawal .wrapper .list .item{border-bottom:1px solid #eee;height:1.07rem;font-size:0.3rem;color:#333;} .cash-withdrawal .wrapper .list .item .name{width:1.3rem;} .cash-withdrawal .wrapper .list .item .input{width:5.05rem;} .cash-withdrawal .wrapper .list .item .input input::placeholder{color:#bbb;} .cash-withdrawal .wrapper .list .tip{font-size:0.26rem;color:#999;margin-top:0.25rem;} .cash-withdrawal .wrapper .list .bnt{font-size:0.32rem;color:#fff;width:6.9rem;height:0.9rem;text-align:center;border-radius:0.5rem;line-height:0.9rem;margin:0.64rem auto;} .cash-withdrawal .wrapper .list .tip2{font-size:0.26rem;color:#999;text-align:center;margin:0.44rem 0 0.2rem 0;} .cash-withdrawal .wrapper .list .value{height:1.35rem;line-height:1.35rem;border-bottom:1px solid #eee;width:6.9rem;margin:0 auto;} .cash-withdrawal .wrapper .list .value input{font-size:0.8rem;color:#282828;height:1.35rem;text-align:center;width: 100%;} .cash-withdrawal .wrapper .list .value input::placeholder{color:#bbb;} /*提现审核*/ .cash-audit{width:7.1rem;background-color:#fff;border-radius:0.06rem;margin:0.25rem auto 0 auto;padding:0.53rem 0 0.58rem 0;left: 50%;margin-left: -3.55rem;} .cash-audit .pictrue{width:2.14rem;height:1.79rem;margin:0 auto;} .cash-audit .pictrue img{width:100%;height:100%;} .cash-audit .tip{font-size:0.32rem;color:#282828;margin-top:0.4rem;text-align:center;padding:0 0.4rem;} .cash-audit .time{font-size:0.26rem;color:#999;text-align:center;margin-top:0.15rem;} .cash-audit .bnt{font-size:0.32rem;color:#fff;width:5rem;height:0.86rem;border-radius:0.43rem;text-align:center;line-height:0.86rem;margin:0.5rem auto 0 auto;} /*推广人订单*/ .promoter-order .list .item .title{height:1.33rem;padding:0 0.3rem;font-size:0.26rem;color:#999;} .promoter-order .list .item .title .data{font-size:0.28rem;color:#282828;margin-bottom:0.05rem;} .promoter-order .list .item .listn .itenm{background-color:#fff;} .promoter-order .list .item .listn .itenm~.itenm{margin-top:0.12rem;} .promoter-order .list .item .listn .itenm .top{margin-left:0.3rem;padding-right:0.3rem;border-bottom:1px solid #eee;height:1rem;} .promoter-order .list .item .listn .itenm .top .pictxt{width:3.2rem;} .promoter-order .list .item .listn .itenm .top .pictxt .text{width:2.3rem;font-size:0.3rem;color:#282828;} .promoter-order .list .item .listn .itenm .top .pictxt .pictrue{width:0.66rem;height:0.66rem;} .promoter-order .list .item .listn .itenm .top .pictxt .pictrue img{width:100%;height:100%;border-radius:50%;border:0.03rem solid #fff;box-shadow:0 0 0.1rem #aaa;-webkit-box-shadow:0 0 0.1rem #aaa;-moz-box-shadow:0 0 0.1rem #aaa;-o-box-shadow:0 0 0.1rem #aaa;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;} .promoter-order .list .item .listn .itenm .top .money{font-size:0.28rem;} .promoter-order .list .item .listn .itenm .bottom{padding:0.2rem 0.3rem;font-size:0.28rem;color:#666;line-height:1.6;} .promoter-order .list .item .listn .itenm .bottom .name{color:#999;} /*推广人列表*/ .promoter-list .header{padding-bottom: 0.12rem;} .promoter-list .nav{background-color:#fff;height:0.86rem;line-height:0.86rem;font-size:0.28rem;color:#282828;border-bottom:1px solid #eee;} .promoter-list .nav .item{height:100%;} .promoter-list .nav .item.on{color:#e93323;border-bottom:0.05rem solid #e93323;} .promoter-list .search{width:100%;background-color:#fff;height:0.86rem;padding:0 0.3rem;} .promoter-list .search .input{width:6.3rem;height:0.6rem;border-radius:0.5rem;background-color:#f5f5f5;text-align:center;position:relative;} .promoter-list .search .input input{height:100%;font-size:0.26rem;width:6.2rem;text-align:center;} .promoter-list .search .input input::placeholder{color:#bbb;} .promoter-list .search .input .iconfont{position:absolute;right:0.28rem;color:#999;font-size:0.28rem;top:50%;transform:translateY(-50%);-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);-moz-transform:translateY(-50%);-o-transform:translateY(-50%);} .promoter-list .search .iconfont{font-size:0.4rem;color:#515151;} .promoter-list .list .sortNav{background-color:#fff;height:0.76rem;border-bottom:1px solid #eee;color:#333;font-size:0.28rem;} .promoter-list .list .sortNav.on{position: fixed;top: 0;left: 0;width: 100%;z-index: 5;} .promoter-list .list .sortNav .sortItem{text-align:center;flex:1;-webkit-flex:1;-o-flex:1;-ms-flex:1;} .promoter-list .list .sortNav .sortItem img{width:0.24rem;height:0.24rem;margin-left:0.06rem;vertical-align:-0.03rem;} .promoter-list .list .sortList{margin-top:0.76rem;} .promoter-list .list .item{background-color:#fff;border-bottom:1px solid #eee;height:1.52rem;padding:0 0.3rem 0 0.2rem;font-size:0.24rem;color:#666;} .promoter-list .list .item .picTxt{width:4.4rem;} .promoter-list .list .item .picTxt .pictrue{width:1.06rem;height:1.06rem;border-radius:50%;} .promoter-list .list .item .picTxt .pictrue img{width:100%;height:100%;border-radius:50%;border:0.03rem solid #fff;box-shadow:0 0 0.07rem #aaa;-webkit-box-shadow:0 0 0.07rem #aaa;-moz-box-shadow:0 0 0.07rem #aaa;-o-box-shadow:0 0 0.07rem #aaa; -webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;} .promoter-list .list .item .picTxt .text{width:3.04rem;font-size:0.24rem;color:#666;} .promoter-list .list .item .picTxt .text .name{font-size:0.28rem;color:#333;margin-bottom:0.13rem;} .promoter-list .list .item .right{width:2.4rem;text-align:right;font-size:0.22rem;color:#333;} /*我的推广*/ .my-promotion .header{background-image:url("../images/promotionBg.png");background-repeat:no-repeat;background-size:100% 100%;width:100%;height:3.75rem;} .my-promotion .header .name{font-size:0.3rem;color:#fff;padding-top:0.57rem;position:relative;} .my-promotion .header .name .record{font-size:0.26rem;color:rgba(255, 255, 255, 0.8);position:absolute;right:0.2rem;} .my-promotion .header .name .record .iconfont{font-size:0.25rem;margin-left:0.1rem;} .my-promotion .header .num{text-align:center;color:#fff;margin-top:0.25rem;font-size:0.9rem;font-family: 'GuildfordProBook 5';} .my-promotion .header .profit{padding:0 0.2rem;margin-top:0.33rem;font-size:0.24rem;color:rgba(255, 255, 255, 0.8);} .my-promotion .header .profit .item{min-width:2rem;text-align:center;} .my-promotion .header .profit .item .money{font-size:0.34rem;color:#fff;} .my-promotion .bnt{font-size:0.28rem;color:#fff;width:2.58rem;height:0.68rem;border-radius:0.5rem;text-align:center;line-height:0.68rem;margin:-0.32rem auto 0 auto;} .my-promotion .list{padding:0 0.2rem;margin-top:0.1rem;} .my-promotion .list .item{width:3.45rem;height:2.4rem;border-radius:0.2rem;background-color:#fff;margin-top:0.2rem;font-size:0.3rem;color:#666;} .my-promotion .list .item .iconfont{font-size:0.7rem;background-image:linear-gradient(to right,#fc4d3d 0%,#e93323 100%); background-image:-webkit-linear-gradient(to right,#fc4d3d 0%,#e93323 100%); background-image:-moz-linear-gradient(to right,#fc4d3d 0%,#e93323 100%); -webkit-background-clip:text;-webkit-text-fill-color:transparent;margin-bottom:0.2rem;} /*我的账户*/ .my-account .wrapper{background-color:#fff;padding:0.32rem 0 0.34rem 0;margin-bottom:0.14rem;} .my-account .wrapper .header{width:6.9rem;height:3.3rem; background-image:linear-gradient(to right,#f33b2b 0%,#f36053 100%); background-image:-webkit-linear-gradient(to right,#f33b2b 0%,#f36053 100%); background-image:-moz-linear-gradient(to right,#f33b2b 0%,#f36053 100%); border-radius:0.16rem;margin:0 auto;color:rgba(255,255,255,0.6);font-size:0.24rem;} .my-account .wrapper .header .headerCon{background-image:url('../images/accountBg.png');background-repeat:no-repeat;background-size:100%;height:100%;width:100%;padding:0.36rem 0 0.29rem 0;} .my-account .wrapper .header .headerCon .account{padding:0 0.35rem;} .my-account .wrapper .header .headerCon .account .assets .money{font-size:0.72rem;color:#fff;font-family: 'GuildfordProBook 5';margin-top: 0.1rem;height: 0.75rem;line-height: 0.75rem;} .my-account .wrapper .header .headerCon .account .recharge{font-size:0.28rem;width:1.5rem;height:0.54rem;border-radius:0.27rem;background-color:#fff9f8;text-align:center;line-height:0.54rem;} .my-account .wrapper .header .headerCon .cumulative{margin-top:0.46rem;} .my-account .wrapper .header .headerCon .cumulative .item{flex:1;-webkit-flex:1;-o-flex:1;-ms-flex:1;padding-left:0.35rem;} .my-account .wrapper .header .headerCon .cumulative .item .money{font-size:0.48rem;font-family: 'GuildfordProBook 5';color:#fff;margin-top:0.06rem;} .my-account .wrapper .nav{height:1.55rem;border-bottom:1px solid #f5f5f5;} .my-account .wrapper .nav .item{flex:1;-webkit-flex:1;-o-flex:1;-ms-flex:1;text-align:center;font-size:0.26rem;color:#999;} .my-account .wrapper .nav .item .pictrue{width:0.44rem;height:0.44rem;margin:0 auto;margin-bottom:0.2rem;} .my-account .wrapper .nav .item .pictrue img{width:100%;height:100%;} .my-account .wrapper .advert{padding:0 0.3rem;margin-top:0.3rem;} .my-account .wrapper .advert .item{background-color:#fff6d1;width:3.32rem;height:1.18rem;border-radius:0.1rem;padding:0 0.27rem 0 0.25rem;font-size:0.24rem;color:#e44609;} .my-account .wrapper .advert .item.on{background-color:#fff3f3;color:#e96868;} .my-account .wrapper .advert .item .pictrue{width:0.78rem;height:0.78rem;} .my-account .wrapper .advert .item .pictrue img{width:100%;height:100%;} .my-account .wrapper .advert .item .text .name{font-size:0.3rem;font-weight:bold;color:#f33c2b;margin-bottom:0.07rem;} .my-account .wrapper .advert .item.on .text .name{color:#f64051;} .my-account .wrapper .list{padding:0 0.3rem;} .my-account .wrapper .list .item{margin-top:0.44rem;} .my-account .wrapper .list .item .picTxt .iconfont{width:0.82rem;height:0.82rem;border-radius:50%;background-image:linear-gradient(to right,#ff9389 0%,#f9776b 100%); background-image:-webkit-linear-gradient(to right,#ff9389 0%,#f9776b 100%); background-image:-moz-linear-gradient(to right,#ff9389 0%,#f9776b 100%); text-align:center;line-height:0.82rem;color:#fff;font-size:0.4rem;} .my-account .wrapper .list .item .picTxt .iconfont.yellow{ background-image:linear-gradient(to right,#ffccaa 0%,#fea060 100%); background-image:-webkit-linear-gradient(to right,#ffccaa 0%,#fea060 100%); background-image:-moz-linear-gradient(to right,#ffccaa 0%,#fea060 100%);} .my-account .wrapper .list .item .picTxt .iconfont.green{ background-image:linear-gradient(to right,#a1d67c 0%,#9dd074 100%); background-image:-webkit-linear-gradient(to right,#a1d67c 0%,#9dd074 100%); background-image:-moz-linear-gradient(to right,#a1d67c 0%,#9dd074 100%);} .my-account .wrapper .list .item .picTxt{width:4.28rem;font-size:0.3rem;color:#282828;} .my-account .wrapper .list .item .picTxt .text{width:3.17rem;} .my-account .wrapper .list .item .picTxt .text .infor{font-size:0.24rem;color:#999;margin-top:0.05rem;} .my-account .wrapper .list .item .bnt{font-size:0.26rem;color:#282828;width:1.56rem;height:0.52rem;border:1px solid #ddd;border-radius:0.26rem;text-align:center;line-height:0.5rem;} .my-account .wrapper .list .item .bnt.end{font-size:0.26rem;color:#aaa;background-color:#f2f2f2; border-color:#f2f2f2;} /*账单明细*/ .bill-details .nav{background-color:#fff;height:0.9rem;width:100%;line-height:0.9rem;} .bill-details .nav .item{flex:1;-webkit-flex:1;-o-flex:1;-ms-flex:1;text-align:center;font-size:0.3rem;color:#282828;height:100%;} .bill-details .nav .item.on{color:#e93323;border-bottom:0.03rem solid #e93323;} /*限时抢购*/ .flash-sale .header{width:100%;height:2.4rem;} .flash-sale .header img{width:100%;height:100%;} .flash-sale .whiteFixed{position: fixed;top: 0;background-color: #fff;left: 0;width: 100%;z-index:5;} .flash-sale .timeLsit{width:100%;white-space:nowrap;overflow: hidden;height: 1.1rem;} .flash-sale .timeLsit .rush-time{overflow-y: hidden;overflow-x: auto;width: 100%;-webkit-overflow-scrolling: touch;height: 1.5rem;} .flash-sale .timeLsit .item{display:inline-block;font-size:0.22rem;color:#282828;width:2rem;text-align:center;padding:0.11rem 0;height:0.96rem;background-color:#efc58f;} .flash-sale .timeLsit .item~.item{border-left:1px solid #e3b06e;} .flash-sale .timeLsit .item .time{font-size:0.32rem;font-weight:bold;height:0.37rem;line-height:0.37rem;} .flash-sale .timeLsit .item.on{background-color:#e93323;color:#fff;position:relative;} .flash-sale .timeLsit .item.on::before{content:"";width: 0;height: 0;border-left: 0.08rem solid transparent;border-right: 0.08rem solid transparent;border-top:0.1rem solid #e93323;position:absolute;bottom:-0.09rem;z-index:99;left:50%;transform:translateX(-50%);-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);-moz-transform:translateX(-50%);-o-transform:translateX(-50%);} .flash-sale .countDown{height:0.92rem;border-bottom:1px solid #f0f0f0;font-size:0.28rem;color:#282828;} .flash-sale .countDown .timeTxt{color:#fc4141;} .flash-sale .countDown .time{font-size:0.28rem;color:#282828} .flash-sale .countDown .styleAll{font-size:0.28rem;font-weight:bold;background-color:#ffcfcb;padding:0.04rem 0.07rem;border-radius:0.03rem;color:#fc4141;} .flash-sale .countDown .text{} .flash-sale .list.on{margin-top:2.02rem;} .flash-sale .list .item{padding:0 0.3rem;border-bottom:1px solid #f0f0f0;height:2.27rem;position:relative;} .flash-sale .list .item .pictrue{width:1.66rem;height:1.66rem;} .flash-sale .list .item .pictrue img{width:100%;height:100%;border-radius:0.06rem;} .flash-sale .list .item .text{width:5rem;font-size:0.3rem;color:#333;height:1.66rem;} .flash-sale .list .item .text .money{font-size:0.24rem;color:#282828;margin-top:-0.13rem;} .flash-sale .list .item .text .money .num{font-size:0.34rem;font-weight:bold;} .flash-sale .list .item .text .progress {overflow: hidden;background-color:#fff;width:2.6rem;border-radius:0.2rem;height:0.34rem;position:relative;} .flash-sale .list .item .text .progress .bg-red{width: 0;height: 100%;transition: width 0.6s ease;-webkit-transition: width 0.6s ease;-moz-transition: width 0.6s ease;-o-transition: width 0.6s ease;background-color: #ffe3e1;} .flash-sale .list .item .text .progress .piece{position:absolute;left:50%;transform:translate(-50%,-50%);-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%);top:49%;font-size:0.22rem;} .flash-sale .list .item .grab{font-size:0.28rem;color:#fff;width:1.4rem;height:0.54rem;border-radius:0.04rem;text-align:center;line-height:0.54rem;position:absolute;right:0.3rem;bottom:0.3rem;} /*抢购详情页*/ .product-con .nav{background-image:url('../images/rushBuy.jpg');background-repeat:no-repeat;background-size:100% 100%;width:100%;height:1rem;padding:0 0.3rem;} .product-con .nav .money{font-size:0.28rem;color:#fff;} .product-con .nav .money .num{font-size:0.48rem;} .product-con .nav .money .y-money{font-size:0.26rem;margin-left:0.1rem;text-decoration:line-through;} .product-con .nav .times{font-size:0.2rem;color:#fff;text-align:center;margin-bottom: 0.04rem;} .product-con .nav .times .time{margin-top:0.07rem;} .product-con .nav .times .time .styleAll{padding:0 0.07rem;font-size:0.22rem;color:#ff3d3d;background-color:#fff;border-radius:0.02rem;} .product-con .nav .iconfont{color:#fff;font-size:0.3rem;margin-left:0.2rem;} .product-con .wrapperRush{padding:0.32rem 0.3rem;background-color:#fff;} .product-con .wrapperRush .introduce .infor{width:5.7rem;font-size: 0.32rem;font-weight: bold;} .product-con .wrapperRush .introduce .iconfont{font-size:0.37rem;color:#515151;} .product-con .wrapperRush .label{margin:0.18rem 0 0 0;font-size:0.24rem;color:#82848f;} .product-con .wrapperRush .label .stock{width:2.55rem;margin-right:0.28rem;} .product-con .footerRush{position:fixed;bottom:0;width:100%;height:1rem;background-color:#fff;font-size:0.18rem;color:#666;z-index:99;} .product-con .footerRush .customerSer{width:14%;font-size:0.2rem;color:#666;} .product-con .footerRush .bnt{width:86%;text-align:center;line-height:1rem;height:100%;color:#fff;font-size:0.3rem;} /*新闻*/ .newsList .swiperNews{width:6.9rem;height:3.67rem;margin:0.3rem auto 0 auto;} .newsList .swiperNews .swiper-slide{width:100%;height:3.3rem;} .newsList .swiperNews .slide-image{width:100%;height:100%;border-radius:0.06rem;} .newsList .swiperNews .swiper-pagination-bullet{width:0.12rem;height:0.12rem;border-radius:0;transform: rotate(-45deg);-webkit-transform: rotate(-45deg);-ms-transform: rotate(-45deg);-moz-transform: rotate(-45deg);-o-transform: rotate(-45deg);transform-origin: 0 100%;-webkit-transform-origin:0 100%;-ms-transform-origin:0 100%;-moz-transform-origin:0 100%;-o-transform-origin:0 100%;background-color:#d1d1d1;opacity:1;margin:0 0.1rem;} .newsList .swiperNews .swiper-pagination-bullet-active{background-color:#666666;border:0;} .newsList .swiperNews .swiper-pagination{bottom:-0.07rem;width:100%;} .newsList .nav{padding:0 0.3rem;width:100%;height:1.05rem;overflow:hidden;background-color:#fff;} .newsList .nav.on{position:fixed;top:0;left:0;width:100%;z-index:5;} .newsList .nav .scrollNav{white-space:nowrap;overflow-y:hidden;overflow-x:auto;-webkit-overflow-scrolling:touch;width:100%;} .newsList .nav .item{display:inline-block;font-size:0.32rem;color:#999;margin-top:0.4rem;} .newsList .nav .item.on{color:#282828;} .newsList .nav .item~.item{margin-left:0.46rem;} .newsList .nav .item .line{width:0.24rem;height:0.04rem;border-radius:0.02rem;margin:0.1rem auto 0 auto;} .newsList .list.on{margin-top:1.05rem;} .newsList .list .item{margin:0 0.3rem;border-bottom:1px solid #f0f0f0;padding:0.35rem 0;} .newsList .list .item .pictrue{width:2.5rem;height:1.56rem;} .newsList .list .item .pictrue img{width:100%;height:100%;border-radius:0.06rem;} .newsList .list .item .text{width:4.2rem;height:1.56rem;font-size:0.24rem;color:#999;} .newsList .list .item .text .name{font-size:0.3rem;color:#282828;} .newsList .list .item .picList .pictrue{width:3.35rem;height:2.1rem;margin-top:0.3rem;} .newsList .list .item .picList.on .pictrue{width:2.17rem;height:1.36rem;} .newsList .list .item .picList .pictrue img{width:100%;height:100%;border-radius:0.06rem;} .newsList .list .item .time{text-align:right;font-size:0.24rem;color:#999;margin-top:0.22rem;} .newsList .van-tabs__wrap{top:0!important;} /*新闻详情*/ .newsDetail .title{padding:0 0.3rem;font-size:0.34rem;color:#282828;font-weight:bold;margin:0.45rem 0 0.23rem 0; line-height:1.5;} .newsDetail .list{margin:0 0.3rem;border-bottom:1px solid #eee;padding-bottom:0.25rem;} .newsDetail .list .label{font-size:0.24rem;height:0.38rem;border-radius:0.03rem;text-align:center; line-height:0.36rem;padding:0 0.1rem;max-width:1.9rem;width: unset;} .newsDetail .list .item{margin-left:0.27rem;font-size:0.24rem;color:#999;} .newsDetail .list .item .iconfont{font-size:0.28rem;margin-right:0.1rem;} .newsDetail .list .item .iconfont.icon-shenhezhong{font-size:0.26rem;} .newsDetail .conter{padding:0 0.3rem;font-size:0.3rem;color:#333;line-height:1.8;padding-top:0.35rem;} .newsDetail .conter img{width:100%;display:block;} /*佣金明细*/ .commission-details .promoterHeader .headerCon .money{font-size:0.36rem;} .commission-details .promoterHeader .headerCon .money .num{font-family: 'GuildfordProBook 5';} /*立即注册*/ .register{background-image: linear-gradient(to bottom,#eb5447 0%,#ff8e3b 100%); background-image: -webkit-linear-gradient(to bottom, #eb5447 0%,#ff8e3b 100%); background-image: -moz-linear-gradient(to bottom,#eb5447 0%,#ff8e3b 100%);width:100%;height:100vh;} .register .shading{background-image:url("../images/registerw.png");background-repeat:no-repeat;background-size:100% 100%;width:100%;height:2.86rem;padding-top:0.7rem;} .register .shading .pictrue{width:1.72rem;height:1.72rem;border-radius:50%;background-color:rgba(255,255,255,0.8);margin:0 auto;} .register .shading .pictrue img{width:1.64rem;height:1.64rem;border-radius:50%;display:block;} .register .whiteBg{width:6.2rem;border-radius:0.16rem;background-color:#fff;margin:0.3rem auto 0 auto;padding:0.45rem 0.3rem 0 0.3rem;} .register .whiteBg .title{font-size:0.36rem;color:#282828;text-align:center;font-weight: bold;} .register .whiteBg .title .item~.item{margin-left:0.85rem;} .register .whiteBg .title .item{color:#999999;border-bottom:0.05rem solid #fff;padding-bottom:0.1rem;} .register .whiteBg .title .item.on{color:#282828;border-bottom-color:#f35749;} .register .whiteBg .list .item{border-bottom:1px solid #ededed;padding:0.47rem 0 0.13rem 0;position:relative;} .register .whiteBg .list .item .name{font-size:0.26rem;color:#2d3342;margin-bottom:0.27rem;text-align: left;} .register .whiteBg .list .item .icon{font-size:0.35rem;margin-right:0.32rem;} .register .whiteBg .list .item input{font-size:0.33rem;width:4.9rem;} .register .whiteBg .list .item input::placeholder{color:#cccccc;} .register .whiteBg .list .item .codeIput{width:2.5rem;} .register .whiteBg .list .item .code{position:absolute;width:1.5rem;height:0.5rem;background-color:#f35446; border-radius:0.3rem;color:#fff;line-height:0.5rem;text-align:center;bottom:0.17rem;right:0;font-size:0.25rem;} .register .whiteBg .list .item .code.on{background-color:#bbbbbb;} .register .whiteBg .list .forgetPwd{text-align:right;font-size:0.28rem;color:#cccccc;margin-top:0.2rem;} .register .whiteBg .list .forgetPwd .iconfont{font-size:0.3rem;margin-right:0.1rem;vertical-align:middle;} .register .whiteBg .logon{font-size:0.34rem;color:#fff;font-weight:bold;height:0.86rem;border-radius:0.43rem;background: linear-gradient(to right,#f35447 0%,#ff8e3c 100%); background: -webkit-linear-gradient(to right, #f35447 0%,#ff8e3c 100%); background: -moz-linear-gradient(to right,#f35447 0%,#ff8e3c 100%);text-align:center;line-height:0.86rem;margin-top:0.47rem;} .register .whiteBg .tip{height:1.1rem;text-align:center;line-height:1.05rem;font-size:0.3rem;color:#cccccc;} .register .bottom{background-image:url("../images/registerB.png");background-repeat:no-repeat;background-size:100% 100%;width:6.2rem;height:0.36rem;margin:0 auto;} /*产品分类*/ .productSort .header{width:100%;height:0.96rem;background-color:#fff;position:fixed;left:0;right:0;top:0;z-index:9;border-bottom:1px solid #f5f5f5;} .productSort .header .input{width:7rem;height:0.6rem;background-color:#f5f5f5;border-radius:0.5rem;padding:0 0.25rem;} .productSort .header .input .iconfont{font-size:0.35rem;color:#555;} .productSort .header .input input{font-size:0.26rem;height:100%;width:5.97rem;} .productSort .header .input input::placeholder{color:#999;} .productSort .aside{position:fixed;width:1.8rem;left:0;top:0.96rem;bottom:1rem;background-color:#f7f7f7;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling: touch;overflow-scrolling: touch;} .productSort .aside .item{height:0.8rem;width:100%;font-size:0.26rem;color:#424242;} .productSort .aside .item.on{background-color:#fff;border-left:0.04rem solid #fc4141;width:100%;text-align:center;color:#fc4141;font-weight:bold;} .productSort .conter{margin-left:1.8rem;padding: 0 0.14rem;margin-top:0.96rem;} .productSort .conter .listw{padding-top:0.2rem;} .productSort .conter .listw .title{height:0.9rem;} .productSort .conter .listw .title .line{width:1rem;height:0.02rem;background-color:#999;} .productSort .conter .listw .title .name{font-size:0.28rem;color:#333;margin:0 0.3rem;font-weight:bold;} .productSort .conter .list{flex-wrap:wrap;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;} .productSort .conter .list .item{width:1.77rem;margin-top:0.26rem;} .productSort .conter .list .item .picture{width:1.2rem;height:1.2rem;border-radius:50%;} .productSort .conter .list .item .picture img{width:100%;height:100%;border-radius:50%;} .productSort .conter .list .item .name{font-size:0.24rem;color:#333;height:0.56rem;line-height:0.56rem;width:1.2rem;text-align:center;} /*返回主页按钮*/ .home{position: fixed ;top:7.8rem;color: white;text-align: center;z-index:33;right:0.1rem;} .home .homeCon{overflow: hidden;width:0.86rem;border-radius:0.5rem;transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;opacity:0;transform: scale(0);-webkit-transform: scale(0);-ms-transform: scale(0);-moz-transform: scale(0);-o-transform: scale(0);height:0;color:#e93323;} .home .homeCon.on{opacity:1;transform: scale(1);-webkit-transform: scale(1);-ms-transform: scale(1);-moz-transform: scale(1);-o-transform: scale(1);height:3rem;padding: 0.34rem 0;margin-bottom: 0.2rem;} .home .homeCon .iconfont{font-size:0.48rem;color:#fff;display: inline-block;height: 0.9rem;margin: 0 auto;} .home .pictrue{width:0.86rem;height:0.86rem;border-radius:50%;} .home .pictrue .image{width:100%;height:100%;border-radius:50%;} /*商户管理公共样式*/ .pos-order-goods{padding:0 0.3rem;background-color: #fff;} .pos-order-goods .goods{height:1.85rem;} .pos-order-goods .goods~.goods{border-top:1px dashed #e5e5e5;} .pos-order-goods .goods .picTxt{width:5.15rem;} .pos-order-goods .goods .picTxt .pictrue{width:1.3rem;height:1.3rem;} .pos-order-goods .goods .picTxt .pictrue img{width:100%;height:100%;border-radius:0.06rem;} .pos-order-goods .goods .picTxt .text{width:3.65rem;height:1.3rem;} .pos-order-goods .goods .picTxt .text .info{font-size:0.28rem;color:#282828;} .pos-order-goods .goods .picTxt .text .attr{font-size:0.2rem;color:#999;} .pos-order-goods .goods .money{width:1.64rem;text-align:right;font-size:0.28rem;} .pos-order-goods .goods .money .x-money{color:#282828;} .pos-order-goods .goods .money .num{color:#ff9600;margin:0.05rem 0;} .pos-order-goods .goods .money .y-money{color:#999;text-decoration:line-through;} .public-total{font-size:0.28rem;color:#282828;border-top:1px solid #eee;height:0.92rem;line-height:0.92rem;text-align:right;padding:0 0.3rem;background-color: #fff;} .public-total .money{color:#ff4c3c;} .priceChange{position:fixed;width:5.8rem;height:6.7rem;background-color:#fff;border-radius:0.1rem;top:50%;left:50%;margin-left:-2.9rem;margin-top:-3.35rem;z-index:99;transition:all 0.3s ease-in-out 0s;-webkit-transition:all 0.3s ease-in-out 0s;-o-transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-webkit-transform:scale(0);-o-transform:scale(0);-moz-transform:scale(0);-ms-transform:scale(0); transform: scale(0);opacity:0;} .priceChange.on{opacity:1;transform: scale(1);-webkit-transform:scale(1);-o-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);} .priceChange .priceTitle{background:url("../images/pricetitle.jpg") no-repeat;background-size:100% 100%;width:100%;height:1.6rem;border-radius:0.1rem 0.1rem 0 0;text-align:center;font-size:0.4rem;color:#fff;line-height:1.6rem;position:relative;} .priceChange .priceTitle .iconfont{position:absolute;font-size:0.4rem;right:0.26rem;top:0.23rem;width:0.4rem;height:0.4rem;line-height:0.4rem;} .priceChange .listChange{padding:0 0.4rem;} .priceChange .listChange .item{height:1.03rem;border-bottom:1px solid #e3e3e3;font-size:0.32rem;color:#333;} .priceChange .listChange .item .money{color:#666;width:3rem;text-align:right;} .priceChange .listChange .item .money .iconfont{font-size:0.32rem;margin-left:0.2rem;} .priceChange .listChange .item .money input{width:100%;height:100%;text-align:right;color:#ccc;} .priceChange .listChange .item .money input.on{color:#666;} .priceChange .modify{font-size:0.32rem;color:#fff;width:4.9rem;height:0.9rem;text-align:center;line-height:0.9rem;border-radius:0.45rem;background-color:#2291f8;margin:0.53rem auto 0 auto;} .priceChange .modify1{font-size:0.32rem;color:#312b2b;width:4.9rem;height:0.9rem;text-align:center;line-height:0.9rem;border-radius:0.45rem;background-color:#eee;margin:0.3rem auto 0 auto;} .public-wrapper .title{font-size:0.3rem;color:#282828;padding:0 0.3rem;margin-bottom:0.2rem;} .public-wrapper .title .iconfont{color:#2291f8;font-size:0.4rem;margin-right:0.13rem;vertical-align:middle;} .public-wrapper{margin:0.18rem auto 0 auto;width:6.9rem;background-color:#fff;border-radius:0.1rem;padding-top:0.25rem;} .public-wrapper .nav{padding:0 0.3rem;height:0.7rem;line-height:0.7rem;font-size:0.24rem;color:#999;} .public-wrapper .data{width:2.1rem;text-align:left;} .public-wrapper .browse{width:1.92rem;text-align:right;} .public-wrapper .turnover{width:2.27rem;text-align:right;} .public-wrapper .conter{padding:0 0.3rem;} .public-wrapper .conter .item{border-bottom:1px solid #f7f7f7;height:0.7rem;font-size:0.24rem;} .public-wrapper .conter .item .turnover{color:#d84242;} /*商户管理订单列表*/ .pos-order-list .nav{width:100%;height:0.96rem;background-color:#fff;font-size:0.3rem;color:#282828;position:fixed;top:0;left:0;} .pos-order-list .nav .item.on{color:#2291f8;} .pos-order-list .list{margin-top:1.2rem;} .pos-order-list .list .item{background-color:#fff;width:100%;} .pos-order-list .list .item~.item{margin-top:0.24rem;} .pos-order-list .list .item .order-num{height:1.24rem;border-bottom:1px solid #eee;font-size:0.3rem;font-weight:bold;color:#282828;padding:0 0.3rem;} .pos-order-list .list .item .order-num .time{font-size:0.26rem;font-weight:normal;color:#999;margin-top: -0.4rem;} .pos-order-list .list .item .operation{padding:0.2rem 0.3rem;margin-top: 0.03rem;} .pos-order-list .list .item .operation .more{position:relative;} .pos-order-list .list .item .operation .icon-gengduo{font-size:0.5rem;color:#aaa;} .pos-order-list .list .item .operation .order .arrow{width: 0;height: 0;border-left: 0.11rem solid transparent;border-right: 0.11rem solid transparent;border-top: 0.2rem solid #e5e5e5;position:absolute;left: 0.15rem;bottom:-0.18rem;} .pos-order-list .list .item .operation .order .arrow:before{content:'';width: 0;height: 0;border-left: 0.07rem solid transparent;border-right: 0.07rem solid transparent;border-top: 0.2rem solid #fff;position:absolute;left:-0.07rem;bottom:0;} .pos-order-list .list .item .operation .order{width:2rem;background-color:#fff;border:1px solid #eee;border-radius:0.1rem;position:absolute;top:-1rem;z-index:9;} .pos-order-list .list .item .operation .order .items{height:0.77rem;line-height:0.77rem;text-align:center;} .pos-order-list .list .item .operation .order .items~.items{border-top:1px solid #f5f5f5;} .pos-order-list .list .item .operation .bnt{font-size:0.28rem;color:#5c5c5c;width:1.7rem;height:0.6rem;border-radius:0.3rem;border:1px solid #bbb;text-align:center;line-height:0.6rem;} .pos-order-list .list .item .operation .bnt~.bnt{margin-left:0.14rem;} /*商户管理订单详情*/ .pos-order-details .header{background: linear-gradient(to right,#2291f8 0%,#1cd1dc 100%);background: -webkit-linear-gradient(to right, #2291f8 0%,#1cd1dc 100%);background: -moz-linear-gradient(to right,#2291f8 0%,#1cd1dc 100%);} .pos-order-details .header .state{font-size:0.36rem;color:#fff;} .pos-order-details .header .data{margin-left:0.35rem;font-size:0.28rem;} .pos-order-details .header .data .order-num{font-size:0.3rem;margin-bottom:0.08rem;} .pos-order-details .remarks{width:100%;height:0.86rem;background-color:#fff;padding:0 0.3rem;} .pos-order-details .remarks .iconfont{font-size:0.4rem;color:#2a7efb;} .pos-order-details .remarks input{width:6.3rem;height:100%;font-size:0.3rem;} .pos-order-details .remarks input::placeholder{color:#666;} .pos-order-details .orderingUser{font-size:0.26rem;color:#282828;padding:0 0.3rem;height:0.67rem;background-color:#fff;margin-top:0.16rem;border-bottom:1px solid #f5f5f5;} .pos-order-details .orderingUser .iconfont{font-size:0.4rem;color:#2a7efb;margin-right:0.15rem;} .pos-order-details .address{margin-top:0;} .pos-order-details .pos-order-goods{margin-top:0.17rem;} .pos-order-details .footer .more{font-size:0.27rem;color:#aaa;width:1rem;height:0.64rem;text-align:center;line-height:0.64rem;margin-right: 0.25rem;position:relative;} .pos-order-details .footer .delivery{background: linear-gradient(to right,#2291f8 0%,#1cd1dc 100%);background: -webkit-linear-gradient(to right, #2291f8 0%,#1cd1dc 100%);background: -moz-linear-gradient(to right,#2291f8 0%,#1cd1dc 100%);} .pos-order-details .footer .more .order .arrow{width: 0;height: 0;border-left: 0.11rem solid transparent;border-right: 0.11rem solid transparent;border-top: 0.2rem solid #e5e5e5;position:absolute;left: 0.15rem;bottom:-0.18rem;} .pos-order-details .footer .more .order .arrow:before{content:'';width: 0;height: 0;border-left: 0.09rem solid transparent;border-right: 0.09rem solid transparent;border-top: 0.19rem solid #fff;position:absolute;left:-0.1rem;bottom:0;} .pos-order-details .footer .more .order{width:2rem;background-color:#fff;border:1px solid #eee;border-radius:0.1rem;position:absolute;top:-2rem;z-index:9;} .pos-order-details .footer .more .order .item{height:0.77rem;line-height:0.77rem;} .pos-order-details .footer .more .order .item~.item{border-top:1px solid #f5f5f5;} .pos-order-details .footer .more .moreName{width:100%;height:100%;} /*发货*/ .deliver-goods header{width:100%;background-color:#fff;margin-top:0.1rem;} .deliver-goods header .order-num{padding:0 0.3rem;border-bottom:1px solid #f5f5f5;height:0.67rem;} .deliver-goods header .order-num .num{width:4.3rem;font-size:0.26rem;color:#282828;position:relative;} .deliver-goods header .order-num .num:after{position:absolute;content:'';width:1px;height:0.3rem;background-color:#ddd;top:50%;margin-top:-0.15rem;right:0;} .deliver-goods header .order-num .name{width:2.6rem;font-size:0.26rem;color:#282828;text-align: center;} .deliver-goods header .order-num .name .iconfont{font-size:0.35rem;color:#477ef3;vertical-align:middle;margin-right:0.1rem;} .deliver-goods header .address{font-size:0.26rem;color:#868686;background-color:#fff;padding:0.3rem;} .deliver-goods header .address .name{font-size:0.3rem;color:#282828;margin-bottom:0.1rem;} .deliver-goods header .address .name .phone{margin-left:0.4rem;} .deliver-goods header .line{width:100%;height:0.03rem;} .deliver-goods header .line img{width:100%;height:100%;display:block;} .deliver-goods .wrapper{width:100%;background-color:#fff;} .deliver-goods .wrapper .item{border-bottom:1px solid #f0f0f0;padding:0 0.3rem;height:0.96rem;font-size:0.32rem;color:#282828;position:relative;} .deliver-goods .wrapper .item .mode{width:4.6rem;height:100%;text-align:right;} .deliver-goods .wrapper .item .mode .iconfont{font-size:0.3rem;margin-left:0.13rem;} .deliver-goods .wrapper .item .mode .goods~.goods{margin-left:0.3rem;} .deliver-goods .wrapper .item .mode .goods{color:#bbb;} .deliver-goods .wrapper .item .mode .goods.on{color:#477ef3;} .deliver-goods .wrapper .item .icon-up{position:absolute;font-size:0.35rem;color:#2c2c2c;right:0.3rem;} .deliver-goods .wrapper .item select{direction: rtl;padding-right:0.6rem;position: relative;z-index: 2;} .deliver-goods .wrapper .item input::placeholder{color:#bbb;} .deliver-goods .confirm{font-size:0.32rem;color:#fff;width:100%;height:1rem;background-color:#477ef3;text-align:center;line-height:1rem;position:fixed;bottom:0;} /*订单首页*/ .order-index .header{background:url("../images/orderIndex.png") no-repeat;background-size:100% 100%;width:100%;height:3.02rem;padding:0.45rem 0.3rem 0 0.3rem;} .order-index .header .item{flex:1;-webkit-flex:1;-o-flex:1;-ms-flex:1;text-align:center;font-size:0.24rem;color:#fff;} .order-index .header .item .num{font-size:0.4rem;margin-bottom:0.07rem;} .order-index .wrapper{width:6.9rem;background-color:#fff;border-radius:0.1rem;margin:-1.15rem auto 0 auto;padding-top:0.25rem;} .order-index .wrapper .title{font-size:0.3rem;color:#282828;padding:0 0.3rem;margin-bottom:0.4rem;} .order-index .wrapper .title .iconfont{color:#2291f8;font-size:0.4rem;margin-right:0.13rem;vertical-align:middle;} .order-index .wrapper .list .item{width:33.33%;text-align:center;font-size:0.24rem;color:#999;margin-bottom:0.45rem;} .order-index .wrapper .list .item .num{font-size:0.4rem;color:#333;} /*交易额统计*/ .statistical-page .navs{width:100%;height:0.96rem;background-color:#fff;overflow:hidden;line-height:0.96rem;position:fixed;top:0;left:0;z-index:9;} .statistical-page .navs .list{overflow-y:hidden;overflow-x:auto;white-space: nowrap;-webkit-overflow-scrolling: touch; width: 100%;} .statistical-page .navs .item{font-size:0.32rem;color:#282828;margin-left:0.6rem;display: inline-block;} .statistical-page .navs .item.on{color:#2291f8;} .statistical-page .navs .item .iconfont{font-size:0.25rem;margin-left:0.13rem;} .statistical-page .wrapper{width:7.4rem;background-color:#fff;border-radius:0.1rem;margin:1.19rem auto 0 auto;padding:0.5rem 0.6rem;} .statistical-page .wrapper .title{font-size:0.3rem;color:#999;text-align:center;} .statistical-page .wrapper .money{font-size:0.72rem;color:#fba02a;text-align:center;margin-top:0.1rem;} .statistical-page .wrapper .increase{font-size:0.28rem;color:#999;margin-top:0.2rem;} .statistical-page .wrapper .increase .red{color:#ff6969;} .statistical-page .wrapper .increase .green{color:#1abb1d;} .statistical-page .wrapper .increase .iconfont{font-size:0.23rem;margin-left:0.15rem;} .statistical-page .chart{width:6.9rem;height:4.8rem;background-color:#fff;border-radius:0.1rem;margin:0.23rem auto 0 auto;padding: 0.25rem 0.22rem 0 0.22rem;} .statistical-page .chart .company{font-size:0.26rem;color:#999;} .statistical-page .mc-body{padding-bottom:0;} .statistical-page .mc-body tr{background-color: #edf8fe;border-top: 1px solid #fff;width:100%;} .statistical-page .mpvue-calendar{min-width:100%;} .statistical-page .mpvue-calendar table{margin:0;} .statistical-page .mpvue-calendar td{border-right:1px solid #fff;padding:0;width:14%!important;} .statistical-page .calendar-tools{box-shadow:unset;-webkit-box-shadow:unset;-o-box-shadow:unset;-moz-box-shadow:unset;} .statistical-page .mc-head-box div{font-size: 14px;} .statistical-page .mpvue-calendar td:not(.disabled) span.mc-date-red{color:unset;} .statistical-page .mpvue-calendar .mc-range-mode .mc-range-end span.calendar-date, .statistical-page .mpvue-calendar .mc-range-mode .mc-range-begin span.calendar-date{ border-radius:0;background-color:#2291f8!important; } .statistical-page .mpvue-calendar td.selected span.mc-date-red{color:#fff;} .statistical-page .mc-range-mode .selected .mc-range-bg{background-color:#a0dcf9;} .statistical-page .mpvue-calendar .mc-range-mode .mc-range-row-last .calendar-date,.statistical-page .mpvue-calendar .mc-range-mode .mc-range-row-first .calendar-date{ background-color:#a0dcf9; } .statistical-page .mpvue-calendar .mc-range-mode .selected.mc-range-second-to-last span{background-color:#a0dcf9;} .statistical-page .mpvue-calendar .mc-range-mode .mc-range-month-first.selected .calendar-date, .statistical-page .mpvue-calendar .mc-range-mode .mc-range-month-last.selected .calendar-date{ background-color:#a0dcf9; } .statistical-page .mc-today-element .calendar-date{border-radius:0;background-color:unset;} .yd-confirm {background-color: #fff;font-size:unset;width: 5.4rem;height: 2.5rem;border-radius: 0.4rem;} .yd-confirm-hd {text-align: center;} .yd-confirm-title {color: #030303;font-weight: bold;font-size: 0.36rem;} .yd-confirm-bd {text-align: center;font-size: 0.28rem;color: #333333;} .yd-confirm-ft {line-height: 0.9rem;margin-top: 14px;border-top: 0.01rem solid #eee;} .yd-confirm-ft>a{color:#e93323;} .yd-confirm-ft>a.primary{border-left:0.01rem solid #eee;color:#e93323;} /*修改密码*/ .ChangePassword .phone{font-size:0.32rem;font-weight:bold;text-align:center;margin-top:0.55rem;} .ChangePassword .list{width:5.8rem;margin:0.53rem auto 0 auto;} .ChangePassword .list .item{width:100%;height:1.1rem;border-bottom:0.02rem solid #f0f0f0;} .ChangePassword .list .item input{width:100%;height:100%;font-size:0.32rem;} .ChangePassword .list .item input::placeholder{color:#b9b9bc;} .ChangePassword .list .item input.codeIput{width:3.4rem;} .ChangePassword .list .item .code{font-size:0.32rem;} .ChangePassword .list .item .code.on{color:#b9b9bc!important;} .ChangePassword .confirmBnt{font-size:0.32rem;width:5.8rem;height:0.9rem;border-radius:0.45rem;color:#fff;margin:0.92rem auto 0 auto;text-align:center;line-height:0.9rem;} .van-tabs__wrap{z-index:22!important;} imagesjsarea.js export default { province_list: { 110000: '北京市', 120000: '天津市', 130000: '河北省', 140000: '山西省', 150000: '内蒙古自治区', 210000: '辽宁省', 220000: '吉林省', 230000: '黑龙江省', 310000: '上海市', 320000: '江苏省', 330000: '浙江省', 340000: '安徽省', 350000: '福建省', 360000: '江西省', 370000: '山东省', 410000: '河南省', 420000: '湖北省', 430000: '湖南省', 440000: '广东省', 450000: '广西壮族自治区', 460000: '海南省', 500000: '重庆市', 510000: '四川省', 520000: '贵州省', 530000: '云南省', 540000: '西藏自治区', 610000: '陕西省', 620000: '甘肃省', 630000: '青海省', 640000: '宁夏回族自治区', 650000: '新疆维吾尔自治区', 710000: '台湾省', 810000: '香港特别行政区', 820000: '澳门特别行政区', 900000: '海外' }, city_list: { 110100: '北京市', 120100: '天津市', 130100: '石家庄市', 130200: '唐山市', 130300: '秦皇岛市', 130400: '邯郸市', 130500: '邢台市', 130600: '保定市', 130700: '张家口市', 130800: '承德市', 130900: '沧州市', 131000: '廊坊市', 131100: '衡水市', 140100: '太原市', 140200: '大同市', 140300: '阳泉市', 140400: '长治市', 140500: '晋城市', 140600: '朔州市', 140700: '晋中市', 140800: '运城市', 140900: '忻州市', 141000: '临汾市', 141100: '吕梁市', 150100: '呼和浩特市', 150200: '包头市', 150300: '乌海市', 150400: '赤峰市', 150500: '通辽市', 150600: '鄂尔多斯市', 150700: '呼伦贝尔市', 150800: '巴彦淖尔市', 150900: '乌兰察布市', 152200: '兴安盟', 152500: '锡林郭勒盟', 152900: '阿拉善盟', 210100: '沈阳市', 210200: '大连市', 210300: '鞍山市', 210400: '抚顺市', 210500: '本溪市', 210600: '丹东市', 210700: '锦州市', 210800: '营口市', 210900: '阜新市', 211000: '辽阳市', 211100: '盘锦市', 211200: '铁岭市', 211300: '朝阳市', 211400: '葫芦岛市', 220100: '长春市', 220200: '吉林市', 220300: '四平市', 220400: '辽源市', 220500: '通化市', 220600: '白山市', 220700: '松原市', 220800: '白城市', 222400: '延边朝鲜族自治州', 230100: '哈尔滨市', 230200: '齐齐哈尔市', 230300: '鸡西市', 230400: '鹤岗市', 230500: '双鸭山市', 230600: '大庆市', 230700: '伊春市', 230800: '佳木斯市', 230900: '七台河市', 231000: '牡丹江市', 231100: '黑河市', 231200: '绥化市', 232700: '大兴安岭地区', 310100: '上海市', 320100: '南京市', 320200: '无锡市', 320300: '徐州市', 320400: '常州市', 320500: '苏州市', 320600: '南通市', 320700: '连云港市', 320800: '淮安市', 320900: '盐城市', 321000: '扬州市', 321100: '镇江市', 321200: '泰州市', 321300: '宿迁市', 330100: '杭州市', 330200: '宁波市', 330300: '温州市', 330400: '嘉兴市', 330500: '湖州市', 330600: '绍兴市', 330700: '金华市', 330800: '衢州市', 330900: '舟山市', 331000: '台州市', 331100: '丽水市', 340100: '合肥市', 340200: '芜湖市', 340300: '蚌埠市', 340400: '淮南市', 340500: '马鞍山市', 340600: '淮北市', 340700: '铜陵市', 340800: '安庆市', 341000: '黄山市', 341100: '滁州市', 341200: '阜阳市', 341300: '宿州市', 341500: '六安市', 341600: '亳州市', 341700: '池州市', 341800: '宣城市', 350100: '福州市', 350200: '厦门市', 350300: '莆田市', 350400: '三明市', 350500: '泉州市', 350600: '漳州市', 350700: '南平市', 350800: '龙岩市', 350900: '宁德市', 360100: '南昌市', 360200: '景德镇市', 360300: '萍乡市', 360400: '九江市', 360500: '新余市', 360600: '鹰潭市', 360700: '赣州市', 360800: '吉安市', 360900: '宜春市', 361000: '抚州市', 361100: '上饶市', 370100: '济南市', 370200: '青岛市', 370300: '淄博市', 370400: '枣庄市', 370500: '东营市', 370600: '烟台市', 370700: '潍坊市', 370800: '济宁市', 370900: '泰安市', 371000: '威海市', 371100: '日照市', 371200: '莱芜市', 371300: '临沂市', 371400: '德州市', 371500: '聊城市', 371600: '滨州市', 371700: '菏泽市', 410100: '郑州市', 410200: '开封市', 410300: '洛阳市', 410400: '平顶山市', 410500: '安阳市', 410600: '鹤壁市', 410700: '新乡市', 410800: '焦作市', 410900: '濮阳市', 411000: '许昌市', 411100: '漯河市', 411200: '三门峡市', 411300: '南阳市', 411400: '商丘市', 411500: '信阳市', 411600: '周口市', 411700: '驻马店市', 419000: '省直辖县', 420100: '武汉市', 420200: '黄石市', 420300: '十堰市', 420500: '宜昌市', 420600: '襄阳市', 420700: '鄂州市', 420800: '荆门市', 420900: '孝感市', 421000: '荆州市', 421100: '黄冈市', 421200: '咸宁市', 421300: '随州市', 422800: '恩施土家族苗族自治州', 429000: '省直辖县', 430100: '长沙市', 430200: '株洲市', 430300: '湘潭市', 430400: '衡阳市', 430500: '邵阳市', 430600: '岳阳市', 430700: '常德市', 430800: '张家界市', 430900: '益阳市', 431000: '郴州市', 431100: '永州市', 431200: '怀化市', 431300: '娄底市', 433100: '湘西土家族苗族自治州', 440100: '广州市', 440200: '韶关市', 440300: '深圳市', 440400: '珠海市', 440500: '汕头市', 440600: '佛山市', 440700: '江门市', 440800: '湛江市', 440900: '茂名市', 441200: '肇庆市', 441300: '惠州市', 441400: '梅州市', 441500: '汕尾市', 441600: '河源市', 441700: '阳江市', 441800: '清远市', 441900: '东莞市', 442000: '中山市', 445100: '潮州市', 445200: '揭阳市', 445300: '云浮市', 450100: '南宁市', 450200: '柳州市', 450300: '桂林市', 450400: '梧州市', 450500: '北海市', 450600: '防城港市', 450700: '钦州市', 450800: '贵港市', 450900: '玉林市', 451000: '百色市', 451100: '贺州市', 451200: '河池市', 451300: '来宾市', 451400: '崇左市', 460100: '海口市', 460200: '三亚市', 460300: '三沙市', 460400: '儋州市', 469000: '省直辖县', 500100: '重庆市', 500200: '县', 510100: '成都市', 510300: '自贡市', 510400: '攀枝花市', 510500: '泸州市', 510600: '德阳市', 510700: '绵阳市', 510800: '广元市', 510900: '遂宁市', 511000: '内江市', 511100: '乐山市', 511300: '南充市', 511400: '眉山市', 511500: '宜宾市', 511600: '广安市', 511700: '达州市', 511800: '雅安市', 511900: '巴中市', 512000: '资阳市', 513200: '阿坝藏族羌族自治州', 513300: '甘孜藏族自治州', 513400: '凉山彝族自治州', 520100: '贵阳市', 520200: '六盘水市', 520300: '遵义市', 520400: '安顺市', 520500: '毕节市', 520600: '铜仁市', 522300: '黔西南布依族苗族自治州', 522600: '黔东南苗族侗族自治州', 522700: '黔南布依族苗族自治州', 530100: '昆明市', 530300: '曲靖市', 530400: '玉溪市', 530500: '保山市', 530600: '昭通市', 530700: '丽江市', 530800: '普洱市', 530900: '临沧市', 532300: '楚雄彝族自治州', 532500: '红河哈尼族彝族自治州', 532600: '文山壮族苗族自治州', 532800: '西双版纳傣族自治州', 532900: '大理白族自治州', 533100: '德宏傣族景颇族自治州', 533300: '怒江傈僳族自治州', 533400: '迪庆藏族自治州', 540100: '拉萨市', 540200: '日喀则市', 540300: '昌都市', 540400: '林芝市', 540500: '山南市', 540600: '那曲市', 542500: '阿里地区', 610100: '西安市', 610200: '铜川市', 610300: '宝鸡市', 610400: '咸阳市', 610500: '渭南市', 610600: '延安市', 610700: '汉中市', 610800: '榆林市', 610900: '安康市', 611000: '商洛市', 620100: '兰州市', 620200: '嘉峪关市', 620300: '金昌市', 620400: '白银市', 620500: '天水市', 620600: '武威市', 620700: '张掖市', 620800: '平凉市', 620900: '酒泉市', 621000: '庆阳市', 621100: '定西市', 621200: '陇南市', 622900: '临夏回族自治州', 623000: '甘南藏族自治州', 630100: '西宁市', 630200: '海东市', 632200: '海北藏族自治州', 632300: '黄南藏族自治州', 632500: '海南藏族自治州', 632600: '果洛藏族自治州', 632700: '玉树藏族自治州', 632800: '海西蒙古族藏族自治州', 640100: '银川市', 640200: '石嘴山市', 640300: '吴忠市', 640400: '固原市', 640500: '中卫市', 650100: '乌鲁木齐市', 650200: '克拉玛依市', 650400: '吐鲁番市', 650500: '哈密市', 652300: '昌吉回族自治州', 652700: '博尔塔拉蒙古自治州', 652800: '巴音郭楞蒙古自治州', 652900: '阿克苏地区', 653000: '克孜勒苏柯尔克孜自治州', 653100: '喀什地区', 653200: '和田地区', 654000: '伊犁哈萨克自治州', 654200: '塔城地区', 654300: '阿勒泰地区', 659000: '自治区直辖县级行政区划', 710100: '台北市', 710200: '高雄市', 710300: '台南市', 710400: '台中市', 710500: '金门县', 710600: '南投县', 710700: '基隆市', 710800: '新竹市', 710900: '嘉义市', 711100: '新北市', 711200: '宜兰县', 711300: '新竹县', 711400: '桃园县', 711500: '苗栗县', 711700: '彰化县', 711900: '嘉义县', 712100: '云林县', 712400: '屏东县', 712500: '台东县', 712600: '花莲县', 712700: '澎湖县', 712800: '连江县', 810100: '香港岛', 810200: '九龙', 810300: '新界', 820100: '澳门半岛', 820200: '离岛', 900400: '阿富汗', 900800: '阿尔巴尼亚', 901000: '南极洲', 901200: '阿尔及利亚', 901600: '美属萨摩亚', 902000: '安道尔', 902400: '安哥拉', 902800: '安提瓜和巴布达', 903100: '阿塞拜疆', 903200: '阿根廷', 903600: '澳大利亚', 904000: '奥地利', 904400: '巴哈马', 904800: '巴林', 905000: '孟加拉', 905100: '亚美尼亚', 905200: '巴巴多斯', 905600: '比利时', 906000: '百慕大', 906400: '不丹', 906800: '玻利维亚', 907000: '波黑', 907200: '博茨瓦纳', 907400: '布韦岛', 907600: '巴西', 908400: '伯利兹', 908600: '英属印度洋领地', 909000: '所罗门群岛', 909200: '英属维尔京群岛', 909600: '文莱', 910000: '保加利亚', 910400: '缅甸', 910800: '布隆迪', 911200: '白俄罗斯', 911600: '柬埔寨', 912000: '喀麦隆', 912400: '加拿大', 913200: '佛得角', 913600: '开曼群岛', 914000: '中非', 914400: '斯里兰卡', 914800: '乍得', 915200: '智利', 916200: '圣诞岛', 916600: '科科斯群岛', 917000: '哥伦比亚', 917400: '科摩罗', 917500: '马约特', 917800: '刚果（布）', 918000: '刚果（金）', 918400: '库克群岛', 918800: '哥斯达黎加', 919100: '克罗地亚', 919200: '古巴', 919600: '塞浦路斯', 920300: '捷克', 920400: '贝宁', 920800: '丹麦', 921200: '多米尼克', 921400: '多米尼加', 921800: '厄瓜多尔', 922200: '萨尔瓦多', 922600: '赤道几内亚', 923100: '埃塞俄比亚', 923200: '厄立特里亚', 923300: '爱沙尼亚', 923400: '法罗群岛', 923800: '马尔维纳斯群岛（ 福克兰）', 923900: '南乔治亚岛和南桑威奇群岛', 924200: '斐济群岛', 924600: '芬兰', 924800: '奥兰群岛', 925000: '法国', 925400: '法属圭亚那', 925800: '法属波利尼西亚', 926000: '法属南部领地', 926200: '吉布提', 926600: '加蓬', 926800: '格鲁吉亚', 927000: '冈比亚', 927500: '巴勒斯坦', 927600: '德国', 928800: '加纳', 929200: '直布罗陀', 929600: '基里巴斯', 930000: '希腊', 930400: '格陵兰', 930800: '格林纳达', 931200: '瓜德罗普', 931600: '关岛', 932000: '危地马拉', 932400: '几内亚', 932800: '圭亚那', 933200: '海地', 933400: '赫德岛和麦克唐纳群岛', 933600: '梵蒂冈', 934000: '洪都拉斯', 934800: '匈牙利', 935200: '冰岛', 935600: '印度', 936000: '印尼', 936400: '伊朗', 936800: '伊拉克', 937200: '爱尔兰', 937600: '以色列', 938000: '意大利', 938400: '科特迪瓦', 938800: '牙买加', 939200: '日本', 939800: '哈萨克斯坦', 940000: '约旦', 940400: '肯尼亚', 940800: '朝鲜 北朝鲜', 941000: '韩国', 941400: '科威特', 941700: '吉尔吉斯斯坦', 941800: '老挝', 942200: '黎巴嫩', 942600: '莱索托', 942800: '拉脱维亚', 943000: '利比里亚', 943400: '利比亚', 943800: '列支敦士登', 944000: '立陶宛', 944200: '卢森堡', 945000: '马达加斯加', 945400: '马拉维', 945800: '马来西亚', 946200: '马尔代夫', 946600: '马里', 947000: '马耳他', 947400: '马提尼克', 947800: '毛里塔尼亚', 948000: '毛里求斯', 948400: '墨西哥', 949200: '摩纳哥', 949600: '蒙古国', 949800: '摩尔多瓦', 949900: '黑山', 950000: '蒙塞拉特岛', 950400: '摩洛哥', 950800: '莫桑比克', 951200: '阿曼', 951600: '纳米比亚', 952000: '瑙鲁', 952400: '尼泊尔', 952800: '荷兰', 953300: '阿鲁巴', 953500: '荷兰加勒比区', 954000: '新喀里多尼亚', 954800: '瓦努阿图', 955400: '新西兰', 955800: '尼加拉瓜', 956200: '尼日尔', 956600: '尼日利亚', 957000: '纽埃', 957400: '诺福克岛', 957800: '挪威', 958000: '北马里亚纳群岛', 958100: '美国本土外小岛屿', 958300: '密克罗尼西亚联邦', 958400: '马绍尔群岛', 958500: '帕劳', 958600: '巴基斯坦', 959100: '巴拿马', 959800: '巴布亚新几内亚', 960000: '巴拉圭', 960400: '秘鲁', 960800: '菲律宾', 961200: '皮特凯恩群岛', 961600: '波兰', 962000: '葡萄牙', 962400: '几内亚比绍', 962600: '东帝汶', 963000: '波多黎各', 963400: '卡塔尔', 963800: '留尼汪', 964200: '罗马尼亚', 964300: '俄罗斯', 964600: '卢旺达', 965200: '圣巴泰勒米岛', 965400: '圣赫勒拿', 965900: '圣基茨和尼维斯', 966000: '安圭拉', 966200: '圣卢西亚', 966300: '法属圣马丁', 966600: '圣皮埃尔和密克隆', 967000: '圣文森特和格林纳丁斯', 967400: '圣马力诺', 967800: '圣多美和普林西比', 968200: '沙特阿拉伯', 968600: '塞内加尔', 968800: '塞尔维亚', 969000: '塞舌尔', 969400: '塞拉利昂', 970200: '新加坡', 970300: '斯洛伐克', 970400: '越南', 970500: '斯洛文尼亚', 970600: '索马里', 971000: '南非', 971600: '津巴布韦', 972400: '西班牙', 972800: '南苏丹', 972900: '苏丹', 973200: '西撒哈拉', 974000: '苏里南', 974400: '斯瓦尔巴群岛和 扬马延岛', 974800: '斯威士兰', 975200: '瑞典', 975600: '瑞士', 976000: '叙利亚', 976200: '塔吉克斯坦', 976400: '泰国', 976800: '多哥', 977200: '托克劳', 977600: '汤加', 978000: '特立尼达和多巴哥', 978400: '阿联酋', 978800: '突尼斯', 979200: '土耳其', 979500: '土库曼斯坦', 979600: '特克斯和凯科斯群岛', 979800: '图瓦卢', 980000: '乌干达', 980400: '乌克兰', 980700: '马其顿', 981800: '埃及', 982600: '英国', 983100: '根西岛', 983200: '泽西岛', 983300: '马恩岛', 983400: '坦桑尼亚', 984000: '美国', 985000: '美属维尔京群岛', 985400: '布基纳法索', 985800: '乌拉圭', 986000: '乌兹别克斯坦', 986200: '委内瑞拉', 987600: '瓦利斯和富图纳', 988200: '萨摩亚', 988700: '也门', 989400: '赞比亚' }, county_list: { 110101: '东城区', 110102: '西城区', 110105: '朝阳区', 110106: '丰台区', 110107: '石景山区', 110108: '海淀区', 110109: '门头沟区', 110111: '房山区', 110112: '通州区', 110113: '顺义区', 110114: '昌平区', 110115: '大兴区', 110116: '怀柔区', 110117: '平谷区', 110118: '密云区', 110119: '延庆区', 120101: '和平区', 120102: '河东区', 120103: '河西区', 120104: '南开区', 120105: '河北区', 120106: '红桥区', 120110: '东丽区', 120111: '西青区', 120112: '津南区', 120113: '北辰区', 120114: '武清区', 120115: '宝坻区', 120116: '滨海新区', 120117: '宁河区', 120118: '静海区', 120119: '蓟州区', 130102: '长安区', 130104: '桥西区', 130105: '新华区', 130107: '井陉矿区', 130108: '裕华区', 130109: '藁城区', 130110: '鹿泉区', 130111: '栾城区', 130121: '井陉县', 130123: '正定县', 130125: '行唐县', 130126: '灵寿县', 130127: '高邑县', 130128: '深泽县', 130129: '赞皇县', 130130: '无极县', 130131: '平山县', 130132: '元氏县', 130133: '赵县', 130181: '辛集市', 130183: '晋州市', 130184: '新乐市', 130202: '路南区', 130203: '路北区', 130204: '古冶区', 130205: '开平区', 130207: '丰南区', 130208: '丰润区', 130209: '曹妃甸区', 130224: '滦南县', 130225: '乐亭县', 130227: '迁西县', 130229: '玉田县', 130281: '遵化市', 130283: '迁安市', 130284: '滦州市', 130302: '海港区', 130303: '山海关区', 130304: '北戴河区', 130306: '抚宁区', 130321: '青龙满族自治县', 130322: '昌黎县', 130324: '卢龙县', 130390: '经济技术开发区', 130402: '邯山区', 130403: '丛台区', 130404: '复兴区', 130406: '峰峰矿区', 130407: '肥乡区', 130408: '永年区', 130423: '临漳县', 130424: '成安县', 130425: '大名县', 130426: '涉县', 130427: '磁县', 130430: '邱县', 130431: '鸡泽县', 130432: '广平县', 130433: '馆陶县', 130434: '魏县', 130435: '曲周县', 130481: '武安市', 130502: '桥东区', 130503: '桥西区', 130521: '邢台县', 130522: '临城县', 130523: '内丘县', 130524: '柏乡县', 130525: '隆尧县', 130526: '任县', 130527: '南和县', 130528: '宁晋县', 130529: '巨鹿县', 130530: '新河县', 130531: '广宗县', 130532: '平乡县', 130533: '威县', 130534: '清河县', 130535: '临西县', 130581: '南宫市', 130582: '沙河市', 130602: '竞秀区', 130606: '莲池区', 130607: '满城区', 130608: '清苑区', 130609: '徐水区', 130623: '涞水县', 130624: '阜平县', 130626: '定兴县', 130627: '唐县', 130628: '高阳县', 130629: '容城县', 130630: '涞源县', 130631: '望都县', 130632: '安新县', 130633: '易县', 130634: '曲阳县', 130635: '蠡县', 130636: '顺平县', 130637: '博野县', 130638: '雄县', 130681: '涿州市', 130682: '定州市', 130683: '安国市', 130684: '高碑店市', 130702: '桥东区', 130703: '桥西区', 130705: '宣化区', 130706: '下花园区', 130708: '万全区', 130709: '崇礼区', 130722: '张北县', 130723: '康保县', 130724: '沽源县', 130725: '尚义县', 130726: '蔚县', 130727: '阳原县', 130728: '怀安县', 130730: '怀来县', 130731: '涿鹿县', 130732: '赤城县', 130802: '双桥区', 130803: '双滦区', 130804: '鹰手营子矿区', 130821: '承德县', 130822: '兴隆县', 130824: '滦平县', 130825: '隆化县', 130826: '丰宁满族自治县', 130827: '宽城满族自治县', 130828: '围场满族蒙古族自治县', 130881: '平泉市', 130902: '新华区', 130903: '运河区', 130921: '沧县', 130922: '青县', 130923: '东光县', 130924: '海兴县', 130925: '盐山县', 130926: '肃宁县', 130927: '南皮县', 130928: '吴桥县', 130929: '献县', 130930: '孟村回族自治县', 130981: '泊头市', 130982: '任丘市', 130983: '黄骅市', 130984: '河间市', 131002: '安次区', 131003: '广阳区', 131022: '固安县', 131023: '永清县', 131024: '香河县', 131025: '大城县', 131026: '文安县', 131028: '大厂回族自治县', 131081: '霸州市', 131082: '三河市', 131090: '开发区', 131102: '桃城区', 131103: '冀州区', 131121: '枣强县', 131122: '武邑县', 131123: '武强县', 131124: '饶阳县', 131125: '安平县', 131126: '故城县', 131127: '景县', 131128: '阜城县', 131182: '深州市', 140105: '小店区', 140106: '迎泽区', 140107: '杏花岭区', 140108: '尖草坪区', 140109: '万柏林区', 140110: '晋源区', 140121: '清徐县', 140122: '阳曲县', 140123: '娄烦县', 140181: '古交市', 140212: '新荣区', 140213: '平城区', 140214: '云冈区', 140215: '云州区', 140221: '阳高县', 140222: '天镇县', 140223: '广灵县', 140224: '灵丘县', 140225: '浑源县', 140226: '左云县', 140302: '城区', 140303: '矿区', 140311: '郊区', 140321: '平定县', 140322: '盂县', 140403: '潞州区', 140404: '上党区', 140405: '屯留区', 140406: '潞城区', 140423: '襄垣县', 140425: '平顺县', 140426: '黎城县', 140427: '壶关县', 140428: '长子县', 140429: '武乡县', 140430: '沁县', 140431: '沁源县', 140502: '城区', 140521: '沁水县', 140522: '阳城县', 140524: '陵川县', 140525: '泽州县', 140581: '高平市', 140602: '朔城区', 140603: '平鲁区', 140621: '山阴县', 140622: '应县', 140623: '右玉县', 140681: '怀仁市', 140702: '榆次区', 140721: '榆社县', 140722: '左权县', 140723: '和顺县', 140724: '昔阳县', 140725: '寿阳县', 140726: '太谷县', 140727: '祁县', 140728: '平遥县', 140729: '灵石县', 140781: '介休市', 140802: '盐湖区', 140821: '临猗县', 140822: '万荣县', 140823: '闻喜县', 140824: '稷山县', 140825: '新绛县', 140826: '绛县', 140827: '垣曲县', 140828: '夏县', 140829: '平陆县', 140830: '芮城县', 140881: '永济市', 140882: '河津市', 140902: '忻府区', 140921: '定襄县', 140922: '五台县', 140923: '代县', 140924: '繁峙县', 140925: '宁武县', 140926: '静乐县', 140927: '神池县', 140928: '五寨县', 140929: '岢岚县', 140930: '河曲县', 140931: '保德县', 140932: '偏关县', 140981: '原平市', 141002: '尧都区', 141021: '曲沃县', 141022: '翼城县', 141023: '襄汾县', 141024: '洪洞县', 141025: '古县', 141026: '安泽县', 141027: '浮山县', 141028: '吉县', 141029: '乡宁县', 141030: '大宁县', 141031: '隰县', 141032: '永和县', 141033: '蒲县', 141034: '汾西县', 141081: '侯马市', 141082: '霍州市', 141102: '离石区', 141121: '文水县', 141122: '交城县', 141123: '兴县', 141124: '临县', 141125: '柳林县', 141126: '石楼县', 141127: '岚县', 141128: '方山县', 141129: '中阳县', 141130: '交口县', 141181: '孝义市', 141182: '汾阳市', 150102: '新城区', 150103: '回民区', 150104: '玉泉区', 150105: '赛罕区', 150121: '土默特左旗', 150122: '托克托县', 150123: '和林格尔县', 150124: '清水河县', 150125: '武川县', 150202: '东河区', 150203: '昆都仑区', 150204: '青山区', 150205: '石拐区', 150206: '白云鄂博矿区', 150207: '九原区', 150221: '土默特右旗', 150222: '固阳县', 150223: '达尔罕茂明安联合旗', 150302: '海勃湾区', 150303: '海南区', 150304: '乌达区', 150402: '红山区', 150403: '元宝山区', 150404: '松山区', 150421: '阿鲁科尔沁旗', 150422: '巴林左旗', 150423: '巴林右旗', 150424: '林西县', 150425: '克什克腾旗', 150426: '翁牛特旗', 150428: '喀喇沁旗', 150429: '宁城县', 150430: '敖汉旗', 150502: '科尔沁区', 150521: '科尔沁左翼中旗', 150522: '科尔沁左翼后旗', 150523: '开鲁县', 150524: '库伦旗', 150525: '奈曼旗', 150526: '扎鲁特旗', 150581: '霍林郭勒市', 150602: '东胜区', 150603: '康巴什区', 150621: '达拉特旗', 150622: '准格尔旗', 150623: '鄂托克前旗', 150624: '鄂托克旗', 150625: '杭锦旗', 150626: '乌审旗', 150627: '伊金霍洛旗', 150702: '海拉尔区', 150703: '扎赉诺尔区', 150721: '阿荣旗', 150722: '莫力达瓦达斡尔族自治旗', 150723: '鄂伦春自治旗', 150724: '鄂温克族自治旗', 150725: '陈巴尔虎旗', 150726: '新巴尔虎左旗', 150727: '新巴尔虎右旗', 150781: '满洲里市', 150782: '牙克石市', 150783: '扎兰屯市', 150784: '额尔古纳市', 150785: '根河市', 150802: '临河区', 150821: '五原县', 150822: '磴口县', 150823: '乌拉特前旗', 150824: '乌拉特中旗', 150825: '乌拉特后旗', 150826: '杭锦后旗', 150902: '集宁区', 150921: '卓资县', 150922: '化德县', 150923: '商都县', 150924: '兴和县', 150925: '凉城县', 150926: '察哈尔右翼前旗', 150927: '察哈尔右翼中旗', 150928: '察哈尔右翼后旗', 150929: '四子王旗', 150981: '丰镇市', 152201: '乌兰浩特市', 152202: '阿尔山市', 152221: '科尔沁右翼前旗', 152222: '科尔沁右翼中旗', 152223: '扎赉特旗', 152224: '突泉县', 152501: '二连浩特市', 152502: '锡林浩特市', 152522: '阿巴嘎旗', 152523: '苏尼特左旗', 152524: '苏尼特右旗', 152525: '东乌珠穆沁旗', 152526: '西乌珠穆沁旗', 152527: '太仆寺旗', 152528: '镶黄旗', 152529: '正镶白旗', 152530: '正蓝旗', 152531: '多伦县', 152921: '阿拉善左旗', 152922: '阿拉善右旗', 152923: '额济纳旗', 210102: '和平区', 210103: '沈河区', 210104: '大东区', 210105: '皇姑区', 210106: '铁西区', 210111: '苏家屯区', 210112: '浑南区', 210113: '沈北新区', 210114: '于洪区', 210115: '辽中区', 210123: '康平县', 210124: '法库县', 210181: '新民市', 210190: '经济技术开发区', 210202: '中山区', 210203: '西岗区', 210204: '沙河口区', 210211: '甘井子区', 210212: '旅顺口区', 210213: '金州区', 210214: '普兰店区', 210224: '长海县', 210281: '瓦房店市', 210283: '庄河市', 210302: '铁东区', 210303: '铁西区', 210304: '立山区', 210311: '千山区', 210321: '台安县', 210323: '岫岩满族自治县', 210381: '海城市', 210390: '高新区', 210402: '新抚区', 210403: '东洲区', 210404: '望花区', 210411: '顺城区', 210421: '抚顺县', 210422: '新宾满族自治县', 210423: '清原满族自治县', 210502: '平山区', 210503: '溪湖区', 210504: '明山区', 210505: '南芬区', 210521: '本溪满族自治县', 210522: '桓仁满族自治县', 210602: '元宝区', 210603: '振兴区', 210604: '振安区', 210624: '宽甸满族自治县', 210681: '东港市', 210682: '凤城市', 210702: '古塔区', 210703: '凌河区', 210711: '太和区', 210726: '黑山县', 210727: '义县', 210781: '凌海市', 210782: '北镇市', 210793: '经济技术开发区', 210802: '站前区', 210803: '西市区', 210804: '鲅鱼圈区', 210811: '老边区', 210881: '盖州市', 210882: '大石桥市', 210902: '海州区', 210903: '新邱区', 210904: '太平区', 210905: '清河门区', 210911: '细河区', 210921: '阜新蒙古族自治县', 210922: '彰武县', 211002: '白塔区', 211003: '文圣区', 211004: '宏伟区', 211005: '弓长岭区', 211011: '太子河区', 211021: '辽阳县', 211081: '灯塔市', 211102: '双台子区', 211103: '兴隆台区', 211104: '大洼区', 211122: '盘山县', 211202: '银州区', 211204: '清河区', 211221: '铁岭县', 211223: '西丰县', 211224: '昌图县', 211281: '调兵山市', 211282: '开原市', 211302: '双塔区', 211303: '龙城区', 211321: '朝阳县', 211322: '建平县', 211324: '喀喇沁左翼蒙古族自治县', 211381: '北票市', 211382: '凌源市', 211402: '连山区', 211403: '龙港区', 211404: '南票区', 211421: '绥中县', 211422: '建昌县', 211481: '兴城市', 220102: '南关区', 220103: '宽城区', 220104: '朝阳区', 220105: '二道区', 220106: '绿园区', 220112: '双阳区', 220113: '九台区', 220122: '农安县', 220182: '榆树市', 220183: '德惠市', 220192: '经济技术开发区', 220202: '昌邑区', 220203: '龙潭区', 220204: '船营区', 220211: '丰满区', 220221: '永吉县', 220281: '蛟河市', 220282: '桦甸市', 220283: '舒兰市', 220284: '磐石市', 220302: '铁西区', 220303: '铁东区', 220322: '梨树县', 220323: '伊通满族自治县', 220381: '公主岭市', 220382: '双辽市', 220402: '龙山区', 220403: '西安区', 220421: '东丰县', 220422: '东辽县', 220502: '东昌区', 220503: '二道江区', 220521: '通化县', 220523: '辉南县', 220524: '柳河县', 220581: '梅河口市', 220582: '集安市', 220602: '浑江区', 220605: '江源区', 220621: '抚松县', 220622: '靖宇县', 220623: '长白朝鲜族自治县', 220681: '临江市', 220702: '宁江区', 220721: '前郭尔罗斯蒙古族自治县', 220722: '长岭县', 220723: '乾安县', 220781: '扶余市', 220802: '洮北区', 220821: '镇赉县', 220822: '通榆县', 220881: '洮南市', 220882: '大安市', 222401: '延吉市', 222402: '图们市', 222403: '敦化市', 222404: '珲春市', 222405: '龙井市', 222406: '和龙市', 222424: '汪清县', 222426: '安图县', 230102: '道里区', 230103: '南岗区', 230104: '道外区', 230108: '平房区', 230109: '松北区', 230110: '香坊区', 230111: '呼兰区', 230112: '阿城区', 230113: '双城区', 230123: '依兰县', 230124: '方正县', 230125: '宾县', 230126: '巴彦县', 230127: '木兰县', 230128: '通河县', 230129: '延寿县', 230183: '尚志市', 230184: '五常市', 230202: '龙沙区', 230203: '建华区', 230204: '铁锋区', 230205: '昂昂溪区', 230206: '富拉尔基区', 230207: '碾子山区', 230208: '梅里斯达斡尔族区', 230221: '龙江县', 230223: '依安县', 230224: '泰来县', 230225: '甘南县', 230227: '富裕县', 230229: '克山县', 230230: '克东县', 230231: '拜泉县', 230281: '讷河市', 230302: '鸡冠区', 230303: '恒山区', 230304: '滴道区', 230305: '梨树区', 230306: '城子河区', 230307: '麻山区', 230321: '鸡东县', 230381: '虎林市', 230382: '密山市', 230402: '向阳区', 230403: '工农区', 230404: '南山区', 230405: '兴安区', 230406: '东山区', 230407: '兴山区', 230421: '萝北县', 230422: '绥滨县', 230502: '尖山区', 230503: '岭东区', 230505: '四方台区', 230506: '宝山区', 230521: '集贤县', 230522: '友谊县', 230523: '宝清县', 230524: '饶河县', 230602: '萨尔图区', 230603: '龙凤区', 230604: '让胡路区', 230605: '红岗区', 230606: '大同区', 230621: '肇州县', 230622: '肇源县', 230623: '林甸县', 230624: '杜尔伯特蒙古族自治县', 230702: '伊春区', 230703: '南岔区', 230704: '友好区', 230705: '西林区', 230706: '翠峦区', 230707: '新青区', 230708: '美溪区', 230709: '金山屯区', 230710: '五营区', 230711: '乌马河区', 230712: '汤旺河区', 230713: '带岭区', 230714: '乌伊岭区', 230715: '红星区', 230716: '上甘岭区', 230722: '嘉荫县', 230781: '铁力市', 230803: '向阳区', 230804: '前进区', 230805: '东风区', 230811: '郊区', 230822: '桦南县', 230826: '桦川县', 230828: '汤原县', 230881: '同江市', 230882: '富锦市', 230883: '抚远市', 230902: '新兴区', 230903: '桃山区', 230904: '茄子河区', 230921: '勃利县', 231002: '东安区', 231003: '阳明区', 231004: '爱民区', 231005: '西安区', 231025: '林口县', 231081: '绥芬河市', 231083: '海林市', 231084: '宁安市', 231085: '穆棱市', 231086: '东宁市', 231102: '爱辉区', 231121: '嫩江县', 231123: '逊克县', 231124: '孙吴县', 231181: '北安市', 231182: '五大连池市', 231202: '北林区', 231221: '望奎县', 231222: '兰西县', 231223: '青冈县', 231224: '庆安县', 231225: '明水县', 231226: '绥棱县', 231281: '安达市', 231282: '肇东市', 231283: '海伦市', 232701: '漠河市', 232721: '呼玛县', 232722: '塔河县', 232790: '松岭区', 232791: '呼中区', 232792: '加格达奇区', 232793: '新林区', 310101: '黄浦区', 310104: '徐汇区', 310105: '长宁区', 310106: '静安区', 310107: '普陀区', 310109: '虹口区', 310110: '杨浦区', 310112: '闵行区', 310113: '宝山区', 310114: '嘉定区', 310115: '浦东新区', 310116: '金山区', 310117: '松江区', 310118: '青浦区', 310120: '奉贤区', 310151: '崇明区', 320102: '玄武区', 320104: '秦淮区', 320105: '建邺区', 320106: '鼓楼区', 320111: '浦口区', 320113: '栖霞区', 320114: '雨花台区', 320115: '江宁区', 320116: '六合区', 320117: '溧水区', 320118: '高淳区', 320205: '锡山区', 320206: '惠山区', 320211: '滨湖区', 320213: '梁溪区', 320214: '新吴区', 320281: '江阴市', 320282: '宜兴市', 320302: '鼓楼区', 320303: '云龙区', 320305: '贾汪区', 320311: '泉山区', 320312: '铜山区', 320321: '丰县', 320322: '沛县', 320324: '睢宁县', 320381: '新沂市', 320382: '邳州市', 320391: '工业园区', 320402: '天宁区', 320404: '钟楼区', 320411: '新北区', 320412: '武进区', 320413: '金坛区', 320481: '溧阳市', 320505: '虎丘区', 320506: '吴中区', 320507: '相城区', 320508: '姑苏区', 320509: '吴江区', 320581: '常熟市', 320582: '张家港市', 320583: '昆山市', 320585: '太仓市', 320590: '工业园区', 320591: '高新区', 320602: '崇川区', 320611: '港闸区', 320612: '通州区', 320623: '如东县', 320681: '启东市', 320682: '如皋市', 320684: '海门市', 320685: '海安市', 320691: '高新区', 320703: '连云区', 320706: '海州区', 320707: '赣榆区', 320722: '东海县', 320723: '灌云县', 320724: '灌南县', 320803: '淮安区', 320804: '淮阴区', 320812: '清江浦区', 320813: '洪泽区', 320826: '涟水县', 320830: '盱眙县', 320831: '金湖县', 320890: '经济开发区', 320902: '亭湖区', 320903: '盐都区', 320904: '大丰区', 320921: '响水县', 320922: '滨海县', 320923: '阜宁县', 320924: '射阳县', 320925: '建湖县', 320981: '东台市', 321002: '广陵区', 321003: '邗江区', 321012: '江都区', 321023: '宝应县', 321081: '仪征市', 321084: '高邮市', 321090: '经济开发区', 321102: '京口区', 321111: '润州区', 321112: '丹徒区', 321181: '丹阳市', 321182: '扬中市', 321183: '句容市', 321202: '海陵区', 321203: '高港区', 321204: '姜堰区', 321281: '兴化市', 321282: '靖江市', 321283: '泰兴市', 321302: '宿城区', 321311: '宿豫区', 321322: '沭阳县', 321323: '泗阳县', 321324: '泗洪县', 330102: '上城区', 330103: '下城区', 330104: '江干区', 330105: '拱墅区', 330106: '西湖区', 330108: '滨江区', 330109: '萧山区', 330110: '余杭区', 330111: '富阳区', 330112: '临安区', 330122: '桐庐县', 330127: '淳安县', 330182: '建德市', 330203: '海曙区', 330205: '江北区', 330206: '北仑区', 330211: '镇海区', 330212: '鄞州区', 330213: '奉化区', 330225: '象山县', 330226: '宁海县', 330281: '余姚市', 330282: '慈溪市', 330302: '鹿城区', 330303: '龙湾区', 330304: '瓯海区', 330305: '洞头区', 330324: '永嘉县', 330326: '平阳县', 330327: '苍南县', 330328: '文成县', 330329: '泰顺县', 330381: '瑞安市', 330382: '乐清市', 330402: '南湖区', 330411: '秀洲区', 330421: '嘉善县', 330424: '海盐县', 330481: '海宁市', 330482: '平湖市', 330483: '桐乡市', 330502: '吴兴区', 330503: '南浔区', 330521: '德清县', 330522: '长兴县', 330523: '安吉县', 330602: '越城区', 330603: '柯桥区', 330604: '上虞区', 330624: '新昌县', 330681: '诸暨市', 330683: '嵊州市', 330702: '婺城区', 330703: '金东区', 330723: '武义县', 330726: '浦江县', 330727: '磐安县', 330781: '兰溪市', 330782: '义乌市', 330783: '东阳市', 330784: '永康市', 330802: '柯城区', 330803: '衢江区', 330822: '常山县', 330824: '开化县', 330825: '龙游县', 330881: '江山市', 330902: '定海区', 330903: '普陀区', 330921: '岱山县', 330922: '嵊泗县', 331002: '椒江区', 331003: '黄岩区', 331004: '路桥区', 331022: '三门县', 331023: '天台县', 331024: '仙居县', 331081: '温岭市', 331082: '临海市', 331083: '玉环市', 331102: '莲都区', 331121: '青田县', 331122: '缙云县', 331123: '遂昌县', 331124: '松阳县', 331125: '云和县', 331126: '庆元县', 331127: '景宁畲族自治县', 331181: '龙泉市', 340102: '瑶海区', 340103: '庐阳区', 340104: '蜀山区', 340111: '包河区', 340121: '长丰县', 340122: '肥东县', 340123: '肥西县', 340124: '庐江县', 340181: '巢湖市', 340190: '高新技术开发区', 340191: '经济技术开发区', 340202: '镜湖区', 340203: '弋江区', 340207: '鸠江区', 340208: '三山区', 340221: '芜湖县', 340222: '繁昌县', 340223: '南陵县', 340225: '无为县', 340302: '龙子湖区', 340303: '蚌山区', 340304: '禹会区', 340311: '淮上区', 340321: '怀远县', 340322: '五河县', 340323: '固镇县', 340402: '大通区', 340403: '田家庵区', 340404: '谢家集区', 340405: '八公山区', 340406: '潘集区', 340421: '凤台县', 340422: '寿县', 340503: '花山区', 340504: '雨山区', 340506: '博望区', 340521: '当涂县', 340522: '含山县', 340523: '和县', 340602: '杜集区', 340603: '相山区', 340604: '烈山区', 340621: '濉溪县', 340705: '铜官区', 340706: '义安区', 340711: '郊区', 340722: '枞阳县', 340802: '迎江区', 340803: '大观区', 340811: '宜秀区', 340822: '怀宁县', 340824: '潜山县', 340825: '太湖县', 340826: '宿松县', 340827: '望江县', 340828: '岳西县', 340881: '桐城市', 341002: '屯溪区', 341003: '黄山区', 341004: '徽州区', 341021: '歙县', 341022: '休宁县', 341023: '黟县', 341024: '祁门县', 341102: '琅琊区', 341103: '南谯区', 341122: '来安县', 341124: '全椒县', 341125: '定远县', 341126: '凤阳县', 341181: '天长市', 341182: '明光市', 341202: '颍州区', 341203: '颍东区', 341204: '颍泉区', 341221: '临泉县', 341222: '太和县', 341225: '阜南县', 341226: '颍上县', 341282: '界首市', 341302: '埇桥区', 341321: '砀山县', 341322: '萧县', 341323: '灵璧县', 341324: '泗县', 341390: '经济开发区', 341502: '金安区', 341503: '裕安区', 341504: '叶集区', 341522: '霍邱县', 341523: '舒城县', 341524: '金寨县', 341525: '霍山县', 341602: '谯城区', 341621: '涡阳县', 341622: '蒙城县', 341623: '利辛县', 341702: '贵池区', 341721: '东至县', 341722: '石台县', 341723: '青阳县', 341802: '宣州区', 341821: '郎溪县', 341822: '广德县', 341823: '泾县', 341824: '绩溪县', 341825: '旌德县', 341881: '宁国市', 350102: '鼓楼区', 350103: '台江区', 350104: '仓山区', 350105: '马尾区', 350111: '晋安区', 350112: '长乐区', 350121: '闽侯县', 350122: '连江县', 350123: '罗源县', 350124: '闽清县', 350125: '永泰县', 350128: '平潭县', 350181: '福清市', 350203: '思明区', 350205: '海沧区', 350206: '湖里区', 350211: '集美区', 350212: '同安区', 350213: '翔安区', 350302: '城厢区', 350303: '涵江区', 350304: '荔城区', 350305: '秀屿区', 350322: '仙游县', 350402: '梅列区', 350403: '三元区', 350421: '明溪县', 350423: '清流县', 350424: '宁化县', 350425: '大田县', 350426: '尤溪县', 350427: '沙县', 350428: '将乐县', 350429: '泰宁县', 350430: '建宁县', 350481: '永安市', 350502: '鲤城区', 350503: '丰泽区', 350504: '洛江区', 350505: '泉港区', 350521: '惠安县', 350524: '安溪县', 350525: '永春县', 350526: '德化县', 350527: '金门县', 350581: '石狮市', 350582: '晋江市', 350583: '南安市', 350602: '芗城区', 350603: '龙文区', 350622: '云霄县', 350623: '漳浦县', 350624: '诏安县', 350625: '长泰县', 350626: '东山县', 350627: '南靖县', 350628: '平和县', 350629: '华安县', 350681: '龙海市', 350702: '延平区', 350703: '建阳区', 350721: '顺昌县', 350722: '浦城县', 350723: '光泽县', 350724: '松溪县', 350725: '政和县', 350781: '邵武市', 350782: '武夷山市', 350783: '建瓯市', 350802: '新罗区', 350803: '永定区', 350821: '长汀县', 350823: '上杭县', 350824: '武平县', 350825: '连城县', 350881: '漳平市', 350902: '蕉城区', 350921: '霞浦县', 350922: '古田县', 350923: '屏南县', 350924: '寿宁县', 350925: '周宁县', 350926: '柘荣县', 350981: '福安市', 350982: '福鼎市', 360102: '东湖区', 360103: '西湖区', 360104: '青云谱区', 360105: '湾里区', 360111: '青山湖区', 360112: '新建区', 360121: '南昌县', 360123: '安义县', 360124: '进贤县', 360190: '经济技术开发区', 360192: '高新区', 360202: '昌江区', 360203: '珠山区', 360222: '浮梁县', 360281: '乐平市', 360302: '安源区', 360313: '湘东区', 360321: '莲花县', 360322: '上栗县', 360323: '芦溪县', 360402: '濂溪区', 360403: '浔阳区', 360404: '柴桑区', 360423: '武宁县', 360424: '修水县', 360425: '永修县', 360426: '德安县', 360428: '都昌县', 360429: '湖口县', 360430: '彭泽县', 360481: '瑞昌市', 360482: '共青城市', 360483: '庐山市', 360490: '经济技术开发区', 360502: '渝水区', 360521: '分宜县', 360602: '月湖区', 360603: '余江区', 360681: '贵溪市', 360702: '章贡区', 360703: '南康区', 360704: '赣县区', 360722: '信丰县', 360723: '大余县', 360724: '上犹县', 360725: '崇义县', 360726: '安远县', 360727: '龙南县', 360728: '定南县', 360729: '全南县', 360730: '宁都县', 360731: '于都县', 360732: '兴国县', 360733: '会昌县', 360734: '寻乌县', 360735: '石城县', 360781: '瑞金市', 360802: '吉州区', 360803: '青原区', 360821: '吉安县', 360822: '吉水县', 360823: '峡江县', 360824: '新干县', 360825: '永丰县', 360826: '泰和县', 360827: '遂川县', 360828: '万安县', 360829: '安福县', 360830: '永新县', 360881: '井冈山市', 360902: '袁州区', 360921: '奉新县', 360922: '万载县', 360923: '上高县', 360924: '宜丰县', 360925: '靖安县', 360926: '铜鼓县', 360981: '丰城市', 360982: '樟树市', 360983: '高安市', 361002: '临川区', 361003: '东乡区', 361021: '南城县', 361022: '黎川县', 361023: '南丰县', 361024: '崇仁县', 361025: '乐安县', 361026: '宜黄县', 361027: '金溪县', 361028: '资溪县', 361030: '广昌县', 361102: '信州区', 361103: '广丰区', 361121: '上饶县', 361123: '玉山县', 361124: '铅山县', 361125: '横峰县', 361126: '弋阳县', 361127: '余干县', 361128: '鄱阳县', 361129: '万年县', 361130: '婺源县', 361181: '德兴市', 370102: '历下区', 370103: '市中区', 370104: '槐荫区', 370105: '天桥区', 370112: '历城区', 370113: '长清区', 370114: '章丘区', 370115: '济阳区', 370124: '平阴县', 370126: '商河县', 370190: '高新区', 370202: '市南区', 370203: '市北区', 370211: '黄岛区', 370212: '崂山区', 370213: '李沧区', 370214: '城阳区', 370215: '即墨区', 370281: '胶州市', 370283: '平度市', 370285: '莱西市', 370290: '开发区', 370302: '淄川区', 370303: '张店区', 370304: '博山区', 370305: '临淄区', 370306: '周村区', 370321: '桓台县', 370322: '高青县', 370323: '沂源县', 370402: '市中区', 370403: '薛城区', 370404: '峄城区', 370405: '台儿庄区', 370406: '山亭区', 370481: '滕州市', 370502: '东营区', 370503: '河口区', 370505: '垦利区', 370522: '利津县', 370523: '广饶县', 370602: '芝罘区', 370611: '福山区', 370612: '牟平区', 370613: '莱山区', 370634: '长岛县', 370681: '龙口市', 370682: '莱阳市', 370683: '莱州市', 370684: '蓬莱市', 370685: '招远市', 370686: '栖霞市', 370687: '海阳市', 370690: '开发区', 370702: '潍城区', 370703: '寒亭区', 370704: '坊子区', 370705: '奎文区', 370724: '临朐县', 370725: '昌乐县', 370781: '青州市', 370782: '诸城市', 370783: '寿光市', 370784: '安丘市', 370785: '高密市', 370786: '昌邑市', 370790: '开发区', 370791: '高新区', 370811: '任城区', 370812: '兖州区', 370826: '微山县', 370827: '鱼台县', 370828: '金乡县', 370829: '嘉祥县', 370830: '汶上县', 370831: '泗水县', 370832: '梁山县', 370881: '曲阜市', 370883: '邹城市', 370890: '高新区', 370902: '泰山区', 370911: '岱岳区', 370921: '宁阳县', 370923: '东平县', 370982: '新泰市', 370983: '肥城市', 371002: '环翠区', 371003: '文登区', 371082: '荣成市', 371083: '乳山市', 371091: '经济技术开发区', 371102: '东港区', 371103: '岚山区', 371121: '五莲县', 371122: '莒县', 371202: '莱城区', 371203: '钢城区', 371302: '兰山区', 371311: '罗庄区', 371312: '河东区', 371321: '沂南县', 371322: '郯城县', 371323: '沂水县', 371324: '兰陵县', 371325: '费县', 371326: '平邑县', 371327: '莒南县', 371328: '蒙阴县', 371329: '临沭县', 371402: '德城区', 371403: '陵城区', 371422: '宁津县', 371423: '庆云县', 371424: '临邑县', 371425: '齐河县', 371426: '平原县', 371427: '夏津县', 371428: '武城县', 371481: '乐陵市', 371482: '禹城市', 371502: '东昌府区', 371521: '阳谷县', 371522: '莘县', 371523: '茌平县', 371524: '东阿县', 371525: '冠县', 371526: '高唐县', 371581: '临清市', 371602: '滨城区', 371603: '沾化区', 371621: '惠民县', 371622: '阳信县', 371623: '无棣县', 371625: '博兴县', 371681: '邹平市', 371702: '牡丹区', 371703: '定陶区', 371721: '曹县', 371722: '单县', 371723: '成武县', 371724: '巨野县', 371725: '郓城县', 371726: '鄄城县', 371728: '东明县', 410102: '中原区', 410103: '二七区', 410104: '管城回族区', 410105: '金水区', 410106: '上街区', 410108: '惠济区', 410122: '中牟县', 410181: '巩义市', 410182: '荥阳市', 410183: '新密市', 410184: '新郑市', 410185: '登封市', 410190: '高新技术开发区', 410191: '经济技术开发区', 410202: '龙亭区', 410203: '顺河回族区', 410204: '鼓楼区', 410205: '禹王台区', 410212: '祥符区', 410221: '杞县', 410222: '通许县', 410223: '尉氏县', 410225: '兰考县', 410302: '老城区', 410303: '西工区', 410304: '瀍河回族区', 410305: '涧西区', 410306: '吉利区', 410311: '洛龙区', 410322: '孟津县', 410323: '新安县', 410324: '栾川县', 410325: '嵩县', 410326: '汝阳县', 410327: '宜阳县', 410328: '洛宁县', 410329: '伊川县', 410381: '偃师市', 410402: '新华区', 410403: '卫东区', 410404: '石龙区', 410411: '湛河区', 410421: '宝丰县', 410422: '叶县', 410423: '鲁山县', 410425: '郏县', 410481: '舞钢市', 410482: '汝州市', 410502: '文峰区', 410503: '北关区', 410505: '殷都区', 410506: '龙安区', 410522: '安阳县', 410523: '汤阴县', 410526: '滑县', 410527: '内黄县', 410581: '林州市', 410590: '开发区', 410602: '鹤山区', 410603: '山城区', 410611: '淇滨区', 410621: '浚县', 410622: '淇县', 410702: '红旗区', 410703: '卫滨区', 410704: '凤泉区', 410711: '牧野区', 410721: '新乡县', 410724: '获嘉县', 410725: '原阳县', 410726: '延津县', 410727: '封丘县', 410728: '长垣县', 410781: '卫辉市', 410782: '辉县市', 410802: '解放区', 410803: '中站区', 410804: '马村区', 410811: '山阳区', 410821: '修武县', 410822: '博爱县', 410823: '武陟县', 410825: '温县', 410882: '沁阳市', 410883: '孟州市', 410902: '华龙区', 410922: '清丰县', 410923: '南乐县', 410926: '范县', 410927: '台前县', 410928: '濮阳县', 411002: '魏都区', 411003: '建安区', 411024: '鄢陵县', 411025: '襄城县', 411081: '禹州市', 411082: '长葛市', 411102: '源汇区', 411103: '郾城区', 411104: '召陵区', 411121: '舞阳县', 411122: '临颍县', 411202: '湖滨区', 411203: '陕州区', 411221: '渑池县', 411224: '卢氏县', 411281: '义马市', 411282: '灵宝市', 411302: '宛城区', 411303: '卧龙区', 411321: '南召县', 411322: '方城县', 411323: '西峡县', 411324: '镇平县', 411325: '内乡县', 411326: '淅川县', 411327: '社旗县', 411328: '唐河县', 411329: '新野县', 411330: '桐柏县', 411381: '邓州市', 411402: '梁园区', 411403: '睢阳区', 411421: '民权县', 411422: '睢县', 411423: '宁陵县', 411424: '柘城县', 411425: '虞城县', 411426: '夏邑县', 411481: '永城市', 411502: '浉河区', 411503: '平桥区', 411521: '罗山县', 411522: '光山县', 411523: '新县', 411524: '商城县', 411525: '固始县', 411526: '潢川县', 411527: '淮滨县', 411528: '息县', 411602: '川汇区', 411621: '扶沟县', 411622: '西华县', 411623: '商水县', 411624: '沈丘县', 411625: '郸城县', 411626: '淮阳县', 411627: '太康县', 411628: '鹿邑县', 411681: '项城市', 411690: '经济开发区', 411702: '驿城区', 411721: '西平县', 411722: '上蔡县', 411723: '平舆县', 411724: '正阳县', 411725: '确山县', 411726: '泌阳县', 411727: '汝南县', 411728: '遂平县', 411729: '新蔡县', 419001: '济源市', 420102: '江岸区', 420103: '江汉区', 420104: '硚口区', 420105: '汉阳区', 420106: '武昌区', 420107: '青山区', 420111: '洪山区', 420112: '东西湖区', 420113: '汉南区', 420114: '蔡甸区', 420115: '江夏区', 420116: '黄陂区', 420117: '新洲区', 420202: '黄石港区', 420203: '西塞山区', 420204: '下陆区', 420205: '铁山区', 420222: '阳新县', 420281: '大冶市', 420302: '茅箭区', 420303: '张湾区', 420304: '郧阳区', 420322: '郧西县', 420323: '竹山县', 420324: '竹溪县', 420325: '房县', 420381: '丹江口市', 420502: '西陵区', 420503: '伍家岗区', 420504: '点军区', 420505: '猇亭区', 420506: '夷陵区', 420525: '远安县', 420526: '兴山县', 420527: '秭归县', 420528: '长阳土家族自治县', 420529: '五峰土家族自治县', 420581: '宜都市', 420582: '当阳市', 420583: '枝江市', 420590: '经济开发区', 420602: '襄城区', 420606: '樊城区', 420607: '襄州区', 420624: '南漳县', 420625: '谷城县', 420626: '保康县', 420682: '老河口市', 420683: '枣阳市', 420684: '宜城市', 420702: '梁子湖区', 420703: '华容区', 420704: '鄂城区', 420802: '东宝区', 420804: '掇刀区', 420822: '沙洋县', 420881: '钟祥市', 420882: '京山市', 420902: '孝南区', 420921: '孝昌县', 420922: '大悟县', 420923: '云梦县', 420981: '应城市', 420982: '安陆市', 420984: '汉川市', 421002: '沙市区', 421003: '荆州区', 421022: '公安县', 421023: '监利县', 421024: '江陵县', 421081: '石首市', 421083: '洪湖市', 421087: '松滋市', 421102: '黄州区', 421121: '团风县', 421122: '红安县', 421123: '罗田县', 421124: '英山县', 421125: '浠水县', 421126: '蕲春县', 421127: '黄梅县', 421181: '麻城市', 421182: '武穴市', 421202: '咸安区', 421221: '嘉鱼县', 421222: '通城县', 421223: '崇阳县', 421224: '通山县', 421281: '赤壁市', 421303: '曾都区', 421321: '随县', 421381: '广水市', 422801: '恩施市', 422802: '利川市', 422822: '建始县', 422823: '巴东县', 422825: '宣恩县', 422826: '咸丰县', 422827: '来凤县', 422828: '鹤峰县', 429004: '仙桃市', 429005: '潜江市', 429006: '天门市', 429021: '神农架林区', 430102: '芙蓉区', 430103: '天心区', 430104: '岳麓区', 430105: '开福区', 430111: '雨花区', 430112: '望城区', 430121: '长沙县', 430181: '浏阳市', 430182: '宁乡市', 430202: '荷塘区', 430203: '芦淞区', 430204: '石峰区', 430211: '天元区', 430212: '渌口区', 430223: '攸县', 430224: '茶陵县', 430225: '炎陵县', 430281: '醴陵市', 430302: '雨湖区', 430304: '岳塘区', 430321: '湘潭县', 430381: '湘乡市', 430382: '韶山市', 430405: '珠晖区', 430406: '雁峰区', 430407: '石鼓区', 430408: '蒸湘区', 430412: '南岳区', 430421: '衡阳县', 430422: '衡南县', 430423: '衡山县', 430424: '衡东县', 430426: '祁东县', 430481: '耒阳市', 430482: '常宁市', 430502: '双清区', 430503: '大祥区', 430511: '北塔区', 430521: '邵东县', 430522: '新邵县', 430523: '邵阳县', 430524: '隆回县', 430525: '洞口县', 430527: '绥宁县', 430528: '新宁县', 430529: '城步苗族自治县', 430581: '武冈市', 430602: '岳阳楼区', 430603: '云溪区', 430611: '君山区', 430621: '岳阳县', 430623: '华容县', 430624: '湘阴县', 430626: '平江县', 430681: '汨罗市', 430682: '临湘市', 430702: '武陵区', 430703: '鼎城区', 430721: '安乡县', 430722: '汉寿县', 430723: '澧县', 430724: '临澧县', 430725: '桃源县', 430726: '石门县', 430781: '津市市', 430802: '永定区', 430811: '武陵源区', 430821: '慈利县', 430822: '桑植县', 430902: '资阳区', 430903: '赫山区', 430921: '南县', 430922: '桃江县', 430923: '安化县', 430981: '沅江市', 431002: '北湖区', 431003: '苏仙区', 431021: '桂阳县', 431022: '宜章县', 431023: '永兴县', 431024: '嘉禾县', 431025: '临武县', 431026: '汝城县', 431027: '桂东县', 431028: '安仁县', 431081: '资兴市', 431102: '零陵区', 431103: '冷水滩区', 431121: '祁阳县', 431122: '东安县', 431123: '双牌县', 431124: '道县', 431125: '江永县', 431126: '宁远县', 431127: '蓝山县', 431128: '新田县', 431129: '江华瑶族自治县', 431202: '鹤城区', 431221: '中方县', 431222: '沅陵县', 431223: '辰溪县', 431224: '溆浦县', 431225: '会同县', 431226: '麻阳苗族自治县', 431227: '新晃侗族自治县', 431228: '芷江侗族自治县', 431229: '靖州苗族侗族自治县', 431230: '通道侗族自治县', 431281: '洪江市', 431302: '娄星区', 431321: '双峰县', 431322: '新化县', 431381: '冷水江市', 431382: '涟源市', 433101: '吉首市', 433122: '泸溪县', 433123: '凤凰县', 433124: '花垣县', 433125: '保靖县', 433126: '古丈县', 433127: '永顺县', 433130: '龙山县', 440103: '荔湾区', 440104: '越秀区', 440105: '海珠区', 440106: '天河区', 440111: '白云区', 440112: '黄埔区', 440113: '番禺区', 440114: '花都区', 440115: '南沙区', 440117: '从化区', 440118: '增城区', 440203: '武江区', 440204: '浈江区', 440205: '曲江区', 440222: '始兴县', 440224: '仁化县', 440229: '翁源县', 440232: '乳源瑶族自治县', 440233: '新丰县', 440281: '乐昌市', 440282: '南雄市', 440303: '罗湖区', 440304: '福田区', 440305: '南山区', 440306: '宝安区', 440307: '龙岗区', 440308: '盐田区', 440309: '龙华区', 440310: '坪山区', 440311: '光明区', 440402: '香洲区', 440403: '斗门区', 440404: '金湾区', 440507: '龙湖区', 440511: '金平区', 440512: '濠江区', 440513: '潮阳区', 440514: '潮南区', 440515: '澄海区', 440523: '南澳县', 440604: '禅城区', 440605: '南海区', 440606: '顺德区', 440607: '三水区', 440608: '高明区', 440703: '蓬江区', 440704: '江海区', 440705: '新会区', 440781: '台山市', 440783: '开平市', 440784: '鹤山市', 440785: '恩平市', 440802: '赤坎区', 440803: '霞山区', 440804: '坡头区', 440811: '麻章区', 440823: '遂溪县', 440825: '徐闻县', 440881: '廉江市', 440882: '雷州市', 440883: '吴川市', 440890: '经济技术开发区', 440902: '茂南区', 440904: '电白区', 440981: '高州市', 440982: '化州市', 440983: '信宜市', 441202: '端州区', 441203: '鼎湖区', 441204: '高要区', 441223: '广宁县', 441224: '怀集县', 441225: '封开县', 441226: '德庆县', 441284: '四会市', 441302: '惠城区', 441303: '惠阳区', 441322: '博罗县', 441323: '惠东县', 441324: '龙门县', 441402: '梅江区', 441403: '梅县区', 441422: '大埔县', 441423: '丰顺县', 441424: '五华县', 441426: '平远县', 441427: '蕉岭县', 441481: '兴宁市', 441502: '城区', 441521: '海丰县', 441523: '陆河县', 441581: '陆丰市', 441602: '源城区', 441621: '紫金县', 441622: '龙川县', 441623: '连平县', 441624: '和平县', 441625: '东源县', 441702: '江城区', 441704: '阳东区', 441721: '阳西县', 441781: '阳春市', 441802: '清城区', 441803: '清新区', 441821: '佛冈县', 441823: '阳山县', 441825: '连山壮族瑶族自治县', 441826: '连南瑶族自治县', 441881: '英德市', 441882: '连州市', 441901: '中堂镇', 441903: '南城街道办事处', 441904: '长安镇', 441905: '东坑镇', 441906: '樟木头镇', 441907: '莞城街道办事处', 441908: '石龙镇', 441909: '桥头镇', 441910: '万江街道办事处', 441911: '麻涌镇', 441912: '虎门镇', 441913: '谢岗镇', 441914: '石碣镇', 441915: '茶山镇', 441916: '东城街道办事处', 441917: '洪梅镇', 441918: '道滘镇', 441919: '高埗镇', 441920: '企石镇', 441921: '凤岗镇', 441922: '大岭山镇', 441923: '松山湖管委会', 441924: '清溪镇', 441925: '望牛墩镇', 441926: '厚街镇', 441927: '常平镇', 441928: '寮步镇', 441929: '石排镇', 441930: '横沥镇', 441931: '塘厦镇', 441932: '黄江镇', 441933: '大朗镇', 441934: '东莞港', 441935: '东莞生态园', 441990: '沙田镇', 442001: '南头镇', 442002: '神湾镇', 442003: '东凤镇', 442004: '五桂山街道办事处', 442005: '黄圃镇', 442006: '小榄镇', 442007: '石岐区街道办事处', 442008: '横栏镇', 442009: '三角镇', 442010: '三乡镇', 442011: '港口镇', 442012: '沙溪镇', 442013: '板芙镇', 442015: '东升镇', 442016: '阜沙镇', 442017: '民众镇', 442018: '东区街道办事处', 442019: '火炬开发区街道办事处', 442020: '西区街道办事处', 442021: '南区街道办事处', 442022: '古镇镇', 442023: '坦洲镇', 442024: '大涌镇', 442025: '南朗镇', 445102: '湘桥区', 445103: '潮安区', 445122: '饶平县', 445202: '榕城区', 445203: '揭东区', 445222: '揭西县', 445224: '惠来县', 445281: '普宁市', 445302: '云城区', 445303: '云安区', 445321: '新兴县', 445322: '郁南县', 445381: '罗定市', 450102: '兴宁区', 450103: '青秀区', 450105: '江南区', 450107: '西乡塘区', 450108: '良庆区', 450109: '邕宁区', 450110: '武鸣区', 450123: '隆安县', 450124: '马山县', 450125: '上林县', 450126: '宾阳县', 450127: '横县', 450202: '城中区', 450203: '鱼峰区', 450204: '柳南区', 450205: '柳北区', 450206: '柳江区', 450222: '柳城县', 450223: '鹿寨县', 450224: '融安县', 450225: '融水苗族自治县', 450226: '三江侗族自治县', 450302: '秀峰区', 450303: '叠彩区', 450304: '象山区', 450305: '七星区', 450311: '雁山区', 450312: '临桂区', 450321: '阳朔县', 450323: '灵川县', 450324: '全州县', 450325: '兴安县', 450326: '永福县', 450327: '灌阳县', 450328: '龙胜各族自治县', 450329: '资源县', 450330: '平乐县', 450332: '恭城瑶族自治县', 450381: '荔浦市', 450403: '万秀区', 450405: '长洲区', 450406: '龙圩区', 450421: '苍梧县', 450422: '藤县', 450423: '蒙山县', 450481: '岑溪市', 450502: '海城区', 450503: '银海区', 450512: '铁山港区', 450521: '合浦县', 450602: '港口区', 450603: '防城区', 450621: '上思县', 450681: '东兴市', 450702: '钦南区', 450703: '钦北区', 450721: '灵山县', 450722: '浦北县', 450802: '港北区', 450803: '港南区', 450804: '覃塘区', 450821: '平南县', 450881: '桂平市', 450902: '玉州区', 450903: '福绵区', 450921: '容县', 450922: '陆川县', 450923: '博白县', 450924: '兴业县', 450981: '北流市', 451002: '右江区', 451021: '田阳县', 451022: '田东县', 451023: '平果县', 451024: '德保县', 451026: '那坡县', 451027: '凌云县', 451028: '乐业县', 451029: '田林县', 451030: '西林县', 451031: '隆林各族自治县', 451081: '靖西市', 451102: '八步区', 451103: '平桂区', 451121: '昭平县', 451122: '钟山县', 451123: '富川瑶族自治县', 451202: '金城江区', 451203: '宜州区', 451221: '南丹县', 451222: '天峨县', 451223: '凤山县', 451224: '东兰县', 451225: '罗城仫佬族自治县', 451226: '环江毛南族自治县', 451227: '巴马瑶族自治县', 451228: '都安瑶族自治县', 451229: '大化瑶族自治县', 451302: '兴宾区', 451321: '忻城县', 451322: '象州县', 451323: '武宣县', 451324: '金秀瑶族自治县', 451381: '合山市', 451402: '江州区', 451421: '扶绥县', 451422: '宁明县', 451423: '龙州县', 451424: '大新县', 451425: '天等县', 451481: '凭祥市', 460105: '秀英区', 460106: '龙华区', 460107: '琼山区', 460108: '美兰区', 460202: '海棠区', 460203: '吉阳区', 460204: '天涯区', 460205: '崖州区', 460321: '西沙群岛', 460322: '南沙群岛', 460323: '中沙群岛的岛礁及其海域', 460401: '那大镇', 460402: '和庆镇', 460403: '南丰镇', 460404: '大成镇', 460405: '雅星镇', 460406: '兰洋镇', 460407: '光村镇', 460408: '木棠镇', 460409: '海头镇', 460410: '峨蔓镇', 460411: '王五镇', 460412: '白马井镇', 460413: '中和镇', 460414: '排浦镇', 460415: '东成镇', 460416: '新州镇', 460417: '洋浦经济开发区', 460418: '华南热作学院', 469001: '五指山市', 469002: '琼海市', 469005: '文昌市', 469006: '万宁市', 469007: '东方市', 469021: '定安县', 469022: '屯昌县', 469023: '澄迈县', 469024: '临高县', 469025: '白沙黎族自治县', 469026: '昌江黎族自治县', 469027: '乐东黎族自治县', 469028: '陵水黎族自治县', 469029: '保亭黎族苗族自治县', 469030: '琼中黎族苗族自治县', 500101: '万州区', 500102: '涪陵区', 500103: '渝中区', 500104: '大渡口区', 500105: '江北区', 500106: '沙坪坝区', 500107: '九龙坡区', 500108: '南岸区', 500109: '北碚区', 500110: '綦江区', 500111: '大足区', 500112: '渝北区', 500113: '巴南区', 500114: '黔江区', 500115: '长寿区', 500116: '江津区', 500117: '合川区', 500118: '永川区', 500119: '南川区', 500120: '璧山区', 500151: '铜梁区', 500152: '潼南区', 500153: '荣昌区', 500154: '开州区', 500155: '梁平区', 500156: '武隆区', 500229: '城口县', 500230: '丰都县', 500231: '垫江县', 500233: '忠县', 500235: '云阳县', 500236: '奉节县', 500237: '巫山县', 500238: '巫溪县', 500240: '石柱土家族自治县', 500241: '秀山土家族苗族自治县', 500242: '酉阳土家族苗族自治县', 500243: '彭水苗族土家族自治县', 510104: '锦江区', 510105: '青羊区', 510106: '金牛区', 510107: '武侯区', 510108: '成华区', 510112: '龙泉驿区', 510113: '青白江区', 510114: '新都区', 510115: '温江区', 510116: '双流区', 510117: '郫都区', 510121: '金堂县', 510129: '大邑县', 510131: '蒲江县', 510132: '新津县', 510181: '都江堰市', 510182: '彭州市', 510183: '邛崃市', 510184: '崇州市', 510185: '简阳市', 510191: '高新区', 510302: '自流井区', 510303: '贡井区', 510304: '大安区', 510311: '沿滩区', 510321: '荣县', 510322: '富顺县', 510402: '东区', 510403: '西区', 510411: '仁和区', 510421: '米易县', 510422: '盐边县', 510502: '江阳区', 510503: '纳溪区', 510504: '龙马潭区', 510521: '泸县', 510522: '合江县', 510524: '叙永县', 510525: '古蔺县', 510603: '旌阳区', 510604: '罗江区', 510623: '中江县', 510681: '广汉市', 510682: '什邡市', 510683: '绵竹市', 510703: '涪城区', 510704: '游仙区', 510705: '安州区', 510722: '三台县', 510723: '盐亭县', 510725: '梓潼县', 510726: '北川羌族自治县', 510727: '平武县', 510781: '江油市', 510791: '高新区', 510802: '利州区', 510811: '昭化区', 510812: '朝天区', 510821: '旺苍县', 510822: '青川县', 510823: '剑阁县', 510824: '苍溪县', 510903: '船山区', 510904: '安居区', 510921: '蓬溪县', 510922: '射洪县', 510923: '大英县', 511002: '市中区', 511011: '东兴区', 511024: '威远县', 511025: '资中县', 511083: '隆昌市', 511102: '市中区', 511111: '沙湾区', 511112: '五通桥区', 511113: '金口河区', 511123: '犍为县', 511124: '井研县', 511126: '夹江县', 511129: '沐川县', 511132: '峨边彝族自治县', 511133: '马边彝族自治县', 511181: '峨眉山市', 511302: '顺庆区', 511303: '高坪区', 511304: '嘉陵区', 511321: '南部县', 511322: '营山县', 511323: '蓬安县', 511324: '仪陇县', 511325: '西充县', 511381: '阆中市', 511402: '东坡区', 511403: '彭山区', 511421: '仁寿县', 511423: '洪雅县', 511424: '丹棱县', 511425: '青神县', 511502: '翠屏区', 511503: '南溪区', 511504: '叙州区', 511523: '江安县', 511524: '长宁县', 511525: '高县', 511526: '珙县', 511527: '筠连县', 511528: '兴文县', 511529: '屏山县', 511602: '广安区', 511603: '前锋区', 511621: '岳池县', 511622: '武胜县', 511623: '邻水县', 511681: '华蓥市', 511702: '通川区', 511703: '达川区', 511722: '宣汉县', 511723: '开江县', 511724: '大竹县', 511725: '渠县', 511781: '万源市', 511802: '雨城区', 511803: '名山区', 511822: '荥经县', 511823: '汉源县', 511824: '石棉县', 511825: '天全县', 511826: '芦山县', 511827: '宝兴县', 511902: '巴州区', 511903: '恩阳区', 511921: '通江县', 511922: '南江县', 511923: '平昌县', 512002: '雁江区', 512021: '安岳县', 512022: '乐至县', 513201: '马尔康市', 513221: '汶川县', 513222: '理县', 513223: '茂县', 513224: '松潘县', 513225: '九寨沟县', 513226: '金川县', 513227: '小金县', 513228: '黑水县', 513230: '壤塘县', 513231: '阿坝县', 513232: '若尔盖县', 513233: '红原县', 513301: '康定市', 513322: '泸定县', 513323: '丹巴县', 513324: '九龙县', 513325: '雅江县', 513326: '道孚县', 513327: '炉霍县', 513328: '甘孜县', 513329: '新龙县', 513330: '德格县', 513331: '白玉县', 513332: '石渠县', 513333: '色达县', 513334: '理塘县', 513335: '巴塘县', 513336: '乡城县', 513337: '稻城县', 513338: '得荣县', 513401: '西昌市', 513422: '木里藏族自治县', 513423: '盐源县', 513424: '德昌县', 513425: '会理县', 513426: '会东县', 513427: '宁南县', 513428: '普格县', 513429: '布拖县', 513430: '金阳县', 513431: '昭觉县', 513432: '喜德县', 513433: '冕宁县', 513434: '越西县', 513435: '甘洛县', 513436: '美姑县', 513437: '雷波县', 520102: '南明区', 520103: '云岩区', 520111: '花溪区', 520112: '乌当区', 520113: '白云区', 520115: '观山湖区', 520121: '开阳县', 520122: '息烽县', 520123: '修文县', 520181: '清镇市', 520201: '钟山区', 520203: '六枝特区', 520221: '水城县', 520281: '盘州市', 520302: '红花岗区', 520303: '汇川区', 520304: '播州区', 520322: '桐梓县', 520323: '绥阳县', 520324: '正安县', 520325: '道真仡佬族苗族自治县', 520326: '务川仡佬族苗族自治县', 520327: '凤冈县', 520328: '湄潭县', 520329: '余庆县', 520330: '习水县', 520381: '赤水市', 520382: '仁怀市', 520402: '西秀区', 520403: '平坝区', 520422: '普定县', 520423: '镇宁布依族苗族自治县', 520424: '关岭布依族苗族自治县', 520425: '紫云苗族布依族自治县', 520502: '七星关区', 520521: '大方县', 520522: '黔西县', 520523: '金沙县', 520524: '织金县', 520525: '纳雍县', 520526: '威宁彝族回族苗族自治县', 520527: '赫章县', 520602: '碧江区', 520603: '万山区', 520621: '江口县', 520622: '玉屏侗族自治县', 520623: '石阡县', 520624: '思南县', 520625: '印江土家族苗族自治县', 520626: '德江县', 520627: '沿河土家族自治县', 520628: '松桃苗族自治县', 522301: '兴义市', 522302: '兴仁市', 522323: '普安县', 522324: '晴隆县', 522325: '贞丰县', 522326: '望谟县', 522327: '册亨县', 522328: '安龙县', 522601: '凯里市', 522622: '黄平县', 522623: '施秉县', 522624: '三穗县', 522625: '镇远县', 522626: '岑巩县', 522627: '天柱县', 522628: '锦屏县', 522629: '剑河县', 522630: '台江县', 522631: '黎平县', 522632: '榕江县', 522633: '从江县', 522634: '雷山县', 522635: '麻江县', 522636: '丹寨县', 522701: '都匀市', 522702: '福泉市', 522722: '荔波县', 522723: '贵定县', 522725: '瓮安县', 522726: '独山县', 522727: '平塘县', 522728: '罗甸县', 522729: '长顺县', 522730: '龙里县', 522731: '惠水县', 522732: '三都水族自治县', 530102: '五华区', 530103: '盘龙区', 530111: '官渡区', 530112: '西山区', 530113: '东川区', 530114: '呈贡区', 530115: '晋宁区', 530124: '富民县', 530125: '宜良县', 530126: '石林彝族自治县', 530127: '嵩明县', 530128: '禄劝彝族苗族自治县', 530129: '寻甸回族彝族自治县', 530181: '安宁市', 530302: '麒麟区', 530303: '沾益区', 530304: '马龙区', 530322: '陆良县', 530323: '师宗县', 530324: '罗平县', 530325: '富源县', 530326: '会泽县', 530381: '宣威市', 530402: '红塔区', 530403: '江川区', 530422: '澄江县', 530423: '通海县', 530424: '华宁县', 530425: '易门县', 530426: '峨山彝族自治县', 530427: '新平彝族傣族自治县', 530428: '元江哈尼族彝族傣族自治县', 530502: '隆阳区', 530521: '施甸县', 530523: '龙陵县', 530524: '昌宁县', 530581: '腾冲市', 530602: '昭阳区', 530621: '鲁甸县', 530622: '巧家县', 530623: '盐津县', 530624: '大关县', 530625: '永善县', 530626: '绥江县', 530627: '镇雄县', 530628: '彝良县', 530629: '威信县', 530681: '水富市', 530702: '古城区', 530721: '玉龙纳西族自治县', 530722: '永胜县', 530723: '华坪县', 530724: '宁蒗彝族自治县', 530802: '思茅区', 530821: '宁洱哈尼族彝族自治县', 530822: '墨江哈尼族自治县', 530823: '景东彝族自治县', 530824: '景谷傣族彝族自治县', 530825: '镇沅彝族哈尼族拉祜族自治县', 530826: '江城哈尼族彝族自治县', 530827: '孟连傣族拉祜族佤族自治县', 530828: '澜沧拉祜族自治县', 530829: '西盟佤族自治县', 530902: '临翔区', 530921: '凤庆县', 530922: '云县', 530923: '永德县', 530924: '镇康县', 530925: '双江拉祜族佤族布朗族傣族自治县', 530926: '耿马傣族佤族自治县', 530927: '沧源佤族自治县', 532301: '楚雄市', 532322: '双柏县', 532323: '牟定县', 532324: '南华县', 532325: '姚安县', 532326: '大姚县', 532327: '永仁县', 532328: '元谋县', 532329: '武定县', 532331: '禄丰县', 532501: '个旧市', 532502: '开远市', 532503: '蒙自市', 532504: '弥勒市', 532523: '屏边苗族自治县', 532524: '建水县', 532525: '石屏县', 532527: '泸西县', 532528: '元阳县', 532529: '红河县', 532530: '金平苗族瑶族傣族自治县', 532531: '绿春县', 532532: '河口瑶族自治县', 532601: '文山市', 532622: '砚山县', 532623: '西畴县', 532624: '麻栗坡县', 532625: '马关县', 532626: '丘北县', 532627: '广南县', 532628: '富宁县', 532801: '景洪市', 532822: '勐海县', 532823: '勐腊县', 532901: '大理市', 532922: '漾濞彝族自治县', 532923: '祥云县', 532924: '宾川县', 532925: '弥渡县', 532926: '南涧彝族自治县', 532927: '巍山彝族回族自治县', 532928: '永平县', 532929: '云龙县', 532930: '洱源县', 532931: '剑川县', 532932: '鹤庆县', 533102: '瑞丽市', 533103: '芒市', 533122: '梁河县', 533123: '盈江县', 533124: '陇川县', 533301: '泸水市', 533323: '福贡县', 533324: '贡山独龙族怒族自治县', 533325: '兰坪白族普米族自治县', 533401: '香格里拉市', 533422: '德钦县', 533423: '维西傈僳族自治县', 540102: '城关区', 540103: '堆龙德庆区', 540104: '达孜区', 540121: '林周县', 540122: '当雄县', 540123: '尼木县', 540124: '曲水县', 540127: '墨竹工卡县', 540202: '桑珠孜区', 540221: '南木林县', 540222: '江孜县', 540223: '定日县', 540224: '萨迦县', 540225: '拉孜县', 540226: '昂仁县', 540227: '谢通门县', 540228: '白朗县', 540229: '仁布县', 540230: '康马县', 540231: '定结县', 540232: '仲巴县', 540233: '亚东县', 540234: '吉隆县', 540235: '聂拉木县', 540236: '萨嘎县', 540237: '岗巴县', 540302: '卡若区', 540321: '江达县', 540322: '贡觉县', 540323: '类乌齐县', 540324: '丁青县', 540325: '察雅县', 540326: '八宿县', 540327: '左贡县', 540328: '芒康县', 540329: '洛隆县', 540330: '边坝县', 540402: '巴宜区', 540421: '工布江达县', 540422: '米林县', 540423: '墨脱县', 540424: '波密县', 540425: '察隅县', 540426: '朗县', 540502: '乃东区', 540521: '扎囊县', 540522: '贡嘎县', 540523: '桑日县', 540524: '琼结县', 540525: '曲松县', 540526: '措美县', 540527: '洛扎县', 540528: '加查县', 540529: '隆子县', 540530: '错那县', 540531: '浪卡子县', 540602: '色尼区', 540621: '嘉黎县', 540622: '比如县', 540623: '聂荣县', 540624: '安多县', 540625: '申扎县', 540626: '索县', 540627: '班戈县', 540628: '巴青县', 540629: '尼玛县', 540630: '双湖县', 542521: '普兰县', 542522: '札达县', 542523: '噶尔县', 542524: '日土县', 542525: '革吉县', 542526: '改则县', 542527: '措勤县', 610102: '新城区', 610103: '碑林区', 610104: '莲湖区', 610111: '灞桥区', 610112: '未央区', 610113: '雁塔区', 610114: '阎良区', 610115: '临潼区', 610116: '长安区', 610117: '高陵区', 610118: '鄠邑区', 610122: '蓝田县', 610124: '周至县', 610202: '王益区', 610203: '印台区', 610204: '耀州区', 610222: '宜君县', 610302: '渭滨区', 610303: '金台区', 610304: '陈仓区', 610322: '凤翔县', 610323: '岐山县', 610324: '扶风县', 610326: '眉县', 610327: '陇县', 610328: '千阳县', 610329: '麟游县', 610330: '凤县', 610331: '太白县', 610402: '秦都区', 610403: '杨陵区', 610404: '渭城区', 610422: '三原县', 610423: '泾阳县', 610424: '乾县', 610425: '礼泉县', 610426: '永寿县', 610428: '长武县', 610429: '旬邑县', 610430: '淳化县', 610431: '武功县', 610481: '兴平市', 610482: '彬州市', 610502: '临渭区', 610503: '华州区', 610522: '潼关县', 610523: '大荔县', 610524: '合阳县', 610525: '澄城县', 610526: '蒲城县', 610527: '白水县', 610528: '富平县', 610581: '韩城市', 610582: '华阴市', 610602: '宝塔区', 610603: '安塞区', 610621: '延长县', 610622: '延川县', 610623: '子长县', 610625: '志丹县', 610626: '吴起县', 610627: '甘泉县', 610628: '富县', 610629: '洛川县', 610630: '宜川县', 610631: '黄龙县', 610632: '黄陵县', 610702: '汉台区', 610703: '南郑区', 610722: '城固县', 610723: '洋县', 610724: '西乡县', 610725: '勉县', 610726: '宁强县', 610727: '略阳县', 610728: '镇巴县', 610729: '留坝县', 610730: '佛坪县', 610802: '榆阳区', 610803: '横山区', 610822: '府谷县', 610824: '靖边县', 610825: '定边县', 610826: '绥德县', 610827: '米脂县', 610828: '佳县', 610829: '吴堡县', 610830: '清涧县', 610831: '子洲县', 610881: '神木市', 610902: '汉滨区', 610921: '汉阴县', 610922: '石泉县', 610923: '宁陕县', 610924: '紫阳县', 610925: '岚皋县', 610926: '平利县', 610927: '镇坪县', 610928: '旬阳县', 610929: '白河县', 611002: '商州区', 611021: '洛南县', 611022: '丹凤县', 611023: '商南县', 611024: '山阳县', 611025: '镇安县', 611026: '柞水县', 620102: '城关区', 620103: '七里河区', 620104: '西固区', 620105: '安宁区', 620111: '红古区', 620121: '永登县', 620122: '皋兰县', 620123: '榆中县', 620201: '市辖区', 620290: '雄关区', 620291: '长城区', 620292: '镜铁区', 620293: '新城镇', 620294: '峪泉镇', 620295: '文殊镇', 620302: '金川区', 620321: '永昌县', 620402: '白银区', 620403: '平川区', 620421: '靖远县', 620422: '会宁县', 620423: '景泰县', 620502: '秦州区', 620503: '麦积区', 620521: '清水县', 620522: '秦安县', 620523: '甘谷县', 620524: '武山县', 620525: '张家川回族自治县', 620602: '凉州区', 620621: '民勤县', 620622: '古浪县', 620623: '天祝藏族自治县', 620702: '甘州区', 620721: '肃南裕固族自治县', 620722: '民乐县', 620723: '临泽县', 620724: '高台县', 620725: '山丹县', 620802: '崆峒区', 620821: '泾川县', 620822: '灵台县', 620823: '崇信县', 620825: '庄浪县', 620826: '静宁县', 620881: '华亭市', 620902: '肃州区', 620921: '金塔县', 620922: '瓜州县', 620923: '肃北蒙古族自治县', 620924: '阿克塞哈萨克族自治县', 620981: '玉门市', 620982: '敦煌市', 621002: '西峰区', 621021: '庆城县', 621022: '环县', 621023: '华池县', 621024: '合水县', 621025: '正宁县', 621026: '宁县', 621027: '镇原县', 621102: '安定区', 621121: '通渭县', 621122: '陇西县', 621123: '渭源县', 621124: '临洮县', 621125: '漳县', 621126: '岷县', 621202: '武都区', 621221: '成县', 621222: '文县', 621223: '宕昌县', 621224: '康县', 621225: '西和县', 621226: '礼县', 621227: '徽县', 621228: '两当县', 622901: '临夏市', 622921: '临夏县', 622922: '康乐县', 622923: '永靖县', 622924: '广河县', 622925: '和政县', 622926: '东乡族自治县', 622927: '积石山保安族东乡族撒拉族自治县', 623001: '合作市', 623021: '临潭县', 623022: '卓尼县', 623023: '舟曲县', 623024: '迭部县', 623025: '玛曲县', 623026: '碌曲县', 623027: '夏河县', 630102: '城东区', 630103: '城中区', 630104: '城西区', 630105: '城北区', 630121: '大通回族土族自治县', 630122: '湟中县', 630123: '湟源县', 630202: '乐都区', 630203: '平安区', 630222: '民和回族土族自治县', 630223: '互助土族自治县', 630224: '化隆回族自治县', 630225: '循化撒拉族自治县', 632221: '门源回族自治县', 632222: '祁连县', 632223: '海晏县', 632224: '刚察县', 632321: '同仁县', 632322: '尖扎县', 632323: '泽库县', 632324: '河南蒙古族自治县', 632521: '共和县', 632522: '同德县', 632523: '贵德县', 632524: '兴海县', 632525: '贵南县', 632621: '玛沁县', 632622: '班玛县', 632623: '甘德县', 632624: '达日县', 632625: '久治县', 632626: '玛多县', 632701: '玉树市', 632722: '杂多县', 632723: '称多县', 632724: '治多县', 632725: '囊谦县', 632726: '曲麻莱县', 632801: '格尔木市', 632802: '德令哈市', 632803: '茫崖市', 632821: '乌兰县', 632822: '都兰县', 632823: '天峻县', 640104: '兴庆区', 640105: '西夏区', 640106: '金凤区', 640121: '永宁县', 640122: '贺兰县', 640181: '灵武市', 640202: '大武口区', 640205: '惠农区', 640221: '平罗县', 640302: '利通区', 640303: '红寺堡区', 640323: '盐池县', 640324: '同心县', 640381: '青铜峡市', 640402: '原州区', 640422: '西吉县', 640423: '隆德县', 640424: '泾源县', 640425: '彭阳县', 640502: '沙坡头区', 640521: '中宁县', 640522: '海原县', 650102: '天山区', 650103: '沙依巴克区', 650104: '新市区', 650105: '水磨沟区', 650106: '头屯河区', 650107: '达坂城区', 650109: '米东区', 650121: '乌鲁木齐县', 650202: '独山子区', 650203: '克拉玛依区', 650204: '白碱滩区', 650205: '乌尔禾区', 650402: '高昌区', 650421: '鄯善县', 650422: '托克逊县', 650502: '伊州区', 650521: '巴里坤哈萨克自治县', 650522: '伊吾县', 652301: '昌吉市', 652302: '阜康市', 652323: '呼图壁县', 652324: '玛纳斯县', 652325: '奇台县', 652327: '吉木萨尔县', 652328: '木垒哈萨克自治县', 652701: '博乐市', 652702: '阿拉山口市', 652722: '精河县', 652723: '温泉县', 652801: '库尔勒市', 652822: '轮台县', 652823: '尉犁县', 652824: '若羌县', 652825: '且末县', 652826: '焉耆回族自治县', 652827: '和静县', 652828: '和硕县', 652829: '博湖县', 652901: '阿克苏市', 652922: '温宿县', 652923: '库车县', 652924: '沙雅县', 652925: '新和县', 652926: '拜城县', 652927: '乌什县', 652928: '阿瓦提县', 652929: '柯坪县', 653001: '阿图什市', 653022: '阿克陶县', 653023: '阿合奇县', 653024: '乌恰县', 653101: '喀什市', 653121: '疏附县', 653122: '疏勒县', 653123: '英吉沙县', 653124: '泽普县', 653125: '莎车县', 653126: '叶城县', 653127: '麦盖提县', 653128: '岳普湖县', 653129: '伽师县', 653130: '巴楚县', 653131: '塔什库尔干塔吉克自治县', 653201: '和田市', 653221: '和田县', 653222: '墨玉县', 653223: '皮山县', 653224: '洛浦县', 653225: '策勒县', 653226: '于田县', 653227: '民丰县', 654002: '伊宁市', 654003: '奎屯市', 654004: '霍尔果斯市', 654021: '伊宁县', 654022: '察布查尔锡伯自治县', 654023: '霍城县', 654024: '巩留县', 654025: '新源县', 654026: '昭苏县', 654027: '特克斯县', 654028: '尼勒克县', 654201: '塔城市', 654202: '乌苏市', 654221: '额敏县', 654223: '沙湾县', 654224: '托里县', 654225: '裕民县', 654226: '和布克赛尔蒙古自治县', 654301: '阿勒泰市', 654321: '布尔津县', 654322: '富蕴县', 654323: '福海县', 654324: '哈巴河县', 654325: '青河县', 654326: '吉木乃县', 659001: '石河子市', 659002: '阿拉尔市', 659003: '图木舒克市', 659004: '五家渠市', 659005: '北屯市', 659006: '铁门关市', 659007: '双河市', 659008: '可克达拉市', 659009: '昆玉市', 710101: '中正区', 710102: '大同区', 710103: '中山区', 710104: '松山区', 710105: '大安区', 710106: '万华区', 710107: '信义区', 710108: '士林区', 710109: '北投区', 710110: '内湖区', 710111: '南港区', 710112: '文山区', 710199: '其它区', 710201: '新兴区', 710202: '前金区', 710203: '芩雅区', 710204: '盐埕区', 710205: '鼓山区', 710206: '旗津区', 710207: '前镇区', 710208: '三民区', 710209: '左营区', 710210: '楠梓区', 710211: '小港区', 710241: '苓雅区', 710242: '仁武区', 710243: '大社区', 710244: '冈山区', 710245: '路竹区', 710246: '阿莲区', 710247: '田寮区', 710248: '燕巢区', 710249: '桥头区', 710250: '梓官区', 710251: '弥陀区', 710252: '永安区', 710253: '湖内区', 710254: '凤山区', 710255: '大寮区', 710256: '林园区', 710257: '鸟松区', 710258: '大树区', 710259: '旗山区', 710260: '美浓区', 710261: '六龟区', 710262: '内门区', 710263: '杉林区', 710264: '甲仙区', 710265: '桃源区', 710266: '那玛夏区', 710267: '茂林区', 710268: '茄萣区', 710299: '其它区', 710301: '中西区', 710302: '东区', 710303: '南区', 710304: '北区', 710305: '安平区', 710306: '安南区', 710339: '永康区', 710340: '归仁区', 710341: '新化区', 710342: '左镇区', 710343: '玉井区', 710344: '楠西区', 710345: '南化区', 710346: '仁德区', 710347: '关庙区', 710348: '龙崎区', 710349: '官田区', 710350: '麻豆区', 710351: '佳里区', 710352: '西港区', 710353: '七股区', 710354: '将军区', 710355: '学甲区', 710356: '北门区', 710357: '新营区', 710358: '后壁区', 710359: '白河区', 710360: '东山区', 710361: '六甲区', 710362: '下营区', 710363: '柳营区', 710364: '盐水区', 710365: '善化区', 710366: '大内区', 710367: '山上区', 710368: '新市区', 710369: '安定区', 710399: '其它区', 710401: '中区', 710402: '东区', 710403: '南区', 710404: '西区', 710405: '北区', 710406: '北屯区', 710407: '西屯区', 710408: '南屯区', 710431: '太平区', 710432: '大里区', 710433: '雾峰区', 710434: '乌日区', 710435: '丰原区', 710436: '后里区', 710437: '石冈区', 710438: '东势区', 710439: '和平区', 710440: '新社区', 710441: '潭子区', 710442: '大雅区', 710443: '神冈区', 710444: '大肚区', 710445: '沙鹿区', 710446: '龙井区', 710447: '梧栖区', 710448: '清水区', 710449: '大甲区', 710450: '外埔区', 710451: '大安区', 710499: '其它区', 710507: '金沙镇', 710508: '金湖镇', 710509: '金宁乡', 710510: '金城镇', 710511: '烈屿乡', 710512: '乌坵乡', 710614: '南投市', 710615: '中寮乡', 710616: '草屯镇', 710617: '国姓乡', 710618: '埔里镇', 710619: '仁爱乡', 710620: '名间乡', 710621: '集集镇', 710622: '水里乡', 710623: '鱼池乡', 710624: '信义乡', 710625: '竹山镇', 710626: '鹿谷乡', 710701: '仁爱区', 710702: '信义区', 710703: '中正区', 710704: '中山区', 710705: '安乐区', 710706: '暖暖区', 710707: '七堵区', 710799: '其它区', 710801: '东区', 710802: '北区', 710803: '香山区', 710899: '其它区', 710901: '东区', 710902: '西区', 710999: '其它区', 711130: '万里区', 711132: '板桥区', 711133: '汐止区', 711134: '深坑区', 711135: '石碇区', 711136: '瑞芳区', 711137: '平溪区', 711138: '双溪区', 711139: '贡寮区', 711140: '新店区', 711141: '坪林区', 711142: '乌来区', 711143: '永和区', 711144: '中和区', 711145: '土城区', 711146: '三峡区', 711147: '树林区', 711148: '莺歌区', 711149: '三重区', 711150: '新庄区', 711151: '泰山区', 711152: '林口区', 711153: '芦洲区', 711154: '五股区', 711155: '八里区', 711156: '淡水区', 711157: '三芝区', 711158: '石门区', 711287: '宜兰市', 711288: '头城镇', 711289: '礁溪乡', 711290: '壮围乡', 711291: '员山乡', 711292: '罗东镇', 711293: '三星乡', 711294: '大同乡', 711295: '五结乡', 711296: '冬山乡', 711297: '苏澳镇', 711298: '南澳乡', 711299: '钓鱼台', 711387: '竹北市', 711388: '湖口乡', 711389: '新丰乡', 711390: '新埔镇', 711391: '关西镇', 711392: '芎林乡', 711393: '宝山乡', 711394: '竹东镇', 711395: '五峰乡', 711396: '横山乡', 711397: '尖石乡', 711398: '北埔乡', 711399: '峨眉乡', 711414: '中坜区', 711415: '平镇区', 711417: '杨梅区', 711418: '新屋区', 711419: '观音区', 711420: '桃园区', 711421: '龟山区', 711422: '八德区', 711423: '大溪区', 711425: '大园区', 711426: '芦竹区', 711487: '中坜市', 711488: '平镇市', 711489: '龙潭乡', 711490: '杨梅市', 711491: '新屋乡', 711492: '观音乡', 711493: '桃园市', 711494: '龟山乡', 711495: '八德市', 711496: '大溪镇', 711497: '复兴乡', 711498: '大园乡', 711499: '芦竹乡', 711520: '头份市', 711582: '竹南镇', 711583: '头份镇', 711584: '三湾乡', 711585: '南庄乡', 711586: '狮潭乡', 711587: '后龙镇', 711588: '通霄镇', 711589: '苑里镇', 711590: '苗栗市', 711591: '造桥乡', 711592: '头屋乡', 711593: '公馆乡', 711594: '大湖乡', 711595: '泰安乡', 711596: '铜锣乡', 711597: '三义乡', 711598: '西湖乡', 711599: '卓兰镇', 711736: '员林市', 711774: '彰化市', 711775: '芬园乡', 711776: '花坛乡', 711777: '秀水乡', 711778: '鹿港镇', 711779: '福兴乡', 711780: '线西乡', 711781: '和美镇', 711782: '伸港乡', 711783: '员林镇', 711784: '社头乡', 711785: '永靖乡', 711786: '埔心乡', 711787: '溪湖镇', 711788: '大村乡', 711789: '埔盐乡', 711790: '田中镇', 711791: '北斗镇', 711792: '田尾乡', 711793: '埤头乡', 711794: '溪州乡', 711795: '竹塘乡', 711796: '二林镇', 711797: '大城乡', 711798: '芳苑乡', 711799: '二水乡', 711982: '番路乡', 711983: '梅山乡', 711984: '竹崎乡', 711985: '阿里山乡', 711986: '中埔乡', 711987: '大埔乡', 711988: '水上乡', 711989: '鹿草乡', 711990: '太保市', 711991: '朴子市', 711992: '东石乡', 711993: '六脚乡', 711994: '新港乡', 711995: '民雄乡', 711996: '大林镇', 711997: '溪口乡', 711998: '义竹乡', 711999: '布袋镇', 712180: '斗南镇', 712181: '大埤乡', 712182: '虎尾镇', 712183: '土库镇', 712184: '褒忠乡', 712185: '东势乡', 712186: '台西乡', 712187: '仑背乡', 712188: '麦寮乡', 712189: '斗六市', 712190: '林内乡', 712191: '古坑乡', 712192: '莿桐乡', 712193: '西螺镇', 712194: '二仑乡', 712195: '北港镇', 712196: '水林乡', 712197: '口湖乡', 712198: '四湖乡', 712199: '元长乡', 712451: '崁顶乡', 712467: '屏东市', 712468: '三地门乡', 712469: '雾台乡', 712470: '玛家乡', 712471: '九如乡', 712472: '里港乡', 712473: '高树乡', 712474: '盐埔乡', 712475: '长治乡', 712476: '麟洛乡', 712477: '竹田乡', 712478: '内埔乡', 712479: '万丹乡', 712480: '潮州镇', 712481: '泰武乡', 712482: '来义乡', 712483: '万峦乡', 712484: '莰顶乡', 712485: '新埤乡', 712486: '南州乡', 712487: '林边乡', 712488: '东港镇', 712489: '琉球乡', 712490: '佳冬乡', 712491: '新园乡', 712492: '枋寮乡', 712493: '枋山乡', 712494: '春日乡', 712495: '狮子乡', 712496: '车城乡', 712497: '牡丹乡', 712498: '恒春镇', 712499: '满州乡', 712584: '台东市', 712585: '绿岛乡', 712586: '兰屿乡', 712587: '延平乡', 712588: '卑南乡', 712589: '鹿野乡', 712590: '关山镇', 712591: '海端乡', 712592: '池上乡', 712593: '东河乡', 712594: '成功镇', 712595: '长滨乡', 712596: '金峰乡', 712597: '大武乡', 712598: '达仁乡', 712599: '太麻里乡', 712686: '花莲市', 712687: '新城乡', 712688: '太鲁阁', 712689: '秀林乡', 712690: '吉安乡', 712691: '寿丰乡', 712692: '凤林镇', 712693: '光复乡', 712694: '丰滨乡', 712695: '瑞穗乡', 712696: '万荣乡', 712697: '玉里镇', 712698: '卓溪乡', 712699: '富里乡', 712794: '马公市', 712795: '西屿乡', 712796: '望安乡', 712797: '七美乡', 712798: '白沙乡', 712799: '湖西乡', 712896: '南竿乡', 712897: '北竿乡', 712898: '东引乡', 712899: '莒光乡', 810101: '中西区', 810102: '湾仔区', 810103: '东区', 810104: '南区', 810201: '九龙城区', 810202: '油尖旺区', 810203: '深水埗区', 810204: '黄大仙区', 810205: '观塘区', 810301: '北区', 810302: '大埔区', 810303: '沙田区', 810304: '西贡区', 810305: '元朗区', 810306: '屯门区', 810307: '荃湾区', 810308: '葵青区', 810309: '离岛区', 820101: '澳门半岛', 820201: '离岛' } }; media_750.js (function flexible(window, document) { var docEl = document.documentElement; var dpr = window.devicePixelRatio || 1; // adjust body font size function setBodyFontSize() { if (document.body) { } else { document.addEventListener("DOMContentLoaded", setBodyFontSize); } } setBodyFontSize(); // set 1rem = viewWidth / 10 function setRemUnit() { var rem = docEl.clientWidth / 7.5; docEl.style.fontSize = rem + "px"; } setRemUnit(); // reset rem unit on page resize window.addEventListener("resize", setRemUnit); window.addEventListener("pageshow", function(e) { if (e.persisted) { setRemUnit(); } }); // detect 0.5px supports if (dpr >= 2) { var fakeBody = document.createElement("body"); var testElement = document.createElement("div"); testElement.style.border = ".5px solid transparent"; fakeBody.appendChild(testElement); docEl.appendChild(fakeBody); if (testElement.offsetHeight === 1) { docEl.classList.add("hairlines"); } docEl.removeChild(fakeBody); } })(window, document); componentsAddressWindow.vue 选择地址 {{ item.real_name }}{{ item.phone }} {{ item.province }}{{ item.city }}{{ item.district }}{{ item.detail }} <div class="pictrue" v-if="addressList.length < 1"> 新加地址 CountDown.vue {{ tipText }}{{ day }}{{ dayText }}{{ hour }}{{ hourText }}{{ minute }}{{ minuteText }}{{ second }}{{ secondText }} CouponListWindow.vue 优惠券 0"> ￥ {{ coupon.coupon_price }} {{ coupon.coupon_title }} {{ coupon.start_time ? coupon.start_time + "-" : "" }}{{ coupon.end_time }} 不使用优惠券 CouponPop.vue 优惠券 0"> ￥{{ item.coupon_price }} 购物满{{ item.use_min_price }}元可用 {{ item.start_time ? item.start_time + "-" : "" }}{{ item.end_time }} CouponWindow.vue 0"> ￥{{ item.coupon_price }} 购物买{{ item.use_min_price }}减{{ item.coupon_price }} {{ item.start_time ? item.start_time + "-" : "" }}{{ item.end_time }} 立即领取 Footer.vue {{ item.name }} GoodList.vue {{ item.store_name }} ￥{{ item.price }} 0"> ￥ 已售{{ item.sales }}{{ item.unit_name }} HelloWorld.vue {{ msg }} For a guide and recipes on how to configure / customize this project, check out the vue-cli documentation. Installed CLI Plugins babel eslint Essential Links Core Docs Forum Community Chat Twitter News Ecosystem vue-router vuex vue-devtools vue-loader awesome-vue Home.vue Loading.vue 正在加载中 上拉加载更多 OrderGoods.vue 共{{ cartInfo.length }}件商品 {{ cart.productInfo.store_name }} x {{ cart.cart_num }} {{ cart.productInfo.attrInfo.suk }} ￥{{ cart.truePrice }} 评价 Payment.vue 选择付款方式 微信支付 使用微信快捷支付 支付宝支付 使用线上支付宝支付 余额支付 当前可用余额：{{ balance }} 线下支付 选择线下付款方式 PriceChange.vue {{ status == 0 ? orderInfo.refund_status === 1 ? "立即退款" : "一键改价" : "订单备注" }} 商品总价(¥) {{ orderInfo.total_price }} 原始邮费(¥) {{ orderInfo.pay_postage }} 实际支付(¥) 实际支付(¥) {{ orderInfo.pay_price }} 退款金额(¥) {{ orderInfo.refund_status === 0 ? "立即修改" : "确认退款" }} 拒绝退款 ProductConSwiper.vue 0" > / ProductWindow.vue {{ attr.productSelect.store_name }} ￥{{ attr.productSelect.price }}库存: {{ attr.productSelect.stock }} {{ item.attr_name }} {{ itemn.attr }} 数量 <div class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''" @click="CartNumDes" > - {{ attr.productSelect.cart_num }} = attr.productSelect.stock ? 'on' : '' " @click="CartNumAdd" > + PromotionGood.vue 0"> {{ item.store_name }} 促销价: ￥{{ item.price }} 日常价：￥{{ item.ot_price }} 仅剩：{{ item.stock }}{{ item.unit_name }} Recommend.vue 为你推荐 {{ item.store_name }} ￥{{ item.price }} ShareInfo.vue ShareRedPackets.vue 会员分享返 ￥{{ priceName }} 下单即返佣金 立即分享 StorePoster.vue 长按识别二维码 立即购买 长按图片可以保存到手机 SwitchWindow.vue 是否选择切换到微信账号 手机用户？ 切换 取消 UserEvaluation.vue {{ item.nickname }} {{ item.add_time }} {{ item.suk }} {{ item.comment }} 店小二：{{ item.merchant_reply_content }} WriteOff.vue {{ orderInfo.order_id }} 确定要核销此订单吗？ 确定核销 取消 libschat.js import $store from "@/store"; import { VUE_APP_WS_URL } from "@utils"; const Socket = function() { this.ws = new WebSocket(VUE_APP_WS_URL); this.ws.onopen = this.onOpen.bind(this); this.ws.onerror = this.onError.bind(this); this.ws.onmessage = this.onMessage.bind(this); this.ws.onclose = this.onClose.bind(this); }; Socket.prototype = { vm(vm) { this.vm = vm; }, close() { clearInterval(this.timer); this.ws.close(); }, onOpen: function() { console.log("ws open"); this.init(); this.send({ type: "login", data: $store.state.app.token }); this.vm.$emit("socket_open"); }, init: function() { var that = this; this.timer = setInterval(function() { that.send({ type: "ping" }); }, 10000); }, send: function(data) { return this.ws.send(JSON.stringify(data)); }, onMessage: function(res) { const { type, data = {} } = JSON.parse(res.data); this.vm.$emit(type, data); }, onClose: function() { clearInterval(this.timer); }, onError: function(e) { console.log(e); this.vm.$emit("socket_error", e); } }; Socket.prototype.constructor = Socket; export default Socket; login.js import router from "../router"; import store from "../store"; import cookie from "@utils/store/cookie"; import { isWeixin } from "@utils"; import { oAuth } from "@libs/wechat"; export default function toLogin(push, backUrl) { store.commit("LOGOUT"); const { fullPath, name } = router.currentRoute; cookie.set("login_back_url", backUrl || fullPath); if (isWeixin()) { oAuth(); } else { if (name !== "Login") { push ? router.push({ path: "/login" }) : router.replace({ path: "/login" }); } } } order.js import { cancelOrder, takeOrder, delOrder, payOrder } from "@api/order"; import dialog from "@utils/dialog"; import { pay } from "@libs/wechat"; export function cancelOrderHandle(orderId) { return new Promise((resolve, reject) => { dialog.confirm({ mes: "确认取消该订单?", opts() { cancelOrder(orderId) .then(res => { dialog.success("取消成功"); resolve(res); }) .catch(err => { dialog.error("取消失败"); reject(err); }); } }); }); } export function takeOrderHandle(orderId) { return new Promise((resolve, reject) => { takeOrder(orderId) .then(res => { dialog.success("收货成功"); resolve(res); }) .catch(err => { dialog.error("收货失败"); reject(err); }); }); } export function delOrderHandle(orderId) { return new Promise((resolve, reject) => { dialog.confirm({ mes: "确认删除该订单?", opts() { delOrder(orderId) .then(res => { dialog.success("删除成功"); resolve(res); }) .catch(err => { dialog.error("删除失败"); reject(err); }); } }); }); } export function payOrderHandle(orderId, type, from) { return new Promise((resolve, reject) => { dialog.loading.open(""); payOrder(orderId, type, from) .then(res => { const data = res.data; dialog.loading.close(); switch (data.status) { case "WECHAT_H5_PAY": reject(data); setTimeout(() => { location.replace(data.result.jsConfig.mweb_url); }, 100); break; case "ORDER_EXIST": case "EXTEND_ORDER": case "PAY_ERROR": case "PAY_DEFICIENCY": dialog.toast({ mes: res.msg }); reject(data); break; case "SUCCESS": dialog.success(res.msg); resolve(data); break; case "WECHAT_PAY": pay(data.result.jsConfig).then(() => { resolve(data); }); } }) .catch(err => { dialog.loading.close(); dialog.toast({ mes: err.msg || "订单支付失败" }); }); }); } wechat.js import WechatJSSDK from "wechat-jssdk/dist/client.umd"; import { getWechatConfig, wechatAuth } from "@api/public"; import { parseQuery } from "@utils"; import cookie from "@utils/store/cookie"; import store from "@/store"; import dayjs from "dayjs"; const STATE_KEY = "wx_authorize_state"; const WX_AUTH = "wx_auth"; const BACK_URL = "login_back_url"; const LOGINTYPE = "loginType"; let instance; let wechatObj; export default function wechat() { return new Promise((resolve, reject) => { if (instance) return resolve(instance); getWechatConfig() .then(res => { const _wx = WechatJSSDK(res.data); wechatObj = _wx; _wx .initialize() .then(() => { instance = _wx.wx; instance.initConfig = res.data; resolve(instance); }) .catch(reject); }) .catch(err => { console.log(err); reject(err); }); }); } export function clearAuthStatus() { cookie.remove(WX_AUTH); cookie.remove(STATE_KEY); } export function oAuth() { if (cookie.has(WX_AUTH) && store.state.app.token) return; const { code } = parseQuery(); if (!code) return toAuth(); } export function auth(code) { return new Promise((resolve, reject) => { let loginType = cookie.get(LOGINTYPE); //if (state !== cookie.get(STATE_KEY)) return reject(); wechatAuth(code, parseInt(cookie.get("spread")), loginType) .then(({ data }) => { const expires_time = dayjs(data.expires_time); const newTime = Math.round(new Date() / 1000); store.commit("LOGIN", data.token, expires_time - newTime); cookie.set(WX_AUTH, code, expires_time); cookie.remove(STATE_KEY); loginType && cookie.remove("loginType"); resolve(); }) .catch(reject); }); } export function toAuth() { wechat().then(wx => { location.href = getAuthUrl(wx.initConfig.appId); }); } function getAuthUrl(appId) { const redirect_uri = encodeURIComponent( `${location.origin}/auth/` + encodeURIComponent( encodeURIComponent( cookie.has(BACK_URL) ? cookie.get(BACK_URL) : location.pathname + location.search ) ) ); cookie.remove(BACK_URL); const state = encodeURIComponent( ("" + Math.random()).split(".")[1] + "authorizestate" ); cookie.set(STATE_KEY, state); return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=${state}#wechat_redirect`; } function toPromise(fn, config = {}) { return new Promise((resolve, reject) => { fn({ ...config, success(res) { resolve(res); }, fail(err) { reject(err); }, complete(err) { reject(err); }, cancel(err) { reject(err); } }); }); } export function pay(config) { return toPromise(instance.chooseWXPay, config); } export function openAddress() { return new Promise((resolve, reject) => { wechatEvevt("openAddress", {}) .then(res => { console.log(res); resolve(res); }) .catch(res => { console.log(res); if (res.is_ready) { res.wx.openAddress({ fail(res) { reject(res); }, success(res) { resolve(res); } }); } else { reject(res); } }); }); } export function openShareAll(config) { config || {}; config.type = config.type == undefined ? "link" : config.type; return new Promise(resolve => { getWechatConfig().then(res => { wechatObj.signSignature({ nonceStr: res.data.nonceStr, signature: res.data.signature, timestamp: res.data.timestamp }); instance = wechatObj.getOriginalWx(); instance.ready(() => { instance.updateAppMessageShareData(config); instance.updateTimelineShareData(config); resolve(); }); }); }); } export function openShareAppMessage(config) { instance.updateAppMessageShareData(config); instance.onMenuShareAppMessage && instance.onMenuShareAppMessage(config); } export function openShareTimeline(config) { instance.updateTimelineShareData(config); instance.onMenuShareTimeline && instance.onMenuShareTimeline(config); } /** * 公众号事件 * @param name 事件名 * @param config 配置 * @returns {Promise<unknown>} */ export function wechatEvevt(name, config) { return new Promise((resolve, reject) => { let wx; let configDefault = { fail(res) { console.log(res); if (wx) return reject({ is_ready: true, wx: wx }); getWechatConfig().then(res => { wechatObj.signSignature({ nonceStr: res.data.nonceStr, signature: res.data.signature, timestamp: res.data.timestamp }); wx = wechatObj.getOriginalWx(); reject({ is_ready: true, wx: wx }); }); }, success(res) { resolve(res); } }; Object.assign(configDefault, config); if (typeof instance !== "undefined") { instance.ready(() => { if (typeof name === "object") { name.forEach(item => { instance[item] && instance[item](configDefault); }); } else instance[name] && instance[name](configDefault); }); } else { getWechatConfig().then(res => { const _wx = WechatJSSDK(res.data); _wx.initialize().then(() => { instance = _wx.getOriginalWx(); instance.ready(() => { if (typeof name === "object") { name.forEach(item => { instance[item] && instance[item](configDefault); }); } else instance[name] && instance[name](configDefault); }); }); }); } }); } export function ready() { return new Promise(resolve => { if (typeof instance !== "undefined") { instance.ready(() => { resolve(instance); }); } else { getWechatConfig().then(res => { const _wx = WechatJSSDK(res.data); _wx.initialize().then(() => { instance = _wx.wx; instance.ready(() => { resolve(instance); }); }); }); } }); } main.js import Vue from "vue"; import App from "./App.vue"; import router from "./router"; import store from "./store"; import animate from "animate.css"; import schema from "async-validator"; import dialog from "./utils/dialog"; import $scroll from "@utils/loading"; import cookie from "@utils/store/cookie"; import "@assets/iconfont/iconfont"; import "@assets/iconfont/iconfont.css"; import "@assets/js/media_750"; import "vue-ydui/dist/ydui.base.css"; import "@assets/css/base.css"; import "@assets/css/reset.css"; import "@assets/css/style.css"; import { isWeixin, parseQuery } from "@utils"; Vue.use(animate); Vue.config.productionTip = false; Vue.config.devtools = process.env.NODE_ENV !== "production"; Vue.prototype.$validator = function(rule) { return new schema(rule); }; Vue.prototype.$scroll = $scroll; Vue.prototype.$dialog = dialog; const CACHE_KEY = "clear_0.0.1"; if (!cookie.has(CACHE_KEY)) { cookie.clearAll(); cookie.set(CACHE_KEY, 1); } let cookieName = "VCONSOLE"; let query = parseQuery(); let urlSpread = query["spread"]; let vconsole = query[cookieName.toLowerCase()]; let md5Crmeb = "b14d1e9baeced9bb7525ab19ee35f2d2"; //CRMEB MD5 加密开启vconsole模式 let md5UnCrmeb = "3dca2162c4e101b7656793a1af20295c"; //UN_CREMB MD5 加密关闭vconsole模式 if (urlSpread !== undefined) { var spread = cookie.get("spread"); urlSpread = parseInt(urlSpread); if (!Number.isNaN(urlSpread) && spread !== urlSpread) { cookie.set("spread", urlSpread || 0); } else if (spread === 0 || typeof spread !== "number") { cookie.set("spread", urlSpread || 0); } } const _isWechat = isWeixin(); if (vconsole !== undefined) { if (vconsole === md5UnCrmeb && cookie.has(cookieName)) cookie.remove(cookieName); } else vconsole = cookie.get(cookieName); if (vconsole !== undefined && vconsole === md5Crmeb) { cookie.set(cookieName, md5Crmeb, 3600); const module = () => import("vconsole"); module().then(Module => { new Module.default(); }); } if (_isWechat) { const module = () => import("@libs/wechat"); module().then(Module => { Module.default().then(() => Module.oAuth()); }); } const $vm = new Vue({ router, store, render: h => h(App) }); setTimeout(() => { $vm.$mount("#app"); }, 300); mixinsSendVerifyCode.js export default { data() { return { disabled: false, text: "获取验证码" }; }, methods: { sendCode() { if (this.disabled) return; this.disabled = true; let n = 60; this.text = "剩余 " + n + "s"; const run = setInterval(() => { n = n - 1; if (n < 0) { clearInterval(run); } this.text = "剩余 " + n + "s"; if (this.text < "剩余 " + 0 + "s") { this.disabled = false; this.text = "重新获取"; } }, 1000); } } }; routerindex.js import Vue from "vue"; import Router from "vue-router"; import module from "./module"; import Index from "@views/home/Index"; import Search from "@views/shop/GoodSearch"; import Category from "@views/shop/GoodsClass"; import ShoppingCart from "@views/shop/ShoppingCart"; import GoodsList from "@views/shop/GoodsList"; import NotDefined from "@views/NotDefined"; import $store from "../store"; import toLogin from "@libs/login"; import Loading from "@views/Loading"; Vue.use(Router); const router = new Router({ mode: "history", routes: [ { path: "/", name: "Index", meta: { title: "首页", keepAlive: true, footer: true, backgroundColor: "#fff" }, component: Index }, { path: "/customer/chat/:id", name: "CustomerService", meta: { title: "客服聊天", keepAlive: false, auth: true }, component: () => import("@views/user/CustomerService.vue") }, { path: "/category/:pid?", name: "GoodsClass", meta: { title: "产品分类", keepAlive: true, footer: true, backgroundColor: "#fff" }, component: Category }, { path: "/collection", name: "GoodsCollection", meta: { title: "收藏商品", keepAlive: false, auth: true }, component: () => import("@views/shop/GoodsCollection.vue") }, { path: "/search", name: "GoodSearch", meta: { title: "搜索商品", keepAlive: true, backgroundColor: "#fff" }, component: Search }, { path: "/news_detail/:id", name: "NewsDetail", meta: { title: "新闻详情", keepAlive: true, backgroundColor: "#fff" }, component: () => import("@views/shop/news/NewsDetail.vue") }, { path: "/news_list", name: "NewsList", meta: { title: "新闻", keepAlive: true, backgroundColor: "#fff" }, component: () => import("@views/shop/news/NewsList.vue") }, { path: "/evaluate_list/:id", name: "EvaluateList", meta: { title: "商品评分", keepAlive: true, auth: true }, component: () => import("@views/shop/EvaluateList.vue") }, { path: "/goods_evaluate/:id", name: "GoodsEvaluate", meta: { title: "商品评价", keepAlive: true, auth: true }, component: () => import("@views/shop/GoodsEvaluate.vue") }, { path: "/promotion", name: "GoodsPromotion", meta: { title: "促销单品", keepAlive: false }, component: () => import("@views/shop/GoodsPromotion.vue") }, { path: "/hot_new_goods/:type", name: "HotNewGoods", meta: { title: "热门榜单", keepAlive: false }, component: () => import("@views/shop/HotNewGoods.vue") }, { path: "/detail/:id", name: "GoodsCon", meta: { title: "商品详情", keepAlive: false }, component: () => import("@views/shop/GoodsCon.vue") }, { path: "/cart", name: "ShoppingCart", meta: { title: "购物车", keepAlive: true, footer: true, auth: true }, component: ShoppingCart }, { path: "/goods_list", name: "GoodsList", meta: { title: "商品列表", keepAlive: true }, component: GoodsList }, { path: "/register", name: "Register", meta: { title: "注册", keepAlive: true }, component: () => import(/* webpackChunkName: "login" */ "@views/user/Register.vue") }, { path: "/change_password", name: "ChangePassword", meta: { title: "修改密码", keepAlive: true, backgroundColor: "#fff", auth: true }, component: () => import(/* webpackChunkName: "login" */ "@views/user/ChangePassword.vue") }, { path: "/retrieve_password", name: "RetrievePassword", meta: { title: "找回密码", keepAlive: true }, component: () => import(/* webpackChunkName: "login" */ "@views/user/RetrievePassword.vue") }, { path: "/login", name: "Login", meta: { title: "登录", keepAlive: true }, component: () => import(/* webpackChunkName: "login" */ "@views/user/Login.vue") }, ...module, { path: "/auth/:url", name: "Loading", meta: { title: " 加载中", keepAlive: true }, component: Loading }, { path: "*", name: "NotDefined", meta: { title: "页面找不到", keepAlive: true, home: false, backgroundColor: "#F4F6FB" }, component: NotDefined } ], scrollBehavior(to, from) { from.meta.scrollTop = window.scrollY; return { x: 0, y: to.meta.scrollTop || 0 }; } }); const { back, replace } = router; router.back = function() { this.isBack = true; back.call(router); }; router.replace = function(...args) { this.isReplace = true; replace.call(router, ...args); }; router.beforeEach((to, form, next) => { const { title, backgroundColor, footer, home, auth } = to.meta; console.log(to.name, form.name); if (auth === true && !$store.state.app.token) { if (form.name === "Login") return; return toLogin(true, to.fullPath); } document.title = title || process.env.VUE_APP_NAME || "crmeb商城"; //判断是否显示底部导航 footer === true ? $store.commit("SHOW_FOOTER") : $store.commit("HIDE_FOOTER"); //控制悬浮按钮是否显示 home === false ? $store.commit("HIDE_HOME") : $store.commit("SHOW_HOME"); $store.commit("BACKGROUND_COLOR", backgroundColor || "#F5F5F5"); if (auth) { $store.dispatch("USERINFO").then(() => { next(); }); } else next(); }); export default router; moduleactivity.js export default [ { path: "/activity" }, { path: "/activity/goods_seckill", name: "GoodsSeckill", meta: { title: "限时抢购", keepAlive: true, backgroundColor: "#ffffff" }, component: () => import("@views/activity/GoodsSeckill.vue") }, { path: "/activity/seckill_detail/:id?/:time", name: "SeckillDetails", meta: { title: "抢购详情页", keepAlive: true }, component: () => import("@views/activity/SeckillDetails.vue") } ]; index.js import user from "./user"; import order from "./order"; import activity from "./activity"; export default [...user, ...order, ...activity]; order.js export default [ { path: "/order/list/:type?", name: "MyOrder", meta: { title: "我的订单", keepAlive: false, auth: true }, component: () => import("@views/order/MyOrder") }, { path: "/order/logistics/:id", name: "Logistics", meta: { title: "物流信息", keepAlive: true, auth: true }, component: () => import("@views/order/Logistics") }, { path: "/order/detail/:id", name: "OrderDetails", meta: { title: "订单详情", keepAlive: false, auth: true }, component: () => import("@views/order/OrderDetails") }, { path: "/order/submit/:id", name: "OrderSubmission", meta: { title: "提交订单", keepAlive: true, auth: true }, component: () => import("@views/order/OrderSubmission") }, { path: "/order/status/:id/:status", name: "PaymentStatus", meta: { title: "支付状态", keepAlive: true, auth: true }, component: () => import("@views/order/PaymentStatus") }, { path: "/order/refund/:id", name: "GoodsReturn", meta: { title: "申请退货", keepAlive: true, auth: true }, component: () => import("@views/order/GoodsReturn.vue") }, { path: "/order/refund_list", name: "ReturnList", meta: { title: "退货列表", keepAlive: true, auth: true }, component: () => import("@views/order/ReturnList.vue") } ]; user.js import User from "@views/user/User"; export default [ { path: "/user", name: "User", meta: { title: "个人中心", keepAlive: true, footer: true, auth: true }, component: User }, { path: "/user/binding", name: "BindingPhone", meta: { title: "绑定手机", keepAlive: true, backgroundColor: "#fff", auth: true }, component: () => import("@views/user/BindingPhone.vue") }, { path: "/user/add_address/:id?", name: "AddAddress", meta: { title: "添加收货地址", keepAlive: true, auth: true }, component: () => import("@views/user/address/AddAddress.vue") }, { path: "/user/account", name: "UserAccount", meta: { title: "我的账户", keepAlive: true, auth: true }, component: () => import("@views/user/UserAccount.vue") }, { path: "/user/add_manage", name: "AddressManagement", meta: { title: "地址管理", keepAlive: true, auth: true }, component: () => import("@views/user/address/AddressManagement.vue") }, { path: "/user/poster", name: "Poster", meta: { title: "分销海报", keepAlive: false, backgroundColor: "#a3a3a3", auth: true }, component: () => import("@views/user/promotion/Poster.vue") }, { path: "/user/sign", name: "Sign", meta: { title: "签到", keepAlive: true, auth: true }, component: () => import("@views/user/signIn/Sign.vue") }, { path: "/user/sign_record", name: "SignRecord", meta: { title: "签到记录", keepAlive: true }, component: () => import("@views/user/signIn/SignRecord.vue") }, { path: "/user/cash", name: "UserCash", meta: { title: "提现", keepAlive: true, auth: true }, component: () => import("@views/user/promotion/UserCash.vue") }, { path: "/user/audit", name: "CashAudit", meta: { title: "提现审核", keepAlive: true, auth: true }, component: () => import("@views/user/promotion/CashAudit.vue") }, { path: "/user/promoter_order", name: "PromoterOrder", meta: { title: "推广人订单", keepAlive: true, auth: true }, component: () => import("@views/user/promotion/PromoterOrder.vue") }, { path: "/user/promoter_list", name: "PromoterList", meta: { title: "推广人列表", keepAlive: true, auth: true }, component: () => import("@views/user/promotion/PromoterList.vue") }, { path: "/user/user_promotion", name: "UserPromotion", meta: { title: "我的推广", keepAlive: true, auth: true }, component: () => import("@views/user/promotion/UserPromotion.vue") }, { path: "/user/bill/:types?", name: "UserBill", meta: { title: "账单明细", keepAlive: true, auth: true }, component: () => import("@views/user/UserBill.vue") }, { path: "/user/cashrecord", name: "CashRecord", meta: { title: "提现记录", keepAlive: true, auth: true }, component: () => import("@views/user/promotion/CashRecord.vue") }, { path: "/user/commission", name: "CommissionDetails", meta: { title: "佣金明细", keepAlive: true, auth: true }, component: () => import("@views/user/promotion/CommissionDetails.vue") }, { path: "/user/integral", name: "Integral", meta: { title: "积分详情", keepAlive: true, auth: true }, component: () => import("@views/user/signIn/Integral.vue") }, { path: "/user/vip", name: "UserVip", meta: { title: "会员中心", keepAlive: true, auth: true }, component: () => import("@views/user/UserVip.vue") }, { path: "/user/data", name: "PersonalData", meta: { title: "个人资料", keepAlive: true, auth: true }, component: () => import("@views/user/PersonalData.vue") }, { path: "/user/user_coupon", name: "UserCoupon", meta: { title: "我的优惠券", keepAlive: true, auth: true }, component: () => import("@views/user/coupon/UserCoupon.vue") }, { path: "/user/get_coupon", name: "GetCoupon", meta: { title: "领取优惠券", keepAlive: true }, component: () => import("@views/user/coupon/GetCoupon.vue") }, { path: "/user/user_cash", name: "UserCash", meta: { title: "申请提现", keepAlive: true, auth: true }, component: () => import("@views/user/promotion/UserCash.vue") }, { path: "/customer/list", name: "CustomerList", meta: { title: "客服列表", keepAlive: true, auth: true }, component: () => import("@views/user/CustomerList.vue") }, { path: "/user/Recharge", name: "Recharge", meta: { title: "余额充值", keepAlive: true, auth: true }, component: () => import("@views/user/Recharge.vue") }, { path: "/user/promoter_rank", name: "PromoterRank", meta: { title: "推广人排行", keepAlive: true, auth: true }, component: () => import("@views/user/promotion/PromoterRank.vue") }, { path: "/user/commission/rank", name: "CommissionRank", meta: { title: "佣金排行", keepAlive: true, auth: true }, component: () => import("@views/user/promotion/CommissionRank.vue") } ]; storegetters.js export default { footer: state => state.app.footer, homeActive: state => state.app.homeActive, home: state => state.app.home, token: state => state.app.token, isLogin: state => !!state.app.token, backgroundColor: state => state.app.backgroundColor, userInfo: state => state.app.userInfo || {} }; index.js import Vue from "vue"; import Vuex from "vuex"; import modules from "./modules"; import getters from "./getters"; Vue.use(Vuex); const debug = process.env.NODE_ENV !== "production"; export default new Vuex.Store({ modules, getters, strict: debug }); modulesapp.js import store from "@utils/store/cookie"; import { getUserInfo } from "@api/user"; import dialog from "@utils/dialog"; const LOGIN_KEY = "login_status"; const state = { footer: true, home: true, homeActive: false, token: store.get(LOGIN_KEY) || null, backgroundColor: "#fff", userInfo: null }; const mutations = { SHOW_FOOTER(state) { state.footer = true; }, HIDE_FOOTER(state) { state.footer = false; }, SHOW_HOME(state) { state.home = true; }, HIDE_HOME(state) { state.home = false; }, OPEN_HOME(state) { state.homeActive = true; }, CLOSE_HOME(state) { state.homeActive = false; }, LOGIN(state, token, expires_time) { state.token = token; store.set(LOGIN_KEY, token, expires_time); }, LOGOUT(state) { state.token = undefined; store.remove(LOGIN_KEY); }, BACKGROUND_COLOR(state, color) { state.color = color; document.body.style.backgroundColor = color; }, UPDATE_USERINFO(state, userInfo) { state.userInfo = userInfo; } }; const actions = { USERINFO({ state, commit }, force) { if (state.userInfo !== null && !force) return Promise.resolve(state.userInfo); else return new Promise(reslove => { getUserInfo().then(res => { commit("UPDATE_USERINFO", res.data); reslove(res.data); }); }).catch(() => { dialog.error("获取信息失败!"); }); } }; export default { state, mutations, actions }; index.js import app from "./app"; export default { app }; utilsbc.js //除法函数，用来得到精确的除法结果 //说明：javascript的除法结果会有误差，在两个浮点数相除的时候会比较明显。这个函数返回较为精确的除法结果。 //调用：div(arg1,arg2) //返回值：arg1除以arg2的精确结果 export function div(arg1, arg2) { var t1 = 0, t2 = 0, r1, r2; try { t1 = arg1.toString().split(".")[1].length; } catch (e) { t1 = 0; } try { t2 = arg2.toString().split(".")[1].length; } catch (e) { t2 = 0; } r1 = Number(arg1.toString().replace(".", "")); r2 = Number(arg2.toString().replace(".", "")); return mul(r1 / r2, Math.pow(10, t2 - t1)); } //乘法函数，用来得到精确的乘法结果 //说明：javascript的乘法结果会有误差，在两个浮点数相乘的时候会比较明显。这个函数返回较为精确的乘法结果。 //调用：mul(arg1,arg2) //返回值：arg1乘以arg2的精确结果 export function mul(arg1, arg2) { var m = 0, s1 = arg1.toString(), s2 = arg2.toString(); try { m += s1.split(".")[1].length; } catch (e) { m = 0; } try { m += s2.split(".")[1].length; } catch (e) { m = m || 0; } return ( (Number(s1.replace(".", "")) * Number(s2.replace(".", ""))) / Math.pow(10, m) ); } //加法函数，用来得到精确的加法结果 //说明：javascript的加法结果会有误差，在两个浮点数相加的时候会比较明显。这个函数返回较为精确的加法结果。 //调用：add(arg1,arg2) //返回值：arg1加上arg2的精确结果 export function add(arg1, arg2) { var r1, r2, m, n; try { r1 = arg1.toString().split(".")[1].length; } catch (e) { r1 = 0; } try { r2 = arg2.toString().split(".")[1].length; } catch (e) { r2 = 0; } m = Math.pow(10, Math.max(r1, r2)); n = r1 >= r2 ? r1 : r2; return ((arg1 * m + arg2 * m) / m).toFixed(n); } //减法函数，用来得到精确的减法结果 //说明：javascript的加法结果会有误差，在两个浮点数相加的时候会比较明显。这个函数返回较为精确的减法结果。 //调用：sub(arg1,arg2) //返回值：arg1减去arg2的精确结果 export function sub(arg1, arg2) { var r1, r2, m, n; try { r1 = arg1.toString().split(".")[1].length; } catch (e) { r1 = 0; } try { r2 = arg2.toString().split(".")[1].length; } catch (e) { r2 = 0; } m = Math.pow(10, Math.max(r1, r2)); //动态控制精度长度 n = r1 >= r2 ? r1 : r2; return ((arg1 * m - arg2 * m) / m).toFixed(n); } function Compute(value) { this.value = value; } Object.assign(Compute.prototype, { add(v) { this.value = add(this.value, v); return this; }, sub(v) { this.value = sub(this.value, v); return this; }, div(v) { this.value = div(this.value, v); return this; }, mul(v) { this.value = mul(this.value, v); return this; } }); export default function(value) { return new Compute(value); } dialog.js import { Confirm as confirm, Alert as alert, Toast as toast, Notify as notify, Loading as loading } from "vue-ydui/dist/lib.rem/dialog"; const dialog = { confirm, alert, toast, notify, loading }; const icons = { error: "操作失败", success: "操作成功" }; Object.keys(icons).reduce((dialog, key) => { dialog[key] = (mes, obj = {}) => { return new Promise(function(resolve) { toast({ mes: mes || icons[key], timeout: 1000, icon: key, callback: () => { resolve(); }, ...obj }); }); }; return dialog; }, dialog); dialog.message = (mes = "操作失败", obj = {}) => { return new Promise(function(resolve) { toast({ mes, timeout: 1000, callback: () => { resolve(); }, ...obj }); }); }; dialog.validateError = (...args) => { validatorDefaultCatch(...args); }; export function validatorDefaultCatch(err, type = "message") { return dialog[type](err.errors[0].message); } export default dialog; emoji.js export default [ "em-smile", "em-laughing", "em-blush", "em-smiley", "em-relaxed", "em-smirk", "em-heart_eyes", "em-kissing_heart", "em-kissing_closed_eyes", "em-flushed", "em-relieved", "em-satisfied", "em-grin", "em-wink", "em-stuck_out_tongue_winking_eye", "em-stuck_out_tongue_closed_eyes", "em-grinning", "em-kissing", "em-kissing_smiling_eyes", "em-stuck_out_tongue", "em-sleeping", "em-worried", "em-frowning", "em-anguished", "em-open_mouth", "em-grimacing", "em-confused", "em-hushed", "em-expressionless", "em-unamused", "em-sweat_smile", "em-sweat", "em-disappointed_relieved", "em-weary", "em-pensive", "em-disappointed", "em-confounded", "em-fearful", "em-cold_sweat", "em-persevere", "em-cry", "em-sob", "em-joy", "em-astonished", "em-scream", "em-tired_face", "em-angry", "em-rage", "em-triumph", "em-sleepy", "em-yum", "em-mask", "em-sunglasses", "em-dizzy_face", "em-imp", "em-smiling_imp", "em-neutral_face", "em-no_mouth", "em-innocent", "em-alien" ]; index.js export function trim(str) { return String.prototype.trim.call(str); } export function isType(arg, type) { return Object.prototype.toString.call(arg) === "[object " + type + "]"; } export function isWeixin() { return navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1; } export function parseQuery() { const res = {}; const query = (location.href.split("?")[1] || "") .trim() .replace(/^(\?|#|&)/, ""); if (!query) { return res; } query.split("&").forEach(param => { const parts = param.replace(/\+/g, " ").split("="); const key = decodeURIComponent(parts.shift()); const val = parts.length > 0 ? decodeURIComponent(parts.join("=")) : null; if (res[key] === undefined) { res[key] = val; } else if (Array.isArray(res[key])) { res[key].push(val); } else { res[key] = [res[key], val]; } }); return res; } const VUE_APP_API_URL = process.env.VUE_APP_API_URL || `${location.origin}/api`; const VUE_APP_WS_URL = process.env.VUE_APP_WS_URL || `ws:${location.hostname}:20003`; export { VUE_APP_API_URL, VUE_APP_WS_URL }; loading.js const events = []; const $scroll = function(dom, fn) { events.push({ dom, fn }); fn._index = events.length - 1; }; $scroll.remove = function(fn) { fn._index && events.splice(fn._index, 1); }; //上拉加载； const Scroll = { addHandler: function(element, type, handler) { if (element.addEventListener) element.addEventListener(type, handler, false); else if (element.attachEvent) element.attachEvent("on" + type, handler); else element["on" + type] = handler; }, listenTouchDirection: function() { this.addHandler(window, "scroll", function() { const wh = window.innerHeight, st = window.scrollY; events .filter(e => e.dom.scrollHeight && e.dom.scrollHeight > 0) .forEach(e => { var dh = e.dom.scrollHeight; var s = Math.ceil((st / (dh - wh)) * 100); if (s > 85) e.fn(); }); }); } }; Scroll.listenTouchDirection(); export default $scroll; export { Scroll }; request.js import axios from "axios"; import $store from "../store"; import toLogin from "@libs/login"; import { VUE_APP_API_URL } from "@utils/index"; const instance = axios.create({ baseURL: VUE_APP_API_URL, timeout: 5000 }); const defaultOpt = { login: true }; function baseRequest(options) { const token = $store.state.app.token; const headers = options.headers || {}; headers["Authori-zation"] = "Bearer " + token; options.headers = headers; if (options.login && !token) { toLogin(); return Promise.reject({ msg: "未登录", toLogin: true }); } console.log(options); return instance(options).then(res => { const data = res.data || {}; if (res.status !== 200) return Promise.reject({ msg: "请求失败", res, data }); if ([410000, 410001, 410002].indexOf(data.status) !== -1) { toLogin(); return Promise.reject({ msg: res.data.msg, res, data, toLogin: true }); } else if (data.status === 200) { return Promise.resolve(data, res); } else { return Promise.reject({ msg: res.data.msg, res, data }); } }); } /** * http 请求基础类 * 参考文档 https://www.kancloud.cn/yunye/axios/234845 * */ const request = ["post", "put", "patch"].reduce((request, method) => { /** * * @param url string 接口地址 * @param data object get参数 * @param options object axios 配置项 * @returns {AxiosPromise} */ request[method] = (url, data = {}, options = {}) => { return baseRequest( Object.assign({ url, data, method }, defaultOpt, options) ); }; return request; }, {}); ["get", "delete", "head"].forEach(method => { /** * * @param url string 接口地址 * @param params object get参数 * @param options object axios 配置项 * @returns {AxiosPromise} */ request[method] = (url, params = {}, options = {}) => { return baseRequest( Object.assign({ url, params, method }, defaultOpt, options) ); }; }); export default request; storecookie.js import { trim, isType } from "@utils"; const doc = window.document; function get(key) { if (!key || !_has(key)) { return null; } let regexpStr = "(?:^|.*;\\s*)" + escape(key).replace(/[-.+*]/g, "\\$&") + "\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*"; return JSON.parse(unescape(doc.cookie.replace(new RegExp(regexpStr), "$1"))); } function all() { let cookies = doc.cookie.split(/; ?/g), data = {}; for (let i = cookies.length - 1; i >= 0; i--) { if (!trim(cookies[i])) { continue; } let kvp = cookies[i].split("="); let key = unescape(kvp[0]); data[key] = unescape(kvp[1]); } return data; } function set(key, data, time) { if (!key) { return; } let expires = "Tue, 19 Jan 2038 03:14:07 GMT"; if (time) { let date; if (isType(time, "Date")) { date = time; } else { date = new Date(); date.setTime(date.getTime() + time * 60000); } expires = date.toGMTString(); } data = JSON.stringify(data); doc.cookie = escape(key) + "=" + escape(data) + "; expires=" + expires + "; path=/"; } function remove(key) { if (!key || !_has(key)) { return; } doc.cookie = escape(key) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"; } function clearAll() { Object.keys(all()).forEach(function(key) { remove(key); }); } function _has(key) { return new RegExp( "(?:^|;\\s*)" + escape(key).replace(/[-.+*]/g, "\\$&") + "\\s*\\=" ).test(doc.cookie); } export default { get, all, set, remove, clearAll, has: _has }; index.js import cookie from "./cookie"; import localStorage from "./localStorage"; export default { cookie, localStorage }; localStorage.js function localStorage() { return window.localStorage; } function get(key) { return JSON.parse(localStorage().getItem(key)); } function set(key, data) { return localStorage().setItem(key, JSON.stringify(data)); } function all() { const data = {}; for (var i = localStorage().length - 1; i >= 0; i--) { var key = localStorage().key(i); data[key] = get(key); } return data; } function remove(key) { return localStorage().removeItem(key); } function clearAll() { return localStorage().clear(); } function has(key) { return localStorage().getItem(key) !== null; } export default { get, set, all, remove, clearAll, has }; validate.js const bindMessage = (fn, message) => { fn.message = field => message.replace("%s", field || ""); }; export function required(message, opt = {}) { return { required: true, message, type: "string", ...opt }; } bindMessage(required, "请输入%s"); export function url(message, opt = {}) { return { type: "url", message, ...opt }; } bindMessage(url, "请输入正确的链接"); export function email(message, opt = {}) { return { type: "email", message, ...opt }; } bindMessage(email, "请输入正确的邮箱地址"); /** * 验证字段必须完全由字母构成。 * * @param message * @returns {*} */ export function alpha(message) { return attrs.pattern(/^[\w]+$/, message); } bindMessage(alpha, "%s必须是字母"); /** * 只能包含由字母、数字，以及 - 和 _ * * @param message * @returns {*} */ export function alpha_dash(message) { return attrs.pattern(/^[\w\d_-]+$/, message); } bindMessage(alpha_dash, "%s只能包含由字母、数字，以及 - 和 _"); /** * 必须是完全是字母、数字 * * @param message * @returns {*} */ export function alpha_num(message) { return attrs.pattern(/^[\w\d]+$/, message); } bindMessage(alpha_num, "%s只能包含字母、数字"); /** * 正确的金额 * * @param message * @returns {*} */ export function num(message) { return attrs.pattern( /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, message ); } bindMessage(num, "%s格式不正确"); /** * 只能是汉字 * @param message * @returns {*} */ export function chs(message) { return attrs.pattern(/^[\u4e00-\u9fa5]+$/, message); } bindMessage(chs, "%s只能是汉字"); /** * 只能包含汉字、字母 * @param message * @returns {*} */ export function chs_alpha(message) { return attrs.pattern(/^[\u4e00-\u9fa5\w]+$/, message); } bindMessage(chs_alpha, "%s只能包含汉字、字母"); /** * 只能包含汉字、字母和数字 * @param message * @returns {*} */ export function chs_alpha_num(message) { return attrs.pattern(/^[\u4e00-\u9fa5\w\d]+$/, message); } bindMessage(chs_alpha_num, "%s只能包含汉字、字母和数字"); /** * 只能包含由汉字、字母、数字，以及 - 和 _ * @param message * @returns {*} */ export function chs_dash(message) { return attrs.pattern(/^[\u4e00-\u9fa5\w\d-_]+$/, message); } bindMessage(chs_dash, "%s只能包含由汉字、字母、数字，以及 - 和 _"); /** * 手机号验证 * @param message * @returns {*} */ export function chs_phone(message) { return attrs.pattern(/^1(3|4|5|7|8|9|6)\d{9}$/i, message); } bindMessage(chs_phone, "请输入正确的手机号码"); const baseAttr = { min: "%s最小长度为:min", max: "%s最大长度为:max", length: "%s长度必须为:length", range: "%s长度为:range", pattern: "$s格式错误" }; const attrs = Object.keys(baseAttr).reduce((attrs, key) => { attrs[key] = (attr, message = "", opt = {}) => { const _attr = key === "range" ? { min: attr[0], max: attr[1] } : { [key]: attr }; return { message: message.replace( `:${key}`, key === "range" ? `${attr[0]}-${attr[1]}` : attr ), type: "string", ..._attr, ...opt }; }; bindMessage(attrs[key], baseAttr[key]); return attrs; }, {}); export default attrs; viewsactivityGoodsSeckill.vue {{ item.time }} {{ item.state }} 活动已结束 活动即将开始 限时价 0" @click="goDetail(itemSeckill.id)" > 马上抢 <div class="grab" v-if="item.status === 1 && itemSeckill.stock <= 0" > 已售磬 即将开始 已结束 1" > 0" > SeckillDetails.vue ￥ 距秒杀结束仅剩 产品介绍 客服 立即购买 homeIndex.vue 搜索商品 0"> {{ item.name }} 0" > 最新 {{ item.info }} {{ activityOne.title }} {{ activityOne.info }} {{ item.title }} {{ item.info }} 0"> 快速选择 {{ info.fastInfo }} 更多 {{ item.cate_name }} 0 || info.bastBanner.length > 0" > 精品推荐 {{ info.bastInfo }} 更多 0"> 热门榜单根据销量、搜索、好评等综合得出 更多 {{ item.store_name }} ￥{{ item.price }} 0"> 首发新品NEW~ {{ info.firstInfo }} 更多 {{ item.store_name }} ￥{{ item.price }} 0"> 促销单品 {{ info.salesInfo }} 更多 Loading.vue NotDefined.vue 页面未找到 抱歉！您访问的页面不存在，请返回上一级或点击下方按钮返回首页... 返回首页 orderGoodsReturn.vue {{ cart.productInfo.store_name }} ￥{{ cart.productInfo.attrInfo ? cart.productInfo.attrInfo.price : cart.productInfo.price }} x{{ cart.cart_num }} 退货件数 {{ orderInfo.total_num }} 退款金额 ￥{{ orderInfo.pay_price }} 退款原因 选择退款原因 {{ text }} 备注说明 上传凭证 ( 最多可上传3张 ) <VueCoreImageUpload class="btn btn-primary" :crop="false" compress="80" @imageuploaded="imageuploaded" :headers="headers" :max-file-size="5242880" :credentials="false" inputAccept="image/*" inputOfFile="file" :url="url" v-if="refund_reason_wap_img.length < 3" > 上传凭证 申请退款 Logistics.vue {{ cart.productInfo.store_name }} ￥{{ cart.truePrice }} x{{ cart.cart_num }} 物流公司： {{ orderInfo.delivery_name }} 快递单号： {{ orderInfo.delivery_id }} 复制单号 {{ express.status }} {{ express.time }} MyOrder.vue 订单信息 累计订单： 总消费：￥ 待付款 待发货 待收货 待评价 已完成 0" >拼团 0" >秒杀 0" >砍价 {{ order._add_time }} {{ getStatus(order) }} 0" /> 0" /> 0" /> {{ cart.productInfo.store_name }} ￥{{ cart.productInfo.attrInfo ? cart.productInfo.attrInfo.price : cart.productInfo.price }} x{{ cart.cart_num }} 共 件商品，总金额 ￥{{ order.pay_price }} 取消订单 立即付款 查看详情 查看物流 确认收货 查看物流 去评价 查看订单 1"> OrderDetails.vue {{ orderInfo._status._msg }} {{ orderInfo.add_time_y }}{{ orderInfo.add_time_h }} 待付款 待核销 待发货 待收货 待评价 已完成 = 0 ? 'font-color-red' : '' ]" > 0 && status.type != 9 }" > = 1 && status.type != 6 && status.type != 9 ? 'font-color-red' : '' ]" > 1 && status.type != 6 && status.type != 9 }" v-if="orderInfo.shipping_type === 1" > = 2 && status.type != 6 && status.type != 9 ? 'font-color-red' : '' ]" v-if="orderInfo.shipping_type === 1" > 2 && status.type != 6 && status.type != 9 }" > = 3 && status.type != 6 && status.type != 9 ? 'font-color-red' : '' ]" > 3 && status.type != 6 && status.type != 9 }" > = 4 && status.type != 6 && status.type != 9 ? 'font-color-red' : '' ]" > 核销信息 {{ orderInfo._verify_code }} 核销时间 每日：{{ system_store.day_time }} 使用说明 可将二维码出示给店员扫描或提供数字核销码 自提地址信息 查看位置 {{ orderInfo.real_name }}{{ orderInfo.user_phone }} {{ orderInfo.user_address }} {{ system_store.name }}{{ system_store.phone }} {{ system_store._detailed_address }} 订单编号： {{ orderInfo.order_id }}复制 下单时间： {{ orderInfo.add_time_y + " " + orderInfo.add_time_h }} 订单类型： {{ orderTypeName }} 支付状态： {{ orderInfo.paid ? "已支付" : "未支付" }} 支付方式： {{ orderInfo._status._payType }} 买家留言： {{ orderInfo.mark }} 配送方式： 发货 快递公司： 快递号： 配送方式： 送货 配送人： 配送电话： 拨打 收货人： {{ orderInfo.real_name }} 联系电话： {{ orderInfo.user_phone }} 收货地址： {{ orderInfo.user_address }} 支付金额： ￥{{ orderInfo.total_price }} 0"> 优惠券抵扣： -￥{{ orderInfo.coupon_price }} 0"> 积分抵扣： -￥{{ orderInfo.deduction_price }} 0"> 运费： ￥{{ orderInfo.pay_postage }} 实付款：￥{{ orderInfo.pay_price }} 取消订单 立即付款 申请退款 查看物流 确认收货 查看物流 删除订单 查看物流 查看拼团 OrderSubmission.vue {{ addressInfo.real_name }} {{ addressInfo.phone }} [默认] {{ addressInfo.province }}{{ addressInfo.city }}{{ addressInfo.district }}{{ addressInfo.detail }} 设置收货地址 {{ system_store.name }} {{ system_store.phone }} {{ system_store._detailed_address }} 优惠券 积分抵扣 当前积分 0 && userInfo.vip && pinkId == 0 && orderGroupInfo.bargain_id == 0 && orderGroupInfo.combination_id == 0 && orderGroupInfo.seckill_id == 0 " > 会员优惠 ￥{{ orderGroupInfo.priceGroup.vipPrice }} 快递费用 {{ orderGroupInfo.priceGroup.storePostage > 0 ? orderGroupInfo.priceGroup.storePostage : "免运费" }} 联系人 联系电话 备注信息 支付方式 微信支付 微信快捷支付 微信支付 微信快捷支付 余额支付 可用余额： 线下支付 线下方便支付 商品总价： ￥{{ orderPrice.total_price }} 0" > 运费： ￥{{ orderPrice.pay_postage }} 0" > 优惠券抵扣： -￥{{ orderPrice.coupon_price }} 0" > 积分抵扣： -￥{{ orderPrice.deduction_price }} 合计: ￥{{ orderPrice.pay_price }} 立即结算 PaymentStatus.vue 订单创建成功 订单支付成功 订单支付失败 订单编号 下单时间 支付方式 H5微信支付 微信支付 余额支付 线下支付 支付金额 失败原因 查看支付结果 支付失败重新支付 查看订单 返回首页 ReturnList.vue 订单号：{{ order.order_id }} {{ cart.productInfo.store_name }} x {{ cart.cart_num }} {{ cart.productInfo.attrInfo.suk }} {{ cart.productInfo.store_name }} ￥{{ cart.productInfo.price }} 共 件商品，总金额 ￥{{ order.pay_price }} 1"> shopEvaluateList.vue 评分 %好评率 {{ item.evaluate }}({{ item.num }}) GoodsClass.vue {{ item.cate_name }} {{ item.cate_name }} {{ child.cate_name }} GoodsCollection.vue 0"> {{ item.store_name }} ￥{{ item.price }} 删除 <div class="noCommodity" style="background-color:#fff;" v-if="collectProductList.length < 1 && page > 1" > GoodsCon.vue ￥{{ storeInfo.price }} 0" >￥{{ storeInfo.vip_price }} 0" /> {{ storeInfo.store_name }} 原价:￥{{ storeInfo.ot_price }} 库存:{{ storeInfo.stock }}{{ storeInfo.unit_name }} 销量:{{ storeInfo.fsales }}{{ storeInfo.unit_name }} 优惠券： 满{{ item.use_min_price }}减{{ item.coupon_price }} {{ attrTxt }}：{{ attrValue }} 门店信息 {{ system_store.name }} {{ system_store._detailed_address }} 用户评价({{ replyCount }}) {{ replyChance }}%好评率 0"> 优品推荐 {{ val.store_name }}} ¥{{ val.price }} 产品介绍 客服 收藏 0">{{ CartCount }} 购物车 加入购物车 立即购买 发送给朋友 生成海报 GoodSearch.vue 搜索 热门搜索 {{ key }} GoodsEvaluate.vue {{ orderCon.productInfo.store_name }} ￥{{ orderCon.productInfo.price }} x{{ orderCon.cart_num }} {{ item.name }} = indexn ? 'icon-shitixing font-color-red' : 'icon-kongxinxing' " > {{ item.index === -1 ? "" : item.index + 1 + "分" }} <VueCoreImageUpload class="btn btn-primary" :crop="false" compress="80" @imageuploaded="imageuploaded" :headers="headers" :max-file-size="5242880" :credentials="false" inputAccept="image/*" inputOfFile="file" :url="url" v-if="uploadPictures.length < 8" > 上传图片 立即评价 GoodsList.vue {{ title ? title : "默认" }} 价格 销量 新品 {{ item.store_name }} ￥{{ item.price }} 0"> ￥{{ item.vip_price }} 已售{{ item.sales }}件 1" > 1"> GoodsPromotion.vue 促销单品 HotNewGoods.vue {{ name }} newsNewsDetail.vue {{ articleInfo.title }} {{ articleInfo.cart_name }} {{ articleInfo.add_time }} {{ articleInfo.visit }} {{ storeInfo.store_name }} ￥{{ storeInfo.ot_price }} ￥{{ storeInfo.price }} 查看商品 和好友一起分享 NewsList.vue 0"> {{ item.title }} {{ item.add_time }} {{ item.title }} {{ item.add_time }} {{ item.title }} {{ item.add_time }} 0 && articleList.length > 0" > 1"> ShoppingCart.vue 100%正品保证 所有商品精挑细选 售后无忧 购物数量 {{ count }} 0" class="administrate acea-row row-center-wrapper" @click="manage" > {{ footerswitch ? "取消" : "管理" }} 0 || cartList.invalid.length > 0"> {{ item.productInfo.store_name }} 属性：{{ item.productInfo.attrInfo.suk }} ￥{{ item.truePrice }} <div class="reduce" :class="cartList.valid[index].cart_num <= 1 ? 'on' : ''" @click.prevent="reduce(index)" > - {{ item.cart_num }} = cartList.valid[index].attrInfo.stock ? 'on' : '' " @click.prevent="plus(index)" > + = cartList.valid[index].stock ? 'on' : '' " @click.prevent="plus(index)" > + 0"> 失效商品 清空 失效 {{ item.productInfo.store_name }} 属性：{{ item.productInfo.attrInfo.suk }} 该商品已下架 0" > 0" @click="allChecked" /> 全选 ({{ cartCount }}) ￥{{ countmoney }} 立即下单 收藏 删除 useraddressAddAddress.vue 姓名 联系电话 所在地区 详细地址 设置为默认地址 立即保存 导入微信地址 AddressManagement.vue <div class="address-management" :class="addressList.length < 1 && page > 1 ? 'on' : ''" ref="container" > 0"> 收货人：{{ item.real_name }}{{ item.phone }} 收货地址：{{ item.province }}{{ item.city }}{{ item.district }}{{ item.detail }} 设为默认 编辑 删除 <div class="noCommodity" v-if="addressList.length < 1 && page > 1"> 添加新地址 添加新地址 导入微信地址 BindingPhone.vue {{ text }} 确认绑定 ChangePassword.vue 当前手机号: {{ text }} 确认修改 couponGetCoupon.vue 0"> ￥{{ item.coupon_price }} 购物满{{ item.use_min_price }}元可用 {{ item.start_time ? item.start_time + "-" : "" }}{{ item.end_time }} 不限时 已领取 已领完 立即领取 1" > UserCoupon.vue 0"> ￥{{ item.coupon_price }} {{ item.coupon_title }} 不限时 {{ item._add_time }}-{{ item._end_time }} {{ item._msg }} {{ item._msg }} CustomerList.vue {{ item.nickname }} CustomerService.vue {{ item.nickname }} 12’’ {{ item.msn }} {{ item.nickname }} 12’’ {{ item.msn }} <!--<img--> <!--/>--> {{ speak }} 发送 0" > Login.vue {{ item }} 忘记密码 {{ text }} 登录 登录 没有账号? 立即注册 注册账号 {{ text }} 注册 已有账号? 立即登录 PersonalData.vue 管理我的账号 {{ item.nickname }} 绑定手机号：{{ item.phone }} 当前账号 使用账号 昵称 ID号 绑定手机号 点击绑定手机号 手机号码 密码 点击修改密码 保存修改 退出登录 promotionCashAudit.vue 提现申请已提交，等待人工审核 {{ time }} 好的 CashRecord.vue 提现记录 ￥{{ commission }} {{ item.time }} {{ val.title }} {{ val.add_time }} +{{ val.number }} -{{ val.number }} CommissionDetails.vue 佣金明细 ￥{{ commission }} {{ item.time }} {{ val.title }} {{ val.add_time }} +{{ val.number }} -{{ val.number }} CommissionRank.vue 您目前的排名为：第{{ position }}名 您暂未上榜 {{ item }} <div class="num" v-if="index <= 2"> {{ index + 1 }} {{ item.nickname }} ￥{{ item.brokerage_price }} Poster.vue 长按保存图片 PromoterList.vue 推广人数 {{ first + second }}人 一级({{ first }}) 二级({{ second }}) 团队排序 金额排序 订单排序 {{ val.nickname }} 加入时间: {{ val.time }} {{ val.childCount }} 人 {{ val.orderCount }} 单 {{ val.numberCount ? val.numberCount : 0 }} 元 PromoterOrder.vue 累计推广订单 {{ count }}单 {{ item.time }} 本月累计推广订单：{{ item.count ? item.count : 0 }}单 {{ val.nickname }} 返佣：￥{{ val.number ? val.number : 0 }} 订单号：{{ val.order_id }} 下单时间：{{ val.time }} PromoterRank.vue {{ item }} {{ Two.nickname }} {{ Two.count }}人 {{ One.nickname }} {{ One.count }}人 {{ Three.nickname }} {{ Three.count }}人 {{ index + 4 }} {{ item.nickname }} {{ item.count }}人 UserCash.vue {{ item.name }} 持卡人 卡号 银行 请选择银行 {{ item }} 提现 当前可提现金额: {{ commissionCount }} 提现 微信号 提现 当前可提现金额: {{ commissionCount }} 提现 用户名 账号 提现 当前可提现金额: {{ commissionCount }} 提现 UserPromotion.vue 当前佣金 提现记录 昨日收益 累积已提 立即提现 推广名片 推广人统计 佣金明细 推广人订单 推广人排行 佣金排行 Recharge.vue {{ item }} ￥ 提示：当前余额为￥ 提示：当前佣金为￥ {{ active ? "立即转入" : "立即充值" }} Register.vue 注册账号 {{ text }} 注册 已有账号? 立即登录 RetrievePassword.vue 找回密码 {{ text }} 确认 立即登录 signInIntegral.vue 当前积分 {{ info.integral }} {{ info.sum_integral }} 累计积分 {{ info.deduction_integral }} 累计消费 {{ info.today_integral }} 今日获得 {{ item.name }} 提示：积分数值的高低会直接影响您的会员等级 {{ item.mark }} {{ item.add_time }} +{{ item.number }} -{{ item.number }} 购买商品可获得积分奖励 赚积分 每日签到可获得积分奖励 赚积分 Sign.vue {{ userInfo.nickname }} 积分: {{ userInfo.integral }} 明细 {{ item.day }} = index + 1 ? 'venusSelect' : '') " > = index + 1 ? 'on' : ''"> +{{ item.sign_num }} {{ userInfo.is_day_sgin ? "已签到" : "立即签到" }} 已累计签到 天 据说连续签到第{{ day }}天可获得超额积分，一定要坚持签到哦~~~ {{ item.title }} {{ item.add_time }} +{{ item.number }} 0" > 点击加载更多 签到成功 获得{{ integral }}积分 好的 SignRecord.vue {{ item.month }} {{ itemn.title }} {{ itemn.add_time }} +{{ itemn.number }} User.vue {{ userInfo.nickname }} {{ userInfo.vip_name }} ID： 绑定手机号 我的余额 当前佣金 当前积分 优惠券 我的订单 全部订单 0" >{{ orderStatusNum.unpaid_count }} 待付款 0" >{{ orderStatusNum.unshipped_count }} 待发货 0" >{{ orderStatusNum.received_count }} 待收货 0" >{{ orderStatusNum.evaluated_count }} 待评价 0" >{{ orderStatusNum.refund_count }} 售后/退款 我的服务 {{ item.name }} <!--<div--> <!-->--> UserAccount.vue 总资产(元) {{ now_money }} 充值 累计充值(元) {{ recharge }} 累计消费(元) {{ orderStatusSum }} 账单记录 消费记录 充值记录 积分中心 签到领积分 赚积分抵现金 领取优惠券 满减享优惠 最新拼团活动 最新的优惠商品上架拼团 立即参与 已结束 当前限时秒杀 最新商品秒杀进行中 立即参与 已结束 砍价活动 呼朋唤友来砍价 立即参与 已结束 UserBill.vue 全部 消费 充值 {{ item.time }} {{ val.title }} {{ val.add_time }} {{ val.pm == 0 ? "-" : "+" }}{{ val.number }} UserVip.vue {{ item.name }} 可享受商品折扣: {{ item.discount / 10 }}折 {{ val.number }} {{ val.real_name }} grade"> 该会员等级尚未解锁 <div class="lock" v-if="item.grade < grade"> 已解锁更高等级 会员升级要求 {{ taskCount }}/{{ vipRequire.length }} {{ item.name }} {{ item.finish ? "已满足条件" : "未满足条件" }} {{ item.task_type_title }} {{ item.new_number }}/{{ item.number }} {{ illustrate }} 目录 └── api ├── activity.js ├── order.js ├── public.js ├── store.js ├── user.js ├── App.vue └── assets └── css ├── base.css ├── reset.css ├── style.css └── images └── js ├── area.js ├── media_750.js └── components ├── AddressWindow.vue ├── CountDown.vue ├── CouponListWindow.vue ├── CouponPop.vue ├── CouponWindow.vue ├── Footer.vue ├── GoodList.vue ├── HelloWorld.vue ├── Home.vue ├── Loading.vue ├── OrderGoods.vue ├── Payment.vue ├── PriceChange.vue ├── ProductConSwiper.vue ├── ProductWindow.vue ├── PromotionGood.vue ├── Recommend.vue ├── ShareInfo.vue ├── ShareRedPackets.vue ├── StorePoster.vue ├── SwitchWindow.vue ├── UserEvaluation.vue ├── WriteOff.vue └── libs ├── chat.js ├── login.js ├── order.js ├── wechat.js ├── main.js └── mixins ├── SendVerifyCode.js └── router ├── index.js └── module ├── activity.js ├── index.js ├── order.js ├── user.js ├── s.php └── store ├── getters.js ├── index.js └── modules ├── app.js ├── index.js └── utils ├── bc.js ├── dialog.js ├── emoji.js ├── index.js ├── loading.js ├── request.js └── store ├── cookie.js ├── index.js ├── localStorage.js ├── validate.js └── views └── activity ├── GoodsSeckill.vue ├── SeckillDetails.vue └── home ├── Index.vue ├── Loading.vue ├── NotDefined.vue └── order ├── GoodsReturn.vue ├── Logistics.vue ├── MyOrder.vue ├── OrderDetails.vue ├── OrderSubmission.vue ├── PaymentStatus.vue ├── ReturnList.vue └── shop ├── EvaluateList.vue ├── GoodsClass.vue ├── GoodsCollection.vue ├── GoodsCon.vue ├── GoodSearch.vue ├── GoodsEvaluate.vue ├── GoodsList.vue ├── GoodsPromotion.vue ├── HotNewGoods.vue └── news ├── NewsDetail.vue ├── NewsList.vue ├── ShoppingCart.vue └── user └── address ├── AddAddress.vue ├── AddressManagement.vue ├── BindingPhone.vue ├── ChangePassword.vue └── coupon ├── GetCoupon.vue ├── UserCoupon.vue ├── CustomerList.vue ├── CustomerService.vue ├── Login.vue ├── PersonalData.vue └── promotion ├── CashAudit.vue ├── CashRecord.vue ├── CommissionDetails.vue ├── CommissionRank.vue ├── Poster.vue ├── PromoterList.vue ├── PromoterOrder.vue ├── PromoterRank.vue ├── UserCash.vue ├── UserPromotion.vue ├── Recharge.vue ├── Register.vue ├── RetrievePassword.vue └── signIn ├── Integral.vue ├── Sign.vue ├── SignRecord.vue ├── User.vue ├── UserAccount.vue ├── UserBill.vue ├── UserVip.vue
FormData XMLHttpRequest Level 2 新增的一个对象，利用它来提交表单、模拟表单提交，当然最大的优势就是可以上传二进制文件! var form = document.getElementById("form"), formData = new FormData(form); /** * formData.get(name: string) * * 返回第一个属性为 name 的 值 || null */ /** * formData.getAll(name: string) * * 获取所有属性名为 name 的值，以 数组 || [] 形式返回 */ /** * （同步操作） * formData.append(name: string, value: string|Blob, fileName: string) * * 可添加多个同名的值，不会覆盖，非唯一性 */ formData.append("username", "jackie"); console.log("formData:", formData, "get:", formData.get("username"), "getAll:", formData.getAll("username")); /** * （同步操作） * formData.set(name: string, value: string|Blob, fileName: string) * * 有该属性则修改，无则添加该属性及值 * 会将 name 属性的值全部改为 value，且 getAll 会返回 仅包含一个该value值 的数组 */ formData.set("username", "setted-name"); console.log("formData:", formData, "get:", formData.get("username"), "getAll:", formData.getAll("username")); /** * has(name: string): Boolean */ console.log("has:", formData.has("username"), formData.has("has-attr")); /** * delete(name: string) * * 删除所有 name 属性 */ formData.delete("username") console.log("deleted-has:", formData.has("username"), formData.get("username"), formData.getAll("username")); // ************************************************************************************************************************ ### 多图上传 // 通过 $.each($input[0].files, function (index, file) { formData.append("file" + index, file); }); $.ajax({ // ... // 直接将 formData 对象传递给后台 data: formData, }) Base64、Blob、File 之间的相互转换 // 1、file、blob 转换为 base64 function fileOrBlobToBase64 (fileOrBlob, callback) { var reader = new FileReader(); reader.readAsDataURL(fileOrBlob); reader.onload = function(evt) { console.log(reader.result, this.result, evt.target.result); //获取到base64格式图片 // callback(result); }; } // 2、base64 转换为 blob function base64ToBlob(base64Data) { //console.log(base64Data);//data:image/png;base64, var byteString; if(base64Data.split(',')[0].indexOf('base64') >= 0) byteString = atob(base64Data.split(',')[1]);//base64 解码 else{ byteString = unescape(base64Data.split(',')[1]); } var mimeString = base64Data.split(',')[0].split(':')[1].split(';')[0];//mime类型 -- image/png // var arrayBuffer = new ArrayBuffer(byteString.length); //创建缓冲数组 // var ia = new Uint8Array(arrayBuffer);//创建视图 var ia = new Uint8Array(byteString.length);//创建视图 for(var i = 0; i < byteString.length; i++) { ia[i] = byteString.charCodeAt(i); } var blob = new Blob([ia], { type: mimeString }); return blob; } // 3、base64 转换为 file function base64ToFile(base64, filename) {//将base64转换为文件 var arr = base64.split(','), mime = arr[0].match(/:(.*?);/)[1], bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n); while(n--){ u8arr[n] = bstr.charCodeAt(n); } return new File([u8arr], filename, {type:mime}); } 移动端调试控制台 // 实例化即可 var VConsole = new VConsole();IScroll 插件iscroll.js 文件只包含基本功能iscroll-probe.js 文件方可监听 scroll 事件。方便于添加 上拉加载 和 下拉刷新 功能官方用例 https://github.com/cubiq/iscroll/blob/master/demos/probe/index.html 1 2 3 #scroll-wrapper { /* 需要知道容器（垂直滚动时）高度 或 （水平滚动时）宽度 */ height: 800px; /* 必要 */ overflow: hidden; /* 如垂直滑动，当与 IOS 滑动冲突时，可尝试 overflow-y: scroll */ /* 可选，用于处理 IScroll 滚动区域不准确问题 */ position: relative; /* 可选，解决谷歌浏览器下警告 */ touch-action: none; } /* 当最后一条数据无法滑动到完整显示，可通过给滚动元素加 padding-bottom 解决 */ #scroll-wrapper >div { padding-bottom: 20px; }var IScrollInstance = new IScroll("#scroll-wrapper", { }); // request new data... $("#list").html(str); // 每次更新滑动列表内容后，记得手动刷新插件 IScrollInstance && IScrollInstance.refresh(); // iscroll-probe.js 才可监听到 IScrollInstance.on("scroll", funciton () { }); IScrollInstance.on("scrollEnd", _scrollEnd); function _scrollEnd(e) { /* 【this.maxScrollY】 页面最大滚动距离，若垂直滑动时为负数，其性质等同于 scrollHeight 【this.y】 已滚动距离 【this.pointY】 当前手指位置 */ // 手指滑出滚动区域后，使滑动内容回弹 // if (this.pointY < 0) // _IScrollInstance.scrollTo(0, this.maxScrollY, 100); // 加载更多！ maxScrollY 和 y 都为负数 if (this.y < 0 && _IScrollInstance.maxScrollY >= _IScrollInstance.y) { } } IScroll-pro 下拉刷新、上拉加载插件插件源码及用例 地址：https://github.com/baiJiXianSheng/IScroll-prowindow.postMessageH5 API：window.postMessage(message: any, targetOrigin: string);当通过 iframe 嵌入页面时父页面向 iframe 嵌套的子页面传递消息通知：iframe.contentWindow.postMessage() // 父页面 document.querySelect("iframe").contentWindow.postMessage({ res: 1, evtType: "showNotice" }, "*"); // 在子页面定义接收事件 window.addEventListener("message", _postMessage); function _postMessage (evt) { if (evt.data.evtType === "showNotice") { // use evt.data.res to do something ... } } iframe 包裹的子页面 向父页面传递消息：window.parent.postMessage() // 子页面 // 若多层 iframe 嵌套时，可使用 window.top 取得最顶层页面window window.parent.postMessage({ res: 1, evtType: "showNotice" }, "*"); // 父页面，定义接收消息事件处理函数 window.addEventListener("message", _postMessage); function _postMessage (evt) { if (evt.data.evtType === "showNotice") { // use evt.data.res to do something ... } }禁止 input 聚焦时调用第三方输入法（兼容性不高） 禁止显示 input 历史输入 IOS 下 input 聚焦时光标位置偏移。以input上边界开始到文本底部，IOS 下 input 默认行高100%？(1)该法可能会出现文字垂直居中效果不准确input { /* 如原本以 40px 垂直居中 */ /* line-height: 40px; */ /* 但通常 font-size 和 line-height值相同时，会出现文字被“裁剪”显示不全 */ font-size: 20px; line-height: 20px; margin: 10px 0; /* 若使用 padding: 10px 0; 在ios的高版本如12，会出现bug，当你点击到padding-top的区间的时候，input的光标会移动到input默认文字的最前面，而不是我们希望的最后面 */ }(2).parentDom { display: flex; align-items: center; input { font-size: 20px; } }IOS input 键盘 换行 -> 搜索外面嵌套一层 form IOS 原生滑动.box { height: 100%; overflow-y: scroll; -webkit-overflow-scrolling: touch; }input[type=search] 时安卓或谷歌浏览器 输入框右侧蓝色x按钮input::-webkit-search-cancel-button { display: none; }input 输入文本跳转搜索页面后，再次返回该页面时输入框自动聚焦// ... searchInput.value = ""; if (document.activeElement instanceof HTMLElement) { document.activeElement.blur(); } beforeRequest();iPhone 设备 media 查询 样式适配 /* iphoneX、iphoneXs */ @media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) { div { } } /* iphone Xs Max */ @media only screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio:3) { div { } } /* iphone XR */ @media only screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio:2) { div { } } CSS 伪元素 ::before ::after div::before { /* 默认为 inline 元素 */ display: block; /* 值得类型可选：'文本'、url(xxx.png)、attr(节点的某个属性)、counter()序列 **/ content: '\0252'; content: '内容'; content: url(assets/xxx.png); /* */ /* 可通过js修改 data-index 的值，使得 伪元素的内容自动改变 */ content: attr(data-index); } BFCfloat 的值不是 noneposition 的值不是 static或者relativedisplay 的值是 inline-block、table-cell、flex、table-caption、inline-flexoverflow 的值不是 visibleInput[type=file]h5调用设备相机手机QQ软件内置浏览器，需要添加 capture="camera" 属性方可调用相机。html js var u = navigator.userAgent; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端 if (isIOS) { $("#loadInput").removeAttr("capture"); } else { var browser = navigator.userAgent.toLowerCase(); if (browser.match(/MicroMessenger/i) == 'micromessenger') { // 微信浏览器 // 可直接调用相机 } else if(browser.indexOf(' qq') != -1 && browser.indexOf('mqqbrowser') != -1){ // 手机QQ软件 内置浏览器 // 需要添加 capture="camera" 属性方可调用相机 $("#loadInput").attr("capture","camera"); } else if(browser.indexOf('mqqbrowser') != -1 && browser.indexOf(" qq") == -1){ // QQ浏览器 // alert("QQ浏览器"); } else { // alert("以上都不是"); } } // 主动触发 input-file 点击选择文件事件 document.getElementById("loadInput").click(); IOS 下 当有 input 聚焦时，其他元素通过 click 绑定的点击事件，因 input 失去焦点阻止了 click 事件触发，需要二次点击方可触发 var _isIphone = navigator.userAgent.toUpperCase().indexOf("IPHONE") > -1; // hack：IOS 上点击登录按钮时，若输入框聚焦，首先会触发 blur 事件，click事件无法触发，需再次点击触发 if (_isIphone) { $("body").on("touchend", function(e) { // 当点击到 btn 上时，直接调用对应的方法 if (e.target.id == "btn") dosomething(); }) } else { $("#btn").click(function () { dosomething0(); }); } 有 input 聚焦时，底部footer position: fixed 失效被键盘顶起。尝试解决方案：聚焦时 隐藏footer，失去焦点时 显示footer // 浏览器当前的高度 var oHeight = $(document).height(); $(window).resize(function () { var now = $(document).height(); if (now < oHeight) { $(".footer").hide(); } else { $(".footer").show(); } }); h5 页面在 IOS 下返回，未重载// 解决 h5 在IOS 下返回，页面不重载问题 var browserRule = /^.*((iPhone)|(iPad)|(Safari))+.*$/; if (browserRule.test(navigator.userAgent)) { window.onpageshow = function(event) { console.log("onpageshow!") if (event.persisted) { window.location.reload(); } }; } h5 页面在 Android 下 window.history.go(-1) 无法返回上一页 var u = navigator.userAgent; var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端 $("#cancel-btn").click(function () { if (isIOS) window.history.go(-1); else window.location.href = "lastPage.html"; // 或者 无论IOS或Android，都直接通过 location.href = "lastPage.html"; 跳转到指定页面 }); 标签在 IOS 下点击无法播放解决方案一： // 用一张播放按钮的图片，监听其点击事件，触发时动态生成 video 标签插入，并调用 video.play(); ### 注：若在初始化加载html文档时， 或 标签没有 src 属性及值，通过动态赋值（不会重新请求？）可能无法正常加载。 $("#play-btn").click(function () { var $video = $(" "); // 可监听其 播放事件 $video.on("play", function () { }); $("#video-container").append($video); $video.get(0).play(); }); iframe 在IOS下宽度变宽，产生左右滑动 .iframe-box { overflow: auto; /* 或者 overflow-y: scroll */ -webkit-overflow-scrolling:touch; /* IOS 顺滑 */ width:100%; height:100%; } /* 关键步骤 */ .iframe-box iframe { width: 1px; min-width: 100%; *width: 100%; } var u = navigator.userAgent; var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端 // 通过 js 设置 scrolling 属性 $("iframe").attr("scrolling", isIOS ? "no" : "auto");