commit 8f41fca621fcd991a4563ab5166961fbacafffb1 Author: renguanyu111 <80379958+renguanyu111@users.noreply.github.com> Date: Sat Sep 17 12:35:06 2022 +0800 测试前 diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json new file mode 100644 index 0000000..07c1d5f --- /dev/null +++ b/.hbuilderx/launch.json @@ -0,0 +1,16 @@ +{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 + "version": "0.0", + "configurations": [{ + "default" : + { + "launchtype" : "local" + }, + "h5" : + { + "launchtype" : "local" + }, + "type" : "uniCloud" + } + ] +} diff --git a/App.vue b/App.vue new file mode 100644 index 0000000..d2c7c51 --- /dev/null +++ b/App.vue @@ -0,0 +1,26 @@ + + + \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8e39ead --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 www.uviewui.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..5ab14e2 --- /dev/null +++ b/README.md @@ -0,0 +1,141 @@ +

+ logo +

+

uView

+

多平台快速开发的UI框架

+ +[![star](https://gitee.com/umicro/uView/badge/star.svg?theme=gvp)](https://gitee.com/umicro/uView/stargazers) +[![fork](https://gitee.com/umicro/uView/badge/fork.svg?theme=gvp)](https://gitee.com/umicro/uView/members) +[![stars](https://img.shields.io/github/stars/YanxinNet/uView?style=flat-square&logo=GitHub)](https://github.com/umicro/uView) +[![forks](https://img.shields.io/github/forks/YanxinNet/uView?style=flat-square&logo=GitHub)](https://github.com/umicro/uView) +[![issues](https://img.shields.io/github/issues/YanxinNet/uView?style=flat-square&logo=GitHub)](https://github.com/umicro/uView/issues) +[![Website](https://img.shields.io/badge/uView-up-blue?style=flat-square)](https://uviewui.com) +[![release](https://img.shields.io/github/v/release/YanxinNet/uView?style=flat-square)](https://gitee.com/umicro/uView/releases) +[![license](https://img.shields.io/github/license/YanxinNet/uView?style=flat-square)](https://en.wikipedia.org/wiki/MIT_License) + +## 说明 + +uView UI,是[uni-app](https://uniapp.dcloud.io/)生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水 + +## [官方文档:https://www.uviewui.com](https://www.uviewui.com) + +### 官方1群:1042987248(已满) +### 官方2群:249718512(已满) +### 官方3群:1129077272(已满) +### 官方4群:1084514613(已满) +### 官方5群:863820668(已满) +### 官方6群:745721078(已满) +### 官方7群:627867855(已满) +### 官方8群:496409492(已满) +### 官方9群:828504448(已满) +### [点击加10群交流反馈:232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU) + +## 特性 + +- 兼容安卓,iOS,微信小程序,H5,QQ小程序,百度小程序,支付宝小程序,头条小程序 +- 60+精选组件,功能丰富,多端兼容,让您快速集成,开箱即用 +- 众多贴心的JS利器,让您飞镖在手,召之即来,百步穿杨 +- 众多的常用页面和布局,让您专注逻辑,事半功倍 +- 详尽的文档支持,现代化的演示效果 +- 按需引入,精简打包体积 + + +## 预览 + +您可以通过**微信**扫码,查看最佳的演示效果。 +
+
+ + + +## 友情链接 + +#### **vue-admin-beautiful** —— [企业级、通用型中后台前端解决方案(基于vue/cli 4 最新版,同时支持电脑,手机,平板)](https://github.com/chuzhixin/vue-admin-beautiful) + +#### **vue-admin-beautiful** —— [在线演示](http://beautiful.panm.cn/vue-admin-beautiful/#/index) + +#### **pl-table** —— [ 完美解决 element 万级表格数据渲染卡顿问题](https://github.com/livelyPeng/pl-table) + +#### **luch-request** —— [基于 Promise 开发的 uni-app 跨平台、项目级别的请求库,它有更小的体积,易用的 api,方便简单的自定义能力](https://www.quanzhan.co/luch-request/) +
+ +## 链接 + +- [官方文档](https://uviewui.com/) +- [更新日志](https://uviewui.com/components/changelog.html) +- [升级指南](https://uviewui.com/components/changelog.html) +- [关于我们](https://uviewui.com/cooperation/about.html) + +## 交流反馈 + +欢迎加入我们的QQ群交流反馈:[点此跳转](https://www.uviewui.com/components/addQQGroup.html) + +## 安装 + +#### **下载地址** —— [https://ext.dcloud.net.cn/plugin?id=1593](https://ext.dcloud.net.cn/plugin?id=1593) + +## 快速上手 + +1. `main.js`引入uView库 +```js +// main.js +import uView from 'uview-ui'; +Vue.use(uView); +``` + +2. `App.vue`引入基础样式(注意style标签需声明scss属性支持) +```css +/* App.vue */ + +``` + +3. `uni.scss`引入全局scss变量文件 +```css +/* uni.scss */ +@import "uview-ui/theme.scss"; +``` + +4. `pages.json`配置easycom规则(按需引入) + +```js +// pages.json +{ + "easycom": { + // 下载安装的方式需要前面的"@/",npm安装的方式无需"@/" + // 下载安装方式 + "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" + // npm安装方式 + // "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" + }, + // 此为本身已有的内容 + "pages": [ + // ...... + ] +} +``` + +请通过[快速上手](https://uviewui.com/components/quickstart.html)了解更详细的内容 + +## 使用方法 +配置easycom规则后,自动按需引入,无需`import`组件,直接引用即可。 + +```html + +``` + +请通过[快速上手](https://uviewui.com/components/quickstart.html)了解更详细的内容 + + +## 捐赠uView的研发 + +uView文档内容和框架源码全部开源免费,如果您认为uView帮到了您的开发工作,您可以捐赠uView的研发工作,捐赠无门槛,哪怕是一杯可乐也好(相信这比打赏主播更有意义)。 + + + + +## 版权信息 +uView遵循[MIT](https://en.wikipedia.org/wiki/MIT_License)开源协议,意味着您无需支付任何费用,也无需授权,即可将uView应用到您的产品中。 diff --git a/common/_http.api.js b/common/_http.api.js new file mode 100644 index 0000000..87defe4 --- /dev/null +++ b/common/_http.api.js @@ -0,0 +1,22 @@ +// 如果没有通过拦截器配置域名的话,可以在这里写上完整的URL(加上域名部分) +let hotSearchUrl = '/ebapi/store_api/hot_search'; +let indexUrl = '/ebapi/public_api/index'; + +// 此处第二个参数vm,就是我们在页面使用的this,你可以通过vm获取vuex等操作,更多内容详见uView对拦截器的介绍部分: +// https://uviewui.com/js/http.html#%E4%BD%95%E8%B0%93%E8%AF%B7%E6%B1%82%E6%8B%A6%E6%88%AA%EF%BC%9F +const install = (Vue, vm) => { + // 此处没有使用传入的params参数 + let getSearch = (params = {}) => vm.$u.get(hotSearchUrl, { + id: 2 + }); + + // 此处使用了传入的params参数,一切自定义即可 + let getInfo = (params = {}) => vm.$u.post(indexUrl, params); + + // 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下 + vm.$u.api = {getSearch, getInfo}; +} + +export default { + install +} \ No newline at end of file diff --git a/common/_http.interceptor.js b/common/_http.interceptor.js new file mode 100644 index 0000000..fde22a9 --- /dev/null +++ b/common/_http.interceptor.js @@ -0,0 +1,41 @@ +// 这里的vm,就是我们在vue文件里面的this,所以我们能在这里获取vuex的变量,比如存放在里面的token +// 同时,我们也可以在此使用getApp().globalData,如果你把token放在getApp().globalData的话,也是可以使用的 +const install = (Vue, vm) => { + Vue.prototype.$u.http.setConfig({ + baseUrl: 'https://api.youzixy.com', + // 如果将此值设置为true,拦截回调中将会返回服务端返回的所有数据response,而不是response.data + // 设置为true后,就需要在this.$u.http.interceptor.response进行多一次的判断,请打印查看具体值 + // originalData: true, + // 设置自定义头部content-type + // header: { + // 'content-type': 'xxx' + // } + }); + // 请求拦截,配置Token等参数 + Vue.prototype.$u.http.interceptor.request = (config) => { + config.header.Token = 'xxxxxx'; + // 方式一,存放在vuex的token,假设使用了uView封装的vuex方式,见:https://uviewui.com/components/globalVariable.html + // config.header.token = vm.token; + // 方式二,如果没有使用uView封装的vuex方法,那么需要使用$store.state获取 + // config.header.token = vm.$store.state.token; + // 方式三,如果token放在了globalData,通过getApp().globalData获取 + // config.header.token = getApp().globalData.username; + // 方式四,如果token放在了Storage本地存储中,拦截是每次请求都执行的,所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值 + // const token = uni.getStorageSync('token'); + // config.header.token = token; + return config; + } + // 响应拦截,判断状态码是否通过 + Vue.prototype.$u.http.interceptor.response = (res) => { + // 如果把originalData设置为了true,这里得到将会是服务器返回的所有的原始数据 + // 判断可能变成了res.statueCode,或者res.data.code之类的,请打印查看结果 + if(res.code == 200) { + // 如果把originalData设置为了true,这里return回什么,this.$u.post的then回调中就会得到什么 + return res.data; + } else return false; + } +} + +export default { + install +} \ No newline at end of file diff --git a/common/api/http.address.api.js b/common/api/http.address.api.js new file mode 100644 index 0000000..00cabe8 --- /dev/null +++ b/common/api/http.address.api.js @@ -0,0 +1,21 @@ + +// 创建 User 模块方法,方法内的方法共享 vm 对象 +let Address = (vm)=>{ + return { + getAddressList:(params = {}) => { + return vm.$u.post('api/adress/show', params) + }, + addAddressList:(params = {}) => { + return vm.$u.post('api/adress', params) + }, + deleAddress:(params = {}) => { + return vm.$u.post('api/adress', params) + }, + getAddress:(params = {}) => { + return vm.$u.post('api/adress/adressXiangqing', params) + } + } +} + +// 抛出当前模块 +export default Address \ No newline at end of file diff --git a/common/api/http.dingdan.api.js b/common/api/http.dingdan.api.js new file mode 100644 index 0000000..b78d677 --- /dev/null +++ b/common/api/http.dingdan.api.js @@ -0,0 +1,21 @@ + +// 创建 User 模块方法,方法内的方法共享 vm 对象 +let DingDan = (vm)=>{ + return { + // 所有订单 + getAllDingdan:(params = {}) => { + return vm.$u.post('api/xiadan/dingdanAll', params) + }, + // 单个订单详情 + getDingdan:(params = {}) => { + return vm.$u.post('api/xiadan/dingdanxiangqing', params) + }, + // 删除单个订单 + delect:(params = {}) => { + return vm.$u.post('api/xiadan/delect', params) + }, + } +} + +// 抛出当前模块 +export default DingDan \ No newline at end of file diff --git a/common/api/http.duty.api.js b/common/api/http.duty.api.js new file mode 100644 index 0000000..1a519d4 --- /dev/null +++ b/common/api/http.duty.api.js @@ -0,0 +1,100 @@ + +// 创建 User 模块方法,方法内的方法共享 vm 对象 +let Duty = (vm)=>{ + return { + // 新定性考核列表 + newqualitative:(params = {}) => { + return vm.$u.post('api/eval/newqualitative', params) + }, + // 加减分NEW + plusorminuspoints:(params = {}) => { + return vm.$u.post('api/eval/plusorminuspointsnew', params) + }, + // 添加上报数据 + addflowrationlog:(params = {}) => { + return vm.$u.post('api/eval/addflowrationlog', params) + }, + // 定量考核列表 + qualitativeevalration:(params = {}) => { + return vm.$u.post('api/eval/qualitativeevalration', params) + }, + // 获取新定性考核详细指标 + newgetqualdetailedtarget:(params = {}) => { + return vm.$u.post('api/eval/newgetqualdetailedtarget', params) + }, + // 获取定性考核项目列表 + aboutmytask:(params = {}) => { + return vm.$u.post('api/webach/aboutmytask', params) + }, + // 获取考核指标细则 + taskparametertitlelist:(params = {}) => { + return vm.$u.post('api/webach/taskparametertitlelist', params) + }, + // succes:(params = {}) => { + // return vm.$u.post('login/succes', params) + // }, + seeflowlog:(params = {}) => { + return vm.$u.post('api/eval/seeflowlog', params) + }, + lookdutkscoreflow:(params = {}) => { + return vm.$u.post('api/eval/lookdutkscoreflow', params) + }, + lookrationkscoreflow:(params = {}) => { + return vm.$u.post('api/eval/lookrationkscoreflow', params) + }, + examineflow:(params = {}) => { + return vm.$u.post('api/eval/examineflow', params) + }, + departmentlist:(params = {}) => { + return vm.$u.post('api/group/departmentlist', params) + }, + operation:(params = {}) => { + return vm.$u.post('api/qual/operation', params) + }, + liangOperation:(params = {}) => { + return vm.$u.post('api/quan/operation', params) + }, + sanction:(params = {}) => { + return vm.$u.post('api/quan/sanction', params) + }, + quantechart:(params = {}) => { + return vm.$u.post('api/quant/quantechart', params) + }, + captcha:(params = {}) => { + return vm.$u.post('api/base/captcha', params) + }, + scancodelogin:(params = {}) => { + return vm.$u.post('api/base/scancodelogin', params) + }, + getpostnature:(params = {}) => { + return vm.$u.post('fileapi/postweb/getpostnature', params) + }, + getpostration:(params = {}) => { + return vm.$u.post('fileapi/postweb/getpostration', params) + }, + get_ration_target_cont:(params = {}) => { + return vm.$u.post('fileapi/postweb/get_ration_target_cont', params) + }, + submit_ration_post_cont:(params = {}) => { + return vm.$u.post('fileapi/postweb/submit_ration_post_cont', params) + }, + get_nature_post_dimerons:(params = {}) => { + return vm.$u.post('fileapi/postweb/get_nature_post_dimerons', params) + }, + get_post_deimenso_info:(params = {}) => { + return vm.$u.post('fileapi/postweb/get_post_deimenso_info', params) + }, + send_us_nature_evaluation:(params = {}) => { + return vm.$u.post('fileapi/postweb/send_us_nature_evaluation', params) + }, + get_post_nature_son_target:(params = {}) => { + return vm.$u.post('fileapi/postweb/get_post_nature_son_target', params) + }, + + + + } +} + +// 抛出当前模块 +export default Duty \ No newline at end of file diff --git a/common/api/http.login.api - 副本.js b/common/api/http.login.api - 副本.js new file mode 100644 index 0000000..42bd1e6 --- /dev/null +++ b/common/api/http.login.api - 副本.js @@ -0,0 +1,18 @@ + +// 创建 User 模块方法,方法内的方法共享 vm 对象 +let Login = (vm)=>{ + return { + + login:(params = {}) => { + return vm.$u.post('login/false', params) + }, + succes:(params = {}) => { + return vm.$u.post('login/succes', params) + }, + + + } +} + +// 抛出当前模块 +export default Login \ No newline at end of file diff --git a/common/api/https.goods.api.js b/common/api/https.goods.api.js new file mode 100644 index 0000000..9f40ea5 --- /dev/null +++ b/common/api/https.goods.api.js @@ -0,0 +1,15 @@ + +// 创建 User 模块方法,方法内的方法共享 vm 对象 +let Goods = (vm)=>{ + return { + // 所有订单 + getAllGoods:(params = {}) => { + return vm.$u.get('api/goods', params) + }, + + + } +} + +// 抛出当前模块 +export default Goods \ No newline at end of file diff --git a/common/api/https.pay.api.js b/common/api/https.pay.api.js new file mode 100644 index 0000000..9a3a87c --- /dev/null +++ b/common/api/https.pay.api.js @@ -0,0 +1,28 @@ + +// 创建 User 模块方法,方法内的方法共享 vm 对象 +let Pay = (vm)=>{ + return { + // 所有产品展示 + xiadan:(params = {}) => { + return vm.$u.post('xiadan', params) + }, + // 这里是支付以后 或者状态异常刷新订单状态的按钮接口 + find:(params = {}) => { + return vm.$u.get('find/', params) + }, + // 退款申请 + refundShenqing:(params = {}) => { + return vm.$u.post('xiadan/refundShenqing', params) + }, + byid:(params = {}) => { + return vm.$u.post('xiadan/byid/', params) + }, + xiadanFind:(params = {}) => { + return vm.$u.post('xiadan/find', params) + }, + + } +} + +// 抛出当前模块 +export default Pay \ No newline at end of file diff --git a/common/classify.data.js b/common/classify.data.js new file mode 100644 index 0000000..cb4f75a --- /dev/null +++ b/common/classify.data.js @@ -0,0 +1,1087 @@ +export default[ + { + "name": "女装", + "foods": [ + { + "name": "A字裙", + "key": "A字裙", + "icon": "https://cdn.uviewui.com/uview/common/classify/1/1.jpg", + "cat": 10 + }, + { + "name": "T恤", + "key": "T恤", + "icon": "https://cdn.uviewui.com/uview/common/classify/1/2.jpg", + "cat": 10 + }, + { + "name": "半身裙", + "key": "半身裙", + "icon": "https://cdn.uviewui.com/uview/common/classify/1/3.jpg", + "cat": 10 + }, + { + "name": "衬衫", + "key": "衬衫", + "icon": "https://cdn.uviewui.com/uview/common/classify/1/4.jpg", + "cat": 10 + }, + { + "name": "短裙", + "key": "短裙", + "icon": "https://cdn.uviewui.com/uview/common/classify/1/5.jpg", + "cat": 10 + }, + { + "name": "阔腿裤", + "key": "阔腿裤", + "icon": "https://cdn.uviewui.com/uview/common/classify/1/6.jpg", + "cat": 10 + }, + { + "name": "连衣裙", + "key": "连衣裙", + "icon": "https://cdn.uviewui.com/uview/common/classify/1/7.jpg", + "cat": 10 + }, + { + "name": "妈妈装", + "key": "妈妈装", + "icon": "https://cdn.uviewui.com/uview/common/classify/1/8.jpg", + "cat": 10 + }, + { + "name": "牛仔裤", + "key": "牛仔裤", + "icon": "https://cdn.uviewui.com/uview/common/classify/1/9.jpg", + "cat": 10 + }, + { + "name": "情侣装", + "key": "情侣装", + "icon": "https://cdn.uviewui.com/uview/common/classify/1/10.jpg", + "cat": 10 + }, + { + "name": "休闲裤", + "key": "休闲裤", + "icon": "https://cdn.uviewui.com/uview/common/classify/1/11.jpg", + "cat": 10 + }, + { + "name": "雪纺衫", + "key": "雪纺衫", + "icon": "https://cdn.uviewui.com/uview/common/classify/1/12.jpg", + "cat": 10 + }, + { + "name": "防晒衣", + "key": "防晒衣", + "icon": "https://cdn.uviewui.com/uview/common/classify/1/13.jpg", + "cat": 10 + }, + { + "name": "礼服/婚纱", + "key": "礼服婚纱", + "icon": "https://cdn.uviewui.com/uview/common/classify/1/14.jpg", + "cat": 10 + } + ] + }, + { + "name": "美食", + "foods": [ + { + "name": "火锅", + "key": "火锅", + "icon": "https://cdn.uviewui.com/uview/common/classify/2/1.jpg", + "cat": 6 + }, + { + "name": "糕点饼干", + "key": "糕点饼干", + "icon": "https://cdn.uviewui.com/uview/common/classify/2/2.jpg", + "cat": 6 + }, + { + "name": "坚果果干", + "key": "坚果果干", + "icon": "https://cdn.uviewui.com/uview/common/classify/2/3.jpg", + "cat": 6 + }, + { + "name": "酒类", + "key": "酒类", + "icon": "https://cdn.uviewui.com/uview/common/classify/2/4.jpg", + "cat": 6 + }, + { + "name": "辣条", + "key": "辣条", + "icon": "https://cdn.uviewui.com/uview/common/classify/2/5.jpg", + "cat": 6 + }, + { + "name": "大礼包", + "key": "大礼包", + "icon": "https://cdn.uviewui.com/uview/common/classify/2/6.jpg", + "cat": 6 + }, + { + "name": "精品茗茶", + "key": "茶", + "icon": "https://cdn.uviewui.com/uview/common/classify/2/7.jpg", + "cat": 6 + }, + { + "name": "休闲食品", + "key": "休闲食品", + "icon": "https://cdn.uviewui.com/uview/common/classify/2/8.jpg", + "cat": 6 + }, + { + "name": "糖果巧克力", + "key": "糖果巧克力", + "icon": "https://cdn.uviewui.com/uview/common/classify/2/9.jpg", + "cat": 6 + }, + { + "name": "方便速食", + "key": "方便速食", + "icon": "https://cdn.uviewui.com/uview/common/classify/2/10.jpg", + "cat": 6 + }, + { + "name": "营养代餐", + "key": "营养代餐", + "icon": "https://cdn.uviewui.com/uview/common/classify/2/11.jpg", + "cat": 6 + }, + { + "name": "粮油副食", + "key": "粮油", + "icon": "https://cdn.uviewui.com/uview/common/classify/2/12.jpg", + "cat": 6 + }, + { + "name": "生鲜水果", + "key": "水果", + "icon": "https://cdn.uviewui.com/uview/common/classify/2/13.jpg", + "cat": 6 + }, + { + "name": "饮品", + "key": "饮品", + "icon": "https://cdn.uviewui.com/uview/common/classify/2/14.jpg", + "cat": 6 + } + ] + }, + { + "name": "美妆", + "foods": [ + { + "name": "化妆刷", + "key": "化妆刷", + "icon": "https://cdn.uviewui.com/uview/common/classify/3/1.jpg", + "cat": 3 + }, + { + "name": "粉底", + "key": "粉底", + "icon": "https://cdn.uviewui.com/uview/common/classify/3/2.jpg", + "cat": 3 + }, + { + "name": "洗发护发", + "key": "洗发护发", + "icon": "https://cdn.uviewui.com/uview/common/classify/3/3.jpg", + "cat": 3 + }, + { + "name": "美容工具", + "key": "美容工具", + "icon": "https://cdn.uviewui.com/uview/common/classify/3/4.jpg", + "cat": 3 + }, + { + "name": "眼部护理", + "key": "眼部护理", + "icon": "https://cdn.uviewui.com/uview/common/classify/3/5.jpg", + "cat": 3 + }, + { + "name": "眉妆", + "key": "眉妆", + "icon": "https://cdn.uviewui.com/uview/common/classify/3/6.jpg", + "cat": 3 + }, + { + "name": "卸妆品", + "key": "卸妆品", + "icon": "https://cdn.uviewui.com/uview/common/classify/3/7.jpg", + "cat": 3 + }, + { + "name": "基础护肤", + "key": "基础护肤", + "icon": "https://cdn.uviewui.com/uview/common/classify/3/8.jpg", + "cat": 3 + }, + { + "name": "眼妆", + "key": "眼妆", + "icon": "https://cdn.uviewui.com/uview/common/classify/3/9.jpg", + "cat": 3 + }, + { + "name": "唇妆", + "key": "唇妆", + "icon": "https://cdn.uviewui.com/uview/common/classify/3/10.jpg", + "cat": 3 + }, + { + "name": "面膜", + "key": "面膜", + "icon": "https://cdn.uviewui.com/uview/common/classify/3/11.jpg", + "cat": 3 + }, + { + "name": "沐浴用品", + "key": "沐浴用品", + "icon": "https://cdn.uviewui.com/uview/common/classify/3/12.jpg", + "cat": 3 + }, + { + "name": "护肤套装", + "key": "护肤套装", + "icon": "https://cdn.uviewui.com/uview/common/classify/3/13.jpg", + "cat": 3 + }, + { + "name": "防晒品", + "key": "防晒品", + "icon": "https://cdn.uviewui.com/uview/common/classify/3/14.jpg", + "cat": 3 + }, + { + "name": "美甲", + "key": "美甲", + "icon": "https://cdn.uviewui.com/uview/common/classify/3/15.jpg", + "cat": 3 + } + + ] + }, + { + "name": "居家日用", + "foods": [ + { + "name": "垃圾袋", + "key": "垃圾袋", + "icon": "https://cdn.uviewui.com/uview/common/classify/4/1.jpg", + "cat": 4 + }, + { + "name": "纸巾", + "key": "纸巾", + "icon": "https://cdn.uviewui.com/uview/common/classify/4/2.jpg", + "cat": 4 + }, + { + "name": "驱蚊用品", + "key": "驱蚊用品", + "icon": "https://cdn.uviewui.com/uview/common/classify/4/3.jpg", + "cat": 4 + }, + { + "name": "收纳神器", + "key": "收纳神器", + "icon": "https://cdn.uviewui.com/uview/common/classify/4/4.jpg", + "cat": 4 + }, + { + "name": "厨房用品", + "key": "厨房用品", + "icon": "https://cdn.uviewui.com/uview/common/classify/4/5.jpg", + "cat": 4 + }, + { + "name": "厨房烹饪", + "key": "烹饪", + "icon": "https://cdn.uviewui.com/uview/common/classify/4/6.jpg", + "cat": 4 + }, + { + "name": "衣物晾晒", + "key": "衣物晾晒", + "icon": "https://cdn.uviewui.com/uview/common/classify/4/7.jpg", + "cat": 4 + }, + { + "name": "衣物护理", + "key": "衣物护理", + "icon": "https://cdn.uviewui.com/uview/common/classify/4/8.jpg", + "cat": 4 + }, + { + "name": "宠物用品", + "key": "宠物用品", + "icon": "https://cdn.uviewui.com/uview/common/classify/4/9.jpg", + "cat": 4 + }, + { + "name": "医药保健", + "key": "医药", + "icon": "https://cdn.uviewui.com/uview/common/classify/4/10.jpg", + "cat": 4 + }, + { + "name": "日用百货", + "key": "百货", + "icon": "https://cdn.uviewui.com/uview/common/classify/4/11.jpg", + "cat": 4 + }, + { + "name": "清洁用品", + "key": "清洁", + "icon": "https://cdn.uviewui.com/uview/common/classify/4/12.jpg", + "cat": 4 + }, + { + "name": "绿植园艺", + "key": "绿植", + "icon": "https://cdn.uviewui.com/uview/common/classify/4/13.jpg", + "cat": 4 + } + ] + }, + { + "name": "男装", + "foods": [ + { + "name": "爸爸装", + "key": "爸爸装", + "icon": "https://cdn.uviewui.com/uview/common/classify/5/1.jpg", + "cat": 12 + }, + { + "name": "牛仔裤", + "key": "牛仔裤", + "icon": "https://cdn.uviewui.com/uview/common/classify/5/2.jpg", + "cat": 12 + }, + { + "name": "衬衫", + "key": "衬衫", + "icon": "https://cdn.uviewui.com/uview/common/classify/5/3.jpg", + "cat": 12 + }, + { + "name": "休闲裤", + "key": "休闲裤", + "icon": "https://cdn.uviewui.com/uview/common/classify/5/4.jpg", + "cat": 12 + }, + { + "name": "外套", + "key": "外套", + "icon": "https://cdn.uviewui.com/uview/common/classify/5/5.jpg", + "cat": 12 + }, + { + "name": "T恤", + "key": "T恤", + "icon": "https://cdn.uviewui.com/uview/common/classify/5/6.jpg", + "cat": 12 + }, + { + "name": "套装", + "key": "套装", + "icon": "https://cdn.uviewui.com/uview/common/classify/5/7.jpg", + "cat": 12 + }, + { + "name": "运动裤", + "key": "运动裤", + "icon": "https://cdn.uviewui.com/uview/common/classify/5/8.jpg", + "cat": 12 + }, + { + "name": "马甲/背心", + "key": "马甲背心", + "icon": "https://cdn.uviewui.com/uview/common/classify/5/9.jpg", + "cat": 12 + }, + { + "name": "POLO衫", + "key": "POLO衫", + "icon": "https://cdn.uviewui.com/uview/common/classify/5/10.jpg", + "cat": 12 + }, + { + "name": "商务装", + "key": "商务装", + "icon": "https://cdn.uviewui.com/uview/common/classify/5/11.jpg", + "cat": 12 + } + ] + }, + { + "name": "鞋品", + "foods": [ + { + "name": "单鞋", + "key": "单鞋", + "icon": "https://cdn.uviewui.com/uview/common/classify/6/1.jpg", + "cat": 5 + }, + { + "name": "皮鞋", + "key": "皮鞋", + "icon": "https://cdn.uviewui.com/uview/common/classify/6/2.jpg", + "cat": 5 + }, + { + "name": "帆布鞋", + "key": "帆布鞋", + "icon": "https://cdn.uviewui.com/uview/common/classify/6/3.jpg", + "cat": 5 + }, + { + "name": "北京老布鞋", + "key": "北京老布鞋", + "icon": "https://cdn.uviewui.com/uview/common/classify/6/4.jpg", + "cat": 5 + }, + { + "name": "运动鞋", + "key": "运动鞋", + "icon": "https://cdn.uviewui.com/uview/common/classify/6/5.jpg", + "cat": 5 + }, + { + "name": "拖鞋", + "key": "拖鞋", + "icon": "https://cdn.uviewui.com/uview/common/classify/6/6.jpg", + "cat": 5 + }, + { + "name": "凉鞋", + "key": "凉鞋", + "icon": "https://cdn.uviewui.com/uview/common/classify/6/7.jpg", + "cat": 5 + }, + { + "name": "休闲鞋", + "key": "休闲鞋", + "icon": "https://cdn.uviewui.com/uview/common/classify/6/8.jpg", + "cat": 5 + }, + { + "name": "高跟鞋", + "key": "高跟鞋", + "icon": "https://cdn.uviewui.com/uview/common/classify/6/9.jpg", + "cat": 5 + }, + { + "name": "老人鞋", + "key": "老人鞋", + "icon": "https://cdn.uviewui.com/uview/common/classify/6/10.jpg", + "cat": 5 + }, + { + "name": "懒人鞋", + "key": "懒人鞋", + "icon": "https://cdn.uviewui.com/uview/common/classify/6/11.jpg", + "cat": 5 + } + ] + }, + { + "name": "数码家电", + "foods": [ + { + "name": "数据线", + "key": "数据线", + "icon": "https://cdn.uviewui.com/uview/common/classify/7/1.jpg", + "cat": 8 + }, + { + "name": "耳机", + "key": "耳机", + "icon": "https://cdn.uviewui.com/uview/common/classify/7/2.jpg", + "cat": 8 + }, + { + "name": "生活家电", + "key": "家电", + "icon": "https://cdn.uviewui.com/uview/common/classify/7/3.jpg", + "cat": 8 + }, + { + "name": "电风扇", + "key": "电风扇", + "icon": "https://cdn.uviewui.com/uview/common/classify/7/4.jpg", + "cat": 8 + }, + { + "name": "电吹风", + "key": "电吹风", + "icon": "https://cdn.uviewui.com/uview/common/classify/7/5.jpg", + "cat": 8 + }, + { + "name": "手机壳", + "key": "手机壳", + "icon": "https://cdn.uviewui.com/uview/common/classify/7/6.jpg", + "cat": 8 + }, + { + "name": "榨汁机", + "key": "榨汁机", + "icon": "https://cdn.uviewui.com/uview/common/classify/7/7.jpg", + "cat": 8 + }, + { + "name": "小家电", + "key": "小家电", + "icon": "https://cdn.uviewui.com/uview/common/classify/7/8.jpg", + "cat": 8 + }, + { + "name": "数码电子", + "key": "数码", + "icon": "https://cdn.uviewui.com/uview/common/classify/7/9.jpg", + "cat": 8 + }, + { + "name": "电饭锅", + "key": "电饭锅", + "icon": "https://cdn.uviewui.com/uview/common/classify/7/10.jpg", + "cat": 8 + }, + { + "name": "手机支架", + "key": "手机支架", + "icon": "https://cdn.uviewui.com/uview/common/classify/7/11.jpg", + "cat": 8 + }, + { + "name": "剃须刀", + "key": "剃须刀", + "icon": "https://cdn.uviewui.com/uview/common/classify/7/12.jpg", + "cat": 8 + }, + { + "name": "充电宝", + "key": "充电宝", + "icon": "https://cdn.uviewui.com/uview/common/classify/7/13.jpg", + "cat": 8 + }, + { + "name": "手机配件", + "key": "手机配件", + "icon": "https://cdn.uviewui.com/uview/common/classify/7/14.jpg", + "cat": 8 + } + ] + }, + { + "name": "母婴", + "foods": [ + { + "name": "婴童服饰", + "key": "衣服", + "icon": "https://cdn.uviewui.com/uview/common/classify/8/1.jpg", + "cat": 2 + }, + { + "name": "玩具乐器", + "key": "玩具乐器", + "icon": "https://cdn.uviewui.com/uview/common/classify/8/2.jpg", + "cat": 2 + }, + { + "name": "尿不湿", + "key": "尿不湿", + "icon": "https://cdn.uviewui.com/uview/common/classify/8/3.jpg", + "cat": 2 + }, + { + "name": "安抚牙胶", + "key": "安抚牙胶", + "icon": "https://cdn.uviewui.com/uview/common/classify/8/4.jpg", + "cat": 2 + }, + { + "name": "奶瓶奶嘴", + "key": "奶瓶奶嘴", + "icon": "https://cdn.uviewui.com/uview/common/classify/8/5.jpg", + "cat": 2 + }, + { + "name": "孕妈用品", + "key": "孕妈用品", + "icon": "https://cdn.uviewui.com/uview/common/classify/8/6.jpg", + "cat": 2 + }, + { + "name": "宝宝用品", + "key": "宝宝用品", + "icon": "https://cdn.uviewui.com/uview/common/classify/8/7.jpg", + "cat": 2 + }, + { + "name": "婴童湿巾", + "key": "湿巾", + "icon": "https://cdn.uviewui.com/uview/common/classify/8/8.jpg", + "cat": 2 + }, + { + "name": "喂养洗护", + "key": "洗护", + "icon": "https://cdn.uviewui.com/uview/common/classify/8/9.jpg", + "cat": 2 + }, + { + "name": "婴童鞋靴", + "key": "童鞋", + "icon": "https://cdn.uviewui.com/uview/common/classify/8/10.jpg", + "cat": 2 + }, + { + "name": "口水巾", + "key": "口水巾", + "icon": "https://cdn.uviewui.com/uview/common/classify/8/11.jpg", + "cat": 2 + }, + { + "name": "营养辅食", + "key": "营养", + "icon": "https://cdn.uviewui.com/uview/common/classify/8/12.jpg", + "cat": 2 + }, + { + "name": "婴幼书籍", + "key": "书籍", + "icon": "https://cdn.uviewui.com/uview/common/classify/8/13.jpg", + "cat": 2 + }, + { + "name": "婴儿车", + "key": "婴儿车", + "icon": "https://cdn.uviewui.com/uview/common/classify/8/14.jpg", + "cat": 2 + } + ] + }, + { + "name": "箱包", + "foods": [ + { + "name": "单肩包", + "key": "单肩包", + "icon": "https://cdn.uviewui.com/uview/common/classify/9/1.jpg", + "cat": 0 + }, + { + "name": "斜挎包", + "key": "斜挎包", + "icon": "https://cdn.uviewui.com/uview/common/classify/9/2.jpg", + "cat": 0 + }, + { + "name": "女包", + "key": "女包", + "icon": "https://cdn.uviewui.com/uview/common/classify/9/3.jpg", + "cat": 0 + }, + { + "name": "男包", + "key": "男包", + "icon": "https://cdn.uviewui.com/uview/common/classify/9/4.jpg", + "cat": 0 + }, + { + "name": "双肩包", + "key": "双肩包", + "icon": "https://cdn.uviewui.com/uview/common/classify/9/5.jpg", + "cat": 0 + }, + { + "name": "小方包", + "key": "小方包", + "icon": "https://cdn.uviewui.com/uview/common/classify/9/6.jpg", + "cat": 0 + }, + { + "name": "钱包", + "key": "钱包", + "icon": "https://cdn.uviewui.com/uview/common/classify/9/7.jpg", + "cat": 0 + }, + { + "name": "旅行箱包", + "key": "旅行箱包", + "icon": "https://cdn.uviewui.com/uview/common/classify/9/8.jpg", + "cat": 0 + }, + { + "name": "零钱包", + "key": "零钱包", + "icon": "https://cdn.uviewui.com/uview/common/classify/9/9.jpg", + "cat": 0 + }, + { + "name": "手提包", + "key": "手提包", + "icon": "https://cdn.uviewui.com/uview/common/classify/9/10.jpg", + "cat": 0 + }, + { + "name": "胸包", + "key": "胸包", + "icon": "https://cdn.uviewui.com/uview/common/classify/9/11.jpg", + "cat": 0 + } + ] + }, + { + "name": "内衣", + "foods": [ + { + "name": "袜子", + "key": "袜子", + "icon": "https://cdn.uviewui.com/uview/common/classify/10/1.jpg", + "cat": 11 + }, + { + "name": "吊带背心", + "key": "吊带背心", + "icon": "https://cdn.uviewui.com/uview/common/classify/10/2.jpg", + "cat": 11 + }, + { + "name": "抹胸", + "key": "抹胸", + "icon": "https://cdn.uviewui.com/uview/common/classify/10/3.jpg", + "cat": 11 + }, + { + "name": "内裤", + "key": "内裤", + "icon": "https://cdn.uviewui.com/uview/common/classify/10/4.jpg", + "cat": 11 + }, + { + "name": "文胸", + "key": "文胸", + "icon": "https://cdn.uviewui.com/uview/common/classify/10/5.jpg", + "cat": 11 + }, + { + "name": "文胸套装", + "key": "文胸套装", + "icon": "https://cdn.uviewui.com/uview/common/classify/10/6.jpg", + "cat": 11 + }, + { + "name": "打底塑身", + "key": "打底塑身", + "icon": "https://cdn.uviewui.com/uview/common/classify/10/7.jpg", + "cat": 11 + }, + { + "name": "家居服", + "key": "家居服", + "icon": "https://cdn.uviewui.com/uview/common/classify/10/8.jpg", + "cat": 11 + }, + { + "name": "船袜", + "key": "船袜", + "icon": "https://cdn.uviewui.com/uview/common/classify/10/9.jpg", + "cat": 11 + }, + { + "name": "情侣睡衣", + "key": "情侣睡衣", + "icon": "https://cdn.uviewui.com/uview/common/classify/10/10.jpg", + "cat": 11 + }, + { + "name": "丝袜", + "key": "丝袜", + "icon": "https://cdn.uviewui.com/uview/common/classify/10/11.jpg", + "cat": 11 + } + ] + }, + { + "name": "文娱车品", + "foods": [ + { + "name": "车市车品", + "key": "车市车品", + "icon": "https://cdn.uviewui.com/uview/common/classify/11/1.jpg", + "cat": 7 + }, + { + "name": "办公文具", + "key": "办公文具", + "icon": "https://cdn.uviewui.com/uview/common/classify/11/2.jpg", + "cat": 7 + }, + { + "name": "考试必备", + "key": "考试必备", + "icon": "https://cdn.uviewui.com/uview/common/classify/11/3.jpg", + "cat": 7 + }, + { + "name": "笔记本", + "key": "笔记本", + "icon": "https://cdn.uviewui.com/uview/common/classify/11/4.jpg", + "cat": 7 + }, + { + "name": "艺术礼品", + "key": "礼品", + "icon": "https://cdn.uviewui.com/uview/common/classify/11/5.jpg", + "cat": 7 + }, + { + "name": "书写工具", + "key": "书写工具", + "icon": "https://cdn.uviewui.com/uview/common/classify/11/6.jpg", + "cat": 7 + }, + { + "name": "车载电器", + "key": "车载电器", + "icon": "https://cdn.uviewui.com/uview/common/classify/11/7.jpg", + "cat": 7 + }, + { + "name": "图书音像", + "key": "图书音像", + "icon": "https://cdn.uviewui.com/uview/common/classify/11/8.jpg", + "cat": 7 + }, + { + "name": "画具画材", + "key": "画具画材", + "icon": "https://cdn.uviewui.com/uview/common/classify/11/9.jpg", + "cat": 7 + } + ] + }, + { + "name": "配饰", + "foods": [ + { + "name": "太阳镜", + "key": "太阳镜", + "icon": "https://cdn.uviewui.com/uview/common/classify/12/1.jpg", + "cat": 0 + }, + { + "name": "皮带", + "key": "皮带", + "icon": "https://cdn.uviewui.com/uview/common/classify/12/2.jpg", + "cat": 0 + }, + { + "name": "棒球帽", + "key": "棒球帽", + "icon": "https://cdn.uviewui.com/uview/common/classify/12/3.jpg", + "cat": 0 + }, + { + "name": "手表", + "key": "手表", + "icon": "https://cdn.uviewui.com/uview/common/classify/12/4.jpg", + "cat": 0 + }, + { + "name": "发饰", + "key": "发饰", + "icon": "https://cdn.uviewui.com/uview/common/classify/12/5.jpg", + "cat": 0 + }, + { + "name": "项链", + "key": "项链", + "icon": "https://cdn.uviewui.com/uview/common/classify/12/6.jpg", + "cat": 0 + }, + { + "name": "手饰", + "key": "手饰", + "icon": "https://cdn.uviewui.com/uview/common/classify/12/7.jpg", + "cat": 0 + }, + { + "name": "耳环", + "key": "耳环", + "icon": "https://cdn.uviewui.com/uview/common/classify/12/8.jpg", + "cat": 0 + }, + { + "name": "帽子丝巾", + "key": "帽子丝巾", + "icon": "https://cdn.uviewui.com/uview/common/classify/12/9.jpg", + "cat": 0 + }, + { + "name": "眼镜墨镜", + "key": "眼镜墨镜", + "icon": "https://cdn.uviewui.com/uview/common/classify/12/10.jpg", + "cat": 0 + }, + { + "name": "发带发箍", + "key": "发带发箍", + "icon": "https://cdn.uviewui.com/uview/common/classify/12/11.jpg", + "cat": 0 + } + ] + }, + { + "name": "家装家纺", + "foods": [ + { + "name": "家居饰品", + "key": "家居饰品", + "icon": "https://cdn.uviewui.com/uview/common/classify/13/1.jpg", + "cat": 0 + }, + { + "name": "凉席", + "key": "凉席", + "icon": "https://cdn.uviewui.com/uview/common/classify/13/2.jpg", + "cat": 0 + }, + { + "name": "背枕靠枕", + "key": "靠枕", + "icon": "https://cdn.uviewui.com/uview/common/classify/13/3.jpg", + "cat": 0 + }, + { + "name": "床上用品", + "key": "床上用品", + "icon": "https://cdn.uviewui.com/uview/common/classify/13/4.jpg", + "cat": 0 + }, + { + "name": "摆件", + "key": "摆件", + "icon": "https://cdn.uviewui.com/uview/common/classify/13/5.jpg", + "cat": 0 + }, + { + "name": "四件套", + "key": "四件套", + "icon": "https://cdn.uviewui.com/uview/common/classify/13/6.jpg", + "cat": 0 + }, + { + "name": "装饰品", + "key": "装饰品", + "icon": "https://cdn.uviewui.com/uview/common/classify/13/7.jpg", + "cat": 0 + }, + { + "name": "卫浴用品", + "key": "卫浴", + "icon": "https://cdn.uviewui.com/uview/common/classify/13/8.jpg", + "cat": 0 + }, + { + "name": "家居家装", + "key": "家具", + "icon": "https://cdn.uviewui.com/uview/common/classify/13/9.jpg", + "cat": 0 + }, + { + "name": "蚊帐", + "key": "蚊帐", + "icon": "https://cdn.uviewui.com/uview/common/classify/13/10.jpg", + "cat": 0 + }, + { + "name": "墙纸贴纸", + "key": "墙纸", + "icon": "https://cdn.uviewui.com/uview/common/classify/13/11.jpg", + "cat": 0 + }, + { + "name": "空调被", + "key": "空调被", + "icon": "https://cdn.uviewui.com/uview/common/classify/13/12.jpg", + "cat": 0 + } + ] + }, + { + "name": "户外运动", + "foods": [ + { + "name": "游泳装备", + "key": "游泳", + "icon": "https://cdn.uviewui.com/uview/common/classify/14/1.jpg", + "cat": 0 + }, + { + "name": "泳镜", + "key": "泳镜", + "icon": "https://cdn.uviewui.com/uview/common/classify/14/2.jpg", + "cat": 0 + }, + { + "name": "户外装备", + "key": "户外", + "icon": "https://cdn.uviewui.com/uview/common/classify/14/3.jpg", + "cat": 0 + }, + { + "name": "健身服饰", + "key": "健身", + "icon": "https://cdn.uviewui.com/uview/common/classify/14/4.jpg", + "cat": 0 + }, + { + "name": "泳衣", + "key": "泳衣", + "icon": "https://cdn.uviewui.com/uview/common/classify/14/5.jpg", + "cat": 0 + }, + { + "name": "瑜伽垫", + "key": "瑜伽垫", + "icon": "https://cdn.uviewui.com/uview/common/classify/14/6.jpg", + "cat": 0 + }, + { + "name": "瑜伽用品", + "key": "瑜伽", + "icon": "https://cdn.uviewui.com/uview/common/classify/14/7.jpg", + "cat": 0 + }, + { + "name": "健身装备", + "key": "健身", + "icon": "https://cdn.uviewui.com/uview/common/classify/14/8.jpg", + "cat": 0 + }, + { + "name": "球迷用品", + "key": "球迷", + "icon": "https://cdn.uviewui.com/uview/common/classify/14/9.jpg", + "cat": 0 + } + ] + } +] \ No newline at end of file diff --git a/common/demo.scss b/common/demo.scss new file mode 100644 index 0000000..547d5d9 --- /dev/null +++ b/common/demo.scss @@ -0,0 +1,86 @@ +/* #ifndef APP-NVUE */ +view, +text { + box-sizing: border-box; +} +/* #endif */ + +/* start--演示页面使用的统一样式--start */ +.u-demo { + padding: 25px 20px; +} + +.u-demo-wrap { + border-width: 1px; + border-color: #ddd; + border-style: dashed; + background-color: rgb(250, 250, 250); + padding: 20px 10px; + border-radius: 3px; +} + +.u-demo-area { + text-align: center; +} + +.u-no-demo-here { + color: $u-tips-color; + font-size: 13px; +} + +.u-demo-result-line { + border-width: 1px; + border-color: #ddd; + border-style: dashed; + padding: 5px 20px; + margin-top: 30px; + border-radius: 5px; + background-color: rgb(240, 240, 240); + color: $u-content-color; + font-size: 16px; + /* #ifndef APP-NVUE */ + word-break: break-word; + display: inline-block; + /* #endif */ + text-align: left; + +} + +.u-demo-title, +.u-config-title { + text-align: center; + font-size: 16px; + font-weight: bold; + margin-bottom: 20px; +} + +.u-config-item { + margin-top: 25px; +} + +.u-config-title { + margin-top: 20px; + padding-bottom: 5px; +} + +.u-item-title { + position: relative; + font-size: 15px; + padding-left: 8px; + line-height: 1; + margin-bottom: 11px; +} + +.u-item-title:after { + position: absolute; + width: 4px; + top: -1px; + height: 16px; + /* #ifndef APP-NVUE */ + content: ''; + /* #endif */ + left: 0; + border-radius: 10px; + background-color: $u-content-color; +} +/* end--演示页面使用的统一样式--end */ diff --git a/common/http.api.js b/common/http.api.js new file mode 100644 index 0000000..6eb1f3b --- /dev/null +++ b/common/http.api.js @@ -0,0 +1,22 @@ +// 引入 User 模块 +import User from "./http.user.api.js"; +import Duty from "../common/api/http.duty.api.js"; +import Address from "./api/http.address.api.js"; +import Goods from "./api/https.goods.api.js"; +import Pay from "./api/https.pay.api.js"; +import DingDan from "./api/http.dingdan.api.js"; + +const install = (Vue, vm) => { + vm.$u.api = { + Duty:Duty(vm), + Goods:Goods(vm), + DingDan:DingDan(vm), + Pay:Pay(vm), + Address:Address(vm), + User:User(vm), + }; +} + +export default { + install +} \ No newline at end of file diff --git a/common/http.interceptor - 副本.js b/common/http.interceptor - 副本.js new file mode 100644 index 0000000..57f0ada --- /dev/null +++ b/common/http.interceptor - 副本.js @@ -0,0 +1,72 @@ +// common/http.interceptor.js + +// 这里的Vue为Vue对象(非创建出来的实例),vm为main.js中“Vue.use(httpInterceptor, app)”这一句的第二个参数, +// 为一个Vue的实例,也即每个页面的"this" +// 如果需要了解这个install方法是什么,请移步:https://uviewui.com/components/vueUse.html +const install = (Vue, vm) => { + + var userToken1 ="" + var userKey1 ="" + + // 延迟才能取到缓存数据 + setTimeout(()=>{ + console.log("vm.$store.state.apiPass") + console.log(vm.$store.state.apiPass) + if (vm.$store.state.apiPass==2) { + + // console.log(sessionStorage.getItem('key')) + // if (vm.$store.state.userKey==''||vm.$store.state.userToken=='') { + // window.location.href = 'https://www.hxgk.group/jumpapiurl/webindex?url=http://new.hxgk.group/sj/index.html&errorurl=http://new.hxgk.group/sj/index.html#/pages/login/login'; + // }else if(vm.$store.state.userKey==undefined||vm.$store.state.userToken==undefined){ + // window.location.href = 'https://www.hxgk.group/jumpapiurl/webindex?url=http://new.hxgk.group/sj/index.html&errorurl=http://new.hxgk.group/sj/index.html#/pages/login/login'; + // } + userToken1=vm.$store.state.userToken + userKey1=vm.$store.state.userKey + + } + },200); + // setTimeout(()=>{ + // console.log(sessionStorage.getItem('key')) + // if (vm.$store.state.userKey==''||vm.$store.state.userToken=='') { + // window.location.href = 'https://www.hxgk.group/jumpapiurl/webindex?url=http://new.hxgk.group/sj/index.html&errorurl=http://new.hxgk.group/sj/index.html#/pages/login/login'; + // }else if(vm.$store.state.userKey==undefined||vm.$store.state.userToken==undefined){ + // window.location.href = 'https://www.hxgk.group/jumpapiurl/webindex?url=http://new.hxgk.group/sj/index.html&errorurl=http://new.hxgk.group/sj/index.html#/pages/login/login'; + // } + // console.log("userTokenuserTokenuserToken") + // userToken1=vm.$store.state.userToken + // userKey1=vm.$store.state.userKey + // },200); + // setTimeout(()=>{ + // // console.log(sessionStorage.getItem('key')) + // if (vm.$store.state.userKey==''||vm.$store.state.userToken=='') { + // window.location.href = 'https://www.hxgk.group/jumpapiurl/webindex?url=http://new.hxgk.group/sj/index.html'; + // }else if(vm.$store.state.userKey==undefined||vm.$store.state.userToken==undefined){ + // window.location.href = 'https://www.hxgk.group/jumpapiurl/webindex?url=http://new.hxgk.group/sj/index.html'; + // } + // userToken1=vm.$store.state.userToken + // userKey1=vm.$store.state.userKey + // },200); + setTimeout(()=>{ + Vue.prototype.$u.http.setConfig({ + // baseUrl: 'http://hxgk.user.phone/api', + baseUrl: 'http://new.hxgk.group/api', + loadingText: '努力加载中~', + loadingTime: 800, + // 设置自定义头部content-type + header: { + 'user-token': userToken1, + "user-key": userKey1, + // 'user-token': 'd0b27f36e0d7dfdf883dfe0000069ca182078ed2', + // "user-key": '4fb8e8697c366be03e8fc96319b98524' + } + }); + },500); + + + // 此为自定义配置参数,具体参数见上方说明 + +} + +export default { + install +} \ No newline at end of file diff --git a/common/http.interceptor.js b/common/http.interceptor.js new file mode 100644 index 0000000..de85459 --- /dev/null +++ b/common/http.interceptor.js @@ -0,0 +1,96 @@ +// common/http.interceptor.js + +// 这里的Vue为Vue对象(非创建出来的实例),vm为main.js中“Vue.use(httpInterceptor, app)”这一句的第二个参数, +// 为一个Vue的实例,也即每个页面的"this" +// 如果需要了解这个install方法是什么,请移步:https://uviewui.com/components/vueUse.html +const install = (Vue, vm) => { + // 请求拦截部分,如配置,每次请求前都会执行 + Vue.prototype.$u.http.interceptor.request = (config) => { + config.header['user-token'] = vm.$store.state.userToken + config.header['user-key'] = vm.$store.state.userKey + config.header.Token = 'xxxxxx'; + + return config; + // 如果return一个false值,则会取消本次请求 + // if(config.url == '/user/rest') return false; // 取消某次请求 + } + // 请求拦截,配置Token等参数 + // Vue.prototype.$u.http.setConfig({ + // // baseUrl: 'http://hxgk.user.phone/api', + // baseUrl: 'http://new.hxgk.group/api', + // loadingText: '努力加载中~', + // loadingTime: 800, + // // 设置自定义头部content-type + // header: { + // 'user-token': userToken1, + // "user-key": userKey1, + // // 'user-token': 'd74c163ea3f9697b532e0f5cfeda5a90c71b36a4', + // // "user-key": 'f782e7cfdf4732fb296f16359590d6ad' + // } + // }); + // console.log("heard") + // console.log(sessionStorage.getItem('key')) + // console.log(sessionStorage.getItem('key')) + + + // 线上 + // var userToken1 ="" + // var userKey1 ="" + // 内网 + var userToken1 ='' + var userKey1 ='' + + + setTimeout(()=>{ + // userToken1=vm.$store.state.userToken + // userKey1=vm.$store.state.userKey + // alert("vm.$store.state.apiPass") + // alert(vm.$store.state.apiPass) + if(vm.$store.state.apiPass==2){ + // alert("1") + // alert(vm.$store.state.userToken) + // alert(vm.$store.state.userKey) + // console.log(sessionStorage.getItem('key')) + // if (vm.$store.state.userKey==''||vm.$store.state.userToken=='') { + // window.location.href = 'https://www.hxgk.group/jumpapiurl/webindex?url=http://new.hxgk.group/sj/index.html&errorurl=http://new.hxgk.group/sj/index.htmlsj/index.html#/pages/login/login'; + // }else if(vm.$store.state.userKey==undefined||vm.$store.state.userToken==undefined){ + // window.location.href = 'https://www.hxgk.group/jumpapiurl/webindex?url=http://new.hxgk.group/sj/index.html&errorurl=http://new.hxgk.group/sj/index.htmlsj/index.html#/pages/login/login'; + // } + // userToken1=vm.$store.state.userToken + // userKey1=vm.$store.state.userKey + } + + },200); + setTimeout(()=>{ + console.log("userKey1") + console.log(userKey1) + Vue.prototype.$u.http.setConfig({ + // 本地 + // baseUrl: 'http://hxgk.user.phone', + // 内网 + baseUrl: 'http://kpi.hxgk.net', + // 线上 + // baseUrl: 'http://new.hxgk.group/api', + loadingText: '努力加载中~', + loadingTime: 800, + // 设置自定义头部content-type + header: { + // 'user-token': userToken1, + // "user-key": userKey1, + // 'user-token': userToken1, + // "user-key":userKey1, + + // 'user-token': 'd0b27f36e0d7dfdf883dfe0000069ca182078ed2', + // "user-key": '4fb8e8697c366be03e8fc96319b98524' + } + }); + },500); + + + // 此为自定义配置参数,具体参数见上方说明 + +} + +export default { + install +} \ No newline at end of file diff --git a/common/http.user.api.js b/common/http.user.api.js new file mode 100644 index 0000000..d3a0360 --- /dev/null +++ b/common/http.user.api.js @@ -0,0 +1,21 @@ + +// 创建 User 模块方法,方法内的方法共享 vm 对象 +let User = (vm)=>{ + return { + getSearch:(params = {}) => { + return vm.$u.get('api/yanglaojujiaApp/admin/roomSum', params) + }, + indexImg:(params = {}) => { + return vm.$u.get('api/index', params) + }, + mycontent:(params = {}) => { + return vm.$u.post('api/webach/mycontent', params) + }, + stafflist:(params = {}) => { + return vm.$u.post('hrapi/staff/archiveslist', params) + } + } +} + +// 抛出当前模块 +export default User \ No newline at end of file diff --git a/common/index.list.js b/common/index.list.js new file mode 100644 index 0000000..7e0f5ed --- /dev/null +++ b/common/index.list.js @@ -0,0 +1,585 @@ +module.exports = { + list: [{ + "letter": "A", + "data": [{ + "name": "阿拉斯加", + "mobile": "13588889999", + "keyword": "阿拉斯加ABA13588889999" + }, + { + "name": "阿克苏", + "mobile": "0551-4386721", + "keyword": "阿克苏AKESU0551-4386721" + }, + { + "name": "阿拉善", + "mobile": "4008009100", + "keyword": "阿拉善ALASHAN4008009100" + }, + { + "name": "阿勒泰", + "mobile": "13588889999", + "keyword": "阿勒泰ALETAI13588889999" + }, + { + "name": "阿里", + "mobile": "13588889999", + "keyword": "阿里ALI13588889999" + }, + { + "name": "安阳", + "mobile": "13588889999", + "keyword": "13588889999安阳ANYANG" + } + ] + }, + { + "letter": "B", + "data": [{ + "name": "白城", + "mobile": "该主子没有留电话~", + "keyword": "白城BAICHENG" + }, + { + "name": "白山", + "mobile": "13588889999", + "keyword": "白山BAISHAN13588889999" + }, + { + "name": "白银", + "mobile": "13588889999", + "keyword": "白银BAIYIN13588889999" + }, + { + "name": "保定", + "mobile": "13588889999", + "keyword": "保定BAODING13588889999" + } + ] + }, + { + "letter": "C", + "data": [{ + "name": "沧州", + "mobile": "13588889999", + "keyword": "沧州CANGZHOU13588889999" + }, + { + "name": "长春", + "mobile": "13588889999", + "keyword": "长春CHANGCHUN13588889999" + } + ] + }, + { + "letter": "D", + "data": [{ + "name": "大理", + "mobile": "13588889999", + "keyword": "大理DALI13588889999" + }, + { + "name": "大连", + "mobile": "13588889999", + "keyword": "大连DALIAN13588889999" + } + ] + }, + { + "letter": "E", + "data": [{ + "name": "鄂尔多斯", + "mobile": "13588889999", + "keyword": "鄂尔多斯EERDUOSI13588889999" + }, + { + "name": "恩施", + "mobile": "13588889999", + "keyword": "恩施ENSHI13588889999" + }, + { + "name": "鄂州", + "mobile": "13588889999", + "keyword": "鄂州EZHOU13588889999" + } + ] + }, + { + "letter": "F", + "data": [{ + "name": "防城港", + "mobile": "该主子没有留电话~", + "keyword": "防城港FANGCHENGGANG" + }, + { + "name": "抚顺", + "mobile": "13588889999", + "keyword": "抚顺FUSHUN13588889999" + }, + { + "name": "阜新", + "mobile": "13588889999", + "keyword": "阜新FUXIN13588889999" + }, + { + "name": "阜阳", + "mobile": "13588889999", + "keyword": "阜阳FUYANG13588889999" + }, + { + "name": "抚州", + "mobile": "13588889999", + "keyword": "抚州FUZHOU13588889999" + }, + { + "name": "福州", + "mobile": "13588889999", + "keyword": "福州FUZHOU13588889999" + } + ] + }, + { + "letter": "G", + "data": [{ + "name": "甘南", + "mobile": "13588889999", + "keyword": "甘南GANNAN13588889999" + }, + { + "name": "赣州", + "mobile": "13588889999", + "keyword": "赣州GANZHOU13588889999" + }, + { + "name": "甘孜", + "mobile": "13588889999", + "keyword": "甘孜GANZI13588889999" + } + ] + }, + { + "letter": "H", + "data": [{ + "name": "哈尔滨", + "mobile": "13588889999", + "keyword": "哈尔滨HAERBIN13588889999" + }, + { + "name": "海北", + "mobile": "13588889999", + "keyword": "海北HAIBEI13588889999" + }, + { + "name": "海东", + "mobile": "13588889999", + "keyword": "海东HAIDONG13588889999" + }, + { + "name": "海口", + "mobile": "13588889999", + "keyword": "海口HAIKOU13588889999" + } + ] + }, + { + "letter": "I", + "data": [{ + "name": "ice", + "mobile": "13588889999", + "keyword": "佳木斯JIAMUSI13588889999" + }] + }, + { + "letter": "J", + "data": [{ + "name": "佳木斯", + "mobile": "13588889999", + "keyword": "佳木斯JIAMUSI13588889999" + }, + { + "name": "吉安", + "mobile": "13588889999", + "keyword": "吉安JIAN13588889999" + }, + { + "name": "江门", + "mobile": "13588889999", + "keyword": "江门JIANGMEN13588889999" + } + ] + }, + { + "letter": "K", + "data": [{ + "name": "开封", + "mobile": "13588889999", + "keyword": "开封KAIFENG13588889999" + }, + { + "name": "喀什", + "mobile": "13588889999", + "keyword": "喀什KASHI13588889999" + }, + { + "name": "克拉玛依", + "mobile": "13588889999", + "keyword": "克拉玛依KELAMAYI13588889999" + } + ] + }, + { + "letter": "L", + "data": [{ + "name": "来宾", + "mobile": "13588889999", + "keyword": "来宾LAIBIN13588889999" + }, + { + "name": "兰州", + "mobile": "13588889999", + "keyword": "兰州LANZHOU13588889999" + }, + { + "name": "拉萨", + "mobile": "13588889999", + "keyword": "拉萨LASA13588889999" + }, + { + "name": "乐山", + "mobile": "13588889999", + "keyword": "乐山LESHAN13588889999" + }, + { + "name": "凉山", + "mobile": "13588889999", + "keyword": "凉山LIANGSHAN13588889999" + }, + { + "name": "连云港", + "mobile": "13588889999", + "keyword": "连云港LIANYUNGANG13588889999" + }, + { + "name": "聊城", + "mobile": "18322223333", + "keyword": "聊城LIAOCHENG18322223333" + }, + { + "name": "辽阳", + "mobile": "18322223333", + "keyword": "辽阳LIAOYANG18322223333" + }, + { + "name": "辽源", + "mobile": "18322223333", + "keyword": "辽源LIAOYUAN18322223333" + }, + { + "name": "丽江", + "mobile": "18322223333", + "keyword": "丽江LIJIANG18322223333" + }, + { + "name": "临沧", + "mobile": "18322223333", + "keyword": "临沧LINCANG18322223333" + }, + { + "name": "临汾", + "mobile": "18322223333", + "keyword": "临汾LINFEN18322223333" + }, + { + "name": "临夏", + "mobile": "18322223333", + "keyword": "临夏LINXIA18322223333" + }, + { + "name": "临沂", + "mobile": "18322223333", + "keyword": "临沂LINYI18322223333" + }, + { + "name": "林芝", + "mobile": "18322223333", + "keyword": "林芝LINZHI18322223333" + }, + { + "name": "丽水", + "mobile": "18322223333", + "keyword": "丽水LISHUI18322223333" + } + ] + }, + { + "letter": "M", + "data": [{ + "name": "眉山", + "mobile": "15544448888", + "keyword": "眉山MEISHAN15544448888" + }, + { + "name": "梅州", + "mobile": "15544448888", + "keyword": "梅州MEIZHOU15544448888" + }, + { + "name": "绵阳", + "mobile": "15544448888", + "keyword": "绵阳MIANYANG15544448888" + }, + { + "name": "牡丹江", + "mobile": "15544448888", + "keyword": "牡丹江MUDANJIANG15544448888" + } + ] + }, + { + "letter": "N", + "data": [{ + "name": "南昌", + "mobile": "15544448888", + "keyword": "南昌NANCHANG15544448888" + }, + { + "name": "南充", + "mobile": "15544448888", + "keyword": "南充NANCHONG15544448888" + }, + { + "name": "南京", + "mobile": "15544448888", + "keyword": "南京NANJING15544448888" + }, + { + "name": "南宁", + "mobile": "15544448888", + "keyword": "南宁NANNING15544448888" + }, + { + "name": "南平", + "mobile": "15544448888", + "keyword": "南平NANPING15544448888" + } + ] + }, + { + "letter": "O", + "data": [{ + "name": "欧阳", + "mobile": "15544448888", + "keyword": "欧阳ouyang15544448888" + }] + }, + { + "letter": "P", + "data": [{ + "name": "盘锦", + "mobile": "15544448888", + "keyword": "盘锦PANJIN15544448888" + }, + { + "name": "攀枝花", + "mobile": "15544448888", + "keyword": "攀枝花PANZHIHUA15544448888" + }, + { + "name": "平顶山", + "mobile": "15544448888", + "keyword": "平顶山PINGDINGSHAN15544448888" + }, + { + "name": "平凉", + "mobile": "15544448888", + "keyword": "平凉PINGLIANG15544448888" + }, + { + "name": "萍乡", + "mobile": "15544448888", + "keyword": "萍乡PINGXIANG15544448888" + }, + { + "name": "普洱", + "mobile": "15544448888", + "keyword": "普洱PUER15544448888" + }, + { + "name": "莆田", + "mobile": "15544448888", + "keyword": "莆田PUTIAN15544448888" + }, + { + "name": "濮阳", + "mobile": "15544448888", + "keyword": "濮阳PUYANG15544448888" + } + ] + }, + { + "letter": "Q", + "data": [{ + "name": "黔东南", + "mobile": "15544448888", + "keyword": "黔东南QIANDONGNAN15544448888" + }, + { + "name": "黔南", + "mobile": "15544448888", + "keyword": "黔南QIANNAN15544448888" + }, + { + "name": "黔西南", + "mobile": "15544448888", + "keyword": "黔西南QIANXINAN15544448888" + } + ] + }, + { + "letter": "R", + "data": [{ + "name": "日喀则", + "mobile": "15544448888", + "keyword": "日喀则RIKAZE15544448888" + }, + { + "name": "日照", + "mobile": "15544448888", + "keyword": "日照RIZHAO15544448888" + } + ] + }, + { + "letter": "S", + "data": [{ + "name": "三门峡", + "mobile": "15544448888", + "keyword": "三门峡SANMENXIA15544448888" + }, + { + "name": "三明", + "mobile": "15544448888", + "keyword": "三明SANMING15544448888" + }, + { + "name": "三沙", + "mobile": "15544448888", + "keyword": "三沙SANSHA15544448888" + } + ] + }, + { + "letter": "T", + "data": [{ + "name": "塔城", + "mobile": "15544448888", + "keyword": "塔城TACHENG15544448888" + }, + { + "name": "漯河", + "mobile": "15544448888", + "keyword": "漯河TAHE15544448888" + }, + { + "name": "泰安", + "mobile": "15544448888", + "keyword": "泰安TAIAN15544448888" + } + ] + }, + { + "letter": "W", + "data": [{ + "name": "潍坊", + "mobile": "15544448888", + "keyword": "潍坊WEIFANG15544448888" + }, + { + "name": "威海", + "mobile": "15544448888", + "keyword": "威海WEIHAI15544448888" + }, + { + "name": "渭南", + "mobile": "15544448888", + "keyword": "渭南WEINAN15544448888" + }, + { + "name": "文山", + "mobile": "15544448888", + "keyword": "文山WENSHAN15544448888" + } + ] + }, + { + "letter": "X", + "data": [{ + "name": "厦门", + "mobile": "15544448888", + "keyword": "厦门XIAMEN15544448888" + }, + { + "name": "西安", + "mobile": "15544448888", + "keyword": "西安XIAN15544448888" + }, + { + "name": "湘潭", + "mobile": "15544448888", + "keyword": "湘潭XIANGTAN15544448888" + } + ] + }, + { + "letter": "Y", + "data": [{ + "name": "雅安", + "mobile": "15544448888", + "keyword": "雅安YAAN15544448888" + }, + { + "name": "延安", + "mobile": "15544448888", + "keyword": "延安YANAN15544448888" + }, + { + "name": "延边", + "mobile": "15544448888", + "keyword": "延边YANBIAN15544448888" + }, + { + "name": "盐城", + "mobile": "15544448888", + "keyword": "盐城YANCHENG15544448888" + } + ] + }, + { + "letter": "Z", + "data": [{ + "name": "枣庄", + "mobile": "15544448888", + "keyword": "枣庄ZAOZHUANG15544448888" + }, + { + "name": "张家界", + "mobile": "15544448888", + "keyword": "张家界ZHANGJIAJIE15544448888" + }, + { + "name": "张家口", + "mobile": "15544448888", + "keyword": "张家口ZHANGJIAKOU15544448888" + } + ] + }, + { + "letter": "#", + "data": [{ + "name": "其他.", + "mobile": "16666666666", + "keyword": "echo16666666666" + }] + } + ] +} diff --git a/common/locales/en.js b/common/locales/en.js new file mode 100644 index 0000000..5bd6f7a --- /dev/null +++ b/common/locales/en.js @@ -0,0 +1,21 @@ +export default { + // 可以以页面为单位来写,比如首页的内容,写在index字段,个人中心写在center,共同部分写在common部分 + components: { + desc: 'Numerous components cover the various requirements of the development process, and the components are rich in functions and compatible with multiple terminals. Let you integrate quickly, out of the box' + }, + js: { + desc: 'Numerous intimate gadgets are a weapon that you can call upon during the development process, allowing you to dart in your hand and pierce the Yang with a hundred steps' + }, + template: { + desc: 'Collection of many commonly used pages and layouts, reducing the repetitive work of developers, allowing you to focus on logic and get twice the result with half the effort' + }, + nav: { + components: 'Components', + js: 'JS', + template: 'Template' + }, + common: { + intro: 'UI framework for rapid development of multiple platforms', + title: 'uView UI', + }, +} \ No newline at end of file diff --git a/common/locales/zh.js b/common/locales/zh.js new file mode 100644 index 0000000..1c6b15c --- /dev/null +++ b/common/locales/zh.js @@ -0,0 +1,21 @@ +export default { + // 可以以页面为单位来写,比如首页的内容,写在index字段,个人中心写在center,共同部分写在common部分 + components: { + desc: '众多组件覆盖开发过程的各个需求,组件功能丰富,多端兼容。让你快速集成,开箱即用' + }, + js: { + desc: '众多的贴心小工具,是你开发过程中召之即来的利器,让你飞镖在手,百步穿杨' + }, + template: { + desc: '收集众多的常用页面和布局,减少开发者的重复工作,让你专注逻辑,事半功倍' + }, + nav: { + components: '组件', + js: '工具', + template: '模板' + }, + common: { + intro: '多平台快速开发的UI框架', + title: 'uView UI', + }, +} \ No newline at end of file diff --git a/common/uqrcode.js b/common/uqrcode.js new file mode 100644 index 0000000..e21bbb4 --- /dev/null +++ b/common/uqrcode.js @@ -0,0 +1,1380 @@ +//--------------------------------------------------------------------- +// github https://github.com/Sansnn/uQRCode +//--------------------------------------------------------------------- + +let uQRCode = {}; + +(function() { + //--------------------------------------------------------------------- + // QRCode for JavaScript + // + // Copyright (c) 2009 Kazuhiko Arase + // + // URL: http://www.d-project.com/ + // + // Licensed under the MIT license: + // http://www.opensource.org/licenses/mit-license.php + // + // The word "QR Code" is registered trademark of + // DENSO WAVE INCORPORATED + // http://www.denso-wave.com/qrcode/faqpatent-e.html + // + //--------------------------------------------------------------------- + + //--------------------------------------------------------------------- + // QR8bitByte + //--------------------------------------------------------------------- + + function QR8bitByte(data) { + this.mode = QRMode.MODE_8BIT_BYTE; + this.data = data; + } + + QR8bitByte.prototype = { + + getLength: function(buffer) { + return this.data.length; + }, + + write: function(buffer) { + for (var i = 0; i < this.data.length; i++) { + // not JIS ... + buffer.put(this.data.charCodeAt(i), 8); + } + } + }; + + //--------------------------------------------------------------------- + // QRCode + //--------------------------------------------------------------------- + + function QRCode(typeNumber, errorCorrectLevel) { + this.typeNumber = typeNumber; + this.errorCorrectLevel = errorCorrectLevel; + this.modules = null; + this.moduleCount = 0; + this.dataCache = null; + this.dataList = new Array(); + } + + QRCode.prototype = { + + addData: function(data) { + var newData = new QR8bitByte(data); + this.dataList.push(newData); + this.dataCache = null; + }, + + isDark: function(row, col) { + if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) { + throw new Error(row + "," + col); + } + return this.modules[row][col]; + }, + + getModuleCount: function() { + return this.moduleCount; + }, + + make: function() { + // Calculate automatically typeNumber if provided is < 1 + if (this.typeNumber < 1) { + var typeNumber = 1; + for (typeNumber = 1; typeNumber < 40; typeNumber++) { + var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, this.errorCorrectLevel); + + var buffer = new QRBitBuffer(); + var totalDataCount = 0; + for (var i = 0; i < rsBlocks.length; i++) { + totalDataCount += rsBlocks[i].dataCount; + } + + for (var i = 0; i < this.dataList.length; i++) { + var data = this.dataList[i]; + buffer.put(data.mode, 4); + buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber)); + data.write(buffer); + } + if (buffer.getLengthInBits() <= totalDataCount * 8) + break; + } + this.typeNumber = typeNumber; + } + this.makeImpl(false, this.getBestMaskPattern()); + }, + + makeImpl: function(test, maskPattern) { + + this.moduleCount = this.typeNumber * 4 + 17; + this.modules = new Array(this.moduleCount); + + for (var row = 0; row < this.moduleCount; row++) { + + this.modules[row] = new Array(this.moduleCount); + + for (var col = 0; col < this.moduleCount; col++) { + this.modules[row][col] = null; //(col + row) % 3; + } + } + + this.setupPositionProbePattern(0, 0); + this.setupPositionProbePattern(this.moduleCount - 7, 0); + this.setupPositionProbePattern(0, this.moduleCount - 7); + this.setupPositionAdjustPattern(); + this.setupTimingPattern(); + this.setupTypeInfo(test, maskPattern); + + if (this.typeNumber >= 7) { + this.setupTypeNumber(test); + } + + if (this.dataCache == null) { + this.dataCache = QRCode.createData(this.typeNumber, this.errorCorrectLevel, this.dataList); + } + + this.mapData(this.dataCache, maskPattern); + }, + + setupPositionProbePattern: function(row, col) { + + for (var r = -1; r <= 7; r++) { + + if (row + r <= -1 || this.moduleCount <= row + r) continue; + + for (var c = -1; c <= 7; c++) { + + if (col + c <= -1 || this.moduleCount <= col + c) continue; + + if ((0 <= r && r <= 6 && (c == 0 || c == 6)) || + (0 <= c && c <= 6 && (r == 0 || r == 6)) || + (2 <= r && r <= 4 && 2 <= c && c <= 4)) { + this.modules[row + r][col + c] = true; + } else { + this.modules[row + r][col + c] = false; + } + } + } + }, + + getBestMaskPattern: function() { + + var minLostPoint = 0; + var pattern = 0; + + for (var i = 0; i < 8; i++) { + + this.makeImpl(true, i); + + var lostPoint = QRUtil.getLostPoint(this); + + if (i == 0 || minLostPoint > lostPoint) { + minLostPoint = lostPoint; + pattern = i; + } + } + + return pattern; + }, + + createMovieClip: function(target_mc, instance_name, depth) { + + var qr_mc = target_mc.createEmptyMovieClip(instance_name, depth); + var cs = 1; + + this.make(); + + for (var row = 0; row < this.modules.length; row++) { + + var y = row * cs; + + for (var col = 0; col < this.modules[row].length; col++) { + + var x = col * cs; + var dark = this.modules[row][col]; + + if (dark) { + qr_mc.beginFill(0, 100); + qr_mc.moveTo(x, y); + qr_mc.lineTo(x + cs, y); + qr_mc.lineTo(x + cs, y + cs); + qr_mc.lineTo(x, y + cs); + qr_mc.endFill(); + } + } + } + + return qr_mc; + }, + + setupTimingPattern: function() { + + for (var r = 8; r < this.moduleCount - 8; r++) { + if (this.modules[r][6] != null) { + continue; + } + this.modules[r][6] = (r % 2 == 0); + } + + for (var c = 8; c < this.moduleCount - 8; c++) { + if (this.modules[6][c] != null) { + continue; + } + this.modules[6][c] = (c % 2 == 0); + } + }, + + setupPositionAdjustPattern: function() { + + var pos = QRUtil.getPatternPosition(this.typeNumber); + + for (var i = 0; i < pos.length; i++) { + + for (var j = 0; j < pos.length; j++) { + + var row = pos[i]; + var col = pos[j]; + + if (this.modules[row][col] != null) { + continue; + } + + for (var r = -2; r <= 2; r++) { + + for (var c = -2; c <= 2; c++) { + + if (r == -2 || r == 2 || c == -2 || c == 2 || + (r == 0 && c == 0)) { + this.modules[row + r][col + c] = true; + } else { + this.modules[row + r][col + c] = false; + } + } + } + } + } + }, + + setupTypeNumber: function(test) { + + var bits = QRUtil.getBCHTypeNumber(this.typeNumber); + + for (var i = 0; i < 18; i++) { + var mod = (!test && ((bits >> i) & 1) == 1); + this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod; + } + + for (var i = 0; i < 18; i++) { + var mod = (!test && ((bits >> i) & 1) == 1); + this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod; + } + }, + + setupTypeInfo: function(test, maskPattern) { + + var data = (this.errorCorrectLevel << 3) | maskPattern; + var bits = QRUtil.getBCHTypeInfo(data); + + // vertical + for (var i = 0; i < 15; i++) { + + var mod = (!test && ((bits >> i) & 1) == 1); + + if (i < 6) { + this.modules[i][8] = mod; + } else if (i < 8) { + this.modules[i + 1][8] = mod; + } else { + this.modules[this.moduleCount - 15 + i][8] = mod; + } + } + + // horizontal + for (var i = 0; i < 15; i++) { + + var mod = (!test && ((bits >> i) & 1) == 1); + + if (i < 8) { + this.modules[8][this.moduleCount - i - 1] = mod; + } else if (i < 9) { + this.modules[8][15 - i - 1 + 1] = mod; + } else { + this.modules[8][15 - i - 1] = mod; + } + } + + // fixed module + this.modules[this.moduleCount - 8][8] = (!test); + + }, + + mapData: function(data, maskPattern) { + + var inc = -1; + var row = this.moduleCount - 1; + var bitIndex = 7; + var byteIndex = 0; + + for (var col = this.moduleCount - 1; col > 0; col -= 2) { + + if (col == 6) col--; + + while (true) { + + for (var c = 0; c < 2; c++) { + + if (this.modules[row][col - c] == null) { + + var dark = false; + + if (byteIndex < data.length) { + dark = (((data[byteIndex] >>> bitIndex) & 1) == 1); + } + + var mask = QRUtil.getMask(maskPattern, row, col - c); + + if (mask) { + dark = !dark; + } + + this.modules[row][col - c] = dark; + bitIndex--; + + if (bitIndex == -1) { + byteIndex++; + bitIndex = 7; + } + } + } + + row += inc; + + if (row < 0 || this.moduleCount <= row) { + row -= inc; + inc = -inc; + break; + } + } + } + + } + + }; + + QRCode.PAD0 = 0xEC; + QRCode.PAD1 = 0x11; + + QRCode.createData = function(typeNumber, errorCorrectLevel, dataList) { + + var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel); + + var buffer = new QRBitBuffer(); + + for (var i = 0; i < dataList.length; i++) { + var data = dataList[i]; + buffer.put(data.mode, 4); + buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber)); + data.write(buffer); + } + + // calc num max data. + var totalDataCount = 0; + for (var i = 0; i < rsBlocks.length; i++) { + 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(QRCode.PAD0, 8); + + if (buffer.getLengthInBits() >= totalDataCount * 8) { + break; + } + buffer.put(QRCode.PAD1, 8); + } + + return QRCode.createBytes(buffer, rsBlocks); + } + + QRCode.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++) { + + 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++) { + dcdata[r][i] = 0xff & buffer.buffer[i + offset]; + } + offset += dcCount; + + var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount); + var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1); + + var modPoly = rawPoly.mod(rsPoly); + ecdata[r] = new Array(rsPoly.getLength() - 1); + for (var i = 0; i < ecdata[r].length; i++) { + var modIndex = i + modPoly.getLength() - ecdata[r].length; + ecdata[r][i] = (modIndex >= 0) ? modPoly.get(modIndex) : 0; + } + + } + + var totalCodeCount = 0; + for (var i = 0; i < rsBlocks.length; i++) { + totalCodeCount += rsBlocks[i].totalCount; + } + + var data = new Array(totalCodeCount); + var index = 0; + + for (var i = 0; i < maxDcCount; i++) { + for (var r = 0; r < rsBlocks.length; r++) { + if (i < dcdata[r].length) { + data[index++] = dcdata[r][i]; + } + } + } + + for (var i = 0; i < maxEcCount; i++) { + for (var r = 0; r < rsBlocks.length; r++) { + if (i < ecdata[r].length) { + data[index++] = ecdata[r][i]; + } + } + } + + return data; + + } + + //--------------------------------------------------------------------- + // 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 = { + + PATTERN_POSITION_TABLE: [ + [], + [6, 18], + [6, 22], + [6, 26], + [6, 30], + [6, 34], + [6, 22, 38], + [6, 24, 42], + [6, 26, 46], + [6, 28, 50], + [6, 30, 54], + [6, 32, 58], + [6, 34, 62], + [6, 26, 46, 66], + [6, 26, 48, 70], + [6, 26, 50, 74], + [6, 30, 54, 78], + [6, 30, 56, 82], + [6, 30, 58, 86], + [6, 34, 62, 90], + [6, 28, 50, 72, 94], + [6, 26, 50, 74, 98], + [6, 30, 54, 78, 102], + [6, 28, 54, 80, 106], + [6, 32, 58, 84, 110], + [6, 30, 58, 86, 114], + [6, 34, 62, 90, 118], + [6, 26, 50, 74, 98, 122], + [6, 30, 54, 78, 102, 126], + [6, 26, 52, 78, 104, 130], + [6, 30, 56, 82, 108, 134], + [6, 34, 60, 86, 112, 138], + [6, 30, 58, 86, 114, 142], + [6, 34, 62, 90, 118, 146], + [6, 30, 54, 78, 102, 126, 150], + [6, 24, 50, 76, 102, 128, 154], + [6, 28, 54, 80, 106, 132, 158], + [6, 32, 58, 84, 110, 136, 162], + [6, 26, 54, 82, 110, 138, 166], + [6, 30, 58, 86, 114, 142, 170] + ], + + G15: (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0), + G18: (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0), + G15_MASK: (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1), + + getBCHTypeInfo: function(data) { + var d = data << 10; + while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) { + d ^= (QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15))); + } + return ((data << 10) | d) ^ QRUtil.G15_MASK; + }, + + getBCHTypeNumber: function(data) { + var d = data << 12; + while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) { + d ^= (QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18))); + } + return (data << 12) | d; + }, + + getBCHDigit: function(data) { + + var digit = 0; + + while (data != 0) { + digit++; + data >>>= 1; + } + + return digit; + }, + + getPatternPosition: function(typeNumber) { + return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1]; + }, + + getMask: function(maskPattern, i, j) { + + switch (maskPattern) { + + case QRMaskPattern.PATTERN000: + return (i + j) % 2 == 0; + case QRMaskPattern.PATTERN001: + return i % 2 == 0; + case QRMaskPattern.PATTERN010: + return j % 3 == 0; + case QRMaskPattern.PATTERN011: + return (i + j) % 3 == 0; + case QRMaskPattern.PATTERN100: + return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 == 0; + case QRMaskPattern.PATTERN101: + return (i * j) % 2 + (i * j) % 3 == 0; + case QRMaskPattern.PATTERN110: + return ((i * j) % 2 + (i * j) % 3) % 2 == 0; + case QRMaskPattern.PATTERN111: + return ((i * j) % 3 + (i + j) % 2) % 2 == 0; + + default: + throw new Error("bad maskPattern:" + maskPattern); + } + }, + + getErrorCorrectPolynomial: function(errorCorrectLength) { + + var a = new QRPolynomial([1], 0); + + for (var i = 0; i < errorCorrectLength; i++) { + a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0)); + } + + return a; + }, + + 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); + } + }, + + getLostPoint: function(qrCode) { + + var moduleCount = qrCode.getModuleCount(); + + var lostPoint = 0; + + // LEVEL1 + + for (var row = 0; row < moduleCount; row++) { + + for (var col = 0; col < moduleCount; col++) { + + var sameCount = 0; + var dark = qrCode.isDark(row, col); + + for (var r = -1; r <= 1; r++) { + + if (row + r < 0 || moduleCount <= row + r) { + continue; + } + + for (var c = -1; c <= 1; c++) { + + if (col + c < 0 || moduleCount <= col + c) { + continue; + } + + if (r == 0 && c == 0) { + continue; + } + + if (dark == qrCode.isDark(row + r, col + c)) { + sameCount++; + } + } + } + + if (sameCount > 5) { + lostPoint += (3 + sameCount - 5); + } + } + } + + // LEVEL2 + + for (var row = 0; row < moduleCount - 1; row++) { + for (var col = 0; col < moduleCount - 1; col++) { + var count = 0; + if (qrCode.isDark(row, col)) count++; + if (qrCode.isDark(row + 1, col)) count++; + if (qrCode.isDark(row, col + 1)) count++; + if (qrCode.isDark(row + 1, col + 1)) count++; + if (count == 0 || count == 4) { + lostPoint += 3; + } + } + } + + // LEVEL3 + + for (var row = 0; row < moduleCount; row++) { + for (var col = 0; col < moduleCount - 6; col++) { + 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++) { + for (var row = 0; row < moduleCount - 6; row++) { + 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++) { + for (var row = 0; row < moduleCount; row++) { + if (qrCode.isDark(row, col)) { + darkCount++; + } + } + } + + var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5; + lostPoint += ratio * 10; + + return lostPoint; + } + + }; + + + //--------------------------------------------------------------------- + // QRMath + //--------------------------------------------------------------------- + + var QRMath = { + + glog: function(n) { + + if (n < 1) { + throw new Error("glog(" + n + ")"); + } + + return QRMath.LOG_TABLE[n]; + }, + + gexp: function(n) { + + while (n < 0) { + n += 255; + } + + while (n >= 256) { + n -= 255; + } + + return QRMath.EXP_TABLE[n]; + }, + + EXP_TABLE: new Array(256), + + LOG_TABLE: new Array(256) + + }; + + for (var i = 0; i < 8; i++) { + QRMath.EXP_TABLE[i] = 1 << i; + } + for (var i = 8; i < 256; i++) { + QRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4] ^ + QRMath.EXP_TABLE[i - 5] ^ + QRMath.EXP_TABLE[i - 6] ^ + QRMath.EXP_TABLE[i - 8]; + } + for (var i = 0; i < 255; i++) { + QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]] = i; + } + + //--------------------------------------------------------------------- + // QRPolynomial + //--------------------------------------------------------------------- + + function QRPolynomial(num, shift) { + + if (num.length == undefined) { + throw new Error(num.length + "/" + shift); + } + + var offset = 0; + + while (offset < num.length && num[offset] == 0) { + offset++; + } + + this.num = new Array(num.length - offset + shift); + for (var i = 0; i < num.length - offset; i++) { + this.num[i] = num[i + offset]; + } + } + + QRPolynomial.prototype = { + + get: function(index) { + return this.num[index]; + }, + + getLength: function() { + return this.num.length; + }, + + multiply: function(e) { + + var num = new Array(this.getLength() + e.getLength() - 1); + + for (var i = 0; i < this.getLength(); i++) { + for (var j = 0; j < e.getLength(); j++) { + num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i)) + QRMath.glog(e.get(j))); + } + } + + return new QRPolynomial(num, 0); + }, + + mod: function(e) { + + if (this.getLength() - e.getLength() < 0) { + return this; + } + + var ratio = QRMath.glog(this.get(0)) - QRMath.glog(e.get(0)); + + var num = new Array(this.getLength()); + + for (var i = 0; i < this.getLength(); i++) { + num[i] = this.get(i); + } + + for (var i = 0; i < e.getLength(); i++) { + num[i] ^= QRMath.gexp(QRMath.glog(e.get(i)) + ratio); + } + + // recursive call + return new QRPolynomial(num, 0).mod(e); + } + }; + + //--------------------------------------------------------------------- + // QRRSBlock + //--------------------------------------------------------------------- + + function QRRSBlock(totalCount, dataCount) { + this.totalCount = totalCount; + this.dataCount = dataCount; + } + + QRRSBlock.RS_BLOCK_TABLE = [ + + // L + // M + // Q + // H + + // 1 + [1, 26, 19], + [1, 26, 16], + [1, 26, 13], + [1, 26, 9], + + // 2 + [1, 44, 34], + [1, 44, 28], + [1, 44, 22], + [1, 44, 16], + + // 3 + [1, 70, 55], + [1, 70, 44], + [2, 35, 17], + [2, 35, 13], + + // 4 + [1, 100, 80], + [2, 50, 32], + [2, 50, 24], + [4, 25, 9], + + // 5 + [1, 134, 108], + [2, 67, 43], + [2, 33, 15, 2, 34, 16], + [2, 33, 11, 2, 34, 12], + + // 6 + [2, 86, 68], + [4, 43, 27], + [4, 43, 19], + [4, 43, 15], + + // 7 + [2, 98, 78], + [4, 49, 31], + [2, 32, 14, 4, 33, 15], + [4, 39, 13, 1, 40, 14], + + // 8 + [2, 121, 97], + [2, 60, 38, 2, 61, 39], + [4, 40, 18, 2, 41, 19], + [4, 40, 14, 2, 41, 15], + + // 9 + [2, 146, 116], + [3, 58, 36, 2, 59, 37], + [4, 36, 16, 4, 37, 17], + [4, 36, 12, 4, 37, 13], + + // 10 + [2, 86, 68, 2, 87, 69], + [4, 69, 43, 1, 70, 44], + [6, 43, 19, 2, 44, 20], + [6, 43, 15, 2, 44, 16], + + // 11 + [4, 101, 81], + [1, 80, 50, 4, 81, 51], + [4, 50, 22, 4, 51, 23], + [3, 36, 12, 8, 37, 13], + + // 12 + [2, 116, 92, 2, 117, 93], + [6, 58, 36, 2, 59, 37], + [4, 46, 20, 6, 47, 21], + [7, 42, 14, 4, 43, 15], + + // 13 + [4, 133, 107], + [8, 59, 37, 1, 60, 38], + [8, 44, 20, 4, 45, 21], + [12, 33, 11, 4, 34, 12], + + // 14 + [3, 145, 115, 1, 146, 116], + [4, 64, 40, 5, 65, 41], + [11, 36, 16, 5, 37, 17], + [11, 36, 12, 5, 37, 13], + + // 15 + [5, 109, 87, 1, 110, 88], + [5, 65, 41, 5, 66, 42], + [5, 54, 24, 7, 55, 25], + [11, 36, 12], + + // 16 + [5, 122, 98, 1, 123, 99], + [7, 73, 45, 3, 74, 46], + [15, 43, 19, 2, 44, 20], + [3, 45, 15, 13, 46, 16], + + // 17 + [1, 135, 107, 5, 136, 108], + [10, 74, 46, 1, 75, 47], + [1, 50, 22, 15, 51, 23], + [2, 42, 14, 17, 43, 15], + + // 18 + [5, 150, 120, 1, 151, 121], + [9, 69, 43, 4, 70, 44], + [17, 50, 22, 1, 51, 23], + [2, 42, 14, 19, 43, 15], + + // 19 + [3, 141, 113, 4, 142, 114], + [3, 70, 44, 11, 71, 45], + [17, 47, 21, 4, 48, 22], + [9, 39, 13, 16, 40, 14], + + // 20 + [3, 135, 107, 5, 136, 108], + [3, 67, 41, 13, 68, 42], + [15, 54, 24, 5, 55, 25], + [15, 43, 15, 10, 44, 16], + + // 21 + [4, 144, 116, 4, 145, 117], + [17, 68, 42], + [17, 50, 22, 6, 51, 23], + [19, 46, 16, 6, 47, 17], + + // 22 + [2, 139, 111, 7, 140, 112], + [17, 74, 46], + [7, 54, 24, 16, 55, 25], + [34, 37, 13], + + // 23 + [4, 151, 121, 5, 152, 122], + [4, 75, 47, 14, 76, 48], + [11, 54, 24, 14, 55, 25], + [16, 45, 15, 14, 46, 16], + + // 24 + [6, 147, 117, 4, 148, 118], + [6, 73, 45, 14, 74, 46], + [11, 54, 24, 16, 55, 25], + [30, 46, 16, 2, 47, 17], + + // 25 + [8, 132, 106, 4, 133, 107], + [8, 75, 47, 13, 76, 48], + [7, 54, 24, 22, 55, 25], + [22, 45, 15, 13, 46, 16], + + // 26 + [10, 142, 114, 2, 143, 115], + [19, 74, 46, 4, 75, 47], + [28, 50, 22, 6, 51, 23], + [33, 46, 16, 4, 47, 17], + + // 27 + [8, 152, 122, 4, 153, 123], + [22, 73, 45, 3, 74, 46], + [8, 53, 23, 26, 54, 24], + [12, 45, 15, 28, 46, 16], + + // 28 + [3, 147, 117, 10, 148, 118], + [3, 73, 45, 23, 74, 46], + [4, 54, 24, 31, 55, 25], + [11, 45, 15, 31, 46, 16], + + // 29 + [7, 146, 116, 7, 147, 117], + [21, 73, 45, 7, 74, 46], + [1, 53, 23, 37, 54, 24], + [19, 45, 15, 26, 46, 16], + + // 30 + [5, 145, 115, 10, 146, 116], + [19, 75, 47, 10, 76, 48], + [15, 54, 24, 25, 55, 25], + [23, 45, 15, 25, 46, 16], + + // 31 + [13, 145, 115, 3, 146, 116], + [2, 74, 46, 29, 75, 47], + [42, 54, 24, 1, 55, 25], + [23, 45, 15, 28, 46, 16], + + // 32 + [17, 145, 115], + [10, 74, 46, 23, 75, 47], + [10, 54, 24, 35, 55, 25], + [19, 45, 15, 35, 46, 16], + + // 33 + [17, 145, 115, 1, 146, 116], + [14, 74, 46, 21, 75, 47], + [29, 54, 24, 19, 55, 25], + [11, 45, 15, 46, 46, 16], + + // 34 + [13, 145, 115, 6, 146, 116], + [14, 74, 46, 23, 75, 47], + [44, 54, 24, 7, 55, 25], + [59, 46, 16, 1, 47, 17], + + // 35 + [12, 151, 121, 7, 152, 122], + [12, 75, 47, 26, 76, 48], + [39, 54, 24, 14, 55, 25], + [22, 45, 15, 41, 46, 16], + + // 36 + [6, 151, 121, 14, 152, 122], + [6, 75, 47, 34, 76, 48], + [46, 54, 24, 10, 55, 25], + [2, 45, 15, 64, 46, 16], + + // 37 + [17, 152, 122, 4, 153, 123], + [29, 74, 46, 14, 75, 47], + [49, 54, 24, 10, 55, 25], + [24, 45, 15, 46, 46, 16], + + // 38 + [4, 152, 122, 18, 153, 123], + [13, 74, 46, 32, 75, 47], + [48, 54, 24, 14, 55, 25], + [42, 45, 15, 32, 46, 16], + + // 39 + [20, 147, 117, 4, 148, 118], + [40, 75, 47, 7, 76, 48], + [43, 54, 24, 22, 55, 25], + [10, 45, 15, 67, 46, 16], + + // 40 + [19, 148, 118, 6, 149, 119], + [18, 75, 47, 31, 76, 48], + [34, 54, 24, 34, 55, 25], + [20, 45, 15, 61, 46, 16] + ]; + + QRRSBlock.getRSBlocks = function(typeNumber, errorCorrectLevel) { + + var rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel); + + if (rsBlock == undefined) { + throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + errorCorrectLevel); + } + + var length = rsBlock.length / 3; + + var list = new Array(); + + for (var i = 0; i < length; i++) { + + 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++) { + list.push(new QRRSBlock(totalCount, dataCount)); + } + } + + return list; + } + + QRRSBlock.getRsBlockTable = function(typeNumber, errorCorrectLevel) { + + switch (errorCorrectLevel) { + case QRErrorCorrectLevel.L: + return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0]; + case QRErrorCorrectLevel.M: + return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1]; + case QRErrorCorrectLevel.Q: + return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2]; + case QRErrorCorrectLevel.H: + return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3]; + default: + return undefined; + } + } + + //--------------------------------------------------------------------- + // QRBitBuffer + //--------------------------------------------------------------------- + + function QRBitBuffer() { + this.buffer = new Array(); + this.length = 0; + } + + QRBitBuffer.prototype = { + + get: function(index) { + var bufIndex = Math.floor(index / 8); + return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) == 1; + }, + + put: function(num, length) { + for (var i = 0; i < length; i++) { + this.putBit(((num >>> (length - i - 1)) & 1) == 1); + } + }, + + getLengthInBits: function() { + return this.length; + }, + + putBit: function(bit) { + + var bufIndex = Math.floor(this.length / 8); + if (this.buffer.length <= bufIndex) { + this.buffer.push(0); + } + + if (bit) { + this.buffer[bufIndex] |= (0x80 >>> (this.length % 8)); + } + + this.length++; + } + }; + + //--------------------------------------------------------------------- + // Support Chinese + //--------------------------------------------------------------------- + function utf16To8(text) { + var result = ''; + var c; + for (var i = 0; i < text.length; i++) { + c = text.charCodeAt(i); + if (c >= 0x0001 && c <= 0x007F) { + result += text.charAt(i); + } else if (c > 0x07FF) { + result += String.fromCharCode(0xE0 | c >> 12 & 0x0F); + result += String.fromCharCode(0x80 | c >> 6 & 0x3F); + result += String.fromCharCode(0x80 | c >> 0 & 0x3F); + } else { + result += String.fromCharCode(0xC0 | c >> 6 & 0x1F); + result += String.fromCharCode(0x80 | c >> 0 & 0x3F); + } + } + return result; + } + + uQRCode = { + + defaults: { + size: 258, + margin: 0, + backgroundColor: '#ffffff', + foregroundColor: '#000000', + fileType: 'png', // 'jpg', 'png' + correctLevel: 3, + typeNumber: -1 + }, + + make: function(options) { + var defaultOptions = { + canvasId: options.canvasId, + componentInstance: options.componentInstance, + text: options.text, + size: this.defaults.size, + margin: this.defaults.margin, + backgroundColor: this.defaults.backgroundColor, + foregroundColor: this.defaults.foregroundColor, + fileType: this.defaults.fileType, + correctLevel: this.defaults.correctLevel, + typeNumber: this.defaults.typeNumber + }; + if (options) { + for (var i in options) { + defaultOptions[i] = options[i]; + } + } + options = defaultOptions; + if (!options.canvasId) { + console.error('uQRCode: Please set canvasId!'); + return; + } + + function createCanvas() { + var qrcode = new QRCode(options.typeNumber, options.correctLevel); + qrcode.addData(utf16To8(options.text)); + qrcode.make(); + + var ctx = uni.createCanvasContext(options.canvasId, options.componentInstance); + ctx.setFillStyle(options.backgroundColor); + ctx.fillRect(0, 0, options.size, options.size); + + var tileW = (options.size - options.margin * 2) / qrcode.getModuleCount(); + var tileH = tileW; + + for (var row = 0; row < qrcode.getModuleCount(); row++) { + for (var col = 0; col < qrcode.getModuleCount(); col++) { + var style = qrcode.isDark(row, col) ? options.foregroundColor : options.backgroundColor; + ctx.setFillStyle(style); + var x = Math.round(col * tileW) + options.margin; + var y = Math.round(row * tileH) + options.margin; + var w = Math.ceil((col + 1) * tileW) - Math.floor(col * tileW); + var h = Math.ceil((row + 1) * tileW) - Math.floor(row * tileW); + ctx.fillRect(x, y, w, h); + } + } + + setTimeout(function() { + ctx.draw(false, function() { + setTimeout(function() { + uni.canvasToTempFilePath({ + canvasId: options.canvasId, + fileType: options.fileType, + width: options.size, + height: options.size, + destWidth: options.size, + destHeight: options.size, + success: function(res) { + options.success && options.success(res.tempFilePath); + }, + fail: function(error) { + options.fail && options.fail(error); + }, + complete: function(res) { + options.complete && options.complete(res); + } + }, options.componentInstance); + }, options.text.length + 100); + }); + }, 150); + } + + createCanvas(); + } + + } + +})() + +export default uQRCode diff --git a/common/util.js b/common/util.js new file mode 100644 index 0000000..b645006 --- /dev/null +++ b/common/util.js @@ -0,0 +1,103 @@ +function formatTime(time) { + if (typeof time !== 'number' || time < 0) { + return time + } + + var hour = parseInt(time / 3600) + time = time % 3600 + var minute = parseInt(time / 60) + time = time % 60 + var second = time + + return ([hour, minute, second]).map(function(n) { + n = n.toString() + return n[1] ? n : '0' + n + }).join(':') +} + +function formatDateTime(date, fmt = 'yyyy-MM-dd hh:mm:ss') { + if(!date) { + return '' + } + if (typeof (date) === 'number') { + date = new Date(date * 1000) + } + var o = { + "M+": date.getMonth() + 1, //月份 + "d+": date.getDate(), //日 + "h+": date.getHours(), //小时 + "m+": date.getMinutes(), //分 + "s+": date.getSeconds(), //秒 + "q+": Math.floor((date.getMonth() + 3) / 3), //季度 + "S": date.getMilliseconds() //毫秒 + } + if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length)) + for (var k in o) + if (new RegExp("(" + k + ")").test(fmt)) + fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))) + return fmt +} + +function formatLocation(longitude, latitude) { + if (typeof longitude === 'string' && typeof latitude === 'string') { + longitude = parseFloat(longitude) + latitude = parseFloat(latitude) + } + + longitude = longitude.toFixed(2) + latitude = latitude.toFixed(2) + + return { + longitude: longitude.toString().split('.'), + latitude: latitude.toString().split('.') + } +} + +var dateUtils = { + UNITS: { + '年': 31557600000, + '月': 2629800000, + '天': 86400000, + '小时': 3600000, + '分钟': 60000, + '秒': 1000 + }, + humanize: function(milliseconds) { + var humanize = ''; + for (var key in this.UNITS) { + if (milliseconds >= this.UNITS[key]) { + humanize = Math.floor(milliseconds / this.UNITS[key]) + key + '前'; + break; + } + } + return humanize || '刚刚'; + }, + format: function(dateStr) { + var date = this.parse(dateStr) + var diff = Date.now() - date.getTime(); + if (diff < this.UNITS['天']) { + return this.humanize(diff); + } + var _format = function(number) { + return (number < 10 ? ('0' + number) : number); + }; + return date.getFullYear() + '/' + _format(date.getMonth() + 1) + '/' + _format(date.getDate()) + '-' + + _format(date.getHours()) + ':' + _format(date.getMinutes()); + }, + parse: function(str) { //将"yyyy-mm-dd HH:MM:ss"格式的字符串,转化为一个Date对象 + var a = str.split(/[^0-9]/); + return new Date(a[0], a[1] - 1, a[2], a[3], a[4], a[5]); + } +}; + +const hexToRgba = (hex, opacity) => { //16进制颜色转rgba + return "rgba(" + parseInt("0x" + hex.slice(1, 3)) + "," + parseInt("0x" + hex.slice(3, 5)) + "," + parseInt("0x" + hex.slice(5, 7)) + "," + opacity + ")" +} + +module.exports = { + formatTime, + formatDateTime, + formatLocation, + dateUtils, + hexToRgba +} diff --git a/common/vue-i18n.min.js b/common/vue-i18n.min.js new file mode 100644 index 0000000..8d0a5c0 --- /dev/null +++ b/common/vue-i18n.min.js @@ -0,0 +1,6 @@ +/*! + * vue-i18n v8.20.0 + * (c) 2020 kazuya kawaguchi + * Released under the MIT License. + */ +var t,e;t=this,e=function(){"use strict";var t=["style","currency","currencyDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","localeMatcher","formatMatcher","unit"];function e(t,e){"undefined"!=typeof console&&(console.warn("[vue-i18n] "+t),e&&console.warn(e.stack))}var n=Array.isArray;function r(t){return null!==t&&"object"==typeof t}function a(t){return"string"==typeof t}var i=Object.prototype.toString,o="[object Object]";function s(t){return i.call(t)===o}function l(t){return null==t}function c(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var n=null,a=null;return 1===t.length?r(t[0])||Array.isArray(t[0])?a=t[0]:"string"==typeof t[0]&&(n=t[0]):2===t.length&&("string"==typeof t[0]&&(n=t[0]),(r(t[1])||Array.isArray(t[1]))&&(a=t[1])),{locale:n,params:a}}function u(t){return JSON.parse(JSON.stringify(t))}function h(t,e){return!!~t.indexOf(e)}var f=Object.prototype.hasOwnProperty;function p(t,e){return f.call(t,e)}function m(t){for(var e=arguments,n=Object(t),a=1;a0;)e[n]=arguments[n+1];var r=this.$i18n;return r._t.apply(r,[t,r.locale,r._getMessages(),this].concat(e))},t.prototype.$tc=function(t,e){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];var a=this.$i18n;return a._tc.apply(a,[t,a.locale,a._getMessages(),this,e].concat(n))},t.prototype.$te=function(t,e){var n=this.$i18n;return n._te(t,n.locale,n._getMessages(),e)},t.prototype.$d=function(t){for(var e,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(e=this.$i18n).d.apply(e,[t].concat(n))},t.prototype.$n=function(t){for(var e,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(e=this.$i18n).n.apply(e,[t].concat(n))}}(F),F.mixin(g),F.directive("t",{bind:w,update:$,unbind:M}),F.component(v.name,v),F.component(k.name,k),F.config.optionMergeStrategies.i18n=function(t,e){return void 0===e?t:e}}var D=function(){this._caches=Object.create(null)};D.prototype.interpolate=function(t,e){if(!e)return[t];var n=this._caches[t];return n||(n=function(t){var e=[],n=0,r="";for(;n0)h--,u=R,f[W]();else{if(h=0,void 0===n)return!1;if(!1===(n=J(n)))return!1;f[j]()}};null!==u;)if("\\"!==(e=t[++c])||!p()){if(a=U(e),(i=(s=z[u])[a]||s.else||E)===E)return;if(u=i[0],(o=f[i[1]])&&(r=void 0===(r=i[2])?e:r,!1===o()))return;if(u===V)return l}}(t))&&(this._cache[t]=e),e||[]},q.prototype.getPathValue=function(t,e){if(!r(t))return null;var n=this.parsePath(e);if(0===n.length)return null;for(var a=n.length,i=t,o=0;o/,Z=/(?:@(?:\.[a-z]+)?:(?:[\w\-_|.]+|\([\w\-_|.]+\)))/g,K=/^@(?:\.([a-z]+))?:/,Q=/[()]/g,Y={upper:function(t){return t.toLocaleUpperCase()},lower:function(t){return t.toLocaleLowerCase()},capitalize:function(t){return""+t.charAt(0).toLocaleUpperCase()+t.substr(1)}},tt=new D,et=function(t){var e=this;void 0===t&&(t={}),!F&&"undefined"!=typeof window&&window.Vue&&I(window.Vue);var n=t.locale||"en-US",r=!1!==t.fallbackLocale&&(t.fallbackLocale||"en-US"),a=t.messages||{},i=t.dateTimeFormats||{},o=t.numberFormats||{};this._vm=null,this._formatter=t.formatter||tt,this._modifiers=t.modifiers||{},this._missing=t.missing||null,this._root=t.root||null,this._sync=void 0===t.sync||!!t.sync,this._fallbackRoot=void 0===t.fallbackRoot||!!t.fallbackRoot,this._formatFallbackMessages=void 0!==t.formatFallbackMessages&&!!t.formatFallbackMessages,this._silentTranslationWarn=void 0!==t.silentTranslationWarn&&t.silentTranslationWarn,this._silentFallbackWarn=void 0!==t.silentFallbackWarn&&!!t.silentFallbackWarn,this._dateTimeFormatters={},this._numberFormatters={},this._path=new q,this._dataListeners=[],this._componentInstanceCreatedListener=t.componentInstanceCreatedListener||null,this._preserveDirectiveContent=void 0!==t.preserveDirectiveContent&&!!t.preserveDirectiveContent,this.pluralizationRules=t.pluralizationRules||{},this._warnHtmlInMessage=t.warnHtmlInMessage||"off",this._postTranslation=t.postTranslation||null,this.getChoiceIndex=function(t,n){var r=Object.getPrototypeOf(e);if(r&&r.getChoiceIndex)return r.getChoiceIndex.call(e,t,n);var a,i;return e.locale in e.pluralizationRules?e.pluralizationRules[e.locale].apply(e,[t,n]):(a=t,i=n,a=Math.abs(a),2===i?a?a>1?1:0:1:a?Math.min(a,2):0)},this._exist=function(t,n){return!(!t||!n)&&(!l(e._path.getPathValue(t,n))||!!t[n])},"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||Object.keys(a).forEach(function(t){e._checkLocaleMessage(t,e._warnHtmlInMessage,a[t])}),this._initVM({locale:n,fallbackLocale:r,messages:a,dateTimeFormats:i,numberFormats:o})},nt={vm:{configurable:!0},messages:{configurable:!0},dateTimeFormats:{configurable:!0},numberFormats:{configurable:!0},availableLocales:{configurable:!0},locale:{configurable:!0},fallbackLocale:{configurable:!0},formatFallbackMessages:{configurable:!0},missing:{configurable:!0},formatter:{configurable:!0},silentTranslationWarn:{configurable:!0},silentFallbackWarn:{configurable:!0},preserveDirectiveContent:{configurable:!0},warnHtmlInMessage:{configurable:!0},postTranslation:{configurable:!0}};return et.prototype._checkLocaleMessage=function(t,n,r){var i=function(t,n,r,o){if(s(r))Object.keys(r).forEach(function(e){var a=r[e];s(a)?(o.push(e),o.push("."),i(t,n,a,o),o.pop(),o.pop()):(o.push(e),i(t,n,a,o),o.pop())});else if(Array.isArray(r))r.forEach(function(e,r){s(e)?(o.push("["+r+"]"),o.push("."),i(t,n,e,o),o.pop(),o.pop()):(o.push("["+r+"]"),i(t,n,e,o),o.pop())});else if(a(r)){if(X.test(r)){var l="Detected HTML in message '"+r+"' of keypath '"+o.join("")+"' at '"+n+"'. Consider component interpolation with '' to avoid XSS. See https://bit.ly/2ZqJzkp";"warn"===t?e(l):"error"===t&&function(t,e){"undefined"!=typeof console&&(console.error("[vue-i18n] "+t),e&&console.error(e.stack))}(l)}}};i(n,t,r,[])},et.prototype._initVM=function(t){var e=F.config.silent;F.config.silent=!0,this._vm=new F({data:t}),F.config.silent=e},et.prototype.destroyVM=function(){this._vm.$destroy()},et.prototype.subscribeDataChanging=function(t){this._dataListeners.push(t)},et.prototype.unsubscribeDataChanging=function(t){!function(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)t.splice(n,1)}}(this._dataListeners,t)},et.prototype.watchI18nData=function(){var t=this;return this._vm.$watch("$data",function(){for(var e=t._dataListeners.length;e--;)F.nextTick(function(){t._dataListeners[e]&&t._dataListeners[e].$forceUpdate()})},{deep:!0})},et.prototype.watchLocale=function(){if(!this._sync||!this._root)return null;var t=this._vm;return this._root.$i18n.vm.$watch("locale",function(e){t.$set(t,"locale",e),t.$forceUpdate()},{immediate:!0})},et.prototype.onComponentInstanceCreated=function(t){this._componentInstanceCreatedListener&&this._componentInstanceCreatedListener(t,this)},nt.vm.get=function(){return this._vm},nt.messages.get=function(){return u(this._getMessages())},nt.dateTimeFormats.get=function(){return u(this._getDateTimeFormats())},nt.numberFormats.get=function(){return u(this._getNumberFormats())},nt.availableLocales.get=function(){return Object.keys(this.messages).sort()},nt.locale.get=function(){return this._vm.locale},nt.locale.set=function(t){this._vm.$set(this._vm,"locale",t)},nt.fallbackLocale.get=function(){return this._vm.fallbackLocale},nt.fallbackLocale.set=function(t){this._localeChainCache={},this._vm.$set(this._vm,"fallbackLocale",t)},nt.formatFallbackMessages.get=function(){return this._formatFallbackMessages},nt.formatFallbackMessages.set=function(t){this._formatFallbackMessages=t},nt.missing.get=function(){return this._missing},nt.missing.set=function(t){this._missing=t},nt.formatter.get=function(){return this._formatter},nt.formatter.set=function(t){this._formatter=t},nt.silentTranslationWarn.get=function(){return this._silentTranslationWarn},nt.silentTranslationWarn.set=function(t){this._silentTranslationWarn=t},nt.silentFallbackWarn.get=function(){return this._silentFallbackWarn},nt.silentFallbackWarn.set=function(t){this._silentFallbackWarn=t},nt.preserveDirectiveContent.get=function(){return this._preserveDirectiveContent},nt.preserveDirectiveContent.set=function(t){this._preserveDirectiveContent=t},nt.warnHtmlInMessage.get=function(){return this._warnHtmlInMessage},nt.warnHtmlInMessage.set=function(t){var e=this,n=this._warnHtmlInMessage;if(this._warnHtmlInMessage=t,n!==t&&("warn"===t||"error"===t)){var r=this._getMessages();Object.keys(r).forEach(function(t){e._checkLocaleMessage(t,e._warnHtmlInMessage,r[t])})}},nt.postTranslation.get=function(){return this._postTranslation},nt.postTranslation.set=function(t){this._postTranslation=t},et.prototype._getMessages=function(){return this._vm.messages},et.prototype._getDateTimeFormats=function(){return this._vm.dateTimeFormats},et.prototype._getNumberFormats=function(){return this._vm.numberFormats},et.prototype._warnDefault=function(t,e,n,r,i,o){if(!l(n))return n;if(this._missing){var s=this._missing.apply(null,[t,e,r,i]);if(a(s))return s}if(this._formatFallbackMessages){var u=c.apply(void 0,i);return this._render(e,o,u.params,e)}return e},et.prototype._isFallbackRoot=function(t){return!t&&!l(this._root)&&this._fallbackRoot},et.prototype._isSilentFallbackWarn=function(t){return this._silentFallbackWarn instanceof RegExp?this._silentFallbackWarn.test(t):this._silentFallbackWarn},et.prototype._isSilentFallback=function(t,e){return this._isSilentFallbackWarn(e)&&(this._isFallbackRoot()||t!==this.fallbackLocale)},et.prototype._isSilentTranslationWarn=function(t){return this._silentTranslationWarn instanceof RegExp?this._silentTranslationWarn.test(t):this._silentTranslationWarn},et.prototype._interpolate=function(t,e,n,r,i,o,c){if(!e)return null;var u,h=this._path.getPathValue(e,n);if(Array.isArray(h)||s(h))return h;if(l(h)){if(!s(e))return null;if(!a(u=e[n]))return null}else{if(!a(h))return null;u=h}return(u.indexOf("@:")>=0||u.indexOf("@.")>=0)&&(u=this._link(t,e,u,r,"raw",o,c)),this._render(u,i,o,n)},et.prototype._link=function(t,e,n,r,a,i,o){var s=n,l=s.match(Z);for(var c in l)if(l.hasOwnProperty(c)){var u=l[c],f=u.match(K),p=f[0],m=f[1],_=u.replace(p,"").replace(Q,"");if(h(o,_))return s;o.push(_);var g=this._interpolate(t,e,_,r,"raw"===a?"string":a,"raw"===a?void 0:i,o);if(this._isFallbackRoot(g)){if(!this._root)throw Error("unexpected error");var v=this._root.$i18n;g=v._translate(v._getMessages(),v.locale,v.fallbackLocale,_,r,a,i)}g=this._warnDefault(t,_,g,r,Array.isArray(i)?i:[i],a),this._modifiers.hasOwnProperty(m)?g=this._modifiers[m](g):Y.hasOwnProperty(m)&&(g=Y[m](g)),o.pop(),s=g?s.replace(u,g):s}return s},et.prototype._render=function(t,e,n,r){var i=this._formatter.interpolate(t,n,r);return i||(i=tt.interpolate(t,n,r)),"string"!==e||a(i)?i:i.join("")},et.prototype._appendItemToChain=function(t,e,n){var r=!1;return h(t,e)||(r=!0,e&&(r="!"!==e[e.length-1],e=e.replace(/!/g,""),t.push(e),n&&n[e]&&(r=n[e]))),r},et.prototype._appendLocaleToChain=function(t,e,n){var r,a=e.split("-");do{var i=a.join("-");r=this._appendItemToChain(t,i,n),a.splice(-1,1)}while(a.length&&!0===r);return r},et.prototype._appendBlockToChain=function(t,e,n){for(var r=!0,i=0;i0;)i[o]=arguments[o+4];if(!t)return"";var s=c.apply(void 0,i),l=s.locale||e,u=this._translate(n,l,this.fallbackLocale,t,r,"string",s.params);if(this._isFallbackRoot(u)){if(!this._root)throw Error("unexpected error");return(a=this._root).$t.apply(a,[t].concat(i))}return u=this._warnDefault(l,t,u,r,i,"string"),this._postTranslation&&null!=u&&(u=this._postTranslation(u,t)),u},et.prototype.t=function(t){for(var e,n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return(e=this)._t.apply(e,[t,this.locale,this._getMessages(),null].concat(n))},et.prototype._i=function(t,e,n,r,a){var i=this._translate(n,e,this.fallbackLocale,t,r,"raw",a);if(this._isFallbackRoot(i)){if(!this._root)throw Error("unexpected error");return this._root.$i18n.i(t,e,a)}return this._warnDefault(e,t,i,r,[a],"raw")},et.prototype.i=function(t,e,n){return t?(a(e)||(e=this.locale),this._i(t,e,this._getMessages(),null,n)):""},et.prototype._tc=function(t,e,n,r,a){for(var i,o=[],s=arguments.length-5;s-- >0;)o[s]=arguments[s+5];if(!t)return"";void 0===a&&(a=1);var l={count:a,n:a},u=c.apply(void 0,o);return u.params=Object.assign(l,u.params),o=null===u.locale?[u.params]:[u.locale,u.params],this.fetchChoice((i=this)._t.apply(i,[t,e,n,r].concat(o)),a)},et.prototype.fetchChoice=function(t,e){if(!t&&!a(t))return null;var n=t.split("|");return n[e=this.getChoiceIndex(e,n.length)]?n[e].trim():t},et.prototype.tc=function(t,e){for(var n,r=[],a=arguments.length-2;a-- >0;)r[a]=arguments[a+2];return(n=this)._tc.apply(n,[t,this.locale,this._getMessages(),null,e].concat(r))},et.prototype._te=function(t,e,n){for(var r=[],a=arguments.length-3;a-- >0;)r[a]=arguments[a+3];var i=c.apply(void 0,r).locale||e;return this._exist(n[i],t)},et.prototype.te=function(t,e){return this._te(t,this.locale,this._getMessages(),e)},et.prototype.getLocaleMessage=function(t){return u(this._vm.messages[t]||{})},et.prototype.setLocaleMessage=function(t,e){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(t,this._warnHtmlInMessage,e),this._vm.$set(this._vm.messages,t,e)},et.prototype.mergeLocaleMessage=function(t,e){"warn"!==this._warnHtmlInMessage&&"error"!==this._warnHtmlInMessage||this._checkLocaleMessage(t,this._warnHtmlInMessage,e),this._vm.$set(this._vm.messages,t,m({},this._vm.messages[t]||{},e))},et.prototype.getDateTimeFormat=function(t){return u(this._vm.dateTimeFormats[t]||{})},et.prototype.setDateTimeFormat=function(t,e){this._vm.$set(this._vm.dateTimeFormats,t,e),this._clearDateTimeFormat(t,e)},et.prototype.mergeDateTimeFormat=function(t,e){this._vm.$set(this._vm.dateTimeFormats,t,m(this._vm.dateTimeFormats[t]||{},e)),this._clearDateTimeFormat(t,e)},et.prototype._clearDateTimeFormat=function(t,e){for(var n in e){var r=t+"__"+n;this._dateTimeFormatters.hasOwnProperty(r)&&delete this._dateTimeFormatters[r]}},et.prototype._localizeDateTime=function(t,e,n,r,a){for(var i=e,o=r[i],s=this._getLocaleChain(e,n),c=0;c0;)e[n]=arguments[n+1];var i=this.locale,o=null;return 1===e.length?a(e[0])?o=e[0]:r(e[0])&&(e[0].locale&&(i=e[0].locale),e[0].key&&(o=e[0].key)):2===e.length&&(a(e[0])&&(o=e[0]),a(e[1])&&(i=e[1])),this._d(t,i,o)},et.prototype.getNumberFormat=function(t){return u(this._vm.numberFormats[t]||{})},et.prototype.setNumberFormat=function(t,e){this._vm.$set(this._vm.numberFormats,t,e),this._clearNumberFormat(t,e)},et.prototype.mergeNumberFormat=function(t,e){this._vm.$set(this._vm.numberFormats,t,m(this._vm.numberFormats[t]||{},e)),this._clearNumberFormat(t,e)},et.prototype._clearNumberFormat=function(t,e){for(var n in e){var r=t+"__"+n;this._numberFormatters.hasOwnProperty(r)&&delete this._numberFormatters[r]}},et.prototype._getNumberFormatter=function(t,e,n,r,a,i){for(var o=e,s=r[o],c=this._getLocaleChain(e,n),u=0;u0;)n[i]=arguments[i+1];var o=this.locale,s=null,l=null;return 1===n.length?a(n[0])?s=n[0]:r(n[0])&&(n[0].locale&&(o=n[0].locale),n[0].key&&(s=n[0].key),l=Object.keys(n[0]).reduce(function(e,r){var a;return h(t,r)?Object.assign({},e,((a={})[r]=n[0][r],a)):e},null)):2===n.length&&(a(n[0])&&(s=n[0]),a(n[1])&&(o=n[1])),this._n(e,o,s,l)},et.prototype._ntp=function(t,e,n,r){if(!et.availabilities.numberFormat)return[];if(!n)return(r?new Intl.NumberFormat(e,r):new Intl.NumberFormat(e)).formatToParts(t);var a=this._getNumberFormatter(t,e,this.fallbackLocale,this._getNumberFormats(),n,r),i=a&&a.formatToParts(t);if(this._isFallbackRoot(i)){if(!this._root)throw Error("unexpected error");return this._root.$i18n._ntp(t,e,n,r)}return i||[]},Object.defineProperties(et.prototype,nt),Object.defineProperty(et,"availabilities",{get:function(){if(!G){var t="undefined"!=typeof Intl;G={dateTimeFormat:t&&void 0!==Intl.DateTimeFormat,numberFormat:t&&void 0!==Intl.NumberFormat}}return G}}),et.install=I,et.version="8.20.0",et},"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueI18n=e(); \ No newline at end of file diff --git a/components/page-nav/page-nav.vue b/components/page-nav/page-nav.vue new file mode 100644 index 0000000..3f3c0f2 --- /dev/null +++ b/components/page-nav/page-nav.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/main.js b/main.js new file mode 100644 index 0000000..cf38af0 --- /dev/null +++ b/main.js @@ -0,0 +1,66 @@ +import Vue from 'vue'; +import App from './App'; +import * as echarts from 'echarts'; +Vue.config.productionTip = false; +import ElementUI from 'element-ui' +import 'element-ui/lib/theme-chalk/index.css' +App.mpType = 'app'; + +// 此处为演示Vue.prototype使用,非uView的功能部分 +Vue.prototype.vuePrototype = '枣红'; +Vue.use(ElementUI) +// 引入全局uView +import uView from 'uview-ui'; +Vue.use(uView); + +// 此处为演示vuex使用,非uView的功能部分 +import store from '@/store'; + +// 引入uView提供的对vuex的简写法文件 +let vuexStore = require('@/store/$u.mixin.js'); +Vue.mixin(vuexStore); + +// 引入uView对小程序分享的mixin封装 +let mpShare = require('uview-ui/libs/mixin/mpShare.js'); +Vue.mixin(mpShare); +Vue.prototype.$echarts = echarts + +// i18n部分的配置 +// 引入语言包,注意路径 +import Chinese from '@/common/locales/zh.js'; +import English from '@/common/locales/en.js'; + +// VueI18n +import VueI18n from '@/common/vue-i18n.min.js'; + +// VueI18n +Vue.use(VueI18n); + +const i18n = new VueI18n({ + // 默认语言 + locale: 'zh', + // 引入语言文件 + messages: { + 'zh': Chinese, + 'en': English, + } +}); + +// 由于微信小程序的运行机制问题,需声明如下一行,H5和APP非必填 +Vue.prototype._i18n = i18n; + +const app = new Vue({ + i18n, + store, + ...App +}); + +// http拦截器,将此部分放在new Vue()和app.$mount()之间,才能App.vue中正常使用 +import httpInterceptor from '@/common/http.interceptor.js'; +Vue.use(httpInterceptor, app); + +// http接口API抽离,免于写url或者一些固定的参数 +import httpApi from '@/common/http.api.js'; +Vue.use(httpApi, app); + +app.$mount(); diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..9b1a689 --- /dev/null +++ b/manifest.json @@ -0,0 +1,138 @@ +{ + "name" : "hxgk-phone-jx", + "appid" : "__UNI__C505832", + "description" : "多平台快速开发的UI框架", + "versionName" : "1.8.4", + "versionCode" : "100", + "transformPx" : false, + "app-plus" : { + "optimization" : { + "subPackages" : true + }, + "safearea" : { + "bottom" : { + "offset" : "none" + } + }, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + "usingComponents" : true, + "nvueCompiler" : "uni-app", + "compilerVersion" : 3, + "modules" : {}, + "distribute" : { + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ], + "abiFilters" : [ "armeabi-v7a", "arm64-v8a" ] + }, + "ios" : {}, + "sdkConfigs" : { + "ad" : {} + }, + "icons" : { + "android" : { + "hdpi" : "unpackage/res/icons/72x72.png", + "xhdpi" : "unpackage/res/icons/96x96.png", + "xxhdpi" : "unpackage/res/icons/144x144.png", + "xxxhdpi" : "unpackage/res/icons/192x192.png" + }, + "ios" : { + "appstore" : "unpackage/res/icons/1024x1024.png", + "ipad" : { + "app" : "unpackage/res/icons/76x76.png", + "app@2x" : "unpackage/res/icons/152x152.png", + "notification" : "unpackage/res/icons/20x20.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "proapp@2x" : "unpackage/res/icons/167x167.png", + "settings" : "unpackage/res/icons/29x29.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "spotlight" : "unpackage/res/icons/40x40.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png" + }, + "iphone" : { + "app@2x" : "unpackage/res/icons/120x120.png", + "app@3x" : "unpackage/res/icons/180x180.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "notification@3x" : "unpackage/res/icons/60x60.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "settings@3x" : "unpackage/res/icons/87x87.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png", + "spotlight@3x" : "unpackage/res/icons/120x120.png" + } + } + } + } + }, + "quickapp" : {}, + "mp-weixin" : { + "appid" : "", + "setting" : { + "urlCheck" : true, + "es6" : false, + "minified" : true, + "postcss" : true + }, + "optimization" : { + "subPackages" : true + }, + "usingComponents" : true + }, + "mp-alipay" : { + "usingComponents" : true, + "component2" : true + }, + "mp-qq" : { + "optimization" : { + "subPackages" : true + }, + "appid" : "15646153" + }, + "mp-baidu" : { + "usingComponents" : true, + "appid" : "" + }, + "mp-toutiao" : { + "usingComponents" : true, + "appid" : "" + }, + "h5" : { + "template" : "template.h5.html", + "router" : { + "mode" : "hash", + "base" : "./" + }, + "optimization" : { + "treeShaking" : { + "enable" : false + } + }, + "title" : "绩效考核" + } +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..c9a6439 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,227 @@ +{ + "name": "uView", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "uView", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "echarts": "^5.3.2", + "element-ui": "^2.15.8", + "vue-i18n": "^8.20.0" + } + }, + "node_modules/async-validator": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.5.tgz", + "integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==", + "dependencies": { + "babel-runtime": "6.x" + } + }, + "node_modules/babel-helper-vue-jsx-merge-props": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz", + "integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg==" + }, + "node_modules/babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", + "dependencies": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "node_modules/core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "deprecated": "core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.", + "hasInstallScript": true + }, + "node_modules/deepmerge": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz", + "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/echarts": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.3.2.tgz", + "integrity": "sha512-LWCt7ohOKdJqyiBJ0OGBmE9szLdfA9sGcsMEi+GGoc6+Xo75C+BkcT/6NNGRHAWtnQl2fNow05AQjznpap28TQ==", + "dependencies": { + "tslib": "2.3.0", + "zrender": "5.3.1" + } + }, + "node_modules/element-ui": { + "version": "2.15.8", + "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.8.tgz", + "integrity": "sha512-N54zxosRFqpYax3APY3GeRmtOZwIls6Z756WM0kdPZ5Q92PIeKHnZgF1StlamIg9bLxP1k+qdhTZvIeQlim09A==", + "dependencies": { + "async-validator": "~1.8.1", + "babel-helper-vue-jsx-merge-props": "^2.0.0", + "deepmerge": "^1.2.0", + "normalize-wheel": "^1.0.1", + "resize-observer-polyfill": "^1.5.0", + "throttle-debounce": "^1.0.1" + }, + "peerDependencies": { + "vue": "^2.5.17" + } + }, + "node_modules/normalize-wheel": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz", + "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU=" + }, + "node_modules/regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + }, + "node_modules/resize-observer-polyfill": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", + "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" + }, + "node_modules/throttle-debounce": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.1.0.tgz", + "integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg==", + "engines": { + "node": ">=4" + } + }, + "node_modules/tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + }, + "node_modules/vue": { + "version": "2.6.14", + "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.14.tgz", + "integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==", + "peer": true + }, + "node_modules/vue-i18n": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.20.0.tgz", + "integrity": "sha512-ZiAOoeR4d/JtKpbjipx3I80ey7cYG1ki5gQ7HwzWm4YFio9brA15BEYHjalEoBaEfzF5OBEZP+Y2MvAaWnyXXg==" + }, + "node_modules/zrender": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.3.1.tgz", + "integrity": "sha512-7olqIjy0gWfznKr6vgfnGBk7y4UtdMvdwFmK92vVQsQeDPyzkHW1OlrLEKg6GHz1W5ePf0FeN1q2vkl/HFqhXw==", + "dependencies": { + "tslib": "2.3.0" + } + } + }, + "dependencies": { + "async-validator": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.5.tgz", + "integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==", + "requires": { + "babel-runtime": "6.x" + } + }, + "babel-helper-vue-jsx-merge-props": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz", + "integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg==" + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==" + }, + "deepmerge": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz", + "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==" + }, + "echarts": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/echarts/-/echarts-5.3.2.tgz", + "integrity": "sha512-LWCt7ohOKdJqyiBJ0OGBmE9szLdfA9sGcsMEi+GGoc6+Xo75C+BkcT/6NNGRHAWtnQl2fNow05AQjznpap28TQ==", + "requires": { + "tslib": "2.3.0", + "zrender": "5.3.1" + } + }, + "element-ui": { + "version": "2.15.8", + "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.8.tgz", + "integrity": "sha512-N54zxosRFqpYax3APY3GeRmtOZwIls6Z756WM0kdPZ5Q92PIeKHnZgF1StlamIg9bLxP1k+qdhTZvIeQlim09A==", + "requires": { + "async-validator": "~1.8.1", + "babel-helper-vue-jsx-merge-props": "^2.0.0", + "deepmerge": "^1.2.0", + "normalize-wheel": "^1.0.1", + "resize-observer-polyfill": "^1.5.0", + "throttle-debounce": "^1.0.1" + } + }, + "normalize-wheel": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz", + "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU=" + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + }, + "resize-observer-polyfill": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", + "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" + }, + "throttle-debounce": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.1.0.tgz", + "integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg==" + }, + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + }, + "vue": { + "version": "2.6.14", + "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.14.tgz", + "integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==", + "peer": true + }, + "vue-i18n": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.20.0.tgz", + "integrity": "sha512-ZiAOoeR4d/JtKpbjipx3I80ey7cYG1ki5gQ7HwzWm4YFio9brA15BEYHjalEoBaEfzF5OBEZP+Y2MvAaWnyXXg==" + }, + "zrender": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.3.1.tgz", + "integrity": "sha512-7olqIjy0gWfznKr6vgfnGBk7y4UtdMvdwFmK92vVQsQeDPyzkHW1OlrLEKg6GHz1W5ePf0FeN1q2vkl/HFqhXw==", + "requires": { + "tslib": "2.3.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..9d1cccc --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "uView", + "version": "1.0.0", + "description": "

\r \"logo\"\r

\r

uView

\r

多平台快速开发的UI框架

", + "main": "main.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/YanxinNet/uView.git" + }, + "keywords": [], + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/YanxinNet/uView/issues" + }, + "homepage": "https://github.com/YanxinNet/uView#readme", + "dependencies": { + "echarts": "^5.3.2", + "element-ui": "^2.15.8", + "vue-i18n": "^8.20.0" + } +} diff --git a/pages.json b/pages.json new file mode 100644 index 0000000..408dd63 --- /dev/null +++ b/pages.json @@ -0,0 +1,990 @@ +{ + "easycom": { + "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" + }, + // "condition": { //模式配置,仅开发期间生效 + // "current": 0, //当前激活的模式(list 的索引项) + // "list": [{ + // "name": "test", //模式名称 + // "path": "pages/componentsC/test/index", //启动页面,必选 + // "query": "uuid=c4bba940-f69e-11ea-a419-6bafda9d095e&__id__=1" //启动参数,在页面的onLoad函数里面得到 + // }] + // }, + "pages": [ + + { + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "首页" + } + }, + { + "path": "pages/login/login", + "style": { + "navigationBarTitleText": "登录" + } + }, + { + "path": "pages/task/data", + "style": { + "navigationBarTitleText": "数据提报" + } + }, + { + "path": "pages/task/jia", + "style": { + "navigationBarTitleText": "加分" + } + }, + { + "path": "pages/approval/dingliang", + "style": { + "navigationBarTitleText": "定量考核" + } + }, + { + "path": "pages/approval/dingxing", + "style": { + "navigationBarTitleText": "定性考核" + } + }, + { + "path": "pages/task/jian", + "style": { + "navigationBarTitleText": "减分" + } + }, + { + "path": "pages/approval/index", + "style": { + "navigationBarTitleText": "审核" + + } + }, + { + "path": "pages/task/details", + "style": { + "navigationBarTitleText": "考核操作" + } + }, + { + "path": "pages/personal/index", + "style": { + "navigationBarTitleText": "个人中心" + } + }, + { + "path": "pages/personalAudit/index", + "style": { + "navigationBarTitleText": "被考核记录" + } + }, + { + "path": "pages/personalAudit/dingxing", + "style": { + "navigationBarTitleText": "考核记录" + } + }, + { + "path": "pages/task/index", + "style": { + "navigationBarTitleText": "任务" + } + }, + { + "path": "pages/post/index", + "style": { + "navigationBarTitleText": "岗位考核" + } + }, + { + "path": "pages/post/data", + "style": { + "navigationBarTitleText": "定量考核" + } + }, + { + "path": "pages/post/details", + "style": { + "navigationBarTitleText": "定性考核" + } + }, + { + "path": "pages/post/jia", + "style": { + "navigationBarTitleText": "奖励" + } + }, + { + "path": "pages/post/jian", + "style": { + "navigationBarTitleText": "惩罚" + } + }, + // 演示-组件 + { + "path": "pages/example/components", + "style": { + "navigationBarTitleText": "组件" + } + }, + // avatarCropper-头像裁剪 + { + "path": "uview-ui/components/u-avatar-cropper/u-avatar-cropper", + "style": { + "navigationBarTitleText": "头像裁剪", + "navigationBarBackgroundColor": "#000000" + } + }, + // 演示-工具 + { + "path": "pages/example/js", + "style": { + "navigationBarTitleText": "工具" + } + }, + // 演示-模板 + { + "path": "pages/example/template", + "style": { + "navigationBarTitleText": "模板" + } + }, + // fullScreen-压窗屏 + { + "path": "uview-ui/components/u-full-screen/u-full-screen", + "style": { + "navigationStyle": "custom", + "app-plus": { + "animationType": "fade-in", + "background": "transparent", + "backgroundColor": "rgba(0,0,0,0)", + "popGesture": "none" + } + } + } + ], + "subPackages": [{ + "root": "pages/componentsC", + "pages": [ + // test-测试 + { + "path": "test/index", + "style": { + "navigationBarTitleText": "Test" + // "navigationStyle": "custom" ,// 隐藏系统导航栏 + // "navigationBarTextStyle": "white" // 状态栏字体为白色 + } + }, + // gap-间隔槽 + { + "path": "gap/index", + "style": { + "navigationBarTitleText": "gap-间隔槽" + } + }, + // subsection分段器 + { + "path": "subsection/index", + "style": { + "navigationBarTitleText": "subsection-分段器" + } + }, + // section 查看更多 + { + "path": "section/index", + "style": { + "navigationBarTitleText": "section-查看更多" + } + }, + // link链接 + { + "path": "link/index", + "style": { + "navigationBarTitleText": "link-链接" + } + }, + // mask遮罩层 + { + "path": "mask/index", + "style": { + "navigationBarTitleText": "mask-遮罩层" + } + }, + // countTo数字滚动 + { + "path": "countTo/index", + "style": { + "navigationBarTitleText": "countTo-数字滚动" + } + }, + // color颜色 + { + "path": "color/index", + "style": { + "navigationBarTitleText": "color-颜色" + } + }, + // countDown倒计时 + { + "path": "countDown/index", + "style": { + "navigationBarTitleText": "countDown-倒计时" + } + }, + // progress进度条 + { + "path": "progress/index", + "style": { + "navigationBarTitleText": "progress-进度条" + } + }, + // alertTips警告提示 + { + "path": "alertTips/index", + "style": { + "navigationBarTitleText": "alertTips-警告提示" + } + }, + // badge 徽标数 + { + "path": "badge/index", + "style": { + "navigationBarTitleText": "badge-徽标数" + } + }, + // button按钮 + { + "path": "button/index", + "style": { + "navigationBarTitleText": "button-按钮" + } + }, + // collapse折叠面板 + { + "path": "collapse/index", + "style": { + "navigationBarTitleText": "collapse-折叠面板" + } + }, + // actionSheet操作菜单 + { + "path": "actionSheet/index", + "style": { + "navigationBarTitleText": "actionSheet-操作菜单" + } + }, + // messageInput验证码输入 + { + "path": "messageInput/index", + "style": { + "navigationBarTitleText": "messageInput-验证码输入" + } + }, + // popup弹窗 + { + "path": "popup/index", + "style": { + "navigationBarTitleText": "popup-弹窗" + } + }, + // listCell + { + "path": "cell/index", + "style": { + "navigationBarTitleText": "listCell-列表" + } + }, + // numberBox数字输入框 + { + "path": "numberBox/index", + "style": { + "navigationBarTitleText": "numberBox-步进器" + } + }, + // grid宫格布局 + { + "path": "grid/index", + "style": { + "navigationBarTitleText": "grid-宫格布局" + } + }, + // layout栅格布局 + { + "path": "layout/index", + "style": { + "navigationBarTitleText": "layout-栅格布局" + } + }, + // 加载更多 + { + "path": "loadmore/index", + "style": { + "navigationBarTitleText": "loadmore-加载更多" + } + } + ] + }, + { + "root": "pages/template", + "pages": [ + // wxCenter 仿微信个人中心 + { + "path": "wxCenter/index", + "style": { + "navigationBarTitleText": "wxCenter 仿微信个人中心", + "navigationStyle": "custom" + } + }, + // keyboardPay 自定义键盘支付 + { + "path": "keyboardPay/index", + "style": { + "navigationBarTitleText": "keyboardPay 自定义键盘支付" + } + }, + // douyin 仿抖音 + // { + // "path": "douyin/index", + // "style": { + // "navigationBarTitleText": "douyin 仿抖音" + // } + // }, + // mallMenu商城分类 + { + "path": "mallMenu/index2", + "style": { + "navigationBarTitleText": "mallMenu-商城分类" + } + }, + // mallMenu商城分类 + { + "path": "mallMenu/index1", + "style": { + "navigationBarTitleText": "mallMenu-商城分类" + } + }, + // coupon优惠券 + { + "path": "coupon/index", + "style": { + "navigationBarTitleText": "coupon-优惠券" + } + }, + { + "path": "login/index", + "style": { + "navigationBarTitleText": "美团登录" + } + }, + // 城市选择 + { + "path": "citySelect/index", + "style": { + "navigationBarTitleText": "城市选择" + } + }, + // SubmitBar提交订单栏 + { + "path": "submitBar/index", + "style": { + "navigationBarTitleText": "提交订单栏" + } + }, + // comment评论 + { + "path": "comment/index", + "style": { + "navigationBarTitleText": "评论" + } + }, + // comment评论详情 + { + "path": "comment/reply", + "style": { + "navigationBarTitleText": "评论详情" + } + }, + // order订单 + { + "path": "order/index", + "style": { + "navigationBarTitleText": "订单" + } + }, + // login登录获取验证码 + { + "path": "login/code", + "style": { + "navigationBarTitleText": "登录获取验证码" + } + }, + // address用户地址 + { + "path": "address/index", + "style": { + "navigationBarTitleText": "用户地址" + } + }, + // address添加用户地址 + { + "path": "address/addSite", + "style": { + "navigationBarTitleText": "添加用户地址" + } + } + ] + }, + { + "root": "pages/library", + "pages": [ + // debounce-节流防抖 + { + "path": "debounce/index", + "style": { + "navigationBarTitleText": "throttle | debounce-节流防抖" + } + }, + // deepClone-对象深度克隆 + { + "path": "deepClone/index", + "style": { + "navigationBarTitleText": "deepClone-对象深度克隆" + } + }, + // deepMerge-对象深度合并 + { + "path": "deepMerge/index", + "style": { + "navigationBarTitleText": "deepMerge-对象深度合并" + } + }, + // getRect-元素节点 + { + "path": "getRect/index", + "style": { + "navigationBarTitleText": "getRect-元素节点" + } + }, + // timeFrom-多久之前 + { + "path": "timeFrom/index", + "style": { + "navigationBarTitleText": "timeFrom-多久之前" + } + }, + // globalData-全局变量 + { + "path": "globalVariable/globalData", + "style": { + "navigationBarTitleText": "globalData-全局变量" + } + }, + // prototype-全局变量 + { + "path": "globalVariable/prototype", + "style": { + "navigationBarTitleText": "prototype-全局变量" + } + }, + // vuex-全局变量 + { + "path": "globalVariable/vuex", + "style": { + "navigationBarTitleText": "vuex-全局变量" + } + }, + // globalVariable-全局变量 + { + "path": "globalVariable/index", + "style": { + "navigationBarTitleText": "globalVariable-全局变量" + } + }, + // http-请求 + { + "path": "http/index", + "style": { + "navigationBarTitleText": "http-请求" + } + }, + // test-规则验证 + { + "path": "test/index", + "style": { + "navigationBarTitleText": "test-规则验证" + } + }, + // mpShare-小程序分享 + { + "path": "mpShare/index", + "style": { + "navigationBarTitleText": "mpShare-小程序分享" + } + }, + // color-JS调用颜色 + { + "path": "color/index", + "style": { + "navigationBarTitleText": "color-JS调用颜色" + } + }, + // trim-去除空格 + { + "path": "trim/index", + "style": { + "navigationBarTitleText": "trim-去除空格" + } + }, + // random-随机数生成 + { + "path": "random/index", + "style": { + "navigationBarTitleText": "random-随机数生成" + } + }, + // md5加密 + { + "path": "md5/index", + "style": { + "navigationBarTitleText": "md5-加密" + } + }, + // colorSwitch颜色转换 + { + "path": "colorSwitch/index", + "style": { + "navigationBarTitleText": "colorSwitch-颜色转换" + } + }, + // randomArray数组乱序 + { + "path": "randomArray/index", + "style": { + "navigationBarTitleText": "randomArray-数组乱序" + } + }, + // guid全局唯一标识符 + { + "path": "guid/index", + "style": { + "navigationBarTitleText": "guid-全局唯一标识符" + } + }, + // timeFormat时间格式化 + { + "path": "timeFormat/index", + "style": { + "navigationBarTitleText": "timeFormat-时间格式化" + } + }, // route-路由 + { + "path": "route/index", + "style": { + "navigationBarTitleText": "route-路由" + } + }, + // route-路由跳转 + { + "path": "route/routeTo", + "style": { + "navigationBarTitleText": "route-路由跳转" + } + }, + // queryParams-对象转URL参数 + { + "path": "queryParams/index", + "style": { + "navigationBarTitleText": "queryParams-对象转URL参数" + } + } + ] + }, + { + "root": "pages/componentsA", + "pages": [ + // parse-富文本解析器 + { + "path": "parse/index", + "style": { + "navigationBarTitleText": "parse-富文本解析器" + } + }, + // backTop-返回顶部 + { + "path": "backTop/index", + "style": { + "navigationBarTitleText": "backTop-返回顶部" + } + }, + // calendar-日历 + { + "path": "calendar/index", + "style": { + "navigationBarTitleText": "calendar-日历" + } + }, + // form-表单 + { + "path": "form/index", + "style": { + "navigationBarTitleText": "form-表单" + } + }, + // select-列选择器 + { + "path": "select/index", + "style": { + "navigationBarTitleText": "select-列选择器" + } + }, + // slider-滑动选择器 + { + "path": "slider/index", + "style": { + "navigationBarTitleText": "slider-滑动选择器" + } + }, + // fullScreen-压窗屏 + { + "path": "fullScreen/index", + "style": { + "navigationBarTitleText": "fullScreen-压窗屏" + } + }, + // navbar-自定义导航栏 + { + "path": "navbar/index", + "style": { + // "navigationBarTitleText": "navbar-自定义导航栏", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色 + } + }, + // field-输入框 + { + "path": "field/index", + "style": { + "navigationBarTitleText": "field-输入框" + } + }, + // modal-模态框 + { + "path": "modal/index", + "style": { + "navigationBarTitleText": "modal-模态框" + } + }, + // indexList索引列表 + { + "path": "indexList/index", + "style": { + "navigationBarTitleText": "indexList-索引列表" + } + }, + // empty内容为空 + { + "path": "empty/index", + "style": { + "navigationBarTitleText": "empty-内容为空" + } + }, + // avatarCropper-头像裁剪 + { + "path": "avatarCropper/index", + "style": { + "navigationBarTitleText": "avatarCropper-头像裁剪" + } + }, // noNetwork没有网络 + { + "path": "noNetwork/index", + "style": { + "navigationBarTitleText": "noNetwork-没有网络" + } + }, // icon字体图标 + { + "path": "icon/index", + "style": { + "navigationBarTitleText": "icon-字体图标" + } + }, // avatar-用户头像展示 + { + "path": "avatar/index", + "style": { + "navigationBarTitleText": "avatar-用户头像展示" + } + }, // keyboard键盘 + { + "path": "keyboard/index", + "style": { + "navigationBarTitleText": "keyboard-键盘" + } + }, // 图片懒加载 + { + "path": "lazyLoad/index", + "style": { + "navigationBarTitleText": "lazyLoad-懒加载" + } + }, + // tabs切换 + { + "path": "tabs/index", + "style": { + "navigationBarTitleText": "Tabs-切换" + } + }, + // tag标签 + { + "path": "tag/index", + "style": { + "navigationBarTitleText": "tag-标签" + } + }, + // timeLine时间轴 + { + "path": "timeLine/index", + "style": { + "navigationBarTitleText": "timeLine-时间轴" + } + }, + // toast轻提示 + { + "path": "toast/index", + "style": { + "navigationBarTitleText": "toast-轻提示" + } + }, + // topTips消息提示 + { + "path": "topTips/index", + "style": { + "navigationBarTitleText": "topTips-消息提示" + } + }, + // Code-验证码倒计时 + { + "path": "verificationCode/index", + "style": { + "navigationBarTitleText": "Code-验证码倒计时" + } + } + ] + }, + { + "root": "pages/componentsB", + "pages": [ + // dropdown-下拉菜单 + { + "path": "dropdown/index", + "style": { + "navigationBarTitleText": "dropdown-下拉菜单" + } + }, + // tabbar-底部导航栏 + { + "path": "tabbar/index", + "style": { + "navigationBarTitleText": "tabbar-底部导航栏" + } + }, + // line-线条 + { + "path": "line/index", + "style": { + "navigationBarTitleText": "line-线条" + } + }, + // image-图片 + { + "path": "image/index", + "style": { + "navigationBarTitleText": "image-图片" + } + }, + // card-卡片 + { + "path": "card/index", + "style": { + "navigationBarTitleText": "card-卡片" + } + }, + // divider-分割线 + { + "path": "divider/index", + "style": { + "navigationBarTitleText": "divider-分割线" + } + }, + // picker选择器 + { + "path": "picker/index", + "style": { + "navigationBarTitleText": "picker-选择器" + } + }, // noticeBar通告栏 + { + "path": "noticeBar/index", + "style": { + "navigationBarTitleText": "noticeBar-通告栏" + } + }, + // checkbox-复选框 + { + "path": "checkbox/index", + "style": { + "navigationBarTitleText": "checkbox-复选框" + } + }, + // radio-单选框 + { + "path": "radio/index", + "style": { + "navigationBarTitleText": "radio-单选框" + } + }, + // loading-加载动画 + { + "path": "loading/index", + "style": { + "navigationBarTitleText": "loading-加载动画" + } + }, + // switch-开关选择器 + { + "path": "switch/index", + "style": { + "navigationBarTitleText": "switch-开关选择器" + } + }, + // 骨架屏 + { + "path": "skeleton/index", + "style": { + "navigationBarTitleText": "skeleton-骨架屏" + } + }, // upload上传 + { + "path": "upload/index", + "style": { + "navigationBarTitleText": "upload-上传" + } + }, + // waterfall瀑布流 + // #ifndef MP-TOUTIAO + { + "path": "waterfall/index", + "style": { + "navigationBarTitleText": "waterfall-瀑布流" + } + }, + // #endif + // table表格 + { + "path": "table/index", + "style": { + "navigationBarTitleText": "table-表格" + } + }, + // rate评分 + { + "path": "rate/index", + "style": { + "navigationBarTitleText": "rate-评分" + } + }, + // readMore显示更多 + { + "path": "readMore/index", + "style": { + "navigationBarTitleText": "readMore-查看更多" + } + }, + // search搜索框 + { + "path": "search/index", + "style": { + "navigationBarTitleText": "search-搜索框" + } + }, + // steps步骤条 + { + "path": "steps/index", + "style": { + "navigationBarTitleText": "steps-步骤条" + } + }, + // sticky吸顶 + { + "path": "sticky/index", + "style": { + "navigationBarTitleText": "sticky-吸顶" + } + }, + // swiper轮播图 + { + "path": "swiper/index", + "style": { + "navigationBarTitleText": "swiper-轮播图" + } + }, + // swipeAction-左滑删除 + { + "path": "swipeAction/index", + "style": { + "navigationBarTitleText": "swipeAction-左滑删除" + } + } + ] + } + ], + "preloadRule": { + "pages/example/components": { + "network": "all", + "packages": ["pages/componentsA", "pages/componentsB", "pages/componentsC"] + } + }, + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "uView", + "navigationBarBackgroundColor": "#FFFFFF", + "backgroundColor": "#FFFFFF" + }, + "tabBar": { + "color": "#999999", + "selectedColor": "#343434", + "borderStyle": "white", + "backgroundColor": "#F7F7F7", + "fontSize": "14px", + "iconWidth": "24px", + "list": [{ + "pagePath": "pages/index/index", + "iconPath": "static/img/index.png", + "selectedIconPath": "static/img/indexSele.png", + "text": "首页" + }, + { + "pagePath": "pages/task/index", + "iconPath": "static/img/task.png", + "selectedIconPath": "static/img/taskSele.png", + "text": "任务" + }, + { + "pagePath": "pages/post/index", + "iconPath": "static/img/gangwei.png", + "selectedIconPath": "static/img/gangwei1.png", + "text": "岗位" + }, + { + "pagePath": "pages/approval/index", + "iconPath": "static/img/approval.png", + "selectedIconPath": "static/img/approvalSele.png", + "text": "审批" + }, + { + "pagePath": "pages/personal/index", + "iconPath": "static/img/personal.png", + "selectedIconPath": "static/img/personalSele.png", + "text": "个人中心" + }] + } +} diff --git a/pages/approval/dingliang.vue b/pages/approval/dingliang.vue new file mode 100644 index 0000000..1d64c27 --- /dev/null +++ b/pages/approval/dingliang.vue @@ -0,0 +1,404 @@ + + + + + \ No newline at end of file diff --git a/pages/approval/dingxing.vue b/pages/approval/dingxing.vue new file mode 100644 index 0000000..5638cff --- /dev/null +++ b/pages/approval/dingxing.vue @@ -0,0 +1,614 @@ + + + + + \ No newline at end of file diff --git a/pages/approval/index.vue b/pages/approval/index.vue new file mode 100644 index 0000000..c109c5c --- /dev/null +++ b/pages/approval/index.vue @@ -0,0 +1,368 @@ + + + + + diff --git a/pages/componentsA/avatar/index.vue b/pages/componentsA/avatar/index.vue new file mode 100644 index 0000000..d10e1a0 --- /dev/null +++ b/pages/componentsA/avatar/index.vue @@ -0,0 +1,90 @@ + + + + + diff --git a/pages/componentsA/avatarCropper/index.vue b/pages/componentsA/avatarCropper/index.vue new file mode 100644 index 0000000..8347e97 --- /dev/null +++ b/pages/componentsA/avatarCropper/index.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/pages/componentsA/backTop/index.vue b/pages/componentsA/backTop/index.vue new file mode 100644 index 0000000..351f8ea --- /dev/null +++ b/pages/componentsA/backTop/index.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/pages/componentsA/calendar/index.vue b/pages/componentsA/calendar/index.vue new file mode 100644 index 0000000..e28cce5 --- /dev/null +++ b/pages/componentsA/calendar/index.vue @@ -0,0 +1,111 @@ + + + + + diff --git a/pages/componentsA/empty/index.vue b/pages/componentsA/empty/index.vue new file mode 100644 index 0000000..06bdff8 --- /dev/null +++ b/pages/componentsA/empty/index.vue @@ -0,0 +1,115 @@ + + + + + diff --git a/pages/componentsA/field/index.vue b/pages/componentsA/field/index.vue new file mode 100644 index 0000000..5283d62 --- /dev/null +++ b/pages/componentsA/field/index.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/pages/componentsA/form/index.vue b/pages/componentsA/form/index.vue new file mode 100644 index 0000000..3b3b602 --- /dev/null +++ b/pages/componentsA/form/index.vue @@ -0,0 +1,454 @@ + + + + + diff --git a/pages/componentsA/fullScreen/index.vue b/pages/componentsA/fullScreen/index.vue new file mode 100644 index 0000000..5e483a1 --- /dev/null +++ b/pages/componentsA/fullScreen/index.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/pages/componentsA/icon/index.vue b/pages/componentsA/icon/index.vue new file mode 100644 index 0000000..5a65f08 --- /dev/null +++ b/pages/componentsA/icon/index.vue @@ -0,0 +1,652 @@ + + + + + diff --git a/pages/componentsA/indexList/index.vue b/pages/componentsA/indexList/index.vue new file mode 100644 index 0000000..18c1f25 --- /dev/null +++ b/pages/componentsA/indexList/index.vue @@ -0,0 +1,43 @@ + + + + + diff --git a/pages/componentsA/keyboard/index.vue b/pages/componentsA/keyboard/index.vue new file mode 100644 index 0000000..017c6cb --- /dev/null +++ b/pages/componentsA/keyboard/index.vue @@ -0,0 +1,113 @@ + + + + + diff --git a/pages/componentsA/lazyLoad/index.vue b/pages/componentsA/lazyLoad/index.vue new file mode 100644 index 0000000..bed40e5 --- /dev/null +++ b/pages/componentsA/lazyLoad/index.vue @@ -0,0 +1,253 @@ + + + + + diff --git a/pages/componentsA/modal/index.vue b/pages/componentsA/modal/index.vue new file mode 100644 index 0000000..8532649 --- /dev/null +++ b/pages/componentsA/modal/index.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/pages/componentsA/navbar/index.vue b/pages/componentsA/navbar/index.vue new file mode 100644 index 0000000..a7fed0f --- /dev/null +++ b/pages/componentsA/navbar/index.vue @@ -0,0 +1,258 @@ + + + + + + diff --git a/pages/componentsA/noNetwork/index.vue b/pages/componentsA/noNetwork/index.vue new file mode 100644 index 0000000..d5a2408 --- /dev/null +++ b/pages/componentsA/noNetwork/index.vue @@ -0,0 +1,51 @@ + + + + + \ No newline at end of file diff --git a/pages/componentsA/parse/index.vue b/pages/componentsA/parse/index.vue new file mode 100644 index 0000000..f93ff4a --- /dev/null +++ b/pages/componentsA/parse/index.vue @@ -0,0 +1,70 @@ + + + + + diff --git a/pages/componentsA/select/index.vue b/pages/componentsA/select/index.vue new file mode 100644 index 0000000..5755f3a --- /dev/null +++ b/pages/componentsA/select/index.vue @@ -0,0 +1,211 @@ + + + + + diff --git a/pages/componentsA/slider/index.vue b/pages/componentsA/slider/index.vue new file mode 100644 index 0000000..2a08c18 --- /dev/null +++ b/pages/componentsA/slider/index.vue @@ -0,0 +1,127 @@ + + + + + diff --git a/pages/componentsA/tabs/index.vue b/pages/componentsA/tabs/index.vue new file mode 100644 index 0000000..8ccdb76 --- /dev/null +++ b/pages/componentsA/tabs/index.vue @@ -0,0 +1,147 @@ + + + + + diff --git a/pages/componentsA/tag/index.vue b/pages/componentsA/tag/index.vue new file mode 100644 index 0000000..a890f5b --- /dev/null +++ b/pages/componentsA/tag/index.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/pages/componentsA/test/index.vue b/pages/componentsA/test/index.vue new file mode 100644 index 0000000..0748679 --- /dev/null +++ b/pages/componentsA/test/index.vue @@ -0,0 +1,90 @@ + + + diff --git a/pages/componentsA/timeLine/index.vue b/pages/componentsA/timeLine/index.vue new file mode 100644 index 0000000..e8435b8 --- /dev/null +++ b/pages/componentsA/timeLine/index.vue @@ -0,0 +1,144 @@ + + + + + diff --git a/pages/componentsA/toast/index.vue b/pages/componentsA/toast/index.vue new file mode 100644 index 0000000..b5a250e --- /dev/null +++ b/pages/componentsA/toast/index.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/pages/componentsA/topTips/index.vue b/pages/componentsA/topTips/index.vue new file mode 100644 index 0000000..1037410 --- /dev/null +++ b/pages/componentsA/topTips/index.vue @@ -0,0 +1,57 @@ + + + + + \ No newline at end of file diff --git a/pages/componentsA/verificationCode/index.vue b/pages/componentsA/verificationCode/index.vue new file mode 100644 index 0000000..f899def --- /dev/null +++ b/pages/componentsA/verificationCode/index.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/pages/componentsB/card/index.vue b/pages/componentsB/card/index.vue new file mode 100644 index 0000000..f949f07 --- /dev/null +++ b/pages/componentsB/card/index.vue @@ -0,0 +1,106 @@ + + + + + diff --git a/pages/componentsB/checkbox/index.vue b/pages/componentsB/checkbox/index.vue new file mode 100644 index 0000000..0249d54 --- /dev/null +++ b/pages/componentsB/checkbox/index.vue @@ -0,0 +1,161 @@ + + + + + diff --git a/pages/componentsB/divider/index.vue b/pages/componentsB/divider/index.vue new file mode 100644 index 0000000..95868f3 --- /dev/null +++ b/pages/componentsB/divider/index.vue @@ -0,0 +1,81 @@ + + + + + diff --git a/pages/componentsB/dropdown/index.vue b/pages/componentsB/dropdown/index.vue new file mode 100644 index 0000000..bbf1fc7 --- /dev/null +++ b/pages/componentsB/dropdown/index.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/pages/componentsB/image/index.vue b/pages/componentsB/image/index.vue new file mode 100644 index 0000000..c2c4b91 --- /dev/null +++ b/pages/componentsB/image/index.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/pages/componentsB/line/index.vue b/pages/componentsB/line/index.vue new file mode 100644 index 0000000..9615c80 --- /dev/null +++ b/pages/componentsB/line/index.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/pages/componentsB/loading/index.vue b/pages/componentsB/loading/index.vue new file mode 100644 index 0000000..771fecd --- /dev/null +++ b/pages/componentsB/loading/index.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/pages/componentsB/noticeBar/index.vue b/pages/componentsB/noticeBar/index.vue new file mode 100644 index 0000000..1344ee3 --- /dev/null +++ b/pages/componentsB/noticeBar/index.vue @@ -0,0 +1,144 @@ + + + + + diff --git a/pages/componentsB/picker/index.vue b/pages/componentsB/picker/index.vue new file mode 100644 index 0000000..bf4574f --- /dev/null +++ b/pages/componentsB/picker/index.vue @@ -0,0 +1,199 @@ + + + + + diff --git a/pages/componentsB/radio/index.vue b/pages/componentsB/radio/index.vue new file mode 100644 index 0000000..121f29a --- /dev/null +++ b/pages/componentsB/radio/index.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/pages/componentsB/rate/index.vue b/pages/componentsB/rate/index.vue new file mode 100644 index 0000000..04827e2 --- /dev/null +++ b/pages/componentsB/rate/index.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/pages/componentsB/readMore/index.vue b/pages/componentsB/readMore/index.vue new file mode 100644 index 0000000..b15cf66 --- /dev/null +++ b/pages/componentsB/readMore/index.vue @@ -0,0 +1,67 @@ + + + + + \ No newline at end of file diff --git a/pages/componentsB/search/index.vue b/pages/componentsB/search/index.vue new file mode 100644 index 0000000..a6b108a --- /dev/null +++ b/pages/componentsB/search/index.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/pages/componentsB/skeleton/index.vue b/pages/componentsB/skeleton/index.vue new file mode 100644 index 0000000..a0dc027 --- /dev/null +++ b/pages/componentsB/skeleton/index.vue @@ -0,0 +1,128 @@ + + + + + diff --git a/pages/componentsB/steps/index.vue b/pages/componentsB/steps/index.vue new file mode 100644 index 0000000..e6b65ba --- /dev/null +++ b/pages/componentsB/steps/index.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/pages/componentsB/sticky/index.vue b/pages/componentsB/sticky/index.vue new file mode 100644 index 0000000..4f79385 --- /dev/null +++ b/pages/componentsB/sticky/index.vue @@ -0,0 +1,87 @@ + + + + + diff --git a/pages/componentsB/swipeAction/index.vue b/pages/componentsB/swipeAction/index.vue new file mode 100644 index 0000000..285bb04 --- /dev/null +++ b/pages/componentsB/swipeAction/index.vue @@ -0,0 +1,153 @@ + + + + + diff --git a/pages/componentsB/swiper/index.vue b/pages/componentsB/swiper/index.vue new file mode 100644 index 0000000..87b21af --- /dev/null +++ b/pages/componentsB/swiper/index.vue @@ -0,0 +1,89 @@ + + + + + diff --git a/pages/componentsB/switch/index.vue b/pages/componentsB/switch/index.vue new file mode 100644 index 0000000..e0a573d --- /dev/null +++ b/pages/componentsB/switch/index.vue @@ -0,0 +1,113 @@ + + + + + diff --git a/pages/componentsB/tabbar/index.vue b/pages/componentsB/tabbar/index.vue new file mode 100644 index 0000000..797c447 --- /dev/null +++ b/pages/componentsB/tabbar/index.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/pages/componentsB/table/index.vue b/pages/componentsB/table/index.vue new file mode 100644 index 0000000..f4dcc39 --- /dev/null +++ b/pages/componentsB/table/index.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/pages/componentsB/upload/index.vue b/pages/componentsB/upload/index.vue new file mode 100644 index 0000000..158b8a3 --- /dev/null +++ b/pages/componentsB/upload/index.vue @@ -0,0 +1,224 @@ + + + + + diff --git a/pages/componentsB/waterfall/index.vue b/pages/componentsB/waterfall/index.vue new file mode 100644 index 0000000..e7d4ce8 --- /dev/null +++ b/pages/componentsB/waterfall/index.vue @@ -0,0 +1,224 @@ + + + + + + + diff --git a/pages/componentsC/actionSheet/index.vue b/pages/componentsC/actionSheet/index.vue new file mode 100644 index 0000000..9bceb8c --- /dev/null +++ b/pages/componentsC/actionSheet/index.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/pages/componentsC/alertTips/index.vue b/pages/componentsC/alertTips/index.vue new file mode 100644 index 0000000..af9fec0 --- /dev/null +++ b/pages/componentsC/alertTips/index.vue @@ -0,0 +1,90 @@ + + + + + diff --git a/pages/componentsC/badge/index.vue b/pages/componentsC/badge/index.vue new file mode 100644 index 0000000..702a065 --- /dev/null +++ b/pages/componentsC/badge/index.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/pages/componentsC/button/index.vue b/pages/componentsC/button/index.vue new file mode 100644 index 0000000..e347336 --- /dev/null +++ b/pages/componentsC/button/index.vue @@ -0,0 +1,121 @@ + + + + + diff --git a/pages/componentsC/cell/index.vue b/pages/componentsC/cell/index.vue new file mode 100644 index 0000000..a81e802 --- /dev/null +++ b/pages/componentsC/cell/index.vue @@ -0,0 +1,113 @@ + + + + + diff --git a/pages/componentsC/circleProgress/index.vue b/pages/componentsC/circleProgress/index.vue new file mode 100644 index 0000000..ed1e7f1 --- /dev/null +++ b/pages/componentsC/circleProgress/index.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/pages/componentsC/collapse/index.vue b/pages/componentsC/collapse/index.vue new file mode 100644 index 0000000..26c939a --- /dev/null +++ b/pages/componentsC/collapse/index.vue @@ -0,0 +1,142 @@ + + + + + + + diff --git a/pages/componentsC/color/index.vue b/pages/componentsC/color/index.vue new file mode 100644 index 0000000..01c9fc0 --- /dev/null +++ b/pages/componentsC/color/index.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/pages/componentsC/countDown/index.vue b/pages/componentsC/countDown/index.vue new file mode 100644 index 0000000..3b98928 --- /dev/null +++ b/pages/componentsC/countDown/index.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/pages/componentsC/countTo/index.vue b/pages/componentsC/countTo/index.vue new file mode 100644 index 0000000..e78d3a6 --- /dev/null +++ b/pages/componentsC/countTo/index.vue @@ -0,0 +1,132 @@ + + + + + diff --git a/pages/componentsC/gap/index.vue b/pages/componentsC/gap/index.vue new file mode 100644 index 0000000..c998bb7 --- /dev/null +++ b/pages/componentsC/gap/index.vue @@ -0,0 +1,63 @@ + + + + + + diff --git a/pages/componentsC/grid/index.vue b/pages/componentsC/grid/index.vue new file mode 100644 index 0000000..b92b47b --- /dev/null +++ b/pages/componentsC/grid/index.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/pages/componentsC/layout/index.vue b/pages/componentsC/layout/index.vue new file mode 100644 index 0000000..1a63861 --- /dev/null +++ b/pages/componentsC/layout/index.vue @@ -0,0 +1,145 @@ + + + + + diff --git a/pages/componentsC/link/index.vue b/pages/componentsC/link/index.vue new file mode 100644 index 0000000..dc0928f --- /dev/null +++ b/pages/componentsC/link/index.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/pages/componentsC/loadmore/index.vue b/pages/componentsC/loadmore/index.vue new file mode 100644 index 0000000..3df8c5f --- /dev/null +++ b/pages/componentsC/loadmore/index.vue @@ -0,0 +1,96 @@ + + + + + \ No newline at end of file diff --git a/pages/componentsC/mask/index.vue b/pages/componentsC/mask/index.vue new file mode 100644 index 0000000..d0e7750 --- /dev/null +++ b/pages/componentsC/mask/index.vue @@ -0,0 +1,89 @@ + + + + + diff --git a/pages/componentsC/messageInput/index.vue b/pages/componentsC/messageInput/index.vue new file mode 100644 index 0000000..fd2334a --- /dev/null +++ b/pages/componentsC/messageInput/index.vue @@ -0,0 +1,97 @@ + + + + + diff --git a/pages/componentsC/numberBox/index.vue b/pages/componentsC/numberBox/index.vue new file mode 100644 index 0000000..e2a677a --- /dev/null +++ b/pages/componentsC/numberBox/index.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/pages/componentsC/popup/index.vue b/pages/componentsC/popup/index.vue new file mode 100644 index 0000000..2763379 --- /dev/null +++ b/pages/componentsC/popup/index.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/pages/componentsC/progress/index.vue b/pages/componentsC/progress/index.vue new file mode 100644 index 0000000..f50f901 --- /dev/null +++ b/pages/componentsC/progress/index.vue @@ -0,0 +1,102 @@ + + + + + diff --git a/pages/componentsC/section/index.vue b/pages/componentsC/section/index.vue new file mode 100644 index 0000000..65902f5 --- /dev/null +++ b/pages/componentsC/section/index.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/pages/componentsC/subsection/index.vue b/pages/componentsC/subsection/index.vue new file mode 100644 index 0000000..87f9852 --- /dev/null +++ b/pages/componentsC/subsection/index.vue @@ -0,0 +1,88 @@ + + + + + diff --git a/pages/componentsC/test/index.vue b/pages/componentsC/test/index.vue new file mode 100644 index 0000000..33247b0 --- /dev/null +++ b/pages/componentsC/test/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/pages/example/components.config.js b/pages/example/components.config.js new file mode 100644 index 0000000..ebc6f09 --- /dev/null +++ b/pages/example/components.config.js @@ -0,0 +1,389 @@ + +export default [{ + groupName: '基础组件', + groupName_en: 'Basic components', + list: [{ + path: '/pages/componentsC/color/index', + icon: 'color', + title: 'Color 色彩', + title_en: 'Color', + }, { + path: '/pages/componentsA/icon/index', + icon: 'icon', + title: 'Icon 图标', + title_en: 'Icon', + },{ + path: '/pages/componentsB/image/index', + icon: 'image', + title: 'Image 图片', + title_en: 'Image', + }, { + path: '/pages/componentsC/button/index', + icon: 'button', + title: 'Button 按钮', + title_en: 'Button', + }, { + path: '/pages/componentsC/layout/index', + icon: 'layout', + title: 'Layout 布局', + title_en: 'Layout', + }, { + path: '/pages/componentsC/cell/index', + icon: 'cell', + title: 'Cell 单元格', + title_en: 'Cell', + }, { + path: '/pages/componentsC/badge/index', + icon: 'badge', + title: 'Badge 徽标数', + title_en: 'Badge', + }, { + path: '/pages/componentsA/tag/index', + icon: 'tag', + title: 'Tag 标签', + title_en: 'Tag', + }] + }, + { + groupName: '表单组件', + groupName_en: 'Form components', + list: [{ + path: '/pages/componentsA/form/index', + icon: 'form', + title: 'Form 表单', + title_en: 'Form', + }, { + path: '/pages/componentsA/calendar/index', + icon: 'calendar', + title: 'Calendar 日历', + title_en: 'Calendar', + }, { + path: '/pages/componentsA/select/index', + icon: 'select', + title: 'Select 列选择器', + title_en: 'Select', + }, { + path: '/pages/componentsA/keyboard/index', + icon: 'keyboard', + title: 'Keyboard 键盘', + title_en: 'Keyboard', + }, { + path: '/pages/componentsB/picker/index', + icon: 'picker', + title: 'Picker 选择器', + title_en: 'Picker', + }, { + path: '/pages/componentsB/rate/index', + icon: 'rate', + title: 'Rate 评分', + title_en: 'Rate', + }, { + path: '/pages/componentsB/search/index', + icon: 'search', + title: 'Search 搜索', + title_en: 'Search', + }, { + path: '/pages/componentsC/numberBox/index', + icon: 'numberBox', + title: 'NumberBox 步进器', + title_en: 'NumberBox', + }, { + path: '/pages/componentsB/upload/index', + icon: 'upload', + title: 'Upload 上传', + title_en: 'Upload', + }, { + path: '/pages/componentsA/verificationCode/index', + icon: 'verificationCode', + title: 'VerificationCode 验证码倒计时', + title_en: 'VerificationCode', + }, { + path: '/pages/componentsA/field/index', + icon: 'field', + title: 'Field 输入框', + title_en: 'Field', + }, { + path: '/pages/componentsB/checkbox/index', + icon: 'checkbox', + title: 'Checkbox 复选框', + title_en: 'Checkbox', + }, { + path: '/pages/componentsB/radio/index', + icon: 'radio', + title: 'Radio 单选框', + title_en: 'Radio', + }, { + path: '/pages/componentsB/switch/index', + icon: 'switch', + title: 'Switch 开关选择器', + title_en: 'Switch', + }, { + path: '/pages/componentsA/slider/index', + icon: 'slider', + title: 'Slider 滑动选择器', + title_en: 'Slider', + }] + }, { + groupName: '数据组件', + groupName_en: 'Data components', + list: [{ + path: '/pages/componentsC/progress/index', + icon: 'progress', + title: 'Progress 进度条', + title_en: 'Progress', + }, { + path: '/pages/componentsB/table/index', + icon: 'table', + title: 'Table 表格', + title_en: 'Table', + }, { + path: '/pages/componentsC/countDown/index', + icon: 'countDown', + title: 'CountDown 倒计时', + title_en: 'CountDown', + }, { + path: '/pages/componentsC/countTo/index', + icon: 'countTo', + title: 'CountTo 数字滚动', + title_en: 'CountTo', + }] + }, { + groupName: '反馈组件', + groupName_en: 'Feedback components', + list: [{ + path: '/pages/componentsC/actionSheet/index', + icon: 'actionSheet', + title: 'ActionSheet 操作菜单', + title_en: 'ActionSheet', + }, { + path: '/pages/componentsC/alertTips/index', + icon: 'alertTips', + title: 'AlertTips 警告提示', + title_en: 'AlertTips', + }, { + path: '/pages/componentsA/toast/index', + icon: 'toast', + title: 'Toast 消息提示', + title_en: 'Toast', + }, { + path: '/pages/componentsB/noticeBar/index', + icon: 'noticeBar', + title: 'NoticeBar 滚动通知', + title_en: 'NoticeBar', + }, { + path: '/pages/componentsA/topTips/index', + icon: 'topTips', + title: 'TopTips 顶部提示', + title_en: 'TopTips', + }, { + path: '/pages/componentsB/swipeAction/index', + icon: 'swipeAction', + title: 'SwipeAction 滑动单元格', + title_en: 'SwipeAction', + }, { + path: '/pages/componentsC/collapse/index', + icon: 'collapse', + title: 'Collapse 折叠面板', + title_en: 'Collapse', + }, { + path: '/pages/componentsC/popup/index', + icon: 'popup', + title: 'Popup 弹出层', + title_en: 'Popup', + }, { + path: '/pages/componentsA/modal/index', + icon: 'modal', + title: 'Modal 模态框', + title_en: 'Modal', + }, { + path: '/pages/componentsA/fullScreen/index', + icon: 'pressingScreen', + title: 'fullScreen 压窗屏', + title_en: 'fullScreen', + }] + }, { + groupName: '布局组件', + groupName_en: 'Layout components', + list: [{ + path: '/pages/componentsB/line/index', + icon: 'line', + title: 'Line 线条', + title_en: 'Line', + }, { + path: '/pages/componentsB/card/index', + icon: 'card', + title: 'Card 卡片', + title_en: 'Card', + }, { + path: '/pages/componentsC/mask/index', + icon: 'mask', + title: 'Mask 遮罩层', + title_en: 'Mask', + }, + // #ifndef MP-TOUTIAO + { + path: '/pages/componentsA/noNetwork/index', + icon: 'noNetwork', + title: 'NoNetwork 无网络提示', + title_en: 'NoNetwork', + }, + // #endif + { + path: '/pages/componentsC/grid/index', + icon: 'grid', + title: 'Grid 宫格布局', + title_en: 'Grid', + }, { + path: '/pages/componentsB/swiper/index', + icon: 'swiper', + title: 'Swiper 轮播图', + title_en: 'Swiper', + }, { + path: '/pages/componentsA/timeLine/index', + icon: 'timeLine', + title: 'TimeLine 时间轴', + title_en: 'TimeLine', + }, { + path: '/pages/componentsB/skeleton/index', + icon: 'skeleton', + title: 'Skeleton 骨架屏', + title_en: 'Skeleton', + }, { + path: '/pages/componentsB/sticky/index', + icon: 'sticky', + title: 'Sticky 吸顶', + title_en: 'Sticky', + }, + // #ifndef MP-TOUTIAO + { + path: '/pages/componentsB/waterfall/index', + icon: 'waterfall', + title: 'Waterfall 瀑布流', + title_en: 'Waterfall', + }, + // #endif + { + path: '/pages/componentsB/divider/index', + icon: 'divider', + title: 'Divider 分割线', + title_en: 'Divider', + }] + }, { + groupName: '导航组件', + groupName_en: 'Navigation components', + list: [{ + path: '/pages/componentsB/dropdown/index', + icon: 'dropdown', + title: 'Dropdown 下拉菜单', + title_en: 'Dropdown', + },{ + path: '/pages/componentsB/tabbar/index', + icon: 'tabbar', + title: 'Tabbar 底部导航栏', + title_en: 'Tabbar', + },{ + path: '/pages/componentsA/backTop/index', + icon: 'backTop', + title: 'BackTop 返回顶部', + title_en: 'BackTop', + },{ + path: '/pages/componentsA/navbar/index', + icon: 'navbar', + title: 'Navbar 导航栏', + title_en: 'Navbar', + }, { + path: '/pages/componentsA/tabs/index', + icon: 'tabs', + title: 'Tabs 标签', + title_en: 'Tabs', + }, + // #ifndef MP-ALIPAY + { + path: '/pages/template/order/index', + icon: 'tabsSwiper', + title: 'TabsSwiper 全屏选项卡', + title_en: 'TabsSwiper', + }, + // #endif + { + path: '/pages/componentsC/subsection/index', + icon: 'subsection', + title: 'Subsection 分段器', + title_en: 'Subsection', + }, { + path: '/pages/componentsA/indexList/index', + icon: 'indexList', + title: 'IndexList 索引列表', + title_en: 'IndexList', + }, { + path: '/pages/componentsB/steps/index', + icon: 'steps', + title: 'Steps 步骤条', + title_en: 'Steps', + }, { + path: '/pages/componentsA/empty/index', + icon: 'empty', + title: 'Empty 内容为空', + title_en: 'Empty', + }, { + path: '/pages/componentsC/section/index', + icon: 'section', + title: 'Section 查看更多', + title_en: 'Section', + }] + }, { + groupName: '其他组件', + groupName_en: 'Other components', + list: [{ + path: '/pages/componentsA/parse/index', + icon: 'parse', + title: 'Parse 富文本解析器', + title_en: 'Parse', + },{ + path: '/pages/componentsC/messageInput/index', + icon: 'messageInput', + title: 'MessageInput 验证码输入', + title_en: 'MessageInput', + }, { + path: '/pages/componentsA/avatarCropper/index', + icon: 'avatarCropper', + title: 'AvatarCropper 头像裁剪', + title_en: 'AvatarCropper', + }, { + path: '/pages/componentsC/loadmore/index', + icon: 'loadmore', + title: 'Loadmore 加载更多', + title_en: 'Loadmore', + }, { + path: '/pages/componentsB/readMore/index', + icon: 'readMore', + title: 'ReadMore 展开阅读更多', + title_en: 'ReadMore', + }, { + path: '/pages/componentsA/lazyLoad/index', + icon: 'lazyLoad', + title: 'LazyLoad 懒加载', + title_en: 'LazyLoad', + }, { + path: '/pages/componentsC/gap/index', + icon: 'gap', + title: 'Gap 间隔槽', + title_en: 'Gap', + }, { + path: '/pages/componentsA/avatar/index', + icon: 'avatar', + title: 'Avatar 头像', + title_en: 'Avatar', + }, { + path: '/pages/componentsC/link/index', + icon: 'link', + title: 'Link 超链接', + title_en: 'Link', + }, { + path: '/pages/componentsB/loading/index', + icon: 'loading', + title: 'Loading 加载动画', + title_en: 'Loading', + }] + }, +] diff --git a/pages/example/components.vue b/pages/example/components.vue new file mode 100644 index 0000000..c763ee6 --- /dev/null +++ b/pages/example/components.vue @@ -0,0 +1,73 @@ + + + + + + + diff --git a/pages/example/js.config.js b/pages/example/js.config.js new file mode 100644 index 0000000..7365cab --- /dev/null +++ b/pages/example/js.config.js @@ -0,0 +1,120 @@ +export default [ + { + groupName: '网络', + groupName_en: 'Network', + list: [ + { + path: 'http', + icon: 'http', + title: 'Http 请求', + title_en: 'Http', + } + ] + }, + { + groupName: '全局变量', + groupName_en: 'Global variable', + list: [ + { + path: 'globalVariable', + icon: 'globalVariable', + title: 'GlobalVariable 全局变量', + title_en: 'GlobalVariable', + } + ] + }, + { + groupName: '工具库', + groupName_en: 'Tool library', + list: [ + { + path: 'debounce', + icon: 'debounce', + title: 'Throttle | Debounce 节流防抖', + title_en: 'Throttle | Debounce', + }, + { + path: 'deepMerge', + icon: 'deepMerge', + title: 'DeepMerge 对象深度合并', + title_en: 'DeepMerge', + },{ + path: 'deepClone', + icon: 'deepClone', + title: 'DeepClone 对象深度克隆', + title_en: 'DeepClone', + }, + { + path: 'timeFormat', + icon: 'timeFormat', + title: 'TimeFormat 时间格式化', + title_en: 'TimeFormat', + },{ + path: 'timeFrom', + icon: 'timeFrom', + title: 'TimeFrom 多久之前', + title_en: 'TimeFrom', + },{ + path: 'guid', + icon: 'guid', + title: 'Guid 全局唯一id', + title_en: 'Guid', + },{ + path: 'route', + icon: 'route', + title: 'Route 路由跳转', + title_en: 'Route', + },{ + path: 'randomArray', + icon: 'randomArray', + title: 'RandomArray 数组乱序', + title_en: 'RandomArray', + },{ + path: 'colorSwitch', + icon: 'colorSwitch', + title: 'ColorSwitch 颜色转换', + title_en: 'ColorSwitch', + },{ + path: 'color', + icon: 'color', + title: 'Color 颜色值', + title_en: 'Color', + },{ + path: 'queryParams', + icon: 'queryParams', + title: 'QueryParams 对象转URL参数', + title_en: 'QueryParams', + },{ + path: 'test', + icon: 'test', + title: 'Test 规则校验', + title_en: 'Test', + },{ + path: 'md5', + icon: 'md5', + title: 'Md5 md5加密', + title_en: 'Md5', + },{ + path: 'random', + icon: 'random', + title: 'Random 随机数值', + title_en: 'Random', + },{ + path: 'trim', + icon: 'trim', + title: 'Trim 去除空格', + title_en: 'Trim', + },{ + path: 'getRect', + icon: 'getRect', + title: 'GetRect 节点信息', + title_en: 'GetRect', + },{ + path: 'mpShare', + icon: 'mpShare', + title: 'MpShare 小程序分享', + title_en: 'MpShare', + } + ] + } +] \ No newline at end of file diff --git a/pages/example/js.vue b/pages/example/js.vue new file mode 100644 index 0000000..e9848b8 --- /dev/null +++ b/pages/example/js.vue @@ -0,0 +1,69 @@ + + + + + + + diff --git a/pages/example/template.config.js b/pages/example/template.config.js new file mode 100644 index 0000000..9a4bdc1 --- /dev/null +++ b/pages/example/template.config.js @@ -0,0 +1,78 @@ +export default [ + { + groupName: '部件', + groupName_en: 'Parts', + list: [ + { + path: 'coupon', + icon: 'coupon', + title: 'Coupon 优惠券', + title_en: 'Coupon', + } + ] + }, + { + groupName: '页面', + groupName_en: 'Page', + list: [ + { + path: '/pages/template/wxCenter/index', + icon: 'wxCenter', + title: 'WxCenter 仿微信个人中心', + title_en: 'WxCenter', + }, + // { + // path: '/pages/template/douyin/index', + // icon: 'douyin', + // title: 'Douyin 仿抖音', + // }, + { + path: '/pages/template/keyboardPay/index', + icon: 'keyboardPay', + title: 'KeyboardPay 自定义键盘支付模板', + title_en: 'KeyboardPay', + }, + { + path: '/pages/template/mallMenu/index1', + icon: 'mall_menu_1', + title: 'MallMenu 垂直分类(左右独立)', + title_en: 'MallMenu 1', + },{ + path: '/pages/template/mallMenu/index2', + icon: 'mall_menu_2', + title: 'MallMenu 垂直分类(左右联动)', + title_en: 'MallMenu 2', + },{ + path: 'submitBar', + icon: 'submitBar', + title: 'SubmitBar 提交订单栏', + title_en: 'SubmitBar', + },{ + path: 'comment', + icon: 'comment', + title: 'Comment 评论列表', + title_en: 'Comment', + },{ + path: 'order', + icon: 'order', + title: 'Order 订单列表', + title_en: 'Order', + },{ + path: 'login', + icon: 'login', + title: 'Login 登录界面', + title_en: 'Login', + },{ + path: 'address', + icon: 'address', + title: 'Address 收货地址', + title_en: 'Address', + },{ + path: 'citySelect', + icon: 'citySelect', + title: 'CitySelect 城市选择', + title_en: 'CitySelect', + } + ] + } +] \ No newline at end of file diff --git a/pages/example/template.vue b/pages/example/template.vue new file mode 100644 index 0000000..8fb9ef9 --- /dev/null +++ b/pages/example/template.vue @@ -0,0 +1,69 @@ + + + + + + + diff --git a/pages/index/index.vue b/pages/index/index.vue new file mode 100644 index 0000000..fc0f3bf --- /dev/null +++ b/pages/index/index.vue @@ -0,0 +1,2001 @@ + + + + + diff --git a/pages/library/color/index.vue b/pages/library/color/index.vue new file mode 100644 index 0000000..7a9f308 --- /dev/null +++ b/pages/library/color/index.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/pages/library/colorSwitch/index.vue b/pages/library/colorSwitch/index.vue new file mode 100644 index 0000000..f9af787 --- /dev/null +++ b/pages/library/colorSwitch/index.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/pages/library/debounce/index.vue b/pages/library/debounce/index.vue new file mode 100644 index 0000000..3f93fa0 --- /dev/null +++ b/pages/library/debounce/index.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/pages/library/deepClone/index.vue b/pages/library/deepClone/index.vue new file mode 100644 index 0000000..1d639d2 --- /dev/null +++ b/pages/library/deepClone/index.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/pages/library/deepMerge/index.vue b/pages/library/deepMerge/index.vue new file mode 100644 index 0000000..662fc56 --- /dev/null +++ b/pages/library/deepMerge/index.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/pages/library/getRect/index.vue b/pages/library/getRect/index.vue new file mode 100644 index 0000000..50be09a --- /dev/null +++ b/pages/library/getRect/index.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/pages/library/globalVariable/globalData.vue b/pages/library/globalVariable/globalData.vue new file mode 100644 index 0000000..9983586 --- /dev/null +++ b/pages/library/globalVariable/globalData.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/pages/library/globalVariable/index.vue b/pages/library/globalVariable/index.vue new file mode 100644 index 0000000..f9ab949 --- /dev/null +++ b/pages/library/globalVariable/index.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/pages/library/globalVariable/prototype.vue b/pages/library/globalVariable/prototype.vue new file mode 100644 index 0000000..820cd08 --- /dev/null +++ b/pages/library/globalVariable/prototype.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/pages/library/globalVariable/vuex.vue b/pages/library/globalVariable/vuex.vue new file mode 100644 index 0000000..0104862 --- /dev/null +++ b/pages/library/globalVariable/vuex.vue @@ -0,0 +1,40 @@ + + + + + \ No newline at end of file diff --git a/pages/library/guid/index.vue b/pages/library/guid/index.vue new file mode 100644 index 0000000..8d99a05 --- /dev/null +++ b/pages/library/guid/index.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/pages/library/http/index.vue b/pages/library/http/index.vue new file mode 100644 index 0000000..67ee3ab --- /dev/null +++ b/pages/library/http/index.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/pages/library/md5/index.vue b/pages/library/md5/index.vue new file mode 100644 index 0000000..e9b786a --- /dev/null +++ b/pages/library/md5/index.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/pages/library/mpShare/index.vue b/pages/library/mpShare/index.vue new file mode 100644 index 0000000..9ad826d --- /dev/null +++ b/pages/library/mpShare/index.vue @@ -0,0 +1,19 @@ + + + + + diff --git a/pages/library/queryParams/index.vue b/pages/library/queryParams/index.vue new file mode 100644 index 0000000..806d2a2 --- /dev/null +++ b/pages/library/queryParams/index.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/pages/library/random/index.vue b/pages/library/random/index.vue new file mode 100644 index 0000000..a3fe3d1 --- /dev/null +++ b/pages/library/random/index.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/pages/library/randomArray/index.vue b/pages/library/randomArray/index.vue new file mode 100644 index 0000000..f1c953d --- /dev/null +++ b/pages/library/randomArray/index.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/pages/library/route/index.vue b/pages/library/route/index.vue new file mode 100644 index 0000000..85bdf43 --- /dev/null +++ b/pages/library/route/index.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/pages/library/route/routeTo.vue b/pages/library/route/routeTo.vue new file mode 100644 index 0000000..acccaf3 --- /dev/null +++ b/pages/library/route/routeTo.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/pages/library/test/index.vue b/pages/library/test/index.vue new file mode 100644 index 0000000..e9a13cd --- /dev/null +++ b/pages/library/test/index.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/pages/library/timeFormat/index.vue b/pages/library/timeFormat/index.vue new file mode 100644 index 0000000..78fdc0d --- /dev/null +++ b/pages/library/timeFormat/index.vue @@ -0,0 +1,58 @@ + + + + + diff --git a/pages/library/timeFrom/index.vue b/pages/library/timeFrom/index.vue new file mode 100644 index 0000000..9453999 --- /dev/null +++ b/pages/library/timeFrom/index.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/pages/library/trim/index.vue b/pages/library/trim/index.vue new file mode 100644 index 0000000..cbd4e05 --- /dev/null +++ b/pages/library/trim/index.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/pages/login/login - 副本.vue b/pages/login/login - 副本.vue new file mode 100644 index 0000000..a6ce959 --- /dev/null +++ b/pages/login/login - 副本.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/pages/login/login.vue b/pages/login/login.vue new file mode 100644 index 0000000..deacd66 --- /dev/null +++ b/pages/login/login.vue @@ -0,0 +1,335 @@ + + + + + + + diff --git a/pages/personal/index.vue b/pages/personal/index.vue new file mode 100644 index 0000000..6093ac1 --- /dev/null +++ b/pages/personal/index.vue @@ -0,0 +1,97 @@ + + + + + diff --git a/pages/personalAudit/dingliang.vue b/pages/personalAudit/dingliang.vue new file mode 100644 index 0000000..23c10ab --- /dev/null +++ b/pages/personalAudit/dingliang.vue @@ -0,0 +1,404 @@ + + + + + \ No newline at end of file diff --git a/pages/personalAudit/dingxing.vue b/pages/personalAudit/dingxing.vue new file mode 100644 index 0000000..944a044 --- /dev/null +++ b/pages/personalAudit/dingxing.vue @@ -0,0 +1,540 @@ + + + + + \ No newline at end of file diff --git a/pages/personalAudit/index.vue b/pages/personalAudit/index.vue new file mode 100644 index 0000000..08af9c2 --- /dev/null +++ b/pages/personalAudit/index.vue @@ -0,0 +1,316 @@ + + + + + diff --git a/pages/post/data.vue b/pages/post/data.vue new file mode 100644 index 0000000..c811f0a --- /dev/null +++ b/pages/post/data.vue @@ -0,0 +1,317 @@ + + + + \ No newline at end of file diff --git a/pages/post/details - 副本.vue b/pages/post/details - 副本.vue new file mode 100644 index 0000000..f288b80 --- /dev/null +++ b/pages/post/details - 副本.vue @@ -0,0 +1,837 @@ + + + + + + + diff --git a/pages/post/details.vue b/pages/post/details.vue new file mode 100644 index 0000000..2433bf0 --- /dev/null +++ b/pages/post/details.vue @@ -0,0 +1,854 @@ + + + + + + + diff --git a/pages/post/index.vue b/pages/post/index.vue new file mode 100644 index 0000000..de4b645 --- /dev/null +++ b/pages/post/index.vue @@ -0,0 +1,254 @@ + + + + + diff --git a/pages/post/jia.vue b/pages/post/jia.vue new file mode 100644 index 0000000..69a48fd --- /dev/null +++ b/pages/post/jia.vue @@ -0,0 +1,384 @@ + + + + \ No newline at end of file diff --git a/pages/post/jian.vue b/pages/post/jian.vue new file mode 100644 index 0000000..34bba86 --- /dev/null +++ b/pages/post/jian.vue @@ -0,0 +1,443 @@ + + + + \ No newline at end of file diff --git a/pages/task/data.vue b/pages/task/data.vue new file mode 100644 index 0000000..56f21f7 --- /dev/null +++ b/pages/task/data.vue @@ -0,0 +1,317 @@ + + + + \ No newline at end of file diff --git a/pages/task/details - 副本.vue b/pages/task/details - 副本.vue new file mode 100644 index 0000000..f288b80 --- /dev/null +++ b/pages/task/details - 副本.vue @@ -0,0 +1,837 @@ + + + + + + + diff --git a/pages/task/details.vue b/pages/task/details.vue new file mode 100644 index 0000000..955804f --- /dev/null +++ b/pages/task/details.vue @@ -0,0 +1,848 @@ + + + + + + + diff --git a/pages/task/index.vue b/pages/task/index.vue new file mode 100644 index 0000000..c557da7 --- /dev/null +++ b/pages/task/index.vue @@ -0,0 +1,184 @@ + + + + + diff --git a/pages/task/jia.vue b/pages/task/jia.vue new file mode 100644 index 0000000..c1952ac --- /dev/null +++ b/pages/task/jia.vue @@ -0,0 +1,347 @@ + + + + \ No newline at end of file diff --git a/pages/task/jian.vue b/pages/task/jian.vue new file mode 100644 index 0000000..87dba85 --- /dev/null +++ b/pages/task/jian.vue @@ -0,0 +1,406 @@ + + + + \ No newline at end of file diff --git a/pages/template/address/addSite.vue b/pages/template/address/addSite.vue new file mode 100644 index 0000000..c31340e --- /dev/null +++ b/pages/template/address/addSite.vue @@ -0,0 +1,173 @@ +