diff --git a/fe/PDA/.hbuilderx/launch.json b/fe/PDA/.hbuilderx/launch.json new file mode 100644 index 000000000..582561b0c --- /dev/null +++ b/fe/PDA/.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": [{ + "app-plus" : + { + "launchtype" : "local" + }, + "default" : + { + "launchtype" : "local" + }, + "type" : "uniCloud" + } + ] +} diff --git a/fe/PDA/App.vue b/fe/PDA/App.vue new file mode 100644 index 000000000..4b5a39766 --- /dev/null +++ b/fe/PDA/App.vue @@ -0,0 +1,29 @@ + + + diff --git a/fe/PDA/LICENSE b/fe/PDA/LICENSE new file mode 100644 index 000000000..77f865dbd --- /dev/null +++ b/fe/PDA/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 DCloud + +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. diff --git a/fe/PDA/README.md b/fe/PDA/README.md new file mode 100644 index 000000000..164ea3592 --- /dev/null +++ b/fe/PDA/README.md @@ -0,0 +1,129 @@ +# hello-uniapp + +`uni-app`框架示例,一套代码,同时发行到iOS、Android、H5、小程序等多个平台,请使用手机在下方扫码快速体验`uni-app`的强大功能。[官方文档](https://uniapp.dcloud.net.cn/) + +## 快速上手 +hello-uniapp 示例工程可以通过两种方式创建, 一种是 HBuilderX, 配套 IDE,集成开发;另一种是 CLI 创建;推荐前者。 +### 通过 HBuilderX 可视化界面创建(推荐) + +可视化的方式比较简单,HBuilderX内置相关环境,开箱即用,无需配置nodejs。 + +开始之前,开发者需先下载安装如下工具: + +- HBuilderX:[官方IDE下载地址](https://www.dcloud.io/hbuilderx.html) + +HBuilderX是通用的前端开发工具,但为`uni-app`做了特别强化,请下载App开发版。 + +由于截图在 github 不便浏览,参见官方文档 [HBuilderX 可视化界面创建](https://uniapp.dcloud.net.cn/quickstart?id=_1-%e9%80%9a%e8%bf%87-hbuilderx-%e5%8f%af%e8%a7%86%e5%8c%96%e7%95%8c%e9%9d%a2) + +### 通过 vue-cli 创建 + +``` +npm install -g @vue/cli +``` + +#### 创建uni-app + +**使用正式版**(对应HBuilderX最新正式版) + +``` +vue create -p dcloudio/uni-preset-vue my-project +``` + +**使用alpha版**(对应HBuilderX最新alpha版) + +``` +vue create -p dcloudio/uni-preset-vue#alpha my-alpha-project +``` + +此时,会提示选择项目模板,选择 `hello uni-app` 项目模板,如下所示: + +
+ +
+ +创建好后,进入项目目录 +``` +cd my-project +``` + +执行该命令运行到 h5 端 +``` +npm run dev:h5 +``` + +欢迎提 issues,推荐到[官方社区](https://ask.dcloud.net.cn/explore/)提问。 + +## 扫码体验 + +
+

一套代码编到10个平台,这不是梦想。眼见为实,扫描10个二维码,亲自体验最全面的跨平台效果!

+
+ +
+ +
+ Android版 +
+ +
+ +
+ iOS版 +
+ +
+ +
+ H5版 +
+ +
+ 微信小程序版 +
+ +
+ 支付宝小程序版 +
+
+
+ +
+ 百度小程序版 +
+ +
+ +
+ 字节跳动小程序版 +
+ +
+ +
+ QQ小程序版 +
+ +
+ +
+ 快应用 +
+ +
+ +
+ 360小程序 +
+
+

+ 注:某些平台不能提交简单demo,故补充了一些其他功能;hello uni-app示例代码可从[github](https://github.com/dcloudio/hello-uniapp)获取
+ 快应用仅支持 vivo 、oppo、华为
+ 360小程序仅 windows平台支持,需要在360浏览器中打开
+

+
+ +`uni-app`官网文档详见[https://uniapp.dcloud.io](https://uniapp.dcloud.io) + +更多uni-app的模板、示例详见[插件市场](https://ext.dcloud.net.cn/) + diff --git a/fe/PDA/api/index.js b/fe/PDA/api/index.js new file mode 100644 index 000000000..e5697c850 --- /dev/null +++ b/fe/PDA/api/index.js @@ -0,0 +1,1223 @@ +import request from '@/common/request.js' +import promise from '@/common/promise.js' + +let printUrl = getApp().globalData.print_url; //打印 +let devUrl = getApp().globalData.dev_url; //数据请求 + +export function getlogin(params) { // + return request(devUrl + "/api/pda/account/login", { // + data: params, + method: "post" + }) +} + +export function getMenus() { // + return promise(devUrl + "/api/pda/account/menus", { // + data: {}, + method: "get" + }) +} + +export function getUserInfo() { + return request(devUrl + "/api/pda/account/workgroups", { // + data: {}, + method: "get" + }) +} + +export function getUserInfoAsync() { + return promise(devUrl + "/api/pda/account/workgroups", { // + data: {}, + method: "get" + }) +} + + +export function getWorkgroups() { + return promise(devUrl + "/api/pda/account/workgroups", { // + data: {}, + method: "get" + }) +} + +//登出 +export function logout() { + return request(devUrl + "/api/pda/account/logout", { + method: "post" + }); +} + +// export function logout() {// +// return request("/prod/api/pda/account/logout", { +// data: {}, +// method: "post" +// }) +// } + +//按用户查询菜单列表 +export function menus() { + return request( + devUrl + "/api/pda/account/menus", { + method: 'get', + data: {} + }) +} + +//获取任务数量 +export function getJobCount() { + return request( + devUrl + "/api/pda/job/count", { + method: 'get', + data: {} + }) +} + +//获取任务数量 +export function getJobCountAsync(isToday) { + return promise( + devUrl + "/api/pda/job/count?isToday=" + isToday, { + method: 'get', + data: {} + }) +} + +//按用户查询用户信息 +export function profile(params) { // + return request(devUrl + "/api/pda/account/profile", { // + data: params, + method: "get" + }) +} +//修改用户密码 +export function changePassword(params) { // + return request(devUrl + "/api/pda/account/change-password", { // + data: params, + method: "post" + }) +} +//通用 +//查询库存明细 +export const balances = (params) => request( + devUrl + "/api/pda/inventory/balances", { + method: 'get', + data: params + }); + +//通用 +//查询库存明细 +export const issueBalances = (params) => request( + devUrl + "/api/pda/inventory/balances/by-issue", { + method: 'post', + data: params + }); + +//异步的库存查询方法 +export const issueBalancesAsync = (params) => promise( + devUrl + "/api/pda/inventory/balances/by-issue", { + method: 'post', + data: params + }); + + +//通用 +//查询库存明细 +export const getBalances = (params) => request( + devUrl + "/api/pda/inventory/balances/get-list-by-balance-list-input", { + method: 'post', + data: params + }); + +//异步的库存查询方法 +export const getBalancesAsync = (params) => promise( + devUrl + "/api/pda/inventory/balances/get-list-by-balance-list-input", { + method: 'post', + data: params + }); + + +//根据零件、箱码、托码、批次、库位类型、库存状态查询库存 +export const getBalancesByFilter = (params) => request( + devUrl + "/api/pda/inventory/balances/by-balances-request-many-parameter", { + method: 'post', + data: params + }); + +//根据零件、箱码、托码、批次、库位类型、库存状态查询库存 +export const getBalancesByFilterAsync = (params) => promise( + devUrl + "/api/pda/inventory/balances/by-balances-request-many-parameter", { + method: 'post', + data: params + }); + +//查询是否有预计入和预计出的占用 +export const getBalancesExpectByFilter = (params) => request( + devUrl + "/api/pda/inventory/balances/by-balances-request-many-parameter-not-in-expect-out", { + method: 'post', + data: params + }); + +// + +//根据库位查询库存 +export const getBalancesByStatus = (params) => request( + devUrl + "/api/pda/inventory/balances/get-by-location-type-and-inventory-status", { + method: 'post', + data: params + }); + +//根据库位和零件号查询库存 +export const getBalancesByLocationAndItem = (params) => request( + devUrl + "/api/pda/inventory/balances/get-by-location-and-item?locationCode=" + params.locationCode + + "&itemCode=" + params.itemCode, { + method: 'get', + data: params + }); + + +//根据库位和零件号查询库存 +export const getBalancesByLocationAndItemAsync = (params) => promise( + devUrl + "/api/pda/inventory/balances/get-by-location-and-item?locationCode=" + params.locationCode + + "&itemCode=" + params.itemCode, { + method: 'get', + data: params + }); + +//查询线边库存 +export const getWipListAsync = (params) => promise( + devUrl + "/api/pda/inventory/balances/get-wip-list?itemCode=" + params.itemCode + "&locationCode=" + params + .locationCode, { + method: 'get', + data: params + }); + + +//查询库存汇总 +export const summary = (params) => request( + devUrl + "/api/pda/inventory/balances/summary", { + method: 'get', + data: params + }); + +//零件 +//查询零件信息 +export const getitems = (code) => request( + devUrl + "/api/pda/item/" + code, { + method: 'get', + data: code + }); + +//根据库位查询零件 +export const getItemsByLocation = (params) => promise( + devUrl + "/api/pda/inventory/balances/get-item-by-location", { + method: 'get', + data: params + }); + +//查询已占用库存 +export const expectIn = (params) => request( + devUrl + "/api/pda/inventory/expect-in", { + method: 'get', + data: params + }); + +//根据code获取生产线 +export const getprodlineitem = (code) => request( + devUrl + "/api/pda/production-line/by-code?code=" + code, { + method: 'get', + data: {} + }); + +//异步查询生产线 +export const getprodlineitemAsync = (code) => promise( + devUrl + "/api/pda/production-line/by-code?code=" + code, { + method: 'get', + data: {} + }); + +//查询收货任务列表 +export const getReceiptJobList = (params) => request( + devUrl + `/api/pda/job/purchase-receipt/list`, { + method: 'get', + data: params + }); + +//根据Number 获取收货任务列表 +export const getReceiptJobByNumber = (params) => request( + devUrl + "/api/pda/job/purchase-receipt/by-number/" + params.number + "?isToday=" + params.isToday, { + data: {}, + method: "get" + }); + +//根据Asn Number 获取收货任务列表 +export const getReceiptJobByAsnNumber = (params) => request( + devUrl + "/api/pda/job/purchase-receipt/list/by-asn/asnNumber=" + params.number + "&isToday=" + params + .isToday, { + data: {}, + method: "get" + }); + +//查询收货任务明细 +export const purchaseReceipts = (id) => request( + devUrl + `/api/pda/job/purchase-receipt/${id}`, { + method: 'get', + data: {} + }); + +//开始收货任务 +export function takeReceiptJob(id) { + return request(devUrl + `/api/pda/job/purchase-receipt/take/${id}`, { // + data: {}, + method: "post" + }) +} +//取消承接任务 +export function cancelTakeReceiptJob(id) { + return request(devUrl + `/api/pda/job/purchase-receipt/cancel-take/${id}`, { // + data: {}, + method: "post" + }) +} +//完成收货任务 +export function finishReceiptJob(id, param) { // + return request(devUrl + `/api/pda/job/purchase-receipt/finish/${id}`, { // + data: param, + method: "post" + }) +} + +//保存目检结果 +export function saveReceiptResult(id, param) { + ///api/pda/job/purchase-receipt/save-detail-inspect/{id} + return request(devUrl + `/api/pda/job/purchase-receipt/save-detail-inspect/${id}`, { // + data: param, + method: "post" + }) +} + +//重置多个目检结果 +export function resetReceiptResult(id, param) { + ///api/pda/job/purchase-receipt/save-detail-inspect/{id} + return request(devUrl + `/api/pda/job/purchase-receipt/reset-many-detail-inspect/${id}`, { // + data: param, + method: "post" + }) +} + + +//重置一个目检结果 +export function resetReceiptDetailResult(id, detailId) { + ///api/pda/job/purchase-receipt/save-detail-inspect/{id} + return request(devUrl + `/api/pda/job/purchase-receipt/reset-detail-inspect/${id}?detailId=${detailId}`, { // + data: {}, + method: "post" + }) +} + +//待检转合格 +export function unInspectToQualified(id) { // + return request(devUrl + `/api/pda/job/purchase-receipt/set-inspect-status-ok-by-inspect/${id}`, { // + data: {}, + method: "post" + }) +} + +//库存 +//提交库存转移 +export function inventoryTransfer(params) { // + return request(devUrl + "/api/pda/store/transfer-note", { // + data: params, + method: "post" + }) +} +//提交计划外入库 +export function unplannedReceipt(params) { // + return request(devUrl + "/api/pda/store/unplanned-receipt", { // + data: params, + method: "post" + }) +} +//提交计划外出库 +export function unplannedIssue(params) { // + return request(devUrl + "/api/pda/store/unplanned-Issue", { // + data: params, + method: "post" + }) +} +//原料 +//原料收货 +export function purchaseReceipt(params) { // + return request(devUrl + "/api/pda/store/purchase-receipt", { // + data: params, + method: "post" + }) +} +//提交FIFO指导发料 +export function issue(params) { // + return request(devUrl + "/api/pda/store/issue", { // + data: params, + method: "post" + }) +} +//生产 +//提交叫料 +export function materialRequest(params) { // + return request(devUrl + "/api/pda/store/material-request", { // + data: params, + method: "post" + }) +} +//提交完工收货(无任务) +export function productreceipt(params) { // + return request(devUrl + "/api/pda/store/product-receipt", { // + data: params, + method: "post" + }) +} + +//完工收货(冲回) +export function productrecycle(params) { // + return request(devUrl + "/api/pda/store/product-recycle", { // + data: params, + method: "post" + }) +} + +//提交完工收货(天津) +export function tjproductreceipt(params) { // + return request(devUrl + "/api/pda/store/l7/create-product-receipt-note-with-l7", { // + data: params, + method: "post" + }) +} + +//完工收货(天津) +export function tjproductrecycle(params) { // + return request(devUrl + "/api/pda/store/l7/create-product-recycle-note-with-l7", { // + data: params, + method: "post" + }) +} + +//库位 +//查询库位信息 根据code +export const locations = (code) => request( + devUrl + "/api/pda/location/" + code, { + method: 'get', + data: code + }); + +//库位 +//查询库位信息 根据code +export const locationsAsync = (code) => promise( + devUrl + "/api/pda/location/" + code, { + method: 'get', + data: code + }); + +//库位 +//查询库位信息 根据type +export const locationByType = (type) => request( + devUrl + "/api/pda/location/by-type/" + type, { + method: 'get', + data: type + }); + +//根据库位查询零件 +export const getLocationByItem = (params) => promise( + devUrl + "/api/pda/inventory/balances/get-location-by-item", { + method: 'get', + data: params + }); + +//消息 +//查询未读消息列表 +export const messageList = (userId) => request( + devUrl + "/api/pda/store/message/list/" + userId, { + method: 'get', + data: {} + }); +//消息 +//查询未读消息列表 +export const unreadList = () => request( + devUrl + "/api/pda/store/message/unread-list", { + method: 'get', + data: {} + }); +//查询未读消息数量 +export const unreadCount = (userId) => request( + devUrl + "/api/pda/store/message/not-read-count/" + userId, { + method: 'get', + data: {} + }); +//变更消息状态 +export function readMessage(id) { // + return request(devUrl + "/api/pda/store/message/read/" + id, { // + data: id, + method: "post" + }) +}; +//查询消息明细 +export const messages = (id) => request( + devUrl + "/api/pda/store/message/" + id, { + method: 'get', + data: id + }); +//器具 +export function palletbind(id) { // + return request(devUrl + "/api/pda/stock/pallet/bind", { // + data: id, + method: "post" + }) +} + +//检验任务列表 +export const getInspectList = (params) => request( + devUrl + "/api/pda/job/inspect/list", { + method: 'get', + data: params + }); + +//检验任务详情 +export const getInspectDetail = (params) => request( + //api/pda/job/inspect/{id} + devUrl + "/api/pda/job/inspect/" + params.id, { // + data: {}, + method: "get" + }); + +//检验任务数量 +export const getInspectCount = (params) => request( + devUrl + "/api/pda/job/inspect/count", { + data: params, + method: "get" + }); + +//承接检验任务 +export const takeInspectJob = (params) => request( + devUrl + "/api/pda/job/inspect/take/" + params.id, { // + data: {}, + method: "post" + }); + +//取消承接检验任务 +export const cancelTakeInspectJob = (id) => request( + devUrl + "/api/pda/job/inspect/cancel-take/" + id, { // + data: {}, + method: "post" + }); + +//开始检验任务 +export const finshInspectJob = (id, params) => request( + devUrl + "/api/pda/job/inspect/finish/" + id, { // + data: params, + method: "post" + }) + +//上架任务列表 +export const getPutawayJobList = (params) => request( + devUrl + "/api/pda/job/put-away/list", { + method: 'get', + data: params + }); + +//上架任务详情 +export const getPutawayJobDetail = (params) => request( + devUrl + "/api/pda/job/put-away/" + params.id, { // + data: {}, + method: "get" + }); + +//上架任务数量 +export const getPutawayJobCount = (params) => request( + devUrl + "/api/pda/job/put-away/count", { + data: params, + method: "get" + }); + +//承接上架任务 +export const takePutawayJob = (params) => request( + devUrl + "/api/pda/job/put-away/take/" + params.id, { // + data: {}, + method: "post" + }); + +//承接上架任务 +export const cancelTakePutawayJob = (id) => request( + devUrl + "/api/pda/job/put-away/cancel-take/" + id, { // + data: {}, + method: "post" + }); + +//开始上架任务 +export const finshPutawayJob = (id, params) => request( + devUrl + "/api/pda/job/put-away/finish/" + id, { // + data: params, + method: "post" + }) + +//根据托标签生成上架任务 +export const byContainercode = (params) => request( + devUrl + "/api/pda/job/put-away/by-containercode/", { // + data: params, + method: "post" + }) + +//根据箱标签生成上架任务 +export const byPackingcode = (params) => request( + devUrl + "/api/pda/job/put-away/by-packingcode", { // + data: params, + method: "post" + }) + +//检查此箱是否存在任务 +export const checkjobbypacking = (params) => request( + devUrl + "/api/pda/job/put-away/check-job-exist-by-packing", { // + data: params, + method: "get" + }) + +//创建叫料申请 +export const materialrequest = (params) => request( + devUrl + "/api/pda/store/material-request", { // + data: params, + method: "post" + }) + +//根据托标签检查是否存在任务 +export const checkjobbycontainer = (params) => request( + devUrl + "/api/pda/job/put-away/check-job-exist-by-container", { // + data: params, + method: "get" + }) + +//发料任务列表 +export const getIssueList = (params) => request( + devUrl + "/api/pda/job/issue/list", { + method: 'get', + data: params + }); + +//检查是否存在发料任务"​/prod/api/pda/job/issue/check-job-exist", +export const checkIssueJobExist = (params) => request( + devUrl + "/api/pda/job/issue/check-job-exist", { + method: 'get', + data: params + }); + +//检查是否存在发料任务"​/prod/api/pda/job/issue/check-job-exist", +export const checkIssueJobExistAsync = (params) => promise( + devUrl + "/api/pda/job/issue/check-job-exist", { + method: 'get', + data: params + }); + +//根据Number 获取发料任务列表 +export const getIssueJobByNumber = (jobNumber) => request( + devUrl + "/api/pda/job/issue/by-number/" + jobNumber, { + data: {}, + method: "get" + }); + + +// 根据MaterialRequest Number获取收货任务列表 +export const getIssueListByRequest = (requestNumber) => request( + devUrl + "/api/pda/job/issue/list/by-request/" + requestNumber, { // + data: {}, + method: "get" + }); + +//发料任务数量 +export const getIssueCount = (params) => request( + devUrl + "/api/pda/job/issue/count", { + data: params, + method: "get" + }); + +//发料任务详情 +export const getIssueDetail = (params) => request( + devUrl + "/api/pda/job/issue/" + params.id, { // + data: {}, + method: "get" + }); + +//承接发料任务 +export const takeIssueJob = (params) => request( + devUrl + "/api/pda/job/issue/take/" + params.id, { // + data: {}, + method: "post" + }); + +//取消承接发料任务 +export const cancelTakeIssueJob = (id) => request( + devUrl + "/api/pda/job/issue/cancel-take/" + id, { // + data: {}, + method: "post" + }); +//完成发料任务 +export const finshIssueJob = (id, params) => request( + devUrl + "/api/pda/job/issue/finish/" + id, { // + data: params, + method: "post" + }) +//发货任务列表 +export const getDeliverList = (params) => request( + devUrl + "/api/pda/job/deliver/list", { + method: 'get', + data: params + }); + +//根据Number 获取发货任务列表 +export const getDeliverJobByNumber = (number) => request( + devUrl + "/api/pda/job/deliver/by-number/" + number, { + data: {}, + method: "get" + }); + +//发货任务数量 +export const getDeliverCount = (params) => request( + devUrl + "/api/pda/job/deliver/count", { + data: params, + method: "get" + }); + +//发货任务详情 +export const getDeliverDetail = (params) => request( + 'http://127.0.0.1:4523/m1/1863666-0-default' + "/api/pda/job/deliver/" + params.id, { // + data: {}, + method: "get" + }); + +//承接发货任务 +export const takeDeliverJob = (params) => request( + 'http://127.0.0.1:4523/m1/1863666-0-default' + "/api/pda/job/deliver/take/" + params.id, { // + data: {}, + method: "post" + }); +//取消承接发货任务 +export const cancelTakeDeliverJob = (id) => request( + 'http://127.0.0.1:4523/m1/1863666-0-default' + "/api/pda/job/deliver/cancel-take/" + id, { // + data: {}, + method: "post" + }); +//开始发货任务 +export const finshDeliverJob = (id, params) => request( + devUrl + "/api/pda/job/deliver/finish/" + id, { // + data: params, + method: "post" + }) + +//盘点任务列表 +export const getCountJobList = (params) => request( + devUrl + "/api/pda/job/count/list", { + method: 'get', + data: params + }); + +//根据Number获取盘点任务 +export const getCountJobByNumber = (number) => request( + devUrl + "/api/pda/job/count/by-number/" + number, { + data: {}, + method: "get" + }); + + +//根据库位获取盘点任务 +export const getCountJobByLocation = (locationCode) => request( + devUrl + "/api/pda/job/count/list/by-location/" + locationCode, { + data: {}, + method: "get" + }); + +//根据库位获取盘点任务 +export const getCountJobByLocationAsync = (locationCode) => promise( + devUrl + "/api/pda/job/count/list/by-location/" + locationCode, { + data: {}, + method: "get" + }); + +//盘点任务数量 +export const getCountJobCount = (params) => request( + devUrl + "/api/pda/job/count/count", { + data: params, + method: "get" + }); +//盘点任务详情 +export const getCountJobDetail = (params) => request( + devUrl + "/api/pda/job/count/" + params.id, { // + data: { + params + }, + method: "get" + }); + +//承接上架任务 +export const takeCountJob = (params) => request( + devUrl + "/api/pda/job/count/take/" + params.id, { // + data: {}, + method: "post" + }); + +//取消承接发货任务 +export const cancelTakeCountJob = (id) => request( + devUrl + "/api/pda/job/count/cancel-take/" + id, { // + data: {}, + method: "post" + }); //取消承接发货任务 +//提交盘点任务 +export const finishCountJob = (id, params) => request( + devUrl + "/api/pda/job/count/finish/" + id, { // + data: params, + method: "post" + }); + +//根据条件新增盘点任务 +export const createCountJob = (params) => request( + devUrl + "/api/pda/job/count/create-with-condition/", { // + data: params, + method: "post" + }); + +//退货任务列表 +export const getReturnJobList = (params) => request( + devUrl + "/api/pda/job/purchase-return/list", { + method: 'get', + data: params + }); + +//根据Number 获取盘点任务列表 +export const getReturnJobByNumber = (number) => request( + devUrl + "/api/pda/job/purchase-return/by-number/" + number, { + data: {}, + method: "get" + }); + +//退货任务数量 +export const getReturnJobCount = (params) => request( + devUrl + "/api/pda/job/purchase-return/count", { + data: params, + method: "get" + }); + +//退货任务详情 +export const getReturnJobDetail = (id) => request( + devUrl + "/api/pda/job/purchase-return/" + id, { // + data: {}, + method: "get" + }); + +//承接退货任务 +export const takePurchaseReturnJob = (id) => request( + devUrl + "/api/pda/job/purchase-return/take/" + id, { // + data: {}, + method: "post" + }); + +//取消承接退货任务 +export const cancelTakePutchaseReturnJob = (id) => request( + devUrl + "/api/pda/job/purchase-return/cancel-take/" + id, { // + data: {}, + method: "post" + }); + +//完成退货任务 +export const finishReturnJob = (id, returnReason) => request( + devUrl + "/api/pda/job/purchase-return/finish/" + id + "?returnReason=" + returnReason, { // + data: {}, + method: "post" + }); + +//完工收货任务 +export const getProductReceiptList = (params) => request( + devUrl + "/api/pda/job/product-receipt/list", { + method: 'get', + data: params + }); + +//完工收货任务详情 +export const getProductReceiptDetail = (params) => request( + //api/pda/job/inspect/{id} + devUrl + "/api/pda/job/product-receipt/" + params.id, { // + data: {}, + method: "get" + }); + +//承接完工收货任务 +export const takeProductReceiptJob = (params) => request( + devUrl + "/api/pda/job/product-receipt/take/" + params.id, { // + data: {}, + method: "post" + }); +//取消承接完工收货任务 +export const cancelTakeProductReceiptJob = (id) => request( + devUrl + "/api/pda/job/product-receipt/cancel-take/" + id, { // + data: {}, + method: "post" + }); + +//开始完工收货任务 +export const finshProductReceiptJob = (id, params) => request( + devUrl + "/api/pda/job/product-receipt/finish/" + id, { // + data: params, + method: "post" + }); + +//无任务的完工收货 +export const finshProductReceiptNoJob = (id, params) => request( + devUrl + "/api/pda/store/product-receipt", { // + data: params, + method: "post" + }); + +//获取箱标签 +export const getContainerCode = (qty) => request( + devUrl + "/api/pda/stock/pack/add-pallet-code-number?qty=" + qty, { // + data: {}, + method: "post" + }); + +//获取生产线 +export const getProductionLine = (params) => request( + devUrl + "/api/pda/production-line/list", { // + data: params, + method: "get" + }); + +//获取班次 +export const getShift = (params) => request( + devUrl + "/api/pda/shift/list", { // + data: params, + method: "get" + }); + +//获取客户地址 +export const getCustomerAddressByCode = (code) => request( + devUrl + "/api/pda/customer-address/" + code, { // + data: {}, + method: "get" + }); + +//获取客户地址 +export const getCustomerAddressByCodeAsync = (code) => promise( + devUrl + "/api/pda/customer-address/" + code, { // + data: {}, + method: "get" + }); + +//按客户代码获取客户地址 +export const getCustomerAddressBycustomerCode = (customerCode) => request( + devUrl + "/api/pda/customer-address/by-customer?customerCode=" + customerCode, { // + data: {}, + method: "get" + }); + +//按客户代码获取客户地址 +export const getCustomerAddressBycustomerCodeAsync = (customerCode) => promise( + devUrl + "/api/pda/customer-address/by-customer?customerCode=" + customerCode, { // + data: {}, + method: "get" + }); + +export const getItemAsync = (code) => promise( + devUrl + '/api/pda/item/' + code, { // + data: {}, + method: "get" + }); + + +//直接发货 +export const finshDeliver = (params) => request( + devUrl + "/api/pda/store/deliver", { // + data: params, + method: "post" + }); + +//原料直发 +export const rawDeliver = (params) => request( + devUrl + "/api/pda/store/deliver", { // + data: params, + method: "post" + }); + + +//调拨发货 +export const warehouseTransfer = (params) => request( + devUrl + "/api/pda/store/warehouse-transfer", { // + data: params, + method: "post" + }); + +//发货任务列表 +export const getJisDeliverList = (params) => request( + devUrl + "/api/pda/job/jis-deliver/list", { + method: 'get', + data: params + }); +//发货任务数量 +export const getJisDeliverCount = (params) => request( + devUrl + "/api/pda/job/jis-deliver/count", { + data: params, + method: "get" + }); + +// //发货任务详情 +// export const getJisDeliverDetail = (params) => request( +// "/prod/api/pda/job/jis-deliver" , { // +// data: params, +// method: "get" +// }); + +//发货任务详情 +export const getJisDeliverDetail = (params) => request( + devUrl + "/api/pda/job/jis-deliver", { // + data: {}, + method: "get" + }); + +//承接发货任务 +export const takeJisDeliverJob = (params) => request( + devUrl + "/api/pda/job/jis-deliver/take/" + params.id, { // + data: {}, + method: "post" + }); +//取消承接发货任务 +export const cancelTakeJisDeliverJob = (id) => request( + devUrl + "/api/pda/job/jis-deliver/cancel-take/" + id, { // + data: {}, + method: "post" + }); +//开始发货任务 +///api/pda/job/jis-deliver/finish/{id} +export const finshJisDeliverJob = (id, params) => request( + devUrl + "/api/pda/job/jis-deliver/finish/" + id, { // + data: params, + method: "post" + }) + +//查询器具是否存在 +export const getContainer = (code) => request( + devUrl + "/api/pda/inventory/container/" + code, { // + data: {}, + method: "get" + }); + +//查询器具是否存在 +export const getContainerAsync = (code) => promise( + devUrl + "/api/pda/inventory/container/" + code, { // + data: {}, + method: "get" + }); + +//查询器具是否按序 +export const checkContainerOrder = (code) => request( + devUrl + "/api/pda/inventory/container/check-by-code/" + code, { // + data: {}, + method: "get" + }); + +//查询器具是否按序 +export const checkContainerOrderAsync = (code) => promise( + devUrl + "/api/pda/inventory/container/check-by-code/" + code, { // + data: {}, + method: "get" + }); + + +export const PrintServices = (data) => { + return uni.request({ + url: printUrl + '/api/print/PrintServices', + method: 'post', + header: { + 'content-type': 'application/x-www-form-urlencoded' + }, + data + }).then(res => { + if (res != null && res[1] != null) { + if (res[1].statusCode != null) { + //状态码类型 2开头的全是成功 + let code = res[1].statusCode.toString().substring(0, 1); + if (code === '2') { + + return res[1].data; + } else { + let message = res[1].data.error.message; + if (message != null) { + throw res[1].data.error.message; + } else { + throw res[1].statusCode + "错误"; + } + + } + } else { + throw url + "返回的状态码类型为空" + } + } else { + throw url + "返回的res为空" + } + }) +} +// 获取版本号 +export const isNewVersion = () => { + return uni.request({ + url: devUrl + `/static/version.json?t=${new Date().getTime()}`, + method: 'post' + }).then(res => { + console.log(res) + }) +} + +// 东阳新接口 +//报废 +export const scrap = (params) => request( + devUrl + "/api/pda/store/scrap", { // + data: params, + method: "post" + }); + +//上架前退货 +export const returnBeforePutaway = (params) => request( + devUrl + "/api/pda/store/purchase-return-note/before-puton", { // + data: params, + method: "post" + }); + +//获取采购标签信息 +// export const getPurchaseLabel = (code) => request( +// devUrl + "/api/pda/label/purchaselabel/by-code?code=" + code, { // +// data: {}, +// method: "get" +// }); + + +// //获取采购标签信息 +// export const getPurchaseLabelAsync = (code) => promise( +// devUrl + "/api/pda/label/purchaselabel/by-code?code=" + code, { // +// data: {}, +// method: "get" +// }); + +// //获取产品标签信息 +// export const getProductionLabel = (code) => request( +// devUrl + "/api/pda/label/productionlabel/by-code?code=" + code, { // +// data: {}, +// method: "get" +// }); + +// //获取产品标签信息 +// export const getProductionLabelAsync = (code) => promise( +// devUrl + "/api/pda/label/productionlabel/by-code?code=" + code, { // +// data: {}, +// method: "get" +// }); + + +//获取产品标签信息inventorylabel +export const getInventoryLabel = (code) => request( + devUrl + "/api/pda/label/inventorylabel/by-code?code=" + code, { // + data: {}, + method: "get" + }); + +//获取产品标签信息 +export const getInventoryLabelAsync = (code) => promise( + devUrl + "/api/pda/label/inventorylabel/by-code?code=" + code, { // + data: {}, + method: "get" + }); + +//回收料收货 +export const recycledMaterialReceipt = (param) => request( + devUrl + "/api/pda/store/recycled-material-receipt-note", { // + data: param, + method: "post" + }); + +//生产退库列表 +export const getProductionReturnJobList = (params) => request( + devUrl + "/api/pda/job/production-return/list", { + method: 'get', + data: params + }); + +//生产退库数量 +export const getProductionReturnJobCount = (params) => request( + devUrl + "/api/pda/job/production-return/count", { + data: params, + method: "get" + }); + +//生产退库详情 +export const getProductionReturnJobDetail = (id) => request( + devUrl + "/api/pda/job/production-return/" + id, { // + data: {}, + method: "get" + }); + +//承接生产退库 +export const takeProductionReturnJob = (id) => request( + devUrl + "/api/pda/job/production-return/take/" + id, { // + data: {}, + method: "post" + }); + +//取消承接生产退库 +export const cancelTakeProductionReturnJob = (id) => request( + devUrl + "/api/pda/job/production-return/cancel-take/" + id, { // + data: {}, + method: "post" + }); + +//完成生产退库 +export const finishProductionReturnJob = (id, params) => request( + devUrl + "/api/pda/job/production-return/finish/" + id, { // + data: params, + method: "post" + }); + +//直接退库 +export const returnToWarehouse = (params) => request( + devUrl + "/api/pda/store/return-to-warehouse", { // + data: params, + method: "post" + }); + +//采购上架 +export const purchasePutaway = (params) => request( + devUrl + "/api/pda/note/put-away/by-purchase", { // + data: params, + method: "post" + }); + +//半成品上架 +export const semiPutaway = (params) => request( + devUrl + "/api/pda/note/put-away/by-semi", { // + data: params, + method: "post" + }); + +// +export const getPurchaseDetailAsync = (itemCode, packingCode) => promise( + devUrl + "/api/pda/store/purchase-receipt/detail-by-item-and-packing?itemCode=" + itemCode + '&packingCode=' + + packingCode, { // + data: {}, + method: "get" + }); + +export const getFileByCode = (fileCode) => request( + devUrl + "/api/pda/file/filestore/by-code/" + fileCode, { // + data: {}, + method: "post" + }); + +// 根据 code 获取配置字典 +export const getDictByCode = (code) => request( + devUrl + "/api/pda/dict/by-code?code=" + code, { // + data: {}, + method: "get" + }); + +//直接发料 +export const issueDirect = (params) => request( + devUrl + "/api/pda/store/issue", { // + data: params, + method: "post" + }); diff --git a/fe/PDA/api/test.js b/fe/PDA/api/test.js new file mode 100644 index 000000000..ad2eae61c --- /dev/null +++ b/fe/PDA/api/test.js @@ -0,0 +1,22 @@ +// import request from '@/common/request.js' +// import promise from '@/common/promise.js' +import request from '@/common/request_test.js' +// let devUrl = this.$dev_url; + +let devUrl = "http://dev.ccwin-in.com:59096" +export function getlogin(params) { + return request({ + url: devUrl + "/api/pda/account/login", + method: "post", + data: params, + }); +} + +//修改用户密码 +export function changePassword(params) { // + return request({ + url:devUrl + "/api/pda/account/change-password",// + data: params, + method: "post" + }) +} diff --git a/fe/PDA/api/test_2.js b/fe/PDA/api/test_2.js new file mode 100644 index 000000000..8b712bf93 --- /dev/null +++ b/fe/PDA/api/test_2.js @@ -0,0 +1,22 @@ +// // import request from '@/common/request.js' +// // import promise from '@/common/promise.js' +// import request from '@/common/request_test.js' +// // let devUrl = this.$dev_url; + +// let devUrl = "http://dev.ccwin-in.com:59096" +// export function getlogin(params) { +// return request({ +// url: devUrl + "/api/pda/account/login", +// method: "post", +// data: params, +// }); +// } + +// //修改用户密码 +// export function changePassword(params) { // +// return request({ +// url:devUrl + "/api/pda/account/change-password",// +// data: params, +// method: "post" +// }) +// } diff --git a/fe/PDA/changelog.md b/fe/PDA/changelog.md new file mode 100644 index 000000000..4f33931d4 --- /dev/null +++ b/fe/PDA/changelog.md @@ -0,0 +1,171 @@ +## 3.4.4(2022-07-25) +- 新增 同步 uni-ui@1.4.20 + - uni-forms 【重要】组件逻辑重构,部分用法旧版本不兼容,请注意兼容问题 + - uni-section 新增组件 +## 3.4.3(2022-07-14) +- 修复 HBuilderX 拉取 hello uni-app 项目直接运行提示无服务空间关联的bug +## 3.4.2(2022-07-06) +- 新增 同步 uni-ui@1.4.18 + - uni-forms 【重要】组件逻辑重构,部分用法旧版本不兼容,请注意兼容问题 + - uni-forms 【重要】组件使用 Provide/Inject 方式注入依赖,提供了自定义表单组件调用 uni-forms 校验表单的能力 + - uni-forms 新增 更多表单示例 + - uni-forms 新增 model 属性,等同于原 value/modelValue 属性,旧属性即将废弃 + - uni-forms 新增 validateTrigger 属性的 blur 值,仅 uni-easyinput 生效 + - uni-forms 新增 onFieldChange 方法,可以对子表单进行校验,可替代binddata方法 + - uni-forms 新增 子表单的 setRules 方法,配合自定义校验函数使用 + - uni-forms 新增 uni-forms-item 的 setRules 方法,配置动态表单使用可动态更新校验规则 + - uni-forms 修复 由 1.4.0 引发的 label 插槽不生效的bug + - uni-forms 修复 子组件找不到 setValue 报错的bug + - uni-forms 修复 uni-data-picker 在 uni-forms-item 中报错的bug + - uni-forms 修复 uni-data-picker 在 uni-forms-item 中宽度不正确的bug + - uni-forms 修复 表单校验顺序无序问题 + - uni-forms 优化 子表单组件uni-datetime-picker、uni-data-select、uni-data-picker的显示样式 + - uni-forms 优化 动态表单校验方式,废弃拼接name的方式 + - uni-breadcrumb 修复 微信小程序 separator 不显示问题 + - uni-data-checkbox 优化 在 uni-forms 中的依赖注入方式 + - uni-data-picker 修复 uni-data-picker 在 uni-forms-item 中宽度不正确的bug + - uni-data-picker 优化 显示样式 + - uni-data-select 优化 显示样式 + - uni-datetime-picker 修复 日历顶部年月及底部确认未国际化 bug + - uni-datetime-picker 优化 组件样式,调整了组件图标大小、高度、颜色等,与uni-ui风格保持一致 + - uni-easyinput 新增 在 uni-forms 1.4.0 中使用可以在 blur 时校验内容 + - uni-easyinput 新增 clear 事件,点击右侧叉号图标触发 + - uni-easyinput 新增 change 事件 ,仅在输入框失去焦点或用户按下回车时触发 + - uni-easyinput 优化 组件样式,组件获取焦点时高亮显示,图标颜色调整等 + - uni-easyinput 优化 clearable 显示策略 + - uni-file-picker 修复 在uni-forms下样式不生效的bug + - uni-nav-bar 修复 组件示例中插槽用法无法显示内容的bug + - uni-swipe-action 修复 vue3 下使用组件不能正常运行的Bug + - uni-swipe-action 修复 h5端点击click触发两次的Bug + - uni-table 修复 微信小程序存在无使用组件的问题 +## 3.4.1(2022-06-30) +- 新增 支持 ios 安全区 +## 3.3.8(2022-05-08) +- 新增 同步 uni-ui@1.4.15 + - uni-data-picker 修复 字节小程序 本地数据无法选择下一级的Bug + - uni-data-select 新增 记住上次的选项(仅 collection 存在时有效) + - uni-search-bar 修复 vue3 input 事件不生效的bug + - uni-search-bar 修复 多余代码导致的bug + - uni-tooltip 更新 text 属性变更为 content + - uni-tooltip 更新 移除 width 属性 + - uni-tooltip 修复 组件根 text 嵌套组件 warning +## 3.3.7(2022-04-06) +- 新增 更新扩展组件 uni-nav-bar、uni-list 的展示页面 +## 3.3.6(2022-03-31) +- 更新 uni-ui 组件及示例 +## 3.3.5(2022-03-30) +- 修复 插槽兼容 vue3, slot -> v-slot +- 新增 更新 uni-ui +## 3.3.4(2022-02-25) +- 修复 编译到 App 平台的控制台报错 +## 3.3.3(2022-02-23) +- 修复 模板城市选择 vue3 报错的bug +- 修复 删除 map.nvue 中多余的 enableOverlooking 变量 +- 修复 swipe-dot.nvue 中条件编译媒体查询 +## 3.3.2(2022-01-26) +- 修复 默认运行到 vue2 +## 3.3.1(2022-01-26) +- 新增 同步 uni-ui@1.4.11 + - uni-collapse 修复 微信小程序resize后组件收起的bug + - uni-countdown 修复 在微信小程序中样式不生效的bug + - uni-countdown 新增 update 方法 ,在动态更新时间后,刷新组件 + - uni-load-more 新增 showText属性 ,是否显示文本 + - uni-load-more 修复 nvue 平台下不显示文本的bug + - uni-load-more 修复 微信小程序平台样式选择器报警告的问题 + - uni-nav-bar 修复 在vue下,标题不垂直居中的bug + - uni-nav-bar 修复 height 属性类型错误 + - uni-nav-bar 新增 height 属性,可修改组件高度 + - uni-nav-bar 新增 dark 属性可可开启暗黑模式 + - uni-nav-bar 优化 标题字数过多显示省略号 + - uni-nav-bar 优化 插槽,插入内容可完全覆盖 + - uni-popup 修复 isMaskClick 失效的bug + - uni-popup 新增 cancelText \ confirmText 属性 ,可自定义文本 + - uni-popup 新增 maskBackgroundColor 属性 ,可以修改蒙版颜色 + - uni-popup 优化 maskClick属性 更新为 isMaskClick ,解决微信小程序警告的问题 +## 3.3.0(2022-01-04) +- 修复 开发时在 vue3 下由 pc 端切换到手机端,不能返回上一级页面的 bug +- 优化 去掉 pc 端 topwindow 右上角用于演示的 url 导航 +## 3.2.12(2021-12-20) +- 新增 适配京东小程序 +## 3.2.11(2021-12-07) +- 修复 uni-ui 在 hello-uniapp 中丢失图标、ui 受到公共样式影响等问题 +- 修复 微信登录取值报错的问题 +## 3.2.10(2021-11-30) +- 修复 map 组件示例不显示的 bug +## 3.2.9(2021-11-19) +- 新增 uni-ui 以 uni_modules 方式引入,方便开发者从 hello-uniapp 中 copy 组件及示例 +- 优化 uni-ui 示例页面,完善组件示例 +## 3.2.8(2021-11-10) +- 新增 适配飞书平台(lark) +## 3.2.7(2021-10-26) +- 修复 uni-popup 示例的 button 文字在 iPhone 5 上换行的 bug +- 修复 uni-table 示例,页面顶部距离不对的 bug +- 修复 GlobalData示例,在vue3是无效的 bug +- 优化 删除无用的 project.swan.json 文件 +## 3.2.6(2021-10-08) +- 由于体验问题,暂时撤销 uni-ui 以 uni_modules 方式引入的修改 + +## 3.2.4(2021-09-07) +- 修复 vue3 在 H5 编译报错的 bug +- 新增 同步 uni-ui + - 新增 uni-ui 组件支持国际化 i18n + - uni-data-checkbox 修复 在uni-forms中 modelValue 中不存在当前字段,当前字段必填写也不参与校验的问题 + - uni-datetime-picker 优化 取消选中时(范围选)直接开始下一次选择, 避免多点一次 + - uni-datetime-picker 优化 移动端支持清除按钮,同时支持通过 ref 调用组件的 clear 方法 + - uni-datetime-picker 优化 调整字号大小,美化日历界面 + - uni-datetime-picker 修复 因国际化导致的 placeholder 失效的 bug + - uni-file-picker 修复 return-type="object" 时且存在v-model时,无法删除文件的Bug + - uni-file-picker 新增 参数中返回 fileID 字段 + - uni-file-picker 修复 腾讯云传入fileID 不能回显的bug + - uni-file-picker 修复 选择图片后,不能放大的问题 + - uni-link 修复 在 nvue 下不显示的 bug + - uni-list 修复 在vue3中to属性在发行应用的时候报错的bug + - uni-search-bar 修复 value 属性与 modelValue 属性不兼容的Bug + - uni-swipe-action 优化 close-all 方法 + - uni-collapse 优化 show-arrow 属性默认为true + - uni-collapse 新增 show-arrow 属性,控制是否显示右侧箭头 + - uni-data-checkbox 修复 单选 list 模式下 ,icon 为 left 时,选中图标不显示的问题 + - uni-easyinput 修复 在 uni-forms 的动态表单中默认值校验不通过的 bug + - uni-file-picker 修复 由于 0.2.11 版本引起的不能回显图片的Bug + - uni-file-picker 新增 clearFiles(index) 方法,可以手动删除指定文件 + - uni-file-picker 修复 v-model 值设为 null 报错的Bug + - uni-swipe-action 新增 close-all 方法,关闭所有已打开的组件 + - uni-swipe-action 新增 resize() 方法,在非微信小程序、h5、app-vue端出现不能滑动的问题的时候,重置组件 + - uni-swipe-action 修复 app 端偶尔出现类似 Page[x][-x,xx;-x,xx,x,x-x] 的问题 + - uni-swipe-action 优化 微信小程序、h5、app-vue 滑动逻辑,避免出现动态新增组件后不能滑动的问题 + + +## 3.2.3(2021-08-27) +- 优化 tabbar 页面移除 vuex 相关代码 +- 新增 适配 vue3 (app) +## 3.2.2(2021-08-10) +- 新增 适配快手小程序 +- 新增 同步 uni-ui + - uni-datetime-picker 新增 return-type 属性支持返回 date 日期对象 + - uni-file-picker 修复 fileExtname属性不指定值报错的Bug + - uni-file-picker 修复 在某种场景下图片不回显的Bug + - uni-link 支持自定义插槽 + - uni-calendar 修复 弹出层被 tabbar 遮盖 bug + - uni-dateformat 调整 默认时间不再是当前时间,而是显示'-'字符 + - uni-datetime-picker 新增 适配 vue3 + - uni-datetime-picker 新增 支持作为 uni-forms 子组件相关功能 + - uni-datetime-picker 修复 在 uni-forms 中使用时,选择时间报 NAN 错误的 bug + - uni-datetime-picker 修复 type 属性动态赋值无效的 bug + - uni-datetime-picker 修复 ‘确认’按钮被 tabbar 遮盖 bug + - uni-datetime-picker 修复 组件未赋值时范围选左、右日历相同的 bug + - uni-datetime-picker 修复 范围选未正确显示当前值的 bug + - uni-datetime-picker 修复 h5 平台(移动端)报错 'cale' of undefined 的 bug + - uni-file-picker 修复 auto-upload 属性失效的Bug +## 3.2.1(2021-07-31) +- 新增 同步 uni-ui@1.3.8 +## 3.2.0(2021-07-30) +- 新增 同时兼容 vue2 & vue3 +## 3.1.20(2021-07-30) +- 新增 同时兼容 vue2 & vue3 +## 3.1.17(2021-05-26) +- 修复 3.1.16 依赖 sass 的问题 +- 条件编译 nuve 不支持 css 属性 +## 3.1.16(2021-05-26) +- 修复 uni-data-checkbox 不关联服务空间的情况下组件报错的 Bug +## 3.1.12(2021-05-07) +- hello-uniapp 发布插件市场 diff --git a/fe/PDA/common/PDA_style.css b/fe/PDA/common/PDA_style.css new file mode 100644 index 000000000..47edd46af --- /dev/null +++ b/fe/PDA/common/PDA_style.css @@ -0,0 +1,221 @@ + +@media screen and (min-width:400px) { + uni-app, uni-page-head{ + height: 60px; + } + uni-page-head .uni-page-head{ + height: 60px !important; + } + uni-page-head[uni-page-head-type=default]~uni-page-wrapper{ + height: calc(100% - 70px) !important; + } + uni-page-head .uni-page-head__title{ + font-size: 1.125rem !important; + line-height: 40px !important; + font-weight: normal !important; + } + uni-page-head .uni-btn-icon{ + font-size: 1.725rem !important; + } + .font_xs{ + font-size: 0.825rem !important; + } + .font_xl{ + font-size: 1.325rem !important; + } + .mini-type-style{ + font-size: 0.8rem !important; + } + .cen_card .label_box .label_info uni-text{ + line-height: 1.725 !important; + /* font-size: 1rem !important; */ + color: #333; + } + .cen_card .label_box .label_info{ + background-color: #eee !important; + } + .popup_box .detail-list{ + box-shadow: none !important; + } + .detail-list,.device-detail{ + box-shadow: 0 0 10px rgba(0, 0, 0, 0.15) !important; + } + .list_form .uni-table-tr{ + background-color: #f0f0f0 !important; + } + .list_form .uni-table-th{ + border-bottom: 1px solid #cfcfcf !important; + } + /* yuanswitch + .require_wrap{ + padding-top: 0 !important; + } + .require_wrap .require_cell{ + line-height: 1.75 !important; + } + .ljh_box .tit_ljh{ + font-size: 1.25rem !important; + } + .cen_card .label_box .label_info { + background-color: #eee !important; + } + .cen_card .label_box .label_info uni-image{ + width: 48rpx !important; + height: 48rpx !important; + } + + .cen_card .label_box .label_info uni-text{ + line-height: 1.5 !important; + font-size: 1rem !important; + color: #333; + } + .ljh_box .tit_ljh .state-style, .top_card .state-style{ + font-size: 0.8rem !important; + } + .card_task .ljh_box{ + margin-bottom: 0 !important; + } + .task_num uni-image{ + width: 56rpx !important; + height: 56rpx !important; + } + .task_num uni-text{ + font-size: 1rem !important; + } + .pda_receipt_label .label_order uni-text{ + font-size: 1rem; + color: #434556; + } + .pda_receipt_label .icon_normal{ + width: 56rpx; + height: 56rpx; + } + .pda_receipt_bot .icon_normal{ + width: 56rpx; + height: 56rpx; + float: left; + } + .pda_receipt_bot .text_darkblue{ + float: left; + font-size: 1rem; + margin-top: 8rpx; + display: inline-block; + }*/ + .top_card .text_lightblue{ + font-size: 1rem !important; + } + .top_card .cell_box .cell_info{ + margin-bottom: 0; + } + .uni-tab-item-title{ + font-size: 1.125rem !important; + } + .cell_box .cell_info uni-view{ + font-size: 1rem !important; + color: #101010 !important; + } + .cell_box .cell_info .text_lightblue{ + font-size: 0.875rem !important; + color: #6A6E7A !important; + } + .cell_box .cell_info .text_black{ + font-size: 1.125rem !important; + + } + .scan_float uni-image{ + margin-top: 18rpx !important; + } + .scan_float uni-view{ + font-size: 0.875rem !important; + letter-spacing: 1px; + } + .new_btn_bot .new_save_btn,.popup_box .pop_title uni-text{ + font-size: 1rem !important; + } + .bot_card{ + background-color: #eee !important; + } + .bot_card_item uni-text{ + font-size: 0.8rem !important; + font-weight: 600; + } + .summary_state .state_point{ + font-size: 1rem !important; + } + .summary_item label{ + float: left; + } + .summary_item uni-text{ + font-size: 1.125rem !important; + font-weight: normal !important; + float: left; + } + /* popup */ + .popup_box{ + box-sizing: border-box; + } + .popup_box .uni-steps{ + width:100%; + overflow-x: hidden; + } + .popup_box .uni-steps__row-line-item{ + height: 60rpx !important; + } + .popup_box .uni-steps__row-text-container{ + margin-top: 0 !important; + } + .popup_box,.uni-popup .uni-scroll-view-content{ + border-top-left-radius:30rpx !important; + border-top-right-radius:30rpx !important; + } + .popup_box .pop_title{ + font-size: 1.125rem !important; + letter-spacing: 1px; + } + .popup_box .pop_tab .tab_tit{ + font-size: 0.875rem !important; + } + .popup_box .pop_tab .tab_tit_active{ + font-size: 1rem !important; + } + .popup_box .pop_tab .tab_info{ + min-height: 200rpx !important; + } + .popup_box .pop_tab .tab_info uni-textarea{ + height: 200rpx; + } + .popup_box .pop_tab .tab_info uni-button{ + font-size: 0.875rem !important; + letter-spacing: 1px; + } + /*底部按钮*/ + .new_btn_bot .new_save_btn{ + background-color: #E4EAFF !important; + height: 50px; + line-height: 50px; + } + .new_btn_bot .new_clear_btn{ + font-size: 1rem !important; + line-height: 50px; + } + .scroll-detail{ + padding-bottom: 70px !important; + } + .count_shadow,.device-detail{ + box-shadow: 0 0 20rpx rgba(0,0,0,0.2); + } + .list_info { + padding: 0 20rpx 20rpx; + margin-top: 0; + } + .uni-scroll-view-content .creattp_list{ + width: 100% !important; + } + .creattp_list .uni-list .list_cell uni-text{ + font-weight: bold; + } + .popup_box .scan_scroll{ + max-height: 44vh !important; + + } +} diff --git a/fe/PDA/common/airport.js b/fe/PDA/common/airport.js new file mode 100644 index 000000000..445b6aa44 --- /dev/null +++ b/fe/PDA/common/airport.js @@ -0,0 +1,262 @@ +export default { + "list": [{ + "letter": "A", + "data": [ + "阿克苏机场", + "阿拉山口机场", + "阿勒泰机场", + "阿里昆莎机场", + "安庆天柱山机场", + "澳门国际机场" + ] + }, { + "letter": "B", + "data": [ + "保山机场", + "包头机场", + "北海福成机场", + "北京南苑机场", + "北京首都国际机场" + ] + }, { + "letter": "C", + "data": [ + "长白山机场", + "长春龙嘉国际机场", + "常德桃花源机场", + "昌都邦达机场", + "长沙黄花国际机场", + "长治王村机场", + "常州奔牛机场", + "成都双流国际机场", + "赤峰机场" + ] + }, { + "letter": "D", + "data": [ + "大理机场", + "大连周水子国际机场", + "大庆萨尔图机场", + "大同东王庄机场", + "达州河市机场", + "丹东浪头机场", + "德宏芒市机场", + "迪庆香格里拉机场", + "东营机场", + "敦煌机场" + ] + }, { + "letter": "E", + "data": [ + "鄂尔多斯机场", + "恩施许家坪机场", + "二连浩特赛乌苏国际机场" + ] + }, { + "letter": "F", + "data": [ + "阜阳西关机场", + "福州长乐国际机场" + ] + }, { + "letter": "G", + "data": [ + "赣州黄金机场", + "格尔木机场", + "固原六盘山机场", + "广元盘龙机场", + "广州白云国际机场", + "桂林两江国际机场", + "贵阳龙洞堡国际机场" + ] + }, { + "letter": "H", + "data": [ + "哈尔滨太平国际机场", + "哈密机场", + "海口美兰国际机场", + "海拉尔东山国际机场", + "邯郸机场", + "汉中机场", + "杭州萧山国际机场", + "合肥骆岗国际机场", + "和田机场", + "黑河机场", + "呼和浩特白塔国际机场", + "淮安涟水机场", + "黄山屯溪国际机场" + ] + }, { + "letter": "I", + "data": [] + }, { + "letter": "J", + "data": [ + "济南遥墙国际机场", + "济宁曲阜机场", + "鸡西兴凯湖机场", + "佳木斯东郊机场", + "嘉峪关机场", + "锦州小岭子机场", + "景德镇机场", + "井冈山机场", + "九江庐山机场", + "九寨黄龙机场" + ] + }, { + "letter": "K", + "data": [ + "喀什机场", + "克拉玛依机场", + "库车龟兹机场", + "库尔勒机场", + "昆明巫家坝国际机场" + ] + }, { + "letter": "L", + "data": [ + "拉萨贡嘎机场", + "兰州中川机场", + "丽江三义机场", + "黎平机场", + "连云港白塔埠机场", + "临沧机场", + "临沂机场", + "林芝米林机场", + "柳州白莲机场", + "龙岩冠豸山机场", + "泸州蓝田机场", + "洛阳北郊机场" + ] + }, { + "letter": "M", + "data": [ + "满洲里西郊机场", + "绵阳南郊机场", + "漠河古莲机场", + "牡丹江海浪机场" + ] + }, { + "letter": "N", + "data": [ + "南昌昌北国际机场", + "南充高坪机场", + "南京禄口国际机场", + "南宁吴圩机场", + "南通兴东机场", + "南阳姜营机场", + "宁波栎社国际机场" + ] + }, { + "letter": "O", + "data": [] + }, { + "letter": "P", + "data": [ + "普洱思茅机场" + ] + }, { + "letter": "Q", + "data": [ + "齐齐哈尔三家子机场", + "秦皇岛山海关机场", + "青岛流亭国际机场", + "衢州机场", + "泉州晋江机场" + ] + }, { + "letter": "R", + "data": [ + "日喀则和平机场" + ] + }, { + "letter": "S", + "data": [ + "三亚凤凰国际机场", + "汕头外砂机场", + "上海虹桥国际机场", + "上海浦东国际机场", + "深圳宝安国际机场", + "沈阳桃仙国际机场", + "石家庄正定国际机场", + "苏南硕放国际机场" + ] + }, { + "letter": "T", + "data": [ + "塔城机场", + "太原武宿国际机场", + "台州路桥机场 (黄岩机场)", + "唐山三女河机场", + "腾冲驼峰机场", + "天津滨海国际机场", + "通辽机场", + "铜仁凤凰机场" + ] + }, { + "letter": "U", + "data": [] + }, { + "letter": "V", + "data": [] + }, { + "letter": "W", + "data": [ + "万州五桥机场", + "潍坊机场", + "威海大水泊机场", + "文山普者黑机场", + "温州永强国际机场", + "乌海机场", + "武汉天河国际机场", + "乌兰浩特机场", + "乌鲁木齐地窝堡国际机场", + "武夷山机场", + "梧州长洲岛机场" + ] + }, { + "letter": "X", + "data": [ + "西安咸阳国际机场", + "西昌青山机场", + "锡林浩特机场", + "西宁曹家堡机场", + "西双版纳嘎洒机场", + "厦门高崎国际机场", + "香港国际机场", + "襄阳刘集机场", + "兴义机场", + "徐州观音机场" + ] + }, { + "letter": "Y", + "data": [ + "延安二十里堡机场", + "盐城机场", + "延吉朝阳川机场", + "烟台莱山国际机场", + "宜宾菜坝机场", + "宜昌三峡机场", + "伊春林都机场", + "伊宁机场", + "义乌机场", + "银川河东机场", + "永州零陵机场", + "榆林榆阳机场", + "玉树巴塘机场", + "运城张孝机场" + ] + }, { + "letter": "Z", + "data": [ + "湛江机场", + "昭通机场", + "郑州新郑国际机场", + "芷江机场", + "重庆江北国际机场", + "中卫香山机场", + "舟山朱家尖机场", + "珠海三灶机场" + ] + }] +} diff --git a/fe/PDA/common/array.js b/fe/PDA/common/array.js new file mode 100644 index 000000000..5d7be0191 --- /dev/null +++ b/fe/PDA/common/array.js @@ -0,0 +1,134 @@ +//出库原因 +export function getIssueReasonArray() { + let array = [{ + text: '原因1', + value: '1' + }, { + text: '原因2', + value: '2' + }, { + text: '原因3', + value: '3' + }]; + return array; +} + + +//入库原因 +export function getReceiptReasonArray() { + let array = [{ + text: '原因1', + value: '1' + }, { + text: '原因2', + value: '2' + }, { + text: '原因3', + value: '3' + }]; + return array; +} + + +// 检验任务,不合格原因 +export function getFailedReasonArray() { + let array = [{ + text: '外观不良', + value: '外观不良' + }, { + text: '尺寸超差', + value: '尺寸超差' + }, { + text: '功能失效', + value: '功能失效' + }, { + text: '标签不符', + value: '标签不符' + }, { + text: '检验报告异常', + value: '检验报告异常' + }, { + text: '其他', + value: '其他' + }] + return array; +} + +// 检验任务,下一步动作 +export function getNextStepArray() { + let array = [{ + text: '整批不合格', + value: 1 + }, { + text: '挑选', + value: 2 + }, { + text: '部分合格', + value: 3 + }] + return array; +} + +// 库存状态字典项 +export function getInventoryStatusArray() { + let array = [{ + text: '待检', + value: 1 + }, { + text: '合格', + value: 2 + }, { + text: '不合格', + value: 3 + }, { + text: '隔离', + value: 4 + }, { + text: '报废', + value: 5 + }, { + text: '冻结', + value: 6 + }] + return array; +} + +//隔离库存处理操作 +export function getHoldStatusArray() { + let array = [{ + text: '隔离转合格', + value: 1 + }, { + text: '隔离出库', + value: 2 + }, { + text: '合格转隔离', + value: 3 + }] + return array; +} + + +// 检验任务,不合格原因 +export function getReturnReasonArray() { + let array = [{ + text: '外观不良', + value: '外观不良' + }, { + text: '尺寸超差', + value: '尺寸超差' + }, { + text: '功能失效', + value: '功能失效' + }, { + text: '标签不符', + value: '标签不符' + }, { + text: '检验报告异常', + value: '检验报告异常' + }, { + text: '其他', + value: '其他' + }] + return array; +} diff --git a/fe/PDA/common/basic.js b/fe/PDA/common/basic.js new file mode 100644 index 000000000..4399807d9 --- /dev/null +++ b/fe/PDA/common/basic.js @@ -0,0 +1,328 @@ +let maxPageSize = 1000; +export { maxPageSize } + +//任务状态 +export function getJobStatuStyle(val) { + if (val == 0) return 'unk' + else if (val == 1) return 'open' + else if (val == 2) return 'pending' + else if (val == 3) return 'completed' + else if (val == 4) return 'close' +} +//任务状态 +//open pending completed close +export function getJobStatuDesc(val) { + if (val == 0) return '未知' + else if (val == 1) return '待处理' + else if (val == 2) return '进行中' + else if (val == 3) return '完成' + else if (val == 4) return '关闭' + else return '其他' +} + +//检验任务状态 +export function getInspectTypeStyle(val) { + if (val == 0) return 'unk' + else if (val == 1) return 'exempt' + else if (val == 2) return 'full' + else if (val == 3) return 'sampling' + else if (val == 4) return 'pick' + else return 'other' +} +//open pending completed close +export function getInspectTypeDesc(val) { + if (val == 0) return '未知' + else if (val == 1) return '免检' + else if (val == 2) return '全检' + else if (val == 3) return '抽检' + else if (val == 4) return '挑选' + else return '其他' +} + +//库存状态 +export function getInventoryTypeStyle(val) { + if (val == 0) return 'unk' + else if (val == 1) return 'insp' + else if (val == 2) return 'ok' + else if (val == 3) return 'nok' + else if (val == 4) return 'hold' + else if (val == 5) return 'scarp' + else if (val == 6) return 'frozen' + else if (val == 31) return 'nok' + else return 'other' +} + + +//库存状态 +export function getInventoryStatusDesc(val) { + if (val == 0) return '未知' + else if (val == 1) return '待检' + else if (val == 2) return '合格' + else if (val == 3) return '不合格' + else if (val == 4) return '隔离' + else if (val == 5) return '报废' + else if (val == 6) return '冻结' + else if (val == 31) return '不合格' + // else if (val == 31) return '目检不合格' + else return '其他' +} + +//零件状态 +export function getItemTypeStyle(val) { + if (val == 0) return 'unk' + else if (val == 1) return 'active' + else if (val == 2) return 'hold' + else if (val == 3) return 'new' + else if (val == 4) return 'plan' + else if (val == 5) return 'disable' + else return 'other' +} + + +//零件状态 +export function getItemStatusDesc(val) { + if (val == 0) return '未知' + else if (val == 1) return '可用' + else if (val == 2) return '隔离' + else if (val == 3) return '新增' + else if (val == 4) return '规划' + else if (val == 5) return '禁用' + else return '其他' +} + +//盘点状态 +export function getCountStageTypeStyle(val) { + if (val == 0) return 'unk' + else if (val == 1) return 'initial' + else if (val == 2) return 'afresh' + else if (val == 3) return 'supervision' + else return 'other' +} + + +//盘点状态 +export function getCountStageDesc(val) { + if (val == 0) return '未知' + else if (val == 1) return '初盘' + else if (val == 2) return '重盘' + else if (val == 3) return '监盘' + else return '其他' +} + +//盘点计划类型 +export function getCheckTypeDesc(val) { + if (val == 0) return '未知' + else if (val == 1) return '周期盘点' + else if (val == 2) return '物理盘点' + else return '其他' +} + +//盘点方式 +export function getCountMethodDesc(val) { + if (val == 0) return '未知' + else if (val == 1) return '库位盘点' + else if (val == 2) return '物品盘点' + else if (val == 3) return '库位零件盘点' + else return '其他' +} + +//获取库位类型 +export function getLocationType(val) { + if (val == 0) return 'unk' + else if (val == 1) return 'inspect' + else if (val == 2) return 'raw' + else if (val == 3) return 'semi' + else if (val == 4) return 'fg' + else if (val == 5) return 'wip' + else if (val == 6) return 'hold' + else if (val == 7) return 'scrap' + else if (val == 8) return 'noc' + else if (val == 9) return 'overflow' + else if (val == 10) return 'customer' + else return 'other' +} + +//获取库位类型描述 +export function getLocationTypeDesc(val) { + if (val == 0) return '未知' + else if (val == 1) return '待检库' + else if (val == 2) return '原料库' + else if (val == 3) return '半成品库' + else if (val == 4) return '成品库' + else if (val == 5) return '线边库' + else if (val == 6) return '隔离库' + else if (val == 7) return '报废库' + else if (val == 8) return '不合格品库' + else if (val == 9) return '溢出库' + else if (val == 10) return '客户库' + else return '其他' +} + +//获取库位类型描述 +export function getJobType(val) { + if (val == 0) return 'uno' + else if (val == 1) return 'PurchaseReceiptJob' //采购收货 + else if (val == 2) return 'PurchaseReturnJob' //采购退货任务 + else if (val == 3) return 'InspectJob' //检验任务 + else if (val == 4) return 'PutawayJob' //上架任务 + else if (val == 5) return 'ProductReceiveJob' //完工收货任务 + else if (val == 6) return 'IssueJob' //发料任务 + else if (val == 7) return 'DeliverJob' //发货任务 + else if (val == 8) return 'CheckJob' //校验任务 + else if (val == 9) return 'CountJob' //盘点任务 + else return 'Other' +} + +//提示是否消息 +export function showConfirmMsg(content, callback) { + uni.showModal({ + title: '提示', + cancelText: '否', + confirmText: '是', + content: content, + success: function(res) { + if (res.confirm) { + callback(true); + } else { + callback(false); + } + }, + }) + scanErrorAudio(); +} + +export function compare(key) { + return function(a, b) { + var val1 = a[key]; + var val2 = b[key]; + return val2 - val1; + } +} + +export function compareDesc(key) { + return function(a, b) { + var val1 = a[key]; + var val2 = b[key]; + return val1 - val2; + } +} + +export function goHome() { + uni.reLaunch({ + url: '../index/index' + }) +} + +export function getCurrDate() { + var date = new Date(); + return getDate(date); +} + +export function getCurrDateTime() { + var date = new Date(); + return getDate(date) + " " + getTime(date); +} + +export function getISODateTime() { + var date = new Date(); + return getDate(date) + "T" + getTime(date) + "Z"; +} + +//格式化处理 +export function dateFormat(time) { + let date = new Date(time); + return getDate(date) + " " + getTime(date); +} + +//获取日期部分 +export function getDate(date) { + var year = date.getFullYear(); //年 + var month = date.getMonth() + 1; //月 + var day = date.getDate(); //日 + + month = month < 10 ? "0" + month : month; + day = day < 10 ? "0" + day : day; + return year + "-" + month + "-" + day; +} + +//获取时间部分 +export function getTime(date) { + let hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours(); + let minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes(); + let seconds = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds(); + // 拼接 + return hours + ":" + minutes + ":" + seconds; +} + +//将20220713转成2022-07-13 +export function toYYYY_MM_DD(value) { + return value.substring(0, 4) + "-" + value.substring(4, 6) + "-" + value.substring(6, 8) +} + +export function getRootFontSize() { + const self = this; + var fontSize = getApp().globalData.rootFontSize; + if (fontSize) { + return fontSize; + } else { + fontSize = uni.getStorageSync('root_font_size'); + if (fontSize) { + getApp().globalData.rootFontSize = fontSize; + } else { + fontSize = '20px'; //默认字体大小 + self.setRootFontSize(fontSize); + } + return fontSize; + + } +} + +export function getRemoveOption() { + let options = [{ + text: '移除', + style: { + backgroundColor: '#F56C6C' + } + }] + return options; +} + +export function setRootFontSize(fontSize) { + uni.setStorageSync('root_font_size', fontSize); + getApp().globalData.rootFontSize = fontSize; +} + + +export function scanErrorAudio() { + var music = null; + music = uni.createInnerAudioContext(); //创建播放器对象 + music.src ="../../static/video/error.wav"; + music.volume=1; + music.play(); //执行播放 + music.onEnded(() => { + //播放结束 + music = null; + }); +} + + +export function newMessageAudio() { + var music = null; + music = uni.createInnerAudioContext(); //创建播放器对象 + music.src ="../../static/video/error.wav"; + music.volume=1; + music.play(); //执行播放 + music.onEnded(() => { + //播放结束 + music = null; + }); +} + + +export function vibrate() { + uni.vibrateLong({ + success:function(){ + + } + }) +} \ No newline at end of file diff --git a/fe/PDA/common/common.js b/fe/PDA/common/common.js new file mode 100644 index 000000000..dc2377ed9 --- /dev/null +++ b/fe/PDA/common/common.js @@ -0,0 +1,33 @@ +export default { + created() { + const self = this; + + }, + mounted() { + const self = this; + }, + methods: { + //设置字体 + getRootFontSize(){ + const self = this; + var fontSize = getApp().globalData.rootFontSize; + if(fontSize){ + return fontSize; + }else{ + fontSize = uni.getStorageSync('root_font_size'); + if(fontSize){ + getApp().globalData.rootFontSize=fontSize; + }else{ + fontSize='20px';//默认字体大小 + self.setRootFontSize(fontSize); + } + return fontSize; + } + }, + setRootFontSize(fontSize){ + uni.setStorageSync('root_font_size',fontSize); + getApp().globalData.rootFontSize=fontSize; + }, + + } +} \ No newline at end of file diff --git a/fe/PDA/common/config.js b/fe/PDA/common/config.js new file mode 100644 index 000000000..262a770c2 --- /dev/null +++ b/fe/PDA/common/config.js @@ -0,0 +1,26 @@ +let url_config = "" + +let jsApiList = [ + 'biz.cspace.saveFile', //钉盘保存文件 + 'biz.map.search', //位置搜索 + 'device.geolocation.get', //定位 + 'biz.ding.create', //创建ding消息 + 'device.base.getUUID', //uuid + 'biz.contact.choose', //联系人 + 'biz.contact.complexPicker', //选人和部门 + 'biz.contact.departmentsPicker', //选部门 + 'biz.chat.chooseConversationByCorpId', //会话选择 + "biz.contact.chooseMobileContacts", //手机联系人 +]; + +let option = { + corpId: '', //企业ID + agentId: '', //微应用ID + serverPath: url_config, //接口基础地址 + jsApiList: jsApiList, //鉴权列表 + isDebug: false //判断是否alert +}; +export default { + url_config, + option +} diff --git a/fe/PDA/common/graceChecker.js b/fe/PDA/common/graceChecker.js new file mode 100644 index 000000000..b3db2d75d --- /dev/null +++ b/fe/PDA/common/graceChecker.js @@ -0,0 +1,97 @@ +/** +数据验证(表单验证) +来自 grace.hcoder.net +作者 hcoder 深海 +*/ +export default { + error:'', + check : function (data, rule){ + for(var i = 0; i < rule.length; i++){ + if (!rule[i].checkType){return true;} + if (!rule[i].name) {return true;} + if (!rule[i].errorMsg) {return true;} + if (!data[rule[i].name]) {this.error = rule[i].errorMsg; return false;} + switch (rule[i].checkType){ + case 'string': + var reg = new RegExp('^.{' + rule[i].checkRule + '}$'); + if(!reg.test(data[rule[i].name])) {this.error = rule[i].errorMsg; return false;} + break; + case 'int': + var reg = new RegExp('^(-[1-9]|[1-9])[0-9]{' + rule[i].checkRule + '}$'); + if(!reg.test(data[rule[i].name])) {this.error = rule[i].errorMsg; return false;} + break; + break; + case 'between': + if (!this.isNumber(data[rule[i].name])){ + this.error = rule[i].errorMsg; + return false; + } + var minMax = rule[i].checkRule.split(','); + minMax[0] = Number(minMax[0]); + minMax[1] = Number(minMax[1]); + if (data[rule[i].name] > minMax[1] || data[rule[i].name] < minMax[0]) { + this.error = rule[i].errorMsg; + return false; + } + break; + case 'betweenD': + var reg = /^-?[1-9][0-9]?$/; + if (!reg.test(data[rule[i].name])) { this.error = rule[i].errorMsg; return false; } + var minMax = rule[i].checkRule.split(','); + minMax[0] = Number(minMax[0]); + minMax[1] = Number(minMax[1]); + if (data[rule[i].name] > minMax[1] || data[rule[i].name] < minMax[0]) { + this.error = rule[i].errorMsg; + return false; + } + break; + case 'betweenF': + var reg = /^-?[0-9][0-9]?.+[0-9]+$/; + if (!reg.test(data[rule[i].name])){this.error = rule[i].errorMsg; return false;} + var minMax = rule[i].checkRule.split(','); + minMax[0] = Number(minMax[0]); + minMax[1] = Number(minMax[1]); + if (data[rule[i].name] > minMax[1] || data[rule[i].name] < minMax[0]) { + this.error = rule[i].errorMsg; + return false; + } + break; + case 'same': + if (data[rule[i].name] != rule[i].checkRule) { this.error = rule[i].errorMsg; return false;} + break; + case 'notsame': + if (data[rule[i].name] == rule[i].checkRule) { this.error = rule[i].errorMsg; return false; } + break; + case 'email': + var reg = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; + if (!reg.test(data[rule[i].name])) { this.error = rule[i].errorMsg; return false; } + break; + case 'phoneno': + var reg = /^1[0-9]{10,10}$/; + if (!reg.test(data[rule[i].name])) { this.error = rule[i].errorMsg; return false; } + break; + case 'zipcode': + var reg = /^[0-9]{6}$/; + if (!reg.test(data[rule[i].name])) { this.error = rule[i].errorMsg; return false; } + break; + case 'reg': + var reg = new RegExp(rule[i].checkRule); + if (!reg.test(data[rule[i].name])) { this.error = rule[i].errorMsg; return false; } + break; + case 'in': + if(rule[i].checkRule.indexOf(data[rule[i].name]) == -1){ + this.error = rule[i].errorMsg; return false; + } + break; + case 'notnull': + if(data[rule[i].name] == null || data[rule[i].name].length < 1){this.error = rule[i].errorMsg; return false;} + break; + } + } + return true; + }, + isNumber : function (checkVal){ + var reg = /^-?[1-9][0-9]?.?[0-9]*$/; + return reg.test(checkVal); + } +} \ No newline at end of file diff --git a/fe/PDA/common/html-parser.js b/fe/PDA/common/html-parser.js new file mode 100644 index 000000000..20a89b283 --- /dev/null +++ b/fe/PDA/common/html-parser.js @@ -0,0 +1,352 @@ +/* + * HTML5 Parser By Sam Blowes + * + * Designed for HTML5 documents + * + * Original code by John Resig (ejohn.org) + * http://ejohn.org/blog/pure-javascript-html-parser/ + * Original code by Erik Arvidsson, Mozilla Public License + * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js + * + * ---------------------------------------------------------------------------- + * License + * ---------------------------------------------------------------------------- + * + * This code is triple licensed using Apache Software License 2.0, + * Mozilla Public License or GNU Public License + * + * //////////////////////////////////////////////////////////////////////////// + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * //////////////////////////////////////////////////////////////////////////// + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Simple HTML Parser. + * + * The Initial Developer of the Original Code is Erik Arvidsson. + * Portions created by Erik Arvidssson are Copyright (C) 2004. All Rights + * Reserved. + * + * //////////////////////////////////////////////////////////////////////////// + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * ---------------------------------------------------------------------------- + * Usage + * ---------------------------------------------------------------------------- + * + * // Use like so: + * HTMLParser(htmlString, { + * start: function(tag, attrs, unary) {}, + * end: function(tag) {}, + * chars: function(text) {}, + * comment: function(text) {} + * }); + * + * // or to get an XML string: + * HTMLtoXML(htmlString); + * + * // or to get an XML DOM Document + * HTMLtoDOM(htmlString); + * + * // or to inject into an existing document/DOM node + * HTMLtoDOM(htmlString, document); + * HTMLtoDOM(htmlString, document.body); + * + */ +// Regular Expressions for parsing tags and attributes +var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/; +var endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/; +var attr = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g; // Empty Elements - HTML 5 + +var empty = makeMap('area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr'); // Block Elements - HTML 5 +// fixed by xxx 将 ins 标签从块级名单中移除 + +var block = makeMap('a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video'); // Inline Elements - HTML 5 + +var inline = makeMap('abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var'); // Elements that you can, intentionally, leave open +// (and which close themselves) + +var closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); // Attributes that have their values filled in disabled="disabled" + +var fillAttrs = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected'); // Special Elements (can contain anything) + +var special = makeMap('script,style'); +function HTMLParser(html, handler) { + var index; + var chars; + var match; + var stack = []; + var last = html; + + stack.last = function () { + return this[this.length - 1]; + }; + + while (html) { + chars = true; // Make sure we're not in a script or style element + + if (!stack.last() || !special[stack.last()]) { + // Comment + if (html.indexOf(''); + + if (index >= 0) { + if (handler.comment) { + handler.comment(html.substring(4, index)); + } + + html = html.substring(index + 3); + chars = false; + } // end tag + + } else if (html.indexOf(']*>'), function (all, text) { + text = text.replace(/|/g, '$1$2'); + + if (handler.chars) { + handler.chars(text); + } + + return ''; + }); + parseEndTag('', stack.last()); + } + + if (html == last) { + throw 'Parse Error: ' + html; + } + + last = html; + } // Clean up any remaining tags + + + parseEndTag(); + + function parseStartTag(tag, tagName, rest, unary) { + tagName = tagName.toLowerCase(); + + if (block[tagName]) { + while (stack.last() && inline[stack.last()]) { + parseEndTag('', stack.last()); + } + } + + if (closeSelf[tagName] && stack.last() == tagName) { + parseEndTag('', tagName); + } + + unary = empty[tagName] || !!unary; + + if (!unary) { + stack.push(tagName); + } + + if (handler.start) { + var attrs = []; + rest.replace(attr, function (match, name) { + var value = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : fillAttrs[name] ? name : ''; + attrs.push({ + name: name, + value: value, + escaped: value.replace(/(^|[^\\])"/g, '$1\\\"') // " + + }); + }); + + if (handler.start) { + handler.start(tagName, attrs, unary); + } + } + } + + function parseEndTag(tag, tagName) { + // If no tag name is provided, clean shop + if (!tagName) { + var pos = 0; + } // Find the closest opened tag of the same type + else { + for (var pos = stack.length - 1; pos >= 0; pos--) { + if (stack[pos] == tagName) { + break; + } + } + } + + if (pos >= 0) { + // Close all the open elements, up the stack + for (var i = stack.length - 1; i >= pos; i--) { + if (handler.end) { + handler.end(stack[i]); + } + } // Remove the open elements from the stack + + + stack.length = pos; + } + } +} + +function makeMap(str) { + var obj = {}; + var items = str.split(','); + + for (var i = 0; i < items.length; i++) { + obj[items[i]] = true; + } + + return obj; +} + +function removeDOCTYPE(html) { + return html.replace(/<\?xml.*\?>\n/, '').replace(/\n/, '').replace(/\n/, ''); +} + +function parseAttrs(attrs) { + return attrs.reduce(function (pre, attr) { + var value = attr.value; + var name = attr.name; + + if (pre[name]) { + pre[name] = pre[name] + " " + value; + } else { + pre[name] = value; + } + + return pre; + }, {}); +} + +function parseHtml(html) { + html = removeDOCTYPE(html); + var stacks = []; + var results = { + node: 'root', + children: [] + }; + HTMLParser(html, { + start: function start(tag, attrs, unary) { + var node = { + name: tag + }; + + if (attrs.length !== 0) { + node.attrs = parseAttrs(attrs); + } + + if (unary) { + var parent = stacks[0] || results; + + if (!parent.children) { + parent.children = []; + } + + parent.children.push(node); + } else { + stacks.unshift(node); + } + }, + end: function end(tag) { + var node = stacks.shift(); + if (node.name !== tag) console.error('invalid state: mismatch end tag'); + + if (stacks.length === 0) { + results.children.push(node); + } else { + var parent = stacks[0]; + + if (!parent.children) { + parent.children = []; + } + + parent.children.push(node); + } + }, + chars: function chars(text) { + var node = { + type: 'text', + text: text + }; + + if (stacks.length === 0) { + results.children.push(node); + } else { + var parent = stacks[0]; + + if (!parent.children) { + parent.children = []; + } + + parent.children.push(node); + } + }, + comment: function comment(text) { + var node = { + node: 'comment', + text: text + }; + var parent = stacks[0]; + + if (!parent.children) { + parent.children = []; + } + + parent.children.push(node); + } + }); + return results.children; +} + +export default parseHtml; diff --git a/fe/PDA/common/message.js b/fe/PDA/common/message.js new file mode 100644 index 000000000..0dd5280d6 --- /dev/null +++ b/fe/PDA/common/message.js @@ -0,0 +1,112 @@ +import * as dd from 'dingtalk-jsapi'; +import store from '@/store/index' + +let showAlert=true + +let message = { + error: function (msg) { //进入项目初始化配置 + uni.showToast({ + title: msg, + icon: "none" + }); + }, + alert:function (message) { + return new Promise((resolve, reject) => { + if (showAlert){ + dd.device.notification.alert({ + message: message, + title: "提示", + buttonName: "收到", + onSuccess : function(res) { + // 调用成功时回调 + console.log(res) + }, + onFail : function(err) { + // 调用失败时回调 + console.log(err) + } + }); + } + }) + } +} +let selectD = { + selectPeo: function (option) { + return new Promise((resolve, reject) => { + dd.biz.contact.complexPicker({ + title: option.title ? option.title : "选择人员", //标题 + corpId: store.state.corpId, //企业的corpId + multiple: option.multiple ? option.multiple : true, //是否多选 + limitTips: option.limitTips ? option.limitTips : "超出了", //超过限定人数返回提示 + maxUsers: option.maxUsers ? option.maxUsers : 100, //最大可选人数 + pickedUsers: option.pickedUsers ? option.pickedUsers : [], //已选用户 + pickedDepartments: option.pickedDepartments ? option.pickedDepartments :[], //已选部门 + disabledUsers: option.disabledUsers ? option.disabledUsers :[], //不可选用户 + disabledDepartments: option.disabledDepartments ? option.disabledDepartments :[], //不可选部门 + requiredUsers: option.requiredUsers ? option.requiredUsers :[], //必选用户(不可取消选中状态) + requiredDepartments: option.requiredDepartments ? option.requiredDepartments :[], //必选部门(不可取消选中状态) + appId: store.state.agentId, //微应用Id,企业内部应用查看AgentId + permissionType: "GLOBAL", //可添加权限校验,选人权限,目前只有GLOBAL这个参数 + responseUserOnly: true, //返回人,或者返回人和部门 + startWithDepartmentId: 0, //仅支持0和-1 + onSuccess: function (result) { + // alert(JSON.stringify(result)) + resolve(result); +/** + { + selectedCount:1, //选择人数 + users:[{"name":"","avatar":"","emplId ":""}],//返回选人的列表,列表中的对象包含name(用户名),avatar(用户头像),emplId(用户工号)三个字段 + departments:[{"id":,"name":"","number":}]//返回已选部门列表,列表中每个对象包含id(部门id)、name(部门名称)、number(部门人数) +} + */ + }, + onFail: function (err) { + alert("唤起联系人失败"); + reject(err) + } + }); + }) + }, + selectDept: function (option) { + return new Promise((resolve, reject) => { + dd.biz.contact.departmentsPicker({ + title: option.title ? option.title : "选择部门", //标题 + corpId: store.state.corpId, //企业的corpId + multiple: option.multiple ? option.multiple : true, //是否多选 + limitTips: option.limitTips ? option.limitTips : "超出了", //超过限定人数返回提示 + maxDepartments: option.maxDepartments ? option.maxDepartments : 100, //最大可选部门 + pickedDepartments: option.pickedDepartments ? option.pickedDepartments :[], //已选部门 + disabledDepartments: option.disabledDepartments ? option.disabledDepartments :[], //不可选部门 + requiredDepartments: option.requiredDepartments ? option.requiredDepartments :[], //必选部门(不可取消选中状态) + appId: store.state.agentId, //微应用Id,企业内部应用查看AgentId + permissionType: "GLOBAL", //可添加权限校验,选人权限,目前只有GLOBAL这个参数 + onSuccess: function (result) { + + resolve(result); + /** + { + "userCount":10, //选择人数。 + "departments":[ + { + "number":10, + "name":"班车2", + "id":405921063 + } + ], //返回已选部门列表,列表中每个对象包含id (部门id)、name (部门名称)、number (部门人数)。 + "departmentsCount":1 //选择的部门数。 + } + */ + }, + onFail: function (err) { + alert("唤起部门失败"); + reject(err) + } + }); + }) + }, +} + +export default { + message, + selectD +} diff --git a/fe/PDA/common/modelConfig.js b/fe/PDA/common/modelConfig.js new file mode 100644 index 000000000..b0826b49d --- /dev/null +++ b/fe/PDA/common/modelConfig.js @@ -0,0 +1,5 @@ +let maxPageSize = 10; + +export default{ + maxPageSize +} \ No newline at end of file diff --git a/fe/PDA/common/new_style.css b/fe/PDA/common/new_style.css new file mode 100644 index 000000000..b08076e1b --- /dev/null +++ b/fe/PDA/common/new_style.css @@ -0,0 +1,1863 @@ +/*WMY 20220818 cssv1.0*/ +/*公共*/ +uni-page-head .uni-page-head { + z-index: 98 !important; + background-color: #fff !important; +} + +uni-page-head .uni-page-head__title { + font-weight: normal; +} + +.whole { + width: 100%; +} + +.fl { + float: left; +} + +.fr { + float: right; +} + +.tc { + text-align: center; +} + +.text_bold { + font-weight: bold; +} + +.text_black { + color: #101010; +} + +.text_packingCode { + color: #101010; + word-break:break-all; +} + +.text_lightblue { + color: #6A6E7A; +} + +.text_darkblue { + color: #434556; +} + +.text_blue { + color: #5A7CF3; +} + +.font_xs { + font-size: 0.775rem; +} + +.font_sm { + font-size: 0.825rem; +} + +.font_xl { + font-size: 1.125rem; +} + +.margin_top { + margin-top: 20rpx; +} + +.margin_bottom { + margin-bottom: 20rpx; +} + +.margin_xs_top { + margin-top: 10rpx; +} + +.margin_xs_bottom { + margin-bottom: 10rpx; +} + +.margin_right { + margin-right: 20rpx; +} + +.margin { + margin: 20rpx; +} + +.padding { + padding: 20rpx; +} + +.padding_bottom { + padding-bottom: 20rpx; +} + +.nopad { + padding: 0 !important; +} + +.nopad_bot { + padding-bottom: 0 !important; +} + +/* +零件状态 +未知,可用,隔离,新增,规划,禁用 +*/ +.active { + background-color: #5FCB94; + color: #FFFFFF; +} + +.hold { + background-color: #FF4206; + color: #FFFFFF; +} + +.new { + background-color: #E6A23C; + color: #FFFFFF; +} + +.plan { + background-color: #2677F9; + color: #FFFFFF; +} + +.disable { + background-color: #666; + color: #FFFFFF; +} + +.scan_float { + position: fixed; + z-index: 10; + right: 20rpx; + bottom: 20%; + width: 110rpx; + height: 110rpx; + background-color: #5A7CF3; + border-radius: 50%; + text-align: center; + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); +} + +.scan_float image { + width: 40rpx; + height: 40rpx; + margin-top: 10rpx; +} + +.scan_float view { + color: #fff; + font-size: .725rem; + margin-top: -8rpx; +} + +.top_card { + background-color: #5A7CF3; + overflow: hidden; + /* padding: 20rpx 0; */ +} + +.top_card .device-detail { + /* margin-top: 0 !important; */ +} + +.top_card .mini-type-style { + color: #fff !important; + font-weight: normal; + height: 46rpx; +} + +.cen_card { + padding: 0 20rpx; + width: 100%; + box-sizing: border-box; + float: left; +} + +.cell_box { + width: 100%; +} + +.cell_box .cell_info { + position: relative; + /* width: 25%; */ + padding: 0 20rpx; + margin: 0 0 20rpx; + text-align: center; +} + +.cell_box .cell_long { + /* width: 33%; */ +} + +.cell_box .cell_info view { + font-size: 0.825rem; + margin-bottom: 10rpx; + color: #7B8195; +} + +.cell_box .cell_info .text_black { + font-size: .875rem; + color: #101010; +} + +.cell_box .cell_info .text_lightblue { + color: #949CB6; + font-size: 0.8rem; +} + +.cell_box .cell_info::after { + position: absolute; + content: ""; + right: 0; + top: 50%; + transform: translateY(-50%); + width: 1px; + height: 20px; + background-color: #ddd; +} + +.cell_box .cell_info:last-child::after { + width: 0; +} + +.cen_card .label_box { + margin-bottom: 20rpx; +} + +.cen_card .label_box .label_info { + background-color: #eee; + color: #434556; + font-size: 0.875rem; + padding: 8rpx; + border-radius: 8rpx; + margin-right: 10rpx; + vertical-align: middle; +} + +.cen_card .label_box .label_info image { + /* float: left; */ + vertical-align: middle; +} + +.cen_card .label_box .label_info text { + /* line-height: 1.25; */ + /* float: left; */ + vertical-align: middle; +} + +.photo_btn { + background-color: #ececec; + color: #5A7CF3; + font-size: 0.875rem; + padding: 8rpx 10rpx; + border-radius: 8rpx; +} + +.photo_btn text { + line-height: 1.5; +} + +.cen_card .cell_box .text_black { + font-size: 0.875rem; +} + +.cen_card .cell_box .cell_info .text_lightblue { + font-size: 0.725rem; +} + +.bot_card { + background-color: #f8f8f8; + padding: 16rpx; + overflow: hidden; +} + +.bot_card_item { + width: 50%; + text-align: left; + height: 60rpx; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +/* .item_long{ + width: 32% !important; +} +*/ +.item_short { + width: 20%; +} + +.bot_card_item uni-text { + font-size: .725rem; + margin-left: 4rpx; + color: #333333; + background-color: transparent; +} + +.bot_card_item .icon_state { + float: left; + margin-top: 22rpx; +} + +.summary_wrap { + padding: 20rpx; + padding-top: 0; +} + +.summary_state .state_point { + font-size: 0.825rem; +} + +.summary_item uni-text { + font-size: 0.825rem; +} + +.bot_card_item uni-text.state_point { + background-color: transparent; +} + +.bot_card_item label { + vertical-align: middle; +} + +.icon_normal { + width: 58rpx; + height: 58rpx; + vertical-align: middle +} + +.bot_card_item .icon_normal { + float: left; + width: 46rpx; + height: 46rpx; +} + +.icon_bg { + display: inline-block; + width: 46rpx; + height: 46rpx; + border-radius: 4rpx; +} + +.icon_bg_xm { + background-color: #45B5F3; +} + +.icon_bg_kw { + background-color: #5A7CF3; +} + +.icon_bg_pc { + background-color: #BF94EB; +} + +.icon_state { + display: inline-block; + width: 20rpx; + height: 20rpx; + border-radius: 50%; +} + +.state_point { + background: none; +} + +.title_tab { + display: flex; + justify-content: center; + height: 100rpx; +} + +.bottom { + padding: 0 !important; +} + +.uni-popup .uni-scroll-view { + overflow: visible !important; +} + +.uni-popup .uni-scroll-view-content { + overflow-y: scroll; + max-height: 94vh; + background-color: #fff; + border-top-left-radius: 20rpx; + border-top-right-radius: 20rpx; +} + +.uni-popup .scroll-Y { + padding-bottom: 0; +} + +.popup_box { + position: relative; + border-top-left-radius: 16rpx; + border-top-right-radius: 16rpx; + background: #fff url(@/static/icons_ui/popup_bot_bg.png) no-repeat left top; + background-size: 100%; + max-height: 93vh; +} + +.popup_box .pop_title { + font-size: 1rem; + font-weight: bold; + color: #fff; + padding: 30rpx 20rpx; +} + +.popup_box .pop_title text { + font-size: .825rem; + font-weight: normal; + margin-top: 10rpx; +} + +.popup_box .uni-steps { + width: 98%; +} + +.popup_box .top_bg { + width: 100%; + height: inherit; +} + +.popup_box .pop_tab { + padding: 20rpx; + box-sizing: border-box; + width: 100%; +} + +.popup_box .pop_tab .tab_tit { + font-size: .825rem; + text-align: center; + color: #333; + background-color: #fff; + /* width: 30%; */ + box-sizing: border-box; + padding: 10rpx 16rpx; + border-top-left-radius: 8rpx; + border-top-right-radius: 8rpx; + margin-right: 6rpx; +} + +.popup_box .pop_tab .tab_tit_active { + color: #5A7CF3; + font-weight: bold; + /* font-size: 0.875rem; */ +} + +.popup_box .pop_tab .tab_info { + position: relative; + margin-bottom: 20rpx; + background-color: #fff; + border-top-right-radius: 8rpx; + border-bottom-left-radius: 8rpx; + border-bottom-right-radius: 8rpx; + box-shadow: 0 6rpx 20rpx rgba(90, 124, 143, 0.1); + min-height: 100rpx; +} + +.popup_box .pop_tab .tab_info textarea { + height: 280rpx; +} + +.popup_box .pop_tab .tab_info .uni-textarea-placeholder { + font-size: 0.825rem; +} + +.popup_box .scan_scroll { + max-height: 41vh; + width: 100%; + overflow-x: hidden; + overflow-y: scroll; +} + +.popup_box .scan_scroll .uni-scroll-view-content { + /* width: 104%; */ + overflow-x: hidden; + background-color: transparent; +} + +.popup_box .pop_tab .next_info { + box-shadow: 0 0 20rpx rgba(90, 124, 143, 0.1); +} + +.popup_box .pop_tab .tab_notitle { + border-radius: 8rpx; +} + +.popup_box .pop_tab .tab_info button { + position: absolute; + bottom: 20rpx; + right: 20rpx; + background: #5A7CF3; + color: #fff; + border: 0; + border-radius: 50px; + width: 130rpx; + float: right; + font-size: .725rem; +} + +.popup_box .pop_tab .tab_info textarea { + padding-top: 20rpx; +} + +.list_wrap { + margin: 20rpx; +} + +.ljh_box { + padding: 20rpx; + z-index: 10; + width: 100%; + float: left; + box-sizing: border-box; +} + +.ljh_left { + margin-top: 10rpx; +} + +/* .ljh_right{ + float: right; +} */ +.ljh_right uni-text { + line-height: 1.5; +} + +.ljh_right .tnum .num_edit { + background-color: #FFF9DB; + width: 150rpx; +} + +.ljh_right .tnum { + font-size: 1.25rem; + color: #EC5B28; + font-weight: bold; + margin-right: 4rpx; +} + +.ljh_right .tunit { + font-size: 0.875rem; + color: #F5AB91; +} + +.ljh_box .tit_ljh { + line-height: 1.5; + font-size: 0.875rem; + color: #101010; + font-weight: bold; + word-break: break-all; +} + +.ljh_box .tit_ljh .mini-type-style { + float: left; + margin-top: 10rpx; + padding: 0 8rpx; + font-size: 0.725rem; +} + +.ljh_box .tit_ljh .state-style, +.top_card .state-style { + font-size: .625rem; + padding: 4rpx 6rpx; + margin-right: 8rpx; + vertical-align: middle; + font-weight: normal; + border-radius: 4rpx; + color: #fff; +} + +.ljh_box .tit_ljh .state-style { + /* padding: 6rpx; */ +} + +.ljh_box .tit_ljh text { + float: left; +} + +.ljh_box .desc_ljh { + line-height: 1.5; +} + +.label_normal { + margin-top: 20rpx; +} + +.label_normal .label_col image { + float: left; + vertical-align: middle; +} + +.label_normal .label_col text { + font-size: 0.825rem; + line-height: 1.25; + float: left; + color: #434556; +} + +.lo_cellbox { + margin-top: 20rpx; +} + +.lo_cellbox .cell_info { + margin-bottom: 0; +} + +/*提交按钮*/ +.new_btn_bot { + position: fixed; + bottom: 0; + left: 0; + box-sizing: border-box; + width: 100%; + background-color: #fff; + padding: 20rpx; + z-index: 10; + box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.2); +} + +.bot_pos { + position: initial; +} + +.new_btn_bot .new_save_btn { + background-color: #E7ECFF; + color: #5A7CF3; + font-size: .875rem; +} + +.new_btn_bot .new_clear_btn { + background-color: #FFDADD; + color: #f00; + font-size: .875rem; + margin-right: 20rpx; +} + +.new_btn_bot .new_cancel_btn { + background-color: #eee; + color: #333; + font-size: .875rem; + margin-right: 20rpx; +} + +.new_btn_bot .btn_double { + width: 50%; +} + +.new_btn_bot uni-button:after { + border: 0; +} + +.choose_main { + position: relative; + z-index: 2; +} + +.choose_marked { + position: absolute; + width: 100%; + /* height: 100%; */ + top: 0; + left: 0; + border-top: 6rpx solid #5FCB94; + background-image: linear-gradient(rgba(95, 203, 148, 0.5), rgba(95, 203, 148, 0)); + border-top-left-radius: 16rpx; + border-top-right-radius: 16rpx; +} + +.choose_marked_faild { + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + border-top: 6rpx solid #FF0000; + background-image: linear-gradient(rgba(255, 100, 97, 0.3), rgba(255, 100, 97, 0)); + border-top-left-radius: 16rpx; + border-top-right-radius: 16rpx; +} + +.nodeliver_tag { + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + border-top-left-radius: 16rpx; + border-top-right-radius: 16rpx; + border-top: 6rpx solid #F54D4D; + background-image: linear-gradient(rgba(245, 77, 77, 0.1), rgba(245, 77, 77, 0)); + +} + +.choose_marked image { + float: right; + margin-right: 28%; + margin-top: 20rpx; + width: 120rpx; + height: 120rpx; +} + +.choose_marked_faild image { + float: right; + margin-right: 28%; + margin-top: 20rpx; + width: 120rpx; + height: 120rpx; +} + +.pop_list { + background-color: #fff; + /* padding: 20rpx; */ + padding-top: 0; + margin-top: 20rpx; +} + +.uni-scroll-view-content .creattp_list { + padding: 6rpx 20rpx 0; + box-sizing: border-box; + width: 96%; +} + +.list_info .uni-scroll-view-content { + max-height: 10vh; +} + +.pop_list .detail-content { + margin-bottom: 20rpx; + border-radius: 16rpx; + overflow: hidden; + box-shadow: 0 0 14rpx rgba(0, 0, 0, 0.1); +} + +.pop_btn { + padding: 20rpx; + padding-top: 0; +} + +.pop_btn button { + width: 49%; + height: 90rpx; + line-height: 90rpx; + font-size: 0.875rem; + margin: 0; + color: #333; +} + +.pop_btn button::after { + border: 0; +} + +.pop_btn .cancel { + background-color: #eee; +} + +.pop_btn .save { + background-color: #5A7CF3; + color: #fff; +} + +.popinpop { + margin: 10px 1%; + border-radius: 8px; + background-color: #fff; + color: #666666; + line-height: 1.5; + box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.1); + width: 98%; + +} + +.scan_btn:after { + border: 0; +} + +.popup_box .pop_tab .tab_info .clean_scan_btn { + background-color: #eee; + color: #333; + margin-right: 140rpx; +} + +.popup_box .pop_tab .tab_info .clean_scan_btn::after { + border: 0; +} + +/*检验任务-topline*/ +.card_task { + padding: 20rpx; + padding-bottom: 0; +} + +.task_num { + border-bottom: 1px solid #eee; + padding-bottom: 10rpx; + margin-bottom: 10rpx; + overflow: hidden; +} + +.top_card .task_num { + border: 0; +} + +.task_num image { + vertical-align: middle; + margin-right: 10rpx; +} + +.task_num text { + color: #333; + vertical-align: middle; +} + +.label_order image { + /* vertical-align: text-bottom; */ + vertical-align: middle; +} + +.label_order text { + font-size: .825rem; + vertical-align: middle; +} + +.tit_jxs { + font-size: 1rem !important; + margin-bottom: 10rpx; +} + +.tit_jxs .state-style { + vertical-align: middle; + margin-top: 6rpx; +} + +/* 为按序发货添加 */ +/* .state-style{ + background-color: #ececec; +} */ +.receipt_bot { + justify-content: space-between; + border-top: 1px solid #eee; + padding-top: 10rpx; +} + +/*收货列表*/ +.require_wrap { + background-color: #fff; + padding: 20rpx; +} + +.require_wrap uni-button:after { + border: 0; +} + +.require_wrap .require_cell { + background: #f5f5f5; + font-size: .825rem; + padding: 10rpx 20rpx; + margin-right: 20rpx; + border-radius: 50rpx; + line-height: 1.5; + margin-left: 0; + border: 1px solid #f5f5f5; +} + +.require_wrap .require_active { + border: 1px solid #5A7CF3; + background-color: #EFF6FF; + color: #5A7CF3; +} + +.require_wrap .require_active text { + display: inline-block; + width: 20rpx; + height: 20rpx; + background-color: #5A7CF3; + border-radius: 50%; + float: left; + margin: 12rpx 10rpx 12rpx 0; +} + +.list_inspect .uni-input-input { + color: #f00; +} + +.list_form { + padding: 20rpx; + padding-top: 0; +} + +.list_form .uni-table-tr { + background-color: #f8f8f8; + color: red; +} + +.list_form .uni-table-th { + padding: 10rpx !important; + border-bottom: 1px solid #ececec; + font-weight: normal !important; + font-size: 0.775rem; + color: red; +} + +.list_form .uni-easyinput { + background-color: #FFF9DB; +} + +.list_form .uni-easyinput__content { + min-height: 50rpx !important; + text-align: center; +} + +.count_shadow { + box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.1); +} + +.count_list { + font-size: 0.8rem; + color: #0F5EFF; + padding: 10rpx 0; +} + +.count_list text:first-child { + margin-left: 0; +} + +.count_list text { + margin: 10rpx; +} + +.popuni_list::after { + height: 0 !important; +} + +.uni-list .list_cell { + margin-bottom: 20rpx; + height: 100rpx; + align-items: center; + box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.1); +} + +.uni-list .list_cell:last-child { + margin-bottom: 0; +} + +.uni-list .list_cell .is-input-border { + border: 0; +} + +.uni-list .list_cell .title { + padding-left: 20rpx; + font-size: 0.875rem; +} + +.uni-list .list_cell .info { + padding-right: 20rpx; + color: #333; + font-size: 0.875rem; +} + +.popuni_list .list_cell { + background-color: #fff; + border-radius: 8rpx; + box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.1); +} + +.popuni_list .list_cell .uni-data-tree-input { + padding-left: 0; +} + +.popuni_list .list_cell .input-value-border { + border: 0; + padding: 0; +} + +.popuni_list .list_cell .selected-list { + padding-left: 0; +} + +/* .uni-list .list_cell .necessary_tag{ + padding-right: 0; + color: #f00; +} */ +.uni-list .list_cell .uni-easyinput { + padding-right: 20rpx; + text-align: right; + box-sizing: border-box; + border: 0; +} + +.uni-list .list_cell .uni-input-input { + font-size: 0.875rem; +} + +.list_card { + margin-top: 20rpx; + box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.1); +} + +.list_card:first-child { + margin-top: 10rpx; +} + +.inspect_form .uni-label { + font-size: 0.875rem; +} + +.pda-list-cell-db .is-input-border, +.pda-list-cell-db .input-value-border { + border: 0 !important; +} + +.list_locode { + padding: 20rpx; + padding-top: 0; +} + +.inspect_card { + background-color: #fff; + margin: 20rpx; + border-radius: 16rpx; +} + +.inspect_card .ljh_box text { + line-height: 1.75; +} + +.inspect_list_locode { + border-bottom: 1px solid #eee; + padding-bottom: 20rpx; +} + +.inspect_list_locode image { + vertical-align: middle; +} + +.default_nodata { + position: relative; + left: 50%; + transform: translateX(-50%); + margin-top: 100rpx; + width: 390rpx; + height: 300rpx; +} + +.default_goscan { + width: 100%; +} + +.default_goscan .img_goscan { + position: relative; + width: 500rpx; + height: 500rpx; + left: 50%; + transform: translateX(-50%); +} + +.default_goscan button { + width: 60%; + height: 100rpx; + background-color: #5A7CF3; + color: #fff; + border-radius: 50rpx; + text-align: center; + line-height: 100rpx; +} + +.default_goscan button image { + width: 30rpx; + height: 30rpx; + margin-right: 20rpx; + vertical-align: middle; + margin-top: -8rpx; + +} + +.new_bot_box { + position: fixed; + width: 100%; + left: 0; + bottom: 0; + background-color: transparent; + z-index: 10; +} + +.new_bot_box .uni-collapse { + background-color: transparent !important; +} + +.new_bot_box .uni-collapse-item__title.uni-collapse-item-border { + width: 96%; + margin: 0 2%; + border-top-left-radius: 16rpx; + border-top-right-radius: 16rpx; + overflow: hidden; + text-align: center; +} + +.new_bot_box .uni-collapse-item__title-text { + padding-left: 40rpx; +} + +.new_bot_box .uni-collapse-item__title.uni-collapse-item-border, +.new_bot_box .uni-collapse-item__title-box { + background-color: #7B8195 !important; + color: #fff !important; +} + +.new_bot_box .uni-collapse-item__title-box { + height: 80rpx !important; + line-height: 80rpx !important; +} + +.new_bot_box .content { + background-color: #fff !important; +} + +.new_bot_box .content .uni-easyinput { + box-sizing: border-box; +} + +.new_bot_box .content .uni-data-picker, +.new_bot_box .input-value, +.new_bot_box .uni-input-input, +.new_bot_box .selected-item, +.new_bot_box .placeholder, +.new_bot_box .uni-easyinput__content-input { + font-size: 0.875rem !important; +} + +.new_bot_box .content .tit_bot_box { + padding: 20rpx 20rpx 10rpx; + font-size: 0.875rem; +} + +.new_bot_box .uni-collapse-item__wrap-content.uni-collapse-item--border { + border: 0; +} + +.new_bot_box .border .uni-easyinput { + border: 1px solid #e5e5e5; + border-radius: 10rpx; +} + +.hold_form .uni-table-th-content { + font-weight: normal; + font-size: 0.775rem; +} + +.top_wrap { + padding: 20rpx; + background-color: #fff; +} + +.top_wrap .top_card { + border-radius: 8px; + color: #fff; + line-height: 100rpx; +} + +.top_wrap .top_card .top_lines_info { + padding: 0 20rpx; +} + +.top_wrap .top_card .top_lines_info text { + font-size: 0.9rem; + margin-left: 10rpx; +} + +/* 按序收货 */ +.recept_form { + padding: 20rpx; +} + +.recept_form .form_title { + padding: 20rpx 20rpx 0; +} + +.recept_form .form_title image { + float: left; + margin-top: 10rpx; + margin-right: 10rpx; +} + +.recept_form .form_title text { + font-size: 1rem; + vertical-align: middle; +} + +.recept_form .table--border { + border: 0 !important; +} + +.recept_form th { + background-color: #F3F6FF; + color: #434556 !important; +} + +.recept_form th.table--border, +.recept_form td.table--border { + border: 0; +} + +.recept_form .recept_form_info { + background-color: #fff; + border-radius: 16rpx; + padding-bottom: 16rpx; +} + +.recept_form .uni-table-td { + font-size: 0.8rem; +} + +/* 天津发货详情 */ +.deliver_card { + flex: 1; + line-height: 30px; + margin: 20rpx 20rpx 0; + border-radius: 16rpx; + overflow: hidden; + background-color: transparent; + position: relative; + border-bottom-color: #f5f5f5; + border-bottom-width: 1px; + border-bottom-style: solid; +} + +.deliver_card .card_info { + background-color: #fff; +} + +.deliver_card .deliverState { + background-color: #fff; + padding: 20rpx 10rpx; + background-color: transparent; + border-left: 10rpx solid transparent; +} + +.deliver_card .deliverState .content-text image { + vertical-align: text-bottom; + margin-right: 6rpx; +} + +.deliver_card .deliverState .content-text text { + margin-right: 10rpx; +} + +.deliver_card .deliverState1 { + background-color: #fff; + border-left: 10rpx solid #F6CB61; +} + +.deliver_card .deliverState3 { + background-color: #fff; + border-left: 10rpx solid #5FCB94; +} + +.deliver_card .deliverState4 { + background-color: #fff; + border-left: 10rpx solid #EC5B28; +} + +.deliver_card .card_state { + border: 1px solid transparent; + padding: 0 20rpx; + font-size: 0.8rem; + position: absolute; + right: 20rpx; + top: 50%; + transform: translateY(-50%); + border-radius: 80rpx; +} + +.deliver_card .tjpending { + border-color: #F6CB61; + color: #F6CB61; +} + +.deliver_card .tjsent { + border-color: #5FCB94; + color: #5FCB94; +} + +.deliver_card .tjnosend { + border-color: #EC5B28; + color: #EC5B28; +} + +.login_wrap { + width: 100%; + position: relative; + top: -20rpx; + background-color: #fff; + border-top-left-radius: 16rpx; + border-top-right-radius: 16rpx; +} + +.login_title { + position: absolute; + top: 120rpx; + left: 30rpx; + color: #fff; + font-size: 1.125rem; + font-weight: bold; + letter-spacing: 4rpx; + line-height: 1.5; +} + +.login_title text { + font-size: 1.125rem; + letter-spacing: 0; +} + +/* 登录 */ +.mybox .is-input-border { + border: 0 !important; +} + +/* 消息列表 */ +.msg_body { + background-color: #fff; +} + +.msg_list { + padding-top: 20rpx; +} + +.msg_list .uni-list-chat__header { + width: 60rpx !important; + height: 60rpx !important; + background-color: #3d7eff; + border-color: transparent !important; + border-radius: 6rpx !important; +} + +.msg_list .uni-list--border-top, +.msg_list .uni-list--border-bottom, +.msg_list .uni-list--border:after, +.msg_body .uni-list:after { + height: 0 !important; +} + +.msg_list .uni-list-chat__header-image { + width: 50rpx !important; + height: 50rpx !important; +} + +.msg_list .uni-badge--dot { + left: inherit !important; + right: 20rpx; + top: 40rpx !important; +} + +.msg_list .uni-list-chat__content-title { + font-size: .9rem !important; +} + +.msg_list .hasread .uni-list-chat__header { + background-color: #ccc; +} + +/* index */ +.index_top { + background-color: #5A7CF3; + width: 100%; +} + +.index_top .uni-searchbar { + padding-right: 0 !important; +} + +.index_top .index_btn { + background-color: transparent; + font-size: 0.825rem; + padding: 0 0.9rem; + +} + +.index_top uni-button:after { + border: 0 !important; +} + +.index_top .uni-searchbar__box { + background-color: rgba(255, 255, 255, 0.3) !important; + border-color: transparent !important; + justify-content: inherit !important; +} + +.index_top .uni-searchbar__text-input, +.uni-searchbar__box-icon-search, +.index_top .uniui-search { + color: #fff !important; +} + +.index_top .uni-searchbar__text-placeholder, +.index_top .uni-input-placeholder { + color: #eee !important; +} + +.index_top .uni-input-input { + color: #fff; +} + +.common_title { + font-size: .825rem; + font-weight: bold; +} + +.common_icons { + width: 100%; + padding: 20rpx; + box-sizing: border-box; +} + +.common_icons .common_info { + position: relative; + top: -120rpx; + background-color: #fff; + width: 100%; + box-sizing: border-box; + padding: 20rpx; + border-radius: 16rpx; + + /* box-shadow: 0 0 10rpx rgba(0,0,0,0.1); */ +} + +.common_icons .common_info .common_cell { + margin-right: 20rpx; + text-align: center; +} + +.common_icons .common_info .common_cell .cell_icon { + background-color: #EEF2FE; + border-radius: 50%; + width: 110rpx; + height: 110rpx; + margin: 20rpx 20rpx 0; +} + +.common_icons .common_info .common_cell .cell_icon image { + float: left; + width: 50rpx; + height: 50rpx; + margin: 35rpx; +} + +.common_icons .common_info .cell_last { + margin-right: 0; +} + +uni-tabbar .uni-tabbar-border { + height: 0; +} + +.index_menu { + width: 100%; + float: left; + margin-top: -100rpx; + /* height: calc(100% - 200px); */ +} + +.index_menu .menu_content { + width: 26%; + text-align: center; + float: left; + height: 100%; + overflow-y: scroll; +} + +.index_menu .index_title .title_left { + width: 100%; + border-left: 2px solid transparent; + line-height: 80rpx; + font-size: 0.825rem; + text-align: center; +} + +.index_menu .menu_content .index_title { + width: 100%; + float: left; + line-height: 100rpx; + font-size: 0.825rem; +} + +.index_menu .menu_content .tit_active { + box-sizing: border-box; + background-color: #fff; + border-left: 2px solid #5A7CF3; + font-weight: bold; + float: left; +} + +.index_menuinfo { + width: 74%; + float: left; + box-sizing: border-box; + padding: 20rpx; + position: relative; + overflow-y: scroll; + background-color: #fff; + /* height: 100%; */ + +} + +.menu_ab { + position: absolute; + top: 420rpx; + left: 0; + width: 100%; + z-index: 10; + /* height: calc(100% - 185px); */ + +} + +.index_menuinfo .icon_block { + position: relative; + text-align: center; + width: 33%; + float: left; + /* margin-top: -10rpx; */ +} + +.index_menuinfo .icon_block image { + float: left; + width: 80%; + height: 80rpx; + margin: 3% 10% 0; +} + +.index_menuinfo .icon_block text { + float: left; + width: 100%; + font-size: .8rem; + height: 80rpx; + color: #101010; +} + +.index_menuinfo .icon_block .index_badge { + width: 42rpx; + height: 42rpx; + font-size: 0.6rem; + background-color: #c00; + position: absolute; + right: 0; + color: #fff; + text-align: center; + line-height: 42rpx; + border-radius: 50%; +} + +uni-tabbar.uni-tabbar-bottom .uni-tabbar { + box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.1); +} + +uni-modal .uni-modal__bd { + font-size: 1rem !important; + color: #000 !important; +} + +.passwordpage .uni-forms-item__label .label-text { + font-size: 0.8rem !important; +} + +.passwordpage .is-input-border { + border: 0 !important; +} + +.passwordpage .is-direction-left { + padding: 10rpx 20rpx; + background-color: #fff; + /* margin: 20rpx 0; */ +} + +.passwordpage .uni-forms-item__inner { + padding-bottom: 10rpx !important; +} + +.passwordpage .new_save_btn { + font-size: 1rem; +} + +.personal uni-button:after { + border: 0 !important; +} + +.personal .uni-list:after { + height: 0 !important; +} + +.personal .uni-list-item__icon { + margin-right: 0 !important; +} + +.personal .uni-list-item__extra-text { + font-size: 1rem !important; + color: #101010 !important; + font-weight: bold; +} + +.personal .uni-list--border-top, +.uni-list--border-bottom, +.uni-list--border::after { + background-color: transparent !important; +} + +uni-modal .uni-modal__ft { + font-size: 0.875rem; +} + +uni-modal .uni-modal__title { + color: #333; +} + +uni-modal .uni-modal__bd { + padding: 1.3em 1.6em 1.3em; + min-height: 40px; + /* font-size: 15px; */ + line-height: 1.4; + /* color: #999; */ + max-height: 400px; + overflow-x: hidden; + overflow-y: auto; +} + +uni-modal .uni-modal__hd { + padding: 1em 1.6em .3em; + height: 30px; +} + +/*dy_add*/ +.btn_unusual button { + margin-right: 10rpx; +} + +.btn_unusual button:last-child { + margin-right: 0; +} + +/* .tit_ljh .text_white{ + color: #fff !important; + font-size: 0.725rem; + font-weight: normal; + padding: 4rpx; +} */ +.bot_card .pending { + color: #5FCB94; +} + +.camera_pop { + border-top-left-radius: 16rpx; + border-top-right-radius: 16rpx; +} + +.camera_list { + padding: 20rpx; + box-sizing: border-box; + max-height: 75vh; + overflow-y: scroll; +} + +.camera_list .list_cell { + border-bottom: 1px solid #eee; + box-shadow: none; + margin-bottom: 0; +} + +.camera_list .list_cell .uni-easyinput { + padding-right: 0; +} + +.camera_list .list_cell .title { + color: #666; +} + +.camera_list .selected-item { + font-size: 0.875rem; +} + +.camera_list .input-value span { + padding: 0; + font-size: 0.875rem; +} + +.camera_pop .pop_btn { + background-color: #fff; +} + +.cell_box .result_card .text_black { + font-size: 1rem; +} + +.cell_box .result_card .red { + color: #c00; +} + +.new_btn_bot .btn_triple { + margin-right: 10rpx; +} + +.cell_box .scan_btn_fr { + float: right; + background-color: #ececec; + color: #5A7CF3; + font-size: 0.725rem; + padding: 10rpx 20rpx; + border-radius: 16rpx; + line-height: 2; + margin: 0 20rpx 20rpx 0; + height: 60rpx; +} + +.cell_box .scan_btn_fr image { + /* margin-top: 4rpx; */ + /* float: left; */ +} + +.cell_box .scan_btn_fr text {} + +.login_wrap .content-clear-icon { + display: none; +} + +.login_wrap .conone .uni-easyinput { + padding-left: 10rpx !important; +} + +.quality_cell { + height: auto !important; +} + +.quality_cell .title { + line-height: 80rpx; + color: #666; +} + +.check_textarea { + font-size: 0.875rem; + color: #333; +} + +.check_textarea uni-textarea { + padding: 10rpx 20rpx; + height: 40px; +} + +.check_textarea .uni-textarea-placeholder { + font-size: 0.875rem; + color: #ccc; +} + +.common_card .ljh_box, +.pop_card .ljh { + width: 100%; + box-sizing: border-box; +} + +.common_card .ljh_box .tit_ljh, +.pop_card .ljh_box .tit_ljh { + float: left; + width: 50%; +} + +.common_card .ljh_info, +.pop_card .ljh_info { + width: 100%; + box-sizing: border-box; +} + +.common_card .desc_card, +.pop_card .desc_card { + width: 100%; + box-sizing: border-box; + padding: 0; +} + +.common_card .label_xm, +.pop_card .label_xm { + background-color: #45B5F3; + line-height: 2.0; + padding: 0 10rpx; + color: #fff; + border-radius: 8rpx; + max-width: 300rpx; + font-size: 0.7rem; + overflow: visble; + word-break:break-all; + /* overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + font-size: 0.7rem;*/ +} + +.result_nodata text { + display: inline-block; + width: 100%; + text-align: center; + color: #999; + font-size: 1.125rem; + margin-top: -20rpx; +} + +.passwordpage .uni-forms-item__label { + width: 180rpx !important; +} + +/* 20221114add */ +.semi_col { + margin-top: 0; +} + +.semi_col .uni-collapse-item__title-text span { + font-size: 1rem; + /* font-weight: bold; */ +} + +.semi_col .common_card .ljh_box .tit_ljh { + font-size: 1rem; + width: 56%; + /* font-weight: normal; */ +} + +.semi_col .num_color { + color: #EC5B28; +} + +.issuelist { + position: relative; +} + +.issuelist .notuse, +.issuelist .use { + float: right; + color: #333; + font-size: 0.825rem; +} + +.issuelist .notuse image, +.issuelist .use image { + vertical-align: middle; +} + +.issuecard .task_num { + border: 0; + margin-bottom: 0; + padding: 0; + + border-bottom: 1px solid #eee; + padding-bottom: 10rpx; + margin-bottom: 10rpx; + overflow: hidden; +} + +.issuelist .tag_icon { + width: 94rpx; + height: 94rpx; + position: absolute; + right: 0; + top: -6rpx; +} diff --git a/fe/PDA/common/pdabasic.css b/fe/PDA/common/pdabasic.css new file mode 100644 index 000000000..491c9481c --- /dev/null +++ b/fe/PDA/common/pdabasic.css @@ -0,0 +1,697 @@ +/* +.pda-list { + padding: 10rpx 10rpx; + box-sizing: border-box; + display: flex; + width: 100%; + flex-direction: row; +} + */ + +/* 列表 */ +.pda-list { + padding: 0 20rpx; + box-sizing: border-box; + background-color: #FFFFFF; + position: relative; + width: 100%; + display: flex; + flex-direction: column; + border-radius: 16rpx; + margin-bottom: 120rpx; +} + +.pda-list:after { + position: absolute; + z-index: 10; + /* right: 0; */ + bottom: 0; + left: 0; + height: 1px; + content: ''; + -webkit-transform: scaleY(.5); + transform: scaleY(.5); + background-color: #c8c7cc; +} + +.pda-list-cell { + position: relative; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + border-bottom: 1px solid #eee; + padding: 10rpx 0; +} + +.pda-list-cell:last-child { + border-bottom: 0; +} + +.pda-list-cell-left { + white-space: nowrap; + /* padding: 0 10rpx; */ +} + +.pda-list-cell-db, +.pda-list-cell-right { + flex: 1; +} + +.pda-list-cell .pda-list-cell-db .uni-input-input { + font-size: .875rem; +} + +.pda-list-cell .uni-easyinput__content-input, +.pda-list-cell .uni-input-placeholder { + height: 2rem; + line-height: 2rem; +} + +.pda-list-cell .placeholder { + color: #999 !important; + font-size: 0.875rem; + padding-left: 10rpx; +} + +.pda-list-cell .uni-label { + color: #434556; +} + +.list_locode .uni-collapse-item__title-box { + font-weight: bold !important; +} + +.display-flex { + display: flex; + justify-content: space-between; + align-items: center; +} + +.list-body { + /* height: 84rpx; */ + display: flex; + flex: 1; + flex-direction: column; + justify-content: space-between; + align-items: flex-start; + overflow: hidden; +} + +.list-text-top { + width: 100%; + color: #000; + font-weight: bolder; + /* line-height: 36rpx; */ + /* font-size: 30rpx; */ +} + +.list-text-bottom { + /* line-height: 30rpx; */ + /* font-size: 26rpx; */ + color: #8f8f94; +} + + +/* 改为detail-content */ +/* margin-bottom: 20rpx; */ +.device-detail { + padding: 20rpx !important; + margin: 20rpx; + border-radius: 16rpx; + background-color: #fff; + color: #666666; + line-height: 1.5; + overflow: hidden; +} + +.list-style { + margin-bottom: 0rpx; + border-radius: 16rpx; + background-color: #FFFFFF; + color: #666666; + line-height: 1.5; +} + +.border-font { + color: #000; + font-weight: bolder; +} + +.space-between { + -webkit-justify-content: space-between; + justify-content: space-between; +} + +.accept-button { + width: 30%; + font-size: 16px; + background-color: #7ac756; + color: #ffffff; +} + +.bigsave-button { + width: 80%; + font-size: 16px; + background-color: #007AFF; + color: #ffffff; +} + +.save-button { + width: 30%; + font-size: 16px; + background-color: #007AFF; + color: #ffffff; +} + +.scroll-detail { + overflow: hidden; + padding-bottom: 60px; + height: 480px; + /* 没有高度不可以回到顶部 */ + /* background-color: #ffffff; */ +} + +.scrollView { + overflow: hidden; + padding-bottom: 50px +} + +.scroll-Y { + /* height: 70ux; */ + padding-bottom: 50px +} + +.bottom1 { + position: fixed; + width: 100%; + /* padding: 10rpx 10rpx; */ + left: 0; + /* right: 0; */ + bottom: 0; + background-color: #ffffff; +} + +.bottom { + position: fixed; + display: flex; + width: 100%; + padding: 10rpx 10rpx; + left: 0; + /* right: 0; */ + bottom: 0; + background-color: #ffffff; +} + + +.pars-num { + /* font-size: 26rpx; */ +} + +.right-width { + text-align: center; + width: 100rpx; +} + +.state-style { + float: left; + margin-top: 10rpx; + /* border-radius: 16rpx; + padding: 0rpx 10rpx; */ + /* line-height: 50rpx; + height: 50rpx; */ + /* width: 120rpx; + display: flex; + flex-direction: column; + align-items: center; */ + /* 垂直居中 */ +} + +.uni-popup-view { + background-color: #fff; + border-radius: 10px; +} + +.uni-popup-button-box { + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: row; + padding: 10px 15px; +} + +.uni-popup-button { + flex: 1; + /* // border-radius: 50px; + // color: #666; */ + /* font-size: 16px; */ +} + +/* 任务状态 */ +/* 打开 */ +.open { + background-color: #409EFF; + color: #FFFFFF; +} + +/* 进行中 */ +.pending { + background-color: #5FCB94; + color: #FFFFFF; +} + +/* 完成 */ +.completed { + background-color: #E6A23C; + color: #FFFFFF; +} + +/* 关闭 */ +.close { + background-color: #F56C6C; + color: #FFFFFF; +} + + +/* 关闭 */ +.other { + background-color: #808080; + color: #FFFFFF; +} + +/* 其他 */ +.unk { + background-color: #ececec; + color: #666; +} + +/* 检验任务状态 */ +/* 免检 */ +.exempt { + background-color: #409EFF; + color: #FFFFFF; +} + +/* 全检 */ +.full { + background-color: #67C23A; + color: #FFFFFF; +} + +/* 抽检 */ +.sampling { + background-color: #E6A23C; + color: #FFFFFF; +} + +/* 挑检 */ +.pick { + background-color: #F56C6C; + color: #FFFFFF; +} + +/* 库存状态 */ + +.uni-link { + background-color: #BD2C00; + color: #BD2C00 !important; +} + +.insp { + background-color: #409EFF; + color: #409EFF !important; +} + +.ok { + color: #67C23A !important; + background-color: #67C23A; +} + +.nok { + background-color: #FF2424; + color: #FF2424 !important; +} + +.hold { + background-color: #EC9C00; + color: #EC9C00 !important; +} + +.scarp { + background-color: #999; + color: #999 !important; +} + +.frozen { + background-color: #FF581D; + color: #FF581D !important; +} + +.pass { + color: #67C23A !important; +} + +.unPass { + color: #FF2424 !important; +} + +.inspect { + background-color: #F6CB61; + color: #FFFFFF; +} + +.raw { + background-color: #2DA8D8; + color: #FFFFFF; +} + +.semi { + background-color: #EDAE50; + color: #FFFFFF; +} + +.fg { + background-color: #078343; + color: #FFFFFF; +} + +.wip { + background-color: #FC85FE; + color: #FFFFFF; +} + +/* .hold{ + +} */ +.scrap { + background-color: #E30016; + color: #FFFFFF; +} + +.noc { + background-color: #C31223; + color: #FFFFFF; +} + +.overflow { + background-color: #7D1EDC; + color: #FFFFFF; +} + +.customer { + background-color: #5A7CF3; + color: #FFFFFF; +} + + +/* //零件状态 +export function getItemTypeStyle(val) { + if (val == 0) return 'active' + else if (val == 1) return 'hold' + else if (val == 2) return 'new' + else if (val == 3) return 'plan' + else if (val == 4) return 'disable' + else return 'other' +} + */ + +/* 零件状态 */ +.active { + background-color: #5FCB94; + color: #FFFFFF; +} + +.hold { + background-color: #FF4206; + color: #FFFFFF; +} + +.new { + background-color: #E6A23C; + color: #FFFFFF; +} + +.plan { + background-color: #2677F9; + color: #FFFFFF; +} + +.disable { + background-color: #666; + color: #FFFFFF; +} + +/* 任务编号字体 */ +.text-number { + color: #000; + font-weight: bolder; +} + +/* 零件编号字体 */ +.text-itemcode { + /* font-size: 26rpx; */ + color: #000; + font-weight: bolder; +} + +.text-desc { + color: #8f8f91; + /* font-size: 22rpx; */ +} + +/* 零件编号字体 */ +.text-bolder { + color: #000; + font-weight: bolder; +} + +.detail-list { + background-color: #fff; + padding: 0; + margin: 20rpx; + border-radius: 16rpx; + overflow: hidden; +} + +.detail-content { + position: relative; + flex: 1; + /* font-size: 26rpx; */ + color: #101010; +} + +.example-body { + background-color: #FFFFFF; +} + +.result-box { + text-align: center; + padding: 20px 0px; + /* font-size: 16px; */ +} + +.toptext { + padding-left: 20upx; + line-height: 80upx; +} + +.numberstyle { + display: flex; + /* flex-direction: row-reverse; */ + border-bottom: 10upx solid #EEEEEE; + width: 200upx; + padding-bottom: 20upx; +} + +.input { + height: 20rpx; + padding: 0rpx 8rpx; + line-height: 50rpx; + /* font-size: 25rpx; */ + background: #FFF; + border-radius: 4rpx; + flex: 1; +} + +.mini-type-style { + vertical-align: middle; + font-size: 0.725rem; + margin-right: 6rpx; + border-radius: 4rpx; + padding: 4rpx 8rpx; + /* width: 80rpx; */ + /* height: 46rpx; + min-width: 80rpx; + display: flex; + flex-direction: column; */ + +} + +.text-color { + color: #000; + font-weight: bolder; +} + +.tabs { + flex: 1; + flex-direction: column; + overflow: hidden; + /* background-color: #ffffff; */ +} + +/* .scroll-h { + touch-action: none; + width: 100%; + height: 100rpx; + flex-direction: row; + white-space: nowrap; + justify-content: center; +} */ + +.line-h { + height: 1rpx; + background-color: #cccccc; +} + +.uni-tab-item { + /* #ifndef APP-PLUS */ + display: inline-block; + /* #endif */ + flex-wrap: nowrap; + padding: 0 30rpx; +} + +.uni-tab-item-title { + position: relative; + color: #555; + /* font-size: 24rpx; */ + height: 100rpx; + line-height: 100rpx; + flex-wrap: nowrap; + /* #ifndef APP-PLUS */ + white-space: nowrap; + /* #endif */ +} + +.uni-tab-item-title-active { + color: #101010; + font-weight: bold; +} + +.uni-tab-item-title-active:after { + left: 50%; + transform: translateX(-50%); + position: absolute; + bottom: -20rpx; + display: inline-block; + content: ""; + width: 40rpx; + height: 8rpx; + background-color: #5a7cf3; + border-radius: 5px; +} + +/* .blece { + padding: 10upx; + color: #111111; + border-bottom: 2px solid #f5f5f5; + display: flex; + flex-wrap: wrap; +} */ + +.conbox { + padding: 10rpx 0; +} + +.myinput { + display: flex; + box-sizing: border-box; + overflow: hidden; + position: relative; + flex: 1; + justify-content: center; + flex-direction: row; + align-items: center; + height: 88rpx; + padding: 20rpx 0; + /* border-width: 0.5px; + border-style: solid; + border-color: #e5e5e5; + border-radius: 5px; + background-color: rgb(248, 248, 248); + font-size: 18px;*/ + font-size: .825rem; +} + +.qtyinput { + height: 50px; + padding: 10px 0px; + font-size: 20px; +} + + +.count-input { + padding: 5rpx 3rpx; + width: 95%; + font-size: 18px; +} + +.pda-data-picker { + padding: 5rpx 3rpx; + width: 95%; + font-size: 18px; +} + +.inputPlaceholderStyle { + font-size: 16px; +} + +.inputfocus { + border-color: #007AFF; +} + + +.txt-16 { + font-size: 16px; +} + +.txt-18 { + font-size: 18px; +} + +.txt-20 { + font-size: 20px; +} + +.pda-label { + width: 210rpx; + word-wrap: break-word; + word-break: break-all; + text-indent: 20rpx; + font-size: 16px; +} + +.fontsize-16 { + font-size: 16px; +} + +.fontsize-18 { + font-size: 18px; +} + +.fontsize-20 { + font-size: 20px; +} + +/deep/ .uni-collapse-item__title-text { + font-size: 16px; +} + + +/deep/ .input-value { + font-size: 16px; +} + +/deep/ .uni-input-input { + font-size: 18px; +} diff --git a/fe/PDA/common/permission.js b/fe/PDA/common/permission.js new file mode 100644 index 000000000..d9249d999 --- /dev/null +++ b/fe/PDA/common/permission.js @@ -0,0 +1,245 @@ +/// null = 未请求,1 = 已允许,0 = 拒绝|受限, 2 = 系统未开启 + +var isIOS + +function album() { + var result = 0; + var PHPhotoLibrary = plus.ios.import("PHPhotoLibrary"); + var authStatus = PHPhotoLibrary.authorizationStatus(); + if (authStatus === 0) { + result = null; + } else if (authStatus == 3) { + result = 1; + } else { + result = 0; + } + plus.ios.deleteObject(PHPhotoLibrary); + return result; +} + +function camera() { + var result = 0; + var AVCaptureDevice = plus.ios.import("AVCaptureDevice"); + var authStatus = AVCaptureDevice.authorizationStatusForMediaType('vide'); + if (authStatus === 0) { + result = null; + } else if (authStatus == 3) { + result = 1; + } else { + result = 0; + } + plus.ios.deleteObject(AVCaptureDevice); + return result; +} + +function location() { + var result = 0; + var cllocationManger = plus.ios.import("CLLocationManager"); + var enable = cllocationManger.locationServicesEnabled(); + var status = cllocationManger.authorizationStatus(); + if (!enable) { + result = 2; + } else if (status === 0) { + result = null; + } else if (status === 3 || status === 4) { + result = 1; + } else { + result = 0; + } + plus.ios.deleteObject(cllocationManger); + return result; +} + +function push() { + var result = 0; + var UIApplication = plus.ios.import("UIApplication"); + var app = UIApplication.sharedApplication(); + var enabledTypes = 0; + if (app.currentUserNotificationSettings) { + var settings = app.currentUserNotificationSettings(); + enabledTypes = settings.plusGetAttribute("types"); + if (enabledTypes == 0) { + result = 0; + console.log("推送权限没有开启"); + } else { + result = 1; + console.log("已经开启推送功能!") + } + plus.ios.deleteObject(settings); + } else { + enabledTypes = app.enabledRemoteNotificationTypes(); + if (enabledTypes == 0) { + result = 3; + console.log("推送权限没有开启!"); + } else { + result = 4; + console.log("已经开启推送功能!") + } + } + plus.ios.deleteObject(app); + plus.ios.deleteObject(UIApplication); + return result; +} + +function contact() { + var result = 0; + var CNContactStore = plus.ios.import("CNContactStore"); + var cnAuthStatus = CNContactStore.authorizationStatusForEntityType(0); + if (cnAuthStatus === 0) { + result = null; + } else if (cnAuthStatus == 3) { + result = 1; + } else { + result = 0; + } + plus.ios.deleteObject(CNContactStore); + return result; +} + +function record() { + var result = null; + var avaudiosession = plus.ios.import("AVAudioSession"); + var avaudio = avaudiosession.sharedInstance(); + var status = avaudio.recordPermission(); + console.log("permissionStatus:" + status); + if (status === 1970168948) { + result = null; + } else if (status === 1735552628) { + result = 1; + } else { + result = 0; + } + plus.ios.deleteObject(avaudiosession); + return result; +} + +function calendar() { + var result = null; + var EKEventStore = plus.ios.import("EKEventStore"); + var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(0); + if (ekAuthStatus == 3) { + result = 1; + console.log("日历权限已经开启"); + } else { + console.log("日历权限没有开启"); + } + plus.ios.deleteObject(EKEventStore); + return result; +} + +function memo() { + var result = null; + var EKEventStore = plus.ios.import("EKEventStore"); + var ekAuthStatus = EKEventStore.authorizationStatusForEntityType(1); + if (ekAuthStatus == 3) { + result = 1; + console.log("备忘录权限已经开启"); + } else { + console.log("备忘录权限没有开启"); + } + plus.ios.deleteObject(EKEventStore); + return result; +} + + +function requestIOS(permissionID) { + return new Promise((resolve, reject) => { + switch (permissionID) { + case "push": + resolve(push()); + break; + case "location": + resolve(location()); + break; + case "record": + resolve(record()); + break; + case "camera": + resolve(camera()); + break; + case "album": + resolve(album()); + break; + case "contact": + resolve(contact()); + break; + case "calendar": + resolve(calendar()); + break; + case "memo": + resolve(memo()); + break; + default: + resolve(0); + break; + } + }); +} + +function requestAndroid(permissionID) { + return new Promise((resolve, reject) => { + plus.android.requestPermissions( + [permissionID], + function(resultObj) { + var result = 0; + for (var i = 0; i < resultObj.granted.length; i++) { + var grantedPermission = resultObj.granted[i]; + console.log('已获取的权限:' + grantedPermission); + result = 1 + } + for (var i = 0; i < resultObj.deniedPresent.length; i++) { + var deniedPresentPermission = resultObj.deniedPresent[i]; + console.log('拒绝本次申请的权限:' + deniedPresentPermission); + result = 0 + } + for (var i = 0; i < resultObj.deniedAlways.length; i++) { + var deniedAlwaysPermission = resultObj.deniedAlways[i]; + console.log('永久拒绝申请的权限:' + deniedAlwaysPermission); + result = -1 + } + resolve(result); + }, + function(error) { + console.log('result error: ' + error.message) + resolve({ + code: error.code, + message: error.message + }); + } + ); + }); +} + +function gotoAppPermissionSetting() { + if (permission.isIOS) { + var UIApplication = plus.ios.import("UIApplication"); + var application2 = UIApplication.sharedApplication(); + var NSURL2 = plus.ios.import("NSURL"); + var setting2 = NSURL2.URLWithString("app-settings:"); + application2.openURL(setting2); + plus.ios.deleteObject(setting2); + plus.ios.deleteObject(NSURL2); + plus.ios.deleteObject(application2); + } else { + var Intent = plus.android.importClass("android.content.Intent"); + var Settings = plus.android.importClass("android.provider.Settings"); + var Uri = plus.android.importClass("android.net.Uri"); + var mainActivity = plus.android.runtimeMainActivity(); + var intent = new Intent(); + intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); + var uri = Uri.fromParts("package", mainActivity.getPackageName(), null); + intent.setData(uri); + mainActivity.startActivity(intent); + } +} + +const permission = { + get isIOS(){ + return typeof isIOS === 'boolean' ? isIOS : (isIOS = uni.getSystemInfoSync().platform === 'ios') + }, + requestIOS: requestIOS, + requestAndroid: requestAndroid, + gotoAppSetting: gotoAppPermissionSetting +} + +export default permission diff --git a/fe/PDA/common/print.js b/fe/PDA/common/print.js new file mode 100644 index 000000000..1640e7904 --- /dev/null +++ b/fe/PDA/common/print.js @@ -0,0 +1,191 @@ +import { + PrintServices +} from '@/api/index.js'; + +import VUE from 'vue' +let printUrl = VUE.prototype.$print_url; //打印 + +export function getTBQPrintData(details) { + let params = { + Palletlabel: [] + } + + details.forEach(item => { + let detail = { + asnNumber: item.asnNumber, + number: item.number, + supplierCode: item.supplierCode, + supplierName: item.supplierName, + arriveTime: item.arriveTime, + packingCode: item.packingCode, + containerCode: item.containerCode, + itemCode: item.itemCode, + qty: item.qty.qty, + totalQty: item.qty.qty, + } + + let detailjson = JSON.parse(JSON.stringify(detail)) + params.Palletlabel.push(detailjson) + }) + let jsonData = JSON.stringify(params) + let data = { + reportName: 'tuopan.rdlx', + dataUrl: 'ccc', + jsonData: jsonData + }; + return data +} + +export function getXBQPrintData(item) { + let params = { + boxlabel: [] + } + + let newParams = { + asnNumber: item.asnNumber, + supplierCode: item.supplierCode, + supplierName: item.supplierName, + timeWindow: item.timeWindow, + arriveTime: item.arriveTime, + details: [] + }; + + item.details.forEach(row => { + let detail = { + poNumber: row.poNumber, + poLine: row.poLine, + qty: row.qty, + packingCode: row.packingCode, + containerCode: row.containerCode, + lot: row.lot, + batch: row.batch, + itemCode: row.itemCode, + item: row.item + } + newParams.details.push(detail) + }) + + params.boxlabel.push(newParams) + let jsonData = JSON.stringify(params) + let data = { + reportName: 'xiangbq.rdlx', + dataUrl: 'ccc', + jsonData: jsonData + }; + return data +} + +export function getPutawayData(item) { + let params = { + putawaylabel: [] + } + + let newParams = { + creationTime: item.creationTime, + number: item.number, + jobType: item.jobType, + jobStatus: item.jobStatus, + priority: item.priority, + workGroupCode: item.workGroupCode, + supplierCode: item.supplierCode, + inspectNumber: item.inspectNumber, + receiptNumber: item.receiptNumber, + arriveNoticeNumber: item.arriveNoticeNumber, + asnNumber: item.asnNumber, + rpNumber: item.rpNumber, + poNumber: item.poNumber, + productReceiptNumber: item.productReceiptNumber, + + details: [] + }; + + item.details.forEach(row => { + let detail = { + item: row.item, + itemCode: row.itemCode, + stdPack: row.stdPack, + status: row.status, + recommendContainerCode: row.recommendContainerCode, + recommendPackingCode: row.recommendPackingCode, + recommendLocationCode: row.recommendLocationCode, + recommendQty: row.recommendQty, + fromLocationCode: row.fromLocationCode + } + newParams.details.push(detail) + }) + + params.putawaylabel.push(newParams) + let jsonData = JSON.stringify(params) + let data = { + reportName: 'putawaylabel.rdlx', + dataUrl: 'ccc', + jsonData: jsonData + }; + return data +} + +//打印托标签 +export function printTBQLabel(details) { + let data = getTBQPrintData(details); + // let params = + // '{"Palletlabel":[{ + //"asnNumber":"AVN202205250002", + //"number":"AVN202205250002", + //"supplierCode":"02053835", + //"supplierName":"埃驰汽车零部件(常熟)有限公司", + //"arriveTime":"2022/05/25", + //"packingCode":"undefined", + //"containerCode":"T0000591", + //"itemCode":"1765049LAA", + //"qty":"200", + //"totalQty":1}, + //{"asnNumber":"AVN202205250002","number":"AVN202205250002","supplierCode":"02053835","supplierName":"埃驰汽车零部件(常熟)有限公司","arriveTime":"2022/05/25","packingCode":"undefined","containerCode":"T0000592","itemCode":"1765049LAA","qty":"200","totalQty":1},{"asnNumber":"AVN202205250002","number":"AVN202205250002","supplierCode":"02053835","supplierName":"埃驰汽车零部件(常熟)有限公司","arriveTime":"2022/05/25","packingCode":"undefined/B0001513/B0001511","containerCode":"T0000591","itemCode":"1765049LAA","qty":"200/200/200","totalQty":3}]}' + // let data = { + // reportName: 'tuopan.rdlx', + // dataUrl: 'ccc', + // jsonData: params + // }; + console.log('data', data); + if (data != null && data.jsonData != "") { + PrintServices(data) + .then(res => { + window.open(printUrl + '/' + res) + }) + .catch(err => { + + }); + } +} + +//打印箱标签 +export function printXBQLabel(details) { + let data = getXBQPrintData(details); + // let params = + // '{"boxlabel":[{"asnNumber":"AVN202205250003","supplierCode":"02053835","supplierName":"埃驰汽车零部件(常熟)有限公司","timeWindow":"09-11","arriveTime":"2022/05/25","details":[{"poNumber":"","poLine":"","qty":{"uom":"EA","qty":300},"packingCode":"B0001516","containerCode":"T0000596","lot":"220525","batch":{"supplierBatch":"220525","produceDate":"2022-05-25T00:00:00"},"itemCode":"2254149RAA","item":{"id":"fd231dd8-ed13-e4cb-9972-3a035cd3e176","name":"FA1B 78266A64 AJD6 PIA22","desc1":"PULL HANDLE CLOSEOUT","desc2":"右后门把手盖表皮-裁片2-PVC-JD6"}}]}]}'; + // let data = { + // reportName: 'xiangbq.rdlx', + // dataUrl: 'ccc', + // jsonData: params + // }; + console.log('data', data); + if (data != null && data.jsonData != "") { + PrintServices(data) + .then(res => { + window.open(printUrl + '/' + res) + }) + .catch(err => {}); + } +} + +//打印上架任务标签 +export function printPutawayLabel(item) { + let data = getPutawayData(item); + console.log('data', data); + if (data != null && data.jsonData != "") { + PrintServices(data) + .then(res => { + window.open(printUrl + '/' + res) + }) + .catch(err => {}); + } +} diff --git a/fe/PDA/common/promise.js b/fe/PDA/common/promise.js new file mode 100644 index 000000000..79398dcf3 --- /dev/null +++ b/fe/PDA/common/promise.js @@ -0,0 +1,26 @@ +import urlConfig from './config.js' +const promise = {} + +promise.asyncRequest = (url, options = {}, power) => { + return new Promise((resolve, reject) => { + uni.request({ + url: url, + ...options, //data,method... + header: { + "content-type": "application/json", + 'withCredentials': true, + 'Authorization': localStorage.token_type, + // 'Authorization': localStorage.token_type, + ...options.header, + }, + success: (res) => { + resolve(res.data); + }, + fail: (err) => { + reject(err) + } + }); + }) +} + +export default promise.asyncRequest diff --git a/fe/PDA/common/request.js b/fe/PDA/common/request.js new file mode 100644 index 000000000..f635f7aee --- /dev/null +++ b/fe/PDA/common/request.js @@ -0,0 +1,124 @@ +import urlConfig from './config.js' +// import store from '@/store/index' +const request = {} + +request.globalRequest = (url, options = {}, power) => { + /* 权限判断 因为有的接口请求头可能需要添加的参数不一样,所以这里做了区分 + 1 == 不通过access_token校验的接口 + 2 == 文件下载接口列表 + 3 == 验证码登录 */ + + let contentType = localStorage.token_type ? "application/json" : "application/x-www-form-urlencoded"; + + return new Promise((resolve, reject) => { + uni.request({ + url: url, + ...options, //data,method... + header: { + "content-type": contentType, + "Authorization": localStorage.token_type, + 'withCredentials': true, + // 'Blade-Auth':'bearer '+store.state.token, + 'token_type': localStorage.token_type, + ...options.header, + }, + success: (res) => { + if (res != null) { + if (res.statusCode != null) { + let statusCode = res.statusCode.toString(); + // 状态码类型 2开头的全是成功 + let code = statusCode.substring(0, 1); + if (statusCode == '200') { + resolve(res.data); + } else if (statusCode == '204') { + if (options.method == 'get') { + + reject(options.data+"没查到") + } else { + reject(res.data) + } + } else if (statusCode == '400') { + if (res.data.error) { + if (res.data.error.message) { + reject(res.data.error.message); + } + } else if (res.data.errors) { + let errors = res.data.errors; + let errorMsg = '请求参数错误:\n'; + let keys = Object.keys(errors); + for (var i = 0; i < keys.length; i++) { + let key = keys[i]; + let value = errors[key]; + errorMsg += i + 1 + ':' + value + '\n'; + } + reject(errorMsg); + } + } else if (statusCode == '404') { + if (res.data === '') { + reject('未找到接口'); + } else { + reject(res.data); + } + } else if (statusCode == '403') { + let message = res.data.error.message; + if (message) { + let temp; + try { + temp = JSON.parse(message) + } catch (err) { + reject(message); + } + if (temp) { + var hintError = temp.error; + var hintErrorDes = temp.error_description; + if (hintError == 'invalid_grant') { + if (hintErrorDes.includes( + 'Invalid username or password!')) { + reject('用户名或密码错误'); + } else if (hintErrorDes.includes( + 'The user account has been locked out due to invalid login attempts' + )) { + reject("账号已被锁定,请稍后再试"); + } + } else { + reject(message) + } + } + } else { + reject(res.statusCode + "错误") + } + } else { + let message = res.data.error.message; + if (message != undefined) { + reject(res.data.error.message) + } else { + reject(res.statusCode + "错误") + } + } + } else { + reject('options.url' + "返回的状态码类型为空") + } + } else { + reject('options.url' + "返回的res为空") + } + }, + fail: (eror) => { + reject(eror) + } + }) + }) + // .catch(params => { + // reject(params); + // }) +} + + + + +export default request.globalRequest + +// 最终发送给服务器的数据是 String 类型,如果传入的 data 不是 String 类型,会被转换成 String。转换规则如下: + +// 对于 GET 方法,会将数据转换为 query string。例如 { name: 'name', age: 18 } 转换后的结果是 name=name&age=18。 +// 对于 POST 方法且 header['content-type'] 为 application/json 的数据,会进行 JSON 序列化。 +// 对于 POST 方法且 header['content-type'] 为 application/x-www-form-urlencoded 的数据,会将数据转换为 query string。 diff --git a/fe/PDA/common/request_test.js b/fe/PDA/common/request_test.js new file mode 100644 index 000000000..ab93d5ffa --- /dev/null +++ b/fe/PDA/common/request_test.js @@ -0,0 +1,103 @@ +import urlConfig from './config.js' +// import store from '@/store/index' + +function service(options = {}) { + let contentType = localStorage.token_type ? "application/json" : "application/x-www-form-urlencoded"; + options.header = { + "content-type": contentType, + "Authorization": localStorage.token_type, + 'withCredentials': true, + // 'Blade-Auth':'bearer '+store.state.token, + 'token_type': localStorage.token_type + }; + return new Promise((resolve, reject) => { + options.success = (res) => { + console.log("请求成功", res); + // 如果请求回来的状态码不是200则执行以下操作 + if (res != null ) { + if (res.statusCode != null) { + let statusCode = res.statusCode.toString(); + // 状态码类型 2开头的全是成功 + let code = statusCode.substring(0, 1); + if (statusCode == '200') { + resolve(res.data); + } else if (statusCode == '204') { + if (options.method == 'get') { + return null; + } else { + reject(res.data) + } + } else if (statusCode == '400') { + if (res.data.error) { + if (res.data.error.message) { + reject(res.data.error.message); + } + } else if (res.data.errors) { + let errors = res.data.errors; + let errorMsg = '请求参数错误:\n'; + let keys = Object.keys(errors); + for (var i = 0; i < keys.length; i++) { + let key = keys[i]; + let value = errors[key]; + errorMsg += i + 1 + ':' + value + '\n'; + } + reject(errorMsg); + } + } else if (statusCode == '404') { + if (res.data === '') { + reject('未找到接口'); + } else { + reject(res.data); + } + } + else if (statusCode == '403') { + let message = res.data.error.message; + if (message) { + let temp; + try { + temp = JSON.parse(message) + } catch (err) { + reject(message) ; + } + if (temp) { + var hintError = temp.error; + var hintErrorDes = temp.error_description; + if (hintError == 'invalid_grant') { + if (hintErrorDes.includes('Invalid username or password!')) { + reject('用户名或密码错误'); + } else if (hintErrorDes.includes( + 'The user account has been locked out due to invalid login attempts' + )) { + reject("账号已被锁定,请稍后再试"); + } + } else { + reject(message) + } + } + } else { + reject(res.statusCode + "错误") + } + } + else { + let message = res.data.error.message; + if (message != undefined) { + reject(res.data.error.message) + } else { + reject(res.statusCode + "错误") + } + } + } else { + reject('options.url' + "返回的状态码类型为空") + } + } else { + reject('options.url' + "返回的res为空") + } + }; + options.fail = (err) => { + reject(err); + }; + uni.request(options); + }); + } + + export default service; diff --git a/fe/PDA/common/scan.js b/fe/PDA/common/scan.js new file mode 100644 index 000000000..99fdd935e --- /dev/null +++ b/fe/PDA/common/scan.js @@ -0,0 +1,308 @@ +//解析扫描信息 +//P2251076NAA;L220325;Q2000;N0205183222000006;SS0000066;V02051832;OPO1072;C15; +//解析规则 +//P:itemCode 物料号 +//L:lot批次 +//Q:qty 数量 +//N:asn 供应商商发货单 ASN +//S:packingCode 箱码 +//T:containerCode托盘 +//V:supplierCode 供应商代码 +//O: order订单号 +//C: poLine订单行 +//B:supplierBatch 供应商批次 + +//返回结果 +//sucess true:成功 false:失败 +//scanType barcode:条码 qrcode:二维码 +//isPack true:箱码 false:托码 +export function analyseScanInfo(scanMsg) { + let scanResult = { + sucess: false, + message: "", + data: { + isPack: null, + scanType: null, + itemCode: null, + lot: null, + qty: null, + asn: null, + packingCode: null, + supplierBatch: null, + order: null, + poLine: null, + code: null, + } + }; + if (scanMsg === "") { + scanResult.message = "扫描到的内容为空"; + } else { + try { + console.log('1.扫描到的内容:', scanMsg); + //条码 + if (scanMsg.indexOf(';') < 0) { + scanResult.sucess = true; + scanResult.data.code = scanMsg; + scanResult.data.scanType = 'barcode'; //条码 + } else { + let arrayItems = scanMsg.split(';'); + if (arrayItems.length > 0) { + scanResult.data.scanType = 'qrcode'; //二维码 + arrayItems.forEach((item, index) => { + if (item != "") { + let type = item.substring(0, 1); + let value = item.substring(1, item.length); + if (type != "") { + scanResult.data.scanType = 'qrcode'; + switch (type) { + case "P": //物料号 + case "p": + scanResult.data.itemCode = value; + break; + case "L": //批次 + case "l": + scanResult.data.lot = value; + break; + case "Q": //数量 + case "q": + scanResult.data.qty = value; + break; + case "N": //供应商商发货单 ASN + case "n": + scanResult.data.asn = value; + break; + case "S": //箱码 + case "s": + scanResult.data.packingCode = value; + scanResult.data.isPack = true; + break; + case "T": //托盘 + case "t": + scanResult.data.containerCode = value; + scanResult.data.isPack = false; + break; + case "V": //供应商批次 + case "v": + scanResult.data.supplierCode = value; + break; + case "O": //订单号 + case "o": + scanResult.data.order = value; + break; + case "C": //订单行 + case "c": + scanResult.data.poLine = value; + break; + case "B": //供应商批次 + case "b": + scanResult.data.supplierBatch = value; + break; + // default: //条码 + // scanResult.data.code = item; + // scanResult.data.scanType = 'barcode'; + // break; + } + } + } + }) + + scanResult.sucess = true; + } else { //扫描的是条码,直接返回接收到的内容 + scanResult.sucess = true; + scanResult.data.code = scanMsg; + scanResult.data.scanType = 'barcode'; + } + } + } catch (ex) { + scanResult.sucess = false; + scanResult.message = "解析遇到异常" + ex.message; + } + } + + return scanResult; +} + +//解析完工收货标签 +//P2250229RAA;L220408;Q100;N62840610;SB0000107;UEA;DU571LS;FA;E2022-4-8 +//P零件号,L批次,Q数量,N生产计划号,S箱码,U计量单位,D生产线,F班次,E日期,M零件名称(待添加) +//解析规则 +//P:itemCode 物料号 +//L:lot批次 +//Q:qty 数量 +//N:pnumber productionPlanNumber生产计划号 +//S:packingCode 箱码 +//U:uom 计量单位 +//D:prodLine 生产线 +//F:shift 班次 +//E:produceDate日期 + +//返回结果 +//sucess true:成功 false:失败 +//scanType barcode:条码 qrcode:二维码 +//isPack true:箱码 false:托码 +export function analyseProductLabelInfo(scanMsg) { + let scanResult = { + sucess: false, + message: "", + data: { + itemCode: null, + lot: null, + qty: null, + pnumber: null, + packingCode: null, + uom: null, + prodLine: null, + shift: null, + produceDate: null + } + }; + if (scanMsg == "") { + scanResult.message = "扫描到的内容为空"; + } else { + try { + //条码 + if (scanMsg.indexOf(';') < 0) { + scanResult.sucess = false; + scanResult.message = "标签格式不正确"; + } else { + let arrayItems = scanMsg.split(';'); + if (arrayItems.length > 0) { + arrayItems.forEach((item, index) => { + if (item != "") { + let type = item.substring(0, 1); + let value = item.substring(1, item.length); + if (type != "") { + switch (type) { + case "P": //物料号 + case "p": + scanResult.data.itemCode = value; + break; + case "L": //批次 + case "l": + scanResult.data.lot = value; + break; + case "Q": //数量 + case "q": + scanResult.data.qty = value; + break; + case "N": //生产计划号 ASN + case "n": + scanResult.data.pnumber = value; + break; + case "S": //箱码 + case "s": + scanResult.data.packingCode = value; + break; + case "U": //计量单位 + case "u": + scanResult.data.uom = value; + break; + case "D": //生产线 + case "d": + scanResult.data.prodLine = value; + break; + case "F": //班次 + case "f": + scanResult.data.shift = value; + break; + case "E": //日期 + case "e": + scanResult.data.produceDate = value; + break; + default: + scanResult.sucess = false; + scanResult.message = "无法识别的前缀" + type; + break; + } + scanResult.sucess = true; + } else { + scanResult.sucess = false; + scanResult.message = "标签信息不能为空" + type; + } + } + }) + + + } else { //扫描的是条码,直接返回接收到的内容 + scanResult.sucess = false; + scanResult.message = "标签分隔符错误"; + } + } + } catch (ex) { + scanResult.sucess = false; + scanResult.message = "解析遇到异常" + ex.message; + } + } + return scanResult; +} + + +//解析天津mes标签 +//1#2546319FL#254FL003#202207110009: +//1.序号1,2.生产号2546311FL,3.零件号254FL004,4.批序号202207110009 +export function analyseTJMesQRCode(scanMsg) { + let scanResult = { + sucess: false, + message: "", + items: [] + }; + if (scanMsg == "") { + scanResult.message = "扫描到的内容为空"; + } else { + try { + if (scanMsg.indexOf(':') < 0) { + scanResult.sucess = false; + scanResult.message = "标签格式不正确"; + } else { + let arrayItems = scanMsg.split(':'); + if (arrayItems.length > 0) { + arrayItems.forEach((item, index) => { + if (item != "") { + if (item.includes('#')) { + let datas = item.split('#'); + //为空时是:2N + if (datas.length > 1) { + let itemCode = datas[2]; + let location = itemCode.substring(3, 5); + let data = { + seq: datas[0], //序号 + produceNo: datas[1], //生产号 + // projectNo: datas[2], //项目号 + itemCode: itemCode, //配置码(零件号) + lot: datas[3], //批次 + position: location //上层、下层 + } + scanResult.items.push(data) + } + } else { + if (item.includes('N')) { + let seq = item.substring(0, item.length - 1); + let data = { + seq: seq, //序号 + produceNo: 'N', //生产号 + projectNo: 'N', //项目号 + itemCode: 'N', //配置码(零件号) + lot: 'N', //批次 + position: '' + } + scanResult.items.push(data) + } + } + } else { + scanResult.sucess = false; + scanResult.message = "标签信息不能为空"; + } + }) + scanResult.sucess = true; + } else { //扫描的是条码,直接返回接收到的内容 + scanResult.sucess = false; + scanResult.message = "标签分隔符错误"; + } + } + } catch (ex) { + scanResult.sucess = false; + scanResult.message = "解析遇到异常" + ex.message; + } + } + return scanResult; +} diff --git a/fe/PDA/common/text.js b/fe/PDA/common/text.js new file mode 100644 index 000000000..0a4ca4610 --- /dev/null +++ b/fe/PDA/common/text.js @@ -0,0 +1,15 @@ +// //等待一会再执行 +// this.timer = setInterval(() => { +// //TODO +// that.hideLoading(); +// }, 2000); + + +// //拦截返回按钮事件 +// onBackPress(e) { +// uni.reLaunch({ +// url: 'Inspect' +// }) +// // 此处一定要return为true,否则页面不会返回到指定路径 +// return true; +// }, diff --git a/fe/PDA/common/uni-nvue.css b/fe/PDA/common/uni-nvue.css new file mode 100644 index 000000000..6863ac999 --- /dev/null +++ b/fe/PDA/common/uni-nvue.css @@ -0,0 +1,136 @@ +/* #ifndef APP-PLUS-NVUE */ +page { + min-height: 100%; + height: auto; +} +/* #endif */ + +/* 解决头条小程序字体图标不显示问题,因为头条运行时自动插入了span标签,且有全局字体 */ +/* #ifdef MP-TOUTIAO */ +/* text :not(view) { + font-family: uniicons; +} */ +/* #endif */ + +.uni-icon { + font-family: uniicons; + font-weight: normal; +} + +.uni-container { + padding: 15px; + background-color: #f8f8f8; +} + +.uni-header-logo { + /* #ifdef H5 */ + display: flex; + /* #endif */ + padding: 15px 15px; + flex-direction: column; + justify-content: center; + align-items: center; + margin-top: 10rpx; +} + +.uni-header-image { + width: 80px; + height: 80px; +} + +.uni-hello-text { + margin-bottom: 20px; +} + +.hello-text { + color: #7A7E83; + font-size: 14px; + line-height: 20px; +} + +.hello-link { + color: #7A7E83; + font-size: 14px; + line-height: 20px; +} + +.uni-panel { + margin-bottom: 12px; +} + +.uni-panel-h { + /* #ifdef H5 */ + display: flex; + /* #endif */ + background-color: #ffffff; + flex-direction: row !important; + /* justify-content: space-between !important; */ + align-items: center !important; + padding: 12px; + /* #ifdef H5 */ + cursor: pointer; + /* #endif */ +} +/* +.uni-panel-h:active { + background-color: #f8f8f8; +} + */ +.uni-panel-h-on { + background-color: #f0f0f0; +} + +.uni-panel-text { + flex: 1; + color: #000000; + font-size: 14px; + font-weight: normal; +} + +.uni-panel-icon { + margin-left: 15px; + color: #999999; + font-size: 14px; + font-weight: normal; + transform: rotate(0deg); + transition-duration: 0s; + transition-property: transform; +} + +.uni-panel-icon-on { + transform: rotate(180deg); +} + +.uni-navigate-item { + /* #ifdef H5 */ + display: flex; + /* #endif */ + flex-direction: row; + align-items: center; + background-color: #FFFFFF; + border-top-style: solid; + border-top-color: #f0f0f0; + border-top-width: 1px; + padding: 12px; + /* #ifdef H5 */ + cursor: pointer; + /* #endif */ +} + +.uni-navigate-item:active { + background-color: #f8f8f8; +} + +.uni-navigate-text { + flex: 1; + color: #000000; + font-size: 14px; + font-weight: normal; +} + +.uni-navigate-icon { + margin-left: 15px; + color: #999999; + font-size: 14px; + font-weight: normal; +} diff --git a/fe/PDA/common/uni.css b/fe/PDA/common/uni.css new file mode 100644 index 000000000..0f74da2ca --- /dev/null +++ b/fe/PDA/common/uni.css @@ -0,0 +1,2897 @@ +@font-face { + font-family: uniicons; + font-weight: normal; + font-style: normal; + src: url('~@/static/uni.ttf') format('truetype'); +} + +/* #ifdef H5 */ +.fix-left-window { + padding-left: var(--window-left); +} +.pc-hide { + display: none !important; +} +/* #endif */ + +/*通用 */ + +/* view{ + font-size:28rpx; + line-height:1.8; +} */ +progress, checkbox-group{ + width: 100%; +} +form { + width: 100%; +} +.uni-flex { + display: flex; + flex-direction: row; +} +.uni-flex-item { + flex: 1; +} +.uni-row { + flex-direction: row; +} +.uni-column { + flex-direction: column; +} +.uni-link{ + color:#576B95; + font-size:26rpx; +} +.uni-center{ + text-align:center; +} +.uni-inline-item{ + display: flex; + flex-direction: row; + align-items:center; +} +.uni-inline-item text{ + margin-right: 20rpx; +} +.uni-inline-item text:last-child{ + margin-right: 0rpx; + margin-left: 20rpx; +} + +/* page */ +.common-page-head{ + padding:35rpx; + text-align: center; +} +.common-page-head-title { + display: inline-block; + padding: 0 40rpx; + font-size: 30rpx; + height: 88rpx; + line-height: 88rpx; + color: #BEBEBE; + box-sizing: border-box; + border-bottom: 2rpx solid #D8D8D8; +} + +.uni-padding-wrap{ + /* width:690rpx; */ + padding:0 30rpx; +} +.uni-word { + text-align: center; + padding:200rpx 100rpx; +} +.uni-title { + font-size:30rpx; + font-weight:500; + padding:20rpx 0; + line-height:1.5; +} +.uni-text{ + font-size:28rpx; +} +.uni-title text{ + font-size:24rpx; + color:#888; +} + +.uni-text-gray{ + color: #ccc; +} +.uni-text-small { + font-size:24rpx; +} +.uni-common-mb{ + margin-bottom:30rpx; +} +.uni-common-pb{ + padding-bottom:30rpx; +} +.uni-common-pl{ + padding-left:30rpx; +} +.uni-common-mt{ + margin-top:30rpx; +} +/* 背景色 */ +.uni-bg-red{ + background:#F76260; color:#FFF; +} +.uni-bg-green{ + background:#09BB07; color:#FFF; +} +.uni-bg-blue{ + background:#007AFF; color:#FFF; +} +/* 标题 */ +.uni-h1 {font-size: 80rpx; font-weight:700;} +.uni-h2 {font-size: 60rpx; font-weight:700;} +.uni-h3 {font-size: 48rpx; font-weight:700;} +.uni-h4 {font-size: 36rpx; font-weight:700;} +.uni-h5 {font-size: 28rpx; color: #8f8f94;} +.uni-h6 {font-size: 24rpx; color: #8f8f94;} +.uni-bold{font-weight:bold;} + +/* 文本溢出隐藏 */ +.uni-ellipsis {overflow: hidden; white-space: nowrap; text-overflow: ellipsis;} + +/* 竖向百分百按钮 */ +.uni-btn-v{ + padding:10rpx 0; +} +.uni-btn-v button{margin:20rpx 0;} + +/* 表单 */ +.uni-form-item{ + display:flex; + width:100%; + padding:10rpx 0; +} +.uni-form-item .title{ + padding:10rpx 25rpx; +} +.uni-label { + width: 210rpx; + word-wrap: break-word; + word-break: break-all; + text-indent:20rpx; +} +.uni-input { + height: 50rpx; + padding: 15rpx 25rpx; + line-height:50rpx; + font-size:28rpx; + background:#FFF; + flex: 1; +} +radio-group, checkbox-group{ + width:100%; +} +radio-group label, checkbox-group label{ + padding-right:20rpx; +} +.uni-form-item .with-fun{ + display:flex; + flex-wrap:nowrap; + background:#FFFFFF; +} +.uni-form-item .with-fun .uni-icon{ + width:40px; + height:80rpx; + line-height:80rpx; + flex-shrink:0; +} + +/* loadmore */ +.uni-loadmore{ + height:80rpx; + line-height:80rpx; + text-align:center; + padding-bottom:30rpx; +} +/*数字角标*/ +/* .uni-badge, +.uni-badge-default { + font-family: 'Helvetica Neue', Helvetica, sans-serif; + font-size: 12px; + line-height: 1; + display: inline-block; + padding: 3px 6px; + color: #333; + border-radius: 100px; + background-color: rgba(0, 0, 0, .15); +} */ +.uni-badge.uni-badge-inverted { + padding: 0 5px 0 0; + color: #929292; + background-color: transparent +} +.uni-badge-primary { + color: #fff; + background-color: #007aff +} +.uni-badge-blue.uni-badge-inverted, +.uni-badge-primary.uni-badge-inverted { + color: #007aff; + background-color: transparent +} +.uni-badge-green, +.uni-badge-success { + color: #fff; + background-color: #4cd964; +} +.uni-badge-green.uni-badge-inverted, +.uni-badge-success.uni-badge-inverted { + color: #4cd964; + background-color: transparent +} +.uni-badge-warning, +.uni-badge-yellow { + color: #fff; + background-color: #f0ad4e +} +.uni-badge-warning.uni-badge-inverted, +.uni-badge-yellow.uni-badge-inverted { + color: #f0ad4e; + background-color: transparent +} +.uni-badge-danger, +.uni-badge-red { + color: #fff; + background-color: #dd524d +} +.uni-badge-danger.uni-badge-inverted, +.uni-badge-red.uni-badge-inverted { + color: #dd524d; + background-color: transparent +} +.uni-badge-purple, +.uni-badge-royal { + color: #fff; + background-color: #8a6de9 +} +.uni-badge-purple.uni-badge-inverted, +.uni-badge-royal.uni-badge-inverted { + color: #8a6de9; + background-color: transparent +} + +/*折叠面板 */ +.uni-collapse-content { + height: 0; + width: 100%; + overflow: hidden; +} +.uni-collapse-content.uni-active { + height: auto; +} + +/*卡片视图 */ +.uni-card { + background: #fff; + border-radius: 8rpx; + margin:20rpx 0; + position: relative; + /* box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, .3); */ +} +.uni-card-content { + font-size: 30rpx; +} +.uni-card-content.image-view{ + width: 100%; + margin: 0; +} +.uni-card-content-inner { + position: relative; + padding: 30rpx; +} +.uni-card-footer, +.uni-card-header { + position: relative; + display: flex; + min-height: 50rpx; + padding: 20rpx 30rpx; + justify-content: space-between; + align-items: center; +} +.uni-card-header { + font-size: 36rpx; +} +.uni-card-footer { + color: #6d6d72; +} +.uni-card-footer:before, +.uni-card-header:after { + position: absolute; + top: 0; + right: 0; + left: 0; + height: 2rpx; + content: ''; + -webkit-transform: scaleY(.5); + transform: scaleY(.5); + background-color: #c8c7cc; +} +.uni-card-header:after { + top: auto; + bottom: 0; +} +.uni-card-media { + justify-content: flex-start; +} +.uni-card-media-logo { + height: 84rpx; + width: 84rpx; + margin-right: 20rpx; +} +.uni-card-media-body { + height: 84rpx; + display: flex; + flex-direction: column; + justify-content: space-between; + align-items: flex-start; +} +.uni-card-media-text-top { + line-height: 36rpx; + font-size: 34rpx; +} +.uni-card-media-text-bottom { + line-height: 30rpx; + font-size: 28rpx; + color: #8f8f94; +} +.uni-card-link { + color: #007AFF; +} + +/* 列表 */ +.uni-list { + background-color: #FFFFFF; + position: relative; + width: 100%; + display: flex; + flex-direction: column; +} +.uni-list:after { + position: absolute; + z-index: 10; + right: 0; + bottom: 0; + left: 0; + height: 1px; + content: ''; + -webkit-transform: scaleY(.5); + transform: scaleY(.5); + background-color: #c8c7cc; +} +/* .uni-list::before { + position: absolute; + z-index: 10; + right: 0; + top: 0; + left: 0; + height: 1px; + content: ''; + -webkit-transform: scaleY(.5); + transform: scaleY(.5); + background-color: #c8c7cc; +} */ +.uni-list-cell { + position: relative; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; +} +.uni-list-cell-hover { + background-color: #eee; +} +.uni-list-cell-pd { + padding: 22rpx 30rpx; +} +.uni-list-cell-left { + white-space: nowrap; + font-size:28rpx; + padding: 0 30rpx; +} +.uni-list-cell-db, +.uni-list-cell-right { + flex: 1; +} +.uni-list-cell::after { + position: absolute; + z-index: 3; + right: 0; + bottom: 0; + left: 30rpx; + height: 1px; + content: ''; + -webkit-transform: scaleY(.5); + transform: scaleY(.5); + background-color: #c8c7cc; +} +.uni-list .uni-list-cell:last-child::after { + height: 0rpx; +} +.uni-list-cell-last.uni-list-cell::after { + height: 0rpx; +} +.uni-list-cell-divider { + position: relative; + display: flex; + color: #999; + background-color: #f7f7f7; + padding:15rpx 20rpx; +} +.uni-list-cell-divider::before { + position: absolute; + right: 0; + top: 0; + left: 0; + height: 1px; + content: ''; + -webkit-transform: scaleY(.5); + transform: scaleY(.5); + background-color: #c8c7cc; +} +.uni-list-cell-divider::after { + position: absolute; + right: 0; + bottom: 0; + left: 0rpx; + height: 1px; + content: ''; + -webkit-transform: scaleY(.5); + transform: scaleY(.5); + background-color: #c8c7cc; +} +.uni-list-cell-navigate { + font-size:30rpx; + padding: 22rpx 30rpx; + line-height: 48rpx; + position: relative; + display: flex; + box-sizing: border-box; + width: 100%; + flex: 1; + justify-content: space-between; + align-items: center; +} +.uni-list-cell-navigate { + padding-right: 36rpx; +} +.uni-navigate-badge { + padding-right: 50rpx; +} +.uni-list-cell-navigate.uni-navigate-right:after { + font-family: uniicons; + content: '\e583'; + position: absolute; + right: 24rpx; + top: 50%; + color: #bbb; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); +} +.uni-list-cell-navigate.uni-navigate-bottom:after { + font-family: uniicons; + content: '\e581'; + position: absolute; + right: 24rpx; + top: 50%; + color: #bbb; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); +} +.uni-list-cell-navigate.uni-navigate-bottom.uni-active::after { + font-family: uniicons; + content: '\e580'; + position: absolute; + right: 24rpx; + top: 50%; + color: #bbb; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); +} +.uni-collapse.uni-list-cell { + flex-direction: column; +} +.uni-list-cell-navigate.uni-active { + background: #eee; +} +.uni-list.uni-collapse { + box-sizing: border-box; + height: 0; + overflow: hidden; +} +.uni-collapse .uni-list-cell { + padding-left: 20rpx; +} +.uni-collapse .uni-list-cell::after { + left: 52rpx; +} +.uni-list.uni-active { + height: auto; +} + +/* 三行列表 */ +.uni-triplex-row { + display: flex; + flex: 1; + width: 100%; + box-sizing: border-box; + flex-direction: row; + padding: 22rpx 30rpx; +} +.uni-triplex-right, +.uni-triplex-left { + display: flex; + flex-direction: column; +} +.uni-triplex-left { + width: 84%; +} +.uni-triplex-left .uni-title{ + padding:8rpx 0; +} +.uni-triplex-left .uni-text, .uni-triplex-left .uni-text-small{color:#999999;} +.uni-triplex-right { + width: 16%; + text-align: right; +} + +/* 图文列表 */ +.uni-media-list { + padding: 22rpx 30rpx; + box-sizing: border-box; + display: flex; + width: 100%; + flex-direction: row; +} +.uni-navigate-right.uni-media-list { + padding-right: 74rpx; +} +.uni-pull-right { + flex-direction: row-reverse; +} +.uni-pull-right>.uni-media-list-logo { + margin-right: 0rpx; + margin-left: 20rpx; +} +.uni-media-list-logo { + height: 84rpx; + width: 84rpx; + margin-right: 20rpx; +} +.uni-media-list-logo image { + height: 100%; + width: 100%; +} +.uni-media-list-body { + height: 84rpx; + display: flex; + flex: 1; + flex-direction: column; + justify-content: space-between; + align-items: flex-start; + overflow: hidden; +} +.uni-media-list-text-top { + width: 100%; + line-height: 36rpx; + font-size: 30rpx; +} +.uni-media-list-text-bottom { + width: 100%; + line-height: 30rpx; + font-size: 26rpx; + color: #8f8f94; +} + +/* 九宫格 */ +.uni-grid-9 { + background: #f2f2f2; + width: 750rpx; + display: flex; + flex-direction: row; + flex-wrap: wrap; + border-top: 2rpx solid #eee; +} +.uni-grid-9-item { + width: 250rpx; + height: 200rpx; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + border-bottom: 2rpx solid; + border-right: 2rpx solid; + border-color: #eee; + box-sizing: border-box; +} +.no-border-right { + border-right: none; +} +.uni-grid-9-image { + width: 100rpx; + height: 100rpx; +} +.uni-grid-9-text { + width: 250rpx; + line-height: 4rpx; + height: 40rpx; + text-align: center; + font-size: 30rpx; +} +.uni-grid-9-item-hover { + background: rgba(0, 0, 0, 0.1); +} + +/* 上传 */ +.uni-uploader { + flex: 1; + flex-direction: column; +} +.uni-uploader-head { + display: flex; + flex-direction: row; + justify-content: space-between; +} +.uni-uploader-info { + color: #B2B2B2; +} +.uni-uploader-body { + margin-top: 16rpx; +} +.uni-uploader__files { + display: flex; + flex-direction: row; + flex-wrap: wrap; +} +.uni-uploader__file { + margin: 10rpx; + width: 210rpx; + height: 210rpx; +} +.uni-uploader__img { + display: block; + width: 210rpx; + height: 210rpx; +} +.uni-uploader__input-box { + position: relative; + margin:10rpx; + width: 208rpx; + height: 208rpx; + border: 2rpx solid #D9D9D9; +} +.uni-uploader__input-box:before, +.uni-uploader__input-box:after { + content: " "; + position: absolute; + top: 50%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + background-color: #D9D9D9; +} +.uni-uploader__input-box:before { + width: 4rpx; + height: 79rpx; +} +.uni-uploader__input-box:after { + width: 79rpx; + height: 4rpx; +} +.uni-uploader__input-box:active { + border-color: #999999; +} +.uni-uploader__input-box:active:before, +.uni-uploader__input-box:active:after { + background-color: #999999; +} +.uni-uploader__input { + position: absolute; + z-index: 1; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0; +} + +/*问题反馈*/ +.feedback-title { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + padding: 20rpx; + color: #8f8f94; + font-size: 28rpx; +} +.feedback-star-view.feedback-title { + justify-content: flex-start; + margin: 0; +} +.feedback-quick { + position: relative; + padding-right: 40rpx; +} +.feedback-quick:after { + font-family: uniicons; + font-size: 40rpx; + content: '\e581'; + position: absolute; + right: 0; + top: 50%; + color: #bbb; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); +} +.feedback-body { + background: #fff; +} +.feedback-textare { + height: 200rpx; + font-size: 34rpx; + line-height: 50rpx; + width: 100%; + box-sizing: border-box; + padding: 20rpx 30rpx 0; +} +.feedback-input { + font-size: 34rpx; + height: 50rpx; + min-height: 50rpx; + padding: 15rpx 20rpx; + line-height: 50rpx; +} +.feedback-uploader { + padding: 22rpx 20rpx; +} +.feedback-star { + font-family: uniicons; + font-size: 40rpx; + margin-left: 6rpx; +} +.feedback-star-view { + margin-left: 20rpx; +} +.feedback-star:after { + content: '\e408'; +} +.feedback-star.active { + color: #FFB400; +} +.feedback-star.active:after { + content: '\e438'; +} +.feedback-submit { + background: #007AFF; + color: #FFFFFF; + margin: 20rpx; +} + +/* input group */ +.uni-input-group { + position: relative; + padding: 0; + border: 0; + background-color: #fff; +} + +.uni-input-group:before { + position: absolute; + top: 0; + right: 0; + left: 0; + height: 2rpx; + content: ''; + transform: scaleY(.5); + background-color: #c8c7cc; +} + +.uni-input-group:after { + position: absolute; + right: 0; + bottom: 0; + left: 0; + height: 2rpx; + content: ''; + transform: scaleY(.5); + background-color: #c8c7cc; +} + +.uni-input-row { + position: relative; + display: flex; + flex-direction: row; + font-size:28rpx; + padding: 22rpx 30rpx; + justify-content: space-between; +} + +.uni-input-group .uni-input-row:after { + position: absolute; + right: 0; + bottom: 0; + left: 30rpx; + height: 2rpx; + content: ''; + transform: scaleY(.5); + background-color: #c8c7cc; +} + +.uni-input-row label { + line-height: 70rpx; +} + +/* textarea */ +.uni-textarea{ + width:100%; + background:#FFF; +} +.uni-textarea textarea{ + width:96%; + padding:18rpx 2%; + line-height:1.6; + font-size:28rpx; + height:150rpx; +} + +/* tab bar */ +.uni-tab-bar { + display: flex; + flex: 1; + flex-direction: column; + overflow: hidden; + height: 100%; +} + +.uni-tab-bar .list { + width: 750rpx; + height: 100%; +} + +.uni-swiper-tab { + width: 100%; + white-space: nowrap; + line-height: 100rpx; + height: 100rpx; + border-bottom: 1px solid #c8c7cc; +} + +.swiper-tab-list { + font-size: 30rpx; + width: 150rpx; + display: inline-block; + text-align: center; + color: #555; +} + +.uni-tab-bar .active { + color: #007AFF; +} + +.uni-tab-bar .swiper-box { + flex: 1; + width: 100%; + height: calc(100% - 100rpx); +} + +.uni-tab-bar-loading{ + padding:20rpx 0; +} + +/* comment */ +.uni-comment{padding:5rpx 0; display: flex; flex-grow:1; flex-direction: column;} +.uni-comment-list{flex-wrap:nowrap; padding:10rpx 0; margin:10rpx 0; width:100%; display: flex;} +.uni-comment-face{width:70rpx; height:70rpx; border-radius:100%; margin-right:20rpx; flex-shrink:0; overflow:hidden;} +.uni-comment-face image{width:100%; border-radius:100%;} +.uni-comment-body{width:100%;} +.uni-comment-top{line-height:1.5em; justify-content:space-between;} +.uni-comment-top text{color:#0A98D5; font-size:24rpx;} +.uni-comment-date{line-height:38rpx; flex-direction:row; justify-content:space-between; display:flex !important; flex-grow:1;} +.uni-comment-date view{color:#666666; font-size:24rpx; line-height:38rpx;} +.uni-comment-content{line-height:1.6em; font-size:28rpx; padding:8rpx 0;} +.uni-comment-replay-btn{background:#FFF; font-size:24rpx; line-height:28rpx; padding:5rpx 20rpx; border-radius:30rpx; color:#333 !important; margin:0 10rpx;} + +/* swiper msg */ +.uni-swiper-msg{width:100%; padding:12rpx 0; flex-wrap:nowrap; display:flex;} +.uni-swiper-msg-icon{width:50rpx; margin-right:20rpx;} +.uni-swiper-msg-icon image{width:100%; flex-shrink:0;} +.uni-swiper-msg swiper{width:100%; height:50rpx;} +.uni-swiper-msg swiper-item{line-height:50rpx;} + +/* product */ +.uni-product-list { + display: flex; + width: 100%; + flex-wrap: wrap; + flex-direction: row; +} + +.uni-product { + padding: 20rpx; + display: flex; + flex-direction: column; +} + +.image-view { + height: 330rpx; + width: 330rpx; + margin:12rpx 0; +} + +.uni-product-image { + height: 330rpx; + width: 330rpx; +} + +.uni-product-title { + width: 300rpx; + word-break: break-all; + display: -webkit-box; + overflow: hidden; + line-height:1.5; + text-overflow: ellipsis; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +.uni-product-price { + margin-top:10rpx; + font-size: 28rpx; + line-height:1.5; + position: relative; +} + +.uni-product-price-original { + color: #e80080; +} + +.uni-product-price-favour { + color: #888888; + text-decoration: line-through; + margin-left: 10rpx; +} + +.uni-product-tip { + position: absolute; + right: 10rpx; + background-color: #ff3333; + color: #ffffff; + padding: 0 10rpx; + border-radius: 5rpx; +} + +/* timeline */ +.uni-timeline { + margin: 35rpx 0; + display: flex; + flex-direction: column; + position: relative; + } + + + .uni-timeline-item { + display: flex; + flex-direction: row; + position: relative; + padding-bottom: 20rpx; + box-sizing: border-box; + overflow: hidden; + + } + + .uni-timeline-item .uni-timeline-item-keynode { + width: 160rpx; + flex-shrink: 0; + box-sizing: border-box; + padding-right: 20rpx; + text-align: right; + line-height: 65rpx; + } + + .uni-timeline-item .uni-timeline-item-divider { + flex-shrink: 0; + position: relative; + width: 30rpx; + height: 30rpx; + top: 15rpx; + border-radius: 50%; + background-color: #bbb; + } + + + + .uni-timeline-item-divider::before, + .uni-timeline-item-divider::after { + position: absolute; + left: 15rpx; + width: 1rpx; + height: 100vh; + content: ''; + background: inherit; + } + + .uni-timeline-item-divider::before { + bottom: 100%; + } + + .uni-timeline-item-divider::after { + top: 100%; + } + + + .uni-timeline-last-item .uni-timeline-item-divider:after { + display: none; + } + + .uni-timeline-first-item .uni-timeline-item-divider:before { + display: none; + } + + .uni-timeline-item .uni-timeline-item-content { + padding-left: 20rpx; + } + + .uni-timeline-last-item .bottom-border::after{ + display: none; + } + + .uni-timeline-item-content .datetime{ + color: #CCCCCC; + } + + /* 自定义节点颜色 */ + .uni-timeline-last-item .uni-timeline-item-divider{ + background-color: #1AAD19; + } + + +/* uni-icon */ + +.uni-icon { + font-family: uniicons; + font-size: 24px; + font-weight: normal; + font-style: normal; + line-height: 1; + display: inline-block; + text-decoration: none; + -webkit-font-smoothing: antialiased; +} + +.uni-icon.uni-active { + color: #007aff; +} + +.uni-icon-contact:before { + content: '\e100'; +} + +.uni-icon-person:before { + content: '\e101'; +} + +.uni-icon-personadd:before { + content: '\e102'; +} + +.uni-icon-contact-filled:before { + content: '\e130'; +} + +.uni-icon-person-filled:before { + content: '\e131'; +} + +.uni-icon-personadd-filled:before { + content: '\e132'; +} + +.uni-icon-phone:before { + content: '\e200'; +} + +.uni-icon-email:before { + content: '\e201'; +} + +.uni-icon-chatbubble:before { + content: '\e202'; +} + +.uni-icon-chatboxes:before { + content: '\e203'; +} + +.uni-icon-phone-filled:before { + content: '\e230'; +} + +.uni-icon-email-filled:before { + content: '\e231'; +} + +.uni-icon-chatbubble-filled:before { + content: '\e232'; +} + +.uni-icon-chatboxes-filled:before { + content: '\e233'; +} + +.uni-icon-weibo:before { + content: '\e260'; +} + +.uni-icon-weixin:before { + content: '\e261'; +} + +.uni-icon-pengyouquan:before { + content: '\e262'; +} + +.uni-icon-chat:before { + content: '\e263'; +} + +.uni-icon-qq:before { + content: '\e264'; +} + +.uni-icon-videocam:before { + content: '\e300'; +} + +.uni-icon-camera:before { + content: '\e301'; +} + +.uni-icon-mic:before { + content: '\e302'; +} + +.uni-icon-location:before { + content: '\e303'; +} + +.uni-icon-mic-filled:before, +.uni-icon-speech:before { + content: '\e332'; +} + +.uni-icon-location-filled:before { + content: '\e333'; +} + +.uni-icon-micoff:before { + content: '\e360'; +} + +.uni-icon-image:before { + content: '\e363'; +} + +.uni-icon-map:before { + content: '\e364'; +} + +.uni-icon-compose:before { + content: '\e400'; +} + +.uni-icon-trash:before { + content: '\e401'; +} + +.uni-icon-upload:before { + content: '\e402'; +} + +.uni-icon-download:before { + content: '\e403'; +} + +.uni-icon-close:before { + content: '\e404'; +} + +.uni-icon-redo:before { + content: '\e405'; +} + +.uni-icon-undo:before { + content: '\e406'; +} + +.uni-icon-refresh:before { + content: '\e407'; +} + +.uni-icon-star:before { + content: '\e408'; +} + +.uni-icon-plus:before { + content: '\e409'; +} + +.uni-icon-minus:before { + content: '\e410'; +} + +.uni-icon-circle:before, +.uni-icon-checkbox:before { + content: '\e411'; +} + +.uni-icon-close-filled:before, +.uni-icon-clear:before { + content: '\e434'; +} + +.uni-icon-refresh-filled:before { + content: '\e437'; +} + +.uni-icon-star-filled:before { + content: '\e438'; +} + +.uni-icon-plus-filled:before { + content: '\e439'; +} + +.uni-icon-minus-filled:before { + content: '\e440'; +} + +.uni-icon-circle-filled:before { + content: '\e441'; +} + +.uni-icon-checkbox-filled:before { + content: '\e442'; +} + +.uni-icon-closeempty:before { + content: '\e460'; +} + +.uni-icon-refreshempty:before { + content: '\e461'; +} + +.uni-icon-reload:before { + content: '\e462'; +} + +.uni-icon-starhalf:before { + content: '\e463'; +} + +.uni-icon-spinner:before { + content: '\e464'; +} + +.uni-icon-spinner-cycle:before { + content: '\e465'; +} + +.uni-icon-search:before { + content: '\e466'; +} + +.uni-icon-plusempty:before { + content: '\e468'; +} + +.uni-icon-forward:before { + content: '\e470'; +} + +.uni-icon-back:before, +.uni-icon-left-nav:before { + content: '\e471'; +} + +.uni-icon-checkmarkempty:before { + content: '\e472'; +} + +.uni-icon-home:before { + content: '\e500'; +} + +.uni-icon-navigate:before { + content: '\e501'; +} + +.uni-icon-gear:before { + content: '\e502'; +} + +.uni-icon-paperplane:before { + content: '\e503'; +} + +.uni-icon-info:before { + content: '\e504'; +} + +.uni-icon-help:before { + content: '\e505'; +} + +.uni-icon-locked:before { + content: '\e506'; +} + +.uni-icon-more:before { + content: '\e507'; +} + +.uni-icon-flag:before { + content: '\e508'; +} + +.uni-icon-home-filled:before { + content: '\e530'; +} + +.uni-icon-gear-filled:before { + content: '\e532'; +} + +.uni-icon-info-filled:before { + content: '\e534'; +} + +.uni-icon-help-filled:before { + content: '\e535'; +} + +.uni-icon-more-filled:before { + content: '\e537'; +} + +.uni-icon-settings:before { + content: '\e560'; +} + +.uni-icon-list:before { + content: '\e562'; +} + +.uni-icon-bars:before { + content: '\e563'; +} + +.uni-icon-loop:before { + content: '\e565'; +} + +.uni-icon-paperclip:before { + content: '\e567'; +} + +.uni-icon-eye:before { + content: '\e568'; +} + +.uni-icon-arrowup:before { + content: '\e580'; +} + +.uni-icon-arrowdown:before { + content: '\e581'; +} + +.uni-icon-arrowleft:before { + content: '\e582'; +} + +.uni-icon-arrowright:before { + content: '\e583'; +} + +.uni-icon-arrowthinup:before { + content: '\e584'; +} + +.uni-icon-arrowthindown:before { + content: '\e585'; +} + +.uni-icon-arrowthinleft:before { + content: '\e586'; +} + +.uni-icon-arrowthinright:before { + content: '\e587'; +} + +.uni-icon-pulldown:before { + content: '\e588'; +} + +.uni-icon-scan:before { + content: "\e612"; +} + +/* 分界线 */ +.uni-divider{ + height: 110rpx; + display: flex; + align-items:center; + justify-content: center; + position: relative; +} +.uni-divider__content{ + font-size: 28rpx; + color: #999; + padding: 0 20rpx; + position: relative; + z-index: 101; + background: #F4F5F6; +} +.uni-divider__line{ + background-color: #CCCCCC; + height: 1px; + width: 100%; + position: absolute; + z-index: 100; + top: 50%; + left: 0; + transform: translateY(50%); +} +======= + +/* view{ + font-size:28rpx; + line-height:1.8; +} */ +progress, checkbox-group{ + width: 100%; +} +form { + width: 100%; +} +.uni-flex { + display: flex; + flex-direction: row; +} +.uni-flex-item { + flex: 1; +} +.uni-row { + flex-direction: row; +} +.uni-column { + flex-direction: column; +} +.uni-link{ + color:#576B95; + font-size:26rpx; +} +.uni-center{ + text-align:center; +} +.uni-inline-item{ + display: flex; + flex-direction: row; + align-items:center; +} +.uni-inline-item text{ + margin-right: 20rpx; +} +.uni-inline-item text:last-child{ + margin-right: 0rpx; + margin-left: 20rpx; +} + +/* page */ +.common-page-head{ + padding:35rpx; + text-align: center; +} +.common-page-head-title { + display: inline-block; + padding: 0 40rpx; + font-size: 30rpx; + height: 88rpx; + line-height: 88rpx; + color: #BEBEBE; + box-sizing: border-box; + border-bottom: 2rpx solid #D8D8D8; +} + +.uni-padding-wrap{ + /* width:690rpx; */ + padding:0 30rpx; +} +.uni-word { + text-align: center; + padding:200rpx 100rpx; +} +.uni-title { + font-size:30rpx; + font-weight:500; + padding:20rpx 0; + line-height:1.5; +} +.uni-text{ + font-size:28rpx; +} +.uni-title text{ + font-size:24rpx; + color:#888; +} + +.uni-text-gray{ + color: #ccc; +} +.uni-text-small { + font-size:24rpx; +} +.uni-common-mb{ + margin-bottom:30rpx; +} +.uni-common-pb{ + padding-bottom:30rpx; +} +.uni-common-pl{ + padding-left:30rpx; +} +.uni-common-mt{ + margin-top:30rpx; +} +/* 背景色 */ +.uni-bg-red{ + background:#F76260; color:#FFF; +} +.uni-bg-green{ + background:#09BB07; color:#FFF; +} +.uni-bg-blue{ + background:#007AFF; color:#FFF; +} +/* 标题 */ +.uni-h1 {font-size: 80rpx; font-weight:700;} +.uni-h2 {font-size: 60rpx; font-weight:700;} +.uni-h3 {font-size: 48rpx; font-weight:700;} +.uni-h4 {font-size: 36rpx; font-weight:700;} +.uni-h5 {font-size: 28rpx; color: #8f8f94;} +.uni-h6 {font-size: 24rpx; color: #8f8f94;} +.uni-bold{font-weight:bold;} + +/* 文本溢出隐藏 */ +.uni-ellipsis {overflow: hidden; white-space: nowrap; text-overflow: ellipsis;} + +/* 竖向百分百按钮 */ +.uni-btn-v{ + padding:10rpx 0; +} +.uni-btn-v button{margin:20rpx 0;} + +/* 表单 */ +.uni-form-item{ + display:flex; + width:100%; + padding:10rpx 0; +} +.uni-form-item .title{ + padding:10rpx 25rpx; +} +.uni-label { + width: 210rpx; + word-wrap: break-word; + word-break: break-all; + text-indent:20rpx; +} +.uni-input { + height: 50rpx; + padding: 15rpx 25rpx; + line-height:50rpx; + font-size:28rpx; + background:#FFF; + flex: 1; +} +radio-group, checkbox-group{ + width:100%; +} +radio-group label, checkbox-group label{ + padding-right:20rpx; +} +.uni-form-item .with-fun{ + display:flex; + flex-wrap:nowrap; + background:#FFFFFF; +} +.uni-form-item .with-fun .uni-icon{ + width:40px; + height:80rpx; + line-height:80rpx; + flex-shrink:0; +} + +/* loadmore */ +.uni-loadmore{ + height:80rpx; + line-height:80rpx; + text-align:center; + padding-bottom:30rpx; +} +/*数字角标*/ +/* .uni-badge, +.uni-badge-default { + font-family: 'Helvetica Neue', Helvetica, sans-serif; + font-size: 12px; + line-height: 1; + display: inline-block; + padding: 3px 6px; + color: #333; + border-radius: 100px; + background-color: rgba(0, 0, 0, .15); +} */ +.uni-badge.uni-badge-inverted { + padding: 0 5px 0 0; + color: #929292; + background-color: transparent +} +.uni-badge-primary { + color: #fff; + background-color: #007aff +} +.uni-badge-blue.uni-badge-inverted, +.uni-badge-primary.uni-badge-inverted { + color: #007aff; + background-color: transparent +} +.uni-badge-green, +.uni-badge-success { + color: #fff; + background-color: #4cd964; +} +.uni-badge-green.uni-badge-inverted, +.uni-badge-success.uni-badge-inverted { + color: #4cd964; + background-color: transparent +} +.uni-badge-warning, +.uni-badge-yellow { + color: #fff; + background-color: #f0ad4e +} +.uni-badge-warning.uni-badge-inverted, +.uni-badge-yellow.uni-badge-inverted { + color: #f0ad4e; + background-color: transparent +} +.uni-badge-danger, +.uni-badge-red { + color: #fff; + background-color: #dd524d +} +.uni-badge-danger.uni-badge-inverted, +.uni-badge-red.uni-badge-inverted { + color: #dd524d; + background-color: transparent +} +.uni-badge-purple, +.uni-badge-royal { + color: #fff; + background-color: #8a6de9 +} +.uni-badge-purple.uni-badge-inverted, +.uni-badge-royal.uni-badge-inverted { + color: #8a6de9; + background-color: transparent +} + +/*折叠面板 */ +.uni-collapse-content { + height: 0; + width: 100%; + overflow: hidden; +} +.uni-collapse-content.uni-active { + height: auto; +} + +/*卡片视图 */ +.uni-card { + background: #fff; + border-radius: 8rpx; + margin:20rpx 0; + position: relative; + /* box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, .3); */ +} +.uni-card-content { + font-size: 30rpx; +} +.uni-card-content.image-view{ + width: 100%; + margin: 0; +} +.uni-card-content-inner { + position: relative; + padding: 30rpx; +} +.uni-card-footer, +.uni-card-header { + position: relative; + display: flex; + min-height: 50rpx; + padding: 20rpx 30rpx; + justify-content: space-between; + align-items: center; +} +.uni-card-header { + font-size: 36rpx; +} +.uni-card-footer { + color: #6d6d72; +} +.uni-card-footer:before, +.uni-card-header:after { + position: absolute; + top: 0; + right: 0; + left: 0; + height: 2rpx; + content: ''; + -webkit-transform: scaleY(.5); + transform: scaleY(.5); + background-color: #c8c7cc; +} +.uni-card-header:after { + top: auto; + bottom: 0; +} +.uni-card-media { + justify-content: flex-start; +} +.uni-card-media-logo { + height: 84rpx; + width: 84rpx; + margin-right: 20rpx; +} +.uni-card-media-body { + height: 84rpx; + display: flex; + flex-direction: column; + justify-content: space-between; + align-items: flex-start; +} +.uni-card-media-text-top { + line-height: 36rpx; + font-size: 34rpx; +} +.uni-card-media-text-bottom { + line-height: 30rpx; + font-size: 28rpx; + color: #8f8f94; +} +.uni-card-link { + color: #007AFF; +} + +/* 列表 */ +.uni-list { + background-color: #FFFFFF; + position: relative; + width: 100%; + display: flex; + flex-direction: column; +} +.uni-list:after { + position: absolute; + z-index: 10; + right: 0; + bottom: 0; + left: 0; + height: 1px; + content: ''; + -webkit-transform: scaleY(.5); + transform: scaleY(.5); + background-color: #c8c7cc; +} +/* .uni-list::before { + position: absolute; + z-index: 10; + right: 0; + top: 0; + left: 0; + height: 1px; + content: ''; + -webkit-transform: scaleY(.5); + transform: scaleY(.5); + background-color: #c8c7cc; +} */ +.uni-list-cell { + position: relative; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; +} +.uni-list-cell-hover { + background-color: #eee; +} +.uni-list-cell-pd { + padding: 22rpx 30rpx; +} +.uni-list-cell-left { + white-space: nowrap; + font-size:28rpx; + padding: 0 30rpx; +} +.uni-list-cell-db, +.uni-list-cell-right { + flex: 1; +} +.uni-list-cell::after { + position: absolute; + z-index: 3; + right: 0; + bottom: 0; + left: 30rpx; + height: 1px; + content: ''; + -webkit-transform: scaleY(.5); + transform: scaleY(.5); + background-color: #c8c7cc; +} +.uni-list .uni-list-cell:last-child::after { + height: 0rpx; +} +.uni-list-cell-last.uni-list-cell::after { + height: 0rpx; +} +.uni-list-cell-divider { + position: relative; + display: flex; + color: #999; + background-color: #f7f7f7; + padding:15rpx 20rpx; +} +.uni-list-cell-divider::before { + position: absolute; + right: 0; + top: 0; + left: 0; + height: 1px; + content: ''; + -webkit-transform: scaleY(.5); + transform: scaleY(.5); + background-color: #c8c7cc; +} +.uni-list-cell-divider::after { + position: absolute; + right: 0; + bottom: 0; + left: 0rpx; + height: 1px; + content: ''; + -webkit-transform: scaleY(.5); + transform: scaleY(.5); + background-color: #c8c7cc; +} +.uni-list-cell-navigate { + font-size:30rpx; + padding: 22rpx 30rpx; + line-height: 48rpx; + position: relative; + display: flex; + box-sizing: border-box; + width: 100%; + flex: 1; + justify-content: space-between; + align-items: center; +} +.uni-list-cell-navigate { + padding-right: 36rpx; +} +.uni-navigate-badge { + padding-right: 50rpx; +} +.uni-list-cell-navigate.uni-navigate-right:after { + font-family: uniicons; + content: '\e583'; + position: absolute; + right: 24rpx; + top: 50%; + color: #bbb; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); +} +.uni-list-cell-navigate.uni-navigate-bottom:after { + font-family: uniicons; + content: '\e581'; + position: absolute; + right: 24rpx; + top: 50%; + color: #bbb; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); +} +.uni-list-cell-navigate.uni-navigate-bottom.uni-active::after { + font-family: uniicons; + content: '\e580'; + position: absolute; + right: 24rpx; + top: 50%; + color: #bbb; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); +} +.uni-collapse.uni-list-cell { + flex-direction: column; +} +.uni-list-cell-navigate.uni-active { + background: #eee; +} +.uni-list.uni-collapse { + box-sizing: border-box; + height: 0; + overflow: hidden; +} +.uni-collapse .uni-list-cell { + padding-left: 20rpx; +} +.uni-collapse .uni-list-cell::after { + left: 52rpx; +} +.uni-list.uni-active { + height: auto; +} + +/* 三行列表 */ +.uni-triplex-row { + display: flex; + flex: 1; + width: 100%; + box-sizing: border-box; + flex-direction: row; + padding: 22rpx 30rpx; +} +.uni-triplex-right, +.uni-triplex-left { + display: flex; + flex-direction: column; +} +.uni-triplex-left { + width: 84%; +} +.uni-triplex-left .uni-title{ + padding:8rpx 0; +} +.uni-triplex-left .uni-text, .uni-triplex-left .uni-text-small{color:#999999;} +.uni-triplex-right { + width: 16%; + text-align: right; +} + +/* 图文列表 */ +.uni-media-list { + padding: 22rpx 30rpx; + box-sizing: border-box; + display: flex; + width: 100%; + flex-direction: row; +} +.uni-navigate-right.uni-media-list { + padding-right: 74rpx; +} +.uni-pull-right { + flex-direction: row-reverse; +} +.uni-pull-right>.uni-media-list-logo { + margin-right: 0rpx; + margin-left: 20rpx; +} +.uni-media-list-logo { + height: 84rpx; + width: 84rpx; + margin-right: 20rpx; +} +.uni-media-list-logo image { + height: 100%; + width: 100%; +} +.uni-media-list-body { + height: 84rpx; + display: flex; + flex: 1; + flex-direction: column; + justify-content: space-between; + align-items: flex-start; + overflow: hidden; +} +.uni-media-list-text-top { + width: 100%; + line-height: 36rpx; + font-size: 30rpx; +} +.uni-media-list-text-bottom { + width: 100%; + line-height: 30rpx; + font-size: 26rpx; + color: #8f8f94; +} + +/* 九宫格 */ +.uni-grid-9 { + background: #f2f2f2; + width: 750rpx; + display: flex; + flex-direction: row; + flex-wrap: wrap; + border-top: 2rpx solid #eee; +} +.uni-grid-9-item { + width: 250rpx; + height: 200rpx; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + border-bottom: 2rpx solid; + border-right: 2rpx solid; + border-color: #eee; + box-sizing: border-box; +} +.no-border-right { + border-right: none; +} +.uni-grid-9-image { + width: 100rpx; + height: 100rpx; +} +.uni-grid-9-text { + width: 250rpx; + line-height: 4rpx; + height: 40rpx; + text-align: center; + font-size: 30rpx; +} +.uni-grid-9-item-hover { + background: rgba(0, 0, 0, 0.1); +} + +/* 上传 */ +.uni-uploader { + flex: 1; + flex-direction: column; +} +.uni-uploader-head { + display: flex; + flex-direction: row; + justify-content: space-between; +} +.uni-uploader-info { + color: #B2B2B2; +} +.uni-uploader-body { + margin-top: 16rpx; +} +.uni-uploader__files { + display: flex; + flex-direction: row; + flex-wrap: wrap; +} +.uni-uploader__file { + margin: 10rpx; + width: 210rpx; + height: 210rpx; +} +.uni-uploader__img { + display: block; + width: 210rpx; + height: 210rpx; +} +.uni-uploader__input-box { + position: relative; + margin:10rpx; + width: 208rpx; + height: 208rpx; + border: 2rpx solid #D9D9D9; +} +.uni-uploader__input-box:before, +.uni-uploader__input-box:after { + content: " "; + position: absolute; + top: 50%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + background-color: #D9D9D9; +} +.uni-uploader__input-box:before { + width: 4rpx; + height: 79rpx; +} +.uni-uploader__input-box:after { + width: 79rpx; + height: 4rpx; +} +.uni-uploader__input-box:active { + border-color: #999999; +} +.uni-uploader__input-box:active:before, +.uni-uploader__input-box:active:after { + background-color: #999999; +} +.uni-uploader__input { + position: absolute; + z-index: 1; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0; +} + +/*问题反馈*/ +.feedback-title { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + padding: 20rpx; + color: #8f8f94; + font-size: 28rpx; +} +.feedback-star-view.feedback-title { + justify-content: flex-start; + margin: 0; +} +.feedback-quick { + position: relative; + padding-right: 40rpx; +} +.feedback-quick:after { + font-family: uniicons; + font-size: 40rpx; + content: '\e581'; + position: absolute; + right: 0; + top: 50%; + color: #bbb; + -webkit-transform: translateY(-50%); + transform: translateY(-50%); +} +.feedback-body { + background: #fff; +} +.feedback-textare { + height: 200rpx; + font-size: 34rpx; + line-height: 50rpx; + width: 100%; + box-sizing: border-box; + padding: 20rpx 30rpx 0; +} +.feedback-input { + font-size: 34rpx; + height: 50rpx; + min-height: 50rpx; + padding: 15rpx 20rpx; + line-height: 50rpx; +} +.feedback-uploader { + padding: 22rpx 20rpx; +} +.feedback-star { + font-family: uniicons; + font-size: 40rpx; + margin-left: 6rpx; +} +.feedback-star-view { + margin-left: 20rpx; +} +.feedback-star:after { + content: '\e408'; +} +.feedback-star.active { + color: #FFB400; +} +.feedback-star.active:after { + content: '\e438'; +} +.feedback-submit { + background: #007AFF; + color: #FFFFFF; + margin: 20rpx; +} + +/* input group */ +.uni-input-group { + position: relative; + padding: 0; + border: 0; + background-color: #fff; +} + +.uni-input-group:before { + position: absolute; + top: 0; + right: 0; + left: 0; + height: 2rpx; + content: ''; + transform: scaleY(.5); + background-color: #c8c7cc; +} + +.uni-input-group:after { + position: absolute; + right: 0; + bottom: 0; + left: 0; + height: 2rpx; + content: ''; + transform: scaleY(.5); + background-color: #c8c7cc; +} + +.uni-input-row { + position: relative; + display: flex; + flex-direction: row; + font-size:28rpx; + padding: 22rpx 30rpx; + justify-content: space-between; +} + +.uni-input-group .uni-input-row:after { + position: absolute; + right: 0; + bottom: 0; + left: 30rpx; + height: 2rpx; + content: ''; + transform: scaleY(.5); + background-color: #c8c7cc; +} + +.uni-input-row label { + line-height: 70rpx; +} + +/* textarea */ +.uni-textarea{ + width:100%; + background:#FFF; +} +.uni-textarea textarea{ + width:96%; + padding:18rpx 2%; + line-height:1.6; + font-size:28rpx; + height:150rpx; +} + +/* tab bar */ +.uni-tab-bar { + display: flex; + flex: 1; + flex-direction: column; + overflow: hidden; + height: 100%; +} + +.uni-tab-bar .list { + width: 750rpx; + height: 100%; +} + +.uni-swiper-tab { + width: 100%; + white-space: nowrap; + line-height: 100rpx; + height: 100rpx; + border-bottom: 1px solid #c8c7cc; +} + +.swiper-tab-list { + font-size: 30rpx; + width: 150rpx; + display: inline-block; + text-align: center; + color: #555; +} + +.uni-tab-bar .active { + color: #007AFF; +} + +.uni-tab-bar .swiper-box { + flex: 1; + width: 100%; + height: calc(100% - 100rpx); +} + +.uni-tab-bar-loading{ + padding:20rpx 0; +} + +/* comment */ +.uni-comment{padding:5rpx 0; display: flex; flex-grow:1; flex-direction: column;} +.uni-comment-list{flex-wrap:nowrap; padding:10rpx 0; margin:10rpx 0; width:100%; display: flex;} +.uni-comment-face{width:70rpx; height:70rpx; border-radius:100%; margin-right:20rpx; flex-shrink:0; overflow:hidden;} +.uni-comment-face image{width:100%; border-radius:100%;} +.uni-comment-body{width:100%;} +.uni-comment-top{line-height:1.5em; justify-content:space-between;} +.uni-comment-top text{color:#0A98D5; font-size:24rpx;} +.uni-comment-date{line-height:38rpx; flex-direction:row; justify-content:space-between; display:flex !important; flex-grow:1;} +.uni-comment-date view{color:#666666; font-size:24rpx; line-height:38rpx;} +.uni-comment-content{line-height:1.6em; font-size:28rpx; padding:8rpx 0;} +.uni-comment-replay-btn{background:#FFF; font-size:24rpx; line-height:28rpx; padding:5rpx 20rpx; border-radius:30rpx; color:#333 !important; margin:0 10rpx;} + +/* swiper msg */ +.uni-swiper-msg{width:100%; padding:12rpx 0; flex-wrap:nowrap; display:flex;} +.uni-swiper-msg-icon{width:50rpx; margin-right:20rpx;} +.uni-swiper-msg-icon image{width:100%; flex-shrink:0;} +.uni-swiper-msg swiper{width:100%; height:50rpx;} +.uni-swiper-msg swiper-item{line-height:50rpx;} + +/* product */ +.uni-product-list { + display: flex; + width: 100%; + flex-wrap: wrap; + flex-direction: row; +} + +.uni-product { + padding: 20rpx; + display: flex; + flex-direction: column; +} + +.image-view { + height: 330rpx; + width: 330rpx; + margin:12rpx 0; +} + +.uni-product-image { + height: 330rpx; + width: 330rpx; +} + +.uni-product-title { + width: 300rpx; + word-break: break-all; + display: -webkit-box; + overflow: hidden; + line-height:1.5; + text-overflow: ellipsis; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +.uni-product-price { + margin-top:10rpx; + font-size: 28rpx; + line-height:1.5; + position: relative; +} + +.uni-product-price-original { + color: #e80080; +} + +.uni-product-price-favour { + color: #888888; + text-decoration: line-through; + margin-left: 10rpx; +} + +.uni-product-tip { + position: absolute; + right: 10rpx; + background-color: #ff3333; + color: #ffffff; + padding: 0 10rpx; + border-radius: 5rpx; +} + +/* timeline */ +.uni-timeline { + margin: 35rpx 0; + display: flex; + flex-direction: column; + position: relative; + } + + + .uni-timeline-item { + display: flex; + flex-direction: row; + position: relative; + padding-bottom: 20rpx; + box-sizing: border-box; + overflow: hidden; + + } + + .uni-timeline-item .uni-timeline-item-keynode { + width: 160rpx; + flex-shrink: 0; + box-sizing: border-box; + padding-right: 20rpx; + text-align: right; + line-height: 65rpx; + } + + .uni-timeline-item .uni-timeline-item-divider { + flex-shrink: 0; + position: relative; + width: 30rpx; + height: 30rpx; + top: 15rpx; + border-radius: 50%; + background-color: #bbb; + } + + + + .uni-timeline-item-divider::before, + .uni-timeline-item-divider::after { + position: absolute; + left: 15rpx; + width: 1rpx; + height: 100vh; + content: ''; + background: inherit; + } + + .uni-timeline-item-divider::before { + bottom: 100%; + } + + .uni-timeline-item-divider::after { + top: 100%; + } + + + .uni-timeline-last-item .uni-timeline-item-divider:after { + display: none; + } + + .uni-timeline-first-item .uni-timeline-item-divider:before { + display: none; + } + + .uni-timeline-item .uni-timeline-item-content { + padding-left: 20rpx; + } + + .uni-timeline-last-item .bottom-border::after{ + display: none; + } + + .uni-timeline-item-content .datetime{ + color: #CCCCCC; + } + + /* 自定义节点颜色 */ + .uni-timeline-last-item .uni-timeline-item-divider{ + background-color: #1AAD19; + } + + +/* uni-icon */ + +.uni-icon { + font-family: uniicons; + font-size: 24px; + font-weight: normal; + font-style: normal; + line-height: 1; + display: inline-block; + text-decoration: none; + -webkit-font-smoothing: antialiased; +} + +.uni-icon.uni-active { + color: #007aff; +} + +.uni-icon-contact:before { + content: '\e100'; +} + +.uni-icon-person:before { + content: '\e101'; +} + +.uni-icon-personadd:before { + content: '\e102'; +} + +.uni-icon-contact-filled:before { + content: '\e130'; +} + +.uni-icon-person-filled:before { + content: '\e131'; +} + +.uni-icon-personadd-filled:before { + content: '\e132'; +} + +.uni-icon-phone:before { + content: '\e200'; +} + +.uni-icon-email:before { + content: '\e201'; +} + +.uni-icon-chatbubble:before { + content: '\e202'; +} + +.uni-icon-chatboxes:before { + content: '\e203'; +} + +.uni-icon-phone-filled:before { + content: '\e230'; +} + +.uni-icon-email-filled:before { + content: '\e231'; +} + +.uni-icon-chatbubble-filled:before { + content: '\e232'; +} + +.uni-icon-chatboxes-filled:before { + content: '\e233'; +} + +.uni-icon-weibo:before { + content: '\e260'; +} + +.uni-icon-weixin:before { + content: '\e261'; +} + +.uni-icon-pengyouquan:before { + content: '\e262'; +} + +.uni-icon-chat:before { + content: '\e263'; +} + +.uni-icon-qq:before { + content: '\e264'; +} + +.uni-icon-videocam:before { + content: '\e300'; +} + +.uni-icon-camera:before { + content: '\e301'; +} + +.uni-icon-mic:before { + content: '\e302'; +} + +.uni-icon-location:before { + content: '\e303'; +} + +.uni-icon-mic-filled:before, +.uni-icon-speech:before { + content: '\e332'; +} + +.uni-icon-location-filled:before { + content: '\e333'; +} + +.uni-icon-micoff:before { + content: '\e360'; +} + +.uni-icon-image:before { + content: '\e363'; +} + +.uni-icon-map:before { + content: '\e364'; +} + +.uni-icon-compose:before { + content: '\e400'; +} + +.uni-icon-trash:before { + content: '\e401'; +} + +.uni-icon-upload:before { + content: '\e402'; +} + +.uni-icon-download:before { + content: '\e403'; +} + +.uni-icon-close:before { + content: '\e404'; +} + +.uni-icon-redo:before { + content: '\e405'; +} + +.uni-icon-undo:before { + content: '\e406'; +} + +.uni-icon-refresh:before { + content: '\e407'; +} + +.uni-icon-star:before { + content: '\e408'; +} + +.uni-icon-plus:before { + content: '\e409'; +} + +.uni-icon-minus:before { + content: '\e410'; +} + +.uni-icon-circle:before, +.uni-icon-checkbox:before { + content: '\e411'; +} + +.uni-icon-close-filled:before, +.uni-icon-clear:before { + content: '\e434'; +} + +.uni-icon-refresh-filled:before { + content: '\e437'; +} + +.uni-icon-star-filled:before { + content: '\e438'; +} + +.uni-icon-plus-filled:before { + content: '\e439'; +} + +.uni-icon-minus-filled:before { + content: '\e440'; +} + +.uni-icon-circle-filled:before { + content: '\e441'; +} + +.uni-icon-checkbox-filled:before { + content: '\e442'; +} + +.uni-icon-closeempty:before { + content: '\e460'; +} + +.uni-icon-refreshempty:before { + content: '\e461'; +} + +.uni-icon-reload:before { + content: '\e462'; +} + +.uni-icon-starhalf:before { + content: '\e463'; +} + +.uni-icon-spinner:before { + content: '\e464'; +} + +.uni-icon-spinner-cycle:before { + content: '\e465'; +} + +.uni-icon-search:before { + content: '\e466'; +} + +.uni-icon-plusempty:before { + content: '\e468'; +} + +.uni-icon-forward:before { + content: '\e470'; +} + +.uni-icon-back:before, +.uni-icon-left-nav:before { + content: '\e471'; +} + +.uni-icon-checkmarkempty:before { + content: '\e472'; +} + +.uni-icon-home:before { + content: '\e500'; +} + +.uni-icon-navigate:before { + content: '\e501'; +} + +.uni-icon-gear:before { + content: '\e502'; +} + +.uni-icon-paperplane:before { + content: '\e503'; +} + +.uni-icon-info:before { + content: '\e504'; +} + +.uni-icon-help:before { + content: '\e505'; +} + +.uni-icon-locked:before { + content: '\e506'; +} + +.uni-icon-more:before { + content: '\e507'; +} + +.uni-icon-flag:before { + content: '\e508'; +} + +.uni-icon-home-filled:before { + content: '\e530'; +} + +.uni-icon-gear-filled:before { + content: '\e532'; +} + +.uni-icon-info-filled:before { + content: '\e534'; +} + +.uni-icon-help-filled:before { + content: '\e535'; +} + +.uni-icon-more-filled:before { + content: '\e537'; +} + +.uni-icon-settings:before { + content: '\e560'; +} + +.uni-icon-list:before { + content: '\e562'; +} + +.uni-icon-bars:before { + content: '\e563'; +} + +.uni-icon-loop:before { + content: '\e565'; +} + +.uni-icon-paperclip:before { + content: '\e567'; +} + +.uni-icon-eye:before { + content: '\e568'; +} + +.uni-icon-arrowup:before { + content: '\e580'; +} + +.uni-icon-arrowdown:before { + content: '\e581'; +} + +.uni-icon-arrowleft:before { + content: '\e582'; +} + +.uni-icon-arrowright:before { + content: '\e583'; +} + +.uni-icon-arrowthinup:before { + content: '\e584'; +} + +.uni-icon-arrowthindown:before { + content: '\e585'; +} + +.uni-icon-arrowthinleft:before { + content: '\e586'; +} + +.uni-icon-arrowthinright:before { + content: '\e587'; +} + +.uni-icon-pulldown:before { + content: '\e588'; +} + +.uni-icon-scan:before { + content: "\e612"; +} + +/* 分界线 */ +.uni-divider{ + height: 110rpx; + display: flex; + align-items:center; + justify-content: center; + position: relative; +} +.uni-divider__content{ + font-size: 28rpx; + color: #999; + padding: 0 20rpx; + position: relative; + z-index: 101; + background: #F4F5F6; +} +.uni-divider__line{ + background-color: #CCCCCC; + height: 1px; + width: 100%; + position: absolute; + z-index: 100; + top: 50%; + left: 0; + transform: translateY(50%); +} +>>>>>>> 037d254efd1aaafa570934df72b63b0ece0059af + +.left-win-active text{ + color: #007AFF !important; +} diff --git a/fe/PDA/common/util.js b/fe/PDA/common/util.js new file mode 100644 index 000000000..7740e5f15 --- /dev/null +++ b/fe/PDA/common/util.js @@ -0,0 +1,53 @@ +export default { + goHome() { + uni.reLaunch({ + url: '../index/index' + }) + }, + + getRemoveOption() { + let options = [{ + text: '移除', + style: { + backgroundColor: '#F56C6C' + } + }] + return options; + }, + + //提示是否消息 + showConfirmMsg(content, callback) { + uni.showModal({ + title: '提示', + cancelText: '否', + confirmText: '是', + content: content, + success: function(res) { + if (res.confirm) { + callback(true); + } else { + callback(false); + } + } + }) + }, + + compare(key) { + return function(a, b) { + var val1 = a[key]; + var val2 = b[key]; + return val2 - val1; + } + }, + + compareDesc(key) { + return function(a, b) { + var val1 = a[key]; + var val2 = b[key]; + return val1 - val2; + } + } + + + +} diff --git a/fe/PDA/common/utils.js b/fe/PDA/common/utils.js new file mode 100644 index 000000000..7f201dd93 --- /dev/null +++ b/fe/PDA/common/utils.js @@ -0,0 +1,6 @@ +export default { + // 判断 " " / null / undefined的方法 + isEmpty(text){ + return (!text || 0 === text.length); + } +} \ No newline at end of file diff --git a/fe/PDA/components/amap-wx/js/util.js b/fe/PDA/components/amap-wx/js/util.js new file mode 100644 index 000000000..65779df26 --- /dev/null +++ b/fe/PDA/components/amap-wx/js/util.js @@ -0,0 +1,181 @@ +import amap from '@/components/amap-wx/lib/amap-wx.js'; +// 地铁颜色图 +const line = { + '1号线': '#C43B33', + '2号线': '#016299', + '4号线/大兴线': '#008E9C', + '5号线': '#A42380', + '6号线': '#D09900', + '7号线': '#F2C172', + '8号线': '#009D6A', + '9号线': '#8FC41E', + '10号线': '#009DBE', + '13号线': '#F9E701', + '14号线东段': '#D4A7A2', + '14号线西段': '#D4A7A2', + '15号线': '#5D2D69', + '八通线': '#C33A32', + '昌平线': '#DE82B1', + '亦庄线': '#E40177', + '房山线': '#E66021', + '机场线': '#A29BBC', +} + +// 150500:地铁站 ,150700:公交站 , 190700:地名地址 +const typecode = [{ + id: '150500', + icon: 'icon-ditie' +}, { + id: '150700', + icon: 'icon-gongjiao' +}, { + id: '190700', + icon: 'icon-gonglu' +}]; + +const util = { + key:'b526b09b86cd2996e7732be8ab8c4430', + /** + * 初始化高德地图api + */ + mapInit() { + return new amap.AMapWX({ + key: this.key + }); + }, + // 服务状态吗 + typecode, + /** + * 获取地图颜色 + */ + lineColor(name) { + if (line[name]) { + return line[name]; + } else { + return '#ccc'; + } + }, + /** + * 关键字颜色变化 + */ + serachNmme(val, name) { + let namestr = new RegExp(val); + let nameresult = + `
+ ${name.replace(namestr, "" + val + '')} +
` + .trim(); + + return nameresult; + }, + /** + * 地址转地铁线路 + */ + addressToLine(address, type) { + let addr = address.split(';'); + let dt = ''; + addr.forEach(elm => { + let color = '#cccccc'; + if (type === typecode[0].id) { + color = this.lineColor(elm) + } else if (type === typecode[1].id) { + color = '#4075cb' + } + let style = 'margin:5px 0;margin-right:5px;padding:0 5px;background:' + color + + ';font-size:12px;color:#fff;border-radius:3px;'; + dt += `
${elm}
`; + + }); + return `
${dt}
`; + }, + /** + * 数据处理 + */ + dataHandle(item, val) { + // 改变字体颜色 + if (val) { + item.nameNodes = util.serachNmme(val, item.name); + } else { + item.nameNodes = `
${item.name}
`; + + } + // 地址解析 地铁 + if ( + item.typecode === util.typecode[0].id || + item.typecode === util.typecode[1].id + ) { + item.addressNodes = util.addressToLine(item.address, item.typecode); + if (item.typecode === util.typecode[0].id) { + item.icon = util.typecode[0].icon; + } else if (item.typecode === util.typecode[1].id) { + item.icon = util.typecode[1].icon; + } + } else { + item.addressNodes = `${item.district}${ + item.address.length > 0 ? '·' + item.address : '' + }`.trim(); + item.icon = 'icon-weizhi'; + } + + if (item.location && item.location.length === 0) { + item.icon = 'icon-sousuo'; + } + + return item; + }, + /** + * 存储历史数据 + * val [string | object]需要存储的内容 + */ + setHistory(val) { + let searchHistory = uni.getStorageSync('search:history'); + if (!searchHistory) searchHistory = []; + let serachData = {}; + if (typeof(val) === 'string') { + serachData = { + adcode: [], + address: [], + city: [], + district: [], + id: [], + location: [], + name: val, + typecode: [] + }; + } else { + serachData = val + } + + // 判断数组是否存在,如果存在,那么将放到最前面 + for (var i = 0; i < searchHistory.length; i++) { + if (searchHistory[i].name === serachData.name) { + searchHistory.splice(i, 1); + break; + } + } + + searchHistory.unshift(util.dataHandle(serachData)); + uni.setStorage({ + key: 'search:history', + data: searchHistory, + success: function() { + // console.log('success'); + } + }); + }, + getHistory() { + + }, + removeHistory() { + uni.removeStorage({ + key: 'search:history', + success: function(res) { + console.log('success'); + } + }); + return [] + } + +} + +export default util; diff --git a/fe/PDA/components/amap-wx/lib/amap-wx.js b/fe/PDA/components/amap-wx/lib/amap-wx.js new file mode 100644 index 000000000..e1ef2b206 --- /dev/null +++ b/fe/PDA/components/amap-wx/lib/amap-wx.js @@ -0,0 +1 @@ +function AMapWX(a){this.key=a.key,this.requestConfig={key:a.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"}}AMapWX.prototype.getWxLocation=function(a,b){wx.getLocation({type:"gcj02",success:function(a){var c=a.longitude+","+a.latitude;wx.setStorage({key:"userLocation",data:c}),b(c)},fail:function(c){wx.getStorage({key:"userLocation",success:function(a){a.data&&b(a.data)}}),a.fail({errCode:"0",errMsg:c.errMsg||""})}})},AMapWX.prototype.getRegeo=function(a){function c(c){var d=b.requestConfig;wx.request({url:"https://restapi.amap.com/v3/geocode/regeo",data:{key:b.key,location:c,extensions:"all",s:d.s,platform:d.platform,appname:b.key,sdkversion:d.sdkversion,logversion:d.logversion},method:"GET",header:{"content-type":"application/json"},success:function(b){var d,e,f,g,h,i,j,k,l;b.data.status&&"1"==b.data.status?(d=b.data.regeocode,e=d.addressComponent,f=[],g="",d&&d.roads[0]&&d.roads[0].name&&(g=d.roads[0].name+"附近"),h=c.split(",")[0],i=c.split(",")[1],d.pois&&d.pois[0]&&(g=d.pois[0].name+"附近",j=d.pois[0].location,j&&(h=parseFloat(j.split(",")[0]),i=parseFloat(j.split(",")[1]))),e.provice&&f.push(e.provice),e.city&&f.push(e.city),e.district&&f.push(e.district),e.streetNumber&&e.streetNumber.street&&e.streetNumber.number?(f.push(e.streetNumber.street),f.push(e.streetNumber.number)):(k="",d&&d.roads[0]&&d.roads[0].name&&(k=d.roads[0].name),f.push(k)),f=f.join(""),l=[{iconPath:a.iconPath,width:a.iconWidth,height:a.iconHeight,name:f,desc:g,longitude:h,latitude:i,id:0,regeocodeData:d}],a.success(l)):a.fail({errCode:b.data.infocode,errMsg:b.data.info})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})}var b=this;a.location?c(a.location):b.getWxLocation(a,function(a){c(a)})},AMapWX.prototype.getWeather=function(a){function d(d){var e="base";a.type&&"forecast"==a.type&&(e="all"),wx.request({url:"https://restapi.amap.com/v3/weather/weatherInfo",data:{key:b.key,city:d,extensions:e,s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion},method:"GET",header:{"content-type":"application/json"},success:function(b){function c(a){var b={city:{text:"城市",data:a.city},weather:{text:"天气",data:a.weather},temperature:{text:"温度",data:a.temperature},winddirection:{text:"风向",data:a.winddirection+"风"},windpower:{text:"风力",data:a.windpower+"级"},humidity:{text:"湿度",data:a.humidity+"%"}};return b}var d,e;b.data.status&&"1"==b.data.status?b.data.lives?(d=b.data.lives,d&&d.length>0&&(d=d[0],e=c(d),e["liveData"]=d,a.success(e))):b.data.forecasts&&b.data.forecasts[0]&&a.success({forecast:b.data.forecasts[0]}):a.fail({errCode:b.data.infocode,errMsg:b.data.info})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})}function e(e){wx.request({url:"https://restapi.amap.com/v3/geocode/regeo",data:{key:b.key,location:e,extensions:"all",s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion},method:"GET",header:{"content-type":"application/json"},success:function(b){var c,e;b.data.status&&"1"==b.data.status?(e=b.data.regeocode,e.addressComponent?c=e.addressComponent.adcode:e.aois&&e.aois.length>0&&(c=e.aois[0].adcode),d(c)):a.fail({errCode:b.data.infocode,errMsg:b.data.info})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})}var b=this,c=b.requestConfig;a.city?d(a.city):b.getWxLocation(a,function(a){e(a)})},AMapWX.prototype.getPoiAround=function(a){function d(d){var e={key:b.key,location:d,s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion};a.querytypes&&(e["types"]=a.querytypes),a.querykeywords&&(e["keywords"]=a.querykeywords),wx.request({url:"https://restapi.amap.com/v3/place/around",data:e,method:"GET",header:{"content-type":"application/json"},success:function(b){var c,d,e,f;if(b.data.status&&"1"==b.data.status){if(b=b.data,b&&b.pois){for(c=[],d=0;d + + + + + + + + + + + + + + + + diff --git a/fe/PDA/components/marked/index.js b/fe/PDA/components/marked/index.js new file mode 100644 index 000000000..33e56c3a9 --- /dev/null +++ b/fe/PDA/components/marked/index.js @@ -0,0 +1 @@ +export default './lib/marked' diff --git a/fe/PDA/components/marked/lib/marked.js b/fe/PDA/components/marked/lib/marked.js new file mode 100644 index 000000000..6a71e9201 --- /dev/null +++ b/fe/PDA/components/marked/lib/marked.js @@ -0,0 +1,1573 @@ +/** + * marked - a markdown parser + * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) + * https://github.com/markedjs/marked + */ + +;(function(root) { +'use strict'; + +/** + * Block-Level Grammar + */ + +var block = { + newline: /^\n+/, + code: /^( {4}[^\n]+\n*)+/, + fences: noop, + hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/, + heading: /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/, + nptable: noop, + blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/, + list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/, + html: '^ {0,3}(?:' // optional indentation + + '<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)' // (1) + + '|comment[^\\n]*(\\n+|$)' // (2) + + '|<\\?[\\s\\S]*?\\?>\\n*' // (3) + + '|\\n*' // (4) + + '|\\n*' // (5) + + '|)[\\s\\S]*?(?:\\n{2,}|$)' // (6) + + '|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)' // (7) open tag + + '|(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)' // (7) closing tag + + ')', + def: /^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/, + table: noop, + lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/, + paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/, + text: /^[^\n]+/ +}; + +block._label = /(?!\s*\])(?:\\[\[\]]|[^\[\]])+/; +block._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/; +block.def = edit(block.def) + .replace('label', block._label) + .replace('title', block._title) + .getRegex(); + +block.bullet = /(?:[*+-]|\d+\.)/; +block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/; +block.item = edit(block.item, 'gm') + .replace(/bull/g, block.bullet) + .getRegex(); + +block.list = edit(block.list) + .replace(/bull/g, block.bullet) + .replace('hr', '\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))') + .replace('def', '\\n+(?=' + block.def.source + ')') + .getRegex(); + +block._tag = 'address|article|aside|base|basefont|blockquote|body|caption' + + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption' + + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe' + + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option' + + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr' + + '|track|ul'; +block._comment = //; +block.html = edit(block.html, 'i') + .replace('comment', block._comment) + .replace('tag', block._tag) + .replace('attribute', / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/) + .getRegex(); + +block.paragraph = edit(block.paragraph) + .replace('hr', block.hr) + .replace('heading', block.heading) + .replace('lheading', block.lheading) + .replace('tag', block._tag) // pars can be interrupted by type (6) html blocks + .getRegex(); + +block.blockquote = edit(block.blockquote) + .replace('paragraph', block.paragraph) + .getRegex(); + +/** + * Normal Block Grammar + */ + +block.normal = merge({}, block); + +/** + * GFM Block Grammar + */ + +block.gfm = merge({}, block.normal, { + fences: /^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/, + paragraph: /^/, + heading: /^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/ +}); + +block.gfm.paragraph = edit(block.paragraph) + .replace('(?!', '(?!' + + block.gfm.fences.source.replace('\\1', '\\2') + '|' + + block.list.source.replace('\\1', '\\3') + '|') + .getRegex(); + +/** + * GFM + Tables Block Grammar + */ + +block.tables = merge({}, block.gfm, { + nptable: /^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/, + table: /^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/ +}); + +/** + * Pedantic grammar + */ + +block.pedantic = merge({}, block.normal, { + html: edit( + '^ *(?:comment *(?:\\n|\\s*$)' + + '|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)' // closed tag + + '|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))') + .replace('comment', block._comment) + .replace(/tag/g, '(?!(?:' + + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub' + + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)' + + '\\b)\\w+(?!:|[^\\w\\s@]*@)\\b') + .getRegex(), + def: /^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/ +}); + +/** + * Block Lexer + */ + +function Lexer(options) { + this.tokens = []; + this.tokens.links = Object.create(null); + this.options = options || marked.defaults; + this.rules = block.normal; + + if (this.options.pedantic) { + this.rules = block.pedantic; + } else if (this.options.gfm) { + if (this.options.tables) { + this.rules = block.tables; + } else { + this.rules = block.gfm; + } + } +} + +/** + * Expose Block Rules + */ + +Lexer.rules = block; + +/** + * Static Lex Method + */ + +Lexer.lex = function(src, options) { + var lexer = new Lexer(options); + return lexer.lex(src); +}; + +/** + * Preprocessing + */ + +Lexer.prototype.lex = function(src) { + src = src + .replace(/\r\n|\r/g, '\n') + .replace(/\t/g, ' ') + .replace(/\u00a0/g, ' ') + .replace(/\u2424/g, '\n'); + + return this.token(src, true); +}; + +/** + * Lexing + */ + +Lexer.prototype.token = function(src, top) { + src = src.replace(/^ +$/gm, ''); + var next, + loose, + cap, + bull, + b, + item, + listStart, + listItems, + t, + space, + i, + tag, + l, + isordered, + istask, + ischecked; + + while (src) { + // newline + if (cap = this.rules.newline.exec(src)) { + src = src.substring(cap[0].length); + if (cap[0].length > 1) { + this.tokens.push({ + type: 'space' + }); + } + } + + // code + if (cap = this.rules.code.exec(src)) { + src = src.substring(cap[0].length); + cap = cap[0].replace(/^ {4}/gm, ''); + this.tokens.push({ + type: 'code', + text: !this.options.pedantic + ? rtrim(cap, '\n') + : cap + }); + continue; + } + + // fences (gfm) + if (cap = this.rules.fences.exec(src)) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'code', + lang: cap[2], + text: cap[3] || '' + }); + continue; + } + + // heading + if (cap = this.rules.heading.exec(src)) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'heading', + depth: cap[1].length, + text: cap[2] + }); + continue; + } + + // table no leading pipe (gfm) + if (top && (cap = this.rules.nptable.exec(src))) { + item = { + type: 'table', + header: splitCells(cap[1].replace(/^ *| *\| *$/g, '')), + align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), + cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : [] + }; + + if (item.header.length === item.align.length) { + src = src.substring(cap[0].length); + + for (i = 0; i < item.align.length; i++) { + if (/^ *-+: *$/.test(item.align[i])) { + item.align[i] = 'right'; + } else if (/^ *:-+: *$/.test(item.align[i])) { + item.align[i] = 'center'; + } else if (/^ *:-+ *$/.test(item.align[i])) { + item.align[i] = 'left'; + } else { + item.align[i] = null; + } + } + + for (i = 0; i < item.cells.length; i++) { + item.cells[i] = splitCells(item.cells[i], item.header.length); + } + + this.tokens.push(item); + + continue; + } + } + + // hr + if (cap = this.rules.hr.exec(src)) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'hr' + }); + continue; + } + + // blockquote + if (cap = this.rules.blockquote.exec(src)) { + src = src.substring(cap[0].length); + + this.tokens.push({ + type: 'blockquote_start' + }); + + cap = cap[0].replace(/^ *> ?/gm, ''); + + // Pass `top` to keep the current + // "toplevel" state. This is exactly + // how markdown.pl works. + this.token(cap, top); + + this.tokens.push({ + type: 'blockquote_end' + }); + + continue; + } + + // list + if (cap = this.rules.list.exec(src)) { + src = src.substring(cap[0].length); + bull = cap[2]; + isordered = bull.length > 1; + + listStart = { + type: 'list_start', + ordered: isordered, + start: isordered ? +bull : '', + loose: false + }; + + this.tokens.push(listStart); + + // Get each top-level item. + cap = cap[0].match(this.rules.item); + + listItems = []; + next = false; + l = cap.length; + i = 0; + + for (; i < l; i++) { + item = cap[i]; + + // Remove the list item's bullet + // so it is seen as the next token. + space = item.length; + item = item.replace(/^ *([*+-]|\d+\.) +/, ''); + + // Outdent whatever the + // list item contains. Hacky. + if (~item.indexOf('\n ')) { + space -= item.length; + item = !this.options.pedantic + ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') + : item.replace(/^ {1,4}/gm, ''); + } + + // Determine whether the next list item belongs here. + // Backpedal if it does not belong in this list. + if (this.options.smartLists && i !== l - 1) { + b = block.bullet.exec(cap[i + 1])[0]; + if (bull !== b && !(bull.length > 1 && b.length > 1)) { + src = cap.slice(i + 1).join('\n') + src; + i = l - 1; + } + } + + // Determine whether item is loose or not. + // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/ + // for discount behavior. + loose = next || /\n\n(?!\s*$)/.test(item); + if (i !== l - 1) { + next = item.charAt(item.length - 1) === '\n'; + if (!loose) loose = next; + } + + if (loose) { + listStart.loose = true; + } + + // Check for task list items + istask = /^\[[ xX]\] /.test(item); + ischecked = undefined; + if (istask) { + ischecked = item[1] !== ' '; + item = item.replace(/^\[[ xX]\] +/, ''); + } + + t = { + type: 'list_item_start', + task: istask, + checked: ischecked, + loose: loose + }; + + listItems.push(t); + this.tokens.push(t); + + // Recurse. + this.token(item, false); + + this.tokens.push({ + type: 'list_item_end' + }); + } + + if (listStart.loose) { + l = listItems.length; + i = 0; + for (; i < l; i++) { + listItems[i].loose = true; + } + } + + this.tokens.push({ + type: 'list_end' + }); + + continue; + } + + // html + if (cap = this.rules.html.exec(src)) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: this.options.sanitize + ? 'paragraph' + : 'html', + pre: !this.options.sanitizer + && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'), + text: cap[0] + }); + continue; + } + + // def + if (top && (cap = this.rules.def.exec(src))) { + src = src.substring(cap[0].length); + if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1); + tag = cap[1].toLowerCase().replace(/\s+/g, ' '); + if (!this.tokens.links[tag]) { + this.tokens.links[tag] = { + href: cap[2], + title: cap[3] + }; + } + continue; + } + + // table (gfm) + if (top && (cap = this.rules.table.exec(src))) { + item = { + type: 'table', + header: splitCells(cap[1].replace(/^ *| *\| *$/g, '')), + align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), + cells: cap[3] ? cap[3].replace(/(?: *\| *)?\n$/, '').split('\n') : [] + }; + + if (item.header.length === item.align.length) { + src = src.substring(cap[0].length); + + for (i = 0; i < item.align.length; i++) { + if (/^ *-+: *$/.test(item.align[i])) { + item.align[i] = 'right'; + } else if (/^ *:-+: *$/.test(item.align[i])) { + item.align[i] = 'center'; + } else if (/^ *:-+ *$/.test(item.align[i])) { + item.align[i] = 'left'; + } else { + item.align[i] = null; + } + } + + for (i = 0; i < item.cells.length; i++) { + item.cells[i] = splitCells( + item.cells[i].replace(/^ *\| *| *\| *$/g, ''), + item.header.length); + } + + this.tokens.push(item); + + continue; + } + } + + // lheading + if (cap = this.rules.lheading.exec(src)) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'heading', + depth: cap[2] === '=' ? 1 : 2, + text: cap[1] + }); + continue; + } + + // top-level paragraph + if (top && (cap = this.rules.paragraph.exec(src))) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'paragraph', + text: cap[1].charAt(cap[1].length - 1) === '\n' + ? cap[1].slice(0, -1) + : cap[1] + }); + continue; + } + + // text + if (cap = this.rules.text.exec(src)) { + // Top-level should never reach here. + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'text', + text: cap[0] + }); + continue; + } + + if (src) { + throw new Error('Infinite loop on byte: ' + src.charCodeAt(0)); + } + } + + return this.tokens; +}; + +/** + * Inline-Level Grammar + */ + +var inline = { + escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, + autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/, + url: noop, + tag: '^comment' + + '|^' // self-closing tag + + '|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>' // open tag + + '|^<\\?[\\s\\S]*?\\?>' // processing instruction, e.g. + + '|^' // declaration, e.g. + + '|^', // CDATA section + link: /^!?\[(label)\]\(href(?:\s+(title))?\s*\)/, + reflink: /^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/, + nolink: /^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/, + strong: /^__([^\s])__(?!_)|^\*\*([^\s])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/, + em: /^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_)|^_([^\s_][\s\S]*?[^\s])_(?!_)|^\*([^\s"<\[][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/, + code: /^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/, + br: /^( {2,}|\\)\n(?!\s*$)/, + del: noop, + text: /^[\s\S]+?(?=[\\?@\[\]\\^_`{|}~])/g; + +inline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/; +inline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/; +inline.autolink = edit(inline.autolink) + .replace('scheme', inline._scheme) + .replace('email', inline._email) + .getRegex(); + +inline._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/; + +inline.tag = edit(inline.tag) + .replace('comment', block._comment) + .replace('attribute', inline._attribute) + .getRegex(); + +inline._label = /(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/; +inline._href = /\s*(<(?:\\[<>]?|[^\s<>\\])*>|(?:\\[()]?|\([^\s\x00-\x1f\\]*\)|[^\s\x00-\x1f()\\])*?)/; +inline._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/; + +inline.link = edit(inline.link) + .replace('label', inline._label) + .replace('href', inline._href) + .replace('title', inline._title) + .getRegex(); + +inline.reflink = edit(inline.reflink) + .replace('label', inline._label) + .getRegex(); + +/** + * Normal Inline Grammar + */ + +inline.normal = merge({}, inline); + +/** + * Pedantic Inline Grammar + */ + +inline.pedantic = merge({}, inline.normal, { + strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, + em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/, + link: edit(/^!?\[(label)\]\((.*?)\)/) + .replace('label', inline._label) + .getRegex(), + reflink: edit(/^!?\[(label)\]\s*\[([^\]]*)\]/) + .replace('label', inline._label) + .getRegex() +}); + +/** + * GFM Inline Grammar + */ + +inline.gfm = merge({}, inline.normal, { + escape: edit(inline.escape).replace('])', '~|])').getRegex(), + url: edit(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/) + .replace('email', inline._email) + .getRegex(), + _backpedal: /(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/, + del: /^~+(?=\S)([\s\S]*?\S)~+/, + text: edit(inline.text) + .replace(']|', '~]|') + .replace('|', '|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&\'*+/=?^_`{\\|}~-]+@|') + .getRegex() +}); + +/** + * GFM + Line Breaks Inline Grammar + */ + +inline.breaks = merge({}, inline.gfm, { + br: edit(inline.br).replace('{2,}', '*').getRegex(), + text: edit(inline.gfm.text).replace('{2,}', '*').getRegex() +}); + +/** + * Inline Lexer & Compiler + */ + +function InlineLexer(links, options) { + this.options = options || marked.defaults; + this.links = links; + this.rules = inline.normal; + this.renderer = this.options.renderer || new Renderer(); + this.renderer.options = this.options; + + if (!this.links) { + throw new Error('Tokens array requires a `links` property.'); + } + + if (this.options.pedantic) { + this.rules = inline.pedantic; + } else if (this.options.gfm) { + if (this.options.breaks) { + this.rules = inline.breaks; + } else { + this.rules = inline.gfm; + } + } +} + +/** + * Expose Inline Rules + */ + +InlineLexer.rules = inline; + +/** + * Static Lexing/Compiling Method + */ + +InlineLexer.output = function(src, links, options) { + var inline = new InlineLexer(links, options); + return inline.output(src); +}; + +/** + * Lexing/Compiling + */ + +InlineLexer.prototype.output = function(src) { + var out = '', + link, + text, + href, + title, + cap, + prevCapZero; + + while (src) { + // escape + if (cap = this.rules.escape.exec(src)) { + src = src.substring(cap[0].length); + out += cap[1]; + continue; + } + + // autolink + if (cap = this.rules.autolink.exec(src)) { + src = src.substring(cap[0].length); + if (cap[2] === '@') { + text = escape(this.mangle(cap[1])); + href = 'mailto:' + text; + } else { + text = escape(cap[1]); + href = text; + } + out += this.renderer.link(href, null, text); + continue; + } + + // url (gfm) + if (!this.inLink && (cap = this.rules.url.exec(src))) { + do { + prevCapZero = cap[0]; + cap[0] = this.rules._backpedal.exec(cap[0])[0]; + } while (prevCapZero !== cap[0]); + src = src.substring(cap[0].length); + if (cap[2] === '@') { + text = escape(cap[0]); + href = 'mailto:' + text; + } else { + text = escape(cap[0]); + if (cap[1] === 'www.') { + href = 'http://' + text; + } else { + href = text; + } + } + out += this.renderer.link(href, null, text); + continue; + } + + // tag + if (cap = this.rules.tag.exec(src)) { + if (!this.inLink && /^/i.test(cap[0])) { + this.inLink = false; + } + src = src.substring(cap[0].length); + out += this.options.sanitize + ? this.options.sanitizer + ? this.options.sanitizer(cap[0]) + : escape(cap[0]) + : cap[0] + continue; + } + + // link + if (cap = this.rules.link.exec(src)) { + src = src.substring(cap[0].length); + this.inLink = true; + href = cap[2]; + if (this.options.pedantic) { + link = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(href); + + if (link) { + href = link[1]; + title = link[3]; + } else { + title = ''; + } + } else { + title = cap[3] ? cap[3].slice(1, -1) : ''; + } + href = href.trim().replace(/^<([\s\S]*)>$/, '$1'); + out += this.outputLink(cap, { + href: InlineLexer.escapes(href), + title: InlineLexer.escapes(title) + }); + this.inLink = false; + continue; + } + + // reflink, nolink + if ((cap = this.rules.reflink.exec(src)) + || (cap = this.rules.nolink.exec(src))) { + src = src.substring(cap[0].length); + link = (cap[2] || cap[1]).replace(/\s+/g, ' '); + link = this.links[link.toLowerCase()]; + if (!link || !link.href) { + out += cap[0].charAt(0); + src = cap[0].substring(1) + src; + continue; + } + this.inLink = true; + out += this.outputLink(cap, link); + this.inLink = false; + continue; + } + + // strong + if (cap = this.rules.strong.exec(src)) { + src = src.substring(cap[0].length); + out += this.renderer.strong(this.output(cap[4] || cap[3] || cap[2] || cap[1])); + continue; + } + + // em + if (cap = this.rules.em.exec(src)) { + src = src.substring(cap[0].length); + out += this.renderer.em(this.output(cap[6] || cap[5] || cap[4] || cap[3] || cap[2] || cap[1])); + continue; + } + + // code + if (cap = this.rules.code.exec(src)) { + src = src.substring(cap[0].length); + out += this.renderer.codespan(escape(cap[2].trim(), true)); + continue; + } + + // br + if (cap = this.rules.br.exec(src)) { + src = src.substring(cap[0].length); + out += this.renderer.br(); + continue; + } + + // del (gfm) + if (cap = this.rules.del.exec(src)) { + src = src.substring(cap[0].length); + out += this.renderer.del(this.output(cap[1])); + continue; + } + + // text + if (cap = this.rules.text.exec(src)) { + src = src.substring(cap[0].length); + out += this.renderer.text(escape(this.smartypants(cap[0]))); + continue; + } + + if (src) { + throw new Error('Infinite loop on byte: ' + src.charCodeAt(0)); + } + } + + return out; +}; + +InlineLexer.escapes = function(text) { + return text ? text.replace(InlineLexer.rules._escapes, '$1') : text; +} + +/** + * Compile Link + */ + +InlineLexer.prototype.outputLink = function(cap, link) { + var href = link.href, + title = link.title ? escape(link.title) : null; + + return cap[0].charAt(0) !== '!' + ? this.renderer.link(href, title, this.output(cap[1])) + : this.renderer.image(href, title, escape(cap[1])); +}; + +/** + * Smartypants Transformations + */ + +InlineLexer.prototype.smartypants = function(text) { + if (!this.options.smartypants) return text; + return text + // em-dashes + .replace(/---/g, '\u2014') + // en-dashes + .replace(/--/g, '\u2013') + // opening singles + .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') + // closing singles & apostrophes + .replace(/'/g, '\u2019') + // opening doubles + .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c') + // closing doubles + .replace(/"/g, '\u201d') + // ellipses + .replace(/\.{3}/g, '\u2026'); +}; + +/** + * Mangle Links + */ + +InlineLexer.prototype.mangle = function(text) { + if (!this.options.mangle) return text; + var out = '', + l = text.length, + i = 0, + ch; + + for (; i < l; i++) { + ch = text.charCodeAt(i); + if (Math.random() > 0.5) { + ch = 'x' + ch.toString(16); + } + out += '&#' + ch + ';'; + } + + return out; +}; + +/** + * Renderer + */ + +function Renderer(options) { + this.options = options || marked.defaults; +} + +Renderer.prototype.code = function(code, lang, escaped) { + if (this.options.highlight) { + var out = this.options.highlight(code, lang); + if (out != null && out !== code) { + escaped = true; + code = out; + } + } + + if (!lang) { + return '
'
+      + (escaped ? code : escape(code, true))
+      + '
'; + } + + return '
'
+    + (escaped ? code : escape(code, true))
+    + '
\n'; +}; + +Renderer.prototype.blockquote = function(quote) { + return '
\n' + quote + '
\n'; +}; + +Renderer.prototype.html = function(html) { + return html; +}; + +Renderer.prototype.heading = function(text, level, raw) { + if (this.options.headerIds) { + return '' + + text + + '\n'; + } + // ignore IDs + return '' + text + '\n'; +}; + +Renderer.prototype.hr = function() { + return this.options.xhtml ? '
\n' : '
\n'; +}; + +Renderer.prototype.list = function(body, ordered, start) { + var type = ordered ? 'ol' : 'ul', + startatt = (ordered && start !== 1) ? (' start="' + start + '"') : ''; + return '<' + type + startatt + '>\n' + body + '\n'; +}; + +Renderer.prototype.listitem = function(text) { + return '
  • ' + text + '
  • \n'; +}; + +Renderer.prototype.checkbox = function(checked) { + return ' '; +} + +Renderer.prototype.paragraph = function(text) { + return '

    ' + text + '

    \n'; +}; + +Renderer.prototype.table = function(header, body) { + if (body) body = '' + body + ''; + + return '\n' + + '\n' + + header + + '\n' + + body + + '
    \n'; +}; + +Renderer.prototype.tablerow = function(content) { + return '\n' + content + '\n'; +}; + +Renderer.prototype.tablecell = function(content, flags) { + var type = flags.header ? 'th' : 'td'; + var tag = flags.align + ? '<' + type + ' align="' + flags.align + '">' + : '<' + type + '>'; + return tag + content + '\n'; +}; + +// span level renderer +Renderer.prototype.strong = function(text) { + return '' + text + ''; +}; + +Renderer.prototype.em = function(text) { + return '' + text + ''; +}; + +Renderer.prototype.codespan = function(text) { + return '' + text + ''; +}; + +Renderer.prototype.br = function() { + return this.options.xhtml ? '
    ' : '
    '; +}; + +Renderer.prototype.del = function(text) { + return '' + text + ''; +}; + +Renderer.prototype.link = function(href, title, text) { + if (this.options.sanitize) { + try { + var prot = decodeURIComponent(unescape(href)) + .replace(/[^\w:]/g, '') + .toLowerCase(); + } catch (e) { + return text; + } + if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) { + return text; + } + } + if (this.options.baseUrl && !originIndependentUrl.test(href)) { + href = resolveUrl(this.options.baseUrl, href); + } + try { + href = encodeURI(href).replace(/%25/g, '%'); + } catch (e) { + return text; + } + var out = '
    '; + return out; +}; + +Renderer.prototype.image = function(href, title, text) { + if (this.options.baseUrl && !originIndependentUrl.test(href)) { + href = resolveUrl(this.options.baseUrl, href); + } + var out = '' + text + '' : '>'; + return out; +}; + +Renderer.prototype.text = function(text) { + return text; +}; + +/** + * TextRenderer + * returns only the textual part of the token + */ + +function TextRenderer() {} + +// no need for block level renderers + +TextRenderer.prototype.strong = +TextRenderer.prototype.em = +TextRenderer.prototype.codespan = +TextRenderer.prototype.del = +TextRenderer.prototype.text = function (text) { + return text; +} + +TextRenderer.prototype.link = +TextRenderer.prototype.image = function(href, title, text) { + return '' + text; +} + +TextRenderer.prototype.br = function() { + return ''; +} + +/** + * Parsing & Compiling + */ + +function Parser(options) { + this.tokens = []; + this.token = null; + this.options = options || marked.defaults; + this.options.renderer = this.options.renderer || new Renderer(); + this.renderer = this.options.renderer; + this.renderer.options = this.options; +} + +/** + * Static Parse Method + */ + +Parser.parse = function(src, options) { + var parser = new Parser(options); + return parser.parse(src); +}; + +/** + * Parse Loop + */ + +Parser.prototype.parse = function(src) { + this.inline = new InlineLexer(src.links, this.options); + // use an InlineLexer with a TextRenderer to extract pure text + this.inlineText = new InlineLexer( + src.links, + merge({}, this.options, {renderer: new TextRenderer()}) + ); + this.tokens = src.reverse(); + + var out = ''; + while (this.next()) { + out += this.tok(); + } + + return out; +}; + +/** + * Next Token + */ + +Parser.prototype.next = function() { + return this.token = this.tokens.pop(); +}; + +/** + * Preview Next Token + */ + +Parser.prototype.peek = function() { + return this.tokens[this.tokens.length - 1] || 0; +}; + +/** + * Parse Text Tokens + */ + +Parser.prototype.parseText = function() { + var body = this.token.text; + + while (this.peek().type === 'text') { + body += '\n' + this.next().text; + } + + return this.inline.output(body); +}; + +/** + * Parse Current Token + */ + +Parser.prototype.tok = function() { + switch (this.token.type) { + case 'space': { + return ''; + } + case 'hr': { + return this.renderer.hr(); + } + case 'heading': { + return this.renderer.heading( + this.inline.output(this.token.text), + this.token.depth, + unescape(this.inlineText.output(this.token.text))); + } + case 'code': { + return this.renderer.code(this.token.text, + this.token.lang, + this.token.escaped); + } + case 'table': { + var header = '', + body = '', + i, + row, + cell, + j; + + // header + cell = ''; + for (i = 0; i < this.token.header.length; i++) { + cell += this.renderer.tablecell( + this.inline.output(this.token.header[i]), + { header: true, align: this.token.align[i] } + ); + } + header += this.renderer.tablerow(cell); + + for (i = 0; i < this.token.cells.length; i++) { + row = this.token.cells[i]; + + cell = ''; + for (j = 0; j < row.length; j++) { + cell += this.renderer.tablecell( + this.inline.output(row[j]), + { header: false, align: this.token.align[j] } + ); + } + + body += this.renderer.tablerow(cell); + } + return this.renderer.table(header, body); + } + case 'blockquote_start': { + body = ''; + + while (this.next().type !== 'blockquote_end') { + body += this.tok(); + } + + return this.renderer.blockquote(body); + } + case 'list_start': { + body = ''; + var ordered = this.token.ordered, + start = this.token.start; + + while (this.next().type !== 'list_end') { + body += this.tok(); + } + + return this.renderer.list(body, ordered, start); + } + case 'list_item_start': { + body = ''; + var loose = this.token.loose; + + if (this.token.task) { + body += this.renderer.checkbox(this.token.checked); + } + + while (this.next().type !== 'list_item_end') { + body += !loose && this.token.type === 'text' + ? this.parseText() + : this.tok(); + } + + return this.renderer.listitem(body); + } + case 'html': { + // TODO parse inline content if parameter markdown=1 + return this.renderer.html(this.token.text); + } + case 'paragraph': { + return this.renderer.paragraph(this.inline.output(this.token.text)); + } + case 'text': { + return this.renderer.paragraph(this.parseText()); + } + } +}; + +/** + * Helpers + */ + +function escape(html, encode) { + return html + .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"') + .replace(/'/g, '''); +} + +function unescape(html) { + // explicitly match decimal, hex, and named HTML entities + return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, function(_, n) { + n = n.toLowerCase(); + if (n === 'colon') return ':'; + if (n.charAt(0) === '#') { + return n.charAt(1) === 'x' + ? String.fromCharCode(parseInt(n.substring(2), 16)) + : String.fromCharCode(+n.substring(1)); + } + return ''; + }); +} + +function edit(regex, opt) { + regex = regex.source || regex; + opt = opt || ''; + return { + replace: function(name, val) { + val = val.source || val; + val = val.replace(/(^|[^\[])\^/g, '$1'); + regex = regex.replace(name, val); + return this; + }, + getRegex: function() { + return new RegExp(regex, opt); + } + }; +} + +function resolveUrl(base, href) { + if (!baseUrls[' ' + base]) { + // we can ignore everything in base after the last slash of its path component, + // but we might need to add _that_ + // https://tools.ietf.org/html/rfc3986#section-3 + if (/^[^:]+:\/*[^/]*$/.test(base)) { + baseUrls[' ' + base] = base + '/'; + } else { + baseUrls[' ' + base] = rtrim(base, '/', true); + } + } + base = baseUrls[' ' + base]; + + if (href.slice(0, 2) === '//') { + return base.replace(/:[\s\S]*/, ':') + href; + } else if (href.charAt(0) === '/') { + return base.replace(/(:\/*[^/]*)[\s\S]*/, '$1') + href; + } else { + return base + href; + } +} +var baseUrls = {}; +var originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i; + +function noop() {} +noop.exec = noop; + +function merge(obj) { + var i = 1, + target, + key; + + for (; i < arguments.length; i++) { + target = arguments[i]; + for (key in target) { + if (Object.prototype.hasOwnProperty.call(target, key)) { + obj[key] = target[key]; + } + } + } + + return obj; +} + +function splitCells(tableRow, count) { + // ensure that every cell-delimiting pipe has a space + // before it to distinguish it from an escaped pipe + var row = tableRow.replace(/\|/g, function (match, offset, str) { + var escaped = false, + curr = offset; + while (--curr >= 0 && str[curr] === '\\') escaped = !escaped; + if (escaped) { + // odd number of slashes means | is escaped + // so we leave it alone + return '|'; + } else { + // add space before unescaped | + return ' |'; + } + }), + cells = row.split(/ \|/), + i = 0; + + if (cells.length > count) { + cells.splice(count); + } else { + while (cells.length < count) cells.push(''); + } + + for (; i < cells.length; i++) { + // leading or trailing whitespace is ignored per the gfm spec + cells[i] = cells[i].trim().replace(/\\\|/g, '|'); + } + return cells; +} + +// Remove trailing 'c's. Equivalent to str.replace(/c*$/, ''). +// /c*$/ is vulnerable to REDOS. +// invert: Remove suffix of non-c chars instead. Default falsey. +function rtrim(str, c, invert) { + if (str.length === 0) { + return ''; + } + + // Length of suffix matching the invert condition. + var suffLen = 0; + + // Step left until we fail to match the invert condition. + while (suffLen < str.length) { + var currChar = str.charAt(str.length - suffLen - 1); + if (currChar === c && !invert) { + suffLen++; + } else if (currChar !== c && invert) { + suffLen++; + } else { + break; + } + } + + return str.substr(0, str.length - suffLen); +} + +/** + * Marked + */ + +function marked(src, opt, callback) { + // throw error in case of non string input + if (typeof src === 'undefined' || src === null) { + throw new Error('marked(): input parameter is undefined or null'); + } + if (typeof src !== 'string') { + throw new Error('marked(): input parameter is of type ' + + Object.prototype.toString.call(src) + ', string expected'); + } + + if (callback || typeof opt === 'function') { + if (!callback) { + callback = opt; + opt = null; + } + + opt = merge({}, marked.defaults, opt || {}); + + var highlight = opt.highlight, + tokens, + pending, + i = 0; + + try { + tokens = Lexer.lex(src, opt) + } catch (e) { + return callback(e); + } + + pending = tokens.length; + + var done = function(err) { + if (err) { + opt.highlight = highlight; + return callback(err); + } + + var out; + + try { + out = Parser.parse(tokens, opt); + } catch (e) { + err = e; + } + + opt.highlight = highlight; + + return err + ? callback(err) + : callback(null, out); + }; + + if (!highlight || highlight.length < 3) { + return done(); + } + + delete opt.highlight; + + if (!pending) return done(); + + for (; i < tokens.length; i++) { + (function(token) { + if (token.type !== 'code') { + return --pending || done(); + } + return highlight(token.text, token.lang, function(err, code) { + if (err) return done(err); + if (code == null || code === token.text) { + return --pending || done(); + } + token.text = code; + token.escaped = true; + --pending || done(); + }); + })(tokens[i]); + } + + return; + } + try { + if (opt) opt = merge({}, marked.defaults, opt); + return Parser.parse(Lexer.lex(src, opt), opt); + } catch (e) { + e.message += '\nPlease report this to https://github.com/markedjs/marked.'; + if ((opt || marked.defaults).silent) { + return '

    An error occurred:

    '
    +        + escape(e.message + '', true)
    +        + '
    '; + } + throw e; + } +} + +/** + * Options + */ + +marked.options = +marked.setOptions = function(opt) { + merge(marked.defaults, opt); + return marked; +}; + +marked.getDefaults = function () { + return { + baseUrl: null, + breaks: false, + gfm: true, + headerIds: true, + headerPrefix: '', + highlight: null, + langPrefix: 'language-', + mangle: true, + pedantic: false, + renderer: new Renderer(), + sanitize: false, + sanitizer: null, + silent: false, + smartLists: false, + smartypants: false, + tables: true, + xhtml: false + }; +} + +marked.defaults = marked.getDefaults(); + +/** + * Expose + */ + +marked.Parser = Parser; +marked.parser = Parser.parse; + +marked.Renderer = Renderer; +marked.TextRenderer = TextRenderer; + +marked.Lexer = Lexer; +marked.lexer = Lexer.lex; + +marked.InlineLexer = InlineLexer; +marked.inlineLexer = InlineLexer.output; + +marked.parse = marked; + +if (typeof module !== 'undefined' && typeof exports === 'object') { + module.exports = marked; +} else if (typeof define === 'function' && define.amd) { + define(function() { return marked; }); +} else { + root.marked = marked; +} +})(this || (typeof window !== 'undefined' ? window : global)); diff --git a/fe/PDA/components/mpvue-citypicker/city-data/area.js b/fe/PDA/components/mpvue-citypicker/city-data/area.js new file mode 100644 index 000000000..92dfc30a1 --- /dev/null +++ b/fe/PDA/components/mpvue-citypicker/city-data/area.js @@ -0,0 +1,12542 @@ +/* eslint-disable */ +var areaData = [ + [ + [{ + "label": "东城区", + "value": "110101" + }, + { + "label": "西城区", + "value": "110102" + }, + { + "label": "朝阳区", + "value": "110105" + }, + { + "label": "丰台区", + "value": "110106" + }, + { + "label": "石景山区", + "value": "110107" + }, + { + "label": "海淀区", + "value": "110108" + }, + { + "label": "门头沟区", + "value": "110109" + }, + { + "label": "房山区", + "value": "110111" + }, + { + "label": "通州区", + "value": "110112" + }, + { + "label": "顺义区", + "value": "110113" + }, + { + "label": "昌平区", + "value": "110114" + }, + { + "label": "大兴区", + "value": "110115" + }, + { + "label": "怀柔区", + "value": "110116" + }, + { + "label": "平谷区", + "value": "110117" + }, + { + "label": "密云区", + "value": "110118" + }, + { + "label": "延庆区", + "value": "110119" + } + ] + ], + [ + [{ + "label": "和平区", + "value": "120101" + }, + { + "label": "河东区", + "value": "120102" + }, + { + "label": "河西区", + "value": "120103" + }, + { + "label": "南开区", + "value": "120104" + }, + { + "label": "河北区", + "value": "120105" + }, + { + "label": "红桥区", + "value": "120106" + }, + { + "label": "东丽区", + "value": "120110" + }, + { + "label": "西青区", + "value": "120111" + }, + { + "label": "津南区", + "value": "120112" + }, + { + "label": "北辰区", + "value": "120113" + }, + { + "label": "武清区", + "value": "120114" + }, + { + "label": "宝坻区", + "value": "120115" + }, + { + "label": "滨海新区", + "value": "120116" + }, + { + "label": "宁河区", + "value": "120117" + }, + { + "label": "静海区", + "value": "120118" + }, + { + "label": "蓟州区", + "value": "120119" + } + ] + ], + [ + [{ + "label": "长安区", + "value": "130102" + }, + { + "label": "桥西区", + "value": "130104" + }, + { + "label": "新华区", + "value": "130105" + }, + { + "label": "井陉矿区", + "value": "130107" + }, + { + "label": "裕华区", + "value": "130108" + }, + { + "label": "藁城区", + "value": "130109" + }, + { + "label": "鹿泉区", + "value": "130110" + }, + { + "label": "栾城区", + "value": "130111" + }, + { + "label": "井陉县", + "value": "130121" + }, + { + "label": "正定县", + "value": "130123" + }, + { + "label": "行唐县", + "value": "130125" + }, + { + "label": "灵寿县", + "value": "130126" + }, + { + "label": "高邑县", + "value": "130127" + }, + { + "label": "深泽县", + "value": "130128" + }, + { + "label": "赞皇县", + "value": "130129" + }, + { + "label": "无极县", + "value": "130130" + }, + { + "label": "平山县", + "value": "130131" + }, + { + "label": "元氏县", + "value": "130132" + }, + { + "label": "赵县", + "value": "130133" + }, + { + "label": "石家庄高新技术产业开发区", + "value": "130171" + }, + { + "label": "石家庄循环化工园区", + "value": "130172" + }, + { + "label": "辛集市", + "value": "130181" + }, + { + "label": "晋州市", + "value": "130183" + }, + { + "label": "新乐市", + "value": "130184" + } + ], + [{ + "label": "路南区", + "value": "130202" + }, + { + "label": "路北区", + "value": "130203" + }, + { + "label": "古冶区", + "value": "130204" + }, + { + "label": "开平区", + "value": "130205" + }, + { + "label": "丰南区", + "value": "130207" + }, + { + "label": "丰润区", + "value": "130208" + }, + { + "label": "曹妃甸区", + "value": "130209" + }, + { + "label": "滦县", + "value": "130223" + }, + { + "label": "滦南县", + "value": "130224" + }, + { + "label": "乐亭县", + "value": "130225" + }, + { + "label": "迁西县", + "value": "130227" + }, + { + "label": "玉田县", + "value": "130229" + }, + { + "label": "唐山市芦台经济技术开发区", + "value": "130271" + }, + { + "label": "唐山市汉沽管理区", + "value": "130272" + }, + { + "label": "唐山高新技术产业开发区", + "value": "130273" + }, + { + "label": "河北唐山海港经济开发区", + "value": "130274" + }, + { + "label": "遵化市", + "value": "130281" + }, + { + "label": "迁安市", + "value": "130283" + } + ], + [{ + "label": "海港区", + "value": "130302" + }, + { + "label": "山海关区", + "value": "130303" + }, + { + "label": "北戴河区", + "value": "130304" + }, + { + "label": "抚宁区", + "value": "130306" + }, + { + "label": "青龙满族自治县", + "value": "130321" + }, + { + "label": "昌黎县", + "value": "130322" + }, + { + "label": "卢龙县", + "value": "130324" + }, + { + "label": "秦皇岛市经济技术开发区", + "value": "130371" + }, + { + "label": "北戴河新区", + "value": "130372" + } + ], + [{ + "label": "邯山区", + "value": "130402" + }, + { + "label": "丛台区", + "value": "130403" + }, + { + "label": "复兴区", + "value": "130404" + }, + { + "label": "峰峰矿区", + "value": "130406" + }, + { + "label": "肥乡区", + "value": "130407" + }, + { + "label": "永年区", + "value": "130408" + }, + { + "label": "临漳县", + "value": "130423" + }, + { + "label": "成安县", + "value": "130424" + }, + { + "label": "大名县", + "value": "130425" + }, + { + "label": "涉县", + "value": "130426" + }, + { + "label": "磁县", + "value": "130427" + }, + { + "label": "邱县", + "value": "130430" + }, + { + "label": "鸡泽县", + "value": "130431" + }, + { + "label": "广平县", + "value": "130432" + }, + { + "label": "馆陶县", + "value": "130433" + }, + { + "label": "魏县", + "value": "130434" + }, + { + "label": "曲周县", + "value": "130435" + }, + { + "label": "邯郸经济技术开发区", + "value": "130471" + }, + { + "label": "邯郸冀南新区", + "value": "130473" + }, + { + "label": "武安市", + "value": "130481" + } + ], + [{ + "label": "桥东区", + "value": "130502" + }, + { + "label": "桥西区", + "value": "130503" + }, + { + "label": "邢台县", + "value": "130521" + }, + { + "label": "临城县", + "value": "130522" + }, + { + "label": "内丘县", + "value": "130523" + }, + { + "label": "柏乡县", + "value": "130524" + }, + { + "label": "隆尧县", + "value": "130525" + }, + { + "label": "任县", + "value": "130526" + }, + { + "label": "南和县", + "value": "130527" + }, + { + "label": "宁晋县", + "value": "130528" + }, + { + "label": "巨鹿县", + "value": "130529" + }, + { + "label": "新河县", + "value": "130530" + }, + { + "label": "广宗县", + "value": "130531" + }, + { + "label": "平乡县", + "value": "130532" + }, + { + "label": "威县", + "value": "130533" + }, + { + "label": "清河县", + "value": "130534" + }, + { + "label": "临西县", + "value": "130535" + }, + { + "label": "河北邢台经济开发区", + "value": "130571" + }, + { + "label": "南宫市", + "value": "130581" + }, + { + "label": "沙河市", + "value": "130582" + } + ], + [{ + "label": "竞秀区", + "value": "130602" + }, + { + "label": "莲池区", + "value": "130606" + }, + { + "label": "满城区", + "value": "130607" + }, + { + "label": "清苑区", + "value": "130608" + }, + { + "label": "徐水区", + "value": "130609" + }, + { + "label": "涞水县", + "value": "130623" + }, + { + "label": "阜平县", + "value": "130624" + }, + { + "label": "定兴县", + "value": "130626" + }, + { + "label": "唐县", + "value": "130627" + }, + { + "label": "高阳县", + "value": "130628" + }, + { + "label": "容城县", + "value": "130629" + }, + { + "label": "涞源县", + "value": "130630" + }, + { + "label": "望都县", + "value": "130631" + }, + { + "label": "安新县", + "value": "130632" + }, + { + "label": "易县", + "value": "130633" + }, + { + "label": "曲阳县", + "value": "130634" + }, + { + "label": "蠡县", + "value": "130635" + }, + { + "label": "顺平县", + "value": "130636" + }, + { + "label": "博野县", + "value": "130637" + }, + { + "label": "雄县", + "value": "130638" + }, + { + "label": "保定高新技术产业开发区", + "value": "130671" + }, + { + "label": "保定白沟新城", + "value": "130672" + }, + { + "label": "涿州市", + "value": "130681" + }, + { + "label": "定州市", + "value": "130682" + }, + { + "label": "安国市", + "value": "130683" + }, + { + "label": "高碑店市", + "value": "130684" + } + ], + [{ + "label": "桥东区", + "value": "130702" + }, + { + "label": "桥西区", + "value": "130703" + }, + { + "label": "宣化区", + "value": "130705" + }, + { + "label": "下花园区", + "value": "130706" + }, + { + "label": "万全区", + "value": "130708" + }, + { + "label": "崇礼区", + "value": "130709" + }, + { + "label": "张北县", + "value": "130722" + }, + { + "label": "康保县", + "value": "130723" + }, + { + "label": "沽源县", + "value": "130724" + }, + { + "label": "尚义县", + "value": "130725" + }, + { + "label": "蔚县", + "value": "130726" + }, + { + "label": "阳原县", + "value": "130727" + }, + { + "label": "怀安县", + "value": "130728" + }, + { + "label": "怀来县", + "value": "130730" + }, + { + "label": "涿鹿县", + "value": "130731" + }, + { + "label": "赤城县", + "value": "130732" + }, + { + "label": "张家口市高新技术产业开发区", + "value": "130771" + }, + { + "label": "张家口市察北管理区", + "value": "130772" + }, + { + "label": "张家口市塞北管理区", + "value": "130773" + } + ], + [{ + "label": "双桥区", + "value": "130802" + }, + { + "label": "双滦区", + "value": "130803" + }, + { + "label": "鹰手营子矿区", + "value": "130804" + }, + { + "label": "承德县", + "value": "130821" + }, + { + "label": "兴隆县", + "value": "130822" + }, + { + "label": "滦平县", + "value": "130824" + }, + { + "label": "隆化县", + "value": "130825" + }, + { + "label": "丰宁满族自治县", + "value": "130826" + }, + { + "label": "宽城满族自治县", + "value": "130827" + }, + { + "label": "围场满族蒙古族自治县", + "value": "130828" + }, + { + "label": "承德高新技术产业开发区", + "value": "130871" + }, + { + "label": "平泉市", + "value": "130881" + } + ], + [{ + "label": "新华区", + "value": "130902" + }, + { + "label": "运河区", + "value": "130903" + }, + { + "label": "沧县", + "value": "130921" + }, + { + "label": "青县", + "value": "130922" + }, + { + "label": "东光县", + "value": "130923" + }, + { + "label": "海兴县", + "value": "130924" + }, + { + "label": "盐山县", + "value": "130925" + }, + { + "label": "肃宁县", + "value": "130926" + }, + { + "label": "南皮县", + "value": "130927" + }, + { + "label": "吴桥县", + "value": "130928" + }, + { + "label": "献县", + "value": "130929" + }, + { + "label": "孟村回族自治县", + "value": "130930" + }, + { + "label": "河北沧州经济开发区", + "value": "130971" + }, + { + "label": "沧州高新技术产业开发区", + "value": "130972" + }, + { + "label": "沧州渤海新区", + "value": "130973" + }, + { + "label": "泊头市", + "value": "130981" + }, + { + "label": "任丘市", + "value": "130982" + }, + { + "label": "黄骅市", + "value": "130983" + }, + { + "label": "河间市", + "value": "130984" + } + ], + [{ + "label": "安次区", + "value": "131002" + }, + { + "label": "广阳区", + "value": "131003" + }, + { + "label": "固安县", + "value": "131022" + }, + { + "label": "永清县", + "value": "131023" + }, + { + "label": "香河县", + "value": "131024" + }, + { + "label": "大城县", + "value": "131025" + }, + { + "label": "文安县", + "value": "131026" + }, + { + "label": "大厂回族自治县", + "value": "131028" + }, + { + "label": "廊坊经济技术开发区", + "value": "131071" + }, + { + "label": "霸州市", + "value": "131081" + }, + { + "label": "三河市", + "value": "131082" + } + ], + [{ + "label": "桃城区", + "value": "131102" + }, + { + "label": "冀州区", + "value": "131103" + }, + { + "label": "枣强县", + "value": "131121" + }, + { + "label": "武邑县", + "value": "131122" + }, + { + "label": "武强县", + "value": "131123" + }, + { + "label": "饶阳县", + "value": "131124" + }, + { + "label": "安平县", + "value": "131125" + }, + { + "label": "故城县", + "value": "131126" + }, + { + "label": "景县", + "value": "131127" + }, + { + "label": "阜城县", + "value": "131128" + }, + { + "label": "河北衡水经济开发区", + "value": "131171" + }, + { + "label": "衡水滨湖新区", + "value": "131172" + }, + { + "label": "深州市", + "value": "131182" + } + ] + ], + [ + [{ + "label": "小店区", + "value": "140105" + }, + { + "label": "迎泽区", + "value": "140106" + }, + { + "label": "杏花岭区", + "value": "140107" + }, + { + "label": "尖草坪区", + "value": "140108" + }, + { + "label": "万柏林区", + "value": "140109" + }, + { + "label": "晋源区", + "value": "140110" + }, + { + "label": "清徐县", + "value": "140121" + }, + { + "label": "阳曲县", + "value": "140122" + }, + { + "label": "娄烦县", + "value": "140123" + }, + { + "label": "山西转型综合改革示范区", + "value": "140171" + }, + { + "label": "古交市", + "value": "140181" + } + ], + [{ + "label": "城区", + "value": "140202" + }, + { + "label": "矿区", + "value": "140203" + }, + { + "label": "南郊区", + "value": "140211" + }, + { + "label": "新荣区", + "value": "140212" + }, + { + "label": "阳高县", + "value": "140221" + }, + { + "label": "天镇县", + "value": "140222" + }, + { + "label": "广灵县", + "value": "140223" + }, + { + "label": "灵丘县", + "value": "140224" + }, + { + "label": "浑源县", + "value": "140225" + }, + { + "label": "左云县", + "value": "140226" + }, + { + "label": "大同县", + "value": "140227" + }, + { + "label": "山西大同经济开发区", + "value": "140271" + } + ], + [{ + "label": "城区", + "value": "140302" + }, + { + "label": "矿区", + "value": "140303" + }, + { + "label": "郊区", + "value": "140311" + }, + { + "label": "平定县", + "value": "140321" + }, + { + "label": "盂县", + "value": "140322" + }, + { + "label": "山西阳泉经济开发区", + "value": "140371" + } + ], + [{ + "label": "城区", + "value": "140402" + }, + { + "label": "郊区", + "value": "140411" + }, + { + "label": "长治县", + "value": "140421" + }, + { + "label": "襄垣县", + "value": "140423" + }, + { + "label": "屯留县", + "value": "140424" + }, + { + "label": "平顺县", + "value": "140425" + }, + { + "label": "黎城县", + "value": "140426" + }, + { + "label": "壶关县", + "value": "140427" + }, + { + "label": "长子县", + "value": "140428" + }, + { + "label": "武乡县", + "value": "140429" + }, + { + "label": "沁县", + "value": "140430" + }, + { + "label": "沁源县", + "value": "140431" + }, + { + "label": "山西长治高新技术产业园区", + "value": "140471" + }, + { + "label": "潞城市", + "value": "140481" + } + ], + [{ + "label": "城区", + "value": "140502" + }, + { + "label": "沁水县", + "value": "140521" + }, + { + "label": "阳城县", + "value": "140522" + }, + { + "label": "陵川县", + "value": "140524" + }, + { + "label": "泽州县", + "value": "140525" + }, + { + "label": "高平市", + "value": "140581" + } + ], + [{ + "label": "朔城区", + "value": "140602" + }, + { + "label": "平鲁区", + "value": "140603" + }, + { + "label": "山阴县", + "value": "140621" + }, + { + "label": "应县", + "value": "140622" + }, + { + "label": "右玉县", + "value": "140623" + }, + { + "label": "怀仁县", + "value": "140624" + }, + { + "label": "山西朔州经济开发区", + "value": "140671" + } + ], + [{ + "label": "榆次区", + "value": "140702" + }, + { + "label": "榆社县", + "value": "140721" + }, + { + "label": "左权县", + "value": "140722" + }, + { + "label": "和顺县", + "value": "140723" + }, + { + "label": "昔阳县", + "value": "140724" + }, + { + "label": "寿阳县", + "value": "140725" + }, + { + "label": "太谷县", + "value": "140726" + }, + { + "label": "祁县", + "value": "140727" + }, + { + "label": "平遥县", + "value": "140728" + }, + { + "label": "灵石县", + "value": "140729" + }, + { + "label": "介休市", + "value": "140781" + } + ], + [{ + "label": "盐湖区", + "value": "140802" + }, + { + "label": "临猗县", + "value": "140821" + }, + { + "label": "万荣县", + "value": "140822" + }, + { + "label": "闻喜县", + "value": "140823" + }, + { + "label": "稷山县", + "value": "140824" + }, + { + "label": "新绛县", + "value": "140825" + }, + { + "label": "绛县", + "value": "140826" + }, + { + "label": "垣曲县", + "value": "140827" + }, + { + "label": "夏县", + "value": "140828" + }, + { + "label": "平陆县", + "value": "140829" + }, + { + "label": "芮城县", + "value": "140830" + }, + { + "label": "永济市", + "value": "140881" + }, + { + "label": "河津市", + "value": "140882" + } + ], + [{ + "label": "忻府区", + "value": "140902" + }, + { + "label": "定襄县", + "value": "140921" + }, + { + "label": "五台县", + "value": "140922" + }, + { + "label": "代县", + "value": "140923" + }, + { + "label": "繁峙县", + "value": "140924" + }, + { + "label": "宁武县", + "value": "140925" + }, + { + "label": "静乐县", + "value": "140926" + }, + { + "label": "神池县", + "value": "140927" + }, + { + "label": "五寨县", + "value": "140928" + }, + { + "label": "岢岚县", + "value": "140929" + }, + { + "label": "河曲县", + "value": "140930" + }, + { + "label": "保德县", + "value": "140931" + }, + { + "label": "偏关县", + "value": "140932" + }, + { + "label": "五台山风景名胜区", + "value": "140971" + }, + { + "label": "原平市", + "value": "140981" + } + ], + [{ + "label": "尧都区", + "value": "141002" + }, + { + "label": "曲沃县", + "value": "141021" + }, + { + "label": "翼城县", + "value": "141022" + }, + { + "label": "襄汾县", + "value": "141023" + }, + { + "label": "洪洞县", + "value": "141024" + }, + { + "label": "古县", + "value": "141025" + }, + { + "label": "安泽县", + "value": "141026" + }, + { + "label": "浮山县", + "value": "141027" + }, + { + "label": "吉县", + "value": "141028" + }, + { + "label": "乡宁县", + "value": "141029" + }, + { + "label": "大宁县", + "value": "141030" + }, + { + "label": "隰县", + "value": "141031" + }, + { + "label": "永和县", + "value": "141032" + }, + { + "label": "蒲县", + "value": "141033" + }, + { + "label": "汾西县", + "value": "141034" + }, + { + "label": "侯马市", + "value": "141081" + }, + { + "label": "霍州市", + "value": "141082" + } + ], + [{ + "label": "离石区", + "value": "141102" + }, + { + "label": "文水县", + "value": "141121" + }, + { + "label": "交城县", + "value": "141122" + }, + { + "label": "兴县", + "value": "141123" + }, + { + "label": "临县", + "value": "141124" + }, + { + "label": "柳林县", + "value": "141125" + }, + { + "label": "石楼县", + "value": "141126" + }, + { + "label": "岚县", + "value": "141127" + }, + { + "label": "方山县", + "value": "141128" + }, + { + "label": "中阳县", + "value": "141129" + }, + { + "label": "交口县", + "value": "141130" + }, + { + "label": "孝义市", + "value": "141181" + }, + { + "label": "汾阳市", + "value": "141182" + } + ] + ], + [ + [{ + "label": "新城区", + "value": "150102" + }, + { + "label": "回民区", + "value": "150103" + }, + { + "label": "玉泉区", + "value": "150104" + }, + { + "label": "赛罕区", + "value": "150105" + }, + { + "label": "土默特左旗", + "value": "150121" + }, + { + "label": "托克托县", + "value": "150122" + }, + { + "label": "和林格尔县", + "value": "150123" + }, + { + "label": "清水河县", + "value": "150124" + }, + { + "label": "武川县", + "value": "150125" + }, + { + "label": "呼和浩特金海工业园区", + "value": "150171" + }, + { + "label": "呼和浩特经济技术开发区", + "value": "150172" + } + ], + [{ + "label": "东河区", + "value": "150202" + }, + { + "label": "昆都仑区", + "value": "150203" + }, + { + "label": "青山区", + "value": "150204" + }, + { + "label": "石拐区", + "value": "150205" + }, + { + "label": "白云鄂博矿区", + "value": "150206" + }, + { + "label": "九原区", + "value": "150207" + }, + { + "label": "土默特右旗", + "value": "150221" + }, + { + "label": "固阳县", + "value": "150222" + }, + { + "label": "达尔罕茂明安联合旗", + "value": "150223" + }, + { + "label": "包头稀土高新技术产业开发区", + "value": "150271" + } + ], + [{ + "label": "海勃湾区", + "value": "150302" + }, + { + "label": "海南区", + "value": "150303" + }, + { + "label": "乌达区", + "value": "150304" + } + ], + [{ + "label": "红山区", + "value": "150402" + }, + { + "label": "元宝山区", + "value": "150403" + }, + { + "label": "松山区", + "value": "150404" + }, + { + "label": "阿鲁科尔沁旗", + "value": "150421" + }, + { + "label": "巴林左旗", + "value": "150422" + }, + { + "label": "巴林右旗", + "value": "150423" + }, + { + "label": "林西县", + "value": "150424" + }, + { + "label": "克什克腾旗", + "value": "150425" + }, + { + "label": "翁牛特旗", + "value": "150426" + }, + { + "label": "喀喇沁旗", + "value": "150428" + }, + { + "label": "宁城县", + "value": "150429" + }, + { + "label": "敖汉旗", + "value": "150430" + } + ], + [{ + "label": "科尔沁区", + "value": "150502" + }, + { + "label": "科尔沁左翼中旗", + "value": "150521" + }, + { + "label": "科尔沁左翼后旗", + "value": "150522" + }, + { + "label": "开鲁县", + "value": "150523" + }, + { + "label": "库伦旗", + "value": "150524" + }, + { + "label": "奈曼旗", + "value": "150525" + }, + { + "label": "扎鲁特旗", + "value": "150526" + }, + { + "label": "通辽经济技术开发区", + "value": "150571" + }, + { + "label": "霍林郭勒市", + "value": "150581" + } + ], + [{ + "label": "东胜区", + "value": "150602" + }, + { + "label": "康巴什区", + "value": "150603" + }, + { + "label": "达拉特旗", + "value": "150621" + }, + { + "label": "准格尔旗", + "value": "150622" + }, + { + "label": "鄂托克前旗", + "value": "150623" + }, + { + "label": "鄂托克旗", + "value": "150624" + }, + { + "label": "杭锦旗", + "value": "150625" + }, + { + "label": "乌审旗", + "value": "150626" + }, + { + "label": "伊金霍洛旗", + "value": "150627" + } + ], + [{ + "label": "海拉尔区", + "value": "150702" + }, + { + "label": "扎赉诺尔区", + "value": "150703" + }, + { + "label": "阿荣旗", + "value": "150721" + }, + { + "label": "莫力达瓦达斡尔族自治旗", + "value": "150722" + }, + { + "label": "鄂伦春自治旗", + "value": "150723" + }, + { + "label": "鄂温克族自治旗", + "value": "150724" + }, + { + "label": "陈巴尔虎旗", + "value": "150725" + }, + { + "label": "新巴尔虎左旗", + "value": "150726" + }, + { + "label": "新巴尔虎右旗", + "value": "150727" + }, + { + "label": "满洲里市", + "value": "150781" + }, + { + "label": "牙克石市", + "value": "150782" + }, + { + "label": "扎兰屯市", + "value": "150783" + }, + { + "label": "额尔古纳市", + "value": "150784" + }, + { + "label": "根河市", + "value": "150785" + } + ], + [{ + "label": "临河区", + "value": "150802" + }, + { + "label": "五原县", + "value": "150821" + }, + { + "label": "磴口县", + "value": "150822" + }, + { + "label": "乌拉特前旗", + "value": "150823" + }, + { + "label": "乌拉特中旗", + "value": "150824" + }, + { + "label": "乌拉特后旗", + "value": "150825" + }, + { + "label": "杭锦后旗", + "value": "150826" + } + ], + [{ + "label": "集宁区", + "value": "150902" + }, + { + "label": "卓资县", + "value": "150921" + }, + { + "label": "化德县", + "value": "150922" + }, + { + "label": "商都县", + "value": "150923" + }, + { + "label": "兴和县", + "value": "150924" + }, + { + "label": "凉城县", + "value": "150925" + }, + { + "label": "察哈尔右翼前旗", + "value": "150926" + }, + { + "label": "察哈尔右翼中旗", + "value": "150927" + }, + { + "label": "察哈尔右翼后旗", + "value": "150928" + }, + { + "label": "四子王旗", + "value": "150929" + }, + { + "label": "丰镇市", + "value": "150981" + } + ], + [{ + "label": "乌兰浩特市", + "value": "152201" + }, + { + "label": "阿尔山市", + "value": "152202" + }, + { + "label": "科尔沁右翼前旗", + "value": "152221" + }, + { + "label": "科尔沁右翼中旗", + "value": "152222" + }, + { + "label": "扎赉特旗", + "value": "152223" + }, + { + "label": "突泉县", + "value": "152224" + } + ], + [{ + "label": "二连浩特市", + "value": "152501" + }, + { + "label": "锡林浩特市", + "value": "152502" + }, + { + "label": "阿巴嘎旗", + "value": "152522" + }, + { + "label": "苏尼特左旗", + "value": "152523" + }, + { + "label": "苏尼特右旗", + "value": "152524" + }, + { + "label": "东乌珠穆沁旗", + "value": "152525" + }, + { + "label": "西乌珠穆沁旗", + "value": "152526" + }, + { + "label": "太仆寺旗", + "value": "152527" + }, + { + "label": "镶黄旗", + "value": "152528" + }, + { + "label": "正镶白旗", + "value": "152529" + }, + { + "label": "正蓝旗", + "value": "152530" + }, + { + "label": "多伦县", + "value": "152531" + }, + { + "label": "乌拉盖管委会", + "value": "152571" + } + ], + [{ + "label": "阿拉善左旗", + "value": "152921" + }, + { + "label": "阿拉善右旗", + "value": "152922" + }, + { + "label": "额济纳旗", + "value": "152923" + }, + { + "label": "内蒙古阿拉善经济开发区", + "value": "152971" + } + ] + ], + [ + [{ + "label": "和平区", + "value": "210102" + }, + { + "label": "沈河区", + "value": "210103" + }, + { + "label": "大东区", + "value": "210104" + }, + { + "label": "皇姑区", + "value": "210105" + }, + { + "label": "铁西区", + "value": "210106" + }, + { + "label": "苏家屯区", + "value": "210111" + }, + { + "label": "浑南区", + "value": "210112" + }, + { + "label": "沈北新区", + "value": "210113" + }, + { + "label": "于洪区", + "value": "210114" + }, + { + "label": "辽中区", + "value": "210115" + }, + { + "label": "康平县", + "value": "210123" + }, + { + "label": "法库县", + "value": "210124" + }, + { + "label": "新民市", + "value": "210181" + } + ], + [{ + "label": "中山区", + "value": "210202" + }, + { + "label": "西岗区", + "value": "210203" + }, + { + "label": "沙河口区", + "value": "210204" + }, + { + "label": "甘井子区", + "value": "210211" + }, + { + "label": "旅顺口区", + "value": "210212" + }, + { + "label": "金州区", + "value": "210213" + }, + { + "label": "普兰店区", + "value": "210214" + }, + { + "label": "长海县", + "value": "210224" + }, + { + "label": "瓦房店市", + "value": "210281" + }, + { + "label": "庄河市", + "value": "210283" + } + ], + [{ + "label": "铁东区", + "value": "210302" + }, + { + "label": "铁西区", + "value": "210303" + }, + { + "label": "立山区", + "value": "210304" + }, + { + "label": "千山区", + "value": "210311" + }, + { + "label": "台安县", + "value": "210321" + }, + { + "label": "岫岩满族自治县", + "value": "210323" + }, + { + "label": "海城市", + "value": "210381" + } + ], + [{ + "label": "新抚区", + "value": "210402" + }, + { + "label": "东洲区", + "value": "210403" + }, + { + "label": "望花区", + "value": "210404" + }, + { + "label": "顺城区", + "value": "210411" + }, + { + "label": "抚顺县", + "value": "210421" + }, + { + "label": "新宾满族自治县", + "value": "210422" + }, + { + "label": "清原满族自治县", + "value": "210423" + } + ], + [{ + "label": "平山区", + "value": "210502" + }, + { + "label": "溪湖区", + "value": "210503" + }, + { + "label": "明山区", + "value": "210504" + }, + { + "label": "南芬区", + "value": "210505" + }, + { + "label": "本溪满族自治县", + "value": "210521" + }, + { + "label": "桓仁满族自治县", + "value": "210522" + } + ], + [{ + "label": "元宝区", + "value": "210602" + }, + { + "label": "振兴区", + "value": "210603" + }, + { + "label": "振安区", + "value": "210604" + }, + { + "label": "宽甸满族自治县", + "value": "210624" + }, + { + "label": "东港市", + "value": "210681" + }, + { + "label": "凤城市", + "value": "210682" + } + ], + [{ + "label": "古塔区", + "value": "210702" + }, + { + "label": "凌河区", + "value": "210703" + }, + { + "label": "太和区", + "value": "210711" + }, + { + "label": "黑山县", + "value": "210726" + }, + { + "label": "义县", + "value": "210727" + }, + { + "label": "凌海市", + "value": "210781" + }, + { + "label": "北镇市", + "value": "210782" + } + ], + [{ + "label": "站前区", + "value": "210802" + }, + { + "label": "西市区", + "value": "210803" + }, + { + "label": "鲅鱼圈区", + "value": "210804" + }, + { + "label": "老边区", + "value": "210811" + }, + { + "label": "盖州市", + "value": "210881" + }, + { + "label": "大石桥市", + "value": "210882" + } + ], + [{ + "label": "海州区", + "value": "210902" + }, + { + "label": "新邱区", + "value": "210903" + }, + { + "label": "太平区", + "value": "210904" + }, + { + "label": "清河门区", + "value": "210905" + }, + { + "label": "细河区", + "value": "210911" + }, + { + "label": "阜新蒙古族自治县", + "value": "210921" + }, + { + "label": "彰武县", + "value": "210922" + } + ], + [{ + "label": "白塔区", + "value": "211002" + }, + { + "label": "文圣区", + "value": "211003" + }, + { + "label": "宏伟区", + "value": "211004" + }, + { + "label": "弓长岭区", + "value": "211005" + }, + { + "label": "太子河区", + "value": "211011" + }, + { + "label": "辽阳县", + "value": "211021" + }, + { + "label": "灯塔市", + "value": "211081" + } + ], + [{ + "label": "双台子区", + "value": "211102" + }, + { + "label": "兴隆台区", + "value": "211103" + }, + { + "label": "大洼区", + "value": "211104" + }, + { + "label": "盘山县", + "value": "211122" + } + ], + [{ + "label": "银州区", + "value": "211202" + }, + { + "label": "清河区", + "value": "211204" + }, + { + "label": "铁岭县", + "value": "211221" + }, + { + "label": "西丰县", + "value": "211223" + }, + { + "label": "昌图县", + "value": "211224" + }, + { + "label": "调兵山市", + "value": "211281" + }, + { + "label": "开原市", + "value": "211282" + } + ], + [{ + "label": "双塔区", + "value": "211302" + }, + { + "label": "龙城区", + "value": "211303" + }, + { + "label": "朝阳县", + "value": "211321" + }, + { + "label": "建平县", + "value": "211322" + }, + { + "label": "喀喇沁左翼蒙古族自治县", + "value": "211324" + }, + { + "label": "北票市", + "value": "211381" + }, + { + "label": "凌源市", + "value": "211382" + } + ], + [{ + "label": "连山区", + "value": "211402" + }, + { + "label": "龙港区", + "value": "211403" + }, + { + "label": "南票区", + "value": "211404" + }, + { + "label": "绥中县", + "value": "211421" + }, + { + "label": "建昌县", + "value": "211422" + }, + { + "label": "兴城市", + "value": "211481" + } + ] + ], + [ + [{ + "label": "南关区", + "value": "220102" + }, + { + "label": "宽城区", + "value": "220103" + }, + { + "label": "朝阳区", + "value": "220104" + }, + { + "label": "二道区", + "value": "220105" + }, + { + "label": "绿园区", + "value": "220106" + }, + { + "label": "双阳区", + "value": "220112" + }, + { + "label": "九台区", + "value": "220113" + }, + { + "label": "农安县", + "value": "220122" + }, + { + "label": "长春经济技术开发区", + "value": "220171" + }, + { + "label": "长春净月高新技术产业开发区", + "value": "220172" + }, + { + "label": "长春高新技术产业开发区", + "value": "220173" + }, + { + "label": "长春汽车经济技术开发区", + "value": "220174" + }, + { + "label": "榆树市", + "value": "220182" + }, + { + "label": "德惠市", + "value": "220183" + } + ], + [{ + "label": "昌邑区", + "value": "220202" + }, + { + "label": "龙潭区", + "value": "220203" + }, + { + "label": "船营区", + "value": "220204" + }, + { + "label": "丰满区", + "value": "220211" + }, + { + "label": "永吉县", + "value": "220221" + }, + { + "label": "吉林经济开发区", + "value": "220271" + }, + { + "label": "吉林高新技术产业开发区", + "value": "220272" + }, + { + "label": "吉林中国新加坡食品区", + "value": "220273" + }, + { + "label": "蛟河市", + "value": "220281" + }, + { + "label": "桦甸市", + "value": "220282" + }, + { + "label": "舒兰市", + "value": "220283" + }, + { + "label": "磐石市", + "value": "220284" + } + ], + [{ + "label": "铁西区", + "value": "220302" + }, + { + "label": "铁东区", + "value": "220303" + }, + { + "label": "梨树县", + "value": "220322" + }, + { + "label": "伊通满族自治县", + "value": "220323" + }, + { + "label": "公主岭市", + "value": "220381" + }, + { + "label": "双辽市", + "value": "220382" + } + ], + [{ + "label": "龙山区", + "value": "220402" + }, + { + "label": "西安区", + "value": "220403" + }, + { + "label": "东丰县", + "value": "220421" + }, + { + "label": "东辽县", + "value": "220422" + } + ], + [{ + "label": "东昌区", + "value": "220502" + }, + { + "label": "二道江区", + "value": "220503" + }, + { + "label": "通化县", + "value": "220521" + }, + { + "label": "辉南县", + "value": "220523" + }, + { + "label": "柳河县", + "value": "220524" + }, + { + "label": "梅河口市", + "value": "220581" + }, + { + "label": "集安市", + "value": "220582" + } + ], + [{ + "label": "浑江区", + "value": "220602" + }, + { + "label": "江源区", + "value": "220605" + }, + { + "label": "抚松县", + "value": "220621" + }, + { + "label": "靖宇县", + "value": "220622" + }, + { + "label": "长白朝鲜族自治县", + "value": "220623" + }, + { + "label": "临江市", + "value": "220681" + } + ], + [{ + "label": "宁江区", + "value": "220702" + }, + { + "label": "前郭尔罗斯蒙古族自治县", + "value": "220721" + }, + { + "label": "长岭县", + "value": "220722" + }, + { + "label": "乾安县", + "value": "220723" + }, + { + "label": "吉林松原经济开发区", + "value": "220771" + }, + { + "label": "扶余市", + "value": "220781" + } + ], + [{ + "label": "洮北区", + "value": "220802" + }, + { + "label": "镇赉县", + "value": "220821" + }, + { + "label": "通榆县", + "value": "220822" + }, + { + "label": "吉林白城经济开发区", + "value": "220871" + }, + { + "label": "洮南市", + "value": "220881" + }, + { + "label": "大安市", + "value": "220882" + } + ], + [{ + "label": "延吉市", + "value": "222401" + }, + { + "label": "图们市", + "value": "222402" + }, + { + "label": "敦化市", + "value": "222403" + }, + { + "label": "珲春市", + "value": "222404" + }, + { + "label": "龙井市", + "value": "222405" + }, + { + "label": "和龙市", + "value": "222406" + }, + { + "label": "汪清县", + "value": "222424" + }, + { + "label": "安图县", + "value": "222426" + } + ] + ], + [ + [{ + "label": "道里区", + "value": "230102" + }, + { + "label": "南岗区", + "value": "230103" + }, + { + "label": "道外区", + "value": "230104" + }, + { + "label": "平房区", + "value": "230108" + }, + { + "label": "松北区", + "value": "230109" + }, + { + "label": "香坊区", + "value": "230110" + }, + { + "label": "呼兰区", + "value": "230111" + }, + { + "label": "阿城区", + "value": "230112" + }, + { + "label": "双城区", + "value": "230113" + }, + { + "label": "依兰县", + "value": "230123" + }, + { + "label": "方正县", + "value": "230124" + }, + { + "label": "宾县", + "value": "230125" + }, + { + "label": "巴彦县", + "value": "230126" + }, + { + "label": "木兰县", + "value": "230127" + }, + { + "label": "通河县", + "value": "230128" + }, + { + "label": "延寿县", + "value": "230129" + }, + { + "label": "尚志市", + "value": "230183" + }, + { + "label": "五常市", + "value": "230184" + } + ], + [{ + "label": "龙沙区", + "value": "230202" + }, + { + "label": "建华区", + "value": "230203" + }, + { + "label": "铁锋区", + "value": "230204" + }, + { + "label": "昂昂溪区", + "value": "230205" + }, + { + "label": "富拉尔基区", + "value": "230206" + }, + { + "label": "碾子山区", + "value": "230207" + }, + { + "label": "梅里斯达斡尔族区", + "value": "230208" + }, + { + "label": "龙江县", + "value": "230221" + }, + { + "label": "依安县", + "value": "230223" + }, + { + "label": "泰来县", + "value": "230224" + }, + { + "label": "甘南县", + "value": "230225" + }, + { + "label": "富裕县", + "value": "230227" + }, + { + "label": "克山县", + "value": "230229" + }, + { + "label": "克东县", + "value": "230230" + }, + { + "label": "拜泉县", + "value": "230231" + }, + { + "label": "讷河市", + "value": "230281" + } + ], + [{ + "label": "鸡冠区", + "value": "230302" + }, + { + "label": "恒山区", + "value": "230303" + }, + { + "label": "滴道区", + "value": "230304" + }, + { + "label": "梨树区", + "value": "230305" + }, + { + "label": "城子河区", + "value": "230306" + }, + { + "label": "麻山区", + "value": "230307" + }, + { + "label": "鸡东县", + "value": "230321" + }, + { + "label": "虎林市", + "value": "230381" + }, + { + "label": "密山市", + "value": "230382" + } + ], + [{ + "label": "向阳区", + "value": "230402" + }, + { + "label": "工农区", + "value": "230403" + }, + { + "label": "南山区", + "value": "230404" + }, + { + "label": "兴安区", + "value": "230405" + }, + { + "label": "东山区", + "value": "230406" + }, + { + "label": "兴山区", + "value": "230407" + }, + { + "label": "萝北县", + "value": "230421" + }, + { + "label": "绥滨县", + "value": "230422" + } + ], + [{ + "label": "尖山区", + "value": "230502" + }, + { + "label": "岭东区", + "value": "230503" + }, + { + "label": "四方台区", + "value": "230505" + }, + { + "label": "宝山区", + "value": "230506" + }, + { + "label": "集贤县", + "value": "230521" + }, + { + "label": "友谊县", + "value": "230522" + }, + { + "label": "宝清县", + "value": "230523" + }, + { + "label": "饶河县", + "value": "230524" + } + ], + [{ + "label": "萨尔图区", + "value": "230602" + }, + { + "label": "龙凤区", + "value": "230603" + }, + { + "label": "让胡路区", + "value": "230604" + }, + { + "label": "红岗区", + "value": "230605" + }, + { + "label": "大同区", + "value": "230606" + }, + { + "label": "肇州县", + "value": "230621" + }, + { + "label": "肇源县", + "value": "230622" + }, + { + "label": "林甸县", + "value": "230623" + }, + { + "label": "杜尔伯特蒙古族自治县", + "value": "230624" + }, + { + "label": "大庆高新技术产业开发区", + "value": "230671" + } + ], + [{ + "label": "伊春区", + "value": "230702" + }, + { + "label": "南岔区", + "value": "230703" + }, + { + "label": "友好区", + "value": "230704" + }, + { + "label": "西林区", + "value": "230705" + }, + { + "label": "翠峦区", + "value": "230706" + }, + { + "label": "新青区", + "value": "230707" + }, + { + "label": "美溪区", + "value": "230708" + }, + { + "label": "金山屯区", + "value": "230709" + }, + { + "label": "五营区", + "value": "230710" + }, + { + "label": "乌马河区", + "value": "230711" + }, + { + "label": "汤旺河区", + "value": "230712" + }, + { + "label": "带岭区", + "value": "230713" + }, + { + "label": "乌伊岭区", + "value": "230714" + }, + { + "label": "红星区", + "value": "230715" + }, + { + "label": "上甘岭区", + "value": "230716" + }, + { + "label": "嘉荫县", + "value": "230722" + }, + { + "label": "铁力市", + "value": "230781" + } + ], + [{ + "label": "向阳区", + "value": "230803" + }, + { + "label": "前进区", + "value": "230804" + }, + { + "label": "东风区", + "value": "230805" + }, + { + "label": "郊区", + "value": "230811" + }, + { + "label": "桦南县", + "value": "230822" + }, + { + "label": "桦川县", + "value": "230826" + }, + { + "label": "汤原县", + "value": "230828" + }, + { + "label": "同江市", + "value": "230881" + }, + { + "label": "富锦市", + "value": "230882" + }, + { + "label": "抚远市", + "value": "230883" + } + ], + [{ + "label": "新兴区", + "value": "230902" + }, + { + "label": "桃山区", + "value": "230903" + }, + { + "label": "茄子河区", + "value": "230904" + }, + { + "label": "勃利县", + "value": "230921" + } + ], + [{ + "label": "东安区", + "value": "231002" + }, + { + "label": "阳明区", + "value": "231003" + }, + { + "label": "爱民区", + "value": "231004" + }, + { + "label": "西安区", + "value": "231005" + }, + { + "label": "林口县", + "value": "231025" + }, + { + "label": "牡丹江经济技术开发区", + "value": "231071" + }, + { + "label": "绥芬河市", + "value": "231081" + }, + { + "label": "海林市", + "value": "231083" + }, + { + "label": "宁安市", + "value": "231084" + }, + { + "label": "穆棱市", + "value": "231085" + }, + { + "label": "东宁市", + "value": "231086" + } + ], + [{ + "label": "爱辉区", + "value": "231102" + }, + { + "label": "嫩江县", + "value": "231121" + }, + { + "label": "逊克县", + "value": "231123" + }, + { + "label": "孙吴县", + "value": "231124" + }, + { + "label": "北安市", + "value": "231181" + }, + { + "label": "五大连池市", + "value": "231182" + } + ], + [{ + "label": "北林区", + "value": "231202" + }, + { + "label": "望奎县", + "value": "231221" + }, + { + "label": "兰西县", + "value": "231222" + }, + { + "label": "青冈县", + "value": "231223" + }, + { + "label": "庆安县", + "value": "231224" + }, + { + "label": "明水县", + "value": "231225" + }, + { + "label": "绥棱县", + "value": "231226" + }, + { + "label": "安达市", + "value": "231281" + }, + { + "label": "肇东市", + "value": "231282" + }, + { + "label": "海伦市", + "value": "231283" + } + ], + [{ + "label": "加格达奇区", + "value": "232701" + }, + { + "label": "松岭区", + "value": "232702" + }, + { + "label": "新林区", + "value": "232703" + }, + { + "label": "呼中区", + "value": "232704" + }, + { + "label": "呼玛县", + "value": "232721" + }, + { + "label": "塔河县", + "value": "232722" + }, + { + "label": "漠河县", + "value": "232723" + } + ] + ], + [ + [{ + "label": "黄浦区", + "value": "310101" + }, + { + "label": "徐汇区", + "value": "310104" + }, + { + "label": "长宁区", + "value": "310105" + }, + { + "label": "静安区", + "value": "310106" + }, + { + "label": "普陀区", + "value": "310107" + }, + { + "label": "虹口区", + "value": "310109" + }, + { + "label": "杨浦区", + "value": "310110" + }, + { + "label": "闵行区", + "value": "310112" + }, + { + "label": "宝山区", + "value": "310113" + }, + { + "label": "嘉定区", + "value": "310114" + }, + { + "label": "浦东新区", + "value": "310115" + }, + { + "label": "金山区", + "value": "310116" + }, + { + "label": "松江区", + "value": "310117" + }, + { + "label": "青浦区", + "value": "310118" + }, + { + "label": "奉贤区", + "value": "310120" + }, + { + "label": "崇明区", + "value": "310151" + } + ] + ], + [ + [{ + "label": "玄武区", + "value": "320102" + }, + { + "label": "秦淮区", + "value": "320104" + }, + { + "label": "建邺区", + "value": "320105" + }, + { + "label": "鼓楼区", + "value": "320106" + }, + { + "label": "浦口区", + "value": "320111" + }, + { + "label": "栖霞区", + "value": "320113" + }, + { + "label": "雨花台区", + "value": "320114" + }, + { + "label": "江宁区", + "value": "320115" + }, + { + "label": "六合区", + "value": "320116" + }, + { + "label": "溧水区", + "value": "320117" + }, + { + "label": "高淳区", + "value": "320118" + } + ], + [{ + "label": "锡山区", + "value": "320205" + }, + { + "label": "惠山区", + "value": "320206" + }, + { + "label": "滨湖区", + "value": "320211" + }, + { + "label": "梁溪区", + "value": "320213" + }, + { + "label": "新吴区", + "value": "320214" + }, + { + "label": "江阴市", + "value": "320281" + }, + { + "label": "宜兴市", + "value": "320282" + } + ], + [{ + "label": "鼓楼区", + "value": "320302" + }, + { + "label": "云龙区", + "value": "320303" + }, + { + "label": "贾汪区", + "value": "320305" + }, + { + "label": "泉山区", + "value": "320311" + }, + { + "label": "铜山区", + "value": "320312" + }, + { + "label": "丰县", + "value": "320321" + }, + { + "label": "沛县", + "value": "320322" + }, + { + "label": "睢宁县", + "value": "320324" + }, + { + "label": "徐州经济技术开发区", + "value": "320371" + }, + { + "label": "新沂市", + "value": "320381" + }, + { + "label": "邳州市", + "value": "320382" + } + ], + [{ + "label": "天宁区", + "value": "320402" + }, + { + "label": "钟楼区", + "value": "320404" + }, + { + "label": "新北区", + "value": "320411" + }, + { + "label": "武进区", + "value": "320412" + }, + { + "label": "金坛区", + "value": "320413" + }, + { + "label": "溧阳市", + "value": "320481" + } + ], + [{ + "label": "虎丘区", + "value": "320505" + }, + { + "label": "吴中区", + "value": "320506" + }, + { + "label": "相城区", + "value": "320507" + }, + { + "label": "姑苏区", + "value": "320508" + }, + { + "label": "吴江区", + "value": "320509" + }, + { + "label": "苏州工业园区", + "value": "320571" + }, + { + "label": "常熟市", + "value": "320581" + }, + { + "label": "张家港市", + "value": "320582" + }, + { + "label": "昆山市", + "value": "320583" + }, + { + "label": "太仓市", + "value": "320585" + } + ], + [{ + "label": "崇川区", + "value": "320602" + }, + { + "label": "港闸区", + "value": "320611" + }, + { + "label": "通州区", + "value": "320612" + }, + { + "label": "海安县", + "value": "320621" + }, + { + "label": "如东县", + "value": "320623" + }, + { + "label": "南通经济技术开发区", + "value": "320671" + }, + { + "label": "启东市", + "value": "320681" + }, + { + "label": "如皋市", + "value": "320682" + }, + { + "label": "海门市", + "value": "320684" + } + ], + [{ + "label": "连云区", + "value": "320703" + }, + { + "label": "海州区", + "value": "320706" + }, + { + "label": "赣榆区", + "value": "320707" + }, + { + "label": "东海县", + "value": "320722" + }, + { + "label": "灌云县", + "value": "320723" + }, + { + "label": "灌南县", + "value": "320724" + }, + { + "label": "连云港经济技术开发区", + "value": "320771" + }, + { + "label": "连云港高新技术产业开发区", + "value": "320772" + } + ], + [{ + "label": "淮安区", + "value": "320803" + }, + { + "label": "淮阴区", + "value": "320804" + }, + { + "label": "清江浦区", + "value": "320812" + }, + { + "label": "洪泽区", + "value": "320813" + }, + { + "label": "涟水县", + "value": "320826" + }, + { + "label": "盱眙县", + "value": "320830" + }, + { + "label": "金湖县", + "value": "320831" + }, + { + "label": "淮安经济技术开发区", + "value": "320871" + } + ], + [{ + "label": "亭湖区", + "value": "320902" + }, + { + "label": "盐都区", + "value": "320903" + }, + { + "label": "大丰区", + "value": "320904" + }, + { + "label": "响水县", + "value": "320921" + }, + { + "label": "滨海县", + "value": "320922" + }, + { + "label": "阜宁县", + "value": "320923" + }, + { + "label": "射阳县", + "value": "320924" + }, + { + "label": "建湖县", + "value": "320925" + }, + { + "label": "盐城经济技术开发区", + "value": "320971" + }, + { + "label": "东台市", + "value": "320981" + } + ], + [{ + "label": "广陵区", + "value": "321002" + }, + { + "label": "邗江区", + "value": "321003" + }, + { + "label": "江都区", + "value": "321012" + }, + { + "label": "宝应县", + "value": "321023" + }, + { + "label": "扬州经济技术开发区", + "value": "321071" + }, + { + "label": "仪征市", + "value": "321081" + }, + { + "label": "高邮市", + "value": "321084" + } + ], + [{ + "label": "京口区", + "value": "321102" + }, + { + "label": "润州区", + "value": "321111" + }, + { + "label": "丹徒区", + "value": "321112" + }, + { + "label": "镇江新区", + "value": "321171" + }, + { + "label": "丹阳市", + "value": "321181" + }, + { + "label": "扬中市", + "value": "321182" + }, + { + "label": "句容市", + "value": "321183" + } + ], + [{ + "label": "海陵区", + "value": "321202" + }, + { + "label": "高港区", + "value": "321203" + }, + { + "label": "姜堰区", + "value": "321204" + }, + { + "label": "泰州医药高新技术产业开发区", + "value": "321271" + }, + { + "label": "兴化市", + "value": "321281" + }, + { + "label": "靖江市", + "value": "321282" + }, + { + "label": "泰兴市", + "value": "321283" + } + ], + [{ + "label": "宿城区", + "value": "321302" + }, + { + "label": "宿豫区", + "value": "321311" + }, + { + "label": "沭阳县", + "value": "321322" + }, + { + "label": "泗阳县", + "value": "321323" + }, + { + "label": "泗洪县", + "value": "321324" + }, + { + "label": "宿迁经济技术开发区", + "value": "321371" + } + ] + ], + [ + [{ + "label": "上城区", + "value": "330102" + }, + { + "label": "下城区", + "value": "330103" + }, + { + "label": "江干区", + "value": "330104" + }, + { + "label": "拱墅区", + "value": "330105" + }, + { + "label": "西湖区", + "value": "330106" + }, + { + "label": "滨江区", + "value": "330108" + }, + { + "label": "萧山区", + "value": "330109" + }, + { + "label": "余杭区", + "value": "330110" + }, + { + "label": "富阳区", + "value": "330111" + }, + { + "label": "临安区", + "value": "330112" + }, + { + "label": "桐庐县", + "value": "330122" + }, + { + "label": "淳安县", + "value": "330127" + }, + { + "label": "建德市", + "value": "330182" + } + ], + [{ + "label": "海曙区", + "value": "330203" + }, + { + "label": "江北区", + "value": "330205" + }, + { + "label": "北仑区", + "value": "330206" + }, + { + "label": "镇海区", + "value": "330211" + }, + { + "label": "鄞州区", + "value": "330212" + }, + { + "label": "奉化区", + "value": "330213" + }, + { + "label": "象山县", + "value": "330225" + }, + { + "label": "宁海县", + "value": "330226" + }, + { + "label": "余姚市", + "value": "330281" + }, + { + "label": "慈溪市", + "value": "330282" + } + ], + [{ + "label": "鹿城区", + "value": "330302" + }, + { + "label": "龙湾区", + "value": "330303" + }, + { + "label": "瓯海区", + "value": "330304" + }, + { + "label": "洞头区", + "value": "330305" + }, + { + "label": "永嘉县", + "value": "330324" + }, + { + "label": "平阳县", + "value": "330326" + }, + { + "label": "苍南县", + "value": "330327" + }, + { + "label": "文成县", + "value": "330328" + }, + { + "label": "泰顺县", + "value": "330329" + }, + { + "label": "温州经济技术开发区", + "value": "330371" + }, + { + "label": "瑞安市", + "value": "330381" + }, + { + "label": "乐清市", + "value": "330382" + } + ], + [{ + "label": "南湖区", + "value": "330402" + }, + { + "label": "秀洲区", + "value": "330411" + }, + { + "label": "嘉善县", + "value": "330421" + }, + { + "label": "海盐县", + "value": "330424" + }, + { + "label": "海宁市", + "value": "330481" + }, + { + "label": "平湖市", + "value": "330482" + }, + { + "label": "桐乡市", + "value": "330483" + } + ], + [{ + "label": "吴兴区", + "value": "330502" + }, + { + "label": "南浔区", + "value": "330503" + }, + { + "label": "德清县", + "value": "330521" + }, + { + "label": "长兴县", + "value": "330522" + }, + { + "label": "安吉县", + "value": "330523" + } + ], + [{ + "label": "越城区", + "value": "330602" + }, + { + "label": "柯桥区", + "value": "330603" + }, + { + "label": "上虞区", + "value": "330604" + }, + { + "label": "新昌县", + "value": "330624" + }, + { + "label": "诸暨市", + "value": "330681" + }, + { + "label": "嵊州市", + "value": "330683" + } + ], + [{ + "label": "婺城区", + "value": "330702" + }, + { + "label": "金东区", + "value": "330703" + }, + { + "label": "武义县", + "value": "330723" + }, + { + "label": "浦江县", + "value": "330726" + }, + { + "label": "磐安县", + "value": "330727" + }, + { + "label": "兰溪市", + "value": "330781" + }, + { + "label": "义乌市", + "value": "330782" + }, + { + "label": "东阳市", + "value": "330783" + }, + { + "label": "永康市", + "value": "330784" + } + ], + [{ + "label": "柯城区", + "value": "330802" + }, + { + "label": "衢江区", + "value": "330803" + }, + { + "label": "常山县", + "value": "330822" + }, + { + "label": "开化县", + "value": "330824" + }, + { + "label": "龙游县", + "value": "330825" + }, + { + "label": "江山市", + "value": "330881" + } + ], + [{ + "label": "定海区", + "value": "330902" + }, + { + "label": "普陀区", + "value": "330903" + }, + { + "label": "岱山县", + "value": "330921" + }, + { + "label": "嵊泗县", + "value": "330922" + } + ], + [{ + "label": "椒江区", + "value": "331002" + }, + { + "label": "黄岩区", + "value": "331003" + }, + { + "label": "路桥区", + "value": "331004" + }, + { + "label": "三门县", + "value": "331022" + }, + { + "label": "天台县", + "value": "331023" + }, + { + "label": "仙居县", + "value": "331024" + }, + { + "label": "温岭市", + "value": "331081" + }, + { + "label": "临海市", + "value": "331082" + }, + { + "label": "玉环市", + "value": "331083" + } + ], + [{ + "label": "莲都区", + "value": "331102" + }, + { + "label": "青田县", + "value": "331121" + }, + { + "label": "缙云县", + "value": "331122" + }, + { + "label": "遂昌县", + "value": "331123" + }, + { + "label": "松阳县", + "value": "331124" + }, + { + "label": "云和县", + "value": "331125" + }, + { + "label": "庆元县", + "value": "331126" + }, + { + "label": "景宁畲族自治县", + "value": "331127" + }, + { + "label": "龙泉市", + "value": "331181" + } + ] + ], + [ + [{ + "label": "瑶海区", + "value": "340102" + }, + { + "label": "庐阳区", + "value": "340103" + }, + { + "label": "蜀山区", + "value": "340104" + }, + { + "label": "包河区", + "value": "340111" + }, + { + "label": "长丰县", + "value": "340121" + }, + { + "label": "肥东县", + "value": "340122" + }, + { + "label": "肥西县", + "value": "340123" + }, + { + "label": "庐江县", + "value": "340124" + }, + { + "label": "合肥高新技术产业开发区", + "value": "340171" + }, + { + "label": "合肥经济技术开发区", + "value": "340172" + }, + { + "label": "合肥新站高新技术产业开发区", + "value": "340173" + }, + { + "label": "巢湖市", + "value": "340181" + } + ], + [{ + "label": "镜湖区", + "value": "340202" + }, + { + "label": "弋江区", + "value": "340203" + }, + { + "label": "鸠江区", + "value": "340207" + }, + { + "label": "三山区", + "value": "340208" + }, + { + "label": "芜湖县", + "value": "340221" + }, + { + "label": "繁昌县", + "value": "340222" + }, + { + "label": "南陵县", + "value": "340223" + }, + { + "label": "无为县", + "value": "340225" + }, + { + "label": "芜湖经济技术开发区", + "value": "340271" + }, + { + "label": "安徽芜湖长江大桥经济开发区", + "value": "340272" + } + ], + [{ + "label": "龙子湖区", + "value": "340302" + }, + { + "label": "蚌山区", + "value": "340303" + }, + { + "label": "禹会区", + "value": "340304" + }, + { + "label": "淮上区", + "value": "340311" + }, + { + "label": "怀远县", + "value": "340321" + }, + { + "label": "五河县", + "value": "340322" + }, + { + "label": "固镇县", + "value": "340323" + }, + { + "label": "蚌埠市高新技术开发区", + "value": "340371" + }, + { + "label": "蚌埠市经济开发区", + "value": "340372" + } + ], + [{ + "label": "大通区", + "value": "340402" + }, + { + "label": "田家庵区", + "value": "340403" + }, + { + "label": "谢家集区", + "value": "340404" + }, + { + "label": "八公山区", + "value": "340405" + }, + { + "label": "潘集区", + "value": "340406" + }, + { + "label": "凤台县", + "value": "340421" + }, + { + "label": "寿县", + "value": "340422" + } + ], + [{ + "label": "花山区", + "value": "340503" + }, + { + "label": "雨山区", + "value": "340504" + }, + { + "label": "博望区", + "value": "340506" + }, + { + "label": "当涂县", + "value": "340521" + }, + { + "label": "含山县", + "value": "340522" + }, + { + "label": "和县", + "value": "340523" + } + ], + [{ + "label": "杜集区", + "value": "340602" + }, + { + "label": "相山区", + "value": "340603" + }, + { + "label": "烈山区", + "value": "340604" + }, + { + "label": "濉溪县", + "value": "340621" + } + ], + [{ + "label": "铜官区", + "value": "340705" + }, + { + "label": "义安区", + "value": "340706" + }, + { + "label": "郊区", + "value": "340711" + }, + { + "label": "枞阳县", + "value": "340722" + } + ], + [{ + "label": "迎江区", + "value": "340802" + }, + { + "label": "大观区", + "value": "340803" + }, + { + "label": "宜秀区", + "value": "340811" + }, + { + "label": "怀宁县", + "value": "340822" + }, + { + "label": "潜山县", + "value": "340824" + }, + { + "label": "太湖县", + "value": "340825" + }, + { + "label": "宿松县", + "value": "340826" + }, + { + "label": "望江县", + "value": "340827" + }, + { + "label": "岳西县", + "value": "340828" + }, + { + "label": "安徽安庆经济开发区", + "value": "340871" + }, + { + "label": "桐城市", + "value": "340881" + } + ], + [{ + "label": "屯溪区", + "value": "341002" + }, + { + "label": "黄山区", + "value": "341003" + }, + { + "label": "徽州区", + "value": "341004" + }, + { + "label": "歙县", + "value": "341021" + }, + { + "label": "休宁县", + "value": "341022" + }, + { + "label": "黟县", + "value": "341023" + }, + { + "label": "祁门县", + "value": "341024" + } + ], + [{ + "label": "琅琊区", + "value": "341102" + }, + { + "label": "南谯区", + "value": "341103" + }, + { + "label": "来安县", + "value": "341122" + }, + { + "label": "全椒县", + "value": "341124" + }, + { + "label": "定远县", + "value": "341125" + }, + { + "label": "凤阳县", + "value": "341126" + }, + { + "label": "苏滁现代产业园", + "value": "341171" + }, + { + "label": "滁州经济技术开发区", + "value": "341172" + }, + { + "label": "天长市", + "value": "341181" + }, + { + "label": "明光市", + "value": "341182" + } + ], + [{ + "label": "颍州区", + "value": "341202" + }, + { + "label": "颍东区", + "value": "341203" + }, + { + "label": "颍泉区", + "value": "341204" + }, + { + "label": "临泉县", + "value": "341221" + }, + { + "label": "太和县", + "value": "341222" + }, + { + "label": "阜南县", + "value": "341225" + }, + { + "label": "颍上县", + "value": "341226" + }, + { + "label": "阜阳合肥现代产业园区", + "value": "341271" + }, + { + "label": "阜阳经济技术开发区", + "value": "341272" + }, + { + "label": "界首市", + "value": "341282" + } + ], + [{ + "label": "埇桥区", + "value": "341302" + }, + { + "label": "砀山县", + "value": "341321" + }, + { + "label": "萧县", + "value": "341322" + }, + { + "label": "灵璧县", + "value": "341323" + }, + { + "label": "泗县", + "value": "341324" + }, + { + "label": "宿州马鞍山现代产业园区", + "value": "341371" + }, + { + "label": "宿州经济技术开发区", + "value": "341372" + } + ], + [{ + "label": "金安区", + "value": "341502" + }, + { + "label": "裕安区", + "value": "341503" + }, + { + "label": "叶集区", + "value": "341504" + }, + { + "label": "霍邱县", + "value": "341522" + }, + { + "label": "舒城县", + "value": "341523" + }, + { + "label": "金寨县", + "value": "341524" + }, + { + "label": "霍山县", + "value": "341525" + } + ], + [{ + "label": "谯城区", + "value": "341602" + }, + { + "label": "涡阳县", + "value": "341621" + }, + { + "label": "蒙城县", + "value": "341622" + }, + { + "label": "利辛县", + "value": "341623" + } + ], + [{ + "label": "贵池区", + "value": "341702" + }, + { + "label": "东至县", + "value": "341721" + }, + { + "label": "石台县", + "value": "341722" + }, + { + "label": "青阳县", + "value": "341723" + } + ], + [{ + "label": "宣州区", + "value": "341802" + }, + { + "label": "郎溪县", + "value": "341821" + }, + { + "label": "广德县", + "value": "341822" + }, + { + "label": "泾县", + "value": "341823" + }, + { + "label": "绩溪县", + "value": "341824" + }, + { + "label": "旌德县", + "value": "341825" + }, + { + "label": "宣城市经济开发区", + "value": "341871" + }, + { + "label": "宁国市", + "value": "341881" + } + ] + ], + [ + [{ + "label": "鼓楼区", + "value": "350102" + }, + { + "label": "台江区", + "value": "350103" + }, + { + "label": "仓山区", + "value": "350104" + }, + { + "label": "马尾区", + "value": "350105" + }, + { + "label": "晋安区", + "value": "350111" + }, + { + "label": "闽侯县", + "value": "350121" + }, + { + "label": "连江县", + "value": "350122" + }, + { + "label": "罗源县", + "value": "350123" + }, + { + "label": "闽清县", + "value": "350124" + }, + { + "label": "永泰县", + "value": "350125" + }, + { + "label": "平潭县", + "value": "350128" + }, + { + "label": "福清市", + "value": "350181" + }, + { + "label": "长乐市", + "value": "350182" + } + ], + [{ + "label": "思明区", + "value": "350203" + }, + { + "label": "海沧区", + "value": "350205" + }, + { + "label": "湖里区", + "value": "350206" + }, + { + "label": "集美区", + "value": "350211" + }, + { + "label": "同安区", + "value": "350212" + }, + { + "label": "翔安区", + "value": "350213" + } + ], + [{ + "label": "城厢区", + "value": "350302" + }, + { + "label": "涵江区", + "value": "350303" + }, + { + "label": "荔城区", + "value": "350304" + }, + { + "label": "秀屿区", + "value": "350305" + }, + { + "label": "仙游县", + "value": "350322" + } + ], + [{ + "label": "梅列区", + "value": "350402" + }, + { + "label": "三元区", + "value": "350403" + }, + { + "label": "明溪县", + "value": "350421" + }, + { + "label": "清流县", + "value": "350423" + }, + { + "label": "宁化县", + "value": "350424" + }, + { + "label": "大田县", + "value": "350425" + }, + { + "label": "尤溪县", + "value": "350426" + }, + { + "label": "沙县", + "value": "350427" + }, + { + "label": "将乐县", + "value": "350428" + }, + { + "label": "泰宁县", + "value": "350429" + }, + { + "label": "建宁县", + "value": "350430" + }, + { + "label": "永安市", + "value": "350481" + } + ], + [{ + "label": "鲤城区", + "value": "350502" + }, + { + "label": "丰泽区", + "value": "350503" + }, + { + "label": "洛江区", + "value": "350504" + }, + { + "label": "泉港区", + "value": "350505" + }, + { + "label": "惠安县", + "value": "350521" + }, + { + "label": "安溪县", + "value": "350524" + }, + { + "label": "永春县", + "value": "350525" + }, + { + "label": "德化县", + "value": "350526" + }, + { + "label": "金门县", + "value": "350527" + }, + { + "label": "石狮市", + "value": "350581" + }, + { + "label": "晋江市", + "value": "350582" + }, + { + "label": "南安市", + "value": "350583" + } + ], + [{ + "label": "芗城区", + "value": "350602" + }, + { + "label": "龙文区", + "value": "350603" + }, + { + "label": "云霄县", + "value": "350622" + }, + { + "label": "漳浦县", + "value": "350623" + }, + { + "label": "诏安县", + "value": "350624" + }, + { + "label": "长泰县", + "value": "350625" + }, + { + "label": "东山县", + "value": "350626" + }, + { + "label": "南靖县", + "value": "350627" + }, + { + "label": "平和县", + "value": "350628" + }, + { + "label": "华安县", + "value": "350629" + }, + { + "label": "龙海市", + "value": "350681" + } + ], + [{ + "label": "延平区", + "value": "350702" + }, + { + "label": "建阳区", + "value": "350703" + }, + { + "label": "顺昌县", + "value": "350721" + }, + { + "label": "浦城县", + "value": "350722" + }, + { + "label": "光泽县", + "value": "350723" + }, + { + "label": "松溪县", + "value": "350724" + }, + { + "label": "政和县", + "value": "350725" + }, + { + "label": "邵武市", + "value": "350781" + }, + { + "label": "武夷山市", + "value": "350782" + }, + { + "label": "建瓯市", + "value": "350783" + } + ], + [{ + "label": "新罗区", + "value": "350802" + }, + { + "label": "永定区", + "value": "350803" + }, + { + "label": "长汀县", + "value": "350821" + }, + { + "label": "上杭县", + "value": "350823" + }, + { + "label": "武平县", + "value": "350824" + }, + { + "label": "连城县", + "value": "350825" + }, + { + "label": "漳平市", + "value": "350881" + } + ], + [{ + "label": "蕉城区", + "value": "350902" + }, + { + "label": "霞浦县", + "value": "350921" + }, + { + "label": "古田县", + "value": "350922" + }, + { + "label": "屏南县", + "value": "350923" + }, + { + "label": "寿宁县", + "value": "350924" + }, + { + "label": "周宁县", + "value": "350925" + }, + { + "label": "柘荣县", + "value": "350926" + }, + { + "label": "福安市", + "value": "350981" + }, + { + "label": "福鼎市", + "value": "350982" + } + ] + ], + [ + [{ + "label": "东湖区", + "value": "360102" + }, + { + "label": "西湖区", + "value": "360103" + }, + { + "label": "青云谱区", + "value": "360104" + }, + { + "label": "湾里区", + "value": "360105" + }, + { + "label": "青山湖区", + "value": "360111" + }, + { + "label": "新建区", + "value": "360112" + }, + { + "label": "南昌县", + "value": "360121" + }, + { + "label": "安义县", + "value": "360123" + }, + { + "label": "进贤县", + "value": "360124" + } + ], + [{ + "label": "昌江区", + "value": "360202" + }, + { + "label": "珠山区", + "value": "360203" + }, + { + "label": "浮梁县", + "value": "360222" + }, + { + "label": "乐平市", + "value": "360281" + } + ], + [{ + "label": "安源区", + "value": "360302" + }, + { + "label": "湘东区", + "value": "360313" + }, + { + "label": "莲花县", + "value": "360321" + }, + { + "label": "上栗县", + "value": "360322" + }, + { + "label": "芦溪县", + "value": "360323" + } + ], + [{ + "label": "濂溪区", + "value": "360402" + }, + { + "label": "浔阳区", + "value": "360403" + }, + { + "label": "柴桑区", + "value": "360404" + }, + { + "label": "武宁县", + "value": "360423" + }, + { + "label": "修水县", + "value": "360424" + }, + { + "label": "永修县", + "value": "360425" + }, + { + "label": "德安县", + "value": "360426" + }, + { + "label": "都昌县", + "value": "360428" + }, + { + "label": "湖口县", + "value": "360429" + }, + { + "label": "彭泽县", + "value": "360430" + }, + { + "label": "瑞昌市", + "value": "360481" + }, + { + "label": "共青城市", + "value": "360482" + }, + { + "label": "庐山市", + "value": "360483" + } + ], + [{ + "label": "渝水区", + "value": "360502" + }, + { + "label": "分宜县", + "value": "360521" + } + ], + [{ + "label": "月湖区", + "value": "360602" + }, + { + "label": "余江县", + "value": "360622" + }, + { + "label": "贵溪市", + "value": "360681" + } + ], + [{ + "label": "章贡区", + "value": "360702" + }, + { + "label": "南康区", + "value": "360703" + }, + { + "label": "赣县区", + "value": "360704" + }, + { + "label": "信丰县", + "value": "360722" + }, + { + "label": "大余县", + "value": "360723" + }, + { + "label": "上犹县", + "value": "360724" + }, + { + "label": "崇义县", + "value": "360725" + }, + { + "label": "安远县", + "value": "360726" + }, + { + "label": "龙南县", + "value": "360727" + }, + { + "label": "定南县", + "value": "360728" + }, + { + "label": "全南县", + "value": "360729" + }, + { + "label": "宁都县", + "value": "360730" + }, + { + "label": "于都县", + "value": "360731" + }, + { + "label": "兴国县", + "value": "360732" + }, + { + "label": "会昌县", + "value": "360733" + }, + { + "label": "寻乌县", + "value": "360734" + }, + { + "label": "石城县", + "value": "360735" + }, + { + "label": "瑞金市", + "value": "360781" + } + ], + [{ + "label": "吉州区", + "value": "360802" + }, + { + "label": "青原区", + "value": "360803" + }, + { + "label": "吉安县", + "value": "360821" + }, + { + "label": "吉水县", + "value": "360822" + }, + { + "label": "峡江县", + "value": "360823" + }, + { + "label": "新干县", + "value": "360824" + }, + { + "label": "永丰县", + "value": "360825" + }, + { + "label": "泰和县", + "value": "360826" + }, + { + "label": "遂川县", + "value": "360827" + }, + { + "label": "万安县", + "value": "360828" + }, + { + "label": "安福县", + "value": "360829" + }, + { + "label": "永新县", + "value": "360830" + }, + { + "label": "井冈山市", + "value": "360881" + } + ], + [{ + "label": "袁州区", + "value": "360902" + }, + { + "label": "奉新县", + "value": "360921" + }, + { + "label": "万载县", + "value": "360922" + }, + { + "label": "上高县", + "value": "360923" + }, + { + "label": "宜丰县", + "value": "360924" + }, + { + "label": "靖安县", + "value": "360925" + }, + { + "label": "铜鼓县", + "value": "360926" + }, + { + "label": "丰城市", + "value": "360981" + }, + { + "label": "樟树市", + "value": "360982" + }, + { + "label": "高安市", + "value": "360983" + } + ], + [{ + "label": "临川区", + "value": "361002" + }, + { + "label": "东乡区", + "value": "361003" + }, + { + "label": "南城县", + "value": "361021" + }, + { + "label": "黎川县", + "value": "361022" + }, + { + "label": "南丰县", + "value": "361023" + }, + { + "label": "崇仁县", + "value": "361024" + }, + { + "label": "乐安县", + "value": "361025" + }, + { + "label": "宜黄县", + "value": "361026" + }, + { + "label": "金溪县", + "value": "361027" + }, + { + "label": "资溪县", + "value": "361028" + }, + { + "label": "广昌县", + "value": "361030" + } + ], + [{ + "label": "信州区", + "value": "361102" + }, + { + "label": "广丰区", + "value": "361103" + }, + { + "label": "上饶县", + "value": "361121" + }, + { + "label": "玉山县", + "value": "361123" + }, + { + "label": "铅山县", + "value": "361124" + }, + { + "label": "横峰县", + "value": "361125" + }, + { + "label": "弋阳县", + "value": "361126" + }, + { + "label": "余干县", + "value": "361127" + }, + { + "label": "鄱阳县", + "value": "361128" + }, + { + "label": "万年县", + "value": "361129" + }, + { + "label": "婺源县", + "value": "361130" + }, + { + "label": "德兴市", + "value": "361181" + } + ] + ], + [ + [{ + "label": "历下区", + "value": "370102" + }, + { + "label": "市中区", + "value": "370103" + }, + { + "label": "槐荫区", + "value": "370104" + }, + { + "label": "天桥区", + "value": "370105" + }, + { + "label": "历城区", + "value": "370112" + }, + { + "label": "长清区", + "value": "370113" + }, + { + "label": "章丘区", + "value": "370114" + }, + { + "label": "平阴县", + "value": "370124" + }, + { + "label": "济阳县", + "value": "370125" + }, + { + "label": "商河县", + "value": "370126" + }, + { + "label": "济南高新技术产业开发区", + "value": "370171" + } + ], + [{ + "label": "市南区", + "value": "370202" + }, + { + "label": "市北区", + "value": "370203" + }, + { + "label": "黄岛区", + "value": "370211" + }, + { + "label": "崂山区", + "value": "370212" + }, + { + "label": "李沧区", + "value": "370213" + }, + { + "label": "城阳区", + "value": "370214" + }, + { + "label": "即墨区", + "value": "370215" + }, + { + "label": "青岛高新技术产业开发区", + "value": "370271" + }, + { + "label": "胶州市", + "value": "370281" + }, + { + "label": "平度市", + "value": "370283" + }, + { + "label": "莱西市", + "value": "370285" + } + ], + [{ + "label": "淄川区", + "value": "370302" + }, + { + "label": "张店区", + "value": "370303" + }, + { + "label": "博山区", + "value": "370304" + }, + { + "label": "临淄区", + "value": "370305" + }, + { + "label": "周村区", + "value": "370306" + }, + { + "label": "桓台县", + "value": "370321" + }, + { + "label": "高青县", + "value": "370322" + }, + { + "label": "沂源县", + "value": "370323" + } + ], + [{ + "label": "市中区", + "value": "370402" + }, + { + "label": "薛城区", + "value": "370403" + }, + { + "label": "峄城区", + "value": "370404" + }, + { + "label": "台儿庄区", + "value": "370405" + }, + { + "label": "山亭区", + "value": "370406" + }, + { + "label": "滕州市", + "value": "370481" + } + ], + [{ + "label": "东营区", + "value": "370502" + }, + { + "label": "河口区", + "value": "370503" + }, + { + "label": "垦利区", + "value": "370505" + }, + { + "label": "利津县", + "value": "370522" + }, + { + "label": "广饶县", + "value": "370523" + }, + { + "label": "东营经济技术开发区", + "value": "370571" + }, + { + "label": "东营港经济开发区", + "value": "370572" + } + ], + [{ + "label": "芝罘区", + "value": "370602" + }, + { + "label": "福山区", + "value": "370611" + }, + { + "label": "牟平区", + "value": "370612" + }, + { + "label": "莱山区", + "value": "370613" + }, + { + "label": "长岛县", + "value": "370634" + }, + { + "label": "烟台高新技术产业开发区", + "value": "370671" + }, + { + "label": "烟台经济技术开发区", + "value": "370672" + }, + { + "label": "龙口市", + "value": "370681" + }, + { + "label": "莱阳市", + "value": "370682" + }, + { + "label": "莱州市", + "value": "370683" + }, + { + "label": "蓬莱市", + "value": "370684" + }, + { + "label": "招远市", + "value": "370685" + }, + { + "label": "栖霞市", + "value": "370686" + }, + { + "label": "海阳市", + "value": "370687" + } + ], + [{ + "label": "潍城区", + "value": "370702" + }, + { + "label": "寒亭区", + "value": "370703" + }, + { + "label": "坊子区", + "value": "370704" + }, + { + "label": "奎文区", + "value": "370705" + }, + { + "label": "临朐县", + "value": "370724" + }, + { + "label": "昌乐县", + "value": "370725" + }, + { + "label": "潍坊滨海经济技术开发区", + "value": "370772" + }, + { + "label": "青州市", + "value": "370781" + }, + { + "label": "诸城市", + "value": "370782" + }, + { + "label": "寿光市", + "value": "370783" + }, + { + "label": "安丘市", + "value": "370784" + }, + { + "label": "高密市", + "value": "370785" + }, + { + "label": "昌邑市", + "value": "370786" + } + ], + [{ + "label": "任城区", + "value": "370811" + }, + { + "label": "兖州区", + "value": "370812" + }, + { + "label": "微山县", + "value": "370826" + }, + { + "label": "鱼台县", + "value": "370827" + }, + { + "label": "金乡县", + "value": "370828" + }, + { + "label": "嘉祥县", + "value": "370829" + }, + { + "label": "汶上县", + "value": "370830" + }, + { + "label": "泗水县", + "value": "370831" + }, + { + "label": "梁山县", + "value": "370832" + }, + { + "label": "济宁高新技术产业开发区", + "value": "370871" + }, + { + "label": "曲阜市", + "value": "370881" + }, + { + "label": "邹城市", + "value": "370883" + } + ], + [{ + "label": "泰山区", + "value": "370902" + }, + { + "label": "岱岳区", + "value": "370911" + }, + { + "label": "宁阳县", + "value": "370921" + }, + { + "label": "东平县", + "value": "370923" + }, + { + "label": "新泰市", + "value": "370982" + }, + { + "label": "肥城市", + "value": "370983" + } + ], + [{ + "label": "环翠区", + "value": "371002" + }, + { + "label": "文登区", + "value": "371003" + }, + { + "label": "威海火炬高技术产业开发区", + "value": "371071" + }, + { + "label": "威海经济技术开发区", + "value": "371072" + }, + { + "label": "威海临港经济技术开发区", + "value": "371073" + }, + { + "label": "荣成市", + "value": "371082" + }, + { + "label": "乳山市", + "value": "371083" + } + ], + [{ + "label": "东港区", + "value": "371102" + }, + { + "label": "岚山区", + "value": "371103" + }, + { + "label": "五莲县", + "value": "371121" + }, + { + "label": "莒县", + "value": "371122" + }, + { + "label": "日照经济技术开发区", + "value": "371171" + }, + { + "label": "日照国际海洋城", + "value": "371172" + } + ], + [{ + "label": "莱城区", + "value": "371202" + }, + { + "label": "钢城区", + "value": "371203" + } + ], + [{ + "label": "兰山区", + "value": "371302" + }, + { + "label": "罗庄区", + "value": "371311" + }, + { + "label": "河东区", + "value": "371312" + }, + { + "label": "沂南县", + "value": "371321" + }, + { + "label": "郯城县", + "value": "371322" + }, + { + "label": "沂水县", + "value": "371323" + }, + { + "label": "兰陵县", + "value": "371324" + }, + { + "label": "费县", + "value": "371325" + }, + { + "label": "平邑县", + "value": "371326" + }, + { + "label": "莒南县", + "value": "371327" + }, + { + "label": "蒙阴县", + "value": "371328" + }, + { + "label": "临沭县", + "value": "371329" + }, + { + "label": "临沂高新技术产业开发区", + "value": "371371" + }, + { + "label": "临沂经济技术开发区", + "value": "371372" + }, + { + "label": "临沂临港经济开发区", + "value": "371373" + } + ], + [{ + "label": "德城区", + "value": "371402" + }, + { + "label": "陵城区", + "value": "371403" + }, + { + "label": "宁津县", + "value": "371422" + }, + { + "label": "庆云县", + "value": "371423" + }, + { + "label": "临邑县", + "value": "371424" + }, + { + "label": "齐河县", + "value": "371425" + }, + { + "label": "平原县", + "value": "371426" + }, + { + "label": "夏津县", + "value": "371427" + }, + { + "label": "武城县", + "value": "371428" + }, + { + "label": "德州经济技术开发区", + "value": "371471" + }, + { + "label": "德州运河经济开发区", + "value": "371472" + }, + { + "label": "乐陵市", + "value": "371481" + }, + { + "label": "禹城市", + "value": "371482" + } + ], + [{ + "label": "东昌府区", + "value": "371502" + }, + { + "label": "阳谷县", + "value": "371521" + }, + { + "label": "莘县", + "value": "371522" + }, + { + "label": "茌平县", + "value": "371523" + }, + { + "label": "东阿县", + "value": "371524" + }, + { + "label": "冠县", + "value": "371525" + }, + { + "label": "高唐县", + "value": "371526" + }, + { + "label": "临清市", + "value": "371581" + } + ], + [{ + "label": "滨城区", + "value": "371602" + }, + { + "label": "沾化区", + "value": "371603" + }, + { + "label": "惠民县", + "value": "371621" + }, + { + "label": "阳信县", + "value": "371622" + }, + { + "label": "无棣县", + "value": "371623" + }, + { + "label": "博兴县", + "value": "371625" + }, + { + "label": "邹平县", + "value": "371626" + } + ], + [{ + "label": "牡丹区", + "value": "371702" + }, + { + "label": "定陶区", + "value": "371703" + }, + { + "label": "曹县", + "value": "371721" + }, + { + "label": "单县", + "value": "371722" + }, + { + "label": "成武县", + "value": "371723" + }, + { + "label": "巨野县", + "value": "371724" + }, + { + "label": "郓城县", + "value": "371725" + }, + { + "label": "鄄城县", + "value": "371726" + }, + { + "label": "东明县", + "value": "371728" + }, + { + "label": "菏泽经济技术开发区", + "value": "371771" + }, + { + "label": "菏泽高新技术开发区", + "value": "371772" + } + ] + ], + [ + [{ + "label": "中原区", + "value": "410102" + }, + { + "label": "二七区", + "value": "410103" + }, + { + "label": "管城回族区", + "value": "410104" + }, + { + "label": "金水区", + "value": "410105" + }, + { + "label": "上街区", + "value": "410106" + }, + { + "label": "惠济区", + "value": "410108" + }, + { + "label": "中牟县", + "value": "410122" + }, + { + "label": "郑州经济技术开发区", + "value": "410171" + }, + { + "label": "郑州高新技术产业开发区", + "value": "410172" + }, + { + "label": "郑州航空港经济综合实验区", + "value": "410173" + }, + { + "label": "巩义市", + "value": "410181" + }, + { + "label": "荥阳市", + "value": "410182" + }, + { + "label": "新密市", + "value": "410183" + }, + { + "label": "新郑市", + "value": "410184" + }, + { + "label": "登封市", + "value": "410185" + } + ], + [{ + "label": "龙亭区", + "value": "410202" + }, + { + "label": "顺河回族区", + "value": "410203" + }, + { + "label": "鼓楼区", + "value": "410204" + }, + { + "label": "禹王台区", + "value": "410205" + }, + { + "label": "祥符区", + "value": "410212" + }, + { + "label": "杞县", + "value": "410221" + }, + { + "label": "通许县", + "value": "410222" + }, + { + "label": "尉氏县", + "value": "410223" + }, + { + "label": "兰考县", + "value": "410225" + } + ], + [{ + "label": "老城区", + "value": "410302" + }, + { + "label": "西工区", + "value": "410303" + }, + { + "label": "瀍河回族区", + "value": "410304" + }, + { + "label": "涧西区", + "value": "410305" + }, + { + "label": "吉利区", + "value": "410306" + }, + { + "label": "洛龙区", + "value": "410311" + }, + { + "label": "孟津县", + "value": "410322" + }, + { + "label": "新安县", + "value": "410323" + }, + { + "label": "栾川县", + "value": "410324" + }, + { + "label": "嵩县", + "value": "410325" + }, + { + "label": "汝阳县", + "value": "410326" + }, + { + "label": "宜阳县", + "value": "410327" + }, + { + "label": "洛宁县", + "value": "410328" + }, + { + "label": "伊川县", + "value": "410329" + }, + { + "label": "洛阳高新技术产业开发区", + "value": "410371" + }, + { + "label": "偃师市", + "value": "410381" + } + ], + [{ + "label": "新华区", + "value": "410402" + }, + { + "label": "卫东区", + "value": "410403" + }, + { + "label": "石龙区", + "value": "410404" + }, + { + "label": "湛河区", + "value": "410411" + }, + { + "label": "宝丰县", + "value": "410421" + }, + { + "label": "叶县", + "value": "410422" + }, + { + "label": "鲁山县", + "value": "410423" + }, + { + "label": "郏县", + "value": "410425" + }, + { + "label": "平顶山高新技术产业开发区", + "value": "410471" + }, + { + "label": "平顶山市新城区", + "value": "410472" + }, + { + "label": "舞钢市", + "value": "410481" + }, + { + "label": "汝州市", + "value": "410482" + } + ], + [{ + "label": "文峰区", + "value": "410502" + }, + { + "label": "北关区", + "value": "410503" + }, + { + "label": "殷都区", + "value": "410505" + }, + { + "label": "龙安区", + "value": "410506" + }, + { + "label": "安阳县", + "value": "410522" + }, + { + "label": "汤阴县", + "value": "410523" + }, + { + "label": "滑县", + "value": "410526" + }, + { + "label": "内黄县", + "value": "410527" + }, + { + "label": "安阳高新技术产业开发区", + "value": "410571" + }, + { + "label": "林州市", + "value": "410581" + } + ], + [{ + "label": "鹤山区", + "value": "410602" + }, + { + "label": "山城区", + "value": "410603" + }, + { + "label": "淇滨区", + "value": "410611" + }, + { + "label": "浚县", + "value": "410621" + }, + { + "label": "淇县", + "value": "410622" + }, + { + "label": "鹤壁经济技术开发区", + "value": "410671" + } + ], + [{ + "label": "红旗区", + "value": "410702" + }, + { + "label": "卫滨区", + "value": "410703" + }, + { + "label": "凤泉区", + "value": "410704" + }, + { + "label": "牧野区", + "value": "410711" + }, + { + "label": "新乡县", + "value": "410721" + }, + { + "label": "获嘉县", + "value": "410724" + }, + { + "label": "原阳县", + "value": "410725" + }, + { + "label": "延津县", + "value": "410726" + }, + { + "label": "封丘县", + "value": "410727" + }, + { + "label": "长垣县", + "value": "410728" + }, + { + "label": "新乡高新技术产业开发区", + "value": "410771" + }, + { + "label": "新乡经济技术开发区", + "value": "410772" + }, + { + "label": "新乡市平原城乡一体化示范区", + "value": "410773" + }, + { + "label": "卫辉市", + "value": "410781" + }, + { + "label": "辉县市", + "value": "410782" + } + ], + [{ + "label": "解放区", + "value": "410802" + }, + { + "label": "中站区", + "value": "410803" + }, + { + "label": "马村区", + "value": "410804" + }, + { + "label": "山阳区", + "value": "410811" + }, + { + "label": "修武县", + "value": "410821" + }, + { + "label": "博爱县", + "value": "410822" + }, + { + "label": "武陟县", + "value": "410823" + }, + { + "label": "温县", + "value": "410825" + }, + { + "label": "焦作城乡一体化示范区", + "value": "410871" + }, + { + "label": "沁阳市", + "value": "410882" + }, + { + "label": "孟州市", + "value": "410883" + } + ], + [{ + "label": "华龙区", + "value": "410902" + }, + { + "label": "清丰县", + "value": "410922" + }, + { + "label": "南乐县", + "value": "410923" + }, + { + "label": "范县", + "value": "410926" + }, + { + "label": "台前县", + "value": "410927" + }, + { + "label": "濮阳县", + "value": "410928" + }, + { + "label": "河南濮阳工业园区", + "value": "410971" + }, + { + "label": "濮阳经济技术开发区", + "value": "410972" + } + ], + [{ + "label": "魏都区", + "value": "411002" + }, + { + "label": "建安区", + "value": "411003" + }, + { + "label": "鄢陵县", + "value": "411024" + }, + { + "label": "襄城县", + "value": "411025" + }, + { + "label": "许昌经济技术开发区", + "value": "411071" + }, + { + "label": "禹州市", + "value": "411081" + }, + { + "label": "长葛市", + "value": "411082" + } + ], + [{ + "label": "源汇区", + "value": "411102" + }, + { + "label": "郾城区", + "value": "411103" + }, + { + "label": "召陵区", + "value": "411104" + }, + { + "label": "舞阳县", + "value": "411121" + }, + { + "label": "临颍县", + "value": "411122" + }, + { + "label": "漯河经济技术开发区", + "value": "411171" + } + ], + [{ + "label": "湖滨区", + "value": "411202" + }, + { + "label": "陕州区", + "value": "411203" + }, + { + "label": "渑池县", + "value": "411221" + }, + { + "label": "卢氏县", + "value": "411224" + }, + { + "label": "河南三门峡经济开发区", + "value": "411271" + }, + { + "label": "义马市", + "value": "411281" + }, + { + "label": "灵宝市", + "value": "411282" + } + ], + [{ + "label": "宛城区", + "value": "411302" + }, + { + "label": "卧龙区", + "value": "411303" + }, + { + "label": "南召县", + "value": "411321" + }, + { + "label": "方城县", + "value": "411322" + }, + { + "label": "西峡县", + "value": "411323" + }, + { + "label": "镇平县", + "value": "411324" + }, + { + "label": "内乡县", + "value": "411325" + }, + { + "label": "淅川县", + "value": "411326" + }, + { + "label": "社旗县", + "value": "411327" + }, + { + "label": "唐河县", + "value": "411328" + }, + { + "label": "新野县", + "value": "411329" + }, + { + "label": "桐柏县", + "value": "411330" + }, + { + "label": "南阳高新技术产业开发区", + "value": "411371" + }, + { + "label": "南阳市城乡一体化示范区", + "value": "411372" + }, + { + "label": "邓州市", + "value": "411381" + } + ], + [{ + "label": "梁园区", + "value": "411402" + }, + { + "label": "睢阳区", + "value": "411403" + }, + { + "label": "民权县", + "value": "411421" + }, + { + "label": "睢县", + "value": "411422" + }, + { + "label": "宁陵县", + "value": "411423" + }, + { + "label": "柘城县", + "value": "411424" + }, + { + "label": "虞城县", + "value": "411425" + }, + { + "label": "夏邑县", + "value": "411426" + }, + { + "label": "豫东综合物流产业聚集区", + "value": "411471" + }, + { + "label": "河南商丘经济开发区", + "value": "411472" + }, + { + "label": "永城市", + "value": "411481" + } + ], + [{ + "label": "浉河区", + "value": "411502" + }, + { + "label": "平桥区", + "value": "411503" + }, + { + "label": "罗山县", + "value": "411521" + }, + { + "label": "光山县", + "value": "411522" + }, + { + "label": "新县", + "value": "411523" + }, + { + "label": "商城县", + "value": "411524" + }, + { + "label": "固始县", + "value": "411525" + }, + { + "label": "潢川县", + "value": "411526" + }, + { + "label": "淮滨县", + "value": "411527" + }, + { + "label": "息县", + "value": "411528" + }, + { + "label": "信阳高新技术产业开发区", + "value": "411571" + } + ], + [{ + "label": "川汇区", + "value": "411602" + }, + { + "label": "扶沟县", + "value": "411621" + }, + { + "label": "西华县", + "value": "411622" + }, + { + "label": "商水县", + "value": "411623" + }, + { + "label": "沈丘县", + "value": "411624" + }, + { + "label": "郸城县", + "value": "411625" + }, + { + "label": "淮阳县", + "value": "411626" + }, + { + "label": "太康县", + "value": "411627" + }, + { + "label": "鹿邑县", + "value": "411628" + }, + { + "label": "河南周口经济开发区", + "value": "411671" + }, + { + "label": "项城市", + "value": "411681" + } + ], + [{ + "label": "驿城区", + "value": "411702" + }, + { + "label": "西平县", + "value": "411721" + }, + { + "label": "上蔡县", + "value": "411722" + }, + { + "label": "平舆县", + "value": "411723" + }, + { + "label": "正阳县", + "value": "411724" + }, + { + "label": "确山县", + "value": "411725" + }, + { + "label": "泌阳县", + "value": "411726" + }, + { + "label": "汝南县", + "value": "411727" + }, + { + "label": "遂平县", + "value": "411728" + }, + { + "label": "新蔡县", + "value": "411729" + }, + { + "label": "河南驻马店经济开发区", + "value": "411771" + } + ], + [{ + "label": "济源市", + "value": "419001" + }] + ], + [ + [{ + "label": "江岸区", + "value": "420102" + }, + { + "label": "江汉区", + "value": "420103" + }, + { + "label": "硚口区", + "value": "420104" + }, + { + "label": "汉阳区", + "value": "420105" + }, + { + "label": "武昌区", + "value": "420106" + }, + { + "label": "青山区", + "value": "420107" + }, + { + "label": "洪山区", + "value": "420111" + }, + { + "label": "东西湖区", + "value": "420112" + }, + { + "label": "汉南区", + "value": "420113" + }, + { + "label": "蔡甸区", + "value": "420114" + }, + { + "label": "江夏区", + "value": "420115" + }, + { + "label": "黄陂区", + "value": "420116" + }, + { + "label": "新洲区", + "value": "420117" + } + ], + [{ + "label": "黄石港区", + "value": "420202" + }, + { + "label": "西塞山区", + "value": "420203" + }, + { + "label": "下陆区", + "value": "420204" + }, + { + "label": "铁山区", + "value": "420205" + }, + { + "label": "阳新县", + "value": "420222" + }, + { + "label": "大冶市", + "value": "420281" + } + ], + [{ + "label": "茅箭区", + "value": "420302" + }, + { + "label": "张湾区", + "value": "420303" + }, + { + "label": "郧阳区", + "value": "420304" + }, + { + "label": "郧西县", + "value": "420322" + }, + { + "label": "竹山县", + "value": "420323" + }, + { + "label": "竹溪县", + "value": "420324" + }, + { + "label": "房县", + "value": "420325" + }, + { + "label": "丹江口市", + "value": "420381" + } + ], + [{ + "label": "西陵区", + "value": "420502" + }, + { + "label": "伍家岗区", + "value": "420503" + }, + { + "label": "点军区", + "value": "420504" + }, + { + "label": "猇亭区", + "value": "420505" + }, + { + "label": "夷陵区", + "value": "420506" + }, + { + "label": "远安县", + "value": "420525" + }, + { + "label": "兴山县", + "value": "420526" + }, + { + "label": "秭归县", + "value": "420527" + }, + { + "label": "长阳土家族自治县", + "value": "420528" + }, + { + "label": "五峰土家族自治县", + "value": "420529" + }, + { + "label": "宜都市", + "value": "420581" + }, + { + "label": "当阳市", + "value": "420582" + }, + { + "label": "枝江市", + "value": "420583" + } + ], + [{ + "label": "襄城区", + "value": "420602" + }, + { + "label": "樊城区", + "value": "420606" + }, + { + "label": "襄州区", + "value": "420607" + }, + { + "label": "南漳县", + "value": "420624" + }, + { + "label": "谷城县", + "value": "420625" + }, + { + "label": "保康县", + "value": "420626" + }, + { + "label": "老河口市", + "value": "420682" + }, + { + "label": "枣阳市", + "value": "420683" + }, + { + "label": "宜城市", + "value": "420684" + } + ], + [{ + "label": "梁子湖区", + "value": "420702" + }, + { + "label": "华容区", + "value": "420703" + }, + { + "label": "鄂城区", + "value": "420704" + } + ], + [{ + "label": "东宝区", + "value": "420802" + }, + { + "label": "掇刀区", + "value": "420804" + }, + { + "label": "京山县", + "value": "420821" + }, + { + "label": "沙洋县", + "value": "420822" + }, + { + "label": "钟祥市", + "value": "420881" + } + ], + [{ + "label": "孝南区", + "value": "420902" + }, + { + "label": "孝昌县", + "value": "420921" + }, + { + "label": "大悟县", + "value": "420922" + }, + { + "label": "云梦县", + "value": "420923" + }, + { + "label": "应城市", + "value": "420981" + }, + { + "label": "安陆市", + "value": "420982" + }, + { + "label": "汉川市", + "value": "420984" + } + ], + [{ + "label": "沙市区", + "value": "421002" + }, + { + "label": "荆州区", + "value": "421003" + }, + { + "label": "公安县", + "value": "421022" + }, + { + "label": "监利县", + "value": "421023" + }, + { + "label": "江陵县", + "value": "421024" + }, + { + "label": "荆州经济技术开发区", + "value": "421071" + }, + { + "label": "石首市", + "value": "421081" + }, + { + "label": "洪湖市", + "value": "421083" + }, + { + "label": "松滋市", + "value": "421087" + } + ], + [{ + "label": "黄州区", + "value": "421102" + }, + { + "label": "团风县", + "value": "421121" + }, + { + "label": "红安县", + "value": "421122" + }, + { + "label": "罗田县", + "value": "421123" + }, + { + "label": "英山县", + "value": "421124" + }, + { + "label": "浠水县", + "value": "421125" + }, + { + "label": "蕲春县", + "value": "421126" + }, + { + "label": "黄梅县", + "value": "421127" + }, + { + "label": "龙感湖管理区", + "value": "421171" + }, + { + "label": "麻城市", + "value": "421181" + }, + { + "label": "武穴市", + "value": "421182" + } + ], + [{ + "label": "咸安区", + "value": "421202" + }, + { + "label": "嘉鱼县", + "value": "421221" + }, + { + "label": "通城县", + "value": "421222" + }, + { + "label": "崇阳县", + "value": "421223" + }, + { + "label": "通山县", + "value": "421224" + }, + { + "label": "赤壁市", + "value": "421281" + } + ], + [{ + "label": "曾都区", + "value": "421303" + }, + { + "label": "随县", + "value": "421321" + }, + { + "label": "广水市", + "value": "421381" + } + ], + [{ + "label": "恩施市", + "value": "422801" + }, + { + "label": "利川市", + "value": "422802" + }, + { + "label": "建始县", + "value": "422822" + }, + { + "label": "巴东县", + "value": "422823" + }, + { + "label": "宣恩县", + "value": "422825" + }, + { + "label": "咸丰县", + "value": "422826" + }, + { + "label": "来凤县", + "value": "422827" + }, + { + "label": "鹤峰县", + "value": "422828" + } + ], + [{ + "label": "仙桃市", + "value": "429004" + }, + { + "label": "潜江市", + "value": "429005" + }, + { + "label": "天门市", + "value": "429006" + }, + { + "label": "神农架林区", + "value": "429021" + } + ] + ], + [ + [{ + "label": "芙蓉区", + "value": "430102" + }, + { + "label": "天心区", + "value": "430103" + }, + { + "label": "岳麓区", + "value": "430104" + }, + { + "label": "开福区", + "value": "430105" + }, + { + "label": "雨花区", + "value": "430111" + }, + { + "label": "望城区", + "value": "430112" + }, + { + "label": "长沙县", + "value": "430121" + }, + { + "label": "浏阳市", + "value": "430181" + }, + { + "label": "宁乡市", + "value": "430182" + } + ], + [{ + "label": "荷塘区", + "value": "430202" + }, + { + "label": "芦淞区", + "value": "430203" + }, + { + "label": "石峰区", + "value": "430204" + }, + { + "label": "天元区", + "value": "430211" + }, + { + "label": "株洲县", + "value": "430221" + }, + { + "label": "攸县", + "value": "430223" + }, + { + "label": "茶陵县", + "value": "430224" + }, + { + "label": "炎陵县", + "value": "430225" + }, + { + "label": "云龙示范区", + "value": "430271" + }, + { + "label": "醴陵市", + "value": "430281" + } + ], + [{ + "label": "雨湖区", + "value": "430302" + }, + { + "label": "岳塘区", + "value": "430304" + }, + { + "label": "湘潭县", + "value": "430321" + }, + { + "label": "湖南湘潭高新技术产业园区", + "value": "430371" + }, + { + "label": "湘潭昭山示范区", + "value": "430372" + }, + { + "label": "湘潭九华示范区", + "value": "430373" + }, + { + "label": "湘乡市", + "value": "430381" + }, + { + "label": "韶山市", + "value": "430382" + } + ], + [{ + "label": "珠晖区", + "value": "430405" + }, + { + "label": "雁峰区", + "value": "430406" + }, + { + "label": "石鼓区", + "value": "430407" + }, + { + "label": "蒸湘区", + "value": "430408" + }, + { + "label": "南岳区", + "value": "430412" + }, + { + "label": "衡阳县", + "value": "430421" + }, + { + "label": "衡南县", + "value": "430422" + }, + { + "label": "衡山县", + "value": "430423" + }, + { + "label": "衡东县", + "value": "430424" + }, + { + "label": "祁东县", + "value": "430426" + }, + { + "label": "衡阳综合保税区", + "value": "430471" + }, + { + "label": "湖南衡阳高新技术产业园区", + "value": "430472" + }, + { + "label": "湖南衡阳松木经济开发区", + "value": "430473" + }, + { + "label": "耒阳市", + "value": "430481" + }, + { + "label": "常宁市", + "value": "430482" + } + ], + [{ + "label": "双清区", + "value": "430502" + }, + { + "label": "大祥区", + "value": "430503" + }, + { + "label": "北塔区", + "value": "430511" + }, + { + "label": "邵东县", + "value": "430521" + }, + { + "label": "新邵县", + "value": "430522" + }, + { + "label": "邵阳县", + "value": "430523" + }, + { + "label": "隆回县", + "value": "430524" + }, + { + "label": "洞口县", + "value": "430525" + }, + { + "label": "绥宁县", + "value": "430527" + }, + { + "label": "新宁县", + "value": "430528" + }, + { + "label": "城步苗族自治县", + "value": "430529" + }, + { + "label": "武冈市", + "value": "430581" + } + ], + [{ + "label": "岳阳楼区", + "value": "430602" + }, + { + "label": "云溪区", + "value": "430603" + }, + { + "label": "君山区", + "value": "430611" + }, + { + "label": "岳阳县", + "value": "430621" + }, + { + "label": "华容县", + "value": "430623" + }, + { + "label": "湘阴县", + "value": "430624" + }, + { + "label": "平江县", + "value": "430626" + }, + { + "label": "岳阳市屈原管理区", + "value": "430671" + }, + { + "label": "汨罗市", + "value": "430681" + }, + { + "label": "临湘市", + "value": "430682" + } + ], + [{ + "label": "武陵区", + "value": "430702" + }, + { + "label": "鼎城区", + "value": "430703" + }, + { + "label": "安乡县", + "value": "430721" + }, + { + "label": "汉寿县", + "value": "430722" + }, + { + "label": "澧县", + "value": "430723" + }, + { + "label": "临澧县", + "value": "430724" + }, + { + "label": "桃源县", + "value": "430725" + }, + { + "label": "石门县", + "value": "430726" + }, + { + "label": "常德市西洞庭管理区", + "value": "430771" + }, + { + "label": "津市市", + "value": "430781" + } + ], + [{ + "label": "永定区", + "value": "430802" + }, + { + "label": "武陵源区", + "value": "430811" + }, + { + "label": "慈利县", + "value": "430821" + }, + { + "label": "桑植县", + "value": "430822" + } + ], + [{ + "label": "资阳区", + "value": "430902" + }, + { + "label": "赫山区", + "value": "430903" + }, + { + "label": "南县", + "value": "430921" + }, + { + "label": "桃江县", + "value": "430922" + }, + { + "label": "安化县", + "value": "430923" + }, + { + "label": "益阳市大通湖管理区", + "value": "430971" + }, + { + "label": "湖南益阳高新技术产业园区", + "value": "430972" + }, + { + "label": "沅江市", + "value": "430981" + } + ], + [{ + "label": "北湖区", + "value": "431002" + }, + { + "label": "苏仙区", + "value": "431003" + }, + { + "label": "桂阳县", + "value": "431021" + }, + { + "label": "宜章县", + "value": "431022" + }, + { + "label": "永兴县", + "value": "431023" + }, + { + "label": "嘉禾县", + "value": "431024" + }, + { + "label": "临武县", + "value": "431025" + }, + { + "label": "汝城县", + "value": "431026" + }, + { + "label": "桂东县", + "value": "431027" + }, + { + "label": "安仁县", + "value": "431028" + }, + { + "label": "资兴市", + "value": "431081" + } + ], + [{ + "label": "零陵区", + "value": "431102" + }, + { + "label": "冷水滩区", + "value": "431103" + }, + { + "label": "祁阳县", + "value": "431121" + }, + { + "label": "东安县", + "value": "431122" + }, + { + "label": "双牌县", + "value": "431123" + }, + { + "label": "道县", + "value": "431124" + }, + { + "label": "江永县", + "value": "431125" + }, + { + "label": "宁远县", + "value": "431126" + }, + { + "label": "蓝山县", + "value": "431127" + }, + { + "label": "新田县", + "value": "431128" + }, + { + "label": "江华瑶族自治县", + "value": "431129" + }, + { + "label": "永州经济技术开发区", + "value": "431171" + }, + { + "label": "永州市金洞管理区", + "value": "431172" + }, + { + "label": "永州市回龙圩管理区", + "value": "431173" + } + ], + [{ + "label": "鹤城区", + "value": "431202" + }, + { + "label": "中方县", + "value": "431221" + }, + { + "label": "沅陵县", + "value": "431222" + }, + { + "label": "辰溪县", + "value": "431223" + }, + { + "label": "溆浦县", + "value": "431224" + }, + { + "label": "会同县", + "value": "431225" + }, + { + "label": "麻阳苗族自治县", + "value": "431226" + }, + { + "label": "新晃侗族自治县", + "value": "431227" + }, + { + "label": "芷江侗族自治县", + "value": "431228" + }, + { + "label": "靖州苗族侗族自治县", + "value": "431229" + }, + { + "label": "通道侗族自治县", + "value": "431230" + }, + { + "label": "怀化市洪江管理区", + "value": "431271" + }, + { + "label": "洪江市", + "value": "431281" + } + ], + [{ + "label": "娄星区", + "value": "431302" + }, + { + "label": "双峰县", + "value": "431321" + }, + { + "label": "新化县", + "value": "431322" + }, + { + "label": "冷水江市", + "value": "431381" + }, + { + "label": "涟源市", + "value": "431382" + } + ], + [{ + "label": "吉首市", + "value": "433101" + }, + { + "label": "泸溪县", + "value": "433122" + }, + { + "label": "凤凰县", + "value": "433123" + }, + { + "label": "花垣县", + "value": "433124" + }, + { + "label": "保靖县", + "value": "433125" + }, + { + "label": "古丈县", + "value": "433126" + }, + { + "label": "永顺县", + "value": "433127" + }, + { + "label": "龙山县", + "value": "433130" + }, + { + "label": "湖南吉首经济开发区", + "value": "433172" + }, + { + "label": "湖南永顺经济开发区", + "value": "433173" + } + ] + ], + [ + [{ + "label": "荔湾区", + "value": "440103" + }, + { + "label": "越秀区", + "value": "440104" + }, + { + "label": "海珠区", + "value": "440105" + }, + { + "label": "天河区", + "value": "440106" + }, + { + "label": "白云区", + "value": "440111" + }, + { + "label": "黄埔区", + "value": "440112" + }, + { + "label": "番禺区", + "value": "440113" + }, + { + "label": "花都区", + "value": "440114" + }, + { + "label": "南沙区", + "value": "440115" + }, + { + "label": "从化区", + "value": "440117" + }, + { + "label": "增城区", + "value": "440118" + } + ], + [{ + "label": "武江区", + "value": "440203" + }, + { + "label": "浈江区", + "value": "440204" + }, + { + "label": "曲江区", + "value": "440205" + }, + { + "label": "始兴县", + "value": "440222" + }, + { + "label": "仁化县", + "value": "440224" + }, + { + "label": "翁源县", + "value": "440229" + }, + { + "label": "乳源瑶族自治县", + "value": "440232" + }, + { + "label": "新丰县", + "value": "440233" + }, + { + "label": "乐昌市", + "value": "440281" + }, + { + "label": "南雄市", + "value": "440282" + } + ], + [{ + "label": "罗湖区", + "value": "440303" + }, + { + "label": "福田区", + "value": "440304" + }, + { + "label": "南山区", + "value": "440305" + }, + { + "label": "宝安区", + "value": "440306" + }, + { + "label": "龙岗区", + "value": "440307" + }, + { + "label": "盐田区", + "value": "440308" + }, + { + "label": "龙华区", + "value": "440309" + }, + { + "label": "坪山区", + "value": "440310" + } + ], + [{ + "label": "香洲区", + "value": "440402" + }, + { + "label": "斗门区", + "value": "440403" + }, + { + "label": "金湾区", + "value": "440404" + } + ], + [{ + "label": "龙湖区", + "value": "440507" + }, + { + "label": "金平区", + "value": "440511" + }, + { + "label": "濠江区", + "value": "440512" + }, + { + "label": "潮阳区", + "value": "440513" + }, + { + "label": "潮南区", + "value": "440514" + }, + { + "label": "澄海区", + "value": "440515" + }, + { + "label": "南澳县", + "value": "440523" + } + ], + [{ + "label": "禅城区", + "value": "440604" + }, + { + "label": "南海区", + "value": "440605" + }, + { + "label": "顺德区", + "value": "440606" + }, + { + "label": "三水区", + "value": "440607" + }, + { + "label": "高明区", + "value": "440608" + } + ], + [{ + "label": "蓬江区", + "value": "440703" + }, + { + "label": "江海区", + "value": "440704" + }, + { + "label": "新会区", + "value": "440705" + }, + { + "label": "台山市", + "value": "440781" + }, + { + "label": "开平市", + "value": "440783" + }, + { + "label": "鹤山市", + "value": "440784" + }, + { + "label": "恩平市", + "value": "440785" + } + ], + [{ + "label": "赤坎区", + "value": "440802" + }, + { + "label": "霞山区", + "value": "440803" + }, + { + "label": "坡头区", + "value": "440804" + }, + { + "label": "麻章区", + "value": "440811" + }, + { + "label": "遂溪县", + "value": "440823" + }, + { + "label": "徐闻县", + "value": "440825" + }, + { + "label": "廉江市", + "value": "440881" + }, + { + "label": "雷州市", + "value": "440882" + }, + { + "label": "吴川市", + "value": "440883" + } + ], + [{ + "label": "茂南区", + "value": "440902" + }, + { + "label": "电白区", + "value": "440904" + }, + { + "label": "高州市", + "value": "440981" + }, + { + "label": "化州市", + "value": "440982" + }, + { + "label": "信宜市", + "value": "440983" + } + ], + [{ + "label": "端州区", + "value": "441202" + }, + { + "label": "鼎湖区", + "value": "441203" + }, + { + "label": "高要区", + "value": "441204" + }, + { + "label": "广宁县", + "value": "441223" + }, + { + "label": "怀集县", + "value": "441224" + }, + { + "label": "封开县", + "value": "441225" + }, + { + "label": "德庆县", + "value": "441226" + }, + { + "label": "四会市", + "value": "441284" + } + ], + [{ + "label": "惠城区", + "value": "441302" + }, + { + "label": "惠阳区", + "value": "441303" + }, + { + "label": "博罗县", + "value": "441322" + }, + { + "label": "惠东县", + "value": "441323" + }, + { + "label": "龙门县", + "value": "441324" + } + ], + [{ + "label": "梅江区", + "value": "441402" + }, + { + "label": "梅县区", + "value": "441403" + }, + { + "label": "大埔县", + "value": "441422" + }, + { + "label": "丰顺县", + "value": "441423" + }, + { + "label": "五华县", + "value": "441424" + }, + { + "label": "平远县", + "value": "441426" + }, + { + "label": "蕉岭县", + "value": "441427" + }, + { + "label": "兴宁市", + "value": "441481" + } + ], + [{ + "label": "城区", + "value": "441502" + }, + { + "label": "海丰县", + "value": "441521" + }, + { + "label": "陆河县", + "value": "441523" + }, + { + "label": "陆丰市", + "value": "441581" + } + ], + [{ + "label": "源城区", + "value": "441602" + }, + { + "label": "紫金县", + "value": "441621" + }, + { + "label": "龙川县", + "value": "441622" + }, + { + "label": "连平县", + "value": "441623" + }, + { + "label": "和平县", + "value": "441624" + }, + { + "label": "东源县", + "value": "441625" + } + ], + [{ + "label": "江城区", + "value": "441702" + }, + { + "label": "阳东区", + "value": "441704" + }, + { + "label": "阳西县", + "value": "441721" + }, + { + "label": "阳春市", + "value": "441781" + } + ], + [{ + "label": "清城区", + "value": "441802" + }, + { + "label": "清新区", + "value": "441803" + }, + { + "label": "佛冈县", + "value": "441821" + }, + { + "label": "阳山县", + "value": "441823" + }, + { + "label": "连山壮族瑶族自治县", + "value": "441825" + }, + { + "label": "连南瑶族自治县", + "value": "441826" + }, + { + "label": "英德市", + "value": "441881" + }, + { + "label": "连州市", + "value": "441882" + } + ], + [{ + "label": "东莞市", + "value": "441900" + }], + [{ + "label": "中山市", + "value": "442000" + }], + [{ + "label": "湘桥区", + "value": "445102" + }, + { + "label": "潮安区", + "value": "445103" + }, + { + "label": "饶平县", + "value": "445122" + } + ], + [{ + "label": "榕城区", + "value": "445202" + }, + { + "label": "揭东区", + "value": "445203" + }, + { + "label": "揭西县", + "value": "445222" + }, + { + "label": "惠来县", + "value": "445224" + }, + { + "label": "普宁市", + "value": "445281" + } + ], + [{ + "label": "云城区", + "value": "445302" + }, + { + "label": "云安区", + "value": "445303" + }, + { + "label": "新兴县", + "value": "445321" + }, + { + "label": "郁南县", + "value": "445322" + }, + { + "label": "罗定市", + "value": "445381" + } + ] + ], + [ + [{ + "label": "兴宁区", + "value": "450102" + }, + { + "label": "青秀区", + "value": "450103" + }, + { + "label": "江南区", + "value": "450105" + }, + { + "label": "西乡塘区", + "value": "450107" + }, + { + "label": "良庆区", + "value": "450108" + }, + { + "label": "邕宁区", + "value": "450109" + }, + { + "label": "武鸣区", + "value": "450110" + }, + { + "label": "隆安县", + "value": "450123" + }, + { + "label": "马山县", + "value": "450124" + }, + { + "label": "上林县", + "value": "450125" + }, + { + "label": "宾阳县", + "value": "450126" + }, + { + "label": "横县", + "value": "450127" + } + ], + [{ + "label": "城中区", + "value": "450202" + }, + { + "label": "鱼峰区", + "value": "450203" + }, + { + "label": "柳南区", + "value": "450204" + }, + { + "label": "柳北区", + "value": "450205" + }, + { + "label": "柳江区", + "value": "450206" + }, + { + "label": "柳城县", + "value": "450222" + }, + { + "label": "鹿寨县", + "value": "450223" + }, + { + "label": "融安县", + "value": "450224" + }, + { + "label": "融水苗族自治县", + "value": "450225" + }, + { + "label": "三江侗族自治县", + "value": "450226" + } + ], + [{ + "label": "秀峰区", + "value": "450302" + }, + { + "label": "叠彩区", + "value": "450303" + }, + { + "label": "象山区", + "value": "450304" + }, + { + "label": "七星区", + "value": "450305" + }, + { + "label": "雁山区", + "value": "450311" + }, + { + "label": "临桂区", + "value": "450312" + }, + { + "label": "阳朔县", + "value": "450321" + }, + { + "label": "灵川县", + "value": "450323" + }, + { + "label": "全州县", + "value": "450324" + }, + { + "label": "兴安县", + "value": "450325" + }, + { + "label": "永福县", + "value": "450326" + }, + { + "label": "灌阳县", + "value": "450327" + }, + { + "label": "龙胜各族自治县", + "value": "450328" + }, + { + "label": "资源县", + "value": "450329" + }, + { + "label": "平乐县", + "value": "450330" + }, + { + "label": "荔浦县", + "value": "450331" + }, + { + "label": "恭城瑶族自治县", + "value": "450332" + } + ], + [{ + "label": "万秀区", + "value": "450403" + }, + { + "label": "长洲区", + "value": "450405" + }, + { + "label": "龙圩区", + "value": "450406" + }, + { + "label": "苍梧县", + "value": "450421" + }, + { + "label": "藤县", + "value": "450422" + }, + { + "label": "蒙山县", + "value": "450423" + }, + { + "label": "岑溪市", + "value": "450481" + } + ], + [{ + "label": "海城区", + "value": "450502" + }, + { + "label": "银海区", + "value": "450503" + }, + { + "label": "铁山港区", + "value": "450512" + }, + { + "label": "合浦县", + "value": "450521" + } + ], + [{ + "label": "港口区", + "value": "450602" + }, + { + "label": "防城区", + "value": "450603" + }, + { + "label": "上思县", + "value": "450621" + }, + { + "label": "东兴市", + "value": "450681" + } + ], + [{ + "label": "钦南区", + "value": "450702" + }, + { + "label": "钦北区", + "value": "450703" + }, + { + "label": "灵山县", + "value": "450721" + }, + { + "label": "浦北县", + "value": "450722" + } + ], + [{ + "label": "港北区", + "value": "450802" + }, + { + "label": "港南区", + "value": "450803" + }, + { + "label": "覃塘区", + "value": "450804" + }, + { + "label": "平南县", + "value": "450821" + }, + { + "label": "桂平市", + "value": "450881" + } + ], + [{ + "label": "玉州区", + "value": "450902" + }, + { + "label": "福绵区", + "value": "450903" + }, + { + "label": "容县", + "value": "450921" + }, + { + "label": "陆川县", + "value": "450922" + }, + { + "label": "博白县", + "value": "450923" + }, + { + "label": "兴业县", + "value": "450924" + }, + { + "label": "北流市", + "value": "450981" + } + ], + [{ + "label": "右江区", + "value": "451002" + }, + { + "label": "田阳县", + "value": "451021" + }, + { + "label": "田东县", + "value": "451022" + }, + { + "label": "平果县", + "value": "451023" + }, + { + "label": "德保县", + "value": "451024" + }, + { + "label": "那坡县", + "value": "451026" + }, + { + "label": "凌云县", + "value": "451027" + }, + { + "label": "乐业县", + "value": "451028" + }, + { + "label": "田林县", + "value": "451029" + }, + { + "label": "西林县", + "value": "451030" + }, + { + "label": "隆林各族自治县", + "value": "451031" + }, + { + "label": "靖西市", + "value": "451081" + } + ], + [{ + "label": "八步区", + "value": "451102" + }, + { + "label": "平桂区", + "value": "451103" + }, + { + "label": "昭平县", + "value": "451121" + }, + { + "label": "钟山县", + "value": "451122" + }, + { + "label": "富川瑶族自治县", + "value": "451123" + } + ], + [{ + "label": "金城江区", + "value": "451202" + }, + { + "label": "宜州区", + "value": "451203" + }, + { + "label": "南丹县", + "value": "451221" + }, + { + "label": "天峨县", + "value": "451222" + }, + { + "label": "凤山县", + "value": "451223" + }, + { + "label": "东兰县", + "value": "451224" + }, + { + "label": "罗城仫佬族自治县", + "value": "451225" + }, + { + "label": "环江毛南族自治县", + "value": "451226" + }, + { + "label": "巴马瑶族自治县", + "value": "451227" + }, + { + "label": "都安瑶族自治县", + "value": "451228" + }, + { + "label": "大化瑶族自治县", + "value": "451229" + } + ], + [{ + "label": "兴宾区", + "value": "451302" + }, + { + "label": "忻城县", + "value": "451321" + }, + { + "label": "象州县", + "value": "451322" + }, + { + "label": "武宣县", + "value": "451323" + }, + { + "label": "金秀瑶族自治县", + "value": "451324" + }, + { + "label": "合山市", + "value": "451381" + } + ], + [{ + "label": "江州区", + "value": "451402" + }, + { + "label": "扶绥县", + "value": "451421" + }, + { + "label": "宁明县", + "value": "451422" + }, + { + "label": "龙州县", + "value": "451423" + }, + { + "label": "大新县", + "value": "451424" + }, + { + "label": "天等县", + "value": "451425" + }, + { + "label": "凭祥市", + "value": "451481" + } + ] + ], + [ + [{ + "label": "秀英区", + "value": "460105" + }, + { + "label": "龙华区", + "value": "460106" + }, + { + "label": "琼山区", + "value": "460107" + }, + { + "label": "美兰区", + "value": "460108" + } + ], + [{ + "label": "海棠区", + "value": "460202" + }, + { + "label": "吉阳区", + "value": "460203" + }, + { + "label": "天涯区", + "value": "460204" + }, + { + "label": "崖州区", + "value": "460205" + } + ], + [{ + "label": "西沙群岛", + "value": "460321" + }, + { + "label": "南沙群岛", + "value": "460322" + }, + { + "label": "中沙群岛的岛礁及其海域", + "value": "460323" + } + ], + [{ + "label": "儋州市", + "value": "460400" + }], + [{ + "label": "五指山市", + "value": "469001" + }, + { + "label": "琼海市", + "value": "469002" + }, + { + "label": "文昌市", + "value": "469005" + }, + { + "label": "万宁市", + "value": "469006" + }, + { + "label": "东方市", + "value": "469007" + }, + { + "label": "定安县", + "value": "469021" + }, + { + "label": "屯昌县", + "value": "469022" + }, + { + "label": "澄迈县", + "value": "469023" + }, + { + "label": "临高县", + "value": "469024" + }, + { + "label": "白沙黎族自治县", + "value": "469025" + }, + { + "label": "昌江黎族自治县", + "value": "469026" + }, + { + "label": "乐东黎族自治县", + "value": "469027" + }, + { + "label": "陵水黎族自治县", + "value": "469028" + }, + { + "label": "保亭黎族苗族自治县", + "value": "469029" + }, + { + "label": "琼中黎族苗族自治县", + "value": "469030" + } + ] + ], + [ + [{ + "label": "万州区", + "value": "500101" + }, + { + "label": "涪陵区", + "value": "500102" + }, + { + "label": "渝中区", + "value": "500103" + }, + { + "label": "大渡口区", + "value": "500104" + }, + { + "label": "江北区", + "value": "500105" + }, + { + "label": "沙坪坝区", + "value": "500106" + }, + { + "label": "九龙坡区", + "value": "500107" + }, + { + "label": "南岸区", + "value": "500108" + }, + { + "label": "北碚区", + "value": "500109" + }, + { + "label": "綦江区", + "value": "500110" + }, + { + "label": "大足区", + "value": "500111" + }, + { + "label": "渝北区", + "value": "500112" + }, + { + "label": "巴南区", + "value": "500113" + }, + { + "label": "黔江区", + "value": "500114" + }, + { + "label": "长寿区", + "value": "500115" + }, + { + "label": "江津区", + "value": "500116" + }, + { + "label": "合川区", + "value": "500117" + }, + { + "label": "永川区", + "value": "500118" + }, + { + "label": "南川区", + "value": "500119" + }, + { + "label": "璧山区", + "value": "500120" + }, + { + "label": "铜梁区", + "value": "500151" + }, + { + "label": "潼南区", + "value": "500152" + }, + { + "label": "荣昌区", + "value": "500153" + }, + { + "label": "开州区", + "value": "500154" + }, + { + "label": "梁平区", + "value": "500155" + }, + { + "label": "武隆区", + "value": "500156" + } + ], + [{ + "label": "城口县", + "value": "500229" + }, + { + "label": "丰都县", + "value": "500230" + }, + { + "label": "垫江县", + "value": "500231" + }, + { + "label": "忠县", + "value": "500233" + }, + { + "label": "云阳县", + "value": "500235" + }, + { + "label": "奉节县", + "value": "500236" + }, + { + "label": "巫山县", + "value": "500237" + }, + { + "label": "巫溪县", + "value": "500238" + }, + { + "label": "石柱土家族自治县", + "value": "500240" + }, + { + "label": "秀山土家族苗族自治县", + "value": "500241" + }, + { + "label": "酉阳土家族苗族自治县", + "value": "500242" + }, + { + "label": "彭水苗族土家族自治县", + "value": "500243" + } + ] + ], + [ + [{ + "label": "锦江区", + "value": "510104" + }, + { + "label": "青羊区", + "value": "510105" + }, + { + "label": "金牛区", + "value": "510106" + }, + { + "label": "武侯区", + "value": "510107" + }, + { + "label": "成华区", + "value": "510108" + }, + { + "label": "龙泉驿区", + "value": "510112" + }, + { + "label": "青白江区", + "value": "510113" + }, + { + "label": "新都区", + "value": "510114" + }, + { + "label": "温江区", + "value": "510115" + }, + { + "label": "双流区", + "value": "510116" + }, + { + "label": "郫都区", + "value": "510117" + }, + { + "label": "金堂县", + "value": "510121" + }, + { + "label": "大邑县", + "value": "510129" + }, + { + "label": "蒲江县", + "value": "510131" + }, + { + "label": "新津县", + "value": "510132" + }, + { + "label": "都江堰市", + "value": "510181" + }, + { + "label": "彭州市", + "value": "510182" + }, + { + "label": "邛崃市", + "value": "510183" + }, + { + "label": "崇州市", + "value": "510184" + }, + { + "label": "简阳市", + "value": "510185" + } + ], + [{ + "label": "自流井区", + "value": "510302" + }, + { + "label": "贡井区", + "value": "510303" + }, + { + "label": "大安区", + "value": "510304" + }, + { + "label": "沿滩区", + "value": "510311" + }, + { + "label": "荣县", + "value": "510321" + }, + { + "label": "富顺县", + "value": "510322" + } + ], + [{ + "label": "东区", + "value": "510402" + }, + { + "label": "西区", + "value": "510403" + }, + { + "label": "仁和区", + "value": "510411" + }, + { + "label": "米易县", + "value": "510421" + }, + { + "label": "盐边县", + "value": "510422" + } + ], + [{ + "label": "江阳区", + "value": "510502" + }, + { + "label": "纳溪区", + "value": "510503" + }, + { + "label": "龙马潭区", + "value": "510504" + }, + { + "label": "泸县", + "value": "510521" + }, + { + "label": "合江县", + "value": "510522" + }, + { + "label": "叙永县", + "value": "510524" + }, + { + "label": "古蔺县", + "value": "510525" + } + ], + [{ + "label": "旌阳区", + "value": "510603" + }, + { + "label": "罗江区", + "value": "510604" + }, + { + "label": "中江县", + "value": "510623" + }, + { + "label": "广汉市", + "value": "510681" + }, + { + "label": "什邡市", + "value": "510682" + }, + { + "label": "绵竹市", + "value": "510683" + } + ], + [{ + "label": "涪城区", + "value": "510703" + }, + { + "label": "游仙区", + "value": "510704" + }, + { + "label": "安州区", + "value": "510705" + }, + { + "label": "三台县", + "value": "510722" + }, + { + "label": "盐亭县", + "value": "510723" + }, + { + "label": "梓潼县", + "value": "510725" + }, + { + "label": "北川羌族自治县", + "value": "510726" + }, + { + "label": "平武县", + "value": "510727" + }, + { + "label": "江油市", + "value": "510781" + } + ], + [{ + "label": "利州区", + "value": "510802" + }, + { + "label": "昭化区", + "value": "510811" + }, + { + "label": "朝天区", + "value": "510812" + }, + { + "label": "旺苍县", + "value": "510821" + }, + { + "label": "青川县", + "value": "510822" + }, + { + "label": "剑阁县", + "value": "510823" + }, + { + "label": "苍溪县", + "value": "510824" + } + ], + [{ + "label": "船山区", + "value": "510903" + }, + { + "label": "安居区", + "value": "510904" + }, + { + "label": "蓬溪县", + "value": "510921" + }, + { + "label": "射洪县", + "value": "510922" + }, + { + "label": "大英县", + "value": "510923" + } + ], + [{ + "label": "市中区", + "value": "511002" + }, + { + "label": "东兴区", + "value": "511011" + }, + { + "label": "威远县", + "value": "511024" + }, + { + "label": "资中县", + "value": "511025" + }, + { + "label": "内江经济开发区", + "value": "511071" + }, + { + "label": "隆昌市", + "value": "511083" + } + ], + [{ + "label": "市中区", + "value": "511102" + }, + { + "label": "沙湾区", + "value": "511111" + }, + { + "label": "五通桥区", + "value": "511112" + }, + { + "label": "金口河区", + "value": "511113" + }, + { + "label": "犍为县", + "value": "511123" + }, + { + "label": "井研县", + "value": "511124" + }, + { + "label": "夹江县", + "value": "511126" + }, + { + "label": "沐川县", + "value": "511129" + }, + { + "label": "峨边彝族自治县", + "value": "511132" + }, + { + "label": "马边彝族自治县", + "value": "511133" + }, + { + "label": "峨眉山市", + "value": "511181" + } + ], + [{ + "label": "顺庆区", + "value": "511302" + }, + { + "label": "高坪区", + "value": "511303" + }, + { + "label": "嘉陵区", + "value": "511304" + }, + { + "label": "南部县", + "value": "511321" + }, + { + "label": "营山县", + "value": "511322" + }, + { + "label": "蓬安县", + "value": "511323" + }, + { + "label": "仪陇县", + "value": "511324" + }, + { + "label": "西充县", + "value": "511325" + }, + { + "label": "阆中市", + "value": "511381" + } + ], + [{ + "label": "东坡区", + "value": "511402" + }, + { + "label": "彭山区", + "value": "511403" + }, + { + "label": "仁寿县", + "value": "511421" + }, + { + "label": "洪雅县", + "value": "511423" + }, + { + "label": "丹棱县", + "value": "511424" + }, + { + "label": "青神县", + "value": "511425" + } + ], + [{ + "label": "翠屏区", + "value": "511502" + }, + { + "label": "南溪区", + "value": "511503" + }, + { + "label": "宜宾县", + "value": "511521" + }, + { + "label": "江安县", + "value": "511523" + }, + { + "label": "长宁县", + "value": "511524" + }, + { + "label": "高县", + "value": "511525" + }, + { + "label": "珙县", + "value": "511526" + }, + { + "label": "筠连县", + "value": "511527" + }, + { + "label": "兴文县", + "value": "511528" + }, + { + "label": "屏山县", + "value": "511529" + } + ], + [{ + "label": "广安区", + "value": "511602" + }, + { + "label": "前锋区", + "value": "511603" + }, + { + "label": "岳池县", + "value": "511621" + }, + { + "label": "武胜县", + "value": "511622" + }, + { + "label": "邻水县", + "value": "511623" + }, + { + "label": "华蓥市", + "value": "511681" + } + ], + [{ + "label": "通川区", + "value": "511702" + }, + { + "label": "达川区", + "value": "511703" + }, + { + "label": "宣汉县", + "value": "511722" + }, + { + "label": "开江县", + "value": "511723" + }, + { + "label": "大竹县", + "value": "511724" + }, + { + "label": "渠县", + "value": "511725" + }, + { + "label": "达州经济开发区", + "value": "511771" + }, + { + "label": "万源市", + "value": "511781" + } + ], + [{ + "label": "雨城区", + "value": "511802" + }, + { + "label": "名山区", + "value": "511803" + }, + { + "label": "荥经县", + "value": "511822" + }, + { + "label": "汉源县", + "value": "511823" + }, + { + "label": "石棉县", + "value": "511824" + }, + { + "label": "天全县", + "value": "511825" + }, + { + "label": "芦山县", + "value": "511826" + }, + { + "label": "宝兴县", + "value": "511827" + } + ], + [{ + "label": "巴州区", + "value": "511902" + }, + { + "label": "恩阳区", + "value": "511903" + }, + { + "label": "通江县", + "value": "511921" + }, + { + "label": "南江县", + "value": "511922" + }, + { + "label": "平昌县", + "value": "511923" + }, + { + "label": "巴中经济开发区", + "value": "511971" + } + ], + [{ + "label": "雁江区", + "value": "512002" + }, + { + "label": "安岳县", + "value": "512021" + }, + { + "label": "乐至县", + "value": "512022" + } + ], + [{ + "label": "马尔康市", + "value": "513201" + }, + { + "label": "汶川县", + "value": "513221" + }, + { + "label": "理县", + "value": "513222" + }, + { + "label": "茂县", + "value": "513223" + }, + { + "label": "松潘县", + "value": "513224" + }, + { + "label": "九寨沟县", + "value": "513225" + }, + { + "label": "金川县", + "value": "513226" + }, + { + "label": "小金县", + "value": "513227" + }, + { + "label": "黑水县", + "value": "513228" + }, + { + "label": "壤塘县", + "value": "513230" + }, + { + "label": "阿坝县", + "value": "513231" + }, + { + "label": "若尔盖县", + "value": "513232" + }, + { + "label": "红原县", + "value": "513233" + } + ], + [{ + "label": "康定市", + "value": "513301" + }, + { + "label": "泸定县", + "value": "513322" + }, + { + "label": "丹巴县", + "value": "513323" + }, + { + "label": "九龙县", + "value": "513324" + }, + { + "label": "雅江县", + "value": "513325" + }, + { + "label": "道孚县", + "value": "513326" + }, + { + "label": "炉霍县", + "value": "513327" + }, + { + "label": "甘孜县", + "value": "513328" + }, + { + "label": "新龙县", + "value": "513329" + }, + { + "label": "德格县", + "value": "513330" + }, + { + "label": "白玉县", + "value": "513331" + }, + { + "label": "石渠县", + "value": "513332" + }, + { + "label": "色达县", + "value": "513333" + }, + { + "label": "理塘县", + "value": "513334" + }, + { + "label": "巴塘县", + "value": "513335" + }, + { + "label": "乡城县", + "value": "513336" + }, + { + "label": "稻城县", + "value": "513337" + }, + { + "label": "得荣县", + "value": "513338" + } + ], + [{ + "label": "西昌市", + "value": "513401" + }, + { + "label": "木里藏族自治县", + "value": "513422" + }, + { + "label": "盐源县", + "value": "513423" + }, + { + "label": "德昌县", + "value": "513424" + }, + { + "label": "会理县", + "value": "513425" + }, + { + "label": "会东县", + "value": "513426" + }, + { + "label": "宁南县", + "value": "513427" + }, + { + "label": "普格县", + "value": "513428" + }, + { + "label": "布拖县", + "value": "513429" + }, + { + "label": "金阳县", + "value": "513430" + }, + { + "label": "昭觉县", + "value": "513431" + }, + { + "label": "喜德县", + "value": "513432" + }, + { + "label": "冕宁县", + "value": "513433" + }, + { + "label": "越西县", + "value": "513434" + }, + { + "label": "甘洛县", + "value": "513435" + }, + { + "label": "美姑县", + "value": "513436" + }, + { + "label": "雷波县", + "value": "513437" + } + ] + ], + [ + [{ + "label": "南明区", + "value": "520102" + }, + { + "label": "云岩区", + "value": "520103" + }, + { + "label": "花溪区", + "value": "520111" + }, + { + "label": "乌当区", + "value": "520112" + }, + { + "label": "白云区", + "value": "520113" + }, + { + "label": "观山湖区", + "value": "520115" + }, + { + "label": "开阳县", + "value": "520121" + }, + { + "label": "息烽县", + "value": "520122" + }, + { + "label": "修文县", + "value": "520123" + }, + { + "label": "清镇市", + "value": "520181" + } + ], + [{ + "label": "钟山区", + "value": "520201" + }, + { + "label": "六枝特区", + "value": "520203" + }, + { + "label": "水城县", + "value": "520221" + }, + { + "label": "盘州市", + "value": "520281" + } + ], + [{ + "label": "红花岗区", + "value": "520302" + }, + { + "label": "汇川区", + "value": "520303" + }, + { + "label": "播州区", + "value": "520304" + }, + { + "label": "桐梓县", + "value": "520322" + }, + { + "label": "绥阳县", + "value": "520323" + }, + { + "label": "正安县", + "value": "520324" + }, + { + "label": "道真仡佬族苗族自治县", + "value": "520325" + }, + { + "label": "务川仡佬族苗族自治县", + "value": "520326" + }, + { + "label": "凤冈县", + "value": "520327" + }, + { + "label": "湄潭县", + "value": "520328" + }, + { + "label": "余庆县", + "value": "520329" + }, + { + "label": "习水县", + "value": "520330" + }, + { + "label": "赤水市", + "value": "520381" + }, + { + "label": "仁怀市", + "value": "520382" + } + ], + [{ + "label": "西秀区", + "value": "520402" + }, + { + "label": "平坝区", + "value": "520403" + }, + { + "label": "普定县", + "value": "520422" + }, + { + "label": "镇宁布依族苗族自治县", + "value": "520423" + }, + { + "label": "关岭布依族苗族自治县", + "value": "520424" + }, + { + "label": "紫云苗族布依族自治县", + "value": "520425" + } + ], + [{ + "label": "七星关区", + "value": "520502" + }, + { + "label": "大方县", + "value": "520521" + }, + { + "label": "黔西县", + "value": "520522" + }, + { + "label": "金沙县", + "value": "520523" + }, + { + "label": "织金县", + "value": "520524" + }, + { + "label": "纳雍县", + "value": "520525" + }, + { + "label": "威宁彝族回族苗族自治县", + "value": "520526" + }, + { + "label": "赫章县", + "value": "520527" + } + ], + [{ + "label": "碧江区", + "value": "520602" + }, + { + "label": "万山区", + "value": "520603" + }, + { + "label": "江口县", + "value": "520621" + }, + { + "label": "玉屏侗族自治县", + "value": "520622" + }, + { + "label": "石阡县", + "value": "520623" + }, + { + "label": "思南县", + "value": "520624" + }, + { + "label": "印江土家族苗族自治县", + "value": "520625" + }, + { + "label": "德江县", + "value": "520626" + }, + { + "label": "沿河土家族自治县", + "value": "520627" + }, + { + "label": "松桃苗族自治县", + "value": "520628" + } + ], + [{ + "label": "兴义市", + "value": "522301" + }, + { + "label": "兴仁县", + "value": "522322" + }, + { + "label": "普安县", + "value": "522323" + }, + { + "label": "晴隆县", + "value": "522324" + }, + { + "label": "贞丰县", + "value": "522325" + }, + { + "label": "望谟县", + "value": "522326" + }, + { + "label": "册亨县", + "value": "522327" + }, + { + "label": "安龙县", + "value": "522328" + } + ], + [{ + "label": "凯里市", + "value": "522601" + }, + { + "label": "黄平县", + "value": "522622" + }, + { + "label": "施秉县", + "value": "522623" + }, + { + "label": "三穗县", + "value": "522624" + }, + { + "label": "镇远县", + "value": "522625" + }, + { + "label": "岑巩县", + "value": "522626" + }, + { + "label": "天柱县", + "value": "522627" + }, + { + "label": "锦屏县", + "value": "522628" + }, + { + "label": "剑河县", + "value": "522629" + }, + { + "label": "台江县", + "value": "522630" + }, + { + "label": "黎平县", + "value": "522631" + }, + { + "label": "榕江县", + "value": "522632" + }, + { + "label": "从江县", + "value": "522633" + }, + { + "label": "雷山县", + "value": "522634" + }, + { + "label": "麻江县", + "value": "522635" + }, + { + "label": "丹寨县", + "value": "522636" + } + ], + [{ + "label": "都匀市", + "value": "522701" + }, + { + "label": "福泉市", + "value": "522702" + }, + { + "label": "荔波县", + "value": "522722" + }, + { + "label": "贵定县", + "value": "522723" + }, + { + "label": "瓮安县", + "value": "522725" + }, + { + "label": "独山县", + "value": "522726" + }, + { + "label": "平塘县", + "value": "522727" + }, + { + "label": "罗甸县", + "value": "522728" + }, + { + "label": "长顺县", + "value": "522729" + }, + { + "label": "龙里县", + "value": "522730" + }, + { + "label": "惠水县", + "value": "522731" + }, + { + "label": "三都水族自治县", + "value": "522732" + } + ] + ], + [ + [{ + "label": "五华区", + "value": "530102" + }, + { + "label": "盘龙区", + "value": "530103" + }, + { + "label": "官渡区", + "value": "530111" + }, + { + "label": "西山区", + "value": "530112" + }, + { + "label": "东川区", + "value": "530113" + }, + { + "label": "呈贡区", + "value": "530114" + }, + { + "label": "晋宁区", + "value": "530115" + }, + { + "label": "富民县", + "value": "530124" + }, + { + "label": "宜良县", + "value": "530125" + }, + { + "label": "石林彝族自治县", + "value": "530126" + }, + { + "label": "嵩明县", + "value": "530127" + }, + { + "label": "禄劝彝族苗族自治县", + "value": "530128" + }, + { + "label": "寻甸回族彝族自治县", + "value": "530129" + }, + { + "label": "安宁市", + "value": "530181" + } + ], + [{ + "label": "麒麟区", + "value": "530302" + }, + { + "label": "沾益区", + "value": "530303" + }, + { + "label": "马龙县", + "value": "530321" + }, + { + "label": "陆良县", + "value": "530322" + }, + { + "label": "师宗县", + "value": "530323" + }, + { + "label": "罗平县", + "value": "530324" + }, + { + "label": "富源县", + "value": "530325" + }, + { + "label": "会泽县", + "value": "530326" + }, + { + "label": "宣威市", + "value": "530381" + } + ], + [{ + "label": "红塔区", + "value": "530402" + }, + { + "label": "江川区", + "value": "530403" + }, + { + "label": "澄江县", + "value": "530422" + }, + { + "label": "通海县", + "value": "530423" + }, + { + "label": "华宁县", + "value": "530424" + }, + { + "label": "易门县", + "value": "530425" + }, + { + "label": "峨山彝族自治县", + "value": "530426" + }, + { + "label": "新平彝族傣族自治县", + "value": "530427" + }, + { + "label": "元江哈尼族彝族傣族自治县", + "value": "530428" + } + ], + [{ + "label": "隆阳区", + "value": "530502" + }, + { + "label": "施甸县", + "value": "530521" + }, + { + "label": "龙陵县", + "value": "530523" + }, + { + "label": "昌宁县", + "value": "530524" + }, + { + "label": "腾冲市", + "value": "530581" + } + ], + [{ + "label": "昭阳区", + "value": "530602" + }, + { + "label": "鲁甸县", + "value": "530621" + }, + { + "label": "巧家县", + "value": "530622" + }, + { + "label": "盐津县", + "value": "530623" + }, + { + "label": "大关县", + "value": "530624" + }, + { + "label": "永善县", + "value": "530625" + }, + { + "label": "绥江县", + "value": "530626" + }, + { + "label": "镇雄县", + "value": "530627" + }, + { + "label": "彝良县", + "value": "530628" + }, + { + "label": "威信县", + "value": "530629" + }, + { + "label": "水富县", + "value": "530630" + } + ], + [{ + "label": "古城区", + "value": "530702" + }, + { + "label": "玉龙纳西族自治县", + "value": "530721" + }, + { + "label": "永胜县", + "value": "530722" + }, + { + "label": "华坪县", + "value": "530723" + }, + { + "label": "宁蒗彝族自治县", + "value": "530724" + } + ], + [{ + "label": "思茅区", + "value": "530802" + }, + { + "label": "宁洱哈尼族彝族自治县", + "value": "530821" + }, + { + "label": "墨江哈尼族自治县", + "value": "530822" + }, + { + "label": "景东彝族自治县", + "value": "530823" + }, + { + "label": "景谷傣族彝族自治县", + "value": "530824" + }, + { + "label": "镇沅彝族哈尼族拉祜族自治县", + "value": "530825" + }, + { + "label": "江城哈尼族彝族自治县", + "value": "530826" + }, + { + "label": "孟连傣族拉祜族佤族自治县", + "value": "530827" + }, + { + "label": "澜沧拉祜族自治县", + "value": "530828" + }, + { + "label": "西盟佤族自治县", + "value": "530829" + } + ], + [{ + "label": "临翔区", + "value": "530902" + }, + { + "label": "凤庆县", + "value": "530921" + }, + { + "label": "云县", + "value": "530922" + }, + { + "label": "永德县", + "value": "530923" + }, + { + "label": "镇康县", + "value": "530924" + }, + { + "label": "双江拉祜族佤族布朗族傣族自治县", + "value": "530925" + }, + { + "label": "耿马傣族佤族自治县", + "value": "530926" + }, + { + "label": "沧源佤族自治县", + "value": "530927" + } + ], + [{ + "label": "楚雄市", + "value": "532301" + }, + { + "label": "双柏县", + "value": "532322" + }, + { + "label": "牟定县", + "value": "532323" + }, + { + "label": "南华县", + "value": "532324" + }, + { + "label": "姚安县", + "value": "532325" + }, + { + "label": "大姚县", + "value": "532326" + }, + { + "label": "永仁县", + "value": "532327" + }, + { + "label": "元谋县", + "value": "532328" + }, + { + "label": "武定县", + "value": "532329" + }, + { + "label": "禄丰县", + "value": "532331" + } + ], + [{ + "label": "个旧市", + "value": "532501" + }, + { + "label": "开远市", + "value": "532502" + }, + { + "label": "蒙自市", + "value": "532503" + }, + { + "label": "弥勒市", + "value": "532504" + }, + { + "label": "屏边苗族自治县", + "value": "532523" + }, + { + "label": "建水县", + "value": "532524" + }, + { + "label": "石屏县", + "value": "532525" + }, + { + "label": "泸西县", + "value": "532527" + }, + { + "label": "元阳县", + "value": "532528" + }, + { + "label": "红河县", + "value": "532529" + }, + { + "label": "金平苗族瑶族傣族自治县", + "value": "532530" + }, + { + "label": "绿春县", + "value": "532531" + }, + { + "label": "河口瑶族自治县", + "value": "532532" + } + ], + [{ + "label": "文山市", + "value": "532601" + }, + { + "label": "砚山县", + "value": "532622" + }, + { + "label": "西畴县", + "value": "532623" + }, + { + "label": "麻栗坡县", + "value": "532624" + }, + { + "label": "马关县", + "value": "532625" + }, + { + "label": "丘北县", + "value": "532626" + }, + { + "label": "广南县", + "value": "532627" + }, + { + "label": "富宁县", + "value": "532628" + } + ], + [{ + "label": "景洪市", + "value": "532801" + }, + { + "label": "勐海县", + "value": "532822" + }, + { + "label": "勐腊县", + "value": "532823" + } + ], + [{ + "label": "大理市", + "value": "532901" + }, + { + "label": "漾濞彝族自治县", + "value": "532922" + }, + { + "label": "祥云县", + "value": "532923" + }, + { + "label": "宾川县", + "value": "532924" + }, + { + "label": "弥渡县", + "value": "532925" + }, + { + "label": "南涧彝族自治县", + "value": "532926" + }, + { + "label": "巍山彝族回族自治县", + "value": "532927" + }, + { + "label": "永平县", + "value": "532928" + }, + { + "label": "云龙县", + "value": "532929" + }, + { + "label": "洱源县", + "value": "532930" + }, + { + "label": "剑川县", + "value": "532931" + }, + { + "label": "鹤庆县", + "value": "532932" + } + ], + [{ + "label": "瑞丽市", + "value": "533102" + }, + { + "label": "芒市", + "value": "533103" + }, + { + "label": "梁河县", + "value": "533122" + }, + { + "label": "盈江县", + "value": "533123" + }, + { + "label": "陇川县", + "value": "533124" + } + ], + [{ + "label": "泸水市", + "value": "533301" + }, + { + "label": "福贡县", + "value": "533323" + }, + { + "label": "贡山独龙族怒族自治县", + "value": "533324" + }, + { + "label": "兰坪白族普米族自治县", + "value": "533325" + } + ], + [{ + "label": "香格里拉市", + "value": "533401" + }, + { + "label": "德钦县", + "value": "533422" + }, + { + "label": "维西傈僳族自治县", + "value": "533423" + } + ] + ], + [ + [{ + "label": "城关区", + "value": "540102" + }, + { + "label": "堆龙德庆区", + "value": "540103" + }, + { + "label": "林周县", + "value": "540121" + }, + { + "label": "当雄县", + "value": "540122" + }, + { + "label": "尼木县", + "value": "540123" + }, + { + "label": "曲水县", + "value": "540124" + }, + { + "label": "达孜县", + "value": "540126" + }, + { + "label": "墨竹工卡县", + "value": "540127" + }, + { + "label": "格尔木藏青工业园区", + "value": "540171" + }, + { + "label": "拉萨经济技术开发区", + "value": "540172" + }, + { + "label": "西藏文化旅游创意园区", + "value": "540173" + }, + { + "label": "达孜工业园区", + "value": "540174" + } + ], + [{ + "label": "桑珠孜区", + "value": "540202" + }, + { + "label": "南木林县", + "value": "540221" + }, + { + "label": "江孜县", + "value": "540222" + }, + { + "label": "定日县", + "value": "540223" + }, + { + "label": "萨迦县", + "value": "540224" + }, + { + "label": "拉孜县", + "value": "540225" + }, + { + "label": "昂仁县", + "value": "540226" + }, + { + "label": "谢通门县", + "value": "540227" + }, + { + "label": "白朗县", + "value": "540228" + }, + { + "label": "仁布县", + "value": "540229" + }, + { + "label": "康马县", + "value": "540230" + }, + { + "label": "定结县", + "value": "540231" + }, + { + "label": "仲巴县", + "value": "540232" + }, + { + "label": "亚东县", + "value": "540233" + }, + { + "label": "吉隆县", + "value": "540234" + }, + { + "label": "聂拉木县", + "value": "540235" + }, + { + "label": "萨嘎县", + "value": "540236" + }, + { + "label": "岗巴县", + "value": "540237" + } + ], + [{ + "label": "卡若区", + "value": "540302" + }, + { + "label": "江达县", + "value": "540321" + }, + { + "label": "贡觉县", + "value": "540322" + }, + { + "label": "类乌齐县", + "value": "540323" + }, + { + "label": "丁青县", + "value": "540324" + }, + { + "label": "察雅县", + "value": "540325" + }, + { + "label": "八宿县", + "value": "540326" + }, + { + "label": "左贡县", + "value": "540327" + }, + { + "label": "芒康县", + "value": "540328" + }, + { + "label": "洛隆县", + "value": "540329" + }, + { + "label": "边坝县", + "value": "540330" + } + ], + [{ + "label": "巴宜区", + "value": "540402" + }, + { + "label": "工布江达县", + "value": "540421" + }, + { + "label": "米林县", + "value": "540422" + }, + { + "label": "墨脱县", + "value": "540423" + }, + { + "label": "波密县", + "value": "540424" + }, + { + "label": "察隅县", + "value": "540425" + }, + { + "label": "朗县", + "value": "540426" + } + ], + [{ + "label": "乃东区", + "value": "540502" + }, + { + "label": "扎囊县", + "value": "540521" + }, + { + "label": "贡嘎县", + "value": "540522" + }, + { + "label": "桑日县", + "value": "540523" + }, + { + "label": "琼结县", + "value": "540524" + }, + { + "label": "曲松县", + "value": "540525" + }, + { + "label": "措美县", + "value": "540526" + }, + { + "label": "洛扎县", + "value": "540527" + }, + { + "label": "加查县", + "value": "540528" + }, + { + "label": "隆子县", + "value": "540529" + }, + { + "label": "错那县", + "value": "540530" + }, + { + "label": "浪卡子县", + "value": "540531" + } + ], + [{ + "label": "那曲县", + "value": "542421" + }, + { + "label": "嘉黎县", + "value": "542422" + }, + { + "label": "比如县", + "value": "542423" + }, + { + "label": "聂荣县", + "value": "542424" + }, + { + "label": "安多县", + "value": "542425" + }, + { + "label": "申扎县", + "value": "542426" + }, + { + "label": "索县", + "value": "542427" + }, + { + "label": "班戈县", + "value": "542428" + }, + { + "label": "巴青县", + "value": "542429" + }, + { + "label": "尼玛县", + "value": "542430" + }, + { + "label": "双湖县", + "value": "542431" + } + ], + [{ + "label": "普兰县", + "value": "542521" + }, + { + "label": "札达县", + "value": "542522" + }, + { + "label": "噶尔县", + "value": "542523" + }, + { + "label": "日土县", + "value": "542524" + }, + { + "label": "革吉县", + "value": "542525" + }, + { + "label": "改则县", + "value": "542526" + }, + { + "label": "措勤县", + "value": "542527" + } + ] + ], + [ + [{ + "label": "新城区", + "value": "610102" + }, + { + "label": "碑林区", + "value": "610103" + }, + { + "label": "莲湖区", + "value": "610104" + }, + { + "label": "灞桥区", + "value": "610111" + }, + { + "label": "未央区", + "value": "610112" + }, + { + "label": "雁塔区", + "value": "610113" + }, + { + "label": "阎良区", + "value": "610114" + }, + { + "label": "临潼区", + "value": "610115" + }, + { + "label": "长安区", + "value": "610116" + }, + { + "label": "高陵区", + "value": "610117" + }, + { + "label": "鄠邑区", + "value": "610118" + }, + { + "label": "蓝田县", + "value": "610122" + }, + { + "label": "周至县", + "value": "610124" + } + ], + [{ + "label": "王益区", + "value": "610202" + }, + { + "label": "印台区", + "value": "610203" + }, + { + "label": "耀州区", + "value": "610204" + }, + { + "label": "宜君县", + "value": "610222" + } + ], + [{ + "label": "渭滨区", + "value": "610302" + }, + { + "label": "金台区", + "value": "610303" + }, + { + "label": "陈仓区", + "value": "610304" + }, + { + "label": "凤翔县", + "value": "610322" + }, + { + "label": "岐山县", + "value": "610323" + }, + { + "label": "扶风县", + "value": "610324" + }, + { + "label": "眉县", + "value": "610326" + }, + { + "label": "陇县", + "value": "610327" + }, + { + "label": "千阳县", + "value": "610328" + }, + { + "label": "麟游县", + "value": "610329" + }, + { + "label": "凤县", + "value": "610330" + }, + { + "label": "太白县", + "value": "610331" + } + ], + [{ + "label": "秦都区", + "value": "610402" + }, + { + "label": "杨陵区", + "value": "610403" + }, + { + "label": "渭城区", + "value": "610404" + }, + { + "label": "三原县", + "value": "610422" + }, + { + "label": "泾阳县", + "value": "610423" + }, + { + "label": "乾县", + "value": "610424" + }, + { + "label": "礼泉县", + "value": "610425" + }, + { + "label": "永寿县", + "value": "610426" + }, + { + "label": "彬县", + "value": "610427" + }, + { + "label": "长武县", + "value": "610428" + }, + { + "label": "旬邑县", + "value": "610429" + }, + { + "label": "淳化县", + "value": "610430" + }, + { + "label": "武功县", + "value": "610431" + }, + { + "label": "兴平市", + "value": "610481" + } + ], + [{ + "label": "临渭区", + "value": "610502" + }, + { + "label": "华州区", + "value": "610503" + }, + { + "label": "潼关县", + "value": "610522" + }, + { + "label": "大荔县", + "value": "610523" + }, + { + "label": "合阳县", + "value": "610524" + }, + { + "label": "澄城县", + "value": "610525" + }, + { + "label": "蒲城县", + "value": "610526" + }, + { + "label": "白水县", + "value": "610527" + }, + { + "label": "富平县", + "value": "610528" + }, + { + "label": "韩城市", + "value": "610581" + }, + { + "label": "华阴市", + "value": "610582" + } + ], + [{ + "label": "宝塔区", + "value": "610602" + }, + { + "label": "安塞区", + "value": "610603" + }, + { + "label": "延长县", + "value": "610621" + }, + { + "label": "延川县", + "value": "610622" + }, + { + "label": "子长县", + "value": "610623" + }, + { + "label": "志丹县", + "value": "610625" + }, + { + "label": "吴起县", + "value": "610626" + }, + { + "label": "甘泉县", + "value": "610627" + }, + { + "label": "富县", + "value": "610628" + }, + { + "label": "洛川县", + "value": "610629" + }, + { + "label": "宜川县", + "value": "610630" + }, + { + "label": "黄龙县", + "value": "610631" + }, + { + "label": "黄陵县", + "value": "610632" + } + ], + [{ + "label": "汉台区", + "value": "610702" + }, + { + "label": "南郑区", + "value": "610703" + }, + { + "label": "城固县", + "value": "610722" + }, + { + "label": "洋县", + "value": "610723" + }, + { + "label": "西乡县", + "value": "610724" + }, + { + "label": "勉县", + "value": "610725" + }, + { + "label": "宁强县", + "value": "610726" + }, + { + "label": "略阳县", + "value": "610727" + }, + { + "label": "镇巴县", + "value": "610728" + }, + { + "label": "留坝县", + "value": "610729" + }, + { + "label": "佛坪县", + "value": "610730" + } + ], + [{ + "label": "榆阳区", + "value": "610802" + }, + { + "label": "横山区", + "value": "610803" + }, + { + "label": "府谷县", + "value": "610822" + }, + { + "label": "靖边县", + "value": "610824" + }, + { + "label": "定边县", + "value": "610825" + }, + { + "label": "绥德县", + "value": "610826" + }, + { + "label": "米脂县", + "value": "610827" + }, + { + "label": "佳县", + "value": "610828" + }, + { + "label": "吴堡县", + "value": "610829" + }, + { + "label": "清涧县", + "value": "610830" + }, + { + "label": "子洲县", + "value": "610831" + }, + { + "label": "神木市", + "value": "610881" + } + ], + [{ + "label": "汉滨区", + "value": "610902" + }, + { + "label": "汉阴县", + "value": "610921" + }, + { + "label": "石泉县", + "value": "610922" + }, + { + "label": "宁陕县", + "value": "610923" + }, + { + "label": "紫阳县", + "value": "610924" + }, + { + "label": "岚皋县", + "value": "610925" + }, + { + "label": "平利县", + "value": "610926" + }, + { + "label": "镇坪县", + "value": "610927" + }, + { + "label": "旬阳县", + "value": "610928" + }, + { + "label": "白河县", + "value": "610929" + } + ], + [{ + "label": "商州区", + "value": "611002" + }, + { + "label": "洛南县", + "value": "611021" + }, + { + "label": "丹凤县", + "value": "611022" + }, + { + "label": "商南县", + "value": "611023" + }, + { + "label": "山阳县", + "value": "611024" + }, + { + "label": "镇安县", + "value": "611025" + }, + { + "label": "柞水县", + "value": "611026" + } + ] + ], + [ + [{ + "label": "城关区", + "value": "620102" + }, + { + "label": "七里河区", + "value": "620103" + }, + { + "label": "西固区", + "value": "620104" + }, + { + "label": "安宁区", + "value": "620105" + }, + { + "label": "红古区", + "value": "620111" + }, + { + "label": "永登县", + "value": "620121" + }, + { + "label": "皋兰县", + "value": "620122" + }, + { + "label": "榆中县", + "value": "620123" + }, + { + "label": "兰州新区", + "value": "620171" + } + ], + [{ + "label": "嘉峪关市", + "value": "620201" + }], + [{ + "label": "金川区", + "value": "620302" + }, + { + "label": "永昌县", + "value": "620321" + } + ], + [{ + "label": "白银区", + "value": "620402" + }, + { + "label": "平川区", + "value": "620403" + }, + { + "label": "靖远县", + "value": "620421" + }, + { + "label": "会宁县", + "value": "620422" + }, + { + "label": "景泰县", + "value": "620423" + } + ], + [{ + "label": "秦州区", + "value": "620502" + }, + { + "label": "麦积区", + "value": "620503" + }, + { + "label": "清水县", + "value": "620521" + }, + { + "label": "秦安县", + "value": "620522" + }, + { + "label": "甘谷县", + "value": "620523" + }, + { + "label": "武山县", + "value": "620524" + }, + { + "label": "张家川回族自治县", + "value": "620525" + } + ], + [{ + "label": "凉州区", + "value": "620602" + }, + { + "label": "民勤县", + "value": "620621" + }, + { + "label": "古浪县", + "value": "620622" + }, + { + "label": "天祝藏族自治县", + "value": "620623" + } + ], + [{ + "label": "甘州区", + "value": "620702" + }, + { + "label": "肃南裕固族自治县", + "value": "620721" + }, + { + "label": "民乐县", + "value": "620722" + }, + { + "label": "临泽县", + "value": "620723" + }, + { + "label": "高台县", + "value": "620724" + }, + { + "label": "山丹县", + "value": "620725" + } + ], + [{ + "label": "崆峒区", + "value": "620802" + }, + { + "label": "泾川县", + "value": "620821" + }, + { + "label": "灵台县", + "value": "620822" + }, + { + "label": "崇信县", + "value": "620823" + }, + { + "label": "华亭县", + "value": "620824" + }, + { + "label": "庄浪县", + "value": "620825" + }, + { + "label": "静宁县", + "value": "620826" + }, + { + "label": "平凉工业园区", + "value": "620871" + } + ], + [{ + "label": "肃州区", + "value": "620902" + }, + { + "label": "金塔县", + "value": "620921" + }, + { + "label": "瓜州县", + "value": "620922" + }, + { + "label": "肃北蒙古族自治县", + "value": "620923" + }, + { + "label": "阿克塞哈萨克族自治县", + "value": "620924" + }, + { + "label": "玉门市", + "value": "620981" + }, + { + "label": "敦煌市", + "value": "620982" + } + ], + [{ + "label": "西峰区", + "value": "621002" + }, + { + "label": "庆城县", + "value": "621021" + }, + { + "label": "环县", + "value": "621022" + }, + { + "label": "华池县", + "value": "621023" + }, + { + "label": "合水县", + "value": "621024" + }, + { + "label": "正宁县", + "value": "621025" + }, + { + "label": "宁县", + "value": "621026" + }, + { + "label": "镇原县", + "value": "621027" + } + ], + [{ + "label": "安定区", + "value": "621102" + }, + { + "label": "通渭县", + "value": "621121" + }, + { + "label": "陇西县", + "value": "621122" + }, + { + "label": "渭源县", + "value": "621123" + }, + { + "label": "临洮县", + "value": "621124" + }, + { + "label": "漳县", + "value": "621125" + }, + { + "label": "岷县", + "value": "621126" + } + ], + [{ + "label": "武都区", + "value": "621202" + }, + { + "label": "成县", + "value": "621221" + }, + { + "label": "文县", + "value": "621222" + }, + { + "label": "宕昌县", + "value": "621223" + }, + { + "label": "康县", + "value": "621224" + }, + { + "label": "西和县", + "value": "621225" + }, + { + "label": "礼县", + "value": "621226" + }, + { + "label": "徽县", + "value": "621227" + }, + { + "label": "两当县", + "value": "621228" + } + ], + [{ + "label": "临夏市", + "value": "622901" + }, + { + "label": "临夏县", + "value": "622921" + }, + { + "label": "康乐县", + "value": "622922" + }, + { + "label": "永靖县", + "value": "622923" + }, + { + "label": "广河县", + "value": "622924" + }, + { + "label": "和政县", + "value": "622925" + }, + { + "label": "东乡族自治县", + "value": "622926" + }, + { + "label": "积石山保安族东乡族撒拉族自治县", + "value": "622927" + } + ], + [{ + "label": "合作市", + "value": "623001" + }, + { + "label": "临潭县", + "value": "623021" + }, + { + "label": "卓尼县", + "value": "623022" + }, + { + "label": "舟曲县", + "value": "623023" + }, + { + "label": "迭部县", + "value": "623024" + }, + { + "label": "玛曲县", + "value": "623025" + }, + { + "label": "碌曲县", + "value": "623026" + }, + { + "label": "夏河县", + "value": "623027" + } + ] + ], + [ + [{ + "label": "城东区", + "value": "630102" + }, + { + "label": "城中区", + "value": "630103" + }, + { + "label": "城西区", + "value": "630104" + }, + { + "label": "城北区", + "value": "630105" + }, + { + "label": "大通回族土族自治县", + "value": "630121" + }, + { + "label": "湟中县", + "value": "630122" + }, + { + "label": "湟源县", + "value": "630123" + } + ], + [{ + "label": "乐都区", + "value": "630202" + }, + { + "label": "平安区", + "value": "630203" + }, + { + "label": "民和回族土族自治县", + "value": "630222" + }, + { + "label": "互助土族自治县", + "value": "630223" + }, + { + "label": "化隆回族自治县", + "value": "630224" + }, + { + "label": "循化撒拉族自治县", + "value": "630225" + } + ], + [{ + "label": "门源回族自治县", + "value": "632221" + }, + { + "label": "祁连县", + "value": "632222" + }, + { + "label": "海晏县", + "value": "632223" + }, + { + "label": "刚察县", + "value": "632224" + } + ], + [{ + "label": "同仁县", + "value": "632321" + }, + { + "label": "尖扎县", + "value": "632322" + }, + { + "label": "泽库县", + "value": "632323" + }, + { + "label": "河南蒙古族自治县", + "value": "632324" + } + ], + [{ + "label": "共和县", + "value": "632521" + }, + { + "label": "同德县", + "value": "632522" + }, + { + "label": "贵德县", + "value": "632523" + }, + { + "label": "兴海县", + "value": "632524" + }, + { + "label": "贵南县", + "value": "632525" + } + ], + [{ + "label": "玛沁县", + "value": "632621" + }, + { + "label": "班玛县", + "value": "632622" + }, + { + "label": "甘德县", + "value": "632623" + }, + { + "label": "达日县", + "value": "632624" + }, + { + "label": "久治县", + "value": "632625" + }, + { + "label": "玛多县", + "value": "632626" + } + ], + [{ + "label": "玉树市", + "value": "632701" + }, + { + "label": "杂多县", + "value": "632722" + }, + { + "label": "称多县", + "value": "632723" + }, + { + "label": "治多县", + "value": "632724" + }, + { + "label": "囊谦县", + "value": "632725" + }, + { + "label": "曲麻莱县", + "value": "632726" + } + ], + [{ + "label": "格尔木市", + "value": "632801" + }, + { + "label": "德令哈市", + "value": "632802" + }, + { + "label": "乌兰县", + "value": "632821" + }, + { + "label": "都兰县", + "value": "632822" + }, + { + "label": "天峻县", + "value": "632823" + }, + { + "label": "大柴旦行政委员会", + "value": "632857" + }, + { + "label": "冷湖行政委员会", + "value": "632858" + }, + { + "label": "茫崖行政委员会", + "value": "632859" + } + ] + ], + [ + [{ + "label": "兴庆区", + "value": "640104" + }, + { + "label": "西夏区", + "value": "640105" + }, + { + "label": "金凤区", + "value": "640106" + }, + { + "label": "永宁县", + "value": "640121" + }, + { + "label": "贺兰县", + "value": "640122" + }, + { + "label": "灵武市", + "value": "640181" + } + ], + [{ + "label": "大武口区", + "value": "640202" + }, + { + "label": "惠农区", + "value": "640205" + }, + { + "label": "平罗县", + "value": "640221" + } + ], + [{ + "label": "利通区", + "value": "640302" + }, + { + "label": "红寺堡区", + "value": "640303" + }, + { + "label": "盐池县", + "value": "640323" + }, + { + "label": "同心县", + "value": "640324" + }, + { + "label": "青铜峡市", + "value": "640381" + } + ], + [{ + "label": "原州区", + "value": "640402" + }, + { + "label": "西吉县", + "value": "640422" + }, + { + "label": "隆德县", + "value": "640423" + }, + { + "label": "泾源县", + "value": "640424" + }, + { + "label": "彭阳县", + "value": "640425" + } + ], + [{ + "label": "沙坡头区", + "value": "640502" + }, + { + "label": "中宁县", + "value": "640521" + }, + { + "label": "海原县", + "value": "640522" + } + ] + ], + [ + [{ + "label": "天山区", + "value": "650102" + }, + { + "label": "沙依巴克区", + "value": "650103" + }, + { + "label": "新市区", + "value": "650104" + }, + { + "label": "水磨沟区", + "value": "650105" + }, + { + "label": "头屯河区", + "value": "650106" + }, + { + "label": "达坂城区", + "value": "650107" + }, + { + "label": "米东区", + "value": "650109" + }, + { + "label": "乌鲁木齐县", + "value": "650121" + }, + { + "label": "乌鲁木齐经济技术开发区", + "value": "650171" + }, + { + "label": "乌鲁木齐高新技术产业开发区", + "value": "650172" + } + ], + [{ + "label": "独山子区", + "value": "650202" + }, + { + "label": "克拉玛依区", + "value": "650203" + }, + { + "label": "白碱滩区", + "value": "650204" + }, + { + "label": "乌尔禾区", + "value": "650205" + } + ], + [{ + "label": "高昌区", + "value": "650402" + }, + { + "label": "鄯善县", + "value": "650421" + }, + { + "label": "托克逊县", + "value": "650422" + } + ], + [{ + "label": "伊州区", + "value": "650502" + }, + { + "label": "巴里坤哈萨克自治县", + "value": "650521" + }, + { + "label": "伊吾县", + "value": "650522" + } + ], + [{ + "label": "昌吉市", + "value": "652301" + }, + { + "label": "阜康市", + "value": "652302" + }, + { + "label": "呼图壁县", + "value": "652323" + }, + { + "label": "玛纳斯县", + "value": "652324" + }, + { + "label": "奇台县", + "value": "652325" + }, + { + "label": "吉木萨尔县", + "value": "652327" + }, + { + "label": "木垒哈萨克自治县", + "value": "652328" + } + ], + [{ + "label": "博乐市", + "value": "652701" + }, + { + "label": "阿拉山口市", + "value": "652702" + }, + { + "label": "精河县", + "value": "652722" + }, + { + "label": "温泉县", + "value": "652723" + } + ], + [{ + "label": "库尔勒市", + "value": "652801" + }, + { + "label": "轮台县", + "value": "652822" + }, + { + "label": "尉犁县", + "value": "652823" + }, + { + "label": "若羌县", + "value": "652824" + }, + { + "label": "且末县", + "value": "652825" + }, + { + "label": "焉耆回族自治县", + "value": "652826" + }, + { + "label": "和静县", + "value": "652827" + }, + { + "label": "和硕县", + "value": "652828" + }, + { + "label": "博湖县", + "value": "652829" + }, + { + "label": "库尔勒经济技术开发区", + "value": "652871" + } + ], + [{ + "label": "阿克苏市", + "value": "652901" + }, + { + "label": "温宿县", + "value": "652922" + }, + { + "label": "库车县", + "value": "652923" + }, + { + "label": "沙雅县", + "value": "652924" + }, + { + "label": "新和县", + "value": "652925" + }, + { + "label": "拜城县", + "value": "652926" + }, + { + "label": "乌什县", + "value": "652927" + }, + { + "label": "阿瓦提县", + "value": "652928" + }, + { + "label": "柯坪县", + "value": "652929" + } + ], + [{ + "label": "阿图什市", + "value": "653001" + }, + { + "label": "阿克陶县", + "value": "653022" + }, + { + "label": "阿合奇县", + "value": "653023" + }, + { + "label": "乌恰县", + "value": "653024" + } + ], + [{ + "label": "喀什市", + "value": "653101" + }, + { + "label": "疏附县", + "value": "653121" + }, + { + "label": "疏勒县", + "value": "653122" + }, + { + "label": "英吉沙县", + "value": "653123" + }, + { + "label": "泽普县", + "value": "653124" + }, + { + "label": "莎车县", + "value": "653125" + }, + { + "label": "叶城县", + "value": "653126" + }, + { + "label": "麦盖提县", + "value": "653127" + }, + { + "label": "岳普湖县", + "value": "653128" + }, + { + "label": "伽师县", + "value": "653129" + }, + { + "label": "巴楚县", + "value": "653130" + }, + { + "label": "塔什库尔干塔吉克自治县", + "value": "653131" + } + ], + [{ + "label": "和田市", + "value": "653201" + }, + { + "label": "和田县", + "value": "653221" + }, + { + "label": "墨玉县", + "value": "653222" + }, + { + "label": "皮山县", + "value": "653223" + }, + { + "label": "洛浦县", + "value": "653224" + }, + { + "label": "策勒县", + "value": "653225" + }, + { + "label": "于田县", + "value": "653226" + }, + { + "label": "民丰县", + "value": "653227" + } + ], + [{ + "label": "伊宁市", + "value": "654002" + }, + { + "label": "奎屯市", + "value": "654003" + }, + { + "label": "霍尔果斯市", + "value": "654004" + }, + { + "label": "伊宁县", + "value": "654021" + }, + { + "label": "察布查尔锡伯自治县", + "value": "654022" + }, + { + "label": "霍城县", + "value": "654023" + }, + { + "label": "巩留县", + "value": "654024" + }, + { + "label": "新源县", + "value": "654025" + }, + { + "label": "昭苏县", + "value": "654026" + }, + { + "label": "特克斯县", + "value": "654027" + }, + { + "label": "尼勒克县", + "value": "654028" + } + ], + [{ + "label": "塔城市", + "value": "654201" + }, + { + "label": "乌苏市", + "value": "654202" + }, + { + "label": "额敏县", + "value": "654221" + }, + { + "label": "沙湾县", + "value": "654223" + }, + { + "label": "托里县", + "value": "654224" + }, + { + "label": "裕民县", + "value": "654225" + }, + { + "label": "和布克赛尔蒙古自治县", + "value": "654226" + } + ], + [{ + "label": "阿勒泰市", + "value": "654301" + }, + { + "label": "布尔津县", + "value": "654321" + }, + { + "label": "富蕴县", + "value": "654322" + }, + { + "label": "福海县", + "value": "654323" + }, + { + "label": "哈巴河县", + "value": "654324" + }, + { + "label": "青河县", + "value": "654325" + }, + { + "label": "吉木乃县", + "value": "654326" + } + ], + [{ + "label": "石河子市", + "value": "659001" + }, + { + "label": "阿拉尔市", + "value": "659002" + }, + { + "label": "图木舒克市", + "value": "659003" + }, + { + "label": "五家渠市", + "value": "659004" + }, + { + "label": "铁门关市", + "value": "659006" + } + ] + ], + [ + [{ + "label": "台北", + "value": "660101" + }], + [{ + "label": "高雄", + "value": "660201" + }], + [{ + "label": "基隆", + "value": "660301" + }], + [{ + "label": "台中", + "value": "660401" + }], + [{ + "label": "台南", + "value": "660501" + }], + [{ + "label": "新竹", + "value": "660601" + }], + [{ + "label": "嘉义", + "value": "660701" + }], + [{ + "label": "宜兰", + "value": "660801" + }], + [{ + "label": "桃园", + "value": "660901" + }], + [{ + "label": "苗栗", + "value": "661001" + }], + [{ + "label": "彰化", + "value": "661101" + }], + [{ + "label": "南投", + "value": "661201" + }], + [{ + "label": "云林", + "value": "661301" + }], + [{ + "label": "屏东", + "value": "661401" + }], + [{ + "label": "台东", + "value": "661501" + }], + [{ + "label": "花莲", + "value": "661601" + }], + [{ + "label": "澎湖", + "value": "661701" + }] + ], + [ + [{ + "label": "香港岛", + "value": "670101" + }], + [{ + "label": "九龙", + "value": "670201" + }], + [{ + "label": "新界", + "value": "670301" + }] + ], + [ + [{ + "label": "澳门半岛", + "value": "680101" + }], + [{ + "label": "氹仔岛", + "value": "680201" + }], + [{ + "label": "路环岛", + "value": "680301" + }], + [{ + "label": "路氹城", + "value": "680401" + }] + ] +] +export default areaData; diff --git a/fe/PDA/components/mpvue-citypicker/city-data/city.js b/fe/PDA/components/mpvue-citypicker/city-data/city.js new file mode 100644 index 000000000..8c1dc262f --- /dev/null +++ b/fe/PDA/components/mpvue-citypicker/city-data/city.js @@ -0,0 +1,1503 @@ +/* eslint-disable */ +var cityData = [ + [{ + "label": "市辖区", + "value": "1101" + }], + [{ + "label": "市辖区", + "value": "1201" + }], + [{ + "label": "石家庄市", + "value": "1301" + }, + { + "label": "唐山市", + "value": "1302" + }, + { + "label": "秦皇岛市", + "value": "1303" + }, + { + "label": "邯郸市", + "value": "1304" + }, + { + "label": "邢台市", + "value": "1305" + }, + { + "label": "保定市", + "value": "1306" + }, + { + "label": "张家口市", + "value": "1307" + }, + { + "label": "承德市", + "value": "1308" + }, + { + "label": "沧州市", + "value": "1309" + }, + { + "label": "廊坊市", + "value": "1310" + }, + { + "label": "衡水市", + "value": "1311" + } + ], + [{ + "label": "太原市", + "value": "1401" + }, + { + "label": "大同市", + "value": "1402" + }, + { + "label": "阳泉市", + "value": "1403" + }, + { + "label": "长治市", + "value": "1404" + }, + { + "label": "晋城市", + "value": "1405" + }, + { + "label": "朔州市", + "value": "1406" + }, + { + "label": "晋中市", + "value": "1407" + }, + { + "label": "运城市", + "value": "1408" + }, + { + "label": "忻州市", + "value": "1409" + }, + { + "label": "临汾市", + "value": "1410" + }, + { + "label": "吕梁市", + "value": "1411" + } + ], + [{ + "label": "呼和浩特市", + "value": "1501" + }, + { + "label": "包头市", + "value": "1502" + }, + { + "label": "乌海市", + "value": "1503" + }, + { + "label": "赤峰市", + "value": "1504" + }, + { + "label": "通辽市", + "value": "1505" + }, + { + "label": "鄂尔多斯市", + "value": "1506" + }, + { + "label": "呼伦贝尔市", + "value": "1507" + }, + { + "label": "巴彦淖尔市", + "value": "1508" + }, + { + "label": "乌兰察布市", + "value": "1509" + }, + { + "label": "兴安盟", + "value": "1522" + }, + { + "label": "锡林郭勒盟", + "value": "1525" + }, + { + "label": "阿拉善盟", + "value": "1529" + } + ], + [{ + "label": "沈阳市", + "value": "2101" + }, + { + "label": "大连市", + "value": "2102" + }, + { + "label": "鞍山市", + "value": "2103" + }, + { + "label": "抚顺市", + "value": "2104" + }, + { + "label": "本溪市", + "value": "2105" + }, + { + "label": "丹东市", + "value": "2106" + }, + { + "label": "锦州市", + "value": "2107" + }, + { + "label": "营口市", + "value": "2108" + }, + { + "label": "阜新市", + "value": "2109" + }, + { + "label": "辽阳市", + "value": "2110" + }, + { + "label": "盘锦市", + "value": "2111" + }, + { + "label": "铁岭市", + "value": "2112" + }, + { + "label": "朝阳市", + "value": "2113" + }, + { + "label": "葫芦岛市", + "value": "2114" + } + ], + [{ + "label": "长春市", + "value": "2201" + }, + { + "label": "吉林市", + "value": "2202" + }, + { + "label": "四平市", + "value": "2203" + }, + { + "label": "辽源市", + "value": "2204" + }, + { + "label": "通化市", + "value": "2205" + }, + { + "label": "白山市", + "value": "2206" + }, + { + "label": "松原市", + "value": "2207" + }, + { + "label": "白城市", + "value": "2208" + }, + { + "label": "延边朝鲜族自治州", + "value": "2224" + } + ], + [{ + "label": "哈尔滨市", + "value": "2301" + }, + { + "label": "齐齐哈尔市", + "value": "2302" + }, + { + "label": "鸡西市", + "value": "2303" + }, + { + "label": "鹤岗市", + "value": "2304" + }, + { + "label": "双鸭山市", + "value": "2305" + }, + { + "label": "大庆市", + "value": "2306" + }, + { + "label": "伊春市", + "value": "2307" + }, + { + "label": "佳木斯市", + "value": "2308" + }, + { + "label": "七台河市", + "value": "2309" + }, + { + "label": "牡丹江市", + "value": "2310" + }, + { + "label": "黑河市", + "value": "2311" + }, + { + "label": "绥化市", + "value": "2312" + }, + { + "label": "大兴安岭地区", + "value": "2327" + } + ], + [{ + "label": "市辖区", + "value": "3101" + }], + [{ + "label": "南京市", + "value": "3201" + }, + { + "label": "无锡市", + "value": "3202" + }, + { + "label": "徐州市", + "value": "3203" + }, + { + "label": "常州市", + "value": "3204" + }, + { + "label": "苏州市", + "value": "3205" + }, + { + "label": "南通市", + "value": "3206" + }, + { + "label": "连云港市", + "value": "3207" + }, + { + "label": "淮安市", + "value": "3208" + }, + { + "label": "盐城市", + "value": "3209" + }, + { + "label": "扬州市", + "value": "3210" + }, + { + "label": "镇江市", + "value": "3211" + }, + { + "label": "泰州市", + "value": "3212" + }, + { + "label": "宿迁市", + "value": "3213" + } + ], + [{ + "label": "杭州市", + "value": "3301" + }, + { + "label": "宁波市", + "value": "3302" + }, + { + "label": "温州市", + "value": "3303" + }, + { + "label": "嘉兴市", + "value": "3304" + }, + { + "label": "湖州市", + "value": "3305" + }, + { + "label": "绍兴市", + "value": "3306" + }, + { + "label": "金华市", + "value": "3307" + }, + { + "label": "衢州市", + "value": "3308" + }, + { + "label": "舟山市", + "value": "3309" + }, + { + "label": "台州市", + "value": "3310" + }, + { + "label": "丽水市", + "value": "3311" + } + ], + [{ + "label": "合肥市", + "value": "3401" + }, + { + "label": "芜湖市", + "value": "3402" + }, + { + "label": "蚌埠市", + "value": "3403" + }, + { + "label": "淮南市", + "value": "3404" + }, + { + "label": "马鞍山市", + "value": "3405" + }, + { + "label": "淮北市", + "value": "3406" + }, + { + "label": "铜陵市", + "value": "3407" + }, + { + "label": "安庆市", + "value": "3408" + }, + { + "label": "黄山市", + "value": "3410" + }, + { + "label": "滁州市", + "value": "3411" + }, + { + "label": "阜阳市", + "value": "3412" + }, + { + "label": "宿州市", + "value": "3413" + }, + { + "label": "六安市", + "value": "3415" + }, + { + "label": "亳州市", + "value": "3416" + }, + { + "label": "池州市", + "value": "3417" + }, + { + "label": "宣城市", + "value": "3418" + } + ], + [{ + "label": "福州市", + "value": "3501" + }, + { + "label": "厦门市", + "value": "3502" + }, + { + "label": "莆田市", + "value": "3503" + }, + { + "label": "三明市", + "value": "3504" + }, + { + "label": "泉州市", + "value": "3505" + }, + { + "label": "漳州市", + "value": "3506" + }, + { + "label": "南平市", + "value": "3507" + }, + { + "label": "龙岩市", + "value": "3508" + }, + { + "label": "宁德市", + "value": "3509" + } + ], + [{ + "label": "南昌市", + "value": "3601" + }, + { + "label": "景德镇市", + "value": "3602" + }, + { + "label": "萍乡市", + "value": "3603" + }, + { + "label": "九江市", + "value": "3604" + }, + { + "label": "新余市", + "value": "3605" + }, + { + "label": "鹰潭市", + "value": "3606" + }, + { + "label": "赣州市", + "value": "3607" + }, + { + "label": "吉安市", + "value": "3608" + }, + { + "label": "宜春市", + "value": "3609" + }, + { + "label": "抚州市", + "value": "3610" + }, + { + "label": "上饶市", + "value": "3611" + } + ], + [{ + "label": "济南市", + "value": "3701" + }, + { + "label": "青岛市", + "value": "3702" + }, + { + "label": "淄博市", + "value": "3703" + }, + { + "label": "枣庄市", + "value": "3704" + }, + { + "label": "东营市", + "value": "3705" + }, + { + "label": "烟台市", + "value": "3706" + }, + { + "label": "潍坊市", + "value": "3707" + }, + { + "label": "济宁市", + "value": "3708" + }, + { + "label": "泰安市", + "value": "3709" + }, + { + "label": "威海市", + "value": "3710" + }, + { + "label": "日照市", + "value": "3711" + }, + { + "label": "莱芜市", + "value": "3712" + }, + { + "label": "临沂市", + "value": "3713" + }, + { + "label": "德州市", + "value": "3714" + }, + { + "label": "聊城市", + "value": "3715" + }, + { + "label": "滨州市", + "value": "3716" + }, + { + "label": "菏泽市", + "value": "3717" + } + ], + [{ + "label": "郑州市", + "value": "4101" + }, + { + "label": "开封市", + "value": "4102" + }, + { + "label": "洛阳市", + "value": "4103" + }, + { + "label": "平顶山市", + "value": "4104" + }, + { + "label": "安阳市", + "value": "4105" + }, + { + "label": "鹤壁市", + "value": "4106" + }, + { + "label": "新乡市", + "value": "4107" + }, + { + "label": "焦作市", + "value": "4108" + }, + { + "label": "濮阳市", + "value": "4109" + }, + { + "label": "许昌市", + "value": "4110" + }, + { + "label": "漯河市", + "value": "4111" + }, + { + "label": "三门峡市", + "value": "4112" + }, + { + "label": "南阳市", + "value": "4113" + }, + { + "label": "商丘市", + "value": "4114" + }, + { + "label": "信阳市", + "value": "4115" + }, + { + "label": "周口市", + "value": "4116" + }, + { + "label": "驻马店市", + "value": "4117" + }, + { + "label": "省直辖县级行政区划", + "value": "4190" + } + ], + [{ + "label": "武汉市", + "value": "4201" + }, + { + "label": "黄石市", + "value": "4202" + }, + { + "label": "十堰市", + "value": "4203" + }, + { + "label": "宜昌市", + "value": "4205" + }, + { + "label": "襄阳市", + "value": "4206" + }, + { + "label": "鄂州市", + "value": "4207" + }, + { + "label": "荆门市", + "value": "4208" + }, + { + "label": "孝感市", + "value": "4209" + }, + { + "label": "荆州市", + "value": "4210" + }, + { + "label": "黄冈市", + "value": "4211" + }, + { + "label": "咸宁市", + "value": "4212" + }, + { + "label": "随州市", + "value": "4213" + }, + { + "label": "恩施土家族苗族自治州", + "value": "4228" + }, + { + "label": "省直辖县级行政区划", + "value": "4290" + } + ], + [{ + "label": "长沙市", + "value": "4301" + }, + { + "label": "株洲市", + "value": "4302" + }, + { + "label": "湘潭市", + "value": "4303" + }, + { + "label": "衡阳市", + "value": "4304" + }, + { + "label": "邵阳市", + "value": "4305" + }, + { + "label": "岳阳市", + "value": "4306" + }, + { + "label": "常德市", + "value": "4307" + }, + { + "label": "张家界市", + "value": "4308" + }, + { + "label": "益阳市", + "value": "4309" + }, + { + "label": "郴州市", + "value": "4310" + }, + { + "label": "永州市", + "value": "4311" + }, + { + "label": "怀化市", + "value": "4312" + }, + { + "label": "娄底市", + "value": "4313" + }, + { + "label": "湘西土家族苗族自治州", + "value": "4331" + } + ], + [{ + "label": "广州市", + "value": "4401" + }, + { + "label": "韶关市", + "value": "4402" + }, + { + "label": "深圳市", + "value": "4403" + }, + { + "label": "珠海市", + "value": "4404" + }, + { + "label": "汕头市", + "value": "4405" + }, + { + "label": "佛山市", + "value": "4406" + }, + { + "label": "江门市", + "value": "4407" + }, + { + "label": "湛江市", + "value": "4408" + }, + { + "label": "茂名市", + "value": "4409" + }, + { + "label": "肇庆市", + "value": "4412" + }, + { + "label": "惠州市", + "value": "4413" + }, + { + "label": "梅州市", + "value": "4414" + }, + { + "label": "汕尾市", + "value": "4415" + }, + { + "label": "河源市", + "value": "4416" + }, + { + "label": "阳江市", + "value": "4417" + }, + { + "label": "清远市", + "value": "4418" + }, + { + "label": "东莞市", + "value": "4419" + }, + { + "label": "中山市", + "value": "4420" + }, + { + "label": "潮州市", + "value": "4451" + }, + { + "label": "揭阳市", + "value": "4452" + }, + { + "label": "云浮市", + "value": "4453" + } + ], + [{ + "label": "南宁市", + "value": "4501" + }, + { + "label": "柳州市", + "value": "4502" + }, + { + "label": "桂林市", + "value": "4503" + }, + { + "label": "梧州市", + "value": "4504" + }, + { + "label": "北海市", + "value": "4505" + }, + { + "label": "防城港市", + "value": "4506" + }, + { + "label": "钦州市", + "value": "4507" + }, + { + "label": "贵港市", + "value": "4508" + }, + { + "label": "玉林市", + "value": "4509" + }, + { + "label": "百色市", + "value": "4510" + }, + { + "label": "贺州市", + "value": "4511" + }, + { + "label": "河池市", + "value": "4512" + }, + { + "label": "来宾市", + "value": "4513" + }, + { + "label": "崇左市", + "value": "4514" + } + ], + [{ + "label": "海口市", + "value": "4601" + }, + { + "label": "三亚市", + "value": "4602" + }, + { + "label": "三沙市", + "value": "4603" + }, + { + "label": "儋州市", + "value": "4604" + }, + { + "label": "省直辖县级行政区划", + "value": "4690" + } + ], + [{ + "label": "市辖区", + "value": "5001" + }, + { + "label": "县", + "value": "5002" + } + ], + [{ + "label": "成都市", + "value": "5101" + }, + { + "label": "自贡市", + "value": "5103" + }, + { + "label": "攀枝花市", + "value": "5104" + }, + { + "label": "泸州市", + "value": "5105" + }, + { + "label": "德阳市", + "value": "5106" + }, + { + "label": "绵阳市", + "value": "5107" + }, + { + "label": "广元市", + "value": "5108" + }, + { + "label": "遂宁市", + "value": "5109" + }, + { + "label": "内江市", + "value": "5110" + }, + { + "label": "乐山市", + "value": "5111" + }, + { + "label": "南充市", + "value": "5113" + }, + { + "label": "眉山市", + "value": "5114" + }, + { + "label": "宜宾市", + "value": "5115" + }, + { + "label": "广安市", + "value": "5116" + }, + { + "label": "达州市", + "value": "5117" + }, + { + "label": "雅安市", + "value": "5118" + }, + { + "label": "巴中市", + "value": "5119" + }, + { + "label": "资阳市", + "value": "5120" + }, + { + "label": "阿坝藏族羌族自治州", + "value": "5132" + }, + { + "label": "甘孜藏族自治州", + "value": "5133" + }, + { + "label": "凉山彝族自治州", + "value": "5134" + } + ], + [{ + "label": "贵阳市", + "value": "5201" + }, + { + "label": "六盘水市", + "value": "5202" + }, + { + "label": "遵义市", + "value": "5203" + }, + { + "label": "安顺市", + "value": "5204" + }, + { + "label": "毕节市", + "value": "5205" + }, + { + "label": "铜仁市", + "value": "5206" + }, + { + "label": "黔西南布依族苗族自治州", + "value": "5223" + }, + { + "label": "黔东南苗族侗族自治州", + "value": "5226" + }, + { + "label": "黔南布依族苗族自治州", + "value": "5227" + } + ], + [{ + "label": "昆明市", + "value": "5301" + }, + { + "label": "曲靖市", + "value": "5303" + }, + { + "label": "玉溪市", + "value": "5304" + }, + { + "label": "保山市", + "value": "5305" + }, + { + "label": "昭通市", + "value": "5306" + }, + { + "label": "丽江市", + "value": "5307" + }, + { + "label": "普洱市", + "value": "5308" + }, + { + "label": "临沧市", + "value": "5309" + }, + { + "label": "楚雄彝族自治州", + "value": "5323" + }, + { + "label": "红河哈尼族彝族自治州", + "value": "5325" + }, + { + "label": "文山壮族苗族自治州", + "value": "5326" + }, + { + "label": "西双版纳傣族自治州", + "value": "5328" + }, + { + "label": "大理白族自治州", + "value": "5329" + }, + { + "label": "德宏傣族景颇族自治州", + "value": "5331" + }, + { + "label": "怒江傈僳族自治州", + "value": "5333" + }, + { + "label": "迪庆藏族自治州", + "value": "5334" + } + ], + [{ + "label": "拉萨市", + "value": "5401" + }, + { + "label": "日喀则市", + "value": "5402" + }, + { + "label": "昌都市", + "value": "5403" + }, + { + "label": "林芝市", + "value": "5404" + }, + { + "label": "山南市", + "value": "5405" + }, + { + "label": "那曲地区", + "value": "5424" + }, + { + "label": "阿里地区", + "value": "5425" + } + ], + [{ + "label": "西安市", + "value": "6101" + }, + { + "label": "铜川市", + "value": "6102" + }, + { + "label": "宝鸡市", + "value": "6103" + }, + { + "label": "咸阳市", + "value": "6104" + }, + { + "label": "渭南市", + "value": "6105" + }, + { + "label": "延安市", + "value": "6106" + }, + { + "label": "汉中市", + "value": "6107" + }, + { + "label": "榆林市", + "value": "6108" + }, + { + "label": "安康市", + "value": "6109" + }, + { + "label": "商洛市", + "value": "6110" + } + ], + [{ + "label": "兰州市", + "value": "6201" + }, + { + "label": "嘉峪关市", + "value": "6202" + }, + { + "label": "金昌市", + "value": "6203" + }, + { + "label": "白银市", + "value": "6204" + }, + { + "label": "天水市", + "value": "6205" + }, + { + "label": "武威市", + "value": "6206" + }, + { + "label": "张掖市", + "value": "6207" + }, + { + "label": "平凉市", + "value": "6208" + }, + { + "label": "酒泉市", + "value": "6209" + }, + { + "label": "庆阳市", + "value": "6210" + }, + { + "label": "定西市", + "value": "6211" + }, + { + "label": "陇南市", + "value": "6212" + }, + { + "label": "临夏回族自治州", + "value": "6229" + }, + { + "label": "甘南藏族自治州", + "value": "6230" + } + ], + [{ + "label": "西宁市", + "value": "6301" + }, + { + "label": "海东市", + "value": "6302" + }, + { + "label": "海北藏族自治州", + "value": "6322" + }, + { + "label": "黄南藏族自治州", + "value": "6323" + }, + { + "label": "海南藏族自治州", + "value": "6325" + }, + { + "label": "果洛藏族自治州", + "value": "6326" + }, + { + "label": "玉树藏族自治州", + "value": "6327" + }, + { + "label": "海西蒙古族藏族自治州", + "value": "6328" + } + ], + [{ + "label": "银川市", + "value": "6401" + }, + { + "label": "石嘴山市", + "value": "6402" + }, + { + "label": "吴忠市", + "value": "6403" + }, + { + "label": "固原市", + "value": "6404" + }, + { + "label": "中卫市", + "value": "6405" + } + ], + [{ + "label": "乌鲁木齐市", + "value": "6501" + }, + { + "label": "克拉玛依市", + "value": "6502" + }, + { + "label": "吐鲁番市", + "value": "6504" + }, + { + "label": "哈密市", + "value": "6505" + }, + { + "label": "昌吉回族自治州", + "value": "6523" + }, + { + "label": "博尔塔拉蒙古自治州", + "value": "6527" + }, + { + "label": "巴音郭楞蒙古自治州", + "value": "6528" + }, + { + "label": "阿克苏地区", + "value": "6529" + }, + { + "label": "克孜勒苏柯尔克孜自治州", + "value": "6530" + }, + { + "label": "喀什地区", + "value": "6531" + }, + { + "label": "和田地区", + "value": "6532" + }, + { + "label": "伊犁哈萨克自治州", + "value": "6540" + }, + { + "label": "塔城地区", + "value": "6542" + }, + { + "label": "阿勒泰地区", + "value": "6543" + }, + { + "label": "自治区直辖县级行政区划", + "value": "6590" + } + ], + [{ + "label": "台北", + "value": "6601" + }, + { + "label": "高雄", + "value": "6602" + }, + { + "label": "基隆", + "value": "6603" + }, + { + "label": "台中", + "value": "6604" + }, + { + "label": "台南", + "value": "6605" + }, + { + "label": "新竹", + "value": "6606" + }, + { + "label": "嘉义", + "value": "6607" + }, + { + "label": "宜兰", + "value": "6608" + }, + { + "label": "桃园", + "value": "6609" + }, + { + "label": "苗栗", + "value": "6610" + }, + { + "label": "彰化", + "value": "6611" + }, + { + "label": "南投", + "value": "6612" + }, + { + "label": "云林", + "value": "6613" + }, + { + "label": "屏东", + "value": "6614" + }, + { + "label": "台东", + "value": "6615" + }, + { + "label": "花莲", + "value": "6616" + }, + { + "label": "澎湖", + "value": "6617" + } + ], + [{ + "label": "香港岛", + "value": "6701" + }, + { + "label": "九龙", + "value": "6702" + }, + { + "label": "新界", + "value": "6703" + } + ], + [{ + "label": "澳门半岛", + "value": "6801" + }, + { + "label": "氹仔岛", + "value": "6802" + }, + { + "label": "路环岛", + "value": "6803" + }, + { + "label": "路氹城", + "value": "6804" + } + ] +] +export default cityData; diff --git a/fe/PDA/components/mpvue-citypicker/city-data/province.js b/fe/PDA/components/mpvue-citypicker/city-data/province.js new file mode 100644 index 000000000..1bd680e84 --- /dev/null +++ b/fe/PDA/components/mpvue-citypicker/city-data/province.js @@ -0,0 +1,139 @@ +/* eslint-disable */ +var provinceData = [{ + "label": "北京市", + "value": "11" + }, + { + "label": "天津市", + "value": "12" + }, + { + "label": "河北省", + "value": "13" + }, + { + "label": "山西省", + "value": "14" + }, + { + "label": "内蒙古自治区", + "value": "15" + }, + { + "label": "辽宁省", + "value": "21" + }, + { + "label": "吉林省", + "value": "22" + }, + { + "label": "黑龙江省", + "value": "23" + }, + { + "label": "上海市", + "value": "31" + }, + { + "label": "江苏省", + "value": "32" + }, + { + "label": "浙江省", + "value": "33" + }, + { + "label": "安徽省", + "value": "34" + }, + { + "label": "福建省", + "value": "35" + }, + { + "label": "江西省", + "value": "36" + }, + { + "label": "山东省", + "value": "37" + }, + { + "label": "河南省", + "value": "41" + }, + { + "label": "湖北省", + "value": "42" + }, + { + "label": "湖南省", + "value": "43" + }, + { + "label": "广东省", + "value": "44" + }, + { + "label": "广西壮族自治区", + "value": "45" + }, + { + "label": "海南省", + "value": "46" + }, + { + "label": "重庆市", + "value": "50" + }, + { + "label": "四川省", + "value": "51" + }, + { + "label": "贵州省", + "value": "52" + }, + { + "label": "云南省", + "value": "53" + }, + { + "label": "西藏自治区", + "value": "54" + }, + { + "label": "陕西省", + "value": "61" + }, + { + "label": "甘肃省", + "value": "62" + }, + { + "label": "青海省", + "value": "63" + }, + { + "label": "宁夏回族自治区", + "value": "64" + }, + { + "label": "新疆维吾尔自治区", + "value": "65" + }, + { + "label": "台湾", + "value": "66" + }, + { + "label": "香港", + "value": "67" + }, + { + "label": "澳门", + "value": "68" + } +] +export default provinceData; diff --git a/fe/PDA/components/mpvue-citypicker/mpvueCityPicker.vue b/fe/PDA/components/mpvue-citypicker/mpvueCityPicker.vue new file mode 100644 index 000000000..ec02c8bc8 --- /dev/null +++ b/fe/PDA/components/mpvue-citypicker/mpvueCityPicker.vue @@ -0,0 +1,230 @@ + + + + + diff --git a/fe/PDA/components/mpvue-echarts/src/echarts.vue b/fe/PDA/components/mpvue-echarts/src/echarts.vue new file mode 100644 index 000000000..e1cbb6619 --- /dev/null +++ b/fe/PDA/components/mpvue-echarts/src/echarts.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/fe/PDA/components/mpvue-echarts/src/wx-canvas.js b/fe/PDA/components/mpvue-echarts/src/wx-canvas.js new file mode 100644 index 000000000..ef5889312 --- /dev/null +++ b/fe/PDA/components/mpvue-echarts/src/wx-canvas.js @@ -0,0 +1,73 @@ +export default class WxCanvas { + constructor(ctx, canvasId) { + this.ctx = ctx; + this.canvasId = canvasId; + this.chart = null; + + WxCanvas.initStyle(ctx); + this.initEvent(); + } + + getContext(contextType) { + return contextType === '2d' ? this.ctx : null; + } + + setChart(chart) { + this.chart = chart; + } + + attachEvent() { + // noop + } + + detachEvent() { + // noop + } + + static initStyle(ctx) { + const styles = ['fillStyle', 'strokeStyle', 'globalAlpha', + 'textAlign', 'textBaseAlign', 'shadow', 'lineWidth', + 'lineCap', 'lineJoin', 'lineDash', 'miterLimit', 'fontSize']; + + styles.forEach((style) => { + Object.defineProperty(ctx, style, { + set: (value) => { + if ((style !== 'fillStyle' && style !== 'strokeStyle') + || (value !== 'none' && value !== null) + ) { + ctx[`set${style.charAt(0).toUpperCase()}${style.slice(1)}`](value); + } + }, + }); + }); + + ctx.createRadialGradient = () => ctx.createCircularGradient(arguments); + } + + initEvent() { + this.event = {}; + const eventNames = [{ + wxName: 'touchStart', + ecName: 'mousedown', + }, { + wxName: 'touchMove', + ecName: 'mousemove', + }, { + wxName: 'touchEnd', + ecName: 'mouseup', + }, { + wxName: 'touchEnd', + ecName: 'click', + }]; + + eventNames.forEach((name) => { + this.event[name.wxName] = (e) => { + const touch = e.mp.touches[0]; + this.chart._zr.handler.dispatch(name.ecName, { + zrX: name.wxName === 'tap' ? touch.clientX : touch.x, + zrY: name.wxName === 'tap' ? touch.clientY : touch.y, + }); + }; + }); + } +} diff --git a/fe/PDA/components/mpvue-picker/mpvuePicker.vue b/fe/PDA/components/mpvue-picker/mpvuePicker.vue new file mode 100644 index 000000000..93397ee84 --- /dev/null +++ b/fe/PDA/components/mpvue-picker/mpvuePicker.vue @@ -0,0 +1,484 @@ + + + + + diff --git a/fe/PDA/components/mpvueGestureLock/gestureLock.js b/fe/PDA/components/mpvueGestureLock/gestureLock.js new file mode 100644 index 000000000..21cf45949 --- /dev/null +++ b/fe/PDA/components/mpvueGestureLock/gestureLock.js @@ -0,0 +1,175 @@ +class GestureLock { + + constructor(containerWidth, cycleRadius) { + this.containerWidth = containerWidth; // 容器宽度 + this.cycleRadius = cycleRadius; // 圆的半径 + + this.circleArray = []; // 全部圆的对象数组 + this.checkPoints = []; // 选中的圆的对象数组 + this.lineArray = []; // 已激活锁之间的线段数组 + this.lastCheckPoint = 0; // 最后一个激活的锁 + this.offsetX = 0; // 容器的 X 偏移 + this.offsetY = 0; // 容器的 Y 偏移 + this.activeLine = {}; // 最后一个激活的锁与当前位置之间的线段 + + this.windowWidth = wx.getSystemInfoSync().windowWidth; // 窗口大小(用于rpx 和 px 转换) + + this.initCircleArray(); + } + + // 初始化 画布上的 9个圆 + initCircleArray() { + const cycleMargin = (this.containerWidth - 6 * this.cycleRadius) / 6; + let count = 0; + for (let i = 0; i < 3; i++) { + for (let j = 0; j < 3; j++) { + count++; + this.circleArray.push({ + count: count, + x: this.rpxTopx((cycleMargin + this.cycleRadius) * (j * 2 + 1)), + y: this.rpxTopx((cycleMargin + this.cycleRadius) * (i * 2 + 1)), + radius: this.rpxTopx(this.cycleRadius), + check: false, + style: { + left: (cycleMargin + this.cycleRadius) * (j * 2 + 1) - this.cycleRadius + 'rpx', + top: (cycleMargin + this.cycleRadius) * (i * 2 + 1) - this.cycleRadius + 'rpx', + width: this.cycleRadius * 2 + 'rpx', + } + }); + } + } + } + + onTouchStart(e) { + this.setOffset(e); + this.checkTouch({ + x: e.touches[0].pageX - this.offsetX, + y: e.touches[0].pageY - this.offsetY + }); + } + + onTouchMove(e) { + this.moveDraw(e) + } + + onTouchEnd(e) { + const checkPoints = this.checkPoints; + this.reset(); + return checkPoints; + } + + // 初始化 偏移量 + setOffset(e) { + this.offsetX = e.currentTarget.offsetLeft; + this.offsetY = e.currentTarget.offsetTop; + } + + // 检测当时 触摸位置是否位于 锁上 + checkTouch({ + x, + y + }) { + for (let i = 0; i < this.circleArray.length; i++) { + let point = this.circleArray[i]; + if (this.isPointInCycle(x, y, point.x, point.y, point.radius)) { + if (!point.check) { + this.checkPoints.push(point.count); + if (this.lastCheckPoint != 0) { + // 已激活锁之间的线段 + const line = this.drawLine(this.lastCheckPoint, point); + this.lineArray.push(line); + } + this.lastCheckPoint = point; + } + point.check = true; + return; + } + } + } + + // 画线 - 返回 样式 对象 + drawLine(start, end) { + const width = this.getPointDis(start.x, start.y, end.x, end.y); + const rotate = this.getAngle(start, end); + + return { + activeLeft: start.x + 'px', + activeTop: start.y + 'px', + activeWidth: width + 'px', + activeRotate: rotate + 'deg' + } + + } + + // 获取 画线的 角度 + getAngle(start, end) { + var diff_x = end.x - start.x, + diff_y = end.y - start.y; + if (diff_x >= 0) { + return 360 * Math.atan(diff_y / diff_x) / (2 * Math.PI); + } else { + return 180 + 360 * Math.atan(diff_y / diff_x) / (2 * Math.PI); + } + } + + // 判断 当前点是否位于 锁内 + isPointInCycle(x, y, circleX, circleY, radius) { + return (this.getPointDis(x, y, circleX, circleY) < radius) ? true : false; + } + + // 获取两点之间距离 + getPointDis(ax, ay, bx, by) { + return Math.sqrt(Math.pow(ax - bx, 2) + Math.pow(ay - by, 2)); + } + + // 移动 绘制 + moveDraw(e) { + // 画经过的圆 + const x = e.touches[0].pageX - this.offsetX; + const y = e.touches[0].pageY - this.offsetY; + this.checkTouch({ + x, + y + }); + + // 画 最后一个激活的锁与当前位置之间的线段 + this.activeLine = this.drawLine(this.lastCheckPoint, { + x, + y + }); + } + + // 使 画布 恢复初始状态 + reset() { + this.circleArray.forEach((item) => { + item.check = false; + }); + this.checkPoints = []; + this.lineArray = []; + this.activeLine = {}; + this.lastCheckPoint = 0; + } + + + // 获取 最后一个激活的锁与当前位置之间的线段 + getActiveLine() { + return this.activeLine; + } + + // 获取 圆对象数组 + getCycleArray() { + return this.circleArray; + } + + // 获取 已激活锁之间的线段 + getLineArray() { + return this.lineArray; + } + + // 将 RPX 转换成 PX + rpxTopx(rpx) { + return rpx / 750 * this.windowWidth; + } +} + +export default GestureLock; diff --git a/fe/PDA/components/mpvueGestureLock/index.vue b/fe/PDA/components/mpvueGestureLock/index.vue new file mode 100644 index 000000000..a2cefdd38 --- /dev/null +++ b/fe/PDA/components/mpvueGestureLock/index.vue @@ -0,0 +1,138 @@ + + + + diff --git a/fe/PDA/components/page-foot/page-foot.vue b/fe/PDA/components/page-foot/page-foot.vue new file mode 100644 index 000000000..1154dbe79 --- /dev/null +++ b/fe/PDA/components/page-foot/page-foot.vue @@ -0,0 +1,38 @@ + + + + diff --git a/fe/PDA/components/page-head/page-head.vue b/fe/PDA/components/page-head/page-head.vue new file mode 100644 index 000000000..07ed46dd6 --- /dev/null +++ b/fe/PDA/components/page-head/page-head.vue @@ -0,0 +1,16 @@ + + diff --git a/fe/PDA/components/product.vue b/fe/PDA/components/product.vue new file mode 100644 index 000000000..bfa97265a --- /dev/null +++ b/fe/PDA/components/product.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/fe/PDA/components/tab-nvue/mediaList.vue b/fe/PDA/components/tab-nvue/mediaList.vue new file mode 100644 index 000000000..ea3d22476 --- /dev/null +++ b/fe/PDA/components/tab-nvue/mediaList.vue @@ -0,0 +1,175 @@ + + + + + diff --git a/fe/PDA/components/u-charts/u-charts.js b/fe/PDA/components/u-charts/u-charts.js new file mode 100644 index 000000000..3b1b7989d --- /dev/null +++ b/fe/PDA/components/u-charts/u-charts.js @@ -0,0 +1,5046 @@ +/* + * uCharts v1.8.5.20190815 + * uni-app平台高性能跨全端图表,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360) + * Copyright (c) 2019 QIUN秋云 https://www.ucharts.cn All rights reserved. + * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) + * + * uCharts官方网站 + * https://www.uCharts.cn + * + * 开源地址: + * https://gitee.com/uCharts/uCharts + * + * uni-app插件市场地址: + * http://ext.dcloud.net.cn/plugin?id=271 + * + */ + +'use strict'; + +var config = { + yAxisWidth: 15, + yAxisSplit: 5, + xAxisHeight: 15, + xAxisLineHeight: 15, + legendHeight: 15, + yAxisTitleWidth: 15, + padding: [10, 10, 10, 10], + pixelRatio: 1, + rotate: false, + columePadding: 3, + fontSize: 13, + //dataPointShape: ['diamond', 'circle', 'triangle', 'rect'], + dataPointShape: ['circle', 'circle', 'circle', 'circle'], + colors: ['#1890ff', '#2fc25b', '#facc14', '#f04864', '#8543e0', '#90ed7d'], + pieChartLinePadding: 15, + pieChartTextPadding: 5, + xAxisTextPadding: 3, + titleColor: '#333333', + titleFontSize: 20, + subtitleColor: '#999999', + subtitleFontSize: 15, + toolTipPadding: 3, + toolTipBackground: '#000000', + toolTipOpacity: 0.7, + toolTipLineHeight: 20, + radarGridCount: 3, + radarLabelTextMargin: 15, + gaugeLabelTextMargin: 15 +}; + +let assign; +if (Object.assign) { + assign = Object.assign; +} else { + // 使用polyfill + assign = function(target, varArgs) { + if (target == null) { + throw new TypeError('Cannot convert undefined or null to object'); + } + var to = Object(target); + for (var index = 1; index < arguments.length; index++) { + var nextSource = arguments[index]; + if (nextSource != null) { + for (var nextKey in nextSource) { + if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { + to[nextKey] = nextSource[nextKey]; + } + } + } + } + return to; + } +} + +var util = { + toFixed: function toFixed(num, limit) { + limit = limit || 2; + if (this.isFloat(num)) { + num = num.toFixed(limit); + } + return num; + }, + isFloat: function isFloat(num) { + return num % 1 !== 0; + }, + approximatelyEqual: function approximatelyEqual(num1, num2) { + return Math.abs(num1 - num2) < 1e-10; + }, + isSameSign: function isSameSign(num1, num2) { + return Math.abs(num1) === num1 && Math.abs(num2) === num2 || Math.abs(num1) !== num1 && Math.abs(num2) !== num2; + }, + isSameXCoordinateArea: function isSameXCoordinateArea(p1, p2) { + return this.isSameSign(p1.x, p2.x); + }, + isCollision: function isCollision(obj1, obj2) { + obj1.end = {}; + obj1.end.x = obj1.start.x + obj1.width; + obj1.end.y = obj1.start.y - obj1.height; + obj2.end = {}; + obj2.end.x = obj2.start.x + obj2.width; + obj2.end.y = obj2.start.y - obj2.height; + var flag = obj2.start.x > obj1.end.x || obj2.end.x < obj1.start.x || obj2.end.y > obj1.start.y || obj2.start.y < obj1.end.y; + return !flag; + } +}; + +//兼容H5点击事件 +function getH5Offset(e) { + e.mp = { + changedTouches: [] + }; + e.mp.changedTouches.push({ + x: e.offsetX, + y: e.offsetY + }); + return e; +} + +// hex 转 rgba +function hexToRgb(hexValue, opc) { + var rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; + var hex = hexValue.replace(rgx, function(m, r, g, b) { + return r + r + g + g + b + b; + }); + var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); + var r = parseInt(rgb[1], 16); + var g = parseInt(rgb[2], 16); + var b = parseInt(rgb[3], 16); + return 'rgba(' + r + ',' + g + ',' + b + ',' + opc + ')'; +} + +function findRange(num, type, limit) { + if (isNaN(num)) { + throw new Error('[uCharts] unvalid series data!'); + } + limit = limit || 10; + type = type ? type : 'upper'; + var multiple = 1; + while (limit < 1) { + limit *= 10; + multiple *= 10; + } + if (type === 'upper') { + num = Math.ceil(num * multiple); + } else { + num = Math.floor(num * multiple); + } + while (num % limit !== 0) { + if (type === 'upper') { + num++; + } else { + num--; + } + } + return num / multiple; +} + +function calCandleMA(dayArr, nameArr, colorArr, kdata) { + let seriesTemp = []; + for (let k = 0; k < dayArr.length; k++) { + let seriesItem = { + data: [], + name: nameArr[k], + color: colorArr[k] + }; + for (let i = 0, len = kdata.length; i < len; i++) { + if (i < dayArr[k]) { + seriesItem.data.push(null); + continue; + } + let sum = 0; + for (let j = 0; j < dayArr[k]; j++) { + sum += kdata[i - j][1]; + } + seriesItem.data.push(+(sum / dayArr[k]).toFixed(3)); + } + seriesTemp.push(seriesItem); + } + return seriesTemp; +} + +function calValidDistance(distance, chartData, config, opts) { + var dataChartAreaWidth = opts.width - opts.area[1] - opts.area[3]; + var dataChartWidth = chartData.eachSpacing * (opts.chartData.xAxisData.xAxisPoints.length-1); + var validDistance = distance; + if (distance >= 0) { + validDistance = 0; + } else if (Math.abs(distance) >= dataChartWidth - dataChartAreaWidth) { + validDistance = dataChartAreaWidth - dataChartWidth; + } + return validDistance; +} + +function isInAngleRange(angle, startAngle, endAngle) { + function adjust(angle) { + while (angle < 0) { + angle += 2 * Math.PI; + } + while (angle > 2 * Math.PI) { + angle -= 2 * Math.PI; + } + return angle; + } + angle = adjust(angle); + startAngle = adjust(startAngle); + endAngle = adjust(endAngle); + if (startAngle > endAngle) { + endAngle += 2 * Math.PI; + if (angle < startAngle) { + angle += 2 * Math.PI; + } + } + return angle >= startAngle && angle <= endAngle; +} + +function calRotateTranslate(x, y, h) { + var xv = x; + var yv = h - y; + var transX = xv + (h - yv - xv) / Math.sqrt(2); + transX *= -1; + var transY = (h - yv) * (Math.sqrt(2) - 1) - (h - yv - xv) / Math.sqrt(2); + return { + transX: transX, + transY: transY + }; +} + +function createCurveControlPoints(points, i) { + + function isNotMiddlePoint(points, i) { + if (points[i - 1] && points[i + 1]) { + return points[i].y >= Math.max(points[i - 1].y, points[i + 1].y) || points[i].y <= Math.min(points[i - 1].y, + points[ + i + 1].y); + } else { + return false; + } + } + var a = 0.2; + var b = 0.2; + var pAx = null; + var pAy = null; + var pBx = null; + var pBy = null; + if (i < 1) { + pAx = points[0].x + (points[1].x - points[0].x) * a; + pAy = points[0].y + (points[1].y - points[0].y) * a; + } else { + pAx = points[i].x + (points[i + 1].x - points[i - 1].x) * a; + pAy = points[i].y + (points[i + 1].y - points[i - 1].y) * a; + } + + if (i > points.length - 3) { + var last = points.length - 1; + pBx = points[last].x - (points[last].x - points[last - 1].x) * b; + pBy = points[last].y - (points[last].y - points[last - 1].y) * b; + } else { + pBx = points[i + 1].x - (points[i + 2].x - points[i].x) * b; + pBy = points[i + 1].y - (points[i + 2].y - points[i].y) * b; + } + if (isNotMiddlePoint(points, i + 1)) { + pBy = points[i + 1].y; + } + if (isNotMiddlePoint(points, i)) { + pAy = points[i].y; + } + return { + ctrA: { + x: pAx, + y: pAy + }, + ctrB: { + x: pBx, + y: pBy + } + }; +} + +function convertCoordinateOrigin(x, y, center) { + return { + x: center.x + x, + y: center.y - y + }; +} + +function avoidCollision(obj, target) { + if (target) { + // is collision test + while (util.isCollision(obj, target)) { + if (obj.start.x > 0) { + obj.start.y--; + } else if (obj.start.x < 0) { + obj.start.y++; + } else { + if (obj.start.y > 0) { + obj.start.y++; + } else { + obj.start.y--; + } + } + } + } + return obj; +} + +function fillSeries(series, opts, config) { + var index = 0; + return series.map(function(item) { + if (!item.color) { + item.color = config.colors[index]; + index = (index + 1) % config.colors.length; + } + if (!item.type) { + item.type = opts.type; + } + if (typeof item.show == "undefined") { + item.show = true; + } + if (!item.type) { + item.type = opts.type; + } + if (!item.pointShape) { + item.pointShape = "circle"; + } + if (!item.legendShape) { + switch (item.type) { + case 'line': + item.legendShape = "line"; + break; + case 'column': + item.legendShape = "rect"; + break; + case 'area': + item.legendShape = "triangle"; + break; + default: + item.legendShape = "circle"; + } + } + return item; + }); +} + +function getDataRange(minData, maxData) { + var limit = 0; + var range = maxData - minData; + if (range >= 10000) { + limit = 1000; + } else if (range >= 1000) { + limit = 100; + } else if (range >= 100) { + limit = 10; + } else if (range >= 10) { + limit = 5; + } else if (range >= 1) { + limit = 1; + } else if (range >= 0.1) { + limit = 0.1; + } else if (range >= 0.01) { + limit = 0.01; + } else if (range >= 0.001) { + limit = 0.001; + } else if (range >= 0.0001) { + limit = 0.0001; + } else if (range >= 0.00001) { + limit = 0.00001; + } else { + limit = 0.000001; + } + return { + minRange: findRange(minData, 'lower', limit), + maxRange: findRange(maxData, 'upper', limit) + }; +} + +function measureText(text) { + var fontSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : config.fontSize; + text = String(text); + var text = text.split(''); + var width = 0; + for (let i = 0; i < text.length; i++) { + let item = text[i]; + if (/[a-zA-Z]/.test(item)) { + width += 7; + } else if (/[0-9]/.test(item)) { + width += 5.5; + } else if (/\./.test(item)) { + width += 2.7; + } else if (/-/.test(item)) { + width += 3.25; + } else if (/[\u4e00-\u9fa5]/.test(item)) { + width += 10; + } else if (/\(|\)/.test(item)) { + width += 3.73; + } else if (/\s/.test(item)) { + width += 2.5; + } else if (/%/.test(item)) { + width += 8; + } else { + width += 10; + } + } + return width * fontSize / 10; +} + +function dataCombine(series) { + return series.reduce(function(a, b) { + return (a.data ? a.data : a).concat(b.data); + }, []); +} + +function dataCombineStack(series, len) { + var sum = new Array(len); + for (var j = 0; j < sum.length; j++) { + sum[j] = 0; + } + for (var i = 0; i < series.length; i++) { + for (var j = 0; j < sum.length; j++) { + sum[j] += series[i].data[j]; + } + } + return series.reduce(function(a, b) { + return (a.data ? a.data : a).concat(b.data).concat(sum); + }, []); +} + +function getTouches(touches, opts, e) { + let x, y; + if (touches.clientX) { + if (opts.rotate) { + y = opts.height - touches.clientX * opts.pixelRatio; + x = (touches.pageY - e.currentTarget.offsetTop - (opts.height / opts.pixelRatio / 2) * (opts.pixelRatio - 1)) * + opts.pixelRatio; + } else { + x = touches.clientX * opts.pixelRatio; + y = (touches.pageY - e.currentTarget.offsetTop - (opts.height / opts.pixelRatio / 2) * (opts.pixelRatio - 1)) * + opts.pixelRatio; + } + } else { + if (opts.rotate) { + y = opts.height - touches.x * opts.pixelRatio; + x = touches.y * opts.pixelRatio; + } else { + x = touches.x * opts.pixelRatio; + y = touches.y * opts.pixelRatio; + } + } + return { + x: x, + y: y + } +} + +function getSeriesDataItem(series, index) { + var data = []; + for (let i = 0; i < series.length; i++) { + let item = series[i]; + if (item.data[index] !== null && typeof item.data[index] !== 'undefined' && item.show) { + let seriesItem = {}; + seriesItem.color = item.color; + seriesItem.type = item.type; + seriesItem.style = item.style; + seriesItem.pointShape = item.pointShape; + seriesItem.disableLegend = item.disableLegend; + seriesItem.name = item.name; + seriesItem.show = item.show; + seriesItem.data = item.format ? item.format(item.data[index]) : item.data[index]; + data.push(seriesItem); + } + } + return data; +} + +function getMaxTextListLength(list) { + var lengthList = list.map(function(item) { + return measureText(item); + }); + return Math.max.apply(null, lengthList); +} + +function getRadarCoordinateSeries(length) { + var eachAngle = 2 * Math.PI / length; + var CoordinateSeries = []; + for (var i = 0; i < length; i++) { + CoordinateSeries.push(eachAngle * i); + } + + return CoordinateSeries.map(function(item) { + return -1 * item + Math.PI / 2; + }); +} + +function getToolTipData(seriesData, calPoints, index, categories) { + var option = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; + + var textList = seriesData.map(function(item) { + return { + text: option.format ? option.format(item, categories[index]) : item.name + ': ' + item.data, + color: item.color + }; + }); + var validCalPoints = []; + var offset = { + x: 0, + y: 0 + }; + for (let i = 0; i < calPoints.length; i++) { + let points = calPoints[i]; + if (typeof points[index] !== 'undefined' && points[index] !== null) { + validCalPoints.push(points[index]); + } + } + for (let i = 0; i < validCalPoints.length; i++) { + let item = validCalPoints[i]; + offset.x = Math.round(item.x); + offset.y += item.y; + } + offset.y /= validCalPoints.length; + return { + textList: textList, + offset: offset + }; +} + +function getMixToolTipData(seriesData, calPoints, index, categories) { + var option = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; + var textList = seriesData.map(function(item) { + return { + text: option.format ? option.format(item, categories[index]) : item.name + ': ' + item.data, + color: item.color, + disableLegend: item.disableLegend ? true : false + }; + }); + textList = textList.filter(function(item) { + if (item.disableLegend !== true) { + return item; + } + }); + var validCalPoints = []; + var offset = { + x: 0, + y: 0 + }; + for (let i = 0; i < calPoints.length; i++) { + let points = calPoints[i]; + if (typeof points[index] !== 'undefined' && points[index] !== null) { + validCalPoints.push(points[index]); + } + } + for (let i = 0; i < validCalPoints.length; i++) { + let item = validCalPoints[i]; + offset.x = Math.round(item.x); + offset.y += item.y; + } + offset.y /= validCalPoints.length; + return { + textList: textList, + offset: offset + }; +} + +function getCandleToolTipData(series, seriesData, calPoints, index, categories, extra) { + var option = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {}; + let upColor = extra.color.upFill; + let downColor = extra.color.downFill; + //颜色顺序为开盘,收盘,最低,最高 + let color = [upColor, upColor, downColor, upColor]; + var textList = []; + let text0 = { + text: categories[index], + color: null + }; + textList.push(text0); + seriesData.map(function(item) { + if (index == 0 && item.data[1] - item.data[0] < 0) { + color[1] = downColor; + } else { + if (item.data[0] < series[index - 1][1]) { + color[0] = downColor; + } + if (item.data[1] < item.data[0]) { + color[1] = downColor; + } + if (item.data[2] > series[index - 1][1]) { + color[2] = upColor; + } + if (item.data[3] < series[index - 1][1]) { + color[3] = downColor; + } + } + let text1 = { + text: '开盘:' + item.data[0], + color: color[0] + }; + let text2 = { + text: '收盘:' + item.data[1], + color: color[1] + }; + let text3 = { + text: '最低:' + item.data[2], + color: color[2] + }; + let text4 = { + text: '最高:' + item.data[3], + color: color[3] + }; + textList.push(text1, text2, text3, text4); + }); + var validCalPoints = []; + var offset = { + x: 0, + y: 0 + }; + for (let i = 0; i < calPoints.length; i++) { + let points = calPoints[i]; + if (typeof points[index] !== 'undefined' && points[index] !== null) { + validCalPoints.push(points[index]); + } + } + offset.x = Math.round(validCalPoints[0][0].x); + return { + textList: textList, + offset: offset + }; +} + +function filterSeries(series) { + let tempSeries = []; + for (let i = 0; i < series.length; i++) { + if (series[i].show == true) { + tempSeries.push(series[i]) + } + } + return tempSeries; +} + +function findCurrentIndex(currentPoints, xAxisPoints, opts, config) { + var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0; + var currentIndex = -1; + var spacing = 0; + if((opts.type=='line' || opts.type=='area') && opts.xAxis.boundaryGap=='justify'){ + spacing = opts.chartData.eachSpacing/2; + } + if (isInExactChartArea(currentPoints, opts, config)) { + xAxisPoints.forEach(function(item, index) { + if (currentPoints.x + offset + spacing > item) { + currentIndex = index; + } + }); + } + return currentIndex; +} + +function findLegendIndex(currentPoints, legendData, opts) { + let currentIndex = -1; + if (isInExactLegendArea(currentPoints, legendData.area)) { + let points = legendData.points; + let index = -1; + for (let i = 0, len = points.length; i < len; i++) { + let item = points[i]; + for (let j = 0; j < item.length; j++) { + index += 1; + let area = item[j]['area']; + if (currentPoints.x > area[0] && currentPoints.x < area[2] && currentPoints.y > area[1] && currentPoints.y < area[3]) { + currentIndex = index; + break; + } + } + } + return currentIndex; + } + return currentIndex; +} + +function isInExactLegendArea(currentPoints, area) { + return currentPoints.x > area.start.x && currentPoints.x < area.end.x && currentPoints.y > area.start.y && + currentPoints.y < area.end.y; +} + +function isInExactChartArea(currentPoints, opts, config) { + return currentPoints.x < opts.width - opts.area[1] + 10 && currentPoints.x > opts.area[3] -10 && currentPoints.y > opts.area[0] && currentPoints.y < opts.height - opts.area[2]; +} + +function findRadarChartCurrentIndex(currentPoints, radarData, count) { + var eachAngleArea = 2 * Math.PI / count; + var currentIndex = -1; + if (isInExactPieChartArea(currentPoints, radarData.center, radarData.radius)) { + var fixAngle = function fixAngle(angle) { + if (angle < 0) { + angle += 2 * Math.PI; + } + if (angle > 2 * Math.PI) { + angle -= 2 * Math.PI; + } + return angle; + }; + + var angle = Math.atan2(radarData.center.y - currentPoints.y, currentPoints.x - radarData.center.x); + angle = -1 * angle; + if (angle < 0) { + angle += 2 * Math.PI; + } + + var angleList = radarData.angleList.map(function(item) { + item = fixAngle(-1 * item); + + return item; + }); + + angleList.forEach(function(item, index) { + var rangeStart = fixAngle(item - eachAngleArea / 2); + var rangeEnd = fixAngle(item + eachAngleArea / 2); + if (rangeEnd < rangeStart) { + rangeEnd += 2 * Math.PI; + } + if (angle >= rangeStart && angle <= rangeEnd || angle + 2 * Math.PI >= rangeStart && angle + 2 * Math.PI <= + rangeEnd) { + currentIndex = index; + } + }); + } + + return currentIndex; +} + +function findFunnelChartCurrentIndex(currentPoints, funnelData) { + var currentIndex = -1; + for (var i = 0, len = funnelData.series.length; i < len; i++) { + var item = funnelData.series[i]; + if (currentPoints.x > item.funnelArea[0] && currentPoints.x < item.funnelArea[2] && currentPoints.y > item.funnelArea[1] && currentPoints.y < item.funnelArea[3]) { + currentIndex = i; + break; + } + } + return currentIndex; +} + +function findWordChartCurrentIndex(currentPoints, wordData) { + var currentIndex = -1; + for (var i = 0, len = wordData.length; i < len; i++) { + var item = wordData[i]; + if (currentPoints.x > item.area[0] && currentPoints.x < item.area[2] && currentPoints.y > item.area[1] && currentPoints.y < item.area[3]) { + currentIndex = i; + break; + } + } + return currentIndex; +} + +function findMapChartCurrentIndex(currentPoints, opts) { + var currentIndex = -1; + var cData=opts.chartData.mapData; + var data=opts.series; + var tmp=pointToCoordinate(currentPoints.y, currentPoints.x,cData.bounds,cData.scale,cData.xoffset,cData.yoffset); + var poi=[tmp.x, tmp.y]; + for (var i = 0, len = data.length; i < len; i++) { + var item = data[i].geometry.coordinates; + if(isPoiWithinPoly(poi,item)){ + currentIndex = i; + break; + } + } + return currentIndex; +} + +function findPieChartCurrentIndex(currentPoints, pieData) { + var currentIndex = -1; + if (isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) { + var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x); + angle = -angle; + for (var i = 0, len = pieData.series.length; i < len; i++) { + var item = pieData.series[i]; + if (isInAngleRange(angle, item._start_, item._start_ + item._proportion_ * 2 * Math.PI)) { + currentIndex = i; + break; + } + } + } + + return currentIndex; +} + +function isInExactPieChartArea(currentPoints, center, radius) { + return Math.pow(currentPoints.x - center.x, 2) + Math.pow(currentPoints.y - center.y, 2) <= Math.pow(radius, 2); +} + +function splitPoints(points) { + var newPoints = []; + var items = []; + points.forEach(function(item, index) { + if (item !== null) { + items.push(item); + } else { + if (items.length) { + newPoints.push(items); + } + items = []; + } + }); + if (items.length) { + newPoints.push(items); + } + + return newPoints; +} + +function calLegendData(series, opts, config, chartData) { + let legendData = { + area: { + start: { + x: 0, + y: 0 + }, + end: { + x: 0, + y: 0 + }, + width: 0, + height: 0, + wholeWidth: 0, + wholeHeight: 0 + }, + points: [], + widthArr: [], + heightArr: [] + }; + if (opts.legend.show === false) { + chartData.legendData = legendData; + return legendData; + } + + let padding = opts.legend.padding; + let margin = opts.legend.margin; + let fontSize = opts.legend.fontSize; + let shapeWidth = 15 * opts.pixelRatio; + let shapeRight = 5 * opts.pixelRatio; + let lineHeight = Math.max(opts.legend.lineHeight * opts.pixelRatio, fontSize); + if (opts.legend.position == 'top' || opts.legend.position == 'bottom') { + let legendList = []; + let widthCount = 0; + let widthCountArr = []; + let currentRow = []; + for (let i = 0; i < series.length; i++) { + let item = series[i]; + let itemWidth = shapeWidth + shapeRight + measureText(item.name || 'undefined', fontSize) + opts.legend.itemGap; + if (widthCount + itemWidth > opts.width - opts.padding[1] - opts.padding[3]) { + legendList.push(currentRow); + widthCountArr.push(widthCount - opts.legend.itemGap); + widthCount = itemWidth; + currentRow = [item]; + } else { + widthCount += itemWidth; + currentRow.push(item); + } + } + if (currentRow.length) { + legendList.push(currentRow); + widthCountArr.push(widthCount - opts.legend.itemGap); + legendData.widthArr = widthCountArr; + let legendWidth = Math.max.apply(null, widthCountArr); + switch (opts.legend.float) { + case 'left': + legendData.area.start.x = opts.padding[3]; + legendData.area.end.x = opts.padding[3] + 2 * padding; + break; + case 'right': + legendData.area.start.x = opts.width - opts.padding[1] - legendWidth - 2 * padding; + legendData.area.end.x = opts.width - opts.padding[1]; + break; + default: + legendData.area.start.x = (opts.width - legendWidth) / 2 - padding; + legendData.area.end.x = (opts.width + legendWidth) / 2 + padding; + } + legendData.area.width = legendWidth + 2 * padding; + legendData.area.wholeWidth = legendWidth + 2 * padding; + legendData.area.height = legendList.length * lineHeight + 2 * padding; + legendData.area.wholeHeight = legendList.length * lineHeight + 2 * padding + 2 * margin; + legendData.points = legendList; + } + } else { + let len = series.length; + let maxHeight = opts.height - opts.padding[0] - opts.padding[2] - 2 * margin - 2 * padding; + let maxLength = Math.min(Math.floor(maxHeight / lineHeight), len); + legendData.area.height = maxLength * lineHeight + padding * 2; + legendData.area.wholeHeight = maxLength * lineHeight + padding * 2; + switch (opts.legend.float) { + case 'top': + legendData.area.start.y = opts.padding[0] + margin; + legendData.area.end.y = opts.padding[0] + margin + legendData.area.height; + break; + case 'bottom': + legendData.area.start.y = opts.height - opts.padding[2] - margin - legendData.area.height; + legendData.area.end.y = opts.height - opts.padding[2] - margin; + break; + default: + legendData.area.start.y = (opts.height - legendData.area.height) / 2; + legendData.area.end.y = (opts.height + legendData.area.height) / 2; + } + let lineNum = len % maxLength === 0 ? len / maxLength : Math.floor((len / maxLength) + 1); + let currentRow = []; + for (let i = 0; i < lineNum; i++) { + let temp = series.slice(i * maxLength, i * maxLength + maxLength); + currentRow.push(temp); + } + + legendData.points = currentRow; + + if (currentRow.length) { + for (let i = 0; i < currentRow.length; i++) { + let item = currentRow[i]; + let maxWidth = 0; + for (let j = 0; j < item.length; j++) { + let itemWidth = shapeWidth + shapeRight + measureText(item[j].name || 'undefined', fontSize) + opts.legend.itemGap; + if (itemWidth > maxWidth) { + maxWidth = itemWidth; + } + } + legendData.widthArr.push(maxWidth); + legendData.heightArr.push(item.length * lineHeight + padding * 2); + } + let legendWidth = 0 + for (let i = 0; i < legendData.widthArr.length; i++) { + legendWidth += legendData.widthArr[i]; + } + legendData.area.width = legendWidth - opts.legend.itemGap + 2 * padding; + legendData.area.wholeWidth = legendData.area.width + padding; + } + } + + switch (opts.legend.position) { + case 'top': + legendData.area.start.y = opts.padding[0] + margin; + legendData.area.end.y = opts.padding[0] + margin + legendData.area.height; + break; + case 'bottom': + legendData.area.start.y = opts.height - opts.padding[2] - legendData.area.height - margin; + legendData.area.end.y = opts.height - opts.padding[2] - margin; + break; + case 'left': + legendData.area.start.x = opts.padding[3]; + legendData.area.end.x = opts.padding[3] + legendData.area.width; + break; + case 'right': + legendData.area.start.x = opts.width - opts.padding[1] - legendData.area.width; + legendData.area.end.x = opts.width - opts.padding[1]; + break; + } + chartData.legendData = legendData; + return legendData; +} + +function calCategoriesData(categories, opts, config, eachSpacing) { + var result = { + angle: 0, + xAxisHeight: config.xAxisHeight + }; + var categoriesTextLenth = categories.map(function(item) { + return measureText(item); + }); + var maxTextLength = Math.max.apply(this, categoriesTextLenth); + + if (opts.xAxis.rotateLabel == true && maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) { + result.angle = 45 * Math.PI / 180; + result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle); + } + return result; +} + +function getRadarDataPoints(angleList, center, radius, series, opts) { + var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1; + + var radarOption = opts.extra.radar || {}; + radarOption.max = radarOption.max || 0; + var maxData = Math.max(radarOption.max, Math.max.apply(null, dataCombine(series))); + + var data = []; + for (let i = 0; i < series.length; i++) { + let each = series[i]; + let listItem = {}; + listItem.color = each.color; + listItem.data = []; + each.data.forEach(function(item, index) { + let tmp = {}; + tmp.angle = angleList[index]; + + tmp.proportion = item / maxData; + tmp.position = convertCoordinateOrigin(radius * tmp.proportion * process * Math.cos(tmp.angle), radius * tmp.proportion * + process * Math.sin(tmp.angle), center); + listItem.data.push(tmp); + }); + + data.push(listItem); + } + + return data; +} + +function getPieDataPoints(series, radius) { + var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; + + var count = 0; + var _start_ = 0; + for (let i = 0; i < series.length; i++) { + let item = series[i]; + item.data = item.data === null ? 0 : item.data; + count += item.data; + } + for (let i = 0; i < series.length; i++) { + let item = series[i]; + item.data = item.data === null ? 0 : item.data; + if (count === 0) { + item._proportion_ = 1 / series.length * process; + } else { + item._proportion_ = item.data / count * process; + } + item._radius_ = radius; + } + for (let i = 0; i < series.length; i++) { + let item = series[i]; + item._start_ = _start_; + _start_ += 2 * item._proportion_ * Math.PI; + } + + return series; +} + +function getFunnelDataPoints(series, radius) { + var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; + series = series.sort(function(a,b){return parseInt(b.data)-parseInt(a.data);}); + for (let i = 0; i < series.length; i++) { + series[i].radius = series[i].data/series[0].data*radius*process; + series[i]._proportion_ = series[i].data/series[0].data; + } + return series.reverse(); +} + +function getRoseDataPoints(series, type, minRadius, radius) { + var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; + var count = 0; + var _start_ = 0; + + var dataArr = []; + for (let i = 0; i < series.length; i++) { + let item = series[i]; + item.data = item.data === null ? 0 : item.data; + count += item.data; + dataArr.push(item.data); + } + + var minData = Math.min.apply(null, dataArr); + var maxData = Math.max.apply(null, dataArr); + var radiusLength = radius - minRadius; + + for (let i = 0; i < series.length; i++) { + let item = series[i]; + item.data = item.data === null ? 0 : item.data; + if (count === 0 || type == 'area') { + item._proportion_ = item.data / count * process; + item._rose_proportion_ = 1 / series.length * process; + } else { + item._proportion_ = item.data / count * process; + item._rose_proportion_ = item.data / count * process; + } + item._radius_ = minRadius + radiusLength * ((item.data - minData) / (maxData - minData)); + } + for (let i = 0; i < series.length; i++) { + let item = series[i]; + item._start_ = _start_; + _start_ += 2 * item._rose_proportion_ * Math.PI; + } + + return series; +} + +function getArcbarDataPoints(series, arcbarOption) { + var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; + if (process == 1) { + process = 0.999999; + } + for (let i = 0; i < series.length; i++) { + let item = series[i]; + item.data = item.data === null ? 0 : item.data; + let totalAngle; + if (arcbarOption.type == 'default') { + if (arcbarOption.endAngle < arcbarOption.startAngle) { + totalAngle = 2 + arcbarOption.endAngle - arcbarOption.startAngle; + } else{ + totalAngle = arcbarOption.startAngle - arcbarOption.endAngle; + } + } else { + totalAngle = 2; + } + item._proportion_ = totalAngle * item.data * process + arcbarOption.startAngle; + if (item._proportion_ >= 2) { + item._proportion_ = item._proportion_ % 2; + } + } + return series; +} + +function getGaugeAxisPoints(categories, startAngle, endAngle) { + let totalAngle = startAngle - endAngle + 1; + let tempStartAngle = startAngle; + for (let i = 0; i < categories.length; i++) { + categories[i].value = categories[i].value === null ? 0 : categories[i].value; + categories[i]._startAngle_ = tempStartAngle; + categories[i]._endAngle_ = totalAngle * categories[i].value + startAngle; + if (categories[i]._endAngle_ >= 2) { + categories[i]._endAngle_ = categories[i]._endAngle_ % 2; + } + tempStartAngle = categories[i]._endAngle_; + } + return categories; +} + +function getGaugeDataPoints(series, categories, gaugeOption) { + let process = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1; + for (let i = 0; i < series.length; i++) { + let item = series[i]; + item.data = item.data === null ? 0 : item.data; + if (gaugeOption.pointer.color == 'auto') { + for (let i = 0; i < categories.length; i++) { + if (item.data <= categories[i].value) { + item.color = categories[i].color; + break; + } + } + } else { + item.color = gaugeOption.pointer.color; + } + let totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1; + item._endAngle_ = totalAngle * item.data + gaugeOption.startAngle; + item._oldAngle_ = gaugeOption.oldAngle; + if (gaugeOption.oldAngle < gaugeOption.endAngle) { + item._oldAngle_ += 2; + } + if (item.data >= gaugeOption.oldData) { + item._proportion_ = (item._endAngle_ - item._oldAngle_) * process + gaugeOption.oldAngle; + } else { + item._proportion_ = item._oldAngle_ - (item._oldAngle_ - item._endAngle_) * process; + } + if (item._proportion_ >= 2) { + item._proportion_ = item._proportion_ % 2; + } + } + return series; +} + +function getPieTextMaxLength(series) { + series = getPieDataPoints(series); + let maxLength = 0; + for (let i = 0; i < series.length; i++) { + let item = series[i]; + let text = item.format ? item.format(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_ * 100) + '%'; + maxLength = Math.max(maxLength, measureText(text)); + } + + return maxLength; +} + +function fixColumeData(points, eachSpacing, columnLen, index, config, opts) { + return points.map(function(item) { + if (item === null) { + return null; + } + item.width = Math.ceil((eachSpacing - 2 * config.columePadding) / columnLen); + + if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) { + item.width = Math.min(item.width, +opts.extra.column.width); + } + if (item.width <= 0) { + item.width = 1; + } + item.x += (index + 0.5 - columnLen / 2) * item.width; + return item; + }); +} + +function fixColumeMeterData(points, eachSpacing, columnLen, index, config, opts, border) { + return points.map(function(item) { + if (item === null) { + return null; + } + item.width = Math.ceil((eachSpacing - 2 * config.columePadding) / 2); + + if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) { + item.width = Math.min(item.width, +opts.extra.column.width); + } + + if (index > 0) { + item.width -= 2 * border; + } + return item; + }); +} + +function fixColumeStackData(points, eachSpacing, columnLen, index, config, opts, series) { + + return points.map(function(item, indexn) { + + if (item === null) { + return null; + } + item.width = Math.ceil((eachSpacing - 2 * config.columePadding) / 2); + + if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) { + item.width = Math.min(item.width, +opts.extra.column.width); + } + return item; + }); +} + +function getXAxisPoints(categories, opts, config) { + var yAxisTotalWidth = config.yAxisWidth + config.yAxisTitleWidth; + var spacingValid = opts.width - opts.area[1] - opts.area[3]; + var dataCount = opts.enableScroll ? Math.min(opts.xAxis.itemCount, categories.length) : categories.length; + if((opts.type=='line' || opts.type=='area') && dataCount>1 && opts.xAxis.boundaryGap=='justify'){ + dataCount -=1; + } + var eachSpacing = spacingValid / dataCount; + + var xAxisPoints = []; + var startX = opts.area[3]; + var endX = opts.width - opts.area[1]; + categories.forEach(function(item, index) { + xAxisPoints.push(startX + index * eachSpacing); + }); + if(opts.xAxis.boundaryGap !=='justify'){ + if (opts.enableScroll === true) { + xAxisPoints.push(startX + categories.length * eachSpacing); + } else { + xAxisPoints.push(endX); + } + } + return { + xAxisPoints: xAxisPoints, + startX: startX, + endX: endX, + eachSpacing: eachSpacing + }; +} + +function getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) { + var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1; + var points = []; + var validHeight = opts.height - opts.area[0] - opts.area[2]; + data.forEach(function(item, index) { + if (item === null) { + points.push(null); + } else { + var cPoints = []; + item.forEach(function(items, indexs) { + var point = {}; + point.x = xAxisPoints[index] + Math.round(eachSpacing / 2); + var value = items.value || items; + var height = validHeight * (value - minRange) / (maxRange - minRange); + height *= process; + point.y = opts.height - Math.round(height) - opts.area[2]; + cPoints.push(point); + }); + points.push(cPoints); + } + }); + + return points; +} + +function getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) { + var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1; + var boundaryGap='center'; + if (opts.type == 'line'||opts.type == 'area'){ + boundaryGap=opts.xAxis.boundaryGap; + } + var points = []; + var validHeight = opts.height - opts.area[0] - opts.area[2]; + data.forEach(function(item, index) { + if (item === null) { + points.push(null); + } else { + var point = {}; + point.color = item.color; + point.x = xAxisPoints[index]; + if(boundaryGap=='center'){ + point.x += Math.round(eachSpacing / 2); + } + var value = item; + if (typeof item === 'object' && item !== null) { + value = item.value + } + var height = validHeight * (value - minRange) / (maxRange - minRange); + height *= process; + point.y = opts.height - Math.round(height) - opts.area[2]; + points.push(point); + } + }); + + return points; +} + +function getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) { + var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1; + var points = []; + var validHeight = opts.height - opts.area[0] - opts.area[2]; + + data.forEach(function(item, index) { + if (item === null) { + points.push(null); + } else { + var point = {}; + point.color = item.color; + point.x = xAxisPoints[index] + Math.round(eachSpacing / 2); + + if (seriesIndex > 0) { + var value = 0; + for (let i = 0; i <= seriesIndex; i++) { + value += stackSeries[i].data[index]; + } + var value0 = value - item; + var height = validHeight * (value - minRange) / (maxRange - minRange); + var height0 = validHeight * (value0 - minRange) / (maxRange - minRange); + } else { + var value = item; + var height = validHeight * (value - minRange) / (maxRange - minRange); + var height0 = 0; + } + var heightc = height0; + height *= process; + heightc *= process; + point.y = opts.height - Math.round(height) - opts.area[2]; + point.y0 = opts.height - Math.round(heightc) - opts.area[2]; + points.push(point); + } + }); + + return points; +} + +function getYAxisTextList(series, opts, config, stack) { + var data; + if (stack == 'stack') { + data = dataCombineStack(series, opts.categories.length); + } else { + data = dataCombine(series); + } + var sorted = []; + // remove null from data + data = data.filter(function(item) { + //return item !== null; + if (typeof item === 'object' && item !== null) { + if (Array.isArray(item)) { + return item !== null; + } else { + return item.value !== null; + } + } else { + return item !== null; + } + }); + data.map(function(item) { + if (typeof item === 'object') { + if (Array.isArray(item)) { + item.map(function(subitem) { + sorted.push(subitem); + }) + } else { + sorted.push(item.value); + } + } else { + sorted.push(item); + } + }) + var minData = 0; + var maxData = 0; + if (sorted.length > 0) { + minData = Math.min.apply(this, sorted); + maxData = Math.max.apply(this, sorted); + } + if (typeof opts.yAxis.min === 'number') { + minData = Math.min(opts.yAxis.min, minData); + } + if (typeof opts.yAxis.max === 'number') { + maxData = Math.max(opts.yAxis.max, maxData); + } + + if (minData === maxData) { + var rangeSpan = maxData || 10; + maxData += rangeSpan; + } + + var dataRange = getDataRange(minData, maxData); + var minRange = dataRange.minRange; + var maxRange = dataRange.maxRange; + + var range = []; + var eachRange = (maxRange - minRange) / config.yAxisSplit; + + for (var i = 0; i <= config.yAxisSplit; i++) { + range.push(minRange + eachRange * i); + } + return range.reverse(); +} + +function calYAxisData(series, opts, config) { + //堆叠图重算Y轴 + var columnstyle = assign({}, { + type: "" + }, opts.extra.column); + var ranges = getYAxisTextList(series, opts, config, columnstyle.type); + var yAxisWidth = config.yAxisWidth; + var yAxisFontSize = opts.yAxis.fontSize || config.fontSize; + var rangesFormat = ranges.map(function(item) { + item = util.toFixed(item, 6); + item = opts.yAxis.format ? opts.yAxis.format(Number(item)) : item; + yAxisWidth = Math.max(yAxisWidth, measureText(item, yAxisFontSize) + 5); + return item; + }); + if (opts.yAxis.disabled === true) { + yAxisWidth = 0; + } + + return { + rangesFormat: rangesFormat, + ranges: ranges, + yAxisWidth: yAxisWidth + }; +} + +function calTooltipYAxisData(point, series, opts, config, eachSpacing) { + var ranges = getYAxisTextList(series, opts, config); + var spacingValid = opts.height - opts.area[0] - opts.area[2]; + let maxVal = ranges[0]; + let minVal = ranges[ranges.length - 1]; + let minAxis = opts.padding[3]; + let maxAxis = opts.padding[1] + spacingValid; + let item = maxVal - (maxVal - minVal) * (point - minAxis) / (maxAxis - minAxis); + item = opts.yAxis.format ? opts.yAxis.format(Number(item)) : item; + return item; +} + +function calMarkLineData(minRange, maxRange, points, opts) { + let spacingValid = opts.height - opts.area[0] - opts.area[2]; + for (let i = 0; i < points.length; i++) { + let height = spacingValid * (points[i].value - minRange) / (maxRange - minRange); + points[i].y = opts.height - Math.round(height) - opts.area[2]; + } + return points; +} + +function contextRotate(context, opts) { + if (opts.rotateLock !== true) { + context.translate(opts.height, 0); + context.rotate(90 * Math.PI / 180); + } else if (opts._rotate_ !== true) { + context.translate(opts.height, 0); + context.rotate(90 * Math.PI / 180); + opts._rotate_ = true; + } +} + +function drawPointShape(points, color, shape, context, opts) { + context.beginPath(); + context.setStrokeStyle("#ffffff"); + context.setLineWidth(1 * opts.pixelRatio); + context.setFillStyle(color); + if (shape === 'diamond') { + points.forEach(function(item, index) { + if (item !== null) { + context.moveTo(item.x, item.y - 4.5); + context.lineTo(item.x - 4.5, item.y); + context.lineTo(item.x, item.y + 4.5); + context.lineTo(item.x + 4.5, item.y); + context.lineTo(item.x, item.y - 4.5); + } + }); + } else if (shape === 'circle') { + points.forEach(function(item, index) { + if (item !== null) { + context.moveTo(item.x + 3.5 * opts.pixelRatio, item.y); + context.arc(item.x, item.y, 4 * opts.pixelRatio, 0, 2 * Math.PI, false); + } + }); + } else if (shape === 'rect') { + points.forEach(function(item, index) { + if (item !== null) { + context.moveTo(item.x - 3.5, item.y - 3.5); + context.rect(item.x - 3.5, item.y - 3.5, 7, 7); + } + }); + } else if (shape === 'triangle') { + points.forEach(function(item, index) { + if (item !== null) { + context.moveTo(item.x, item.y - 4.5); + context.lineTo(item.x - 4.5, item.y + 4.5); + context.lineTo(item.x + 4.5, item.y + 4.5); + context.lineTo(item.x, item.y - 4.5); + } + }); + } + context.closePath(); + context.fill(); + context.stroke(); +} + +function drawRingTitle(opts, config, context, center) { + var titlefontSize = opts.title.fontSize || config.titleFontSize; + var subtitlefontSize = opts.subtitle.fontSize || config.subtitleFontSize; + var title = opts.title.name || ''; + var subtitle = opts.subtitle.name || ''; + var titleFontColor = opts.title.color || config.titleColor; + var subtitleFontColor = opts.subtitle.color || config.subtitleColor; + var titleHeight = title ? titlefontSize : 0; + var subtitleHeight = subtitle ? subtitlefontSize : 0; + var margin = 5; + + if (subtitle) { + var textWidth = measureText(subtitle, subtitlefontSize); + var startX = center.x - textWidth / 2 + (opts.subtitle.offsetX || 0); + var startY = center.y + subtitlefontSize / 2 + (opts.subtitle.offsetY || 0); + if (title) { + startY += (titleHeight + margin) / 2; + } + context.beginPath(); + context.setFontSize(subtitlefontSize); + context.setFillStyle(subtitleFontColor); + context.fillText(subtitle, startX, startY); + context.closePath(); + context.stroke(); + } + if (title) { + var _textWidth = measureText(title, titlefontSize); + var _startX = center.x - _textWidth / 2 + (opts.title.offsetX || 0); + var _startY = center.y + titlefontSize / 2 + (opts.title.offsetY || 0); + if (subtitle) { + _startY -= (subtitleHeight + margin) / 2; + } + context.beginPath(); + context.setFontSize(titlefontSize); + context.setFillStyle(titleFontColor); + context.fillText(title, _startX, _startY); + context.closePath(); + context.stroke(); + } +} + +function drawPointText(points, series, config, context) { + // 绘制数据文案 + var data = series.data; + points.forEach(function(item, index) { + if (item !== null) { + //var formatVal = series.format ? series.format(data[index]) : data[index]; + context.beginPath(); + context.setFontSize(series.textSize || config.fontSize); + context.setFillStyle(series.textColor || '#666666'); + var value = data[index] + if (typeof data[index] === 'object' && data[index] !== null) { + value = data[index].value + } + var formatVal = series.format ? series.format(value) : value; + context.fillText(String(formatVal), item.x - measureText(formatVal, series.textSize || config.fontSize) / 2, item.y - + 2); + context.closePath(); + context.stroke(); + } + }); + +} + +function drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context) { + radius -= gaugeOption.width / 2 + config.gaugeLabelTextMargin; + + let totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1; + let splitAngle = totalAngle / gaugeOption.splitLine.splitNumber; + let totalNumber = gaugeOption.endNumber - gaugeOption.startNumber; + let splitNumber = totalNumber / gaugeOption.splitLine.splitNumber; + let nowAngle = gaugeOption.startAngle; + let nowNumber = gaugeOption.startNumber; + for (let i = 0; i < gaugeOption.splitLine.splitNumber + 1; i++) { + var pos = { + x: radius * Math.cos(nowAngle * Math.PI), + y: radius * Math.sin(nowAngle * Math.PI) + }; + var labelText = gaugeOption.labelFormat ? gaugeOption.labelFormat(nowNumber) : nowNumber; + pos.x += centerPosition.x - measureText(labelText) / 2; + pos.y += centerPosition.y; + var startX = pos.x; + var startY = pos.y; + context.beginPath(); + context.setFontSize(config.fontSize); + context.setFillStyle(gaugeOption.labelColor || '#666666'); + context.fillText(labelText, startX, startY + config.fontSize / 2); + context.closePath(); + context.stroke(); + + nowAngle += splitAngle; + if (nowAngle >= 2) { + nowAngle = nowAngle % 2; + } + nowNumber += splitNumber; + } + +} + +function drawRadarLabel(angleList, radius, centerPosition, opts, config, context) { + var radarOption = opts.extra.radar || {}; + radius += config.radarLabelTextMargin; + + angleList.forEach(function(angle, index) { + var pos = { + x: radius * Math.cos(angle), + y: radius * Math.sin(angle) + }; + var posRelativeCanvas = convertCoordinateOrigin(pos.x, pos.y, centerPosition); + var startX = posRelativeCanvas.x; + var startY = posRelativeCanvas.y; + if (util.approximatelyEqual(pos.x, 0)) { + startX -= measureText(opts.categories[index] || '') / 2; + } else if (pos.x < 0) { + startX -= measureText(opts.categories[index] || ''); + } + context.beginPath(); + context.setFontSize(config.fontSize); + context.setFillStyle(radarOption.labelColor || '#666666'); + context.fillText(opts.categories[index] || '', startX, startY + config.fontSize / 2); + context.closePath(); + context.stroke(); + }); + +} + +function drawPieText(series, opts, config, context, radius, center) { + var lineRadius = config.pieChartLinePadding; + var textObjectCollection = []; + var lastTextObject = null; + + var seriesConvert = series.map(function(item) { + var text = item.format ? item.format(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_.toFixed(4) * 100) +'%'; + if(item._rose_proportion_) item._proportion_=item._rose_proportion_; + var arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._proportion_ / 2); + var color = item.color; + var radius = item._radius_; + return { + arc: arc, + text: text, + color: color, + radius: radius, + textColor: item.textColor, + textSize: item.textSize, + }; + }); + for (let i = 0; i < seriesConvert.length; i++) { + let item = seriesConvert[i]; + // line end + let orginX1 = Math.cos(item.arc) * (item.radius + lineRadius); + let orginY1 = Math.sin(item.arc) * (item.radius + lineRadius); + + // line start + let orginX2 = Math.cos(item.arc) * item.radius; + let orginY2 = Math.sin(item.arc) * item.radius; + + // text start + let orginX3 = orginX1 >= 0 ? orginX1 + config.pieChartTextPadding : orginX1 - config.pieChartTextPadding; + let orginY3 = orginY1; + let textWidth = measureText(item.text); + let startY = orginY3; + + if (lastTextObject && util.isSameXCoordinateArea(lastTextObject.start, { + x: orginX3 + })) { + if (orginX3 > 0) { + startY = Math.min(orginY3, lastTextObject.start.y); + } else if (orginX1 < 0) { + startY = Math.max(orginY3, lastTextObject.start.y); + } else { + if (orginY3 > 0) { + startY = Math.max(orginY3, lastTextObject.start.y); + } else { + startY = Math.min(orginY3, lastTextObject.start.y); + } + } + } + if (orginX3 < 0) { + orginX3 -= textWidth; + } + + let textObject = { + lineStart: { + x: orginX2, + y: orginY2 + }, + lineEnd: { + x: orginX1, + y: orginY1 + }, + start: { + x: orginX3, + y: startY + }, + width: textWidth, + height: config.fontSize, + text: item.text, + color: item.color, + textColor: item.textColor, + textSize: item.textSize + }; + lastTextObject = avoidCollision(textObject, lastTextObject); + textObjectCollection.push(lastTextObject); + } + + for (let i = 0; i < textObjectCollection.length; i++) { + let item = textObjectCollection[i]; + let lineStartPoistion = convertCoordinateOrigin(item.lineStart.x, item.lineStart.y, center); + let lineEndPoistion = convertCoordinateOrigin(item.lineEnd.x, item.lineEnd.y, center); + let textPosition = convertCoordinateOrigin(item.start.x, item.start.y, center); + context.setLineWidth(1 * opts.pixelRatio); + context.setFontSize(config.fontSize); + context.beginPath(); + context.setStrokeStyle(item.color); + context.setFillStyle(item.color); + context.moveTo(lineStartPoistion.x, lineStartPoistion.y); + let curveStartX = item.start.x < 0 ? textPosition.x + item.width : textPosition.x; + let textStartX = item.start.x < 0 ? textPosition.x - 5 : textPosition.x + 5; + context.quadraticCurveTo(lineEndPoistion.x, lineEndPoistion.y, curveStartX, textPosition.y); + context.moveTo(lineStartPoistion.x, lineStartPoistion.y); + context.stroke(); + context.closePath(); + context.beginPath(); + context.moveTo(textPosition.x + item.width, textPosition.y); + context.arc(curveStartX, textPosition.y, 2, 0, 2 * Math.PI); + context.closePath(); + context.fill(); + context.beginPath(); + context.setFontSize(item.textSize || config.fontSize); + context.setFillStyle(item.textColor || '#666666'); + context.fillText(item.text, textStartX, textPosition.y + 3); + context.closePath(); + context.stroke(); + context.closePath(); + } +} + +function drawToolTipSplitLine(offsetX, opts, config, context) { + var toolTipOption = opts.extra.tooltip || {}; + toolTipOption.gridType = toolTipOption.gridType == undefined ? 'solid' : toolTipOption.gridType; + toolTipOption.dashLength = toolTipOption.dashLength == undefined ? 4 : toolTipOption.dashLength; + var startY = opts.area[0]; + var endY = opts.height - opts.area[2]; + + if (toolTipOption.gridType == 'dash') { + context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]); + } + context.setStrokeStyle(toolTipOption.gridColor || '#cccccc'); + context.setLineWidth(1 * opts.pixelRatio); + context.beginPath(); + context.moveTo(offsetX, startY); + context.lineTo(offsetX, endY); + context.stroke(); + context.setLineDash([]); + + if (toolTipOption.xAxisLabel) { + let labelText = opts.categories[opts.tooltip.index]; + context.setFontSize(config.fontSize); + let textWidth = measureText(labelText, config.fontSize); + + let textX = offsetX - 0.5 * textWidth; + let textY = endY; + context.beginPath(); + context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity)); + context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground); + context.setLineWidth(1 * opts.pixelRatio); + context.rect(textX - config.toolTipPadding, textY, textWidth + 2 * config.toolTipPadding, config.fontSize + 2 * config.toolTipPadding); + context.closePath(); + context.stroke(); + context.fill(); + + context.beginPath(); + context.setFontSize(config.fontSize); + context.setFillStyle(toolTipOption.labelFontColor || config.fontColor); + context.fillText(String(labelText), textX, textY + config.toolTipPadding + config.fontSize); + context.closePath(); + context.stroke(); + } +} + +function drawMarkLine(minRange, maxRange, opts, config, context) { + let markLineOption = assign({}, { + type: 'solid', + dashLength: 4, + data: [] + }, opts.extra.markLine); + let startX = opts.area[3]; + let endX = opts.width - opts.padding[1]; + let points = calMarkLineData(minRange, maxRange, markLineOption.data, opts); + + for (let i = 0; i < points.length; i++) { + let item = assign({}, { + lineColor: '#DE4A42', + showLabel: false, + labelFontColor: '#666666', + labelBgColor: '#DFE8FF', + labelBgOpacity: 0.8, + yAxisIndex: 0 + }, points[i]); + + if (markLineOption.type == 'dash') { + context.setLineDash([markLineOption.dashLength, markLineOption.dashLength]); + } + context.setStrokeStyle(item.lineColor); + context.setLineWidth(1 * opts.pixelRatio); + context.beginPath(); + context.moveTo(startX, item.y); + context.lineTo(endX, item.y); + context.stroke(); + context.setLineDash([]); + if (item.showLabel) { + let labelText = opts.yAxis.format ? opts.yAxis.format(Number(item.value)) : item.value; + context.setFontSize(config.fontSize); + let textWidth = measureText(labelText, config.fontSize); + let bgStartX = opts.padding[3] + config.yAxisTitleWidth - config.toolTipPadding; + let bgEndX = Math.max(opts.area[3], textWidth + config.toolTipPadding * 2); + let bgWidth = bgEndX - bgStartX; + + let textX = bgStartX + (bgWidth - textWidth) / 2; + let textY = item.y; + context.setFillStyle(hexToRgb(item.labelBgColor, item.labelBgOpacity)); + context.setStrokeStyle(item.labelBgColor); + context.setLineWidth(1 * opts.pixelRatio); + context.beginPath(); + context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding); + context.closePath(); + context.stroke(); + context.fill(); + + context.beginPath(); + context.setFontSize(config.fontSize); + context.setFillStyle(item.labelFontColor); + context.fillText(String(labelText), textX, textY + 0.5 * config.fontSize); + context.stroke(); + } + } +} + +function drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints) { + var toolTipOption = assign({}, { + gridType: 'solid', + dashLength: 4 + }, opts.extra.tooltip); + + var startX = opts.area[3]; + var endX = opts.width - opts.padding[1]; + + if (toolTipOption.gridType == 'dash') { + context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]); + } + context.setStrokeStyle(toolTipOption.gridColor || '#cccccc'); + context.setLineWidth(1 * opts.pixelRatio); + context.beginPath(); + context.moveTo(startX, opts.tooltip.offset.y); + context.lineTo(endX, opts.tooltip.offset.y); + context.stroke(); + context.setLineDash([]); + + if (toolTipOption.yAxisLabel) { + let labelText = calTooltipYAxisData(opts.tooltip.offset.y, opts.series, opts, config, eachSpacing); + context.setFontSize(config.fontSize); + let textWidth = measureText(labelText, config.fontSize); + let bgStartX = opts.padding[3] + config.yAxisTitleWidth - config.toolTipPadding; + let bgEndX = Math.max(opts.area[3], textWidth + config.toolTipPadding * 2); + let bgWidth = bgEndX - bgStartX; + + let textX = bgStartX + (bgWidth - textWidth) / 2; + let textY = opts.tooltip.offset.y; + context.beginPath(); + context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity)); + context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground); + context.setLineWidth(1 * opts.pixelRatio); + context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding); + context.closePath(); + context.stroke(); + context.fill(); + + context.beginPath(); + context.setFontSize(config.fontSize); + context.setFillStyle(toolTipOption.labelFontColor || config.fontColor); + context.fillText(labelText, textX, textY + 0.5 * config.fontSize); + context.closePath(); + context.stroke(); + } +} + +function drawToolTipSplitArea(offsetX, opts, config, context, eachSpacing) { + var toolTipOption = assign({}, { + activeBgColor: '#000000', + activeBgOpacity: 0.08 + }, opts.extra.tooltip); + var startY = opts.area[0]; + var endY = opts.height - opts.area[2]; + context.beginPath(); + context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity)); + context.rect(offsetX - eachSpacing / 2, startY, eachSpacing, endY - startY); + context.closePath(); + context.fill(); +} + +function drawToolTip(textList, offset, opts, config, context, eachSpacing, xAxisPoints) { + var toolTipOption = assign({}, { + bgColor: '#000000', + bgOpacity: 0.7, + fontColor: '#FFFFFF' + }, opts.extra.tooltip); + var legendWidth = 4 * opts.pixelRatio; + var legendMarginRight = 5 * opts.pixelRatio; + var arrowWidth = 8 * opts.pixelRatio; + var isOverRightBorder = false; + if (opts.type == 'line' || opts.type == 'area' || opts.type == 'candle' || opts.type == 'mix') { + drawToolTipSplitLine(opts.tooltip.offset.x, opts, config, context); + } + + offset = assign({ + x: 0, + y: 0 + }, offset); + offset.y -= 8 * opts.pixelRatio; + var textWidth = textList.map(function(item) { + return measureText(item.text, config.fontSize); + }); + var toolTipWidth = legendWidth + legendMarginRight + 4 * config.toolTipPadding + Math.max.apply(null, textWidth); + var toolTipHeight = 2 * config.toolTipPadding + textList.length * config.toolTipLineHeight; + + // if beyond the right border + if (offset.x - Math.abs(opts._scrollDistance_) + arrowWidth + toolTipWidth > opts.width) { + isOverRightBorder = true; + } + if (toolTipHeight + offset.y > opts.height) { + offset.y = opts.height - toolTipHeight; + } + // draw background rect + context.beginPath(); + context.setFillStyle(hexToRgb(toolTipOption.bgColor || config.toolTipBackground, toolTipOption.bgOpacity || config.toolTipOpacity)); + if (isOverRightBorder) { + context.moveTo(offset.x, offset.y + 10 * opts.pixelRatio); + context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pixelRatio - 5 * opts.pixelRatio); + context.lineTo(offset.x - arrowWidth, offset.y); + context.lineTo(offset.x - arrowWidth - Math.round(toolTipWidth), offset.y); + context.lineTo(offset.x - arrowWidth - Math.round(toolTipWidth), offset.y + toolTipHeight); + context.lineTo(offset.x - arrowWidth, offset.y + toolTipHeight); + context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pixelRatio + 5 * opts.pixelRatio); + context.lineTo(offset.x, offset.y + 10 * opts.pixelRatio); + } else { + context.moveTo(offset.x, offset.y + 10 * opts.pixelRatio); + context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pixelRatio - 5 * opts.pixelRatio); + context.lineTo(offset.x + arrowWidth, offset.y); + context.lineTo(offset.x + arrowWidth + Math.round(toolTipWidth), offset.y); + context.lineTo(offset.x + arrowWidth + Math.round(toolTipWidth), offset.y + toolTipHeight); + context.lineTo(offset.x + arrowWidth, offset.y + toolTipHeight); + context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pixelRatio + 5 * opts.pixelRatio); + context.lineTo(offset.x, offset.y + 10 * opts.pixelRatio); + } + + context.closePath(); + context.fill(); + + // draw legend + textList.forEach(function(item, index) { + if (item.color !== null) { + context.beginPath(); + context.setFillStyle(item.color); + var startX = offset.x + arrowWidth + 2 * config.toolTipPadding; + var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + + config.toolTipPadding + 1; + if (isOverRightBorder) { + startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding; + } + context.fillRect(startX, startY, legendWidth, config.fontSize); + context.closePath(); + } + }); + + // draw text list + + textList.forEach(function(item, index) { + var startX = offset.x + arrowWidth + 2 * config.toolTipPadding + legendWidth + legendMarginRight; + if (isOverRightBorder) { + startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding + +legendWidth + legendMarginRight; + } + var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index + + config.toolTipPadding; + context.beginPath(); + context.setFontSize(config.fontSize); + context.setFillStyle(toolTipOption.fontColor); + context.fillText(item.text, startX, startY + config.fontSize); + context.closePath(); + context.stroke(); + }); +} + +function drawYAxisTitle(title, opts, config, context) { + var startX = config.xAxisHeight + (opts.height - config.xAxisHeight - measureText(title)) / 2; + context.save(); + context.beginPath(); + context.setFontSize(config.fontSize); + context.setFillStyle(opts.yAxis.titleFontColor || '#333333'); + context.translate(0, opts.height); + context.rotate(-90 * Math.PI / 180); + context.fillText(title, startX, opts.padding[3] + 0.5 * config.fontSize); + context.closePath(); + context.stroke(); + context.restore(); +} + +function drawColumnDataPoints(series, opts, config, context) { + let process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; + let ranges = [].concat(opts.chartData.yAxisData.ranges); + let xAxisData = opts.chartData.xAxisData, + xAxisPoints = xAxisData.xAxisPoints, + eachSpacing = xAxisData.eachSpacing; + let columnOption = assign({}, { + type: 'group', + width: eachSpacing / 2, + meter: { + border: 4, + fillColor: '#FFFFFF' + } + }, opts.extra.column); + let minRange = ranges.pop(); + let maxRange = ranges.shift(); + let calPoints = []; + + context.save(); + if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) { + context.translate(opts._scrollDistance_, 0); + } + if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) { + drawToolTipSplitArea(opts.tooltip.offset.x, opts, config, context, eachSpacing); + } + + series.forEach(function(eachSeries, seriesIndex) { + var data = eachSeries.data; + switch (columnOption.type) { + case 'group': + var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); + var tooltipPoints = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process); + calPoints.push(tooltipPoints); + points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts); + points.forEach(function(item, index) { + if (item !== null) { + context.beginPath(); + context.setStrokeStyle(item.color || eachSeries.color); + context.setLineWidth(1) + context.setFillStyle(item.color || eachSeries.color); + var startX = item.x - item.width / 2; + var height = opts.height - item.y - opts.area[2]; + context.moveTo(startX-1, item.y); + context.lineTo(startX+item.width-2,item.y); + context.lineTo(startX+item.width-2,opts.height - opts.area[2]); + context.lineTo(startX,opts.height - opts.area[2]); + context.lineTo(startX,item.y); + //context.rect(startX, item.y, item.width, height); + context.closePath(); + context.stroke(); + context.fill(); + } + }); + break; + case 'stack': + // 绘制堆叠数据图 + var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, + seriesIndex, + series, process); + calPoints.push(points); + points = fixColumeStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series); + + points.forEach(function(item, index) { + if (item !== null) { + context.beginPath(); + context.setFillStyle(item.color || eachSeries.color); + var startX = item.x - item.width / 2 + 1; + var height = opts.height - item.y - opts.area[2]; + var height0 = opts.height - item.y0 - opts.area[2]; + if (seriesIndex > 0) { + height -= height0; + } + context.moveTo(startX, item.y); + context.fillRect(startX, item.y, item.width - 2, height); + context.closePath(); + context.fill(); + } + }); + break; + case 'meter': + // 绘制温度计数据图 + var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); + calPoints.push(points); + points = fixColumeMeterData(points, eachSpacing, series.length, seriesIndex, config, opts, columnOption.meter + .border); + if (seriesIndex == 0) { + points.forEach(function(item, index) { + if (item !== null) { + //画背景颜色 + context.beginPath(); + context.setFillStyle(columnOption.meter.fillColor); + var startX = item.x - item.width / 2; + var height = opts.height - item.y - opts.area[2]; + context.moveTo(startX, item.y); + context.fillRect(startX, item.y, item.width, height); + context.closePath(); + context.fill(); + //画边框线 + if (columnOption.meter.border > 0) { + context.beginPath(); + context.setStrokeStyle(eachSeries.color); + context.setLineWidth(columnOption.meter.border * opts.pixelRatio); + context.moveTo(startX + columnOption.meter.border * 0.5, item.y + height); + context.lineTo(startX + columnOption.meter.border * 0.5, item.y + columnOption.meter.border * 0.5); + context.lineTo(startX + item.width - columnOption.meter.border * 0.5, item.y + columnOption.meter.border * 0.5); + context.lineTo(startX + item.width - columnOption.meter.border * 0.5, item.y + height); + context.stroke(); + } + } + }); + } else { + points.forEach(function(item, index) { + if (item !== null) { + context.beginPath(); + context.setFillStyle(item.color || eachSeries.color); + var startX = item.x - item.width / 2; + var height = opts.height - item.y - opts.area[2]; + context.moveTo(startX, item.y); + context.fillRect(startX, item.y, item.width, height); + context.closePath(); + context.fill(); + } + }); + } + break; + } + }); + + if (opts.dataLabel !== false && process === 1) { + series.forEach(function(eachSeries, seriesIndex) { + var data = eachSeries.data; + switch (columnOption.type) { + case 'group': + var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); + points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts); + + drawPointText(points, eachSeries, config, context); + break; + case 'stack': + var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, + seriesIndex, + series, process); + drawPointText(points, eachSeries, config, context); + break; + case 'meter': + var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); + drawPointText(points, eachSeries, config, context); + break; + } + }); + } + + context.restore(); + + return { + xAxisPoints: xAxisPoints, + calPoints: calPoints, + eachSpacing: eachSpacing, + minRange: minRange, + maxRange: maxRange + }; +} + +function drawCandleDataPoints(series, seriesMA, opts, config, context) { + var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1; + var candleOption = assign({}, { + color: {}, + average: {} + }, opts.extra.candle); + candleOption.color = assign({}, { + upLine: '#f04864', + upFill: '#f04864', + downLine: '#2fc25b', + downFill: '#2fc25b' + }, candleOption.color); + candleOption.average = assign({}, { + show: false, + name: [], + day: [], + color: config.colors + }, candleOption.average); + opts.extra.candle = candleOption; + + let ranges = [].concat(opts.chartData.yAxisData.ranges); + let xAxisData = opts.chartData.xAxisData, + xAxisPoints = xAxisData.xAxisPoints, + eachSpacing = xAxisData.eachSpacing; + + let minRange = ranges.pop(); + let maxRange = ranges.shift(); + let calPoints = []; + + context.save(); + if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) { + context.translate(opts._scrollDistance_, 0); + } + //画均线 + if (candleOption.average.show) { + seriesMA.forEach(function(eachSeries, seriesIndex) { + var data = eachSeries.data; + var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); + //calPoints.push(points); + var splitPointList = splitPoints(points); + + splitPointList.forEach(function(points, index) { + context.beginPath(); + context.setStrokeStyle(eachSeries.color); + context.setLineWidth(1); + if (points.length === 1) { + context.moveTo(points[0].x, points[0].y); + context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI); + } else { + context.moveTo(points[0].x, points[0].y); + points.forEach(function(item, index) { + if (index > 0) { + var ctrlPoint = createCurveControlPoints(points, index - 1); + context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, + item.x, item + .y); + } + }); + context.moveTo(points[0].x, points[0].y); + } + context.closePath(); + context.stroke(); + }); + }); + } + //画K线 + series.forEach(function(eachSeries, seriesIndex) { + var data = eachSeries.data; + var points = getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); + calPoints.push(points); + var splitPointList = splitPoints(points); + splitPointList = splitPointList[0]; + + splitPointList.forEach(function(points, index) { + context.beginPath(); + //如果上涨 + if (data[index][1] - data[index][0] > 0) { + context.setStrokeStyle(candleOption.color.upLine); + context.setFillStyle(candleOption.color.upFill); + context.setLineWidth(1 * opts.pixelRatio); + context.moveTo(points[3].x, points[3].y); //顶点 + context.lineTo(points[1].x, points[1].y); //收盘中间点 + context.lineTo(points[1].x - eachSpacing / 4, points[1].y); //收盘左侧点 + context.lineTo(points[0].x - eachSpacing / 4, points[0].y); //开盘左侧点 + context.lineTo(points[0].x, points[0].y); //开盘中间点 + context.lineTo(points[2].x, points[2].y); //底点 + context.lineTo(points[0].x, points[0].y); //开盘中间点 + context.lineTo(points[0].x + eachSpacing / 4, points[0].y); //开盘右侧点 + context.lineTo(points[1].x + eachSpacing / 4, points[1].y); //收盘右侧点 + context.lineTo(points[1].x, points[1].y); //收盘中间点 + context.moveTo(points[3].x, points[3].y); //顶点 + } else { + context.setStrokeStyle(candleOption.color.downLine); + context.setFillStyle(candleOption.color.downFill); + context.setLineWidth(1 * opts.pixelRatio); + context.moveTo(points[3].x, points[3].y); //顶点 + context.lineTo(points[0].x, points[0].y); //开盘中间点 + context.lineTo(points[0].x - eachSpacing / 4, points[0].y); //开盘左侧点 + context.lineTo(points[1].x - eachSpacing / 4, points[1].y); //收盘左侧点 + context.lineTo(points[1].x, points[1].y); //收盘中间点 + context.lineTo(points[2].x, points[2].y); //底点 + context.lineTo(points[1].x, points[1].y); //收盘中间点 + context.lineTo(points[1].x + eachSpacing / 4, points[1].y); //收盘右侧点 + context.lineTo(points[0].x + eachSpacing / 4, points[0].y); //开盘右侧点 + context.lineTo(points[0].x, points[0].y); //开盘中间点 + context.moveTo(points[3].x, points[3].y); //顶点 + } + context.closePath(); + context.fill(); + context.stroke(); + }); + }); + + context.restore(); + + return { + xAxisPoints: xAxisPoints, + calPoints: calPoints, + eachSpacing: eachSpacing, + minRange: minRange, + maxRange: maxRange + }; +} + +function drawAreaDataPoints(series, opts, config, context) { + var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; + var areaOption = assign({},{ + type: 'straight', + opacity: 0.2, + addLine: false, + width: 2 + },opts.extra.area); + + let ranges = [].concat(opts.chartData.yAxisData.ranges); + let xAxisData = opts.chartData.xAxisData, + xAxisPoints = xAxisData.xAxisPoints, + eachSpacing = xAxisData.eachSpacing; + + let minRange = ranges.pop(); + let maxRange = ranges.shift(); + let endY = opts.height - opts.area[2]; + let calPoints = []; + + context.save(); + if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) { + context.translate(opts._scrollDistance_, 0); + } + + series.forEach(function(eachSeries, seriesIndex) { + let data = eachSeries.data; + let points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); + calPoints.push(points); + + let splitPointList = splitPoints(points); + + for (let i = 0; i < splitPointList.length; i++) { + let points = splitPointList[i]; + // 绘制区域数 + context.beginPath(); + context.setStrokeStyle(hexToRgb(eachSeries.color, areaOption.opacity)); + context.setFillStyle(hexToRgb(eachSeries.color, areaOption.opacity)); + context.setLineWidth(areaOption.width * opts.pixelRatio); + if (points.length > 1) { + let firstPoint = points[0]; + let lastPoint = points[points.length - 1]; + + context.moveTo(firstPoint.x, firstPoint.y); + if (areaOption.type === 'curve') { + points.forEach(function(item, index) { + if (index > 0) { + let ctrlPoint = createCurveControlPoints(points, index - 1); + context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y,item.x, item.y); + } + }); + } else { + points.forEach(function(item, index) { + if (index > 0) { + context.lineTo(item.x, item.y); + } + }); + } + + context.lineTo(lastPoint.x, endY); + context.lineTo(firstPoint.x, endY); + context.lineTo(firstPoint.x, firstPoint.y); + } else { + let item = points[0]; + context.moveTo(item.x - eachSpacing / 2, item.y); + context.lineTo(item.x + eachSpacing / 2, item.y); + context.lineTo(item.x + eachSpacing / 2, endY); + context.lineTo(item.x - eachSpacing / 2, endY); + context.moveTo(item.x - eachSpacing / 2, item.y); + } + context.closePath(); + context.fill(); + + //画连线 + if (areaOption.addLine) { + context.beginPath(); + context.setStrokeStyle(eachSeries.color); + context.setLineWidth(areaOption.width * opts.pixelRatio); + if (points.length === 1) { + context.moveTo(points[0].x, points[0].y); + context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI); + } else { + context.moveTo(points[0].x, points[0].y); + if (areaOption.type === 'curve') { + points.forEach(function(item, index) { + if (index > 0) { + let ctrlPoint = createCurveControlPoints(points, index - 1); + context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y,item.x,item.y); + } + }); + } else { + points.forEach(function(item, index) { + if (index > 0) { + context.lineTo(item.x, item.y); + } + }); + } + context.moveTo(points[0].x, points[0].y); + } + context.closePath(); + context.stroke(); + } + } + + //画点 + if (opts.dataPointShape !== false) { + var shape = config.dataPointShape[seriesIndex % config.dataPointShape.length]; + drawPointShape(points, eachSeries.color, shape, context, opts); + } + + }); + + if (opts.dataLabel !== false && process === 1) { + series.forEach(function(eachSeries, seriesIndex) { + var data = eachSeries.data; + var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); + drawPointText(points, eachSeries, config, context); + }); + } + + context.restore(); + + return { + xAxisPoints: xAxisPoints, + calPoints: calPoints, + eachSpacing: eachSpacing, + minRange: minRange, + maxRange: maxRange + }; +} + +function drawLineDataPoints(series, opts, config, context) { + var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; + var lineOption = opts.extra.line || { + type: 'straight', + width: 2 + }; + lineOption.type = lineOption.type ? lineOption.type : 'straight'; + lineOption.width = lineOption.width ? lineOption.width : 2; + + let ranges = [].concat(opts.chartData.yAxisData.ranges); + let xAxisData = opts.chartData.xAxisData, + xAxisPoints = xAxisData.xAxisPoints, + eachSpacing = xAxisData.eachSpacing; + + var minRange = ranges.pop(); + var maxRange = ranges.shift(); + var calPoints = []; + + context.save(); + if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) { + context.translate(opts._scrollDistance_, 0); + } + + series.forEach(function(eachSeries, seriesIndex) { + var data = eachSeries.data; + var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); + calPoints.push(points); + var splitPointList = splitPoints(points); + + splitPointList.forEach(function(points, index) { + context.beginPath(); + context.setStrokeStyle(eachSeries.color); + context.setLineWidth(lineOption.width * opts.pixelRatio); + if (points.length === 1) { + context.moveTo(points[0].x, points[0].y); + context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI); + } else { + context.moveTo(points[0].x, points[0].y); + if (lineOption.type === 'curve') { + points.forEach(function(item, index) { + if (index > 0) { + var ctrlPoint = createCurveControlPoints(points, index - 1); + context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, + item.x, item + .y); + } + }); + } else { + points.forEach(function(item, index) { + if (index > 0) { + context.lineTo(item.x, item.y); + } + }); + } + context.moveTo(points[0].x, points[0].y); + } + context.closePath(); + context.stroke(); + }); + + if (opts.dataPointShape !== false) { + var shape = config.dataPointShape[seriesIndex % config.dataPointShape.length]; + drawPointShape(points, eachSeries.color, shape, context, opts); + } + }); + + if (opts.dataLabel !== false && process === 1) { + series.forEach(function(eachSeries, seriesIndex) { + var data = eachSeries.data; + var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); + drawPointText(points, eachSeries, config, context); + }); + } + + context.restore(); + + return { + xAxisPoints: xAxisPoints, + calPoints: calPoints, + eachSpacing: eachSpacing, + minRange: minRange, + maxRange: maxRange + }; +} + +function drawMixDataPoints(series, opts, config, context) { + let process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; + let ranges = [].concat(opts.chartData.yAxisData.ranges); + let xAxisData = opts.chartData.xAxisData, + xAxisPoints = xAxisData.xAxisPoints, + eachSpacing = xAxisData.eachSpacing; + + let minRange = ranges.pop(); + let maxRange = ranges.shift(); + let endY = opts.height - opts.area[2]; + let calPoints = []; + + var columnIndex = 0; + var columnLength = 0; + series.forEach(function(eachSeries, seriesIndex) { + if (eachSeries.type == 'column') { + columnLength += 1; + } + }); + context.save(); + if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) { + context.translate(opts._scrollDistance_, 0); + } + + series.forEach(function(eachSeries, seriesIndex) { + var data = eachSeries.data; + var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); + calPoints.push(points); + + // 绘制柱状数据图 + if (eachSeries.type == 'column') { + points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts); + points.forEach(function(item, index) { + if (item !== null) { + context.beginPath(); + context.setStrokeStyle(item.color || eachSeries.color); + context.setLineWidth(1) + context.setFillStyle(item.color || eachSeries.color); + var startX = item.x - item.width / 2; + var height = opts.height - item.y - opts.area[2]; + context.moveTo(startX, item.y); + context.moveTo(startX-1, item.y); + context.lineTo(startX+item.width-2,item.y); + context.lineTo(startX+item.width-2,opts.height - opts.area[2]); + context.lineTo(startX,opts.height - opts.area[2]); + context.lineTo(startX,item.y); + //context.rect(startX, item.y, item.width, height); + context.closePath(); + context.stroke(); + context.fill(); + context.closePath(); + context.fill(); + } + }); + columnIndex += 1; + } + + //绘制区域图数据 + + if (eachSeries.type == 'area') { + let splitPointList = splitPoints(points); + for (let i = 0; i < splitPointList.length; i++) { + let points = splitPointList[i]; + // 绘制区域数据 + context.beginPath(); + context.setStrokeStyle(eachSeries.color); + context.setFillStyle(hexToRgb(eachSeries.color, 0.2)); + context.setLineWidth(2 * opts.pixelRatio); + if (points.length > 1) { + var firstPoint = points[0]; + let lastPoint = points[points.length - 1]; + context.moveTo(firstPoint.x, firstPoint.y); + if (eachSeries.style === 'curve') { + points.forEach(function(item, index) { + if (index > 0) { + var ctrlPoint = createCurveControlPoints(points, index - 1); + context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y); + } + }); + } else { + points.forEach(function(item, index) { + if (index > 0) { + context.lineTo(item.x, item.y); + } + }); + } + context.lineTo(lastPoint.x, endY); + context.lineTo(firstPoint.x, endY); + context.lineTo(firstPoint.x, firstPoint.y); + } else { + let item = points[0]; + context.moveTo(item.x - eachSpacing / 2, item.y); + context.lineTo(item.x + eachSpacing / 2, item.y); + context.lineTo(item.x + eachSpacing / 2, endY); + context.lineTo(item.x - eachSpacing / 2, endY); + context.moveTo(item.x - eachSpacing / 2, item.y); + } + context.closePath(); + context.fill(); + } + } + + // 绘制折线数据图 + if (eachSeries.type == 'line') { + var splitPointList = splitPoints(points); + splitPointList.forEach(function(points, index) { + context.beginPath(); + context.setStrokeStyle(eachSeries.color); + context.setLineWidth(2 * opts.pixelRatio); + if (points.length === 1) { + context.moveTo(points[0].x, points[0].y); + context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI); + } else { + context.moveTo(points[0].x, points[0].y); + if (eachSeries.style == 'curve') { + points.forEach(function(item, index) { + if (index > 0) { + var ctrlPoint = createCurveControlPoints(points, index - 1); + context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, + item.x, + item.y); + } + }); + } else { + points.forEach(function(item, index) { + if (index > 0) { + context.lineTo(item.x, item.y); + } + }); + } + context.moveTo(points[0].x, points[0].y); + } + context.closePath(); + context.stroke(); + }); + } + + // 绘制点数据图 + if (eachSeries.type == 'point') { + points.forEach(function(pointsa, index) { + if (pointsa) { + context.beginPath(); + context.setFillStyle(eachSeries.color); + context.setStrokeStyle('#FFFFFF'); + context.setLineWidth(1 * opts.pixelRatio); + context.moveTo(pointsa.x + 3.5 * opts.pixelRatio, pointsa.y); + context.arc(pointsa.x, pointsa.y, 4 * opts.pixelRatio, 0, 2 * Math.PI); + context.closePath(); + context.fill(); + context.stroke(); + } + }); + } + + if (eachSeries.addPoint == true && eachSeries.type !== 'column') { + var shape = config.dataPointShape[seriesIndex % config.dataPointShape.length]; + drawPointShape(points, eachSeries.color, shape, context, opts); + } + }); + if (opts.dataLabel !== false && process === 1) { + var columnIndex = 0; + series.forEach(function(eachSeries, seriesIndex) { + var data = eachSeries.data; + var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process); + if (eachSeries.type !== 'column') { + drawPointText(points, eachSeries, config, context); + } else { + points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts); + drawPointText(points, eachSeries, config, context); + columnIndex += 1; + } + + }); + } + + context.restore(); + + return { + xAxisPoints: xAxisPoints, + calPoints: calPoints, + eachSpacing: eachSpacing, + minRange: minRange, + maxRange: maxRange + }; +} + +function drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints) { + var toolTipOption = opts.extra.tooltip || {}; + if (toolTipOption.horizentalLine && opts.tooltip && process === 1 && (opts.type == 'line' || opts.type == 'area' || opts.type == 'column' || opts.type == 'candle' || opts.type == 'mix')) { + drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints) + } + context.save(); + if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) { + context.translate(opts._scrollDistance_, 0); + } + if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) { + drawToolTip(opts.tooltip.textList, opts.tooltip.offset, opts, config, context, eachSpacing, xAxisPoints); + } + context.restore(); + +} + +function drawXAxis(categories, opts, config, context) { + + let xAxisData = opts.chartData.xAxisData, + xAxisPoints = xAxisData.xAxisPoints, + startX = xAxisData.startX, + endX = xAxisData.endX, + eachSpacing = xAxisData.eachSpacing; + var boundaryGap='center'; + if (opts.type == 'line'||opts.type == 'area'){ + boundaryGap=opts.xAxis.boundaryGap; + } + var startY = opts.height - opts.area[2]; + var endY = opts.area[0]; + + //绘制滚动条 + if (opts.enableScroll && opts.xAxis.scrollShow) { + var scrollY = opts.height - opts.area[2] + config.xAxisHeight; + var scrollScreenWidth = endX - startX; + var scrollTotalWidth = eachSpacing * (xAxisPoints.length - 1); + var scrollWidth = scrollScreenWidth * scrollScreenWidth / scrollTotalWidth; + var scrollLeft = 0; + if (opts._scrollDistance_) { + scrollLeft = -opts._scrollDistance_ * (scrollScreenWidth) / scrollTotalWidth; + } + context.beginPath(); + context.setLineCap('round'); + context.setLineWidth(6 * opts.pixelRatio); + context.setStrokeStyle(opts.xAxis.scrollBackgroundColor || "#EFEBEF"); + context.moveTo(startX, scrollY); + context.lineTo(endX, scrollY); + context.stroke(); + context.closePath(); + context.beginPath(); + context.setLineCap('round'); + context.setLineWidth(6 * opts.pixelRatio); + context.setStrokeStyle(opts.xAxis.scrollColor || "#A6A6A6"); + context.moveTo(startX + scrollLeft, scrollY); + context.lineTo(startX + scrollLeft + scrollWidth, scrollY); + context.stroke(); + context.closePath(); + context.setLineCap('butt'); + } + + context.save(); + + if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) { + context.translate(opts._scrollDistance_, 0); + } + + + if (opts.xAxis.disableGrid !== true) { + context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc"); + context.setLineCap('butt'); + context.setLineWidth(1 * opts.pixelRatio); + if (opts.xAxis.gridType == 'dash') { + context.setLineDash([opts.xAxis.dashLength, opts.xAxis.dashLength]); + } + if (opts.xAxis.type === 'calibration') { + xAxisPoints.forEach(function(item, index) { + if (index > 0) { + context.beginPath(); + context.moveTo(item - eachSpacing / 2, startY); + context.lineTo(item - eachSpacing / 2, startY + 4 * opts.pixelRatio); + context.closePath(); + context.stroke(); + } + }); + } else { + opts.xAxis.gridEval = opts.xAxis.gridEval || 1; + xAxisPoints.forEach(function(item, index) { + if (index % opts.xAxis.gridEval == 0) { + context.beginPath(); + context.moveTo(item, startY); + context.lineTo(item, endY); + context.stroke(); + } + }); + } + context.setLineDash([]); + } + + + //不绘制X轴 + if (opts.xAxis.disabled !== true) { + // 对X轴列表做抽稀处理 + let validWidth = opts.width - opts.padding[1] - opts.padding[3] - config.yAxisWidth - config.yAxisTitleWidth; + //默认全部显示X轴标签 + let maxXAxisListLength = categories.length; + //如果设置了X轴单屏数量 + if (opts.xAxis.labelCount) { + //如果设置X轴密度 + if (opts.xAxis.itemCount) { + maxXAxisListLength = Math.ceil(categories.length / opts.xAxis.itemCount * opts.xAxis.labelCount); + } else { + maxXAxisListLength = opts.xAxis.labelCount; + } + maxXAxisListLength -= 1; + } + + let ratio = Math.ceil(categories.length / maxXAxisListLength); + + let newCategories = []; + let cgLength = categories.length; + for (let i = 0; i < cgLength; i++) { + if (i % ratio !== 0) { + newCategories.push(""); + } else { + newCategories.push(categories[i]); + } + } + newCategories[cgLength - 1] = categories[cgLength - 1]; + + var xAxisFontSize = opts.xAxis.fontSize || config.fontSize; + if (config._xAxisTextAngle_ === 0) { + newCategories.forEach(function(item, index) { + var offset = - measureText(item, xAxisFontSize) / 2; + if(boundaryGap == 'center'){ + offset+=eachSpacing / 2; + } + context.beginPath(); + context.setFontSize(xAxisFontSize); + context.setFillStyle(opts.xAxis.fontColor || '#666666'); + context.fillText(item, xAxisPoints[index] + offset, startY + xAxisFontSize + (config.xAxisHeight - xAxisFontSize) / 2); + context.closePath(); + context.stroke(); + }); + + } else { + newCategories.forEach(function(item, index) { + context.save(); + context.beginPath(); + context.setFontSize(xAxisFontSize); + context.setFillStyle(opts.xAxis.fontColor || '#666666'); + var textWidth = measureText(item); + var offset = - textWidth; + if(boundaryGap == 'center'){ + offset+=eachSpacing / 2; + } + var _calRotateTranslate = calRotateTranslate(xAxisPoints[index] + eachSpacing / 2, startY + xAxisFontSize / 2 + 5, opts.height), + transX = _calRotateTranslate.transX, + transY = _calRotateTranslate.transY; + + context.rotate(-1 * config._xAxisTextAngle_); + context.translate(transX, transY); + context.fillText(item, xAxisPoints[index] + offset, startY + xAxisFontSize + 5); + context.closePath(); + context.stroke(); + context.restore(); + }); + } + } + context.restore(); + +} + +function drawYAxisGrid(categories, opts, config, context) { + if (opts.yAxis.disableGrid === true) { + return; + } + let spacingValid = opts.height - opts.area[0] - opts.area[2]; + let eachSpacing = spacingValid / config.yAxisSplit; + let startX = opts.area[3]; + let xAxisPoints = opts.chartData.xAxisData.xAxisPoints, + xAxiseachSpacing = opts.chartData.xAxisData.eachSpacing; + let TotalWidth = xAxiseachSpacing * (xAxisPoints.length - 1); + let endX = startX + TotalWidth; + + let points = []; + for (let i = 0; i < config.yAxisSplit + 1; i++) { + points.push(opts.height - opts.area[2] - eachSpacing * i); + } + + context.save(); + if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) { + context.translate(opts._scrollDistance_, 0); + } + + if (opts.yAxis.gridType == 'dash') { + context.setLineDash([opts.yAxis.dashLength, opts.yAxis.dashLength]); + } + context.setStrokeStyle(opts.yAxis.gridColor || "#cccccc"); + context.setLineWidth(1 * opts.pixelRatio); + points.forEach(function(item, index) { + context.beginPath(); + context.moveTo(startX, item); + context.lineTo(endX, item); + context.stroke(); + }); + context.setLineDash([]); + + context.restore(); +} + +function drawYAxis(series, opts, config, context) { + if (opts.yAxis.disabled === true) { + return; + } + let rangesFormat = opts.chartData.yAxisData.rangesFormat; + var spacingValid = opts.height - opts.area[0] - opts.area[2]; + var eachSpacing = Math.floor(spacingValid / config.yAxisSplit); + var startX = opts.area[3]; + var endX = opts.width - opts.area[1]; + var endY = opts.height - opts.area[2]; + var fillEndY = endY + config.xAxisHeight; + if (opts.xAxis.scrollShow) { + fillEndY -= 3 * opts.pixelRatio; + } + // set YAxis background + context.beginPath(); + context.setFillStyle(opts.background || '#ffffff'); + if (opts._scrollDistance_ < 0) { + context.fillRect(0, 0, startX, fillEndY); + } + if(opts.enableScroll == true){ + context.fillRect(endX, 0, opts.width, fillEndY); + } + context.closePath(); + context.stroke(); + + var points = []; + for (var i = 0; i <= config.yAxisSplit; i++) { + points.push(opts.area[0] + eachSpacing * i); + } + + var yAxisFontSize = opts.yAxis.fontSize || config.fontSize; + rangesFormat.forEach(function(item, index) { + var pos = points[index] ? points[index] : endY; + context.beginPath(); + context.setFontSize(yAxisFontSize); + context.setFillStyle(opts.yAxis.fontColor || '#666666'); + context.fillText(String(item), opts.area[3] - config.yAxisWidth, pos + yAxisFontSize / 2); + context.closePath(); + context.stroke(); + }); + + if (opts.yAxis.title) { + drawYAxisTitle(opts.yAxis.title, opts, config, context); + } +} + +function drawLegend(series, opts, config, context, chartData) { + if (opts.legend.show === false) { + return; + } + let legendData = chartData.legendData; + let legendList = legendData.points; + let legendArea = legendData.area; + let padding = opts.legend.padding; + let fontSize = opts.legend.fontSize; + let shapeWidth = 15 * opts.pixelRatio; + let shapeRight = 5 * opts.pixelRatio; + let itemGap = opts.legend.itemGap; + let lineHeight = Math.max(opts.legend.lineHeight * opts.pixelRatio, fontSize); + + //画背景及边框 + context.beginPath(); + context.setLineWidth(opts.legend.borderWidth); + context.setStrokeStyle(opts.legend.borderColor); + context.setFillStyle(opts.legend.backgroundColor); + context.moveTo(legendArea.start.x, legendArea.start.y); + context.rect(legendArea.start.x, legendArea.start.y, legendArea.width, legendArea.height); + context.closePath(); + context.fill(); + context.stroke(); + + legendList.forEach(function(itemList, listIndex) { + let width = 0; + let height = 0; + width = legendData.widthArr[listIndex]; + height = legendData.heightArr[listIndex]; + let startX = 0; + let startY = 0; + if (opts.legend.position == 'top' || opts.legend.position == 'bottom') { + startX = legendArea.start.x + (legendArea.width - width) / 2; + startY = legendArea.start.y + padding + listIndex * lineHeight; + } else { + if (listIndex == 0) { + width = 0; + } else { + width = legendData.widthArr[listIndex - 1]; + } + startX = legendArea.start.x + padding + width; + startY = legendArea.start.y + padding + (legendArea.height - height) / 2; + } + + context.setFontSize(config.fontSize); + for (let i = 0; i < itemList.length; i++) { + let item = itemList[i]; + item.area = [0, 0, 0, 0]; + item.area[0] = startX; + item.area[1] = startY; + item.area[3] = startY + lineHeight; + context.beginPath(); + context.setLineWidth(1 * opts.pixelRatio); + context.setStrokeStyle(item.show ? item.color : opts.legend.hiddenColor); + context.setFillStyle(item.show ? item.color : opts.legend.hiddenColor); + switch (item.legendShape) { + case 'line': + context.moveTo(startX, startY + 0.5 * lineHeight - 2 * opts.pixelRatio); + context.fillRect(startX, startY + 0.5 * lineHeight - 2 * opts.pixelRatio, 15 * opts.pixelRatio, 4 * opts.pixelRatio); + break; + case 'triangle': + context.moveTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight - 5 * opts.pixelRatio); + context.lineTo(startX + 2.5 * opts.pixelRatio, startY + 0.5 * lineHeight + 5 * opts.pixelRatio); + context.lineTo(startX + 12.5 * opts.pixelRatio, startY + 0.5 * lineHeight + 5 * opts.pixelRatio); + context.lineTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight - 5 * opts.pixelRatio); + break; + case 'diamond': + context.moveTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight - 5 * opts.pixelRatio); + context.lineTo(startX + 2.5 * opts.pixelRatio, startY + 0.5 * lineHeight); + context.lineTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight + 5 * opts.pixelRatio); + context.lineTo(startX + 12.5 * opts.pixelRatio, startY + 0.5 * lineHeight); + context.lineTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight - 5 * opts.pixelRatio); + break; + case 'circle': + context.moveTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight); + context.arc(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight, 5 * opts.pixelRatio, 0, 2 * Math.PI); + break; + case 'rect': + context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pixelRatio); + context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pixelRatio, 15 * opts.pixelRatio, 10 * opts.pixelRatio); + break; + default: + context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pixelRatio); + context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pixelRatio, 15 * opts.pixelRatio, 10 * opts.pixelRatio); + } + context.closePath(); + context.fill(); + context.stroke(); + + startX += shapeWidth + shapeRight; + let fontTrans = 0.5 * lineHeight + 0.5 * fontSize - 2; + context.beginPath(); + context.setFontSize(fontSize); + context.setFillStyle(item.show ? opts.legend.fontColor : opts.legend.hiddenColor); + context.fillText(item.name, startX, startY + fontTrans); + context.closePath(); + context.stroke(); + if (opts.legend.position == 'top' || opts.legend.position == 'bottom') { + startX += measureText(item.name, fontSize) + itemGap; + item.area[2] = startX; + } else { + item.area[2] = startX + measureText(item.name, fontSize) + itemGap;; + startX -= shapeWidth + shapeRight; + startY += lineHeight; + } + } + }); +} + +function drawPieDataPoints(series, opts, config, context) { + var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; + var pieOption = assign({}, { + activeOpacity: 0.5, + activeRadius: 10 * opts.pixelRatio, + offsetAngle: 0, + labelWidth: 15 * opts.pixelRatio, + ringWidth: 0, + border:false, + borderWidth:2, + borderColor:'#FFFFFF' + }, opts.extra.pie); + var centerPosition = { + x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2, + y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2 + }; + if (config.pieChartLinePadding == 0) { + config.pieChartLinePadding = pieOption.activeRadius; + } + + var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding - config._pieTextMaxLength_, (opts.height - opts.area[0] - opts.area[2]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding); + + series = getPieDataPoints(series, radius, process); + + var activeRadius = pieOption.activeRadius; + + series = series.map(function(eachSeries) { + eachSeries._start_ += (pieOption.offsetAngle) * Math.PI / 180; + return eachSeries; + }); + series.forEach(function(eachSeries, seriesIndex) { + if (opts.tooltip) { + if (opts.tooltip.index == seriesIndex) { + context.beginPath(); + context.setFillStyle(hexToRgb(eachSeries.color, opts.extra.pie.activeOpacity || 0.5)); + context.moveTo(centerPosition.x, centerPosition.y); + context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_ + activeRadius, eachSeries._start_, + eachSeries._start_ + 2 * + eachSeries._proportion_ * Math.PI); + context.closePath(); + context.fill(); + } + } + context.beginPath(); + context.setLineWidth(pieOption.borderWidth * opts.pixelRatio); + context.lineJoin = "round"; + context.setStrokeStyle(pieOption.borderColor); + context.setFillStyle(eachSeries.color); + context.moveTo(centerPosition.x, centerPosition.y); + context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI); + context.closePath(); + context.fill(); + if (pieOption.border == true) { + context.stroke(); + } + }); + + if (opts.type === 'ring') { + var innerPieWidth = radius * 0.6; + if (typeof opts.extra.pie.ringWidth === 'number' && opts.extra.pie.ringWidth > 0) { + innerPieWidth = Math.max(0, radius - opts.extra.pie.ringWidth); + } + context.beginPath(); + context.setFillStyle(opts.background || '#ffffff'); + context.moveTo(centerPosition.x, centerPosition.y); + context.arc(centerPosition.x, centerPosition.y, innerPieWidth, 0, 2 * Math.PI); + context.closePath(); + context.fill(); + } + + if (opts.dataLabel !== false && process === 1) { + var valid = false; + for (var i = 0, len = series.length; i < len; i++) { + if (series[i].data > 0) { + valid = true; + break; + } + } + + if (valid) { + drawPieText(series, opts, config, context, radius, centerPosition); + } + } + + if (process === 1 && opts.type === 'ring') { + drawRingTitle(opts, config, context, centerPosition); + } + + return { + center: centerPosition, + radius: radius, + series: series + }; +} + +function drawRoseDataPoints(series, opts, config, context) { + var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; + var roseOption = assign({}, { + type: 'area', + activeOpacity: 0.5, + activeRadius: 10 * opts.pixelRatio, + offsetAngle: 0, + labelWidth: 15 * opts.pixelRatio, + border:false, + borderWidth:2, + borderColor:'#FFFFFF' + }, opts.extra.rose); + if (config.pieChartLinePadding == 0) { + config.pieChartLinePadding = roseOption.activeRadius; + } + var centerPosition = { + x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2, + y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2 + }; + var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding - config._pieTextMaxLength_, (opts.height - opts.area[0] - opts.area[2]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding); + var minRadius = roseOption.minRadius || radius * 0.5; + + series = getRoseDataPoints(series, roseOption.type, minRadius, radius, process); + + var activeRadius = roseOption.activeRadius; + + series = series.map(function(eachSeries) { + eachSeries._start_ += (roseOption.offsetAngle || 0) * Math.PI / 180; + return eachSeries; + }); + + series.forEach(function(eachSeries, seriesIndex) { + if (opts.tooltip) { + if (opts.tooltip.index == seriesIndex) { + context.beginPath(); + context.setFillStyle(hexToRgb(eachSeries.color, roseOption.activeOpacity || 0.5)); + context.moveTo(centerPosition.x, centerPosition.y); + context.arc(centerPosition.x, centerPosition.y, activeRadius + eachSeries._radius_, eachSeries._start_, + eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI); + context.closePath(); + context.fill(); + } + } + context.beginPath(); + context.setLineWidth(roseOption.borderWidth * opts.pixelRatio); + context.lineJoin = "round"; + context.setStrokeStyle(roseOption.borderColor); + context.setFillStyle(eachSeries.color); + context.moveTo(centerPosition.x, centerPosition.y); + context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * + eachSeries._rose_proportion_ * Math.PI); + context.closePath(); + context.fill(); + if (roseOption.border == true) { + context.stroke(); + } + }); + + if (opts.dataLabel !== false && process === 1) { + var valid = false; + for (var i = 0, len = series.length; i < len; i++) { + if (series[i].data > 0) { + valid = true; + break; + } + } + + if (valid) { + drawPieText(series, opts, config, context, radius, centerPosition); + } + } + + return { + center: centerPosition, + radius: radius, + series: series + }; +} + +function drawArcbarDataPoints(series, opts, config, context) { + var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; + var arcbarOption = assign({}, { + startAngle: 0.75, + endAngle: 0.25, + type: 'default', + width: 12 * opts.pixelRatio + }, opts.extra.arcbar); + + series = getArcbarDataPoints(series, arcbarOption, process); + var centerPosition = { + x: opts.width / 2, + y: opts.height / 2 + }; + var radius = Math.min(centerPosition.x, centerPosition.y); + radius -= 5 * opts.pixelRatio; + radius -= arcbarOption.width / 2; + + //背景颜色 + context.setLineWidth(arcbarOption.width); + context.setStrokeStyle(arcbarOption.backgroundColor || '#E9E9E9'); + context.setLineCap('round'); + context.beginPath(); + if (arcbarOption.type == 'default') { + context.arc(centerPosition.x, centerPosition.y, radius, arcbarOption.startAngle * Math.PI, arcbarOption.endAngle * + Math.PI, false); + } else { + context.arc(centerPosition.x, centerPosition.y, radius, 0, 2 * Math.PI, false); + } + context.stroke(); + + for (let i = 0; i < series.length; i++) { + let eachSeries = series[i]; + context.setLineWidth(arcbarOption.width); + context.setStrokeStyle(eachSeries.color); + context.setLineCap('round'); + context.beginPath(); + context.arc(centerPosition.x, centerPosition.y, radius, arcbarOption.startAngle * Math.PI, eachSeries._proportion_ * + Math.PI, false); + context.stroke(); + } + + drawRingTitle(opts, config, context, centerPosition); + + return { + center: centerPosition, + radius: radius, + series: series + }; +} + +function drawGaugeDataPoints(categories, series, opts, config, context) { + var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1; + var gaugeOption = assign({}, { + startAngle: 0.75, + endAngle: 0.25, + width: 15, + splitLine: { + fixRadius: 0, + splitNumber: 10, + width: 15, + color: '#FFFFFF', + childNumber: 5, + childWidth: 5 + }, + pointer: { + width: 15, + color: 'auto' + } + }, opts.extra.gauge); + + if (gaugeOption.oldAngle == undefined) { + gaugeOption.oldAngle = gaugeOption.startAngle; + } + if (gaugeOption.oldData == undefined) { + gaugeOption.oldData = 0; + } + categories = getGaugeAxisPoints(categories, gaugeOption.startAngle, gaugeOption.endAngle); + + var centerPosition = { + x: opts.width / 2, + y: opts.height / 2 + }; + var radius = Math.min(centerPosition.x, centerPosition.y); + radius -= 5 * opts.pixelRatio; + radius -= gaugeOption.width / 2; + var innerRadius = radius - gaugeOption.width; + + //画背景 + context.setLineWidth(gaugeOption.width); + context.setLineCap('butt'); + for (let i = 0; i < categories.length; i++) { + let eachCategories = categories[i]; + context.beginPath(); + context.setStrokeStyle(eachCategories.color); + context.arc(centerPosition.x, centerPosition.y, radius, eachCategories._startAngle_ * Math.PI, eachCategories._endAngle_ * + Math.PI, false); + context.stroke(); + } + context.save(); + + //画刻度线 + let totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1; + let splitAngle = totalAngle / gaugeOption.splitLine.splitNumber; + let childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber; + let startX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius; + let endX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width; + let childendX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.childWidth; + + context.translate(centerPosition.x, centerPosition.y); + context.rotate((gaugeOption.startAngle - 1) * Math.PI); + + for (let i = 0; i < gaugeOption.splitLine.splitNumber + 1; i++) { + context.beginPath(); + context.setStrokeStyle(gaugeOption.splitLine.color); + context.setLineWidth(2 * opts.pixelRatio); + context.moveTo(startX, 0); + context.lineTo(endX, 0); + context.stroke(); + context.rotate(splitAngle * Math.PI); + } + context.restore(); + + context.save(); + context.translate(centerPosition.x, centerPosition.y); + context.rotate((gaugeOption.startAngle - 1) * Math.PI); + + for (let i = 0; i < gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1; i++) { + context.beginPath(); + context.setStrokeStyle(gaugeOption.splitLine.color); + context.setLineWidth(1 * opts.pixelRatio); + context.moveTo(startX, 0); + context.lineTo(childendX, 0); + context.stroke(); + context.rotate(childAngle * Math.PI); + } + context.restore(); + + //画指针 + series = getGaugeDataPoints(series, categories, gaugeOption, process); + + for (let i = 0; i < series.length; i++) { + let eachSeries = series[i]; + context.save(); + context.translate(centerPosition.x, centerPosition.y); + context.rotate((eachSeries._proportion_ - 1) * Math.PI); + context.beginPath(); + context.setFillStyle(eachSeries.color); + context.moveTo(gaugeOption.pointer.width, 0); + context.lineTo(0, -gaugeOption.pointer.width / 2); + context.lineTo(-innerRadius, 0); + context.lineTo(0, gaugeOption.pointer.width / 2); + context.lineTo(gaugeOption.pointer.width, 0); + context.closePath(); + context.fill(); + context.beginPath(); + context.setFillStyle('#FFFFFF'); + context.arc(0, 0, gaugeOption.pointer.width / 6, 0, 2 * Math.PI, false); + context.fill(); + context.restore(); + } + + if (opts.dataLabel !== false) { + drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context); + } + + drawRingTitle(opts, config, context, centerPosition); + + if (process === 1 && opts.type === 'gauge') { + opts.extra.gauge.oldAngle = series[0]._proportion_; + opts.extra.gauge.oldData = series[0].data; + } + return { + center: centerPosition, + radius: radius, + innerRadius: innerRadius, + categories: categories, + totalAngle: totalAngle + }; +} + +function drawRadarDataPoints(series, opts, config, context) { + var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; + var radarOption = assign({},{ + gridColor: '#cccccc', + labelColor: '#666666', + opacity: 0.2 + },opts.extra.radar); + + var coordinateAngle = getRadarCoordinateSeries(opts.categories.length); + + var centerPosition = { + x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2, + y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2 + }; + + var radius = Math.min(centerPosition.x - (getMaxTextListLength(opts.categories) + config.radarLabelTextMargin), + centerPosition.y - config.radarLabelTextMargin); + //TODO逻辑不对 + radius -= opts.padding[1]; + + // draw grid + context.beginPath(); + context.setLineWidth(1 * opts.pixelRatio); + context.setStrokeStyle(radarOption.gridColor); + coordinateAngle.forEach(function(angle) { + var pos = convertCoordinateOrigin(radius * Math.cos(angle), radius * Math.sin(angle), centerPosition); + context.moveTo(centerPosition.x, centerPosition.y); + context.lineTo(pos.x, pos.y); + }); + context.stroke(); + context.closePath(); + // draw split line grid + + var _loop = function _loop(i) { + var startPos = {}; + context.beginPath(); + context.setLineWidth(1 * opts.pixelRatio); + context.setStrokeStyle(radarOption.gridColor); + coordinateAngle.forEach(function(angle, index) { + var pos = convertCoordinateOrigin(radius / config.radarGridCount * i * Math.cos(angle), radius / config.radarGridCount * + i * Math.sin(angle), centerPosition); + if (index === 0) { + startPos = pos; + context.moveTo(pos.x, pos.y); + } else { + context.lineTo(pos.x, pos.y); + } + }); + context.lineTo(startPos.x, startPos.y); + context.stroke(); + context.closePath(); + }; + + for (var i = 1; i <= config.radarGridCount; i++) { + _loop(i); + } + + var radarDataPoints = getRadarDataPoints(coordinateAngle, centerPosition, radius, series, opts, process); + + radarDataPoints.forEach(function(eachSeries, seriesIndex) { + // 绘制区域数据 + context.beginPath(); + context.setFillStyle(hexToRgb(eachSeries.color, radarOption.opacity)); + eachSeries.data.forEach(function(item, index) { + if (index === 0) { + context.moveTo(item.position.x, item.position.y); + } else { + context.lineTo(item.position.x, item.position.y); + } + }); + context.closePath(); + context.fill(); + + if (opts.dataPointShape !== false) { + var shape = config.dataPointShape[seriesIndex % config.dataPointShape.length]; + var points = eachSeries.data.map(function(item) { + return item.position; + }); + drawPointShape(points, eachSeries.color, shape, context, opts); + } + }); + // draw label text + drawRadarLabel(coordinateAngle, radius, centerPosition, opts, config, context); + + return { + center: centerPosition, + radius: radius, + angleList: coordinateAngle + }; +} + +function normalInt(min, max, iter) { + iter = iter==0?1:iter; + var arr = []; + for (var i = 0; i < iter; i++) { + arr[i] = Math.random(); + }; + return Math.floor(arr.reduce(function(i,j){return i+j})/iter*(max-min))+min; +}; + +function collisionNew(area,points,width,height){ + var isIn=false; + for(let i=0;ipoints[i].area[2]||area[1]>points[i].area[3]||area[2]width || area[3]>height){ + isIn=true; + break; + }else{ + isIn=false; + } + }else{ + isIn=true; + break; + } + } + } + return isIn; +}; + +function getBoundingBox(data) { + var bounds = {}, coords; + bounds.xMin = 180; + bounds.xMax = 0; + bounds.yMin = 90; + bounds.yMax = 0 + for (var i = 0; i < data.length; i++) { + var coorda = data[i].geometry.coordinates + for (var k = 0; k < coorda.length; k++) { + coords = coorda[k]; + if (coords.length == 1) { + coords = coords[0] + } + for (var j = 0; j < coords.length; j++) { + var longitude = coords[j][0]; + var latitude = coords[j][1]; + var point = { + x: longitude, + y: latitude + } + bounds.xMin = bounds.xMin < point.x ? bounds.xMin : point.x; + bounds.xMax = bounds.xMax > point.x ? bounds.xMax : point.x; + bounds.yMin = bounds.yMin < point.y ? bounds.yMin : point.y; + bounds.yMax = bounds.yMax > point.y ? bounds.yMax : point.y; + } + } + } + return bounds; +} + +function coordinateToPoint(latitude, longitude,bounds,scale,xoffset,yoffset) { + return { + x: (longitude - bounds.xMin) * scale+xoffset, + y: (bounds.yMax - latitude) * scale+yoffset + }; +} + +function pointToCoordinate(pointY, pointX,bounds,scale,xoffset,yoffset) { + return { + x: (pointX-xoffset)/scale+bounds.xMin, + y: bounds.yMax - (pointY-yoffset)/scale + }; +} + +function isRayIntersectsSegment(poi,s_poi,e_poi){ + if (s_poi[1]==e_poi[1]){return false;} + if (s_poi[1]>poi[1] && e_poi[1]>poi[1]){return false;} + if (s_poi[1]poi[1]){return false;} + if (e_poi[1]==poi[1] && s_poi[1]>poi[1]){return false;} + if (s_poi[0]0.7) { + return true; + }else {return false}; + }; + for (let i = 0; i < points.length; i++) { + let text = points[i].name; + let tHeight = points[i].textSize; + let tWidth = measureText(text,tHeight); + let isSpin = Spin(); + let x,y,area,areav; + let breaknum=0; + while(true) { + breaknum++; + let isCollision; + if (isSpin) { + x = normalInt(-opts.width/2, opts.width/2,5) - tWidth/2; + y = normalInt(-opts.height/2, opts.height/2,5)+tHeight/2; + area=[y-5-tWidth+opts.width/2,(-x-5+opts.height/2),y+5+opts.width/2,(-x+tHeight+5+opts.height/2)]; + areav=[opts.width-(opts.width/2-opts.height/2)-(-x+tHeight+5+opts.height/2)-5,(opts.height/2-opts.width/2)+(y-5-tWidth+opts.width/2)-5,opts.width-(opts.width/2-opts.height/2)-(-x+tHeight+5+opts.height/2)+tHeight,(opts.height/2-opts.width/2)+(y-5-tWidth+opts.width/2)+tWidth+5]; + isCollision = collisionNew(areav,points,opts.height,opts.width); + }else{ + x = normalInt(-opts.width/2, opts.width/2,5) - tWidth/2; + y = normalInt(-opts.height/2, opts.height/2,5)+tHeight/2; + area=[x-5+opts.width/2,y-5-tHeight+opts.height/2,x+tWidth+5+opts.width/2,y+5+opts.height/2]; + isCollision = collisionNew(area,points,opts.width,opts.height); + } + if (!isCollision) break; + if (breaknum==1000){ + area=[-1000,-1000,-1000,-1000]; + break; + } + }; + if (isSpin) { + points[i].area=areav; + points[i].areav=area; + }else{ + points[i].area=area; + } + points[i].rotate=isSpin; + }; + break; + } + return points; +} + + +function drawWordCloudDataPoints(series, opts, config, context) { + let process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; + let wordOption = assign({},{ + type: 'normal', + autoColors: true + },opts.extra.word); + + context.beginPath(); + context.setFillStyle(opts.background||'#FFFFFF'); + context.rect(0,0,opts.width,opts.height); + context.fill(); + context.save(); + let points = opts.chartData.wordCloudData; + context.translate(opts.width/2,opts.height/2); + + for(let i=0;i0){ + if (opts.tooltip) { + if (opts.tooltip.index == i) { + context.strokeText(text,(points[i].areav[0]+5-opts.width/2)*process-tWidth*(1-process)/2,(points[i].areav[1]+5+tHeight-opts.height/2)*process); + }else{ + context.fillText(text,(points[i].areav[0]+5-opts.width/2)*process-tWidth*(1-process)/2,(points[i].areav[1]+5+tHeight-opts.height/2)*process); + } + }else{ + context.fillText(text,(points[i].areav[0]+5-opts.width/2)*process-tWidth*(1-process)/2,(points[i].areav[1]+5+tHeight-opts.height/2)*process); + } + } + }else{ + if(points[i].area[0]>0){ + if (opts.tooltip) { + if (opts.tooltip.index == i) { + context.strokeText(text,(points[i].area[0]+5-opts.width/2)*process-tWidth*(1-process)/2,(points[i].area[1]+5+tHeight-opts.height/2)*process); + }else{ + context.fillText(text,(points[i].area[0]+5-opts.width/2)*process-tWidth*(1-process)/2,(points[i].area[1]+5+tHeight-opts.height/2)*process); + } + }else{ + context.fillText(text,(points[i].area[0]+5-opts.width/2)*process-tWidth*(1-process)/2,(points[i].area[1]+5+tHeight-opts.height/2)*process); + } + + } + } + + context.stroke(); + context.restore(); + } + context.restore(); +} + +function drawFunnelDataPoints(series, opts, config, context) { + let process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; + let funnelOption = assign({},{ + activeWidth:10, + activeOpacity:0.3, + border:false, + borderWidth:2, + borderColor:'#FFFFFF', + fillOpacity:1, + labelAlign:'right' + },opts.extra.funnel); + let eachSpacing = (opts.height - opts.area[0] - opts.area[2])/series.length; + let centerPosition = { + x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2, + y: opts.height-opts.area[2] + }; + let activeWidth = funnelOption.activeWidth; + let radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - activeWidth, (opts.height - opts.area[0] - opts.area[2]) / 2 - activeWidth); + series = getFunnelDataPoints(series, radius, process); + context.save(); + context.translate(centerPosition.x,centerPosition.y); + for(let i=0;i 0 && arguments[0] !== undefined ? arguments[0] : {}; + this.opts = assign({}, this.opts, data); + this.opts.updateData = true; + let scrollPosition = data.scrollPosition || 'current'; + switch (scrollPosition) { + case 'current': + this.opts._scrollDistance_ = this.scrollOption.currentOffset; + break; + case 'left': + this.opts._scrollDistance_ = 0; + this.scrollOption = { + currentOffset: 0, + startTouchX: 0, + distance: 0, + lastMoveTime: 0 + }; + break; + case 'right': + let _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config), + yAxisWidth = _calYAxisData.yAxisWidth; + this.config.yAxisWidth = yAxisWidth; + let offsetLeft = 0; + let _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config), + xAxisPoints = _getXAxisPoints0.xAxisPoints, + startX = _getXAxisPoints0.startX, + endX = _getXAxisPoints0.endX, + eachSpacing = _getXAxisPoints0.eachSpacing; + let totalWidth = eachSpacing * (xAxisPoints.length - 1); + let screenWidth = endX - startX; + offsetLeft = screenWidth - totalWidth; + this.scrollOption = { + currentOffset: offsetLeft, + startTouchX: offsetLeft, + distance: 0, + lastMoveTime: 0 + }; + this.opts._scrollDistance_ = offsetLeft; + break; + } + drawCharts.call(this, this.opts.type, this.opts, this.config, this.context); +}; + +Charts.prototype.zoom = function() { + var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.opts.xAxis.itemCount; + if (this.opts.enableScroll !== true) { + console.log('请启用滚动条后使用!') + return; + } + //当前屏幕中间点 + let centerPoint = Math.round(Math.abs(this.scrollOption.currentOffset) / this.opts.chartData.eachSpacing) + Math.round( + this.opts.xAxis.itemCount / 2); + this.opts.animation = false; + this.opts.xAxis.itemCount = val.itemCount; + //重新计算x轴偏移距离 + let _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config), + yAxisWidth = _calYAxisData.yAxisWidth; + this.config.yAxisWidth = yAxisWidth; + let offsetLeft = 0; + let _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config), + xAxisPoints = _getXAxisPoints0.xAxisPoints, + startX = _getXAxisPoints0.startX, + endX = _getXAxisPoints0.endX, + eachSpacing = _getXAxisPoints0.eachSpacing; + let centerLeft = eachSpacing * centerPoint; + let screenWidth = endX - startX; + let MaxLeft = screenWidth - eachSpacing * (xAxisPoints.length - 1); + offsetLeft = screenWidth / 2 - centerLeft; + if (offsetLeft > 0) { + offsetLeft = 0; + } + if (offsetLeft < MaxLeft) { + offsetLeft = MaxLeft; + } + this.scrollOption = { + currentOffset: offsetLeft, + startTouchX: offsetLeft, + distance: 0, + lastMoveTime: 0 + }; + this.opts._scrollDistance_ = offsetLeft; + drawCharts.call(this, this.opts.type, this.opts, this.config, this.context); +}; + +Charts.prototype.stopAnimation = function() { + this.animationInstance && this.animationInstance.stop(); +}; + +Charts.prototype.addEventListener = function(type, listener) { + this.event.addEventListener(type, listener); +}; + +Charts.prototype.getCurrentDataIndex = function(e) { + var touches = null; + if (e.changedTouches) { + touches = e.changedTouches[0]; + } else { + touches = e.mp.changedTouches[0]; + } + if (touches) { + let _touches$ = getTouches(touches, this.opts, e); + if (this.opts.type === 'pie' || this.opts.type === 'ring' || this.opts.type === 'rose') { + return findPieChartCurrentIndex({ + x: _touches$.x, + y: _touches$.y + }, this.opts.chartData.pieData); + } else if (this.opts.type === 'radar') { + return findRadarChartCurrentIndex({ + x: _touches$.x, + y: _touches$.y + }, this.opts.chartData.radarData, this.opts.categories.length); + } else if (this.opts.type === 'funnel') { + return findFunnelChartCurrentIndex({ + x: _touches$.x, + y: _touches$.y + }, this.opts.chartData.funnelData); + } else if (this.opts.type === 'map') { + return findMapChartCurrentIndex({ + x: _touches$.x, + y: _touches$.y + }, this.opts); + }else if (this.opts.type === 'word') { + return findWordChartCurrentIndex({ + x: _touches$.x, + y: _touches$.y + }, this.opts.chartData.wordCloudData); + } else { + return findCurrentIndex({ + x: _touches$.x, + y: _touches$.y + }, this.opts.chartData.xAxisPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset)); + } + } + return -1; +}; + +Charts.prototype.getLegendDataIndex = function(e) { + var touches = null; + if (e.changedTouches) { + touches = e.changedTouches[0]; + } else { + touches = e.mp.changedTouches[0]; + } + if (touches) { + let _touches$ = getTouches(touches, this.opts, e); + return findLegendIndex({ + x: _touches$.x, + y: _touches$.y + }, this.opts.chartData.legendData); + } + return -1; +}; + +Charts.prototype.touchLegend = function(e) { + var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var touches = null; + if (e.changedTouches) { + touches = e.changedTouches[0]; + } else { + touches = e.mp.changedTouches[0]; + } + if (touches) { + var _touches$ = getTouches(touches, this.opts, e); + var index = this.getLegendDataIndex(e); + if (index >= 0) { + this.opts.series[index].show = !this.opts.series[index].show; + this.opts.animation = option.animation ? true : false; + drawCharts.call(this, this.opts.type, this.opts, this.config, this.context); + } + } + +}; + +Charts.prototype.showToolTip = function(e) { + var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var touches = null; + if (e.changedTouches) { + touches = e.changedTouches[0]; + } else { + touches = e.mp.changedTouches[0]; + } + if (!touches) { + console.log("touchError"); + } + var _touches$ = getTouches(touches, this.opts, e); + var currentOffset = this.scrollOption.currentOffset; + var opts = assign({}, this.opts, { + _scrollDistance_: currentOffset, + animation: false + }); + if (this.opts.type === 'line' || this.opts.type === 'area' || this.opts.type === 'column') { + var index = this.getCurrentDataIndex(e); + if (index > -1) { + var seriesData = getSeriesDataItem(this.opts.series, index); + if (seriesData.length !== 0) { + var _getToolTipData = getToolTipData(seriesData, this.opts.chartData.calPoints, index, this.opts.categories,option), + textList = _getToolTipData.textList, + offset = _getToolTipData.offset; + offset.y = _touches$.y; + opts.tooltip = { + textList: textList, + offset: offset, + option: option, + index: index + }; + } + } + drawCharts.call(this, opts.type, opts, this.config, this.context); + } + if (this.opts.type === 'mix') { + var index = this.getCurrentDataIndex(e); + if (index > -1) { + var currentOffset = this.scrollOption.currentOffset; + var opts = assign({}, this.opts, { + _scrollDistance_: currentOffset, + animation: false + }); + var seriesData = getSeriesDataItem(this.opts.series, index); + if (seriesData.length !== 0) { + var _getMixToolTipData = getMixToolTipData(seriesData, this.opts.chartData.calPoints, index, this.opts.categories,option), + textList = _getMixToolTipData.textList, + offset = _getMixToolTipData.offset; + offset.y = _touches$.y; + opts.tooltip = { + textList: textList, + offset: offset, + option: option, + index: index + }; + } + } + drawCharts.call(this, opts.type, opts, this.config, this.context); + } + if (this.opts.type === 'candle') { + var index = this.getCurrentDataIndex(e); + if (index > -1) { + var currentOffset = this.scrollOption.currentOffset; + var opts = assign({}, this.opts, { + _scrollDistance_: currentOffset, + animation: false + }); + var seriesData = getSeriesDataItem(this.opts.series, index); + if (seriesData.length !== 0) { + var _getToolTipData = getCandleToolTipData(this.opts.series[0].data, seriesData, this.opts.chartData.calPoints, + index, this.opts.categories, this.opts.extra.candle, option), + textList = _getToolTipData.textList, + offset = _getToolTipData.offset; + offset.y = _touches$.y; + opts.tooltip = { + textList: textList, + offset: offset, + option: option, + index: index + }; + } + } + drawCharts.call(this, opts.type, opts, this.config, this.context); + } + if (this.opts.type === 'pie' || this.opts.type === 'ring' || this.opts.type === 'rose'||this.opts.type === 'funnel' ) { + var index = this.getCurrentDataIndex(e); + if (index > -1) { + var currentOffset = this.scrollOption.currentOffset; + var opts = assign({}, this.opts, { + _scrollDistance_: currentOffset, + animation: false + }); + var seriesData = this.opts._series_[index]; + var textList = [{ + text: option.format ? option.format(seriesData) : seriesData.name + ': ' + seriesData.data, + color: seriesData.color + }]; + var offset = { + x: _touches$.x, + y: _touches$.y + }; + opts.tooltip = { + textList: textList, + offset: offset, + option: option, + index: index + }; + } + drawCharts.call(this, opts.type, opts, this.config, this.context); + } + if (this.opts.type === 'map'||this.opts.type === 'word') { + var index = this.getCurrentDataIndex(e); + if (index > -1) { + var currentOffset = this.scrollOption.currentOffset; + var opts = assign({}, this.opts, { + _scrollDistance_: currentOffset, + animation: false + }); + var seriesData = this.opts._series_[index]; + var textList = [{ + text: option.format ? option.format(seriesData) : seriesData.properties.name , + color: seriesData.color + }]; + var offset = { + x: _touches$.x, + y: _touches$.y + }; + opts.tooltip = { + textList: textList, + offset: offset, + option: option, + index: index + }; + } + opts.updateData = false; + drawCharts.call(this, opts.type, opts, this.config, this.context); + } + if (this.opts.type === 'radar') { + var index = this.getCurrentDataIndex(e); + if (index > -1) { + var currentOffset = this.scrollOption.currentOffset; + var opts = assign({}, this.opts, { + _scrollDistance_: currentOffset, + animation: false + }); + var seriesData = getSeriesDataItem(this.opts.series, index); + if (seriesData.length !== 0) { + var textList = seriesData.map(function(item) { + return { + text: option.format ? option.format(item) : item.name + ': ' + item.data, + color: item.color + }; + }); + var offset = { + x: _touches$.x, + y: _touches$.y + }; + opts.tooltip = { + textList: textList, + offset: offset, + option: option, + index: index + }; + } + } + drawCharts.call(this, opts.type, opts, this.config, this.context); + } +}; + +Charts.prototype.translate = function(distance) { + this.scrollOption = { + currentOffset: distance, + startTouchX: distance, + distance: 0, + lastMoveTime: 0 + }; + let opts = assign({}, this.opts, { + _scrollDistance_: distance, + animation: false + }); + drawCharts.call(this, this.opts.type, opts, this.config, this.context); +}; + +Charts.prototype.scrollStart = function(e) { + var touches = null; + if (e.changedTouches) { + touches = e.changedTouches[0]; + } else { + touches = e.mp.changedTouches[0]; + } + var _touches$ = getTouches(touches, this.opts, e); + if (touches && this.opts.enableScroll === true) { + this.scrollOption.startTouchX = _touches$.x; + } +}; + +Charts.prototype.scroll = function(e) { + if (this.scrollOption.lastMoveTime === 0) { + this.scrollOption.lastMoveTime = Date.now(); + } + let Limit = this.opts.extra.touchMoveLimit || 20; + let currMoveTime = Date.now(); + let duration = currMoveTime - this.scrollOption.lastMoveTime; + if (duration < Math.floor(1000 / Limit)) return; + this.scrollOption.lastMoveTime = currMoveTime; + var touches = null; + if (e.changedTouches) { + touches = e.changedTouches[0]; + } else { + touches = e.mp.changedTouches[0]; + } + if (touches && this.opts.enableScroll === true) { + var _touches$ = getTouches(touches, this.opts, e); + var _distance; + _distance = _touches$.x - this.scrollOption.startTouchX; + var currentOffset = this.scrollOption.currentOffset; + var validDistance = calValidDistance(currentOffset + _distance, this.opts.chartData, this.config, this.opts); + this.scrollOption.distance = _distance = validDistance - currentOffset; + var opts = assign({}, this.opts, { + _scrollDistance_: currentOffset + _distance, + animation: false + }); + drawCharts.call(this, opts.type, opts, this.config, this.context); + return currentOffset + _distance; + } +}; + +Charts.prototype.scrollEnd = function(e) { + if (this.opts.enableScroll === true) { + var _scrollOption = this.scrollOption, + currentOffset = _scrollOption.currentOffset, + distance = _scrollOption.distance; + this.scrollOption.currentOffset = currentOffset + distance; + this.scrollOption.distance = 0; + } +}; +if (typeof module === "object" && typeof module.exports === "object") { + module.exports = Charts; + //export default Charts;//建议使用nodejs的module导出方式,如报错请使用export方式导出 +} diff --git a/fe/PDA/components/u-link/u-link.vue b/fe/PDA/components/u-link/u-link.vue new file mode 100644 index 000000000..de56c4110 --- /dev/null +++ b/fe/PDA/components/u-link/u-link.vue @@ -0,0 +1,59 @@ + + + + + diff --git a/fe/PDA/hybrid/html/local.html b/fe/PDA/hybrid/html/local.html new file mode 100644 index 000000000..9a21210be --- /dev/null +++ b/fe/PDA/hybrid/html/local.html @@ -0,0 +1,88 @@ + + + + + + 本地网页 + + + +

    web-view 组件加载本地 html 示例,仅在 App 环境下生效。点击下列按钮,跳转至其它页面。

    +
    + + + + + +
    +

    网页向应用发送消息。注意:小程序端应用会在此页面后退时接收到消息。

    +
    + +
    + + + + + diff --git a/fe/PDA/index.html b/fe/PDA/index.html new file mode 100644 index 000000000..c3ff205f6 --- /dev/null +++ b/fe/PDA/index.html @@ -0,0 +1,20 @@ + + + + + + + + + + +
    + + + diff --git a/fe/PDA/libs/versionUpdate.js b/fe/PDA/libs/versionUpdate.js new file mode 100644 index 000000000..4b2e9c780 --- /dev/null +++ b/fe/PDA/libs/versionUpdate.js @@ -0,0 +1,23 @@ +import axios from 'axios' + +const isNewVersion = () => { + let updae_url = getApp().globalData.text; + let url = updae_url+ `/static/version.json?t=${new Date().getTime()}` + axios.get(url).then(res => { + if (res.status === 200) { + let vueVersion = res.data.version; + let localVueVersion = localStorage.getItem('vueVersion'); + if (localVueVersion && localVueVersion != vueVersion) { + localStorage.setItem('vueVersion', vueVersion); + window.location.reload(); + return; + } else { + localStorage.setItem('vueVersion', vueVersion); + } + } + }) +} + +export default { + isNewVersion +} diff --git a/fe/PDA/main.js b/fe/PDA/main.js new file mode 100644 index 000000000..610d72991 --- /dev/null +++ b/fe/PDA/main.js @@ -0,0 +1,90 @@ +import App from './App' +import store from './store' +import './router/my_router.js';//引入拦截 + +// #ifndef VUE3 +import Vue from 'vue' +console.log("Vuew2222"); +Vue.config.productionTip = false +Vue.prototype.$store = store +Vue.prototype.$adpid = "1111111111" +Vue.prototype.$backgroundAudioData = { + playing: false, + playTime: 0, + formatedPlayTime: '00:00:00' +} +App.mpType = 'app' +const app = new Vue({ + store, + ...App +}) +app.$mount() +// #endif + +// #ifdef VUE3 +import { + createSSRApp +} from 'vue' +export function createApp() { + const app = createSSRApp(App) + // 使用 uView UI + app.use(store) + app.config.globalProperties.$adpid = "1111111111" + app.config.globalProperties.$pageSize = 10 + app.config.globalProperties.$backgroundAudioData = { + playing: false, + playTime: 0, + formatedPlayTime: '00:00:00' + } + startApp(app); + + return { + app + } +} + + +export function startApp(app) { + + uni.request({ + url:'/static/config.json', + method: 'GET', + data:{}, + success: (res) => { + console.log("请求",res) + if(res.data!=""){ + //在配置中读url,company等信息 + app.config.globalProperties.$dev_url = res.data.params.dev; + app.config.globalProperties.$companyCode = res.data.params.companyCode; + app.config.globalProperties.$warehouseCode = res.data.params.warehouseCode; + app.config.globalProperties.$putawayLocationTypes = res.data.params.putawayLocationTypes; //创建上架任务的库存类型 + app.config.globalProperties.$putawayInventoryStatus = res.data.params.putawayInventoryStatus; //创建上架任务的库存状态 + app.config.globalProperties.$print_url = res.data.params.print_url; //打印的服务地址 + app.config.globalProperties.$isScrapScanToLocation = res.data.params.isScrapScanToLocation; //原料报废是否显示库位 + app.config.globalProperties.$isReceiptToday = res.data.params.isReceiptToday; //采购收货是否只看今天的采购任务 + + app.config.globalProperties.$scrapReason = res.data.params.scrapReason; //原料报废原因字典项 + app.config.globalProperties.$purchaseReturnReason = res.data.params.purchaseReturnReason; //采购退货原因字典项 + app.config.globalProperties.$returnBeforPutawayReason = res.data.params.returnBeforPutawayReason; //上架前退货原因字典项 + app.config.globalProperties.$receiptCheckReason = res.data.params.receiptCheckReason; //采购收货不合格原因字典项 + app.config.globalProperties.$configList = res.data.configList; + + app.config.globalProperties.$isShowQty_receipt = res.data.params.isShowQty_receipt; + app.config.globalProperties.$isEditShowQty_receipt = res.data.params.isEditShowQty_receipt; + getApp().globalData.text = res.data.params.version_update_url; + getApp().globalData.dev_url = res.data.params.dev; + getApp().globalData.print_url = res.data.params.print_url; + // console.log("地址",app.config.globalProperties.$dev_url) + } + }, + fail: (error) => { + + } + }) + + return {startApp}; +} +// #endif + + + diff --git a/fe/PDA/manifest.json b/fe/PDA/manifest.json new file mode 100644 index 000000000..6832eb65c --- /dev/null +++ b/fe/PDA/manifest.json @@ -0,0 +1,187 @@ +{ + "name" : "pda_vue_3.0", + "appid" : "__UNI__43932FE", + "description" : "应用描述", + "versionName" : "1.0.0", + "versionCode" : "100", + "transformPx" : false, + "app-plus" : { + "usingComponents" : true, + "nvueCompiler" : "uni-app", + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "nvueLaunchMode" : "fast", + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + "modules" : { + "OAuth" : {}, + "Payment" : {}, + "Push" : {}, + "Share" : {}, + "Speech" : {}, + "VideoPlayer" : {} + }, + "distribute" : { + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "ios" : { + "UIBackgroundModes" : [ "audio" ], + "urlschemewhitelist" : [ "baidumap", "iosamap" ] + }, + "sdkConfigs" : { + "speech" : { + "ifly" : {} + } + }, + "orientation" : [ "portrait-primary" ] + }, + "uniStatistics" : { + "enable" : true + } + }, + "quickapp" : {}, + "quickapp-native" : { + "icon" : "/static/logo.png", + "package" : "com.example.demo", + "features" : [ + { + "name" : "system.clipboard" + } + ] + }, + "quickapp-webview" : { + "icon" : "/static/logo.png", + "package" : "com.example.demo", + "minPlatformVersion" : 1070, + "versionName" : "1.0.0", + "versionCode" : 100 + }, + "mp-weixin" : { + "appid" : "", + "setting" : { + "urlCheck" : false + }, + "usingComponents" : true, + "permission" : { + "scope.userLocation" : { + "desc" : "演示定位能力" + } + }, + "uniStatistics" : { + "enable" : true + } + }, + "mp-alipay" : { + "usingComponents" : true, + "uniStatistics" : { + "enable" : true + } + }, + "mp-baidu" : { + "usingComponents" : true, + "uniStatistics" : { + "enable" : true + } + }, + "mp-toutiao" : { + "usingComponents" : true, + "uniStatistics" : { + "enable" : true + } + }, + "mp-jd" : { + "usingComponents" : true, + "uniStatistics" : { + "enable" : true + } + }, + "h5" : { + "template" : "template.h5.html", + "router" : { + "mode" : "history", + "base" : "" + }, + "sdkConfigs" : { + "maps" : { + "qqmap" : { + "key" : "TKUBZ-D24AF-GJ4JY-JDVM2-IBYKK-KEBCU" + } + } + }, + "async" : { + "timeout" : 20000 + }, + "uniStatistics" : { + "enable" : true + } + }, + "vueVersion" : "3", + "mp-kuaishou" : { + "uniStatistics" : { + "enable" : true + } + }, + "mp-lark" : { + "uniStatistics" : { + "enable" : true + } + }, + "mp-qq" : { + "uniStatistics" : { + "enable" : true + } + }, + "quickapp-webview-huawei" : { + "uniStatistics" : { + "enable" : true + } + }, + "quickapp-webview-union" : { + "uniStatistics" : { + "enable" : true + } + }, + "uniStatistics" : { + "version" : "2", + "enable" : true + } +} diff --git a/fe/PDA/mycomponents/comItem/comBalanceItem.vue b/fe/PDA/mycomponents/comItem/comBalanceItem.vue new file mode 100644 index 000000000..68814ed78 --- /dev/null +++ b/fe/PDA/mycomponents/comItem/comBalanceItem.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/fe/PDA/mycomponents/comItem/comBaseItem.vue b/fe/PDA/mycomponents/comItem/comBaseItem.vue new file mode 100644 index 000000000..6383b2c4e --- /dev/null +++ b/fe/PDA/mycomponents/comItem/comBaseItem.vue @@ -0,0 +1,50 @@ + + + + + + diff --git a/fe/PDA/mycomponents/comItem/comBottomItem.vue b/fe/PDA/mycomponents/comItem/comBottomItem.vue new file mode 100644 index 000000000..ed7d5dd66 --- /dev/null +++ b/fe/PDA/mycomponents/comItem/comBottomItem.vue @@ -0,0 +1,95 @@ + + + + + + diff --git a/fe/PDA/mycomponents/comItem/comErpLocation.vue b/fe/PDA/mycomponents/comItem/comErpLocation.vue new file mode 100644 index 000000000..b97aeb539 --- /dev/null +++ b/fe/PDA/mycomponents/comItem/comErpLocation.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/fe/PDA/mycomponents/comItem/comItemBottom.vue b/fe/PDA/mycomponents/comItem/comItemBottom.vue new file mode 100644 index 000000000..1c1845d70 --- /dev/null +++ b/fe/PDA/mycomponents/comItem/comItemBottom.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/fe/PDA/mycomponents/comItem/comItemErpCenter.vue b/fe/PDA/mycomponents/comItem/comItemErpCenter.vue new file mode 100644 index 000000000..2d379c0a7 --- /dev/null +++ b/fe/PDA/mycomponents/comItem/comItemErpCenter.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/fe/PDA/mycomponents/comItem/comItemLocationCenter.vue b/fe/PDA/mycomponents/comItem/comItemLocationCenter.vue new file mode 100644 index 000000000..02ae6de0d --- /dev/null +++ b/fe/PDA/mycomponents/comItem/comItemLocationCenter.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/fe/PDA/mycomponents/comItem/comItemTop.vue b/fe/PDA/mycomponents/comItem/comItemTop.vue new file mode 100644 index 000000000..3a1bafe5b --- /dev/null +++ b/fe/PDA/mycomponents/comItem/comItemTop.vue @@ -0,0 +1,58 @@ + + + + + + diff --git a/fe/PDA/mycomponents/comItem/comJobScanDetail.vue b/fe/PDA/mycomponents/comItem/comJobScanDetail.vue new file mode 100644 index 000000000..97d89a4c5 --- /dev/null +++ b/fe/PDA/mycomponents/comItem/comJobScanDetail.vue @@ -0,0 +1,493 @@ + + + + + + diff --git a/fe/PDA/mycomponents/comItem/comTopItem.vue b/fe/PDA/mycomponents/comItem/comTopItem.vue new file mode 100644 index 000000000..24b6295ad --- /dev/null +++ b/fe/PDA/mycomponents/comItem/comTopItem.vue @@ -0,0 +1,95 @@ + + + + + + diff --git a/fe/PDA/mycomponents/comjob/comJobScanDetail.vue b/fe/PDA/mycomponents/comjob/comJobScanDetail.vue new file mode 100644 index 000000000..4d53bd4c3 --- /dev/null +++ b/fe/PDA/mycomponents/comjob/comJobScanDetail.vue @@ -0,0 +1,75 @@ + + + + + + diff --git a/fe/PDA/mycomponents/comjob/comJobTopInfo.vue b/fe/PDA/mycomponents/comjob/comJobTopInfo.vue new file mode 100644 index 000000000..8995dbc9f --- /dev/null +++ b/fe/PDA/mycomponents/comjob/comJobTopInfo.vue @@ -0,0 +1,53 @@ + + + + + + diff --git a/fe/PDA/mycomponents/common/SemiCollapseItem.vue b/fe/PDA/mycomponents/common/SemiCollapseItem.vue new file mode 100644 index 000000000..f7b6a3767 --- /dev/null +++ b/fe/PDA/mycomponents/common/SemiCollapseItem.vue @@ -0,0 +1,399 @@ + + + + + diff --git a/fe/PDA/mycomponents/common/comBalance.vue b/fe/PDA/mycomponents/common/comBalance.vue new file mode 100644 index 000000000..b123cd8df --- /dev/null +++ b/fe/PDA/mycomponents/common/comBalance.vue @@ -0,0 +1,60 @@ + + + + + + diff --git a/fe/PDA/mycomponents/common/comBlankView.vue b/fe/PDA/mycomponents/common/comBlankView.vue new file mode 100644 index 000000000..e0072f985 --- /dev/null +++ b/fe/PDA/mycomponents/common/comBlankView.vue @@ -0,0 +1,31 @@ + + + + + + diff --git a/fe/PDA/mycomponents/common/comCollapseItem.vue b/fe/PDA/mycomponents/common/comCollapseItem.vue new file mode 100644 index 000000000..3638a61db --- /dev/null +++ b/fe/PDA/mycomponents/common/comCollapseItem.vue @@ -0,0 +1,399 @@ + + + + + diff --git a/fe/PDA/mycomponents/common/comDyItemInfo.vue b/fe/PDA/mycomponents/common/comDyItemInfo.vue new file mode 100644 index 000000000..af2565940 --- /dev/null +++ b/fe/PDA/mycomponents/common/comDyItemInfo.vue @@ -0,0 +1,28 @@ + + + + + + diff --git a/fe/PDA/mycomponents/common/comEasyInput.vue b/fe/PDA/mycomponents/common/comEasyInput.vue new file mode 100644 index 000000000..3237f3582 --- /dev/null +++ b/fe/PDA/mycomponents/common/comEasyInput.vue @@ -0,0 +1,98 @@ + + + + + + diff --git a/fe/PDA/mycomponents/common/comMessage.vue b/fe/PDA/mycomponents/common/comMessage.vue new file mode 100644 index 000000000..aa34d710c --- /dev/null +++ b/fe/PDA/mycomponents/common/comMessage.vue @@ -0,0 +1,194 @@ + + + + + + diff --git a/fe/PDA/mycomponents/common/comNumberBox.vue b/fe/PDA/mycomponents/common/comNumberBox.vue new file mode 100644 index 000000000..519427fc4 --- /dev/null +++ b/fe/PDA/mycomponents/common/comNumberBox.vue @@ -0,0 +1,232 @@ + + + diff --git a/fe/PDA/mycomponents/common/comStepsCustom.vue b/fe/PDA/mycomponents/common/comStepsCustom.vue new file mode 100644 index 000000000..2fe8221a6 --- /dev/null +++ b/fe/PDA/mycomponents/common/comStepsCustom.vue @@ -0,0 +1,277 @@ + + + + + + \ No newline at end of file diff --git a/fe/PDA/mycomponents/comreceipt.vue b/fe/PDA/mycomponents/comreceipt.vue new file mode 100644 index 000000000..5f1722a3f --- /dev/null +++ b/fe/PDA/mycomponents/comreceipt.vue @@ -0,0 +1,54 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/comProductItem.vue b/fe/PDA/mycomponents/coms/comProductItem.vue new file mode 100644 index 000000000..efb0589c8 --- /dev/null +++ b/fe/PDA/mycomponents/coms/comProductItem.vue @@ -0,0 +1,71 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/comTjDeliver.vue b/fe/PDA/mycomponents/coms/comTjDeliver.vue new file mode 100644 index 000000000..dd0acfbf5 --- /dev/null +++ b/fe/PDA/mycomponents/coms/comTjDeliver.vue @@ -0,0 +1,72 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/comTjProduct.vue b/fe/PDA/mycomponents/coms/comTjProduct.vue new file mode 100644 index 000000000..e0d48a231 --- /dev/null +++ b/fe/PDA/mycomponents/coms/comTjProduct.vue @@ -0,0 +1,44 @@ + + + + diff --git a/fe/PDA/mycomponents/coms/inventory/comHold.vue b/fe/PDA/mycomponents/coms/inventory/comHold.vue new file mode 100644 index 000000000..b7fae5ff0 --- /dev/null +++ b/fe/PDA/mycomponents/coms/inventory/comHold.vue @@ -0,0 +1,122 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/inventory/comUnissue.vue b/fe/PDA/mycomponents/coms/inventory/comUnissue.vue new file mode 100644 index 000000000..4a330b450 --- /dev/null +++ b/fe/PDA/mycomponents/coms/inventory/comUnissue.vue @@ -0,0 +1,116 @@ + + + + + diff --git a/fe/PDA/mycomponents/coms/query/comDetail.vue b/fe/PDA/mycomponents/coms/query/comDetail.vue new file mode 100644 index 000000000..bf6bf83ca --- /dev/null +++ b/fe/PDA/mycomponents/coms/query/comDetail.vue @@ -0,0 +1,65 @@ + + + + + + + diff --git a/fe/PDA/mycomponents/coms/query/comItem.vue b/fe/PDA/mycomponents/coms/query/comItem.vue new file mode 100644 index 000000000..1fd8db3a6 --- /dev/null +++ b/fe/PDA/mycomponents/coms/query/comItem.vue @@ -0,0 +1,52 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/query/comLocation.vue b/fe/PDA/mycomponents/coms/query/comLocation.vue new file mode 100644 index 000000000..8cd28dcf5 --- /dev/null +++ b/fe/PDA/mycomponents/coms/query/comLocation.vue @@ -0,0 +1,58 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/query/comOccupied.vue b/fe/PDA/mycomponents/coms/query/comOccupied.vue new file mode 100644 index 000000000..44587c873 --- /dev/null +++ b/fe/PDA/mycomponents/coms/query/comOccupied.vue @@ -0,0 +1,70 @@ + + + + + diff --git a/fe/PDA/mycomponents/coms/query/comSummary.vue b/fe/PDA/mycomponents/coms/query/comSummary.vue new file mode 100644 index 000000000..789485384 --- /dev/null +++ b/fe/PDA/mycomponents/coms/query/comSummary.vue @@ -0,0 +1,74 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/return/comProductionReturn.vue b/fe/PDA/mycomponents/coms/return/comProductionReturn.vue new file mode 100644 index 000000000..e51865dce --- /dev/null +++ b/fe/PDA/mycomponents/coms/return/comProductionReturn.vue @@ -0,0 +1,63 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/return/comReturn.vue b/fe/PDA/mycomponents/coms/return/comReturn.vue new file mode 100644 index 000000000..321ac3479 --- /dev/null +++ b/fe/PDA/mycomponents/coms/return/comReturn.vue @@ -0,0 +1,64 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/return/comReturnDetail.vue b/fe/PDA/mycomponents/coms/return/comReturnDetail.vue new file mode 100644 index 000000000..71fe0b4d2 --- /dev/null +++ b/fe/PDA/mycomponents/coms/return/comReturnDetail.vue @@ -0,0 +1,130 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/return/comScanReturn.vue b/fe/PDA/mycomponents/coms/return/comScanReturn.vue new file mode 100644 index 000000000..6f3bbca90 --- /dev/null +++ b/fe/PDA/mycomponents/coms/return/comScanReturn.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/fe/PDA/mycomponents/coms/store/comDeliverFg.vue b/fe/PDA/mycomponents/coms/store/comDeliverFg.vue new file mode 100644 index 000000000..6ff2a34df --- /dev/null +++ b/fe/PDA/mycomponents/coms/store/comDeliverFg.vue @@ -0,0 +1,111 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/store/comDeliverTf.vue b/fe/PDA/mycomponents/coms/store/comDeliverTf.vue new file mode 100644 index 000000000..d150f50d5 --- /dev/null +++ b/fe/PDA/mycomponents/coms/store/comDeliverTf.vue @@ -0,0 +1,109 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/store/comReceipt.vue b/fe/PDA/mycomponents/coms/store/comReceipt.vue new file mode 100644 index 000000000..2db7bff38 --- /dev/null +++ b/fe/PDA/mycomponents/coms/store/comReceipt.vue @@ -0,0 +1,57 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/store/comTjRecycle.vue b/fe/PDA/mycomponents/coms/store/comTjRecycle.vue new file mode 100644 index 000000000..e3f82a40b --- /dev/null +++ b/fe/PDA/mycomponents/coms/store/comTjRecycle.vue @@ -0,0 +1,70 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/task/comCalc.vue b/fe/PDA/mycomponents/coms/task/comCalc.vue new file mode 100644 index 000000000..106bce59e --- /dev/null +++ b/fe/PDA/mycomponents/coms/task/comCalc.vue @@ -0,0 +1,65 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/task/comCount.vue b/fe/PDA/mycomponents/coms/task/comCount.vue new file mode 100644 index 000000000..9a85b80f9 --- /dev/null +++ b/fe/PDA/mycomponents/coms/task/comCount.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/fe/PDA/mycomponents/coms/task/comCountItems.vue b/fe/PDA/mycomponents/coms/task/comCountItems.vue new file mode 100644 index 000000000..d9422db2b --- /dev/null +++ b/fe/PDA/mycomponents/coms/task/comCountItems.vue @@ -0,0 +1,45 @@ + + + + + diff --git a/fe/PDA/mycomponents/coms/task/comCountScanDetail.vue b/fe/PDA/mycomponents/coms/task/comCountScanDetail.vue new file mode 100644 index 000000000..376fd3bf6 --- /dev/null +++ b/fe/PDA/mycomponents/coms/task/comCountScanDetail.vue @@ -0,0 +1,90 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/task/comDeliver.vue b/fe/PDA/mycomponents/coms/task/comDeliver.vue new file mode 100644 index 000000000..365143003 --- /dev/null +++ b/fe/PDA/mycomponents/coms/task/comDeliver.vue @@ -0,0 +1,68 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/task/comInspect.vue b/fe/PDA/mycomponents/coms/task/comInspect.vue new file mode 100644 index 000000000..f663ac0f8 --- /dev/null +++ b/fe/PDA/mycomponents/coms/task/comInspect.vue @@ -0,0 +1,92 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/task/comIssue.vue b/fe/PDA/mycomponents/coms/task/comIssue.vue new file mode 100644 index 000000000..b3a4a5082 --- /dev/null +++ b/fe/PDA/mycomponents/coms/task/comIssue.vue @@ -0,0 +1,84 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/task/comMerge.vue b/fe/PDA/mycomponents/coms/task/comMerge.vue new file mode 100644 index 000000000..4b60e4af0 --- /dev/null +++ b/fe/PDA/mycomponents/coms/task/comMerge.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/fe/PDA/mycomponents/coms/task/comPutaway.vue b/fe/PDA/mycomponents/coms/task/comPutaway.vue new file mode 100644 index 000000000..a2616677b --- /dev/null +++ b/fe/PDA/mycomponents/coms/task/comPutaway.vue @@ -0,0 +1,98 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/task/comPutawayjob.vue b/fe/PDA/mycomponents/coms/task/comPutawayjob.vue new file mode 100644 index 000000000..57fba64b4 --- /dev/null +++ b/fe/PDA/mycomponents/coms/task/comPutawayjob.vue @@ -0,0 +1,87 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/task/comReceipt.vue b/fe/PDA/mycomponents/coms/task/comReceipt.vue new file mode 100644 index 000000000..9f88e69c0 --- /dev/null +++ b/fe/PDA/mycomponents/coms/task/comReceipt.vue @@ -0,0 +1,72 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/task/comReceiptDetail.vue b/fe/PDA/mycomponents/coms/task/comReceiptDetail.vue new file mode 100644 index 000000000..38457fb85 --- /dev/null +++ b/fe/PDA/mycomponents/coms/task/comReceiptDetail.vue @@ -0,0 +1,169 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/task/comReplen.vue b/fe/PDA/mycomponents/coms/task/comReplen.vue new file mode 100644 index 000000000..9c5bd0498 --- /dev/null +++ b/fe/PDA/mycomponents/coms/task/comReplen.vue @@ -0,0 +1,50 @@ + + + + + + diff --git a/fe/PDA/mycomponents/coms/task/comScanPutaway.vue b/fe/PDA/mycomponents/coms/task/comScanPutaway.vue new file mode 100644 index 000000000..906b268ba --- /dev/null +++ b/fe/PDA/mycomponents/coms/task/comScanPutaway.vue @@ -0,0 +1,289 @@ + + + + + diff --git a/fe/PDA/mycomponents/coms/task/comTjDeliver.vue b/fe/PDA/mycomponents/coms/task/comTjDeliver.vue new file mode 100644 index 000000000..f5d48c308 --- /dev/null +++ b/fe/PDA/mycomponents/coms/task/comTjDeliver.vue @@ -0,0 +1,72 @@ + + + + + + diff --git a/fe/PDA/mycomponents/dycom/dyItemInfo.vue b/fe/PDA/mycomponents/dycom/dyItemInfo.vue new file mode 100644 index 000000000..8ca68a560 --- /dev/null +++ b/fe/PDA/mycomponents/dycom/dyItemInfo.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/fe/PDA/mycomponents/receipt/comScanReceipt.vue b/fe/PDA/mycomponents/receipt/comScanReceipt.vue new file mode 100644 index 000000000..aab5e979f --- /dev/null +++ b/fe/PDA/mycomponents/receipt/comScanReceipt.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/fe/PDA/mycomponents/receipt/receipt_detal.vue b/fe/PDA/mycomponents/receipt/receipt_detal.vue new file mode 100644 index 000000000..f4f5f4e4d --- /dev/null +++ b/fe/PDA/mycomponents/receipt/receipt_detal.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/fe/PDA/mycomponents/receipt/receipt_detal_A.vue b/fe/PDA/mycomponents/receipt/receipt_detal_A.vue new file mode 100644 index 000000000..df504b009 --- /dev/null +++ b/fe/PDA/mycomponents/receipt/receipt_detal_A.vue @@ -0,0 +1,69 @@ + + + + + \ No newline at end of file diff --git a/fe/PDA/mycomponents/receipt/receipt_detal_B.vue b/fe/PDA/mycomponents/receipt/receipt_detal_B.vue new file mode 100644 index 000000000..fd5a33150 --- /dev/null +++ b/fe/PDA/mycomponents/receipt/receipt_detal_B.vue @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/fe/PDA/mycomponents/receipt/receipt_detal_C.vue b/fe/PDA/mycomponents/receipt/receipt_detal_C.vue new file mode 100644 index 000000000..cc4dc2a1e --- /dev/null +++ b/fe/PDA/mycomponents/receipt/receipt_detal_C.vue @@ -0,0 +1,11 @@ + + + + + \ No newline at end of file diff --git a/fe/PDA/mycomponents/return/comProductionReturn.vue b/fe/PDA/mycomponents/return/comProductionReturn.vue new file mode 100644 index 000000000..303629eb7 --- /dev/null +++ b/fe/PDA/mycomponents/return/comProductionReturn.vue @@ -0,0 +1,63 @@ + + + + + + diff --git a/fe/PDA/mycomponents/return/comReturn.vue b/fe/PDA/mycomponents/return/comReturn.vue new file mode 100644 index 000000000..e9c96b9f8 --- /dev/null +++ b/fe/PDA/mycomponents/return/comReturn.vue @@ -0,0 +1,65 @@ + + + + + + diff --git a/fe/PDA/mycomponents/return/comReturnDetail.vue b/fe/PDA/mycomponents/return/comReturnDetail.vue new file mode 100644 index 000000000..71fe0b4d2 --- /dev/null +++ b/fe/PDA/mycomponents/return/comReturnDetail.vue @@ -0,0 +1,130 @@ + + + + + + diff --git a/fe/PDA/mycomponents/return/comScanReturn.vue b/fe/PDA/mycomponents/return/comScanReturn.vue new file mode 100644 index 000000000..6f3bbca90 --- /dev/null +++ b/fe/PDA/mycomponents/return/comScanReturn.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/fe/PDA/mycomponents/scan/comDyScan.vue b/fe/PDA/mycomponents/scan/comDyScan.vue new file mode 100644 index 000000000..3264d08f4 --- /dev/null +++ b/fe/PDA/mycomponents/scan/comDyScan.vue @@ -0,0 +1,104 @@ + + + + + diff --git a/fe/PDA/mycomponents/scan/comScanCreateTp.vue b/fe/PDA/mycomponents/scan/comScanCreateTp.vue new file mode 100644 index 000000000..e9ed5ddab --- /dev/null +++ b/fe/PDA/mycomponents/scan/comScanCreateTp.vue @@ -0,0 +1,309 @@ + + + + + + diff --git a/fe/PDA/mycomponents/scan/comScanDeliverFg.vue b/fe/PDA/mycomponents/scan/comScanDeliverFg.vue new file mode 100644 index 000000000..6a502dd1e --- /dev/null +++ b/fe/PDA/mycomponents/scan/comScanDeliverFg.vue @@ -0,0 +1,319 @@ + + + + + diff --git a/fe/PDA/mycomponents/scan/comScanDeliverTf.vue b/fe/PDA/mycomponents/scan/comScanDeliverTf.vue new file mode 100644 index 000000000..04fb73103 --- /dev/null +++ b/fe/PDA/mycomponents/scan/comScanDeliverTf.vue @@ -0,0 +1,325 @@ + + + + + diff --git a/fe/PDA/mycomponents/scan/comScanHold.vue b/fe/PDA/mycomponents/scan/comScanHold.vue new file mode 100644 index 000000000..40374e7a7 --- /dev/null +++ b/fe/PDA/mycomponents/scan/comScanHold.vue @@ -0,0 +1,299 @@ + + + + + diff --git a/fe/PDA/mycomponents/scan/comScanIssueList.vue b/fe/PDA/mycomponents/scan/comScanIssueList.vue new file mode 100644 index 000000000..72b60ce73 --- /dev/null +++ b/fe/PDA/mycomponents/scan/comScanIssueList.vue @@ -0,0 +1,45 @@ + + + + + diff --git a/fe/PDA/mycomponents/scan/comScanPutaway.vue b/fe/PDA/mycomponents/scan/comScanPutaway.vue new file mode 100644 index 000000000..064083665 --- /dev/null +++ b/fe/PDA/mycomponents/scan/comScanPutaway.vue @@ -0,0 +1,282 @@ + + + + + diff --git a/fe/PDA/mycomponents/scan/comScanReceiptList.vue b/fe/PDA/mycomponents/scan/comScanReceiptList.vue new file mode 100644 index 000000000..df2dc94cd --- /dev/null +++ b/fe/PDA/mycomponents/scan/comScanReceiptList.vue @@ -0,0 +1,43 @@ + + + + + \ No newline at end of file diff --git a/fe/PDA/mycomponents/scan/comScanReplen.vue b/fe/PDA/mycomponents/scan/comScanReplen.vue new file mode 100644 index 000000000..4defbfffa --- /dev/null +++ b/fe/PDA/mycomponents/scan/comScanReplen.vue @@ -0,0 +1,297 @@ + + + + + diff --git a/fe/PDA/mycomponents/scan/comScanSemiPutaway.vue b/fe/PDA/mycomponents/scan/comScanSemiPutaway.vue new file mode 100644 index 000000000..3c7bac777 --- /dev/null +++ b/fe/PDA/mycomponents/scan/comScanSemiPutaway.vue @@ -0,0 +1,366 @@ + + + + + + diff --git a/fe/PDA/mycomponents/scan/comScanTjReceipt.vue b/fe/PDA/mycomponents/scan/comScanTjReceipt.vue new file mode 100644 index 000000000..8acaf12f1 --- /dev/null +++ b/fe/PDA/mycomponents/scan/comScanTjReceipt.vue @@ -0,0 +1,311 @@ + + + + + diff --git a/fe/PDA/mycomponents/scan/comScanUnReceipt.vue b/fe/PDA/mycomponents/scan/comScanUnReceipt.vue new file mode 100644 index 000000000..6eefbe8af --- /dev/null +++ b/fe/PDA/mycomponents/scan/comScanUnReceipt.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/fe/PDA/mycomponents/scan/comScanUnpick.vue b/fe/PDA/mycomponents/scan/comScanUnpick.vue new file mode 100644 index 000000000..311a57b15 --- /dev/null +++ b/fe/PDA/mycomponents/scan/comScanUnpick.vue @@ -0,0 +1,220 @@ + + + + + + diff --git a/fe/PDA/mycomponents/scan/comscan.vue b/fe/PDA/mycomponents/scan/comscan.vue new file mode 100644 index 000000000..fbb4adc04 --- /dev/null +++ b/fe/PDA/mycomponents/scan/comscan.vue @@ -0,0 +1,117 @@ + + + + diff --git a/fe/PDA/mycomponents/transfer/comTransferReceipt.vue b/fe/PDA/mycomponents/transfer/comTransferReceipt.vue new file mode 100644 index 000000000..91ab3a74b --- /dev/null +++ b/fe/PDA/mycomponents/transfer/comTransferReceipt.vue @@ -0,0 +1,62 @@ + + + + + + diff --git a/fe/PDA/mycomponents/uploadCamera.vue b/fe/PDA/mycomponents/uploadCamera.vue new file mode 100644 index 000000000..b1f0857f3 --- /dev/null +++ b/fe/PDA/mycomponents/uploadCamera.vue @@ -0,0 +1,120 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/WinScanTjMes.vue b/fe/PDA/mycomponents/wincom/WinScanTjMes.vue new file mode 100644 index 000000000..daaecb2ce --- /dev/null +++ b/fe/PDA/mycomponents/wincom/WinScanTjMes.vue @@ -0,0 +1,107 @@ + + + + diff --git a/fe/PDA/mycomponents/wincom/basicCom/winBalance.vue b/fe/PDA/mycomponents/wincom/basicCom/winBalance.vue new file mode 100644 index 000000000..0e9e646b3 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/basicCom/winBalance.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/basicCom/winBalance1.vue b/fe/PDA/mycomponents/wincom/basicCom/winBalance1.vue new file mode 100644 index 000000000..354059eca --- /dev/null +++ b/fe/PDA/mycomponents/wincom/basicCom/winBalance1.vue @@ -0,0 +1,101 @@ + + + + + + + diff --git a/fe/PDA/mycomponents/wincom/basicCom/winBalance2.vue b/fe/PDA/mycomponents/wincom/basicCom/winBalance2.vue new file mode 100644 index 000000000..0e9e646b3 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/basicCom/winBalance2.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/basicCom/winBalance3.vue b/fe/PDA/mycomponents/wincom/basicCom/winBalance3.vue new file mode 100644 index 000000000..0e9e646b3 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/basicCom/winBalance3.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/basicCom/winBalance4.vue b/fe/PDA/mycomponents/wincom/basicCom/winBalance4.vue new file mode 100644 index 000000000..0e9e646b3 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/basicCom/winBalance4.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/basicCom/winBalance5.vue b/fe/PDA/mycomponents/wincom/basicCom/winBalance5.vue new file mode 100644 index 000000000..0e9e646b3 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/basicCom/winBalance5.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/basicCom/winBalanceLabel.vue b/fe/PDA/mycomponents/wincom/basicCom/winBalanceLabel.vue new file mode 100644 index 000000000..02409e35d --- /dev/null +++ b/fe/PDA/mycomponents/wincom/basicCom/winBalanceLabel.vue @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/fe/PDA/mycomponents/wincom/basicCom/winCollapseItem.vue b/fe/PDA/mycomponents/wincom/basicCom/winCollapseItem.vue new file mode 100644 index 000000000..8294fea98 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/basicCom/winCollapseItem.vue @@ -0,0 +1,399 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/basicCom/winHint.vue b/fe/PDA/mycomponents/wincom/basicCom/winHint.vue new file mode 100644 index 000000000..e9945cb3c --- /dev/null +++ b/fe/PDA/mycomponents/wincom/basicCom/winHint.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/fe/PDA/mycomponents/wincom/basicCom/winJobDetailCompare.vue b/fe/PDA/mycomponents/wincom/basicCom/winJobDetailCompare.vue new file mode 100644 index 000000000..36db7613c --- /dev/null +++ b/fe/PDA/mycomponents/wincom/basicCom/winJobDetailCompare.vue @@ -0,0 +1,124 @@ + + + + diff --git a/fe/PDA/mycomponents/wincom/basicCom/winJobScanCount.vue b/fe/PDA/mycomponents/wincom/basicCom/winJobScanCount.vue new file mode 100644 index 000000000..d47eb4497 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/basicCom/winJobScanCount.vue @@ -0,0 +1,50 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/basicCom/winLabel.vue b/fe/PDA/mycomponents/wincom/basicCom/winLabel.vue new file mode 100644 index 000000000..28377b050 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/basicCom/winLabel.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/modelCom/receiptCountEdit.vue b/fe/PDA/mycomponents/wincom/modelCom/receiptCountEdit.vue new file mode 100644 index 000000000..fec2ebab7 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/modelCom/receiptCountEdit.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/modelCom/receiptEdit.vue b/fe/PDA/mycomponents/wincom/modelCom/receiptEdit.vue new file mode 100644 index 000000000..405bc846c --- /dev/null +++ b/fe/PDA/mycomponents/wincom/modelCom/receiptEdit.vue @@ -0,0 +1,116 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/modelCom/receiptHandle.vue b/fe/PDA/mycomponents/wincom/modelCom/receiptHandle.vue new file mode 100644 index 000000000..1b6ebcb41 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/modelCom/receiptHandle.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/modelCom/receiptRecommend.vue b/fe/PDA/mycomponents/wincom/modelCom/receiptRecommend.vue new file mode 100644 index 000000000..c830bd294 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/modelCom/receiptRecommend.vue @@ -0,0 +1,92 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/scanCom/winComScan.vue b/fe/PDA/mycomponents/wincom/scanCom/winComScan.vue new file mode 100644 index 000000000..74ec2c587 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/scanCom/winComScan.vue @@ -0,0 +1,132 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/scanCom/winScanButton.vue b/fe/PDA/mycomponents/wincom/scanCom/winScanButton.vue new file mode 100644 index 000000000..28807a3af --- /dev/null +++ b/fe/PDA/mycomponents/wincom/scanCom/winScanButton.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/scanCom/winScanLocation.vue b/fe/PDA/mycomponents/wincom/scanCom/winScanLocation.vue new file mode 100644 index 000000000..eda8269b5 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/scanCom/winScanLocation.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/scanCom/winScanPack.vue b/fe/PDA/mycomponents/wincom/scanCom/winScanPack.vue new file mode 100644 index 000000000..da97ec44f --- /dev/null +++ b/fe/PDA/mycomponents/wincom/scanCom/winScanPack.vue @@ -0,0 +1,199 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/unitCom/winContainerCode.vue b/fe/PDA/mycomponents/wincom/unitCom/winContainerCode.vue new file mode 100644 index 000000000..0fed4c15a --- /dev/null +++ b/fe/PDA/mycomponents/wincom/unitCom/winContainerCode.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/unitCom/winFilter.vue b/fe/PDA/mycomponents/wincom/unitCom/winFilter.vue new file mode 100644 index 000000000..f431e3a71 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/unitCom/winFilter.vue @@ -0,0 +1,31 @@ + + + + diff --git a/fe/PDA/mycomponents/wincom/unitCom/winInventoryStatus.vue b/fe/PDA/mycomponents/wincom/unitCom/winInventoryStatus.vue new file mode 100644 index 000000000..cd1f82986 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/unitCom/winInventoryStatus.vue @@ -0,0 +1,149 @@ + + + + + + + + diff --git a/fe/PDA/mycomponents/wincom/unitCom/winItemBasicInfo.vue b/fe/PDA/mycomponents/wincom/unitCom/winItemBasicInfo.vue new file mode 100644 index 000000000..dc6a01533 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/unitCom/winItemBasicInfo.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/unitCom/winItemDetailInfo.vue b/fe/PDA/mycomponents/wincom/unitCom/winItemDetailInfo.vue new file mode 100644 index 000000000..054cd85ba --- /dev/null +++ b/fe/PDA/mycomponents/wincom/unitCom/winItemDetailInfo.vue @@ -0,0 +1,74 @@ + + + + diff --git a/fe/PDA/mycomponents/wincom/unitCom/winItemInfo.vue b/fe/PDA/mycomponents/wincom/unitCom/winItemInfo.vue new file mode 100644 index 000000000..d930a0023 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/unitCom/winItemInfo.vue @@ -0,0 +1,40 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/unitCom/winJobCreation.vue b/fe/PDA/mycomponents/wincom/unitCom/winJobCreation.vue new file mode 100644 index 000000000..9a195e4cf --- /dev/null +++ b/fe/PDA/mycomponents/wincom/unitCom/winJobCreation.vue @@ -0,0 +1,24 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/unitCom/winJobNumber.vue b/fe/PDA/mycomponents/wincom/unitCom/winJobNumber.vue new file mode 100644 index 000000000..156b07198 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/unitCom/winJobNumber.vue @@ -0,0 +1,82 @@ + + + + + + +// + + diff --git a/fe/PDA/mycomponents/wincom/unitCom/winJobNumberDetailInfo.vue b/fe/PDA/mycomponents/wincom/unitCom/winJobNumberDetailInfo.vue new file mode 100644 index 000000000..b7b021aa5 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/unitCom/winJobNumberDetailInfo.vue @@ -0,0 +1,81 @@ + + + + diff --git a/fe/PDA/mycomponents/wincom/unitCom/winJobRecommend.vue b/fe/PDA/mycomponents/wincom/unitCom/winJobRecommend.vue new file mode 100644 index 000000000..b9485e40b --- /dev/null +++ b/fe/PDA/mycomponents/wincom/unitCom/winJobRecommend.vue @@ -0,0 +1,40 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/unitCom/winJobScanDetail.vue b/fe/PDA/mycomponents/wincom/unitCom/winJobScanDetail.vue new file mode 100644 index 000000000..02409e35d --- /dev/null +++ b/fe/PDA/mycomponents/wincom/unitCom/winJobScanDetail.vue @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/fe/PDA/mycomponents/wincom/unitCom/winLocationCode.vue b/fe/PDA/mycomponents/wincom/unitCom/winLocationCode.vue new file mode 100644 index 000000000..c19a93751 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/unitCom/winLocationCode.vue @@ -0,0 +1,106 @@ + + + + + + + +// + + diff --git a/fe/PDA/mycomponents/wincom/unitCom/winLocationDetail.vue b/fe/PDA/mycomponents/wincom/unitCom/winLocationDetail.vue new file mode 100644 index 000000000..a0461929a --- /dev/null +++ b/fe/PDA/mycomponents/wincom/unitCom/winLocationDetail.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/unitCom/winLocationInfo.vue b/fe/PDA/mycomponents/wincom/unitCom/winLocationInfo.vue new file mode 100644 index 000000000..c06f44ae9 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/unitCom/winLocationInfo.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/unitCom/winLot.vue b/fe/PDA/mycomponents/wincom/unitCom/winLot.vue new file mode 100644 index 000000000..ddd83338b --- /dev/null +++ b/fe/PDA/mycomponents/wincom/unitCom/winLot.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/unitCom/winPackingCode.vue b/fe/PDA/mycomponents/wincom/unitCom/winPackingCode.vue new file mode 100644 index 000000000..cfb23e6b4 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/unitCom/winPackingCode.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/unitCom/winQty.vue b/fe/PDA/mycomponents/wincom/unitCom/winQty.vue new file mode 100644 index 000000000..327692fc6 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/unitCom/winQty.vue @@ -0,0 +1,56 @@ + + + + + + diff --git a/fe/PDA/mycomponents/wincom/unitCom/winQtyEdit.vue b/fe/PDA/mycomponents/wincom/unitCom/winQtyEdit.vue new file mode 100644 index 000000000..7b71337e6 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/unitCom/winQtyEdit.vue @@ -0,0 +1,95 @@ + + + + diff --git a/fe/PDA/mycomponents/wincom/unitCom/winRecommendSimple.vue b/fe/PDA/mycomponents/wincom/unitCom/winRecommendSimple.vue new file mode 100644 index 000000000..d8dfe6753 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/unitCom/winRecommendSimple.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/unitCom/winSupplierInfo.vue b/fe/PDA/mycomponents/wincom/unitCom/winSupplierInfo.vue new file mode 100644 index 000000000..2a01a8e25 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/unitCom/winSupplierInfo.vue @@ -0,0 +1,90 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/winBlankView.vue b/fe/PDA/mycomponents/wincom/winBlankView.vue new file mode 100644 index 000000000..5fdd3362f --- /dev/null +++ b/fe/PDA/mycomponents/wincom/winBlankView.vue @@ -0,0 +1,31 @@ + + + + + + diff --git a/fe/PDA/mycomponents/wincom/winCollapseLocation.vue b/fe/PDA/mycomponents/wincom/winCollapseLocation.vue new file mode 100644 index 000000000..7d6831373 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/winCollapseLocation.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/winComScan.vue b/fe/PDA/mycomponents/wincom/winComScan.vue new file mode 100644 index 000000000..c212ccf53 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/winComScan.vue @@ -0,0 +1,138 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/winComScanProduct.vue b/fe/PDA/mycomponents/wincom/winComScanProduct.vue new file mode 100644 index 000000000..629170e40 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/winComScanProduct.vue @@ -0,0 +1,109 @@ + + + + diff --git a/fe/PDA/mycomponents/wincom/winEmptyView.vue b/fe/PDA/mycomponents/wincom/winEmptyView.vue new file mode 100644 index 000000000..791804c0d --- /dev/null +++ b/fe/PDA/mycomponents/wincom/winEmptyView.vue @@ -0,0 +1,25 @@ + + + + + + diff --git a/fe/PDA/mycomponents/wincom/winInventoryStatues.vue b/fe/PDA/mycomponents/wincom/winInventoryStatues.vue new file mode 100644 index 000000000..5a17d2c31 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/winInventoryStatues.vue @@ -0,0 +1,98 @@ + + + + + + diff --git a/fe/PDA/mycomponents/wincom/winInventoryStatus.vue b/fe/PDA/mycomponents/wincom/winInventoryStatus.vue new file mode 100644 index 000000000..ad5dddca0 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/winInventoryStatus.vue @@ -0,0 +1,106 @@ + + + + + + diff --git a/fe/PDA/mycomponents/wincom/winMulitScan.vue b/fe/PDA/mycomponents/wincom/winMulitScan.vue new file mode 100644 index 000000000..8a3f6c85b --- /dev/null +++ b/fe/PDA/mycomponents/wincom/winMulitScan.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/winScanByCode.vue b/fe/PDA/mycomponents/wincom/winScanByCode.vue new file mode 100644 index 000000000..a822953af --- /dev/null +++ b/fe/PDA/mycomponents/wincom/winScanByCode.vue @@ -0,0 +1,87 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/winScanByPack.vue b/fe/PDA/mycomponents/wincom/winScanByPack.vue new file mode 100644 index 000000000..e90ac29a4 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/winScanByPack.vue @@ -0,0 +1,153 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/winScanByProduct.vue b/fe/PDA/mycomponents/wincom/winScanByProduct.vue new file mode 100644 index 000000000..8f5a0e48c --- /dev/null +++ b/fe/PDA/mycomponents/wincom/winScanByProduct.vue @@ -0,0 +1,74 @@ + + + + diff --git a/fe/PDA/mycomponents/wincom/winScanLocationCode.vue b/fe/PDA/mycomponents/wincom/winScanLocationCode.vue new file mode 100644 index 000000000..ad8330674 --- /dev/null +++ b/fe/PDA/mycomponents/wincom/winScanLocationCode.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/fe/PDA/mycomponents/wincom/winTaskDetail.vue b/fe/PDA/mycomponents/wincom/winTaskDetail.vue new file mode 100644 index 000000000..4457b227b --- /dev/null +++ b/fe/PDA/mycomponents/wincom/winTaskDetail.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/fe/PDA/package-lock.json b/fe/PDA/package-lock.json new file mode 100644 index 000000000..0dcb77e48 --- /dev/null +++ b/fe/PDA/package-lock.json @@ -0,0 +1,180 @@ +{ + "name": "hello-uniapp", + "version": "3.4.4", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "hello-uniapp", + "version": "3.4.4", + "license": "MIT", + "dependencies": { + "axios": "^1.3.4", + "jwt-decode": "^3.1.2" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/axios": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", + "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", + "dependencies": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jwt-decode": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz", + "integrity": "sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==" + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + } + }, + "dependencies": { + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "axios": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz", + "integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==", + "requires": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, + "follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "jwt-decode": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz", + "integrity": "sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==" + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + } + } +} diff --git a/fe/PDA/package.json b/fe/PDA/package.json new file mode 100644 index 000000000..34fe846a9 --- /dev/null +++ b/fe/PDA/package.json @@ -0,0 +1,108 @@ +{ + "id": "hello-uniapp", + "name": "hello-uniapp", + "displayName": "hello-uniapp 示例工程", + "version": "3.4.4", + "description": "uni-app 框架示例,一套代码,同时发行到iOS、Android、H5、小程序等多个平台,请使用手机扫码快速体验 uni-app 的强大功能", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": "https://github.com/dcloudio/hello-uniapp.git", + "keywords": [ + "hello-uniapp", + "uni-app", + "uni-ui", + "示例工程" + ], + "author": "", + "license": "MIT", + "bugs": { + "url": "https://github.com/dcloudio/hello-uniapp/issues" + }, + "homepage": "https://github.com/dcloudio/hello-uniapp#readme", + "dependencies": { + "axios": "^1.3.4", + "jwt-decode": "^3.1.2" + }, + "dcloudext": { + "category": [ + "前端页面模板", + "uni-app前端项目模板" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "" + }, + "uni_modules": { + "dependencies": [], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y", + "京东": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + }, + "uni-app": { + "scripts": { + "mp-dingtalk": { + "title": "钉钉小程序", + "env": { + "UNI_PLATFORM": "mp-alipay" + }, + "define": { + "MP-DINGTALK": true + } + } + } + } +} diff --git a/fe/PDA/pages.json b/fe/PDA/pages.json new file mode 100644 index 000000000..022b99358 --- /dev/null +++ b/fe/PDA/pages.json @@ -0,0 +1,312 @@ +{ + + "pages": [{ + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "WMS仓库管理系统-移动端", + "titleNView": { + "autoBackButton": "true", + "buttons": [{}] + } + } + }, + { + "path": "pages/login/index", + "style": { + "navigationBarTitleText": "登录", + "titleNView": { + "autoBackButton": "true", + "buttons": [{}] + } + } + }, + { + "path": "pages/setter/index", + "style": { + "navigationBarTitleText": "个人资料", + "enablePullDownRefresh": true + + } + + }, { + "path": "pages/setter/passwordpage", + "style": { + "navigationBarTitleText": "修改密码", + "enablePullDownRefresh": true + } + }, + { + "path": "pages/setter/setterDetail", + "style": { + "navigationBarTitleText": "参数设置详情", + "enablePullDownRefresh": true + } + + }, + { + "path": "pages/message/index", + "style": { + "navigationBarTitleText": "消息", + "enablePullDownRefresh": true + } + + }, + { + "path": "pages/message/details", + "style": { + "navigationBarTitleText": "消息详情", + "enablePullDownRefresh": true + } + + }, + { + "path": "pages/demo/demo", + "style": { + "navigationBarTitleText": "组件", + "enablePullDownRefresh": true + } + }, + { + "path": "pages/putaway/purchasePutaway", + "style": { + "navigationBarTitleText": "采购上架", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/task/receipt", + "style": { + "navigationBarTitleText": "采购收货", + "enablePullDownRefresh": true, + "titleNView": { + "autoBackButton": "true", + "buttons": [{ + "float": "right", + "text": "\ue7c6", + "fontSrc": "/static/icon/iconfont.ttf", + "fontSize": "22px" + }, + // 右边按钮 + { + "float": "right", + "text": "过滤", + "fontSrc": "/static/icon/iconfont.ttf", + "fontSize": "15px" + } + ] + } + } + }, + { + "path": "pages/task/receipt_detail", + "style": { + "navigationBarTitleText": "收货任务详情", + "enablePullDownRefresh": true + } + }, + { + "path": "pages/return/returnBeforPutaway", + "style": { + "navigationBarTitleText": "上架前退货", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/return/purchaseReturn", + "style": { + "navigationBarTitleText": "上架后退货", + "enablePullDownRefresh": true + } + }, + { + "path": "pages/return/purchaseReturn_detail", + "style": { + "navigationBarTitleText": "退货任务详情", + "enablePullDownRefresh": true + } + }, + { + "path": "pages/inventory/scrap", + "style": { + "navigationBarTitleText": "原料报废", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/store/deliverRaw", + "style": { + "navigationBarTitleText": "原料直发", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/task/issueByFIFO", + "style": { + "navigationBarTitleText": "发料", + "enablePullDownRefresh": true + } + }, + { + "path": "pages/task/issue_detail", + "style": { + "navigationBarTitleText": "发料任务详情", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/store/issueDirect", + "style": { + "navigationBarTitleText": "直接发料", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/query/item", + "style": { + "enablePullDownRefresh": true, // 是否配置下拉刷新的功能 + "navigationBarTitleText": "按零件查询库存", + "titleNView": { + "autoBackButton": "true", + "buttons": [{}] + } + } + }, + { + "path": "pages/query/location", + "style": { + "navigationBarTitleText": "按库位查询库存", + "enablePullDownRefresh": true, + "titleNView": { + "autoBackButton": "true", + "buttons": [{}] + } + } + }, + { + "path": "pages/inventory/transferByLocation", + "style": { + "navigationBarTitleText": "储位内移库", + "enablePullDownRefresh": true + } + }, + { + "path": "pages/inventory/transferDiffLocation", + "style": { + "navigationBarTitleText": "储位调拨", + "enablePullDownRefresh": true + } + }, + { + "path": "pages/task/count", + "style": { + "navigationBarTitleText": "盘点任务", + "enablePullDownRefresh": true + } + }, + { + "path": "pages/task/count_detail", + "style": { + "navigationBarTitleText": "盘点任务详情", + "enablePullDownRefresh": true + } + }, + { + "path": "pages/return/returnToWarehouse", + "style": { + "navigationBarTitleText": "直接退库", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/return/productionReturn", + "style": { + "navigationBarTitleText": "生产退库", + "enablePullDownRefresh": true + } + }, + { + "path": "pages/return/productionReturn_detail", + "style": { + "navigationBarTitleText": "生产退库详情", + "enablePullDownRefresh": true + } + }, + { + "path": "pages/putaway/rapReceipt", + "style": { + "navigationBarTitleText": "回收料收货", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/putaway/semiPutaway", + "style": { + "navigationBarTitleText": "半成品上架", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/task/deliver", + "style": { + "navigationBarTitleText": "发货任务", + "enablePullDownRefresh": true + } + }, + { + "path": "pages/task/deliver_detail", + "style": { + "navigationBarTitleText": "发货任务详情", + "enablePullDownRefresh": true + } + } + + ], + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "WMS仓库管理系统-移动端", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8", + "h5": { + "maxWidth": 1190, + "navigationBarTextStyle": "black", + "navigationBarBackgroundColor": "#F1F1F1" + }, + //增加返回首页 + "titleNView": { + "autoBackButton": "true", + "buttons": [{ + "float": "right", + "text": "\ue7c6", + "fontSrc": "/static/icon/iconfont.ttf", + "fontSize": "22px" + } + ] + }, + "softinputMode": "adjustPan" //adjustResize + }, + "tabBar": { + "color": "#7A7E83", + "selectedColor": "#2678f2", + "borderStyle": "black", + "backgroundColor": "#ffffff", + "list": [ + { + "pagePath": "pages/index/index", + "iconPath": "static/bar/sy.png", + "selectedIconPath": "static/bar/sya.png", + "text": "首页" + }, + { + "pagePath": "pages/message/index", + "iconPath": "static/bar/xx.png", + "selectedIconPath": "static/bar/xxa.png", + "text": "消息" + }, { + "pagePath": "pages/setter/index", + "iconPath": "static/bar/sz.png", + "selectedIconPath": "static/bar/sza.png", + "text": "设置" + } + ] + } +} diff --git a/fe/PDA/pages/API/action-sheet/action-sheet.vue b/fe/PDA/pages/API/action-sheet/action-sheet.vue new file mode 100644 index 000000000..90c035d81 --- /dev/null +++ b/fe/PDA/pages/API/action-sheet/action-sheet.vue @@ -0,0 +1,60 @@ + + diff --git a/fe/PDA/pages/API/add-phone-contact/add-phone-contact.vue b/fe/PDA/pages/API/add-phone-contact/add-phone-contact.vue new file mode 100644 index 000000000..f4c39a373 --- /dev/null +++ b/fe/PDA/pages/API/add-phone-contact/add-phone-contact.vue @@ -0,0 +1,102 @@ + + + + diff --git a/fe/PDA/pages/API/animation/animation.vue b/fe/PDA/pages/API/animation/animation.vue new file mode 100644 index 000000000..379858d24 --- /dev/null +++ b/fe/PDA/pages/API/animation/animation.vue @@ -0,0 +1,125 @@ + + + + diff --git a/fe/PDA/pages/API/background-audio/background-audio.vue b/fe/PDA/pages/API/background-audio/background-audio.vue new file mode 100644 index 000000000..5a3315e24 --- /dev/null +++ b/fe/PDA/pages/API/background-audio/background-audio.vue @@ -0,0 +1,163 @@ + + + + diff --git a/fe/PDA/pages/API/bluetooth/bluetooth.vue b/fe/PDA/pages/API/bluetooth/bluetooth.vue new file mode 100644 index 000000000..d9bc4dadf --- /dev/null +++ b/fe/PDA/pages/API/bluetooth/bluetooth.vue @@ -0,0 +1,723 @@ + + + + diff --git a/fe/PDA/pages/API/brightness/brightness.vue b/fe/PDA/pages/API/brightness/brightness.vue new file mode 100644 index 000000000..a0c9e125b --- /dev/null +++ b/fe/PDA/pages/API/brightness/brightness.vue @@ -0,0 +1,86 @@ + + + + diff --git a/fe/PDA/pages/API/canvas/canvas.vue b/fe/PDA/pages/API/canvas/canvas.vue new file mode 100644 index 000000000..f0f34a127 --- /dev/null +++ b/fe/PDA/pages/API/canvas/canvas.vue @@ -0,0 +1,366 @@ + + + + diff --git a/fe/PDA/pages/API/choose-location/choose-location.vue b/fe/PDA/pages/API/choose-location/choose-location.vue new file mode 100644 index 000000000..3b30801c1 --- /dev/null +++ b/fe/PDA/pages/API/choose-location/choose-location.vue @@ -0,0 +1,62 @@ + + + + diff --git a/fe/PDA/pages/API/clipboard/clipboard.vue b/fe/PDA/pages/API/clipboard/clipboard.vue new file mode 100644 index 000000000..648fc4df7 --- /dev/null +++ b/fe/PDA/pages/API/clipboard/clipboard.vue @@ -0,0 +1,91 @@ + + + + + + diff --git a/fe/PDA/pages/API/download-file/download-file.vue b/fe/PDA/pages/API/download-file/download-file.vue new file mode 100644 index 000000000..2e1ddcd77 --- /dev/null +++ b/fe/PDA/pages/API/download-file/download-file.vue @@ -0,0 +1,63 @@ + + + + diff --git a/fe/PDA/pages/API/file/file.vue b/fe/PDA/pages/API/file/file.vue new file mode 100644 index 000000000..43d6cca99 --- /dev/null +++ b/fe/PDA/pages/API/file/file.vue @@ -0,0 +1,129 @@ + + + + diff --git a/fe/PDA/pages/API/full-screen-video-ad/full-screen-video-ad.vue b/fe/PDA/pages/API/full-screen-video-ad/full-screen-video-ad.vue new file mode 100644 index 000000000..5224ed82e --- /dev/null +++ b/fe/PDA/pages/API/full-screen-video-ad/full-screen-video-ad.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/fe/PDA/pages/API/get-location/get-location.vue b/fe/PDA/pages/API/get-location/get-location.vue new file mode 100644 index 000000000..26dfd16c8 --- /dev/null +++ b/fe/PDA/pages/API/get-location/get-location.vue @@ -0,0 +1,186 @@ + + + + diff --git a/fe/PDA/pages/API/get-network-type/get-network-type.vue b/fe/PDA/pages/API/get-network-type/get-network-type.vue new file mode 100644 index 000000000..740d99eaa --- /dev/null +++ b/fe/PDA/pages/API/get-network-type/get-network-type.vue @@ -0,0 +1,86 @@ + + + + diff --git a/fe/PDA/pages/API/get-node-info/get-node-info.vue b/fe/PDA/pages/API/get-node-info/get-node-info.vue new file mode 100644 index 000000000..870ab1678 --- /dev/null +++ b/fe/PDA/pages/API/get-node-info/get-node-info.vue @@ -0,0 +1,117 @@ + + + + + diff --git a/fe/PDA/pages/API/get-system-info/get-system-info.vue b/fe/PDA/pages/API/get-system-info/get-system-info.vue new file mode 100644 index 000000000..feac3b549 --- /dev/null +++ b/fe/PDA/pages/API/get-system-info/get-system-info.vue @@ -0,0 +1,148 @@ + + + + diff --git a/fe/PDA/pages/API/get-user-info/get-user-info.vue b/fe/PDA/pages/API/get-user-info/get-user-info.vue new file mode 100644 index 000000000..f3ac9284a --- /dev/null +++ b/fe/PDA/pages/API/get-user-info/get-user-info.vue @@ -0,0 +1,165 @@ + + + + diff --git a/fe/PDA/pages/API/ibeacon/ibeacon.vue b/fe/PDA/pages/API/ibeacon/ibeacon.vue new file mode 100644 index 000000000..0b19e4fd6 --- /dev/null +++ b/fe/PDA/pages/API/ibeacon/ibeacon.vue @@ -0,0 +1,300 @@ + + + + diff --git a/fe/PDA/pages/API/image/image.vue b/fe/PDA/pages/API/image/image.vue new file mode 100644 index 000000000..242793912 --- /dev/null +++ b/fe/PDA/pages/API/image/image.vue @@ -0,0 +1,239 @@ + + + + diff --git a/fe/PDA/pages/API/inner-audio/inner-audio.vue b/fe/PDA/pages/API/inner-audio/inner-audio.vue new file mode 100644 index 000000000..ba6a2c265 --- /dev/null +++ b/fe/PDA/pages/API/inner-audio/inner-audio.vue @@ -0,0 +1,124 @@ + + + diff --git a/fe/PDA/pages/API/intersection-observer/intersection-observer.vue b/fe/PDA/pages/API/intersection-observer/intersection-observer.vue new file mode 100644 index 000000000..80e5d9b6a --- /dev/null +++ b/fe/PDA/pages/API/intersection-observer/intersection-observer.vue @@ -0,0 +1,69 @@ + + + diff --git a/fe/PDA/pages/API/login/login.vue b/fe/PDA/pages/API/login/login.vue new file mode 100644 index 000000000..9ab812f67 --- /dev/null +++ b/fe/PDA/pages/API/login/login.vue @@ -0,0 +1,322 @@ + + + + diff --git a/fe/PDA/pages/API/make-phone-call/make-phone-call.vue b/fe/PDA/pages/API/make-phone-call/make-phone-call.vue new file mode 100644 index 000000000..0e3cdee00 --- /dev/null +++ b/fe/PDA/pages/API/make-phone-call/make-phone-call.vue @@ -0,0 +1,50 @@ + + + + diff --git a/fe/PDA/pages/API/map-search/map-search.nvue b/fe/PDA/pages/API/map-search/map-search.nvue new file mode 100644 index 000000000..9dc8ef613 --- /dev/null +++ b/fe/PDA/pages/API/map-search/map-search.nvue @@ -0,0 +1,102 @@ + + + + + diff --git a/fe/PDA/pages/API/map/map.nvue b/fe/PDA/pages/API/map/map.nvue new file mode 100644 index 000000000..e9d0d4cda --- /dev/null +++ b/fe/PDA/pages/API/map/map.nvue @@ -0,0 +1,447 @@ + + + + + diff --git a/fe/PDA/pages/API/modal/modal.vue b/fe/PDA/pages/API/modal/modal.vue new file mode 100644 index 000000000..65dff7365 --- /dev/null +++ b/fe/PDA/pages/API/modal/modal.vue @@ -0,0 +1,40 @@ + + \ No newline at end of file diff --git a/fe/PDA/pages/API/navigator/navigator.vue b/fe/PDA/pages/API/navigator/navigator.vue new file mode 100644 index 000000000..b58504f0e --- /dev/null +++ b/fe/PDA/pages/API/navigator/navigator.vue @@ -0,0 +1,105 @@ + + diff --git a/fe/PDA/pages/API/navigator/new-page/new-nvue-page-1.nvue b/fe/PDA/pages/API/navigator/new-page/new-nvue-page-1.nvue new file mode 100644 index 000000000..5c25cea9e --- /dev/null +++ b/fe/PDA/pages/API/navigator/new-page/new-nvue-page-1.nvue @@ -0,0 +1,83 @@ + + + diff --git a/fe/PDA/pages/API/navigator/new-page/new-nvue-page-2.nvue b/fe/PDA/pages/API/navigator/new-page/new-nvue-page-2.nvue new file mode 100644 index 000000000..a5d07800e --- /dev/null +++ b/fe/PDA/pages/API/navigator/new-page/new-nvue-page-2.nvue @@ -0,0 +1,69 @@ + + + diff --git a/fe/PDA/pages/API/navigator/new-page/new-vue-page-1.vue b/fe/PDA/pages/API/navigator/new-page/new-vue-page-1.vue new file mode 100644 index 000000000..0b6c608af --- /dev/null +++ b/fe/PDA/pages/API/navigator/new-page/new-vue-page-1.vue @@ -0,0 +1,108 @@ + + + diff --git a/fe/PDA/pages/API/navigator/new-page/new-vue-page-2.vue b/fe/PDA/pages/API/navigator/new-page/new-vue-page-2.vue new file mode 100644 index 000000000..925badd91 --- /dev/null +++ b/fe/PDA/pages/API/navigator/new-page/new-vue-page-2.vue @@ -0,0 +1,84 @@ + + + diff --git a/fe/PDA/pages/API/on-accelerometer-change/on-accelerometer-change.vue b/fe/PDA/pages/API/on-accelerometer-change/on-accelerometer-change.vue new file mode 100644 index 000000000..0565b422c --- /dev/null +++ b/fe/PDA/pages/API/on-accelerometer-change/on-accelerometer-change.vue @@ -0,0 +1,62 @@ + + diff --git a/fe/PDA/pages/API/rewarded-video-ad/rewarded-video-ad.vue b/fe/PDA/pages/API/rewarded-video-ad/rewarded-video-ad.vue new file mode 100644 index 000000000..a6d7b9923 --- /dev/null +++ b/fe/PDA/pages/API/rewarded-video-ad/rewarded-video-ad.vue @@ -0,0 +1,109 @@ + + + + + diff --git a/fe/PDA/pages/API/save-media/save-media.vue b/fe/PDA/pages/API/save-media/save-media.vue new file mode 100644 index 000000000..9b30d5633 --- /dev/null +++ b/fe/PDA/pages/API/save-media/save-media.vue @@ -0,0 +1,158 @@ + + + + diff --git a/fe/PDA/pages/API/scan-code/scan-code.vue b/fe/PDA/pages/API/scan-code/scan-code.vue new file mode 100644 index 000000000..89006deb2 --- /dev/null +++ b/fe/PDA/pages/API/scan-code/scan-code.vue @@ -0,0 +1,76 @@ + + + + diff --git a/fe/PDA/pages/API/set-navigation-bar-title/set-navigation-bar-title.test.js b/fe/PDA/pages/API/set-navigation-bar-title/set-navigation-bar-title.test.js new file mode 100644 index 000000000..4023b7324 --- /dev/null +++ b/fe/PDA/pages/API/set-navigation-bar-title/set-navigation-bar-title.test.js @@ -0,0 +1,22 @@ + +describe('pages/API/set-navigation-bar-title/set-navigation-bar-title.vue', () => { + let page + beforeAll(async () => { + // 重新reLaunch至首页,并获取首页page对象(其中 program 是uni-automator自动注入的全局对象) + page = await program.reLaunch('/pages/API/set-navigation-bar-title/set-navigation-bar-title') + + if (process.env.UNI_PLATFORM === "mp-weixin") { + await page.waitFor(10000) + } else { + await page.waitFor(5000) + } + + page = await program.currentPage() + + }) + + it('set-navigation-bar-title 组件标题', async () => { + let view = await page.$('.common-page-head-title') + expect(await view.text()).toBe('nav-default') + }) +}) diff --git a/fe/PDA/pages/API/set-navigation-bar-title/set-navigation-bar-title.vue b/fe/PDA/pages/API/set-navigation-bar-title/set-navigation-bar-title.vue new file mode 100644 index 000000000..585462126 --- /dev/null +++ b/fe/PDA/pages/API/set-navigation-bar-title/set-navigation-bar-title.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/fe/PDA/pages/API/share/share.vue b/fe/PDA/pages/API/share/share.vue new file mode 100644 index 000000000..a56f017b5 --- /dev/null +++ b/fe/PDA/pages/API/share/share.vue @@ -0,0 +1,293 @@ + + + + + diff --git a/fe/PDA/pages/task/receipt_detail.vue b/fe/PDA/pages/task/receipt_detail.vue new file mode 100644 index 000000000..e618496ab --- /dev/null +++ b/fe/PDA/pages/task/receipt_detail.vue @@ -0,0 +1,380 @@ + + + + + + diff --git a/fe/PDA/pages/template/component-communication/bus.js b/fe/PDA/pages/template/component-communication/bus.js new file mode 100644 index 000000000..94950da19 --- /dev/null +++ b/fe/PDA/pages/template/component-communication/bus.js @@ -0,0 +1,3 @@ +import Vue from 'vue' + +export default new Vue() \ No newline at end of file diff --git a/fe/PDA/pages/template/component-communication/component-communication.vue b/fe/PDA/pages/template/component-communication/component-communication.vue new file mode 100644 index 000000000..851345f63 --- /dev/null +++ b/fe/PDA/pages/template/component-communication/component-communication.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/fe/PDA/pages/template/component-communication/reciver.vue b/fe/PDA/pages/template/component-communication/reciver.vue new file mode 100644 index 000000000..c307e1cdb --- /dev/null +++ b/fe/PDA/pages/template/component-communication/reciver.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/fe/PDA/pages/template/component-communication/sender-bus.vue b/fe/PDA/pages/template/component-communication/sender-bus.vue new file mode 100644 index 000000000..ceb4f8212 --- /dev/null +++ b/fe/PDA/pages/template/component-communication/sender-bus.vue @@ -0,0 +1,24 @@ + + + + + diff --git a/fe/PDA/pages/template/component-communication/sender.vue b/fe/PDA/pages/template/component-communication/sender.vue new file mode 100644 index 000000000..59eb69d4f --- /dev/null +++ b/fe/PDA/pages/template/component-communication/sender.vue @@ -0,0 +1,24 @@ + + + + + diff --git a/fe/PDA/pages/template/crop/crop.vue b/fe/PDA/pages/template/crop/crop.vue new file mode 100644 index 000000000..f7dd0f794 --- /dev/null +++ b/fe/PDA/pages/template/crop/crop.vue @@ -0,0 +1,639 @@ + + + + + diff --git a/fe/PDA/pages/template/global/global.vue b/fe/PDA/pages/template/global/global.vue new file mode 100644 index 000000000..481efaa9d --- /dev/null +++ b/fe/PDA/pages/template/global/global.vue @@ -0,0 +1,66 @@ + + + + + diff --git a/fe/PDA/pages/template/list-with-badges/list-with-badges.vue b/fe/PDA/pages/template/list-with-badges/list-with-badges.vue new file mode 100644 index 000000000..b0fa31e7a --- /dev/null +++ b/fe/PDA/pages/template/list-with-badges/list-with-badges.vue @@ -0,0 +1,69 @@ + + + + + diff --git a/fe/PDA/pages/template/list-with-collapses/list-with-collapses.vue b/fe/PDA/pages/template/list-with-collapses/list-with-collapses.vue new file mode 100644 index 000000000..d33228a84 --- /dev/null +++ b/fe/PDA/pages/template/list-with-collapses/list-with-collapses.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/fe/PDA/pages/template/list2detail-detail/list2detail-detail.vue b/fe/PDA/pages/template/list2detail-detail/list2detail-detail.vue new file mode 100644 index 000000000..8ec90d527 --- /dev/null +++ b/fe/PDA/pages/template/list2detail-detail/list2detail-detail.vue @@ -0,0 +1,191 @@ + + + + + diff --git a/fe/PDA/pages/template/list2detail-list/list2detail-list.vue b/fe/PDA/pages/template/list2detail-list/list2detail-list.vue new file mode 100644 index 000000000..48ec8e5ba --- /dev/null +++ b/fe/PDA/pages/template/list2detail-list/list2detail-list.vue @@ -0,0 +1,196 @@ + + + + + diff --git a/fe/PDA/pages/template/nav-button/nav-button.vue b/fe/PDA/pages/template/nav-button/nav-button.vue new file mode 100644 index 000000000..85d167687 --- /dev/null +++ b/fe/PDA/pages/template/nav-button/nav-button.vue @@ -0,0 +1,32 @@ + + + + diff --git a/fe/PDA/pages/template/nav-city-dropdown/nav-city-dropdown.vue b/fe/PDA/pages/template/nav-city-dropdown/nav-city-dropdown.vue new file mode 100644 index 000000000..3dfb263b5 --- /dev/null +++ b/fe/PDA/pages/template/nav-city-dropdown/nav-city-dropdown.vue @@ -0,0 +1,138 @@ + + + + + diff --git a/fe/PDA/pages/template/nav-default/nav-default.vue b/fe/PDA/pages/template/nav-default/nav-default.vue new file mode 100644 index 000000000..e902134a4 --- /dev/null +++ b/fe/PDA/pages/template/nav-default/nav-default.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/fe/PDA/pages/template/nav-dot/nav-dot.vue b/fe/PDA/pages/template/nav-dot/nav-dot.vue new file mode 100644 index 000000000..502134fe1 --- /dev/null +++ b/fe/PDA/pages/template/nav-dot/nav-dot.vue @@ -0,0 +1,66 @@ + + + + diff --git a/fe/PDA/pages/template/nav-image/nav-image.vue b/fe/PDA/pages/template/nav-image/nav-image.vue new file mode 100644 index 000000000..829208f19 --- /dev/null +++ b/fe/PDA/pages/template/nav-image/nav-image.vue @@ -0,0 +1,26 @@ + + + + diff --git a/fe/PDA/pages/template/nav-search-input/detail/detail.vue b/fe/PDA/pages/template/nav-search-input/detail/detail.vue new file mode 100644 index 000000000..eb70baf13 --- /dev/null +++ b/fe/PDA/pages/template/nav-search-input/detail/detail.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/fe/PDA/pages/template/nav-search-input/nav-search-input.vue b/fe/PDA/pages/template/nav-search-input/nav-search-input.vue new file mode 100644 index 000000000..b8b0f50fb --- /dev/null +++ b/fe/PDA/pages/template/nav-search-input/nav-search-input.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/fe/PDA/pages/template/nav-transparent/nav-transparent.vue b/fe/PDA/pages/template/nav-transparent/nav-transparent.vue new file mode 100644 index 000000000..532104127 --- /dev/null +++ b/fe/PDA/pages/template/nav-transparent/nav-transparent.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/fe/PDA/pages/template/scheme/scheme.vue b/fe/PDA/pages/template/scheme/scheme.vue new file mode 100644 index 000000000..8a79d3791 --- /dev/null +++ b/fe/PDA/pages/template/scheme/scheme.vue @@ -0,0 +1,154 @@ + + + + diff --git a/fe/PDA/pages/template/swiper-list-nvue/swiper-list-nvue.nvue b/fe/PDA/pages/template/swiper-list-nvue/swiper-list-nvue.nvue new file mode 100644 index 000000000..f4a152aa0 --- /dev/null +++ b/fe/PDA/pages/template/swiper-list-nvue/swiper-list-nvue.nvue @@ -0,0 +1,393 @@ + + + + + diff --git a/fe/PDA/pages/template/swiper-list-nvue/swiper-page.nvue b/fe/PDA/pages/template/swiper-list-nvue/swiper-page.nvue new file mode 100644 index 000000000..2923e64c7 --- /dev/null +++ b/fe/PDA/pages/template/swiper-list-nvue/swiper-page.nvue @@ -0,0 +1,87 @@ + + + + + diff --git a/fe/PDA/pages/template/swiper-list/swiper-list.nvue b/fe/PDA/pages/template/swiper-list/swiper-list.nvue new file mode 100644 index 000000000..aedbddb9b --- /dev/null +++ b/fe/PDA/pages/template/swiper-list/swiper-list.nvue @@ -0,0 +1,363 @@ + + + + + diff --git a/fe/PDA/pages/template/swiper-list/swiper-page.nvue b/fe/PDA/pages/template/swiper-list/swiper-page.nvue new file mode 100644 index 000000000..bb8135fec --- /dev/null +++ b/fe/PDA/pages/template/swiper-list/swiper-page.nvue @@ -0,0 +1,45 @@ + + + + + diff --git a/fe/PDA/pages/template/swiper-vertical/swiper-vertical.nvue b/fe/PDA/pages/template/swiper-vertical/swiper-vertical.nvue new file mode 100644 index 000000000..4a276b1d8 --- /dev/null +++ b/fe/PDA/pages/template/swiper-vertical/swiper-vertical.nvue @@ -0,0 +1,175 @@ + + + + diff --git a/fe/PDA/pages/template/tabbar/detail/detail.vue b/fe/PDA/pages/template/tabbar/detail/detail.vue new file mode 100644 index 000000000..7025348ad --- /dev/null +++ b/fe/PDA/pages/template/tabbar/detail/detail.vue @@ -0,0 +1,22 @@ + + + diff --git a/fe/PDA/pages/template/tabbar/news-item.nvue b/fe/PDA/pages/template/tabbar/news-item.nvue new file mode 100644 index 000000000..5102b5175 --- /dev/null +++ b/fe/PDA/pages/template/tabbar/news-item.nvue @@ -0,0 +1,211 @@ + + + + + diff --git a/fe/PDA/pages/template/tabbar/tabbar.nvue b/fe/PDA/pages/template/tabbar/tabbar.nvue new file mode 100644 index 000000000..4a4739be5 --- /dev/null +++ b/fe/PDA/pages/template/tabbar/tabbar.nvue @@ -0,0 +1,436 @@ + + + + diff --git a/fe/PDA/pages/template/ucharts/ucharts.vue b/fe/PDA/pages/template/ucharts/ucharts.vue new file mode 100644 index 000000000..db80d1102 --- /dev/null +++ b/fe/PDA/pages/template/ucharts/ucharts.vue @@ -0,0 +1,1226 @@ + + + + + diff --git a/fe/PDA/pages/template/vant-button/vant-button.vue b/fe/PDA/pages/template/vant-button/vant-button.vue new file mode 100644 index 000000000..dd07066c1 --- /dev/null +++ b/fe/PDA/pages/template/vant-button/vant-button.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/fe/PDA/platforms/app-plus/feedback/feedback.vue b/fe/PDA/platforms/app-plus/feedback/feedback.vue new file mode 100644 index 000000000..03731665b --- /dev/null +++ b/fe/PDA/platforms/app-plus/feedback/feedback.vue @@ -0,0 +1,232 @@ + + + + + diff --git a/fe/PDA/platforms/app-plus/orientation/orientation.vue b/fe/PDA/platforms/app-plus/orientation/orientation.vue new file mode 100644 index 000000000..ba636c4ed --- /dev/null +++ b/fe/PDA/platforms/app-plus/orientation/orientation.vue @@ -0,0 +1,64 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-easyinput/package.json b/fe/PDA/uni_modules/uni-easyinput/package.json new file mode 100644 index 000000000..3cc793e61 --- /dev/null +++ b/fe/PDA/uni_modules/uni-easyinput/package.json @@ -0,0 +1,90 @@ +{ + "id": "uni-easyinput", + "displayName": "uni-easyinput 增强输入框", + "version": "1.1.0", + "description": "Easyinput 组件是对原生input组件的增强", + "keywords": [ + "uni-ui", + "uniui", + "input", + "uni-easyinput", + "输入框" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-easyinput/readme.md b/fe/PDA/uni_modules/uni-easyinput/readme.md new file mode 100644 index 000000000..f1faf8fbb --- /dev/null +++ b/fe/PDA/uni_modules/uni-easyinput/readme.md @@ -0,0 +1,11 @@ + + +### Easyinput 增强输入框 +> **组件名:uni-easyinput** +> 代码块: `uEasyinput` + + +easyinput 组件是对原生input组件的增强 ,是专门为配合表单组件[uni-forms](https://ext.dcloud.net.cn/plugin?id=2773)而设计的,easyinput 内置了边框,图标等,同时包含 input 所有功能 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-easyinput) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-fab/changelog.md b/fe/PDA/uni_modules/uni-fab/changelog.md new file mode 100644 index 000000000..24e26b167 --- /dev/null +++ b/fe/PDA/uni_modules/uni-fab/changelog.md @@ -0,0 +1,17 @@ +## 1.2.2(2021-12-29) +- 更新 组件依赖 +## 1.2.1(2021-11-19) +- 修复 阴影颜色不正确的bug +## 1.2.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-fab](https://uniapp.dcloud.io/component/uniui/uni-fab) +## 1.1.1(2021-11-09) +- 新增 提供组件设计资源,组件样式调整 +## 1.1.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.0.7(2021-05-12) +- 新增 组件示例地址 +## 1.0.6(2021-02-05) +- 调整为uni_modules目录规范 +- 优化 按钮背景色调整 +- 优化 兼容pc端 diff --git a/fe/PDA/uni_modules/uni-fab/components/uni-fab/uni-fab.vue b/fe/PDA/uni_modules/uni-fab/components/uni-fab/uni-fab.vue new file mode 100644 index 000000000..bef97f117 --- /dev/null +++ b/fe/PDA/uni_modules/uni-fab/components/uni-fab/uni-fab.vue @@ -0,0 +1,475 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-fab/components/uni-fab/uni-fab.vue.bak b/fe/PDA/uni_modules/uni-fab/components/uni-fab/uni-fab.vue.bak new file mode 100644 index 000000000..5adc72a8a --- /dev/null +++ b/fe/PDA/uni_modules/uni-fab/components/uni-fab/uni-fab.vue.bak @@ -0,0 +1,379 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-fab/package.json b/fe/PDA/uni_modules/uni-fab/package.json new file mode 100644 index 000000000..0f27daa58 --- /dev/null +++ b/fe/PDA/uni_modules/uni-fab/package.json @@ -0,0 +1,87 @@ +{ + "id": "uni-fab", + "displayName": "uni-fab 悬浮按钮", + "version": "1.2.2", + "description": "悬浮按钮 fab button ,点击可展开一个图标按钮菜单。", + "keywords": [ + "uni-ui", + "uniui", + "按钮", + "悬浮按钮", + "fab" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss","uni-icons"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/fe/PDA/uni_modules/uni-fab/readme.md b/fe/PDA/uni_modules/uni-fab/readme.md new file mode 100644 index 000000000..9a444e880 --- /dev/null +++ b/fe/PDA/uni_modules/uni-fab/readme.md @@ -0,0 +1,9 @@ +## Fab 悬浮按钮 +> **组件名:uni-fab** +> 代码块: `uFab` + + +点击可展开一个图形按钮菜单 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-fab) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-fav/changelog.md b/fe/PDA/uni_modules/uni-fav/changelog.md new file mode 100644 index 000000000..d8a08d436 --- /dev/null +++ b/fe/PDA/uni_modules/uni-fav/changelog.md @@ -0,0 +1,19 @@ +## 1.2.1(2022-05-30) +- 新增 stat 属性 ,是否开启uni统计功能 +## 1.2.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-fav](https://uniapp.dcloud.io/component/uniui/uni-fav) +## 1.1.1(2021-08-24) +- 新增 支持国际化 +## 1.1.0(2021-07-13) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.0.6(2021-05-12) +- 新增 组件示例地址 +## 1.0.5(2021-04-21) +- 优化 添加依赖 uni-icons, 导入后自动下载依赖 +## 1.0.4(2021-02-05) +- 优化 组件引用关系,通过uni_modules引用组件 +## 1.0.3(2021-02-05) +- 优化 组件引用关系,通过uni_modules引用组件 +## 1.0.2(2021-02-05) +- 调整为uni_modules目录规范 diff --git a/fe/PDA/uni_modules/uni-fav/components/uni-fav/i18n/en.json b/fe/PDA/uni_modules/uni-fav/components/uni-fav/i18n/en.json new file mode 100644 index 000000000..9a0759e02 --- /dev/null +++ b/fe/PDA/uni_modules/uni-fav/components/uni-fav/i18n/en.json @@ -0,0 +1,4 @@ +{ + "uni-fav.collect": "collect", + "uni-fav.collected": "collected" +} diff --git a/fe/PDA/uni_modules/uni-fav/components/uni-fav/i18n/index.js b/fe/PDA/uni_modules/uni-fav/components/uni-fav/i18n/index.js new file mode 100644 index 000000000..de7509c87 --- /dev/null +++ b/fe/PDA/uni_modules/uni-fav/components/uni-fav/i18n/index.js @@ -0,0 +1,8 @@ +import en from './en.json' +import zhHans from './zh-Hans.json' +import zhHant from './zh-Hant.json' +export default { + en, + 'zh-Hans': zhHans, + 'zh-Hant': zhHant +} diff --git a/fe/PDA/uni_modules/uni-fav/components/uni-fav/i18n/zh-Hans.json b/fe/PDA/uni_modules/uni-fav/components/uni-fav/i18n/zh-Hans.json new file mode 100644 index 000000000..67c89bfc7 --- /dev/null +++ b/fe/PDA/uni_modules/uni-fav/components/uni-fav/i18n/zh-Hans.json @@ -0,0 +1,4 @@ +{ + "uni-fav.collect": "收藏", + "uni-fav.collected": "已收藏" +} diff --git a/fe/PDA/uni_modules/uni-fav/components/uni-fav/i18n/zh-Hant.json b/fe/PDA/uni_modules/uni-fav/components/uni-fav/i18n/zh-Hant.json new file mode 100644 index 000000000..67c89bfc7 --- /dev/null +++ b/fe/PDA/uni_modules/uni-fav/components/uni-fav/i18n/zh-Hant.json @@ -0,0 +1,4 @@ +{ + "uni-fav.collect": "收藏", + "uni-fav.collected": "已收藏" +} diff --git a/fe/PDA/uni_modules/uni-fav/components/uni-fav/uni-fav.vue b/fe/PDA/uni_modules/uni-fav/components/uni-fav/uni-fav.vue new file mode 100644 index 000000000..d2c58df9e --- /dev/null +++ b/fe/PDA/uni_modules/uni-fav/components/uni-fav/uni-fav.vue @@ -0,0 +1,161 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-fav/package.json b/fe/PDA/uni_modules/uni-fav/package.json new file mode 100644 index 000000000..cc1469716 --- /dev/null +++ b/fe/PDA/uni_modules/uni-fav/package.json @@ -0,0 +1,89 @@ +{ + "id": "uni-fav", + "displayName": "uni-fav 收藏按钮", + "version": "1.2.1", + "description": " Fav 收藏组件,可自定义颜色、大小。", + "keywords": [ + "fav", + "uni-ui", + "uniui", + "收藏" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/fe/PDA/uni_modules/uni-fav/readme.md b/fe/PDA/uni_modules/uni-fav/readme.md new file mode 100644 index 000000000..4de125d28 --- /dev/null +++ b/fe/PDA/uni_modules/uni-fav/readme.md @@ -0,0 +1,10 @@ + + +## Fav 收藏按钮 +> **组件名:uni-fav** +> 代码块: `uFav` + +用于收藏功能,可点击切换选中、不选中的状态。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-fav) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-file-picker/changelog.md b/fe/PDA/uni_modules/uni-file-picker/changelog.md new file mode 100644 index 000000000..5c8102682 --- /dev/null +++ b/fe/PDA/uni_modules/uni-file-picker/changelog.md @@ -0,0 +1,63 @@ +## 1.0.2(2022-07-04) +- 修复 在uni-forms下样式不生效的bug +## 1.0.1(2021-11-23) +- 修复 参数为对象的情况下,url在某些情况显示错误的bug +## 1.0.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-file-picker](https://uniapp.dcloud.io/component/uniui/uni-file-picker) +## 0.2.16(2021-11-08) +- 修复 传入空对象 ,显示错误的Bug +## 0.2.15(2021-08-30) +- 修复 return-type="object" 时且存在v-model时,无法删除文件的Bug +## 0.2.14(2021-08-23) +- 新增 参数中返回 fileID 字段 +## 0.2.13(2021-08-23) +- 修复 腾讯云传入fileID 不能回显的bug +- 修复 选择图片后,不能放大的问题 +## 0.2.12(2021-08-17) +- 修复 由于 0.2.11 版本引起的不能回显图片的Bug +## 0.2.11(2021-08-16) +- 新增 clearFiles(index) 方法,可以手动删除指定文件 +- 修复 v-model 值设为 null 报错的Bug +## 0.2.10(2021-08-13) +- 修复 return-type="object" 时,无法删除文件的Bug +## 0.2.9(2021-08-03) +- 修复 auto-upload 属性失效的Bug +## 0.2.8(2021-07-31) +- 修复 fileExtname属性不指定值报错的Bug +## 0.2.7(2021-07-31) +- 修复 在某种场景下图片不回显的Bug +## 0.2.6(2021-07-30) +- 修复 return-type为object下,返回值不正确的Bug +## 0.2.5(2021-07-30) +- 修复(重要) H5 平台下如果和uni-forms组件一同使用导致页面卡死的问题 +## 0.2.3(2021-07-28) +- 优化 调整示例代码 +## 0.2.2(2021-07-27) +- 修复 vue3 下赋值错误的Bug +- 优化 h5平台下上传文件导致页面卡死的问题 +## 0.2.0(2021-07-13) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 0.1.1(2021-07-02) +- 修复 sourceType 缺少默认值导致 ios 无法选择文件 +## 0.1.0(2021-06-30) +- 优化 解耦与uniCloud的强绑定关系 ,如不绑定服务空间,默认autoUpload为false且不可更改 +## 0.0.11(2021-06-30) +- 修复 由 0.0.10 版本引发的 returnType 属性失效的问题 +## 0.0.10(2021-06-29) +- 优化 文件上传后进度条消失时机 +## 0.0.9(2021-06-29) +- 修复 在uni-forms 中,删除文件 ,获取的值不对的Bug +## 0.0.8(2021-06-15) +- 修复 删除文件时无法触发 v-model 的Bug +## 0.0.7(2021-05-12) +- 新增 组件示例地址 +## 0.0.6(2021-04-09) +- 修复 选择的文件非 file-extname 字段指定的扩展名报错的Bug +## 0.0.5(2021-04-09) +- 优化 更新组件示例 +## 0.0.4(2021-04-09) +- 优化 file-extname 字段支持字符串写法,多个扩展名需要用逗号分隔 +## 0.0.3(2021-02-05) +- 调整为uni_modules目录规范 +- 修复 微信小程序不指定 fileExtname 属性选择失败的Bug diff --git a/fe/PDA/uni_modules/uni-file-picker/components/uni-file-picker/choose-and-upload-file.js b/fe/PDA/uni_modules/uni-file-picker/components/uni-file-picker/choose-and-upload-file.js new file mode 100644 index 000000000..24a07f578 --- /dev/null +++ b/fe/PDA/uni_modules/uni-file-picker/components/uni-file-picker/choose-and-upload-file.js @@ -0,0 +1,224 @@ +'use strict'; + +const ERR_MSG_OK = 'chooseAndUploadFile:ok'; +const ERR_MSG_FAIL = 'chooseAndUploadFile:fail'; + +function chooseImage(opts) { + const { + count, + sizeType = ['original', 'compressed'], + sourceType = ['album', 'camera'], + extension + } = opts + return new Promise((resolve, reject) => { + uni.chooseImage({ + count, + sizeType, + sourceType, + extension, + success(res) { + resolve(normalizeChooseAndUploadFileRes(res, 'image')); + }, + fail(res) { + reject({ + errMsg: res.errMsg.replace('chooseImage:fail', ERR_MSG_FAIL), + }); + }, + }); + }); +} + +function chooseVideo(opts) { + const { + camera, + compressed, + maxDuration, + sourceType = ['album', 'camera'], + extension + } = opts; + return new Promise((resolve, reject) => { + uni.chooseVideo({ + camera, + compressed, + maxDuration, + sourceType, + extension, + success(res) { + const { + tempFilePath, + duration, + size, + height, + width + } = res; + resolve(normalizeChooseAndUploadFileRes({ + errMsg: 'chooseVideo:ok', + tempFilePaths: [tempFilePath], + tempFiles: [ + { + name: (res.tempFile && res.tempFile.name) || '', + path: tempFilePath, + size, + type: (res.tempFile && res.tempFile.type) || '', + width, + height, + duration, + fileType: 'video', + cloudPath: '', + }, ], + }, 'video')); + }, + fail(res) { + reject({ + errMsg: res.errMsg.replace('chooseVideo:fail', ERR_MSG_FAIL), + }); + }, + }); + }); +} + +function chooseAll(opts) { + const { + count, + extension + } = opts; + return new Promise((resolve, reject) => { + let chooseFile = uni.chooseFile; + if (typeof wx !== 'undefined' && + typeof wx.chooseMessageFile === 'function') { + chooseFile = wx.chooseMessageFile; + } + if (typeof chooseFile !== 'function') { + return reject({ + errMsg: ERR_MSG_FAIL + ' 请指定 type 类型,该平台仅支持选择 image 或 video。', + }); + } + chooseFile({ + type: 'all', + count, + extension, + success(res) { + resolve(normalizeChooseAndUploadFileRes(res)); + }, + fail(res) { + reject({ + errMsg: res.errMsg.replace('chooseFile:fail', ERR_MSG_FAIL), + }); + }, + }); + }); +} + +function normalizeChooseAndUploadFileRes(res, fileType) { + res.tempFiles.forEach((item, index) => { + if (!item.name) { + item.name = item.path.substring(item.path.lastIndexOf('/') + 1); + } + if (fileType) { + item.fileType = fileType; + } + item.cloudPath = + Date.now() + '_' + index + item.name.substring(item.name.lastIndexOf('.')); + }); + if (!res.tempFilePaths) { + res.tempFilePaths = res.tempFiles.map((file) => file.path); + } + return res; +} + +function uploadCloudFiles(files, max = 5, onUploadProgress) { + files = JSON.parse(JSON.stringify(files)) + const len = files.length + let count = 0 + let self = this + return new Promise(resolve => { + while (count < max) { + next() + } + + function next() { + let cur = count++ + if (cur >= len) { + !files.find(item => !item.url && !item.errMsg) && resolve(files) + return + } + const fileItem = files[cur] + const index = self.files.findIndex(v => v.uuid === fileItem.uuid) + fileItem.url = '' + delete fileItem.errMsg + + uniCloud + .uploadFile({ + filePath: fileItem.path, + cloudPath: fileItem.cloudPath, + fileType: fileItem.fileType, + onUploadProgress: res => { + res.index = index + onUploadProgress && onUploadProgress(res) + } + }) + .then(res => { + fileItem.url = res.fileID + fileItem.index = index + if (cur < len) { + next() + } + }) + .catch(res => { + fileItem.errMsg = res.errMsg || res.message + fileItem.index = index + if (cur < len) { + next() + } + }) + } + }) +} + + + + + +function uploadFiles(choosePromise, { + onChooseFile, + onUploadProgress +}) { + return choosePromise + .then((res) => { + if (onChooseFile) { + const customChooseRes = onChooseFile(res); + if (typeof customChooseRes !== 'undefined') { + return Promise.resolve(customChooseRes).then((chooseRes) => typeof chooseRes === 'undefined' ? + res : chooseRes); + } + } + return res; + }) + .then((res) => { + if (res === false) { + return { + errMsg: ERR_MSG_OK, + tempFilePaths: [], + tempFiles: [], + }; + } + return res + }) +} + +function chooseAndUploadFile(opts = { + type: 'all' +}) { + if (opts.type === 'image') { + return uploadFiles(chooseImage(opts), opts); + } + else if (opts.type === 'video') { + return uploadFiles(chooseVideo(opts), opts); + } + return uploadFiles(chooseAll(opts), opts); +} + +export { + chooseAndUploadFile, + uploadCloudFiles +}; diff --git a/fe/PDA/uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue b/fe/PDA/uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue new file mode 100644 index 000000000..0928a41af --- /dev/null +++ b/fe/PDA/uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue @@ -0,0 +1,656 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-file-picker/components/uni-file-picker/upload-file.vue b/fe/PDA/uni_modules/uni-file-picker/components/uni-file-picker/upload-file.vue new file mode 100644 index 000000000..625d92ec7 --- /dev/null +++ b/fe/PDA/uni_modules/uni-file-picker/components/uni-file-picker/upload-file.vue @@ -0,0 +1,325 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-file-picker/components/uni-file-picker/upload-image.vue b/fe/PDA/uni_modules/uni-file-picker/components/uni-file-picker/upload-image.vue new file mode 100644 index 000000000..2a29bc231 --- /dev/null +++ b/fe/PDA/uni_modules/uni-file-picker/components/uni-file-picker/upload-image.vue @@ -0,0 +1,292 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-file-picker/components/uni-file-picker/utils.js b/fe/PDA/uni_modules/uni-file-picker/components/uni-file-picker/utils.js new file mode 100644 index 000000000..60aaa3e4e --- /dev/null +++ b/fe/PDA/uni_modules/uni-file-picker/components/uni-file-picker/utils.js @@ -0,0 +1,109 @@ +/** + * 获取文件名和后缀 + * @param {String} name + */ +export const get_file_ext = (name) => { + const last_len = name.lastIndexOf('.') + const len = name.length + return { + name: name.substring(0, last_len), + ext: name.substring(last_len + 1, len) + } +} + +/** + * 获取扩展名 + * @param {Array} fileExtname + */ +export const get_extname = (fileExtname) => { + if (!Array.isArray(fileExtname)) { + let extname = fileExtname.replace(/(\[|\])/g, '') + return extname.split(',') + } else { + return fileExtname + } + return [] +} + +/** + * 获取文件和检测是否可选 + */ +export const get_files_and_is_max = (res, _extname) => { + let filePaths = [] + let files = [] + if(!_extname || _extname.length === 0){ + return { + filePaths, + files + } + } + res.tempFiles.forEach(v => { + let fileFullName = get_file_ext(v.name) + const extname = fileFullName.ext.toLowerCase() + if (_extname.indexOf(extname) !== -1) { + files.push(v) + filePaths.push(v.path) + } + }) + if (files.length !== res.tempFiles.length) { + uni.showToast({ + title: `当前选择了${res.tempFiles.length}个文件 ,${res.tempFiles.length - files.length} 个文件格式不正确`, + icon: 'none', + duration: 5000 + }) + } + + return { + filePaths, + files + } +} + + +/** + * 获取图片信息 + * @param {Object} filepath + */ +export const get_file_info = (filepath) => { + return new Promise((resolve, reject) => { + uni.getImageInfo({ + src: filepath, + success(res) { + resolve(res) + }, + fail(err) { + reject(err) + } + }) + }) +} +/** + * 获取封装数据 + */ +export const get_file_data = async (files, type = 'image') => { + // 最终需要上传数据库的数据 + let fileFullName = get_file_ext(files.name) + const extname = fileFullName.ext.toLowerCase() + let filedata = { + name: files.name, + uuid: files.uuid, + extname: extname || '', + cloudPath: files.cloudPath, + fileType: files.fileType, + url: files.path || files.path, + size: files.size, //单位是字节 + image: {}, + path: files.path, + video: {} + } + if (type === 'image') { + const imageinfo = await get_file_info(files.path) + delete filedata.video + filedata.image.width = imageinfo.width + filedata.image.height = imageinfo.height + filedata.image.location = imageinfo.path + } else { + delete filedata.image + } + return filedata +} diff --git a/fe/PDA/uni_modules/uni-file-picker/package.json b/fe/PDA/uni_modules/uni-file-picker/package.json new file mode 100644 index 000000000..08bd66ec3 --- /dev/null +++ b/fe/PDA/uni_modules/uni-file-picker/package.json @@ -0,0 +1,86 @@ +{ + "id": "uni-file-picker", + "displayName": "uni-file-picker 文件选择上传", + "version": "1.0.2", + "description": "文件选择上传组件,可以选择图片、视频等任意文件并上传到当前绑定的服务空间", + "keywords": [ + "uni-ui", + "uniui", + "图片上传", + "文件上传" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "n" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/fe/PDA/uni_modules/uni-file-picker/readme.md b/fe/PDA/uni_modules/uni-file-picker/readme.md new file mode 100644 index 000000000..c8399a5e7 --- /dev/null +++ b/fe/PDA/uni_modules/uni-file-picker/readme.md @@ -0,0 +1,11 @@ + +## FilePicker 文件选择上传 + +> **组件名:uni-file-picker** +> 代码块: `uFilePicker` + + +文件选择上传组件,可以选择图片、视频等任意文件并上传到当前绑定的服务空间 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-file-picker) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-forms/changelog.md b/fe/PDA/uni_modules/uni-forms/changelog.md new file mode 100644 index 000000000..5a4bb79af --- /dev/null +++ b/fe/PDA/uni_modules/uni-forms/changelog.md @@ -0,0 +1,86 @@ +## 1.4.6(2022-07-13) +- 修复 model 需要校验的值没有声明对应字段时,导致第一次不触发校验的bug +## 1.4.5(2022-07-05) +- 新增 更多表单示例 +- 优化 子表单组件过期提示的问题 +- 优化 子表单组件uni-datetime-picker、uni-data-select、uni-data-picker的显示样式 +## 1.4.4(2022-07-04) +- 更新 删除组件日志 +## 1.4.3(2022-07-04) +- 修复 由 1.4.0 引发的 label 插槽不生效的bug +## 1.4.2(2022-07-04) +- 修复 子组件找不到 setValue 报错的bug +## 1.4.1(2022-07-04) +- 修复 uni-data-picker 在 uni-forms-item 中报错的bug +- 修复 uni-data-picker 在 uni-forms-item 中宽度不正确的bug +## 1.4.0(2022-06-30) +- 【重要】组件逻辑重构,部分用法用旧版本不兼容,请注意兼容问题 +- 【重要】组件使用 Provide/Inject 方式注入依赖,提供了自定义表单组件调用 uni-forms 校验表单的能力 +- 新增 model 属性,等同于原 value/modelValue 属性,旧属性即将废弃 +- 新增 validateTrigger 属性的 blur 值,仅 uni-easyinput 生效 +- 新增 onFieldChange 方法,可以对子表单进行校验,可替代binddata方法 +- 新增 子表单的 setRules 方法,配合自定义校验函数使用 +- 新增 uni-forms-item 的 setRules 方法,配置动态表单使用可动态更新校验规则 +- 优化 动态表单校验方式,废弃拼接name的方式 +## 1.3.3(2022-06-22) +- 修复 表单校验顺序无序问题 +## 1.3.2(2021-12-09) +- +## 1.3.1(2021-11-19) +- 修复 label 插槽不生效的bug +## 1.3.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-forms](https://uniapp.dcloud.io/component/uniui/uni-forms) +## 1.2.7(2021-08-13) +- 修复 没有添加校验规则的字段依然报错的Bug +## 1.2.6(2021-08-11) +- 修复 重置表单错误信息无法清除的问题 +## 1.2.5(2021-08-11) +- 优化 组件文档 +## 1.2.4(2021-08-11) +- 修复 表单验证只生效一次的问题 +## 1.2.3(2021-07-30) +- 优化 vue3下事件警告的问题 +## 1.2.2(2021-07-26) +- 修复 vue2 下条件编译导致destroyed生命周期失效的Bug +- 修复 1.2.1 引起的示例在小程序平台报错的Bug +## 1.2.1(2021-07-22) +- 修复 动态校验表单,默认值为空的情况下校验失效的Bug +- 修复 不指定name属性时,运行报错的Bug +- 优化 label默认宽度从65调整至70,使required为true且四字时不换行 +- 优化 组件示例,新增动态校验示例代码 +- 优化 组件文档,使用方式更清晰 +## 1.2.0(2021-07-13) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.1.2(2021-06-25) +- 修复 pattern 属性在微信小程序平台无效的问题 +## 1.1.1(2021-06-22) +- 修复 validate-trigger属性为submit且err-show-type属性为toast时不能弹出的Bug +## 1.1.0(2021-06-22) +- 修复 只写setRules方法而导致校验不生效的Bug +- 修复 由上个办法引发的错误提示文字错位的Bug +## 1.0.48(2021-06-21) +- 修复 不设置 label 属性 ,无法设置label插槽的问题 +## 1.0.47(2021-06-21) +- 修复 不设置label属性,label-width属性不生效的bug +- 修复 setRules 方法与rules属性冲突的问题 +## 1.0.46(2021-06-04) +- 修复 动态删减数据导致报错的问题 +## 1.0.45(2021-06-04) +- 新增 modelValue 属性 ,value 即将废弃 +## 1.0.44(2021-06-02) +- 新增 uni-forms-item 可以设置单独的 rules +- 新增 validate 事件增加 keepitem 参数,可以选择那些字段不过滤 +- 优化 submit 事件重命名为 validate +## 1.0.43(2021-05-12) +- 新增 组件示例地址 +## 1.0.42(2021-04-30) +- 修复 自定义检验器失效的问题 +## 1.0.41(2021-03-05) +- 更新 校验器 +- 修复 表单规则设置类型为 number 的情况下,值为0校验失败的Bug +## 1.0.40(2021-03-04) +- 修复 动态显示uni-forms-item的情况下,submit 方法获取值错误的Bug +## 1.0.39(2021-02-05) +- 调整为uni_modules目录规范 +- 修复 校验器传入 int 等类型 ,返回String类型的Bug diff --git a/fe/PDA/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue b/fe/PDA/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue new file mode 100644 index 000000000..250ed875c --- /dev/null +++ b/fe/PDA/uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue @@ -0,0 +1,627 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-forms/components/uni-forms/uni-forms.vue b/fe/PDA/uni_modules/uni-forms/components/uni-forms/uni-forms.vue new file mode 100644 index 000000000..ed2f6d971 --- /dev/null +++ b/fe/PDA/uni_modules/uni-forms/components/uni-forms/uni-forms.vue @@ -0,0 +1,397 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-forms/components/uni-forms/utils.js b/fe/PDA/uni_modules/uni-forms/components/uni-forms/utils.js new file mode 100644 index 000000000..6da242165 --- /dev/null +++ b/fe/PDA/uni_modules/uni-forms/components/uni-forms/utils.js @@ -0,0 +1,293 @@ +/** + * 简单处理对象拷贝 + * @param {Obejct} 被拷贝对象 + * @@return {Object} 拷贝对象 + */ +export const deepCopy = (val) => { + return JSON.parse(JSON.stringify(val)) +} +/** + * 过滤数字类型 + * @param {String} format 数字类型 + * @@return {Boolean} 返回是否为数字类型 + */ +export const typeFilter = (format) => { + return format === 'int' || format === 'double' || format === 'number' || format === 'timestamp'; +} + +/** + * 把 value 转换成指定的类型,用于处理初始值,原因是初始值需要入库不能为 undefined + * @param {String} key 字段名 + * @param {any} value 字段值 + * @param {Object} rules 表单校验规则 + */ +export const getValue = (key, value, rules) => { + const isRuleNumType = rules.find(val => val.format && typeFilter(val.format)); + const isRuleBoolType = rules.find(val => (val.format && val.format === 'boolean') || val.format === 'bool'); + // 输入类型为 number + if (!!isRuleNumType) { + if (!value && value !== 0) { + value = null + } else { + value = isNumber(Number(value)) ? Number(value) : value + } + } + + // 输入类型为 boolean + if (!!isRuleBoolType) { + value = isBoolean(value) ? value : false + } + + return value; +} + +/** + * 获取表单数据 + * @param {String|Array} name 真实名称,需要使用 realName 获取 + * @param {Object} data 原始数据 + * @param {any} value 需要设置的值 + */ +export const setDataValue = (field, formdata, value) => { + formdata[field] = value + return value || '' +} + +/** + * 获取表单数据 + * @param {String|Array} field 真实名称,需要使用 realName 获取 + * @param {Object} data 原始数据 + */ +export const getDataValue = (field, data) => { + return objGet(data, field) +} + +/** + * 获取表单类型 + * @param {String|Array} field 真实名称,需要使用 realName 获取 + */ +export const getDataValueType = (field, data) => { + const value = getDataValue(field, data) + return { + type: type(value), + value + } +} + +/** + * 获取表单可用的真实name + * @param {String|Array} name 表单name + * @@return {String} 表单可用的真实name + */ +export const realName = (name, data = {}) => { + const base_name = _basePath(name) + if (typeof base_name === 'object' && Array.isArray(base_name) && base_name.length > 1) { + const realname = base_name.reduce((a, b) => a += `#${b}`, '_formdata_') + return realname + } + return base_name[0] || name +} + +/** + * 判断是否表单可用的真实name + * @param {String|Array} name 表单name + * @@return {String} 表单可用的真实name + */ +export const isRealName = (name) => { + const reg = /^_formdata_#*/ + return reg.test(name) +} + +/** + * 获取表单数据的原始格式 + * @@return {Object|Array} object 需要解析的数据 + */ +export const rawData = (object = {}, name) => { + let newData = JSON.parse(JSON.stringify(object)) + let formData = {} + for(let i in newData){ + let path = name2arr(i) + objSet(formData,path,newData[i]) + } + return formData +} + +/** + * 真实name还原为 array + * @param {*} name + */ +export const name2arr = (name) => { + let field = name.replace('_formdata_#', '') + field = field.split('#').map(v => (isNumber(v) ? Number(v) : v)) + return field +} + +/** + * 对象中设置值 + * @param {Object|Array} object 源数据 + * @param {String| Array} path 'a.b.c' 或 ['a',0,'b','c'] + * @param {String} value 需要设置的值 + */ +export const objSet = (object, path, value) => { + if (typeof object !== 'object') return object; + _basePath(path).reduce((o, k, i, _) => { + if (i === _.length - 1) { + // 若遍历结束直接赋值 + o[k] = value + return null + } else if (k in o) { + // 若存在对应路径,则返回找到的对象,进行下一次遍历 + return o[k] + } else { + // 若不存在对应路径,则创建对应对象,若下一路径是数字,新对象赋值为空数组,否则赋值为空对象 + o[k] = /^[0-9]{1,}$/.test(_[i + 1]) ? [] : {} + return o[k] + } + }, object) + // 返回object + return object; +} + +// 处理 path, path有三种形式:'a[0].b.c'、'a.0.b.c' 和 ['a','0','b','c'],需要统一处理成数组,便于后续使用 +function _basePath(path) { + // 若是数组,则直接返回 + if (Array.isArray(path)) return path + // 若有 '[',']',则替换成将 '[' 替换成 '.',去掉 ']' + return path.replace(/\[/g, '.').replace(/\]/g, '').split('.') +} + +/** + * 从对象中获取值 + * @param {Object|Array} object 源数据 + * @param {String| Array} path 'a.b.c' 或 ['a',0,'b','c'] + * @param {String} defaultVal 如果无法从调用链中获取值的默认值 + */ +export const objGet = (object, path, defaultVal = 'undefined') => { + // 先将path处理成统一格式 + let newPath = _basePath(path) + // 递归处理,返回最后结果 + let val = newPath.reduce((o, k) => { + return (o || {})[k] + }, object); + return !val || val !== undefined ? val : defaultVal +} + + +/** + * 是否为 number 类型 + * @param {any} num 需要判断的值 + * @return {Boolean} 是否为 number + */ +export const isNumber = (num) => { + return !isNaN(Number(num)) +} + +/** + * 是否为 boolean 类型 + * @param {any} bool 需要判断的值 + * @return {Boolean} 是否为 boolean + */ +export const isBoolean = (bool) => { + return (typeof bool === 'boolean') +} +/** + * 是否有必填字段 + * @param {Object} rules 规则 + * @return {Boolean} 是否有必填字段 + */ +export const isRequiredField = (rules) => { + let isNoField = false; + for (let i = 0; i < rules.length; i++) { + const ruleData = rules[i]; + if (ruleData.required) { + isNoField = true; + break; + } + } + return isNoField; +} + + +/** + * 获取数据类型 + * @param {Any} obj 需要获取数据类型的值 + */ +export const type = (obj) => { + var class2type = {}; + + // 生成class2type映射 + "Boolean Number String Function Array Date RegExp Object Error".split(" ").map(function(item, index) { + class2type["[object " + item + "]"] = item.toLowerCase(); + }) + if (obj == null) { + return obj + ""; + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[Object.prototype.toString.call(obj)] || "object" : + typeof obj; +} + +/** + * 判断两个值是否相等 + * @param {any} a 值 + * @param {any} b 值 + * @return {Boolean} 是否相等 + */ +export const isEqual = (a, b) => { + //如果a和b本来就全等 + if (a === b) { + //判断是否为0和-0 + return a !== 0 || 1 / a === 1 / b; + } + //判断是否为null和undefined + if (a == null || b == null) { + return a === b; + } + //接下来判断a和b的数据类型 + var classNameA = toString.call(a), + classNameB = toString.call(b); + //如果数据类型不相等,则返回false + if (classNameA !== classNameB) { + return false; + } + //如果数据类型相等,再根据不同数据类型分别判断 + switch (classNameA) { + case '[object RegExp]': + case '[object String]': + //进行字符串转换比较 + return '' + a === '' + b; + case '[object Number]': + //进行数字转换比较,判断是否为NaN + if (+a !== +a) { + return +b !== +b; + } + //判断是否为0或-0 + return +a === 0 ? 1 / +a === 1 / b : +a === +b; + case '[object Date]': + case '[object Boolean]': + return +a === +b; + } + //如果是对象类型 + if (classNameA == '[object Object]') { + //获取a和b的属性长度 + var propsA = Object.getOwnPropertyNames(a), + propsB = Object.getOwnPropertyNames(b); + if (propsA.length != propsB.length) { + return false; + } + for (var i = 0; i < propsA.length; i++) { + var propName = propsA[i]; + //如果对应属性对应值不相等,则返回false + if (a[propName] !== b[propName]) { + return false; + } + } + return true; + } + //如果是数组类型 + if (classNameA == '[object Array]') { + if (a.toString() == b.toString()) { + return true; + } + return false; + } +} diff --git a/fe/PDA/uni_modules/uni-forms/components/uni-forms/validate.js b/fe/PDA/uni_modules/uni-forms/components/uni-forms/validate.js new file mode 100644 index 000000000..1834c6cf6 --- /dev/null +++ b/fe/PDA/uni_modules/uni-forms/components/uni-forms/validate.js @@ -0,0 +1,486 @@ +var pattern = { + email: /^\S+?@\S+?\.\S+?$/, + idcard: /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, + url: new RegExp( + "^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", + 'i') +}; + +const FORMAT_MAPPING = { + "int": 'integer', + "bool": 'boolean', + "double": 'number', + "long": 'number', + "password": 'string' + // "fileurls": 'array' +} + +function formatMessage(args, resources = '') { + var defaultMessage = ['label'] + defaultMessage.forEach((item) => { + if (args[item] === undefined) { + args[item] = '' + } + }) + + let str = resources + for (let key in args) { + let reg = new RegExp('{' + key + '}') + str = str.replace(reg, args[key]) + } + return str +} + +function isEmptyValue(value, type) { + if (value === undefined || value === null) { + return true; + } + + if (typeof value === 'string' && !value) { + return true; + } + + if (Array.isArray(value) && !value.length) { + return true; + } + + if (type === 'object' && !Object.keys(value).length) { + return true; + } + + return false; +} + +const types = { + integer(value) { + return types.number(value) && parseInt(value, 10) === value; + }, + string(value) { + return typeof value === 'string'; + }, + number(value) { + if (isNaN(value)) { + return false; + } + return typeof value === 'number'; + }, + "boolean": function(value) { + return typeof value === 'boolean'; + }, + "float": function(value) { + return types.number(value) && !types.integer(value); + }, + array(value) { + return Array.isArray(value); + }, + object(value) { + return typeof value === 'object' && !types.array(value); + }, + date(value) { + return value instanceof Date; + }, + timestamp(value) { + if (!this.integer(value) || Math.abs(value).toString().length > 16) { + return false + } + return true; + }, + file(value) { + return typeof value.url === 'string'; + }, + email(value) { + return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255; + }, + url(value) { + return typeof value === 'string' && !!value.match(pattern.url); + }, + pattern(reg, value) { + try { + return new RegExp(reg).test(value); + } catch (e) { + return false; + } + }, + method(value) { + return typeof value === 'function'; + }, + idcard(value) { + return typeof value === 'string' && !!value.match(pattern.idcard); + }, + 'url-https'(value) { + return this.url(value) && value.startsWith('https://'); + }, + 'url-scheme'(value) { + return value.startsWith('://'); + }, + 'url-web'(value) { + return false; + } +} + +class RuleValidator { + + constructor(message) { + this._message = message + } + + async validateRule(fieldKey, fieldValue, value, data, allData) { + var result = null + + let rules = fieldValue.rules + + let hasRequired = rules.findIndex((item) => { + return item.required + }) + if (hasRequired < 0) { + if (value === null || value === undefined) { + return result + } + if (typeof value === 'string' && !value.length) { + return result + } + } + + var message = this._message + + if (rules === undefined) { + return message['default'] + } + + for (var i = 0; i < rules.length; i++) { + let rule = rules[i] + let vt = this._getValidateType(rule) + + Object.assign(rule, { + label: fieldValue.label || `["${fieldKey}"]` + }) + + if (RuleValidatorHelper[vt]) { + result = RuleValidatorHelper[vt](rule, value, message) + if (result != null) { + break + } + } + + if (rule.validateExpr) { + let now = Date.now() + let resultExpr = rule.validateExpr(value, allData, now) + if (resultExpr === false) { + result = this._getMessage(rule, rule.errorMessage || this._message['default']) + break + } + } + + if (rule.validateFunction) { + result = await this.validateFunction(rule, value, data, allData, vt) + if (result !== null) { + break + } + } + } + + if (result !== null) { + result = message.TAG + result + } + + return result + } + + async validateFunction(rule, value, data, allData, vt) { + let result = null + try { + let callbackMessage = null + const res = await rule.validateFunction(rule, value, allData || data, (message) => { + callbackMessage = message + }) + if (callbackMessage || (typeof res === 'string' && res) || res === false) { + result = this._getMessage(rule, callbackMessage || res, vt) + } + } catch (e) { + result = this._getMessage(rule, e.message, vt) + } + return result + } + + _getMessage(rule, message, vt) { + return formatMessage(rule, message || rule.errorMessage || this._message[vt] || message['default']) + } + + _getValidateType(rule) { + var result = '' + if (rule.required) { + result = 'required' + } else if (rule.format) { + result = 'format' + } else if (rule.arrayType) { + result = 'arrayTypeFormat' + } else if (rule.range) { + result = 'range' + } else if (rule.maximum !== undefined || rule.minimum !== undefined) { + result = 'rangeNumber' + } else if (rule.maxLength !== undefined || rule.minLength !== undefined) { + result = 'rangeLength' + } else if (rule.pattern) { + result = 'pattern' + } else if (rule.validateFunction) { + result = 'validateFunction' + } + return result + } +} + +const RuleValidatorHelper = { + required(rule, value, message) { + if (rule.required && isEmptyValue(value, rule.format || typeof value)) { + return formatMessage(rule, rule.errorMessage || message.required); + } + + return null + }, + + range(rule, value, message) { + const { + range, + errorMessage + } = rule; + + let list = new Array(range.length); + for (let i = 0; i < range.length; i++) { + const item = range[i]; + if (types.object(item) && item.value !== undefined) { + list[i] = item.value; + } else { + list[i] = item; + } + } + + let result = false + if (Array.isArray(value)) { + result = (new Set(value.concat(list)).size === list.length); + } else { + if (list.indexOf(value) > -1) { + result = true; + } + } + + if (!result) { + return formatMessage(rule, errorMessage || message['enum']); + } + + return null + }, + + rangeNumber(rule, value, message) { + if (!types.number(value)) { + return formatMessage(rule, rule.errorMessage || message.pattern.mismatch); + } + + let { + minimum, + maximum, + exclusiveMinimum, + exclusiveMaximum + } = rule; + let min = exclusiveMinimum ? value <= minimum : value < minimum; + let max = exclusiveMaximum ? value >= maximum : value > maximum; + + if (minimum !== undefined && min) { + return formatMessage(rule, rule.errorMessage || message['number'][exclusiveMinimum ? + 'exclusiveMinimum' : 'minimum' + ]) + } else if (maximum !== undefined && max) { + return formatMessage(rule, rule.errorMessage || message['number'][exclusiveMaximum ? + 'exclusiveMaximum' : 'maximum' + ]) + } else if (minimum !== undefined && maximum !== undefined && (min || max)) { + return formatMessage(rule, rule.errorMessage || message['number'].range) + } + + return null + }, + + rangeLength(rule, value, message) { + if (!types.string(value) && !types.array(value)) { + return formatMessage(rule, rule.errorMessage || message.pattern.mismatch); + } + + let min = rule.minLength; + let max = rule.maxLength; + let val = value.length; + + if (min !== undefined && val < min) { + return formatMessage(rule, rule.errorMessage || message['length'].minLength) + } else if (max !== undefined && val > max) { + return formatMessage(rule, rule.errorMessage || message['length'].maxLength) + } else if (min !== undefined && max !== undefined && (val < min || val > max)) { + return formatMessage(rule, rule.errorMessage || message['length'].range) + } + + return null + }, + + pattern(rule, value, message) { + if (!types['pattern'](rule.pattern, value)) { + return formatMessage(rule, rule.errorMessage || message.pattern.mismatch); + } + + return null + }, + + format(rule, value, message) { + var customTypes = Object.keys(types); + var format = FORMAT_MAPPING[rule.format] ? FORMAT_MAPPING[rule.format] : (rule.format || rule.arrayType); + + if (customTypes.indexOf(format) > -1) { + if (!types[format](value)) { + return formatMessage(rule, rule.errorMessage || message.typeError); + } + } + + return null + }, + + arrayTypeFormat(rule, value, message) { + if (!Array.isArray(value)) { + return formatMessage(rule, rule.errorMessage || message.typeError); + } + + for (let i = 0; i < value.length; i++) { + const element = value[i]; + let formatResult = this.format(rule, element, message) + if (formatResult !== null) { + return formatResult + } + } + + return null + } +} + +class SchemaValidator extends RuleValidator { + + constructor(schema, options) { + super(SchemaValidator.message); + + this._schema = schema + this._options = options || null + } + + updateSchema(schema) { + this._schema = schema + } + + async validate(data, allData) { + let result = this._checkFieldInSchema(data) + if (!result) { + result = await this.invokeValidate(data, false, allData) + } + return result.length ? result[0] : null + } + + async validateAll(data, allData) { + let result = this._checkFieldInSchema(data) + if (!result) { + result = await this.invokeValidate(data, true, allData) + } + return result + } + + async validateUpdate(data, allData) { + let result = this._checkFieldInSchema(data) + if (!result) { + result = await this.invokeValidateUpdate(data, false, allData) + } + return result.length ? result[0] : null + } + + async invokeValidate(data, all, allData) { + let result = [] + let schema = this._schema + for (let key in schema) { + let value = schema[key] + let errorMessage = await this.validateRule(key, value, data[key], data, allData) + if (errorMessage != null) { + result.push({ + key, + errorMessage + }) + if (!all) break + } + } + return result + } + + async invokeValidateUpdate(data, all, allData) { + let result = [] + for (let key in data) { + let errorMessage = await this.validateRule(key, this._schema[key], data[key], data, allData) + if (errorMessage != null) { + result.push({ + key, + errorMessage + }) + if (!all) break + } + } + return result + } + + _checkFieldInSchema(data) { + var keys = Object.keys(data) + var keys2 = Object.keys(this._schema) + if (new Set(keys.concat(keys2)).size === keys2.length) { + return '' + } + + var noExistFields = keys.filter((key) => { + return keys2.indexOf(key) < 0; + }) + var errorMessage = formatMessage({ + field: JSON.stringify(noExistFields) + }, SchemaValidator.message.TAG + SchemaValidator.message['defaultInvalid']) + return [{ + key: 'invalid', + errorMessage + }] + } +} + +function Message() { + return { + TAG: "", + default: '验证错误', + defaultInvalid: '提交的字段{field}在数据库中并不存在', + validateFunction: '验证无效', + required: '{label}必填', + 'enum': '{label}超出范围', + timestamp: '{label}格式无效', + whitespace: '{label}不能为空', + typeError: '{label}类型无效', + date: { + format: '{label}日期{value}格式无效', + parse: '{label}日期无法解析,{value}无效', + invalid: '{label}日期{value}无效' + }, + length: { + minLength: '{label}长度不能少于{minLength}', + maxLength: '{label}长度不能超过{maxLength}', + range: '{label}必须介于{minLength}和{maxLength}之间' + }, + number: { + minimum: '{label}不能小于{minimum}', + maximum: '{label}不能大于{maximum}', + exclusiveMinimum: '{label}不能小于等于{minimum}', + exclusiveMaximum: '{label}不能大于等于{maximum}', + range: '{label}必须介于{minimum}and{maximum}之间' + }, + pattern: { + mismatch: '{label}格式不匹配' + } + }; +} + + +SchemaValidator.message = new Message(); + +export default SchemaValidator diff --git a/fe/PDA/uni_modules/uni-forms/package.json b/fe/PDA/uni_modules/uni-forms/package.json new file mode 100644 index 000000000..e69d39b51 --- /dev/null +++ b/fe/PDA/uni_modules/uni-forms/package.json @@ -0,0 +1,91 @@ +{ + "id": "uni-forms", + "displayName": "uni-forms 表单", + "version": "1.4.6", + "description": "由输入框、选择器、单选框、多选框等控件组成,用以收集、校验、提交数据", + "keywords": [ + "uni-ui", + "表单", + "校验", + "表单校验", + "表单验证" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y", + "京东": "u" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/fe/PDA/uni_modules/uni-forms/readme.md b/fe/PDA/uni_modules/uni-forms/readme.md new file mode 100644 index 000000000..63d5a043e --- /dev/null +++ b/fe/PDA/uni_modules/uni-forms/readme.md @@ -0,0 +1,23 @@ + + +## Forms 表单 + +> **组件名:uni-forms** +> 代码块: `uForms`、`uni-forms-item` +> 关联组件:`uni-forms-item`、`uni-easyinput`、`uni-data-checkbox`、`uni-group`。 + + +uni-app的内置组件已经有了 `
    `组件,用于提交表单内容。 + +然而几乎每个表单都需要做表单验证,为了方便做表单验证,减少重复开发,`uni ui` 又基于 ``组件封装了 ``组件,内置了表单验证功能。 + +`` 提供了 `rules`属性来描述校验规则、``子组件来包裹具体的表单项,以及给原生或三方组件提供了 `binddata()` 来设置表单值。 + +每个要校验的表单项,不管input还是checkbox,都必须放在``组件中,且一个``组件只能放置一个表单项。 + +``组件内部预留了显示error message的区域,默认是在表单项的底部。 + +另外,``组件下面的各个表单项,可以通过``包裹为不同的分组。同一``下的不同表单项目将聚拢在一起,同其他group保持垂直间距。``仅影响视觉效果。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-forms) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-goods-nav/changelog.md b/fe/PDA/uni_modules/uni-goods-nav/changelog.md new file mode 100644 index 000000000..c6264c67e --- /dev/null +++ b/fe/PDA/uni_modules/uni-goods-nav/changelog.md @@ -0,0 +1,18 @@ +## 1.2.1(2022-05-30) +- 新增 stat属性,是否开启uni统计功能 +## 1.2.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-goods-nav](https://uniapp.dcloud.io/component/uniui/uni-goods-nav) +## 1.1.1(2021-08-24) +- 新增 支持国际化 +## 1.1.0(2021-07-13) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.0.7(2021-05-12) +- 新增 组件示例地址 +## 1.0.6(2021-04-21) +- 优化 添加依赖 uni-icons, 导入后自动下载依赖 +## 1.0.5(2021-02-05) +- 优化 组件引用关系,通过uni_modules引用组件 + +## 1.0.4(2021-02-05) +- 调整为uni_modules目录规范 diff --git a/fe/PDA/uni_modules/uni-goods-nav/components/uni-goods-nav/i18n/en.json b/fe/PDA/uni_modules/uni-goods-nav/components/uni-goods-nav/i18n/en.json new file mode 100644 index 000000000..dcdba41ce --- /dev/null +++ b/fe/PDA/uni_modules/uni-goods-nav/components/uni-goods-nav/i18n/en.json @@ -0,0 +1,6 @@ +{ + "uni-goods-nav.options.shop": "shop", + "uni-goods-nav.options.cart": "cart", + "uni-goods-nav.buttonGroup.addToCart": "add to cart", + "uni-goods-nav.buttonGroup.buyNow": "buy now" +} diff --git a/fe/PDA/uni_modules/uni-goods-nav/components/uni-goods-nav/i18n/index.js b/fe/PDA/uni_modules/uni-goods-nav/components/uni-goods-nav/i18n/index.js new file mode 100644 index 000000000..de7509c87 --- /dev/null +++ b/fe/PDA/uni_modules/uni-goods-nav/components/uni-goods-nav/i18n/index.js @@ -0,0 +1,8 @@ +import en from './en.json' +import zhHans from './zh-Hans.json' +import zhHant from './zh-Hant.json' +export default { + en, + 'zh-Hans': zhHans, + 'zh-Hant': zhHant +} diff --git a/fe/PDA/uni_modules/uni-goods-nav/components/uni-goods-nav/i18n/zh-Hans.json b/fe/PDA/uni_modules/uni-goods-nav/components/uni-goods-nav/i18n/zh-Hans.json new file mode 100644 index 000000000..48ee344c3 --- /dev/null +++ b/fe/PDA/uni_modules/uni-goods-nav/components/uni-goods-nav/i18n/zh-Hans.json @@ -0,0 +1,6 @@ +{ + "uni-goods-nav.options.shop": "店铺", + "uni-goods-nav.options.cart": "购物车", + "uni-goods-nav.buttonGroup.addToCart": "加入购物车", + "uni-goods-nav.buttonGroup.buyNow": "立即购买" +} diff --git a/fe/PDA/uni_modules/uni-goods-nav/components/uni-goods-nav/i18n/zh-Hant.json b/fe/PDA/uni_modules/uni-goods-nav/components/uni-goods-nav/i18n/zh-Hant.json new file mode 100644 index 000000000..d0a0255c7 --- /dev/null +++ b/fe/PDA/uni_modules/uni-goods-nav/components/uni-goods-nav/i18n/zh-Hant.json @@ -0,0 +1,6 @@ +{ + "uni-goods-nav.options.shop": "店鋪", + "uni-goods-nav.options.cart": "購物車", + "uni-goods-nav.buttonGroup.addToCart": "加入購物車", + "uni-goods-nav.buttonGroup.buyNow": "立即購買" +} diff --git a/fe/PDA/uni_modules/uni-goods-nav/components/uni-goods-nav/uni-goods-nav.vue b/fe/PDA/uni_modules/uni-goods-nav/components/uni-goods-nav/uni-goods-nav.vue new file mode 100644 index 000000000..8a16b1755 --- /dev/null +++ b/fe/PDA/uni_modules/uni-goods-nav/components/uni-goods-nav/uni-goods-nav.vue @@ -0,0 +1,229 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-goods-nav/package.json b/fe/PDA/uni_modules/uni-goods-nav/package.json new file mode 100644 index 000000000..636e45e7e --- /dev/null +++ b/fe/PDA/uni_modules/uni-goods-nav/package.json @@ -0,0 +1,88 @@ +{ + "id": "uni-goods-nav", + "displayName": "uni-goods-nav 商品导航", + "version": "1.2.1", + "description": "商品导航组件主要用于电商类应用底部导航,可自定义加入购物车,购买等操作", + "keywords": [ + "uni-ui", + "uniui", + "商品导航" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/fe/PDA/uni_modules/uni-goods-nav/readme.md b/fe/PDA/uni_modules/uni-goods-nav/readme.md new file mode 100644 index 000000000..07df93f55 --- /dev/null +++ b/fe/PDA/uni_modules/uni-goods-nav/readme.md @@ -0,0 +1,10 @@ + + +## GoodsNav 商品导航 +> **组件名:uni-goods-nav** +> 代码块: `uGoodsNav` + +商品加入购物车,立即购买等。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-goods-nav) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-grid/changelog.md b/fe/PDA/uni_modules/uni-grid/changelog.md new file mode 100644 index 000000000..d301166cf --- /dev/null +++ b/fe/PDA/uni_modules/uni-grid/changelog.md @@ -0,0 +1,13 @@ +## 1.4.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-grid](https://uniapp.dcloud.io/component/uniui/uni-grid) +## 1.3.2(2021-11-09) +- 新增 提供组件设计资源,组件样式调整 +## 1.3.1(2021-07-30) +- 优化 vue3下事件警告的问题 +## 1.3.0(2021-07-13) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.2.4(2021-05-12) +- 新增 组件示例地址 +## 1.2.3(2021-02-05) +- 调整为uni_modules目录规范 diff --git a/fe/PDA/uni_modules/uni-grid/components/uni-grid-item/uni-grid-item.vue b/fe/PDA/uni_modules/uni-grid/components/uni-grid-item/uni-grid-item.vue new file mode 100644 index 000000000..19c08d7a0 --- /dev/null +++ b/fe/PDA/uni_modules/uni-grid/components/uni-grid-item/uni-grid-item.vue @@ -0,0 +1,127 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-grid/components/uni-grid/uni-grid.vue b/fe/PDA/uni_modules/uni-grid/components/uni-grid/uni-grid.vue new file mode 100644 index 000000000..0edc7ffe9 --- /dev/null +++ b/fe/PDA/uni_modules/uni-grid/components/uni-grid/uni-grid.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-grid/package.json b/fe/PDA/uni_modules/uni-grid/package.json new file mode 100644 index 000000000..ccb2c9171 --- /dev/null +++ b/fe/PDA/uni_modules/uni-grid/package.json @@ -0,0 +1,86 @@ +{ + "id": "uni-grid", + "displayName": "uni-grid 宫格", + "version": "1.4.0", + "description": "Grid 宫格组件,提供移动端常见的宫格布局,如九宫格。", + "keywords": [ + "uni-ui", + "uniui", + "九宫格", + "表格" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss","uni-icons"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/fe/PDA/uni_modules/uni-grid/readme.md b/fe/PDA/uni_modules/uni-grid/readme.md new file mode 100644 index 000000000..0aa44cc13 --- /dev/null +++ b/fe/PDA/uni_modules/uni-grid/readme.md @@ -0,0 +1,11 @@ + + +## Grid 宫格 +> **组件名:uni-grid** +> 代码块: `uGrid` + + +宫格组件。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-grid) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-group/changelog.md b/fe/PDA/uni_modules/uni-group/changelog.md new file mode 100644 index 000000000..a7024fdf8 --- /dev/null +++ b/fe/PDA/uni_modules/uni-group/changelog.md @@ -0,0 +1,16 @@ +## 1.2.2(2022-05-30) +- 新增 stat属性,是否开启uni统计功能 +## 1.2.1(2021-11-22) +- 修复 vue3中某些scss变量无法找到的问题 +## 1.2.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-group](https://uniapp.dcloud.io/component/uniui/uni-group) +## 1.1.7(2021-11-08) +## 1.1.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +- 优化 组件文档 +## 1.0.3(2021-05-12) +- 新增 组件示例地址 +## 1.0.2(2021-02-05) +- 调整为uni_modules目录规范 +- 优化 兼容 nvue 页面 diff --git a/fe/PDA/uni_modules/uni-group/components/uni-group/uni-group.vue b/fe/PDA/uni_modules/uni-group/components/uni-group/uni-group.vue new file mode 100644 index 000000000..3425ecd3a --- /dev/null +++ b/fe/PDA/uni_modules/uni-group/components/uni-group/uni-group.vue @@ -0,0 +1,134 @@ + + + + diff --git a/fe/PDA/uni_modules/uni-group/package.json b/fe/PDA/uni_modules/uni-group/package.json new file mode 100644 index 000000000..ea00a08c2 --- /dev/null +++ b/fe/PDA/uni_modules/uni-group/package.json @@ -0,0 +1,87 @@ +{ + "id": "uni-group", + "displayName": "uni-group 分组", + "version": "1.2.2", + "description": "分组组件可用于将组件用于分组,添加间隔,以产生明显的区块", + "keywords": [ + "uni-ui", + "uniui", + "group", + "分组", + "" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-group/readme.md b/fe/PDA/uni_modules/uni-group/readme.md new file mode 100644 index 000000000..bae67f468 --- /dev/null +++ b/fe/PDA/uni_modules/uni-group/readme.md @@ -0,0 +1,9 @@ + +## Group 分组 +> **组件名:uni-group** +> 代码块: `uGroup` + +分组组件可用于将组件分组,添加间隔,以产生明显的区块。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-group) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-icons/changelog.md b/fe/PDA/uni_modules/uni-icons/changelog.md new file mode 100644 index 000000000..64498853c --- /dev/null +++ b/fe/PDA/uni_modules/uni-icons/changelog.md @@ -0,0 +1,22 @@ +## 1.3.5(2022-01-24) +- 优化 size 属性可以传入不带单位的字符串数值 +## 1.3.4(2022-01-24) +- 优化 size 支持其他单位 +## 1.3.3(2022-01-17) +- 修复 nvue 有些图标不显示的bug,兼容老版本图标 +## 1.3.2(2021-12-01) +- 优化 示例可复制图标名称 +## 1.3.1(2021-11-23) +- 优化 兼容旧组件 type 值 +## 1.3.0(2021-11-19) +- 新增 更多图标 +- 优化 自定义图标使用方式 +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons) +## 1.1.7(2021-11-08) +## 1.2.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.1.5(2021-05-12) +- 新增 组件示例地址 +## 1.1.4(2021-02-05) +- 调整为uni_modules目录规范 diff --git a/fe/PDA/uni_modules/uni-icons/components/uni-icons/icons.js b/fe/PDA/uni_modules/uni-icons/components/uni-icons/icons.js new file mode 100644 index 000000000..78899364e --- /dev/null +++ b/fe/PDA/uni_modules/uni-icons/components/uni-icons/icons.js @@ -0,0 +1,1169 @@ +export default { + "id": "2852637", + "name": "uniui图标库", + "font_family": "uniicons", + "css_prefix_text": "uniui-", + "description": "", + "glyphs": [ + { + "icon_id": "25027049", + "name": "yanse", + "font_class": "color", + "unicode": "e6cf", + "unicode_decimal": 59087 + }, + { + "icon_id": "25027048", + "name": "wallet", + "font_class": "wallet", + "unicode": "e6b1", + "unicode_decimal": 59057 + }, + { + "icon_id": "25015720", + "name": "settings-filled", + "font_class": "settings-filled", + "unicode": "e6ce", + "unicode_decimal": 59086 + }, + { + "icon_id": "25015434", + "name": "shimingrenzheng-filled", + "font_class": "auth-filled", + "unicode": "e6cc", + "unicode_decimal": 59084 + }, + { + "icon_id": "24934246", + "name": "shop-filled", + "font_class": "shop-filled", + "unicode": "e6cd", + "unicode_decimal": 59085 + }, + { + "icon_id": "24934159", + "name": "staff-filled-01", + "font_class": "staff-filled", + "unicode": "e6cb", + "unicode_decimal": 59083 + }, + { + "icon_id": "24932461", + "name": "VIP-filled", + "font_class": "vip-filled", + "unicode": "e6c6", + "unicode_decimal": 59078 + }, + { + "icon_id": "24932462", + "name": "plus_circle_fill", + "font_class": "plus-filled", + "unicode": "e6c7", + "unicode_decimal": 59079 + }, + { + "icon_id": "24932463", + "name": "folder_add-filled", + "font_class": "folder-add-filled", + "unicode": "e6c8", + "unicode_decimal": 59080 + }, + { + "icon_id": "24932464", + "name": "yanse-filled", + "font_class": "color-filled", + "unicode": "e6c9", + "unicode_decimal": 59081 + }, + { + "icon_id": "24932465", + "name": "tune-filled", + "font_class": "tune-filled", + "unicode": "e6ca", + "unicode_decimal": 59082 + }, + { + "icon_id": "24932455", + "name": "a-rilidaka-filled", + "font_class": "calendar-filled", + "unicode": "e6c0", + "unicode_decimal": 59072 + }, + { + "icon_id": "24932456", + "name": "notification-filled", + "font_class": "notification-filled", + "unicode": "e6c1", + "unicode_decimal": 59073 + }, + { + "icon_id": "24932457", + "name": "wallet-filled", + "font_class": "wallet-filled", + "unicode": "e6c2", + "unicode_decimal": 59074 + }, + { + "icon_id": "24932458", + "name": "paihangbang-filled", + "font_class": "medal-filled", + "unicode": "e6c3", + "unicode_decimal": 59075 + }, + { + "icon_id": "24932459", + "name": "gift-filled", + "font_class": "gift-filled", + "unicode": "e6c4", + "unicode_decimal": 59076 + }, + { + "icon_id": "24932460", + "name": "fire-filled", + "font_class": "fire-filled", + "unicode": "e6c5", + "unicode_decimal": 59077 + }, + { + "icon_id": "24928001", + "name": "refreshempty", + "font_class": "refreshempty", + "unicode": "e6bf", + "unicode_decimal": 59071 + }, + { + "icon_id": "24926853", + "name": "location-ellipse", + "font_class": "location-filled", + "unicode": "e6af", + "unicode_decimal": 59055 + }, + { + "icon_id": "24926735", + "name": "person-filled", + "font_class": "person-filled", + "unicode": "e69d", + "unicode_decimal": 59037 + }, + { + "icon_id": "24926703", + "name": "personadd-filled", + "font_class": "personadd-filled", + "unicode": "e698", + "unicode_decimal": 59032 + }, + { + "icon_id": "24923351", + "name": "back", + "font_class": "back", + "unicode": "e6b9", + "unicode_decimal": 59065 + }, + { + "icon_id": "24923352", + "name": "forward", + "font_class": "forward", + "unicode": "e6ba", + "unicode_decimal": 59066 + }, + { + "icon_id": "24923353", + "name": "arrowthinright", + "font_class": "arrow-right", + "unicode": "e6bb", + "unicode_decimal": 59067 + }, + { + "icon_id": "24923353", + "name": "arrowthinright", + "font_class": "arrowthinright", + "unicode": "e6bb", + "unicode_decimal": 59067 + }, + { + "icon_id": "24923354", + "name": "arrowthinleft", + "font_class": "arrow-left", + "unicode": "e6bc", + "unicode_decimal": 59068 + }, + { + "icon_id": "24923354", + "name": "arrowthinleft", + "font_class": "arrowthinleft", + "unicode": "e6bc", + "unicode_decimal": 59068 + }, + { + "icon_id": "24923355", + "name": "arrowthinup", + "font_class": "arrow-up", + "unicode": "e6bd", + "unicode_decimal": 59069 + }, + { + "icon_id": "24923355", + "name": "arrowthinup", + "font_class": "arrowthinup", + "unicode": "e6bd", + "unicode_decimal": 59069 + }, + { + "icon_id": "24923356", + "name": "arrowthindown", + "font_class": "arrow-down", + "unicode": "e6be", + "unicode_decimal": 59070 + },{ + "icon_id": "24923356", + "name": "arrowthindown", + "font_class": "arrowthindown", + "unicode": "e6be", + "unicode_decimal": 59070 + }, + { + "icon_id": "24923349", + "name": "arrowdown", + "font_class": "bottom", + "unicode": "e6b8", + "unicode_decimal": 59064 + },{ + "icon_id": "24923349", + "name": "arrowdown", + "font_class": "arrowdown", + "unicode": "e6b8", + "unicode_decimal": 59064 + }, + { + "icon_id": "24923346", + "name": "arrowright", + "font_class": "right", + "unicode": "e6b5", + "unicode_decimal": 59061 + }, + { + "icon_id": "24923346", + "name": "arrowright", + "font_class": "arrowright", + "unicode": "e6b5", + "unicode_decimal": 59061 + }, + { + "icon_id": "24923347", + "name": "arrowup", + "font_class": "top", + "unicode": "e6b6", + "unicode_decimal": 59062 + }, + { + "icon_id": "24923347", + "name": "arrowup", + "font_class": "arrowup", + "unicode": "e6b6", + "unicode_decimal": 59062 + }, + { + "icon_id": "24923348", + "name": "arrowleft", + "font_class": "left", + "unicode": "e6b7", + "unicode_decimal": 59063 + }, + { + "icon_id": "24923348", + "name": "arrowleft", + "font_class": "arrowleft", + "unicode": "e6b7", + "unicode_decimal": 59063 + }, + { + "icon_id": "24923334", + "name": "eye", + "font_class": "eye", + "unicode": "e651", + "unicode_decimal": 58961 + }, + { + "icon_id": "24923335", + "name": "eye-filled", + "font_class": "eye-filled", + "unicode": "e66a", + "unicode_decimal": 58986 + }, + { + "icon_id": "24923336", + "name": "eye-slash", + "font_class": "eye-slash", + "unicode": "e6b3", + "unicode_decimal": 59059 + }, + { + "icon_id": "24923337", + "name": "eye-slash-filled", + "font_class": "eye-slash-filled", + "unicode": "e6b4", + "unicode_decimal": 59060 + }, + { + "icon_id": "24923305", + "name": "info-filled", + "font_class": "info-filled", + "unicode": "e649", + "unicode_decimal": 58953 + }, + { + "icon_id": "24923299", + "name": "reload-01", + "font_class": "reload", + "unicode": "e6b2", + "unicode_decimal": 59058 + }, + { + "icon_id": "24923195", + "name": "mic_slash_fill", + "font_class": "micoff-filled", + "unicode": "e6b0", + "unicode_decimal": 59056 + }, + { + "icon_id": "24923165", + "name": "map-pin-ellipse", + "font_class": "map-pin-ellipse", + "unicode": "e6ac", + "unicode_decimal": 59052 + }, + { + "icon_id": "24923166", + "name": "map-pin", + "font_class": "map-pin", + "unicode": "e6ad", + "unicode_decimal": 59053 + }, + { + "icon_id": "24923167", + "name": "location", + "font_class": "location", + "unicode": "e6ae", + "unicode_decimal": 59054 + }, + { + "icon_id": "24923064", + "name": "starhalf", + "font_class": "starhalf", + "unicode": "e683", + "unicode_decimal": 59011 + }, + { + "icon_id": "24923065", + "name": "star", + "font_class": "star", + "unicode": "e688", + "unicode_decimal": 59016 + }, + { + "icon_id": "24923066", + "name": "star-filled", + "font_class": "star-filled", + "unicode": "e68f", + "unicode_decimal": 59023 + }, + { + "icon_id": "24899646", + "name": "a-rilidaka", + "font_class": "calendar", + "unicode": "e6a0", + "unicode_decimal": 59040 + }, + { + "icon_id": "24899647", + "name": "fire", + "font_class": "fire", + "unicode": "e6a1", + "unicode_decimal": 59041 + }, + { + "icon_id": "24899648", + "name": "paihangbang", + "font_class": "medal", + "unicode": "e6a2", + "unicode_decimal": 59042 + }, + { + "icon_id": "24899649", + "name": "font", + "font_class": "font", + "unicode": "e6a3", + "unicode_decimal": 59043 + }, + { + "icon_id": "24899650", + "name": "gift", + "font_class": "gift", + "unicode": "e6a4", + "unicode_decimal": 59044 + }, + { + "icon_id": "24899651", + "name": "link", + "font_class": "link", + "unicode": "e6a5", + "unicode_decimal": 59045 + }, + { + "icon_id": "24899652", + "name": "notification", + "font_class": "notification", + "unicode": "e6a6", + "unicode_decimal": 59046 + }, + { + "icon_id": "24899653", + "name": "staff", + "font_class": "staff", + "unicode": "e6a7", + "unicode_decimal": 59047 + }, + { + "icon_id": "24899654", + "name": "VIP", + "font_class": "vip", + "unicode": "e6a8", + "unicode_decimal": 59048 + }, + { + "icon_id": "24899655", + "name": "folder_add", + "font_class": "folder-add", + "unicode": "e6a9", + "unicode_decimal": 59049 + }, + { + "icon_id": "24899656", + "name": "tune", + "font_class": "tune", + "unicode": "e6aa", + "unicode_decimal": 59050 + }, + { + "icon_id": "24899657", + "name": "shimingrenzheng", + "font_class": "auth", + "unicode": "e6ab", + "unicode_decimal": 59051 + }, + { + "icon_id": "24899565", + "name": "person", + "font_class": "person", + "unicode": "e699", + "unicode_decimal": 59033 + }, + { + "icon_id": "24899566", + "name": "email-filled", + "font_class": "email-filled", + "unicode": "e69a", + "unicode_decimal": 59034 + }, + { + "icon_id": "24899567", + "name": "phone-filled", + "font_class": "phone-filled", + "unicode": "e69b", + "unicode_decimal": 59035 + }, + { + "icon_id": "24899568", + "name": "phone", + "font_class": "phone", + "unicode": "e69c", + "unicode_decimal": 59036 + }, + { + "icon_id": "24899570", + "name": "email", + "font_class": "email", + "unicode": "e69e", + "unicode_decimal": 59038 + }, + { + "icon_id": "24899571", + "name": "personadd", + "font_class": "personadd", + "unicode": "e69f", + "unicode_decimal": 59039 + }, + { + "icon_id": "24899558", + "name": "chatboxes-filled", + "font_class": "chatboxes-filled", + "unicode": "e692", + "unicode_decimal": 59026 + }, + { + "icon_id": "24899559", + "name": "contact", + "font_class": "contact", + "unicode": "e693", + "unicode_decimal": 59027 + }, + { + "icon_id": "24899560", + "name": "chatbubble-filled", + "font_class": "chatbubble-filled", + "unicode": "e694", + "unicode_decimal": 59028 + }, + { + "icon_id": "24899561", + "name": "contact-filled", + "font_class": "contact-filled", + "unicode": "e695", + "unicode_decimal": 59029 + }, + { + "icon_id": "24899562", + "name": "chatboxes", + "font_class": "chatboxes", + "unicode": "e696", + "unicode_decimal": 59030 + }, + { + "icon_id": "24899563", + "name": "chatbubble", + "font_class": "chatbubble", + "unicode": "e697", + "unicode_decimal": 59031 + }, + { + "icon_id": "24881290", + "name": "upload-filled", + "font_class": "upload-filled", + "unicode": "e68e", + "unicode_decimal": 59022 + }, + { + "icon_id": "24881292", + "name": "upload", + "font_class": "upload", + "unicode": "e690", + "unicode_decimal": 59024 + }, + { + "icon_id": "24881293", + "name": "weixin", + "font_class": "weixin", + "unicode": "e691", + "unicode_decimal": 59025 + }, + { + "icon_id": "24881274", + "name": "compose", + "font_class": "compose", + "unicode": "e67f", + "unicode_decimal": 59007 + }, + { + "icon_id": "24881275", + "name": "qq", + "font_class": "qq", + "unicode": "e680", + "unicode_decimal": 59008 + }, + { + "icon_id": "24881276", + "name": "download-filled", + "font_class": "download-filled", + "unicode": "e681", + "unicode_decimal": 59009 + }, + { + "icon_id": "24881277", + "name": "pengyouquan", + "font_class": "pyq", + "unicode": "e682", + "unicode_decimal": 59010 + }, + { + "icon_id": "24881279", + "name": "sound", + "font_class": "sound", + "unicode": "e684", + "unicode_decimal": 59012 + }, + { + "icon_id": "24881280", + "name": "trash-filled", + "font_class": "trash-filled", + "unicode": "e685", + "unicode_decimal": 59013 + }, + { + "icon_id": "24881281", + "name": "sound-filled", + "font_class": "sound-filled", + "unicode": "e686", + "unicode_decimal": 59014 + }, + { + "icon_id": "24881282", + "name": "trash", + "font_class": "trash", + "unicode": "e687", + "unicode_decimal": 59015 + }, + { + "icon_id": "24881284", + "name": "videocam-filled", + "font_class": "videocam-filled", + "unicode": "e689", + "unicode_decimal": 59017 + }, + { + "icon_id": "24881285", + "name": "spinner-cycle", + "font_class": "spinner-cycle", + "unicode": "e68a", + "unicode_decimal": 59018 + }, + { + "icon_id": "24881286", + "name": "weibo", + "font_class": "weibo", + "unicode": "e68b", + "unicode_decimal": 59019 + }, + { + "icon_id": "24881288", + "name": "videocam", + "font_class": "videocam", + "unicode": "e68c", + "unicode_decimal": 59020 + }, + { + "icon_id": "24881289", + "name": "download", + "font_class": "download", + "unicode": "e68d", + "unicode_decimal": 59021 + }, + { + "icon_id": "24879601", + "name": "help", + "font_class": "help", + "unicode": "e679", + "unicode_decimal": 59001 + }, + { + "icon_id": "24879602", + "name": "navigate-filled", + "font_class": "navigate-filled", + "unicode": "e67a", + "unicode_decimal": 59002 + }, + { + "icon_id": "24879603", + "name": "plusempty", + "font_class": "plusempty", + "unicode": "e67b", + "unicode_decimal": 59003 + }, + { + "icon_id": "24879604", + "name": "smallcircle", + "font_class": "smallcircle", + "unicode": "e67c", + "unicode_decimal": 59004 + }, + { + "icon_id": "24879605", + "name": "minus-filled", + "font_class": "minus-filled", + "unicode": "e67d", + "unicode_decimal": 59005 + }, + { + "icon_id": "24879606", + "name": "micoff", + "font_class": "micoff", + "unicode": "e67e", + "unicode_decimal": 59006 + }, + { + "icon_id": "24879588", + "name": "closeempty", + "font_class": "closeempty", + "unicode": "e66c", + "unicode_decimal": 58988 + }, + { + "icon_id": "24879589", + "name": "clear", + "font_class": "clear", + "unicode": "e66d", + "unicode_decimal": 58989 + }, + { + "icon_id": "24879590", + "name": "navigate", + "font_class": "navigate", + "unicode": "e66e", + "unicode_decimal": 58990 + }, + { + "icon_id": "24879591", + "name": "minus", + "font_class": "minus", + "unicode": "e66f", + "unicode_decimal": 58991 + }, + { + "icon_id": "24879592", + "name": "image", + "font_class": "image", + "unicode": "e670", + "unicode_decimal": 58992 + }, + { + "icon_id": "24879593", + "name": "mic", + "font_class": "mic", + "unicode": "e671", + "unicode_decimal": 58993 + }, + { + "icon_id": "24879594", + "name": "paperplane", + "font_class": "paperplane", + "unicode": "e672", + "unicode_decimal": 58994 + }, + { + "icon_id": "24879595", + "name": "close", + "font_class": "close", + "unicode": "e673", + "unicode_decimal": 58995 + }, + { + "icon_id": "24879596", + "name": "help-filled", + "font_class": "help-filled", + "unicode": "e674", + "unicode_decimal": 58996 + }, + { + "icon_id": "24879597", + "name": "plus-filled", + "font_class": "paperplane-filled", + "unicode": "e675", + "unicode_decimal": 58997 + }, + { + "icon_id": "24879598", + "name": "plus", + "font_class": "plus", + "unicode": "e676", + "unicode_decimal": 58998 + }, + { + "icon_id": "24879599", + "name": "mic-filled", + "font_class": "mic-filled", + "unicode": "e677", + "unicode_decimal": 58999 + }, + { + "icon_id": "24879600", + "name": "image-filled", + "font_class": "image-filled", + "unicode": "e678", + "unicode_decimal": 59000 + }, + { + "icon_id": "24855900", + "name": "locked-filled", + "font_class": "locked-filled", + "unicode": "e668", + "unicode_decimal": 58984 + }, + { + "icon_id": "24855901", + "name": "info", + "font_class": "info", + "unicode": "e669", + "unicode_decimal": 58985 + }, + { + "icon_id": "24855903", + "name": "locked", + "font_class": "locked", + "unicode": "e66b", + "unicode_decimal": 58987 + }, + { + "icon_id": "24855884", + "name": "camera-filled", + "font_class": "camera-filled", + "unicode": "e658", + "unicode_decimal": 58968 + }, + { + "icon_id": "24855885", + "name": "chat-filled", + "font_class": "chat-filled", + "unicode": "e659", + "unicode_decimal": 58969 + }, + { + "icon_id": "24855886", + "name": "camera", + "font_class": "camera", + "unicode": "e65a", + "unicode_decimal": 58970 + }, + { + "icon_id": "24855887", + "name": "circle", + "font_class": "circle", + "unicode": "e65b", + "unicode_decimal": 58971 + }, + { + "icon_id": "24855888", + "name": "checkmarkempty", + "font_class": "checkmarkempty", + "unicode": "e65c", + "unicode_decimal": 58972 + }, + { + "icon_id": "24855889", + "name": "chat", + "font_class": "chat", + "unicode": "e65d", + "unicode_decimal": 58973 + }, + { + "icon_id": "24855890", + "name": "circle-filled", + "font_class": "circle-filled", + "unicode": "e65e", + "unicode_decimal": 58974 + }, + { + "icon_id": "24855891", + "name": "flag", + "font_class": "flag", + "unicode": "e65f", + "unicode_decimal": 58975 + }, + { + "icon_id": "24855892", + "name": "flag-filled", + "font_class": "flag-filled", + "unicode": "e660", + "unicode_decimal": 58976 + }, + { + "icon_id": "24855893", + "name": "gear-filled", + "font_class": "gear-filled", + "unicode": "e661", + "unicode_decimal": 58977 + }, + { + "icon_id": "24855894", + "name": "home", + "font_class": "home", + "unicode": "e662", + "unicode_decimal": 58978 + }, + { + "icon_id": "24855895", + "name": "home-filled", + "font_class": "home-filled", + "unicode": "e663", + "unicode_decimal": 58979 + }, + { + "icon_id": "24855896", + "name": "gear", + "font_class": "gear", + "unicode": "e664", + "unicode_decimal": 58980 + }, + { + "icon_id": "24855897", + "name": "smallcircle-filled", + "font_class": "smallcircle-filled", + "unicode": "e665", + "unicode_decimal": 58981 + }, + { + "icon_id": "24855898", + "name": "map-filled", + "font_class": "map-filled", + "unicode": "e666", + "unicode_decimal": 58982 + }, + { + "icon_id": "24855899", + "name": "map", + "font_class": "map", + "unicode": "e667", + "unicode_decimal": 58983 + }, + { + "icon_id": "24855825", + "name": "refresh-filled", + "font_class": "refresh-filled", + "unicode": "e656", + "unicode_decimal": 58966 + }, + { + "icon_id": "24855826", + "name": "refresh", + "font_class": "refresh", + "unicode": "e657", + "unicode_decimal": 58967 + }, + { + "icon_id": "24855808", + "name": "cloud-upload", + "font_class": "cloud-upload", + "unicode": "e645", + "unicode_decimal": 58949 + }, + { + "icon_id": "24855809", + "name": "cloud-download-filled", + "font_class": "cloud-download-filled", + "unicode": "e646", + "unicode_decimal": 58950 + }, + { + "icon_id": "24855810", + "name": "cloud-download", + "font_class": "cloud-download", + "unicode": "e647", + "unicode_decimal": 58951 + }, + { + "icon_id": "24855811", + "name": "cloud-upload-filled", + "font_class": "cloud-upload-filled", + "unicode": "e648", + "unicode_decimal": 58952 + }, + { + "icon_id": "24855813", + "name": "redo", + "font_class": "redo", + "unicode": "e64a", + "unicode_decimal": 58954 + }, + { + "icon_id": "24855814", + "name": "images-filled", + "font_class": "images-filled", + "unicode": "e64b", + "unicode_decimal": 58955 + }, + { + "icon_id": "24855815", + "name": "undo-filled", + "font_class": "undo-filled", + "unicode": "e64c", + "unicode_decimal": 58956 + }, + { + "icon_id": "24855816", + "name": "more", + "font_class": "more", + "unicode": "e64d", + "unicode_decimal": 58957 + }, + { + "icon_id": "24855817", + "name": "more-filled", + "font_class": "more-filled", + "unicode": "e64e", + "unicode_decimal": 58958 + }, + { + "icon_id": "24855818", + "name": "undo", + "font_class": "undo", + "unicode": "e64f", + "unicode_decimal": 58959 + }, + { + "icon_id": "24855819", + "name": "images", + "font_class": "images", + "unicode": "e650", + "unicode_decimal": 58960 + }, + { + "icon_id": "24855821", + "name": "paperclip", + "font_class": "paperclip", + "unicode": "e652", + "unicode_decimal": 58962 + }, + { + "icon_id": "24855822", + "name": "settings", + "font_class": "settings", + "unicode": "e653", + "unicode_decimal": 58963 + }, + { + "icon_id": "24855823", + "name": "search", + "font_class": "search", + "unicode": "e654", + "unicode_decimal": 58964 + }, + { + "icon_id": "24855824", + "name": "redo-filled", + "font_class": "redo-filled", + "unicode": "e655", + "unicode_decimal": 58965 + }, + { + "icon_id": "24841702", + "name": "list", + "font_class": "list", + "unicode": "e644", + "unicode_decimal": 58948 + }, + { + "icon_id": "24841489", + "name": "mail-open-filled", + "font_class": "mail-open-filled", + "unicode": "e63a", + "unicode_decimal": 58938 + }, + { + "icon_id": "24841491", + "name": "hand-thumbsdown-filled", + "font_class": "hand-down-filled", + "unicode": "e63c", + "unicode_decimal": 58940 + }, + { + "icon_id": "24841492", + "name": "hand-thumbsdown", + "font_class": "hand-down", + "unicode": "e63d", + "unicode_decimal": 58941 + }, + { + "icon_id": "24841493", + "name": "hand-thumbsup-filled", + "font_class": "hand-up-filled", + "unicode": "e63e", + "unicode_decimal": 58942 + }, + { + "icon_id": "24841494", + "name": "hand-thumbsup", + "font_class": "hand-up", + "unicode": "e63f", + "unicode_decimal": 58943 + }, + { + "icon_id": "24841496", + "name": "heart-filled", + "font_class": "heart-filled", + "unicode": "e641", + "unicode_decimal": 58945 + }, + { + "icon_id": "24841498", + "name": "mail-open", + "font_class": "mail-open", + "unicode": "e643", + "unicode_decimal": 58947 + }, + { + "icon_id": "24841488", + "name": "heart", + "font_class": "heart", + "unicode": "e639", + "unicode_decimal": 58937 + }, + { + "icon_id": "24839963", + "name": "loop", + "font_class": "loop", + "unicode": "e633", + "unicode_decimal": 58931 + }, + { + "icon_id": "24839866", + "name": "pulldown", + "font_class": "pulldown", + "unicode": "e632", + "unicode_decimal": 58930 + }, + { + "icon_id": "24813798", + "name": "scan", + "font_class": "scan", + "unicode": "e62a", + "unicode_decimal": 58922 + }, + { + "icon_id": "24813786", + "name": "bars", + "font_class": "bars", + "unicode": "e627", + "unicode_decimal": 58919 + }, + { + "icon_id": "24813788", + "name": "cart-filled", + "font_class": "cart-filled", + "unicode": "e629", + "unicode_decimal": 58921 + }, + { + "icon_id": "24813790", + "name": "checkbox", + "font_class": "checkbox", + "unicode": "e62b", + "unicode_decimal": 58923 + }, + { + "icon_id": "24813791", + "name": "checkbox-filled", + "font_class": "checkbox-filled", + "unicode": "e62c", + "unicode_decimal": 58924 + }, + { + "icon_id": "24813794", + "name": "shop", + "font_class": "shop", + "unicode": "e62f", + "unicode_decimal": 58927 + }, + { + "icon_id": "24813795", + "name": "headphones", + "font_class": "headphones", + "unicode": "e630", + "unicode_decimal": 58928 + }, + { + "icon_id": "24813796", + "name": "cart", + "font_class": "cart", + "unicode": "e631", + "unicode_decimal": 58929 + } + ] +} diff --git a/fe/PDA/uni_modules/uni-icons/components/uni-icons/uni-icons.vue b/fe/PDA/uni_modules/uni-icons/components/uni-icons/uni-icons.vue new file mode 100644 index 000000000..86e744452 --- /dev/null +++ b/fe/PDA/uni_modules/uni-icons/components/uni-icons/uni-icons.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-icons/components/uni-icons/uni.ttf b/fe/PDA/uni_modules/uni-icons/components/uni-icons/uni.ttf new file mode 100644 index 000000000..60a1968d0 Binary files /dev/null and b/fe/PDA/uni_modules/uni-icons/components/uni-icons/uni.ttf differ diff --git a/fe/PDA/uni_modules/uni-icons/components/uni-icons/uniicons.css b/fe/PDA/uni_modules/uni-icons/components/uni-icons/uniicons.css new file mode 100644 index 000000000..2f56eabde --- /dev/null +++ b/fe/PDA/uni_modules/uni-icons/components/uni-icons/uniicons.css @@ -0,0 +1,663 @@ +.uniui-color:before { + content: "\e6cf"; +} + +.uniui-wallet:before { + content: "\e6b1"; +} + +.uniui-settings-filled:before { + content: "\e6ce"; +} + +.uniui-auth-filled:before { + content: "\e6cc"; +} + +.uniui-shop-filled:before { + content: "\e6cd"; +} + +.uniui-staff-filled:before { + content: "\e6cb"; +} + +.uniui-vip-filled:before { + content: "\e6c6"; +} + +.uniui-plus-filled:before { + content: "\e6c7"; +} + +.uniui-folder-add-filled:before { + content: "\e6c8"; +} + +.uniui-color-filled:before { + content: "\e6c9"; +} + +.uniui-tune-filled:before { + content: "\e6ca"; +} + +.uniui-calendar-filled:before { + content: "\e6c0"; +} + +.uniui-notification-filled:before { + content: "\e6c1"; +} + +.uniui-wallet-filled:before { + content: "\e6c2"; +} + +.uniui-medal-filled:before { + content: "\e6c3"; +} + +.uniui-gift-filled:before { + content: "\e6c4"; +} + +.uniui-fire-filled:before { + content: "\e6c5"; +} + +.uniui-refreshempty:before { + content: "\e6bf"; +} + +.uniui-location-filled:before { + content: "\e6af"; +} + +.uniui-person-filled:before { + content: "\e69d"; +} + +.uniui-personadd-filled:before { + content: "\e698"; +} + +.uniui-back:before { + content: "\e6b9"; +} + +.uniui-forward:before { + content: "\e6ba"; +} + +.uniui-arrow-right:before { + content: "\e6bb"; +} + +.uniui-arrowthinright:before { + content: "\e6bb"; +} + +.uniui-arrow-left:before { + content: "\e6bc"; +} + +.uniui-arrowthinleft:before { + content: "\e6bc"; +} + +.uniui-arrow-up:before { + content: "\e6bd"; +} + +.uniui-arrowthinup:before { + content: "\e6bd"; +} + +.uniui-arrow-down:before { + content: "\e6be"; +} + +.uniui-arrowthindown:before { + content: "\e6be"; +} + +.uniui-bottom:before { + content: "\e6b8"; +} + +.uniui-arrowdown:before { + content: "\e6b8"; +} + +.uniui-right:before { + content: "\e6b5"; +} + +.uniui-arrowright:before { + content: "\e6b5"; +} + +.uniui-top:before { + content: "\e6b6"; +} + +.uniui-arrowup:before { + content: "\e6b6"; +} + +.uniui-left:before { + content: "\e6b7"; +} + +.uniui-arrowleft:before { + content: "\e6b7"; +} + +.uniui-eye:before { + content: "\e651"; +} + +.uniui-eye-filled:before { + content: "\e66a"; +} + +.uniui-eye-slash:before { + content: "\e6b3"; +} + +.uniui-eye-slash-filled:before { + content: "\e6b4"; +} + +.uniui-info-filled:before { + content: "\e649"; +} + +.uniui-reload:before { + content: "\e6b2"; +} + +.uniui-micoff-filled:before { + content: "\e6b0"; +} + +.uniui-map-pin-ellipse:before { + content: "\e6ac"; +} + +.uniui-map-pin:before { + content: "\e6ad"; +} + +.uniui-location:before { + content: "\e6ae"; +} + +.uniui-starhalf:before { + content: "\e683"; +} + +.uniui-star:before { + content: "\e688"; +} + +.uniui-star-filled:before { + content: "\e68f"; +} + +.uniui-calendar:before { + content: "\e6a0"; +} + +.uniui-fire:before { + content: "\e6a1"; +} + +.uniui-medal:before { + content: "\e6a2"; +} + +.uniui-font:before { + content: "\e6a3"; +} + +.uniui-gift:before { + content: "\e6a4"; +} + +.uniui-link:before { + content: "\e6a5"; +} + +.uniui-notification:before { + content: "\e6a6"; +} + +.uniui-staff:before { + content: "\e6a7"; +} + +.uniui-vip:before { + content: "\e6a8"; +} + +.uniui-folder-add:before { + content: "\e6a9"; +} + +.uniui-tune:before { + content: "\e6aa"; +} + +.uniui-auth:before { + content: "\e6ab"; +} + +.uniui-person:before { + content: "\e699"; +} + +.uniui-email-filled:before { + content: "\e69a"; +} + +.uniui-phone-filled:before { + content: "\e69b"; +} + +.uniui-phone:before { + content: "\e69c"; +} + +.uniui-email:before { + content: "\e69e"; +} + +.uniui-personadd:before { + content: "\e69f"; +} + +.uniui-chatboxes-filled:before { + content: "\e692"; +} + +.uniui-contact:before { + content: "\e693"; +} + +.uniui-chatbubble-filled:before { + content: "\e694"; +} + +.uniui-contact-filled:before { + content: "\e695"; +} + +.uniui-chatboxes:before { + content: "\e696"; +} + +.uniui-chatbubble:before { + content: "\e697"; +} + +.uniui-upload-filled:before { + content: "\e68e"; +} + +.uniui-upload:before { + content: "\e690"; +} + +.uniui-weixin:before { + content: "\e691"; +} + +.uniui-compose:before { + content: "\e67f"; +} + +.uniui-qq:before { + content: "\e680"; +} + +.uniui-download-filled:before { + content: "\e681"; +} + +.uniui-pyq:before { + content: "\e682"; +} + +.uniui-sound:before { + content: "\e684"; +} + +.uniui-trash-filled:before { + content: "\e685"; +} + +.uniui-sound-filled:before { + content: "\e686"; +} + +.uniui-trash:before { + content: "\e687"; +} + +.uniui-videocam-filled:before { + content: "\e689"; +} + +.uniui-spinner-cycle:before { + content: "\e68a"; +} + +.uniui-weibo:before { + content: "\e68b"; +} + +.uniui-videocam:before { + content: "\e68c"; +} + +.uniui-download:before { + content: "\e68d"; +} + +.uniui-help:before { + content: "\e679"; +} + +.uniui-navigate-filled:before { + content: "\e67a"; +} + +.uniui-plusempty:before { + content: "\e67b"; +} + +.uniui-smallcircle:before { + content: "\e67c"; +} + +.uniui-minus-filled:before { + content: "\e67d"; +} + +.uniui-micoff:before { + content: "\e67e"; +} + +.uniui-closeempty:before { + content: "\e66c"; +} + +.uniui-clear:before { + content: "\e66d"; +} + +.uniui-navigate:before { + content: "\e66e"; +} + +.uniui-minus:before { + content: "\e66f"; +} + +.uniui-image:before { + content: "\e670"; +} + +.uniui-mic:before { + content: "\e671"; +} + +.uniui-paperplane:before { + content: "\e672"; +} + +.uniui-close:before { + content: "\e673"; +} + +.uniui-help-filled:before { + content: "\e674"; +} + +.uniui-paperplane-filled:before { + content: "\e675"; +} + +.uniui-plus:before { + content: "\e676"; +} + +.uniui-mic-filled:before { + content: "\e677"; +} + +.uniui-image-filled:before { + content: "\e678"; +} + +.uniui-locked-filled:before { + content: "\e668"; +} + +.uniui-info:before { + content: "\e669"; +} + +.uniui-locked:before { + content: "\e66b"; +} + +.uniui-camera-filled:before { + content: "\e658"; +} + +.uniui-chat-filled:before { + content: "\e659"; +} + +.uniui-camera:before { + content: "\e65a"; +} + +.uniui-circle:before { + content: "\e65b"; +} + +.uniui-checkmarkempty:before { + content: "\e65c"; +} + +.uniui-chat:before { + content: "\e65d"; +} + +.uniui-circle-filled:before { + content: "\e65e"; +} + +.uniui-flag:before { + content: "\e65f"; +} + +.uniui-flag-filled:before { + content: "\e660"; +} + +.uniui-gear-filled:before { + content: "\e661"; +} + +.uniui-home:before { + content: "\e662"; +} + +.uniui-home-filled:before { + content: "\e663"; +} + +.uniui-gear:before { + content: "\e664"; +} + +.uniui-smallcircle-filled:before { + content: "\e665"; +} + +.uniui-map-filled:before { + content: "\e666"; +} + +.uniui-map:before { + content: "\e667"; +} + +.uniui-refresh-filled:before { + content: "\e656"; +} + +.uniui-refresh:before { + content: "\e657"; +} + +.uniui-cloud-upload:before { + content: "\e645"; +} + +.uniui-cloud-download-filled:before { + content: "\e646"; +} + +.uniui-cloud-download:before { + content: "\e647"; +} + +.uniui-cloud-upload-filled:before { + content: "\e648"; +} + +.uniui-redo:before { + content: "\e64a"; +} + +.uniui-images-filled:before { + content: "\e64b"; +} + +.uniui-undo-filled:before { + content: "\e64c"; +} + +.uniui-more:before { + content: "\e64d"; +} + +.uniui-more-filled:before { + content: "\e64e"; +} + +.uniui-undo:before { + content: "\e64f"; +} + +.uniui-images:before { + content: "\e650"; +} + +.uniui-paperclip:before { + content: "\e652"; +} + +.uniui-settings:before { + content: "\e653"; +} + +.uniui-search:before { + content: "\e654"; +} + +.uniui-redo-filled:before { + content: "\e655"; +} + +.uniui-list:before { + content: "\e644"; +} + +.uniui-mail-open-filled:before { + content: "\e63a"; +} + +.uniui-hand-down-filled:before { + content: "\e63c"; +} + +.uniui-hand-down:before { + content: "\e63d"; +} + +.uniui-hand-up-filled:before { + content: "\e63e"; +} + +.uniui-hand-up:before { + content: "\e63f"; +} + +.uniui-heart-filled:before { + content: "\e641"; +} + +.uniui-mail-open:before { + content: "\e643"; +} + +.uniui-heart:before { + content: "\e639"; +} + +.uniui-loop:before { + content: "\e633"; +} + +.uniui-pulldown:before { + content: "\e632"; +} + +.uniui-scan:before { + content: "\e62a"; +} + +.uniui-bars:before { + content: "\e627"; +} + +.uniui-cart-filled:before { + content: "\e629"; +} + +.uniui-checkbox:before { + content: "\e62b"; +} + +.uniui-checkbox-filled:before { + content: "\e62c"; +} + +.uniui-shop:before { + content: "\e62f"; +} + +.uniui-headphones:before { + content: "\e630"; +} + +.uniui-cart:before { + content: "\e631"; +} diff --git a/fe/PDA/uni_modules/uni-icons/components/uni-icons/uniicons.ttf b/fe/PDA/uni_modules/uni-icons/components/uni-icons/uniicons.ttf new file mode 100644 index 000000000..835f33bc9 Binary files /dev/null and b/fe/PDA/uni_modules/uni-icons/components/uni-icons/uniicons.ttf differ diff --git a/fe/PDA/uni_modules/uni-icons/package.json b/fe/PDA/uni_modules/uni-icons/package.json new file mode 100644 index 000000000..d1c4e77d4 --- /dev/null +++ b/fe/PDA/uni_modules/uni-icons/package.json @@ -0,0 +1,86 @@ +{ + "id": "uni-icons", + "displayName": "uni-icons 图标", + "version": "1.3.5", + "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。", + "keywords": [ + "uni-ui", + "uniui", + "icon", + "图标" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "^3.2.14" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-icons/readme.md b/fe/PDA/uni_modules/uni-icons/readme.md new file mode 100644 index 000000000..86234ba1c --- /dev/null +++ b/fe/PDA/uni_modules/uni-icons/readme.md @@ -0,0 +1,8 @@ +## Icons 图标 +> **组件名:uni-icons** +> 代码块: `uIcons` + +用于展示 icons 图标 。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 diff --git a/fe/PDA/uni_modules/uni-id/changelog.md b/fe/PDA/uni_modules/uni-id/changelog.md new file mode 100644 index 000000000..175f9b073 --- /dev/null +++ b/fe/PDA/uni_modules/uni-id/changelog.md @@ -0,0 +1,107 @@ +## 3.3.26(2022-07-08) +- 兼容配置放在uni-id下的逻辑,但是仍推荐使用uni-config-center +## 3.3.25(2022-06-30) +- 修复config文件不合法时未抛出具体错误的Bug +## 3.3.24(2022-06-28) +- 修复3.3.12引出的使用多应用配置时报错的Bug +## 3.3.23(2022-06-13) +- 修复上版本引出的部分依赖未找到的Bug +## 3.3.22(2022-06-13) +- 新增 preferedWebPlatform 配置用于解决HBuilderX 3.4.9版本起web端platform不一致的问题 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=prefered-web-platform) +## 3.3.21(2022-05-24) +- 修复createInstance传入clientInfo无效的Bug +## 3.3.20(2022-05-19) +- 调整以下错误码(账号已注册[uni-id-account-exists]、账号不存在[uni-id-account-not-exists]、账号已绑定[uni-id-account-bound]) +## 3.3.19(2022-05-19) +- 修复 addUser 部分情况下会创建出重复账号的Bug +## 3.3.18(2022-05-12) +- 调整绑定、解绑邮箱手机号接口,只要传递code参数就进行验证码校验即使传递的值为undefined +## 3.3.17(2022-05-09) +- register_env内增加os_name字段用于区分注册时的客户端系统类型 +## 3.3.16(2022-05-09) +- 修复 addUser接口添加的用户无法使用密码登录的Bug [详情](https://ask.dcloud.net.cn/question/144670) +## 3.3.15(2022-05-08) +- 修复config文件语法错误时报`this.t is not a function`的Bug 感谢@寒暄 +## 3.3.14(2022-05-08) +- 新增 getWeixinUserInfo接口 用于获取app平台微信登录用户的用户信息 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id.html#get-weixin-user-info) +- 新增 addUser接口 用于手动添加用户 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id.html#add-user) +- 新增 resetPwdBySms接口 用于使用短信验证码重置密码 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id.html#reset-pwd-by-sms) +- 新增 refreshToken接口 用于主动刷新用户token [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id.html#refresh-token) +- 调整 用户注册时记录用户注册环境到 register_env 字段 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id.html#user-table) +- 调整 用户注册时将注册 ip 移至 register_env 内 + +## 3.3.13(2022-03-04) +- createInstance方法支持传递clientInfo [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id.html#create-instance) +- 修复`this.t is not a function`报错 +## 3.3.12(2022-01-15) +- 新增 preferedAppPlatform 配置用于解决uni-app vue2版本vue3版本获取platform不一致的问题 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=prefered-app-platform) +- 修复 checkToken 未返回自定义token内容的Bug +## 3.3.11(2022-01-11) +- 修复用户名密码登录时多个应用出现重复用户名登录报错的Bug +## 3.3.10(2022-01-07) +- 新增 自定义国际化语言支持 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=custom-i8n) +- 修复 一键登录时未校验重复手机号是否已验证的Bug +- 修复 Apple登录时用户邮箱为空时报错的Bug +- 修复 登录接口未传username时错误提示不正确的Bug +## 3.3.9(2021-11-09) +- 去除重复的context.xxx未找到的提示语 +## 3.3.8(2021-10-28) +- 新增 用户账户封禁接口 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=ban-account) +- 新增 用户账户注销接口 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=close-account) +- 修复 未传appid时用户重复注册的Bug +## 3.3.7(2021-10-08) +- 移除部分接口的废弃提示 +## 3.3.6(2021-09-08) +- 修复 邀请码可能重复的Bug +## 3.3.5(2021-08-10) +- 修复版本号错误 +## 3.3.4(2021-08-10) +- 微信、QQ、支付宝登录新增type参数用于指定当前是登录还是注册 +## 3.3.3(2021-08-04) +- 修复使用数组形式的配置文件报错的Bug +## 3.3.2(2021-08-03) +- 修复上3.3.0版本引出的createInstance接口传入配置不生效的Bug 感谢[hmh](https://gitee.com/hmh) +## 3.3.1(2021-07-30) +- 修复 将设置用户允许登录的应用列表时传入空数组报错的Bug +## 3.3.0(2021-07-30) +- 新增 不同端应用配置隔离 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=isolate-config) +- 新增 不同端用户隔离 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=isolate-user) + + 此版本升级需要开发者处理一下用户数据,请参考 [补齐用户dcloud_appid字段](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=makeup-dcloud-appid) +- 新增 QQ登录、注册相关功能 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=qq) +- 调整 不再支持绑定手机、邮箱时不填验证码直接绑定 +## 3.2.1(2021-07-09) +- 撤销3.2.0版本所做的调整 +## 3.2.0(2021-07-09) +- 【重要】支持不同端(管理端、用户端等)用户隔离 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=isolate-user) +- 支持不同端(管理端、用户端等)配置文件隔离 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=isolate-config) +## 3.1.3(2021-07-08) +- 移除插件内误传的node_modules +## 3.1.2(2021-07-08) +- 修复 微信小程序绑定微信账号时报错的Bug +## 3.1.1(2021-07-01) +- 使用新的错误码规范,兼容旧版 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=errcode) +- 修复微信登录、绑定时未返回用户accessToken的Bug +## 3.1.0(2021-04-19) +- 增加对用户名、邮箱、密码字段的两端去空格 +- 默认忽略用户名、邮箱的大小写 [详情](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=case-sensitive) +- 修复 customToken导出async方法报错的Bug +## 3.0.12(2021-04-13) +- 调整bindTokenToDevice默认值为false +## 3.0.11(2021-04-12) +- 修复3.0.7版本引出的多个用户访问时可能出现30201报错的Bug +## 3.0.10(2021-04-08) +- 优化错误提示 +## 3.0.9(2021-04-08) +- bindMobile接口支持通过一键登录的方式绑定 +- 优化错误提示 +## 3.0.8(2021-03-19) +- 修复 3.0.7版本某些情况下生成token报错的Bug +## 3.0.7(2021-03-19) +- 新增 支持uni-config-center,更新uni-id无须再担心配置被覆盖 [详情](https://uniapp.dcloud.io/uniCloud/uni-id?id=uni-config-center) +- 新增 自定义token内容,可以缓存角色权限之外的更多信息到客户端 [详情](https://uniapp.dcloud.io/uniCloud/uni-id?id=custom-token) +- 新增 支持传入context获取uni-id实例,防止单实例多并发时全局context混乱 [详情](https://uniapp.dcloud.io/uniCloud/uni-id?id=create-instance) +## 3.0.6(2021-03-05) +- 新增[uniID.wxBizDataCrypt](https://uniapp.dcloud.io/uniCloud/uni-id?id=%e5%be%ae%e4%bf%a1%e6%95%b0%e6%8d%ae%e8%a7%a3%e5%af%86)方法 +- 优化loginByApple方法,提高接口响应速度 +## 3.0.5(2021-02-03) +- 调整为uni_modules目录规范 diff --git a/fe/PDA/uni_modules/uni-id/package.json b/fe/PDA/uni_modules/uni-id/package.json new file mode 100644 index 000000000..54b355a7e --- /dev/null +++ b/fe/PDA/uni_modules/uni-id/package.json @@ -0,0 +1,88 @@ +{ + "id": "uni-id", + "displayName": "uni-id", + "version": "3.3.26", + "description": "简单、统一、可扩展的用户中心", + "keywords": [ + "uniid", + "uni-id", + "用户管理", + "用户中心", + "短信验证码" +], + "repository": "https://gitee.com/dcloud/uni-id.git", + "engines": { + "HBuilderX": "^3.1.0" + }, + "dcloudext": { + "category": [ + "uniCloud", + "云函数模板" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "" + }, + "uni_modules": { + "dependencies": ["uni-config-center"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "u", + "app-nvue": "u" + }, + "H5-mobile": { + "Safari": "u", + "Android Browser": "u", + "微信浏览器(Android)": "u", + "QQ浏览器(Android)": "u" + }, + "H5-pc": { + "Chrome": "u", + "IE": "u", + "Edge": "u", + "Firefox": "u", + "Safari": "u" + }, + "小程序": { + "微信": "u", + "阿里": "u", + "百度": "u", + "字节跳动": "u", + "QQ": "u", + "钉钉": "u", + "快手": "u", + "飞书": "u", + "京东": "u" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "u" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-id/readme.md b/fe/PDA/uni_modules/uni-id/readme.md new file mode 100644 index 000000000..ea7751ccf --- /dev/null +++ b/fe/PDA/uni_modules/uni-id/readme.md @@ -0,0 +1,33 @@ +**文档已移至[uni-id文档](https://uniapp.dcloud.net.cn/uniCloud/uni-id)** + +> 一般uni-id升级大版本时为不兼容更新,从低版本迁移到高版本请参考:[uni-id迁移指南](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=migration) + +## 重要升级说明 + +**uni-id 3.x版本,搭配的uniCloud admin版本需大于1.2.10。** + +### 缓存角色权限 + +自`uni-id 3.0.0`起,支持在token内缓存用户的角色权限,默认开启此功能,各登录接口的needPermission参数不再生效。如需关闭请在config内配置`"removePermissionAndRoleFromToken": true`。 + +为什么要缓存角色权限?要知道云数据库是按照读写次数来收取费用的,并且读写数据库会拖慢接口响应速度。未配置`"removePermissionAndRoleFromToken": true`的情况下,可以在调用checkToken接口时不查询数据库获取用户角色权限。 + +详细checkToken流程如下: + +![](https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/ed45d350-5a4d-11eb-b997-9918a5dda011.jpg) + +可以看出,旧版token(removePermissionAndRoleFromToken为true时生成的)在checkToken时如需返回权限需要进行两次数据库查询。新版token不需要查库即可返回权限信息。 + +**注意** + +- 由于角色权限缓存在token内,可能会存在权限已经更新但是用户token未过期之前依然是旧版角色权限的情况。可以调短一些token过期时间来减少这种情况的影响。 +- admin角色token内不包含permission,如需自行判断用户是否有某个权限,要注意admin角色需要额外判断一下,写法如下 + ```js + const { + role, + permission + } = await uniID.checkToken(event.uniIdToken) + if(role.includes('admin') || permission.includes('your permission id')) { + // 当前角色拥有'your permission id'对应的权限 + } + ``` \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/LICENSE.md b/fe/PDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/LICENSE.md new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/fe/PDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/fe/PDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/index.js b/fe/PDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/index.js new file mode 100644 index 000000000..3516aacf3 --- /dev/null +++ b/fe/PDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/index.js @@ -0,0 +1 @@ +"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(require("crypto")),r=e(require("buffer")),n=e(require("stream")),i=e(require("util"));const o={PARAM_ERROR:{errCode:"param-error"},PARAM_REQUIRED:{errCode:"param-required"},USER_NOT_EXIST:{errCode:"user-not-exist"},ROLE_NOT_EXIST:{errCode:"role-not-exist"},PERMISSION_NOT_EXIST:{errCode:"permission-not-exist"},MULTI_USER_MATCHED:{errCode:"multi-user-matched"},USER_INFO_ERROR:{errCode:"user-info-error"},USER_ACCOUNT_CONFLICT:{errCode:"user-account-conflict"},USER_ACCOUNT_CLOSED:{errCode:"user-account-closed"},ACCOUNT_EXISTS:{errCode:"account-exists"},ACCOUNT_NOT_EXISTS:{errCode:"account-not-exists"},ACCOUNT_BOUND:{errCode:"account-bound"},UNBIND_FAILED:{errCode:"unbind-failed"},INVALID_INVITE_CODE:{errCode:"invalid-invite-code"},SET_INVITE_CODE_FAILED:{errCode:"set-invite-code-failed"},GET_THIRD_PARTY_ACCOUNT_FAILED:{errCode:"get-third-party-account-failed"},GET_THIRD_PARTY_USER_INFO_FAILED:{errCode:"get-third-party-user-info-failed"}},s={0:{errCode:0,errMsg:""},10001:{errCode:"account-banned"},10002:o.USER_NOT_EXIST,10003:o.MULTI_USER_MATCHED,10004:o.USER_INFO_ERROR,10005:o.USER_ACCOUNT_CONFLICT,10006:o.USER_ACCOUNT_CLOSED,10102:{errCode:"password-error"},10103:{errCode:"password-error-exceed-limit"},10201:o.ACCOUNT_EXISTS,10202:o.ACCOUNT_NOT_EXISTS,10203:o.INVALID_INVITE_CODE,10301:o.ACCOUNT_EXISTS,10302:o.ACCOUNT_NOT_EXISTS,10401:o.GET_THIRD_PARTY_ACCOUNT_FAILED,10402:o.ACCOUNT_EXISTS,10403:o.ACCOUNT_NOT_EXISTS,10501:o.GET_THIRD_PARTY_ACCOUNT_FAILED,10502:o.ACCOUNT_EXISTS,10503:o.ACCOUNT_NOT_EXISTS,10601:o.ACCOUNT_EXISTS,10602:o.ACCOUNT_NOT_EXISTS,10701:o.GET_THIRD_PARTY_ACCOUNT_FAILED,10702:o.GET_THIRD_PARTY_ACCOUNT_FAILED,10703:o.ACCOUNT_EXISTS,10704:o.ACCOUNT_NOT_EXISTS,10705:o.GET_THIRD_PARTY_ACCOUNT_FAILED,10706:o.GET_THIRD_PARTY_ACCOUNT_FAILED,10801:o.GET_THIRD_PARTY_ACCOUNT_FAILED,10802:o.ACCOUNT_EXISTS,10803:o.ACCOUNT_NOT_EXISTS,20101:o.PARAM_REQUIRED,20102:o.ACCOUNT_EXISTS,30101:o.PARAM_REQUIRED,30201:{errCode:"check-device-feature-failed"},30202:{errCode:"token-not-exist"},30203:{errCode:"token-expired"},30204:{errCode:"check-token-failed"},40201:o.USER_NOT_EXIST,40202:{errCode:"invalid-old-password"},50101:o.PARAM_REQUIRED,50102:o.PARAM_ERROR,50201:o.PARAM_REQUIRED,50203:o.PARAM_ERROR,50202:{errCode:"invalid-verify-code"},50301:{errCode:"send-sms-code-failed"},60101:o.ACCOUNT_BOUND,60201:o.ACCOUNT_BOUND,60301:o.GET_THIRD_PARTY_ACCOUNT_FAILED,60302:o.ACCOUNT_BOUND,60401:o.GET_THIRD_PARTY_ACCOUNT_FAILED,60402:o.ACCOUNT_BOUND,60501:o.GET_THIRD_PARTY_ACCOUNT_FAILED,60502:o.ACCOUNT_BOUND,70101:o.UNBIND_FAILED,70201:o.UNBIND_FAILED,70301:o.UNBIND_FAILED,70401:o.UNBIND_FAILED,70501:o.UNBIND_FAILED,80301:o.USER_NOT_EXIST,80401:o.SET_INVITE_CODE_FAILED,80402:o.SET_INVITE_CODE_FAILED,80501:o.INVALID_INVITE_CODE,80502:o.USER_NOT_EXIST,80503:{errCode:"modify-invite-code-is-not-allowed"},80601:o.GET_THIRD_PARTY_ACCOUNT_FAILED,80602:o.GET_THIRD_PARTY_ACCOUNT_FAILED,80701:o.GET_THIRD_PARTY_ACCOUNT_FAILED,80702:o.GET_THIRD_PARTY_ACCOUNT_FAILED,80801:{errCode:"decrypt-weixin-data-failed"},80802:{errCode:"decrypt-weixin-data-failed"},80803:{errCode:"invalid-weixin-appid"},80804:o.PARAM_REQUIRED,80805:o.PARAM_REQUIRED,80806:o.PARAM_REQUIRED,80901:o.GET_THIRD_PARTY_USER_INFO_FAILED,90001:{errCode:"database-operation-failed"},90002:o.PARAM_REQUIRED,90003:o.PARAM_ERROR,90004:o.USER_NOT_EXIST,90005:o.ROLE_NOT_EXIST,90006:o.PERMISSION_NOT_EXIST};class a extends Error{constructor(e){super(e.message),this.errMsg=e.message||"",Object.defineProperties(this,{message:{get(){return`errCode: ${e.code||""} | errMsg: `+this.errMsg},set(e){this.errMsg=e}}})}}const c=Object.prototype.toString,u=Object.prototype.hasOwnProperty;function d(e,t){return u.call(e,t)}function p(e){return"[object Object]"===c.call(e)}function l(e){return"function"==typeof e}function f(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}function m(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}const h=/_(\w)/g,g=/[A-Z]/g;function y(e){return e.replace(h,(e,t)=>t?t.toUpperCase():"")}function w(e){return e.replace(g,e=>"_"+e.toLowerCase())}function v(e,t){let r,n;switch(t){case"snake2camel":n=y,r=h;break;case"camel2snake":n=w,r=g}for(const i in e)if(d(e,i)&&r.test(i)){const r=n(i);e[r]=e[i],delete e[i],p(e[r])?e[r]=v(e[r],t):Array.isArray(e[r])&&(e[r]=e[r].map(e=>v(e,t)))}return e}function _(e){return v(e,"snake2camel")}function b(e){return v(e,"camel2snake")}function T(e){return function(e,t="-"){e=e||new Date;const r=[];return r.push(e.getFullYear()),r.push(("00"+(e.getMonth()+1)).substr(-2)),r.push(("00"+e.getDate()).substr(-2)),r.join(t)}(e=e||new Date)+" "+function(e,t=":"){e=e||new Date;const r=[];return r.push(("00"+e.getHours()).substr(-2)),r.push(("00"+e.getMinutes()).substr(-2)),r.push(("00"+e.getSeconds()).substr(-2)),r.join(t)}(e)}function E(){"development"===process.env.NODE_ENV&&console.log(...arguments)}function C(e=6){let t="";for(let r=0;r-1?"&":"?"}access_token=${t.accessToken}`}return`${e}${r}`}class G{constructor(e){this.options=Object.assign({baseUrl:"https://api.weixin.qq.com",timeout:5e3},e)}async _requestWxOpenapi({name:e,url:t,data:r,options:n}){const i={method:"GET",dataType:"json",dataAsQueryString:!0,timeout:this.options.timeout};return await H({name:"auth."+e,url:`${this.options.baseUrl}${K(t,r)}`,data:r,options:n,defaultOptions:i})}async code2Session(e){return await this._requestWxOpenapi({name:"code2Session",url:"/sns/jscode2session",data:{grant_type:"authorization_code",appid:this.options.appId,secret:this.options.secret,js_code:e}})}async getOauthAccessToken(e){const t=await this._requestWxOpenapi({name:"getOauthAccessToken",url:"/sns/oauth2/access_token",data:{grant_type:"authorization_code",appid:this.options.appId,secret:this.options.secret,code:e}});return t.expiresIn&&(t.expired=Date.now()+t.expiresIn),t}async getUserInfo({accessToken:e,openid:t}={}){const{nickname:r,headimgurl:n}=await this._requestWxOpenapi({name:"getUserInfo",url:"/sns/userinfo",data:{accessToken:e,openid:t,appid:this.options.appId,secret:this.options.secret,scope:"snsapi_userinfo"}});return{nickname:r,avatar:n}}}async function Q({name:e,url:t,data:r,options:n,defaultOptions:i}){let o;n=Object.assign({},i,n,{data:b(Object.assign({},r))});try{o=await uniCloud.httpclient.request(t,n)}catch(t){return function(e,t){throw new a({code:t.code||-2,message:t.message||e+" fail"})}(e,t)}let s=o.data;const c=o.headers["content-type"];if(!Buffer.isBuffer(s)||0!==c.indexOf("text/plain")&&0!==c.indexOf("application/json"))Buffer.isBuffer(s)&&(s={buffer:s,contentType:c});else try{s=JSON.parse(s.toString())}catch(e){s=s.toString()}return _(function(e,t){if(t.ret||t.error){const r=t.ret||t.error||t.errcode||-2,n=t.msg||t.error_description||t.errmsg||e+" fail";throw new a({code:r,message:n})}return delete t.ret,delete t.msg,delete t.error,delete t.error_description,delete t.errcode,delete t.errmsg,{...t,errMsg:e+" ok",errCode:0}}(e,s||{errCode:-2,errMsg:"Request failed"}))}class X{constructor(e){this.options=Object.assign({baseUrl:"https://graph.qq.com",timeout:5e3},e)}async _requestQQOpenapi({name:e,url:t,data:r,options:n}){const i={method:"GET",dataType:"json",dataAsQueryString:!0,timeout:this.options.timeout};var o,s;return await Q({name:"auth."+e,url:(o=this.options.baseUrl,s=t,/^https?:/.test(s)?s:o+s),data:r,options:n,defaultOptions:i})}async getOpenidByToken({accessToken:e}={}){const t=await this._requestQQOpenapi({name:"getOpenidByToken",url:"/oauth2.0/me",data:{accessToken:e,unionid:1,fmt:"json"}});if(t.clientId!==this.options.appId)throw new a({code:"APPID_NOT_MATCH",message:"appid not match"});return{openid:t.openid,unionid:t.unionid}}async code2Session({code:e}={}){return await this._requestQQOpenapi({name:"getOpenidByToken",url:"https://api.q.qq.com/sns/jscode2session",data:{grant_type:"authorization_code",appid:this.options.appId,secret:this.options.secret,js_code:e}})}}const Y={RSA:"RSA-SHA1",RSA2:"RSA-SHA256"};var z={code2Session:{returnValue:{openid:"userId"}}};class W extends class{constructor(e={}){if(!e.appId)throw new Error("appId required");if(!e.privateKey)throw new Error("privateKey required");const t={gateway:"https://openapi.alipay.com/gateway.do",timeout:5e3,charset:"utf-8",version:"1.0",signType:"RSA2",timeOffset:-(new Date).getTimezoneOffset()/60,keyType:"PKCS8"};e.sandbox&&(e.gateway="https://openapi.alipaydev.com/gateway.do"),this.options=Object.assign({},t,e);const r="PKCS8"===this.options.keyType?"PRIVATE KEY":"RSA PRIVATE KEY";this.options.privateKey=this._formatKey(this.options.privateKey,r),this.options.alipayPublicKey&&(this.options.alipayPublicKey=this._formatKey(this.options.alipayPublicKey,"PUBLIC KEY"))}_formatKey(e,t){return`-----BEGIN ${t}-----\n${e}\n-----END ${t}-----`}_formatUrl(e,t){let r=e;const n=["app_id","method","format","charset","sign_type","sign","timestamp","version","notify_url","return_url","auth_token","app_auth_token"];for(const e in t)if(n.indexOf(e)>-1){const n=encodeURIComponent(t[e]);r=`${r}${r.includes("?")?"&":"?"}${e}=${n}`,delete t[e]}return{execParams:t,url:r}}_getSign(e,r){const n=r.bizContent||null;delete r.bizContent;const i=Object.assign({method:e,appId:this.options.appId,charset:this.options.charset,version:this.options.version,signType:this.options.signType,timestamp:T((o=this.options.timeOffset,new Date(Date.now()+6e4*((new Date).getTimezoneOffset()+60*(o||0)))))},r);var o;n&&(i.bizContent=JSON.stringify(b(n)));const s=b(i),a=Object.keys(s).sort().map(e=>{let t=s[e];return"[object String]"!==Array.prototype.toString.call(t)&&(t=JSON.stringify(t)),`${e}=${t}`}).join("&"),c=t.createSign(Y[this.options.signType]).update(a,"utf8").sign(this.options.privateKey,"base64");return Object.assign(s,{sign:c})}async _exec(e,t={},r={}){const n=this._getSign(e,t),{url:i,execParams:o}=this._formatUrl(this.options.gateway,n),{status:s,data:a}=await uniCloud.httpclient.request(i,{method:"POST",data:o,dataType:"text",timeout:this.options.timeout});if(200!==s)throw new Error("request fail");const c=JSON.parse(a),u=e.replace(/\./g,"_")+"_response",d=c[u],p=c.error_response;if(d){if(!r.validateSign||this._checkResponseSign(a,u)){if(!d.code||"10000"===d.code){return{errCode:0,errMsg:d.msg||"",..._(d)}}const e=d.sub_code?`${d.sub_code} ${d.sub_msg}`:""+(d.msg||"unkonwn error");throw new Error(e)}throw new Error("check sign error")}if(p)throw new Error(p.sub_msg||p.msg||"request fail");throw new Error("request fail")}_checkResponseSign(e,r){if(!this.options.alipayPublicKey||""===this.options.alipayPublicKey)return console.warn("options.alipayPublicKey is empty"),!0;if(!e)return!1;const n=this._getSignStr(e,r),i=JSON.parse(e).sign,o=t.createVerify(Y[this.options.signType]);return o.update(n,"utf8"),o.verify(this.options.alipayPublicKey,i,"base64")}_getSignStr(e,t){let r=e.trim();const n=e.indexOf(t+'"'),i=e.lastIndexOf('"sign"');return r=r.substr(n+t.length+1),r=r.substr(0,i),r=r.replace(/^[^{]*{/g,"{"),r=r.replace(/\}([^}]*)$/g,"}"),r}}{constructor(e){super(e),this._protocols=z}async code2Session(e){return await this._exec("alipay.system.oauth.token",{grantType:"authorization_code",code:e})}}function J(e){var t=e[0];return t<"0"||t>"7"?"00"+e:e}function Z(e){var t=e.toString(16);return t.length%2?"0"+t:t}function ee(e){if(e<=127)return Z(e);var t=Z(e);return Z(128+t.length/2)+t}function te(e,t){return e(t={exports:{}},t.exports),t.exports}var re=te((function(e,t){var n=r.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=o),o.prototype=Object.create(n.prototype),i(n,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}})),ne=(re.Buffer,re.Buffer);function ie(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=ne.alloc(0),this;if("function"==typeof e.pipe)return this.buffer=ne.alloc(0),e.pipe(this),this;if(e.length||"object"==typeof e)return this.buffer=e,this.writable=!1,process.nextTick(function(){this.emit("end",e),this.readable=!1,this.emit("close")}.bind(this)),this;throw new TypeError("Unexpected data type ("+typeof e+")")}i.inherits(ie,n),ie.prototype.write=function(e){this.buffer=ne.concat([this.buffer,ne.from(e)]),this.emit("data",e)},ie.prototype.end=function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1};var oe=ie,se=r.Buffer,ae=r.SlowBuffer,ce=ue;function ue(e,t){if(!se.isBuffer(e)||!se.isBuffer(t))return!1;if(e.length!==t.length)return!1;for(var r=0,n=0;n=128&&--n,n}var we={derToJose:function(e,t){e=ge(e);var r=me(t),n=r+1,i=e.length,o=0;if(48!==e[o++])throw new Error('Could not find expected "seq"');var s=e[o++];if(129===s&&(s=e[o++]),i-o0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"weeks":case"week":case"w":return 6048e5*r;case"days":case"day":case"d":return r*mt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ft;case"minutes":case"minute":case"mins":case"min":case"m":return r*lt;case"seconds":case"second":case"secs":case"sec":case"s":return r*pt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=mt)return gt(e,t,mt,"day");if(t>=ft)return gt(e,t,ft,"hour");if(t>=lt)return gt(e,t,lt,"minute");if(t>=pt)return gt(e,t,pt,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=mt)return Math.round(e/mt)+"d";if(t>=ft)return Math.round(e/ft)+"h";if(t>=lt)return Math.round(e/lt)+"m";if(t>=pt)return Math.round(e/pt)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function gt(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}var yt=function(e,t){var r=t||Math.floor(Date.now()/1e3);if("string"==typeof e){var n=ht(e);if(void 0===n)return;return Math.floor(r+n/1e3)}return"number"==typeof e?r+e:void 0},wt=te((function(e,t){var r;t=e.exports=G,r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var n=Number.MAX_SAFE_INTEGER||9007199254740991,i=t.re=[],o=t.src=[],s=0,a=s++;o[a]="0|[1-9]\\d*";var c=s++;o[c]="[0-9]+";var u=s++;o[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var d=s++;o[d]="("+o[a]+")\\.("+o[a]+")\\.("+o[a]+")";var p=s++;o[p]="("+o[c]+")\\.("+o[c]+")\\.("+o[c]+")";var l=s++;o[l]="(?:"+o[a]+"|"+o[u]+")";var f=s++;o[f]="(?:"+o[c]+"|"+o[u]+")";var m=s++;o[m]="(?:-("+o[l]+"(?:\\."+o[l]+")*))";var h=s++;o[h]="(?:-?("+o[f]+"(?:\\."+o[f]+")*))";var g=s++;o[g]="[0-9A-Za-z-]+";var y=s++;o[y]="(?:\\+("+o[g]+"(?:\\."+o[g]+")*))";var w=s++,v="v?"+o[d]+o[m]+"?"+o[y]+"?";o[w]="^"+v+"$";var _="[v=\\s]*"+o[p]+o[h]+"?"+o[y]+"?",b=s++;o[b]="^"+_+"$";var T=s++;o[T]="((?:<|>)?=?)";var E=s++;o[E]=o[c]+"|x|X|\\*";var C=s++;o[C]=o[a]+"|x|X|\\*";var A=s++;o[A]="[v=\\s]*("+o[C]+")(?:\\.("+o[C]+")(?:\\.("+o[C]+")(?:"+o[m]+")?"+o[y]+"?)?)?";var I=s++;o[I]="[v=\\s]*("+o[E]+")(?:\\.("+o[E]+")(?:\\.("+o[E]+")(?:"+o[h]+")?"+o[y]+"?)?)?";var S=s++;o[S]="^"+o[T]+"\\s*"+o[A]+"$";var x=s++;o[x]="^"+o[T]+"\\s*"+o[I]+"$";var k=s++;o[k]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var O=s++;o[O]="(?:~>?)";var P=s++;o[P]="(\\s*)"+o[O]+"\\s+",i[P]=new RegExp(o[P],"g");var R=s++;o[R]="^"+o[O]+o[A]+"$";var j=s++;o[j]="^"+o[O]+o[I]+"$";var D=s++;o[D]="(?:\\^)";var q=s++;o[q]="(\\s*)"+o[D]+"\\s+",i[q]=new RegExp(o[q],"g");var N=s++;o[N]="^"+o[D]+o[A]+"$";var U=s++;o[U]="^"+o[D]+o[I]+"$";var L=s++;o[L]="^"+o[T]+"\\s*("+_+")$|^$";var V=s++;o[V]="^"+o[T]+"\\s*("+v+")$|^$";var M=s++;o[M]="(\\s*)"+o[T]+"\\s*("+_+"|"+o[A]+")",i[M]=new RegExp(o[M],"g");var B=s++;o[B]="^\\s*("+o[A]+")\\s+-\\s+("+o[A]+")\\s*$";var F=s++;o[F]="^\\s*("+o[I]+")\\s+-\\s+("+o[I]+")\\s*$";var $=s++;o[$]="(<|>)?=?\\s*\\*";for(var H=0;H<35;H++)r(H,o[H]),i[H]||(i[H]=new RegExp(o[H]));function K(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof G)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?i[b]:i[w]).test(e))return null;try{return new G(e,t)}catch(e){return null}}function G(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof G){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof G))return new G(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?i[b]:i[w]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new G(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(J(e,t))return null;var r=K(e),n=K(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var o="prerelease"}for(var s in r)if(("major"===s||"minor"===s||"patch"===s)&&r[s]!==n[s])return i+s;return o},t.compareIdentifiers=X;var Q=/^[0-9]+$/;function X(e,t){var r=Q.test(e),n=Q.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e0}function W(e,t,r){return Y(e,t,r)<0}function J(e,t,r){return 0===Y(e,t,r)}function Z(e,t,r){return 0!==Y(e,t,r)}function ee(e,t,r){return Y(e,t,r)>=0}function te(e,t,r){return Y(e,t,r)<=0}function re(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return J(e,r,n);case"!=":return Z(e,r,n);case">":return z(e,r,n);case">=":return ee(e,r,n);case"<":return W(e,r,n);case"<=":return te(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function ne(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ne){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ne))return new ne(e,t);r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return X(t,e)},t.major=function(e,t){return new G(e,t).major},t.minor=function(e,t){return new G(e,t).minor},t.patch=function(e,t){return new G(e,t).patch},t.compare=Y,t.compareLoose=function(e,t){return Y(e,t,!0)},t.rcompare=function(e,t,r){return Y(t,e,r)},t.sort=function(e,r){return e.sort((function(e,n){return t.compare(e,n,r)}))},t.rsort=function(e,r){return e.sort((function(e,n){return t.rcompare(e,n,r)}))},t.gt=z,t.lt=W,t.eq=J,t.neq=Z,t.gte=ee,t.lte=te,t.cmp=re,t.Comparator=ne;var ie={};function oe(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof oe)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new oe(e.raw,t);if(e instanceof ne)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function ae(e,t,r,n,i,o,s,a,c,u,d,p,l){return((t=se(r)?"":se(n)?">="+r+".0.0":se(i)?">="+r+"."+n+".0":">="+t)+" "+(a=se(c)?"":se(u)?"<"+(+c+1)+".0.0":se(d)?"<"+c+"."+(+u+1)+".0":p?"<="+c+"."+u+"."+d+"-"+p:"<="+a)).trim()}function ce(e,t,n){for(var i=0;i0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function ue(e,t,r){try{t=new oe(t,r)}catch(e){return!1}return t.test(e)}function de(e,t,r,n){var i,o,s,a,c;switch(e=new G(e,n),t=new oe(t,n),r){case">":i=z,o=te,s=W,a=">",c=">=";break;case"<":i=W,o=ee,s=z,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,n))return!1;for(var u=0;u=0.0.0")),p=p||e,l=l||e,i(e.semver,p.semver,n)?p=e:s(e.semver,l.semver,n)&&(l=e)})),p.operator===a||p.operator===c)return!1;if((!l.operator||l.operator===a)&&o(e,l.semver))return!1;if(l.operator===c&&s(e,l.semver))return!1}return!0}ne.prototype.parse=function(e){var t=this.options.loose?i[L]:i[V],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new G(r[2],this.options.loose):this.semver=ie},ne.prototype.toString=function(){return this.value},ne.prototype.test=function(e){return r("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new G(e,this.options)),re(e,this.operator,this.semver,this.options))},ne.prototype.intersects=function(e,t){if(!(e instanceof ne))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return r=new oe(e.value,t),ue(this.value,r,t);if(""===e.operator)return r=new oe(this.value,t),ue(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=re(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=re(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||o&&s||a||c},t.Range=oe,oe.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?i[F]:i[B];e=e.replace(n,ae),r("hyphen replace",e),e=e.replace(i[M],"$1$2$3"),r("comparator trim",e,i[M]),e=(e=(e=e.replace(i[P],"$1~")).replace(i[q],"$1^")).split(/\s+/).join(" ");var o=t?i[L]:i[V],s=e.split(" ").map((function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){r("caret",e,t);var n=t.loose?i[U]:i[N];return e.replace(n,(function(t,n,i,o,s){var a;return r("caret",e,t,n,i,o,s),se(n)?a="":se(i)?a=">="+n+".0.0 <"+(+n+1)+".0.0":se(o)?a="0"===n?">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":">="+n+"."+i+".0 <"+(+n+1)+".0.0":s?(r("replaceCaret pr",s),a="0"===n?"0"===i?">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+i+"."+(+o+1):">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+o+"-"+s+" <"+(+n+1)+".0.0"):(r("no pr"),a="0"===n?"0"===i?">="+n+"."+i+"."+o+" <"+n+"."+i+"."+(+o+1):">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+o+" <"+(+n+1)+".0.0"),r("caret return",a),a}))}(e,t)})).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var n=t.loose?i[j]:i[R];return e.replace(n,(function(t,n,i,o,s){var a;return r("tilde",e,t,n,i,o,s),se(n)?a="":se(i)?a=">="+n+".0.0 <"+(+n+1)+".0.0":se(o)?a=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":s?(r("replaceTilde pr",s),a=">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0"):a=">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0",r("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var n=t.loose?i[x]:i[S];return e.replace(n,(function(t,n,i,o,s,a){r("xRange",e,t,n,i,o,s,a);var c=se(i),u=c||se(o),d=u||se(s);return"="===n&&d&&(n=""),c?t=">"===n||"<"===n?"<0.0.0":"*":n&&d?(u&&(o=0),s=0,">"===n?(n=">=",u?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===n&&(n="<",u?i=+i+1:o=+o+1),t=n+i+"."+o+"."+s):u?t=">="+i+".0.0 <"+(+i+1)+".0.0":d&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+1)+".0"),r("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(i[$],"")}(e,t),r("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(o)}))),s=s.map((function(e){return new ne(e,this.options)}),this)},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some((function(r){return r.every((function(r){return e.set.some((function(e){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new oe(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new G(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!z(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(r&&e.test(r))return r;return null},t.validRange=function(e,t){try{return new oe(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,r){return de(e,t,"<",r)},t.gtr=function(e,t,r){return de(e,t,">",r)},t.outside=de,t.prerelease=function(e,t){var r=K(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new oe(e,r),t=new oe(t,r),e.intersects(t)},t.coerce=function(e){if(e instanceof G)return e;if("string"!=typeof e)return null;var t=e.match(i[k]);if(null==t)return null;return K(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}})),vt=(wt.SEMVER_SPEC_VERSION,wt.re,wt.src,wt.parse,wt.valid,wt.clean,wt.SemVer,wt.inc,wt.diff,wt.compareIdentifiers,wt.rcompareIdentifiers,wt.major,wt.minor,wt.patch,wt.compare,wt.compareLoose,wt.rcompare,wt.sort,wt.rsort,wt.gt,wt.lt,wt.eq,wt.neq,wt.gte,wt.lte,wt.cmp,wt.Comparator,wt.Range,wt.toComparators,wt.satisfies,wt.maxSatisfying,wt.minSatisfying,wt.minVersion,wt.validRange,wt.ltr,wt.gtr,wt.outside,wt.prerelease,wt.intersects,wt.coerce,wt.satisfies(process.version,"^6.12.0 || >=8.0.0")),_t=["RS256","RS384","RS512","ES256","ES384","ES512"],bt=["RS256","RS384","RS512"],Tt=["HS256","HS384","HS512"];vt&&(_t.splice(3,0,"PS256","PS384","PS512"),bt.splice(3,0,"PS256","PS384","PS512"));var Et=/^\s+|\s+$/g,Ct=/^[-+]0x[0-9a-f]+$/i,At=/^0b[01]+$/i,It=/^0o[0-7]+$/i,St=/^(?:0|[1-9]\d*)$/,xt=parseInt;function kt(e){return e!=e}function Ot(e,t){return function(e,t){for(var r=-1,n=e?e.length:0,i=Array(n);++r-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){var t=Ht(e)?qt.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}function Ht(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Kt(e){return!!e&&"object"==typeof e}var Gt=function(e,t,r,n){var i;e=$t(e)?e:(i=e)?Ot(i,function(e){return $t(e)?Vt(e):Mt(e)}(i)):[],r=r&&!n?function(e){var t=function(e){if(!e)return 0===e?e:0;if((e=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||Kt(e)&&"[object Symbol]"==qt.call(e)}(e))return NaN;if(Ht(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ht(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Et,"");var r=At.test(e);return r||It.test(e)?xt(e.slice(2),r?2:8):Ct.test(e)?NaN:+e}(e))===1/0||e===-1/0){return 17976931348623157e292*(e<0?-1:1)}return e==e?e:0}(e),r=t%1;return t==t?r?t-r:t:0}(r):0;var o=e.length;return r<0&&(r=Lt(o+r,0)),function(e){return"string"==typeof e||!Ft(e)&&Kt(e)&&"[object String]"==qt.call(e)}(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&function(e,t,r){if(t!=t)return function(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o-1},Qt=Object.prototype.toString;var Xt=function(e){return!0===e||!1===e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Boolean]"==Qt.call(e)},Yt=/^\s+|\s+$/g,zt=/^[-+]0x[0-9a-f]+$/i,Wt=/^0b[01]+$/i,Jt=/^0o[0-7]+$/i,Zt=parseInt,er=Object.prototype.toString;function tr(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var rr=function(e){return"number"==typeof e&&e==function(e){var t=function(e){if(!e)return 0===e?e:0;if((e=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==er.call(e)}(e))return NaN;if(tr(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=tr(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Yt,"");var r=Wt.test(e);return r||Jt.test(e)?Zt(e.slice(2),r?2:8):zt.test(e)?NaN:+e}(e))===1/0||e===-1/0){return 17976931348623157e292*(e<0?-1:1)}return e==e?e:0}(e),r=t%1;return t==t?r?t-r:t:0}(e)},nr=Object.prototype.toString;var ir=function(e){return"number"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Number]"==nr.call(e)};var or=Function.prototype,sr=Object.prototype,ar=or.toString,cr=sr.hasOwnProperty,ur=ar.call(Object),dr=sr.toString,pr=function(e,t){return function(r){return e(t(r))}}(Object.getPrototypeOf,Object);var lr=function(e){if(!function(e){return!!e&&"object"==typeof e}(e)||"[object Object]"!=dr.call(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=pr(e);if(null===t)return!0;var r=cr.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ar.call(r)==ur},fr=Object.prototype.toString,mr=Array.isArray;var hr=function(e){return"string"==typeof e||!mr(e)&&function(e){return!!e&&"object"==typeof e}(e)&&"[object String]"==fr.call(e)},gr=/^\s+|\s+$/g,yr=/^[-+]0x[0-9a-f]+$/i,wr=/^0b[01]+$/i,vr=/^0o[0-7]+$/i,_r=parseInt,br=Object.prototype.toString;function Tr(e,t){var r;if("function"!=typeof t)throw new TypeError("Expected a function");return e=function(e){var t=function(e){if(!e)return 0===e?e:0;if((e=function(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==br.call(e)}(e))return NaN;if(Er(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Er(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(gr,"");var r=wr.test(e);return r||vr.test(e)?_r(e.slice(2),r?2:8):yr.test(e)?NaN:+e}(e))===1/0||e===-1/0){return 17976931348623157e292*(e<0?-1:1)}return e==e?e:0}(e),r=t%1;return t==t?r?t-r:t:0}(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}function Er(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var Cr=function(e){return Tr(2,e)},Ar=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];vt&&Ar.splice(3,0,"PS256","PS384","PS512");var Ir={expiresIn:{isValid:function(e){return rr(e)||hr(e)&&e},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(e){return rr(e)||hr(e)&&e},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(e){return hr(e)||Array.isArray(e)},message:'"audience" must be a string or array'},algorithm:{isValid:Gt.bind(null,Ar),message:'"algorithm" must be a valid string enum value'},header:{isValid:lr,message:'"header" must be an object'},encoding:{isValid:hr,message:'"encoding" must be a string'},issuer:{isValid:hr,message:'"issuer" must be a string'},subject:{isValid:hr,message:'"subject" must be a string'},jwtid:{isValid:hr,message:'"jwtid" must be a string'},noTimestamp:{isValid:Xt,message:'"noTimestamp" must be a boolean'},keyid:{isValid:hr,message:'"keyid" must be a string'},mutatePayload:{isValid:Xt,message:'"mutatePayload" must be a boolean'}},Sr={iat:{isValid:ir,message:'"iat" should be a number of seconds'},exp:{isValid:ir,message:'"exp" should be a number of seconds'},nbf:{isValid:ir,message:'"nbf" should be a number of seconds'}};function xr(e,t,r,n){if(!lr(r))throw new Error('Expected "'+n+'" to be a plain object.');Object.keys(r).forEach((function(i){var o=e[i];if(o){if(!o.isValid(r[i]))throw new Error(o.message)}else if(!t)throw new Error('"'+i+'" is not allowed in "'+n+'"')}))}var kr={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},Or=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"],Pr=function(e,t,r,n){var i;if("function"!=typeof r||n||(n=r,r={}),r||(r={}),r=Object.assign({},r),i=n||function(e,t){if(e)throw e;return t},r.clockTimestamp&&"number"!=typeof r.clockTimestamp)return i(new st("clockTimestamp must be a number"));if(void 0!==r.nonce&&("string"!=typeof r.nonce||""===r.nonce.trim()))return i(new st("nonce must be a non-empty string"));var o=r.clockTimestamp||Math.floor(Date.now()/1e3);if(!e)return i(new st("jwt must be provided"));if("string"!=typeof e)return i(new st("jwt must be a string"));var s,a=e.split(".");if(3!==a.length)return i(new st("jwt malformed"));try{s=it(e,{complete:!0})}catch(e){return i(e)}if(!s)return i(new st("invalid token"));var c,u=s.header;if("function"==typeof t){if(!n)return i(new st("verify must be called asynchronous if secret or public key is provided as a callback"));c=t}else c=function(e,r){return r(null,t)};return c(u,(function(t,n){if(t)return i(new st("error in secret or public key callback: "+t.message));var c,d=""!==a[2].trim();if(!d&&n)return i(new st("jwt signature is required"));if(d&&!n)return i(new st("secret or public key must be provided"));if(d||r.algorithms||(r.algorithms=["none"]),r.algorithms||(r.algorithms=~n.toString().indexOf("BEGIN CERTIFICATE")||~n.toString().indexOf("BEGIN PUBLIC KEY")?_t:~n.toString().indexOf("BEGIN RSA PUBLIC KEY")?bt:Tt),!~r.algorithms.indexOf(s.header.alg))return i(new st("invalid algorithm"));try{c=nt.verify(e,s.header.alg,n)}catch(e){return i(e)}if(!c)return i(new st("invalid signature"));var p=s.payload;if(void 0!==p.nbf&&!r.ignoreNotBefore){if("number"!=typeof p.nbf)return i(new st("invalid nbf value"));if(p.nbf>o+(r.clockTolerance||0))return i(new ct("jwt not active",new Date(1e3*p.nbf)))}if(void 0!==p.exp&&!r.ignoreExpiration){if("number"!=typeof p.exp)return i(new st("invalid exp value"));if(o>=p.exp+(r.clockTolerance||0))return i(new dt("jwt expired",new Date(1e3*p.exp)))}if(r.audience){var l=Array.isArray(r.audience)?r.audience:[r.audience];if(!(Array.isArray(p.aud)?p.aud:[p.aud]).some((function(e){return l.some((function(t){return t instanceof RegExp?t.test(e):t===e}))})))return i(new st("jwt audience invalid. expected: "+l.join(" or ")))}if(r.issuer&&("string"==typeof r.issuer&&p.iss!==r.issuer||Array.isArray(r.issuer)&&-1===r.issuer.indexOf(p.iss)))return i(new st("jwt issuer invalid. expected: "+r.issuer));if(r.subject&&p.sub!==r.subject)return i(new st("jwt subject invalid. expected: "+r.subject));if(r.jwtid&&p.jti!==r.jwtid)return i(new st("jwt jwtid invalid. expected: "+r.jwtid));if(r.nonce&&p.nonce!==r.nonce)return i(new st("jwt nonce invalid. expected: "+r.nonce));if(r.maxAge){if("number"!=typeof p.iat)return i(new st("iat required when maxAge is specified"));var f=yt(r.maxAge,p.iat);if(void 0===f)return i(new st('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(o>=f+(r.clockTolerance||0))return i(new dt("maxAge exceeded",new Date(1e3*f)))}if(!0===r.complete){var m=s.signature;return i(null,{header:u,payload:p,signature:m})}return i(null,p)}))},Rr=function(e,t,r,n){"function"==typeof r?(n=r,r={}):r=r||{};var i="object"==typeof e&&!Buffer.isBuffer(e),o=Object.assign({alg:r.algorithm||"HS256",typ:i?"JWT":void 0,kid:r.keyid},r.header);function s(e){if(n)return n(e);throw e}if(!t&&"none"!==r.algorithm)return s(new Error("secretOrPrivateKey must have a value"));if(void 0===e)return s(new Error("payload is required"));if(i){try{!function(e){xr(Sr,!0,e,"payload")}(e)}catch(e){return s(e)}r.mutatePayload||(e=Object.assign({},e))}else{var a=Or.filter((function(e){return void 0!==r[e]}));if(a.length>0)return s(new Error("invalid "+a.join(",")+" option for "+typeof e+" payload"))}if(void 0!==e.exp&&void 0!==r.expiresIn)return s(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(void 0!==e.nbf&&void 0!==r.notBefore)return s(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{!function(e){xr(Ir,!1,e,"options")}(r)}catch(e){return s(e)}var c=e.iat||Math.floor(Date.now()/1e3);if(r.noTimestamp?delete e.iat:i&&(e.iat=c),void 0!==r.notBefore){try{e.nbf=yt(r.notBefore,c)}catch(e){return s(e)}if(void 0===e.nbf)return s(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(void 0!==r.expiresIn&&"object"==typeof e){try{e.exp=yt(r.expiresIn,c)}catch(e){return s(e)}if(void 0===e.exp)return s(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(kr).forEach((function(t){var n=kr[t];if(void 0!==r[t]){if(void 0!==e[n])return s(new Error('Bad "options.'+t+'" option. The payload already has an "'+n+'" property.'));e[n]=r[t]}}));var u=r.encoding||"utf8";if("function"!=typeof n)return nt.sign({header:o,payload:e,secret:t,encoding:u});n=n&&Cr(n),nt.createSign({header:o,privateKey:t,payload:e,encoding:u}).once("error",n).once("done",(function(e){n(null,e)}))};let jr=[];class Dr{constructor(e){this.options=Object.assign({baseUrl:"https://appleid.apple.com",timeout:1e4},e)}async _fetch(e,t){const{baseUrl:r}=this.options;return uniCloud.httpclient.request(r+e,t)}async verifyIdentityToken(e){const t=e.split(".")[0],{kid:r}=JSON.parse(Buffer.from(t,"base64").toString());if(!jr.length)try{jr=await this.getAuthKeys()}catch(e){return{code:10705,msg:e.message}}const n=this.getUsedKey(jr,r);if(!Object.keys(n).length&&!this.fetched)try{jr=await this.getAuthKeys()}catch(e){return{code:10705,msg:e.message}}let i=null;try{i=Pr(e,function(e,t){var r=Buffer.from(e,"base64"),n=Buffer.from(t,"base64"),i=r.toString("hex"),o=n.toString("hex");i=J(i),o=J(o);var s=i.length/2,a=o.length/2,c=ee(s),u=ee(a),d="30"+ee(s+a+c.length/2+u.length/2+2)+"02"+c+i+"02"+u+o;return"-----BEGIN RSA PUBLIC KEY-----\n"+Buffer.from(d,"hex").toString("base64").match(/.{1,64}/g).join("\n")+"\n-----END RSA PUBLIC KEY-----\n"}(n.n,n.e),{algorithms:n.alg})}catch(e){return{code:10705,msg:e.message}}return{code:0,msg:i}}async getAuthKeys(){const{status:e,data:t}=await this._fetch("/auth/keys",{method:"GET",dataType:"json",timeout:this.options.timeout});if(200!==e)throw new Error("request https://appleid.apple.com/auth/keys fail");return t.keys}getUsedKey(e,t){let r={};for(let n=0;nvoid 0===e))return{code:N,messageValues:{param:this.t("dcloud-appid")}};const r=await P.doc(e).get(),n=r&&r.data&&r.data[0];if(!n)return{code:10002};const i=Object.keys(q).reduce((e,t)=>{const r=t,i=function(e,t){return t.split(".").reduce((e,t)=>e&&e[t],e)}(n,t);return i&&e.push({[r]:i}),e},[]);let o;const s={dcloud_appid:Mr.in(t),_id:Mr.neq(n._id)},a={dcloud_appid:Mr.exists(!1),_id:Mr.neq(n._id)};switch(i.length){case 0:return{code:10004};case 1:o=Mr.or([Mr.and([i[0],s]),Mr.and([i[0],a])]);break;default:o=Mr.or([Mr.and([Mr.or(i),s]),Mr.and([Mr.or(i),a])])}const c=await P.where(o).limit(1).get();return c&&c.data&&c.data[0]?{code:10005}:{code:0}}const Fr=uniCloud.database().command;const $r=uniCloud.database();const Hr=uniCloud.database();const Kr=uniCloud.database();async function Gr(e){const t=["apiKey","apiSecret"];for(let r=0,n=t.length;r0){u=a.and(a.or(c),a.or({dcloud_appid:a.in(s)},{dcloud_appid:a.exists(!1)}));if((await P.where(u).limit(1).get()).data.length>0)return{code:10201,messageValues:{type:this.t("username")}}}const d={role:o,nickname:t,dcloud_appid:s,register_date:Date.now()};if(e&&(d.username=e),r){const{passwordHash:e,version:t}=this.encryptPwd(r);d.password=e,t&&(d.password_secret_version=t)}return n&&(d.mobile=n,d.mobile_confirmed=1),i&&(d.email=i,d.email_confirmed=1),{code:0,uid:(await P.add(d)).id}},getUserInfo:async function({uid:e,field:t}){if(!e)return{code:N,messageValues:{param:this.t("user-id")}};let r;if(t&&t.length){const n={};for(let e=0;evoid 0===e.dcloud_appid||e.dcloud_appid.includes(this.context.APPID));if(0===i.length)return{code:10002};if(i.length>1)return{code:10005};const o=i[0]._id;return this.resetPwd({uid:o,password:r})},setAvatar:async function(e){return await P.doc(e.uid).update({avatar:e.avatar}),{code:0,msg:""}},updatePwd:async function(e){const t=await P.doc(e.uid).get();if(t&&t.data&&t.data.length>0){if(0===this._checkPwd(t.data[0],e.oldPassword).code){const{passwordHash:r,version:n}=this.encryptPwd(e.newPassword),i={password:r,token:[]};n&&(i.password_secret_version=n);return E("upRes",await P.doc(t.data[0]._id).update(i)),{code:0,msg:""}}return{code:40202}}return{code:40201}},updateUser:async function(e){const t=e.uid;if(!t)return{code:N,messageValues:{param:this.t("user-id")}};delete e.uid;const{username:r,email:n}=e,{usernameToLowerCase:i,emailToLowerCase:o}=this._getConfig();let s=r&&r.trim(),a=n&&n.trim();return s&&(i&&(s=s.toLowerCase()),e.username=s),a&&(o&&(a=a.toLowerCase()),e.email=a),E("update -> upRes",await P.doc(t).update(e)),{code:0,msg:""}},banAccount:async function({uid:e}={}){return $.call(this,{uid:e,status:B})},unbanAccount:async function({uid:e}={}){return $.call(this,{uid:e,status:M})},closeAccount:async function({uid:e}={}){return $.call(this,{uid:e,status:F})},openAccount:async function({uid:e}={}){return $.call(this,{uid:e,status:M})},_getAlipayApi:function(){const e=this.context.PLATFORM,t=this._getConfig();if(!t.oauth||!t.oauth.alipay)throw new Error(this.t("config-param-require",{param:e+".alipay"}));return["appid","privateKey"].forEach(r=>{if(!t.oauth.alipay[r])throw new Error(this.t("config-param-require",{param:`${e}.alipay.${r}`}))}),Ur({...t.oauth.alipay})},_getValidInviteCode:async function({inviteCode:e}){let t,r=10;e?(r=1,t=e):t=Vr();let n=!1;try{for(;r>0&&!n;){r--;if(0===(await P.where({my_invite_code:t}).get()).data.length){n=!0;break}t=Vr()}t=Vr()}catch(e){}return n?{code:0,inviteCode:t}:e?{code:80401}:{code:80402}},_addUser:async function(e,{needPermission:t,autoSetDcloudAppid:r=!0}={}){const n=this._getConfig(),i={...e,dcloud_appid:r?[this.context.APPID]:[],register_date:Date.now()},o=(await P.add(i)).id;let s;if(n.removePermissionAndRoleFromToken)s=await this.createToken({uid:o,needPermission:t});else{const t=e.role||[];let r;r=0===t.length||t.includes("admin")?[]:await this._getPermissionListByRoleList(t),s=await this.createToken({uid:o,role:t,permission:r})}const{token:a,tokenExpired:c}=s;return await P.doc(o).update({token:[a]}),{token:a,tokenExpired:c,uid:o,type:"register",userInfo:Object.assign({},i,{token:[a]})}},_loginExec:async function(e,t={}){if(e.status===B)return{code:10001};if(e.status===F)return{code:10006};const r=this._getConfig();let n=e.token||[];"string"==typeof n&&(n=[n]);const i=this._getExpiredToken(n);let o;if(n=n.filter(e=>-1===i.indexOf(e)),r.removePermissionAndRoleFromToken){const r=t.needPermission;o=await this.createToken({uid:e._id,needPermission:r})}else{const t=e.role||[];let r;r=0===t.length||t.includes("admin")?[]:await this._getPermissionListByRoleList(t),o=await this.createToken({uid:e._id,role:t,permission:r})}const{token:s,tokenExpired:a}=o;n.push(s),e.token=n;const c={last_login_date:Date.now(),last_login_ip:this.context.CLIENTIP,token:n,...t.extraData};await P.doc(e._id).update(c);const u=Object.assign({},e,c);return{code:0,msg:"",token:s,uid:u._id,username:u.username,type:"login",userInfo:u,tokenExpired:a}},_registerExec:async function(e,{needPermission:t,autoSetDcloudAppid:r=!0}={}){const{my_invite_code:n}=e;if(this._getConfig().autoSetInviteCode||n){const t=await this._getValidInviteCode({inviteCode:n});if(t.code)return t;e.my_invite_code=t.inviteCode}const{PLATFORM:i,appId:o,appid:s,APPID:a,uniPlatform:c,appName:u,appVersion:d,appVersionCode:p,channel:l,clientIP:f,CLIENTIP:m,OS:h,osName:g}=this.context;return e.register_env={appid:o||s||a||"",uni_platform:c||i||"",os_name:g||h||"",app_name:u||"",app_version:d||"",app_version_code:p||"",channel:l?l+"":"",client_ip:f||m||""},{code:0,msg:"",...await this._addUser(e,{needPermission:t,autoSetDcloudAppid:r})}},_getWeixinApi:function(){const e=this.context.PLATFORM,t=this._getConfig();if(!t.oauth||!t.oauth.weixin)throw new Error(this.t("config-param-require",{param:e+".weixin"}));return["appid","appsecret"].forEach(r=>{if(!t.oauth.weixin[r])throw new Error(this.t("config-param-require",{param:`${e}.weixin.${r}`}))}),qr({...t.oauth.weixin})},_getQQApi:function(){const e=this.context.PLATFORM,t=this._getConfig();if(!t.oauth||!t.oauth.qq)throw new Error(this.t("config-param-require",{param:e+".qq"}));return["appid","appsecret"].forEach(r=>{if(!t.oauth.qq[r])throw new Error(this.t("config-param-require",{param:`${e}.qq.${r}`}))}),Nr({...t.oauth.qq})},_getMatchedUser:function(e,t){if(0===e.length)return{code:10002};let r;const n={},i={};for(let r=e.length-1;r>=0;r--){const o=e[r];for(let s=0;s0?{code:10003,messageValues:{target:"用户"}}:{code:0,msg:"",userMatched:r,fieldMatched:s,isFallbackValueMatched:!!s&&i[s]}},_getCurrentAppUser:function(e){const t=this.context.APPID;return e.filter(e=>void 0===e.dcloud_appid||null===e.dcloud_appid||e.dcloud_appid.indexOf(t)>-1||e.dcloud_appid.indexOf(null)>-1)},_checkLoginUserList:function(e){if(e&&1!==e.length)return e[0].status===F?{code:10006}:{code:10005}},setAuthorizedAppLogin:async function({uid:e,dcloudAppidList:t}={}){if("array"!==m(t))return{code:U,messageValues:{param:"dcloudAppidList",reason:this.t("type-array-required",{param:this.t("dcloud-appid-list")})}};if(t&&0!==t.length){const r=await Br.bind(this)({uid:e,dcloudAppidList:t});if(r.code)return r}return await P.doc(e).update({dcloud_appid:Mr.set(t)}),{code:0}},authorizeAppLogin:async function({uid:e,dcloudAppid:t}={}){const r=await Br.bind(this)({uid:e,dcloudAppidList:[t]});return r.code?r:(await P.doc(e).update({dcloud_appid:Mr.push(t)}),{code:0})},forbidAppLogin:async function({uid:e,dcloudAppid:t}={}){return e?(await P.doc(e).update({dcloud_appid:Mr.pull(t)}),{code:0}):{code:N,messageValues:{param:this.t("user-id")}}},acceptInvite:async function({uid:e,inviteCode:t}){const r=await P.where({_id:Fr.neq(e),inviter_uid:Fr.not(Fr.all([e])),my_invite_code:t}).get();if(1!==r.data.length)return{code:80501,msg:"邀请码无效"};const n=[r.data[0]._id].concat(r.data[0].inviter_uid||[]),i=await P.doc(e).field({my_invite_code:!0,inviter_uid:!0}).get();if(0===i.data.length)return{code:80502};if(i.data[0].inviter_uid&&i.data[0].inviter_uid.length>0)return{code:80503,msg:"邀请码不可修改"};const o=Date.now();return await P.doc(e).update({inviter_uid:n,invite_time:o}),await P.where({inviter_uid:e}).update({inviter_uid:Fr.push(n)}),{code:0,msg:""}},getInvitedUser:async function({uid:e,level:t=1,limit:r=20,offset:n=0,needTotal:i=!1}){const o={code:0,msg:"",invitedUser:(await P.where({["inviter_uid."+(t-1)]:e}).field({_id:!0,username:!0,mobile:!0,invite_time:!0}).orderBy("invite_time","desc").skip(n).limit(r).get()).data};if(i){const r=await P.where({["inviter_uid."+(t-1)]:e}).count();o.total=r.total}return o},setUserInviteCode:async function({uid:e,myInviteCode:t}){const r=await this._getValidInviteCode({inviteCode:t});return r.code?r:(await P.doc(e).update({my_invite_code:r.inviteCode}),{code:0,msg:"",myInviteCode:r.inviteCode})},loginByAlipay:async function(e){"string"==typeof e&&(e={code:e});const{needPermission:t,code:r,myInviteCode:n,role:i,type:o}=e,{openid:s}=await this._getAlipayApi().code2Session(r);if(!s)return{code:10501,messageValues:{account:this.t("alipay-account")}};let a=await P.where({ali_openid:s}).get();if(a=this._getCurrentAppUser(a.data),a&&a.length>0){if("register"===o)return{code:10502,messageValues:{type:this.t("alipay-account")}};if(1!==a.length)return{code:10005};const e=a[0],r=await this._loginExec(e,{needPermission:t});if(0!==r.code)return r;const{userInfo:n}=r;return{...r,openid:s,mobileConfirmed:1===n.mobile_confirmed,emailConfirmed:1===n.email_confirmed}}{if("login"===o)return{code:10503,messageValues:{type:this.t("alipay-account")}};const e={ali_openid:s};e.my_invite_code=n,e.role=i;const r=await this._registerExec(e,{needPermission:t});return 0!==r.code?r:{...r,openid:s,mobileConfirmed:!1,emailConfirmed:!1}}},loginByEmail:async function(e){let{email:t,code:r,password:n,myInviteCode:i,type:o,needPermission:s,role:a}=e||{};if(t=t&&t.trim(),!t)return{code:N,messageValues:{param:"邮箱"}};const{emailToLowerCase:c}=this._getConfig();let u=t;c&&(u=t.toLowerCase());const d=await this.verifyCode({email:u,code:r,type:o||"login"});if(0!==d.code)return d;let p={email:t,email_confirmed:1};const l={field:"email",value:t},f=$r.command;u!==t&&(p=f.or(p,{email:u,email_confirmed:1}),l.fallbackValue=u);let m=await P.where(p).get();if(m=this._getCurrentAppUser(m.data),m&&m.length>0){if("register"===o)return{code:10301,messageValues:{type:"邮箱"}};const e=this._getMatchedUser(m,[l]);if(e.code)return e;const{userMatched:t}=e,r=await this._loginExec(t,{needPermission:s});return 0!==r.code?r:{...r,email:u}}{if("login"===o)return{code:10302,messageValues:{type:"邮箱"}};const e={email:u,email_confirmed:1},t=n&&n.trim();if(t){const{passwordHash:r,version:n}=this.encryptPwd(t);e.password=r,n&&(e.password_secret_version=n)}e.my_invite_code=i,e.role=a;const r=await this._registerExec(e,{needPermission:s});return 0!==r.code?r:{...r,email:u}}},loginBySms:async function({mobile:e,code:t,password:r,inviteCode:n,myInviteCode:i,type:o,needPermission:s,role:a}){if(!(e=e&&e.trim()))return{code:N,messageValues:{param:this.t("mobile")}};const c=this._getConfig();if(c.forceInviteCode&&!o)throw new Error(this.t("login-with-invite-type-required"));const u=await this.verifyCode({mobile:e,code:t,type:o||"login"});if(0!==u.code)return u;const d={mobile:e,mobile_confirmed:1};let p=await P.where(d).get();if(p=this._getCurrentAppUser(p.data),p&&p.length>0){if("register"===o)return{code:10201,messageValues:{type:this.t("mobile")}};if(1!==p.length)return{code:10005};const t=p[0],r=await this._loginExec(t,{needPermission:s});return 0!==r.code?r:{...r,mobile:e}}{const t=Date.now();if("login"===o)return{code:10202,messageValues:{type:this.t("mobile")}};const u={mobile:e,mobile_confirmed:1,register_ip:this.context.CLIENTIP,register_date:t},d=r&&r.trim();if(d){const{passwordHash:e,version:t}=this.encryptPwd(d);u.password=e,t&&(u.password_secret_version=t)}if(n){const e=await P.where({my_invite_code:n}).get();if(1!==e.data.length)return{code:10203};u.inviter_uid=[e.data[0]._id].concat(e.data[0].inviter_uid||[]),u.invite_time=t}else if(c.forceInviteCode)return{code:10203};u.my_invite_code=i,u.role=a;const p=await this._registerExec(u,{needPermission:s});return 0!==p.code?p:{...p,mobile:e}}},loginByWeixin:async function(e){"string"==typeof e&&(e={code:e});const{needPermission:t,platform:r,code:n,myInviteCode:i,role:o,type:s}=e,a=r||this.context.PLATFORM,c="mp-weixin"===a,{openid:u,unionid:d,sessionKey:p,accessToken:l,refreshToken:f,expired:m}=await this._getWeixinApi()[c?"code2Session":"getOauthAccessToken"](n);if(!u)return{code:10401,messageValues:{account:"微信openid"}};let h;h=c?{sessionKey:p}:{accessToken:l,refreshToken:f,accessTokenExpired:m};const g=Hr.command,y=[{wx_openid:{[a]:u}}];d&&y.push({wx_unionid:d});let w=await P.where(g.or(...y)).get();if(w=this._getCurrentAppUser(w.data),w&&w.length>0){if("register"===s)return{code:10402,messageValues:{type:this.t("wechat-account")}};if(1!==w.length)return{code:10005};const e=w[0],r={wx_openid:{[a]:u}};d&&(r.wx_unionid=d);const n=await this._loginExec(e,{needPermission:t,extraData:r});if(0!==n.code)return n;const{userInfo:i}=n;return{...n,openid:u,unionid:d,...h,mobileConfirmed:1===i.mobile_confirmed,emailConfirmed:1===i.email_confirmed}}{if("login"===s)return{code:10403,messageValues:{type:this.t("wechat-account")}};const e={wx_openid:{[a]:u},wx_unionid:d};e.my_invite_code=i,e.role=o;const r=await this._registerExec(e,{needPermission:t});return 0!==r.code?r:{...r,openid:u,unionid:d,...h,mobileConfirmed:!1,emailConfirmed:!1}}},loginByQQ:async function({code:e,accessToken:t,myInviteCode:r,needPermission:n,role:i,type:o}={}){const s=this.context.PLATFORM,a="mp-qq"===s,{openid:c,unionid:u,sessionKey:d}=await this._getQQApi()[a?"code2Session":"getOpenidByToken"]({code:e,accessToken:t});if(!c)return{code:10801,messageValues:{account:"qq openid"}};const p={accessToken:t,sessionKey:d},l=Kr.command,f=[{qq_openid:{[s]:c}}];u&&f.push({qq_unionid:u});let m=await P.where(l.or(...f)).get();if(m=this._getCurrentAppUser(m.data),m&&m.length>0){if("register"===o)return{code:10802,messageValues:{type:this.t("qq-account")}};if(1!==m.length)return{code:10005};const e=m[0],t={qq_openid:{[s]:c}};u&&(t.qq_unionid=u);const r=await this._loginExec(e,{needPermission:n,extraData:t});if(0!==r.code)return r;const{userInfo:i}=r;return{...r,openid:c,unionid:u,...p,mobileConfirmed:1===i.mobile_confirmed,emailConfirmed:1===i.email_confirmed}}{if("login"===o)return{code:10803,messageValues:{type:this.t("qq-account")}};const e={qq_openid:{[s]:c},qq_unionid:u};e.my_invite_code=r,e.role=i;const t=await this._registerExec(e);return 0!==t.code?t:{...t,openid:c,unionid:u,...p,mobileConfirmed:!1,emailConfirmed:!1}}},loginByUniverify:async function({openid:e,access_token:t,password:r,inviteCode:n,myInviteCode:i,type:o,needPermission:s,role:a}){const c=this._getConfig(),u=c&&c.service&&c.service.univerify;if(!u)throw new Error(this.t("uni-verify-config-required"));if(c.forceInviteCode&&!o)throw new Error(this.t("login-with-invite-type-required"));const d=await Gr.bind(this)({...u,openid:e,access_token:t});if(0!==d.code)return d;const p=String(d.phoneNumber);let l=await P.where({mobile:p,mobile_confirmed:1}).get();if(l=this._getCurrentAppUser(l.data),l&&l.length>0){if("register"===o)return{code:10601,messageValues:{type:this.t("mobile")}};if(1!==l.length)return{code:10005};const e=l[0],t=await this._loginExec(e,{needPermission:s});return 0!==t.code?t:{...t,mobile:p}}if("login"===o)return{code:10602,messageValues:{type:this.t("mobile")}};const f=Date.now(),m={mobile:p,my_invite_code:i,mobile_confirmed:1,role:a},h=r&&r.trim();if(h){const{passwordHash:e,version:t}=this.encryptPwd(h);m.password=e,t&&(m.password_secret_version=t)}if(n){let e=await P.where({my_invite_code:n}).get();if(1!==e.data.length)return{code:10203};e=e.data[0],m.inviter_uid=[e._id].concat(e.inviter_uid||[]),m.invite_time=f}else if(c.forceInviteCode)return{code:10203};m.my_invite_code=i;const g=await this._registerExec(m,{needPermission:s});return 0!==g.code?g:{...g,mobile:p}},loginByApple:async function({nickName:e,fullName:t,identityToken:r,myInviteCode:n,type:i,needPermission:o,role:s}){const a=this._getConfig(),c=a&&a.oauth&&a.oauth.apple,u=c&&c.bundleId;if(!u)throw new Error(this.t("config-param-require",{param:"(app || app-plus).apple.bundleId"}));if(!r)return{code:N,messageValues:{param:"identityToken"}};t=e||(t&&Object.keys(t).length>0?t.familyName+t.givenName:"");const{code:d,msg:p}=await Lr().verifyIdentityToken(r);if(0!==d)return{code:d,msg:p,messageValues:{account:this.t("apple-account")}};const{iss:l,sub:f,aud:m,email:h}=p;if("https://appleid.apple.com"!==l)return{code:10706,messageValues:{account:this.t("apple-account")}};if(!f)return{code:10701,messageValues:{account:this.t("apple-account")}};if(u!==m)return{code:10702,messageValues:{account:this.t("apple-account")}};const g=t||"User-"+(h?h.split("@")[0]:Math.random().toString(32).slice(2));let y=await P.where({apple_openid:f}).get();if(y=this._getCurrentAppUser(y.data),y&&y.length>0){if("register"===i)return{code:10703,messageValues:{type:this.t("apple-account")}};if(1!==y.length)return{code:10005};const e=y[0],t=await this._loginExec(e,{needPermission:o});return 0!==t.code?t:{...t,openid:f}}if("login"===i)return{code:10704,messageValues:{type:this.t("apple-account")}};const w={nickname:g,apple_openid:f,my_invite_code:n,role:s},v=await this._registerExec(w,{needPermission:o});return 0!==v.code?v:{...v,openid:f}},login:async function({username:e,password:t,queryField:r=[],needPermission:n}){const i=Qr.command,o=[];r&&r.length||(r=["username"]),r.length>1&&console.warn(this.t("query-field-warning"));const{usernameToLowerCase:s,emailToLowerCase:a,passwordErrorLimit:c,passwordErrorRetryTime:u}=this._getConfig(),d={email:{email_confirmed:1},mobile:{mobile_confirmed:1}},p={},l=e&&e.trim();if(!l)return{code:N,messageValues:{param:this.t("username")}};s&&(p.username=l.toLowerCase()),a&&(p.email=l.toLowerCase());const f=[];r.forEach(t=>{o.push({[t]:e,...d[t]});const r={field:t,value:e};"username"===t&&p.username!==e?(o.push({[t]:p.username,...d[t]}),r.fallbackValue=p.username):"email"===t&&p.email!==e&&(o.push({[t]:p.email,...d[t]}),r.fallbackValue=p.email),f.push(r)});let m=await P.where(i.or(...o)).get();m=this._getCurrentAppUser(m.data);const h=this.context.CLIENTIP,g=this._getMatchedUser(m,f);if(g.code)return g;const{userMatched:y}=g;let w=y.login_ip_limit||[];w=w.filter(e=>e.last_error_time>Date.now()-1e3*u);let v=w.find(e=>e.ip===h);if(v&&v.error_times>=c)return{code:10103};const _=t&&t.trim();if(!_)return{code:N,messageValues:{param:"密码"}};const b=this._checkPwd(y,_);if(0===b.code){const e=w.indexOf(v);e>-1&&w.splice(e,1);const t={login_ip_limit:w},{passwordHash:r,passwordVersion:i}=b;r&&i&&(t.password=r,t.password_secret_version=i);const o=await this._loginExec(y,{needPermission:n,extraData:t});return o.code,o}return v?(v.error_times++,v.last_error_time=Date.now()):(v={ip:h,error_times:1,last_error_time:Date.now()},w.push(v)),await P.doc(y._id).update({login_ip_limit:w}),{code:10102,msg:"密码错误"}},register:async function(e){const t=[],r=[{name:"username",desc:this.t("username")},{name:"email",desc:this.t("email"),extraCond:{email_confirmed:1}},{name:"mobile",desc:this.t("mobile"),extraCond:{mobile_confirmed:1}}],{usernameToLowerCase:n,emailToLowerCase:i}=this._getConfig();r.forEach(r=>{const o=r.name;let s=e[o]&&e[o].trim();s?(("username"===r.name&&n||"email"===r.name&&i)&&(s=s.toLowerCase()),e[o]=s,t.push({[o]:s,...r.extraCond})):delete e[o]});const{username:o,email:s,mobile:a,myInviteCode:c,needPermission:u,autoSetDcloudAppid:d=!0}=e;if("needPermission"in e&&delete e.needPermission,"autoSetDcloudAppid"in e&&delete e.autoSetDcloudAppid,0===t.length)return{code:20101,messageValues:{param:this.t("user-unique-param")}};const p=Xr.command;let l=await P.where(p.or(...t)).get();if(l=this._getCurrentAppUser(l.data),l&&l.length>0){const t=l[0];if(t.status===F)return{code:10006};for(let n=0;nt[e]===i.extraCond[e])),t[i.name]===e[i.name]&&o)return{code:20102,messageValues:{type:i.desc}}}}const f=e.password&&e.password.trim();if(!f)return{code:N,messageValues:{param:this.t("password")}};const{passwordHash:m,version:h}=this.encryptPwd(f);e.password=m,h&&(e.password_secret_version=h),e.my_invite_code=c,delete e.myInviteCode;const g=await this._registerExec(e,{needPermission:u,autoSetDcloudAppid:d});return 0!==g.code?g:{...g,username:o,email:s,mobile:a}},logout:async function(e){const t=await this.checkToken(e);if(t.code)return t;const r=Yr.command;return await P.doc(t.uid).update({token:r.pull(e)}),{code:0,msg:""}},getRoleByUid:async function({uid:e}){if(!e)return{code:N,messageValues:{param:this.t("user-id")}};const t=await P.doc(e).get();return 0===t.data.length?{code:L}:{code:0,msg:"",role:t.data[0].role||[]}},getPermissionByRole:async function({roleID:e}){if(!e)return{code:N,messageValues:{param:"roleID"}};if("admin"===e){return{code:0,msg:"",permission:(await D.limit(1e3).get()).data.map(e=>e.permission_id)}}const t=await j.where({role_id:e}).get();return 0===t.data.length?{code:V}:{code:0,msg:"",permission:t.data[0].permission||[]}},getPermissionByUid:async function({uid:e}={}){const t=await P.aggregate().match({_id:e}).project({role:!0}).unwind("$role").lookup({from:"uni-id-roles",localField:"role",foreignField:"role_id",as:"roleDetail"}).unwind("$roleDetail").replaceRoot({newRoot:"$roleDetail"}).end(),r=[],n=[];return t.data.forEach(e=>{n.push(e.role_id),r.push(...e.permission)}),{code:0,msg:"",role:n,permission:A(r)}},bindRole:async function({uid:e,roleList:t,reset:r=!1}){const n={};return"string"==typeof t&&(t=[t]),n.role=r?t:zr.push(t),await P.doc(e).update(n),{code:0,msg:""}},bindPermission:async function({roleID:e,permissionList:t,reset:r=!1}){const n={};return"string"==typeof t&&(t=[t]),n.permission=r?t:zr.push(t),await j.where({role_id:e}).update(n),{code:0,msg:""}},unbindRole:async function({uid:e,roleList:t}){return"string"==typeof t&&(t=[t]),await P.doc(e).update({role:zr.pull(zr.in(t))}),{code:0,msg:""}},unbindPermission:async function({roleID:e,permissionList:t}){return"string"==typeof t&&(t=[t]),await j.where({role_id:e}).update({permission:zr.pull(zr.in(t))}),{code:0,msg:""}},addRole:async function({roleID:e,roleName:t,comment:r,permission:n=[]}){return e?"admin"===e?{code:U,messageValues:{param:"roleID",reason:this.t("add-role-admin-is-not-allowed")}}:(await j.add({role_id:e,role_name:t,comment:r,permission:n,create_date:Date.now()}),{code:0,msg:""}):{code:N,messageValues:{param:this.t("role-id")}}},addPermission:async function({permissionID:e,permissionName:t,comment:r}){return e?(await D.add({permission_id:e,permission_name:t,comment:r,create_date:Date.now()}),{code:0,msg:""}):{code:N,messageValues:{param:this.t("permission-id")}}},getRoleList:async function({limit:e=20,offset:t=0,needTotal:r=!0}){const n={code:0,msg:"",roleList:(await j.skip(t).limit(e).get()).data};if(r){const{total:e}=await j.where({_id:zr.exists(!0)}).count();n.total=e}return n},getRoleInfo:async function(e){const t=await j.where({role_id:e}).get();return 0===t.data.length?{code:V}:{code:0,...t.data[0]}},updateRole:async function({roleID:e,roleName:t,comment:r,permission:n}){return e?(await j.where({role_id:e}).update({role_name:t,comment:r,permission:n}),{code:0,msg:""}):{code:N,messageValues:{param:this.t("role-id")}}},deleteRole:async function({roleID:e}){const t=m(e);if("string"===t)e=[e];else if("array"!==t)throw new Error("typeof roleID must be array or string");return await j.where({role_id:zr.in(e)}).remove(),await P.where({role:zr.elemMatch(zr.in(e))}).update({role:zr.pullAll(e)}),{code:0,msg:""}},getPermissionList:async function({limit:e=20,offset:t=0,needTotal:r=!0}){const n={code:0,msg:"",permissionList:(await D.skip(t).limit(e).get()).data};if(r){const{total:e}=await D.where({_id:zr.exists(!0)}).count();n.total=e}return n},getPermissionInfo:async function(e){const t=await D.where({permission_id:e}).get();return 0===t.data.length?{code:N,messageValues:{param:this.t("permission-id")}}:{code:0,...t.data[0]}},updatePermission:async function({permissionID:e,permissionName:t,comment:r}){return e?(await D.where({permission_id:e}).update({permission_name:t,comment:r}),{code:0,msg:""}):{code:N,messageValues:{param:this.t("permission-id")}}},deletePermission:async function({permissionID:e}){const t=m(e);if("string"===t)e=[e];else if("array"!==t)throw new Error("typeof permissionID must be array or string");return await D.where({permission_id:zr.in(e)}).remove(),await j.where({permission:zr.elemMatch(zr.in(e))}).update({permission:zr.pullAll(e)}),{code:0,msg:""}},bindAlipay:async function({uid:e,code:t,platform:r}){const n=r||this.context.PLATFORM,{openid:i}=await this._getAlipayApi({platform:n}).code2Session(t);if(!i)return{code:60401,messageValues:{account:this.t("alipay-account")}};let o=await P.where({ali_openid:i}).get();return o=this._getCurrentAppUser(o.data),o&&o.length>0?{code:60402,messageValues:{type:this.t("alipay-account")}}:(await P.doc(e).update({ali_openid:i}),{code:0,openid:i,msg:""})},bindEmail:async function(e){let{uid:t,email:r,code:n}=e||{};if(r=r&&r.trim(),!r)return{code:N,messageValues:{param:this.t("email")}};if(!n)return{code:N,messageValues:{param:this.t("verify-code")}};const{emailToLowerCase:i}=this._getConfig();i&&(r=r.toLowerCase());let o=await P.where({email:r,email_confirmed:1}).get();if(o=this._getCurrentAppUser(o.data),o&&o.length>0)return{code:60201,messageValues:{type:this.t("email")}};const s=await this.verifyCode({email:r,code:n,type:"bind"});return 0!==s.code?s:(await P.doc(t).update({email:r,email_confirmed:1}),{code:0,msg:"",email:r})},bindMobile:async function(e){let{uid:t,mobile:r,code:n,openid:i,access_token:o,type:s="sms"}=e||{};if("univerify"===s){const e=this._getConfig(),t=e&&e.service&&e.service.univerify;if(!t)throw new Error("请在config.json中配置service.univerify下一键登录相关参数");const n=await Gr.bind(this)({...t,openid:i,access_token:o});if(0!==n.code)return n;r=""+n.phoneNumber}let a=await P.where({mobile:r,mobile_confirmed:1}).get();if(a=this._getCurrentAppUser(a.data),a&&a.length>0)return{code:60101,messageValues:{type:"手机号"}};if("sms"===s&&"code"in e){if(!r)return{code:N,messageValues:{param:this.t("mobile")}};if(!n)return{code:N,messageValues:{param:this.t("verify-code")}};const e=await this.verifyCode({mobile:r,code:n,type:"bind"});if(0!==e.code)return e}return await P.doc(t).update({mobile:r,mobile_confirmed:1}),{code:0,msg:"",mobile:r}},bindWeixin:async function({uid:e,code:t,platform:r}){const n=r||this.context.PLATFORM,i="mp-weixin"===n,{openid:o,unionid:s,sessionKey:a,accessToken:c,refreshToken:u,expired:d}=await this._getWeixinApi({platform:n})[i?"code2Session":"getOauthAccessToken"](t);if(!o)return{code:60301,messageValues:{account:"微信openid"}};const p=Wr.command,l=[{wx_openid:{[n]:o}}];s&&l.push({wx_unionid:s});let f=await P.where(p.or(...l)).get();if(f=this._getCurrentAppUser(f.data),f&&f.length>0)return{code:60302,messageValues:{type:this.t("wechat-account")}};const m={wx_openid:{[n]:o}};let h;return s&&(m.wx_unionid=s),await P.doc(e).update(m),h=i?{sessionKey:a}:{accessToken:c,refreshToken:u,accessTokenExpired:d},{code:0,msg:"",openid:o,unionid:s,...h}},bindQQ:async function({uid:e,code:t,accessToken:r,platform:n}={}){const i=n||this.context.PLATFORM,o="mp-qq"===i,{openid:s,unionid:a,sessionKey:c}=await this._getQQApi()[o?"code2Session":"getOpenidByToken"]({code:t,accessToken:r});if(!s)return{code:60501,messageValues:{account:"qq openid"}};const u=Jr.command,d=[{qq_openid:{[i]:s}}];a&&d.push({qq_unionid:a});let p=await P.where(u.or(...d)).get();if(p=this._getCurrentAppUser(p.data),p&&p.length>0)return{code:60502,messageValues:{type:this.t("qq-account")}};const l={qq_openid:{[i]:s}};return a&&(l.qq_unionid=a),await P.doc(e).update(l),{code:0,msg:"",openid:s,unionid:a,...{accessToken:r,sessionKey:c}}},unbindAlipay:async function(e){const t=Zr.command,r=await P.doc(e).update({ali_openid:t.remove()});return E("upRes:",r),1===r.updated?{code:0,msg:""}:{code:70401}},unbindEmail:async function(e){let{uid:t,email:r,code:n}=e||{};if(r=r&&r.trim(),!t||!r)return{code:N,messageValues:{param:t?this.t("email"):this.t("user-id")}};const{emailToLowerCase:i}=this._getConfig();if("code"in e){const e=await this.verifyCode({email:r,code:n,type:"unbind"});if(0!==e.code)return e}const o=en.command;let s={_id:t,email:r};if(i){const e=r.toLowerCase();e!==r&&(s=o.or(s,{_id:t,email:e}))}return 1===(await P.where(s).update({email:o.remove(),email_confirmed:o.remove()})).updated?{code:0,msg:""}:{code:70201}},unbindMobile:async function(e){const{uid:t,mobile:r,code:n}=e||{};if("code"in e){const e=await this.verifyCode({mobile:r,code:n,type:"unbind"});if(0!==e.code)return e}const i=tn.command;return 1===(await P.where({_id:t,mobile:r}).update({mobile:i.remove(),mobile_confirmed:i.remove()})).updated?{code:0,msg:""}:{code:70101}},unbindWeixin:async function(e){const t=rn.command,r=await P.doc(e).update({wx_openid:t.remove(),wx_unionid:t.remove()});return E("upRes:",r),1===r.updated?{code:0,msg:""}:{code:70301}},unbindQQ:async function(e){const t=nn.command,r=await P.doc(e).update({qq_openid:t.remove(),qq_unionid:t.remove()});return E("upRes:",r),1===r.updated?{code:0,msg:""}:{code:70501}},getSupportedLoginType:function({appid:e,platform:t}={}){if(!e||!t)throw new Error("Parameter appid and platform is required");const r=this._getConfig({appid:e,platform:t}),n=["username-password","mobile-password","email-password"];for(const e in on)on[e](r)&&n.push(e);return{supportedLoginType:n}},code2SessionAlipay:async function(e){let t=e;"string"==typeof e&&(t={code:e});try{const e=t.platform||this.context.PLATFORM,r=await this._getAlipayApi({platform:e}).code2Session(t.code);return r.openid?{code:0,msg:"",...r}:{code:80701,messageValues:{account:this.t("alipay-account")}}}catch(e){return{code:80702,messageValues:{account:this.t("alipay-account")}}}},code2SessionWeixin:async function(e){let t=e;"string"==typeof e&&(t={code:e});try{const e=t.platform||this.context.PLATFORM,r=await this._getWeixinApi({platform:e})["mp-weixin"===e?"code2Session":"getOauthAccessToken"](t.code);return r.openid?{code:0,msg:"",...r}:{code:80601,messageValues:{account:"微信openid"}}}catch(e){return{code:80602,messageValues:{account:"微信openid"}}}},verifyAppleIdentityToken:async function({identityToken:e,platform:t}){const r=t||this.context.PLATFORM,{code:n,msg:i}=await Lr({clientType:r}).verifyIdentityToken(e);return 0!==n?{code:n,msg:i}:{code:n,msg:"验证通过",...i}},wxBizDataCrypt:async function({code:e,sessionKey:r,encryptedData:n,iv:i}){if(!n)return{code:N,messageValues:{param:"encryptedData"}};if(!i)return{code:N,messageValues:{param:"iv"}};if(!e&&!r)return{code:N,messageValues:{param:"sessionKey"}};const o=this._getWeixinApi();if(!r){const t=await o.code2Session(e);if(!t.sessionKey)return{code:80801};r=t.sessionKey}r=Buffer.from(r,"base64"),n=Buffer.from(n,"base64"),i=Buffer.from(i,"base64");try{var s=t.createDecipheriv("aes-128-cbc",r,i);s.setAutoPadding(!0);var a=s.update(n,"binary","utf8");a+=s.final("utf8"),a=JSON.parse(a)}catch(e){return console.error(e),{code:80802}}return a.watermark.appid!==o.options.appId?{code:80803}:{code:0,msg:"",...a}},getWeixinUserInfo:async function({accessToken:e,openid:t}={}){const r=this.context.PLATFORM;if("app"!==r&&"app-plus"!==r)throw new Error(this.t("limit-client-platform"));try{return{code:0,msg:"",...await this._getWeixinApi().getUserInfo({accessToken:e,openid:t})}}catch(e){return{code:80901}}},encryptPwd:function(e,{value:r,version:n}={}){if(!(e=e&&e.trim()))throw new Error(this.t("param-required",{param:this.t("password")}));if(!r){const e=this._getConfig(),{passwordSecret:t}=e;if("array"===m(t)){const e=t.sort((e,t)=>e.version-t.version);r=e[e.length-1].value,n=e[e.length-1].version}else r=t}if(!r)throw new Error(this.t("param-error",{param:"passwordSecret",reason:"invalid passwordSecret"}));const i=t.createHmac("sha1",r.toString("ascii"));return i.update(e),{passwordHash:i.digest("hex"),version:n}},checkToken:async function(e,{needPermission:t,needUserInfo:r=!0}={}){const n=this._getConfig(),i=this._verifyToken(e);if(i.code)return i;const{uid:o,needPermission:s,role:a,permission:c,exp:u,iat:d,...p}=i,l=a&&c;t=void 0===t?s:t;const f=n.removePermissionAndRoleFromToken||!l||r,m=!n.removePermissionAndRoleFromToken&&!l||n.removePermissionAndRoleFromToken&&l||n.tokenExpiresThreshold&&u-Date.now()/1e3this._createTokenInternal({signContent:e,config:o})):this._createTokenInternal({signContent:a,config:o})},_updateToken:async function({uid:e,tokenList:t,removeToken:r=[],addToken:n=[]}={}){if(!t){const r=await P.doc(e).get(),n=r.data&&r.data[0];t=n&&n.token||[]}"string"==typeof t&&(t=[t]);const i=this._getExpiredToken(t);(t=t.filter(e=>-1===i.indexOf(e))).push(...n);for(let e=0;ee.version-t.version);let c;if(c=n?a.find(e=>e.version===n):a[0],!c)return{code:3};const u=a[a.length-1],{passwordHash:d}=this.encryptPwd(t,c);if(d===r){const e={code:0};if(c!==u){const{passwordHash:r,version:n}=this.encryptPwd(t,u);e.passwordHash=r,e.passwordVersion=n}return e}return{code:4,message:""}},_verifyToken:function(e){const t=this._getConfig();let r;try{r=Pr(e,t.tokenSecret)}catch(e){return"TokenExpiredError"===e.name?{code:30203,err:e}:{code:30204,err:e}}return t.bindTokenToDevice&&r.clientId&&r.clientId!==this._getClientUaHash()?{code:30201}:{code:0,message:"",...r}},_getExpiredToken:function(e){const t=this._getConfig(),r=[];return e.forEach(e=>{try{Pr(e,t.tokenSecret)}catch(t){r.push(e)}}),r},_getPermissionListByRoleList:async function(e){if(!Array.isArray(e))return[];if(0===e.length)return[];if(e.includes("admin")){return(await D.limit(500).get()).data.map(e=>e.permission_id)}const t=await j.where({role_id:sn.in(e)}).get(),r=[];return t.data.forEach(e=>{Array.prototype.push.apply(r,e.permission)}),A(r)},_getClientUaHash:function(){const e=t.createHash("md5"),r=/MicroMessenger/i.test(this.context.CLIENTUA)?this.context.CLIENTUA.replace(/(MicroMessenger\S+).*/i,"$1"):this.context.CLIENTUA;return e.update(r),e.digest("hex")},_createTokenInternal:function({signContent:e,config:t}){if(t.tokenExpiresIn&&t.tokenExpiresThreshold&&t.tokenExpiresIn<=t.tokenExpiresThreshold)throw new Error(this.t("token-expires-config-warning"));return"object"===m(e)&&e.uid?(t.bindTokenToDevice&&(e.clientId=this._getClientUaHash()),{token:Rr(e,t.tokenSecret,{expiresIn:t.tokenExpiresIn}),tokenExpired:Date.now()+1e3*t.tokenExpiresIn}):{code:30101,messageValues:{param:this.t("user-id")}}},setVerifyCode:async function({mobile:e,email:t,code:r,expiresIn:n,type:i}){if(t=t&&t.trim(),e=e&&e.trim(),t){const{emailToLowerCase:e}=this._getConfig();e&&(t=t.toLowerCase())}if(!e&&!t)return{code:50101,messageValues:{param:"手机号或邮箱"}};if(e&&t)return{code:50102,messageValues:{param:"参数",reason:"手机号和邮箱不可同时存在"}};r||(r=C()),n||(n=180);const o=Date.now(),s={mobile:e,email:t,type:i,code:r,state:0,ip:this.context.CLIENTIP,created_at:o,expired_at:o+1e3*n};return await R.add(s),{code:0,mobile:e,email:t}},verifyCode:async function({mobile:e,email:t,code:r,type:n}){if(t=t&&t.trim(),e=e&&e.trim(),t){const{emailToLowerCase:e}=this._getConfig();e&&(t=t.toLowerCase())}if(!e&&!t)return{code:50201,messageValues:{param:"手机号或邮箱"}};if(e&&t)return{code:50203,messageValues:{param:"参数",reason:"手机号和邮箱不可同时存在"}};if(!r)return{code:50202,messageValues:{type:this.t(e?"sms":"email")}};const i=an.command,o=Date.now(),s={mobile:e,email:t,type:n,code:r,state:0,expired_at:i.gt(o)},a=await R.where(s).orderBy("created_at","desc").limit(1).get();if(a&&a.data&&a.data.length>0){const e=a.data[0];return await R.doc(e._id).update({state:1}),{code:0,msg:"验证通过"}}return{code:50202,messageValues:{type:this.t(e?"sms":"email")}}},sendSmsCode:async function({mobile:e,code:t,type:r,templateId:n}){if(!e)return{code:N,messageValues:{param:this.t("mobile")}};if(t||(t=C()),!r)return{code:N,messageValues:{param:this.t("verify-code-type")}};const i=this._getConfig();let o=i&&i.service&&i.service.sms;if(!o)throw new Error(this.t("config-param-required",{param:"service.sms"}));o=Object.assign({codeExpiresIn:300},o);const s=["smsKey","smsSecret"];for(let e=0,t=s.length;e=0?o:{code:0,msg:""}}catch(e){return{code:50301}}}});let un;try{un=require("uni-config-center")}catch(e){throw new Error("Plugin[uni-config-center] was not found")}class dn{constructor({context:e,clientInfo:t,config:r}={}){const n=un({pluginId:"uni-id"});this.pluginConfig=n,this.config=r||this._getConfigContent(),this._configCache={},Object.defineProperty(this,"context",{get(){let r;r=t?{OS:t.os,CLIENTIP:t.clientIP,CLIENTUA:t.userAgent,PLATFORM:t.platform,APPID:t.appId,LOCALE:t.locale,DEVICEID:t.deviceId}:Object.assign({},e||global.__ctx__||{});const n=["CLIENTIP","PLATFORM","APPID","LOCALE"];for(let e=0;ee.dcloudAppid===t)||e.find(e=>e.isDefaultConfig):e}_parseConfigContent(e){return Array.isArray(e)?e:e[0]?Object.values(e):e}_getConfigContent(){if(this.pluginConfig&&this.pluginConfig.hasFile("config.json")){let e;try{e=this.pluginConfig.config()}catch(e){throw new Error("Invalid uni-id config file\n"+e.message)}return this._parseConfigContent(e)}{let e;try{e=require("./config.json")}catch(e){if("MODULE_NOT_FOUND"===e.code||"ENOENT"===e.code)throw new Error("uni-id config file[uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json] not found");throw e}return this._parseConfigContent(e)}}init(){throw new Error("uniID.init has been deprecated, use uniID.createInstance instead")}setInterceptor(e,t){this.interceptorMap.set(e,t)}_getConfig({appid:e,platform:t}={}){const r=`${e=e||this.context.APPID}_${t=t||this.context.PLATFORM}`;if(this._configCache[r])return this._configCache[r];if(!(this.config&&0!==Object.keys(this.config).length))throw new Error(this.t("config-file-not-found"));const n=this._getAppConfig(this.config,e);"app"!==t&&"app-plus"!==t||(t=n.preferedAppPlatform||t),"web"!==t&&"h5"!==t||(t=n.preferedWebPlatform||t);const i=Object.assign(n,n[t])||{},o=Object.assign({bindTokenToDevice:!1,tokenExpiresIn:7200,tokenExpiresThreshold:1200,passwordErrorLimit:6,passwordErrorRetryTime:3600,usernameToLowerCase:!0,emailToLowerCase:!0},i);return["passwordSecret","tokenSecret","tokenExpiresIn","passwordErrorLimit","passwordErrorRetryTime"].forEach(e=>{if(!o||!o[e])throw new Error(this.t("config-param-required",{param:e}))}),this._configCache[r]=o,o}}for(const e in cn)dn.prototype[e]=cn[e];function pn(e){const t=new dn(e);return new Proxy(t,{get(e,t){if(t in e&&0!==t.indexOf("_")){if("function"==typeof e[t])return(r=e[t],function(){const e=r.apply(this,arguments);return f(e)?e.then(e=>(x.bind(this)(e),e)):(x.bind(this)(e),e)}).bind(e);if("context"!==t&&"config"!==t)return e[t]}var r}})}dn.prototype.createInstance=pn;var ln=pn();module.exports=ln; diff --git a/fe/PDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/package.json b/fe/PDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/package.json new file mode 100644 index 000000000..b25bf3397 --- /dev/null +++ b/fe/PDA/uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/package.json @@ -0,0 +1,16 @@ +{ + "name": "uni-id", + "version": "3.3.26", + "description": "uni-id for uniCloud", + "main": "index.js", + "homepage": "https://uniapp.dcloud.io/uniCloud/uni-id", + "repository": { + "type": "git", + "url": "git+https://gitee.com/dcloud/uni-id.git" + }, + "author": "", + "license": "Apache-2.0", + "dependencies": { + "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-indexed-list/changelog.md b/fe/PDA/uni_modules/uni-indexed-list/changelog.md new file mode 100644 index 000000000..08fa71cb4 --- /dev/null +++ b/fe/PDA/uni_modules/uni-indexed-list/changelog.md @@ -0,0 +1,17 @@ +## 1.2.1(2021-11-22) +- 修复 vue3中某些scss变量无法找到的问题 +## 1.2.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-indexed-list](https://uniapp.dcloud.io/component/uniui/uni-indexed-list) +## 1.1.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.0.11(2021-05-12) +- 新增 组件示例地址 +## 1.0.10(2021-04-21) +- 优化 添加依赖 uni-icons, 导入后自动下载依赖 +## 1.0.9(2021-02-05) +- 优化 组件引用关系,通过uni_modules引用组件 + +## 1.0.8(2021-02-05) +- 调整为uni_modules目录规范 +- 新增 支持 PC 端 diff --git a/fe/PDA/uni_modules/uni-indexed-list/components/uni-indexed-list/uni-indexed-list-item.vue b/fe/PDA/uni_modules/uni-indexed-list/components/uni-indexed-list/uni-indexed-list-item.vue new file mode 100644 index 000000000..19284bd2e --- /dev/null +++ b/fe/PDA/uni_modules/uni-indexed-list/components/uni-indexed-list/uni-indexed-list-item.vue @@ -0,0 +1,144 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-indexed-list/components/uni-indexed-list/uni-indexed-list.vue b/fe/PDA/uni_modules/uni-indexed-list/components/uni-indexed-list/uni-indexed-list.vue new file mode 100644 index 000000000..ee3a7ec01 --- /dev/null +++ b/fe/PDA/uni_modules/uni-indexed-list/components/uni-indexed-list/uni-indexed-list.vue @@ -0,0 +1,367 @@ + + + diff --git a/fe/PDA/uni_modules/uni-indexed-list/package.json b/fe/PDA/uni_modules/uni-indexed-list/package.json new file mode 100644 index 000000000..125c0e7f6 --- /dev/null +++ b/fe/PDA/uni_modules/uni-indexed-list/package.json @@ -0,0 +1,89 @@ +{ + "id": "uni-indexed-list", + "displayName": "uni-indexed-list 索引列表", + "version": "1.2.1", + "description": "索引列表组件,右侧带索引的列表,方便快速定位到具体内容,通常用于城市/机场选择等场景", + "keywords": [ + "uni-ui", + "索引列表", + "索引", + "列表" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/fe/PDA/uni_modules/uni-indexed-list/readme.md b/fe/PDA/uni_modules/uni-indexed-list/readme.md new file mode 100644 index 000000000..44ad84b28 --- /dev/null +++ b/fe/PDA/uni_modules/uni-indexed-list/readme.md @@ -0,0 +1,11 @@ + + +## IndexedList 索引列表 +> **组件名:uni-indexed-list** +> 代码块: `uIndexedList` + + +用于展示索引列表。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-indexed-list) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 diff --git a/fe/PDA/uni_modules/uni-link/changelog.md b/fe/PDA/uni_modules/uni-link/changelog.md new file mode 100644 index 000000000..2cfbf5912 --- /dev/null +++ b/fe/PDA/uni_modules/uni-link/changelog.md @@ -0,0 +1,17 @@ +## 1.0.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-link](https://uniapp.dcloud.io/component/uniui/uni-link) +## 1.1.7(2021-11-08) +## 0.0.7(2021-09-03) +- 修复 在 nvue 下不显示的 bug +## 0.0.6(2021-07-30) +- 新增 支持自定义插槽 +## 0.0.5(2021-06-21) +- 新增 download 属性,H5平台下载文件名 +## 0.0.4(2021-05-12) +- 新增 组件示例地址 +## 0.0.3(2021-03-09) +- 新增 href 属性支持 tel:|mailto: + +## 0.0.2(2021-02-05) +- 调整为uni_modules目录规范 diff --git a/fe/PDA/uni_modules/uni-link/components/uni-link/uni-link.vue b/fe/PDA/uni_modules/uni-link/components/uni-link/uni-link.vue new file mode 100644 index 000000000..27c5468e1 --- /dev/null +++ b/fe/PDA/uni_modules/uni-link/components/uni-link/uni-link.vue @@ -0,0 +1,128 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-link/package.json b/fe/PDA/uni_modules/uni-link/package.json new file mode 100644 index 000000000..77b198652 --- /dev/null +++ b/fe/PDA/uni_modules/uni-link/package.json @@ -0,0 +1,87 @@ +{ + "id": "uni-link", + "displayName": "uni-link 超链接", + "version": "1.0.0", + "description": "uni-link是一个外部网页超链接组件,在小程序内复制url,在app内打开外部浏览器,在h5端打", + "keywords": [ + "uni-ui", + "uniui", + "link", + "超链接", + "" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "y", + "联盟": "y" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-link/readme.md b/fe/PDA/uni_modules/uni-link/readme.md new file mode 100644 index 000000000..7f09e941a --- /dev/null +++ b/fe/PDA/uni_modules/uni-link/readme.md @@ -0,0 +1,11 @@ + + +## Link 链接 +> **组件名:uni-link** +> 代码块: `uLink` + + +uni-link是一个外部网页超链接组件,在小程序内复制url,在app内打开外部浏览器,在h5端打开新网页。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-link) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-list/changelog.md b/fe/PDA/uni_modules/uni-list/changelog.md new file mode 100644 index 000000000..6aa6e4e00 --- /dev/null +++ b/fe/PDA/uni_modules/uni-list/changelog.md @@ -0,0 +1,20 @@ +## 1.2.1(2022-03-30) +- 删除无用文件 +## 1.2.0(2021-11-23) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-list](https://uniapp.dcloud.io/component/uniui/uni-list) +## 1.1.3(2021-08-30) +- 修复 在vue3中to属性在发行应用的时候报错的bug +## 1.1.2(2021-07-30) +- 优化 vue3下事件警告的问题 +## 1.1.1(2021-07-21) +- 修复 与其他组件嵌套使用时,点击失效的Bug +## 1.1.0(2021-07-13) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.0.17(2021-05-12) +- 新增 组件示例地址 +## 1.0.16(2021-02-05) +- 优化 组件引用关系,通过uni_modules引用组件 +## 1.0.15(2021-02-05) +- 调整为uni_modules目录规范 +- 修复 uni-list-chat 角标显示不正常的问题 diff --git a/fe/PDA/uni_modules/uni-list/components/uni-list-ad/uni-list-ad.vue b/fe/PDA/uni_modules/uni-list/components/uni-list-ad/uni-list-ad.vue new file mode 100644 index 000000000..b9349c29a --- /dev/null +++ b/fe/PDA/uni_modules/uni-list/components/uni-list-ad/uni-list-ad.vue @@ -0,0 +1,107 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.scss b/fe/PDA/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.scss new file mode 100644 index 000000000..311f8d9fa --- /dev/null +++ b/fe/PDA/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.scss @@ -0,0 +1,58 @@ +/** + * 这里是 uni-list 组件内置的常用样式变量 + * 如果需要覆盖样式,这里提供了基本的组件样式变量,您可以尝试修改这里的变量,去完成样式替换,而不用去修改源码 + * + */ + +// 背景色 +$background-color : #fff; +// 分割线颜色 +$divide-line-color : #e5e5e5; + +// 默认头像大小,如需要修改此值,注意同步修改 js 中的值 const avatarWidth = xx ,目前只支持方形头像 +// nvue 页面不支持修改头像大小 +$avatar-width : 45px ; + +// 头像边框 +$avatar-border-radius: 5px; +$avatar-border-color: #eee; +$avatar-border-width: 1px; + +// 标题文字样式 +$title-size : 16px; +$title-color : #3b4144; +$title-weight : normal; + +// 描述文字样式 +$note-size : 12px; +$note-color : #999; +$note-weight : normal; + +// 右侧额外内容默认样式 +$right-text-size : 12px; +$right-text-color : #999; +$right-text-weight : normal; + +// 角标样式 +// nvue 页面不支持修改圆点位置以及大小 +// 角标在左侧时,角标的位置,默认为 0 ,负数左/下移动,正数右/上移动 +$badge-left: 0px; +$badge-top: 0px; + +// 显示圆点时,圆点大小 +$dot-width: 10px; +$dot-height: 10px; + +// 显示角标时,角标大小和字体大小 +$badge-size : 18px; +$badge-font : 12px; +// 显示角标时,角标前景色 +$badge-color : #fff; +// 显示角标时,角标背景色 +$badge-background-color : #ff5a5f; +// 显示角标时,角标左右间距 +$badge-space : 6px; + +// 状态样式 +// 选中颜色 +$hover : #f5f5f5; diff --git a/fe/PDA/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue b/fe/PDA/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue new file mode 100644 index 000000000..2b3100859 --- /dev/null +++ b/fe/PDA/uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue @@ -0,0 +1,538 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue b/fe/PDA/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue new file mode 100644 index 000000000..2c7d9ea7c --- /dev/null +++ b/fe/PDA/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue @@ -0,0 +1,454 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-list/components/uni-list/uni-list - 副本.vue b/fe/PDA/uni_modules/uni-list/components/uni-list/uni-list - 副本.vue new file mode 100644 index 000000000..1c85003e5 --- /dev/null +++ b/fe/PDA/uni_modules/uni-list/components/uni-list/uni-list - 副本.vue @@ -0,0 +1,106 @@ + + + + diff --git a/fe/PDA/uni_modules/uni-list/components/uni-list/uni-list.vue b/fe/PDA/uni_modules/uni-list/components/uni-list/uni-list.vue new file mode 100644 index 000000000..ecda67653 --- /dev/null +++ b/fe/PDA/uni_modules/uni-list/components/uni-list/uni-list.vue @@ -0,0 +1,108 @@ + + + + diff --git a/fe/PDA/uni_modules/uni-list/components/uni-list/uni-refresh.vue b/fe/PDA/uni_modules/uni-list/components/uni-list/uni-refresh.vue new file mode 100644 index 000000000..3b4c5a230 --- /dev/null +++ b/fe/PDA/uni_modules/uni-list/components/uni-list/uni-refresh.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-list/components/uni-list/uni-refresh.wxs b/fe/PDA/uni_modules/uni-list/components/uni-list/uni-refresh.wxs new file mode 100644 index 000000000..818a6b721 --- /dev/null +++ b/fe/PDA/uni_modules/uni-list/components/uni-list/uni-refresh.wxs @@ -0,0 +1,87 @@ +var pullDown = { + threshold: 95, + maxHeight: 200, + callRefresh: 'onrefresh', + callPullingDown: 'onpullingdown', + refreshSelector: '.uni-refresh' +}; + +function ready(newValue, oldValue, ownerInstance, instance) { + var state = instance.getState() + state.canPullDown = newValue; + // console.log(newValue); +} + +function touchStart(e, instance) { + var state = instance.getState(); + state.refreshInstance = instance.selectComponent(pullDown.refreshSelector); + state.canPullDown = (state.refreshInstance != null && state.refreshInstance != undefined); + if (!state.canPullDown) { + return + } + + // console.log("touchStart"); + + state.height = 0; + state.touchStartY = e.touches[0].pageY || e.changedTouches[0].pageY; + state.refreshInstance.setStyle({ + 'height': 0 + }); + state.refreshInstance.callMethod("onchange", true); +} + +function touchMove(e, ownerInstance) { + var instance = e.instance; + var state = instance.getState(); + if (!state.canPullDown) { + return + } + + var oldHeight = state.height; + var endY = e.touches[0].pageY || e.changedTouches[0].pageY; + var height = endY - state.touchStartY; + if (height > pullDown.maxHeight) { + return; + } + + var refreshInstance = state.refreshInstance; + refreshInstance.setStyle({ + 'height': height + 'px' + }); + + height = height < pullDown.maxHeight ? height : pullDown.maxHeight; + state.height = height; + refreshInstance.callMethod(pullDown.callPullingDown, { + height: height + }); +} + +function touchEnd(e, ownerInstance) { + var state = e.instance.getState(); + if (!state.canPullDown) { + return + } + + state.refreshInstance.callMethod("onchange", false); + + var refreshInstance = state.refreshInstance; + if (state.height > pullDown.threshold) { + refreshInstance.callMethod(pullDown.callRefresh); + return; + } + + refreshInstance.setStyle({ + 'height': 0 + }); +} + +function propObserver(newValue, oldValue, instance) { + pullDown = newValue; +} + +module.exports = { + touchmove: touchMove, + touchstart: touchStart, + touchend: touchEnd, + propObserver: propObserver +} diff --git a/fe/PDA/uni_modules/uni-list/package.json b/fe/PDA/uni_modules/uni-list/package.json new file mode 100644 index 000000000..66e8bef0c --- /dev/null +++ b/fe/PDA/uni_modules/uni-list/package.json @@ -0,0 +1,91 @@ +{ + "id": "uni-list", + "displayName": "uni-list 列表", + "version": "1.2.1", + "description": "List 组件 ,帮助使用者快速构建列表。", + "keywords": [ + "", + "uni-ui", + "uniui", + "列表", + "", + "list" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [ + "uni-badge", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-list/readme.md b/fe/PDA/uni_modules/uni-list/readme.md new file mode 100644 index 000000000..32c28654e --- /dev/null +++ b/fe/PDA/uni_modules/uni-list/readme.md @@ -0,0 +1,346 @@ +## List 列表 +> **组件名:uni-list** +> 代码块: `uList`、`uListItem` +> 关联组件:`uni-list-item`、`uni-badge`、`uni-icons`、`uni-list-chat`、`uni-list-ad` + + +List 列表组件,包含基本列表样式、可扩展插槽机制、长列表性能优化、多端兼容。 + +在vue页面里,它默认使用页面级滚动。在app-nvue页面里,它默认使用原生list组件滚动。这样的长列表,在滚动出屏幕外后,系统会回收不可见区域的渲染内存资源,不会造成滚动越长手机越卡的问题。 + +uni-list组件是父容器,里面的核心是uni-list-item子组件,它代表列表中的一个可重复行,子组件可以无限循环。 + +uni-list-item有很多风格,uni-list-item组件通过内置的属性,满足一些常用的场景。当内置属性不满足需求时,可以通过扩展插槽来自定义列表内容。 + +内置属性可以覆盖的场景包括:导航列表、设置列表、小图标列表、通信录列表、聊天记录列表。 + +涉及很多大图或丰富内容的列表,比如类今日头条的新闻列表、类淘宝的电商列表,需要通过扩展插槽实现。 + +下文均有样例给出。 + +uni-list不包含下拉刷新和上拉翻页。上拉翻页另见组件:[uni-load-more](https://ext.dcloud.net.cn/plugin?id=29) + + +### 安装方式 + +本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`components`。 + +如需通过`npm`方式使用`uni-ui`组件,另见文档:[https://ext.dcloud.net.cn/plugin?id=55](https://ext.dcloud.net.cn/plugin?id=55) + +> **注意事项** +> 为了避免错误使用,给大家带来不好的开发体验,请在使用组件前仔细阅读下面的注意事项,可以帮你避免一些错误。 +> - 组件需要依赖 `sass` 插件 ,请自行手动安装 +> - 组件内部依赖 `'uni-icons'` 、`uni-badge` 组件 +> - `uni-list` 和 `uni-list-item` 需要配套使用,暂不支持单独使用 `uni-list-item` +> - 只有开启点击反馈后,会有点击选中效果 +> - 使用插槽时,可以完全自定义内容 +> - note 、rightText 属性暂时没做限制,不支持文字溢出隐藏,使用时应该控制长度显示或通过默认插槽自行扩展 +> - 支付宝小程序平台需要在支付宝小程序开发者工具里开启 component2 编译模式,开启方式: 详情 --> 项目配置 --> 启用 component2 编译 +> - 如果需要修改 `switch`、`badge` 样式,请使用插槽自定义 +> - 在 `HBuilderX` 低版本中,可能会出现组件显示 `undefined` 的问题,请升级最新的 `HBuilderX` 或者 `cli` +> - 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + +### 基本用法 + +- 设置 `title` 属性,可以显示列表标题 +- 设置 `disabled` 属性,可以禁用当前项 + +```html + + + + + +``` + +### 多行内容显示 + +- 设置 `note` 属性 ,可以在第二行显示描述文本信息 + +```html + + + + + +``` + +### 右侧显示角标、switch + +- 设置 `show-badge` 属性 ,可以显示角标内容 +- 设置 `show-switch` 属性,可以显示 switch 开关 + +```html + + + + + +``` + +### 左侧显示略缩图、图标 + +- 设置 `thumb` 属性 ,可以在列表左侧显示略缩图 +- 设置 `show-extra-icon` 属性,并指定 `extra-icon` 可以在左侧显示图标 + +```html + + + + +``` + +### 开启点击反馈和右侧箭头 +- 设置 `clickable` 为 `true` ,则表示这是一个可点击的列表,会默认给一个点击效果,并可以监听 `click` 事件 +- 设置 `link` 属性,会自动开启点击反馈,并给列表右侧添加一个箭头 +- 设置 `to` 属性,可以跳转页面,`link` 的值表示跳转方式,如果不指定,默认为 `navigateTo` + +```html + + + + + + + +``` + + +### 聊天列表示例 +- 设置 `clickable` 为 `true` ,则表示这是一个可点击的列表,会默认给一个点击效果,并可以监听 `click` 事件 +- 设置 `link` 属性,会自动开启点击反馈,`link` 的值表示跳转方式,如果不指定,默认为 `navigateTo` +- 设置 `to` 属性,可以跳转页面 +- `time` 属性,通常会设置成时间显示,但是这个属性不仅仅可以设置时间,你可以传入任何文本,注意文本长度可能会影响显示 +- `avatar` 和 `avatarList` 属性同时只会有一个生效,同时设置的话,`avatarList` 属性的长度大于1 ,`avatar` 属性将失效 +- 可以通过默认插槽自定义列表右侧内容 + +```html + + + + + + + + + + + + + + + + + 刚刚 + + + + + + + +``` + +```javascript + +export default { + components: {}, + data() { + return { + avatarList: [{ + url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png' + }, { + url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png' + }, { + url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png' + }] + } + } +} + +``` + + +```css + +.chat-custom-right { + flex: 1; + /* #ifndef APP-NVUE */ + display: flex; + /* #endif */ + flex-direction: column; + justify-content: space-between; + align-items: flex-end; +} + +.chat-custom-text { + font-size: 12px; + color: #999; +} + +``` + +## API + +### List Props + +属性名 |类型 |默认值 | 说明 +:-: |:-: |:-: | :-: +border |Boolean |true | 是否显示边框 + + +### ListItem Props + +属性名 |类型 |默认值 | 说明 +:-: |:-: |:-: | :-: +title |String |- | 标题 +note |String |- | 描述 +ellipsis |Number |0 | title 是否溢出隐藏,可选值,0:默认; 1:显示一行; 2:显示两行;【nvue 暂不支持】 +thumb |String |- | 左侧缩略图,若thumb有值,则不会显示扩展图标 +thumbSize |String |medium | 略缩图尺寸,可选值,lg:大图; medium:一般; sm:小图; +showBadge |Boolean |false | 是否显示数字角标 +badgeText |String |- | 数字角标内容 +badgeType |String |- | 数字角标类型,参考[uni-icons](https://ext.dcloud.net.cn/plugin?id=21) +badgeStyle |Object |- | 数字角标样式,使用uni-badge的custom-style参数 +rightText |String |- | 右侧文字内容 +disabled |Boolean |false | 是否禁用 +showArrow |Boolean |true | 是否显示箭头图标 +link |String |navigateTo | 新页面跳转方式,可选值见下表 +to |String |- | 新页面跳转地址,如填写此属性,click 会返回页面是否跳转成功 +clickable |Boolean |false | 是否开启点击反馈 +showSwitch |Boolean |false | 是否显示Switch +switchChecked |Boolean |false | Switch是否被选中 +showExtraIcon |Boolean |false | 左侧是否显示扩展图标 +extraIcon |Object |- | 扩展图标参数,格式为 ``{color: '#4cd964',size: '22',type: 'spinner'}``,参考 [uni-icons](https://ext.dcloud.net.cn/plugin?id=28) +direction | String |row | 排版方向,可选值,row:水平排列; column:垂直排列; 3个插槽是水平排还是垂直排,也受此属性控制 + + +#### Link Options + +属性名 | 说明 +:-: | :-: +navigateTo | 同 uni.navigateTo() +redirectTo | 同 uni.reLaunch() +reLaunch | 同 uni.reLaunch() +switchTab | 同 uni.switchTab() + +### ListItem Events + +事件称名 |说明 |返回参数 +:-: |:-: |:-: +click |点击 uniListItem 触发事件,需开启点击反馈 |- +switchChange |点击切换 Switch 时触发,需显示 switch |e={value:checked} + + + +### ListItem Slots + +名称 | 说明 +:-: | :-: +header | 左/上内容插槽,可完全自定义默认显示 +body | 中间内容插槽,可完全自定义中间内容 +footer | 右/下内容插槽,可完全自定义右侧内容 + + +> **通过插槽扩展** +> 需要注意的是当使用插槽时,内置样式将会失效,只保留排版样式,此时的样式需要开发者自己实现 +> 如果 `uni-list-item` 组件内置属性样式无法满足需求,可以使用插槽来自定义uni-list-item里的内容。 +> uni-list-item提供了3个可扩展的插槽:`header`、`body`、`footer` +> - 当 `direction` 属性为 `row` 时表示水平排列,此时 `header` 表示列表的左边部分,`body` 表示列表的中间部分,`footer` 表示列表的右边部分 +> - 当 `direction` 属性为 `column` 时表示垂直排列,此时 `header` 表示列表的上边部分,`body` 表示列表的中间部分,`footer` 表示列表的下边部分 +> 开发者可以只用1个插槽,也可以3个一起使用。在插槽中可自主编写view标签,实现自己所需的效果。 + + +**示例** + +```html + + + + + + + + + 自定义插槽 + + + + +``` + + + + + +### ListItemChat Props + +属性名 |类型 |默认值 | 说明 +:-: |:-: |:-: | :-: +title |String |- | 标题 +note |String |- | 描述 +clickable |Boolean |false | 是否开启点击反馈 +badgeText |String |- | 数字角标内容,设置为 `dot` 将显示圆点 +badgePositon |String |right | 角标位置 +link |String |navigateTo | 是否展示右侧箭头并开启点击反馈,可选值见下表 +clickable |Boolean |false | 是否开启点击反馈 +to |String |- | 跳转页面地址,如填写此属性,click 会返回页面是否跳转成功 +time |String |- | 右侧时间显示 +avatarCircle |Boolean |false | 是否显示圆形头像 +avatar |String |- | 头像地址,avatarCircle 不填时生效 +avatarList |Array |- | 头像组,格式为 [{url:''}] + +#### Link Options + +属性名 | 说明 +:-: | :-: +navigateTo | 同 uni.navigateTo() +redirectTo | 同 uni.reLaunch() +reLaunch | 同 uni.reLaunch() +switchTab | 同 uni.switchTab() + +### ListItemChat Slots + +名称 | 说明 +:- | :- +default | 自定义列表右侧内容(包括时间和角标显示) + +### ListItemChat Events +事件称名 | 说明 | 返回参数 +:-: | :-: | :-: +@click | 点击 uniListChat 触发事件 | {data:{}} ,如有 to 属性,会返回页面跳转信息 + + + + + + +## 基于uni-list扩展的页面模板 + +通过扩展插槽,可实现多种常见样式的列表 + +**新闻列表类** + +1. 云端一体混合布局:[https://ext.dcloud.net.cn/plugin?id=2546](https://ext.dcloud.net.cn/plugin?id=2546) +2. 云端一体垂直布局,大图模式:[https://ext.dcloud.net.cn/plugin?id=2583](https://ext.dcloud.net.cn/plugin?id=2583) +3. 云端一体垂直布局,多行图文混排:[https://ext.dcloud.net.cn/plugin?id=2584](https://ext.dcloud.net.cn/plugin?id=2584) +4. 云端一体垂直布局,多图模式:[https://ext.dcloud.net.cn/plugin?id=2585](https://ext.dcloud.net.cn/plugin?id=2585) +5. 云端一体水平布局,左图右文:[https://ext.dcloud.net.cn/plugin?id=2586](https://ext.dcloud.net.cn/plugin?id=2586) +6. 云端一体水平布局,左文右图:[https://ext.dcloud.net.cn/plugin?id=2587](https://ext.dcloud.net.cn/plugin?id=2587) +7. 云端一体垂直布局,无图模式,主标题+副标题:[https://ext.dcloud.net.cn/plugin?id=2588](https://ext.dcloud.net.cn/plugin?id=2588) + +**商品列表类** + +1. 云端一体列表/宫格视图互切:[https://ext.dcloud.net.cn/plugin?id=2651](https://ext.dcloud.net.cn/plugin?id=2651) +2. 云端一体列表(宫格模式):[https://ext.dcloud.net.cn/plugin?id=2671](https://ext.dcloud.net.cn/plugin?id=2671) +3. 云端一体列表(列表模式):[https://ext.dcloud.net.cn/plugin?id=2672](https://ext.dcloud.net.cn/plugin?id=2672) + +## 组件示例 + +点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/list/list](https://hellouniapp.dcloud.net.cn/pages/extUI/list/list) \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-load-more/changelog.md b/fe/PDA/uni_modules/uni-load-more/changelog.md new file mode 100644 index 000000000..8f03f1d57 --- /dev/null +++ b/fe/PDA/uni_modules/uni-load-more/changelog.md @@ -0,0 +1,19 @@ +## 1.3.3(2022-01-20) +- 新增 showText属性 ,是否显示文本 +## 1.3.2(2022-01-19) +- 修复 nvue 平台下不显示文本的bug +## 1.3.1(2022-01-19) +- 修复 微信小程序平台样式选择器报警告的问题 +## 1.3.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-load-more](https://uniapp.dcloud.io/component/uniui/uni-load-more) +## 1.2.1(2021-08-24) +- 新增 支持国际化 +## 1.2.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.1.8(2021-05-12) +- 新增 组件示例地址 +## 1.1.7(2021-03-30) +- 修复 uni-load-more 在首页使用时,h5 平台报 'uni is not defined' 的 bug +## 1.1.6(2021-02-05) +- 调整为uni_modules目录规范 diff --git a/fe/PDA/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json b/fe/PDA/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json new file mode 100644 index 000000000..a4f14a545 --- /dev/null +++ b/fe/PDA/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json @@ -0,0 +1,5 @@ +{ + "uni-load-more.contentdown": "Pull up to show more", + "uni-load-more.contentrefresh": "loading...", + "uni-load-more.contentnomore": "No more data" +} diff --git a/fe/PDA/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js b/fe/PDA/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js new file mode 100644 index 000000000..de7509c87 --- /dev/null +++ b/fe/PDA/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js @@ -0,0 +1,8 @@ +import en from './en.json' +import zhHans from './zh-Hans.json' +import zhHant from './zh-Hant.json' +export default { + en, + 'zh-Hans': zhHans, + 'zh-Hant': zhHant +} diff --git a/fe/PDA/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json b/fe/PDA/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json new file mode 100644 index 000000000..f15d51050 --- /dev/null +++ b/fe/PDA/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json @@ -0,0 +1,5 @@ +{ + "uni-load-more.contentdown": "上拉显示更多", + "uni-load-more.contentrefresh": "正在加载...", + "uni-load-more.contentnomore": "没有更多数据了" +} diff --git a/fe/PDA/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json b/fe/PDA/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json new file mode 100644 index 000000000..a255c6ded --- /dev/null +++ b/fe/PDA/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json @@ -0,0 +1,5 @@ +{ + "uni-load-more.contentdown": "上拉顯示更多", + "uni-load-more.contentrefresh": "正在加載...", + "uni-load-more.contentnomore": "沒有更多數據了" +} diff --git a/fe/PDA/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue b/fe/PDA/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue new file mode 100644 index 000000000..e5eff4d65 --- /dev/null +++ b/fe/PDA/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue @@ -0,0 +1,399 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-load-more/package.json b/fe/PDA/uni_modules/uni-load-more/package.json new file mode 100644 index 000000000..2fa6f040a --- /dev/null +++ b/fe/PDA/uni_modules/uni-load-more/package.json @@ -0,0 +1,86 @@ +{ + "id": "uni-load-more", + "displayName": "uni-load-more 加载更多", + "version": "1.3.3", + "description": "LoadMore 组件,常用在列表里面,做滚动加载使用。", + "keywords": [ + "uni-ui", + "uniui", + "加载更多", + "load-more" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-load-more/readme.md b/fe/PDA/uni_modules/uni-load-more/readme.md new file mode 100644 index 000000000..54dc1fad2 --- /dev/null +++ b/fe/PDA/uni_modules/uni-load-more/readme.md @@ -0,0 +1,14 @@ + + +### LoadMore 加载更多 +> **组件名:uni-load-more** +> 代码块: `uLoadMore` + + +用于列表中,做滚动加载使用,展示 loading 的各种状态。 + + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-load-more) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + diff --git a/fe/PDA/uni_modules/uni-nav-bar/changelog.md b/fe/PDA/uni_modules/uni-nav-bar/changelog.md new file mode 100644 index 000000000..f0f6b5661 --- /dev/null +++ b/fe/PDA/uni_modules/uni-nav-bar/changelog.md @@ -0,0 +1,41 @@ +## 1.3.6(2022-06-30) +- 修复 组件示例中插槽用法无法显示内容的bug +## 1.3.5(2022-05-24) +- 新增 stat 属性 ,可开启统计title 上报 ,仅使用了title 属性且项目开启了uni统计生效 +## 1.3.4(2022-01-24) +- 更新 组件示例 +## 1.3.3(2022-01-24) +- 新增 left-width/right-width属性 ,可修改左右两侧的宽度 +## 1.3.2(2022-01-18) +- 修复 在vue下,标题不垂直居中的bug +## 1.3.1(2022-01-18) +- 修复 height 属性类型错误 +## 1.3.0(2022-01-18) +- 新增 height 属性,可修改组件高度 +- 新增 dark 属性可可开启暗黑模式 +- 优化 标题字数过多显示省略号 +- 优化 插槽,插入内容可完全覆盖 +## 1.2.1(2022-01-10) +- 修复 color 属性不生效的bug +## 1.2.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-nav-bar](https://uniapp.dcloud.io/component/uniui/uni-nav-bar) +## 1.1.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.0.11(2021-05-12) +- 新增 组件示例地址 +## 1.0.10(2021-04-30) +- 修复 在nvue下fixed为true,宽度不能撑满的Bug +## 1.0.9(2021-04-21) +- 优化 添加依赖 uni-icons, 导入后自动下载依赖 +## 1.0.8(2021-04-14) +- uni-ui 修复 uni-nav-bar 当 fixed 属性为 true 时铺不满屏幕的 bug + +## 1.0.7(2021-02-25) +- 修复 easycom 下,找不到 uni-status-bar 的bug + +## 1.0.6(2021-02-05) +- 优化 组件引用关系,通过uni_modules引用组件 + +## 1.0.5(2021-02-05) +- 调整为uni_modules目录规范 diff --git a/fe/PDA/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue b/fe/PDA/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue new file mode 100644 index 000000000..cbfc16859 --- /dev/null +++ b/fe/PDA/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue @@ -0,0 +1,348 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.vue b/fe/PDA/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.vue new file mode 100644 index 000000000..6a688744f --- /dev/null +++ b/fe/PDA/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-nav-bar/package.json b/fe/PDA/uni_modules/uni-nav-bar/package.json new file mode 100644 index 000000000..e3fe073d4 --- /dev/null +++ b/fe/PDA/uni_modules/uni-nav-bar/package.json @@ -0,0 +1,89 @@ +{ + "id": "uni-nav-bar", + "displayName": "uni-nav-bar 自定义导航栏", + "version": "1.3.6", + "description": "自定义导航栏组件,主要用于头部导航。", + "keywords": [ + "uni-ui", + "导航", + "导航栏", + "自定义导航栏" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-nav-bar/readme.md b/fe/PDA/uni_modules/uni-nav-bar/readme.md new file mode 100644 index 000000000..3934b3277 --- /dev/null +++ b/fe/PDA/uni_modules/uni-nav-bar/readme.md @@ -0,0 +1,15 @@ + + +## NavBar 导航栏 +> **组件名:uni-nav-bar** +> 代码块: `uNavBar` + +导航栏组件,主要用于头部导航。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-nav-bar) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + + + + diff --git a/fe/PDA/uni_modules/uni-notice-bar/changelog.md b/fe/PDA/uni_modules/uni-notice-bar/changelog.md new file mode 100644 index 000000000..9ee75a017 --- /dev/null +++ b/fe/PDA/uni_modules/uni-notice-bar/changelog.md @@ -0,0 +1,16 @@ +## 1.2.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-notice-bar](https://uniapp.dcloud.io/component/uniui/uni-notice-bar) +## 1.1.1(2021-11-09) +- 新增 提供组件设计资源,组件样式调整 +## 1.1.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.0.9(2021-05-12) +- 新增 组件示例地址 +## 1.0.8(2021-04-21) +- 优化 添加依赖 uni-icons, 导入后自动下载依赖 +## 1.0.7(2021-02-05) +- 优化 组件引用关系,通过uni_modules引用组件 + +## 1.0.6(2021-02-05) +- 调整为uni_modules目录规范 diff --git a/fe/PDA/uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.vue b/fe/PDA/uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.vue new file mode 100644 index 000000000..424430dab --- /dev/null +++ b/fe/PDA/uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.vue @@ -0,0 +1,395 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-notice-bar/package.json b/fe/PDA/uni_modules/uni-notice-bar/package.json new file mode 100644 index 000000000..97719a0ff --- /dev/null +++ b/fe/PDA/uni_modules/uni-notice-bar/package.json @@ -0,0 +1,90 @@ +{ + "id": "uni-notice-bar", + "displayName": "uni-notice-bar 通告栏", + "version": "1.2.0", + "description": "NoticeBar 通告栏组件,常用于展示公告信息,可设为滚动公告", + "keywords": [ + "uni-ui", + "uniui", + "通告栏", + "公告", + "跑马灯" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/fe/PDA/uni_modules/uni-notice-bar/readme.md b/fe/PDA/uni_modules/uni-notice-bar/readme.md new file mode 100644 index 000000000..fb2ede244 --- /dev/null +++ b/fe/PDA/uni_modules/uni-notice-bar/readme.md @@ -0,0 +1,13 @@ + + +## NoticeBar 通告栏 +> **组件名:uni-notice-bar** +> 代码块: `uNoticeBar` + + +通告栏组件 。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-notice-bar) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + diff --git a/fe/PDA/uni_modules/uni-number-box/changelog.md b/fe/PDA/uni_modules/uni-number-box/changelog.md new file mode 100644 index 000000000..5925c32a2 --- /dev/null +++ b/fe/PDA/uni_modules/uni-number-box/changelog.md @@ -0,0 +1,25 @@ +## 1.2.1(2021-11-22) +- 修复 vue3中某些scss变量无法找到的问题 +## 1.2.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-number-box](https://uniapp.dcloud.io/component/uniui/uni-number-box) +## 1.1.2(2021-11-09) +- 新增 提供组件设计资源,组件样式调整 +## 1.1.1(2021-07-30) +- 优化 vue3下事件警告的问题 +## 1.1.0(2021-07-13) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.0.7(2021-05-12) +- 新增 组件示例地址 +## 1.0.6(2021-04-20) +- 修复 uni-number-box 浮点数运算不精确的 bug +- 修复 uni-number-box change 事件触发不正确的 bug +- 新增 uni-number-box v-model 双向绑定 +## 1.0.5(2021-02-05) +- 调整为uni_modules目录规范 + +## 1.0.7(2021-02-05) +- 调整为uni_modules目录规范 +- 新增 支持 v-model +- 新增 支持 focus、blur 事件 +- 新增 支持 PC 端 diff --git a/fe/PDA/uni_modules/uni-number-box/components/uni-number-box/uni-number-box.vue b/fe/PDA/uni_modules/uni-number-box/components/uni-number-box/uni-number-box.vue new file mode 100644 index 000000000..8d255fbb1 --- /dev/null +++ b/fe/PDA/uni_modules/uni-number-box/components/uni-number-box/uni-number-box.vue @@ -0,0 +1,220 @@ + + + diff --git a/fe/PDA/uni_modules/uni-number-box/package.json b/fe/PDA/uni_modules/uni-number-box/package.json new file mode 100644 index 000000000..ad8233685 --- /dev/null +++ b/fe/PDA/uni_modules/uni-number-box/package.json @@ -0,0 +1,85 @@ +{ + "id": "uni-number-box", + "displayName": "uni-number-box 数字输入框", + "version": "1.2.1", + "description": "NumberBox 带加减按钮的数字输入框组件,用户可以控制每次点击增加的数值,支持小数。", + "keywords": [ + "uni-ui", + "uniui", + "数字输入框" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-number-box/readme.md b/fe/PDA/uni_modules/uni-number-box/readme.md new file mode 100644 index 000000000..affc56fa7 --- /dev/null +++ b/fe/PDA/uni_modules/uni-number-box/readme.md @@ -0,0 +1,13 @@ + + +## NumberBox 数字输入框 +> **组件名:uni-number-box** +> 代码块: `uNumberBox` + + +带加减按钮的数字输入框。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-number-box) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + diff --git a/fe/PDA/uni_modules/uni-pagination/changelog.md b/fe/PDA/uni_modules/uni-pagination/changelog.md new file mode 100644 index 000000000..4934027f3 --- /dev/null +++ b/fe/PDA/uni_modules/uni-pagination/changelog.md @@ -0,0 +1,22 @@ +## 1.2.2(2022-07-06) +- 修复 es 语言 i18n 错误 +## 1.2.1(2021-11-22) +- 修复 vue3中某些scss变量无法找到的问题 +## 1.2.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-pagination](https://uniapp.dcloud.io/component/uniui/uni-pagination) +## 1.1.2(2021-10-08) +- 修复 current 、value 属性未监听,导致高亮样式失效的 bug +## 1.1.1(2021-08-20) +- 新增 支持国际化 +## 1.1.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.0.7(2021-05-12) +- 新增 组件示例地址 +## 1.0.6(2021-04-12) +- 新增 PC 和 移动端适配不同的 ui +## 1.0.5(2021-02-05) +- 优化 组件引用关系,通过uni_modules引用组件 + +## 1.0.4(2021-02-05) +- 调整为uni_modules目录规范 diff --git a/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/i18n/en.json b/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/i18n/en.json new file mode 100644 index 000000000..d6e289771 --- /dev/null +++ b/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/i18n/en.json @@ -0,0 +1,5 @@ +{ + "uni-pagination.prevText": "prev", + "uni-pagination.nextText": "next", + "uni-pagination.piecePerPage": "piece/page" +} diff --git a/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/i18n/es.json b/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/i18n/es.json new file mode 100644 index 000000000..604a1138a --- /dev/null +++ b/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/i18n/es.json @@ -0,0 +1,5 @@ +{ + "uni-pagination.prevText": "anterior", + "uni-pagination.nextText": "prxima", + "uni-pagination.piecePerPage": "Artculo/Pgina" +} diff --git a/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/i18n/fr.json b/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/i18n/fr.json new file mode 100644 index 000000000..a7a0c7749 --- /dev/null +++ b/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/i18n/fr.json @@ -0,0 +1,5 @@ +{ + "uni-pagination.prevText": "précédente", + "uni-pagination.nextText": "suivante", + "uni-pagination.piecePerPage": "Articles/Pages" +} diff --git a/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/i18n/index.js b/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/i18n/index.js new file mode 100644 index 000000000..2469dd02b --- /dev/null +++ b/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/i18n/index.js @@ -0,0 +1,12 @@ +import en from './en.json' +import es from './es.json' +import fr from './fr.json' +import zhHans from './zh-Hans.json' +import zhHant from './zh-Hant.json' +export default { + en, + es, + fr, + 'zh-Hans': zhHans, + 'zh-Hant': zhHant +} diff --git a/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/i18n/zh-Hans.json b/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/i18n/zh-Hans.json new file mode 100644 index 000000000..782bbe4ad --- /dev/null +++ b/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/i18n/zh-Hans.json @@ -0,0 +1,5 @@ +{ + "uni-pagination.prevText": "上一页", + "uni-pagination.nextText": "下一页", + "uni-pagination.piecePerPage": "条/页" +} diff --git a/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/i18n/zh-Hant.json b/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/i18n/zh-Hant.json new file mode 100644 index 000000000..180fddbd4 --- /dev/null +++ b/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/i18n/zh-Hant.json @@ -0,0 +1,5 @@ +{ + "uni-pagination.prevText": "上一頁", + "uni-pagination.nextText": "下一頁", + "uni-pagination.piecePerPage": "條/頁" +} diff --git a/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue b/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue new file mode 100644 index 000000000..713503405 --- /dev/null +++ b/fe/PDA/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue @@ -0,0 +1,463 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-pagination/package.json b/fe/PDA/uni_modules/uni-pagination/package.json new file mode 100644 index 000000000..644859bb6 --- /dev/null +++ b/fe/PDA/uni_modules/uni-pagination/package.json @@ -0,0 +1,86 @@ +{ + "id": "uni-pagination", + "displayName": "uni-pagination 分页器", + "version": "1.2.2", + "description": "Pagination 分页器组件,用于展示页码、请求数据等。", + "keywords": [ + "uni-ui", + "uniui", + "分页器", + "页码" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss","uni-icons"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-pagination/readme.md b/fe/PDA/uni_modules/uni-pagination/readme.md new file mode 100644 index 000000000..97ea1d639 --- /dev/null +++ b/fe/PDA/uni_modules/uni-pagination/readme.md @@ -0,0 +1,11 @@ + + +## Pagination 分页器 +> **组件名:uni-pagination** +> 代码块: `uPagination` + + +分页器组件,用于展示页码、请求数据等。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-pagination) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 diff --git a/fe/PDA/uni_modules/uni-popup/changelog.md b/fe/PDA/uni_modules/uni-popup/changelog.md new file mode 100644 index 000000000..a9e2d6682 --- /dev/null +++ b/fe/PDA/uni_modules/uni-popup/changelog.md @@ -0,0 +1,60 @@ +## 1.7.9(2022-04-02) +- 修复 弹出层内部无法滚动的bug +## 1.7.8(2022-03-28) +- 修复 小程序中高度错误的bug +## 1.7.7(2022-03-17) +- 修复 快速调用open出现问题的Bug +## 1.7.6(2022-02-14) +- 修复 safeArea 属性不能设置为false的bug +## 1.7.5(2022-01-19) +- 修复 isMaskClick 失效的bug +## 1.7.4(2022-01-19) +- 新增 cancelText \ confirmText 属性 ,可自定义文本 +- 新增 maskBackgroundColor 属性 ,可以修改蒙版颜色 +- 优化 maskClick属性 更新为 isMaskClick ,解决微信小程序警告的问题 +## 1.7.3(2022-01-13) +- 修复 设置 safeArea 属性不生效的bug +## 1.7.2(2021-11-26) +- 优化 组件示例 +## 1.7.1(2021-11-26) +- 修复 vuedoc 文字错误 +## 1.7.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-popup](https://uniapp.dcloud.io/component/uniui/uni-popup) +## 1.6.2(2021-08-24) +- 新增 支持国际化 +## 1.6.1(2021-07-30) +- 优化 vue3下事件警告的问题 +## 1.6.0(2021-07-13) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.5.0(2021-06-23) +- 新增 mask-click 遮罩层点击事件 +## 1.4.5(2021-06-22) +- 修复 nvue 平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug +## 1.4.4(2021-06-18) +- 修复 H5平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug +## 1.4.3(2021-06-08) +- 修复 错误的 watch 字段 +- 修复 safeArea 属性不生效的问题 +- 修复 点击内容,再点击遮罩无法关闭的Bug +## 1.4.2(2021-05-12) +- 新增 组件示例地址 +## 1.4.1(2021-04-29) +- 修复 组件内放置 input 、textarea 组件,无法聚焦的问题 +## 1.4.0 (2021-04-29) +- 新增 type 属性的 left\right 值,支持左右弹出 +- 新增 open(String:type) 方法参数 ,可以省略 type 属性 ,直接传入类型打开指定弹窗 +- 新增 backgroundColor 属性,可定义主窗口背景色,默认不显示背景色 +- 新增 safeArea 属性,是否适配底部安全区 +- 修复 App\h5\微信小程序底部安全区占位不对的Bug +- 修复 App 端弹出等待的Bug +- 优化 提升低配设备性能,优化动画卡顿问题 +- 优化 更简单的组件自定义方式 +## 1.2.9(2021-02-05) +- 优化 组件引用关系,通过uni_modules引用组件 +## 1.2.8(2021-02-05) +- 调整为uni_modules目录规范 +## 1.2.7(2021-02-05) +- 调整为uni_modules目录规范 +- 新增 支持 PC 端 +- 新增 uni-popup-message 、uni-popup-dialog扩展组件支持 PC 端 diff --git a/fe/PDA/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js b/fe/PDA/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js new file mode 100644 index 000000000..6ef26a262 --- /dev/null +++ b/fe/PDA/uni_modules/uni-popup/components/uni-popup-dialog/keypress.js @@ -0,0 +1,45 @@ +// #ifdef H5 +export default { + name: 'Keypress', + props: { + disable: { + type: Boolean, + default: false + } + }, + mounted () { + const keyNames = { + esc: ['Esc', 'Escape'], + tab: 'Tab', + enter: 'Enter', + space: [' ', 'Spacebar'], + up: ['Up', 'ArrowUp'], + left: ['Left', 'ArrowLeft'], + right: ['Right', 'ArrowRight'], + down: ['Down', 'ArrowDown'], + delete: ['Backspace', 'Delete', 'Del'] + } + const listener = ($event) => { + if (this.disable) { + return + } + const keyName = Object.keys(keyNames).find(key => { + const keyName = $event.key + const value = keyNames[key] + return value === keyName || (Array.isArray(value) && value.includes(keyName)) + }) + if (keyName) { + // 避免和其他按键事件冲突 + setTimeout(() => { + this.$emit(keyName, {}) + }, 0) + } + } + document.addEventListener('keyup', listener) + this.$once('hook:beforeDestroy', () => { + document.removeEventListener('keyup', listener) + }) + }, + render: () => {} +} +// #endif diff --git a/fe/PDA/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue b/fe/PDA/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue new file mode 100644 index 000000000..a5d0f2a2d --- /dev/null +++ b/fe/PDA/uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue @@ -0,0 +1,271 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue b/fe/PDA/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue new file mode 100644 index 000000000..91370a829 --- /dev/null +++ b/fe/PDA/uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue @@ -0,0 +1,143 @@ + + + + diff --git a/fe/PDA/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue b/fe/PDA/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue new file mode 100644 index 000000000..5be76247a --- /dev/null +++ b/fe/PDA/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue @@ -0,0 +1,187 @@ + + + + diff --git a/fe/PDA/uni_modules/uni-popup/components/uni-popup/i18n/en.json b/fe/PDA/uni_modules/uni-popup/components/uni-popup/i18n/en.json new file mode 100644 index 000000000..7f1bd06a0 --- /dev/null +++ b/fe/PDA/uni_modules/uni-popup/components/uni-popup/i18n/en.json @@ -0,0 +1,7 @@ +{ + "uni-popup.cancel": "cancel", + "uni-popup.ok": "ok", + "uni-popup.placeholder": "pleace enter", + "uni-popup.title": "Hint", + "uni-popup.shareTitle": "Share to" +} diff --git a/fe/PDA/uni_modules/uni-popup/components/uni-popup/i18n/index.js b/fe/PDA/uni_modules/uni-popup/components/uni-popup/i18n/index.js new file mode 100644 index 000000000..de7509c87 --- /dev/null +++ b/fe/PDA/uni_modules/uni-popup/components/uni-popup/i18n/index.js @@ -0,0 +1,8 @@ +import en from './en.json' +import zhHans from './zh-Hans.json' +import zhHant from './zh-Hant.json' +export default { + en, + 'zh-Hans': zhHans, + 'zh-Hant': zhHant +} diff --git a/fe/PDA/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json b/fe/PDA/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json new file mode 100644 index 000000000..5e3003cab --- /dev/null +++ b/fe/PDA/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json @@ -0,0 +1,7 @@ +{ + "uni-popup.cancel": "取消", + "uni-popup.ok": "确定", + "uni-popup.placeholder": "请输入", + "uni-popup.title": "提示", + "uni-popup.shareTitle": "分享到" +} diff --git a/fe/PDA/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json b/fe/PDA/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json new file mode 100644 index 000000000..13e39eba1 --- /dev/null +++ b/fe/PDA/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json @@ -0,0 +1,7 @@ +{ + "uni-popup.cancel": "取消", + "uni-popup.ok": "確定", + "uni-popup.placeholder": "請輸入", + "uni-popup.title": "提示", + "uni-popup.shareTitle": "分享到" +} diff --git a/fe/PDA/uni_modules/uni-popup/components/uni-popup/keypress.js b/fe/PDA/uni_modules/uni-popup/components/uni-popup/keypress.js new file mode 100644 index 000000000..62dda461b --- /dev/null +++ b/fe/PDA/uni_modules/uni-popup/components/uni-popup/keypress.js @@ -0,0 +1,45 @@ +// #ifdef H5 +export default { + name: 'Keypress', + props: { + disable: { + type: Boolean, + default: false + } + }, + mounted () { + const keyNames = { + esc: ['Esc', 'Escape'], + tab: 'Tab', + enter: 'Enter', + space: [' ', 'Spacebar'], + up: ['Up', 'ArrowUp'], + left: ['Left', 'ArrowLeft'], + right: ['Right', 'ArrowRight'], + down: ['Down', 'ArrowDown'], + delete: ['Backspace', 'Delete', 'Del'] + } + const listener = ($event) => { + if (this.disable) { + return + } + const keyName = Object.keys(keyNames).find(key => { + const keyName = $event.key + const value = keyNames[key] + return value === keyName || (Array.isArray(value) && value.includes(keyName)) + }) + if (keyName) { + // 避免和其他按键事件冲突 + setTimeout(() => { + this.$emit(keyName, {}) + }, 0) + } + } + document.addEventListener('keyup', listener) + // this.$once('hook:beforeDestroy', () => { + // document.removeEventListener('keyup', listener) + // }) + }, + render: () => {} +} +// #endif diff --git a/fe/PDA/uni_modules/uni-popup/components/uni-popup/popup.js b/fe/PDA/uni_modules/uni-popup/components/uni-popup/popup.js new file mode 100644 index 000000000..c4e5781dd --- /dev/null +++ b/fe/PDA/uni_modules/uni-popup/components/uni-popup/popup.js @@ -0,0 +1,26 @@ + +export default { + data() { + return { + + } + }, + created(){ + this.popup = this.getParent() + }, + methods:{ + /** + * 获取父元素实例 + */ + getParent(name = 'uniPopup') { + let parent = this.$parent; + let parentName = parent.$options.name; + while (parentName !== name) { + parent = parent.$parent; + if (!parent) return false + parentName = parent.$options.name; + } + return parent; + }, + } +} diff --git a/fe/PDA/uni_modules/uni-popup/components/uni-popup/uni-popup.vue b/fe/PDA/uni_modules/uni-popup/components/uni-popup/uni-popup.vue new file mode 100644 index 000000000..db90c599e --- /dev/null +++ b/fe/PDA/uni_modules/uni-popup/components/uni-popup/uni-popup.vue @@ -0,0 +1,474 @@ + + + + diff --git a/fe/PDA/uni_modules/uni-popup/package.json b/fe/PDA/uni_modules/uni-popup/package.json new file mode 100644 index 000000000..069e9ce51 --- /dev/null +++ b/fe/PDA/uni_modules/uni-popup/package.json @@ -0,0 +1,90 @@ +{ + "id": "uni-popup", + "displayName": "uni-popup 弹出层", + "version": "1.7.9", + "description": " Popup 组件,提供常用的弹层", + "keywords": [ + "uni-ui", + "弹出层", + "弹窗", + "popup", + "弹框" + ], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-transition" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/fe/PDA/uni_modules/uni-popup/readme.md b/fe/PDA/uni_modules/uni-popup/readme.md new file mode 100644 index 000000000..fdad4b3d7 --- /dev/null +++ b/fe/PDA/uni_modules/uni-popup/readme.md @@ -0,0 +1,17 @@ + + +## Popup 弹出层 +> **组件名:uni-popup** +> 代码块: `uPopup` +> 关联组件:`uni-transition` + + +弹出层组件,在应用中弹出一个消息提示窗口、提示框等 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-popup) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + + + + diff --git a/fe/PDA/uni_modules/uni-rate/changelog.md b/fe/PDA/uni_modules/uni-rate/changelog.md new file mode 100644 index 000000000..8a98a6127 --- /dev/null +++ b/fe/PDA/uni_modules/uni-rate/changelog.md @@ -0,0 +1,25 @@ +## 1.3.1(2022-02-25) +- 修复 条件判断 `NaN` 错误的 bug +## 1.3.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-rate](https://uniapp.dcloud.io/component/uniui/uni-rate) +## 1.2.2(2021-09-10) +- 优化 默认值修改为 0 颗星 +## 1.2.1(2021-07-30) +- 优化 vue3下事件警告的问题 +## 1.2.0(2021-07-13) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.1.2(2021-05-12) +- 新增 组件示例地址 +## 1.1.1(2021-04-21) +- 修复 布局变化后 uni-rate 星星计算不准确的 bug +- 优化 添加依赖 uni-icons, 导入 uni-rate 自动下载依赖 +## 1.1.0(2021-04-16) +- 修复 uni-rate 属性 margin 值为 string 组件失效的 bug + +## 1.0.9(2021-02-05) +- 优化 组件引用关系,通过uni_modules引用组件 + +## 1.0.8(2021-02-05) +- 调整为uni_modules目录规范 +- 支持 pc 端 diff --git a/fe/PDA/uni_modules/uni-rate/components/uni-rate/uni-rate.vue b/fe/PDA/uni_modules/uni-rate/components/uni-rate/uni-rate.vue new file mode 100644 index 000000000..857f5f9c9 --- /dev/null +++ b/fe/PDA/uni_modules/uni-rate/components/uni-rate/uni-rate.vue @@ -0,0 +1,361 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-rate/package.json b/fe/PDA/uni_modules/uni-rate/package.json new file mode 100644 index 000000000..64e8e3320 --- /dev/null +++ b/fe/PDA/uni_modules/uni-rate/package.json @@ -0,0 +1,88 @@ +{ + "id": "uni-rate", + "displayName": "uni-rate 评分", + "version": "1.3.1", + "description": "Rate 评分组件,可自定义评分星星图标的大小、间隔、评分数。", + "keywords": [ + "uni-ui", + "uniui", + "评分" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/fe/PDA/uni_modules/uni-rate/readme.md b/fe/PDA/uni_modules/uni-rate/readme.md new file mode 100644 index 000000000..eae7b5ced --- /dev/null +++ b/fe/PDA/uni_modules/uni-rate/readme.md @@ -0,0 +1,12 @@ + + +## Rate 评分 +> **组件名:uni-rate** +> 代码块: `uRate` +> 关联组件:`uni-icons` + + +评分组件,多用于购买商品后,对商品进行评价等场景 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-rate) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-row/changelog.md b/fe/PDA/uni_modules/uni-row/changelog.md new file mode 100644 index 000000000..5b465bc61 --- /dev/null +++ b/fe/PDA/uni_modules/uni-row/changelog.md @@ -0,0 +1,10 @@ +## 1.0.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-row](https://uniapp.dcloud.io/component/uniui/uni-row) +## 0.1.0(2021-07-13) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 0.0.4(2021-05-12) +- 新增 组件示例地址 +## 0.0.3(2021-02-05) +- 调整为uni_modules目录规范 +- 新增uni-row组件 diff --git a/fe/PDA/uni_modules/uni-row/components/uni-col/uni-col.vue b/fe/PDA/uni_modules/uni-row/components/uni-col/uni-col.vue new file mode 100644 index 000000000..84e2deb4c --- /dev/null +++ b/fe/PDA/uni_modules/uni-row/components/uni-col/uni-col.vue @@ -0,0 +1,317 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-row/components/uni-row/uni-row.vue b/fe/PDA/uni_modules/uni-row/components/uni-row/uni-row.vue new file mode 100644 index 000000000..f8e854239 --- /dev/null +++ b/fe/PDA/uni_modules/uni-row/components/uni-row/uni-row.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-row/package.json b/fe/PDA/uni_modules/uni-row/package.json new file mode 100644 index 000000000..3f52fa647 --- /dev/null +++ b/fe/PDA/uni_modules/uni-row/package.json @@ -0,0 +1,87 @@ +{ + "id": "uni-row", + "displayName": "uni-row 布局-行", + "version": "1.0.0", + "description": "流式栅格系统,随着屏幕或视口分为 24 份,可以迅速简便地创建布局。", + "keywords": [ + "uni-ui", + "uniui", + "栅格", + "布局", + "layout" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "u" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-row/readme.md b/fe/PDA/uni_modules/uni-row/readme.md new file mode 100644 index 000000000..3c9c8b99e --- /dev/null +++ b/fe/PDA/uni_modules/uni-row/readme.md @@ -0,0 +1,10 @@ +## Layout 布局 + +> **组件名 uni-row、uni-col** +> 代码块: `uRow`、`uCol` + + +流式栅格系统,随着屏幕或视口分为 24 份,可以迅速简便地创建布局。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-row) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-scss/changelog.md b/fe/PDA/uni_modules/uni-scss/changelog.md new file mode 100644 index 000000000..b863bb0f5 --- /dev/null +++ b/fe/PDA/uni_modules/uni-scss/changelog.md @@ -0,0 +1,8 @@ +## 1.0.3(2022-01-21) +- 优化 组件示例 +## 1.0.2(2021-11-22) +- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题 +## 1.0.1(2021-11-22) +- 修复 vue3中scss语法兼容问题 +## 1.0.0(2021-11-18) +- init diff --git a/fe/PDA/uni_modules/uni-scss/index.scss b/fe/PDA/uni_modules/uni-scss/index.scss new file mode 100644 index 000000000..1744a5f98 --- /dev/null +++ b/fe/PDA/uni_modules/uni-scss/index.scss @@ -0,0 +1 @@ +@import './styles/index.scss'; diff --git a/fe/PDA/uni_modules/uni-scss/package.json b/fe/PDA/uni_modules/uni-scss/package.json new file mode 100644 index 000000000..7cc0ccb73 --- /dev/null +++ b/fe/PDA/uni_modules/uni-scss/package.json @@ -0,0 +1,82 @@ +{ + "id": "uni-scss", + "displayName": "uni-scss 辅助样式", + "version": "1.0.3", + "description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。", + "keywords": [ + "uni-scss", + "uni-ui", + "辅助样式" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "^3.1.0" + }, + "dcloudext": { + "category": [ + "JS SDK", + "通用 SDK" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "u" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "n", + "联盟": "n" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/fe/PDA/uni_modules/uni-scss/readme.md b/fe/PDA/uni_modules/uni-scss/readme.md new file mode 100644 index 000000000..b7d1c25f3 --- /dev/null +++ b/fe/PDA/uni_modules/uni-scss/readme.md @@ -0,0 +1,4 @@ +`uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-scss/styles/index.scss b/fe/PDA/uni_modules/uni-scss/styles/index.scss new file mode 100644 index 000000000..ffac4fecd --- /dev/null +++ b/fe/PDA/uni_modules/uni-scss/styles/index.scss @@ -0,0 +1,7 @@ +@import './setting/_variables.scss'; +@import './setting/_border.scss'; +@import './setting/_color.scss'; +@import './setting/_space.scss'; +@import './setting/_radius.scss'; +@import './setting/_text.scss'; +@import './setting/_styles.scss'; diff --git a/fe/PDA/uni_modules/uni-scss/styles/setting/_border.scss b/fe/PDA/uni_modules/uni-scss/styles/setting/_border.scss new file mode 100644 index 000000000..12a11c322 --- /dev/null +++ b/fe/PDA/uni_modules/uni-scss/styles/setting/_border.scss @@ -0,0 +1,3 @@ +.uni-border { + border: 1px $uni-border-1 solid; +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-scss/styles/setting/_color.scss b/fe/PDA/uni_modules/uni-scss/styles/setting/_color.scss new file mode 100644 index 000000000..1ededd94d --- /dev/null +++ b/fe/PDA/uni_modules/uni-scss/styles/setting/_color.scss @@ -0,0 +1,66 @@ + +// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐 +// @mixin get-styles($k,$c) { +// @if $k == size or $k == weight{ +// font-#{$k}:#{$c} +// }@else{ +// #{$k}:#{$c} +// } +// } +$uni-ui-color:( + // 主色 + primary: $uni-primary, + primary-disable: $uni-primary-disable, + primary-light: $uni-primary-light, + // 辅助色 + success: $uni-success, + success-disable: $uni-success-disable, + success-light: $uni-success-light, + warning: $uni-warning, + warning-disable: $uni-warning-disable, + warning-light: $uni-warning-light, + error: $uni-error, + error-disable: $uni-error-disable, + error-light: $uni-error-light, + info: $uni-info, + info-disable: $uni-info-disable, + info-light: $uni-info-light, + // 中性色 + main-color: $uni-main-color, + base-color: $uni-base-color, + secondary-color: $uni-secondary-color, + extra-color: $uni-extra-color, + // 背景色 + bg-color: $uni-bg-color, + // 边框颜色 + border-1: $uni-border-1, + border-2: $uni-border-2, + border-3: $uni-border-3, + border-4: $uni-border-4, + // 黑色 + black:$uni-black, + // 白色 + white:$uni-white, + // 透明 + transparent:$uni-transparent +) !default; +@each $key, $child in $uni-ui-color { + .uni-#{"" + $key} { + color: $child; + } + .uni-#{"" + $key}-bg { + background-color: $child; + } +} +.uni-shadow-sm { + box-shadow: $uni-shadow-sm; +} +.uni-shadow-base { + box-shadow: $uni-shadow-base; +} +.uni-shadow-lg { + box-shadow: $uni-shadow-lg; +} +.uni-mask { + background-color:$uni-mask; +} diff --git a/fe/PDA/uni_modules/uni-scss/styles/setting/_radius.scss b/fe/PDA/uni_modules/uni-scss/styles/setting/_radius.scss new file mode 100644 index 000000000..9a0428bb8 --- /dev/null +++ b/fe/PDA/uni_modules/uni-scss/styles/setting/_radius.scss @@ -0,0 +1,55 @@ +@mixin radius($r,$d:null ,$important: false){ + $radius-value:map-get($uni-radius, $r) if($important, !important, null); + // Key exists within the $uni-radius variable + @if (map-has-key($uni-radius, $r) and $d){ + @if $d == t { + border-top-left-radius:$radius-value; + border-top-right-radius:$radius-value; + }@else if $d == r { + border-top-right-radius:$radius-value; + border-bottom-right-radius:$radius-value; + }@else if $d == b { + border-bottom-left-radius:$radius-value; + border-bottom-right-radius:$radius-value; + }@else if $d == l { + border-top-left-radius:$radius-value; + border-bottom-left-radius:$radius-value; + }@else if $d == tl { + border-top-left-radius:$radius-value; + }@else if $d == tr { + border-top-right-radius:$radius-value; + }@else if $d == br { + border-bottom-right-radius:$radius-value; + }@else if $d == bl { + border-bottom-left-radius:$radius-value; + } + }@else{ + border-radius:$radius-value; + } +} + +@each $key, $child in $uni-radius { + @if($key){ + .uni-radius-#{"" + $key} { + @include radius($key) + } + }@else{ + .uni-radius { + @include radius($key) + } + } +} + +@each $direction in t, r, b, l,tl, tr, br, bl { + @each $key, $child in $uni-radius { + @if($key){ + .uni-radius-#{"" + $direction}-#{"" + $key} { + @include radius($key,$direction,false) + } + }@else{ + .uni-radius-#{$direction} { + @include radius($key,$direction,false) + } + } + } +} diff --git a/fe/PDA/uni_modules/uni-scss/styles/setting/_space.scss b/fe/PDA/uni_modules/uni-scss/styles/setting/_space.scss new file mode 100644 index 000000000..3c8952897 --- /dev/null +++ b/fe/PDA/uni_modules/uni-scss/styles/setting/_space.scss @@ -0,0 +1,56 @@ + +@mixin fn($space,$direction,$size,$n) { + @if $n { + #{$space}-#{$direction}: #{$size*$uni-space-root}px + } @else { + #{$space}-#{$direction}: #{-$size*$uni-space-root}px + } +} +@mixin get-styles($direction,$i,$space,$n){ + @if $direction == t { + @include fn($space, top,$i,$n); + } + @if $direction == r { + @include fn($space, right,$i,$n); + } + @if $direction == b { + @include fn($space, bottom,$i,$n); + } + @if $direction == l { + @include fn($space, left,$i,$n); + } + @if $direction == x { + @include fn($space, left,$i,$n); + @include fn($space, right,$i,$n); + } + @if $direction == y { + @include fn($space, top,$i,$n); + @include fn($space, bottom,$i,$n); + } + @if $direction == a { + @if $n { + #{$space}:#{$i*$uni-space-root}px; + } @else { + #{$space}:#{-$i*$uni-space-root}px; + } + } +} + +@each $orientation in m,p { + $space: margin; + @if $orientation == m { + $space: margin; + } @else { + $space: padding; + } + @for $i from 0 through 16 { + @each $direction in t, r, b, l, x, y, a { + .uni-#{$orientation}#{$direction}-#{$i} { + @include get-styles($direction,$i,$space,true); + } + .uni-#{$orientation}#{$direction}-n#{$i} { + @include get-styles($direction,$i,$space,false); + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-scss/styles/setting/_styles.scss b/fe/PDA/uni_modules/uni-scss/styles/setting/_styles.scss new file mode 100644 index 000000000..689afec66 --- /dev/null +++ b/fe/PDA/uni_modules/uni-scss/styles/setting/_styles.scss @@ -0,0 +1,167 @@ +/* #ifndef APP-NVUE */ + +$-color-white:#fff; +$-color-black:#000; +@mixin base-style($color) { + color: #fff; + background-color: $color; + border-color: mix($-color-black, $color, 8%); + &:not([hover-class]):active { + background: mix($-color-black, $color, 10%); + border-color: mix($-color-black, $color, 20%); + color: $-color-white; + outline: none; + } +} +@mixin is-color($color) { + @include base-style($color); + &[loading] { + @include base-style($color); + &::before { + margin-right:5px; + } + } + &[disabled] { + &, + &[loading], + &:not([hover-class]):active { + color: $-color-white; + border-color: mix(darken($color,10%), $-color-white); + background-color: mix($color, $-color-white); + } + } + +} +@mixin base-plain-style($color) { + color:$color; + background-color: mix($-color-white, $color, 90%); + border-color: mix($-color-white, $color, 70%); + &:not([hover-class]):active { + background: mix($-color-white, $color, 80%); + color: $color; + outline: none; + border-color: mix($-color-white, $color, 50%); + } +} +@mixin is-plain($color){ + &[plain] { + @include base-plain-style($color); + &[loading] { + @include base-plain-style($color); + &::before { + margin-right:5px; + } + } + &[disabled] { + &, + &:active { + color: mix($-color-white, $color, 40%); + background-color: mix($-color-white, $color, 90%); + border-color: mix($-color-white, $color, 80%); + } + } + } +} + + +.uni-btn { + margin: 5px; + color: #393939; + border:1px solid #ccc; + font-size: 16px; + font-weight: 200; + background-color: #F9F9F9; + // TODO 暂时处理边框隐藏一边的问题 + overflow: visible; + &::after{ + border: none; + } + + &:not([type]),&[type=default] { + color: #999; + &[loading] { + background: none; + &::before { + margin-right:5px; + } + } + + + + &[disabled]{ + color: mix($-color-white, #999, 60%); + &, + &[loading], + &:active { + color: mix($-color-white, #999, 60%); + background-color: mix($-color-white,$-color-black , 98%); + border-color: mix($-color-white, #999, 85%); + } + } + + &[plain] { + color: #999; + background: none; + border-color: $uni-border-1; + &:not([hover-class]):active { + background: none; + color: mix($-color-white, $-color-black, 80%); + border-color: mix($-color-white, $-color-black, 90%); + outline: none; + } + &[disabled]{ + &, + &[loading], + &:active { + background: none; + color: mix($-color-white, #999, 60%); + border-color: mix($-color-white, #999, 85%); + } + } + } + } + + &:not([hover-class]):active { + color: mix($-color-white, $-color-black, 50%); + } + + &[size=mini] { + font-size: 16px; + font-weight: 200; + border-radius: 8px; + } + + + + &.uni-btn-small { + font-size: 14px; + } + &.uni-btn-mini { + font-size: 12px; + } + + &.uni-btn-radius { + border-radius: 999px; + } + &[type=primary] { + @include is-color($uni-primary); + @include is-plain($uni-primary) + } + &[type=success] { + @include is-color($uni-success); + @include is-plain($uni-success) + } + &[type=error] { + @include is-color($uni-error); + @include is-plain($uni-error) + } + &[type=warning] { + @include is-color($uni-warning); + @include is-plain($uni-warning) + } + &[type=info] { + @include is-color($uni-info); + @include is-plain($uni-info) + } +} +/* #endif */ diff --git a/fe/PDA/uni_modules/uni-scss/styles/setting/_text.scss b/fe/PDA/uni_modules/uni-scss/styles/setting/_text.scss new file mode 100644 index 000000000..a34d08f3f --- /dev/null +++ b/fe/PDA/uni_modules/uni-scss/styles/setting/_text.scss @@ -0,0 +1,24 @@ +@mixin get-styles($k,$c) { + @if $k == size or $k == weight{ + font-#{$k}:#{$c} + }@else{ + #{$k}:#{$c} + } +} + +@each $key, $child in $uni-headings { + /* #ifndef APP-NVUE */ + .uni-#{$key} { + @each $k, $c in $child { + @include get-styles($k,$c) + } + } + /* #endif */ + /* #ifdef APP-NVUE */ + .container .uni-#{$key} { + @each $k, $c in $child { + @include get-styles($k,$c) + } + } + /* #endif */ +} diff --git a/fe/PDA/uni_modules/uni-scss/styles/setting/_variables.scss b/fe/PDA/uni_modules/uni-scss/styles/setting/_variables.scss new file mode 100644 index 000000000..557d3d7c9 --- /dev/null +++ b/fe/PDA/uni_modules/uni-scss/styles/setting/_variables.scss @@ -0,0 +1,146 @@ +// @use "sass:math"; +@import '../tools/functions.scss'; +// 间距基础倍数 +$uni-space-root: 2 !default; +// 边框半径默认值 +$uni-radius-root:5px !default; +$uni-radius: () !default; +// 边框半径断点 +$uni-radius: map-deep-merge( + ( + 0: 0, + // TODO 当前版本暂时不支持 sm 属性 + // 'sm': math.div($uni-radius-root, 2), + null: $uni-radius-root, + 'lg': $uni-radius-root * 2, + 'xl': $uni-radius-root * 6, + 'pill': 9999px, + 'circle': 50% + ), + $uni-radius +); +// 字体家族 +$body-font-family: 'Roboto', sans-serif !default; +// 文本 +$heading-font-family: $body-font-family !default; +$uni-headings: () !default; +$letterSpacing: -0.01562em; +$uni-headings: map-deep-merge( + ( + 'h1': ( + size: 32px, + weight: 300, + line-height: 50px, + // letter-spacing:-0.01562em + ), + 'h2': ( + size: 28px, + weight: 300, + line-height: 40px, + // letter-spacing: -0.00833em + ), + 'h3': ( + size: 24px, + weight: 400, + line-height: 32px, + // letter-spacing: normal + ), + 'h4': ( + size: 20px, + weight: 400, + line-height: 30px, + // letter-spacing: 0.00735em + ), + 'h5': ( + size: 16px, + weight: 400, + line-height: 24px, + // letter-spacing: normal + ), + 'h6': ( + size: 14px, + weight: 500, + line-height: 18px, + // letter-spacing: 0.0125em + ), + 'subtitle': ( + size: 12px, + weight: 400, + line-height: 20px, + // letter-spacing: 0.00937em + ), + 'body': ( + font-size: 14px, + font-weight: 400, + line-height: 22px, + // letter-spacing: 0.03125em + ), + 'caption': ( + 'size': 12px, + 'weight': 400, + 'line-height': 20px, + // 'letter-spacing': 0.03333em, + // 'text-transform': false + ) + ), + $uni-headings +); + + + +// 主色 +$uni-primary: #2979ff !default; +$uni-primary-disable:lighten($uni-primary,20%) !default; +$uni-primary-light: lighten($uni-primary,25%) !default; + +// 辅助色 +// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。 +$uni-success: #18bc37 !default; +$uni-success-disable:lighten($uni-success,20%) !default; +$uni-success-light: lighten($uni-success,25%) !default; + +$uni-warning: #f3a73f !default; +$uni-warning-disable:lighten($uni-warning,20%) !default; +$uni-warning-light: lighten($uni-warning,25%) !default; + +$uni-error: #e43d33 !default; +$uni-error-disable:lighten($uni-error,20%) !default; +$uni-error-light: lighten($uni-error,25%) !default; + +$uni-info: #8f939c !default; +$uni-info-disable:lighten($uni-info,20%) !default; +$uni-info-light: lighten($uni-info,25%) !default; + +// 中性色 +// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。 +$uni-main-color: #3a3a3a !default; // 主要文字 +$uni-base-color: #6a6a6a !default; // 常规文字 +$uni-secondary-color: #909399 !default; // 次要文字 +$uni-extra-color: #c7c7c7 !default; // 辅助说明 + +// 边框颜色 +$uni-border-1: #F0F0F0 !default; +$uni-border-2: #EDEDED !default; +$uni-border-3: #DCDCDC !default; +$uni-border-4: #B9B9B9 !default; + +// 常规色 +$uni-black: #000000 !default; +$uni-white: #ffffff !default; +$uni-transparent: rgba($color: #000000, $alpha: 0) !default; + +// 背景色 +$uni-bg-color: #f7f7f7 !default; + +/* 水平间距 */ +$uni-spacing-sm: 8px !default; +$uni-spacing-base: 15px !default; +$uni-spacing-lg: 30px !default; + +// 阴影 +$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default; +$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default; +$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default; + +// 蒙版 +$uni-mask: rgba($color: #000000, $alpha: 0.4) !default; diff --git a/fe/PDA/uni_modules/uni-scss/styles/tools/functions.scss b/fe/PDA/uni_modules/uni-scss/styles/tools/functions.scss new file mode 100644 index 000000000..ac6f63e53 --- /dev/null +++ b/fe/PDA/uni_modules/uni-scss/styles/tools/functions.scss @@ -0,0 +1,19 @@ +// 合并 map +@function map-deep-merge($parent-map, $child-map){ + $result: $parent-map; + @each $key, $child in $child-map { + $parent-has-key: map-has-key($result, $key); + $parent-value: map-get($result, $key); + $parent-type: type-of($parent-value); + $child-type: type-of($child); + $parent-is-map: $parent-type == map; + $child-is-map: $child-type == map; + + @if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){ + $result: map-merge($result, ( $key: $child )); + }@else { + $result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) )); + } + } + @return $result; +}; diff --git a/fe/PDA/uni_modules/uni-scss/theme.scss b/fe/PDA/uni_modules/uni-scss/theme.scss new file mode 100644 index 000000000..80ee62f7d --- /dev/null +++ b/fe/PDA/uni_modules/uni-scss/theme.scss @@ -0,0 +1,31 @@ +// 间距基础倍数 +$uni-space-root: 2; +// 边框半径默认值 +$uni-radius-root:5px; +// 主色 +$uni-primary: #2979ff; +// 辅助色 +$uni-success: #4cd964; +// 警告色 +$uni-warning: #f0ad4e; +// 错误色 +$uni-error: #dd524d; +// 描述色 +$uni-info: #909399; +// 中性色 +$uni-main-color: #303133; +$uni-base-color: #606266; +$uni-secondary-color: #909399; +$uni-extra-color: #C0C4CC; +// 背景色 +$uni-bg-color: #f5f5f5; +// 边框颜色 +$uni-border-1: #DCDFE6; +$uni-border-2: #E4E7ED; +$uni-border-3: #EBEEF5; +$uni-border-4: #F2F6FC; + +// 常规色 +$uni-black: #000000; +$uni-white: #ffffff; +$uni-transparent: rgba($color: #000000, $alpha: 0); diff --git a/fe/PDA/uni_modules/uni-scss/variables.scss b/fe/PDA/uni_modules/uni-scss/variables.scss new file mode 100644 index 000000000..1c062d42b --- /dev/null +++ b/fe/PDA/uni_modules/uni-scss/variables.scss @@ -0,0 +1,62 @@ +@import './styles/setting/_variables.scss'; +// 间距基础倍数 +$uni-space-root: 2; +// 边框半径默认值 +$uni-radius-root:5px; + +// 主色 +$uni-primary: #2979ff; +$uni-primary-disable:mix(#fff,$uni-primary,50%); +$uni-primary-light: mix(#fff,$uni-primary,80%); + +// 辅助色 +// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。 +$uni-success: #18bc37; +$uni-success-disable:mix(#fff,$uni-success,50%); +$uni-success-light: mix(#fff,$uni-success,80%); + +$uni-warning: #f3a73f; +$uni-warning-disable:mix(#fff,$uni-warning,50%); +$uni-warning-light: mix(#fff,$uni-warning,80%); + +$uni-error: #e43d33; +$uni-error-disable:mix(#fff,$uni-error,50%); +$uni-error-light: mix(#fff,$uni-error,80%); + +$uni-info: #8f939c; +$uni-info-disable:mix(#fff,$uni-info,50%); +$uni-info-light: mix(#fff,$uni-info,80%); + +// 中性色 +// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。 +$uni-main-color: #3a3a3a; // 主要文字 +$uni-base-color: #6a6a6a; // 常规文字 +$uni-secondary-color: #909399; // 次要文字 +$uni-extra-color: #c7c7c7; // 辅助说明 + +// 边框颜色 +$uni-border-1: #F0F0F0; +$uni-border-2: #EDEDED; +$uni-border-3: #DCDCDC; +$uni-border-4: #B9B9B9; + +// 常规色 +$uni-black: #000000; +$uni-white: #ffffff; +$uni-transparent: rgba($color: #000000, $alpha: 0); + +// 背景色 +$uni-bg-color: #f7f7f7; + +/* 水平间距 */ +$uni-spacing-sm: 8px; +$uni-spacing-base: 15px; +$uni-spacing-lg: 30px; + +// 阴影 +$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5); +$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2); +$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5); + +// 蒙版 +$uni-mask: rgba($color: #000000, $alpha: 0.4); diff --git a/fe/PDA/uni_modules/uni-search-bar/changelog.md b/fe/PDA/uni_modules/uni-search-bar/changelog.md new file mode 100644 index 000000000..b41fdd3ba --- /dev/null +++ b/fe/PDA/uni_modules/uni-search-bar/changelog.md @@ -0,0 +1,33 @@ +## 1.2.3(2022-05-24) +- 新增 readonly 属性,组件只读 +## 1.2.2(2022-05-06) +- 修复 vue3 input 事件不生效的bug +## 1.2.1(2022-05-06) +- 修复 多余代码导致的bug +## 1.2.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-search-bar](https://uniapp.dcloud.io/component/uniui/uni-search-bar) +## 1.1.2(2021-08-30) +- 修复 value 属性与 modelValue 属性不兼容的Bug +## 1.1.1(2021-08-24) +- 新增 支持国际化 +## 1.1.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.0.9(2021-05-12) +- 新增 项目示例地址 +## 1.0.8(2021-04-21) +- 优化 添加依赖 uni-icons, 导入后自动下载依赖 +## 1.0.7(2021-04-15) +- uni-ui 新增 uni-search-bar 的 focus 事件 + +## 1.0.6(2021-02-05) +- 优化 组件引用关系,通过uni_modules引用组件 + +## 1.0.5(2021-02-05) +- 调整为uni_modules目录规范 +- 新增 支持双向绑定 +- 更改 input 事件的返回值,e={value:Number} --> e=value +- 新增 支持图标插槽 +- 新增 支持 clear、blur 事件 +- 新增 支持 focus 属性 +- 去掉组件背景色 diff --git a/fe/PDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/en.json b/fe/PDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/en.json new file mode 100644 index 000000000..dd083a535 --- /dev/null +++ b/fe/PDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/en.json @@ -0,0 +1,4 @@ +{ + "uni-search-bar.cancel": "cancel", + "uni-search-bar.placeholder": "Search enter content" +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/index.js b/fe/PDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/index.js new file mode 100644 index 000000000..de7509c87 --- /dev/null +++ b/fe/PDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/index.js @@ -0,0 +1,8 @@ +import en from './en.json' +import zhHans from './zh-Hans.json' +import zhHant from './zh-Hant.json' +export default { + en, + 'zh-Hans': zhHans, + 'zh-Hant': zhHant +} diff --git a/fe/PDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hans.json b/fe/PDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hans.json new file mode 100644 index 000000000..d4e5c120c --- /dev/null +++ b/fe/PDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hans.json @@ -0,0 +1,4 @@ +{ + "uni-search-bar.cancel": "cancel", + "uni-search-bar.placeholder": "请输入搜索内容" +} diff --git a/fe/PDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hant.json b/fe/PDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hant.json new file mode 100644 index 000000000..318b6ef1b --- /dev/null +++ b/fe/PDA/uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hant.json @@ -0,0 +1,4 @@ +{ + "uni-search-bar.cancel": "cancel", + "uni-search-bar.placeholder": "請輸入搜索內容" +} diff --git a/fe/PDA/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.vue b/fe/PDA/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.vue new file mode 100644 index 000000000..5a518a8cc --- /dev/null +++ b/fe/PDA/uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.vue @@ -0,0 +1,298 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-search-bar/package.json b/fe/PDA/uni_modules/uni-search-bar/package.json new file mode 100644 index 000000000..9352c574f --- /dev/null +++ b/fe/PDA/uni_modules/uni-search-bar/package.json @@ -0,0 +1,89 @@ +{ + "id": "uni-search-bar", + "displayName": "uni-search-bar 搜索栏", + "version": "1.2.3", + "description": "搜索栏组件,通常用于搜索商品、文章等", + "keywords": [ + "uni-ui", + "uniui", + "搜索框", + "搜索栏" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-search-bar/readme.md b/fe/PDA/uni_modules/uni-search-bar/readme.md new file mode 100644 index 000000000..253092f0b --- /dev/null +++ b/fe/PDA/uni_modules/uni-search-bar/readme.md @@ -0,0 +1,14 @@ + + +## SearchBar 搜索栏 + +> **组件名:uni-search-bar** +> 代码块: `uSearchBar` + + +搜索栏组件 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-search-bar) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + diff --git a/fe/PDA/uni_modules/uni-section/changelog.md b/fe/PDA/uni_modules/uni-section/changelog.md new file mode 100644 index 000000000..738f2b324 --- /dev/null +++ b/fe/PDA/uni_modules/uni-section/changelog.md @@ -0,0 +1,2 @@ +## 0.0.1(2022-07-22) +- 初始化 diff --git a/fe/PDA/uni_modules/uni-section/components/uni-section/uni-section.vue b/fe/PDA/uni_modules/uni-section/components/uni-section/uni-section.vue new file mode 100644 index 000000000..9a52e0b8d --- /dev/null +++ b/fe/PDA/uni_modules/uni-section/components/uni-section/uni-section.vue @@ -0,0 +1,167 @@ + + + + diff --git a/fe/PDA/uni_modules/uni-section/package.json b/fe/PDA/uni_modules/uni-section/package.json new file mode 100644 index 000000000..0a31fb559 --- /dev/null +++ b/fe/PDA/uni_modules/uni-section/package.json @@ -0,0 +1,87 @@ +{ + "id": "uni-section", + "displayName": "uni-section 标题栏", + "version": "0.0.1", + "description": "标题栏组件", + "keywords": [ + "uni-ui", + "uniui", + "标题栏" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [ + "uni-scss" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-section/readme.md b/fe/PDA/uni_modules/uni-section/readme.md new file mode 100644 index 000000000..d47faab77 --- /dev/null +++ b/fe/PDA/uni_modules/uni-section/readme.md @@ -0,0 +1,8 @@ +## Section 标题栏 +> **组件名:uni-section** +> 代码块: `uSection` + +uni-section 组件主要用于文章、列表详情等标题展示 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-section) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 diff --git a/fe/PDA/uni_modules/uni-segmented-control/changelog.md b/fe/PDA/uni_modules/uni-segmented-control/changelog.md new file mode 100644 index 000000000..a44385d7c --- /dev/null +++ b/fe/PDA/uni_modules/uni-segmented-control/changelog.md @@ -0,0 +1,9 @@ +## 1.2.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-segmented-control](https://uniapp.dcloud.io/component/uniui/uni-segmented-control) +## 1.1.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.0.5(2021-05-12) +- 新增 项目示例地址 +## 1.0.4(2021-02-05) +- 调整为uni_modules目录规范 diff --git a/fe/PDA/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue b/fe/PDA/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue new file mode 100644 index 000000000..044a4951f --- /dev/null +++ b/fe/PDA/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue @@ -0,0 +1,145 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-segmented-control/package.json b/fe/PDA/uni_modules/uni-segmented-control/package.json new file mode 100644 index 000000000..6cae41db2 --- /dev/null +++ b/fe/PDA/uni_modules/uni-segmented-control/package.json @@ -0,0 +1,87 @@ +{ + "id": "uni-segmented-control", + "displayName": "uni-segmented-control 分段器", + "version": "1.2.0", + "description": "分段器由至少 2 个分段控件组成,用作不同视图的显示", + "keywords": [ + "uni-ui", + "uniui", + "分段器", + "segement", + "顶部选择" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-segmented-control/readme.md b/fe/PDA/uni_modules/uni-segmented-control/readme.md new file mode 100644 index 000000000..3527b03f6 --- /dev/null +++ b/fe/PDA/uni_modules/uni-segmented-control/readme.md @@ -0,0 +1,13 @@ + + +## SegmentedControl 分段器 +> **组件名:uni-segmented-control** +> 代码块: `uSegmentedControl` + + +用作不同视图的显示 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-segmented-control) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + diff --git a/fe/PDA/uni_modules/uni-steps/changelog.md b/fe/PDA/uni_modules/uni-steps/changelog.md new file mode 100644 index 000000000..cb9d36793 --- /dev/null +++ b/fe/PDA/uni_modules/uni-steps/changelog.md @@ -0,0 +1,16 @@ +## 1.1.1(2021-11-22) +- 修复 vue3中某些scss变量无法找到的问题 +## 1.1.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-steps](https://uniapp.dcloud.io/component/uniui/uni-steps) +## 1.0.8(2021-05-12) +- 新增 项目示例地址 +## 1.0.7(2021-05-06) +- 修复 uni-steps 横向布局时,多行文字高度不合理的 bug +## 1.0.6(2021-04-21) +- 优化 添加依赖 uni-icons, 导入后自动下载依赖 +## 1.0.5(2021-02-05) +- 优化 组件引用关系,通过uni_modules引用组件 + +## 1.0.4(2021-02-05) +- 调整为uni_modules目录规范 diff --git a/fe/PDA/uni_modules/uni-steps/components/uni-steps/uni-steps.vue b/fe/PDA/uni_modules/uni-steps/components/uni-steps/uni-steps.vue new file mode 100644 index 000000000..a6c8f2879 --- /dev/null +++ b/fe/PDA/uni_modules/uni-steps/components/uni-steps/uni-steps.vue @@ -0,0 +1,269 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-steps/package.json b/fe/PDA/uni_modules/uni-steps/package.json new file mode 100644 index 000000000..c687b40ab --- /dev/null +++ b/fe/PDA/uni_modules/uni-steps/package.json @@ -0,0 +1,89 @@ +{ + "id": "uni-steps", + "displayName": "uni-steps 步骤条", + "version": "1.1.1", + "description": "步骤条组件,提供横向和纵向两种布局格式。", + "keywords": [ + "uni-ui", + "uniui", + "步骤条", + "时间轴" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": [ + "uni-scss", + "uni-icons" + ], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-steps/readme.md b/fe/PDA/uni_modules/uni-steps/readme.md new file mode 100644 index 000000000..da7a4bfaa --- /dev/null +++ b/fe/PDA/uni_modules/uni-steps/readme.md @@ -0,0 +1,13 @@ + + +## Steps 步骤条 +> **组件名:uni-steps** +> 代码块: `uSteps` + + +步骤条,常用于显示进度 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-steps) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + diff --git a/fe/PDA/uni_modules/uni-swipe-action/changelog.md b/fe/PDA/uni_modules/uni-swipe-action/changelog.md new file mode 100644 index 000000000..c007cb5c4 --- /dev/null +++ b/fe/PDA/uni_modules/uni-swipe-action/changelog.md @@ -0,0 +1,41 @@ +## 1.3.7(2022-06-06) +- 修复 vue3 下使用组件不能正常运行的Bug +## 1.3.6(2022-05-31) +- 修复 h5端点击click触发两次的Bug +## 1.3.5(2022-05-23) +- 修复 isPC 找不到的Bug +## 1.3.4(2022-05-19) +- 修复 在 nvue 下 disabled 失效的bug +## 1.3.3(2022-03-31) +- 修复 按钮字体大小不能设置的bug +## 1.3.2(2022-03-16) +- 修复 h5和app端下报el错误的bug +## 1.3.1(2022-03-07) +- 修复 HBuilderX 1.4.X 版本中,h5和app端下报错的bug +## 1.3.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-swipe-action](https://uniapp.dcloud.io/component/uniui/uni-swipe-action) +## 1.2.4(2021-08-20) +- 优化 close-all 方法 +## 1.2.3(2021-08-20) +- 新增 close-all 方法,关闭所有已打开的组件 +## 1.2.2(2021-08-17) +- 新增 resize() 方法,在非微信小程序、h5、app-vue端出现不能滑动的问题的时候,重置组件 +- 修复 app 端偶尔出现类似 Page[x][-x,xx;-x,xx,x,x-x] 的问题 +- 优化 微信小程序、h5、app-vue 滑动逻辑,避免出现动态新增组件后不能滑动的问题 +## 1.2.1(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +- 修复 跨页面修改组件数据 ,导致不能滑动的问题 +## 1.1.10(2021-06-17) +- 修复 按钮点击执行两次的bug +## 1.1.9(2021-05-12) +- 新增 项目示例地址 +## 1.1.8(2021-03-26) +- 修复 微信小程序 nv_navigator is not defined 报错的bug +## 1.1.7(2021-02-05) +- 调整为uni_modules目录规范 +- 新增 左侧滑动 +- 新增 插槽使用方式 +- 新增 threshold 属性,可以控制滑动缺省值 +- 优化 长列表滚动性能 +- 修复 滚动页面时触发组件滑动的Bug diff --git a/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/bindingx.js b/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/bindingx.js new file mode 100644 index 000000000..755c97c96 --- /dev/null +++ b/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/bindingx.js @@ -0,0 +1,302 @@ +let bindIngXMixins = {} + +// #ifdef APP-NVUE +const BindingX = uni.requireNativePlugin('bindingx'); +const dom = uni.requireNativePlugin('dom'); +const animation = uni.requireNativePlugin('animation'); + +bindIngXMixins = { + data() { + return {} + }, + + watch: { + show(newVal) { + if (this.autoClose) return + if (this.stop) return + this.stop = true + if (newVal) { + this.open(newVal) + } else { + this.close() + } + }, + leftOptions() { + this.getSelectorQuery() + this.init() + }, + rightOptions(newVal) { + this.init() + } + }, + created() { + this.swipeaction = this.getSwipeAction() + if (this.swipeaction.children !== undefined) { + this.swipeaction.children.push(this) + } + }, + mounted() { + this.box = this.getEl(this.$refs['selector-box--hock']) + this.selector = this.getEl(this.$refs['selector-content--hock']); + this.leftButton = this.getEl(this.$refs['selector-left-button--hock']); + this.rightButton = this.getEl(this.$refs['selector-right-button--hock']); + this.init() + }, + // beforeDestroy() { + // this.swipeaction.children.forEach((item, index) => { + // if (item === this) { + // this.swipeaction.children.splice(index, 1) + // } + // }) + // }, + methods: { + init() { + this.$nextTick(() => { + this.x = 0 + this.button = { + show: false + } + setTimeout(() => { + this.getSelectorQuery() + }, 200) + }) + }, + onClick(index, item, position) { + this.$emit('click', { + content: item, + index, + position + }) + }, + touchstart(e) { + // fix by mehaotian 禁止滑动 + if (this.disabled) return + // 每次只触发一次,避免多次监听造成闪烁 + if (this.stop) return + this.stop = true + if (this.autoClose) { + this.swipeaction.closeOther(this) + } + + const leftWidth = this.button.left.width + const rightWidth = this.button.right.width + let expression = this.range(this.x, -rightWidth, leftWidth) + let leftExpression = this.range(this.x - leftWidth, -leftWidth, 0) + let rightExpression = this.range(this.x + rightWidth, 0, rightWidth) + + this.eventpan = BindingX.bind({ + anchor: this.box, + eventType: 'pan', + props: [{ + element: this.selector, + property: 'transform.translateX', + expression + }, { + element: this.leftButton, + property: 'transform.translateX', + expression: leftExpression + }, { + element: this.rightButton, + property: 'transform.translateX', + expression: rightExpression + }, ] + }, (e) => { + // nope + if (e.state === 'end') { + this.x = e.deltaX + this.x; + this.isclick = true + this.bindTiming(e.deltaX) + } + }); + }, + touchend(e) { + if (this.isopen !== 'none' && !this.isclick) { + this.open('none') + } + }, + bindTiming(x) { + const left = this.x + const leftWidth = this.button.left.width + const rightWidth = this.button.right.width + const threshold = this.threshold + if (!this.isopen || this.isopen === 'none') { + if (left > threshold) { + this.open('left') + } else if (left < -threshold) { + this.open('right') + } else { + this.open('none') + } + } else { + if ((x > -leftWidth && x < 0) || x > rightWidth) { + if ((x > -threshold && x < 0) || (x - rightWidth > threshold)) { + this.open('left') + } else { + this.open('none') + } + } else { + if ((x < threshold && x > 0) || (x + leftWidth < -threshold)) { + this.open('right') + } else { + this.open('none') + } + } + } + }, + + /** + * 移动范围 + * @param {Object} num + * @param {Object} mix + * @param {Object} max + */ + range(num, mix, max) { + return `min(max(x+${num}, ${mix}), ${max})` + }, + + /** + * 开启swipe + */ + open(type) { + this.animation(type) + }, + + /** + * 关闭swipe + */ + close() { + this.animation('none') + }, + + /** + * 开启关闭动画 + * @param {Object} type + */ + animation(type) { + const time = 300 + const leftWidth = this.button.left.width + const rightWidth = this.button.right.width + if (this.eventpan && this.eventpan.token) { + BindingX.unbind({ + token: this.eventpan.token, + eventType: 'pan' + }) + } + + switch (type) { + case 'left': + Promise.all([ + this.move(this.selector, leftWidth), + this.move(this.leftButton, 0), + this.move(this.rightButton, rightWidth * 2) + ]).then(() => { + this.setEmit(leftWidth, type) + }) + break + case 'right': + Promise.all([ + this.move(this.selector, -rightWidth), + this.move(this.leftButton, -leftWidth * 2), + this.move(this.rightButton, 0) + ]).then(() => { + this.setEmit(-rightWidth, type) + }) + break + default: + Promise.all([ + this.move(this.selector, 0), + this.move(this.leftButton, -leftWidth), + this.move(this.rightButton, rightWidth) + ]).then(() => { + this.setEmit(0, type) + }) + + } + }, + setEmit(x, type) { + const leftWidth = this.button.left.width + const rightWidth = this.button.right.width + this.isopen = this.isopen || 'none' + this.stop = false + this.isclick = false + // 只有状态不一致才会返回结果 + if (this.isopen !== type && this.x !== x) { + if (type === 'left' && leftWidth > 0) { + this.$emit('change', 'left') + } + if (type === 'right' && rightWidth > 0) { + this.$emit('change', 'right') + } + if (type === 'none') { + this.$emit('change', 'none') + } + } + this.x = x + this.isopen = type + }, + move(ref, value) { + return new Promise((resolve, reject) => { + animation.transition(ref, { + styles: { + transform: `translateX(${value})`, + }, + duration: 150, //ms + timingFunction: 'linear', + needLayout: false, + delay: 0 //ms + }, function(res) { + resolve(res) + }) + }) + + }, + + /** + * 获取ref + * @param {Object} el + */ + getEl(el) { + return el.ref + }, + /** + * 获取节点信息 + */ + getSelectorQuery() { + Promise.all([ + this.getDom('left'), + this.getDom('right'), + ]).then((data) => { + let show = 'none' + if (this.autoClose) { + show = 'none' + } else { + show = this.show + } + + if (show === 'none') { + // this.close() + } else { + this.open(show) + } + + }) + + }, + getDom(str) { + return new Promise((resolve, reject) => { + dom.getComponentRect(this.$refs[`selector-${str}-button--hock`], (data) => { + if (data) { + this.button[str] = data.size + resolve(data) + } else { + reject() + } + }) + }) + } + } +} + +// #endif + +export default bindIngXMixins diff --git a/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/index.wxs b/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/index.wxs new file mode 100644 index 000000000..10ddb568f --- /dev/null +++ b/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/index.wxs @@ -0,0 +1,323 @@ +var MIN_DISTANCE = 10; + +/** + * 判断当前是否为H5、app-vue + */ +var IS_HTML5 = false +if (typeof window === 'object') IS_HTML5 = true + +/** + * 监听页面内值的变化,主要用于动态开关swipe-action + * @param {Object} newValue + * @param {Object} oldValue + * @param {Object} ownerInstance + * @param {Object} instance + */ +function sizeReady(newValue, oldValue, ownerInstance, instance) { + var state = instance.getState() + var buttonPositions = JSON.parse(newValue) + if (!buttonPositions || !buttonPositions.data || buttonPositions.data.length === 0) return + state.leftWidth = buttonPositions.data[0].width + state.rightWidth = buttonPositions.data[1].width + state.threshold = instance.getDataset().threshold + + if (buttonPositions.show && buttonPositions.show !== 'none') { + openState(buttonPositions.show, instance, ownerInstance) + return + } + + if (state.left) { + openState('none', instance, ownerInstance) + } + resetTouchStatus(instance) +} + +/** + * 开始触摸操作 + * @param {Object} e + * @param {Object} ins + */ +function touchstart(e, ins) { + var instance = e.instance; + var disabled = instance.getDataset().disabled + var state = instance.getState(); + // fix by mehaotian, TODO 兼容 app-vue 获取dataset为字符串 , h5 获取 为 undefined 的问题,待框架修复 + disabled = (typeof(disabled) === 'string' ? JSON.parse(disabled) : disabled) || false; + if (disabled) return + // 开始触摸时移除动画类 + instance.requestAnimationFrame(function() { + instance.removeClass('ani'); + ins.callMethod('closeSwipe'); + }) + + // 记录上次的位置 + state.x = state.left || 0 + // 计算滑动开始位置 + stopTouchStart(e, ins) +} + +/** + * 开始滑动操作 + * @param {Object} e + * @param {Object} ownerInstance + */ +function touchmove(e, ownerInstance) { + var instance = e.instance; + var disabled = instance.getDataset().disabled + var state = instance.getState() + // fix by mehaotian, TODO 兼容 app-vue 获取dataset为字符串 , h5 获取 为 undefined 的问题,待框架修复 + disabled = (typeof(disabled) === 'string' ? JSON.parse(disabled) : disabled) || false; + if (disabled) return + // 是否可以滑动页面 + stopTouchMove(e); + if (state.direction !== 'horizontal') { + return; + } + + if (e.preventDefault) { + // 阻止页面滚动 + e.preventDefault() + } + + move(state.x + state.deltaX, instance, ownerInstance) +} + +/** + * 结束触摸操作 + * @param {Object} e + * @param {Object} ownerInstance + */ +function touchend(e, ownerInstance) { + var instance = e.instance; + var disabled = instance.getDataset().disabled + var state = instance.getState() + // fix by mehaotian, TODO 兼容 app-vue 获取dataset为字符串 , h5 获取 为 undefined 的问题,待框架修复 + disabled = (typeof(disabled) === 'string' ? JSON.parse(disabled) : disabled) || false; + + if (disabled) return + // 滑动过程中触摸结束,通过阙值判断是开启还是关闭 + // fixed by mehaotian 定时器解决点击按钮,touchend 触发比 click 事件时机早的问题 ,主要是 ios13 + moveDirection(state.left, instance, ownerInstance) + +} + +/** + * 设置移动距离 + * @param {Object} value + * @param {Object} instance + * @param {Object} ownerInstance + */ +function move(value, instance, ownerInstance) { + value = value || 0 + var state = instance.getState() + var leftWidth = state.leftWidth + var rightWidth = state.rightWidth + // 获取可滑动范围 + state.left = range(value, -rightWidth, leftWidth); + instance.requestAnimationFrame(function() { + instance.setStyle({ + transform: 'translateX(' + state.left + 'px)', + '-webkit-transform': 'translateX(' + state.left + 'px)' + }) + }) + +} + +/** + * 获取范围 + * @param {Object} num + * @param {Object} min + * @param {Object} max + */ +function range(num, min, max) { + return Math.min(Math.max(num, min), max); +} + + +/** + * 移动方向判断 + * @param {Object} left + * @param {Object} value + * @param {Object} ownerInstance + * @param {Object} ins + */ +function moveDirection(left, ins, ownerInstance) { + var state = ins.getState() + var threshold = state.threshold + var position = state.position + var isopen = state.isopen || 'none' + var leftWidth = state.leftWidth + var rightWidth = state.rightWidth + if (state.deltaX === 0) { + openState('none', ins, ownerInstance) + return + } + if ((isopen === 'none' && rightWidth > 0 && -left > threshold) || (isopen !== 'none' && rightWidth > 0 && + rightWidth + + left < threshold)) { + // right + openState('right', ins, ownerInstance) + } else if ((isopen === 'none' && leftWidth > 0 && left > threshold) || (isopen !== 'none' && leftWidth > 0 && + leftWidth - left < threshold)) { + // left + openState('left', ins, ownerInstance) + } else { + // default + openState('none', ins, ownerInstance) + } +} + + +/** + * 开启状态 + * @param {Boolean} type + * @param {Object} ins + * @param {Object} ownerInstance + */ +function openState(type, ins, ownerInstance) { + var state = ins.getState() + var position = state.position + var leftWidth = state.leftWidth + var rightWidth = state.rightWidth + var left = '' + state.isopen = state.isopen ? state.isopen : 'none' + switch (type) { + case "left": + left = leftWidth + break + case "right": + left = -rightWidth + break + default: + left = 0 + } + + // && !state.throttle + + if (state.isopen !== type) { + state.throttle = true + ownerInstance.callMethod('change', { + open: type + }) + + } + + state.isopen = type + // 添加动画类 + ins.requestAnimationFrame(function() { + ins.addClass('ani'); + move(left, ins, ownerInstance) + }) + // 设置最终移动位置,理论上只要进入到这个函数,肯定是要打开的 +} + + +function getDirection(x, y) { + if (x > y && x > MIN_DISTANCE) { + return 'horizontal'; + } + if (y > x && y > MIN_DISTANCE) { + return 'vertical'; + } + return ''; +} + +/** + * 重置滑动状态 + * @param {Object} event + */ +function resetTouchStatus(instance) { + var state = instance.getState(); + state.direction = ''; + state.deltaX = 0; + state.deltaY = 0; + state.offsetX = 0; + state.offsetY = 0; +} + +/** + * 设置滑动开始位置 + * @param {Object} event + */ +function stopTouchStart(event) { + var instance = event.instance; + var state = instance.getState(); + resetTouchStatus(instance); + var touch = event.touches[0]; + if (IS_HTML5 && isPC()) { + touch = event; + } + state.startX = touch.clientX; + state.startY = touch.clientY; +} + +/** + * 滑动中,是否禁止打开 + * @param {Object} event + */ +function stopTouchMove(event) { + var instance = event.instance; + var state = instance.getState(); + var touch = event.touches[0]; + if (IS_HTML5 && isPC()) { + touch = event; + } + state.deltaX = touch.clientX - state.startX; + state.deltaY = touch.clientY - state.startY; + state.offsetY = Math.abs(state.deltaY); + state.offsetX = Math.abs(state.deltaX); + state.direction = state.direction || getDirection(state.offsetX, state.offsetY); +} + +function isPC() { + var userAgentInfo = navigator.userAgent; + var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"]; + var flag = true; + for (var v = 0; v < Agents.length - 1; v++) { + if (userAgentInfo.indexOf(Agents[v]) > 0) { + flag = false; + break; + } + } + return flag; +} + +var movable = false + +function mousedown(e, ins) { + if (!IS_HTML5) return + if (!isPC()) return + touchstart(e, ins) + movable = true +} + +function mousemove(e, ins) { + if (!IS_HTML5) return + if (!isPC()) return + if (!movable) return + touchmove(e, ins) +} + +function mouseup(e, ins) { + if (!IS_HTML5) return + if (!isPC()) return + touchend(e, ins) + movable = false +} + +function mouseleave(e, ins) { + if (!IS_HTML5) return + if (!isPC()) return + movable = false +} + +module.exports = { + sizeReady: sizeReady, + touchstart: touchstart, + touchmove: touchmove, + touchend: touchend, + mousedown: mousedown, + mousemove: mousemove, + mouseup: mouseup, + mouseleave: mouseleave +} diff --git a/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/isPC.js b/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/isPC.js new file mode 100644 index 000000000..917cb4890 --- /dev/null +++ b/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/isPC.js @@ -0,0 +1,12 @@ +export function isPC() { + var userAgentInfo = navigator.userAgent; + var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"]; + var flag = true; + for (let v = 0; v < Agents.length - 1; v++) { + if (userAgentInfo.indexOf(Agents[v]) > 0) { + flag = false; + break; + } + } + return flag; +} diff --git a/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpalipay.js b/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpalipay.js new file mode 100644 index 000000000..43cd56bdf --- /dev/null +++ b/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpalipay.js @@ -0,0 +1,193 @@ +export default { + data() { + return { + x: 0, + transition: false, + width: 0, + viewWidth: 0, + swipeShow: 0 + } + }, + watch: { + show(newVal) { + if (this.autoClose) return + if (newVal && newVal !== 'none') { + this.transition = true + this.open(newVal) + } else { + this.close() + } + } + }, + created() { + this.swipeaction = this.getSwipeAction() + if (this.swipeaction.children !== undefined) { + this.swipeaction.children.push(this) + } + }, + mounted() { + this.isopen = false + setTimeout(() => { + this.getQuerySelect() + }, 50) + }, + methods: { + appTouchStart(e) { + const { + clientX + } = e.changedTouches[0] + this.clientX = clientX + this.timestamp = new Date().getTime() + }, + appTouchEnd(e, index, item, position) { + const { + clientX + } = e.changedTouches[0] + // fixed by xxxx 模拟点击事件,解决 ios 13 点击区域错位的问题 + let diff = Math.abs(this.clientX - clientX) + let time = (new Date().getTime()) - this.timestamp + if (diff < 40 && time < 300) { + this.$emit('click', { + content: item, + index, + position + }) + } + }, + /** + * 移动触发 + * @param {Object} e + */ + onChange(e) { + this.moveX = e.detail.x + this.isclose = false + }, + touchstart(e) { + this.transition = false + this.isclose = true + this.autoClose && this.swipeaction.closeOther(this) + }, + touchmove(e) {}, + touchend(e) { + // 0的位置什么都不执行 + if (this.isclose && this.isopen === 'none') return + if (this.isclose && this.isopen !== 'none') { + this.transition = true + this.close() + } else { + this.move(this.moveX + this.leftWidth) + } + }, + + /** + * 移动 + * @param {Object} moveX + */ + move(moveX) { + // 打开关闭的处理逻辑不太一样 + this.transition = true + // 未打开状态 + if (!this.isopen || this.isopen === 'none') { + if (moveX > this.threshold) { + this.open('left') + } else if (moveX < -this.threshold) { + this.open('right') + } else { + this.close() + } + } else { + if (moveX < 0 && moveX < this.rightWidth) { + const rightX = this.rightWidth + moveX + if (rightX < this.threshold) { + this.open('right') + } else { + this.close() + } + } else if (moveX > 0 && moveX < this.leftWidth) { + const leftX = this.leftWidth - moveX + if (leftX < this.threshold) { + this.open('left') + } else { + this.close() + } + } + + } + + }, + + /** + * 打开 + */ + open(type) { + this.x = this.moveX + this.animation(type) + }, + + /** + * 关闭 + */ + close() { + this.x = this.moveX + // TODO 解决 x 值不更新的问题,所以会多触发一次 nextTick ,待优化 + this.$nextTick(() => { + this.x = -this.leftWidth + if (this.isopen !== 'none') { + this.$emit('change', 'none') + } + this.isopen = 'none' + }) + }, + + /** + * 执行结束动画 + * @param {Object} type + */ + animation(type) { + this.$nextTick(() => { + if (type === 'left') { + this.x = 0 + } else { + this.x = -this.rightWidth - this.leftWidth + } + + if (this.isopen !== type) { + this.$emit('change', type) + } + this.isopen = type + }) + + }, + getSlide(x) {}, + getQuerySelect() { + const query = uni.createSelectorQuery().in(this); + query.selectAll('.movable-view--hock').boundingClientRect(data => { + this.leftWidth = data[1].width + this.rightWidth = data[2].width + this.width = data[0].width + this.viewWidth = this.width + this.rightWidth + this.leftWidth + if (this.leftWidth === 0) { + // TODO 疑似bug ,初始化的时候如果x 是0,会导致移动位置错误,所以让元素超出一点 + this.x = -0.1 + } else { + this.x = -this.leftWidth + } + this.moveX = this.x + this.$nextTick(() => { + this.swipeShow = 1 + }) + + if (!this.buttonWidth) { + this.disabledView = true + } + + if (this.autoClose) return + if (this.show !== 'none') { + this.transition = true + this.open(this.shows) + } + }).exec(); + + } + } +} diff --git a/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpother.js b/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpother.js new file mode 100644 index 000000000..9a8bcbb64 --- /dev/null +++ b/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpother.js @@ -0,0 +1,259 @@ +let otherMixins = {} + +// #ifndef APP-PLUS|| MP-WEIXIN || H5 +const MIN_DISTANCE = 10; +otherMixins = { + data() { + // TODO 随机生生元素ID,解决百度小程序获取同一个元素位置信息的bug + const elClass = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}` + return { + uniShow: false, + left: 0, + buttonShow: 'none', + ani: false, + moveLeft: '', + elClass + } + }, + watch: { + show(newVal) { + if (this.autoClose) return + this.openState(newVal) + }, + left() { + this.moveLeft = `translateX(${this.left}px)` + }, + buttonShow(newVal) { + if (this.autoClose) return + this.openState(newVal) + }, + leftOptions() { + this.init() + }, + rightOptions() { + this.init() + } + }, + mounted() { + this.swipeaction = this.getSwipeAction() + if (this.swipeaction.children !== undefined) { + this.swipeaction.children.push(this) + } + this.init() + }, + methods: { + init() { + clearTimeout(this.timer) + this.timer = setTimeout(() => { + this.getSelectorQuery() + }, 100) + // 移动距离 + this.left = 0 + this.x = 0 + }, + + closeSwipe(e) { + if (!this.autoClose) return + this.swipeaction.closeOther(this) + }, + appTouchStart(e) { + const { + clientX + } = e.changedTouches[0] + this.clientX = clientX + this.timestamp = new Date().getTime() + }, + appTouchEnd(e, index, item, position) { + const { + clientX + } = e.changedTouches[0] + // fixed by xxxx 模拟点击事件,解决 ios 13 点击区域错位的问题 + let diff = Math.abs(this.clientX - clientX) + let time = (new Date().getTime()) - this.timestamp + if (diff < 40 && time < 300) { + this.$emit('click', { + content: item, + index, + position + }) + } + }, + touchstart(e) { + if (this.disabled) return + this.ani = false + this.x = this.left || 0 + this.stopTouchStart(e) + this.autoClose && this.closeSwipe() + }, + touchmove(e) { + if (this.disabled) return + // 是否可以滑动页面 + this.stopTouchMove(e); + if (this.direction !== 'horizontal') { + return; + } + this.move(this.x + this.deltaX) + return false + }, + touchend() { + if (this.disabled) return + this.moveDirection(this.left) + }, + /** + * 设置移动距离 + * @param {Object} value + */ + move(value) { + value = value || 0 + const leftWidth = this.leftWidth + const rightWidth = this.rightWidth + // 获取可滑动范围 + this.left = this.range(value, -rightWidth, leftWidth); + }, + + /** + * 获取范围 + * @param {Object} num + * @param {Object} min + * @param {Object} max + */ + range(num, min, max) { + return Math.min(Math.max(num, min), max); + }, + /** + * 移动方向判断 + * @param {Object} left + * @param {Object} value + */ + moveDirection(left) { + const threshold = this.threshold + const isopen = this.isopen || 'none' + const leftWidth = this.leftWidth + const rightWidth = this.rightWidth + if (this.deltaX === 0) { + this.openState('none') + return + } + if ((isopen === 'none' && rightWidth > 0 && -left > threshold) || (isopen !== 'none' && rightWidth > + 0 && rightWidth + + left < threshold)) { + // right + this.openState('right') + } else if ((isopen === 'none' && leftWidth > 0 && left > threshold) || (isopen !== 'none' && leftWidth > + 0 && + leftWidth - left < threshold)) { + // left + this.openState('left') + } else { + // default + this.openState('none') + } + }, + + /** + * 开启状态 + * @param {Boolean} type + */ + openState(type) { + const leftWidth = this.leftWidth + const rightWidth = this.rightWidth + let left = '' + this.isopen = this.isopen ? this.isopen : 'none' + switch (type) { + case "left": + left = leftWidth + break + case "right": + left = -rightWidth + break + default: + left = 0 + } + + + if (this.isopen !== type) { + this.throttle = true + this.$emit('change', type) + } + + this.isopen = type + // 添加动画类 + this.ani = true + this.$nextTick(() => { + this.move(left) + }) + // 设置最终移动位置,理论上只要进入到这个函数,肯定是要打开的 + }, + close() { + this.openState('none') + }, + getDirection(x, y) { + if (x > y && x > MIN_DISTANCE) { + return 'horizontal'; + } + if (y > x && y > MIN_DISTANCE) { + return 'vertical'; + } + return ''; + }, + + /** + * 重置滑动状态 + * @param {Object} event + */ + resetTouchStatus() { + this.direction = ''; + this.deltaX = 0; + this.deltaY = 0; + this.offsetX = 0; + this.offsetY = 0; + }, + + /** + * 设置滑动开始位置 + * @param {Object} event + */ + stopTouchStart(event) { + this.resetTouchStatus(); + const touch = event.touches[0]; + this.startX = touch.clientX; + this.startY = touch.clientY; + }, + + /** + * 滑动中,是否禁止打开 + * @param {Object} event + */ + stopTouchMove(event) { + const touch = event.touches[0]; + this.deltaX = touch.clientX - this.startX; + this.deltaY = touch.clientY - this.startY; + this.offsetX = Math.abs(this.deltaX); + this.offsetY = Math.abs(this.deltaY); + this.direction = this.direction || this.getDirection(this.offsetX, this.offsetY); + }, + + getSelectorQuery() { + const views = uni.createSelectorQuery().in(this) + views + .selectAll('.' + this.elClass) + .boundingClientRect(data => { + if (data.length === 0) return + let show = 'none' + if (this.autoClose) { + show = 'none' + } else { + show = this.show + } + this.leftWidth = data[0].width || 0 + this.rightWidth = data[1].width || 0 + this.buttonShow = show + }) + .exec() + } + } +} + +// #endif + +export default otherMixins diff --git a/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpwxs.js b/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpwxs.js new file mode 100644 index 000000000..435e0fbcb --- /dev/null +++ b/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpwxs.js @@ -0,0 +1,83 @@ +let mpMixins = {} +let is_pc = null +// #ifdef H5 +import { + isPC +} from "./isPC" +is_pc = isPC() +// #endif +// #ifdef APP-VUE|| MP-WEIXIN || H5 + +mpMixins = { + data() { + return { + is_show: 'none' + } + }, + watch: { + show(newVal) { + this.is_show = this.show + } + }, + created() { + this.swipeaction = this.getSwipeAction() + if (this.swipeaction.children !== undefined) { + this.swipeaction.children.push(this) + } + }, + mounted() { + this.is_show = this.show + }, + methods: { + // wxs 中调用 + closeSwipe(e) { + if (!this.autoClose) return + this.swipeaction.closeOther(this) + }, + + change(e) { + this.$emit('change', e.open) + if (this.is_show !== e.open) { + this.is_show = e.open + } + }, + + appTouchStart(e) { + if (is_pc) return + const { + clientX + } = e.changedTouches[0] + this.clientX = clientX + this.timestamp = new Date().getTime() + }, + appTouchEnd(e, index, item, position) { + if (is_pc) return + const { + clientX + } = e.changedTouches[0] + // fixed by xxxx 模拟点击事件,解决 ios 13 点击区域错位的问题 + let diff = Math.abs(this.clientX - clientX) + let time = (new Date().getTime()) - this.timestamp + if (diff < 40 && time < 300) { + this.$emit('click', { + content: item, + index, + position + }) + } + }, + onClickForPC(index, item, position) { + if (!is_pc) return + // #ifdef H5 + this.$emit('click', { + content: item, + index, + position + }) + // #endif + } + } +} + +// #endif +export default mpMixins diff --git a/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/render.js b/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/render.js new file mode 100644 index 000000000..78f0ec60e --- /dev/null +++ b/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/render.js @@ -0,0 +1,270 @@ +const MIN_DISTANCE = 10; +export default { + showWatch(newVal, oldVal, ownerInstance, instance, self) { + var state = self.state + var $el = ownerInstance.$el || ownerInstance.$vm && ownerInstance.$vm.$el + if (!$el) return + this.getDom(instance, ownerInstance, self) + if (newVal && newVal !== 'none') { + this.openState(newVal, instance, ownerInstance, self) + return + } + + if (state.left) { + this.openState('none', instance, ownerInstance, self) + } + this.resetTouchStatus(instance, self) + }, + + /** + * 开始触摸操作 + * @param {Object} e + * @param {Object} ins + */ + touchstart(e, ownerInstance, self) { + let instance = e.instance; + let disabled = instance.getDataset().disabled + let state = self.state; + this.getDom(instance, ownerInstance, self) + // fix by mehaotian, TODO 兼容 app-vue 获取dataset为字符串 , h5 获取 为 undefined 的问题,待框架修复 + disabled = this.getDisabledType(disabled) + if (disabled) return + // 开始触摸时移除动画类 + instance.requestAnimationFrame(function() { + instance.removeClass('ani'); + ownerInstance.callMethod('closeSwipe'); + }) + + // 记录上次的位置 + state.x = state.left || 0 + // 计算滑动开始位置 + this.stopTouchStart(e, ownerInstance, self) + }, + + /** + * 开始滑动操作 + * @param {Object} e + * @param {Object} ownerInstance + */ + touchmove(e, ownerInstance, self) { + let instance = e.instance; + // 删除之后已经那不到实例了 + if (!instance) return; + let disabled = instance.getDataset().disabled + let state = self.state + // fix by mehaotian, TODO 兼容 app-vue 获取dataset为字符串 , h5 获取 为 undefined 的问题,待框架修复 + disabled = this.getDisabledType(disabled) + if (disabled) return + // 是否可以滑动页面 + this.stopTouchMove(e, self); + if (state.direction !== 'horizontal') { + return; + } + if (e.preventDefault) { + // 阻止页面滚动 + e.preventDefault() + } + let x = state.x + state.deltaX + this.move(x, instance, ownerInstance, self) + }, + + /** + * 结束触摸操作 + * @param {Object} e + * @param {Object} ownerInstance + */ + touchend(e, ownerInstance, self) { + let instance = e.instance; + let disabled = instance.getDataset().disabled + let state = self.state + // fix by mehaotian, TODO 兼容 app-vue 获取dataset为字符串 , h5 获取 为 undefined 的问题,待框架修复 + disabled = this.getDisabledType(disabled) + + if (disabled) return + // 滑动过程中触摸结束,通过阙值判断是开启还是关闭 + // fixed by mehaotian 定时器解决点击按钮,touchend 触发比 click 事件时机早的问题 ,主要是 ios13 + this.moveDirection(state.left, instance, ownerInstance, self) + + }, + + /** + * 设置移动距离 + * @param {Object} value + * @param {Object} instance + * @param {Object} ownerInstance + */ + move(value, instance, ownerInstance, self) { + value = value || 0 + let state = self.state + let leftWidth = state.leftWidth + let rightWidth = state.rightWidth + // 获取可滑动范围 + state.left = this.range(value, -rightWidth, leftWidth); + instance.requestAnimationFrame(function() { + instance.setStyle({ + transform: 'translateX(' + state.left + 'px)', + '-webkit-transform': 'translateX(' + state.left + 'px)' + }) + }) + + }, + + /** + * 获取元素信息 + * @param {Object} instance + * @param {Object} ownerInstance + */ + getDom(instance, ownerInstance, self) { + var state = self.state + var $el = ownerInstance.$el || ownerInstance.$vm && ownerInstance.$vm.$el + var leftDom = $el.querySelector('.button-group--left') + var rightDom = $el.querySelector('.button-group--right') + + state.leftWidth = leftDom.offsetWidth || 0 + state.rightWidth = rightDom.offsetWidth || 0 + state.threshold = instance.getDataset().threshold + }, + + getDisabledType(value) { + return (typeof(value) === 'string' ? JSON.parse(value) : value) || false; + }, + + /** + * 获取范围 + * @param {Object} num + * @param {Object} min + * @param {Object} max + */ + range(num, min, max) { + return Math.min(Math.max(num, min), max); + }, + + + /** + * 移动方向判断 + * @param {Object} left + * @param {Object} value + * @param {Object} ownerInstance + * @param {Object} ins + */ + moveDirection(left, ins, ownerInstance, self) { + var state = self.state + var threshold = state.threshold + var position = state.position + var isopen = state.isopen || 'none' + var leftWidth = state.leftWidth + var rightWidth = state.rightWidth + if (state.deltaX === 0) { + this.openState('none', ins, ownerInstance, self) + return + } + if ((isopen === 'none' && rightWidth > 0 && -left > threshold) || (isopen !== 'none' && rightWidth > 0 && + rightWidth + + left < threshold)) { + // right + this.openState('right', ins, ownerInstance, self) + } else if ((isopen === 'none' && leftWidth > 0 && left > threshold) || (isopen !== 'none' && leftWidth > 0 && + leftWidth - left < threshold)) { + // left + this.openState('left', ins, ownerInstance, self) + } else { + // default + this.openState('none', ins, ownerInstance, self) + } + }, + + + /** + * 开启状态 + * @param {Boolean} type + * @param {Object} ins + * @param {Object} ownerInstance + */ + openState(type, ins, ownerInstance, self) { + let state = self.state + let leftWidth = state.leftWidth + let rightWidth = state.rightWidth + let left = '' + state.isopen = state.isopen ? state.isopen : 'none' + switch (type) { + case "left": + left = leftWidth + break + case "right": + left = -rightWidth + break + default: + left = 0 + } + + // && !state.throttle + + if (state.isopen !== type) { + state.throttle = true + ownerInstance.callMethod('change', { + open: type + }) + + } + + state.isopen = type + // 添加动画类 + ins.requestAnimationFrame(() => { + ins.addClass('ani'); + this.move(left, ins, ownerInstance, self) + }) + }, + + + getDirection(x, y) { + if (x > y && x > MIN_DISTANCE) { + return 'horizontal'; + } + if (y > x && y > MIN_DISTANCE) { + return 'vertical'; + } + return ''; + }, + + /** + * 重置滑动状态 + * @param {Object} event + */ + resetTouchStatus(instance, self) { + let state = self.state; + state.direction = ''; + state.deltaX = 0; + state.deltaY = 0; + state.offsetX = 0; + state.offsetY = 0; + }, + + /** + * 设置滑动开始位置 + * @param {Object} event + */ + stopTouchStart(event, ownerInstance, self) { + let instance = event.instance; + let state = self.state + this.resetTouchStatus(instance, self); + var touch = event.touches[0]; + state.startX = touch.clientX; + state.startY = touch.clientY; + }, + + /** + * 滑动中,是否禁止打开 + * @param {Object} event + */ + stopTouchMove(event, self) { + let instance = event.instance; + let state = self.state; + let touch = event.touches[0]; + + state.deltaX = touch.clientX - state.startX; + state.deltaY = touch.clientY - state.startY; + state.offsetY = Math.abs(state.deltaY); + state.offsetX = Math.abs(state.deltaX); + state.direction = state.direction || this.getDirection(state.offsetX, state.offsetY); + } +} diff --git a/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/uni-swipe-action-item.vue b/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/uni-swipe-action-item.vue new file mode 100644 index 000000000..d79c2979f --- /dev/null +++ b/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/uni-swipe-action-item.vue @@ -0,0 +1,347 @@ + + + + + + diff --git a/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/wx.wxs b/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/wx.wxs new file mode 100644 index 000000000..b394244f2 --- /dev/null +++ b/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action-item/wx.wxs @@ -0,0 +1,341 @@ +var MIN_DISTANCE = 10; + +/** + * 判断当前是否为H5、app-vue + */ +var IS_HTML5 = false +if (typeof window === 'object') IS_HTML5 = true + +/** + * 监听页面内值的变化,主要用于动态开关swipe-action + * @param {Object} newValue + * @param {Object} oldValue + * @param {Object} ownerInstance + * @param {Object} instance + */ +function showWatch(newVal, oldVal, ownerInstance, instance) { + var state = instance.getState() + getDom(instance, ownerInstance) + if (newVal && newVal !== 'none') { + openState(newVal, instance, ownerInstance) + return + } + + if (state.left) { + openState('none', instance, ownerInstance) + } + resetTouchStatus(instance) +} + +/** + * 开始触摸操作 + * @param {Object} e + * @param {Object} ins + */ +function touchstart(e, ownerInstance) { + var instance = e.instance; + var disabled = instance.getDataset().disabled + var state = instance.getState(); + getDom(instance, ownerInstance) + // fix by mehaotian, TODO 兼容 app-vue 获取dataset为字符串 , h5 获取 为 undefined 的问题,待框架修复 + disabled = (typeof(disabled) === 'string' ? JSON.parse(disabled) : disabled) || false; + if (disabled) return + // 开始触摸时移除动画类 + instance.requestAnimationFrame(function() { + instance.removeClass('ani'); + ownerInstance.callMethod('closeSwipe'); + }) + + // 记录上次的位置 + state.x = state.left || 0 + // 计算滑动开始位置 + stopTouchStart(e, ownerInstance) +} + +/** + * 开始滑动操作 + * @param {Object} e + * @param {Object} ownerInstance + */ +function touchmove(e, ownerInstance) { + var instance = e.instance; + var disabled = instance.getDataset().disabled + var state = instance.getState() + // fix by mehaotian, TODO 兼容 app-vue 获取dataset为字符串 , h5 获取 为 undefined 的问题,待框架修复 + disabled = (typeof(disabled) === 'string' ? JSON.parse(disabled) : disabled) || false; + if (disabled) return + // 是否可以滑动页面 + stopTouchMove(e); + if (state.direction !== 'horizontal') { + return; + } + + if (e.preventDefault) { + // 阻止页面滚动 + e.preventDefault() + } + + move(state.x + state.deltaX, instance, ownerInstance) +} + +/** + * 结束触摸操作 + * @param {Object} e + * @param {Object} ownerInstance + */ +function touchend(e, ownerInstance) { + var instance = e.instance; + var disabled = instance.getDataset().disabled + var state = instance.getState() + // fix by mehaotian, TODO 兼容 app-vue 获取dataset为字符串 , h5 获取 为 undefined 的问题,待框架修复 + disabled = (typeof(disabled) === 'string' ? JSON.parse(disabled) : disabled) || false; + + if (disabled) return + // 滑动过程中触摸结束,通过阙值判断是开启还是关闭 + // fixed by mehaotian 定时器解决点击按钮,touchend 触发比 click 事件时机早的问题 ,主要是 ios13 + moveDirection(state.left, instance, ownerInstance) + +} + +/** + * 设置移动距离 + * @param {Object} value + * @param {Object} instance + * @param {Object} ownerInstance + */ +function move(value, instance, ownerInstance) { + value = value || 0 + var state = instance.getState() + var leftWidth = state.leftWidth + var rightWidth = state.rightWidth + // 获取可滑动范围 + state.left = range(value, -rightWidth, leftWidth); + instance.requestAnimationFrame(function() { + instance.setStyle({ + transform: 'translateX(' + state.left + 'px)', + '-webkit-transform': 'translateX(' + state.left + 'px)' + }) + }) + +} + +/** + * 获取元素信息 + * @param {Object} instance + * @param {Object} ownerInstance + */ +function getDom(instance, ownerInstance) { + var state = instance.getState() + var leftDom = ownerInstance.selectComponent('.button-group--left') + var rightDom = ownerInstance.selectComponent('.button-group--right') + var leftStyles = { + width: 0 + } + var rightStyles = { + width: 0 + } + leftStyles = leftDom.getBoundingClientRect() + rightStyles = rightDom.getBoundingClientRect() + + state.leftWidth = leftStyles.width || 0 + state.rightWidth = rightStyles.width || 0 + state.threshold = instance.getDataset().threshold +} + +/** + * 获取范围 + * @param {Object} num + * @param {Object} min + * @param {Object} max + */ +function range(num, min, max) { + return Math.min(Math.max(num, min), max); +} + + +/** + * 移动方向判断 + * @param {Object} left + * @param {Object} value + * @param {Object} ownerInstance + * @param {Object} ins + */ +function moveDirection(left, ins, ownerInstance) { + var state = ins.getState() + var threshold = state.threshold + var position = state.position + var isopen = state.isopen || 'none' + var leftWidth = state.leftWidth + var rightWidth = state.rightWidth + if (state.deltaX === 0) { + openState('none', ins, ownerInstance) + return + } + if ((isopen === 'none' && rightWidth > 0 && -left > threshold) || (isopen !== 'none' && rightWidth > 0 && + rightWidth + + left < threshold)) { + // right + openState('right', ins, ownerInstance) + } else if ((isopen === 'none' && leftWidth > 0 && left > threshold) || (isopen !== 'none' && leftWidth > 0 && + leftWidth - left < threshold)) { + // left + openState('left', ins, ownerInstance) + } else { + // default + openState('none', ins, ownerInstance) + } +} + + +/** + * 开启状态 + * @param {Boolean} type + * @param {Object} ins + * @param {Object} ownerInstance + */ +function openState(type, ins, ownerInstance) { + var state = ins.getState() + var leftWidth = state.leftWidth + var rightWidth = state.rightWidth + var left = '' + state.isopen = state.isopen ? state.isopen : 'none' + switch (type) { + case "left": + left = leftWidth + break + case "right": + left = -rightWidth + break + default: + left = 0 + } + + // && !state.throttle + + if (state.isopen !== type) { + state.throttle = true + ownerInstance.callMethod('change', { + open: type + }) + + } + + state.isopen = type + // 添加动画类 + ins.requestAnimationFrame(function() { + ins.addClass('ani'); + move(left, ins, ownerInstance) + }) + // 设置最终移动位置,理论上只要进入到这个函数,肯定是要打开的 +} + + +function getDirection(x, y) { + if (x > y && x > MIN_DISTANCE) { + return 'horizontal'; + } + if (y > x && y > MIN_DISTANCE) { + return 'vertical'; + } + return ''; +} + +/** + * 重置滑动状态 + * @param {Object} event + */ +function resetTouchStatus(instance) { + var state = instance.getState(); + state.direction = ''; + state.deltaX = 0; + state.deltaY = 0; + state.offsetX = 0; + state.offsetY = 0; +} + +/** + * 设置滑动开始位置 + * @param {Object} event + */ +function stopTouchStart(event) { + var instance = event.instance; + var state = instance.getState(); + resetTouchStatus(instance); + var touch = event.touches[0]; + if (IS_HTML5 && isPC()) { + touch = event; + } + state.startX = touch.clientX; + state.startY = touch.clientY; +} + +/** + * 滑动中,是否禁止打开 + * @param {Object} event + */ +function stopTouchMove(event) { + var instance = event.instance; + var state = instance.getState(); + var touch = event.touches[0]; + if (IS_HTML5 && isPC()) { + touch = event; + } + state.deltaX = touch.clientX - state.startX; + state.deltaY = touch.clientY - state.startY; + state.offsetY = Math.abs(state.deltaY); + state.offsetX = Math.abs(state.deltaX); + state.direction = state.direction || getDirection(state.offsetX, state.offsetY); +} + +function isPC() { + var userAgentInfo = navigator.userAgent; + var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"]; + var flag = true; + for (var v = 0; v < Agents.length - 1; v++) { + if (userAgentInfo.indexOf(Agents[v]) > 0) { + flag = false; + break; + } + } + return flag; +} + +var movable = false + +function mousedown(e, ins) { + if (!IS_HTML5) return + if (!isPC()) return + touchstart(e, ins) + movable = true +} + +function mousemove(e, ins) { + if (!IS_HTML5) return + if (!isPC()) return + if (!movable) return + touchmove(e, ins) +} + +function mouseup(e, ins) { + if (!IS_HTML5) return + if (!isPC()) return + touchend(e, ins) + movable = false +} + +function mouseleave(e, ins) { + if (!IS_HTML5) return + if (!isPC()) return + movable = false +} + +module.exports = { + showWatch: showWatch, + touchstart: touchstart, + touchmove: touchmove, + touchend: touchend, + mousedown: mousedown, + mousemove: mousemove, + mouseup: mouseup, + mouseleave: mouseleave +} diff --git a/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action/uni-swipe-action.vue b/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action/uni-swipe-action.vue new file mode 100644 index 000000000..49717824c --- /dev/null +++ b/fe/PDA/uni_modules/uni-swipe-action/components/uni-swipe-action/uni-swipe-action.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-swipe-action/package.json b/fe/PDA/uni_modules/uni-swipe-action/package.json new file mode 100644 index 000000000..c8998d9d6 --- /dev/null +++ b/fe/PDA/uni_modules/uni-swipe-action/package.json @@ -0,0 +1,87 @@ +{ + "id": "uni-swipe-action", + "displayName": "uni-swipe-action 滑动操作", + "version": "1.3.7", + "description": "SwipeAction 滑动操作操作组件", + "keywords": [ + "", + "uni-ui", + "uniui", + "滑动删除", + "侧滑删除" + ], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "y", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/fe/PDA/uni_modules/uni-swipe-action/readme.md b/fe/PDA/uni_modules/uni-swipe-action/readme.md new file mode 100644 index 000000000..93a5cac6e --- /dev/null +++ b/fe/PDA/uni_modules/uni-swipe-action/readme.md @@ -0,0 +1,11 @@ + + +## SwipeAction 滑动操作 +> **组件名:uni-swipe-action** +> 代码块: `uSwipeAction`、`uSwipeActionItem` + + +通过滑动触发选项的容器 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-swipe-action) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-swiper-dot/changelog.md b/fe/PDA/uni_modules/uni-swiper-dot/changelog.md new file mode 100644 index 000000000..85cf54d2a --- /dev/null +++ b/fe/PDA/uni_modules/uni-swiper-dot/changelog.md @@ -0,0 +1,12 @@ +## 1.2.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-swiper-dot](https://uniapp.dcloud.io/component/uniui/uni-swiper-dot) +## 1.1.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.0.6(2021-05-12) +- 新增 示例地址 +- 修复 示例项目缺少组件的Bug +## 1.0.5(2021-02-05) +- 调整为uni_modules目录规范 +- 新增 clickItem 事件,支持指示点控制轮播 +- 新增 支持 pc 可用 diff --git a/fe/PDA/uni_modules/uni-swiper-dot/components/uni-swiper-dot/uni-swiper-dot.vue b/fe/PDA/uni_modules/uni-swiper-dot/components/uni-swiper-dot/uni-swiper-dot.vue new file mode 100644 index 000000000..e66b6c7a3 --- /dev/null +++ b/fe/PDA/uni_modules/uni-swiper-dot/components/uni-swiper-dot/uni-swiper-dot.vue @@ -0,0 +1,218 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-swiper-dot/package.json b/fe/PDA/uni_modules/uni-swiper-dot/package.json new file mode 100644 index 000000000..f2dd8d2a8 --- /dev/null +++ b/fe/PDA/uni_modules/uni-swiper-dot/package.json @@ -0,0 +1,87 @@ +{ + "id": "uni-swiper-dot", + "displayName": "uni-swiper-dot 轮播图指示点", + "version": "1.2.0", + "description": "自定义轮播图指示点组件", + "keywords": [ + "uni-ui", + "uniui", + "轮播图指示点", + "dot", + "swiper" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-swiper-dot/readme.md b/fe/PDA/uni_modules/uni-swiper-dot/readme.md new file mode 100644 index 000000000..7d397e2cc --- /dev/null +++ b/fe/PDA/uni_modules/uni-swiper-dot/readme.md @@ -0,0 +1,11 @@ + + +## SwiperDot 轮播图指示点 +> **组件名:uni-swiper-dot** +> 代码块: `uSwiperDot` + + +自定义轮播图指示点 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-swiper-dot) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-table/changelog.md b/fe/PDA/uni_modules/uni-table/changelog.md new file mode 100644 index 000000000..8233b20f1 --- /dev/null +++ b/fe/PDA/uni_modules/uni-table/changelog.md @@ -0,0 +1,23 @@ +## 1.2.1(2022-06-06) +- 修复 微信小程序存在无使用组件的问题 +## 1.2.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-table](https://uniapp.dcloud.io/component/uniui/uni-table) +## 1.1.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.0.7(2021-07-08) +- 新增 uni-th 支持 date 日期筛选范围 +## 1.0.6(2021-07-05) +- 新增 uni-th 支持 range 筛选范围 +## 1.0.5(2021-06-28) +- 新增 uni-th 筛选功能 +## 1.0.4(2021-05-12) +- 新增 示例地址 +- 修复 示例项目缺少组件的Bug +## 1.0.3(2021-04-16) +- 新增 sortable 属性,是否开启单列排序 +- 优化 表格多选逻辑 +## 1.0.2(2021-03-22) +- uni-tr 添加 disabled 属性,用于 type=selection 时,设置某行是否可由全选按钮控制 +## 1.0.1(2021-02-05) +- 调整为uni_modules目录规范 diff --git a/fe/PDA/uni_modules/uni-table/components/uni-table/uni-table.vue b/fe/PDA/uni_modules/uni-table/components/uni-table/uni-table.vue new file mode 100644 index 000000000..91b74fa78 --- /dev/null +++ b/fe/PDA/uni_modules/uni-table/components/uni-table/uni-table.vue @@ -0,0 +1,455 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-table/components/uni-tbody/uni-tbody.vue b/fe/PDA/uni_modules/uni-table/components/uni-tbody/uni-tbody.vue new file mode 100644 index 000000000..fbe1bdcb1 --- /dev/null +++ b/fe/PDA/uni_modules/uni-table/components/uni-tbody/uni-tbody.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-table/components/uni-td/uni-td.vue b/fe/PDA/uni_modules/uni-table/components/uni-td/uni-td.vue new file mode 100644 index 000000000..9ce93e936 --- /dev/null +++ b/fe/PDA/uni_modules/uni-table/components/uni-td/uni-td.vue @@ -0,0 +1,90 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-table/components/uni-th/filter-dropdown.vue b/fe/PDA/uni_modules/uni-table/components/uni-th/filter-dropdown.vue new file mode 100644 index 000000000..bc9a0e3b0 --- /dev/null +++ b/fe/PDA/uni_modules/uni-table/components/uni-th/filter-dropdown.vue @@ -0,0 +1,503 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-table/components/uni-th/uni-th.vue b/fe/PDA/uni_modules/uni-table/components/uni-th/uni-th.vue new file mode 100644 index 000000000..883e3f2ab --- /dev/null +++ b/fe/PDA/uni_modules/uni-table/components/uni-th/uni-th.vue @@ -0,0 +1,278 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-table/components/uni-thead/uni-thead.vue b/fe/PDA/uni_modules/uni-table/components/uni-thead/uni-thead.vue new file mode 100644 index 000000000..0dd18cd8c --- /dev/null +++ b/fe/PDA/uni_modules/uni-table/components/uni-thead/uni-thead.vue @@ -0,0 +1,129 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-table/components/uni-tr/table-checkbox.vue b/fe/PDA/uni_modules/uni-table/components/uni-tr/table-checkbox.vue new file mode 100644 index 000000000..158f3ffd0 --- /dev/null +++ b/fe/PDA/uni_modules/uni-table/components/uni-tr/table-checkbox.vue @@ -0,0 +1,179 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-table/components/uni-tr/uni-tr.vue b/fe/PDA/uni_modules/uni-table/components/uni-tr/uni-tr.vue new file mode 100644 index 000000000..f9b96716c --- /dev/null +++ b/fe/PDA/uni_modules/uni-table/components/uni-tr/uni-tr.vue @@ -0,0 +1,171 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-table/i18n/en.json b/fe/PDA/uni_modules/uni-table/i18n/en.json new file mode 100644 index 000000000..e32023cc1 --- /dev/null +++ b/fe/PDA/uni_modules/uni-table/i18n/en.json @@ -0,0 +1,9 @@ +{ + "filter-dropdown.reset": "Reset", + "filter-dropdown.search": "Search", + "filter-dropdown.submit": "Submit", + "filter-dropdown.filter": "Filter", + "filter-dropdown.gt": "Greater or equal to", + "filter-dropdown.lt": "Less than or equal to", + "filter-dropdown.date": "Date" +} diff --git a/fe/PDA/uni_modules/uni-table/i18n/es.json b/fe/PDA/uni_modules/uni-table/i18n/es.json new file mode 100644 index 000000000..9afd04bb6 --- /dev/null +++ b/fe/PDA/uni_modules/uni-table/i18n/es.json @@ -0,0 +1,9 @@ +{ + "filter-dropdown.reset": "Reiniciar", + "filter-dropdown.search": "Búsqueda", + "filter-dropdown.submit": "Entregar", + "filter-dropdown.filter": "Filtrar", + "filter-dropdown.gt": "Mayor o igual a", + "filter-dropdown.lt": "Menos que o igual a", + "filter-dropdown.date": "Fecha" +} diff --git a/fe/PDA/uni_modules/uni-table/i18n/fr.json b/fe/PDA/uni_modules/uni-table/i18n/fr.json new file mode 100644 index 000000000..b0062371d --- /dev/null +++ b/fe/PDA/uni_modules/uni-table/i18n/fr.json @@ -0,0 +1,9 @@ +{ + "filter-dropdown.reset": "Réinitialiser", + "filter-dropdown.search": "Chercher", + "filter-dropdown.submit": "Soumettre", + "filter-dropdown.filter": "Filtre", + "filter-dropdown.gt": "Supérieur ou égal à", + "filter-dropdown.lt": "Inférieur ou égal à", + "filter-dropdown.date": "Date" +} diff --git a/fe/PDA/uni_modules/uni-table/i18n/index.js b/fe/PDA/uni_modules/uni-table/i18n/index.js new file mode 100644 index 000000000..2469dd02b --- /dev/null +++ b/fe/PDA/uni_modules/uni-table/i18n/index.js @@ -0,0 +1,12 @@ +import en from './en.json' +import es from './es.json' +import fr from './fr.json' +import zhHans from './zh-Hans.json' +import zhHant from './zh-Hant.json' +export default { + en, + es, + fr, + 'zh-Hans': zhHans, + 'zh-Hant': zhHant +} diff --git a/fe/PDA/uni_modules/uni-table/i18n/zh-Hans.json b/fe/PDA/uni_modules/uni-table/i18n/zh-Hans.json new file mode 100644 index 000000000..862af1794 --- /dev/null +++ b/fe/PDA/uni_modules/uni-table/i18n/zh-Hans.json @@ -0,0 +1,9 @@ +{ + "filter-dropdown.reset": "重置", + "filter-dropdown.search": "搜索", + "filter-dropdown.submit": "确定", + "filter-dropdown.filter": "筛选", + "filter-dropdown.gt": "大于等于", + "filter-dropdown.lt": "小于等于", + "filter-dropdown.date": "日期范围" +} diff --git a/fe/PDA/uni_modules/uni-table/i18n/zh-Hant.json b/fe/PDA/uni_modules/uni-table/i18n/zh-Hant.json new file mode 100644 index 000000000..64f80615b --- /dev/null +++ b/fe/PDA/uni_modules/uni-table/i18n/zh-Hant.json @@ -0,0 +1,9 @@ +{ + "filter-dropdown.reset": "重置", + "filter-dropdown.search": "搜索", + "filter-dropdown.submit": "確定", + "filter-dropdown.filter": "篩選", + "filter-dropdown.gt": "大於等於", + "filter-dropdown.lt": "小於等於", + "filter-dropdown.date": "日期範圍" +} diff --git a/fe/PDA/uni_modules/uni-table/package.json b/fe/PDA/uni_modules/uni-table/package.json new file mode 100644 index 000000000..f224ab72a --- /dev/null +++ b/fe/PDA/uni_modules/uni-table/package.json @@ -0,0 +1,86 @@ +{ + "id": "uni-table", + "displayName": "uni-table 表格", + "version": "1.2.1", + "description": "表格组件,多用于展示多条结构类似的数据,如", + "keywords": [ + "uni-ui", + "uniui", + "table", + "表格" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss","uni-datetime-picker"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "n" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "n", + "QQ": "y" + }, + "快应用": { + "华为": "n", + "联盟": "n" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-table/readme.md b/fe/PDA/uni_modules/uni-table/readme.md new file mode 100644 index 000000000..bb08c7918 --- /dev/null +++ b/fe/PDA/uni_modules/uni-table/readme.md @@ -0,0 +1,13 @@ + + +## Table 表单 +> 组件名:``uni-table``,代码块: `uTable`。 + +用于展示多条结构类似的数据 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-table) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + + + diff --git a/fe/PDA/uni_modules/uni-tag/changelog.md b/fe/PDA/uni_modules/uni-tag/changelog.md new file mode 100644 index 000000000..c0c5839b1 --- /dev/null +++ b/fe/PDA/uni_modules/uni-tag/changelog.md @@ -0,0 +1,21 @@ +## 2.1.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-tag](https://uniapp.dcloud.io/component/uniui/uni-tag) +## 2.0.0(2021-11-09) +- 新增 提供组件设计资源,组件样式调整 +- 移除 插槽 +- 移除 type 属性的 royal 选项 +## 1.1.1(2021-08-11) +- type 不是 default 时,size 为 small 字体大小显示不正确 +## 1.1.0(2021-07-30) +- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.0.7(2021-06-18) +- 修复 uni-tag 在字节跳动小程序上 css 类名编译错误的 bug +## 1.0.6(2021-06-04) +- 修复 未定义 sass 变量 "$uni-color-royal" 的bug +## 1.0.5(2021-05-10) +- 修复 royal 类型无效的bug +- 修复 uni-tag 宽度不自适应的bug +- 新增 uni-tag 支持属性 custom-style 自定义样式 +## 1.0.4(2021-02-05) +- 调整为uni_modules目录规范 diff --git a/fe/PDA/uni_modules/uni-tag/components/uni-tag/uni-tag.vue b/fe/PDA/uni_modules/uni-tag/components/uni-tag/uni-tag.vue new file mode 100644 index 000000000..418c95504 --- /dev/null +++ b/fe/PDA/uni_modules/uni-tag/components/uni-tag/uni-tag.vue @@ -0,0 +1,252 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-tag/package.json b/fe/PDA/uni_modules/uni-tag/package.json new file mode 100644 index 000000000..187808863 --- /dev/null +++ b/fe/PDA/uni_modules/uni-tag/package.json @@ -0,0 +1,87 @@ +{ + "id": "uni-tag", + "displayName": "uni-tag 标签", + "version": "2.1.0", + "description": "Tag 组件,用于展示1个或多个文字标签,可点击切换选中、不选中的状态。", + "keywords": [ + "uni-ui", + "uniui", + "", + "tag", + "标签" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-tag/readme.md b/fe/PDA/uni_modules/uni-tag/readme.md new file mode 100644 index 000000000..6e78ff5e4 --- /dev/null +++ b/fe/PDA/uni_modules/uni-tag/readme.md @@ -0,0 +1,13 @@ + + +## Tag 标签 +> **组件名:uni-tag** +> 代码块: `uTag` + + +用于展示1个或多个文字标签,可点击切换选中、不选中的状态 。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-tag) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + diff --git a/fe/PDA/uni_modules/uni-title/changelog.md b/fe/PDA/uni_modules/uni-title/changelog.md new file mode 100644 index 000000000..762621653 --- /dev/null +++ b/fe/PDA/uni_modules/uni-title/changelog.md @@ -0,0 +1,10 @@ +## 1.1.1(2022-05-19) +- 修改组件描述 +## 1.1.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-title](https://uniapp.dcloud.io/component/uniui/uni-title) +## 1.0.2(2021-05-12) +- 新增 示例地址 +- 修复 示例项目缺少组件的Bug +## 1.0.1(2021-02-05) +- 调整为uni_modules目录规范 diff --git a/fe/PDA/uni_modules/uni-title/components/uni-title/uni-title.vue b/fe/PDA/uni_modules/uni-title/components/uni-title/uni-title.vue new file mode 100644 index 000000000..bf4f92659 --- /dev/null +++ b/fe/PDA/uni_modules/uni-title/components/uni-title/uni-title.vue @@ -0,0 +1,171 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-title/package.json b/fe/PDA/uni_modules/uni-title/package.json new file mode 100644 index 000000000..2249f5a1c --- /dev/null +++ b/fe/PDA/uni_modules/uni-title/package.json @@ -0,0 +1,88 @@ +{ + "id": "uni-title", + "displayName": "uni-title 章节标题", + "version": "1.1.1", + "description": "章节标题,通常用于记录页面标题,使用当前组件,uni-app 如果开启统计,将会自动统计页面标题", + "keywords": [ + "uni-ui", + "uniui", + "标题", + "章节", + "章节标题", + "" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-title/readme.md b/fe/PDA/uni_modules/uni-title/readme.md new file mode 100644 index 000000000..0e60b1b95 --- /dev/null +++ b/fe/PDA/uni_modules/uni-title/readme.md @@ -0,0 +1,14 @@ + + +## Title 标题 +> **组件名:uni-title** +> 代码块: `uTitle` + + +章节标题,通常用于记录页面标题,使用当前组件,uni-app 如果开启统计,将会自动统计页面标题 。 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-title) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 + + + diff --git a/fe/PDA/uni_modules/uni-tooltip/changelog.md b/fe/PDA/uni_modules/uni-tooltip/changelog.md new file mode 100644 index 000000000..00f1572d7 --- /dev/null +++ b/fe/PDA/uni_modules/uni-tooltip/changelog.md @@ -0,0 +1,10 @@ +## 0.2.1(2022-05-09) +- 修复 content 为空时仍然弹出的bug +## 0.2.0(2022-05-07) +**注意:破坏性更新** +- 更新 text 属性变更为 content +- 更新 移除 width 属性 +## 0.1.1(2022-04-27) +- 修复 组件根 text 嵌套组件 warning +## 0.1.0(2022-04-21) +- 初始化 diff --git a/fe/PDA/uni_modules/uni-tooltip/components/uni-tooltip/uni-tooltip.vue b/fe/PDA/uni_modules/uni-tooltip/components/uni-tooltip/uni-tooltip.vue new file mode 100644 index 000000000..ffbb6fa5d --- /dev/null +++ b/fe/PDA/uni_modules/uni-tooltip/components/uni-tooltip/uni-tooltip.vue @@ -0,0 +1,68 @@ + + + + + + diff --git a/fe/PDA/uni_modules/uni-tooltip/package.json b/fe/PDA/uni_modules/uni-tooltip/package.json new file mode 100644 index 000000000..b626efb8a --- /dev/null +++ b/fe/PDA/uni_modules/uni-tooltip/package.json @@ -0,0 +1,83 @@ +{ + "id": "uni-tooltip", + "displayName": "uni-tooltip", + "version": "0.2.1", + "description": "Tooltip 提示文字", + "keywords": [ + "uni-tooltip", + "uni-ui", + "tooltip", + "tip", + "文字提示" +], + "repository": "", +"engines": { + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无 ", + "data": "无", + "permissions": "无" + }, + "npmurl": "" + }, + "uni_modules": { + "dependencies": [], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "Vue": { + "vue2": "y", + "vue3": "y" + }, + "App": { + "app-vue": "y", + "app-nvue": "u" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "u", + "百度": "u", + "字节跳动": "u", + "QQ": "u" + }, + "快应用": { + "华为": "u", + "联盟": "u" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-tooltip/readme.md b/fe/PDA/uni_modules/uni-tooltip/readme.md new file mode 100644 index 000000000..faafa2ecb --- /dev/null +++ b/fe/PDA/uni_modules/uni-tooltip/readme.md @@ -0,0 +1,8 @@ +## Badge 数字角标 +> **组件名:uni-tooltip** +> 代码块: `uTooltip` + +数字角标一般和其它控件(列表、9宫格等)配合使用,用于进行数量提示,默认为实心灰色背景, + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-tooltip) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 diff --git a/fe/PDA/uni_modules/uni-transition/changelog.md b/fe/PDA/uni_modules/uni-transition/changelog.md new file mode 100644 index 000000000..b1a824b89 --- /dev/null +++ b/fe/PDA/uni_modules/uni-transition/changelog.md @@ -0,0 +1,20 @@ +## 1.3.1(2021-11-23) +- 修复 init 方法初始化问题 +## 1.3.0(2021-11-19) +- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource) +- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-transition](https://uniapp.dcloud.io/component/uniui/uni-transition) +## 1.2.1(2021-09-27) +- 修复 init 方法不生效的 Bug +## 1.2.0(2021-07-30) +- 组件兼容 vue3,如何创建 vue3 项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) +## 1.1.1(2021-05-12) +- 新增 示例地址 +- 修复 示例项目缺少组件的 Bug +## 1.1.0(2021-04-22) +- 新增 通过方法自定义动画 +- 新增 custom-class 非 NVUE 平台支持自定义 class 定制样式 +- 优化 动画触发逻辑,使动画更流畅 +- 优化 支持单独的动画类型 +- 优化 文档示例 +## 1.0.2(2021-02-05) +- 调整为 uni_modules 目录规范 diff --git a/fe/PDA/uni_modules/uni-transition/components/uni-transition/createAnimation.js b/fe/PDA/uni_modules/uni-transition/components/uni-transition/createAnimation.js new file mode 100644 index 000000000..5f54365e6 --- /dev/null +++ b/fe/PDA/uni_modules/uni-transition/components/uni-transition/createAnimation.js @@ -0,0 +1,128 @@ +// const defaultOption = { +// duration: 300, +// timingFunction: 'linear', +// delay: 0, +// transformOrigin: '50% 50% 0' +// } +// #ifdef APP-NVUE +const nvueAnimation = uni.requireNativePlugin('animation') +// #endif +class MPAnimation { + constructor(options, _this) { + this.options = options + this.animation = uni.createAnimation(options) + this.currentStepAnimates = {} + this.next = 0 + this.$ = _this + + } + + _nvuePushAnimates(type, args) { + let aniObj = this.currentStepAnimates[this.next] + let styles = {} + if (!aniObj) { + styles = { + styles: {}, + config: {} + } + } else { + styles = aniObj + } + if (animateTypes1.includes(type)) { + if (!styles.styles.transform) { + styles.styles.transform = '' + } + let unit = '' + if(type === 'rotate'){ + unit = 'deg' + } + styles.styles.transform += `${type}(${args+unit}) ` + } else { + styles.styles[type] = `${args}` + } + this.currentStepAnimates[this.next] = styles + } + _animateRun(styles = {}, config = {}) { + let ref = this.$.$refs['ani'].ref + if (!ref) return + return new Promise((resolve, reject) => { + nvueAnimation.transition(ref, { + styles, + ...config + }, res => { + resolve() + }) + }) + } + + _nvueNextAnimate(animates, step = 0, fn) { + let obj = animates[step] + if (obj) { + let { + styles, + config + } = obj + this._animateRun(styles, config).then(() => { + step += 1 + this._nvueNextAnimate(animates, step, fn) + }) + } else { + this.currentStepAnimates = {} + typeof fn === 'function' && fn() + this.isEnd = true + } + } + + step(config = {}) { + // #ifndef APP-NVUE + this.animation.step(config) + // #endif + // #ifdef APP-NVUE + this.currentStepAnimates[this.next].config = Object.assign({}, this.options, config) + this.currentStepAnimates[this.next].styles.transformOrigin = this.currentStepAnimates[this.next].config.transformOrigin + this.next++ + // #endif + return this + } + + run(fn) { + // #ifndef APP-NVUE + this.$.animationData = this.animation.export() + this.$.timer = setTimeout(() => { + typeof fn === 'function' && fn() + }, this.$.durationTime) + // #endif + // #ifdef APP-NVUE + this.isEnd = false + let ref = this.$.$refs['ani'] && this.$.$refs['ani'].ref + if(!ref) return + this._nvueNextAnimate(this.currentStepAnimates, 0, fn) + this.next = 0 + // #endif + } +} + + +const animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d', + 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY', + 'translateZ' +] +const animateTypes2 = ['opacity', 'backgroundColor'] +const animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom'] +animateTypes1.concat(animateTypes2, animateTypes3).forEach(type => { + MPAnimation.prototype[type] = function(...args) { + // #ifndef APP-NVUE + this.animation[type](...args) + // #endif + // #ifdef APP-NVUE + this._nvuePushAnimates(type, args) + // #endif + return this + } +}) + +export function createAnimation(option, _this) { + if(!_this) return + clearTimeout(_this.timer) + return new MPAnimation(option, _this) +} diff --git a/fe/PDA/uni_modules/uni-transition/components/uni-transition/uni-transition.vue b/fe/PDA/uni_modules/uni-transition/components/uni-transition/uni-transition.vue new file mode 100644 index 000000000..0d739bd55 --- /dev/null +++ b/fe/PDA/uni_modules/uni-transition/components/uni-transition/uni-transition.vue @@ -0,0 +1,277 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-transition/package.json b/fe/PDA/uni_modules/uni-transition/package.json new file mode 100644 index 000000000..d15fdf018 --- /dev/null +++ b/fe/PDA/uni_modules/uni-transition/package.json @@ -0,0 +1,87 @@ +{ + "id": "uni-transition", + "displayName": "uni-transition 过渡动画", + "version": "1.3.1", + "description": "元素的简单过渡动画", + "keywords": [ + "uni-ui", + "uniui", + "动画", + "过渡", + "过渡动画" +], + "repository": "https://github.com/dcloudio/uni-ui", + "engines": { + "HBuilderX": "" + }, + "directories": { + "example": "../../temps/example_temps" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" + }, + "uni_modules": { + "dependencies": ["uni-scss"], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "y" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "y", + "阿里": "y", + "百度": "y", + "字节跳动": "y", + "QQ": "y" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-transition/readme.md b/fe/PDA/uni_modules/uni-transition/readme.md new file mode 100644 index 000000000..2f8a77e10 --- /dev/null +++ b/fe/PDA/uni_modules/uni-transition/readme.md @@ -0,0 +1,11 @@ + + +## Transition 过渡动画 +> **组件名:uni-transition** +> 代码块: `uTransition` + + +元素过渡动画 + +### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-transition) +#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-upgrade-center-app/changelog.md b/fe/PDA/uni_modules/uni-upgrade-center-app/changelog.md new file mode 100644 index 000000000..009213710 --- /dev/null +++ b/fe/PDA/uni_modules/uni-upgrade-center-app/changelog.md @@ -0,0 +1,62 @@ +## 0.6.0(2022-07-19) +- 新增 支持多应用商店配置(需要 uni-admin 1.9.3+) +## 0.4.1(2022-05-27) +- 修复 上版引出的报错问题 +## 0.4.0(2022-05-27) +- 新增 Android 支持跳转手机自带商店,填写升级包地址时请填写跳转商店链接 +- 新增 改为云对象调用方式,使用更直观 +## 0.3.3(2022-04-14) +- 修复 调用 check-update,当 code 为 0 时没有回调 +## 0.3.2(2022-01-12) +- 优化显示逻辑 +## 0.3.1(2021-11-24) +- 修复 vue3 上图片不显示的Bug +## 0.3.0(2021-11-18) +- 移除 wgt 安装成功后提示,防止重启过快弹框不消失 +## 0.2.2(2021-08-25) +- 兼容vue3.0 +## 0.2.1(2021-07-26) +- 修复 使用腾讯云并手动填写地址时,导致下载链接失效的bug +## 0.2.0(2021-07-13) +- 更新文档 关于报错local_storage_key 为空,请不要将页面路径设置为pages.json中第一项 +## 0.1.9(2021-06-28) +- 更新文档 +- 修复 wgt安装失败时,按钮状态不对 +## 0.1.8(2021-06-16) +- 修复 跳转安装时,导致上次下载的apk还没安装就被删掉的bug +## 0.1.7(2021-06-03) +- 修改 移除static中的图片 +## 0.1.6(2021-06-03) +- 修改 下载更新按钮使用CSS渐变色 +## 0.1.5(2021-04-22) +- 更新check-update函数。现在返回一个Promise,有更新时成功回调,其他情况错误回调 +## 0.1.4(2021-04-13) +- 更新文档。明确云函数调用结果 +## 0.1.3(2021-04-13) +- 解耦云函数与弹框处理。utils中新增 call-check-version.js,可用于单独检测是否有更新 +## 0.1.2(2021-04-07) +- 更新版本对比函数 compare +## 0.1.1(2021-04-07) +- 修复 腾讯云空间下载链接不能下载问题 +## 0.1.0(2021-04-07) +- 新增使用uni.showModal提示升级示例 +- 修改iOS升级提示方式 +## 0.0.7(2021-04-02) +- 修复在iOS上打开弹框报错 +## 0.0.6(2021-04-01) +- 兼容旧版本安卓 +## 0.0.5(2021-04-01) +- 修复低版本安卓上进度条错位 +## 0.0.4(2021-04-01) +- 更新readme +- 修复check-update语法错误 +## 0.0.3(2021-04-01) +- 新增前台更新弹框,详见readme +- 更新前台检查更新方法 + +## 0.0.2(2021-03-29) +- 更新文档 +- 移除 dependencies + +## 0.0.1(2021-03-25) +- 升级中心前台检查更新 diff --git a/fe/PDA/uni_modules/uni-upgrade-center-app/images/app_update_close.png b/fe/PDA/uni_modules/uni-upgrade-center-app/images/app_update_close.png new file mode 100644 index 000000000..8b2ffe62c Binary files /dev/null and b/fe/PDA/uni_modules/uni-upgrade-center-app/images/app_update_close.png differ diff --git a/fe/PDA/uni_modules/uni-upgrade-center-app/images/bg_top.png b/fe/PDA/uni_modules/uni-upgrade-center-app/images/bg_top.png new file mode 100644 index 000000000..015f698cd Binary files /dev/null and b/fe/PDA/uni_modules/uni-upgrade-center-app/images/bg_top.png differ diff --git a/fe/PDA/uni_modules/uni-upgrade-center-app/package.json b/fe/PDA/uni_modules/uni-upgrade-center-app/package.json new file mode 100644 index 000000000..eea5a86a1 --- /dev/null +++ b/fe/PDA/uni_modules/uni-upgrade-center-app/package.json @@ -0,0 +1,83 @@ +{ + "id": "uni-upgrade-center-app", + "displayName": "升级中心 uni-upgrade-center - App", + "version": "0.6.0", + "description": "uni升级中心 - 客户端检查更新", + "keywords": [ + "uniCloud", + "update", + "升级", + "wgt" +], + "repository": "https://gitee.com/dcloud/uni-upgrade-center/tree/master/uni_modules/uni-upgrade-center-app", + "engines": { + "HBuilderX": "^3.1.0" + }, + "dcloudext": { + "category": [ + "uniCloud", + "云端一体页面模板" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "插件不采集任何数据", + "permissions": "无" + }, + "npmurl": "" + }, + "uni_modules": { + "dependencies": [], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "y", + "aliyun": "y" + }, + "client": { + "App": { + "app-vue": "y", + "app-nvue": "u" + }, + "H5-mobile": { + "Safari": "y", + "Android Browser": "y", + "微信浏览器(Android)": "y", + "QQ浏览器(Android)": "y" + }, + "H5-pc": { + "Chrome": "y", + "IE": "y", + "Edge": "y", + "Firefox": "y", + "Safari": "y" + }, + "小程序": { + "微信": "u", + "阿里": "u", + "百度": "u", + "字节跳动": "u", + "QQ": "u" + }, + "快应用": { + "华为": "u", + "联盟": "u" + }, + "Vue": { + "vue2": "y", + "vue3": "y" + } + } + } + } +} diff --git a/fe/PDA/uni_modules/uni-upgrade-center-app/pages/upgrade-popup.vue b/fe/PDA/uni_modules/uni-upgrade-center-app/pages/upgrade-popup.vue new file mode 100644 index 000000000..c0d7d7287 --- /dev/null +++ b/fe/PDA/uni_modules/uni-upgrade-center-app/pages/upgrade-popup.vue @@ -0,0 +1,539 @@ + + + + + diff --git a/fe/PDA/uni_modules/uni-upgrade-center-app/pages_init.json b/fe/PDA/uni_modules/uni-upgrade-center-app/pages_init.json new file mode 100644 index 000000000..c12164dc4 --- /dev/null +++ b/fe/PDA/uni_modules/uni-upgrade-center-app/pages_init.json @@ -0,0 +1,18 @@ +{ + "pages": [{ + "path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup", + "style": { + "disableScroll": true, + "app-plus": { + "backgroundColorTop": "transparent", + "background": "transparent", + "titleNView": false, + "scrollIndicator": false, + "popGesture": "none", + "animationType": "fade-in", + "animationDuration": 200 + + } + } + }] +} diff --git a/fe/PDA/uni_modules/uni-upgrade-center-app/readme.md b/fe/PDA/uni_modules/uni-upgrade-center-app/readme.md new file mode 100644 index 000000000..048fe3a93 --- /dev/null +++ b/fe/PDA/uni_modules/uni-upgrade-center-app/readme.md @@ -0,0 +1,126 @@ +## 升级中心 - app插件与 `uni-admin` 版本关系 + +### `uni-admin >= 1.9.3`:云函数 `checkVersion` 废弃,使用 uni-admin 自带的 `uni-upgrade-center` 云函数。 + +# uni-upgrade-center - App + +### 概述 + +> 统一管理App及App在`Android`、`iOS`平台上`App安装包`和`wgt资源包`的发布升级 + +> uni升级中心分为业务插件和后台管理插件。本插件为业务插件,包括uni升级中心客户端检查更新的前后端逻辑。后台管理系统另见 [uni-upgrade-center - Admin](https://ext.dcloud.net.cn/plugin?id=4470) + +### uni升级中心 - 客户端检查更新插件 + - 一键式检查更新,同时支持整包升级与wgt资源包更新 + - 好看、实用、可自定义的客户端提示框 + +## 安装指引 + +1. 依赖数据库`opendb-app-versions`,如果没有此库,请在云服务空间中创建。 + +2. 使用`HBuilderX 3.1.0+`,因为要使用到`uni_modules` + +3. 在插件市场打开本插件页面,在右侧点击`使用 HBuilderX 导入插件`,选择要导入的项目点击确定 + +4. 绑定一个服务空间 + +5. 找到`/uni_modules/uni-upgrade-center-app/uniCloud/cloudfunctions/check-version`,右键上传部署 + +6. 在`pages.json`中添加页面路径。**注:请不要设置为pages.json中第一项** +```json +"pages": [ + // ……其他页面配置 + { + "path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup", + "style": { + "disableScroll": true, + "app-plus": { + "backgroundColorTop": "transparent", + "background": "transparent", + "titleNView": false, + "scrollIndicator": false, + "popGesture": "none", + "animationType": "fade-in", + "animationDuration": 200 + + } + } + } +] +``` + +7. 将`@/uni_modules/uni-upgrade-center-app/utils/check-update`import到需要用到的地方,调用一下即可 + 1. 默认使用当前绑定的服务空间,如果要请求其他服务空间,可以使用其他服务空间的 `callFunction`。[详情](https://uniapp.dcloud.io/uniCloud/cf-functions.html#call-by-function-cross-space) + +8. 升级弹框可自行编写,也可以使用`uni.showModal`,或使用现有的升级弹框样式,如果不满足UI需求请自行替换资源文件。在`utils/check-update.js`中都有实例。 + +9. wgt更新时,打包前请务必将manifest.json中的版本修改为更高版本。 + +### 更新下载安装`check-update.js` + +*该函数在utils目录下* + +1. 如果是静默更新,则不会打开更新弹框,会在后台下载后安装,下次启动应用生效 + +2. 如果是 iOS,则会直接打开AppStore的链接 + +3. 其他情况,会将`check-version`返回的结果保存在localStorage中,并跳转进入`upgrade-popup.vue`打开更新弹框 + +### 检查更新函数`check-version` + +*该函数在uniCloud/cloudfunctions目录下* + +1. 使用检查更新需要传递三个参数 `appid`、`appVersion`、`wgtVersion` + +2. `appid` 使用 plus.runtime.appid 获取,*注:真机运行时为固定值HBuilder,在调试的时候请使用本地调试云函数* + +3. `appVersion` 使用 plus.runtime.version 获取 + +4. `wgtVersion` 使用 plus.runtime.getProperty(plus.runtime.appid,(wgtInfo) => { wgtInfo.version }) 获取 + +5. `check-version`云函数内部会自动获取 App 平台 + + +**Tips** + +1. `check-version`云函数内部有版本对比函数(compare)。 + - 使用多段式版本格式(如:"3.0.0.0.0.1.0.1", "3.0.0.0.0.1")。如果不满足对比规则,请自行修改。 + - 如果修改,请将*pages/upgrade-popup.vue*中*compare*函数一并修改 + +## 项目代码说明 + +### 更新弹框 +- `upgrade-popup.vue` - 更新应用: + - 如果云函数`check-version`返回的参数表明需要更新,则将参数保存在localStorage中,带着键值跳转该页面 + - 进入时会先从localStorage中尝试取出之前存的安装包路径(此包不会是强制安装类型的包) + - 如果有已经保存的包,则和传进来的 `version` 进行比较,如果相等则安装。大于和小于都不进行安装,因为admin端可能会调整包的版本。不符合更新会将此包删除 + - 如果本地没有包或者包不符合安装条件,则进行下载安装包 + - 点击下载会有进度条、已下载大小和下载包的大小 + - 下载完成会提示安装: + - 如果是 wgt 包,安装时则会提示 正在安装…… 和 安装完成。安装完成会提示是否重启 + - 如果是 原生安装包,则直接跳出去覆盖安装 + - 下载过程中,如果退出会提示是否取消下载。如果是强制更新,则只会提示正在下载请稍后,此时不可退出 + - 如果是下载完成了没有安装就退出,则会将下载完成的包保存在本地。将包的本地路径和包version保存在localStorage中 + +### 工具类 utils +- `call-check-version` + - 请求云函数`check-version`拿取版本检测结果 +- `check-update` + - 调用`call-check-version`并根据结果判断是否显示更新弹框 + +### 云函数 +- `check-version` - 检查应用更新: + - 根据传参,先检测传参是否完整,appid appVersion wgtVersion 必传 + - 先从数据库取出所有该平台(会从上下文读取平台信息)的所有线上发行更新 + - 再从所有线上发行更新中取出版本最大的一版。如果可以,尽量先检测wgt的线上发行版更新 + - 使用上一步取出的版本包的版本号 和传参 appVersion、wgtVersion 来检测是否有更新。必须同时大于这两项,因为上一次可能是wgt热更新,否则返回暂无更新 + - 如果库中 wgt包 版本大于传参 appVersion,但是不满足 min_uni_version < appVersion,则不会使用wgt更新,会接着判断库中 app包version 是否大于 appVersion + - 返回结果: + + |code|message| + |:-:|:-:| + |0|当前版本已经是最新的,不需要更新| + |101|wgt更新| + |102|整包更新| + |-101|暂无更新或检查appid是否填写正确| + |-102|请检查传参是否填写正确| \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-upgrade-center-app/static/app_update_close.png b/fe/PDA/uni_modules/uni-upgrade-center-app/static/app_update_close.png new file mode 100644 index 000000000..8b2ffe62c Binary files /dev/null and b/fe/PDA/uni_modules/uni-upgrade-center-app/static/app_update_close.png differ diff --git a/fe/PDA/uni_modules/uni-upgrade-center-app/static/bg_top.png b/fe/PDA/uni_modules/uni-upgrade-center-app/static/bg_top.png new file mode 100644 index 000000000..015f698cd Binary files /dev/null and b/fe/PDA/uni_modules/uni-upgrade-center-app/static/bg_top.png differ diff --git a/fe/PDA/uni_modules/uni-upgrade-center-app/uniCloud/cloudfunctions/check-version/check-version.param.json b/fe/PDA/uni_modules/uni-upgrade-center-app/uniCloud/cloudfunctions/check-version/check-version.param.json new file mode 100644 index 000000000..78ff505f4 --- /dev/null +++ b/fe/PDA/uni_modules/uni-upgrade-center-app/uniCloud/cloudfunctions/check-version/check-version.param.json @@ -0,0 +1,9 @@ +// 本文件中的json内容将在云函数【运行】时作为参数传给云函数。 + +// 配置教程参考:https://uniapp.dcloud.net.cn/uniCloud/quickstart?id=runparam + +{ + "appid": "__YOUR_APPID__", + "appVersion": "2.2.0", + "wgtVersion": "2.2.2" +} diff --git a/fe/PDA/uni_modules/uni-upgrade-center-app/uniCloud/cloudfunctions/check-version/index.js b/fe/PDA/uni_modules/uni-upgrade-center-app/uniCloud/cloudfunctions/check-version/index.js new file mode 100644 index 000000000..b46f10b2b --- /dev/null +++ b/fe/PDA/uni_modules/uni-upgrade-center-app/uniCloud/cloudfunctions/check-version/index.js @@ -0,0 +1,167 @@ +'use strict'; +exports.main = async (event, context) => { + /** + * 检测升级 使用说明 + * 上传包: + * 1. 根据传参,先检测传参是否完整,appid appVersion wgtVersion 必传 + * 2. 先从数据库取出所有该平台(从上下文读取平台信息,默认 Andriod)的所有线上发行更新 + * 3. 再从所有线上发行更新中取出版本最大的一版。如果可以,尽量先检测wgt的线上发行版更新 + * 4. 使用上步取出的版本包的版本号 和传参 appVersion、wgtVersion 来检测是否有更新,必须同时大于这两项,否则返回暂无更新 + * 5. 如果库中 wgt包 版本大于传参 appVersion,但是不满足 min_uni_version < appVersion,则不会使用wgt更新,会接着判断库中 app包version 是否大于 appVersion + */ + + let { + appid, + appVersion, + wgtVersion, + } = event; + + const platform_Android = 'Android'; + const platform_iOS = 'iOS'; + const package_app = 'native_app'; + const package_wgt = 'wgt'; + const app_version_db_name = 'opendb-app-versions' + + let platform = platform_Android; + + // 云函数URL化请求 + if (event.headers) { + let body; + try { + if (event.httpMethod.toLocaleLowerCase() === 'get') { + body = event.queryStringParameters; + } else { + body = JSON.parse(event.body); + } + } catch (e) { + return { + code: 500, + msg: '请求错误' + }; + } + + appid = body.appid; + appVersion = body.appVersion; + wgtVersion = body.wgtVersion; + + platform = /iPhone|iPad/.test(event.headers) ? platform_iOS : platform_Android; + } else if (context.OS) { + platform = context.OS === 'android' + ? platform_Android + : context.OS === 'ios' + ? platform_iOS + : platform_Android; + } + + if (appid && appVersion && wgtVersion && platform) { + const collection = uniCloud.database().collection(app_version_db_name); + + const record = await collection.where({ + appid, + platform, + stable_publish: true + }) + .orderBy('create_date', 'desc') + .get(); + + if (record && record.data && record.data.length > 0) { + const appVersionInDb = record.data.find(item => item.type === package_app) || {}; + const wgtVersionInDb = record.data.find(item => item.type === package_wgt) || {}; + const hasAppPackage = !!Object.keys(appVersionInDb).length; + const hasWgtPackage = !!Object.keys(wgtVersionInDb).length; + + // 取两个版本中版本号最大的包,版本一样,使用wgt包 + let stablePublishDb = hasAppPackage + ? hasWgtPackage + ? compare(wgtVersionInDb.version, appVersionInDb.version) >= 0 + ? wgtVersionInDb + : appVersionInDb + : appVersionInDb + : wgtVersionInDb; + + const { + version, + min_uni_version + } = stablePublishDb; + + // 库中的version必须满足同时大于appVersion和wgtVersion才行,因为上次更新可能是wgt更新 + const appUpdate = compare(version, appVersion) === 1; // app包可用更新 + const wgtUpdate = compare(version, wgtVersion) === 1; // wgt包可用更新 + + if (Object.keys(stablePublishDb).length && appUpdate && wgtUpdate) { + // 判断是否可用wgt更新 + if (min_uni_version && compare(min_uni_version, appVersion) < 1) { + return { + code: 101, + message: 'wgt更新', + ...stablePublishDb + }; + } else if (hasAppPackage && compare(appVersionInDb.version, appVersion) === 1) { + return { + code: 102, + message: '整包更新', + ...appVersionInDb + }; + } + } + + return { + code: 0, + message: '当前版本已经是最新的,不需要更新' + }; + } + + return { + code: -101, + message: '暂无更新或检查appid是否填写正确' + }; + } + + return { + code: -102, + message: '请检查传参是否填写正确' + }; +}; + +/** + * 对比版本号,如需要,请自行修改判断规则 + * 支持比对 ("3.0.0.0.0.1.0.1", "3.0.0.0.0.1") ("3.0.0.1", "3.0") ("3.1.1", "3.1.1.1") 之类的 + * @param {Object} v1 + * @param {Object} v2 + * v1 > v2 return 1 + * v1 < v2 return -1 + * v1 == v2 return 0 + */ +function compare(v1 = '0', v2 = '0') { + v1 = String(v1).split('.') + v2 = String(v2).split('.') + const minVersionLens = Math.min(v1.length, v2.length); + + let result = 0; + for (let i = 0; i < minVersionLens; i++) { + const curV1 = Number(v1[i]) + const curV2 = Number(v2[i]) + + if (curV1 > curV2) { + result = 1 + break; + } else if(curV1 < curV2) { + result = -1 + break; + } + } + + if (result === 0 && (v1.length !== v2.length)) { + const v1BiggerThenv2 = v1.length > v2.length; + const maxLensVersion = v1BiggerThenv2 ? v1 : v2; + for (let i = minVersionLens; i < maxLensVersion.length; i++) { + const curVersion = Number(maxLensVersion[i]) + if (curVersion > 0) { + v1BiggerThenv2 ? result = 1 : result = -1 + break; + } + } + } + + return result; +} diff --git a/fe/PDA/uni_modules/uni-upgrade-center-app/uniCloud/cloudfunctions/checkVersion/checkVersion.param.json b/fe/PDA/uni_modules/uni-upgrade-center-app/uniCloud/cloudfunctions/checkVersion/checkVersion.param.json new file mode 100644 index 000000000..f5e089070 --- /dev/null +++ b/fe/PDA/uni_modules/uni-upgrade-center-app/uniCloud/cloudfunctions/checkVersion/checkVersion.param.json @@ -0,0 +1,14 @@ +// 本文件中的json内容将在云对象【运行】时作为参数传给云对象。 +// 配置教程参考:https://uniapp.dcloud.net.cn/uniCloud/quickstart?id=runparam +{ + // 调用云对象的方法名称 + "method": "checkVersion", + // 传递给调用方法的参数列表 + "params": [ + { + "appid": "__UNI__HelloUNIApp", + "appVersion": "1.0.0", + "wgtVersion": "1.0.0" + } + ] +} diff --git a/fe/PDA/uni_modules/uni-upgrade-center-app/uniCloud/cloudfunctions/checkVersion/index.obj.js b/fe/PDA/uni_modules/uni-upgrade-center-app/uniCloud/cloudfunctions/checkVersion/index.obj.js new file mode 100644 index 000000000..fe3549e39 --- /dev/null +++ b/fe/PDA/uni_modules/uni-upgrade-center-app/uniCloud/cloudfunctions/checkVersion/index.obj.js @@ -0,0 +1,148 @@ +// 开发文档: https://uniapp.dcloud.net.cn/uniCloud/cloud-obj +module.exports = { + checkVersion: async function(event) { + /** + * 检测升级 使用说明 + * 上传包: + * 1. 根据传参,先检测传参是否完整,appid appVersion wgtVersion 必传 + * 2. 先从数据库取出所有该平台(从上下文读取平台信息,默认 Andriod)的所有线上发行更新 + * 3. 再从所有线上发行更新中取出版本最大的一版。如果可以,尽量先检测wgt的线上发行版更新 + * 4. 使用上步取出的版本包的版本号 和传参 appVersion、wgtVersion 来检测是否有更新,必须同时大于这两项,否则返回暂无更新 + * 5. 如果库中 wgt包 版本大于传参 appVersion,但是不满足 min_uni_version < appVersion,则不会使用wgt更新,会接着判断库中 app包version 是否大于 appVersion + */ + + const clientInfo = this.getClientInfo() + + let { + appid, + appVersion, + wgtVersion, + } = event; + + const platform_Android = 'Android'; + const platform_iOS = 'iOS'; + const package_app = 'native_app'; + const package_wgt = 'wgt'; + const app_version_db_name = 'opendb-app-versions' + + let platform = platform_Android; + + platform = clientInfo.OS === 'android' ? + platform_Android : + clientInfo.OS === 'ios' ? + platform_iOS : + platform_Android; + + if (appid && appVersion && wgtVersion && platform) { + const collection = uniCloud.database().collection(app_version_db_name); + + const record = await collection.where({ + appid, + platform, + stable_publish: true + }) + .orderBy('create_date', 'desc') + .get(); + + if (record && record.data && record.data.length > 0) { + const appVersionInDb = record.data.find(item => item.type === package_app) || {}; + const wgtVersionInDb = record.data.find(item => item.type === package_wgt) || {}; + const hasAppPackage = !!Object.keys(appVersionInDb).length; + const hasWgtPackage = !!Object.keys(wgtVersionInDb).length; + + // 取两个版本中版本号最大的包,版本一样,使用wgt包 + let stablePublishDb = hasAppPackage ? + hasWgtPackage ? + compare(wgtVersionInDb.version, appVersionInDb.version) >= 0 ? + wgtVersionInDb : + appVersionInDb : + appVersionInDb : + wgtVersionInDb; + + const { + version, + min_uni_version + } = stablePublishDb; + + // 库中的version必须满足同时大于appVersion和wgtVersion才行,因为上次更新可能是wgt更新 + const appUpdate = compare(version, appVersion) === 1; // app包可用更新 + const wgtUpdate = compare(version, wgtVersion) === 1; // wgt包可用更新 + + if (Object.keys(stablePublishDb).length && appUpdate && wgtUpdate) { + // 判断是否可用wgt更新 + if (min_uni_version && compare(min_uni_version, appVersion) < 1) { + return { + code: 101, + message: 'wgt更新', + ...stablePublishDb + }; + } else if (hasAppPackage && compare(appVersionInDb.version, appVersion) === 1) { + return { + code: 102, + message: '整包更新', + ...appVersionInDb + }; + } + } + + return { + code: 0, + message: '当前版本已经是最新的,不需要更新' + }; + } + + return { + code: -101, + message: '暂无更新或检查appid是否填写正确' + }; + } + + return { + code: -102, + message: '请检查传参是否填写正确' + }; + } +} + +/** + * 对比版本号,如需要,请自行修改判断规则 + * 支持比对 ("3.0.0.0.0.1.0.1", "3.0.0.0.0.1") ("3.0.0.1", "3.0") ("3.1.1", "3.1.1.1") 之类的 + * @param {Object} v1 + * @param {Object} v2 + * v1 > v2 return 1 + * v1 < v2 return -1 + * v1 == v2 return 0 + */ +function compare(v1 = '0', v2 = '0') { + v1 = String(v1).split('.') + v2 = String(v2).split('.') + const minVersionLens = Math.min(v1.length, v2.length); + + let result = 0; + for (let i = 0; i < minVersionLens; i++) { + const curV1 = Number(v1[i]) + const curV2 = Number(v2[i]) + + if (curV1 > curV2) { + result = 1 + break; + } else if (curV1 < curV2) { + result = -1 + break; + } + } + + if (result === 0 && (v1.length !== v2.length)) { + const v1BiggerThenv2 = v1.length > v2.length; + const maxLensVersion = v1BiggerThenv2 ? v1 : v2; + for (let i = minVersionLens; i < maxLensVersion.length; i++) { + const curVersion = Number(maxLensVersion[i]) + if (curVersion > 0) { + v1BiggerThenv2 ? result = 1 : result = -1 + break; + } + } + } + + return result; +} diff --git a/fe/PDA/uni_modules/uni-upgrade-center-app/uniCloud/cloudfunctions/checkVersion/package.json b/fe/PDA/uni_modules/uni-upgrade-center-app/uniCloud/cloudfunctions/checkVersion/package.json new file mode 100644 index 000000000..e36bef9ee --- /dev/null +++ b/fe/PDA/uni_modules/uni-upgrade-center-app/uniCloud/cloudfunctions/checkVersion/package.json @@ -0,0 +1,7 @@ +{ + "name": "checkVersion", + "dependencies": {}, + "extensions": { + "uni-cloud-jql": {} + } +} \ No newline at end of file diff --git a/fe/PDA/uni_modules/uni-upgrade-center-app/uniCloud/cloudfunctions/temp.png b/fe/PDA/uni_modules/uni-upgrade-center-app/uniCloud/cloudfunctions/temp.png new file mode 100644 index 000000000..8b2ffe62c Binary files /dev/null and b/fe/PDA/uni_modules/uni-upgrade-center-app/uniCloud/cloudfunctions/temp.png differ diff --git a/fe/PDA/uni_modules/uni-upgrade-center-app/utils/call-check-version.js b/fe/PDA/uni_modules/uni-upgrade-center-app/utils/call-check-version.js new file mode 100644 index 000000000..de45f009b --- /dev/null +++ b/fe/PDA/uni_modules/uni-upgrade-center-app/utils/call-check-version.js @@ -0,0 +1,33 @@ +export default function() { + // #ifdef APP-PLUS + return new Promise((resolve, reject) => { + plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) { + const data = { + action: 'checkVersion', + appid: plus.runtime.appid, + appVersion: plus.runtime.version, + wgtVersion: widgetInfo.version + } + console.log("data: ",data); + uniCloud.callFunction({ + name: 'uni-upgrade-center', + data, + success: (e) => { + console.log("e: ", e); + resolve(e) + }, + fail: (error) => { + reject(error) + } + }) + }) + }) + // #endif + // #ifndef APP-PLUS + return new Promise((resolve, reject) => { + reject({ + message: '请在App中使用' + }) + }) + // #endif +} diff --git a/fe/PDA/uni_modules/uni-upgrade-center-app/utils/check-update.js b/fe/PDA/uni_modules/uni-upgrade-center-app/utils/check-update.js new file mode 100644 index 000000000..38fe7b061 --- /dev/null +++ b/fe/PDA/uni_modules/uni-upgrade-center-app/utils/check-update.js @@ -0,0 +1,158 @@ +import callCheckVersion from './call-check-version' + +// 推荐再App.vue中使用 +const PACKAGE_INFO_KEY = '__package_info__' + +export default function() { + // #ifdef APP-PLUS + return new Promise((resolve, reject) => { + callCheckVersion().then(async (e) => { + if (!e.result) return; + const { + code, + message, + is_silently, // 是否静默更新 + url, // 安装包下载地址 + platform, // 安装包平台 + type // 安装包类型 + } = e.result; + + // 此处逻辑仅为实例,可自行编写 + if (code > 0) { + // 腾讯云和阿里云下载链接不同,需要处理一下,阿里云会原样返回 + const { + fileList + } = await uniCloud.getTempFileURL({ + fileList: [url] + }); + if (fileList[0].tempFileURL) + e.result.url = fileList[0].tempFileURL; + + resolve(e) + + // 静默更新,只有wgt有 + if (is_silently) { + uni.downloadFile({ + url: e.result.url, + success: res => { + if (res.statusCode == 200) { + // 下载好直接安装,下次启动生效 + plus.runtime.install(res.tempFilePath, { + force: false + }); + } + } + }); + return; + } + + /** + * 提示升级一 + * 使用 uni.showModal + */ + // return updateUseModal(e.result) + + /** + * 提示升级二 + * 官方适配的升级弹窗,可自行替换资源适配UI风格 + */ + uni.setStorageSync(PACKAGE_INFO_KEY, e.result) + uni.navigateTo({ + url: `/uni_modules/uni-upgrade-center-app/pages/upgrade-popup?local_storage_key=${PACKAGE_INFO_KEY}`, + fail: (err) => { + console.error('更新弹框跳转失败', err) + uni.removeStorageSync(PACKAGE_INFO_KEY) + } + }) + + return + } else if (code < 0) { + // TODO 云函数报错处理 + console.error(message) + return reject(e) + } + return resolve(e) + }).catch(err => { + // TODO 云函数报错处理 + console.error(err.message) + reject(err) + }) + }); + // #endif +} + +/** + * 使用 uni.showModal 升级 + */ +function updateUseModal(packageInfo) { + const { + title, // 标题 + contents, // 升级内容 + is_mandatory, // 是否强制更新 + url, // 安装包下载地址 + platform, // 安装包平台 + type // 安装包类型 + } = packageInfo; + + let isWGT = type === 'wgt' + let isiOS = !isWGT ? platform.includes('iOS') : false; + let confirmText = isiOS ? '立即跳转更新' : '立即下载更新' + + return uni.showModal({ + title, + content: contents, + showCancel: !is_mandatory, + confirmText, + success: res => { + if (res.cancel) return; + + // 安装包下载 + if (isiOS) { + plus.runtime.openURL(url); + return; + } + + uni.showToast({ + title: '后台下载中……', + duration: 1000 + }); + + // wgt 和 安卓下载更新 + downloadTask = uni.downloadFile({ + url, + success: res => { + if (res.statusCode !== 200) { + console.error('下载安装包失败', err); + return; + } + // 下载好直接安装,下次启动生效 + plus.runtime.install(res.tempFilePath, { + force: false + }, () => { + if (is_mandatory) { + //更新完重启app + plus.runtime.restart(); + return; + } + uni.showModal({ + title: '安装成功是否重启?', + success: res => { + if (res.confirm) { + //更新完重启app + plus.runtime.restart(); + } + } + }); + }, err => { + uni.showModal({ + title: '更新失败', + content: err + .message, + showCancel: false + }); + }); + } + }); + } + }); +} diff --git a/fe/PDA/unpackage/dist/dev/.nvue/app.css.js b/fe/PDA/unpackage/dist/dev/.nvue/app.css.js new file mode 100644 index 000000000..bc8c0e7c3 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/app.css.js @@ -0,0 +1,2 @@ +var _style_0 = { "uni-flex": { "": { "display": "flex", "flexDirection": "row" } }, "uni-flex-item": { "": { "flex": 1 } }, "uni-row": { "": { "flexDirection": "row" } }, "uni-column": { "": { "flexDirection": "column" } }, "uni-link": { "": { "color": "#576B95", "fontSize": "26rpx" } }, "uni-center": { "": { "textAlign": "center" } }, "uni-inline-item": { "": { "display": "flex", "flexDirection": "row", "alignItems": "center" } }, "common-page-head": { "": { "paddingTop": "35rpx", "paddingRight": "35rpx", "paddingBottom": "35rpx", "paddingLeft": "35rpx", "textAlign": "center" } }, "common-page-head-title": { "": { "paddingTop": 0, "paddingRight": "40rpx", "paddingBottom": 0, "paddingLeft": "40rpx", "fontSize": "30rpx", "height": "88rpx", "lineHeight": "88rpx", "color": "#BEBEBE", "boxSizing": "border-box", "borderBottomWidth": "2rpx", "borderBottomStyle": "solid", "borderBottomColor": "#D8D8D8" } }, "uni-padding-wrap": { "": { "paddingTop": 0, "paddingRight": "30rpx", "paddingBottom": 0, "paddingLeft": "30rpx" } }, "uni-word": { "": { "textAlign": "center", "paddingTop": "200rpx", "paddingRight": "100rpx", "paddingBottom": "200rpx", "paddingLeft": "100rpx" } }, "uni-title": { "": { "fontSize": "30rpx", "fontWeight": "500", "paddingTop": "20rpx", "paddingRight": 0, "paddingBottom": "20rpx", "paddingLeft": 0, "lineHeight": 1.5 }, ".uni-triplex-left ": { "paddingTop": "8rpx", "paddingRight": 0, "paddingBottom": "8rpx", "paddingLeft": 0 } }, "uni-text": { "": { "fontSize": "28rpx" }, ".uni-triplex-left ": { "color": "#999999" } }, "uni-text-gray": { "": { "color": "#cccccc" } }, "uni-text-small": { "": { "fontSize": "24rpx" }, ".uni-triplex-left ": { "color": "#999999" } }, "uni-common-mb": { "": { "marginBottom": "30rpx" } }, "uni-common-pb": { "": { "paddingBottom": "30rpx" } }, "uni-common-pl": { "": { "paddingLeft": "30rpx" } }, "uni-common-mt": { "": { "marginTop": "30rpx" } }, "uni-bg-red": { "": { "backgroundColor": "#F76260", "color": "#FFFFFF" } }, "uni-bg-green": { "": { "backgroundColor": "#09BB07", "color": "#FFFFFF" } }, "uni-bg-blue": { "": { "backgroundColor": "#007AFF", "color": "#FFFFFF" } }, "uni-h1": { "": { "fontSize": "80rpx", "fontWeight": "700" } }, "uni-h2": { "": { "fontSize": "60rpx", "fontWeight": "700" } }, "uni-h3": { "": { "fontSize": "48rpx", "fontWeight": "700" } }, "uni-h4": { "": { "fontSize": "36rpx", "fontWeight": "700" } }, "uni-h5": { "": { "fontSize": "28rpx", "color": "#8f8f94" } }, "uni-h6": { "": { "fontSize": "24rpx", "color": "#8f8f94" } }, "uni-bold": { "": { "fontWeight": "bold" } }, "uni-ellipsis": { "": { "overflow": "hidden", "whiteSpace": "nowrap", "textOverflow": "ellipsis" } }, "uni-btn-v": { "": { "paddingTop": "10rpx", "paddingRight": 0, "paddingBottom": "10rpx", "paddingLeft": 0 } }, "uni-form-item": { "": { "display": "flex", "width": 100, "paddingTop": "10rpx", "paddingRight": 0, "paddingBottom": "10rpx", "paddingLeft": 0 } }, "title": { ".uni-form-item ": { "paddingTop": "10rpx", "paddingRight": "25rpx", "paddingBottom": "10rpx", "paddingLeft": "25rpx" } }, "uni-label": { "": { "width": "210rpx", "wordWrap": "break-word", "wordBreak": "break-all", "textIndent": "20rpx" } }, "uni-input": { "": { "height": "50rpx", "paddingTop": "15rpx", "paddingRight": "25rpx", "paddingBottom": "15rpx", "paddingLeft": "25rpx", "lineHeight": "50rpx", "fontSize": "28rpx", "backgroundColor": "#FFFFFF", "flex": 1 } }, "with-fun": { ".uni-form-item ": { "display": "flex", "flexWrap": "nowrap", "backgroundColor": "#FFFFFF" } }, "uni-icon": { ".uni-form-item .with-fun ": { "width": 40, "height": "80rpx", "lineHeight": "80rpx", "flexShrink": 0 }, "": { "fontFamily": "uniicons", "fontSize": 24, "fontWeight": "normal", "fontStyle": "normal", "lineHeight": 1, "textDecoration": "none", "WebkitFontSmoothing": "antialiased" }, ".uni-active": { "color": "#007aff" } }, "uni-loadmore": { "": { "height": "80rpx", "lineHeight": "80rpx", "textAlign": "center", "paddingBottom": "30rpx" } }, "uni-badge": { ".uni-badge-inverted": { "paddingTop": 0, "paddingRight": 5, "paddingBottom": 0, "paddingLeft": 0, "color": "#929292", "backgroundColor": "rgba(0,0,0,0)" } }, "uni-badge-primary": { "": { "color": "#ffffff", "backgroundColor": "#007aff" }, ".uni-badge-inverted": { "color": "#007aff", "backgroundColor": "rgba(0,0,0,0)" } }, "uni-badge-blue": { ".uni-badge-inverted": { "color": "#007aff", "backgroundColor": "rgba(0,0,0,0)" } }, "uni-badge-green": { "": { "color": "#ffffff", "backgroundColor": "#4cd964" }, ".uni-badge-inverted": { "color": "#4cd964", "backgroundColor": "rgba(0,0,0,0)" } }, "uni-badge-success": { "": { "color": "#ffffff", "backgroundColor": "#4cd964" }, ".uni-badge-inverted": { "color": "#4cd964", "backgroundColor": "rgba(0,0,0,0)" } }, "uni-badge-warning": { "": { "color": "#ffffff", "backgroundColor": "#f0ad4e" }, ".uni-badge-inverted": { "color": "#f0ad4e", "backgroundColor": "rgba(0,0,0,0)" } }, "uni-badge-yellow": { "": { "color": "#ffffff", "backgroundColor": "#f0ad4e" }, ".uni-badge-inverted": { "color": "#f0ad4e", "backgroundColor": "rgba(0,0,0,0)" } }, "uni-badge-danger": { "": { "color": "#ffffff", "backgroundColor": "#dd524d" }, ".uni-badge-inverted": { "color": "#dd524d", "backgroundColor": "rgba(0,0,0,0)" } }, "uni-badge-red": { "": { "color": "#ffffff", "backgroundColor": "#dd524d" }, ".uni-badge-inverted": { "color": "#dd524d", "backgroundColor": "rgba(0,0,0,0)" } }, "uni-badge-purple": { "": { "color": "#ffffff", "backgroundColor": "#8a6de9" }, ".uni-badge-inverted": { "color": "#8a6de9", "backgroundColor": "rgba(0,0,0,0)" } }, "uni-badge-royal": { "": { "color": "#ffffff", "backgroundColor": "#8a6de9" }, ".uni-badge-inverted": { "color": "#8a6de9", "backgroundColor": "rgba(0,0,0,0)" } }, "uni-collapse-content": { "": { "height": 0, "width": 100, "overflow": "hidden" } }, "uni-card": { "": { "backgroundColor": "#ffffff", "borderRadius": "8rpx", "marginTop": "20rpx", "marginRight": 0, "marginBottom": "20rpx", "marginLeft": 0, "position": "relative" } }, "uni-card-content": { "": { "fontSize": "30rpx" }, ".image-view": { "width": 100, "marginTop": 0, "marginRight": 0, "marginBottom": 0, "marginLeft": 0 } }, "uni-card-content-inner": { "": { "position": "relative", "paddingTop": "30rpx", "paddingRight": "30rpx", "paddingBottom": "30rpx", "paddingLeft": "30rpx" } }, "uni-card-footer": { "": { "position": "relative", "display": "flex", "minHeight": "50rpx", "paddingTop": "20rpx", "paddingRight": "30rpx", "paddingBottom": "20rpx", "paddingLeft": "30rpx", "justifyContent": "space-between", "alignItems": "center", "color": "#6d6d72", "position:before": "absolute", "top:before": 0, "right:before": 0, "left:before": 0, "height:before": "2rpx", "content:before": "''", "WebkitTransform:before": "scaleY(.5)", "transform:before": "scaleY(.5)", "backgroundColor:before": "#c8c7cc" } }, "uni-card-header": { "": { "position": "relative", "display": "flex", "minHeight": "50rpx", "paddingTop": "20rpx", "paddingRight": "30rpx", "paddingBottom": "20rpx", "paddingLeft": "30rpx", "justifyContent": "space-between", "alignItems": "center", "fontSize": "36rpx", "position:before:after": "absolute", "top:before:after": 0, "right:before:after": 0, "left:before:after": 0, "height:before:after": "2rpx", "content:before:after": "''", "WebkitTransform:before:after": "scaleY(.5)", "transform:before:after": "scaleY(.5)", "backgroundColor:before:after": "#c8c7cc", "bottom:after": 0 } }, "uni-card-media": { "": { "justifyContent": "flex-start" } }, "uni-card-media-logo": { "": { "height": "84rpx", "width": "84rpx", "marginRight": "20rpx" } }, "uni-card-media-body": { "": { "height": "84rpx", "display": "flex", "flexDirection": "column", "justifyContent": "space-between", "alignItems": "flex-start" } }, "uni-card-media-text-top": { "": { "lineHeight": "36rpx", "fontSize": "34rpx" } }, "uni-card-media-text-bottom": { "": { "lineHeight": "30rpx", "fontSize": "28rpx", "color": "#8f8f94" } }, "uni-card-link": { "": { "color": "#007AFF" } }, "uni-list": { "": { "backgroundColor": "#FFFFFF", "position": "relative", "width": 100, "display": "flex", "flexDirection": "column", "position:after": "absolute", "zIndex:after": 10, "right:after": 0, "bottom:after": 0, "left:after": 0, "height:after": 1, "content:after": "''", "WebkitTransform:after": "scaleY(.5)", "transform:after": "scaleY(.5)", "backgroundColor:after": "#c8c7cc" }, ".uni-collapse": { "boxSizing": "border-box", "height": 0, "overflow": "hidden" } }, "uni-list-cell": { "": { "position": "relative", "display": "flex", "flexDirection": "row", "justifyContent": "space-between", "alignItems": "center", "position::after": "absolute", "zIndex::after": 3, "right::after": 0, "bottom::after": 0, "left::after": "30rpx", "height::after": 1, "content::after": "''", "WebkitTransform::after": "scaleY(.5)", "transform::after": "scaleY(.5)", "backgroundColor::after": "#c8c7cc" }, ".uni-list ": { "height:last-child::after": "0rpx" }, ".uni-collapse ": { "paddingLeft": "20rpx", "left::after": "52rpx" } }, "uni-list-cell-hover": { "": { "backgroundColor": "#eeeeee" } }, "uni-list-cell-pd": { "": { "paddingTop": "22rpx", "paddingRight": "30rpx", "paddingBottom": "22rpx", "paddingLeft": "30rpx" } }, "uni-list-cell-left": { "": { "whiteSpace": "nowrap", "fontSize": "28rpx", "paddingTop": 0, "paddingRight": "30rpx", "paddingBottom": 0, "paddingLeft": "30rpx" } }, "uni-list-cell-db": { "": { "flex": 1 } }, "uni-list-cell-right": { "": { "flex": 1 } }, "uni-list-cell-last": { ".uni-list-cell::after": { "height": "0rpx" } }, "uni-list-cell-divider": { "": { "position": "relative", "display": "flex", "color": "#999999", "backgroundColor": "#f7f7f7", "paddingTop": "15rpx", "paddingRight": "20rpx", "paddingBottom": "15rpx", "paddingLeft": "20rpx", "position::before": "absolute", "right::before": 0, "top::before": 0, "left::before": 0, "height::before": 1, "content::before": "''", "WebkitTransform::before": "scaleY(.5)", "transform::before": "scaleY(.5)", "backgroundColor::before": "#c8c7cc", "position::after": "absolute", "right::after": 0, "bottom::after": 0, "left::after": "0rpx", "height::after": 1, "content::after": "''", "WebkitTransform::after": "scaleY(.5)", "transform::after": "scaleY(.5)", "backgroundColor::after": "#c8c7cc" } }, "uni-list-cell-navigate": { "": { "fontSize": "30rpx", "paddingTop": "22rpx", "paddingRight": "36rpx", "paddingBottom": "22rpx", "paddingLeft": "30rpx", "lineHeight": "48rpx", "position": "relative", "display": "flex", "boxSizing": "border-box", "width": 100, "flex": 1, "justifyContent": "space-between", "alignItems": "center" }, ".uni-navigate-right:after": { "fontFamily": "uniicons", "content": "'\\e583'", "position": "absolute", "right": "24rpx", "top": 50, "color": "#bbbbbb", "WebkitTransform": "translateY(-50%)", "transform": "translateY(-50%)" }, ".uni-navigate-bottom:after": { "fontFamily": "uniicons", "content": "'\\e581'", "position": "absolute", "right": "24rpx", "top": 50, "color": "#bbbbbb", "WebkitTransform": "translateY(-50%)", "transform": "translateY(-50%)" }, ".uni-navigate-bottom.uni-active::after": { "fontFamily": "uniicons", "content": "'\\e580'", "position": "absolute", "right": "24rpx", "top": 50, "color": "#bbbbbb", "WebkitTransform": "translateY(-50%)", "transform": "translateY(-50%)" }, ".uni-active": { "backgroundColor": "#eeeeee" } }, "uni-navigate-badge": { "": { "paddingRight": "50rpx" } }, "uni-collapse": { ".uni-list-cell": { "flexDirection": "column" } }, "uni-triplex-row": { "": { "display": "flex", "flex": 1, "width": 100, "boxSizing": "border-box", "flexDirection": "row", "paddingTop": "22rpx", "paddingRight": "30rpx", "paddingBottom": "22rpx", "paddingLeft": "30rpx" } }, "uni-triplex-right": { "": { "display": "flex", "flexDirection": "column", "width": 16, "textAlign": "right" } }, "uni-triplex-left": { "": { "display": "flex", "flexDirection": "column", "width": 84 } }, "uni-media-list": { "": { "paddingTop": "22rpx", "paddingRight": "30rpx", "paddingBottom": "22rpx", "paddingLeft": "30rpx", "boxSizing": "border-box", "display": "flex", "width": 100, "flexDirection": "row" } }, "uni-navigate-right": { ".uni-media-list": { "paddingRight": "74rpx" } }, "uni-pull-right": { "": { "flexDirection": "row-reverse" } }, "uni-media-list-logo": { ".uni-pull-right>": { "marginRight": "0rpx", "marginLeft": "20rpx" }, "": { "height": "84rpx", "width": "84rpx", "marginRight": "20rpx" } }, "uni-media-list-body": { "": { "height": "84rpx", "display": "flex", "flex": 1, "flexDirection": "column", "justifyContent": "space-between", "alignItems": "flex-start", "overflow": "hidden" } }, "uni-media-list-text-top": { "": { "width": 100, "lineHeight": "36rpx", "fontSize": "30rpx" } }, "uni-media-list-text-bottom": { "": { "width": 100, "lineHeight": "30rpx", "fontSize": "26rpx", "color": "#8f8f94" } }, "uni-grid-9": { "": { "backgroundColor": "#f2f2f2", "width": "750rpx", "display": "flex", "flexDirection": "row", "flexWrap": "wrap", "borderTopWidth": "2rpx", "borderTopStyle": "solid", "borderTopColor": "#eeeeee" } }, "uni-grid-9-item": { "": { "width": "250rpx", "height": "200rpx", "display": "flex", "flexDirection": "column", "alignItems": "center", "justifyContent": "center", "borderBottomWidth": "2rpx", "borderBottomStyle": "solid", "borderBottomColor": "#000000", "borderRightWidth": "2rpx", "borderRightStyle": "solid", "borderRightColor": "#000000", "borderColor": "#eeeeee", "boxSizing": "border-box" } }, "no-border-right": { "": { "borderRightWidth": 0, "borderRightStyle": "solid" } }, "uni-grid-9-image": { "": { "width": "100rpx", "height": "100rpx" } }, "uni-grid-9-text": { "": { "width": "250rpx", "lineHeight": "4rpx", "height": "40rpx", "textAlign": "center", "fontSize": "30rpx" } }, "uni-grid-9-item-hover": { "": { "backgroundColor": "rgba(0,0,0,0.1)" } }, "uni-uploader": { "": { "flex": 1, "flexDirection": "column" } }, "uni-uploader-head": { "": { "display": "flex", "flexDirection": "row", "justifyContent": "space-between" } }, "uni-uploader-info": { "": { "color": "#B2B2B2" } }, "uni-uploader-body": { "": { "marginTop": "16rpx" } }, "uni-uploader__files": { "": { "display": "flex", "flexDirection": "row", "flexWrap": "wrap" } }, "uni-uploader__file": { "": { "marginTop": "10rpx", "marginRight": "10rpx", "marginBottom": "10rpx", "marginLeft": "10rpx", "width": "210rpx", "height": "210rpx" } }, "uni-uploader__img": { "": { "width": "210rpx", "height": "210rpx" } }, "uni-uploader__input-box": { "": { "position": "relative", "marginTop": "10rpx", "marginRight": "10rpx", "marginBottom": "10rpx", "marginLeft": "10rpx", "width": "208rpx", "height": "208rpx", "borderWidth": "2rpx", "borderStyle": "solid", "borderColor": "#D9D9D9", "content:before": '" "', "position:before": "absolute", "top:before": 50, "left:before": 50, "WebkitTransform:before": "translate(-50%, -50%)", "transform:before": "translate(-50%, -50%)", "backgroundColor:before": "#D9D9D9", "content:before:after": '" "', "position:before:after": "absolute", "top:before:after": 50, "left:before:after": 50, "WebkitTransform:before:after": "translate(-50%, -50%)", "transform:before:after": "translate(-50%, -50%)", "backgroundColor:before:after": "#D9D9D9", "width:before": "4rpx", "height:before": "79rpx", "width:after": "79rpx", "height:after": "4rpx", "borderColor:active": "#999999", "backgroundColor:active:before": "#999999", "backgroundColor:active:before:active:after": "#999999" } }, "uni-uploader__input": { "": { "position": "absolute", "zIndex": 1, "top": 0, "left": 0, "width": 100, "height": 100, "opacity": 0 } }, "feedback-title": { "": { "display": "flex", "flexDirection": "row", "justifyContent": "space-between", "alignItems": "center", "paddingTop": "20rpx", "paddingRight": "20rpx", "paddingBottom": "20rpx", "paddingLeft": "20rpx", "color": "#8f8f94", "fontSize": "28rpx" } }, "feedback-star-view": { ".feedback-title": { "justifyContent": "flex-start", "marginTop": 0, "marginRight": 0, "marginBottom": 0, "marginLeft": 0 }, "": { "marginLeft": "20rpx" } }, "feedback-quick": { "": { "position": "relative", "paddingRight": "40rpx", "fontFamily:after": "uniicons", "fontSize:after": "40rpx", "content:after": "'\\e581'", "position:after": "absolute", "right:after": 0, "top:after": 50, "color:after": "#bbbbbb", "WebkitTransform:after": "translateY(-50%)", "transform:after": "translateY(-50%)" } }, "feedback-body": { "": { "backgroundColor": "#ffffff" } }, "feedback-textare": { "": { "height": "200rpx", "fontSize": "34rpx", "lineHeight": "50rpx", "width": 100, "boxSizing": "border-box", "paddingTop": "20rpx", "paddingRight": "30rpx", "paddingBottom": 0, "paddingLeft": "30rpx" } }, "feedback-input": { "": { "fontSize": "34rpx", "height": "50rpx", "minHeight": "50rpx", "paddingTop": "15rpx", "paddingRight": "20rpx", "paddingBottom": "15rpx", "paddingLeft": "20rpx", "lineHeight": "50rpx" } }, "feedback-uploader": { "": { "paddingTop": "22rpx", "paddingRight": "20rpx", "paddingBottom": "22rpx", "paddingLeft": "20rpx" } }, "feedback-star": { "": { "fontFamily": "uniicons", "fontSize": "40rpx", "marginLeft": "6rpx", "content:after": "'\\e408'" }, ".active": { "color": "#FFB400" }, ".active:after": { "content": "'\\e438'" } }, "feedback-submit": { "": { "backgroundColor": "#007AFF", "color": "#FFFFFF", "marginTop": "20rpx", "marginRight": "20rpx", "marginBottom": "20rpx", "marginLeft": "20rpx" } }, "uni-input-group": { "": { "position": "relative", "paddingTop": 0, "paddingRight": 0, "paddingBottom": 0, "paddingLeft": 0, "borderWidth": 0, "borderStyle": "solid", "borderColor": "#000000", "backgroundColor": "#ffffff", "position:before": "absolute", "top:before": 0, "right:before": 0, "left:before": 0, "height:before": "2rpx", "content:before": "''", "transform:before": "scaleY(.5)", "backgroundColor:before": "#c8c7cc", "position:after": "absolute", "right:after": 0, "bottom:after": 0, "left:after": 0, "height:after": "2rpx", "content:after": "''", "transform:after": "scaleY(.5)", "backgroundColor:after": "#c8c7cc" } }, "uni-input-row": { "": { "position": "relative", "display": "flex", "flexDirection": "row", "fontSize": "28rpx", "paddingTop": "22rpx", "paddingRight": "30rpx", "paddingBottom": "22rpx", "paddingLeft": "30rpx", "justifyContent": "space-between" }, ".uni-input-group ": { "position:after": "absolute", "right:after": 0, "bottom:after": 0, "left:after": "30rpx", "height:after": "2rpx", "content:after": "''", "transform:after": "scaleY(.5)", "backgroundColor:after": "#c8c7cc" } }, "uni-textarea": { "": { "width": 100, "backgroundColor": "#FFFFFF" } }, "uni-tab-bar": { "": { "display": "flex", "flex": 1, "flexDirection": "column", "overflow": "hidden", "height": 100 } }, "list": { ".uni-tab-bar ": { "width": "750rpx", "height": 100 } }, "uni-swiper-tab": { "": { "width": 100, "whiteSpace": "nowrap", "lineHeight": "100rpx", "height": "100rpx", "borderBottomWidth": 1, "borderBottomStyle": "solid", "borderBottomColor": "#c8c7cc" } }, "swiper-tab-list": { "": { "fontSize": "30rpx", "width": "150rpx", "textAlign": "center", "color": "#555555" } }, "active": { ".uni-tab-bar ": { "color": "#007AFF" } }, "swiper-box": { ".uni-tab-bar ": { "flex": 1, "width": 100 } }, "uni-tab-bar-loading": { "": { "paddingTop": "20rpx", "paddingRight": 0, "paddingBottom": "20rpx", "paddingLeft": 0 } }, "uni-comment": { "": { "paddingTop": "5rpx", "paddingRight": 0, "paddingBottom": "5rpx", "paddingLeft": 0, "display": "flex", "flexGrow": 1, "flexDirection": "column" } }, "uni-comment-list": { "": { "flexWrap": "nowrap", "paddingTop": "10rpx", "paddingRight": 0, "paddingBottom": "10rpx", "paddingLeft": 0, "marginTop": "10rpx", "marginRight": 0, "marginBottom": "10rpx", "marginLeft": 0, "width": 100, "display": "flex" } }, "uni-comment-face": { "": { "width": "70rpx", "height": "70rpx", "borderRadius": 100, "marginRight": "20rpx", "flexShrink": 0, "overflow": "hidden" } }, "uni-comment-body": { "": { "width": 100 } }, "uni-comment-top": { "": { "lineHeight": 1.5, "justifyContent": "space-between" } }, "uni-comment-date": { "": { "lineHeight": "38rpx", "flexDirection": "row", "justifyContent": "space-between", "!display": "flex", "flexGrow": 1 } }, "uni-comment-content": { "": { "lineHeight": 1.6, "fontSize": "28rpx", "paddingTop": "8rpx", "paddingRight": 0, "paddingBottom": "8rpx", "paddingLeft": 0 } }, "uni-comment-replay-btn": { "": { "backgroundColor": "#FFFFFF", "fontSize": "24rpx", "lineHeight": "28rpx", "paddingTop": "5rpx", "paddingRight": "20rpx", "paddingBottom": "5rpx", "paddingLeft": "20rpx", "borderRadius": "30rpx", "!color": "#333333", "marginTop": 0, "marginRight": "10rpx", "marginBottom": 0, "marginLeft": "10rpx" } }, "uni-swiper-msg": { "": { "width": 100, "paddingTop": "12rpx", "paddingRight": 0, "paddingBottom": "12rpx", "paddingLeft": 0, "flexWrap": "nowrap", "display": "flex" } }, "uni-swiper-msg-icon": { "": { "width": "50rpx", "marginRight": "20rpx" } }, "uni-product-list": { "": { "display": "flex", "width": 100, "flexWrap": "wrap", "flexDirection": "row" } }, "uni-product": { "": { "paddingTop": "20rpx", "paddingRight": "20rpx", "paddingBottom": "20rpx", "paddingLeft": "20rpx", "display": "flex", "flexDirection": "column" } }, "image-view": { "": { "height": "330rpx", "width": "330rpx", "marginTop": "12rpx", "marginRight": 0, "marginBottom": "12rpx", "marginLeft": 0 } }, "uni-product-image": { "": { "height": "330rpx", "width": "330rpx" } }, "uni-product-title": { "": { "width": "300rpx", "wordBreak": "break-all", "overflow": "hidden", "lineHeight": 1.5, "textOverflow": "ellipsis", "WebkitBoxOrient": "vertical", "WebkitLineClamp": 2 } }, "uni-product-price": { "": { "marginTop": "10rpx", "fontSize": "28rpx", "lineHeight": 1.5, "position": "relative" } }, "uni-product-price-original": { "": { "color": "#e80080" } }, "uni-product-price-favour": { "": { "color": "#888888", "textDecoration": "line-through", "marginLeft": "10rpx" } }, "uni-product-tip": { "": { "position": "absolute", "right": "10rpx", "backgroundColor": "#ff3333", "color": "#ffffff", "paddingTop": 0, "paddingRight": "10rpx", "paddingBottom": 0, "paddingLeft": "10rpx", "borderRadius": "5rpx" } }, "uni-timeline": { "": { "marginTop": "35rpx", "marginRight": 0, "marginBottom": "35rpx", "marginLeft": 0, "display": "flex", "flexDirection": "column", "position": "relative" } }, "uni-timeline-item": { "": { "display": "flex", "flexDirection": "row", "position": "relative", "paddingBottom": "20rpx", "boxSizing": "border-box", "overflow": "hidden" } }, "uni-timeline-item-keynode": { ".uni-timeline-item ": { "width": "160rpx", "flexShrink": 0, "boxSizing": "border-box", "paddingRight": "20rpx", "textAlign": "right", "lineHeight": "65rpx" } }, "uni-timeline-item-divider": { ".uni-timeline-item ": { "flexShrink": 0, "position": "relative", "width": "30rpx", "height": "30rpx", "top": "15rpx", "borderRadius": 50, "backgroundColor": "#bbbbbb" }, "": { "position::before::after": "absolute", "left::before::after": "15rpx", "width::before::after": "1rpx", "height::before::after": 100, "content::before::after": "''", "bottom::before": 100, "top::after": 100, "position::before": "absolute", "left::before": "15rpx", "width::before": "1rpx", "height::before": 100, "content::before": "''" }, ".uni-timeline-last-item ": { "backgroundColor": "#1AAD19" } }, "uni-timeline-item-content": { ".uni-timeline-item ": { "paddingLeft": "20rpx" } }, "datetime": { ".uni-timeline-item-content ": { "color": "#CCCCCC" } }, "uni-icon-contact": { "": { "content:before": "'\\e100'" } }, "uni-icon-person": { "": { "content:before": "'\\e101'" } }, "uni-icon-personadd": { "": { "content:before": "'\\e102'" } }, "uni-icon-contact-filled": { "": { "content:before": "'\\e130'" } }, "uni-icon-person-filled": { "": { "content:before": "'\\e131'" } }, "uni-icon-personadd-filled": { "": { "content:before": "'\\e132'" } }, "uni-icon-phone": { "": { "content:before": "'\\e200'" } }, "uni-icon-email": { "": { "content:before": "'\\e201'" } }, "uni-icon-chatbubble": { "": { "content:before": "'\\e202'" } }, "uni-icon-chatboxes": { "": { "content:before": "'\\e203'" } }, "uni-icon-phone-filled": { "": { "content:before": "'\\e230'" } }, "uni-icon-email-filled": { "": { "content:before": "'\\e231'" } }, "uni-icon-chatbubble-filled": { "": { "content:before": "'\\e232'" } }, "uni-icon-chatboxes-filled": { "": { "content:before": "'\\e233'" } }, "uni-icon-weibo": { "": { "content:before": "'\\e260'" } }, "uni-icon-weixin": { "": { "content:before": "'\\e261'" } }, "uni-icon-pengyouquan": { "": { "content:before": "'\\e262'" } }, "uni-icon-chat": { "": { "content:before": "'\\e263'" } }, "uni-icon-qq": { "": { "content:before": "'\\e264'" } }, "uni-icon-videocam": { "": { "content:before": "'\\e300'" } }, "uni-icon-camera": { "": { "content:before": "'\\e301'" } }, "uni-icon-mic": { "": { "content:before": "'\\e302'" } }, "uni-icon-location": { "": { "content:before": "'\\e303'" } }, "uni-icon-mic-filled": { "": { "content:before:before": "'\\e332'", "content:before": "'\\e332'" } }, "uni-icon-speech": { "": { "content:before:before": "'\\e332'" } }, "uni-icon-location-filled": { "": { "content:before": "'\\e333'" } }, "uni-icon-micoff": { "": { "content:before": "'\\e360'" } }, "uni-icon-image": { "": { "content:before": "'\\e363'" } }, "uni-icon-map": { "": { "content:before": "'\\e364'" } }, "uni-icon-compose": { "": { "content:before": "'\\e400'" } }, "uni-icon-trash": { "": { "content:before": "'\\e401'" } }, "uni-icon-upload": { "": { "content:before": "'\\e402'" } }, "uni-icon-download": { "": { "content:before": "'\\e403'" } }, "uni-icon-close": { "": { "content:before": "'\\e404'" } }, "uni-icon-redo": { "": { "content:before": "'\\e405'" } }, "uni-icon-undo": { "": { "content:before": "'\\e406'" } }, "uni-icon-refresh": { "": { "content:before": "'\\e407'" } }, "uni-icon-star": { "": { "content:before": "'\\e408'" } }, "uni-icon-plus": { "": { "content:before": "'\\e409'" } }, "uni-icon-minus": { "": { "content:before": "'\\e410'" } }, "uni-icon-circle": { "": { "content:before:before": "'\\e411'", "content:before": "'\\e411'" } }, "uni-icon-checkbox": { "": { "content:before:before": "'\\e411'" } }, "uni-icon-close-filled": { "": { "content:before:before": "'\\e434'", "content:before": "'\\e434'" } }, "uni-icon-clear": { "": { "content:before:before": "'\\e434'" } }, "uni-icon-refresh-filled": { "": { "content:before": "'\\e437'" } }, "uni-icon-star-filled": { "": { "content:before": "'\\e438'" } }, "uni-icon-plus-filled": { "": { "content:before": "'\\e439'" } }, "uni-icon-minus-filled": { "": { "content:before": "'\\e440'" } }, "uni-icon-circle-filled": { "": { "content:before": "'\\e441'" } }, "uni-icon-checkbox-filled": { "": { "content:before": "'\\e442'" } }, "uni-icon-closeempty": { "": { "content:before": "'\\e460'" } }, "uni-icon-refreshempty": { "": { "content:before": "'\\e461'" } }, "uni-icon-reload": { "": { "content:before": "'\\e462'" } }, "uni-icon-starhalf": { "": { "content:before": "'\\e463'" } }, "uni-icon-spinner": { "": { "content:before": "'\\e464'" } }, "uni-icon-spinner-cycle": { "": { "content:before": "'\\e465'" } }, "uni-icon-search": { "": { "content:before": "'\\e466'" } }, "uni-icon-plusempty": { "": { "content:before": "'\\e468'" } }, "uni-icon-forward": { "": { "content:before": "'\\e470'" } }, "uni-icon-back": { "": { "content:before:before": "'\\e471'", "content:before": "'\\e471'" } }, "uni-icon-left-nav": { "": { "content:before:before": "'\\e471'" } }, "uni-icon-checkmarkempty": { "": { "content:before": "'\\e472'" } }, "uni-icon-home": { "": { "content:before": "'\\e500'" } }, "uni-icon-navigate": { "": { "content:before": "'\\e501'" } }, "uni-icon-gear": { "": { "content:before": "'\\e502'" } }, "uni-icon-paperplane": { "": { "content:before": "'\\e503'" } }, "uni-icon-info": { "": { "content:before": "'\\e504'" } }, "uni-icon-help": { "": { "content:before": "'\\e505'" } }, "uni-icon-locked": { "": { "content:before": "'\\e506'" } }, "uni-icon-more": { "": { "content:before": "'\\e507'" } }, "uni-icon-flag": { "": { "content:before": "'\\e508'" } }, "uni-icon-home-filled": { "": { "content:before": "'\\e530'" } }, "uni-icon-gear-filled": { "": { "content:before": "'\\e532'" } }, "uni-icon-info-filled": { "": { "content:before": "'\\e534'" } }, "uni-icon-help-filled": { "": { "content:before": "'\\e535'" } }, "uni-icon-more-filled": { "": { "content:before": "'\\e537'" } }, "uni-icon-settings": { "": { "content:before": "'\\e560'" } }, "uni-icon-list": { "": { "content:before": "'\\e562'" } }, "uni-icon-bars": { "": { "content:before": "'\\e563'" } }, "uni-icon-loop": { "": { "content:before": "'\\e565'" } }, "uni-icon-paperclip": { "": { "content:before": "'\\e567'" } }, "uni-icon-eye": { "": { "content:before": "'\\e568'" } }, "uni-icon-arrowup": { "": { "content:before": "'\\e580'" } }, "uni-icon-arrowdown": { "": { "content:before": "'\\e581'" } }, "uni-icon-arrowleft": { "": { "content:before": "'\\e582'" } }, "uni-icon-arrowright": { "": { "content:before": "'\\e583'" } }, "uni-icon-arrowthinup": { "": { "content:before": "'\\e584'" } }, "uni-icon-arrowthindown": { "": { "content:before": "'\\e585'" } }, "uni-icon-arrowthinleft": { "": { "content:before": "'\\e586'" } }, "uni-icon-arrowthinright": { "": { "content:before": "'\\e587'" } }, "uni-icon-pulldown": { "": { "content:before": "'\\e588'" } }, "uni-icon-scan": { "": { "content:before": '"\\e612"' } }, "uni-divider": { "": { "height": "110rpx", "display": "flex", "alignItems": "center", "justifyContent": "center", "position": "relative" } }, "uni-divider__content": { "": { "fontSize": "28rpx", "color": "#999999", "paddingTop": 0, "paddingRight": "20rpx", "paddingBottom": 0, "paddingLeft": "20rpx", "position": "relative", "zIndex": 101, "backgroundColor": "#F4F5F6" } }, "uni-divider__line": { "": { "backgroundColor": "#CCCCCC", "height": 1, "width": 100, "position": "absolute", "zIndex": 100, "top": 50, "left": 0, "transform": "translateY(50%)" } }, "@FONT-FACE": [{ "fontFamily": "uniicons", "fontWeight": "normal", "fontStyle": "normal", "src": "url('__VITE_ASSET__173d2b94__') format('truetype')" }] }; +exports.styles = [_style_0]; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/app.js b/fe/PDA/unpackage/dist/dev/.nvue/app.js new file mode 100644 index 000000000..85842c433 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/app.js @@ -0,0 +1,74 @@ +Promise.resolve("./pages/tabBar/component/component.js").then(() => { +}); +Promise.resolve("./pages/tabBar/API/API.js").then(() => { +}); +Promise.resolve("./pages/tabBar/template/template.js").then(() => { +}); +Promise.resolve("./pages/tabBar/extUI/extUI.js").then(() => { +}); +Promise.resolve("./pages/component/cover-view/cover-view.js").then(() => { +}); +Promise.resolve("./pages/component/input/input.js").then(() => { +}); +Promise.resolve("./pages/component/video/video.js").then(() => { +}); +Promise.resolve("./pages/component/map/map.js").then(() => { +}); +Promise.resolve("./pages/API/map/map.js").then(() => { +}); +Promise.resolve("./pages/API/map-search/map-search.js").then(() => { +}); +Promise.resolve("./pages/extUI/countdown/countdown.js").then(() => { +}); +Promise.resolve("./pages/extUI/icons/icons.js").then(() => { +}); +Promise.resolve("./pages/extUI/load-more/load-more.js").then(() => { +}); +Promise.resolve("./pages/extUI/nav-bar/nav-bar.js").then(() => { +}); +Promise.resolve("./pages/extUI/number-box/number-box.js").then(() => { +}); +Promise.resolve("./pages/extUI/tag/tag.js").then(() => { +}); +Promise.resolve("./pages/extUI/list/list.js").then(() => { +}); +Promise.resolve("./pages/extUI/card/card.js").then(() => { +}); +Promise.resolve("./pages/extUI/swiper-dot/swiper-dot.js").then(() => { +}); +Promise.resolve("./pages/extUI/grid/grid.js").then(() => { +}); +Promise.resolve("./pages/extUI/rate/rate.js").then(() => { +}); +Promise.resolve("./pages/extUI/calendar/calendar.js").then(() => { +}); +Promise.resolve("./pages/extUI/indexed-list/indexed-list.js").then(() => { +}); +Promise.resolve("./pages/extUI/goods-nav/goods-nav.js").then(() => { +}); +Promise.resolve("./pages/extUI/data-picker/data-picker.js").then(() => { +}); +Promise.resolve("./pages/extUI/space/space.js").then(() => { +}); +Promise.resolve("./pages/extUI/font/font.js").then(() => { +}); +Promise.resolve("./pages/extUI/color/color.js").then(() => { +}); +Promise.resolve("./pages/extUI/radius/radius.js").then(() => { +}); +Promise.resolve("./pages/template/tabbar/tabbar.js").then(() => { +}); +Promise.resolve("./pages/template/swiper-vertical/swiper-vertical.js").then(() => { +}); +Promise.resolve("./pages/template/swiper-list/swiper-list.js").then(() => { +}); +Promise.resolve("./pages/template/swiper-list-nvue/swiper-list-nvue.js").then(() => { +}); +Promise.resolve("./pages/API/subnvue/subnvue/drawer.js").then(() => { +}); +Promise.resolve("./pages/API/subnvue/subnvue/popup.js").then(() => { +}); +Promise.resolve("./pages/API/subnvue/subnvue/video-mask.js").then(() => { +}); +Promise.resolve("./app.css.js").then(() => { +}); diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/API/map-search/map-search.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/API/map-search/map-search.js new file mode 100644 index 000000000..dc0ba6ac9 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/API/map-search/map-search.js @@ -0,0 +1,116 @@ +import { f as formatAppLog } from "../../../uni-shared.es.js"; +import { resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, createTextVNode } from "vue"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import "../../../shared.esm-bundler.js"; +var _style_0 = { "content": { "": { "flex": 1 } }, "map": { "": { "width": "750rpx", "height": "500rpx", "backgroundColor": "#000000" } }, "scrollview": { "": { "flex": 1 } }, "button": { "": { "marginTop": "30rpx", "marginBottom": "20rpx" } } }; +let mapSearch = weex.requireModule("mapSearch"); +const _sfc_main = { + data() { + return { + markers: [{ + id: "1", + latitude: 39.908692, + longitude: 116.397477, + title: "\u5929\u5B89\u95E8", + zIndex: "1", + iconPath: "/static/gps.png", + width: 20, + height: 20, + anchor: { + x: 0.5, + y: 1 + }, + callout: { + content: "\u9996\u90FD\u5317\u4EAC\n\u5929\u5B89\u95E8", + color: "#00BFFF", + fontSize: 12, + borderRadius: 2, + borderWidth: 0, + borderColor: "#333300", + bgColor: "#CCFF11", + padding: "1", + display: "ALWAYS" + } + }] + }; + }, + methods: { + selectPoint(e) { + formatAppLog("log", "at pages/API/map-search/map-search.nvue:46", e); + }, + reverseGeocode() { + var point = this.markers[0]; + mapSearch.reverseGeocode({ + point: { + latitude: point.latitude, + longitude: point.longitude + } + }, (ret) => { + formatAppLog("log", "at pages/API/map-search/map-search.nvue:56", JSON.stringify(ret)); + uni.showModal({ + content: JSON.stringify(ret) + }); + }); + }, + poiSearchNearBy() { + var point = this.markers[0]; + mapSearch.poiSearchNearBy({ + point: { + latitude: point.latitude, + longitude: point.longitude + }, + key: "\u505C\u8F66\u573A", + radius: 1e3 + }, (ret) => { + formatAppLog("log", "at pages/API/map-search/map-search.nvue:72", ret); + uni.showModal({ + content: JSON.stringify(ret) + }); + }); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_button = resolveComponent("button"); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "content" }, [ + createElementVNode("map", { + class: "map", + ref: "dcmap", + markers: $data.markers, + onTap: _cache[0] || (_cache[0] = (...args) => $options.selectPoint && $options.selectPoint(...args)) + }, null, 40, ["markers"]), + createElementVNode("scroll-view", { + class: "scrollview", + scrollY: "true" + }, [ + createVNode(_component_button, { + class: "button", + onClick: $options.reverseGeocode + }, { + default: withCtx(() => [ + createTextVNode("reverseGeocode") + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "button", + onClick: $options.poiSearchNearBy + }, { + default: withCtx(() => [ + createTextVNode("poiSearchNearBy") + ]), + _: 1 + }, 8, ["onClick"]) + ]) + ]) + ]); +} +var mapSearch$1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/API/map-search/map-search.nvue"]]); +export { mapSearch$1 as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/API/map/map.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/API/map/map.js new file mode 100644 index 000000000..e7dde62de --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/API/map/map.js @@ -0,0 +1,504 @@ +import { f as formatAppLog } from "../../../uni-shared.es.js"; +import { resolveComponent, openBlock, createElementBlock, createElementVNode, createCommentVNode, createVNode, withCtx, createTextVNode } from "vue"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import "../../../shared.esm-bundler.js"; +var _style_0 = { "content": { "": { "flex": 1 } }, "map": { "": { "width": "750rpx", "height": 250, "backgroundColor": "#f0f0f0" } }, "scrollview": { "": { "flex": 1, "paddingTop": 10, "paddingRight": 10, "paddingBottom": 10, "paddingLeft": 10 } }, "list-item": { "": { "flexDirection": "row", "flexWrap": "nowrap", "alignItems": "center", "paddingTop": 5, "paddingRight": 0, "paddingBottom": 5, "paddingLeft": 0 } }, "list-text": { "": { "flex": 1 } }, "button": { "": { "marginTop": 5, "marginBottom": 5 } } }; +const testMarkers = [ + { + id: 0, + latitude: 39.989631, + longitude: 116.481018, + title: "\u65B9\u6052\u56FD\u9645 \u961C\u901A\u4E1C\u5927\u88576\u53F7", + zIndex: "1", + rotate: 0, + width: 20, + height: 20, + anchor: { + x: 0.5, + y: 1 + }, + callout: { + content: "\u65B9\u6052\u56FD\u9645 \u961C\u901A\u4E1C\u5927\u88576\u53F7", + color: "#00BFFF", + fontSize: 10, + borderRadius: 4, + borderWidth: 1, + borderColor: "#333300", + bgColor: "#CCFF99", + padding: "5", + display: "ALWAYS" + } + }, + { + id: 1, + latitude: 39.908692, + longitude: 116.397477, + title: "\u5929\u5B89\u95E8", + zIndex: "1", + iconPath: "/static/location.png", + width: 40, + height: 40, + anchor: { + x: 0.5, + y: 1 + }, + callout: { + content: "\u9996\u90FD\u5317\u4EAC\n\u5929\u5B89\u95E8", + color: "#00BFFF", + fontSize: 12, + borderRadius: 2, + borderWidth: 0, + borderColor: "#333300", + bgColor: "#CCFF11", + padding: "1", + display: "ALWAYS" + } + } +]; +const testPolyline = [ + { + points: [ + { + latitude: 39.925539, + longitude: 116.279037 + }, + { + latitude: 39.925539, + longitude: 116.520285 + } + ], + color: "#FFCCFF", + width: 7, + dottedLine: true, + arrowLine: true, + borderColor: "#000000", + borderWidth: 2 + }, + { + points: [ + { + latitude: 39.938698, + longitude: 116.275177 + }, + { + latitude: 39.966069, + longitude: 116.289253 + }, + { + latitude: 39.944226, + longitude: 116.306076 + }, + { + latitude: 39.966069, + longitude: 116.322899 + }, + { + latitude: 39.938698, + longitude: 116.336975 + } + ], + color: "#CCFFFF", + width: 5, + dottedLine: true, + arrowLine: true, + borderColor: "#CC0000", + borderWidth: 3 + } +]; +const testPolygons = [ + { + points: [ + { + latitude: 39.781892, + longitude: 116.293413 + }, + { + latitude: 39.7876, + longitude: 116.391842 + }, + { + latitude: 39.733187, + longitude: 116.417932 + }, + { + latitude: 39.704653, + longitude: 116.338255 + } + ], + fillColor: "#FFCCFF", + strokeWidth: 3, + strokeColor: "#CC99CC", + zIndex: 11 + }, + { + points: [ + { + latitude: 39.8876, + longitude: 116.518932 + }, + { + latitude: 39.781892, + longitude: 116.518932 + }, + { + latitude: 39.781892, + longitude: 116.428932 + }, + { + latitude: 39.8876, + longitude: 116.428932 + } + ], + fillColor: "#CCFFFF", + strokeWidth: 5, + strokeColor: "#CC0000", + zIndex: 3 + } +]; +const testCircles = [ + { + latitude: 39.996441, + longitude: 116.411146, + radius: 15e3, + strokeWidth: 5, + color: "#CCFFFF", + fillColor: "#CC0000" + }, + { + latitude: 40.096441, + longitude: 116.511146, + radius: 12e3, + strokeWidth: 3, + color: "#CCFFFF", + fillColor: "#FFCCFF" + }, + { + latitude: 39.896441, + longitude: 116.311146, + radius: 9e3, + strokeWidth: 1, + color: "#CCFFFF", + fillColor: "#CC0000" + } +]; +const testIncludePoints = [ + { + latitude: 39.989631, + longitude: 116.481018 + }, + { + latitude: 39.908692, + longitude: 116.397477 + } +]; +const _sfc_main = { + data() { + return { + location: { + longitude: 116.397477, + latitude: 39.908692 + }, + controls: [{ + id: 1, + position: { + left: 5, + top: 180, + width: 30, + height: 30 + }, + iconPath: "/static/logo.png", + clickable: true + }], + showLocation: false, + scale: 13, + showCompass: true, + enable3D: true, + enableOverlooking: true, + enableZoom: true, + enableScroll: true, + enableRotate: true, + enableSatellite: false, + enableTraffic: false, + polyline: [], + markers: [], + polygons: [], + circles: [], + includePoints: [], + rotate: 0, + skew: 0 + }; + }, + onLoad() { + }, + onReady() { + this.map = uni.createMapContext("map1", this); + }, + methods: { + changeScale() { + this.scale = this.scale == 9 ? 15 : 9; + }, + changeRotate() { + this.rotate = this.rotate == 90 ? 0 : 90; + }, + changeSkew() { + this.skew = this.skew == 30 ? 0 : 30; + }, + enableThreeD(e) { + this.enable3D = e.detail.value; + }, + changeShowCompass(e) { + this.showCompass = e.detail.value; + }, + changeEnableOverlooking(e) { + this.enableOverlooking = e.detail.value; + }, + changeEnableZoom(e) { + this.enableZoom = e.detail.value; + }, + changeEnableScroll(e) { + this.enableScroll = e.detail.value; + }, + changeEnableRotate(e) { + this.enableRotate = e.detail.value; + }, + changeEnableSatellite(e) { + this.enableSatellite = e.detail.value; + }, + changeEnableTraffic(e) { + this.enableTraffic = e.detail.value; + }, + addMarkers() { + this.markers = testMarkers; + }, + addPolyline() { + this.polyline = testPolyline; + }, + addPolygons() { + this.polygons = testPolygons; + }, + addCircles() { + this.circles = testCircles; + }, + includePoint() { + this.includePoints = testIncludePoints; + }, + handleGetCenterLocation() { + this.map.getCenterLocation({ + success: (ret) => { + formatAppLog("log", "at pages/API/map/map.nvue:341", JSON.stringify(ret)); + uni.showModal({ + content: JSON.stringify(ret) + }); + } + }); + }, + handleGetRegion() { + this.map.getRegion({ + success: (ret) => { + formatAppLog("log", "at pages/API/map/map.nvue:351", JSON.stringify(ret)); + uni.showModal({ + content: JSON.stringify(ret) + }); + } + }); + }, + handleTranslateMarker() { + this.map.translateMarker({ + markerId: 1, + destination: { + latitude: 39.989631, + longitude: 116.481018 + }, + duration: 2e3 + }, (ret) => { + formatAppLog("log", "at pages/API/map/map.nvue:368", JSON.stringify(ret)); + uni.showModal({ + content: JSON.stringify(ret) + }); + }); + }, + maptap(e) { + uni.showModal({ + content: JSON.stringify(e) + }); + }, + onmarkertap(e) { + uni.showModal({ + content: JSON.stringify(e) + }); + }, + oncontroltap(e) { + uni.showModal({ + content: JSON.stringify(e) + }); + }, + oncallouttap(e) { + uni.showModal({ + content: JSON.stringify(e) + }); + }, + onupdated(e) { + formatAppLog("log", "at pages/API/map/map.nvue:396", JSON.stringify(e)); + }, + onregionchange(e) { + formatAppLog("log", "at pages/API/map/map.nvue:399", JSON.stringify(e)); + }, + onpoitap(e) { + uni.showModal({ + content: JSON.stringify(e) + }); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_button = resolveComponent("button"); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "content" }, [ + createElementVNode("map", { + class: "map", + id: "map1", + ref: "map1", + controls: $data.controls, + scale: $data.scale, + longitude: $data.location.longitude, + latitude: $data.location.latitude, + showLocation: $data.showLocation, + enable3D: $data.enable3D, + rotate: $data.rotate, + skew: $data.skew, + showCompass: $data.showCompass, + enableOverlooking: $data.enableOverlooking, + enableZoom: $data.enableZoom, + enableScroll: $data.enableScroll, + enableRotate: $data.enableRotate, + enableSatellite: $data.enableSatellite, + enableTraffic: $data.enableTraffic, + markers: $data.markers, + polyline: $data.polyline, + circles: $data.circles, + polygons: $data.polygons, + includePoints: $data.includePoints, + onTap: _cache[0] || (_cache[0] = (...args) => $options.maptap && $options.maptap(...args)), + onControltap: _cache[1] || (_cache[1] = (...args) => $options.oncontroltap && $options.oncontroltap(...args)), + onMarkertap: _cache[2] || (_cache[2] = (...args) => $options.onmarkertap && $options.onmarkertap(...args)), + onCallouttap: _cache[3] || (_cache[3] = (...args) => $options.oncallouttap && $options.oncallouttap(...args)), + onPoitap: _cache[4] || (_cache[4] = (...args) => $options.onpoitap && $options.onpoitap(...args)), + onUpdated: _cache[5] || (_cache[5] = (...args) => $options.onupdated && $options.onupdated(...args)), + onRegionchange: _cache[6] || (_cache[6] = (...args) => $options.onregionchange && $options.onregionchange(...args)) + }, null, 40, ["controls", "scale", "longitude", "latitude", "showLocation", "enable3D", "rotate", "skew", "showCompass", "enableOverlooking", "enableZoom", "enableScroll", "enableRotate", "enableSatellite", "enableTraffic", "markers", "polyline", "circles", "polygons", "includePoints"]), + createElementVNode("scroll-view", { + class: "scrollview", + scrollY: "true" + }, [ + createCommentVNode(' \n \u663E\u793A3D\u697C\u5757\n \n \n \n \u663E\u793A\u6307\u5357\u9488\n \n \n \n \u5F00\u542F\u4FEF\u89C6\n \n \n \n \u662F\u5426\u652F\u6301\u7F29\u653E\n \n \n \n \u662F\u5426\u652F\u6301\u62D6\u52A8\n \n \n \n \u662F\u5426\u652F\u6301\u65CB\u8F6C\n \n \n \n \u662F\u5426\u5F00\u542F\u536B\u661F\u56FE\n \n \n \n \u662F\u5426\u5F00\u542F\u5B9E\u65F6\u8DEF\u51B5\n \n '), + createVNode(_component_button, { + class: "button", + onClick: $options.changeScale + }, { + default: withCtx(() => [ + createTextVNode("changeScale") + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "button", + onClick: $options.changeRotate + }, { + default: withCtx(() => [ + createTextVNode("changeRotate") + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "button", + onClick: $options.changeSkew + }, { + default: withCtx(() => [ + createTextVNode("skew") + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "button", + onClick: $options.addMarkers + }, { + default: withCtx(() => [ + createTextVNode("addMarkers") + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "button", + onClick: $options.addPolyline + }, { + default: withCtx(() => [ + createTextVNode("addPolyline") + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "button", + onClick: $options.addPolygons + }, { + default: withCtx(() => [ + createTextVNode("addPolygons") + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "button", + onClick: $options.addCircles + }, { + default: withCtx(() => [ + createTextVNode("addCircles") + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "button", + onClick: $options.includePoint + }, { + default: withCtx(() => [ + createTextVNode("includePoints") + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "button", + onClick: $options.handleGetCenterLocation + }, { + default: withCtx(() => [ + createTextVNode("getCenterLocation") + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "button", + onClick: $options.handleGetRegion + }, { + default: withCtx(() => [ + createTextVNode("getRegion") + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "button", + onClick: $options.handleTranslateMarker + }, { + default: withCtx(() => [ + createTextVNode("translateMarker") + ]), + _: 1 + }, 8, ["onClick"]) + ]) + ]) + ]); +} +var map = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/API/map/map.nvue"]]); +export { map as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/API/subnvue/subnvue/drawer.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/API/subnvue/subnvue/drawer.js new file mode 100644 index 000000000..03e025f3e --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/API/subnvue/subnvue/drawer.js @@ -0,0 +1,73 @@ +import { g as getCurrentSubNVue } from "../../../../uni-app.es.js"; +import { openBlock, createElementBlock, createElementVNode, Fragment, renderList, toDisplayString } from "vue"; +import { _ as _export_sfc } from "../../../../plugin-vue_export-helper.js"; +import "../../../../shared.esm-bundler.js"; +var _style_0 = { "wrapper": { "": { "flexDirection": "column", "flex": 1, "textAlign": "center", "paddingTop": "60rpx", "paddingRight": "0rpx", "paddingBottom": "0rpx", "paddingLeft": "20rpx", "backgroundColor": "#F4F5F6" } }, "nav-text": { "": { "color": "#8f8f94", "marginBottom": "40rpx" } }, "list-wrapper": { "": { "height": "450rpx" } }, "text-wrapper": { "": { "justifyContent": "center", "borderBottomStyle": "solid", "borderBottomWidth": "1rpx", "borderBottomColor": "rgba(0,0,0,0.2)", "marginBottom": "35rpx", "paddingBottom": "15rpx" } }, "close-drawer": { "": { "backgroundColor": "#f8f8f8", "width": "300rpx", "paddingTop": "15rpx", "paddingRight": "15rpx", "paddingBottom": "15rpx", "paddingLeft": "15rpx", "borderRadius": "20rpx", "borderStyle": "solid", "borderWidth": "1rpx", "borderColor": "rgba(0,0,0,0.2)" } }, "icon": { "": { "position": "absolute", "right": "10rpx", "color": "#000000", "fontFamily": "unibtn", "fontSize": "30rpx", "fontWeight": "400" } } }; +const _sfc_main = { + data() { + return { + lists: [] + }; + }, + beforeCreate() { + const domModule = weex.requireModule("dom"); + domModule.addRule("fontFace", { + fontFamily: "unibtn", + "src": "url('../../../../static/uni.ttf')" + }); + }, + created() { + for (let i = 0; i < 5; i++) { + this.lists.push({ + id: i, + name: "Item" + i + }); + } + }, + methods: { + hideDrawer() { + getCurrentSubNVue().hide("auto"); + }, + clickitem(e) { + uni.$emit("drawer-page", e); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("div", { class: "wrapper" }, [ + createElementVNode("u-text", { class: "nav-text" }, "\u5DE6\u4FA7\u5217\u8868"), + createElementVNode("list", { class: "list-wrapper" }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.lists, (item) => { + return openBlock(), createElementBlock("cell", { + key: item.id + }, [ + createElementVNode("div", { + class: "text-wrapper", + onClick: ($event) => $options.clickitem(item.id) + }, [ + createElementVNode("u-text", { style: { "font-size": "30rpx" } }, toDisplayString(item.name), 1), + createElementVNode("u-text", { class: "icon" }, "\uE583") + ], 8, ["onClick"]) + ]); + }), 128)) + ]), + createElementVNode("div", { style: { "flex": "1", "text-align": "center" } }, [ + createElementVNode("div", { + class: "close-drawer", + onClick: _cache[0] || (_cache[0] = (...args) => $options.hideDrawer && $options.hideDrawer(...args)) + }, [ + createElementVNode("u-text", { style: { "font-size": "34rpx", "text-align": "center" } }, "\u5173\u95ED\u62BD\u5C49") + ]) + ]) + ]) + ]); +} +var drawer = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/API/subnvue/subnvue/drawer.nvue"]]); +export { drawer as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/API/subnvue/subnvue/popup.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/API/subnvue/subnvue/popup.js new file mode 100644 index 000000000..075f40a3d --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/API/subnvue/subnvue/popup.js @@ -0,0 +1,80 @@ +import { g as getCurrentSubNVue } from "../../../../uni-app.es.js"; +import { openBlock, createElementBlock, createElementVNode, toDisplayString, Fragment, renderList } from "vue"; +import { _ as _export_sfc } from "../../../../plugin-vue_export-helper.js"; +import "../../../../shared.esm-bundler.js"; +var _style_0 = { "wrapper": { "": { "flexDirection": "column", "justifyContent": "space-between", "paddingTop": "10rpx", "paddingRight": "15rpx", "paddingBottom": "10rpx", "paddingLeft": "15rpx", "backgroundColor": "#F4F5F6", "borderRadius": "4rpx" } }, "title": { "": { "height": "100rpx", "lineHeight": "100rpx", "borderBottomStyle": "solid", "borderBottomWidth": "1rpx", "borderBottomColor": "#CBCBCB", "flex": 0, "fontSize": "30rpx" } }, "scroller": { "": { "height": "400rpx", "paddingTop": "8rpx", "paddingRight": "15rpx", "paddingBottom": "8rpx", "paddingLeft": "15rpx" } }, "content": { "": { "color": "#555555", "fontSize": "32rpx" } }, "message-wrapper": { "": { "flex": 0, "borderTopStyle": "solid", "borderTopWidth": "1rpx", "borderTopColor": "#CBCBCB", "height": "80rpx", "alignItems": "flex-end" } }, "send-message": { "": { "fontSize": "30rpx", "lineHeight": "80rpx", "color": "#00CE47", "marginLeft": "20rpx" } }, "cell": { "": { "marginTop": "10rpx", "marginRight": "10rpx", "marginBottom": "10rpx", "marginLeft": "10rpx", "paddingTop": "20rpx", "paddingRight": 0, "paddingBottom": "20rpx", "paddingLeft": 0, "top": "10rpx", "alignItems": "center", "justifyContent": "center", "borderRadius": "10rpx", "backgroundColor": "#5989B9" } }, "text": { "": { "fontSize": "30rpx", "textAlign": "center", "color": "#FFFFFF" } } }; +const _sfc_main = { + data() { + return { + title: "", + content: "", + lists: [] + }; + }, + created() { + const vm = this; + for (let i = 1; i < 20; i++) { + this.lists.push("item" + i); + } + uni.$on("page-popup", (data) => { + vm.title = data.title; + vm.content = data.content; + }); + }, + beforeDestroy() { + uni.$off("drawer-page"); + }, + methods: { + sendMessage() { + getCurrentSubNVue(); + uni.$emit("popup-page", { + title: "\u5DF2\u8BFB\u5B8C!" + }); + }, + handle(item, index) { + getCurrentSubNVue(); + uni.$emit("popup-page", { + type: "interactive", + info: item + " \u8BE5\u5143\u7D20\u88AB\u70B9\u51FB\u4E86!" + }); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("div", { class: "wrapper" }, [ + createElementVNode("u-text", { class: "title" }, toDisplayString($data.title), 1), + createElementVNode("scroller", { class: "scroller" }, [ + createElementVNode("div", null, [ + createElementVNode("u-text", { class: "content" }, toDisplayString($data.content), 1) + ]), + createElementVNode("div", null, [ + createElementVNode("u-text", { style: { "color": "red", "font-size": "30rpx" } }, "\u4EE5\u4E0B\u4E3A Popup \u5185\u90E8\u6EDA\u52A8\u793A\u4F8B\uFF1A") + ]), + (openBlock(true), createElementBlock(Fragment, null, renderList($data.lists, (item, index) => { + return openBlock(), createElementBlock("div", { + class: "cell", + onClick: ($event) => $options.handle(item), + key: index + }, [ + createElementVNode("u-text", { class: "text" }, toDisplayString(item), 1) + ], 8, ["onClick"]); + }), 128)) + ]), + createElementVNode("div", { class: "message-wrapper" }, [ + createElementVNode("u-text", { + class: "send-message", + onClick: _cache[0] || (_cache[0] = (...args) => $options.sendMessage && $options.sendMessage(...args)) + }, "\u5411\u9875\u9762\u53D1\u9001\u6D88\u606F") + ]) + ]) + ]); +} +var popup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/API/subnvue/subnvue/popup.nvue"]]); +export { popup as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/API/subnvue/subnvue/video-mask.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/API/subnvue/subnvue/video-mask.js new file mode 100644 index 000000000..c8dec27a4 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/API/subnvue/subnvue/video-mask.js @@ -0,0 +1,103 @@ +import { openBlock, createElementBlock, createElementVNode, Fragment, renderList, toDisplayString } from "vue"; +import { _ as _export_sfc } from "../../../../plugin-vue_export-helper.js"; +var _style_0 = { "wrapper": { "": { "position": "relative", "flex": 1, "backgroundColor": "rgba(0,0,0,0)" } }, "list": { "": { "position": "absolute", "top": 0, "left": 0, "right": 0, "bottom": 0, "backgroundColor": "rgba(0,0,0,0.7)" } }, "cell": { "": { "paddingTop": "10rpx", "paddingRight": 0, "paddingBottom": "10rpx", "paddingLeft": 0, "flexDirection": "row", "flexWrap": "nowrap" } }, "name": { "": { "flex": 0, "fontSize": "20rpx", "marginRight": "20rpx", "color": "#FF5A5F" } }, "content": { "": { "flex": 1, "fontSize": "20rpx", "color": "#F4F5F6" } } }; +const _sfc_main = { + data() { + return { + lists: [], + interval: null, + yourTexts: [ + { + name: "\u5B66\u5458A", + content: "\u8001\u5E08\u8BB2\u7684\u771F\u597D" + }, + { + name: "\u5B66\u5458B", + content: "uni-app\u503C\u5F97\u5B66\u4E60" + }, + { + name: "\u5B66\u5458C", + content: "\u8001\u5E08\uFF0C\u8FD8\u6709\u5B9E\u6218\u4F8B\u5B50\u5417\uFF1F" + }, + { + name: "\u5B66\u5458D", + content: "\u8001\u5E08\uFF0C\u8BF7\u95EE\u662F\u4E0D\u662F\u8981\u5148\u5B66\u4F1Avue\u624D\u80FD\u5B66uni-app\uFF1F" + }, + { + name: "\u5B66\u5458E", + content: "\u53D7\u6559\u4E86\uFF0Cuni-app\u592A\u725B\u4E86" + } + ] + }; + }, + created() { + uni.$on("play-video", (data) => { + if (data.status === "open") { + this.addItem(); + } else { + this.closeItem(); + } + }); + }, + beforeDestroy() { + uni.$off("play-video"); + this.closeItem(); + }, + methods: { + addItem() { + const vm = this; + vm.lists = [{ + name: "\u5B66\u5458E", + content: "\u53D7\u6559\u4E86\uFF0Cuni-app\u592A\u725B\u4E86" + }]; + const dom = weex.requireModule("dom"); + vm.interval = setInterval(() => { + if (vm.lists.length > 15) { + vm.lists.unshift(); + } + vm.lists.push({ + name: vm.yourTexts[vm.lists.length % 4].name, + content: vm.yourTexts[vm.lists.length % 4].content + }); + if (vm.lists.length > 5) { + vm.$nextTick(() => { + if (vm.$refs["item" + (vm.lists.length - 1)]) { + dom.scrollToElement(vm.$refs["item" + (vm.lists.length - 1)][0]); + } + }); + } + }, 3500); + }, + closeItem() { + if (this.interval) + clearInterval(this.interval); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("div", { class: "wrapper" }, [ + createElementVNode("list", { class: "list" }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.lists, (item, index) => { + return openBlock(), createElementBlock("cell", { + key: index, + ref_for: true, + ref: "item" + index, + class: "cell" + }, [ + createElementVNode("u-text", { class: "name" }, toDisplayString(item.name) + ":", 1), + createElementVNode("u-text", { class: "content" }, toDisplayString(item.content), 1) + ]); + }), 128)) + ]) + ]) + ]); +} +var videoMask = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/API/subnvue/subnvue/video-mask.nvue"]]); +export { videoMask as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/component/cover-view/cover-view.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/component/cover-view/cover-view.js new file mode 100644 index 000000000..940d35f58 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/component/cover-view/cover-view.js @@ -0,0 +1,44 @@ +import { openBlock, createElementBlock, createElementVNode, toDisplayString } from "vue"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +var _style_0 = { "content": { "": { "textAlign": "center", "height": "400rpx" } }, "logo": { "": { "height": "200rpx", "width": "200rpx", "marginTop": "200rpx" } }, "title": { "": { "fontSize": "36rpx", "color": "#8f8f94" } }, "text": { "": { "color": "#4CD964", "fontFamily": "unincomponents" } }, "video": { "": { "width": "750rpx", "height": "400rpx", "backgroundColor": "#808080" } }, "coverview": { "": { "position": "absolute", "left": 0, "right": 0, "top": "0rpx", "height": "150rpx", "borderWidth": "10rpx", "borderColor": "#4CD964" } } }; +const _sfc_main = { + data() { + return { + title: "cover-view", + src: "https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/%E7%AC%AC1%E8%AE%B2%EF%BC%88uni-app%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D%EF%BC%89-%20DCloud%E5%AE%98%E6%96%B9%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B@20181126-lite.m4v" + }; + }, + onLoad() { + }, + methods: {} +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", null, [ + createElementVNode("u-video", { + ref: "video", + id: "myVideo", + class: "video", + src: $data.src, + controls: "true" + }, [ + createElementVNode("u-scalable", { style: { position: "absolute", left: "0", right: "0", top: "0", bottom: "0" } }, [ + createElementVNode("cover-view", { + class: "coverview", + style: { "overflow-y": "scroll" } + }, [ + createElementVNode("u-text", { class: "text" }, toDisplayString("\uEA06\uEA0E\uEA0C\uEA0A \u6211\u662F\u53EF\u4EE5\u6EDA\u52A8\u7684cover-view \u6211\u662F\u53EF\u4EE5\u6EDA\u52A8\u7684cover-view \u6211\u662F\u53EF\u4EE5\u6EDA\u52A8\u7684cover-view \u6211\u662F\u53EF\u4EE5\u6EDA\u52A8\u7684cover-view \u6211\u662F\u53EF\u4EE5\u6EDA\u52A8\u7684cover-view \u6211\u662F\u53EF\u4EE5\u6EDA\u52A8\u7684cover-view \u6211\u662F\u53EF\u4EE5\u6EDA\u52A8\u7684cover-view \u6211\u662F\u53EF\u4EE5\u6EDA\u52A8\u7684cover-view \u6211\u662F\u53EF\u4EE5\u6EDA\u52A8\u7684cover-view")) + ]) + ]) + ], 8, ["src"]) + ]) + ]); +} +var coverView = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/component/cover-view/cover-view.nvue"]]); +export { coverView as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/component/input/input.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/component/input/input.js new file mode 100644 index 000000000..239e5c7ae --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/component/input/input.js @@ -0,0 +1,285 @@ +import { openBlock, createElementBlock, createElementVNode, toDisplayString, createCommentVNode, normalizeClass } from "vue"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +var _style_0 = { "nvue-page-root": { "": { "backgroundColor": "#F8F8F8", "paddingBottom": 20 } }, "page-title": { "": { "flexDirection": "row", "justifyContent": "center", "alignItems": "center", "paddingTop": "35rpx", "paddingRight": "35rpx", "paddingBottom": "35rpx", "paddingLeft": "35rpx" } }, "page-title__wrapper": { "": { "paddingTop": 0, "paddingRight": 20, "paddingBottom": 0, "paddingLeft": 20, "borderBottomColor": "#D8D8D8", "borderBottomWidth": 1 } }, "page-title__text": { "": { "fontSize": 16, "height": 48, "lineHeight": 48, "color": "#BEBEBE" } }, "title": { "": { "paddingTop": 5, "paddingRight": 13, "paddingBottom": 5, "paddingLeft": 13 } }, "uni-form-item__title": { "": { "fontSize": 16, "lineHeight": 24 } }, "uni-input-wrapper": { "": { "paddingTop": 8, "paddingRight": 13, "paddingBottom": 8, "paddingLeft": 13, "flexDirection": "row", "flexWrap": "nowrap", "backgroundColor": "#FFFFFF" } }, "uni-input": { "": { "height": 28, "lineHeight": 28, "fontSize": 15, "paddingTop": 0, "paddingRight": 0, "paddingBottom": 0, "paddingLeft": 0, "flex": 1, "backgroundColor": "#FFFFFF" } }, "uni-icon": { "": { "fontFamily": "uniicons", "fontSize": 24, "fontWeight": "normal", "fontStyle": "normal", "width": 24, "height": 24, "lineHeight": 24, "color": "#999999" } }, "uni-eye-active": { "": { "color": "#007AFF" } } }; +const _sfc_main = { + data() { + return { + title: "input", + focus: false, + inputValue: "", + showClearIcon: false, + inputClearValue: "", + changeValue: "", + showPassword: true, + src: "../../../static/eye-1.png", + platform: "", + isNvue: false + }; + }, + methods: { + onKeyInput: function(event) { + this.inputValue = event.detail.value; + }, + replaceInput: function(event) { + var value = event.detail.value; + if (value === "11") { + this.changeValue = "2"; + } + }, + hideKeyboard: function(event) { + if (event.detail.value === "123") { + uni.hideKeyboard(); + } + }, + clearInput: function(event) { + this.inputClearValue = event.detail.value; + if (event.detail.value.length > 0) { + this.showClearIcon = true; + } else { + this.showClearIcon = false; + } + }, + clearIcon: function() { + this.inputClearValue = ""; + this.showClearIcon = false; + }, + changePassword: function() { + this.showPassword = !this.showPassword; + }, + onFocus() { + this.$mp.page.$getAppWebview().setStyle({ + softinputNavBar: "none" + }); + }, + onBlur() { + this.$mp.page.$getAppWebview().setStyle({ + softinputNavBar: "auto" + }); + } + }, + onLoad() { + this.platform = uni.getSystemInfoSync().platform; + this.isNvue = true; + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "nvue-page-root" }, [ + createElementVNode("view", { class: "page-title" }, [ + createElementVNode("view", { class: "page-title__wrapper" }, [ + createElementVNode("u-text", { class: "page-title__text" }, toDisplayString($data.title), 1) + ]) + ]), + createElementVNode("view", { class: "uni-common-mt" }, [ + createElementVNode("view", { class: "uni-form-item uni-column" }, [ + createElementVNode("view", { class: "title" }, [ + createElementVNode("u-text", { class: "uni-form-item__title" }, "\u53EF\u81EA\u52A8\u805A\u7126\u7684 input") + ]), + createElementVNode("view", { class: "uni-input-wrapper" }, [ + createElementVNode("u-input", { + class: "uni-input", + focus: "", + placeholder: "\u81EA\u52A8\u83B7\u5F97\u7126\u70B9" + }) + ]) + ]), + $data.platform === "ios" && !$data.isNvue ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-form-item uni-column" + }, [ + createElementVNode("view", { class: "title" }, [ + createElementVNode("u-text", { class: "uni-form-item__title" }, "\u9690\u85CF iOS \u8F6F\u952E\u76D8\u4E0A\u7684\u5BFC\u822A\u6761") + ]), + createElementVNode("view", { class: "uni-input-wrapper" }, [ + createElementVNode("u-input", { + class: "uni-input", + placeholder: "\u89E6\u6478\u5176\u4ED6\u5730\u65B9\u6536\u8D77\u952E\u76D8", + onFocus: _cache[0] || (_cache[0] = (...args) => $options.onFocus && $options.onFocus(...args)), + onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)) + }, null, 32) + ]) + ])) : createCommentVNode("v-if", true), + createElementVNode("view", { class: "uni-form-item uni-column" }, [ + createElementVNode("view", { class: "title" }, [ + createElementVNode("u-text", { class: "uni-form-item__title" }, "\u952E\u76D8\u53F3\u4E0B\u89D2\u6309\u94AE\u663E\u793A\u4E3A\u641C\u7D22") + ]), + createElementVNode("view", { class: "uni-input-wrapper" }, [ + createElementVNode("u-input", { + class: "uni-input", + confirmType: "search", + placeholder: "\u952E\u76D8\u53F3\u4E0B\u89D2\u6309\u94AE\u663E\u793A\u4E3A\u641C\u7D22" + }) + ]) + ]), + createElementVNode("view", { class: "uni-form-item uni-column" }, [ + createElementVNode("view", { class: "title" }, [ + createElementVNode("u-text", { class: "uni-form-item__title" }, "\u952E\u76D8\u53F3\u4E0B\u89D2\u6309\u94AE\u663E\u793A\u4E3A\u53D1\u9001") + ]), + createElementVNode("view", { class: "uni-input-wrapper" }, [ + createElementVNode("u-input", { + class: "uni-input", + confirmType: "send", + placeholder: "\u952E\u76D8\u53F3\u4E0B\u89D2\u6309\u94AE\u663E\u793A\u4E3A\u53D1\u9001" + }) + ]) + ]), + createElementVNode("view", { class: "uni-form-item uni-column" }, [ + createElementVNode("view", { class: "title" }, [ + createElementVNode("u-text", { class: "uni-form-item__title" }, "\u63A7\u5236\u6700\u5927\u8F93\u5165\u957F\u5EA6\u7684 input") + ]), + createElementVNode("view", { class: "uni-input-wrapper" }, [ + createElementVNode("u-input", { + class: "uni-input", + maxlength: "10", + placeholder: "\u6700\u5927\u8F93\u5165\u957F\u5EA6\u4E3A10" + }) + ]) + ]), + createElementVNode("view", { class: "uni-form-item uni-column" }, [ + createElementVNode("view", { class: "title" }, [ + createElementVNode("u-text", { class: "uni-form-item__title" }, "\u5B9E\u65F6\u83B7\u53D6\u8F93\u5165\u503C\uFF1A" + toDisplayString($data.inputValue), 1) + ]), + createElementVNode("view", { class: "uni-input-wrapper" }, [ + createElementVNode("u-input", { + class: "uni-input", + onInput: _cache[2] || (_cache[2] = (...args) => $options.onKeyInput && $options.onKeyInput(...args)), + placeholder: "\u8F93\u5165\u540C\u6B65\u5230view\u4E2D" + }, null, 32) + ]) + ]), + createElementVNode("view", { class: "uni-form-item uni-column" }, [ + createElementVNode("view", { class: "title" }, [ + createElementVNode("u-text", { class: "uni-form-item__title" }, "\u63A7\u5236\u8F93\u5165\u7684 input") + ]), + createElementVNode("view", { class: "uni-input-wrapper" }, [ + createElementVNode("u-input", { + class: "uni-input", + onInput: [ + _cache[3] || (_cache[3] = (...args) => $options.replaceInput && $options.replaceInput(...args)), + _cache[4] || (_cache[4] = ($event) => $data.changeValue = $event.detail.value) + ], + modelValue: $data.changeValue, + placeholder: "\u8FDE\u7EED\u7684\u4E24\u4E2A1\u4F1A\u53D8\u62102" + }, null, 40, ["modelValue"]) + ]) + ]), + createElementVNode("view", { class: "uni-form-item uni-column" }, [ + createElementVNode("view", { class: "title" }, [ + createElementVNode("u-text", { class: "uni-form-item__title" }, "\u63A7\u5236\u952E\u76D8\u7684 input") + ]), + createElementVNode("view", { class: "uni-input-wrapper" }, [ + createElementVNode("u-input", { + class: "uni-input", + ref: "input1", + onInput: _cache[5] || (_cache[5] = (...args) => $options.hideKeyboard && $options.hideKeyboard(...args)), + placeholder: "\u8F93\u5165123\u81EA\u52A8\u6536\u8D77\u952E\u76D8" + }, null, 544) + ]) + ]), + createElementVNode("view", { class: "uni-form-item uni-column" }, [ + createElementVNode("view", { class: "title" }, [ + createElementVNode("u-text", { class: "uni-form-item__title" }, "\u6570\u5B57\u8F93\u5165\u7684 input") + ]), + createElementVNode("view", { class: "uni-input-wrapper" }, [ + createElementVNode("u-input", { + class: "uni-input", + type: "number", + placeholder: "\u8FD9\u662F\u4E00\u4E2A\u6570\u5B57\u8F93\u5165\u6846" + }) + ]) + ]), + createElementVNode("view", { class: "uni-form-item uni-column" }, [ + createElementVNode("view", { class: "title" }, [ + createElementVNode("u-text", { class: "uni-form-item__title" }, "\u5BC6\u7801\u8F93\u5165\u7684 input") + ]), + createElementVNode("view", { class: "uni-input-wrapper" }, [ + createElementVNode("u-input", { + class: "uni-input", + password: "", + type: "text", + placeholder: "\u8FD9\u662F\u4E00\u4E2A\u5BC6\u7801\u8F93\u5165\u6846" + }) + ]) + ]), + createElementVNode("view", { class: "uni-form-item uni-column" }, [ + createElementVNode("view", { class: "title" }, [ + createElementVNode("u-text", { class: "uni-form-item__title" }, "\u5E26\u5C0F\u6570\u70B9\u7684 input") + ]), + createElementVNode("view", { class: "uni-input-wrapper" }, [ + createElementVNode("u-input", { + class: "uni-input", + type: "digit", + placeholder: "\u5E26\u5C0F\u6570\u70B9\u7684\u6570\u5B57\u952E\u76D8" + }) + ]) + ]), + createElementVNode("view", { class: "uni-form-item uni-column" }, [ + createElementVNode("view", { class: "title" }, [ + createElementVNode("u-text", { class: "uni-form-item__title" }, "\u8EAB\u4EFD\u8BC1\u8F93\u5165\u7684 input") + ]), + createElementVNode("view", { class: "uni-input-wrapper" }, [ + createElementVNode("u-input", { + class: "uni-input", + type: "idcard", + placeholder: "\u8EAB\u4EFD\u8BC1\u8F93\u5165\u952E\u76D8" + }) + ]) + ]), + createElementVNode("view", { class: "uni-form-item uni-column" }, [ + createElementVNode("view", { class: "title" }, [ + createElementVNode("u-text", { class: "uni-form-item__title" }, "\u63A7\u5236\u5360\u4F4D\u7B26\u989C\u8272\u7684 input") + ]), + createElementVNode("view", { class: "uni-input-wrapper" }, [ + createElementVNode("u-input", { + class: "uni-input", + placeholderStyle: "color:#F76260", + placeholder: "\u5360\u4F4D\u7B26\u5B57\u4F53\u662F\u7EA2\u8272\u7684" + }) + ]) + ]), + createElementVNode("view", { class: "uni-form-item uni-column" }, [ + createElementVNode("view", { class: "title" }, [ + createElementVNode("u-text", { class: "uni-form-item__title" }, "\u5E26\u6E05\u9664\u6309\u94AE\u7684\u8F93\u5165\u6846") + ]), + createElementVNode("view", { class: "uni-input-wrapper" }, [ + createElementVNode("u-input", { + class: "uni-input", + placeholder: "\u5E26\u6E05\u9664\u6309\u94AE\u7684\u8F93\u5165\u6846", + value: $data.inputClearValue, + onInput: _cache[6] || (_cache[6] = (...args) => $options.clearInput && $options.clearInput(...args)) + }, null, 40, ["value"]), + $data.showClearIcon ? (openBlock(), createElementBlock("u-text", { + key: 0, + class: "uni-icon", + onClick: _cache[7] || (_cache[7] = (...args) => $options.clearIcon && $options.clearIcon(...args)) + }, "\uE434")) : createCommentVNode("v-if", true) + ]) + ]), + createElementVNode("view", { class: "uni-form-item uni-column" }, [ + createElementVNode("view", { class: "title" }, [ + createElementVNode("u-text", { class: "uni-form-item__title" }, "\u53EF\u67E5\u770B\u5BC6\u7801\u7684\u8F93\u5165\u6846") + ]), + createElementVNode("view", { class: "uni-input-wrapper" }, [ + createElementVNode("u-input", { + class: "uni-input", + placeholder: "\u8BF7\u8F93\u5165\u5BC6\u7801", + password: $data.showPassword + }, null, 8, ["password"]), + createElementVNode("u-text", { + class: normalizeClass(["uni-icon", [!$data.showPassword ? "uni-eye-active" : ""]]), + onClick: _cache[8] || (_cache[8] = (...args) => $options.changePassword && $options.changePassword(...args)) + }, "\uE568", 2) + ]) + ]) + ]) + ]) + ]); +} +var input = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/component/input/input.nvue"]]); +export { input as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/component/map/map.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/component/map/map.js new file mode 100644 index 000000000..7cbfad34a --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/component/map/map.js @@ -0,0 +1,179 @@ +import { _ as __easycom_3, a as __easycom_4 } from "../../../uni-list.js"; +import { resolveDynamicComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, createCommentVNode } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import "../../../uni-icons.js"; +import "../../../uni-badge.js"; +import "../../../shared.esm-bundler.js"; +var _style_0 = { "content": { "": { "flex": 1 } }, "map": { "": { "width": "750rpx", "height": 250, "backgroundColor": "#f0f0f0" } }, "line": { "": { "height": 4 } }, "scrollview": { "": { "flex": 1 } } }; +const _sfc_main = { + data() { + return { + location: { + longitude: 116.397477, + latitude: 39.908692 + }, + controls: [{ + id: 1, + position: { + left: 5, + top: 180, + width: 30, + height: 30 + }, + iconPath: "/static/logo.png", + clickable: true + }], + showLocation: false, + scale: 13, + showCompass: true, + enable3D: true, + enableOverlooking: true, + enableZoom: true, + enableScroll: true, + enableRotate: true, + enableSatellite: false, + enableTraffic: false, + polyline: [], + markers: [], + polygons: [], + circles: [], + includePoints: [], + rotate: 0, + skew: 0 + }; + }, + onLoad() { + }, + methods: { + changeScale() { + this.scale = this.scale == 9 ? 15 : 9; + }, + changeRotate() { + this.rotate = this.rotate == 90 ? 0 : 90; + }, + changeSkew() { + this.skew = this.skew == 30 ? 0 : 30; + }, + enableThreeD(e) { + this.enable3D = e.value; + }, + changeShowCompass(e) { + this.showCompass = e.value; + }, + changeEnableOverlooking(e) { + this.enableOverlooking = e.value; + }, + changeEnableZoom(e) { + this.enableZoom = e.value; + }, + changeEnableScroll(e) { + this.enableScroll = e.value; + }, + changeEnableRotate(e) { + this.enableRotate = e.value; + }, + changeEnableSatellite(e) { + this.enableSatellite = e.value; + }, + changeEnableTraffic(e) { + this.enableTraffic = e.value; + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_list_item = resolveEasycom(resolveDynamicComponent("uni-list-item"), __easycom_3); + const _component_uni_list = resolveEasycom(resolveDynamicComponent("uni-list"), __easycom_4); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "content" }, [ + createElementVNode("map", { + class: "map", + ref: "map1", + controls: $data.controls, + scale: $data.scale, + longitude: $data.location.longitude, + latitude: $data.location.latitude, + showLocation: $data.showLocation, + enable3D: $data.enable3D, + rotate: $data.rotate, + skew: $data.skew, + showCompass: $data.showCompass, + enableOverlooking: $data.enableOverlooking, + enableZoom: $data.enableZoom, + enableScroll: $data.enableScroll, + enableRotate: $data.enableRotate, + enableSatellite: $data.enableSatellite, + enableTraffic: $data.enableTraffic, + markers: $data.markers, + polyline: $data.polyline, + circles: $data.circles, + polygons: $data.polygons, + includePoints: $data.includePoints + }, null, 8, ["controls", "scale", "longitude", "latitude", "showLocation", "enable3D", "rotate", "skew", "showCompass", "enableOverlooking", "enableZoom", "enableScroll", "enableRotate", "enableSatellite", "enableTraffic", "markers", "polyline", "circles", "polygons", "includePoints"]), + createElementVNode("view", { class: "line" }), + createVNode(_component_uni_list, { class: "scrollview" }, { + default: withCtx(() => [ + createVNode(_component_uni_list_item, { + "show-arrow": false, + "show-switch": true, + "switch-checked": $data.enable3D, + title: "\u663E\u793A3D\u697C\u5757", + onSwitchChange: $options.enableThreeD + }, null, 8, ["switch-checked", "onSwitchChange"]), + createVNode(_component_uni_list_item, { + "show-arrow": false, + "show-switch": true, + "switch-checked": $data.showCompass, + title: "\u663E\u793A\u6307\u5357\u9488", + onSwitchChange: $options.changeShowCompass + }, null, 8, ["switch-checked", "onSwitchChange"]), + createCommentVNode(' '), + createVNode(_component_uni_list_item, { + "show-arrow": false, + "show-switch": true, + "switch-checked": $data.enableZoom, + title: "\u662F\u5426\u652F\u6301\u7F29\u653E", + onSwitchChange: $options.changeEnableZoom + }, null, 8, ["switch-checked", "onSwitchChange"]), + createVNode(_component_uni_list_item, { + "show-arrow": false, + "show-switch": true, + "switch-checked": $data.enableScroll, + title: "\u662F\u5426\u652F\u6301\u62D6\u52A8", + onSwitchChange: $options.changeEnableScroll + }, null, 8, ["switch-checked", "onSwitchChange"]), + createVNode(_component_uni_list_item, { + "show-arrow": false, + "show-switch": true, + "switch-checked": $data.enableRotate, + title: "\u662F\u5426\u652F\u6301\u65CB\u8F6C", + onSwitchChange: $options.changeEnableRotate + }, null, 8, ["switch-checked", "onSwitchChange"]), + createVNode(_component_uni_list_item, { + "show-arrow": false, + "show-switch": true, + "switch-checked": $data.enableSatellite, + title: "\u662F\u5426\u5F00\u542F\u536B\u661F\u56FE", + onSwitchChange: $options.changeEnableSatellite + }, null, 8, ["switch-checked", "onSwitchChange"]), + createVNode(_component_uni_list_item, { + "show-arrow": false, + "show-switch": true, + "switch-checked": $data.enableTraffic, + title: "\u662F\u5426\u5F00\u542F\u5B9E\u65F6\u8DEF\u51B5", + onSwitchChange: $options.changeEnableTraffic + }, null, 8, ["switch-checked", "onSwitchChange"]) + ]), + _: 1 + }) + ]) + ]); +} +var map = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/component/map/map.nvue"]]); +export { map as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/component/video/video.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/component/video/video.js new file mode 100644 index 000000000..10940219d --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/component/video/video.js @@ -0,0 +1,183 @@ +import { f as formatAppLog } from "../../../uni-shared.es.js"; +import { resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, createTextVNode } from "vue"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import "../../../shared.esm-bundler.js"; +var _style_0 = { "video": { "": { "width": "750rpx", "height": "400rpx", "backgroundColor": "#808080" } }, "btn": { "": { "marginTop": 5, "marginBottom": 5 } } }; +const _sfc_main = { + data() { + return { + src: "https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/%E7%AC%AC1%E8%AE%B2%EF%BC%88uni-app%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D%EF%BC%89-%20DCloud%E5%AE%98%E6%96%B9%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B@20181126-lite.m4v", + fil: true, + list: [{ + text: "\u8981\u663E\u793A\u7684\u6587\u672C", + color: "#FF0000", + time: 9 + }] + }; + }, + onReady() { + this.context = uni.createVideoContext("video1", this); + }, + methods: { + onstart(e) { + formatAppLog("log", "at pages/component/video/video.nvue:36", "onstart:" + JSON.stringify(e)); + }, + onpause(e) { + formatAppLog("log", "at pages/component/video/video.nvue:39", "onpause:" + JSON.stringify(e)); + }, + onfinish(e) { + formatAppLog("log", "at pages/component/video/video.nvue:42", "onfinish:" + JSON.stringify(e)); + }, + onfail(e) { + formatAppLog("log", "at pages/component/video/video.nvue:45", "onfail:" + JSON.stringify(e)); + }, + fullscreenchange(e) { + formatAppLog("log", "at pages/component/video/video.nvue:48", "fullscreenchange:" + JSON.stringify(e)); + }, + waiting(e) { + formatAppLog("log", "at pages/component/video/video.nvue:51", "waiting:" + JSON.stringify(e)); + }, + timeupdate(e) { + formatAppLog("log", "at pages/component/video/video.nvue:54", "timeupdate:" + JSON.stringify(e)); + }, + play() { + this.context.play(); + }, + pause() { + this.context.pause(); + }, + seek() { + this.context.seek(20); + }, + stop() { + this.context.stop(); + }, + fullScreen() { + this.context.requestFullScreen({ + direction: 90 + }); + }, + exitFullScreen() { + this.context.exitFullScreen(); + }, + sendDanmu() { + this.context.sendDanmu({ + text: "\u8981\u663E\u793A\u7684\u5F39\u5E55\u6587\u672C", + color: "#FF0000" + }); + }, + playbackRate() { + this.context.playbackRate(2); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_button = resolveComponent("button"); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("div", null, [ + createElementVNode("u-video", { + id: "video1", + class: "video", + src: $data.src, + autoplay: "false", + duration: "", + controls: "true", + danmuList: $data.list, + danmuBtn: "true", + enableDanmu: "true", + loop: true, + muted: "true", + initialTime: "", + direction: "-90", + showMuteBtn: "true", + onPlay: _cache[0] || (_cache[0] = (...args) => $options.onstart && $options.onstart(...args)), + onPause: _cache[1] || (_cache[1] = (...args) => $options.onpause && $options.onpause(...args)), + onEnded: _cache[2] || (_cache[2] = (...args) => $options.onfinish && $options.onfinish(...args)), + onError: _cache[3] || (_cache[3] = (...args) => $options.onfail && $options.onfail(...args)), + onWaiting: _cache[4] || (_cache[4] = (...args) => $options.waiting && $options.waiting(...args)), + onTimeupdate: _cache[5] || (_cache[5] = (...args) => $options.timeupdate && $options.timeupdate(...args)), + onFullscreenchange: _cache[6] || (_cache[6] = (...args) => $options.fullscreenchange && $options.fullscreenchange(...args)) + }, null, 40, ["src", "danmuList"]), + createVNode(_component_button, { + class: "btn", + onClick: $options.play + }, { + default: withCtx(() => [ + createTextVNode("\u64AD\u653E") + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "btn", + onClick: $options.pause + }, { + default: withCtx(() => [ + createTextVNode("\u6682\u505C") + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "btn", + onClick: $options.seek + }, { + default: withCtx(() => [ + createTextVNode("\u8DF3\u8F6C\u5230\u6307\u5B9A\u4F4D\u7F6E") + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "btn", + onClick: $options.stop + }, { + default: withCtx(() => [ + createTextVNode("\u505C\u6B62") + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "btn", + onClick: $options.fullScreen + }, { + default: withCtx(() => [ + createTextVNode("\u5168\u5C4F") + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "btn", + onClick: $options.exitFullScreen + }, { + default: withCtx(() => [ + createTextVNode("\u9000\u51FA\u5168\u5C4F") + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "btn", + onClick: $options.playbackRate + }, { + default: withCtx(() => [ + createTextVNode("\u8BBE\u7F6E\u500D\u901F") + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "btn", + onClick: $options.sendDanmu + }, { + default: withCtx(() => [ + createTextVNode("\u53D1\u9001\u5F39\u5E55") + ]), + _: 1 + }, 8, ["onClick"]) + ]) + ]); +} +var video = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/component/video/video.nvue"]]); +export { video as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/calendar/calendar.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/calendar/calendar.js new file mode 100644 index 000000000..3d380c06e --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/calendar/calendar.js @@ -0,0 +1,1562 @@ +import { f as formatAppLog } from "../../../uni-shared.es.js"; +import { _ as __easycom_2 } from "../../../uni-section.js"; +import { openBlock, createElementBlock, normalizeClass, createElementVNode, createCommentVNode, toDisplayString, resolveComponent, withModifiers, createVNode, withCtx, Fragment, renderList, resolveDynamicComponent, createTextVNode } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { i as initVueI18n } from "../../../uni-i18n.es.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import "../../../shared.esm-bundler.js"; +var calendar$1 = { + lunarInfo: [ + 19416, + 19168, + 42352, + 21717, + 53856, + 55632, + 91476, + 22176, + 39632, + 21970, + 19168, + 42422, + 42192, + 53840, + 119381, + 46400, + 54944, + 44450, + 38320, + 84343, + 18800, + 42160, + 46261, + 27216, + 27968, + 109396, + 11104, + 38256, + 21234, + 18800, + 25958, + 54432, + 59984, + 28309, + 23248, + 11104, + 100067, + 37600, + 116951, + 51536, + 54432, + 120998, + 46416, + 22176, + 107956, + 9680, + 37584, + 53938, + 43344, + 46423, + 27808, + 46416, + 86869, + 19872, + 42416, + 83315, + 21168, + 43432, + 59728, + 27296, + 44710, + 43856, + 19296, + 43748, + 42352, + 21088, + 62051, + 55632, + 23383, + 22176, + 38608, + 19925, + 19152, + 42192, + 54484, + 53840, + 54616, + 46400, + 46752, + 103846, + 38320, + 18864, + 43380, + 42160, + 45690, + 27216, + 27968, + 44870, + 43872, + 38256, + 19189, + 18800, + 25776, + 29859, + 59984, + 27480, + 23232, + 43872, + 38613, + 37600, + 51552, + 55636, + 54432, + 55888, + 30034, + 22176, + 43959, + 9680, + 37584, + 51893, + 43344, + 46240, + 47780, + 44368, + 21977, + 19360, + 42416, + 86390, + 21168, + 43312, + 31060, + 27296, + 44368, + 23378, + 19296, + 42726, + 42208, + 53856, + 60005, + 54576, + 23200, + 30371, + 38608, + 19195, + 19152, + 42192, + 118966, + 53840, + 54560, + 56645, + 46496, + 22224, + 21938, + 18864, + 42359, + 42160, + 43600, + 111189, + 27936, + 44448, + 84835, + 37744, + 18936, + 18800, + 25776, + 92326, + 59984, + 27424, + 108228, + 43744, + 41696, + 53987, + 51552, + 54615, + 54432, + 55888, + 23893, + 22176, + 42704, + 21972, + 21200, + 43448, + 43344, + 46240, + 46758, + 44368, + 21920, + 43940, + 42416, + 21168, + 45683, + 26928, + 29495, + 27296, + 44368, + 84821, + 19296, + 42352, + 21732, + 53600, + 59752, + 54560, + 55968, + 92838, + 22224, + 19168, + 43476, + 41680, + 53584, + 62034, + 54560 + ], + solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], + Gan: ["\u7532", "\u4E59", "\u4E19", "\u4E01", "\u620A", "\u5DF1", "\u5E9A", "\u8F9B", "\u58EC", "\u7678"], + Zhi: ["\u5B50", "\u4E11", "\u5BC5", "\u536F", "\u8FB0", "\u5DF3", "\u5348", "\u672A", "\u7533", "\u9149", "\u620C", "\u4EA5"], + Animals: ["\u9F20", "\u725B", "\u864E", "\u5154", "\u9F99", "\u86C7", "\u9A6C", "\u7F8A", "\u7334", "\u9E21", "\u72D7", "\u732A"], + solarTerm: ["\u5C0F\u5BD2", "\u5927\u5BD2", "\u7ACB\u6625", "\u96E8\u6C34", "\u60CA\u86F0", "\u6625\u5206", "\u6E05\u660E", "\u8C37\u96E8", "\u7ACB\u590F", "\u5C0F\u6EE1", "\u8292\u79CD", "\u590F\u81F3", "\u5C0F\u6691", "\u5927\u6691", "\u7ACB\u79CB", "\u5904\u6691", "\u767D\u9732", "\u79CB\u5206", "\u5BD2\u9732", "\u971C\u964D", "\u7ACB\u51AC", "\u5C0F\u96EA", "\u5927\u96EA", "\u51AC\u81F3"], + sTermInfo: [ + "9778397bd097c36b0b6fc9274c91aa", + "97b6b97bd19801ec9210c965cc920e", + "97bcf97c3598082c95f8c965cc920f", + "97bd0b06bdb0722c965ce1cfcc920f", + "b027097bd097c36b0b6fc9274c91aa", + "97b6b97bd19801ec9210c965cc920e", + "97bcf97c359801ec95f8c965cc920f", + "97bd0b06bdb0722c965ce1cfcc920f", + "b027097bd097c36b0b6fc9274c91aa", + "97b6b97bd19801ec9210c965cc920e", + "97bcf97c359801ec95f8c965cc920f", + "97bd0b06bdb0722c965ce1cfcc920f", + "b027097bd097c36b0b6fc9274c91aa", + "9778397bd19801ec9210c965cc920e", + "97b6b97bd19801ec95f8c965cc920f", + "97bd09801d98082c95f8e1cfcc920f", + "97bd097bd097c36b0b6fc9210c8dc2", + "9778397bd197c36c9210c9274c91aa", + "97b6b97bd19801ec95f8c965cc920e", + "97bd09801d98082c95f8e1cfcc920f", + "97bd097bd097c36b0b6fc9210c8dc2", + "9778397bd097c36c9210c9274c91aa", + "97b6b97bd19801ec95f8c965cc920e", + "97bcf97c3598082c95f8e1cfcc920f", + "97bd097bd097c36b0b6fc9210c8dc2", + "9778397bd097c36c9210c9274c91aa", + "97b6b97bd19801ec9210c965cc920e", + "97bcf97c3598082c95f8c965cc920f", + "97bd097bd097c35b0b6fc920fb0722", + "9778397bd097c36b0b6fc9274c91aa", + "97b6b97bd19801ec9210c965cc920e", + "97bcf97c3598082c95f8c965cc920f", + "97bd097bd097c35b0b6fc920fb0722", + "9778397bd097c36b0b6fc9274c91aa", + "97b6b97bd19801ec9210c965cc920e", + "97bcf97c359801ec95f8c965cc920f", + "97bd097bd097c35b0b6fc920fb0722", + "9778397bd097c36b0b6fc9274c91aa", + "97b6b97bd19801ec9210c965cc920e", + "97bcf97c359801ec95f8c965cc920f", + "97bd097bd097c35b0b6fc920fb0722", + "9778397bd097c36b0b6fc9274c91aa", + "97b6b97bd19801ec9210c965cc920e", + "97bcf97c359801ec95f8c965cc920f", + "97bd097bd07f595b0b6fc920fb0722", + "9778397bd097c36b0b6fc9210c8dc2", + "9778397bd19801ec9210c9274c920e", + "97b6b97bd19801ec95f8c965cc920f", + "97bd07f5307f595b0b0bc920fb0722", + "7f0e397bd097c36b0b6fc9210c8dc2", + "9778397bd097c36c9210c9274c920e", + "97b6b97bd19801ec95f8c965cc920f", + "97bd07f5307f595b0b0bc920fb0722", + "7f0e397bd097c36b0b6fc9210c8dc2", + "9778397bd097c36c9210c9274c91aa", + "97b6b97bd19801ec9210c965cc920e", + "97bd07f1487f595b0b0bc920fb0722", + "7f0e397bd097c36b0b6fc9210c8dc2", + "9778397bd097c36b0b6fc9274c91aa", + "97b6b97bd19801ec9210c965cc920e", + "97bcf7f1487f595b0b0bb0b6fb0722", + "7f0e397bd097c35b0b6fc920fb0722", + "9778397bd097c36b0b6fc9274c91aa", + "97b6b97bd19801ec9210c965cc920e", + "97bcf7f1487f595b0b0bb0b6fb0722", + "7f0e397bd097c35b0b6fc920fb0722", + "9778397bd097c36b0b6fc9274c91aa", + "97b6b97bd19801ec9210c965cc920e", + "97bcf7f1487f531b0b0bb0b6fb0722", + "7f0e397bd097c35b0b6fc920fb0722", + "9778397bd097c36b0b6fc9274c91aa", + "97b6b97bd19801ec9210c965cc920e", + "97bcf7f1487f531b0b0bb0b6fb0722", + "7f0e397bd07f595b0b6fc920fb0722", + "9778397bd097c36b0b6fc9274c91aa", + "97b6b97bd19801ec9210c9274c920e", + "97bcf7f0e47f531b0b0bb0b6fb0722", + "7f0e397bd07f595b0b0bc920fb0722", + "9778397bd097c36b0b6fc9210c91aa", + "97b6b97bd197c36c9210c9274c920e", + "97bcf7f0e47f531b0b0bb0b6fb0722", + "7f0e397bd07f595b0b0bc920fb0722", + "9778397bd097c36b0b6fc9210c8dc2", + "9778397bd097c36c9210c9274c920e", + "97b6b7f0e47f531b0723b0b6fb0722", + "7f0e37f5307f595b0b0bc920fb0722", + "7f0e397bd097c36b0b6fc9210c8dc2", + "9778397bd097c36b0b70c9274c91aa", + "97b6b7f0e47f531b0723b0b6fb0721", + "7f0e37f1487f595b0b0bb0b6fb0722", + "7f0e397bd097c35b0b6fc9210c8dc2", + "9778397bd097c36b0b6fc9274c91aa", + "97b6b7f0e47f531b0723b0b6fb0721", + "7f0e27f1487f595b0b0bb0b6fb0722", + "7f0e397bd097c35b0b6fc920fb0722", + "9778397bd097c36b0b6fc9274c91aa", + "97b6b7f0e47f531b0723b0b6fb0721", + "7f0e27f1487f531b0b0bb0b6fb0722", + "7f0e397bd097c35b0b6fc920fb0722", + "9778397bd097c36b0b6fc9274c91aa", + "97b6b7f0e47f531b0723b0b6fb0721", + "7f0e27f1487f531b0b0bb0b6fb0722", + "7f0e397bd097c35b0b6fc920fb0722", + "9778397bd097c36b0b6fc9274c91aa", + "97b6b7f0e47f531b0723b0b6fb0721", + "7f0e27f1487f531b0b0bb0b6fb0722", + "7f0e397bd07f595b0b0bc920fb0722", + "9778397bd097c36b0b6fc9274c91aa", + "97b6b7f0e47f531b0723b0787b0721", + "7f0e27f0e47f531b0b0bb0b6fb0722", + "7f0e397bd07f595b0b0bc920fb0722", + "9778397bd097c36b0b6fc9210c91aa", + "97b6b7f0e47f149b0723b0787b0721", + "7f0e27f0e47f531b0723b0b6fb0722", + "7f0e397bd07f595b0b0bc920fb0722", + "9778397bd097c36b0b6fc9210c8dc2", + "977837f0e37f149b0723b0787b0721", + "7f07e7f0e47f531b0723b0b6fb0722", + "7f0e37f5307f595b0b0bc920fb0722", + "7f0e397bd097c35b0b6fc9210c8dc2", + "977837f0e37f14998082b0787b0721", + "7f07e7f0e47f531b0723b0b6fb0721", + "7f0e37f1487f595b0b0bb0b6fb0722", + "7f0e397bd097c35b0b6fc9210c8dc2", + "977837f0e37f14998082b0787b06bd", + "7f07e7f0e47f531b0723b0b6fb0721", + "7f0e27f1487f531b0b0bb0b6fb0722", + "7f0e397bd097c35b0b6fc920fb0722", + "977837f0e37f14998082b0787b06bd", + "7f07e7f0e47f531b0723b0b6fb0721", + "7f0e27f1487f531b0b0bb0b6fb0722", + "7f0e397bd097c35b0b6fc920fb0722", + "977837f0e37f14998082b0787b06bd", + "7f07e7f0e47f531b0723b0b6fb0721", + "7f0e27f1487f531b0b0bb0b6fb0722", + "7f0e397bd07f595b0b0bc920fb0722", + "977837f0e37f14998082b0787b06bd", + "7f07e7f0e47f531b0723b0b6fb0721", + "7f0e27f1487f531b0b0bb0b6fb0722", + "7f0e397bd07f595b0b0bc920fb0722", + "977837f0e37f14998082b0787b06bd", + "7f07e7f0e47f149b0723b0787b0721", + "7f0e27f0e47f531b0b0bb0b6fb0722", + "7f0e397bd07f595b0b0bc920fb0722", + "977837f0e37f14998082b0723b06bd", + "7f07e7f0e37f149b0723b0787b0721", + "7f0e27f0e47f531b0723b0b6fb0722", + "7f0e397bd07f595b0b0bc920fb0722", + "977837f0e37f14898082b0723b02d5", + "7ec967f0e37f14998082b0787b0721", + "7f07e7f0e47f531b0723b0b6fb0722", + "7f0e37f1487f595b0b0bb0b6fb0722", + "7f0e37f0e37f14898082b0723b02d5", + "7ec967f0e37f14998082b0787b0721", + "7f07e7f0e47f531b0723b0b6fb0722", + "7f0e37f1487f531b0b0bb0b6fb0722", + "7f0e37f0e37f14898082b0723b02d5", + "7ec967f0e37f14998082b0787b06bd", + "7f07e7f0e47f531b0723b0b6fb0721", + "7f0e37f1487f531b0b0bb0b6fb0722", + "7f0e37f0e37f14898082b072297c35", + "7ec967f0e37f14998082b0787b06bd", + "7f07e7f0e47f531b0723b0b6fb0721", + "7f0e27f1487f531b0b0bb0b6fb0722", + "7f0e37f0e37f14898082b072297c35", + "7ec967f0e37f14998082b0787b06bd", + "7f07e7f0e47f531b0723b0b6fb0721", + "7f0e27f1487f531b0b0bb0b6fb0722", + "7f0e37f0e366aa89801eb072297c35", + "7ec967f0e37f14998082b0787b06bd", + "7f07e7f0e47f149b0723b0787b0721", + "7f0e27f1487f531b0b0bb0b6fb0722", + "7f0e37f0e366aa89801eb072297c35", + "7ec967f0e37f14998082b0723b06bd", + "7f07e7f0e47f149b0723b0787b0721", + "7f0e27f0e47f531b0723b0b6fb0722", + "7f0e37f0e366aa89801eb072297c35", + "7ec967f0e37f14998082b0723b06bd", + "7f07e7f0e37f14998083b0787b0721", + "7f0e27f0e47f531b0723b0b6fb0722", + "7f0e37f0e366aa89801eb072297c35", + "7ec967f0e37f14898082b0723b02d5", + "7f07e7f0e37f14998082b0787b0721", + "7f07e7f0e47f531b0723b0b6fb0722", + "7f0e36665b66aa89801e9808297c35", + "665f67f0e37f14898082b0723b02d5", + "7ec967f0e37f14998082b0787b0721", + "7f07e7f0e47f531b0723b0b6fb0722", + "7f0e36665b66a449801e9808297c35", + "665f67f0e37f14898082b0723b02d5", + "7ec967f0e37f14998082b0787b06bd", + "7f07e7f0e47f531b0723b0b6fb0721", + "7f0e36665b66a449801e9808297c35", + "665f67f0e37f14898082b072297c35", + "7ec967f0e37f14998082b0787b06bd", + "7f07e7f0e47f531b0723b0b6fb0721", + "7f0e26665b66a449801e9808297c35", + "665f67f0e37f1489801eb072297c35", + "7ec967f0e37f14998082b0787b06bd", + "7f07e7f0e47f531b0723b0b6fb0721", + "7f0e27f1487f531b0b0bb0b6fb0722" + ], + nStr1: ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D", "\u4E03", "\u516B", "\u4E5D", "\u5341"], + nStr2: ["\u521D", "\u5341", "\u5EFF", "\u5345"], + nStr3: ["\u6B63", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D", "\u4E03", "\u516B", "\u4E5D", "\u5341", "\u51AC", "\u814A"], + lYearDays: function(y) { + var i; + var sum = 348; + for (i = 32768; i > 8; i >>= 1) { + sum += this.lunarInfo[y - 1900] & i ? 1 : 0; + } + return sum + this.leapDays(y); + }, + leapMonth: function(y) { + return this.lunarInfo[y - 1900] & 15; + }, + leapDays: function(y) { + if (this.leapMonth(y)) { + return this.lunarInfo[y - 1900] & 65536 ? 30 : 29; + } + return 0; + }, + monthDays: function(y, m) { + if (m > 12 || m < 1) { + return -1; + } + return this.lunarInfo[y - 1900] & 65536 >> m ? 30 : 29; + }, + solarDays: function(y, m) { + if (m > 12 || m < 1) { + return -1; + } + var ms = m - 1; + if (ms == 1) { + return y % 4 == 0 && y % 100 != 0 || y % 400 == 0 ? 29 : 28; + } else { + return this.solarMonth[ms]; + } + }, + toGanZhiYear: function(lYear) { + var ganKey = (lYear - 3) % 10; + var zhiKey = (lYear - 3) % 12; + if (ganKey == 0) + ganKey = 10; + if (zhiKey == 0) + zhiKey = 12; + return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1]; + }, + toAstro: function(cMonth, cDay) { + var s = "\u9B54\u7FAF\u6C34\u74F6\u53CC\u9C7C\u767D\u7F8A\u91D1\u725B\u53CC\u5B50\u5DE8\u87F9\u72EE\u5B50\u5904\u5973\u5929\u79E4\u5929\u874E\u5C04\u624B\u9B54\u7FAF"; + var arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22]; + return s.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + "\u5EA7"; + }, + toGanZhi: function(offset) { + return this.Gan[offset % 10] + this.Zhi[offset % 12]; + }, + getTerm: function(y, n) { + if (y < 1900 || y > 2100) { + return -1; + } + if (n < 1 || n > 24) { + return -1; + } + var _table = this.sTermInfo[y - 1900]; + var _info = [ + parseInt("0x" + _table.substr(0, 5)).toString(), + parseInt("0x" + _table.substr(5, 5)).toString(), + parseInt("0x" + _table.substr(10, 5)).toString(), + parseInt("0x" + _table.substr(15, 5)).toString(), + parseInt("0x" + _table.substr(20, 5)).toString(), + parseInt("0x" + _table.substr(25, 5)).toString() + ]; + var _calday = [ + _info[0].substr(0, 1), + _info[0].substr(1, 2), + _info[0].substr(3, 1), + _info[0].substr(4, 2), + _info[1].substr(0, 1), + _info[1].substr(1, 2), + _info[1].substr(3, 1), + _info[1].substr(4, 2), + _info[2].substr(0, 1), + _info[2].substr(1, 2), + _info[2].substr(3, 1), + _info[2].substr(4, 2), + _info[3].substr(0, 1), + _info[3].substr(1, 2), + _info[3].substr(3, 1), + _info[3].substr(4, 2), + _info[4].substr(0, 1), + _info[4].substr(1, 2), + _info[4].substr(3, 1), + _info[4].substr(4, 2), + _info[5].substr(0, 1), + _info[5].substr(1, 2), + _info[5].substr(3, 1), + _info[5].substr(4, 2) + ]; + return parseInt(_calday[n - 1]); + }, + toChinaMonth: function(m) { + if (m > 12 || m < 1) { + return -1; + } + var s = this.nStr3[m - 1]; + s += "\u6708"; + return s; + }, + toChinaDay: function(d) { + var s; + switch (d) { + case 10: + s = "\u521D\u5341"; + break; + case 20: + s = "\u4E8C\u5341"; + break; + case 30: + s = "\u4E09\u5341"; + break; + default: + s = this.nStr2[Math.floor(d / 10)]; + s += this.nStr1[d % 10]; + } + return s; + }, + getAnimal: function(y) { + return this.Animals[(y - 4) % 12]; + }, + solar2lunar: function(y, m, d) { + if (y < 1900 || y > 2100) { + return -1; + } + if (y == 1900 && m == 1 && d < 31) { + return -1; + } + if (!y) { + var objDate = new Date(); + } else { + var objDate = new Date(y, parseInt(m) - 1, d); + } + var i; + var leap = 0; + var temp = 0; + var y = objDate.getFullYear(); + var m = objDate.getMonth() + 1; + var d = objDate.getDate(); + var offset = (Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) - Date.UTC(1900, 0, 31)) / 864e5; + for (i = 1900; i < 2101 && offset > 0; i++) { + temp = this.lYearDays(i); + offset -= temp; + } + if (offset < 0) { + offset += temp; + i--; + } + var isTodayObj = new Date(); + var isToday = false; + if (isTodayObj.getFullYear() == y && isTodayObj.getMonth() + 1 == m && isTodayObj.getDate() == d) { + isToday = true; + } + var nWeek = objDate.getDay(); + var cWeek = this.nStr1[nWeek]; + if (nWeek == 0) { + nWeek = 7; + } + var year = i; + var leap = this.leapMonth(i); + var isLeap = false; + for (i = 1; i < 13 && offset > 0; i++) { + if (leap > 0 && i == leap + 1 && isLeap == false) { + --i; + isLeap = true; + temp = this.leapDays(year); + } else { + temp = this.monthDays(year, i); + } + if (isLeap == true && i == leap + 1) { + isLeap = false; + } + offset -= temp; + } + if (offset == 0 && leap > 0 && i == leap + 1) { + if (isLeap) { + isLeap = false; + } else { + isLeap = true; + --i; + } + } + if (offset < 0) { + offset += temp; + --i; + } + var month = i; + var day = offset + 1; + var sm = m - 1; + var gzY = this.toGanZhiYear(year); + var firstNode = this.getTerm(y, m * 2 - 1); + var secondNode = this.getTerm(y, m * 2); + var gzM = this.toGanZhi((y - 1900) * 12 + m + 11); + if (d >= firstNode) { + gzM = this.toGanZhi((y - 1900) * 12 + m + 12); + } + var isTerm = false; + var Term = null; + if (firstNode == d) { + isTerm = true; + Term = this.solarTerm[m * 2 - 2]; + } + if (secondNode == d) { + isTerm = true; + Term = this.solarTerm[m * 2 - 1]; + } + var dayCyclical = Date.UTC(y, sm, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10; + var gzD = this.toGanZhi(dayCyclical + d - 1); + var astro = this.toAstro(m, d); + return { "lYear": year, "lMonth": month, "lDay": day, "Animal": this.getAnimal(year), "IMonthCn": (isLeap ? "\u95F0" : "") + this.toChinaMonth(month), "IDayCn": this.toChinaDay(day), "cYear": y, "cMonth": m, "cDay": d, "gzYear": gzY, "gzMonth": gzM, "gzDay": gzD, "isToday": isToday, "isLeap": isLeap, "nWeek": nWeek, "ncWeek": "\u661F\u671F" + cWeek, "isTerm": isTerm, "Term": Term, "astro": astro }; + }, + lunar2solar: function(y, m, d, isLeapMonth) { + var isLeapMonth = !!isLeapMonth; + var leapMonth = this.leapMonth(y); + this.leapDays(y); + if (isLeapMonth && leapMonth != m) { + return -1; + } + if (y == 2100 && m == 12 && d > 1 || y == 1900 && m == 1 && d < 31) { + return -1; + } + var day = this.monthDays(y, m); + var _day = day; + if (isLeapMonth) { + _day = this.leapDays(y, m); + } + if (y < 1900 || y > 2100 || d > _day) { + return -1; + } + var offset = 0; + for (var i = 1900; i < y; i++) { + offset += this.lYearDays(i); + } + var leap = 0; + var isAdd = false; + for (var i = 1; i < m; i++) { + leap = this.leapMonth(y); + if (!isAdd) { + if (leap <= i && leap > 0) { + offset += this.leapDays(y); + isAdd = true; + } + } + offset += this.monthDays(y, i); + } + if (isLeapMonth) { + offset += day; + } + var stmap = Date.UTC(1900, 1, 30, 0, 0, 0); + var calObj = new Date((offset + d - 31) * 864e5 + stmap); + var cY = calObj.getUTCFullYear(); + var cM = calObj.getUTCMonth() + 1; + var cD = calObj.getUTCDate(); + return this.solar2lunar(cY, cM, cD); + } +}; +class Calendar { + constructor({ + date, + selected, + startDate, + endDate, + range + } = {}) { + this.date = this.getDate(new Date()); + this.selected = selected || []; + this.startDate = startDate; + this.endDate = endDate; + this.range = range; + this.cleanMultipleStatus(); + this.weeks = {}; + } + setDate(date) { + this.selectDate = this.getDate(date); + this._getWeek(this.selectDate.fullDate); + } + cleanMultipleStatus() { + this.multipleStatus = { + before: "", + after: "", + data: [] + }; + } + resetSatrtDate(startDate) { + this.startDate = startDate; + } + resetEndDate(endDate) { + this.endDate = endDate; + } + getDate(date, AddDayCount = 0, str = "day") { + if (!date) { + date = new Date(); + } + if (typeof date !== "object") { + date = date.replace(/-/g, "/"); + } + const dd = new Date(date); + switch (str) { + case "day": + dd.setDate(dd.getDate() + AddDayCount); + break; + case "month": + if (dd.getDate() === 31) { + dd.setDate(dd.getDate() + AddDayCount); + } else { + dd.setMonth(dd.getMonth() + AddDayCount); + } + break; + case "year": + dd.setFullYear(dd.getFullYear() + AddDayCount); + break; + } + const y = dd.getFullYear(); + const m = dd.getMonth() + 1 < 10 ? "0" + (dd.getMonth() + 1) : dd.getMonth() + 1; + const d = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate(); + return { + fullDate: y + "-" + m + "-" + d, + year: y, + month: m, + date: d, + day: dd.getDay() + }; + } + _getLastMonthDays(firstDay, full) { + let dateArr = []; + for (let i = firstDay; i > 0; i--) { + const beforeDate = new Date(full.year, full.month - 1, -i + 1).getDate(); + dateArr.push({ + date: beforeDate, + month: full.month - 1, + lunar: this.getlunar(full.year, full.month - 1, beforeDate), + disable: true + }); + } + return dateArr; + } + _currentMonthDys(dateData, full) { + let dateArr = []; + let fullDate = this.date.fullDate; + for (let i = 1; i <= dateData; i++) { + let nowDate = full.year + "-" + (full.month < 10 ? full.month : full.month) + "-" + (i < 10 ? "0" + i : i); + let isDay = fullDate === nowDate; + let info = this.selected && this.selected.find((item) => { + if (this.dateEqual(nowDate, item.date)) { + return item; + } + }); + let disableBefore = true; + let disableAfter = true; + if (this.startDate) { + disableBefore = this.dateCompare(this.startDate, nowDate); + } + if (this.endDate) { + disableAfter = this.dateCompare(nowDate, this.endDate); + } + let multiples = this.multipleStatus.data; + let checked = false; + let multiplesStatus = -1; + if (this.range) { + if (multiples) { + multiplesStatus = multiples.findIndex((item) => { + return this.dateEqual(item, nowDate); + }); + } + if (multiplesStatus !== -1) { + checked = true; + } + } + let data = { + fullDate: nowDate, + year: full.year, + date: i, + multiple: this.range ? checked : false, + beforeMultiple: this.dateEqual(this.multipleStatus.before, nowDate), + afterMultiple: this.dateEqual(this.multipleStatus.after, nowDate), + month: full.month, + lunar: this.getlunar(full.year, full.month, i), + disable: !(disableBefore && disableAfter), + isDay + }; + if (info) { + data.extraInfo = info; + } + dateArr.push(data); + } + return dateArr; + } + _getNextMonthDays(surplus, full) { + let dateArr = []; + for (let i = 1; i < surplus + 1; i++) { + dateArr.push({ + date: i, + month: Number(full.month) + 1, + lunar: this.getlunar(full.year, Number(full.month) + 1, i), + disable: true + }); + } + return dateArr; + } + getInfo(date) { + if (!date) { + date = new Date(); + } + const dateInfo = this.canlender.find((item) => item.fullDate === this.getDate(date).fullDate); + return dateInfo; + } + dateCompare(startDate, endDate) { + startDate = new Date(startDate.replace("-", "/").replace("-", "/")); + endDate = new Date(endDate.replace("-", "/").replace("-", "/")); + if (startDate <= endDate) { + return true; + } else { + return false; + } + } + dateEqual(before, after) { + before = new Date(before.replace("-", "/").replace("-", "/")); + after = new Date(after.replace("-", "/").replace("-", "/")); + if (before.getTime() - after.getTime() === 0) { + return true; + } else { + return false; + } + } + geDateAll(begin, end) { + var arr = []; + var ab = begin.split("-"); + var ae = end.split("-"); + var db = new Date(); + db.setFullYear(ab[0], ab[1] - 1, ab[2]); + var de = new Date(); + de.setFullYear(ae[0], ae[1] - 1, ae[2]); + var unixDb = db.getTime() - 24 * 60 * 60 * 1e3; + var unixDe = de.getTime() - 24 * 60 * 60 * 1e3; + for (var k = unixDb; k <= unixDe; ) { + k = k + 24 * 60 * 60 * 1e3; + arr.push(this.getDate(new Date(parseInt(k))).fullDate); + } + return arr; + } + getlunar(year, month, date) { + return calendar$1.solar2lunar(year, month, date); + } + setSelectInfo(data, value) { + this.selected = value; + this._getWeek(data); + } + setMultiple(fullDate) { + let { + before, + after + } = this.multipleStatus; + if (!this.range) + return; + if (before && after) { + this.multipleStatus.before = ""; + this.multipleStatus.after = ""; + this.multipleStatus.data = []; + } else { + if (!before) { + this.multipleStatus.before = fullDate; + } else { + this.multipleStatus.after = fullDate; + if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) { + this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after); + } else { + this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before); + } + } + } + this._getWeek(fullDate); + } + _getWeek(dateData) { + const { + fullDate, + year, + month, + date, + day + } = this.getDate(dateData); + let firstDay = new Date(year, month - 1, 1).getDay(); + let currentDay = new Date(year, month, 0).getDate(); + let dates = { + lastMonthDays: this._getLastMonthDays(firstDay, this.getDate(dateData)), + currentMonthDys: this._currentMonthDys(currentDay, this.getDate(dateData)), + nextMonthDays: [], + weeks: [] + }; + let canlender = []; + const surplus = 42 - (dates.lastMonthDays.length + dates.currentMonthDys.length); + dates.nextMonthDays = this._getNextMonthDays(surplus, this.getDate(dateData)); + canlender = canlender.concat(dates.lastMonthDays, dates.currentMonthDys, dates.nextMonthDays); + let weeks = {}; + for (let i = 0; i < canlender.length; i++) { + if (i % 7 === 0) { + weeks[parseInt(i / 7)] = new Array(7); + } + weeks[parseInt(i / 7)][i % 7] = canlender[i]; + } + this.canlender = canlender; + this.weeks = weeks; + } +} +var en = { + "uni-calender.ok": "ok", + "uni-calender.cancel": "cancel", + "uni-calender.today": "today", + "uni-calender.MON": "MON", + "uni-calender.TUE": "TUE", + "uni-calender.WED": "WED", + "uni-calender.THU": "THU", + "uni-calender.FRI": "FRI", + "uni-calender.SAT": "SAT", + "uni-calender.SUN": "SUN" +}; +var zhHans = { + "uni-calender.ok": "\u786E\u5B9A", + "uni-calender.cancel": "\u53D6\u6D88", + "uni-calender.today": "\u4ECA\u65E5", + "uni-calender.SUN": "\u65E5", + "uni-calender.MON": "\u4E00", + "uni-calender.TUE": "\u4E8C", + "uni-calender.WED": "\u4E09", + "uni-calender.THU": "\u56DB", + "uni-calender.FRI": "\u4E94", + "uni-calender.SAT": "\u516D" +}; +var zhHant = { + "uni-calender.ok": "\u78BA\u5B9A", + "uni-calender.cancel": "\u53D6\u6D88", + "uni-calender.today": "\u4ECA\u65E5", + "uni-calender.SUN": "\u65E5", + "uni-calender.MON": "\u4E00", + "uni-calender.TUE": "\u4E8C", + "uni-calender.WED": "\u4E09", + "uni-calender.THU": "\u56DB", + "uni-calender.FRI": "\u4E94", + "uni-calender.SAT": "\u516D" +}; +var messages = { + en, + "zh-Hans": zhHans, + "zh-Hant": zhHant +}; +var _style_0$2 = { "uni-calendar-item__weeks-box": { "": { "flex": 1, "flexDirection": "column", "justifyContent": "center", "alignItems": "center" } }, "uni-calendar-item__weeks-box-text": { "": { "fontSize": "28rpx", "color": "#333333" } }, "uni-calendar-item__weeks-lunar-text": { "": { "fontSize": "24rpx", "color": "#333333" } }, "uni-calendar-item__weeks-box-item": { "": { "position": "relative", "flexDirection": "column", "justifyContent": "center", "alignItems": "center", "width": "100rpx", "height": "100rpx" } }, "uni-calendar-item__weeks-box-circle": { "": { "position": "absolute", "top": 5, "right": 5, "width": 8, "height": 8, "borderRadius": 8, "backgroundColor": "#dd524d" } }, "uni-calendar-item--disable": { "": { "backgroundColor": "rgba(249,249,249,0.3)", "color": "#c0c0c0" } }, "uni-calendar-item--isDay-text": { "": { "color": "#007aff" } }, "uni-calendar-item--isDay": { "": { "backgroundColor": "#007aff", "opacity": 0.8, "color": "#ffffff" } }, "uni-calendar-item--extra": { "": { "color": "#dd524d", "opacity": 0.8 } }, "uni-calendar-item--checked": { "": { "backgroundColor": "#007aff", "color": "#ffffff", "opacity": 0.8 } }, "uni-calendar-item--multiple": { "": { "backgroundColor": "#007aff", "color": "#ffffff", "opacity": 0.8 } }, "uni-calendar-item--before-checked": { "": { "backgroundColor": "#ff5a5f", "color": "#ffffff" } }, "uni-calendar-item--after-checked": { "": { "backgroundColor": "#ff5a5f", "color": "#ffffff" } } }; +const { t: t$1 } = initVueI18n(messages); +const _sfc_main$2 = { + emits: ["change"], + props: { + weeks: { + type: Object, + default() { + return {}; + } + }, + calendar: { + type: Object, + default: () => { + return {}; + } + }, + selected: { + type: Array, + default: () => { + return []; + } + }, + lunar: { + type: Boolean, + default: false + } + }, + computed: { + todayText() { + return t$1("uni-calender.today"); + } + }, + methods: { + choiceDate(weeks) { + this.$emit("change", weeks); + } + } +}; +function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("view", { + class: normalizeClass(["uni-calendar-item__weeks-box", { + "uni-calendar-item--disable": $props.weeks.disable, + "uni-calendar-item--isDay": $props.calendar.fullDate === $props.weeks.fullDate && $props.weeks.isDay, + "uni-calendar-item--checked": $props.calendar.fullDate === $props.weeks.fullDate && !$props.weeks.isDay, + "uni-calendar-item--before-checked": $props.weeks.beforeMultiple, + "uni-calendar-item--multiple": $props.weeks.multiple, + "uni-calendar-item--after-checked": $props.weeks.afterMultiple + }]), + onClick: _cache[0] || (_cache[0] = ($event) => $options.choiceDate($props.weeks)) + }, [ + createElementVNode("view", { class: "uni-calendar-item__weeks-box-item" }, [ + $props.selected && $props.weeks.extraInfo ? (openBlock(), createElementBlock("u-text", { + key: 0, + class: "uni-calendar-item__weeks-box-circle" + })) : createCommentVNode("v-if", true), + createElementVNode("u-text", { + class: normalizeClass(["uni-calendar-item__weeks-box-text", { + "uni-calendar-item--isDay-text": $props.weeks.isDay, + "uni-calendar-item--isDay": $props.calendar.fullDate === $props.weeks.fullDate && $props.weeks.isDay, + "uni-calendar-item--checked": $props.calendar.fullDate === $props.weeks.fullDate && !$props.weeks.isDay, + "uni-calendar-item--before-checked": $props.weeks.beforeMultiple, + "uni-calendar-item--multiple": $props.weeks.multiple, + "uni-calendar-item--after-checked": $props.weeks.afterMultiple, + "uni-calendar-item--disable": $props.weeks.disable + }]) + }, toDisplayString($props.weeks.date), 3), + !$props.lunar && !$props.weeks.extraInfo && $props.weeks.isDay ? (openBlock(), createElementBlock("u-text", { + key: 1, + class: normalizeClass(["uni-calendar-item__weeks-lunar-text", { + "uni-calendar-item--isDay-text": $props.weeks.isDay, + "uni-calendar-item--isDay": $props.calendar.fullDate === $props.weeks.fullDate && $props.weeks.isDay, + "uni-calendar-item--checked": $props.calendar.fullDate === $props.weeks.fullDate && !$props.weeks.isDay, + "uni-calendar-item--before-checked": $props.weeks.beforeMultiple, + "uni-calendar-item--multiple": $props.weeks.multiple, + "uni-calendar-item--after-checked": $props.weeks.afterMultiple + }]) + }, toDisplayString($options.todayText), 3)) : createCommentVNode("v-if", true), + $props.lunar && !$props.weeks.extraInfo ? (openBlock(), createElementBlock("u-text", { + key: 2, + class: normalizeClass(["uni-calendar-item__weeks-lunar-text", { + "uni-calendar-item--isDay-text": $props.weeks.isDay, + "uni-calendar-item--isDay": $props.calendar.fullDate === $props.weeks.fullDate && $props.weeks.isDay, + "uni-calendar-item--checked": $props.calendar.fullDate === $props.weeks.fullDate && !$props.weeks.isDay, + "uni-calendar-item--before-checked": $props.weeks.beforeMultiple, + "uni-calendar-item--multiple": $props.weeks.multiple, + "uni-calendar-item--after-checked": $props.weeks.afterMultiple, + "uni-calendar-item--disable": $props.weeks.disable + }]) + }, toDisplayString($props.weeks.isDay ? $options.todayText : $props.weeks.lunar.IDayCn === "\u521D\u4E00" ? $props.weeks.lunar.IMonthCn : $props.weeks.lunar.IDayCn), 3)) : createCommentVNode("v-if", true), + $props.weeks.extraInfo && $props.weeks.extraInfo.info ? (openBlock(), createElementBlock("u-text", { + key: 3, + class: normalizeClass(["uni-calendar-item__weeks-lunar-text", { + "uni-calendar-item--extra": $props.weeks.extraInfo.info, + "uni-calendar-item--isDay-text": $props.weeks.isDay, + "uni-calendar-item--isDay": $props.calendar.fullDate === $props.weeks.fullDate && $props.weeks.isDay, + "uni-calendar-item--checked": $props.calendar.fullDate === $props.weeks.fullDate && !$props.weeks.isDay, + "uni-calendar-item--before-checked": $props.weeks.beforeMultiple, + "uni-calendar-item--multiple": $props.weeks.multiple, + "uni-calendar-item--after-checked": $props.weeks.afterMultiple, + "uni-calendar-item--disable": $props.weeks.disable + }]) + }, toDisplayString($props.weeks.extraInfo.info), 3)) : createCommentVNode("v-if", true) + ]) + ], 2); +} +var calendarItem = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["styles", [_style_0$2]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue"]]); +var _style_0$1 = { "uni-calendar": { "": { "flexDirection": "column" } }, "uni-calendar__mask": { "": { "position": "fixed", "bottom": 0, "top": 0, "left": 0, "right": 0, "backgroundColor": "rgba(0,0,0,0.4)", "transitionProperty": "opacity", "transitionDuration": 300, "opacity": 0 } }, "uni-calendar--mask-show": { "": { "opacity": 1 } }, "uni-calendar--fixed": { "": { "position": "fixed", "bottom": 0, "left": 0, "right": 0, "transitionProperty": "transform", "transitionDuration": 300, "transform": "translateY(460px)" } }, "uni-calendar--ani-show": { "": { "transform": "translateY(0)" } }, "uni-calendar__content": { "": { "backgroundColor": "#ffffff" } }, "uni-calendar__header": { "": { "position": "relative", "flexDirection": "row", "justifyContent": "center", "alignItems": "center", "height": 50, "borderBottomColor": "#c8c7cc", "borderBottomStyle": "solid", "borderBottomWidth": 1 } }, "uni-calendar--fixed-top": { "": { "flexDirection": "row", "justifyContent": "space-between", "borderTopColor": "#c8c7cc", "borderTopStyle": "solid", "borderTopWidth": 1 } }, "uni-calendar--fixed-width": { "": { "width": 50 } }, "uni-calendar__backtoday": { "": { "position": "absolute", "right": 0, "top": "25rpx", "paddingTop": 0, "paddingRight": 5, "paddingBottom": 0, "paddingLeft": 10, "height": 25, "lineHeight": 25, "fontSize": 12, "borderTopLeftRadius": 25, "borderBottomLeftRadius": 25, "color": "#333333", "backgroundColor": "#f1f1f1" } }, "uni-calendar__header-text": { "": { "textAlign": "center", "width": 100, "fontSize": "28rpx", "color": "#333333" } }, "uni-calendar__header-btn-box": { "": { "flexDirection": "row", "alignItems": "center", "justifyContent": "center", "width": 50, "height": 50 } }, "uni-calendar__header-btn": { "": { "width": 10, "height": 10, "borderLeftColor": "#808080", "borderLeftStyle": "solid", "borderLeftWidth": 2, "borderTopColor": "#555555", "borderTopStyle": "solid", "borderTopWidth": 2 } }, "uni-calendar--left": { "": { "transform": "rotate(-45deg)" } }, "uni-calendar--right": { "": { "transform": "rotate(135deg)" } }, "uni-calendar__weeks": { "": { "position": "relative", "flexDirection": "row" } }, "uni-calendar__weeks-item": { "": { "flex": 1 } }, "uni-calendar__weeks-day": { "": { "flex": 1, "flexDirection": "column", "justifyContent": "center", "alignItems": "center", "height": 45, "borderBottomColor": "#F5F5F5", "borderBottomStyle": "solid", "borderBottomWidth": 1 } }, "uni-calendar__weeks-day-text": { "": { "fontSize": 14 } }, "uni-calendar__box": { "": { "position": "relative" } }, "uni-calendar__box-bg": { "": { "justifyContent": "center", "alignItems": "center", "position": "absolute", "top": 0, "left": 0, "right": 0, "bottom": 0 } }, "uni-calendar__box-bg-text": { "": { "fontSize": 200, "fontWeight": "bold", "color": "#999999", "opacity": 0.1, "textAlign": "center" } }, "@TRANSITION": { "uni-calendar__mask": { "property": "opacity", "duration": 300 }, "uni-calendar--fixed": { "property": "transform", "duration": 300 } } }; +const { t } = initVueI18n(messages); +const _sfc_main$1 = { + components: { + calendarItem + }, + emits: ["close", "confirm", "change", "monthSwitch"], + props: { + date: { + type: String, + default: "" + }, + selected: { + type: Array, + default() { + return []; + } + }, + lunar: { + type: Boolean, + default: false + }, + startDate: { + type: String, + default: "" + }, + endDate: { + type: String, + default: "" + }, + range: { + type: Boolean, + default: false + }, + insert: { + type: Boolean, + default: true + }, + showMonth: { + type: Boolean, + default: true + }, + clearDate: { + type: Boolean, + default: true + } + }, + data() { + return { + show: false, + weeks: [], + calendar: {}, + nowDate: "", + aniMaskShow: false + }; + }, + computed: { + okText() { + return t("uni-calender.ok"); + }, + cancelText() { + return t("uni-calender.cancel"); + }, + todayText() { + return t("uni-calender.today"); + }, + monText() { + return t("uni-calender.MON"); + }, + TUEText() { + return t("uni-calender.TUE"); + }, + WEDText() { + return t("uni-calender.WED"); + }, + THUText() { + return t("uni-calender.THU"); + }, + FRIText() { + return t("uni-calender.FRI"); + }, + SATText() { + return t("uni-calender.SAT"); + }, + SUNText() { + return t("uni-calender.SUN"); + } + }, + watch: { + date(newVal) { + this.init(newVal); + }, + startDate(val) { + this.cale.resetSatrtDate(val); + this.cale.setDate(this.nowDate.fullDate); + this.weeks = this.cale.weeks; + }, + endDate(val) { + this.cale.resetEndDate(val); + this.cale.setDate(this.nowDate.fullDate); + this.weeks = this.cale.weeks; + }, + selected(newVal) { + this.cale.setSelectInfo(this.nowDate.fullDate, newVal); + this.weeks = this.cale.weeks; + } + }, + created() { + this.cale = new Calendar({ + selected: this.selected, + startDate: this.startDate, + endDate: this.endDate, + range: this.range + }); + this.init(this.date); + }, + methods: { + clean() { + }, + bindDateChange(e) { + const value = e.detail.value + "-1"; + formatAppLog("log", "at uni_modules/uni-calendar/components/uni-calendar/uni-calendar.vue:220", this.cale.getDate(value)); + this.init(value); + }, + init(date) { + this.cale.setDate(date); + this.weeks = this.cale.weeks; + this.nowDate = this.calendar = this.cale.getInfo(date); + }, + open() { + if (this.clearDate && !this.insert) { + this.cale.cleanMultipleStatus(); + this.init(this.date); + } + this.show = true; + this.$nextTick(() => { + setTimeout(() => { + this.aniMaskShow = true; + }, 50); + }); + }, + close() { + this.aniMaskShow = false; + this.$nextTick(() => { + setTimeout(() => { + this.show = false; + this.$emit("close"); + }, 300); + }); + }, + confirm() { + this.setEmit("confirm"); + this.close(); + }, + change() { + if (!this.insert) + return; + this.setEmit("change"); + }, + monthSwitch() { + let { + year, + month + } = this.nowDate; + this.$emit("monthSwitch", { + year, + month: Number(month) + }); + }, + setEmit(name) { + let { + year, + month, + date, + fullDate, + lunar, + extraInfo + } = this.calendar; + this.$emit(name, { + range: this.cale.multipleStatus, + year, + month, + date, + fulldate: fullDate, + lunar, + extraInfo: extraInfo || {} + }); + }, + choiceDate(weeks) { + if (weeks.disable) + return; + this.calendar = weeks; + this.cale.setMultiple(this.calendar.fullDate); + this.weeks = this.cale.weeks; + this.change(); + }, + backtoday() { + formatAppLog("log", "at uni_modules/uni-calendar/components/uni-calendar/uni-calendar.vue:327", this.cale.getDate(new Date()).fullDate); + let date = this.cale.getDate(new Date()).fullDate; + this.init(date); + this.change(); + }, + pre() { + const preDate = this.cale.getDate(this.nowDate.fullDate, -1, "month").fullDate; + this.setDate(preDate); + this.monthSwitch(); + }, + next() { + const nextDate = this.cale.getDate(this.nowDate.fullDate, 1, "month").fullDate; + this.setDate(nextDate); + this.monthSwitch(); + }, + setDate(date) { + this.cale.setDate(date); + this.weeks = this.cale.weeks; + this.nowDate = this.cale.getInfo(date); + } + } +}; +function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { + const _component_picker = resolveComponent("picker"); + const _component_calendar_item = resolveComponent("calendar-item"); + return openBlock(), createElementBlock("view", { class: "uni-calendar" }, [ + !$props.insert && $data.show ? (openBlock(), createElementBlock("view", { + key: 0, + class: normalizeClass(["uni-calendar__mask", { "uni-calendar--mask-show": $data.aniMaskShow }]), + onClick: _cache[0] || (_cache[0] = (...args) => $options.clean && $options.clean(...args)) + }, null, 2)) : createCommentVNode("v-if", true), + $props.insert || $data.show ? (openBlock(), createElementBlock("view", { + key: 1, + class: normalizeClass(["uni-calendar__content", { "uni-calendar--fixed": !$props.insert, "uni-calendar--ani-show": $data.aniMaskShow }]) + }, [ + !$props.insert ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-calendar__header uni-calendar--fixed-top" + }, [ + createElementVNode("view", { + class: "uni-calendar__header-btn-box", + onClick: _cache[1] || (_cache[1] = (...args) => $options.close && $options.close(...args)) + }, [ + createElementVNode("u-text", { class: "uni-calendar__header-text uni-calendar--fixed-width" }, toDisplayString($options.cancelText), 1) + ]), + createElementVNode("view", { + class: "uni-calendar__header-btn-box", + onClick: _cache[2] || (_cache[2] = (...args) => $options.confirm && $options.confirm(...args)) + }, [ + createElementVNode("u-text", { class: "uni-calendar__header-text uni-calendar--fixed-width" }, toDisplayString($options.okText), 1) + ]) + ])) : createCommentVNode("v-if", true), + createElementVNode("view", { class: "uni-calendar__header" }, [ + createElementVNode("view", { + class: "uni-calendar__header-btn-box", + onClick: _cache[3] || (_cache[3] = withModifiers((...args) => $options.pre && $options.pre(...args), ["stop"])) + }, [ + createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--left" }) + ]), + createVNode(_component_picker, { + mode: "date", + value: $props.date, + fields: "month", + onChange: $options.bindDateChange + }, { + default: withCtx(() => [ + createElementVNode("u-text", { class: "uni-calendar__header-text" }, toDisplayString(($data.nowDate.year || "") + " / " + ($data.nowDate.month || "")), 1) + ]), + _: 1 + }, 8, ["value", "onChange"]), + createElementVNode("view", { + class: "uni-calendar__header-btn-box", + onClick: _cache[4] || (_cache[4] = withModifiers((...args) => $options.next && $options.next(...args), ["stop"])) + }, [ + createElementVNode("view", { class: "uni-calendar__header-btn uni-calendar--right" }) + ]), + createElementVNode("u-text", { + class: "uni-calendar__backtoday", + onClick: _cache[5] || (_cache[5] = (...args) => $options.backtoday && $options.backtoday(...args)) + }, toDisplayString($options.todayText), 1) + ]), + createElementVNode("view", { class: "uni-calendar__box" }, [ + $props.showMonth ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-calendar__box-bg" + }, [ + createElementVNode("u-text", { class: "uni-calendar__box-bg-text" }, toDisplayString($data.nowDate.month), 1) + ])) : createCommentVNode("v-if", true), + createElementVNode("view", { class: "uni-calendar__weeks" }, [ + createElementVNode("view", { class: "uni-calendar__weeks-day" }, [ + createElementVNode("u-text", { class: "uni-calendar__weeks-day-text" }, toDisplayString($options.SUNText), 1) + ]), + createElementVNode("view", { class: "uni-calendar__weeks-day" }, [ + createElementVNode("u-text", { class: "uni-calendar__weeks-day-text" }, toDisplayString($options.monText), 1) + ]), + createElementVNode("view", { class: "uni-calendar__weeks-day" }, [ + createElementVNode("u-text", { class: "uni-calendar__weeks-day-text" }, toDisplayString($options.TUEText), 1) + ]), + createElementVNode("view", { class: "uni-calendar__weeks-day" }, [ + createElementVNode("u-text", { class: "uni-calendar__weeks-day-text" }, toDisplayString($options.WEDText), 1) + ]), + createElementVNode("view", { class: "uni-calendar__weeks-day" }, [ + createElementVNode("u-text", { class: "uni-calendar__weeks-day-text" }, toDisplayString($options.THUText), 1) + ]), + createElementVNode("view", { class: "uni-calendar__weeks-day" }, [ + createElementVNode("u-text", { class: "uni-calendar__weeks-day-text" }, toDisplayString($options.FRIText), 1) + ]), + createElementVNode("view", { class: "uni-calendar__weeks-day" }, [ + createElementVNode("u-text", { class: "uni-calendar__weeks-day-text" }, toDisplayString($options.SATText), 1) + ]) + ]), + (openBlock(true), createElementBlock(Fragment, null, renderList($data.weeks, (item, weekIndex) => { + return openBlock(), createElementBlock("view", { + class: "uni-calendar__weeks", + key: weekIndex + }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList(item, (weeks, weeksIndex) => { + return openBlock(), createElementBlock("view", { + class: "uni-calendar__weeks-item", + key: weeksIndex + }, [ + createVNode(_component_calendar_item, { + class: "uni-calendar-item--hook", + weeks, + calendar: $data.calendar, + selected: $props.selected, + lunar: $props.lunar, + onChange: $options.choiceDate + }, null, 8, ["weeks", "calendar", "selected", "lunar", "onChange"]) + ]); + }), 128)) + ]); + }), 128)) + ]) + ], 2)) : createCommentVNode("v-if", true) + ]); +} +var __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["styles", [_style_0$1]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-calendar/components/uni-calendar/uni-calendar.vue"]]); +var _style_0 = { "example-body": { "": { "flexDirection": "row" } }, "calendar-button": { "": { "flex": 1, "fontWeight": "bold", "fontSize": "32rpx" } } }; +function getDate(date, AddDayCount = 0) { + if (!date) { + date = new Date(); + } + if (typeof date !== "object") { + date = date.replace(/-/g, "/"); + } + const dd = new Date(date); + dd.setDate(dd.getDate() + AddDayCount); + const y = dd.getFullYear(); + const m = dd.getMonth() + 1 < 10 ? "0" + (dd.getMonth() + 1) : dd.getMonth() + 1; + const d = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate(); + return { + fullDate: y + "-" + m + "-" + d, + year: y, + month: m, + date: d, + day: dd.getDay() + }; +} +const _sfc_main = { + components: {}, + data() { + return { + showCalendar: false, + info: { + lunar: true, + range: true, + insert: false, + selected: [] + } + }; + }, + onReady() { + this.$nextTick(() => { + this.showCalendar = true; + }); + setTimeout(() => { + this.info.date = getDate(new Date(), -30).fullDate; + this.info.startDate = getDate(new Date(), -60).fullDate; + this.info.endDate = getDate(new Date(), 30).fullDate; + this.info.selected = [ + { + date: getDate(new Date(), -3).fullDate, + info: "\u6253\u5361" + }, + { + date: getDate(new Date(), -2).fullDate, + info: "\u7B7E\u5230", + data: { + custom: "\u81EA\u5B9A\u4E49\u4FE1\u606F", + name: "\u81EA\u5B9A\u4E49\u6D88\u606F\u5934" + } + }, + { + date: getDate(new Date(), -1).fullDate, + info: "\u5DF2\u6253\u5361" + } + ]; + }, 2e3); + }, + methods: { + open() { + this.$refs.calendar.open(); + }, + close() { + formatAppLog("log", "at pages/extUI/calendar/calendar.nvue:90", "\u5F39\u7A97\u5173\u95ED"); + }, + change(e) { + formatAppLog("log", "at pages/extUI/calendar/calendar.nvue:93", "change \u8FD4\u56DE:", e); + if (this.info.selected.length > 5) + return; + this.info.selected.push({ + date: e.fulldate, + info: "\u6253\u5361" + }); + }, + confirm(e) { + formatAppLog("log", "at pages/extUI/calendar/calendar.nvue:102", "confirm \u8FD4\u56DE:", e); + }, + monthSwitch(e) { + formatAppLog("log", "at pages/extUI/calendar/calendar.nvue:105", "monthSwitchs \u8FD4\u56DE:", e); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_section = resolveEasycom(resolveDynamicComponent("uni-section"), __easycom_2); + const _component_uni_calendar = resolveEasycom(resolveDynamicComponent("uni-calendar"), __easycom_1); + const _component_button = resolveComponent("button"); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + $data.showCalendar ? (openBlock(), createElementBlock("view", { + key: 0, + class: "calendar-content" + }, [ + createElementVNode("u-text", { class: "example-info" }, "\u65E5\u5386\u7EC4\u4EF6\u53EF\u4EE5\u67E5\u770B\u65E5\u671F\uFF0C\u9009\u62E9\u4EFB\u610F\u8303\u56F4\u5185\u7684\u65E5\u671F\uFF0C\u6253\u70B9\u64CD\u4F5C\u3002\u5E38\u7528\u573A\u666F\u5982\uFF1A\u9152\u5E97\u65E5\u671F\u9884\u8BA2\u3001\u706B\u8F66\u673A\u7968\u9009\u62E9\u8D2D\u4E70\u65E5\u671F\u3001\u4E0A\u4E0B\u73ED\u6253\u5361\u7B49\u3002"), + createVNode(_component_uni_section, { + title: "\u63D2\u5165\u6A21\u5F0F", + type: "line" + }), + createElementVNode("view", null, [ + createCommentVNode(" \u63D2\u5165\u6A21\u5F0F "), + createVNode(_component_uni_calendar, { + class: "uni-calendar--hook", + selected: $data.info.selected, + showMonth: false, + onChange: $options.change, + onMonthSwitch: $options.monthSwitch + }, null, 8, ["selected", "onChange", "onMonthSwitch"]) + ]), + createVNode(_component_uni_section, { + class: "hideOnPc", + title: "\u5F39\u51FA\u6A21\u5F0F", + type: "line" + }), + createElementVNode("view", { class: "example-body hideOnPc" }, [ + createVNode(_component_button, { + class: "calendar-button", + type: "button", + onClick: $options.open + }, { + default: withCtx(() => [ + createTextVNode("\u6253\u5F00\u65E5\u5386") + ]), + _: 1 + }, 8, ["onClick"]) + ]), + createVNode(_component_uni_calendar, { + ref: "calendar", + class: "uni-calendar--hook", + "clear-date": true, + date: $data.info.date, + insert: $data.info.insert, + lunar: $data.info.lunar, + startDate: $data.info.startDate, + endDate: $data.info.endDate, + range: $data.info.range, + onConfirm: $options.confirm, + onClose: $options.close + }, null, 8, ["date", "insert", "lunar", "startDate", "endDate", "range", "onConfirm", "onClose"]) + ])) : createCommentVNode("v-if", true) + ]); +} +var calendar = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/extUI/calendar/calendar.nvue"]]); +export { calendar as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/card/card.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/card/card.js new file mode 100644 index 000000000..46a92d7ff --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/card/card.js @@ -0,0 +1,343 @@ +import { f as formatAppLog } from "../../../uni-shared.es.js"; +import { _ as __easycom_0 } from "../../../uni-card.js"; +import { resolveDynamicComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, createCommentVNode } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as __easycom_2 } from "../../../uni-section.js"; +import { _ as __easycom_1 } from "../../../uni-icons.js"; +import { _ as __easycom_3, a as __easycom_4 } from "../../../uni-list.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import "../../../shared.esm-bundler.js"; +import "../../../uni-badge.js"; +var _style_0 = { "container": { "": { "overflow": "hidden" } }, "custom-cover": { "": { "flex": 1, "flexDirection": "row", "position": "relative" } }, "cover-content": { "": { "position": "absolute", "bottom": 0, "left": 0, "right": 0, "height": 40, "backgroundColor": "rgba(0,0,0,0.4)", "display": "flex", "flexDirection": "row", "alignItems": "center", "paddingLeft": 15, "fontSize": 14, "color": "#ffffff" } }, "card-actions": { "": { "display": "flex", "flexDirection": "row", "justifyContent": "space-around", "alignItems": "center", "height": 45, "borderTopWidth": 1, "borderTopStyle": "solid", "borderTopColor": "#eeeeee" } }, "card-actions-item": { "": { "display": "flex", "flexDirection": "row", "alignItems": "center" } }, "card-actions-item-text": { "": { "fontSize": 12, "color": "#666666", "marginLeft": 5 } }, "cover-image": { "": { "flex": 1, "height": 150 } }, "no-border": { "": { "borderWidth": 0 } } }; +const _sfc_main = { + components: {}, + data() { + return { + cover: "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/094a9dc0-50c0-11eb-b680-7980c8a877b8.jpg", + avatar: "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png", + extraIcon: { + color: "#4cd964", + size: "22", + type: "gear-filled" + } + }; + }, + methods: { + onClick(e) { + formatAppLog("log", "at pages/extUI/card/card.nvue:129", e); + }, + actionsClick(text) { + uni.showToast({ + title: text, + icon: "none" + }); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_card = resolveEasycom(resolveDynamicComponent("uni-card"), __easycom_0); + const _component_uni_section = resolveEasycom(resolveDynamicComponent("uni-section"), __easycom_2); + const _component_uni_icons = resolveEasycom(resolveDynamicComponent("uni-icons"), __easycom_1); + const _component_uni_list_item = resolveEasycom(resolveDynamicComponent("uni-list-item"), __easycom_3); + const _component_uni_list = resolveEasycom(resolveDynamicComponent("uni-list"), __easycom_4); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "container" }, [ + createVNode(_component_uni_card, { + "is-shadow": false, + "is-full": "" + }, { + default: withCtx(() => [ + createElementVNode("u-text", { class: "uni-h6" }, "\u5361\u7247\u7EC4\u4EF6\u901A\u7528\u6765\u663E\u793A\u5B8C\u6574\u72EC\u7ACB\u7684\u4E00\u6BB5\u4FE1\u606F\uFF0C\u540C\u65F6\u8BA9\u7528\u6237\u7406\u89E3\u4ED6\u7684\u4F5C\u7528\u3002\u4F8B\u5982\u4E00\u7BC7\u6587\u7AE0\u7684\u9884\u89C8\u56FE\u3001\u4F5C\u8005\u4FE1\u606F\u3001\u65F6\u95F4\u7B49\uFF0C\u5361\u7247\u901A\u5E38\u662F\u66F4\u590D\u6742\u548C\u66F4\u8BE6\u7EC6\u4FE1\u606F\u7684\u5165\u53E3\u70B9\u3002") + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u57FA\u7840\u5361\u7247", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_card, { "is-shadow": false }, { + default: withCtx(() => [ + createElementVNode("u-text", { class: "uni-body" }, "\u8FD9\u662F\u4E00\u4E2A\u57FA\u7840\u5361\u7247\u793A\u4F8B\uFF0C\u5185\u5BB9\u8F83\u5C11\uFF0C\u6B64\u793A\u4F8B\u5C55\u793A\u4E86\u4E00\u4E2A\u6CA1\u6709\u4EFB\u4F55\u5C5E\u6027\u4E0D\u5E26\u9634\u5F71\u7684\u5361\u7247\u3002") + ]), + _: 1 + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u5361\u7247\u6807\u9898+\u989D\u5916\u4FE1\u606F", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_card, { + title: "\u57FA\u7840\u5361\u7247", + extra: "\u989D\u5916\u4FE1\u606F" + }, { + default: withCtx(() => [ + createElementVNode("u-text", { class: "uni-body" }, "\u8FD9\u662F\u4E00\u4E2A\u57FA\u7840\u5361\u7247\u793A\u4F8B\uFF0C\u6B64\u793A\u4F8B\u5C55\u793A\u4E86\u4E00\u4E2A\u6807\u9898\u52A0\u6807\u9898\u989D\u5916\u4FE1\u606F\u7684\u6807\u51C6\u5361\u7247\u3002") + ]), + _: 1 + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u53CC\u6807\u9898\u5361\u7247", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_card, { + title: "\u57FA\u7840\u5361\u7247", + "sub-title": "\u526F\u6807\u9898", + extra: "\u989D\u5916\u4FE1\u606F", + thumbnail: $data.avatar, + onClick: $options.onClick + }, { + default: withCtx(() => [ + createElementVNode("u-text", { class: "uni-body" }, "\u8FD9\u662F\u4E00\u4E2A\u5E26\u5934\u50CF\u548C\u53CC\u6807\u9898\u7684\u57FA\u7840\u5361\u7247\uFF0C\u6B64\u793A\u4F8B\u5C55\u793A\u4E86\u4E00\u4E2A\u5B8C\u6574\u7684\u5361\u7247\u3002") + ]), + _: 1 + }, 8, ["thumbnail", "onClick"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u901A\u680F\u5361\u7247", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_card, { + title: "\u57FA\u7840\u5361\u7247", + isFull: true, + "sub-title": "\u526F\u6807\u9898", + extra: "\u989D\u5916\u4FE1\u606F", + thumbnail: $data.avatar + }, { + default: withCtx(() => [ + createElementVNode("u-text", { class: "uni-body" }, "\u8FD9\u662F\u4E00\u4E2A\u901A\u680F\u5361\u7247 \uFF0C\u901A\u680F\u6CA1\u6709\u5916\u8FB9\u8DDD\uFF0C\u5DE6\u53F3\u4F1A\u8D34\u5408\u7236\u5143\u7D20\u3002") + ]), + _: 1 + }, 8, ["thumbnail"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u5361\u7247\u5C01\u9762\u56FE+\u64CD\u4F5C\u680F", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_card, { + cover: $data.cover, + onClick: $options.onClick + }, { + default: withCtx(() => [ + createCommentVNode(` `), + createElementVNode("u-text", { class: "uni-body" }, "\u8FD9\u662F\u4E00\u4E2A\u5E26\u5C01\u9762\u548C\u64CD\u4F5C\u680F\u7684\u5361\u7247\u793A\u4F8B\uFF0C\u6B64\u793A\u4F8B\u5C55\u793A\u4E86\u5C01\u9762\u63D2\u69FD\u548C\u64CD\u4F5C\u680F\u63D2\u69FD\u7684\u7528\u6CD5\u3002"), + createElementVNode("view", { + slot: "actions", + class: "card-actions" + }, [ + createElementVNode("view", { + class: "card-actions-item", + onClick: _cache[0] || (_cache[0] = ($event) => $options.actionsClick("\u5206\u4EAB")) + }, [ + createVNode(_component_uni_icons, { + type: "redo", + size: "18", + color: "#999" + }), + createElementVNode("u-text", { class: "card-actions-item-text" }, "\u5206\u4EAB") + ]), + createElementVNode("view", { + class: "card-actions-item", + onClick: _cache[1] || (_cache[1] = ($event) => $options.actionsClick("\u70B9\u8D5E")) + }, [ + createVNode(_component_uni_icons, { + type: "heart", + size: "18", + color: "#999" + }), + createElementVNode("u-text", { class: "card-actions-item-text" }, "\u70B9\u8D5E") + ]), + createElementVNode("view", { + class: "card-actions-item", + onClick: _cache[2] || (_cache[2] = ($event) => $options.actionsClick("\u8BC4\u8BBA")) + }, [ + createVNode(_component_uni_icons, { + type: "chatbubble", + size: "18", + color: "#999" + }), + createElementVNode("u-text", { class: "card-actions-item-text" }, "\u8BC4\u8BBA") + ]) + ]) + ]), + _: 1 + }, 8, ["cover", "onClick"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u81EA\u5B9A\u4E49\u5361\u7247\u5185\u5BB9", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_card, { + title: "\u57FA\u7840\u5361\u7247", + "sub-title": "\u526F\u6807\u9898", + extra: "\u989D\u5916\u4FE1\u606F", + padding: "10px 0", + thumbnail: $data.avatar + }, { + title: withCtx(() => [ + createVNode(_component_uni_list, null, { + default: withCtx(() => [ + createVNode(_component_uni_list_item, { + "show-switch": true, + title: "\u81EA\u5B9A\u4E49\u6807\u9898" + }) + ]), + _: 1 + }) + ]), + default: withCtx(() => [ + createElementVNode("u-image", { + style: { "width": "100%" }, + src: $data.cover + }, null, 8, ["src"]), + createElementVNode("u-text", { class: "uni-body uni-mt-5" }, "\u5361\u7247\u7EC4\u4EF6\u901A\u7528\u6765\u663E\u793A\u5B8C\u6574\u72EC\u7ACB\u7684\u4E00\u6BB5\u4FE1\u606F\uFF0C\u540C\u65F6\u8BA9\u7528\u6237\u7406\u89E3\u4ED6\u7684\u4F5C\u7528\u3002\u4F8B\u5982\u4E00\u7BC7\u6587\u7AE0\u7684\u9884\u89C8\u56FE\u3001\u4F5C\u8005\u4FE1\u606F\u3001\u65F6\u95F4\u7B49\uFF0C\u5361\u7247\u901A\u5E38\u662F\u66F4\u590D\u6742\u548C\u66F4\u8BE6\u7EC6\u4FE1\u606F\u7684\u5165\u53E3\u70B9\u3002"), + createElementVNode("view", { + slot: "actions", + class: "card-actions" + }, [ + createElementVNode("view", { + class: "card-actions-item", + onClick: _cache[3] || (_cache[3] = ($event) => $options.actionsClick("\u5206\u4EAB")) + }, [ + createVNode(_component_uni_icons, { + type: "redo", + size: "18", + color: "#999" + }), + createElementVNode("u-text", { class: "card-actions-item-text" }, "\u5206\u4EAB") + ]), + createElementVNode("view", { + class: "card-actions-item", + onClick: _cache[4] || (_cache[4] = ($event) => $options.actionsClick("\u70B9\u8D5E")) + }, [ + createVNode(_component_uni_icons, { + type: "heart", + size: "18", + color: "#999" + }), + createElementVNode("u-text", { class: "card-actions-item-text" }, "\u70B9\u8D5E") + ]), + createElementVNode("view", { + class: "card-actions-item", + onClick: _cache[5] || (_cache[5] = ($event) => $options.actionsClick("\u8BC4\u8BBA")) + }, [ + createVNode(_component_uni_icons, { + type: "chatbubble", + size: "18", + color: "#999" + }), + createElementVNode("u-text", { class: "card-actions-item-text" }, "\u8BC4\u8BBA") + ]) + ]) + ]), + _: 1 + }, 8, ["thumbnail"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u5361\u7247+\u5217\u8868", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_card, { + padding: "0", + spacing: "0" + }, { + cover: withCtx(() => [ + createElementVNode("view", { class: "custom-cover" }, [ + createElementVNode("u-image", { + class: "cover-image", + mode: "aspectFill", + src: $data.cover + }, null, 8, ["src"]), + createElementVNode("view", { class: "cover-content" }, [ + createElementVNode("u-text", { class: "uni-subtitle uni-white" }, "\u4ECA\u65E5\u65B0\u95FB\u70ED\u70B9") + ]) + ]) + ]), + default: withCtx(() => [ + createVNode(_component_uni_list, null, { + default: withCtx(() => [ + createVNode(_component_uni_list_item, { + title: "\u4ECA\u65E5\u65B0\u95FB", + showArrow: "" + }), + createVNode(_component_uni_list_item, { + title: "\u4ECA\u65E5\u65B0\u95FB", + showArrow: "" + }) + ]), + _: 1 + }), + createElementVNode("view", { + slot: "actions", + class: "card-actions no-border" + }, [ + createElementVNode("view", { + class: "card-actions-item", + onClick: _cache[6] || (_cache[6] = ($event) => $options.actionsClick("\u5206\u4EAB")) + }, [ + createVNode(_component_uni_icons, { + type: "redo", + size: "18", + color: "#999" + }), + createElementVNode("u-text", { class: "card-actions-item-text" }, "\u5206\u4EAB") + ]), + createElementVNode("view", { + class: "card-actions-item", + onClick: _cache[7] || (_cache[7] = ($event) => $options.actionsClick("\u70B9\u8D5E")) + }, [ + createVNode(_component_uni_icons, { + type: "heart", + size: "18", + color: "#999" + }), + createElementVNode("u-text", { class: "card-actions-item-text" }, "\u70B9\u8D5E") + ]), + createElementVNode("view", { + class: "card-actions-item", + onClick: _cache[8] || (_cache[8] = ($event) => $options.actionsClick("\u8BC4\u8BBA")) + }, [ + createVNode(_component_uni_icons, { + type: "chatbubble", + size: "18", + color: "#999" + }), + createElementVNode("u-text", { class: "card-actions-item-text" }, "\u8BC4\u8BBA") + ]) + ]) + ]), + _: 1 + }) + ]), + _: 1 + }) + ]) + ]); +} +var card = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/extUI/card/card.nvue"]]); +export { card as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/color/color.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/color/color.js new file mode 100644 index 000000000..5a453defd --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/color/color.js @@ -0,0 +1,213 @@ +import { _ as __easycom_0 } from "../../../uni-card.js"; +import { resolveDynamicComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as __easycom_2 } from "../../../uni-section.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import "../../../shared.esm-bundler.js"; +var _style_0 = { "box": { "": { "display": "flex", "flexDirection": "column", "fontSize": 14, "overflow": "hidden" } }, "item-box": { ".box ": { "display": "flex", "alignItems": "center", "justifyContent": "center", "flexDirection": "row", "height": 50, "overflow": "hidden" } }, "item": { ".box .item-box ": { "display": "flex", "alignItems": "center", "justifyContent": "center", "flex": 1, "height": 50 } }, "box-base": { "": { "display": "flex", "alignItems": "center", "justifyContent": "center", "height": 50 } } }; +const _sfc_main = { + data() { + return {}; + }, + computed: {}, + onLoad() { + }, + methods: {} +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_card = resolveEasycom(resolveDynamicComponent("uni-card"), __easycom_0); + const _component_uni_section = resolveEasycom(resolveDynamicComponent("uni-section"), __easycom_2); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "container" }, [ + createVNode(_component_uni_card, { + "is-shadow": false, + "is-full": "" + }, { + default: withCtx(() => [ + createElementVNode("u-text", { class: "uni-h6" }, "uni-ui \u89C4\u8303\u989C\u8272\u8272\u677F\uFF0C\u901A\u8FC7\u5185\u7F6E\u6837\u5F0F\u5FEB\u901F\u6307\u5B9A\u5143\u7D20\u524D\u666F\u548C\u80CC\u666F\u8272\u3002") + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u4E3B\u8272", + type: "line" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "uni-ma-5" }, [ + createElementVNode("view", { class: "box uni-radius" }, [ + createElementVNode("view", { class: "item-box uni-primary-bg" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "primary") + ]), + createElementVNode("view", { class: "item-box" }, [ + createElementVNode("view", { class: "item uni-primary-disable-bg" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "disable") + ]), + createElementVNode("view", { class: "item uni-primary-light-bg" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "light") + ]) + ]) + ]) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u8F85\u52A9\u8272", + "sub-title": "\u9664\u4E86\u4E3B\u8272\u5916\u7684\u573A\u666F\u8272\uFF0C\u9700\u8981\u5728\u4E0D\u540C\u7684\u573A\u666F\u4E2D\u4F7F\u7528\uFF08\u4F8B\u5982\u5371\u9669\u8272\u8868\u793A\u5371\u9669\u7684\u64CD\u4F5C\uFF09\u3002", + type: "line" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "uni-ma-5" }, [ + createElementVNode("view", { class: "box uni-radius" }, [ + createElementVNode("view", { class: "item-box uni-success-bg" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "success") + ]), + createElementVNode("view", { class: "item-box" }, [ + createElementVNode("view", { class: "item uni-success-disable-bg" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "disable") + ]), + createElementVNode("view", { class: "item uni-success-light-bg" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "light") + ]) + ]) + ]), + createElementVNode("view", { class: "box uni-mt-5 uni-radius" }, [ + createElementVNode("view", { class: "item-box uni-warning-bg" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "warning") + ]), + createElementVNode("view", { class: "item-box" }, [ + createElementVNode("view", { class: "item uni-warning-disable-bg" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "disable") + ]), + createElementVNode("view", { class: "item uni-warning-light-bg" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "light") + ]) + ]) + ]), + createElementVNode("view", { class: "box uni-mt-5 uni-radius" }, [ + createElementVNode("view", { class: "item-box uni-error-bg" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "error") + ]), + createElementVNode("view", { class: "item-box" }, [ + createElementVNode("view", { class: "item uni-error-disable-bg" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "disable") + ]), + createElementVNode("view", { class: "item uni-error-light-bg" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "light") + ]) + ]) + ]), + createElementVNode("view", { class: "box uni-mt-5 uni-radius" }, [ + createElementVNode("view", { class: "item-box uni-info-bg uni-white" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "info") + ]), + createElementVNode("view", { class: "item-box" }, [ + createElementVNode("view", { class: "item uni-info-disable-bg uni-white" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "disable") + ]), + createElementVNode("view", { class: "item uni-info-light-bg uni-white" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "light") + ]) + ]) + ]) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u4E2D\u6027\u8272", + "sub-title": "\u4E2D\u6027\u8272\u7528\u4E8E\u6587\u672C\u3001\u80CC\u666F\u548C\u8FB9\u6846\u989C\u8272\u3002\u901A\u8FC7\u8FD0\u7528\u4E0D\u540C\u7684\u4E2D\u6027\u8272\uFF0C\u6765\u8868\u73B0\u5C42\u6B21\u7ED3\u6784\u3002", + type: "line" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "uni-ma-5 uni-radius" }, [ + createElementVNode("view", { class: "box-base uni-radius uni-main-color-bg uni-mt-5" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "main-color") + ]), + createElementVNode("view", { class: "box-base uni-radius uni-base-color-bg uni-mt-5" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "base-color") + ]), + createElementVNode("view", { class: "box-base uni-radius uni-secondary-color-bg uni-mt-5" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "secondary-color") + ]), + createElementVNode("view", { class: "box-base uni-radius uni-extra-color-bg uni-mt-5" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "extra-color") + ]) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u5206\u9694\u7EBF", + "sub-title": "\u4E3B\u8981\u7528\u4E8E\u8FB9\u6846\u989C\u8272", + type: "line" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "uni-ma-5 uni-radius" }, [ + createElementVNode("view", { class: "box-base uni-radius uni-border-4-bg uni-mt-5" }, [ + createElementVNode("u-text", { class: "uni-body uni-secondary-color uni-white" }, "border-4") + ]), + createElementVNode("view", { class: "box-base uni-radius uni-border-3-bg uni-mt-5" }, [ + createElementVNode("u-text", { class: "uni-body uni-secondary-color uni-white" }, "border-3") + ]), + createElementVNode("view", { class: "box-base uni-radius uni-border-2-bg uni-mt-5" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "border-2") + ]), + createElementVNode("view", { class: "box-base uni-radius uni-border-1-bg uni-mt-5" }, [ + createElementVNode("u-text", { class: "uni-body uni-white" }, "border-1") + ]) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u5E38\u89C4\u8272", + "sub-title": "\u901A\u7528\u989C\u8272,\u5982\u9ED1\u8272\u767D\u8272", + type: "line" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "uni-ma-5 uni-radius" }, [ + createElementVNode("view", { class: "box-base uni-radius uni-border uni-white-bg uni-mt-5" }, [ + createElementVNode("u-text", { class: "uni-body uni-secondary-color" }, "white") + ]), + createElementVNode("view", { class: "box-base uni-radius uni-border uni-black-bg uni-mt-5" }, [ + createElementVNode("u-text", { class: "uni-body uni-secondary-color" }, "black") + ]), + createElementVNode("view", { class: "box-base uni-radius uni-border uni-transparent-bg uni-mt-5" }, [ + createElementVNode("u-text", { class: "uni-body uni-secondary-color" }, "transparent") + ]), + createElementVNode("view", { class: "box-base uni-radius uni-border uni-bg-color-bg uni-mt-5" }, [ + createElementVNode("u-text", { class: "uni-body uni-secondary-color" }, "bg-color") + ]) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u9634\u5F71", + type: "line" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "box-base uni-white-bg uni-ma-5 uni-radius uni-shadow-sm uni-mt-2" }, [ + createElementVNode("u-text", { class: "uni-body uni-secondary-color" }, "shadow-sm") + ]), + createElementVNode("view", { class: "box-base uni-white-bg uni-ma-5 uni-radius uni-shadow-base uni-secondary-color uni-mt-2" }, [ + createElementVNode("u-text", { class: "uni-body uni-secondary-color" }, "shadow-base") + ]), + createElementVNode("view", { class: "box-base uni-white-bg uni-ma-5 uni-radius uni-shadow-lg uni-secondary-color uni-mt-2" }, [ + createElementVNode("u-text", { class: "uni-body uni-secondary-color" }, "shadow-lg") + ]) + ]), + _: 1 + }) + ]) + ]); +} +var color = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/extUI/color/color.nvue"]]); +export { color as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/countdown/countdown.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/countdown/countdown.js new file mode 100644 index 000000000..dc3ae114e --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/countdown/countdown.js @@ -0,0 +1,477 @@ +import { _ as __easycom_0 } from "../../../uni-card.js"; +import { openBlock, createElementBlock, normalizeStyle, toDisplayString, createCommentVNode, createElementVNode, resolveDynamicComponent, createVNode, withCtx } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { i as initVueI18n } from "../../../uni-i18n.es.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import { _ as __easycom_2 } from "../../../uni-section.js"; +import "../../../shared.esm-bundler.js"; +var en = { + "uni-countdown.day": "day", + "uni-countdown.h": "h", + "uni-countdown.m": "m", + "uni-countdown.s": "s" +}; +var zhHans = { + "uni-countdown.day": "\u5929", + "uni-countdown.h": "\u65F6", + "uni-countdown.m": "\u5206", + "uni-countdown.s": "\u79D2" +}; +var zhHant = { + "uni-countdown.day": "\u5929", + "uni-countdown.h": "\u6642", + "uni-countdown.m": "\u5206", + "uni-countdown.s": "\u79D2" +}; +var messages = { + en, + "zh-Hans": zhHans, + "zh-Hant": zhHant +}; +var _style_0 = { "uni-countdown": { "": { "display": "flex", "flexDirection": "row", "justifyContent": "flex-start", "alignItems": "center" } }, "uni-countdown__splitor": { "": { "marginTop": 0, "marginRight": 2, "marginBottom": 0, "marginLeft": 2, "fontSize": 14, "color": "#333333" } }, "uni-countdown__number": { "": { "borderRadius": 3, "textAlign": "center", "fontSize": 14 } } }; +const { + t +} = initVueI18n(messages); +const _sfc_main$1 = { + name: "UniCountdown", + emits: ["timeup"], + props: { + showDay: { + type: Boolean, + default: true + }, + showColon: { + type: Boolean, + default: true + }, + start: { + type: Boolean, + default: true + }, + backgroundColor: { + type: String, + default: "" + }, + color: { + type: String, + default: "#333" + }, + fontSize: { + type: Number, + default: 14 + }, + splitorColor: { + type: String, + default: "#333" + }, + day: { + type: Number, + default: 0 + }, + hour: { + type: Number, + default: 0 + }, + minute: { + type: Number, + default: 0 + }, + second: { + type: Number, + default: 0 + }, + timestamp: { + type: Number, + default: 0 + } + }, + data() { + return { + timer: null, + syncFlag: false, + d: "00", + h: "00", + i: "00", + s: "00", + leftTime: 0, + seconds: 0 + }; + }, + computed: { + dayText() { + return t("uni-countdown.day"); + }, + hourText(val) { + return t("uni-countdown.h"); + }, + minuteText(val) { + return t("uni-countdown.m"); + }, + secondText(val) { + return t("uni-countdown.s"); + }, + timeStyle() { + const { + color, + backgroundColor, + fontSize + } = this; + return { + color, + backgroundColor, + fontSize: `${fontSize}px`, + width: `${fontSize * 22 / 14}px`, + lineHeight: `${fontSize * 20 / 14}px`, + borderRadius: `${fontSize * 3 / 14}px` + }; + }, + splitorStyle() { + const { splitorColor, fontSize, backgroundColor } = this; + return { + color: splitorColor, + fontSize: `${fontSize * 12 / 14}px`, + margin: backgroundColor ? `${fontSize * 4 / 14}px` : "" + }; + } + }, + watch: { + day(val) { + this.changeFlag(); + }, + hour(val) { + this.changeFlag(); + }, + minute(val) { + this.changeFlag(); + }, + second(val) { + this.changeFlag(); + }, + start: { + immediate: true, + handler(newVal, oldVal) { + if (newVal) { + this.startData(); + } else { + if (!oldVal) + return; + clearInterval(this.timer); + } + } + } + }, + created: function(e) { + this.seconds = this.toSeconds(this.timestamp, this.day, this.hour, this.minute, this.second); + this.countDown(); + }, + unmounted() { + clearInterval(this.timer); + }, + methods: { + toSeconds(timestamp, day, hours, minutes, seconds) { + if (timestamp) { + return timestamp - parseInt(new Date().getTime() / 1e3, 10); + } + return day * 60 * 60 * 24 + hours * 60 * 60 + minutes * 60 + seconds; + }, + timeUp() { + clearInterval(this.timer); + this.$emit("timeup"); + }, + countDown() { + let seconds = this.seconds; + let [day, hour, minute, second] = [0, 0, 0, 0]; + if (seconds > 0) { + day = Math.floor(seconds / (60 * 60 * 24)); + hour = Math.floor(seconds / (60 * 60)) - day * 24; + minute = Math.floor(seconds / 60) - day * 24 * 60 - hour * 60; + second = Math.floor(seconds) - day * 24 * 60 * 60 - hour * 60 * 60 - minute * 60; + } else { + this.timeUp(); + } + if (day < 10) { + day = "0" + day; + } + if (hour < 10) { + hour = "0" + hour; + } + if (minute < 10) { + minute = "0" + minute; + } + if (second < 10) { + second = "0" + second; + } + this.d = day; + this.h = hour; + this.i = minute; + this.s = second; + }, + startData() { + this.seconds = this.toSeconds(this.timestamp, this.day, this.hour, this.minute, this.second); + if (this.seconds <= 0) { + this.seconds = this.toSeconds(0, 0, 0, 0, 0); + this.countDown(); + return; + } + clearInterval(this.timer); + this.countDown(); + this.timer = setInterval(() => { + this.seconds--; + if (this.seconds < 0) { + this.timeUp(); + return; + } + this.countDown(); + }, 1e3); + }, + update() { + this.startData(); + }, + changeFlag() { + if (!this.syncFlag) { + this.seconds = this.toSeconds(this.timestamp, this.day, this.hour, this.minute, this.second); + this.startData(); + this.syncFlag = true; + } + } + } +}; +function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("view", { class: "uni-countdown" }, [ + $props.showDay ? (openBlock(), createElementBlock("u-text", { + key: 0, + style: normalizeStyle([$options.timeStyle]), + class: "uni-countdown__number" + }, toDisplayString($data.d), 5)) : createCommentVNode("v-if", true), + $props.showDay ? (openBlock(), createElementBlock("u-text", { + key: 1, + style: normalizeStyle([$options.splitorStyle]), + class: "uni-countdown__splitor" + }, toDisplayString($options.dayText), 5)) : createCommentVNode("v-if", true), + createElementVNode("u-text", { + style: normalizeStyle([$options.timeStyle]), + class: "uni-countdown__number" + }, toDisplayString($data.h), 5), + createElementVNode("u-text", { + style: normalizeStyle([$options.splitorStyle]), + class: "uni-countdown__splitor" + }, toDisplayString($props.showColon ? ":" : $options.hourText), 5), + createElementVNode("u-text", { + style: normalizeStyle([$options.timeStyle]), + class: "uni-countdown__number" + }, toDisplayString($data.i), 5), + createElementVNode("u-text", { + style: normalizeStyle([$options.splitorStyle]), + class: "uni-countdown__splitor" + }, toDisplayString($props.showColon ? ":" : $options.minuteText), 5), + createElementVNode("u-text", { + style: normalizeStyle([$options.timeStyle]), + class: "uni-countdown__number" + }, toDisplayString($data.s), 5), + !$props.showColon ? (openBlock(), createElementBlock("u-text", { + key: 2, + style: normalizeStyle([$options.splitorStyle]), + class: "uni-countdown__splitor" + }, toDisplayString($options.secondText), 5)) : createCommentVNode("v-if", true) + ]); +} +var __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-countdown/components/uni-countdown/uni-countdown.vue"]]); +const _sfc_main = { + components: {}, + data() { + return { + testHour: 1, + testMinute: 0, + testSecond: 0, + start: false, + timeupSecond: 10 + }; + }, + mounted() { + setTimeout(() => { + this.testHour = 1; + this.testMinute = 1; + this.testSecond = 0; + this.start = true; + }, 3e3); + setTimeout(() => { + this.start = false; + }, 1e4); + }, + methods: { + timeup() { + uni.showToast({ + title: "\u65F6\u95F4\u5230" + }); + this.timeupSecond = 29; + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_card = resolveEasycom(resolveDynamicComponent("uni-card"), __easycom_0); + const _component_uni_countdown = resolveEasycom(resolveDynamicComponent("uni-countdown"), __easycom_1); + const _component_uni_section = resolveEasycom(resolveDynamicComponent("uni-section"), __easycom_2); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "container" }, [ + createVNode(_component_uni_card, { "is-full": "" }, { + default: withCtx(() => [ + createElementVNode("u-text", { class: "uni-h6" }, "\u5012\u8BA1\u65F6\u7EC4\u4EF6\u4E3B\u8981\u7528\u4E8E\u4FC3\u9500\u5546\u54C1\u5269\u4F59\u65F6\u95F4\uFF0C\u53D1\u9001\u77ED\u4FE1\u9A8C\u8BC1\u7B49\u5F85\u65F6\u95F4\u7B49\u573A\u666F") + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u4E00\u822C\u7528\u6CD5", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_countdown, { + day: 1, + hour: 1, + minute: 12, + second: 40 + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u4E0D\u663E\u793A\u5929\u6570", + subTitle: "\u8BBE\u7F6E show-day = false \u4E0D\u663E\u793A\u5929", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_countdown, { + "show-day": false, + hour: 12, + minute: 12, + second: 12 + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u6587\u5B57\u5206\u9694\u7B26", + subTitle: "\u8BBE\u7F6E show-colon \u5C5E\u6027\u8BBE\u7F6E\u5206\u9694\u7B26\u6837\u5F0F", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_countdown, { + minute: 30, + second: 0, + "show-colon": false + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u4FEE\u6539\u989C\u8272", + subTitle: "\u8BBE\u7F6E color \\ background \u5C5E\u6027\u8BBE\u7F6E\u7EC4\u4EF6\u989C\u8272", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_countdown, { + day: 1, + hour: 2, + minute: 30, + second: 0, + color: "#FFFFFF", + "background-color": "#007AFF" + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u4FEE\u6539\u5B57\u4F53\u5927\u5C0F", + subTitle: "\u8BBE\u7F6E font-size \u5C5E\u6027\u8BBE\u7F6E\u7EC4\u4EF6\u5927\u5C0F", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_countdown, { + "font-size": 30, + day: 1, + hour: 2, + minute: 30, + second: 0 + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u4FEE\u6539\u989C\u8272 + \u5B57\u4F53\u5927\u5C0F", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_countdown, { + "font-size": 30, + day: 1, + hour: 2, + minute: 30, + second: 0, + color: "#FFFFFF", + "background-color": "#007AFF" + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u81EA\u7531\u63A7\u5236\u5F00\u59CB/\u6682\u505C", + subTitle: "\u8BBE\u7F6E start \u5C5E\u6027\u63A7\u5236\u662F\u5426\u81EA\u52A8\u5F00\u542F", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_countdown, { + start: $data.start, + day: 1, + hour: 1, + minute: 12, + second: 40 + }, null, 8, ["start"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u5012\u8BA1\u65F6\u56DE\u8C03\u4E8B\u4EF6", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_countdown, { + "show-day": false, + second: $data.timeupSecond, + onTimeup: $options.timeup + }, null, 8, ["second", "onTimeup"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u52A8\u6001\u8D4B\u503C", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_countdown, { + "show-day": false, + hour: $data.testHour, + minute: $data.testMinute, + second: $data.testSecond + }, null, 8, ["hour", "minute", "second"]) + ]), + _: 1 + }) + ]) + ]); +} +var countdown = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/extUI/countdown/countdown.nvue"]]); +export { countdown as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/data-picker/data-picker.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/data-picker/data-picker.js new file mode 100644 index 000000000..9427fe3a5 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/data-picker/data-picker.js @@ -0,0 +1,1172 @@ +import { f as formatAppLog } from "../../../uni-shared.es.js"; +import { _ as __easycom_0$1 } from "../../../uni-card.js"; +import { resolveDynamicComponent, openBlock, createElementBlock, createElementVNode, Fragment, renderList, normalizeClass, toDisplayString, createCommentVNode, createVNode, resolveComponent, renderSlot, withModifiers, withCtx } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as __easycom_0 } from "../../../uni-load-more.js"; +import { _ as __easycom_1$1 } from "../../../uni-icons.js"; +import { R as Rt } from "../../../uni-cloud.es.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import { _ as __easycom_2 } from "../../../uni-section.js"; +import "../../../shared.esm-bundler.js"; +import "../../../uni-i18n.es.js"; +var dataPicker$1 = { + props: { + localdata: { + type: [Array, Object], + default() { + return []; + } + }, + spaceInfo: { + type: Object, + default() { + return {}; + } + }, + collection: { + type: String, + default: "" + }, + action: { + type: String, + default: "" + }, + field: { + type: String, + default: "" + }, + orderby: { + type: String, + default: "" + }, + where: { + type: [String, Object], + default: "" + }, + pageData: { + type: String, + default: "add" + }, + pageCurrent: { + type: Number, + default: 1 + }, + pageSize: { + type: Number, + default: 20 + }, + getcount: { + type: [Boolean, String], + default: false + }, + getone: { + type: [Boolean, String], + default: false + }, + gettree: { + type: [Boolean, String], + default: false + }, + manual: { + type: Boolean, + default: false + }, + value: { + type: [Array, String, Number], + default() { + return []; + } + }, + modelValue: { + type: [Array, String, Number], + default() { + return []; + } + }, + preload: { + type: Boolean, + default: false + }, + stepSearh: { + type: Boolean, + default: true + }, + selfField: { + type: String, + default: "" + }, + parentField: { + type: String, + default: "" + }, + multiple: { + type: Boolean, + default: false + }, + map: { + type: Object, + default() { + return { + text: "text", + value: "value" + }; + } + } + }, + data() { + return { + loading: false, + errorMessage: "", + loadMore: { + contentdown: "", + contentrefresh: "", + contentnomore: "" + }, + dataList: [], + selected: [], + selectedIndex: 0, + page: { + current: this.pageCurrent, + size: this.pageSize, + count: 0 + } + }; + }, + computed: { + isLocaldata() { + return !this.collection.length; + }, + postField() { + let fields = [this.field]; + if (this.parentField) { + fields.push(`${this.parentField} as parent_value`); + } + return fields.join(","); + }, + dataValue() { + let isModelValue = Array.isArray(this.modelValue) ? this.modelValue.length > 0 : this.modelValue !== null || this.modelValue !== void 0; + return isModelValue ? this.modelValue : this.value; + }, + hasValue() { + if (typeof this.dataValue === "number") { + return true; + } + return this.dataValue != null && this.dataValue.length > 0; + } + }, + created() { + this.$watch(() => { + var al = []; + [ + "pageCurrent", + "pageSize", + "spaceInfo", + "value", + "modelValue", + "localdata", + "collection", + "action", + "field", + "orderby", + "where", + "getont", + "getcount", + "gettree" + ].forEach((key) => { + al.push(this[key]); + }); + return al; + }, (newValue, oldValue) => { + for (let i = 2; i < newValue.length; i++) { + if (newValue[i] != oldValue[i]) { + break; + } + } + if (newValue[0] != oldValue[0]) { + this.page.current = this.pageCurrent; + } + this.page.size = this.pageSize; + this.onPropsChange(); + }); + this._treeData = []; + }, + methods: { + onPropsChange() { + this._treeData = []; + }, + getCommand(options = {}) { + let db = Rt.database(this.spaceInfo); + const action = options.action || this.action; + if (action) { + db = db.action(action); + } + const collection = options.collection || this.collection; + db = db.collection(collection); + const where = options.where || this.where; + if (!(!where || !Object.keys(where).length)) { + db = db.where(where); + } + const field = options.field || this.field; + if (field) { + db = db.field(field); + } + const orderby = options.orderby || this.orderby; + if (orderby) { + db = db.orderBy(orderby); + } + const current = options.pageCurrent !== void 0 ? options.pageCurrent : this.page.current; + const size = options.pageSize !== void 0 ? options.pageSize : this.page.size; + const getCount = options.getcount !== void 0 ? options.getcount : this.getcount; + const getTree = options.gettree !== void 0 ? options.gettree : this.gettree; + const getOptions = { + getCount, + getTree + }; + if (options.getTreePath) { + getOptions.getTreePath = options.getTreePath; + } + db = db.skip(size * (current - 1)).limit(size).get(getOptions); + return db; + }, + getNodeData(callback) { + if (this.loading) { + return; + } + this.loading = true; + this.getCommand({ + field: this.postField, + where: this._pathWhere() + }).then((res) => { + this.loading = false; + this.selected = res.result.data; + callback && callback(); + }).catch((err) => { + this.loading = false; + this.errorMessage = err; + }); + }, + getTreePath(callback) { + if (this.loading) { + return; + } + this.loading = true; + this.getCommand({ + field: this.postField, + getTreePath: { + startWith: `${this.selfField}=='${this.dataValue}'` + } + }).then((res) => { + this.loading = false; + let treePath = []; + this._extractTreePath(res.result.data, treePath); + this.selected = treePath; + callback && callback(); + }).catch((err) => { + this.loading = false; + this.errorMessage = err; + }); + }, + loadData() { + if (this.isLocaldata) { + this._processLocalData(); + return; + } + if (this.dataValue != null) { + this._loadNodeData((data) => { + this._treeData = data; + this._updateBindData(); + this._updateSelected(); + }); + return; + } + if (this.stepSearh) { + this._loadNodeData((data) => { + this._treeData = data; + this._updateBindData(); + }); + } else { + this._loadAllData((data) => { + this._treeData = []; + this._extractTree(data, this._treeData, null); + this._updateBindData(); + }); + } + }, + _loadAllData(callback) { + if (this.loading) { + return; + } + this.loading = true; + this.getCommand({ + field: this.postField, + gettree: true, + startwith: `${this.selfField}=='${this.dataValue}'` + }).then((res) => { + this.loading = false; + callback(res.result.data); + this.onDataChange(); + }).catch((err) => { + this.loading = false; + this.errorMessage = err; + }); + }, + _loadNodeData(callback, pw) { + if (this.loading) { + return; + } + this.loading = true; + this.getCommand({ + field: this.postField, + where: pw || this._postWhere(), + pageSize: 500 + }).then((res) => { + this.loading = false; + callback(res.result.data); + this.onDataChange(); + }).catch((err) => { + this.loading = false; + this.errorMessage = err; + }); + }, + _pathWhere() { + let result = []; + let where_field = this._getParentNameByField(); + if (where_field) { + result.push(`${where_field} == '${this.dataValue}'`); + } + if (this.where) { + return `(${this.where}) && (${result.join(" || ")})`; + } + return result.join(" || "); + }, + _postWhere() { + let result = []; + let selected = this.selected; + let parentField = this.parentField; + if (parentField) { + result.push(`${parentField} == null || ${parentField} == ""`); + } + if (selected.length) { + for (var i = 0; i < selected.length - 1; i++) { + result.push(`${parentField} == '${selected[i].value}'`); + } + } + let where = []; + if (this.where) { + where.push(`(${this.where})`); + } + if (result.length) { + where.push(`(${result.join(" || ")})`); + } + return where.join(" && "); + }, + _nodeWhere() { + let result = []; + let selected = this.selected; + if (selected.length) { + result.push(`${this.parentField} == '${selected[selected.length - 1].value}'`); + } + if (this.where) { + return `(${this.where}) && (${result.join(" || ")})`; + } + return result.join(" || "); + }, + _getParentNameByField() { + const fields = this.field.split(","); + let where_field = null; + for (let i = 0; i < fields.length; i++) { + const items = fields[i].split("as"); + if (items.length < 2) { + continue; + } + if (items[1].trim() === "value") { + where_field = items[0].trim(); + break; + } + } + return where_field; + }, + _isTreeView() { + return this.parentField && this.selfField; + }, + _updateSelected() { + var dl = this.dataList; + var sl = this.selected; + let textField = this.map.text; + let valueField = this.map.value; + for (var i = 0; i < sl.length; i++) { + var value = sl[i].value; + var dl2 = dl[i]; + for (var j = 0; j < dl2.length; j++) { + var item2 = dl2[j]; + if (item2[valueField] === value) { + sl[i].text = item2[textField]; + break; + } + } + } + }, + _updateBindData(node) { + const { + dataList, + hasNodes + } = this._filterData(this._treeData, this.selected); + let isleaf = this._stepSearh === false && !hasNodes; + if (node) { + node.isleaf = isleaf; + } + this.dataList = dataList; + this.selectedIndex = dataList.length - 1; + if (!isleaf && this.selected.length < dataList.length) { + this.selected.push({ + value: null, + text: "\u8BF7\u9009\u62E9" + }); + } + return { + isleaf, + hasNodes + }; + }, + _filterData(data, paths) { + let dataList = []; + let hasNodes = true; + dataList.push(data.filter((item) => { + return item.parent_value === null || item.parent_value === void 0 || item.parent_value === ""; + })); + for (let i = 0; i < paths.length; i++) { + var value = paths[i].value; + var nodes = data.filter((item) => { + return item.parent_value === value; + }); + if (nodes.length) { + dataList.push(nodes); + } else { + hasNodes = false; + } + } + return { + dataList, + hasNodes + }; + }, + _extractTree(nodes, result, parent_value) { + let valueField = this.map.value; + for (let i = 0; i < nodes.length; i++) { + let node = nodes[i]; + let child = {}; + for (let key in node) { + if (key !== "children") { + child[key] = node[key]; + } + } + if (parent_value !== null && parent_value !== void 0 && parent_value !== "") { + child.parent_value = parent_value; + } + result.push(child); + let children = node.children; + if (children) { + this._extractTree(children, result, node[valueField]); + } + } + }, + _extractTreePath(nodes, result) { + for (let i = 0; i < nodes.length; i++) { + let node = nodes[i]; + let child = {}; + for (let key in node) { + if (key !== "children") { + child[key] = node[key]; + } + } + result.push(child); + let children = node.children; + if (children) { + this._extractTreePath(children, result); + } + } + }, + _findNodePath(key, nodes, path = []) { + let textField = this.map.text; + let valueField = this.map.value; + for (let i = 0; i < nodes.length; i++) { + let node = nodes[i]; + let children = node.children; + let text = node[textField]; + let value = node[valueField]; + path.push({ + value, + text + }); + if (value === key) { + return path; + } + if (children) { + const p = this._findNodePath(key, children, path); + if (p.length) { + return p; + } + } + path.pop(); + } + return []; + }, + _processLocalData() { + this._treeData = []; + this._extractTree(this.localdata, this._treeData); + var inputValue = this.dataValue; + if (inputValue === void 0) { + return; + } + if (Array.isArray(inputValue)) { + inputValue = inputValue[inputValue.length - 1]; + if (typeof inputValue === "object" && inputValue[this.map.value]) { + inputValue = inputValue[this.map.value]; + } + } + this.selected = this._findNodePath(inputValue, this.localdata); + } + } +}; +var _style_0$2 = { "uni-data-pickerview": { "": { "flex": 1, "flexDirection": "column", "overflow": "hidden", "height": 100 } }, "error-text": { "": { "color": "#DD524D" } }, "loading-cover": { "": { "position": "absolute", "left": 0, "top": 0, "right": 0, "bottom": 0, "backgroundColor": "rgba(255,255,255,0.5)", "flexDirection": "column", "alignItems": "center", "zIndex": 1001 } }, "error-message": { "": { "backgroundColor": "#ffffff", "position": "absolute", "left": 0, "top": 0, "right": 0, "bottom": 0, "paddingTop": 15, "paddingRight": 15, "paddingBottom": 15, "paddingLeft": 15, "opacity": 0.9, "zIndex": 102 } }, "selected-area": { "": { "width": "750rpx" } }, "selected-list": { "": { "flexDirection": "row", "flexWrap": "nowrap", "paddingTop": 0, "paddingRight": 5, "paddingBottom": 0, "paddingLeft": 5, "borderBottomWidth": 1, "borderBottomStyle": "solid", "borderBottomColor": "#f8f8f8" } }, "selected-item": { "": { "marginLeft": 10, "marginRight": 10, "paddingTop": 12, "paddingRight": 0, "paddingBottom": 12, "paddingLeft": 0, "textAlign": "center" } }, "selected-item-text-overflow": { "": { "width": 168, "overflow": "hidden" } }, "selected-item-active": { "": { "borderBottomWidth": 2, "borderBottomStyle": "solid", "borderBottomColor": "#007aff" } }, "selected-item-text": { "": { "color": "#007aff" } }, "tab-c": { "": { "position": "relative", "flex": 1, "flexDirection": "row", "overflow": "hidden" } }, "list": { "": { "flex": 1 } }, "item": { "": { "paddingTop": 12, "paddingRight": 15, "paddingBottom": 12, "paddingLeft": 15, "flexDirection": "row", "justifyContent": "space-between" } }, "is-disabled": { "": { "opacity": 0.5 } }, "item-text": { "": { "color": "#333333" } }, "item-text-overflow": { "": { "width": 280, "overflow": "hidden" } }, "check": { "": { "marginRight": 5, "borderWidth": 2, "borderStyle": "solid", "borderColor": "#007aff", "borderLeftWidth": 0, "borderLeftStyle": "solid", "borderLeftColor": "#000000", "borderTopWidth": 0, "borderTopStyle": "solid", "borderTopColor": "#000000", "height": 12, "width": 6, "transformOrigin": "center", "transform": "rotate(45deg)" } } }; +const _sfc_main$2 = { + name: "UniDataPickerView", + emits: ["nodeclick", "change", "datachange", "update:modelValue"], + mixins: [dataPicker$1], + props: { + managedMode: { + type: Boolean, + default: false + }, + ellipsis: { + type: Boolean, + default: true + } + }, + data() { + return {}; + }, + created() { + if (this.managedMode) { + return; + } + this.$nextTick(() => { + this.load(); + }); + }, + methods: { + onPropsChange() { + this._treeData = []; + this.selectedIndex = 0; + this.load(); + }, + load() { + if (this.isLocaldata) { + this.loadData(); + } else if (this.dataValue.length) { + this.getTreePath((res) => { + this.loadData(); + }); + } + }, + handleSelect(index) { + this.selectedIndex = index; + }, + handleNodeClick(item, i, j) { + if (item.disable) { + return; + } + const node = this.dataList[i][j]; + const text = node[this.map.text]; + const value = node[this.map.value]; + if (i < this.selected.length - 1) { + this.selected.splice(i, this.selected.length - i); + this.selected.push({ + text, + value + }); + } else if (i === this.selected.length - 1) { + this.selected.splice(i, 1, { + text, + value + }); + } + if (node.isleaf) { + this.onSelectedChange(node, node.isleaf); + return; + } + const { + isleaf, + hasNodes + } = this._updateBindData(); + if (!this._isTreeView() && !hasNodes) { + this.onSelectedChange(node, true); + return; + } + if (this.isLocaldata && (!hasNodes || isleaf)) { + this.onSelectedChange(node, true); + return; + } + if (!isleaf && !hasNodes) { + this._loadNodeData((data) => { + if (!data.length) { + node.isleaf = true; + } else { + this._treeData.push(...data); + this._updateBindData(node); + } + this.onSelectedChange(node, node.isleaf); + }, this._nodeWhere()); + return; + } + this.onSelectedChange(node, false); + }, + updateData(data) { + this._treeData = data.treeData; + this.selected = data.selected; + if (!this._treeData.length) { + this.loadData(); + } else { + this._updateBindData(); + } + }, + onDataChange() { + this.$emit("datachange"); + }, + onSelectedChange(node, isleaf) { + if (isleaf) { + this._dispatchEvent(); + } + if (node) { + this.$emit("nodeclick", node); + } + }, + _dispatchEvent() { + this.$emit("change", this.selected.slice(0)); + } + } +}; +function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_load_more = resolveEasycom(resolveDynamicComponent("uni-load-more"), __easycom_0); + return openBlock(), createElementBlock("view", { class: "uni-data-pickerview" }, [ + createElementVNode("scroll-view", { + class: "selected-area", + scrollX: "true", + scrollY: "false", + showScrollbar: false + }, [ + createElementVNode("view", { class: "selected-list" }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selected, (item, index) => { + return openBlock(), createElementBlock(Fragment, null, [ + item.text ? (openBlock(), createElementBlock("view", { + key: 0, + class: normalizeClass(["selected-item", { "selected-item-active": index == _ctx.selectedIndex, "selected-item-text-overflow": $props.ellipsis }]), + onClick: ($event) => $options.handleSelect(index) + }, [ + createElementVNode("u-text", { class: "" }, toDisplayString(item.text), 1) + ], 10, ["onClick"])) : createCommentVNode("v-if", true) + ], 64); + }), 256)) + ]) + ]), + createElementVNode("view", { class: "tab-c" }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dataList, (child, i) => { + return openBlock(), createElementBlock(Fragment, null, [ + i == _ctx.selectedIndex ? (openBlock(), createElementBlock("scroll-view", { + class: "list", + key: i, + scrollY: true + }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList(child, (item, j) => { + return openBlock(), createElementBlock("view", { + class: normalizeClass(["item", { "is-disabled": !!item.disable }]), + onClick: ($event) => $options.handleNodeClick(item, i, j) + }, [ + createElementVNode("u-text", { class: "item-text item-text-overflow" }, toDisplayString(item[_ctx.map.text]), 1), + _ctx.selected.length > i && item[_ctx.map.value] == _ctx.selected[i].value ? (openBlock(), createElementBlock("view", { + key: 0, + class: "check" + })) : createCommentVNode("v-if", true) + ], 10, ["onClick"]); + }), 256)) + ])) : createCommentVNode("v-if", true) + ], 64); + }), 256)), + _ctx.loading ? (openBlock(), createElementBlock("view", { + key: 0, + class: "loading-cover" + }, [ + createVNode(_component_uni_load_more, { + class: "load-more", + contentText: _ctx.loadMore, + status: "loading" + }, null, 8, ["contentText"]) + ])) : createCommentVNode("v-if", true), + _ctx.errorMessage ? (openBlock(), createElementBlock("view", { + key: 1, + class: "error-message" + }, [ + createElementVNode("u-text", { class: "error-text" }, toDisplayString(_ctx.errorMessage), 1) + ])) : createCommentVNode("v-if", true) + ]) + ]); +} +var DataPickerView = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["styles", [_style_0$2]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.vue"]]); +var _style_0$1 = { "uni-data-tree": { "": { "flex": 1, "position": "relative", "fontSize": 14 } }, "error-text": { "": { "color": "#DD524D" } }, "input-value": { "": { "flexDirection": "row", "alignItems": "center", "flexWrap": "nowrap", "fontSize": 14, "paddingTop": 0, "paddingRight": 5, "paddingBottom": 0, "paddingLeft": 10, "overflow": "hidden", "height": 35 } }, "input-value-border": { "": { "borderWidth": 1, "borderStyle": "solid", "borderColor": "#e5e5e5", "borderRadius": 5 } }, "selected-area": { "": { "flex": 1, "overflow": "hidden", "flexDirection": "row" } }, "load-more": { "": { "width": 40 } }, "selected-list": { "": { "flexDirection": "row", "flexWrap": "nowrap" } }, "selected-item": { "": { "flexDirection": "row" } }, "text-color": { "": { "color": "#333333" } }, "placeholder": { "": { "color": "#808080", "fontSize": 12 } }, "input-split-line": { "": { "opacity": 0.5 } }, "arrow-area": { "": { "position": "relative", "width": 20, "justifyContent": "center", "transform": "rotate(-45deg)", "transformOrigin": "center" } }, "input-arrow": { "": { "width": 7, "height": 7, "borderLeftWidth": 1, "borderLeftStyle": "solid", "borderLeftColor": "#999999", "borderBottomWidth": 1, "borderBottomStyle": "solid", "borderBottomColor": "#999999" } }, "uni-data-tree-cover": { "": { "position": "fixed", "left": 0, "top": 0, "right": 0, "bottom": 0, "backgroundColor": "rgba(0,0,0,0.4)", "flexDirection": "column", "zIndex": 100 } }, "uni-data-tree-dialog": { "": { "position": "fixed", "left": 0, "top": 20, "right": 0, "bottom": 0, "backgroundColor": "#FFFFFF", "borderTopLeftRadius": 10, "borderTopRightRadius": 10, "flexDirection": "column", "zIndex": 102, "overflow": "hidden", "width": "750rpx" } }, "dialog-caption": { "": { "position": "relative", "flexDirection": "row" } }, "title-area": { "": { "alignItems": "center", "paddingTop": 0, "paddingRight": 10, "paddingBottom": 0, "paddingLeft": 10 } }, "dialog-title": { "": { "lineHeight": 44 } }, "dialog-close": { "": { "position": "absolute", "top": 0, "right": 0, "bottom": 0, "flexDirection": "row", "alignItems": "center", "paddingTop": 0, "paddingRight": 15, "paddingBottom": 0, "paddingLeft": 15 } }, "dialog-close-plus": { "": { "width": 16, "height": 2, "backgroundColor": "#666666", "borderRadius": 2, "transform": "rotate(45deg)" } }, "dialog-close-rotate": { "": { "position": "absolute", "transform": "rotate(-45deg)" } }, "picker-view": { "": { "flex": 1, "overflow": "hidden" } }, "icon-clear": { "": { "display": "flex", "alignItems": "center" } } }; +const _sfc_main$1 = { + name: "UniDataPicker", + emits: ["popupopened", "popupclosed", "nodeclick", "input", "change", "update:modelValue"], + mixins: [dataPicker$1], + components: { + DataPickerView + }, + props: { + options: { + type: [Object, Array], + default() { + return {}; + } + }, + popupTitle: { + type: String, + default: "\u8BF7\u9009\u62E9" + }, + placeholder: { + type: String, + default: "\u8BF7\u9009\u62E9" + }, + heightMobile: { + type: String, + default: "" + }, + readonly: { + type: Boolean, + default: false + }, + clearIcon: { + type: Boolean, + default: true + }, + border: { + type: Boolean, + default: true + }, + split: { + type: String, + default: "/" + }, + ellipsis: { + type: Boolean, + default: true + } + }, + data() { + return { + isOpened: false, + inputSelected: [] + }; + }, + created() { + this.form = this.getForm("uniForms"); + this.formItem = this.getForm("uniFormsItem"); + if (this.formItem) { + if (this.formItem.name) { + this.rename = this.formItem.name; + this.form.inputChildrens.push(this); + } + } + this.$nextTick(() => { + this.load(); + }); + }, + methods: { + clear() { + this.inputSelected.splice(0); + this._dispatchEvent([]); + }, + onPropsChange() { + this._treeData = []; + this.selectedIndex = 0; + this.load(); + }, + load() { + if (this.readonly) { + this._processReadonly(this.localdata, this.dataValue); + return; + } + if (this.isLocaldata) { + this.loadData(); + this.inputSelected = this.selected.slice(0); + } else if (!this.parentField && !this.selfField && this.hasValue) { + this.getNodeData(() => { + this.inputSelected = this.selected.slice(0); + }); + } else if (this.hasValue) { + this.getTreePath(() => { + this.inputSelected = this.selected.slice(0); + }); + } + }, + getForm(name = "uniForms") { + let parent = this.$parent; + let parentName = parent.$options.name; + while (parentName !== name) { + parent = parent.$parent; + if (!parent) + return false; + parentName = parent.$options.name; + } + return parent; + }, + show() { + this.isOpened = true; + setTimeout(() => { + this.$refs.pickerView.updateData({ + treeData: this._treeData, + selected: this.selected, + selectedIndex: this.selectedIndex + }); + }, 200); + this.$emit("popupopened"); + }, + hide() { + this.isOpened = false; + this.$emit("popupclosed"); + }, + handleInput() { + if (this.readonly) { + return; + } + this.show(); + }, + handleClose(e) { + this.hide(); + }, + onnodeclick(e) { + this.$emit("nodeclick", e); + }, + ondatachange(e) { + this._treeData = this.$refs.pickerView._treeData; + }, + onchange(e) { + this.hide(); + this.$nextTick(() => { + this.inputSelected = e; + }); + this._dispatchEvent(e); + }, + _processReadonly(dataList, value) { + var isTree = dataList.findIndex((item2) => { + return item2.children; + }); + if (isTree > -1) { + let inputValue; + if (Array.isArray(value)) { + inputValue = value[value.length - 1]; + if (typeof inputValue === "object" && inputValue.value) { + inputValue = inputValue.value; + } + } else { + inputValue = value; + } + this.inputSelected = this._findNodePath(inputValue, this.localdata); + return; + } + if (!this.hasValue) { + this.inputSelected = []; + return; + } + let result = []; + for (let i = 0; i < value.length; i++) { + var val = value[i]; + var item = dataList.find((v) => { + return v.value == val; + }); + if (item) { + result.push(item); + } + } + if (result.length) { + this.inputSelected = result; + } + }, + _filterForArray(data, valueArray) { + var result = []; + for (let i = 0; i < valueArray.length; i++) { + var value = valueArray[i]; + var found = data.find((item) => { + return item.value == value; + }); + if (found) { + result.push(found); + } + } + return result; + }, + _dispatchEvent(selected) { + let item = {}; + if (selected.length) { + var value = new Array(selected.length); + for (var i = 0; i < selected.length; i++) { + value[i] = selected[i].value; + } + item = selected[selected.length - 1]; + } else { + item.value = ""; + } + if (this.formItem) { + this.formItem.setValue(item.value); + } + this.$emit("input", item.value); + this.$emit("update:modelValue", item.value); + this.$emit("change", { + detail: { + value: selected + } + }); + } + } +}; +function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_load_more = resolveEasycom(resolveDynamicComponent("uni-load-more"), __easycom_0); + const _component_uni_icons = resolveEasycom(resolveDynamicComponent("uni-icons"), __easycom_1$1); + const _component_data_picker_view = resolveComponent("data-picker-view"); + return openBlock(), createElementBlock("view", { class: "uni-data-tree" }, [ + createElementVNode("view", { + class: "uni-data-tree-input", + onClick: _cache[1] || (_cache[1] = (...args) => $options.handleInput && $options.handleInput(...args)) + }, [ + renderSlot(_ctx.$slots, "default", { + options: $props.options, + data: $data.inputSelected, + error: _ctx.errorMessage + }, () => [ + createElementVNode("view", { + class: normalizeClass(["input-value", { "input-value-border": $props.border }]) + }, [ + _ctx.errorMessage ? (openBlock(), createElementBlock("u-text", { + key: 0, + class: "selected-area error-text" + }, toDisplayString(_ctx.errorMessage), 1)) : _ctx.loading && !$data.isOpened ? (openBlock(), createElementBlock("view", { + key: 1, + class: "selected-area" + }, [ + createVNode(_component_uni_load_more, { + class: "load-more", + contentText: _ctx.loadMore, + status: "loading" + }, null, 8, ["contentText"]) + ])) : $data.inputSelected.length ? (openBlock(), createElementBlock("scroll-view", { + key: 2, + class: "selected-area", + scrollX: "true" + }, [ + createElementVNode("view", { class: "selected-list" }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.inputSelected, (item, index) => { + return openBlock(), createElementBlock("view", { + class: "selected-item", + key: index + }, [ + createElementVNode("u-text", { class: "text-color" }, toDisplayString(item.text), 1), + index < $data.inputSelected.length - 1 ? (openBlock(), createElementBlock("u-text", { + key: 0, + class: "input-split-line" + }, toDisplayString($props.split), 1)) : createCommentVNode("v-if", true) + ]); + }), 128)) + ]) + ])) : (openBlock(), createElementBlock("u-text", { + key: 3, + class: "selected-area placeholder" + }, toDisplayString($props.placeholder), 1)), + $props.clearIcon && !$props.readonly && $data.inputSelected.length ? (openBlock(), createElementBlock("view", { + key: 4, + class: "icon-clear", + onClick: _cache[0] || (_cache[0] = withModifiers((...args) => $options.clear && $options.clear(...args), ["stop"])) + }, [ + createVNode(_component_uni_icons, { + type: "clear", + color: "#c0c4cc", + size: "24" + }) + ])) : createCommentVNode("v-if", true), + (!$props.clearIcon || !$data.inputSelected.length) && !$props.readonly ? (openBlock(), createElementBlock("view", { + key: 5, + class: "arrow-area" + }, [ + createElementVNode("view", { class: "input-arrow" }) + ])) : createCommentVNode("v-if", true) + ], 2) + ]) + ]), + $data.isOpened ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-data-tree-cover", + onClick: _cache[2] || (_cache[2] = (...args) => $options.handleClose && $options.handleClose(...args)) + })) : createCommentVNode("v-if", true), + $data.isOpened ? (openBlock(), createElementBlock("view", { + key: 1, + class: "uni-data-tree-dialog" + }, [ + createElementVNode("view", { class: "uni-popper__arrow" }), + createElementVNode("view", { class: "dialog-caption" }, [ + createElementVNode("view", { class: "title-area" }, [ + createElementVNode("u-text", { class: "dialog-title" }, toDisplayString($props.popupTitle), 1) + ]), + createElementVNode("view", { + class: "dialog-close", + onClick: _cache[3] || (_cache[3] = (...args) => $options.handleClose && $options.handleClose(...args)) + }, [ + createElementVNode("view", { + class: "dialog-close-plus", + "data-id": "close" + }), + createElementVNode("view", { + class: "dialog-close-plus dialog-close-rotate", + "data-id": "close" + }) + ]) + ]), + createVNode(_component_data_picker_view, { + class: "picker-view", + ref: "pickerView", + modelValue: _ctx.dataValue, + "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.dataValue = $event), + localdata: _ctx.localdata, + preload: _ctx.preload, + collection: _ctx.collection, + field: _ctx.field, + orderby: _ctx.orderby, + where: _ctx.where, + "step-searh": _ctx.stepSearh, + "self-field": _ctx.selfField, + "parent-field": _ctx.parentField, + "managed-mode": true, + map: _ctx.map, + ellipsis: $props.ellipsis, + onChange: $options.onchange, + onDatachange: $options.ondatachange, + onNodeclick: $options.onnodeclick + }, null, 8, ["modelValue", "localdata", "preload", "collection", "field", "orderby", "where", "step-searh", "self-field", "parent-field", "map", "ellipsis", "onChange", "onDatachange", "onNodeclick"]) + ])) : createCommentVNode("v-if", true) + ]); +} +var __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["styles", [_style_0$1]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue"]]); +var _style_0 = { "title": { "": { "fontSize": 14, "fontWeight": "bold", "marginTop": 20, "marginRight": 0, "marginBottom": 5, "marginLeft": 0 } }, "data-pickerview": { "": { "height": 400, "borderWidth": 1, "borderStyle": "solid", "borderColor": "#e5e5e5" } }, "popper__arrow": { "": { "top": -6, "left": 50, "marginRight": 3, "borderTopWidth": 0, "borderBottomColor": "#EBEEF5" } } }; +const _sfc_main = { + data() { + return { + classes: "1-2", + dataTree: [ + { + text: "\u4E00\u5E74\u7EA7", + value: "1-0", + children: [ + { + text: "1.1\u73ED", + value: "1-1" + }, + { + text: "1.2\u73ED", + value: "1-2" + } + ] + }, + { + text: "\u4E8C\u5E74\u7EA7", + value: "2-0", + children: [ + { + text: "2.1\u73ED", + value: "2-1" + }, + { + text: "2.2\u73ED", + value: "2-2" + } + ] + }, + { + text: "\u4E09\u5E74\u7EA7", + value: "3-0", + disable: true + } + ] + }; + }, + methods: { + onnodeclick(e) { + formatAppLog("log", "at pages/extUI/data-picker/data-picker.nvue:71", e); + }, + onpopupopened(e) { + formatAppLog("log", "at pages/extUI/data-picker/data-picker.nvue:74", "popupopened"); + }, + onpopupclosed(e) { + formatAppLog("log", "at pages/extUI/data-picker/data-picker.nvue:77", "popupclosed"); + }, + onchange(e) { + formatAppLog("log", "at pages/extUI/data-picker/data-picker.nvue:80", "---------onchange:", e); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_card = resolveEasycom(resolveDynamicComponent("uni-card"), __easycom_0$1); + const _component_uni_data_picker = resolveEasycom(resolveDynamicComponent("uni-data-picker"), __easycom_1); + const _component_uni_section = resolveEasycom(resolveDynamicComponent("uni-section"), __easycom_2); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "container" }, [ + createVNode(_component_uni_card, { + "is-full": "", + "is-shadow": false + }, { + default: withCtx(() => [ + createElementVNode("u-text", { class: "uni-h6" }, "\u6807\u7B7E\u7EC4\u4EF6\u591A\u7528\u4E8E\u5546\u54C1\u5206\u7C7B\u3001\u91CD\u70B9\u5185\u5BB9\u663E\u793A\u7B49\u573A\u666F\u3002") + ]), + _: 1 + }), + createCommentVNode(` \r + uni-data-picker\r + \r + \r + \r +\r + \r + uni-data-picker \u6709\u9ED8\u8BA4\u503C\r + \r + \r + `), + createVNode(_component_uni_section, { + title: "\u672C\u5730\u6570\u636E", + type: "line", + padding: "", + style: { "height": "calc(100vh - 100px)" } + }, { + default: withCtx(() => [ + createVNode(_component_uni_data_picker, { + placeholder: "\u8BF7\u9009\u62E9\u73ED\u7EA7", + "popup-title": "\u8BF7\u9009\u62E9\u6240\u5728\u5730\u533A", + localdata: $data.dataTree, + modelValue: $data.classes, + "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.classes = $event), + onChange: $options.onchange, + onNodeclick: $options.onnodeclick, + onPopupopened: $options.onpopupopened, + onPopupclosed: $options.onpopupclosed + }, null, 8, ["localdata", "modelValue", "onChange", "onNodeclick", "onPopupopened", "onPopupclosed"]) + ]), + _: 1 + }) + ]) + ]); +} +var dataPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/extUI/data-picker/data-picker.nvue"]]); +export { dataPicker as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/font/font.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/font/font.js new file mode 100644 index 000000000..01570c67b --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/font/font.js @@ -0,0 +1,123 @@ +import { _ as __easycom_0 } from "../../../uni-card.js"; +import { resolveDynamicComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as __easycom_2 } from "../../../uni-section.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import "../../../shared.esm-bundler.js"; +const _sfc_main = {}; +function _sfc_render(_ctx, _cache) { + const _component_uni_card = resolveEasycom(resolveDynamicComponent("uni-card"), __easycom_0); + const _component_uni_section = resolveEasycom(resolveDynamicComponent("uni-section"), __easycom_2); + return openBlock(), createElementBlock("view", { class: "container" }, [ + createVNode(_component_uni_card, { + "is-shadow": false, + "is-full": "" + }, { + default: withCtx(() => [ + createElementVNode("u-text", { class: "uni-h6" }, "\u5B57\u4F53\u8F85\u52A9\u6837\u5F0F\u63D0\u4F9B\u4E86\u5E38\u89C1\u7684\u5B57\u4F53\u6837\u5F0F\u7C7B") + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: ".uni-h1", + type: "line" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "uni-ma-5 uni-mb-5 uni-pl-10" }, [ + createElementVNode("u-text", { class: "uni-h1" }, "\u4E00\u7EA7\u6807\u9898") + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: ".uni-h2", + type: "line" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "uni-mx-5 uni-mb-5 uni-pl-10" }, [ + createElementVNode("u-text", { class: "uni-h2" }, "\u4E8C\u7EA7\u6807\u9898") + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: ".uni-h3", + type: "line" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "uni-mx-5 uni-mb-5 uni-pl-10" }, [ + createElementVNode("u-text", { class: "uni-h3" }, "\u4E09\u7EA7\u6807\u9898") + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: ".uni-h4", + type: "line" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "uni-mx-5 uni-mb-5 uni-pl-10" }, [ + createElementVNode("u-text", { class: "uni-h4" }, "\u56DB\u7EA7\u6807\u9898") + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: ".uni-h5", + type: "line" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "uni-mx-5 uni-mb-5 uni-pl-10" }, [ + createElementVNode("u-text", { class: "uni-h5" }, "\u4E94\u7EA7\u6807\u9898") + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: ".uni-h6", + type: "line" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "uni-mx-5 uni-mb-5 uni-pl-10" }, [ + createElementVNode("u-text", { class: "uni-h6" }, "\u516D\u7EA7\u6807\u9898") + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: ".uni-subtitle", + type: "line" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "uni-mx-5 uni-mb-5 uni-pl-10" }, [ + createElementVNode("u-text", { class: "uni-subtitle" }, "\u526F\u6807\u9898") + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: ".uni-body", + type: "line" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "uni-mx-5 uni-mb-5 uni-pl-10" }, [ + createElementVNode("u-text", { class: "uni-body" }, "uni-ui \u662F DCloud \u5B98\u65B9\u9762\u5411 uni-app \u5F00\u53D1\u8005\u63D0\u4F9B\u7684\u4E00\u5957 ui \u89E3\u51B3\u65B9\u6848") + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: ".uni-caption", + type: "line" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "uni-mx-5 uni-mb-5 uni-pl-10" }, [ + createElementVNode("u-text", { class: "uni-caption" }, "\u6807\u6CE8\u8BF4\u660E\u6587\u5B57") + ]) + ]), + _: 1 + }) + ]); +} +var font = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/extUI/font/font.nvue"]]); +export { font as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/goods-nav/goods-nav.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/goods-nav/goods-nav.js new file mode 100644 index 000000000..e5178f20b --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/goods-nav/goods-nav.js @@ -0,0 +1,279 @@ +import { f as formatAppLog } from "../../../uni-shared.es.js"; +import { _ as __easycom_0 } from "../../../uni-card.js"; +import { resolveDynamicComponent, openBlock, createElementBlock, createCommentVNode, createElementVNode, Fragment, renderList, createVNode, toDisplayString, normalizeClass, normalizeStyle, withCtx } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as __easycom_1$1 } from "../../../uni-icons.js"; +import { i as initVueI18n } from "../../../uni-i18n.es.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import { _ as __easycom_2 } from "../../../uni-section.js"; +import "../../../shared.esm-bundler.js"; +var en = { + "uni-goods-nav.options.shop": "shop", + "uni-goods-nav.options.cart": "cart", + "uni-goods-nav.buttonGroup.addToCart": "add to cart", + "uni-goods-nav.buttonGroup.buyNow": "buy now" +}; +var zhHans = { + "uni-goods-nav.options.shop": "\u5E97\u94FA", + "uni-goods-nav.options.cart": "\u8D2D\u7269\u8F66", + "uni-goods-nav.buttonGroup.addToCart": "\u52A0\u5165\u8D2D\u7269\u8F66", + "uni-goods-nav.buttonGroup.buyNow": "\u7ACB\u5373\u8D2D\u4E70" +}; +var zhHant = { + "uni-goods-nav.options.shop": "\u5E97\u92EA", + "uni-goods-nav.options.cart": "\u8CFC\u7269\u8ECA", + "uni-goods-nav.buttonGroup.addToCart": "\u52A0\u5165\u8CFC\u7269\u8ECA", + "uni-goods-nav.buttonGroup.buyNow": "\u7ACB\u5373\u8CFC\u8CB7" +}; +var messages = { + en, + "zh-Hans": zhHans, + "zh-Hant": zhHant +}; +var _style_0$1 = { "flex": { "": { "flexDirection": "row" } }, "uni-goods-nav": { "": { "flex": 1, "flexDirection": "row" } }, "uni-tab__cart-box": { "": { "flex": 1, "height": 50, "backgroundColor": "#ffffff", "zIndex": 900 } }, "uni-tab__cart-sub-left": { "": { "paddingTop": 0, "paddingRight": 5, "paddingBottom": 0, "paddingLeft": 5 } }, "uni-tab__cart-sub-right": { "": { "flex": 1 } }, "uni-tab__right": { "": { "marginTop": 5, "marginRight": 10, "marginBottom": 5, "marginLeft": 0, "borderRadius": 100, "overflow": "hidden" } }, "uni-tab__cart-button-left": { "": { "position": "relative", "justifyContent": "center", "alignItems": "center", "flexDirection": "column", "marginTop": 0, "marginRight": 10, "marginBottom": 0, "marginLeft": 10 } }, "uni-tab__icon": { "": { "width": 18, "height": 18 } }, "image": { "": { "width": 18, "height": 18 } }, "uni-tab__text": { "": { "marginTop": 3, "fontSize": 12, "color": "#646566" } }, "uni-tab__cart-button-right": { "": { "flex": 1, "justifyContent": "center", "alignItems": "center", "opacity:active": 0.7 } }, "uni-tab__cart-button-right-text": { "": { "fontSize": 14, "color": "#ffffff" } }, "uni-tab__dot-box": { "": { "position": "absolute", "right": -2, "top": 2, "justifyContent": "center", "alignItems": "center" } }, "uni-tab__dot": { "": { "paddingTop": 0, "paddingRight": 4, "paddingBottom": 0, "paddingLeft": 4, "lineHeight": 15, "color": "#ffffff", "textAlign": "center", "fontSize": 12, "backgroundColor": "#ff0000", "borderRadius": 15 } }, "uni-tab__dots": { "": { "paddingTop": 0, "paddingRight": 4, "paddingBottom": 0, "paddingLeft": 4, "borderRadius": 15 } } }; +const { t } = initVueI18n(messages); +const _sfc_main$1 = { + name: "UniGoodsNav", + emits: ["click", "buttonClick"], + props: { + options: { + type: Array, + default() { + return [{ + icon: "shop", + text: t("uni-goods-nav.options.shop") + }, { + icon: "cart", + text: t("uni-goods-nav.options.cart") + }]; + } + }, + buttonGroup: { + type: Array, + default() { + return [ + { + text: t("uni-goods-nav.buttonGroup.addToCart"), + backgroundColor: "linear-gradient(90deg, #FFCD1E, #FF8A18)", + color: "#fff" + }, + { + text: t("uni-goods-nav.buttonGroup.buyNow"), + backgroundColor: "linear-gradient(90deg, #FE6035, #EF1224)", + color: "#fff" + } + ]; + } + }, + fill: { + type: Boolean, + default: false + }, + stat: { + type: Boolean, + default: false + } + }, + methods: { + onClick(index, item) { + this.$emit("click", { + index, + content: item + }); + }, + buttonClick(index, item) { + if (uni.report && this.stat) { + uni.report(item.text, item.text); + } + this.$emit("buttonClick", { + index, + content: item + }); + } + } +}; +function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_icons = resolveEasycom(resolveDynamicComponent("uni-icons"), __easycom_1$1); + return openBlock(), createElementBlock("view", { class: "uni-goods-nav" }, [ + createCommentVNode(" \u5E95\u90E8\u5360\u4F4D "), + createElementVNode("view", { class: "uni-tab__seat" }), + createElementVNode("view", { class: "uni-tab__cart-box flex" }, [ + createElementVNode("view", { class: "flex uni-tab__cart-sub-left" }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList($props.options, (item, index) => { + return openBlock(), createElementBlock("view", { + key: index, + class: "flex uni-tab__cart-button-left uni-tab__shop-cart", + onClick: ($event) => $options.onClick(index, item) + }, [ + createElementVNode("view", { class: "uni-tab__icon" }, [ + createVNode(_component_uni_icons, { + type: item.icon, + size: "20", + color: "#646566" + }, null, 8, ["type"]), + createCommentVNode(' ') + ]), + createElementVNode("u-text", { class: "uni-tab__text" }, toDisplayString(item.text), 1), + createElementVNode("view", { class: "flex uni-tab__dot-box" }, [ + item.info ? (openBlock(), createElementBlock("u-text", { + key: 0, + class: normalizeClass([{ "uni-tab__dots": item.info > 9 }, "uni-tab__dot"]), + style: normalizeStyle({ + "backgroundColor": item.infoBackgroundColor ? item.infoBackgroundColor : "#ff0000", + color: item.infoColor ? item.infoColor : "#fff" + }) + }, toDisplayString(item.info), 7)) : createCommentVNode("v-if", true) + ]) + ], 8, ["onClick"]); + }), 128)) + ]), + createElementVNode("view", { + class: normalizeClass([{ "uni-tab__right": $props.fill }, "flex uni-tab__cart-sub-right"]) + }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList($props.buttonGroup, (item, index) => { + return openBlock(), createElementBlock("view", { + key: index, + style: normalizeStyle({ background: item.backgroundColor, color: item.color }), + class: "flex uni-tab__cart-button-right", + onClick: ($event) => $options.buttonClick(index, item) + }, [ + createElementVNode("u-text", { + style: normalizeStyle({ color: item.color }), + class: "uni-tab__cart-button-right-text" + }, toDisplayString(item.text), 5) + ], 12, ["onClick"]); + }), 128)) + ], 2) + ]) + ]); +} +var __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["styles", [_style_0$1]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-goods-nav/components/uni-goods-nav/uni-goods-nav.vue"]]); +var _style_0 = { "example-body": { "": { "paddingTop": 0, "paddingRight": 0, "paddingBottom": 0, "paddingLeft": 0 } }, "goods-carts": { "": { "flexDirection": "column", "position": "fixed", "left": 0, "right": 0, "bottom": 0 } } }; +const _sfc_main = { + components: {}, + data() { + return { + options: [{ + icon: "chat", + text: "\u5BA2\u670D" + }, { + icon: "shop", + text: "\u5E97\u94FA", + info: 2, + infoBackgroundColor: "#007aff", + infoColor: "#f5f5f5" + }, { + icon: "cart", + text: "\u8D2D\u7269\u8F66", + info: 2 + }], + buttonGroup: [ + { + text: "\u52A0\u5165\u8D2D\u7269\u8F66", + backgroundColor: "linear-gradient(90deg, #FFCD1E, #FF8A18)", + color: "#fff" + }, + { + text: "\u7ACB\u5373\u8D2D\u4E70", + backgroundColor: "linear-gradient(90deg, #FE6035, #EF1224)", + color: "#fff" + } + ], + customButtonGroup: [ + { + text: "\u52A0\u5165\u8D2D\u7269\u8F66", + backgroundColor: "linear-gradient(90deg, #1E83FF, #0053B8)", + color: "#fff" + }, + { + text: "\u7ACB\u5373\u8D2D\u4E70", + backgroundColor: "linear-gradient(90deg, #60F3FF, #088FEB)", + color: "#fff" + } + ], + customButtonGroup1: [{ + text: "\u7ACB\u5373\u8D2D\u4E70", + backgroundColor: "linear-gradient(90deg, #FE6035, #EF1224)", + color: "#fff" + }] + }; + }, + onLoad() { + }, + methods: { + onClick(e) { + uni.showToast({ + title: `\u70B9\u51FB${e.content.text}`, + icon: "none" + }); + }, + buttonClick(e) { + formatAppLog("log", "at pages/extUI/goods-nav/goods-nav.nvue:80", e); + this.options[2].info++; + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_card = resolveEasycom(resolveDynamicComponent("uni-card"), __easycom_0); + const _component_uni_goods_nav = resolveEasycom(resolveDynamicComponent("uni-goods-nav"), __easycom_1); + const _component_uni_section = resolveEasycom(resolveDynamicComponent("uni-section"), __easycom_2); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "uni-container" }, [ + createVNode(_component_uni_card, { "is-full": "" }, { + default: withCtx(() => [ + createElementVNode("u-text", { class: "uni-h6" }, " uni-goods-nav \u7EC4\u4EF6\u4E3B\u8981\u7528\u4E8E\u7535\u5546\u7C7B\u5E94\u7528\u5E95\u90E8\u5BFC\u822A\uFF0C\u53EF\u81EA\u5B9A\u4E49\u52A0\u5165\u8D2D\u7269\u8F66\uFF0C\u8D2D\u4E70\u7B49\u64CD\u4F5C") + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u57FA\u7840\u7528\u6CD5", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_goods_nav, { onClick: $options.onClick }, null, 8, ["onClick"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u81EA\u5B9A\u4E49\u7528\u6CD5", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_goods_nav, { + fill: true, + options: $data.options, + "button-group": $data.customButtonGroup, + onClick: $options.onClick, + onButtonClick: $options.buttonClick + }, null, 8, ["options", "button-group", "onClick", "onButtonClick"]), + createVNode(_component_uni_goods_nav, { + fill: true, + options: $data.options, + "button-group": $data.customButtonGroup1, + onClick: $options.onClick, + onButtonClick: $options.buttonClick, + style: { "margin-top": "20px" } + }, null, 8, ["options", "button-group", "onClick", "onButtonClick"]) + ]), + _: 1 + }), + createElementVNode("view", { class: "goods-carts" }, [ + createVNode(_component_uni_goods_nav, { + options: $data.options, + fill: true, + "button-group": $data.buttonGroup, + onClick: $options.onClick, + onButtonClick: $options.buttonClick + }, null, 8, ["options", "button-group", "onClick", "onButtonClick"]) + ]) + ]) + ]); +} +var goodsNav = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/extUI/goods-nav/goods-nav.nvue"]]); +export { goodsNav as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/grid/grid.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/grid/grid.js new file mode 100644 index 000000000..4a14abe03 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/grid/grid.js @@ -0,0 +1,674 @@ +import { _ as __easycom_0 } from "../../../uni-card.js"; +import { openBlock, createElementBlock, normalizeStyle, createElementVNode, normalizeClass, renderSlot, createCommentVNode, resolveDynamicComponent, resolveComponent, createVNode, withCtx, Fragment, renderList, createBlock, toDisplayString, createTextVNode } from "vue"; +import { a as requireNativePlugin, r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as __easycom_1 } from "../../../uni-icons.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import { _ as __easycom_2$1 } from "../../../uni-section.js"; +import { _ as __easycom_5 } from "../../../uni-badge.js"; +import "../../../shared.esm-bundler.js"; +var _style_0$2 = { "uni-grid-item__box": { "": { "position": "relative", "flex": 1, "flexDirection": "column" } }, "uni-grid-item--border": { "": { "position": "relative", "borderBottomColor": "#D2D2D2", "borderBottomStyle": "solid", "borderBottomWidth": 0.5, "borderRightColor": "#D2D2D2", "borderRightStyle": "solid", "borderRightWidth": 0.5 } }, "uni-grid-item--border-top": { "": { "position": "relative", "borderTopColor": "#D2D2D2", "borderTopStyle": "solid", "borderTopWidth": 0.5 } }, "uni-highlight": { "": { "backgroundColor:active": "#f1f1f1" } } }; +const _sfc_main$2 = { + name: "UniGridItem", + inject: ["grid"], + props: { + index: { + type: Number, + default: 0 + } + }, + data() { + return { + column: 0, + showBorder: true, + square: true, + highlight: true, + left: 0, + top: 0, + openNum: 2, + width: 0, + borderColor: "#e5e5e5" + }; + }, + created() { + this.column = this.grid.column; + this.showBorder = this.grid.showBorder; + this.square = this.grid.square; + this.highlight = this.grid.highlight; + this.top = this.hor === 0 ? this.grid.hor : this.hor; + this.left = this.ver === 0 ? this.grid.ver : this.ver; + this.borderColor = this.grid.borderColor; + this.grid.children.push(this); + this.width = this.grid.width; + }, + beforeDestroy() { + this.grid.children.forEach((item, index) => { + if (item === this) { + this.grid.children.splice(index, 1); + } + }); + }, + methods: { + _onClick() { + this.grid.change({ + detail: { + index: this.index + } + }); + } + } +}; +function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { + return $data.width ? (openBlock(), createElementBlock("view", { + key: 0, + style: normalizeStyle("width:" + $data.width + ";" + ($data.square ? "height:" + $data.width : "")), + class: "uni-grid-item" + }, [ + createElementVNode("view", { + class: normalizeClass([{ "uni-grid-item--border": $data.showBorder, "uni-grid-item--border-top": $data.showBorder && $props.index < $data.column, "uni-highlight": $data.highlight }, "uni-grid-item__box"]), + style: normalizeStyle({ "border-right-color": $data.borderColor, "border-bottom-color": $data.borderColor, "border-top-color": $data.borderColor }), + onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args)) + }, [ + renderSlot(_ctx.$slots, "default") + ], 6) + ], 4)) : createCommentVNode("v-if", true); +} +var __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["styles", [_style_0$2]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-grid/components/uni-grid-item/uni-grid-item.vue"]]); +var _style_0$1 = { "uni-grid-wrap": { "": { "flex": 1, "flexDirection": "column" } }, "uni-grid": { "": { "flexDirection": "row", "flexWrap": "wrap" } }, "uni-grid--border": { "": { "position": "relative", "borderLeftColor": "#D2D2D2", "borderLeftStyle": "solid", "borderLeftWidth": 0.5 } } }; +const dom = requireNativePlugin("dom"); +const _sfc_main$1 = { + name: "UniGrid", + emits: ["change"], + props: { + column: { + type: Number, + default: 3 + }, + showBorder: { + type: Boolean, + default: true + }, + borderColor: { + type: String, + default: "#D2D2D2" + }, + square: { + type: Boolean, + default: true + }, + highlight: { + type: Boolean, + default: true + } + }, + provide() { + return { + grid: this + }; + }, + data() { + const elId = `Uni_${Math.ceil(Math.random() * 1e6).toString(36)}`; + return { + elId, + width: 0 + }; + }, + created() { + this.children = []; + }, + mounted() { + this.$nextTick(() => { + this.init(); + }); + }, + methods: { + init() { + setTimeout(() => { + this._getSize((width) => { + this.children.forEach((item, index) => { + item.width = width; + }); + }); + }, 50); + }, + change(e) { + this.$emit("change", e); + }, + _getSize(fn) { + dom.getComponentRect(this.$refs["uni-grid"], (ret) => { + this.width = parseInt((ret.size.width - 1) / this.column) + "px"; + fn(this.width); + }); + } + } +}; +function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("view", { class: "uni-grid-wrap" }, [ + createElementVNode("view", { + id: $data.elId, + ref: "uni-grid", + class: normalizeClass(["uni-grid", { "uni-grid--border": $props.showBorder }]), + style: normalizeStyle({ "border-left-color": $props.borderColor }) + }, [ + renderSlot(_ctx.$slots, "default") + ], 14, ["id"]) + ]); +} +var __easycom_3 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["styles", [_style_0$1]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-grid/components/uni-grid/uni-grid.vue"]]); +var _style_0 = { "image": { "": { "width": 25, "height": 25 } }, "text": { "": { "fontSize": 14, "marginTop": 5 } }, "grid-dynamic-box": { "": { "marginBottom": 15 } }, "grid-item-box": { "": { "flex": 1, "flexDirection": "column", "alignItems": "center", "justifyContent": "center", "paddingTop": 15, "paddingRight": 0, "paddingBottom": 15, "paddingLeft": 0 } }, "grid-item-box-row": { "": { "flex": 1, "flexDirection": "row", "alignItems": "center", "justifyContent": "center", "paddingTop": 15, "paddingRight": 0, "paddingBottom": 15, "paddingLeft": 0 } }, "grid-dot": { "": { "position": "absolute", "top": 5, "right": 15 } }, "swiper": { "": { "height": 420 } } }; +const _sfc_main = { + components: {}, + data() { + return { + dynamicList: [], + list: [ + { + url: "/static/c1.png", + text: "Grid 1", + badge: "0", + type: "primary" + }, + { + url: "/static/c2.png", + text: "Grid 2", + badge: "1", + type: "success" + }, + { + url: "/static/c3.png", + text: "Grid 3", + badge: "99", + type: "warning" + }, + { + url: "/static/c4.png", + text: "Grid 4", + badge: "2", + type: "error" + }, + { + url: "/static/c5.png", + text: "Grid 5" + }, + { + url: "/static/c6.png", + text: "Grid 6" + }, + { + url: "/static/c7.png", + text: "Grid 7" + }, + { + url: "/static/c8.png", + text: "Grid 8" + }, + { + url: "/static/c9.png", + text: "Grid 9" + } + ] + }; + }, + methods: { + change(e) { + let { + index + } = e.detail; + this.list[index].badge && this.list[index].badge++; + uni.showToast({ + title: `\u70B9\u51FB\u7B2C${index + 1}\u4E2A\u5BAB\u683C`, + icon: "none" + }); + }, + add() { + if (this.dynamicList.length < 9) { + this.dynamicList.push({ + url: `/static/c${this.dynamicList.length + 1}.png`, + text: `Grid ${this.dynamicList.length + 1}`, + color: this.dynamicList.length % 2 === 0 ? "#f5f5f5" : "#fff" + }); + } else { + uni.showToast({ + title: "\u6700\u591A\u6DFB\u52A09\u4E2A", + icon: "none" + }); + } + }, + del() { + this.dynamicList.splice(this.dynamicList.length - 1, 1); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_card = resolveEasycom(resolveDynamicComponent("uni-card"), __easycom_0); + const _component_uni_icons = resolveEasycom(resolveDynamicComponent("uni-icons"), __easycom_1); + const _component_uni_grid_item = resolveEasycom(resolveDynamicComponent("uni-grid-item"), __easycom_2); + const _component_uni_grid = resolveEasycom(resolveDynamicComponent("uni-grid"), __easycom_3); + const _component_uni_section = resolveEasycom(resolveDynamicComponent("uni-section"), __easycom_2$1); + const _component_swiper_item = resolveComponent("swiper-item"); + const _component_swiper = resolveComponent("swiper"); + const _component_button = resolveComponent("button"); + const _component_uni_badge = resolveEasycom(resolveDynamicComponent("uni-badge"), __easycom_5); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "warp" }, [ + createVNode(_component_uni_card, { + "is-full": "", + "is-shadow": false + }, { + default: withCtx(() => [ + createElementVNode("u-text", { class: "uni-h6" }, "\u5BAB\u683C\u7EC4\u4EF6\u4E3B\u8981\u4F7F\u7528\u573A\u666F\u5982\uFF1A\u5546\u54C1\u63A8\u8350\u5217\u8868\u3001\u70ED\u95E8\u5185\u5BB9\u7B49") + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u57FA\u7840\u6837\u5F0F", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_grid, { + column: 4, + highlight: true, + onChange: $options.change + }, { + default: withCtx(() => [ + (openBlock(), createElementBlock(Fragment, null, renderList(4, (item, index) => { + return createVNode(_component_uni_grid_item, { + index, + key: index + }, { + default: withCtx(() => [ + createElementVNode("view", { + class: "grid-item-box", + style: { "background-color": "#fff" } + }, [ + createVNode(_component_uni_icons, { + type: "image", + size: 30, + color: "#777" + }), + createElementVNode("u-text", { class: "text" }, "\u6587\u672C\u4FE1\u606F") + ]) + ]), + _: 2 + }, 1032, ["index"]); + }), 64)) + ]), + _: 1 + }, 8, ["onChange"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u81EA\u5B9A\u4E49\u5217\u6570", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_grid, { + column: 4, + highlight: true, + onChange: $options.change + }, { + default: withCtx(() => [ + (openBlock(), createElementBlock(Fragment, null, renderList(8, (item, index) => { + return createVNode(_component_uni_grid_item, { + index, + key: index + }, { + default: withCtx(() => [ + createElementVNode("view", { + class: "grid-item-box", + style: { "background-color": "#fff" } + }, [ + createVNode(_component_uni_icons, { + type: "image", + size: 30, + color: "#777" + }), + createElementVNode("u-text", { class: "text" }, "\u6587\u672C\u4FE1\u606F") + ]) + ]), + _: 2 + }, 1032, ["index"]); + }), 64)) + ]), + _: 1 + }, 8, ["onChange"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u6ED1\u52A8\u89C6\u56FE", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createCommentVNode(" \u56E0\u4E3Aswiper\u7279\u6027\u7684\u5173\u7CFB\uFF0C\u8BF7\u6307\u5B9Aswiper\u7684\u9AD8\u5EA6 \uFF0Cswiper\u7684\u9AD8\u5EA6\u5E76\u4E0D\u4F1A\u88AB\u5185\u5BB9\u6491\u5F00"), + createVNode(_component_swiper, { + class: "swiper", + "indicator-dots": true + }, { + default: withCtx(() => [ + createVNode(_component_swiper_item, null, { + default: withCtx(() => [ + createVNode(_component_uni_grid, { + column: 3, + highlight: true, + onChange: $options.change + }, { + default: withCtx(() => [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.list, (item, index) => { + return openBlock(), createBlock(_component_uni_grid_item, { + index, + key: index + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "grid-item-box" }, [ + createElementVNode("u-image", { + src: item.url, + class: "image", + mode: "aspectFill" + }, null, 8, ["src"]), + createElementVNode("u-text", { class: "text" }, toDisplayString(item.text), 1) + ]) + ]), + _: 2 + }, 1032, ["index"]); + }), 128)) + ]), + _: 1 + }, 8, ["onChange"]) + ]), + _: 1 + }), + createVNode(_component_swiper_item, null, { + default: withCtx(() => [ + createVNode(_component_uni_grid, { + column: 3, + highlight: true, + onChange: $options.change + }, { + default: withCtx(() => [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.list, (item, index) => { + return openBlock(), createBlock(_component_uni_grid_item, { + index, + key: index + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "grid-item-box" }, [ + createElementVNode("u-image", { + src: item.url, + class: "image", + mode: "aspectFill" + }, null, 8, ["src"]), + createElementVNode("u-text", { class: "text" }, toDisplayString(item.text), 1) + ]) + ]), + _: 2 + }, 1032, ["index"]); + }), 128)) + ]), + _: 1 + }, 8, ["onChange"]) + ]), + _: 1 + }), + createVNode(_component_swiper_item, null, { + default: withCtx(() => [ + createVNode(_component_uni_grid, { + column: 3, + highlight: true, + onChange: $options.change + }, { + default: withCtx(() => [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.list, (item, index) => { + return openBlock(), createBlock(_component_uni_grid_item, { + index, + key: index + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "grid-item-box" }, [ + createElementVNode("u-image", { + src: item.url, + class: "image", + mode: "aspectFill" + }, null, 8, ["src"]), + createElementVNode("u-text", { class: "text" }, toDisplayString(item.text), 1) + ]) + ]), + _: 2 + }, 1032, ["index"]); + }), 128)) + ]), + _: 1 + }, 8, ["onChange"]) + ]), + _: 1 + }) + ]), + _: 1 + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u52A8\u6001\u52A0\u8F7D", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "grid-dynamic-box" }, [ + createVNode(_component_uni_grid, { + column: 3, + highlight: true, + onChange: $options.change + }, { + default: withCtx(() => [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.dynamicList, (item, index) => { + return openBlock(), createBlock(_component_uni_grid_item, { + index, + key: index + }, { + default: withCtx(() => [ + createElementVNode("view", { + class: "grid-item-box", + style: normalizeStyle({ "backgroundColor": item.color }) + }, [ + createElementVNode("u-image", { + src: item.url, + class: "image", + mode: "aspectFill" + }, null, 8, ["src"]), + createElementVNode("u-text", { class: "text" }, toDisplayString(item.text), 1) + ], 4) + ]), + _: 2 + }, 1032, ["index"]); + }), 128)) + ]), + _: 1 + }, 8, ["onChange"]) + ]), + createVNode(_component_button, { + type: "primary", + onClick: $options.add + }, { + default: withCtx(() => [ + createTextVNode("\u70B9\u51FB\u6DFB\u52A0\u4E00\u4E2A\u5BAB\u683C") + ]), + _: 1 + }, 8, ["onClick"]), + $data.dynamicList.length !== 0 ? (openBlock(), createBlock(_component_button, { + key: 0, + type: "primary", + style: { "margin-top": "15px" }, + onClick: $options.del + }, { + default: withCtx(() => [ + createTextVNode("\u70B9\u51FB\u5220\u9664\u4E00\u4E2A\u5BAB\u683C") + ]), + _: 1 + }, 8, ["onClick"])) : createCommentVNode("v-if", true) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u65E0\u8FB9\u6846\u5E26\u89D2\u6807\uFF083\u5217\uFF09", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_grid, { + column: 3, + "show-border": false, + square: false, + onChange: $options.change + }, { + default: withCtx(() => [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.list, (item, index) => { + return openBlock(), createBlock(_component_uni_grid_item, { + index, + key: index + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "grid-item-box" }, [ + createElementVNode("u-image", { + class: "image", + src: item.url, + mode: "aspectFill" + }, null, 8, ["src"]), + createElementVNode("u-text", { class: "text" }, toDisplayString(item.text), 1), + item.badge ? (openBlock(), createElementBlock("view", { + key: 0, + class: "grid-dot" + }, [ + createVNode(_component_uni_badge, { + text: item.badge, + type: item.type + }, null, 8, ["text", "type"]) + ])) : createCommentVNode("v-if", true) + ]) + ]), + _: 2 + }, 1032, ["index"]); + }), 128)) + ]), + _: 1 + }, 8, ["onChange"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u77E9\u5F62\u5BAB\u683C\uFF083\u5217\uFF09", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_grid, { + column: 3, + square: false, + highlight: false, + onChange: $options.change + }, { + default: withCtx(() => [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.list, (item, index) => { + return openBlock(), createBlock(_component_uni_grid_item, { + index, + key: index + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "grid-item-box" }, [ + createElementVNode("u-image", { + src: item.url, + class: "image", + mode: "aspectFill" + }, null, 8, ["src"]), + createElementVNode("u-text", { class: "text" }, toDisplayString(item.text), 1) + ]) + ]), + _: 2 + }, 1032, ["index"]); + }), 128)) + ]), + _: 1 + }, 8, ["onChange"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u8FB9\u6846\u989C\u8272\uFF084\u5217 \u65E0\u6587\u5B57\uFF09", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_grid, { + column: 4, + "border-color": "#03a9f4", + onChange: $options.change + }, { + default: withCtx(() => [ + createVNode(_component_uni_grid_item, { index: 0 }, { + default: withCtx(() => [ + createElementVNode("view", { class: "grid-item-box" }, [ + createElementVNode("u-image", { + class: "image", + src: "/static/c1.png", + mode: "aspectFill" + }) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_grid_item, { index: 1 }, { + default: withCtx(() => [ + createElementVNode("view", { class: "grid-item-box" }, [ + createElementVNode("u-image", { + class: "image", + src: "/static/c2.png", + mode: "aspectFill" + }) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_grid_item, { index: 2 }, { + default: withCtx(() => [ + createElementVNode("view", { class: "grid-item-box" }, [ + createElementVNode("u-image", { + class: "image", + src: "/static/c3.png", + mode: "aspectFill" + }) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_grid_item, { index: 3 }, { + default: withCtx(() => [ + createElementVNode("view", { class: "grid-item-box" }, [ + createElementVNode("u-image", { + class: "image", + src: "/static/c4.png", + mode: "aspectFill" + }) + ]) + ]), + _: 1 + }) + ]), + _: 1 + }, 8, ["onChange"]) + ]), + _: 1 + }) + ]) + ]); +} +var grid = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/extUI/grid/grid.nvue"]]); +export { grid as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/icons/icons.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/icons/icons.js new file mode 100644 index 000000000..c52d9151c --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/icons/icons.js @@ -0,0 +1,571 @@ +import { _ as __easycom_0 } from "../../../uni-card.js"; +import { resolveDynamicComponent, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, Fragment, renderList, normalizeStyle, toDisplayString } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as __easycom_1 } from "../../../uni-icons.js"; +import { _ as __easycom_2 } from "../../../uni-section.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import "../../../shared.esm-bundler.js"; +var _style_0 = { "icon-content": { "": { "display": "flex", "flexWrap": "wrap", "flexDirection": "row", "justifyContent": "center" } }, "icon-item": { ".icon-content ": { "width": "187rpx", "alignItems": "center", "paddingTop": 10, "paddingRight": 10, "paddingBottom": 10, "paddingLeft": 10, "textAlign": "center", "flexDirection": "column" } } }; +const _sfc_main = { + components: {}, + data() { + return { + iconClassList: [{ + "name": "arrow-down", + "unicode": "e6be" + }, { + "name": "arrow-left", + "unicode": "e6bc" + }, { + "name": "arrow-right", + "unicode": "e6bb" + }, { + "name": "arrow-up", + "unicode": "e6bd" + }, { + "name": "bottom", + "unicode": "e6b8" + }, { + "name": "left", + "unicode": "e6b7" + }, { + "name": "right", + "unicode": "e6b5" + }, { + "name": "top", + "unicode": "e6b6" + }, { + "name": "back", + "unicode": "e6b9" + }, { + "name": "forward", + "unicode": "e6ba" + }, { + "name": "checkmarkempty", + "unicode": "e65c" + }, { + "name": "closeempty", + "unicode": "e66c" + }, { + "name": "color", + "unicode": "e6cf" + }, { + "name": "color-filled", + "unicode": "e6c9" + }, { + "name": "wallet", + "unicode": "e6b1" + }, { + "name": "wallet-filled", + "unicode": "e6c2" + }, { + "name": "tune", + "unicode": "e6aa" + }, { + "name": "tune-filled", + "unicode": "e6ca" + }, { + "name": "settings", + "unicode": "e560" + }, { + "name": "settings-filled", + "unicode": "e6ce" + }, { + "name": "folder-add", + "unicode": "e6a9" + }, { + "name": "folder-add-filled", + "unicode": "e6c8" + }, { + "name": "calendar", + "unicode": "e6a8" + }, { + "name": "calendar-filled", + "unicode": "e6c0" + }, { + "name": "vip", + "unicode": "e6a8" + }, { + "name": "vip-filled", + "unicode": "e6c6" + }, { + "name": "notification", + "unicode": "e6a6" + }, { + "name": "notification-filled", + "unicode": "e6c1" + }, { + "name": "gift", + "unicode": "e6a4" + }, { + "name": "gift-filled", + "unicode": "e6c4" + }, { + "name": "medal", + "unicode": "e6a2" + }, { + "name": "medal-filled", + "unicode": "e6c3" + }, { + "name": "fire", + "unicode": "e6a1" + }, { + "name": "fire-filled", + "unicode": "e6c5" + }, { + "name": "camera", + "unicode": "e301" + }, { + "name": "camera-filled", + "unicode": "e7ef" + }, { + "name": "cart", + "unicode": "e7f5" + }, { + "name": "cart-filled", + "unicode": "e7f4" + }, { + "name": "chat", + "unicode": "e263" + }, { + "name": "chat-filled", + "unicode": "e847" + }, { + "name": "chatboxes", + "unicode": "e203" + }, { + "name": "chatboxes-filled", + "unicode": "e233" + }, { + "name": "chatbubble", + "unicode": "e202" + }, { + "name": "chatbubble-filled", + "unicode": "e232" + }, { + "name": "minus", + "unicode": "e410" + }, { + "name": "minus-filled", + "unicode": "e440" + }, { + "name": "plus", + "unicode": "e409" + }, { + "name": "plus-filled", + "unicode": "e439" + }, { + "name": "checkbox", + "unicode": "e7fa" + }, { + "name": "checkbox-filled", + "unicode": "e442" + }, { + "name": "close", + "unicode": "e404" + }, { + "name": "clear", + "unicode": "e434" + }, { + "name": "circle", + "unicode": "e411" + }, { + "name": "circle-filled", + "unicode": "e441" + }, { + "name": "help", + "unicode": "e505" + }, { + "name": "help-filled", + "unicode": "e535" + }, { + "name": "info", + "unicode": "e504" + }, { + "name": "info-filled", + "unicode": "e534" + }, { + "name": "smallcircle", + "unicode": "e868" + }, { + "name": "smallcircle-filled", + "unicode": "e801" + }, { + "name": "upload", + "unicode": "e402" + }, { + "name": "upload-filled", + "unicode": "e8b1" + }, { + "name": "download", + "unicode": "e403" + }, { + "name": "download-filled", + "unicode": "e8a4" + }, { + "name": "cloud-download", + "unicode": "e8e4" + }, { + "name": "cloud-download-filled", + "unicode": "e8e9" + }, { + "name": "cloud-upload", + "unicode": "e8e6" + }, { + "name": "cloud-upload-filled", + "unicode": "e8e5" + }, { + "name": "email", + "unicode": "e201" + }, { + "name": "email-filled", + "unicode": "e231" + }, { + "name": "mail-open", + "unicode": "e84e" + }, { + "name": "mail-open-filled", + "unicode": "e84d" + }, { + "name": "eye", + "unicode": "e824" + }, { + "name": "eye-filled", + "unicode": "e568" + }, { + "name": "eye-slash", + "unicode": "e823" + }, { + "name": "eye-slash-filled", + "unicode": "e822" + }, { + "name": "hand-down", + "unicode": "e83c" + }, { + "name": "hand-down-filled", + "unicode": "e83b" + }, { + "name": "hand-up", + "unicode": "e83f" + }, { + "name": "hand-up-filled", + "unicode": "e83d" + }, { + "name": "gear", + "unicode": "e502" + }, { + "name": "gear-filled", + "unicode": "e532" + }, { + "name": "flag", + "unicode": "e508" + }, { + "name": "flag-filled", + "unicode": "e825" + }, { + "name": "heart", + "unicode": "e840" + }, { + "name": "heart-filled", + "unicode": "e83e" + }, { + "name": "home", + "unicode": "e500" + }, { + "name": "home-filled", + "unicode": "e530" + }, { + "name": "image", + "unicode": "e363" + }, { + "name": "image-filled", + "unicode": "e877" + }, { + "name": "images", + "unicode": "e87b" + }, { + "name": "images-filled", + "unicode": "e87a" + }, { + "name": "locked", + "unicode": "e506" + }, { + "name": "locked-filled", + "unicode": "e856" + }, { + "name": "location", + "unicode": "e303" + }, { + "name": "location-filled", + "unicode": "e333" + }, { + "name": "map", + "unicode": "e364" + }, { + "name": "map-filled", + "unicode": "e85c" + }, { + "name": "map-pin", + "unicode": "e85e" + }, { + "name": "map-pin-ellipse", + "unicode": "e864" + }, { + "name": "mic", + "unicode": "e302" + }, { + "name": "mic-filled", + "unicode": "e332" + }, { + "name": "micoff", + "unicode": "e360" + }, { + "name": "micoff-filled", + "unicode": "e892" + }, { + "name": "more", + "unicode": "e507" + }, { + "name": "more-filled", + "unicode": "e537" + }, { + "name": "navigate", + "unicode": "e501" + }, { + "name": "navigate-filled", + "unicode": "e884" + }, { + "name": "paperplane", + "unicode": "e503" + }, { + "name": "paperplane-filled", + "unicode": "e86e" + }, { + "name": "contact", + "unicode": "e100" + }, { + "name": "contact-filled", + "unicode": "e130" + }, { + "name": "auth", + "unicode": "e6ab" + }, { + "name": "auth-filled", + "unicode": "e6cc" + }, { + "name": "staff", + "unicode": "e6a7" + }, { + "name": "staff-filled", + "unicode": "e6cb" + }, { + "name": "person", + "unicode": "e101" + }, { + "name": "person-filled", + "unicode": "e131" + }, { + "name": "personadd", + "unicode": "e102" + }, { + "name": "personadd-filled", + "unicode": "e132" + }, { + "name": "phone", + "unicode": "e200" + }, { + "name": "phone-filled", + "unicode": "e230" + }, { + "name": "refresh", + "unicode": "e407" + }, { + "name": "refresh-filled", + "unicode": "e437" + }, { + "name": "redo", + "unicode": "e405" + }, { + "name": "redo-filled", + "unicode": "e7d9" + }, { + "name": "undo", + "unicode": "e406" + }, { + "name": "undo-filled", + "unicode": "e7d6" + }, { + "name": "qq", + "unicode": "e264" + }, { + "name": "weibo", + "unicode": "e260" + }, { + "name": "weixin", + "unicode": "e261" + }, { + "name": "pyq", + "unicode": "e262" + }, { + "name": "sound", + "unicode": "e590" + }, { + "name": "sound-filled", + "unicode": "e8a1" + }, { + "name": "videocam", + "unicode": "e300" + }, { + "name": "videocam-filled", + "unicode": "e8af" + }, { + "name": "trash", + "unicode": "e401" + }, { + "name": "trash-filled", + "unicode": "e8dc" + }, { + "name": "refreshempty", + "unicode": "e461" + }, { + "name": "reload", + "unicode": "e462" + }, { + "name": "star", + "unicode": "e408" + }, { + "name": "star-filled", + "unicode": "e438" + }, { + "name": "starhalf", + "unicode": "e463" + }, { + "name": "spinner-cycle", + "unicode": "e465" + }, { + "name": "link", + "unicode": "e6a5" + }, { + "name": "font", + "unicode": "e6a3" + }, { + "name": "scan", + "unicode": "e612" + }, { + "name": "search", + "unicode": "e466" + }, { + "name": "compose", + "unicode": "e400" + }, { + "name": "bars", + "unicode": "e563" + }, { + "name": "list", + "unicode": "e562" + }, { + "name": "loop", + "unicode": "e565" + }, { + "name": "paperclip", + "unicode": "e567" + }, { + "name": "plusempty", + "unicode": "e468" + }, { + "name": "pulldown", + "unicode": "e588" + }, { + "name": "headphones", + "unicode": "e8bf" + }, { + "name": "shop", + "shop": "e609" + }, { + "name": "shop-filled", + "unicode": "e6cd" + }], + activeIndex: -1, + checked: false + }; + }, + methods: { + change(e) { + this.checked = e.detail.value === "false" || !e.detail.value ? false : true; + }, + switchActive(index, item) { + this.activeIndex = index; + uni.setClipboardData({ + data: !this.checked ? item.name : item.unicode, + success: () => { + uni.showToast({ + icon: "none", + title: `${!this.checked ? "\u56FE\u6807\u540D\u79F0" : "unicode"}\u590D\u5236\u6210\u529F` + }); + } + }); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_card = resolveEasycom(resolveDynamicComponent("uni-card"), __easycom_0); + const _component_switch = resolveComponent("switch"); + const _component_uni_icons = resolveEasycom(resolveDynamicComponent("uni-icons"), __easycom_1); + const _component_uni_section = resolveEasycom(resolveDynamicComponent("uni-section"), __easycom_2); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "container" }, [ + createVNode(_component_uni_card, { + "is-shadow": false, + "is-full": "" + }, { + default: withCtx(() => [ + createElementVNode("u-text", { class: "uni-h6" }, "\u56FE\u6807\u7EC4\u4EF6\u65B9\u4FBF\u7528\u6237\u5728\u8BBE\u8BA1\u9875\u9762\u7684\u65F6\u5019\uFF0C\u51CF\u5C11\u5C0F\u56FE\u7247\u7684\u4F7F\u7528\u3002\u53EF\u65B9\u4FBF\u81EA\u5B9A\u4E49\u56FE\u6807\u5355\u8272\u3001\u5C3A\u5BF8\u3002") + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u56FE\u6807", + type: "line" + }, { + right: withCtx(() => [ + createElementVNode("view", null, [ + createVNode(_component_switch, { + checked: $data.checked, + onChange: $options.change + }, null, 8, ["checked", "onChange"]) + ]) + ]), + default: withCtx(() => [ + createElementVNode("view", { class: "icon-content" }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.iconClassList, (item, index) => { + return openBlock(), createElementBlock("view", { + key: index, + class: "icon-item", + onClick: ($event) => $options.switchActive(index, item) + }, [ + createVNode(_component_uni_icons, { + type: item.name, + color: $data.activeIndex === index ? "#007aff" : "#5e6d82", + size: "30" + }, null, 8, ["type", "color"]), + createElementVNode("u-text", { + style: normalizeStyle({ color: $data.activeIndex === index ? "#007aff" : "#5e6d82" }), + class: "uni-mt-5 uni-subtitle" + }, toDisplayString($data.checked ? item.unicode : item.name), 5) + ], 8, ["onClick"]); + }), 128)) + ]) + ]), + _: 1 + }) + ]) + ]); +} +var icons = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/extUI/icons/icons.nvue"]]); +export { icons as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/indexed-list/indexed-list.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/indexed-list/indexed-list.js new file mode 100644 index 000000000..6a68eb1c0 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/indexed-list/indexed-list.js @@ -0,0 +1,609 @@ +import { f as formatAppLog } from "../../../uni-shared.es.js"; +import { _ as __easycom_1 } from "../../../uni-icons.js"; +import { resolveDynamicComponent, openBlock, createElementBlock, toDisplayString, createCommentVNode, Fragment, renderList, createElementVNode, normalizeClass, createVNode, resolveComponent, withModifiers } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import "../../../shared.esm-bundler.js"; +var _style_0$1 = { "uni-indexed-list__list": { "": { "backgroundColor": "#ffffff", "flexDirection": "column", "borderTopStyle": "solid", "borderTopWidth": 1, "borderTopColor": "#DEDEDE" } }, "uni-indexed-list__item": { "": { "fontSize": 14, "flex": 1, "flexDirection": "row", "justifyContent": "space-between", "alignItems": "center" } }, "uni-indexed-list__item-container": { "": { "paddingLeft": 15, "flex": 1, "position": "relative", "flexDirection": "row", "justifyContent": "space-between", "alignItems": "center" } }, "uni-indexed-list__item-border": { "": { "flex": 1, "position": "relative", "flexDirection": "row", "justifyContent": "space-between", "alignItems": "center", "height": 50, "paddingTop": 25, "paddingRight": 25, "paddingBottom": 25, "paddingLeft": 0, "borderBottomStyle": "solid", "borderBottomWidth": 1, "borderBottomColor": "#DEDEDE" } }, "uni-indexed-list__item-border--last": { "": { "borderBottomWidth": 0 } }, "uni-indexed-list__item-content": { "": { "flex": 1, "fontSize": 14, "color": "#191919" } }, "uni-indexed-list": { "": { "flexDirection": "row" } }, "uni-indexed-list__title-wrapper": { "": { "backgroundColor": "#f7f7f7" } }, "uni-indexed-list__title": { "": { "paddingTop": 6, "paddingRight": 12, "paddingBottom": 6, "paddingLeft": 12, "lineHeight": 24, "fontSize": 16, "fontWeight": "500" } } }; +const _sfc_main$2 = { + name: "UniIndexedList", + emits: ["itemClick"], + props: { + loaded: { + type: Boolean, + default: false + }, + idx: { + type: Number, + default: 0 + }, + list: { + type: Object, + default() { + return {}; + } + }, + showSelect: { + type: Boolean, + default: false + } + }, + methods: { + onClick(idx, index) { + this.$emit("itemClick", { + idx, + index + }); + } + } +}; +function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_icons = resolveEasycom(resolveDynamicComponent("uni-icons"), __easycom_1); + return openBlock(), createElementBlock("view", null, [ + $props.loaded || $props.list.itemIndex < 15 ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-indexed-list__title-wrapper" + }, [ + $props.list.items && $props.list.items.length > 0 ? (openBlock(), createElementBlock("u-text", { + key: 0, + class: "uni-indexed-list__title" + }, toDisplayString($props.list.key), 1)) : createCommentVNode("v-if", true) + ])) : createCommentVNode("v-if", true), + ($props.loaded || $props.list.itemIndex < 15) && $props.list.items && $props.list.items.length > 0 ? (openBlock(), createElementBlock("view", { + key: 1, + class: "uni-indexed-list__list" + }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList($props.list.items, (item, index) => { + return openBlock(), createElementBlock("view", { + key: index, + class: "uni-indexed-list__item", + hoverClass: "uni-indexed-list__item--hover" + }, [ + createElementVNode("view", { + class: "uni-indexed-list__item-container", + onClick: ($event) => $options.onClick($props.idx, index) + }, [ + createElementVNode("view", { + class: normalizeClass(["uni-indexed-list__item-border", { "uni-indexed-list__item-border--last": index === $props.list.items.length - 1 }]) + }, [ + $props.showSelect ? (openBlock(), createElementBlock("view", { + key: 0, + style: { "margin-right": "20rpx" } + }, [ + createVNode(_component_uni_icons, { + type: item.checked ? "checkbox-filled" : "circle", + color: item.checked ? "#007aff" : "#C0C0C0", + size: "24" + }, null, 8, ["type", "color"]) + ])) : createCommentVNode("v-if", true), + createElementVNode("u-text", { class: "uni-indexed-list__item-content" }, toDisplayString(item.name), 1) + ], 2) + ], 8, ["onClick"]) + ]); + }), 128)) + ])) : createCommentVNode("v-if", true) + ]); +} +var indexedListItem = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["styles", [_style_0$1]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-indexed-list/components/uni-indexed-list/uni-indexed-list-item.vue"]]); +var _style_0 = { "uni-indexed-list": { "": { "position": "absolute", "left": 0, "top": 0, "right": 0, "bottom": 0, "flexDirection": "row" } }, "uni-indexed-list__scroll": { "": { "flex": 1 } }, "uni-indexed-list__menu": { "": { "width": 24, "flexDirection": "column" } }, "uni-indexed-list__menu-item": { "": { "flex": 1, "alignItems": "center", "justifyContent": "center" } }, "uni-indexed-list__menu-text": { "": { "fontSize": 12, "textAlign": "center", "color": "#aaaaaa" } }, "uni-indexed-list__menu-text--active": { "": { "borderRadius": 16, "width": 16, "height": 16, "lineHeight": 16, "backgroundColor": "#007aff", "color": "#ffffff" } }, "uni-indexed-list__alert-wrapper": { "": { "position": "absolute", "left": 0, "top": 0, "right": 0, "bottom": 0, "flexDirection": "row", "alignItems": "center", "justifyContent": "center" } }, "uni-indexed-list__alert": { "": { "width": 80, "height": 80, "borderRadius": 80, "textAlign": "center", "lineHeight": 80, "fontSize": 35, "color": "#ffffff", "backgroundColor": "rgba(0,0,0,0.5)" } } }; +const dom = weex.requireModule("dom"); +function throttle(func, delay) { + var prev = Date.now(); + return function() { + var context = this; + var args = arguments; + var now = Date.now(); + if (now - prev >= delay) { + func.apply(context, args); + prev = Date.now(); + } + }; +} +function touchMove(e) { + let pageY = e.touches[0].pageY; + let index = Math.floor((pageY - this.winOffsetY) / this.itemHeight); + if (this.touchmoveIndex === index) { + return false; + } + let item = this.lists[index]; + if (item) { + dom.scrollToElement(this.$refs["uni-indexed-list-" + index][0], { + animated: false + }); + this.touchmoveIndex = index; + } +} +const throttleTouchMove = throttle(touchMove, 40); +const _sfc_main$1 = { + name: "UniIndexedList", + components: { + indexedListItem + }, + emits: ["click"], + props: { + options: { + type: Array, + default() { + return []; + } + }, + showSelect: { + type: Boolean, + default: false + } + }, + data() { + return { + lists: [], + winHeight: 0, + itemHeight: 0, + winOffsetY: 0, + touchmove: false, + touchmoveIndex: -1, + scrollViewId: "", + touchmovable: true, + loaded: false, + isPC: false + }; + }, + watch: { + options: { + handler: function() { + this.setList(); + }, + deep: true + } + }, + mounted() { + setTimeout(() => { + this.setList(); + }, 50); + setTimeout(() => { + this.loaded = true; + }, 300); + }, + methods: { + setList() { + this.lists = []; + this.options.forEach((value, index) => { + if (value.data.length === 0) { + return; + } + let indexBefore = index; + let items = value.data.map((item) => { + let obj = {}; + obj["key"] = value.letter; + obj["name"] = item; + obj["itemIndex"] = index; + index++; + obj.checked = item.checked ? item.checked : false; + return obj; + }); + this.lists.push({ + title: value.letter, + key: value.letter, + items, + itemIndex: indexBefore + }); + }); + dom.getComponentRect(this.$refs["list"], (res) => { + this.winOffsetY = res.size.top; + this.winHeight = res.size.height; + this.itemHeight = this.winHeight / this.lists.length; + }); + }, + touchStart(e) { + this.touchmove = true; + let pageY = this.isPC ? e.pageY : e.touches[0].pageY; + let index = Math.floor((pageY - this.winOffsetY) / this.itemHeight); + let item = this.lists[index]; + if (item) { + this.scrollViewId = "uni-indexed-list-" + index; + this.touchmoveIndex = index; + dom.scrollToElement(this.$refs["uni-indexed-list-" + index][0], { + animated: false + }); + } + }, + touchMove(e) { + throttleTouchMove.call(this, e); + }, + touchEnd() { + this.touchmove = false; + }, + mousedown(e) { + if (!this.isPC) + return; + this.touchStart(e); + }, + mousemove(e) { + if (!this.isPC) + return; + this.touchMove(e); + }, + mouseleave(e) { + if (!this.isPC) + return; + this.touchEnd(e); + }, + onClick(e) { + let { + idx, + index + } = e; + let obj = {}; + for (let key in this.lists[idx].items[index]) { + obj[key] = this.lists[idx].items[index][key]; + } + let select = []; + if (this.showSelect) { + this.lists[idx].items[index].checked = !this.lists[idx].items[index].checked; + this.lists.forEach((value, idx2) => { + value.items.forEach((item, index2) => { + if (item.checked) { + let obj2 = {}; + for (let key in this.lists[idx2].items[index2]) { + obj2[key] = this.lists[idx2].items[index2][key]; + } + select.push(obj2); + } + }); + }); + } + this.$emit("click", { + item: obj, + select + }); + } + } +}; +function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { + const _component_indexed_list_item = resolveComponent("indexed-list-item"); + return openBlock(), createElementBlock("view", { + class: "uni-indexed-list", + ref: "list", + id: "list" + }, [ + createElementVNode("list", { + class: "uni-indexed-list__scroll", + scrollable: "true", + showScrollbar: "false" + }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.lists, (list, idx) => { + return openBlock(), createElementBlock("cell", { + key: idx, + ref_for: true, + ref: "uni-indexed-list-" + idx + }, [ + createVNode(_component_indexed_list_item, { + list, + loaded: $data.loaded, + idx, + showSelect: $props.showSelect, + onItemClick: $options.onClick + }, null, 8, ["list", "loaded", "idx", "showSelect", "onItemClick"]) + ]); + }), 128)) + ]), + createElementVNode("view", { + class: "uni-indexed-list__menu", + onTouchstart: _cache[0] || (_cache[0] = (...args) => $options.touchStart && $options.touchStart(...args)), + onTouchmove: _cache[1] || (_cache[1] = withModifiers((...args) => $options.touchMove && $options.touchMove(...args), ["stop", "prevent"])), + onTouchend: _cache[2] || (_cache[2] = (...args) => $options.touchEnd && $options.touchEnd(...args)), + onMousedown: _cache[3] || (_cache[3] = withModifiers((...args) => $options.mousedown && $options.mousedown(...args), ["stop"])), + onMousemove: _cache[4] || (_cache[4] = withModifiers((...args) => $options.mousemove && $options.mousemove(...args), ["stop", "prevent"])), + onMouseleave: _cache[5] || (_cache[5] = withModifiers((...args) => $options.mouseleave && $options.mouseleave(...args), ["stop"])) + }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.lists, (list, key) => { + return openBlock(), createElementBlock("view", { + key, + class: normalizeClass(["uni-indexed-list__menu-item", $data.touchmoveIndex == key ? "uni-indexed-list__menu--active" : ""]) + }, [ + createElementVNode("u-text", { + class: normalizeClass(["uni-indexed-list__menu-text", $data.touchmoveIndex == key ? "uni-indexed-list__menu-text--active" : ""]) + }, toDisplayString(list.key), 3) + ], 2); + }), 128)) + ], 32), + $data.touchmove ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-indexed-list__alert-wrapper" + }, [ + createElementVNode("u-text", { class: "uni-indexed-list__alert" }, toDisplayString($data.lists[$data.touchmoveIndex].key), 1) + ])) : createCommentVNode("v-if", true) + ], 512); +} +var __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-indexed-list/components/uni-indexed-list/uni-indexed-list.vue"]]); +var airport = { + "list": [{ + "letter": "A", + "data": [ + "\u963F\u514B\u82CF\u673A\u573A", + "\u963F\u62C9\u5C71\u53E3\u673A\u573A", + "\u963F\u52D2\u6CF0\u673A\u573A", + "\u963F\u91CC\u6606\u838E\u673A\u573A", + "\u5B89\u5E86\u5929\u67F1\u5C71\u673A\u573A", + "\u6FB3\u95E8\u56FD\u9645\u673A\u573A" + ] + }, { + "letter": "B", + "data": [ + "\u4FDD\u5C71\u673A\u573A", + "\u5305\u5934\u673A\u573A", + "\u5317\u6D77\u798F\u6210\u673A\u573A", + "\u5317\u4EAC\u5357\u82D1\u673A\u573A", + "\u5317\u4EAC\u9996\u90FD\u56FD\u9645\u673A\u573A" + ] + }, { + "letter": "C", + "data": [ + "\u957F\u767D\u5C71\u673A\u573A", + "\u957F\u6625\u9F99\u5609\u56FD\u9645\u673A\u573A", + "\u5E38\u5FB7\u6843\u82B1\u6E90\u673A\u573A", + "\u660C\u90FD\u90A6\u8FBE\u673A\u573A", + "\u957F\u6C99\u9EC4\u82B1\u56FD\u9645\u673A\u573A", + "\u957F\u6CBB\u738B\u6751\u673A\u573A", + "\u5E38\u5DDE\u5954\u725B\u673A\u573A", + "\u6210\u90FD\u53CC\u6D41\u56FD\u9645\u673A\u573A", + "\u8D64\u5CF0\u673A\u573A" + ] + }, { + "letter": "D", + "data": [ + "\u5927\u7406\u673A\u573A", + "\u5927\u8FDE\u5468\u6C34\u5B50\u56FD\u9645\u673A\u573A", + "\u5927\u5E86\u8428\u5C14\u56FE\u673A\u573A", + "\u5927\u540C\u4E1C\u738B\u5E84\u673A\u573A", + "\u8FBE\u5DDE\u6CB3\u5E02\u673A\u573A", + "\u4E39\u4E1C\u6D6A\u5934\u673A\u573A", + "\u5FB7\u5B8F\u8292\u5E02\u673A\u573A", + "\u8FEA\u5E86\u9999\u683C\u91CC\u62C9\u673A\u573A", + "\u4E1C\u8425\u673A\u573A", + "\u6566\u714C\u673A\u573A" + ] + }, { + "letter": "E", + "data": [ + "\u9102\u5C14\u591A\u65AF\u673A\u573A", + "\u6069\u65BD\u8BB8\u5BB6\u576A\u673A\u573A", + "\u4E8C\u8FDE\u6D69\u7279\u8D5B\u4E4C\u82CF\u56FD\u9645\u673A\u573A" + ] + }, { + "letter": "F", + "data": [ + "\u961C\u9633\u897F\u5173\u673A\u573A", + "\u798F\u5DDE\u957F\u4E50\u56FD\u9645\u673A\u573A" + ] + }, { + "letter": "G", + "data": [ + "\u8D63\u5DDE\u9EC4\u91D1\u673A\u573A", + "\u683C\u5C14\u6728\u673A\u573A", + "\u56FA\u539F\u516D\u76D8\u5C71\u673A\u573A", + "\u5E7F\u5143\u76D8\u9F99\u673A\u573A", + "\u5E7F\u5DDE\u767D\u4E91\u56FD\u9645\u673A\u573A", + "\u6842\u6797\u4E24\u6C5F\u56FD\u9645\u673A\u573A", + "\u8D35\u9633\u9F99\u6D1E\u5821\u56FD\u9645\u673A\u573A" + ] + }, { + "letter": "H", + "data": [ + "\u54C8\u5C14\u6EE8\u592A\u5E73\u56FD\u9645\u673A\u573A", + "\u54C8\u5BC6\u673A\u573A", + "\u6D77\u53E3\u7F8E\u5170\u56FD\u9645\u673A\u573A", + "\u6D77\u62C9\u5C14\u4E1C\u5C71\u56FD\u9645\u673A\u573A", + "\u90AF\u90F8\u673A\u573A", + "\u6C49\u4E2D\u673A\u573A", + "\u676D\u5DDE\u8427\u5C71\u56FD\u9645\u673A\u573A", + "\u5408\u80A5\u9A86\u5C97\u56FD\u9645\u673A\u573A", + "\u548C\u7530\u673A\u573A", + "\u9ED1\u6CB3\u673A\u573A", + "\u547C\u548C\u6D69\u7279\u767D\u5854\u56FD\u9645\u673A\u573A", + "\u6DEE\u5B89\u6D9F\u6C34\u673A\u573A", + "\u9EC4\u5C71\u5C6F\u6EAA\u56FD\u9645\u673A\u573A" + ] + }, { + "letter": "I", + "data": [] + }, { + "letter": "J", + "data": [ + "\u6D4E\u5357\u9065\u5899\u56FD\u9645\u673A\u573A", + "\u6D4E\u5B81\u66F2\u961C\u673A\u573A", + "\u9E21\u897F\u5174\u51EF\u6E56\u673A\u573A", + "\u4F73\u6728\u65AF\u4E1C\u90CA\u673A\u573A", + "\u5609\u5CEA\u5173\u673A\u573A", + "\u9526\u5DDE\u5C0F\u5CAD\u5B50\u673A\u573A", + "\u666F\u5FB7\u9547\u673A\u573A", + "\u4E95\u5188\u5C71\u673A\u573A", + "\u4E5D\u6C5F\u5E90\u5C71\u673A\u573A", + "\u4E5D\u5BE8\u9EC4\u9F99\u673A\u573A" + ] + }, { + "letter": "K", + "data": [ + "\u5580\u4EC0\u673A\u573A", + "\u514B\u62C9\u739B\u4F9D\u673A\u573A", + "\u5E93\u8F66\u9F9F\u5179\u673A\u573A", + "\u5E93\u5C14\u52D2\u673A\u573A", + "\u6606\u660E\u5DEB\u5BB6\u575D\u56FD\u9645\u673A\u573A" + ] + }, { + "letter": "L", + "data": [ + "\u62C9\u8428\u8D21\u560E\u673A\u573A", + "\u5170\u5DDE\u4E2D\u5DDD\u673A\u573A", + "\u4E3D\u6C5F\u4E09\u4E49\u673A\u573A", + "\u9ECE\u5E73\u673A\u573A", + "\u8FDE\u4E91\u6E2F\u767D\u5854\u57E0\u673A\u573A", + "\u4E34\u6CA7\u673A\u573A", + "\u4E34\u6C82\u673A\u573A", + "\u6797\u829D\u7C73\u6797\u673A\u573A", + "\u67F3\u5DDE\u767D\u83B2\u673A\u573A", + "\u9F99\u5CA9\u51A0\u8C78\u5C71\u673A\u573A", + "\u6CF8\u5DDE\u84DD\u7530\u673A\u573A", + "\u6D1B\u9633\u5317\u90CA\u673A\u573A" + ] + }, { + "letter": "M", + "data": [ + "\u6EE1\u6D32\u91CC\u897F\u90CA\u673A\u573A", + "\u7EF5\u9633\u5357\u90CA\u673A\u573A", + "\u6F20\u6CB3\u53E4\u83B2\u673A\u573A", + "\u7261\u4E39\u6C5F\u6D77\u6D6A\u673A\u573A" + ] + }, { + "letter": "N", + "data": [ + "\u5357\u660C\u660C\u5317\u56FD\u9645\u673A\u573A", + "\u5357\u5145\u9AD8\u576A\u673A\u573A", + "\u5357\u4EAC\u7984\u53E3\u56FD\u9645\u673A\u573A", + "\u5357\u5B81\u5434\u5729\u673A\u573A", + "\u5357\u901A\u5174\u4E1C\u673A\u573A", + "\u5357\u9633\u59DC\u8425\u673A\u573A", + "\u5B81\u6CE2\u680E\u793E\u56FD\u9645\u673A\u573A" + ] + }, { + "letter": "O", + "data": [] + }, { + "letter": "P", + "data": [ + "\u666E\u6D31\u601D\u8305\u673A\u573A" + ] + }, { + "letter": "Q", + "data": [ + "\u9F50\u9F50\u54C8\u5C14\u4E09\u5BB6\u5B50\u673A\u573A", + "\u79E6\u7687\u5C9B\u5C71\u6D77\u5173\u673A\u573A", + "\u9752\u5C9B\u6D41\u4EAD\u56FD\u9645\u673A\u573A", + "\u8862\u5DDE\u673A\u573A", + "\u6CC9\u5DDE\u664B\u6C5F\u673A\u573A" + ] + }, { + "letter": "R", + "data": [ + "\u65E5\u5580\u5219\u548C\u5E73\u673A\u573A" + ] + }, { + "letter": "S", + "data": [ + "\u4E09\u4E9A\u51E4\u51F0\u56FD\u9645\u673A\u573A", + "\u6C55\u5934\u5916\u7802\u673A\u573A", + "\u4E0A\u6D77\u8679\u6865\u56FD\u9645\u673A\u573A", + "\u4E0A\u6D77\u6D66\u4E1C\u56FD\u9645\u673A\u573A", + "\u6DF1\u5733\u5B9D\u5B89\u56FD\u9645\u673A\u573A", + "\u6C88\u9633\u6843\u4ED9\u56FD\u9645\u673A\u573A", + "\u77F3\u5BB6\u5E84\u6B63\u5B9A\u56FD\u9645\u673A\u573A", + "\u82CF\u5357\u7855\u653E\u56FD\u9645\u673A\u573A" + ] + }, { + "letter": "T", + "data": [ + "\u5854\u57CE\u673A\u573A", + "\u592A\u539F\u6B66\u5BBF\u56FD\u9645\u673A\u573A", + "\u53F0\u5DDE\u8DEF\u6865\u673A\u573A (\u9EC4\u5CA9\u673A\u573A)", + "\u5510\u5C71\u4E09\u5973\u6CB3\u673A\u573A", + "\u817E\u51B2\u9A7C\u5CF0\u673A\u573A", + "\u5929\u6D25\u6EE8\u6D77\u56FD\u9645\u673A\u573A", + "\u901A\u8FBD\u673A\u573A", + "\u94DC\u4EC1\u51E4\u51F0\u673A\u573A" + ] + }, { + "letter": "U", + "data": [] + }, { + "letter": "V", + "data": [] + }, { + "letter": "W", + "data": [ + "\u4E07\u5DDE\u4E94\u6865\u673A\u573A", + "\u6F4D\u574A\u673A\u573A", + "\u5A01\u6D77\u5927\u6C34\u6CCA\u673A\u573A", + "\u6587\u5C71\u666E\u8005\u9ED1\u673A\u573A", + "\u6E29\u5DDE\u6C38\u5F3A\u56FD\u9645\u673A\u573A", + "\u4E4C\u6D77\u673A\u573A", + "\u6B66\u6C49\u5929\u6CB3\u56FD\u9645\u673A\u573A", + "\u4E4C\u5170\u6D69\u7279\u673A\u573A", + "\u4E4C\u9C81\u6728\u9F50\u5730\u7A9D\u5821\u56FD\u9645\u673A\u573A", + "\u6B66\u5937\u5C71\u673A\u573A", + "\u68A7\u5DDE\u957F\u6D32\u5C9B\u673A\u573A" + ] + }, { + "letter": "X", + "data": [ + "\u897F\u5B89\u54B8\u9633\u56FD\u9645\u673A\u573A", + "\u897F\u660C\u9752\u5C71\u673A\u573A", + "\u9521\u6797\u6D69\u7279\u673A\u573A", + "\u897F\u5B81\u66F9\u5BB6\u5821\u673A\u573A", + "\u897F\u53CC\u7248\u7EB3\u560E\u6D12\u673A\u573A", + "\u53A6\u95E8\u9AD8\u5D0E\u56FD\u9645\u673A\u573A", + "\u9999\u6E2F\u56FD\u9645\u673A\u573A", + "\u8944\u9633\u5218\u96C6\u673A\u573A", + "\u5174\u4E49\u673A\u573A", + "\u5F90\u5DDE\u89C2\u97F3\u673A\u573A" + ] + }, { + "letter": "Y", + "data": [ + "\u5EF6\u5B89\u4E8C\u5341\u91CC\u5821\u673A\u573A", + "\u76D0\u57CE\u673A\u573A", + "\u5EF6\u5409\u671D\u9633\u5DDD\u673A\u573A", + "\u70DF\u53F0\u83B1\u5C71\u56FD\u9645\u673A\u573A", + "\u5B9C\u5BBE\u83DC\u575D\u673A\u573A", + "\u5B9C\u660C\u4E09\u5CE1\u673A\u573A", + "\u4F0A\u6625\u6797\u90FD\u673A\u573A", + "\u4F0A\u5B81\u673A\u573A", + "\u4E49\u4E4C\u673A\u573A", + "\u94F6\u5DDD\u6CB3\u4E1C\u673A\u573A", + "\u6C38\u5DDE\u96F6\u9675\u673A\u573A", + "\u6986\u6797\u6986\u9633\u673A\u573A", + "\u7389\u6811\u5DF4\u5858\u673A\u573A", + "\u8FD0\u57CE\u5F20\u5B5D\u673A\u573A" + ] + }, { + "letter": "Z", + "data": [ + "\u6E5B\u6C5F\u673A\u573A", + "\u662D\u901A\u673A\u573A", + "\u90D1\u5DDE\u65B0\u90D1\u56FD\u9645\u673A\u573A", + "\u82B7\u6C5F\u673A\u573A", + "\u91CD\u5E86\u6C5F\u5317\u56FD\u9645\u673A\u573A", + "\u4E2D\u536B\u9999\u5C71\u673A\u573A", + "\u821F\u5C71\u6731\u5BB6\u5C16\u673A\u573A", + "\u73E0\u6D77\u4E09\u7076\u673A\u573A" + ] + }] +}; +const _sfc_main = { + components: {}, + data() { + return { + list: airport.list + }; + }, + methods: { + bindClick(e) { + formatAppLog("log", "at pages/extUI/indexed-list/indexed-list.nvue:16", "\u70B9\u51FBitem\uFF0C\u8FD4\u56DE\u6570\u636E" + JSON.stringify(e)); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_indexed_list = resolveEasycom(resolveDynamicComponent("uni-indexed-list"), __easycom_0); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createVNode(_component_uni_indexed_list, { + options: $data.list, + "show-select": true, + onClick: $options.bindClick + }, null, 8, ["options", "onClick"]) + ]); +} +var indexedList = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/extUI/indexed-list/indexed-list.nvue"]]); +export { indexedList as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/list/list.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/list/list.js new file mode 100644 index 000000000..caa3d2cf7 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/list/list.js @@ -0,0 +1,355 @@ +import { f as formatAppLog } from "../../../uni-shared.es.js"; +import { _ as __easycom_0 } from "../../../uni-card.js"; +import { resolveDynamicComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as __easycom_3, a as __easycom_4 } from "../../../uni-list.js"; +import { _ as __easycom_2 } from "../../../uni-section.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import "../../../shared.esm-bundler.js"; +import "../../../uni-icons.js"; +import "../../../uni-badge.js"; +var _style_0 = { "slot-box": { "": { "flexDirection": "row", "alignItems": "center" } }, "slot-image": { "": { "marginRight": 10, "width": 30, "height": 30 } }, "slot-text": { "": { "flex": 1, "fontSize": 14, "color": "#4cd964", "marginRight": 10 } } }; +const _sfc_main = { + components: {}, + data() { + return { + cover: "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/094a9dc0-50c0-11eb-b680-7980c8a877b8.jpg", + avatar: "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png", + extraIcon: { + color: "#4cd964", + size: "22", + type: "gear-filled" + } + }; + }, + methods: { + onClick(e) { + formatAppLog("log", "at pages/extUI/list/list.nvue:125", "\u6267\u884Cclick\u4E8B\u4EF6", e.data); + uni.showToast({ + title: "\u70B9\u51FB\u53CD\u9988" + }); + }, + switchChange(e) { + uni.showToast({ + title: "change:" + e.value, + icon: "none" + }); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_card = resolveEasycom(resolveDynamicComponent("uni-card"), __easycom_0); + const _component_uni_list_item = resolveEasycom(resolveDynamicComponent("uni-list-item"), __easycom_3); + const _component_uni_list = resolveEasycom(resolveDynamicComponent("uni-list"), __easycom_4); + const _component_uni_section = resolveEasycom(resolveDynamicComponent("uni-section"), __easycom_2); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "container" }, [ + createVNode(_component_uni_card, { + "is-shadow": false, + "is-full": "" + }, { + default: withCtx(() => [ + createElementVNode("u-text", { class: "uni-h6" }, "\u5217\u8868\u7EC4\u4EF6\u53EF\u4EE5\u5728\u5176\u4E2D\u4F7F\u7528\u56FE\u6807\u3001\u7565\u7F29\u56FE\u6216\u653E\u7F6E\u4EFB\u4F55\u4F60\u60F3\u653E\u7684\u5143\u7D20\uFF0C\u4F7F\u7528\u573A\u666F\u5982\uFF1A\u5BFC\u822A\u83DC\u5355\u3001\u5217\u8868\u3001\u8BBE\u7F6E\u4E2D\u5FC3\u6392\u7248\u7B49") + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u57FA\u7840\u7528\u6CD5", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_list, null, { + default: withCtx(() => [ + createVNode(_component_uni_list_item, { title: "\u5217\u8868\u6587\u5B57" }), + createVNode(_component_uni_list_item, { + title: "\u5217\u8868\u6587\u5B57", + rightText: "\u53F3\u4FA7\u6587\u5B57" + }), + createVNode(_component_uni_list_item, { + title: "\u5217\u8868\u6587\u5B57", + note: "\u5217\u8868\u63CF\u8FF0\u4FE1\u606F", + rightText: "\u53F3\u4FA7\u6587\u5B57" + }) + ]), + _: 1 + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u7981\u7528\u5217\u8868", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_list, null, { + default: withCtx(() => [ + createVNode(_component_uni_list_item, { + disabled: true, + title: "\u5217\u8868\u7981\u7528\u72B6\u6001", + rightText: "\u53F3\u4FA7\u6587\u5B57" + }), + createVNode(_component_uni_list_item, { + disabled: true, + title: "\u5217\u8868\u7981\u7528\u72B6\u6001", + rightText: "\u53F3\u4FA7\u6587\u5B57" + }) + ]), + _: 1 + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u663E\u793A\u53F3\u4FA7\u7BAD\u5934", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_list, null, { + default: withCtx(() => [ + createVNode(_component_uni_list_item, { + showArrow: "", + title: "\u5217\u8868\u6587\u5B57" + }), + createVNode(_component_uni_list_item, { + showArrow: "", + title: "\u5217\u8868\u6587\u5B57", + rightText: "\u53F3\u4FA7\u6587\u5B57" + }) + ]), + _: 1 + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u5F00\u542F\u70B9\u51FB\u53CD\u9988", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_list, null, { + default: withCtx(() => [ + createVNode(_component_uni_list_item, { + title: "\u5F39\u7A97\u63D0\u793A", + clickable: "", + onClick: $options.onClick + }, null, 8, ["onClick"]), + createVNode(_component_uni_list_item, { + title: "\u9875\u9762\u8DF3\u8F6C", + to: `./chat`, + onClick: $options.onClick + }, null, 8, ["to", "onClick"]), + createVNode(_component_uni_list_item, { + title: "\u5173\u95ED\u5F53\u524D\u9875\u9762\u6253\u5F00\u65B0\u9875\u9762", + showArrow: "", + link: "redirectTo", + to: "./chat", + onClick: $options.onClick + }, null, 8, ["onClick"]), + createVNode(_component_uni_list_item, { + title: "\u6253\u5F00\u9519\u8BEF\u9875\u9762(\u67E5\u770B\u63A7\u5236\u53F0)", + showArrow: "", + link: "redirectTo", + to: "./chats", + onClick: $options.onClick + }, null, 8, ["onClick"]) + ]), + _: 1 + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u4E0D\u663E\u793A\u5206\u9694\u7EBF", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_list, { border: false }, { + default: withCtx(() => [ + createVNode(_component_uni_list_item, { title: "\u5217\u8868\u6587\u5B57" }), + createVNode(_component_uni_list_item, { + border: false, + title: "\u5217\u8868\u6587\u5B57", + note: "\u5217\u8868\u63CF\u8FF0\u4FE1\u606F", + rightText: "\u53F3\u4FA7\u6587\u5B57" + }), + createVNode(_component_uni_list_item, { + border: false, + title: "\u5217\u8868\u6587\u5B57", + note: "\u5217\u8868\u63CF\u8FF0\u4FE1\u606F", + rightText: "\u53F3\u4FA7\u6587\u5B57" + }) + ]), + _: 1 + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u5206\u9694\u7EBF\u901A\u680F", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_list, { "border-full": "" }, { + default: withCtx(() => [ + createVNode(_component_uni_list_item, { title: "\u5217\u8868\u6587\u5B57" }), + createVNode(_component_uni_list_item, { + title: "\u5217\u8868\u6587\u5B57", + note: "\u5217\u8868\u63CF\u8FF0\u4FE1\u606F", + rightText: "\u53F3\u4FA7\u6587\u5B57" + }), + createVNode(_component_uni_list_item, { + title: "\u5217\u8868\u6587\u5B57", + note: "\u5217\u8868\u63CF\u8FF0\u4FE1\u606F", + rightText: "\u53F3\u4FA7\u6587\u5B57" + }) + ]), + _: 1 + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u6587\u5B57\u6EA2\u51FA\u9690\u85CF", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_list, null, { + default: withCtx(() => [ + createVNode(_component_uni_list_item, { + ellipsis: "1", + title: "\u8D85\u957F\u6587\u5B57\u663E\u793A\u4E00\u884C,\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57" + }), + createVNode(_component_uni_list_item, { + ellipsis: "2", + title: "\u8D85\u957F\u6587\u5B57\u663E\u793A\u4E8C\u884C,\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57", + rightText: "\u4E8C\u884C\u663E\u793A" + }), + createVNode(_component_uni_list_item, { + ellipsis: "1", + title: "\u5168\u90E8\u663E\u793A,\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57", + note: "\u5217\u8868\u63CF\u8FF0\u4FE1\u606F,\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57,\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57,\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57,\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57,\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57,\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57,\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57", + showArrow: "", + rightText: "\u4E00\u884C\u663E\u793A" + }), + createVNode(_component_uni_list_item, { + title: "\u5168\u90E8\u663E\u793A,\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57\u4EE5\u4E0B\u662F\u6D4B\u8BD5\u6587\u5B57", + showArrow: "", + rightText: "\u5168\u90E8" + }) + ]), + _: 1 + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u663E\u793A\u56FE\u6807\u6216\u56FE\u7247", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_list, null, { + default: withCtx(() => [ + createVNode(_component_uni_list_item, { + "show-extra-icon": true, + showArrow: "", + "extra-icon": $data.extraIcon, + title: "\u5217\u8868\u5DE6\u4FA7\u5E26\u6269\u5C55\u56FE\u6807" + }, null, 8, ["extra-icon"]), + createVNode(_component_uni_list_item, { + title: "\u5217\u8868\u5DE6\u4FA7\u5E26\u7565\u7F29\u56FE", + note: "\u5217\u8868\u63CF\u8FF0\u4FE1\u606F", + showArrow: "", + thumb: "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png", + "thumb-size": "sm", + rightText: "\u5C0F\u56FE" + }), + createVNode(_component_uni_list_item, { + title: "\u5217\u8868\u5DE6\u4FA7\u5E26\u7565\u7F29\u56FE", + note: "\u5217\u8868\u63CF\u8FF0\u4FE1\u606F", + showArrow: "", + thumb: "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png", + "thumb-size": "base", + rightText: "\u9ED8\u8BA4" + }), + createVNode(_component_uni_list_item, { + title: "\u5217\u8868\u5DE6\u4FA7\u5E26\u7565\u7F29\u56FE", + note: "\u5217\u8868\u63CF\u8FF0\u4FE1\u606F", + showArrow: "", + thumb: "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png", + "thumb-size": "lg", + rightText: "\u5927\u56FE" + }) + ]), + _: 1 + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u4F7F\u7528\u63D2\u69FD", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_list, null, { + default: withCtx(() => [ + createVNode(_component_uni_list_item, null, { + body: withCtx(() => [ + createElementVNode("view", { class: "slot-box" }, [ + createElementVNode("u-text", { class: "slot-text" }, "\u4F7F\u7528 body \u63D2\u69FD") + ]) + ]), + _: 1 + }), + createVNode(_component_uni_list_item, { + title: "\u81EA\u5B9A\u4E49\u53F3\u4FA7\u63D2\u69FD", + note: "\u5217\u8868\u63CF\u8FF0\u4FE1\u606F", + link: "" + }, { + footer: withCtx(() => [ + createElementVNode("u-image", { + class: "slot-image", + src: "/static/logo.png", + mode: "widthFix" + }) + ]), + _: 1 + }), + createVNode(_component_uni_list_item, null, { + header: withCtx(() => [ + createElementVNode("view", { class: "slot-box" }, [ + createElementVNode("u-image", { + class: "slot-image", + src: "/static/logo.png", + mode: "widthFix" + }) + ]) + ]), + body: withCtx(() => [ + createElementVNode("u-text", { class: "slot-box slot-text" }, "\u81EA\u5B9A\u4E49\u4E24\u4FA7\u63D2\u69FD") + ]), + footer: withCtx(() => [ + createElementVNode("u-image", { + class: "slot-image", + src: "/static/logo.png", + mode: "widthFix" + }) + ]), + _: 1 + }) + ]), + _: 1 + }) + ]), + _: 1 + }) + ]) + ]); +} +var list = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/extUI/list/list.nvue"]]); +export { list as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/load-more/load-more.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/load-more/load-more.js new file mode 100644 index 000000000..20949bbff --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/load-more/load-more.js @@ -0,0 +1,165 @@ +import { _ as __easycom_0 } from "../../../uni-card.js"; +import { resolveDynamicComponent, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, Fragment, renderList, toDisplayString } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as __easycom_0$1 } from "../../../uni-load-more.js"; +import { _ as __easycom_2 } from "../../../uni-section.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import "../../../shared.esm-bundler.js"; +import "../../../uni-i18n.es.js"; +var _style_0 = { "uni-list-item": { "": { "borderBottomStyle": "solid", "borderBottomWidth": 1, "borderBottomColor": "#eeeeee", "fontSize": 14 } }, "uni-list-item__container": { "": { "paddingTop": 12, "paddingRight": 15, "paddingBottom": 12, "paddingLeft": 15, "flex": 1, "position": "relative", "flexDirection": "row", "justifyContent": "space-between", "alignItems": "center" } }, "uni-list-item__content-title": { "": { "fontSize": 14, "color": "#666666" } } }; +const _sfc_main = { + components: {}, + data() { + return { + status: "more", + statusTypes: [{ + value: "more", + text: "\u52A0\u8F7D\u524D", + checked: true + }, { + value: "loading", + text: "\u52A0\u8F7D\u4E2D", + checked: false + }, { + value: "noMore", + text: "\u6CA1\u6709\u66F4\u591A", + checked: false + }], + contentText: { + contentdown: "\u67E5\u770B\u66F4\u591A", + contentrefresh: "\u52A0\u8F7D\u4E2D", + contentnomore: "\u6CA1\u6709\u66F4\u591A" + } + }; + }, + methods: { + onChange(e) { + this.status = e.detail.value; + }, + clickLoadMore(e) { + uni.showToast({ + icon: "none", + title: "\u5F53\u524D\u72B6\u6001\uFF1A" + e.detail.status + }); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_card = resolveEasycom(resolveDynamicComponent("uni-card"), __easycom_0); + const _component_uni_load_more = resolveEasycom(resolveDynamicComponent("uni-load-more"), __easycom_0$1); + const _component_uni_section = resolveEasycom(resolveDynamicComponent("uni-section"), __easycom_2); + const _component_radio = resolveComponent("radio"); + const _component_radio_group = resolveComponent("radio-group"); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "container" }, [ + createVNode(_component_uni_card, { + "is-full": "", + "is-shadow": false + }, { + default: withCtx(() => [ + createElementVNode("u-text", { class: "uni-h6" }, "\u52A0\u8F7D\u66F4\u591A\u7EC4\u4EF6\u7528\u4E8E\u9875\u9762\u52A0\u8F7D\u66F4\u591A\u6570\u636E\u65F6\uFF0C\u9875\u9762\u5E95\u90E8\u663E\u793A\u5185\u5BB9\u7B49\u573A\u666F") + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u57FA\u672C\u7528\u6CD5", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_load_more, { status: $data.status }, null, 8, ["status"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u4FEE\u6539\u9ED8\u8BA4\u6587\u5B57", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_load_more, { + status: $data.status, + "content-text": $data.contentText + }, null, 8, ["status", "content-text"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u6539\u53D8\u989C\u8272", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_load_more, { + color: "#007AFF", + status: $data.status + }, null, 8, ["status"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u6307\u5B9A\u52A0\u8F7D\u56FE\u6807\u6837\u5F0F - \u6309\u5E73\u53F0\u81EA\u52A8\u9009\u62E9\u6837\u5F0F", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_load_more, { + iconType: "auto", + status: $data.status + }, null, 8, ["status"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u6307\u5B9A\u52A0\u8F7D\u56FE\u6807\u6837\u5F0F - \u73AF\u5F62", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_uni_load_more, { + iconType: "circle", + status: $data.status + }, null, 8, ["status"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u6539\u53D8\u7EC4\u4EF6\u72B6\u6001", + type: "line" + }, { + default: withCtx(() => [ + createVNode(_component_radio_group, { + class: "uni-list", + onChange: $options.onChange + }, { + default: withCtx(() => [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.statusTypes, (item, index) => { + return openBlock(), createElementBlock("view", { + key: index, + class: "uni-list-item" + }, [ + createElementVNode("view", { class: "uni-list-item__container" }, [ + createElementVNode("view", { class: "uni-list-item__content" }, [ + createElementVNode("u-text", { class: "uni-list-item__content-title" }, toDisplayString(item.text), 1) + ]), + createElementVNode("view", { class: "uni-list-item__extra" }, [ + createVNode(_component_radio, { + value: item.value, + checked: item.checked + }, null, 8, ["value", "checked"]) + ]) + ]) + ]); + }), 128)) + ]), + _: 1 + }, 8, ["onChange"]) + ]), + _: 1 + }) + ]) + ]); +} +var loadMore = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/extUI/load-more/load-more.nvue"]]); +export { loadMore as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/nav-bar/nav-bar.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/nav-bar/nav-bar.js new file mode 100644 index 000000000..a349486c2 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/nav-bar/nav-bar.js @@ -0,0 +1,521 @@ +import { f as formatAppLog } from "../../../uni-shared.es.js"; +import { _ as __easycom_1 } from "../../../uni-icons.js"; +import { openBlock, createElementBlock, normalizeStyle, renderSlot, resolveComponent, resolveDynamicComponent, normalizeClass, createElementVNode, createBlock, createCommentVNode, createVNode, toDisplayString, withCtx } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import { _ as __easycom_0$1 } from "../../../uni-card.js"; +import { _ as __easycom_2 } from "../../../uni-section.js"; +import "../../../shared.esm-bundler.js"; +var _style_0$2 = { "uni-status-bar": { "": { "height": 20 } } }; +const _sfc_main$2 = { + name: "UniStatusBar", + data() { + return { + statusBarHeight: 20 + }; + }, + mounted() { + this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + "px"; + } +}; +function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("view", { + style: normalizeStyle({ height: $data.statusBarHeight }), + class: "uni-status-bar" + }, [ + renderSlot(_ctx.$slots, "default") + ], 4); +} +var statusBar = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["styles", [_style_0$2]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.vue"]]); +var _style_0$1 = { "uni-nav-bar-text": { "": { "fontSize": "34rpx" } }, "uni-nav-bar-right-text": { "": { "fontSize": 12 } }, "uni-navbar__content": { "": { "position": "relative", "backgroundColor": "rgba(0,0,0,0)" } }, "uni-navbar-btn-text": { "": { "flexDirection": "column", "justifyContent": "flex-start", "alignItems": "center", "lineHeight": 12 } }, "uni-navbar__header": { "": { "paddingTop": 0, "paddingRight": 10, "paddingBottom": 0, "paddingLeft": 10, "flexDirection": "row", "height": 44, "fontSize": 12 } }, "uni-navbar__header-btns": { "": { "flexWrap": "nowrap", "flexDirection": "row", "width": "120rpx", "justifyContent": "center", "alignItems": "center" } }, "uni-navbar__header-btns-left": { "": { "width": "120rpx", "justifyContent": "flex-start", "alignItems": "center" } }, "uni-navbar__header-btns-right": { "": { "flexDirection": "row", "justifyContent": "flex-end", "alignItems": "center" } }, "uni-navbar__header-container": { "": { "flex": 1, "paddingTop": 0, "paddingRight": 10, "paddingBottom": 0, "paddingLeft": 10, "overflow": "hidden" } }, "uni-navbar__header-container-inner": { "": { "flex": 1, "flexDirection": "row", "alignItems": "center", "justifyContent": "center", "fontSize": 12, "overflow": "hidden" } }, "uni-navbar__placeholder-view": { "": { "height": 44 } }, "uni-navbar--fixed": { "": { "position": "fixed", "zIndex": 998, "left": 0, "right": 0 } }, "uni-navbar--shadow": { "": { "boxShadow": "0 1px 6px #ccc" } }, "uni-navbar--border": { "": { "borderBottomWidth": "1rpx", "borderBottomStyle": "solid", "borderBottomColor": "#eeeeee" } }, "uni-ellipsis-1": { "": { "overflow": "hidden", "lines": 1, "textOverflow": "ellipsis" } } }; +const getVal = (val) => typeof val === "number" ? val + "px" : val; +const _sfc_main$1 = { + name: "UniNavBar", + components: { + statusBar + }, + emits: ["clickLeft", "clickRight", "clickTitle"], + props: { + dark: { + type: Boolean, + default: false + }, + title: { + type: String, + default: "" + }, + leftText: { + type: String, + default: "" + }, + rightText: { + type: String, + default: "" + }, + leftIcon: { + type: String, + default: "" + }, + rightIcon: { + type: String, + default: "" + }, + fixed: { + type: [Boolean, String], + default: false + }, + color: { + type: String, + default: "" + }, + backgroundColor: { + type: String, + default: "" + }, + statusBar: { + type: [Boolean, String], + default: false + }, + shadow: { + type: [Boolean, String], + default: false + }, + border: { + type: [Boolean, String], + default: true + }, + height: { + type: [Number, String], + default: 44 + }, + leftWidth: { + type: [Number, String], + default: 60 + }, + rightWidth: { + type: [Number, String], + default: 60 + }, + stat: { + type: [Boolean, String], + default: "" + } + }, + computed: { + themeBgColor() { + if (this.dark) { + if (this.backgroundColor) { + return this.backgroundColor; + } else { + return this.dark ? "#333" : "#FFF"; + } + } + return this.backgroundColor || "#FFF"; + }, + themeColor() { + if (this.dark) { + if (this.color) { + return this.color; + } else { + return this.dark ? "#fff" : "#333"; + } + } + return this.color || "#333"; + }, + navbarHeight() { + return getVal(this.height); + }, + leftIconWidth() { + return getVal(this.leftWidth); + }, + rightIconWidth() { + return getVal(this.rightWidth); + } + }, + mounted() { + if (uni.report && this.stat && this.title !== "") { + uni.report("title", this.title); + } + }, + methods: { + onClickLeft() { + this.$emit("clickLeft"); + }, + onClickRight() { + this.$emit("clickRight"); + }, + onClickTitle() { + this.$emit("clickTitle"); + } + } +}; +function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { + const _component_status_bar = resolveComponent("status-bar"); + const _component_uni_icons = resolveEasycom(resolveDynamicComponent("uni-icons"), __easycom_1); + return openBlock(), createElementBlock("view", { + class: normalizeClass(["uni-navbar", { "uni-dark": $props.dark }]) + }, [ + createElementVNode("view", { + class: normalizeClass([{ "uni-navbar--fixed": $props.fixed, "uni-navbar--shadow": $props.shadow, "uni-navbar--border": $props.border }, "uni-navbar__content"]), + style: normalizeStyle({ "background-color": $options.themeBgColor }) + }, [ + $props.statusBar ? (openBlock(), createBlock(_component_status_bar, { key: 0 })) : createCommentVNode("v-if", true), + createElementVNode("view", { + style: normalizeStyle({ color: $options.themeColor, backgroundColor: $options.themeBgColor, height: $options.navbarHeight }), + class: "uni-navbar__header" + }, [ + createElementVNode("view", { + onClick: _cache[0] || (_cache[0] = (...args) => $options.onClickLeft && $options.onClickLeft(...args)), + class: "uni-navbar__header-btns uni-navbar__header-btns-left", + style: normalizeStyle({ width: $options.leftIconWidth }) + }, [ + renderSlot(_ctx.$slots, "left", {}, () => [ + $props.leftIcon.length > 0 ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-navbar__content_view" + }, [ + createVNode(_component_uni_icons, { + color: $options.themeColor, + type: $props.leftIcon, + size: "20" + }, null, 8, ["color", "type"]) + ])) : createCommentVNode("v-if", true), + $props.leftText.length ? (openBlock(), createElementBlock("view", { + key: 1, + class: normalizeClass([{ "uni-navbar-btn-icon-left": !$props.leftIcon.length > 0 }, "uni-navbar-btn-text"]) + }, [ + createElementVNode("u-text", { + style: normalizeStyle({ color: $options.themeColor, fontSize: "12px" }) + }, toDisplayString($props.leftText), 5) + ], 2)) : createCommentVNode("v-if", true) + ]) + ], 4), + createElementVNode("view", { + class: "uni-navbar__header-container", + onClick: _cache[1] || (_cache[1] = (...args) => $options.onClickTitle && $options.onClickTitle(...args)) + }, [ + renderSlot(_ctx.$slots, "default", {}, () => [ + $props.title.length > 0 ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-navbar__header-container-inner" + }, [ + createElementVNode("u-text", { + class: "uni-nav-bar-text uni-ellipsis-1", + style: normalizeStyle({ color: $options.themeColor }) + }, toDisplayString($props.title), 5) + ])) : createCommentVNode("v-if", true) + ]) + ]), + createElementVNode("view", { + onClick: _cache[2] || (_cache[2] = (...args) => $options.onClickRight && $options.onClickRight(...args)), + class: "uni-navbar__header-btns uni-navbar__header-btns-right", + style: normalizeStyle({ width: $options.rightIconWidth }) + }, [ + renderSlot(_ctx.$slots, "right", {}, () => [ + $props.rightIcon.length ? (openBlock(), createElementBlock("view", { key: 0 }, [ + createVNode(_component_uni_icons, { + color: $options.themeColor, + type: $props.rightIcon, + size: "22" + }, null, 8, ["color", "type"]) + ])) : createCommentVNode("v-if", true), + $props.rightText.length && !$props.rightIcon.length ? (openBlock(), createElementBlock("view", { + key: 1, + class: "uni-navbar-btn-text" + }, [ + createElementVNode("u-text", { + class: "uni-nav-bar-right-text", + style: normalizeStyle({ color: $options.themeColor }) + }, toDisplayString($props.rightText), 5) + ])) : createCommentVNode("v-if", true) + ]) + ], 4) + ], 4) + ], 6), + $props.fixed ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-navbar__placeholder" + }, [ + $props.statusBar ? (openBlock(), createBlock(_component_status_bar, { key: 0 })) : createCommentVNode("v-if", true), + createElementVNode("view", { + class: "uni-navbar__placeholder-view", + style: normalizeStyle({ height: $options.navbarHeight }) + }, null, 4) + ])) : createCommentVNode("v-if", true) + ], 2); +} +var __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["styles", [_style_0$1]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue"]]); +var _style_0 = { "box-bg": { "": { "backgroundColor": "#F5F5F5", "paddingTop": 5, "paddingRight": 0, "paddingBottom": 5, "paddingLeft": 0 } }, "city": { "": { "flexDirection": "row", "alignItems": "center", "justifyContent": "flex-start", "marginLeft": 4 } }, "input-view": { "": { "flexDirection": "row", "flex": 1, "backgroundColor": "#f8f8f8", "height": 30, "borderRadius": 15, "paddingTop": 0, "paddingRight": 15, "paddingBottom": 0, "paddingLeft": 15, "flexWrap": "nowrap", "marginTop": 7, "marginRight": 0, "marginBottom": 7, "marginLeft": 0, "lineHeight": 30 } }, "input-uni-icon": { "": { "lineHeight": 30 } }, "nav-bar-input": { "": { "height": 30, "lineHeight": 30, "width": "370rpx", "paddingTop": 0, "paddingRight": 5, "paddingBottom": 0, "paddingLeft": 5, "fontSize": 12, "backgroundColor": "#f8f8f8" } } }; +const _sfc_main = { + components: {}, + data() { + return { + city: "\u5317\u4EAC" + }; + }, + methods: { + back() { + uni.navigateBack({ + delta: 1 + }); + }, + showMenu() { + uni.showToast({ + title: "\u83DC\u5355" + }); + }, + clickLeft() { + uni.showToast({ + title: "\u5DE6\u4FA7\u6309\u94AE" + }); + }, + search() { + uni.showToast({ + title: "\u641C\u7D22" + }); + }, + showCity() { + uni.showToast({ + title: "\u9009\u62E9\u57CE\u5E02" + }); + }, + scan() { + uni.showToast({ + title: "\u626B\u7801" + }); + }, + confirm() { + uni.showToast({ + title: "\u641C\u7D22" + }); + } + }, + onPullDownRefresh() { + formatAppLog("log", "at pages/extUI/nav-bar/nav-bar.nvue:128", "onPullDownRefresh"); + setTimeout(function() { + uni.stopPullDownRefresh(); + formatAppLog("log", "at pages/extUI/nav-bar/nav-bar.nvue:131", "stopPullDownRefresh"); + }, 1e3); + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_nav_bar = resolveEasycom(resolveDynamicComponent("uni-nav-bar"), __easycom_0); + const _component_uni_card = resolveEasycom(resolveDynamicComponent("uni-card"), __easycom_0$1); + const _component_uni_section = resolveEasycom(resolveDynamicComponent("uni-section"), __easycom_2); + const _component_uni_icons = resolveEasycom(resolveDynamicComponent("uni-icons"), __easycom_1); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "container" }, [ + createVNode(_component_uni_nav_bar, { + dark: "", + fixed: true, + shadow: "", + "background-color": "#007AFF", + "status-bar": "", + "left-icon": "left", + "left-text": "\u8FD4\u56DE", + title: "\u81EA\u5B9A\u4E49\u5BFC\u822A\u680F", + onClickLeft: $options.back + }, null, 8, ["onClickLeft"]), + createVNode(_component_uni_card, { + "is-full": "", + isShadow: false + }, { + default: withCtx(() => [ + createElementVNode("u-text", { class: "uni-h6" }, "\u672C\u5BFC\u822A\u680F\u4E3A\u81EA\u5B9A\u4E49\u7EC4\u4EF6\uFF0C\u5E76\u975E\u539F\u751F\u5BFC\u822A\u680F\u3002\u9664\u975E\u539F\u751F\u5BFC\u822A\u680F\u65E0\u6CD5\u6EE1\u8DB3\u9700\u6C42\uFF0C\u5426\u5219\u4E0D\u63A8\u8350\u4F7F\u7528\u81EA\u5B9A\u4E49\u5BFC\u822A\u680F\u7EC4\u4EF6\u3002\u5177\u4F53\u53C2\u8003https://ask.dcloud.net.cn/article/34921") + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u57FA\u672C\u7528\u6CD5", + subTitle: "\u4F7F\u7528 title \u5C5E\u6027\u8BBE\u7F6E\u5BFC\u822A\u680F\u6807\u9898", + type: "line", + style: { "margin-bottom": "3px" } + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "box-bg" }, [ + createVNode(_component_uni_nav_bar, { title: "\u6807\u9898" }) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u5F00\u542F\u9634\u5F71", + subTitle: "\u4F7F\u7528 shadow \u5C5E\u6027\u542F\u7528\u9634\u5F71", + type: "line", + style: { "margin-bottom": "3px" } + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "box-bg" }, [ + createVNode(_component_uni_nav_bar, { + shadow: "", + "left-icon": "left", + title: "\u5F00\u542F\u9634\u5F71", + onClickLeft: $options.back + }, null, 8, ["onClickLeft"]) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u5F00\u542F\u6697\u9ED1\u6A21\u5F0F", + subTitle: "\u4F7F\u7528 dark \u5C5E\u6027\u8BBE\u7F6E\u6697\u9ED1\u6A21\u5F0F", + type: "line", + style: { "margin-bottom": "3px" } + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "box-bg" }, [ + createVNode(_component_uni_nav_bar, { + shadow: "", + "left-icon": "left", + dark: "", + title: "\u6697\u9ED1\u6A21\u5F0F", + onClickLeft: $options.back + }, null, 8, ["onClickLeft"]) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u5E26\u8FD4\u56DE\u7BAD\u5934+\u53F3\u4FA7\u56FE\u6807", + subTitle: "\u4F7F\u7528 left-icon/right-icon \u8BBE\u7F6E\u5DE6\u53F3\u56FE\u6807", + type: "line", + style: { "margin-bottom": "3px" } + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "box-bg" }, [ + createVNode(_component_uni_nav_bar, { + shadow: "", + "left-icon": "left", + "right-icon": "cart", + title: "\u6807\u9898" + }) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u5DE6\u4FA7\u6587\u5B57+\u53F3\u4FA7\u6587\u5B57", + subTitle: "\u4F7F\u7528 left-text/right-text \u8BBE\u7F6E\u5DE6\u53F3\u6587\u5B57", + type: "line", + style: { "margin-bottom": "3px" } + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "box-bg" }, [ + createVNode(_component_uni_nav_bar, { + shadow: "", + "left-icon": "left", + leftText: "\u8FD4\u56DE", + rightText: "\u8BBE\u7F6E", + title: "\u6807\u9898" + }) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u81EA\u5B9A\u4E49\u989C\u8272", + subTitle: "\u4F7F\u7528 color/background-color \u5C5E\u6027\u8BBE\u7F6E\u524D\u666F\u80CC\u666F\u8272", + type: "line", + style: { "margin-bottom": "3px" } + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "box-bg" }, [ + createElementVNode("view", { class: "box-bg" }, [ + createVNode(_component_uni_nav_bar, { + dark: "", + color: "#999", + backgroundColor: "#f5f5f5", + shadow: "", + "left-icon": "left", + leftText: "\u8FD4\u56DE", + rightText: "\u8BBE\u7F6E", + title: "\u81EA\u5B9A\u4E49\u989C\u8272" + }) + ]) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u81EA\u5B9A\u4E49\u9AD8\u5EA6", + subTitle: "\u4F7F\u7528 height \u4FEE\u6539\u7EC4\u4EF6\u9AD8\u5EA6", + type: "line", + style: { "margin-bottom": "3px" } + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "box-bg" }, [ + createElementVNode("view", { class: "box-bg" }, [ + createVNode(_component_uni_nav_bar, { + height: "65px", + dark: "", + shadow: "", + "left-icon": "left", + leftText: "\u8FD4\u56DE", + rightText: "\u8BBE\u7F6E", + title: "\u81EA\u5B9A\u4E49\u9AD8\u5EA6" + }) + ]) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u81EA\u5B9A\u4E49\u5185\u5BB9", + subTitle: "\u4F7F\u7528 left/right/default \u63D2\u69FD\u81EA\u5B9A\u4E49\u5185\u5BB9", + type: "line", + style: { "margin-bottom": "3px" } + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "box-bg" }, [ + createVNode(_component_uni_nav_bar, null, { + left: withCtx(() => [ + createElementVNode("view", { class: "city" }, [ + createElementVNode("view", null, [ + createElementVNode("u-text", { class: "uni-nav-bar-text" }, toDisplayString($data.city), 1) + ]), + createVNode(_component_uni_icons, { + type: "arrowdown", + color: "#666", + size: "18" + }) + ]) + ]), + right: withCtx(() => [ + createElementVNode("view", { class: "city" }, [ + createElementVNode("u-text", null, " \u641C\u7D22 ") + ]) + ]), + default: withCtx(() => [ + createElementVNode("view", { class: "input-view" }, [ + createVNode(_component_uni_icons, { + class: "input-uni-icon", + type: "search", + size: "18", + color: "#999" + }), + createElementVNode("u-input", { + confirmType: "search", + class: "nav-bar-input", + type: "text", + placeholder: "\u8F93\u5165\u641C\u7D22\u5173\u952E\u8BCD", + onConfirm: _cache[0] || (_cache[0] = (...args) => $options.confirm && $options.confirm(...args)) + }, null, 32) + ]) + ]), + _: 1 + }) + ]) + ]), + _: 1 + }) + ]) + ]); +} +var navBar = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/extUI/nav-bar/nav-bar.nvue"]]); +export { navBar as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/number-box/number-box.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/number-box/number-box.js new file mode 100644 index 000000000..d8a10744e --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/number-box/number-box.js @@ -0,0 +1,305 @@ +import { f as formatAppLog } from "../../../uni-shared.es.js"; +import { _ as __easycom_0 } from "../../../uni-card.js"; +import { openBlock, createElementBlock, createElementVNode, normalizeStyle, normalizeClass, resolveDynamicComponent, createVNode, withCtx } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import { _ as __easycom_2 } from "../../../uni-section.js"; +import "../../../shared.esm-bundler.js"; +var _style_0 = { "uni-numbox": { "": { "flexDirection": "row" } }, "uni-numbox-btns": { "": { "flexDirection": "row", "alignItems": "center", "justifyContent": "center", "paddingTop": 0, "paddingRight": 8, "paddingBottom": 0, "paddingLeft": 8, "backgroundColor": "#f5f5f5" } }, "uni-numbox__value": { "": { "marginTop": 0, "marginRight": 2, "marginBottom": 0, "marginLeft": 2, "backgroundColor": "#f5f5f5", "width": 40, "height": 26, "textAlign": "center", "fontSize": 14, "borderLeftWidth": 0, "borderRightWidth": 0, "color": "#333333" } }, "uni-numbox__minus": { "": { "borderTopLeftRadius": 2, "borderBottomLeftRadius": 2 } }, "uni-numbox__plus": { "": { "borderTopRightRadius": 2, "borderBottomRightRadius": 2 } }, "uni-numbox--text": { "": { "lineHeight": 20, "fontSize": 20, "fontWeight": "300", "color": "#333333" } }, "uni-numbox--disabled": { ".uni-numbox ": { "!color": "#c0c0c0" } } }; +const _sfc_main$1 = { + name: "UniNumberBox", + emits: ["change", "input", "update:modelValue", "blur", "focus"], + props: { + value: { + type: [Number, String], + default: 1 + }, + modelValue: { + type: [Number, String], + default: 1 + }, + min: { + type: Number, + default: 0 + }, + max: { + type: Number, + default: 100 + }, + step: { + type: Number, + default: 1 + }, + background: { + type: String, + default: "#f5f5f5" + }, + color: { + type: String, + default: "#333" + }, + disabled: { + type: Boolean, + default: false + } + }, + data() { + return { + inputValue: 0 + }; + }, + watch: { + value(val) { + this.inputValue = +val; + }, + modelValue(val) { + this.inputValue = +val; + } + }, + created() { + if (this.value === 1) { + this.inputValue = +this.modelValue; + } + if (this.modelValue === 1) { + this.inputValue = +this.value; + } + }, + methods: { + _calcValue(type) { + if (this.disabled) { + return; + } + const scale = this._getDecimalScale(); + let value = this.inputValue * scale; + let step = this.step * scale; + if (type === "minus") { + value -= step; + if (value < this.min * scale) { + return; + } + if (value > this.max * scale) { + value = this.max * scale; + } + } + if (type === "plus") { + value += step; + if (value > this.max * scale) { + return; + } + if (value < this.min * scale) { + value = this.min * scale; + } + } + this.inputValue = (value / scale).toFixed(String(scale).length - 1); + this.$emit("change", +this.inputValue); + this.$emit("input", +this.inputValue); + this.$emit("update:modelValue", +this.inputValue); + }, + _getDecimalScale() { + let scale = 1; + if (~~this.step !== this.step) { + scale = Math.pow(10, String(this.step).split(".")[1].length); + } + return scale; + }, + _onBlur(event) { + this.$emit("blur", event); + let value = event.detail.value; + if (!value) { + return; + } + value = +value; + if (value > this.max) { + value = this.max; + } else if (value < this.min) { + value = this.min; + } + const scale = this._getDecimalScale(); + this.inputValue = value.toFixed(String(scale).length - 1); + this.$emit("change", +this.inputValue); + this.$emit("input", +this.inputValue); + }, + _onFocus(event) { + this.$emit("focus", event); + } + } +}; +function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("view", { class: "uni-numbox" }, [ + createElementVNode("view", { + onClick: _cache[0] || (_cache[0] = ($event) => $options._calcValue("minus")), + class: "uni-numbox__minus uni-numbox-btns", + style: normalizeStyle({ background: $props.background }) + }, [ + createElementVNode("u-text", { + class: normalizeClass(["uni-numbox--text", { "uni-numbox--disabled": $data.inputValue <= $props.min || $props.disabled }]), + style: normalizeStyle({ color: $props.color }) + }, "-", 6) + ], 4), + createElementVNode("u-input", { + disabled: $props.disabled, + onFocus: _cache[1] || (_cache[1] = (...args) => $options._onFocus && $options._onFocus(...args)), + onBlur: _cache[2] || (_cache[2] = (...args) => $options._onBlur && $options._onBlur(...args)), + class: "uni-numbox__value", + type: "number", + modelValue: $data.inputValue, + onInput: _cache[3] || (_cache[3] = ($event) => $data.inputValue = $event.detail.value), + style: normalizeStyle({ background: $props.background, color: $props.color }) + }, null, 44, ["disabled", "modelValue"]), + createElementVNode("view", { + onClick: _cache[4] || (_cache[4] = ($event) => $options._calcValue("plus")), + class: "uni-numbox__plus uni-numbox-btns", + style: normalizeStyle({ background: $props.background }) + }, [ + createElementVNode("u-text", { + class: normalizeClass(["uni-numbox--text", { "uni-numbox--disabled": $data.inputValue >= $props.max || $props.disabled }]), + style: normalizeStyle({ color: $props.color }) + }, "+", 6) + ], 4) + ]); +} +var __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-number-box/components/uni-number-box/uni-number-box.vue"]]); +const _sfc_main = { + components: {}, + data() { + return { + numberValue: 0, + vModelValue: 3 + }; + }, + methods: { + change(value) { + this.numberValue = value; + }, + changeValue(value) { + formatAppLog("log", "at pages/extUI/number-box/number-box.nvue:43", "\u8FD4\u56DE\u6570\u503C\uFF1A", value); + }, + blur(e) { + formatAppLog("log", "at pages/extUI/number-box/number-box.nvue:46", "-------blur:", e); + }, + focus(e) { + formatAppLog("log", "at pages/extUI/number-box/number-box.nvue:49", "-------focus:", e); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_card = resolveEasycom(resolveDynamicComponent("uni-card"), __easycom_0); + const _component_uni_number_box = resolveEasycom(resolveDynamicComponent("uni-number-box"), __easycom_1); + const _component_uni_section = resolveEasycom(resolveDynamicComponent("uni-section"), __easycom_2); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "page" }, [ + createVNode(_component_uni_card, { + "is-shadow": false, + "is-full": "" + }, { + default: withCtx(() => [ + createElementVNode("u-text", { class: "uni-h6" }, "\u6570\u5B57\u8F93\u5165\u6846\u7EC4\u4EF6\u591A\u7528\u4E8E\u8D2D\u7269\u8F66\u52A0\u51CF\u5546\u54C1\u7B49\u573A\u666F") + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u57FA\u672C\u7528\u6CD5", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_number_box, { onChange: $options.changeValue }, null, 8, ["onChange"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u4F7F\u7528v-model : " + $data.vModelValue, + subTitle: "\u4F7F\u7528 v-model \u663E\u793A\u9ED8\u8BA4\u503C", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_number_box, { + modelValue: $data.vModelValue, + "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.vModelValue = $event), + onBlur: $options.blur, + onFocus: $options.focus, + onChange: $options.changeValue + }, null, 8, ["modelValue", "onBlur", "onFocus", "onChange"]) + ]), + _: 1 + }, 8, ["title"]), + createVNode(_component_uni_section, { + title: "\u8BBE\u7F6E\u6700\u5C0F\u503C\u548C\u6700\u5927\u503C", + subTitle: "\u4F7F\u7528 min \\ max \u5C5E\u6027\u8BBE\u7F6E\u6700\u5927\u6700\u5C0F\u503C", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_number_box, { + min: 2, + max: 9, + value: 555 + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u8BBE\u7F6E\u6B65\u957F\uFF08\u6B65\u957F0.1)", + subTitle: "\u4F7F\u7528 step \u5C5E\u6027\u8BBE\u7F6E\u6B65\u957F", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_number_box, { + value: 1.1, + step: 0.1 + }, null, 8, ["value", "step"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u81EA\u5B9A\u4E49\u80CC\u666F", + type: "line", + subTitle: "\u4F7F\u7528 background \u5C5E\u6027\u8BBE\u7F6E\u81EA\u5B9A\u4E49\u80CC\u666F\u8272", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_number_box, { + value: 50, + background: "#2979FF", + color: "#fff" + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u7981\u7528\u72B6\u6001", + subTitle: "\u4F7F\u7528 disabled \u5C5E\u6027\u8BBE\u7F6E\u7EC4\u4EF6\u7981\u7528", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_number_box, { disabled: true }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u83B7\u53D6\u8F93\u5165\u7684\u503C : " + $data.numberValue, + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_number_box, { + value: $data.numberValue, + onChange: $options.change + }, null, 8, ["value", "onChange"]) + ]), + _: 1 + }, 8, ["title"]) + ]) + ]); +} +var numberBox = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/extUI/number-box/number-box.nvue"]]); +export { numberBox as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/radius/radius.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/radius/radius.js new file mode 100644 index 000000000..d6de681c2 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/radius/radius.js @@ -0,0 +1,159 @@ +import { _ as __easycom_0 } from "../../../uni-card.js"; +import { resolveDynamicComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, normalizeClass } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as __easycom_1 } from "../../../uni-data-checkbox.js"; +import { _ as __easycom_2 } from "../../../uni-section.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import "../../../shared.esm-bundler.js"; +import "../../../uni-cloud.es.js"; +import "../../../uni-i18n.es.js"; +import "../../../uni-load-more.js"; +var _style_0 = { "header": { "": { "display": "flex", "flexDirection": "row", "flexWrap": "wrap" } }, "margin": { "": { "display": "flex", "height": 200, "marginTop": 10, "marginRight": 10, "marginBottom": 10, "marginLeft": 10, "overflow": "hidden", "borderRadius": 5, "borderWidth": 1, "borderStyle": "solid", "borderColor": "#eeeeee" } }, "margin-item": { "": { "display": "flex", "flex": 1 } }, "box": { "": { "display": "flex", "alignItems": "center", "justifyContent": "center", "flex": 1 } }, "actions": { "": { "display": "flex", "flexDirection": "row", "alignItems": "center" } }, "action-label": { "": { "width": 50, "marginLeft": 10, "marginRight": 10, "fontSize": 12 } } }; +const _sfc_main = { + data() { + return { + radiusClass: "uni-radius-lg", + formData: { + direction: ["t", "b"], + size: "lg" + }, + directionData: [{ + value: "t", + text: "\u5DE6\u4E0A+\u53F3\u4E0A" + }, { + value: "r", + text: "\u53F3\u4E0A+\u53F3\u4E0B" + }, { + value: "b", + text: "\u5DE6\u4E0B+\u53F3\u4E0B" + }, { + value: "l", + text: "\u53F3\u4E0A+\u5DE6\u4E0B" + }, { + value: "tl", + text: "\u5DE6\u4E0A" + }, { + value: "tr", + text: "\u53F3\u4E0A" + }, { + value: "bl", + text: "\u5DE6\u4E0B" + }, { + value: "br", + text: "\u53F3\u4E0B" + }], + sizeData: [{ + value: "0", + text: "\u65E0" + }, { + value: "sm", + text: "\u5C0F" + }, { + value: "lg", + text: "\u5E38\u89C4" + }, { + value: "xl", + text: "\u5927" + }, { + value: "circle", + text: "\u5706" + }, { + value: "pill", + text: "\u6700\u5927\u5316" + }] + }; + }, + onLoad() { + }, + methods: { + change(e, type) { + let { + direction, + size + } = this.formData; + this.radiusClass = ""; + direction.forEach((v) => { + this.radiusClass += `uni-radius-${v}-${size} `; + }); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_card = resolveEasycom(resolveDynamicComponent("uni-card"), __easycom_0); + const _component_uni_data_checkbox = resolveEasycom(resolveDynamicComponent("uni-data-checkbox"), __easycom_1); + const _component_uni_section = resolveEasycom(resolveDynamicComponent("uni-section"), __easycom_2); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "container" }, [ + createVNode(_component_uni_card, { + "is-shadow": false, + "is-full": "" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "header" }, [ + createElementVNode("u-text", { class: "uni-h6" }, "\u4F7F\u7528\u8FB9\u6846\u534A\u5F84\u8F85\u52A9\u6837\u5F0F\u5BF9\u5143\u7D20\u5FEB\u901F\u5E94\u7528"), + createElementVNode("u-text", null, " "), + createElementVNode("u-text", { class: "uni-primary uni-px-3 uni-h6" }, "border-radius"), + createElementVNode("u-text", null, " "), + createElementVNode("u-text", { class: "uni-h6" }, "\u6837\u5F0F\u3002") + ]), + createElementVNode("view", { class: "uni-mt-5 header" }, [ + createElementVNode("u-text", { class: "uni-h6" }, "\u89C4\u5219\u4E3A"), + createElementVNode("u-text", null, " "), + createElementVNode("u-text", { class: "uni-primary uni-pl-3 uni-h6" }, "uni-radius-${direction}-${size}") + ]), + createElementVNode("view", { class: "uni-mt-5 header" }, [ + createElementVNode("u-text", { class: "uni-h6" }, "\u5982\u679C\u9700\u8981\u56DB\u8FB9\uFF0C\u5219\u4E0D\u9700\u8981\u6307\u5B9A"), + createElementVNode("u-text", null, " "), + createElementVNode("u-text", { class: "uni-primary uni-pl-3 uni-h6" }, "direction") + ]), + createElementVNode("view", { class: "uni-mt-5" }, [ + createElementVNode("u-text", { class: "uni-h6" }, "\u5404\u503C\u7684\u542B\u4E49\u8BF7\u53C2\u8003\u6587\u6863") + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u6548\u679C\u5C55\u793A", + type: "line" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "margin" }, [ + createElementVNode("view", { + class: normalizeClass(["box uni-primary-bg uni-ma-5", [$data.radiusClass]]) + }, [ + createElementVNode("u-text", { class: "uni-white" }, "\u901A\u8FC7\u4E0B\u9762\u7684\u9009\u9879\u63A7\u5236\u5706\u89D2") + ], 2) + ]), + createElementVNode("view", { class: "actions uni-mt-10" }, [ + createElementVNode("u-text", { class: "action-label" }, "\u4F4D\u7F6E"), + createVNode(_component_uni_data_checkbox, { + modelValue: $data.formData.direction, + "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.formData.direction = $event), + multiple: "", + localdata: $data.directionData, + onChange: _cache[1] || (_cache[1] = ($event) => $options.change($event, 1)) + }, null, 8, ["modelValue", "localdata"]) + ]), + createElementVNode("view", { class: "actions uni-mt-3 uni-mb-10" }, [ + createElementVNode("u-text", { class: "action-label" }, "\u5927\u5C0F"), + createVNode(_component_uni_data_checkbox, { + modelValue: $data.formData.size, + "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.formData.size = $event), + localdata: $data.sizeData, + onChange: _cache[3] || (_cache[3] = ($event) => $options.change($event, 2)) + }, null, 8, ["modelValue", "localdata"]) + ]) + ]), + _: 1 + }) + ]) + ]); +} +var radius = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/extUI/radius/radius.nvue"]]); +export { radius as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/rate/rate.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/rate/rate.js new file mode 100644 index 000000000..fd7ae771c --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/rate/rate.js @@ -0,0 +1,416 @@ +import { f as formatAppLog } from "../../../uni-shared.es.js"; +import { _ as __easycom_0 } from "../../../uni-card.js"; +import { resolveDynamicComponent, openBlock, createElementBlock, createElementVNode, Fragment, renderList, normalizeClass, normalizeStyle, withModifiers, createVNode, withCtx } from "vue"; +import { a as requireNativePlugin, r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as __easycom_1$1 } from "../../../uni-icons.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import { _ as __easycom_2 } from "../../../uni-section.js"; +import "../../../shared.esm-bundler.js"; +var _style_0 = { "uni-rate": { "": { "lineHeight": 1, "fontSize": 0, "flexDirection": "row" } }, "uni-rate__icon": { "": { "position": "relative", "lineHeight": 1, "fontSize": 0 } }, "uni-rate__icon-on": { "": { "overflow": "hidden", "position": "absolute", "top": 0, "left": 0, "lineHeight": 1, "textAlign": "left" } } }; +const dom = requireNativePlugin("dom"); +const _sfc_main$1 = { + name: "UniRate", + props: { + isFill: { + type: [Boolean, String], + default: true + }, + color: { + type: String, + default: "#ececec" + }, + activeColor: { + type: String, + default: "#ffca3e" + }, + disabledColor: { + type: String, + default: "#c0c0c0" + }, + size: { + type: [Number, String], + default: 24 + }, + value: { + type: [Number, String], + default: 0 + }, + modelValue: { + type: [Number, String], + default: 0 + }, + max: { + type: [Number, String], + default: 5 + }, + margin: { + type: [Number, String], + default: 0 + }, + disabled: { + type: [Boolean, String], + default: false + }, + readonly: { + type: [Boolean, String], + default: false + }, + allowHalf: { + type: [Boolean, String], + default: false + }, + touchable: { + type: [Boolean, String], + default: true + } + }, + data() { + return { + valueSync: "", + userMouseFristMove: true, + userRated: false, + userLastRate: 1 + }; + }, + watch: { + value(newVal) { + this.valueSync = Number(newVal); + }, + modelValue(newVal) { + this.valueSync = Number(newVal); + } + }, + computed: { + stars() { + const value = this.valueSync ? this.valueSync : 0; + const starList = []; + const floorValue = Math.floor(value); + const ceilValue = Math.ceil(value); + for (let i = 0; i < this.max; i++) { + if (floorValue > i) { + starList.push({ + activeWitch: "100%" + }); + } else if (ceilValue - 1 === i) { + starList.push({ + activeWitch: (value - floorValue) * 100 + "%" + }); + } else { + starList.push({ + activeWitch: "0" + }); + } + } + return starList; + }, + marginNumber() { + return Number(this.margin); + } + }, + created() { + this.valueSync = Number(this.value || this.modelValue); + this._rateBoxLeft = 0; + this._oldValue = null; + }, + mounted() { + setTimeout(() => { + this._getSize(); + }, 100); + }, + methods: { + touchstart(e) { + if (this.readonly || this.disabled) + return; + const { + clientX, + screenX + } = e.changedTouches[0]; + this._getRateCount(clientX || screenX); + }, + touchmove(e) { + if (this.readonly || this.disabled || !this.touchable) + return; + const { + clientX, + screenX + } = e.changedTouches[0]; + this._getRateCount(clientX || screenX); + }, + mousedown(e) { + }, + mousemove(e) { + }, + mouseleave(e) { + }, + _getRateCount(clientX) { + this._getSize(); + const size = Number(this.size); + if (isNaN(size)) { + return new Error("size \u5C5E\u6027\u53EA\u80FD\u8BBE\u7F6E\u4E3A\u6570\u5B57"); + } + const rateMoveRange = clientX - this._rateBoxLeft; + let index = parseInt(rateMoveRange / (size + this.marginNumber)); + index = index < 0 ? 0 : index; + index = index > this.max ? this.max : index; + const range = parseInt(rateMoveRange - (size + this.marginNumber) * index); + let value = 0; + if (this._oldValue === index && !this.PC) + return; + this._oldValue = index; + if (this.allowHalf) { + if (range > size / 2) { + value = index + 1; + } else { + value = index + 0.5; + } + } else { + value = index + 1; + } + value = Math.max(0.5, Math.min(value, this.max)); + this.valueSync = value; + this._onChange(); + }, + _onChange() { + this.$emit("input", this.valueSync); + this.$emit("update:modelValue", this.valueSync); + this.$emit("change", { + value: this.valueSync + }); + }, + _getSize() { + dom.getComponentRect(this.$refs["uni-rate"], (ret) => { + const size = ret.size; + if (size) { + this._rateBoxLeft = size.left; + } + }); + } + } +}; +function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_icons = resolveEasycom(resolveDynamicComponent("uni-icons"), __easycom_1$1); + return openBlock(), createElementBlock("view", null, [ + createElementVNode("view", { + ref: "uni-rate", + class: "uni-rate" + }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList($options.stars, (star, index) => { + return openBlock(), createElementBlock("view", { + class: normalizeClass(["uni-rate__icon", { "uni-cursor-not-allowed": $props.disabled }]), + style: normalizeStyle({ "margin-right": $options.marginNumber + "px" }), + key: index, + onTouchstart: _cache[0] || (_cache[0] = withModifiers((...args) => $options.touchstart && $options.touchstart(...args), ["stop"])), + onTouchmove: _cache[1] || (_cache[1] = withModifiers((...args) => $options.touchmove && $options.touchmove(...args), ["stop"])), + onMousedown: _cache[2] || (_cache[2] = withModifiers((...args) => $options.mousedown && $options.mousedown(...args), ["stop"])), + onMousemove: _cache[3] || (_cache[3] = withModifiers((...args) => $options.mousemove && $options.mousemove(...args), ["stop"])), + onMouseleave: _cache[4] || (_cache[4] = (...args) => $options.mouseleave && $options.mouseleave(...args)) + }, [ + createVNode(_component_uni_icons, { + color: $props.color, + size: $props.size, + type: $props.isFill ? "star-filled" : "star" + }, null, 8, ["color", "size", "type"]), + createElementVNode("view", { + style: normalizeStyle({ width: star.activeWitch.replace("%", "") * $props.size / 100 + "px" }), + class: "uni-rate__icon-on" + }, [ + createVNode(_component_uni_icons, { + style: { "text-align": "left" }, + color: $props.disabled ? "#ccc" : $props.activeColor, + size: $props.size, + type: "star-filled" + }, null, 8, ["color", "size"]) + ], 4) + ], 38); + }), 128)) + ], 512) + ]); +} +var __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-rate/components/uni-rate/uni-rate.vue"]]); +const _sfc_main = { + components: {}, + data() { + return { + rateValue: 0 + }; + }, + onLoad() { + setTimeout(() => { + this.rateValue = 3; + }, 1e3); + }, + methods: { + onChange(e) { + formatAppLog("log", "at pages/extUI/rate/rate.nvue:55", "rate\u53D1\u751F\u6539\u53D8:" + JSON.stringify(e)); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_card = resolveEasycom(resolveDynamicComponent("uni-card"), __easycom_0); + const _component_uni_rate = resolveEasycom(resolveDynamicComponent("uni-rate"), __easycom_1); + const _component_uni_section = resolveEasycom(resolveDynamicComponent("uni-section"), __easycom_2); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "container" }, [ + createVNode(_component_uni_card, { + "is-full": "", + "is-shadow": false + }, { + default: withCtx(() => [ + createElementVNode("u-text", { class: "uni-h6" }, "\u8BC4\u5206\u7EC4\u4EF6\u591A\u7528\u4E8E\u5546\u54C1\u8BC4\u4EF7\u6253\u5206\u3001\u670D\u52A1\u6001\u5EA6\u8BC4\u4EF7\u3001\u7528\u6237\u6EE1\u610F\u5EA6\u7B49\u573A\u666F\u3002") + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u57FA\u672C\u7528\u6CD5", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_rate, { + modelValue: $data.rateValue, + "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.rateValue = $event), + onChange: $options.onChange + }, null, 8, ["modelValue", "onChange"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u4E0D\u652F\u6301\u6ED1\u52A8\u624B\u52BF\u9009\u62E9\u8BC4\u5206", + subTitle: "\u8BBE\u7F6E touchable \u5C5E\u6027\u63A7\u5236\u662F\u5426\u5F00\u542F\u624B\u52BF\u9009\u62E9", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_rate, { + touchable: false, + value: 5, + onChange: $options.onChange + }, null, 8, ["onChange"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u8BBE\u7F6E\u5C3A\u5BF8\u5927\u5C0F", + subTitle: "\u8BBE\u7F6E size \u5C5E\u6027\u63A7\u5236\u7EC4\u4EF6\u5927\u5C0F", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_rate, { + size: "18", + value: 5 + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u8BBE\u7F6E\u8BC4\u5206\u6570", + subTitle: "\u8BBE\u7F6E max \u5C5E\u6027\u63A7\u5236\u7EC4\u4EF6\u6700\u5927\u661F\u661F\u6570\u91CF", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_rate, { + max: 10, + value: 5 + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u8BBE\u7F6E\u661F\u661F\u95F4\u9694", + subTitle: "\u8BBE\u7F6E margin \u5C5E\u6027\u63A7\u5236\u661F\u661F\u95F4\u9694", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_rate, { + value: 4, + margin: "20" + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u8BBE\u7F6E\u989C\u8272", + subTitle: "\u4F7F\u7528 color \u5C5E\u6027\u8BBE\u7F6E\u661F\u661F\u989C\u8272", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_rate, { + value: 3, + color: "#bbb", + "active-color": "red" + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u534A\u661F", + subTitle: "\u4F7F\u7528 allow-half \u5C5E\u6027\u8BBE\u7F6E\u662F\u5426\u663E\u793A\u534A\u661F", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_rate, { + "allow-half": "", + value: 3.5 + }, null, 8, ["value"]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u53EA\u8BFB\u72B6\u6001", + subTitle: "\u4F7F\u7528 readonly \u5C5E\u6027\u8BBE\u7F6E\u7EC4\u4EF6\u53EA\u8BFB", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_rate, { + readonly: true, + value: 2 + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u7981\u7528\u72B6\u6001", + subTitle: "\u4F7F\u7528 disabled \u5C5E\u6027\u8BBE\u7F6E\u7EC4\u4EF6\u7981\u7528", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_rate, { + disabled: true, + disabledColor: "#ccc", + value: 3 + }) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u672A\u9009\u4E2D\u7684\u661F\u661F\u4E3A\u9542\u7A7A\u72B6\u6001", + subTitle: "\u4F7F\u7528 is-fill \u5C5E\u6027\u8BBE\u7F6E\u661F\u661F\u9542\u7A7A", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createVNode(_component_uni_rate, { + value: 3, + "is-fill": false + }) + ]), + _: 1 + }) + ]) + ]); +} +var rate = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/extUI/rate/rate.nvue"]]); +export { rate as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/space/space.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/space/space.js new file mode 100644 index 000000000..d1b539955 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/space/space.js @@ -0,0 +1,168 @@ +import { _ as __easycom_0 } from "../../../uni-card.js"; +import { resolveDynamicComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, normalizeClass } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as __easycom_1 } from "../../../uni-data-checkbox.js"; +import { _ as __easycom_2 } from "../../../uni-section.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import "../../../shared.esm-bundler.js"; +import "../../../uni-cloud.es.js"; +import "../../../uni-i18n.es.js"; +import "../../../uni-load-more.js"; +var _style_0 = { "header": { "": { "display": "flex", "flexDirection": "row", "flexWrap": "wrap" } }, "margin": { "": { "display": "flex", "height": 200, "marginTop": 10, "marginRight": 10, "marginBottom": 10, "marginLeft": 10, "overflow": "hidden", "borderRadius": 5, "borderWidth": 1, "borderStyle": "solid", "borderColor": "#eeeeee" } }, "margin-item": { "": { "display": "flex", "flex": 1 } }, "box": { "": { "display": "flex", "alignItems": "center", "justifyContent": "center", "flex": 1 } }, "actions": { "": { "display": "flex", "flexDirection": "row", "alignItems": "center" } }, "action-label": { "": { "width": 70, "marginLeft": 10, "marginRight": 10, "fontSize": 12 } } }; +const _sfc_main = { + data() { + return { + paddingClass: "uni-pa-5", + marginClass: "uni-ma-5", + formData: { + margin: ["t", "r", "l", "b"], + marginSize: "5", + padding: ["t", "r", "l", "b"], + paddingSize: "5" + }, + directionData: [{ + value: "t", + text: "\u4E0A" + }, { + value: "r", + text: "\u53F3" + }, { + value: "b", + text: "\u4E0B" + }, { + value: "l", + text: "\u5DE6" + }], + sizeData: [{ + value: "0", + text: "0" + }, { + value: "2", + text: "4px" + }, { + value: "5", + text: "10px" + }, { + value: "10", + text: "20px" + }] + }; + }, + onLoad() { + }, + methods: { + change(e, type) { + let { + margin, + marginSize, + padding, + paddingSize + } = this.formData; + this.marginClass = ""; + this.paddingClass = ""; + margin.forEach((v) => { + this.marginClass += `uni-m${v}-${marginSize} `; + }); + padding.forEach((v) => { + this.marginClass += `uni-p${v}-${paddingSize} `; + }); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_card = resolveEasycom(resolveDynamicComponent("uni-card"), __easycom_0); + const _component_uni_data_checkbox = resolveEasycom(resolveDynamicComponent("uni-data-checkbox"), __easycom_1); + const _component_uni_section = resolveEasycom(resolveDynamicComponent("uni-section"), __easycom_2); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "container" }, [ + createVNode(_component_uni_card, { + "is-shadow": false, + "is-full": "" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "header" }, [ + createElementVNode("u-text", { class: "uni-h6" }, "\u4F7F\u7528\u95F4\u8DDD\u8F85\u52A9\u7C7B\u5BF9\u5143\u7D20\u5FEB\u901F\u5E94\u7528"), + createElementVNode("u-text", null, " "), + createElementVNode("u-text", { class: "uni-primary uni-px-3 uni-h6" }, "margin"), + createElementVNode("u-text", { class: "uni-h6" }, " \u6216 "), + createElementVNode("u-text", { class: "uni-primary uni-px-3 uni-h6" }, "padding"), + createElementVNode("u-text", null, " "), + createElementVNode("u-text", { class: "uni-h6" }, "\u6837\u5F0F\uFF0C \u8303\u56F4\u662F\u4ECE 0 \u5230 16\u3002") + ]), + createElementVNode("view", { class: "header uni-mt-5" }, [ + createElementVNode("u-text", { class: "uni-h6" }, "\u89C4\u5219\u4E3A"), + createElementVNode("u-text", null, " "), + createElementVNode("u-text", { class: "uni-primary uni-pl-3 uni-h6" }, "uni-${property}${direction}-${size}") + ]), + createElementVNode("view", { class: "uni-mt-5" }, [ + createElementVNode("u-text", { class: "uni-h6" }, "\u5404\u503C\u7684\u542B\u4E49\u8BF7\u53C2\u8003\u6587\u6863") + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u6548\u679C\u5C55\u793A", + type: "line" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "margin" }, [ + createElementVNode("view", { + class: normalizeClass(["margin-item uni-border-4-bg", [$data.paddingClass, $data.marginClass]]) + }, [ + createElementVNode("view", { class: "box uni-primary-bg" }, [ + createElementVNode("u-text", { class: "uni-white uni-body" }, "\u901A\u8FC7\u4E0B\u9762\u7684\u9009\u9879\u63A7\u5236\u8FB9\u8DDD") + ]) + ], 2) + ]), + createElementVNode("view", { class: "actions uni-mt-10" }, [ + createElementVNode("u-text", { class: "action-label" }, "\u5916\u8FB9\u8DDD"), + createVNode(_component_uni_data_checkbox, { + modelValue: $data.formData.margin, + "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.formData.margin = $event), + multiple: "", + localdata: $data.directionData, + onChange: _cache[1] || (_cache[1] = ($event) => $options.change($event, 1)) + }, null, 8, ["modelValue", "localdata"]) + ]), + createElementVNode("view", { class: "actions uni-mt-3 uni-mb-10" }, [ + createElementVNode("u-text", { class: "action-label" }, "\u5916\u8FB9\u8DDD\u5927\u5C0F"), + createVNode(_component_uni_data_checkbox, { + modelValue: $data.formData.marginSize, + "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.formData.marginSize = $event), + localdata: $data.sizeData, + onChange: _cache[3] || (_cache[3] = ($event) => $options.change($event, 1)) + }, null, 8, ["modelValue", "localdata"]) + ]), + createElementVNode("view", { class: "actions" }, [ + createElementVNode("u-text", { class: "action-label" }, "\u5185\u8FB9\u8DDD"), + createVNode(_component_uni_data_checkbox, { + modelValue: $data.formData.padding, + "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.formData.padding = $event), + multiple: "", + localdata: $data.directionData, + onChange: _cache[5] || (_cache[5] = ($event) => $options.change($event, 2)) + }, null, 8, ["modelValue", "localdata"]) + ]), + createElementVNode("view", { class: "actions uni-mt-3 uni-mb-10" }, [ + createElementVNode("u-text", { class: "action-label" }, "\u5185\u8FB9\u8DDD\u5927\u5C0F"), + createVNode(_component_uni_data_checkbox, { + modelValue: $data.formData.paddingSize, + "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.formData.paddingSize = $event), + localdata: $data.sizeData, + onChange: _cache[7] || (_cache[7] = ($event) => $options.change($event, 3)) + }, null, 8, ["modelValue", "localdata"]) + ]) + ]), + _: 1 + }) + ]) + ]); +} +var space = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/extUI/space/space.nvue"]]); +export { space as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/swiper-dot/swiper-dot.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/swiper-dot/swiper-dot.js new file mode 100644 index 000000000..6837d0646 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/swiper-dot/swiper-dot.js @@ -0,0 +1,384 @@ +import { f as formatAppLog } from "../../../uni-shared.es.js"; +import { openBlock, createElementBlock, renderSlot, normalizeStyle, Fragment, renderList, createCommentVNode, normalizeClass, createElementVNode, toDisplayString, resolveComponent, resolveDynamicComponent, createVNode, withCtx } from "vue"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as __easycom_2 } from "../../../uni-section.js"; +import "../../../shared.esm-bundler.js"; +var _style_0$1 = { "uni-swiper__warp": { "": { "flex": 1, "flexDirection": "column", "position": "relative", "overflow": "hidden" } }, "uni-swiper__dots-box": { "": { "position": "absolute", "bottom": 10, "left": 0, "right": 0, "flex": 1, "flexDirection": "row", "justifyContent": "center", "alignItems": "center" } }, "uni-swiper__dots-item": { "": { "width": 8, "borderRadius": 100, "marginLeft": 6, "backgroundColor": "rgba(0,0,0,0.4)", "marginTop:first-child": 0, "marginRight:first-child": 0, "marginBottom:first-child": 0, "marginLeft:first-child": 0 } }, "uni-swiper__dots-default": { "": { "borderRadius": 100 } }, "uni-swiper__dots-long": { "": { "borderRadius": 50 } }, "uni-swiper__dots-bar": { "": { "borderRadius": 50 } }, "uni-swiper__dots-nav": { "": { "bottom": 0, "paddingTop": 8, "paddingRight": 0, "paddingBottom": 8, "paddingLeft": 0, "flex": 1, "flexDirection": "row", "justifyContent": "flex-start", "alignItems": "center", "backgroundColor": "rgba(0,0,0,0.2)" } }, "uni-swiper__dots-nav-item": { "": { "fontSize": 14, "color": "#ffffff", "marginTop": 0, "marginRight": 15, "marginBottom": 0, "marginLeft": 15 } }, "uni-swiper__dots-indexes": { "": { "justifyContent": "center", "alignItems": "center" } }, "uni-swiper__dots-indexes-text": { "": { "color": "#ffffff", "fontSize": 12, "lineHeight": 14 } } }; +const _sfc_main$1 = { + name: "UniSwiperDot", + emits: ["clickItem"], + props: { + info: { + type: Array, + default() { + return []; + } + }, + current: { + type: Number, + default: 0 + }, + dotsStyles: { + type: Object, + default() { + return {}; + } + }, + mode: { + type: String, + default: "default" + }, + field: { + type: String, + default: "" + } + }, + data() { + return { + dots: { + width: 6, + height: 6, + bottom: 10, + color: "#fff", + backgroundColor: "rgba(0, 0, 0, .3)", + border: "1px rgba(0, 0, 0, .3) solid", + selectedBackgroundColor: "#333", + selectedBorder: "1px rgba(0, 0, 0, .9) solid" + } + }; + }, + watch: { + dotsStyles(newVal) { + this.dots = Object.assign(this.dots, this.dotsStyles); + }, + mode(newVal) { + if (newVal === "indexes") { + this.dots.width = 14; + this.dots.height = 14; + } else { + this.dots.width = 6; + this.dots.height = 6; + } + } + }, + created() { + if (this.mode === "indexes") { + this.dots.width = 12; + this.dots.height = 12; + } + this.dots = Object.assign(this.dots, this.dotsStyles); + }, + methods: { + clickItem(index) { + this.$emit("clickItem", index); + } + } +}; +function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("view", { class: "uni-swiper__warp" }, [ + renderSlot(_ctx.$slots, "default"), + $props.mode === "default" ? (openBlock(), createElementBlock("view", { + style: normalizeStyle({ "bottom": $data.dots.bottom + "px" }), + class: "uni-swiper__dots-box", + key: "default" + }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList($props.info, (item, index) => { + return openBlock(), createElementBlock("view", { + onClick: ($event) => $options.clickItem(index), + style: normalizeStyle({ + "width": (index === $props.current ? $data.dots.width * 2 : $data.dots.width) + "px", + "height": $data.dots.width / 2 + "px", + "background-color": index !== $props.current ? $data.dots.backgroundColor : $data.dots.selectedBackgroundColor, + "border-radius": "0px" + }), + key: index, + class: "uni-swiper__dots-item uni-swiper__dots-bar" + }, null, 12, ["onClick"]); + }), 128)) + ], 4)) : createCommentVNode("v-if", true), + $props.mode === "dot" ? (openBlock(), createElementBlock("view", { + style: normalizeStyle({ "bottom": $data.dots.bottom + "px" }), + class: "uni-swiper__dots-box", + key: "dot" + }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList($props.info, (item, index) => { + return openBlock(), createElementBlock("view", { + onClick: ($event) => $options.clickItem(index), + style: normalizeStyle({ + "width": $data.dots.width + "px", + "height": $data.dots.height + "px", + "background-color": index !== $props.current ? $data.dots.backgroundColor : $data.dots.selectedBackgroundColor, + "border": index !== $props.current ? $data.dots.border : $data.dots.selectedBorder + }), + key: index, + class: "uni-swiper__dots-item" + }, null, 12, ["onClick"]); + }), 128)) + ], 4)) : createCommentVNode("v-if", true), + $props.mode === "round" ? (openBlock(), createElementBlock("view", { + style: normalizeStyle({ "bottom": $data.dots.bottom + "px" }), + class: "uni-swiper__dots-box", + key: "round" + }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList($props.info, (item, index) => { + return openBlock(), createElementBlock("view", { + onClick: ($event) => $options.clickItem(index), + class: normalizeClass([[index === $props.current && "uni-swiper__dots-long"], "uni-swiper__dots-item"]), + style: normalizeStyle({ + "width": (index === $props.current ? $data.dots.width * 3 : $data.dots.width) + "px", + "height": $data.dots.height + "px", + "background-color": index !== $props.current ? $data.dots.backgroundColor : $data.dots.selectedBackgroundColor, + "border": index !== $props.current ? $data.dots.border : $data.dots.selectedBorder + }), + key: index + }, null, 14, ["onClick"]); + }), 128)) + ], 4)) : createCommentVNode("v-if", true), + $props.mode === "nav" ? (openBlock(), createElementBlock("view", { + key: "nav", + style: normalizeStyle({ "background-color": $props.dotsStyles.backgroundColor, "bottom": "0" }), + class: "uni-swiper__dots-box uni-swiper__dots-nav" + }, [ + createElementVNode("u-text", { + style: normalizeStyle({ "color": $props.dotsStyles.color }), + class: "uni-swiper__dots-nav-item" + }, toDisplayString($props.current + 1 + "/" + $props.info.length + " " + $props.info[$props.current][$props.field]), 5) + ], 4)) : createCommentVNode("v-if", true), + $props.mode === "indexes" ? (openBlock(), createElementBlock("view", { + key: "indexes", + style: normalizeStyle({ "bottom": $data.dots.bottom + "px" }), + class: "uni-swiper__dots-box" + }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList($props.info, (item, index) => { + return openBlock(), createElementBlock("view", { + onClick: ($event) => $options.clickItem(index), + style: normalizeStyle({ + "width": $data.dots.width + "px", + "height": $data.dots.height + "px", + "color": index === $props.current ? $data.dots.selectedColor : $data.dots.color, + "background-color": index !== $props.current ? $data.dots.backgroundColor : $data.dots.selectedBackgroundColor, + "border": index !== $props.current ? $data.dots.border : $data.dots.selectedBorder + }), + key: index, + class: "uni-swiper__dots-item uni-swiper__dots-indexes" + }, [ + createElementVNode("u-text", { class: "uni-swiper__dots-indexes-text" }, toDisplayString(index + 1), 1) + ], 12, ["onClick"]); + }), 128)) + ], 4)) : createCommentVNode("v-if", true) + ]); +} +var __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["styles", [_style_0$1]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-swiper-dot/components/uni-swiper-dot/uni-swiper-dot.vue"]]); +var _style_0 = { "swiper-box": { "": { "height": 200 } }, "swiper-item": { "": { "flexDirection": "column", "justifyContent": "center", "alignItems": "center", "height": 200, "color": "#ffffff" } }, "swiper-item0": { "": { "backgroundColor": "#cee1fd" } }, "swiper-item1": { "": { "backgroundColor": "#b2cef7" } }, "swiper-item2": { "": { "backgroundColor": "#cee1fd" } }, "image": { "": { "width": "750rpx" } }, "uni-bg-red": { "": { "backgroundColor": "#ff5a5f" } }, "uni-bg-green": { "": { "backgroundColor": "#09bb07" } }, "uni-bg-blue": { "": { "backgroundColor": "#007aff" } }, "example-body": { "": { "flexDirection": "row", "paddingTop": "20rpx", "paddingRight": "20rpx", "paddingBottom": "20rpx", "paddingLeft": "20rpx" } }, "example-body-item": { "": { "flexDirection": "row", "justifyContent": "center", "alignItems": "center", "marginTop": "15rpx", "marginRight": "15rpx", "marginBottom": "15rpx", "marginLeft": "15rpx", "paddingTop": "15rpx", "paddingRight": "15rpx", "paddingBottom": "15rpx", "paddingLeft": "15rpx", "height": "60rpx", "flex": 1, "borderColor": "#e5e5e5", "borderStyle": "solid", "borderWidth": 1, "borderRadius": 5 } }, "example-body-item-text": { "": { "fontSize": "28rpx", "color": "#333333" } }, "example-body-dots": { "": { "width": "16rpx", "height": "16rpx", "borderRadius": 50, "backgroundColor": "#333333", "marginLeft": "10rpx" } }, "active": { "": { "borderStyle": "solid", "borderColor": "#007aff", "borderWidth": 1 } }, "@FONT-FACE": [{ "uni-swiper-dot-box": { "": { "width": 400, "marginTop": 8 } }, "image": { "": { "width": 100 } } }] }; +const _sfc_main = { + components: {}, + data() { + return { + info: [ + { + colorClass: "uni-bg-red", + url: "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/094a9dc0-50c0-11eb-b680-7980c8a877b8.jpg", + content: "\u5185\u5BB9 A" + }, + { + colorClass: "uni-bg-green", + url: "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/094a9dc0-50c0-11eb-b680-7980c8a877b8.jpg", + content: "\u5185\u5BB9 B" + }, + { + colorClass: "uni-bg-blue", + url: "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/094a9dc0-50c0-11eb-b680-7980c8a877b8.jpg", + content: "\u5185\u5BB9 C" + } + ], + dotStyle: [ + { + backgroundColor: "rgba(0, 0, 0, .3)", + border: "1px rgba(0, 0, 0, .3) solid", + color: "#fff", + selectedBackgroundColor: "rgba(0, 0, 0, .9)", + selectedBorder: "1px rgba(0, 0, 0, .9) solid" + }, + { + backgroundColor: "rgba(255, 90, 95,0.3)", + border: "1px rgba(255, 90, 95,0.3) solid", + color: "#fff", + selectedBackgroundColor: "rgba(255, 90, 95,0.9)", + selectedBorder: "1px rgba(255, 90, 95,0.9) solid" + }, + { + backgroundColor: "rgba(83, 200, 249,0.3)", + border: "1px rgba(83, 200, 249,0.3) solid", + color: "#fff", + selectedBackgroundColor: "rgba(83, 200, 249,0.9)", + selectedBorder: "1px rgba(83, 200, 249,0.9) solid" + } + ], + modeIndex: -1, + styleIndex: -1, + current: 0, + mode: "default", + dotsStyles: {}, + swiperDotIndex: 0 + }; + }, + onLoad() { + }, + methods: { + change(e) { + this.current = e.detail.current; + }, + selectStyle(index) { + this.dotsStyles = this.dotStyle[index]; + this.styleIndex = index; + }, + selectMode(mode, index) { + this.mode = mode; + this.modeIndex = index; + this.styleIndex = -1; + this.dotsStyles = this.dotStyle[0]; + }, + clickItem(e) { + this.swiperDotIndex = e; + }, + onBanner(index) { + formatAppLog("log", "at pages/extUI/swiper-dot/swiper-dot.nvue:124", 22222, index); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_swiper_item = resolveComponent("swiper-item"); + const _component_swiper = resolveComponent("swiper"); + const _component_uni_swiper_dot = resolveEasycom(resolveDynamicComponent("uni-swiper-dot"), __easycom_0); + const _component_uni_section = resolveEasycom(resolveDynamicComponent("uni-section"), __easycom_2); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "content" }, [ + createVNode(_component_uni_swiper_dot, { + class: "uni-swiper-dot-box", + onClickItem: $options.clickItem, + info: $data.info, + current: $data.current, + mode: $data.mode, + "dots-styles": $data.dotsStyles, + field: "content" + }, { + default: withCtx(() => [ + createVNode(_component_swiper, { + class: "swiper-box", + onChange: $options.change, + current: $data.swiperDotIndex + }, { + default: withCtx(() => [ + (openBlock(), createElementBlock(Fragment, null, renderList(3, (item, index) => { + return createVNode(_component_swiper_item, { key: index }, { + default: withCtx(() => [ + createElementVNode("view", { + class: normalizeClass(["swiper-item", "swiper-item" + index]) + }, [ + createElementVNode("u-text", { style: { "color": "#fff", "font-size": "32px" } }, toDisplayString(index + 1), 1) + ], 2) + ]), + _: 2 + }, 1024); + }), 64)) + ]), + _: 1 + }, 8, ["onChange", "current"]) + ]), + _: 1 + }, 8, ["onClickItem", "info", "current", "mode", "dots-styles"]), + createVNode(_component_uni_section, { + title: "\u6A21\u5F0F\u9009\u62E9", + type: "line" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "example-body" }, [ + createElementVNode("view", { + class: normalizeClass([{ active: $data.modeIndex === 0 }, "example-body-item"]), + onClick: _cache[0] || (_cache[0] = ($event) => $options.selectMode("default", 0)) + }, [ + createElementVNode("u-text", { class: "example-body-item-text" }, "default") + ], 2), + createElementVNode("view", { + class: normalizeClass([{ active: $data.modeIndex === 1 }, "example-body-item"]), + onClick: _cache[1] || (_cache[1] = ($event) => $options.selectMode("dot", 1)) + }, [ + createElementVNode("u-text", { class: "example-body-item-text" }, "dot") + ], 2), + createElementVNode("view", { + class: normalizeClass([{ active: $data.modeIndex === 2 }, "example-body-item"]), + onClick: _cache[2] || (_cache[2] = ($event) => $options.selectMode("round", 2)) + }, [ + createElementVNode("u-text", { class: "example-body-item-text" }, "round") + ], 2), + createElementVNode("view", { + class: normalizeClass([{ active: $data.modeIndex === 3 }, "example-body-item"]), + onClick: _cache[3] || (_cache[3] = ($event) => $options.selectMode("nav", 3)) + }, [ + createElementVNode("u-text", { class: "example-body-item-text" }, "nav") + ], 2), + createElementVNode("view", { + class: normalizeClass([{ active: $data.modeIndex === 4 }, "example-body-item"]), + onClick: _cache[4] || (_cache[4] = ($event) => $options.selectMode("indexes", 4)) + }, [ + createElementVNode("u-text", { class: "example-body-item-text" }, "indexes") + ], 2) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u989C\u8272\u6837\u5F0F\u9009\u62E9", + type: "line" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "example-body" }, [ + $data.mode !== "nav" ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList($data.dotStyle, (item, index) => { + return openBlock(), createElementBlock("view", { + class: normalizeClass([{ active: $data.styleIndex === index }, "example-body-item"]), + key: index, + onClick: ($event) => $options.selectStyle(index) + }, [ + createElementVNode("view", { + style: normalizeStyle({ "background-color": item.selectedBackgroundColor, border: item.selectedBorder }), + class: "example-body-dots" + }, null, 4), + createElementVNode("view", { + style: normalizeStyle({ "background-color": item.backgroundColor, border: item.border }), + class: "example-body-dots" + }, null, 4), + createElementVNode("view", { + style: normalizeStyle({ "background-color": item.backgroundColor, border: item.border }), + class: "example-body-dots" + }, null, 4) + ], 10, ["onClick"]); + }), 128)) : createCommentVNode("v-if", true), + $data.mode === "nav" ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList($data.dotStyle, (item, index) => { + return openBlock(), createElementBlock("view", { + class: normalizeClass([{ active: $data.styleIndex === index }, "example-body-item"]), + key: index, + style: normalizeStyle({ "background-color": item.selectedBackgroundColor }), + onClick: ($event) => $options.selectStyle(index) + }, [ + createElementVNode("u-text", { + class: "example-body-item-text", + style: normalizeStyle({ color: item.color }) + }, "\u5185\u5BB9", 4) + ], 14, ["onClick"]); + }), 128)) : createCommentVNode("v-if", true) + ]) + ]), + _: 1 + }) + ]) + ]); +} +var swiperDot = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/extUI/swiper-dot/swiper-dot.nvue"]]); +export { swiperDot as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/tag/tag.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/tag/tag.js new file mode 100644 index 000000000..44812e108 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/extUI/tag/tag.js @@ -0,0 +1,385 @@ +import { _ as __easycom_0 } from "../../../uni-card.js"; +import { openBlock, createElementBlock, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, resolveDynamicComponent, createElementVNode, createVNode, withCtx } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import { _ as __easycom_2 } from "../../../uni-section.js"; +import "../../../shared.esm-bundler.js"; +var _style_0$1 = { "uni-tag": { "": { "lineHeight": 14, "fontSize": 12, "fontWeight": "200", "paddingTop": 4, "paddingRight": 7, "paddingBottom": 4, "paddingLeft": 7, "color": "#ffffff", "borderRadius": 3, "backgroundColor": "#8f939c", "borderWidth": "1rpx", "borderStyle": "solid", "borderColor": "#8f939c" } }, "uni-tag--default": { "": { "fontSize": 12 } }, "uni-tag--default--inverted": { "": { "color": "#8f939c", "borderColor": "#8f939c" } }, "uni-tag--small": { "": { "paddingTop": 2, "paddingRight": 5, "paddingBottom": 2, "paddingLeft": 5, "fontSize": 12, "borderRadius": 2 } }, "uni-tag--mini": { "": { "paddingTop": 1, "paddingRight": 3, "paddingBottom": 1, "paddingLeft": 3, "fontSize": 12, "borderRadius": 2 } }, "uni-tag--primary": { "": { "backgroundColor": "#2979ff", "borderColor": "#2979ff", "color": "#ffffff" } }, "uni-tag--success": { "": { "color": "#ffffff", "backgroundColor": "#18bc37", "borderColor": "#18bc37" } }, "uni-tag--warning": { "": { "color": "#ffffff", "backgroundColor": "#f3a73f", "borderColor": "#f3a73f" } }, "uni-tag--error": { "": { "color": "#ffffff", "backgroundColor": "#e43d33", "borderColor": "#e43d33" } }, "uni-tag--primary--inverted": { "": { "color": "#2979ff", "borderColor": "#2979ff" } }, "uni-tag--success--inverted": { "": { "color": "#18bc37", "borderColor": "#18bc37" } }, "uni-tag--warning--inverted": { "": { "color": "#f3a73f", "borderColor": "#f3a73f" } }, "uni-tag--error--inverted": { "": { "color": "#e43d33", "borderColor": "#e43d33" } }, "uni-tag--inverted": { "": { "backgroundColor": "#ffffff" } }, "uni-tag--circle": { "": { "!borderRadius": 15 } }, "uni-tag--mark": { "": { "!borderTopLeftRadius": 0, "!borderBottomLeftRadius": 0, "!borderTopRightRadius": 15, "!borderBottomRightRadius": 15 } }, "uni-tag--disabled": { "": { "opacity": 0.5 } }, "uni-tag-text": { "": { "color": "#ffffff", "fontSize": 14 } }, "uni-tag-text--primary": { "": { "color": "#2979ff" } }, "uni-tag-text--success": { "": { "color": "#18bc37" } }, "uni-tag-text--warning": { "": { "color": "#f3a73f" } }, "uni-tag-text--error": { "": { "color": "#e43d33" } }, "uni-tag-text--small": { "": { "fontSize": 12 } } }; +const _sfc_main$1 = { + name: "UniTag", + emits: ["click"], + props: { + type: { + type: String, + default: "default" + }, + size: { + type: String, + default: "normal" + }, + text: { + type: String, + default: "" + }, + disabled: { + type: [Boolean, String], + default: false + }, + inverted: { + type: [Boolean, String], + default: false + }, + circle: { + type: [Boolean, String], + default: false + }, + mark: { + type: [Boolean, String], + default: false + }, + customStyle: { + type: String, + default: "" + } + }, + computed: { + classes() { + const { + type, + disabled, + inverted, + circle, + mark, + size, + isTrue + } = this; + const classArr = [ + "uni-tag--" + type, + "uni-tag--" + size, + isTrue(disabled) ? "uni-tag--disabled" : "", + isTrue(inverted) ? "uni-tag--" + type + "--inverted" : "", + isTrue(circle) ? "uni-tag--circle" : "", + isTrue(mark) ? "uni-tag--mark" : "", + isTrue(inverted) ? "uni-tag--inverted uni-tag-text--" + type : "", + size === "small" ? "uni-tag-text--small" : "" + ]; + return classArr.join(" "); + } + }, + methods: { + isTrue(value) { + return value === true || value === "true"; + }, + onClick() { + if (this.isTrue(this.disabled)) + return; + this.$emit("click"); + } + } +}; +function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { + return $props.text ? (openBlock(), createElementBlock("u-text", { + key: 0, + class: normalizeClass(["uni-tag", $options.classes]), + style: normalizeStyle($props.customStyle), + onClick: _cache[0] || (_cache[0] = (...args) => $options.onClick && $options.onClick(...args)) + }, toDisplayString($props.text), 7)) : createCommentVNode("v-if", true); +} +var __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["styles", [_style_0$1]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-tag/components/uni-tag/uni-tag.vue"]]); +var _style_0 = { "example-body": { "": { "flexDirection": "row", "justifyContent": "flex-start", "alignItems": "flex-end", "flexWrap": "wrap" } }, "tag-view": { "": { "marginRight": 10 } } }; +const _sfc_main = { + components: {}, + data() { + return { + type: "default", + inverted: false + }; + }, + methods: { + setType() { + let types = ["default", "primary", "success", "warning", "error"]; + let index = types.indexOf(this.type); + types.splice(index, 1); + let randomIndex = Math.floor(Math.random() * 4); + this.type = types[randomIndex]; + }, + setInverted() { + this.inverted = !this.inverted; + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_card = resolveEasycom(resolveDynamicComponent("uni-card"), __easycom_0); + const _component_uni_tag = resolveEasycom(resolveDynamicComponent("uni-tag"), __easycom_1); + const _component_uni_section = resolveEasycom(resolveDynamicComponent("uni-section"), __easycom_2); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "container" }, [ + createVNode(_component_uni_card, { "is-full": "" }, { + default: withCtx(() => [ + createElementVNode("u-text", { class: "uni-h6" }, "\u6807\u7B7E\u7EC4\u4EF6\u591A\u7528\u4E8E\u5546\u54C1\u5206\u7C7B\u3001\u91CD\u70B9\u5185\u5BB9\u663E\u793A\u7B49\u573A\u666F\u3002") + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u5B9E\u5FC3\u6807\u7B7E", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "example-body" }, [ + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + text: "\u6807\u7B7E", + type: "primary" + }) + ]), + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + text: "\u6807\u7B7E", + type: "success" + }) + ]), + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + text: "\u6807\u7B7E", + type: "warning" + }) + ]), + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + text: "\u6807\u7B7E", + type: "error" + }) + ]), + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { text: "\u6807\u7B7E" }) + ]) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u7A7A\u5FC3\u6807\u7B7E", + subTitle: "\u4F7F\u7528 inverted \u5C5E\u6027\u663E\u793A\u7A7A\u5FC3\u8868\u7B7E", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "example-body" }, [ + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + inverted: true, + text: "\u6807\u7B7E", + type: "primary" + }) + ]), + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + inverted: true, + text: "\u6807\u7B7E", + type: "success" + }) + ]), + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + inverted: true, + text: "\u6807\u7B7E", + type: "warning" + }) + ]), + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + inverted: true, + text: "\u6807\u7B7E", + type: "error" + }) + ]), + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + inverted: true, + text: "\u6807\u7B7E" + }) + ]) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u6807\u7B7E\u5C3A\u5BF8", + subTitle: "\u4F7F\u7528 size \u5C5E\u6027\u63A7\u5236\u6807\u7B7E\u5927\u5C0F", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "example-body" }, [ + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + text: "\u6807\u7B7E", + type: "primary", + size: "normal" + }) + ]), + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + text: "\u6807\u7B7E", + type: "primary", + size: "small" + }) + ]), + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + text: "\u6807\u7B7E", + type: "primary", + size: "mini" + }) + ]) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u5706\u89D2\u6837\u5F0F", + subTitle: "\u4F7F\u7528 circle \u5C5E\u6027\u63A7\u5236\u6807\u7B7E\u5706\u89D2", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "example-body" }, [ + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + circle: true, + text: "\u6807\u7B7E", + type: "primary" + }) + ]), + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + circle: true, + text: "\u6807\u7B7E", + type: "primary", + size: "small" + }) + ]), + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + circle: true, + text: "\u6807\u7B7E", + type: "primary", + size: "mini" + }) + ]) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u6807\u8BB0\u6837\u5F0F", + subTitle: "\u4F7F\u7528 mark \u5C5E\u6027\u663E\u793A\u6807\u8BB0\u6837\u5F0F", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "example-body" }, [ + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + mark: true, + text: "\u6807\u7B7E", + type: "primary", + size: "default" + }) + ]), + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + mark: true, + text: "\u6807\u7B7E", + type: "primary", + size: "small" + }) + ]), + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + mark: true, + text: "\u6807\u7B7E", + type: "primary", + size: "mini" + }) + ]) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u4E0D\u53EF\u70B9\u51FB\u72B6\u6001", + subTitle: "\u4F7F\u7528 disabled \u5C5E\u6027 \u663E\u793A\u7981\u7528\u6837\u5F0F", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "example-body" }, [ + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + disabled: "", + text: "\u6807\u7B7E", + type: "primary" + }) + ]) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u81EA\u5B9A\u4E49\u6837\u5F0F", + subTitle: "\u4F7F\u7528 custom-style \u5C5E\u6027\u81EA\u5B9A\u4E49\u6837\u5F0F", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "example-body" }, [ + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + text: "\u81EA\u5B9A\u4E49\u6807\u7B7E\u6837\u5F0F", + "custom-style": "background-color: #4335d6; border-color: #4335d6; color: #fff;" + }) + ]) + ]) + ]), + _: 1 + }), + createVNode(_component_uni_section, { + title: "\u70B9\u51FB\u4E8B\u4EF6", + type: "line", + padding: "" + }, { + default: withCtx(() => [ + createElementVNode("view", { class: "example-body" }, [ + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + type: $data.type, + text: "\u6807\u7B7E", + onClick: $options.setType + }, null, 8, ["type", "onClick"]) + ]), + createElementVNode("view", { class: "tag-view" }, [ + createVNode(_component_uni_tag, { + circle: true, + inverted: $data.inverted, + text: "\u6807\u7B7E", + type: "primary", + onClick: $options.setInverted + }, null, 8, ["inverted", "onClick"]) + ]) + ]) + ]), + _: 1 + }) + ]) + ]); +} +var tag = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/extUI/tag/tag.nvue"]]); +export { tag as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/tabBar/API/API.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/tabBar/API/API.js new file mode 100644 index 000000000..5bff463b0 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/tabBar/API/API.js @@ -0,0 +1,670 @@ +import { _ as __easycom_0$1 } from "../../../u-link.js"; +import { openBlock, createElementBlock, createElementVNode, toDisplayString, resolveDynamicComponent, resolveComponent, createVNode, withCtx, createTextVNode, createBlock, Fragment, createCommentVNode, renderList, normalizeClass } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import "../../../shared.esm-bundler.js"; +const _sfc_main$2 = { + name: "page-head", + props: { + title: { + type: String, + default: "" + } + } +}; +function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("view", { class: "common-page-head" }, [ + createElementVNode("view", { class: "common-page-head-title" }, [ + createElementVNode("u-text", null, toDisplayString($props.title), 1) + ]) + ]); +} +var __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/components/page-head/page-head.vue"]]); +var _style_0$1 = { "button": { "": { "marginTop": "30rpx", "marginLeft": 0, "marginRight": 0 } }, "btn-area": { "": { "paddingTop": "30rpx" } } }; +const _sfc_main$1 = { + data() { + return { + title: "tababr", + hasSetTabBarBadge: false, + hasShownTabBarRedDot: false, + hasCustomedStyle: false, + hasCustomedItem: false, + hasHiddenTabBar: false + }; + }, + destroyed() { + if (this.hasSetTabBarBadge) { + uni.removeTabBarBadge({ + index: 1 + }); + } + if (this.hasShownTabBarRedDot) { + uni.hideTabBarRedDot({ + index: 1 + }); + } + if (this.hasHiddenTabBar) { + uni.showTabBar(); + } + if (this.hasCustomedStyle) { + uni.setTabBarStyle({ + color: "#7A7E83", + selectedColor: "#007AFF", + backgroundColor: "#F8F8F8", + borderStyle: "black" + }); + } + if (this.hasCustomedItem) { + let tabBarOptions = { + index: 1, + text: "\u63A5\u53E3", + iconPath: "/static/api.png", + selectedIconPath: "/static/apiHL.png" + }; + uni.setTabBarItem(tabBarOptions); + } + }, + methods: { + navigateBack() { + this.$emit("unmount"); + }, + setTabBarBadge() { + if (this.hasShownTabBarRedDot) { + uni.hideTabBarRedDot({ + index: 1 + }); + this.hasShownTabBarRedDot = !this.hasShownTabBarRedDot; + } + if (!this.hasSetTabBarBadge) { + uni.setTabBarBadge({ + index: 1, + text: "1" + }); + } else { + uni.removeTabBarBadge({ + index: 1 + }); + } + this.hasSetTabBarBadge = !this.hasSetTabBarBadge; + }, + showTabBarRedDot() { + if (this.hasSetTabBarBadge) { + uni.removeTabBarBadge({ + index: 1 + }); + this.hasSetTabBarBadge = !this.hasSetTabBarBadge; + } + if (!this.hasShownTabBarRedDot) { + uni.showTabBarRedDot({ + index: 1 + }); + } else { + uni.hideTabBarRedDot({ + index: 1 + }); + } + this.hasShownTabBarRedDot = !this.hasShownTabBarRedDot; + }, + hideTabBar() { + if (!this.hasHiddenTabBar) { + uni.hideTabBar(); + } else { + uni.showTabBar(); + } + this.hasHiddenTabBar = !this.hasHiddenTabBar; + }, + customStyle() { + if (this.hasCustomedStyle) { + uni.setTabBarStyle({ + color: "#7A7E83", + selectedColor: "#007AFF", + backgroundColor: "#F8F8F8", + borderStyle: "black" + }); + } else { + uni.setTabBarStyle({ + color: "#FFF", + selectedColor: "#007AFF", + backgroundColor: "#000000", + borderStyle: "black" + }); + } + this.hasCustomedStyle = !this.hasCustomedStyle; + }, + customItem() { + let tabBarOptions = { + index: 1, + text: "\u63A5\u53E3", + iconPath: "/static/api.png", + selectedIconPath: "/static/apiHL.png" + }; + if (this.hasCustomedItem) { + uni.setTabBarItem(tabBarOptions); + } else { + tabBarOptions.text = "API"; + uni.setTabBarItem(tabBarOptions); + } + this.hasCustomedItem = !this.hasCustomedItem; + } + } +}; +function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { + const _component_page_head = resolveEasycom(resolveDynamicComponent("page-head"), __easycom_0); + const _component_button = resolveComponent("button"); + return openBlock(), createElementBlock("view", { class: "uni-padding-wrap" }, [ + createVNode(_component_page_head, { title: $data.title }, null, 8, ["title"]), + createVNode(_component_button, { + class: "button", + onClick: $options.setTabBarBadge + }, { + default: withCtx(() => [ + createTextVNode(toDisplayString(!$data.hasSetTabBarBadge ? "\u8BBE\u7F6Etab\u5FBD\u6807" : "\u79FB\u9664tab\u5FBD\u6807"), 1) + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "button", + onClick: $options.showTabBarRedDot + }, { + default: withCtx(() => [ + createTextVNode(toDisplayString(!$data.hasShownTabBarRedDot ? "\u663E\u793A\u7EA2\u70B9" : "\u79FB\u9664\u7EA2\u70B9"), 1) + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "button", + onClick: $options.customStyle + }, { + default: withCtx(() => [ + createTextVNode(toDisplayString(!$data.hasCustomedStyle ? "\u81EA\u5B9A\u4E49Tab\u6837\u5F0F" : "\u79FB\u9664\u81EA\u5B9A\u4E49\u6837\u5F0F"), 1) + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "button", + onClick: $options.customItem + }, { + default: withCtx(() => [ + createTextVNode(toDisplayString(!$data.hasCustomedItem ? "\u81EA\u5B9A\u4E49Tab\u4FE1\u606F" : "\u79FB\u9664\u81EA\u5B9A\u4E49\u4FE1\u606F"), 1) + ]), + _: 1 + }, 8, ["onClick"]), + createVNode(_component_button, { + class: "button", + onClick: $options.hideTabBar + }, { + default: withCtx(() => [ + createTextVNode(toDisplayString(!$data.hasHiddenTabBar ? "\u9690\u85CFTabBar" : "\u663E\u793ATabBar"), 1) + ]), + _: 1 + }, 8, ["onClick"]), + createElementVNode("view", { class: "btn-area" }, [ + createVNode(_component_button, { + class: "button", + type: "primary", + onClick: $options.navigateBack + }, { + default: withCtx(() => [ + createTextVNode("\u8FD4\u56DE\u4E0A\u4E00\u7EA7") + ]), + _: 1 + }, 8, ["onClick"]) + ]) + ]); +} +var setTabBar = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["styles", [_style_0$1]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/components/api-set-tabbar.nvue"]]); +var _style_0 = { "uni-icon": { "": { "fontFamily": "uniicons", "fontWeight": "normal" } }, "uni-container": { "": { "paddingTop": 15, "paddingRight": 15, "paddingBottom": 15, "paddingLeft": 15, "backgroundColor": "#f8f8f8" } }, "uni-header-logo": { "": { "paddingTop": 15, "paddingRight": 15, "paddingBottom": 15, "paddingLeft": 15, "flexDirection": "column", "justifyContent": "center", "alignItems": "center", "marginTop": "10rpx" } }, "uni-header-image": { "": { "width": 80, "height": 80 } }, "uni-hello-text": { "": { "marginBottom": 20 } }, "hello-text": { "": { "color": "#7A7E83", "fontSize": 14, "lineHeight": 20 } }, "hello-link": { "": { "color": "#7A7E83", "fontSize": 14, "lineHeight": 20 } }, "uni-panel": { "": { "marginBottom": 12 } }, "uni-panel-h": { "": { "backgroundColor": "#ffffff", "!flexDirection": "row", "!alignItems": "center", "paddingTop": 12, "paddingRight": 12, "paddingBottom": 12, "paddingLeft": 12 } }, "uni-panel-h-on": { "": { "backgroundColor": "#f0f0f0" } }, "uni-panel-text": { "": { "flex": 1, "color": "#000000", "fontSize": 14, "fontWeight": "normal" } }, "uni-panel-icon": { "": { "marginLeft": 15, "color": "#999999", "fontSize": 14, "fontWeight": "normal", "transform": "rotate(0deg)", "transitionDuration": 0, "transitionProperty": "transform" } }, "uni-panel-icon-on": { "": { "transform": "rotate(180deg)" } }, "uni-navigate-item": { "": { "flexDirection": "row", "alignItems": "center", "backgroundColor": "#FFFFFF", "borderTopStyle": "solid", "borderTopColor": "#f0f0f0", "borderTopWidth": 1, "paddingTop": 12, "paddingRight": 12, "paddingBottom": 12, "paddingLeft": 12, "backgroundColor:active": "#f8f8f8" } }, "uni-navigate-text": { "": { "flex": 1, "color": "#000000", "fontSize": 14, "fontWeight": "normal" } }, "uni-navigate-icon": { "": { "marginLeft": 15, "color": "#999999", "fontSize": 14, "fontWeight": "normal" } }, "@TRANSITION": { "uni-panel-icon": { "duration": 0, "property": "transform" } } }; +const _sfc_main = { + components: { + setTabBar + }, + props: { + hasLeftWin: { + type: Boolean + }, + leftWinActive: { + type: String + } + }, + data() { + let mediaPages = [ + { + name: "\u56FE\u7247", + url: "image" + }, + { + name: "\u97F3\u9891", + url: "inner-audio" + }, + { + name: "\u5F55\u97F3", + url: "voice" + }, + { + name: "\u80CC\u666F\u97F3\u9891", + url: "background-audio" + }, + { + name: "\u89C6\u9891", + url: "video" + }, + { + name: "\u6587\u4EF6", + url: "file" + }, + { + name: "\u4FDD\u5B58\u5A92\u4F53\u5230\u672C\u5730", + url: "save-media" + } + ]; + const list = [ + { + id: "page", + name: "\u754C\u9762", + open: false, + pages: [ + { + name: "\u8BBE\u7F6E\u5BFC\u822A\u6761", + url: "set-navigation-bar-title" + }, + { + name: "\u539F\u751F\u5B50\u7A97\u4F53", + url: "subnvue" + }, + { + name: "\u9875\u9762\u8DF3\u8F6C", + url: "navigator" + }, + { + name: "\u8BBE\u7F6ETabBar", + url: "set-tabbar" + }, + { + name: "\u4E0B\u62C9\u5237\u65B0", + url: "pull-down-refresh" + }, + { + name: "\u521B\u5EFA\u52A8\u753B", + url: "animation" + }, + { + name: "\u521B\u5EFA\u7ED8\u753B", + url: "canvas" + }, + { + name: "\u8282\u70B9\u4FE1\u606F", + url: "get-node-info" + }, + { + name: "\u8282\u70B9\u5E03\u5C40\u4EA4\u4E92\u72B6\u6001", + url: "intersection-observer" + }, + { + name: "\u663E\u793A\u64CD\u4F5C\u83DC\u5355", + url: "action-sheet" + }, + { + name: "\u663E\u793A\u6A21\u6001\u5F39\u7A97", + url: "modal" + }, + { + name: "\u663E\u793A\u52A0\u8F7D\u63D0\u793A\u6846", + url: "show-loading" + }, + { + name: "\u663E\u793A\u6D88\u606F\u63D0\u793A\u6846", + url: "toast" + } + ] + }, + { + id: "device", + name: "\u8BBE\u5907", + open: false, + pages: [ + { + name: "\u83B7\u53D6\u8BBE\u5907\u7F51\u7EDC\u72B6\u6001", + url: "get-network-type" + }, + { + name: "\u83B7\u53D6\u8BBE\u5907\u7CFB\u7EDF\u4FE1\u606F", + url: "get-system-info" + }, + { + name: "\u6253\u7535\u8BDD", + url: "make-phone-call" + }, + { + name: "\u9707\u52A8", + url: "vibrate" + }, + { + name: "\u6DFB\u52A0\u624B\u673A\u8054\u7CFB\u4EBA", + url: "add-phone-contact" + }, + { + name: "\u626B\u7801", + url: "scan-code" + }, + { + name: "\u526A\u8D34\u677F", + url: "clipboard" + }, + { + name: "\u5C4F\u5E55\u4EAE\u5EA6", + url: "brightness" + }, + { + name: "\u84DD\u7259", + url: "bluetooth" + }, + { + name: "\u751F\u7269\u8BA4\u8BC1", + url: "soter" + }, + { + name: "iBeacon", + url: "ibeacon" + }, + { + name: "\u76D1\u542C\u52A0\u901F\u5EA6\u4F20\u611F\u5668", + url: "on-accelerometer-change" + }, + { + name: "\u76D1\u542C\u7F57\u76D8\u6570\u636E", + url: "on-compass-change" + }, + { + name: "\u76D1\u542C\u8DDD\u79BB\u4F20\u611F\u5668", + url: "/platforms/app-plus/proximity/proximity" + }, + { + name: "\u76D1\u542C\u65B9\u5411\u4F20\u611F\u5668", + url: "/platforms/app-plus/orientation/orientation" + } + ] + }, + { + id: "network", + name: "\u7F51\u7EDC", + open: false, + pages: [ + { + name: "\u53D1\u8D77\u4E00\u4E2A\u8BF7\u6C42", + url: "request" + }, + { + name: "\u4E0A\u4F20\u6587\u4EF6", + url: "upload-file" + }, + { + name: "\u4E0B\u8F7D\u6587\u4EF6", + url: "download-file" + } + ] + }, + { + id: "websocket", + name: "websocket", + open: false, + pages: [ + { + name: "socketTask", + url: "websocket-socketTask" + }, + { + name: "\u5168\u5C40websocket", + url: "websocket-global" + } + ] + }, + { + id: "media", + name: "\u5A92\u4F53", + open: false, + pages: mediaPages + }, + { + id: "location", + name: "\u4F4D\u7F6E", + open: false, + pages: [ + { + name: "\u83B7\u53D6\u5F53\u524D\u4F4D\u7F6E", + url: "get-location" + }, + { + name: "\u4F7F\u7528\u5730\u56FE\u67E5\u770B\u4F4D\u7F6E", + url: "open-location" + }, + { + name: "\u4F7F\u7528\u5730\u56FE\u9009\u62E9\u4F4D\u7F6E", + url: "choose-location" + }, + { + name: "\u5730\u56FE\u63A7\u5236", + url: "map" + }, + { + name: "\u5730\u56FE\u641C\u7D22", + url: "map-search" + } + ] + }, + { + id: "storage", + name: "\u6570\u636E", + open: false, + pages: [ + { + name: "\u6570\u636E\u5B58\u50A8\uFF08key-value\uFF09", + url: "storage" + }, + { + name: "SQLite", + url: "sqlite" + } + ] + }, + { + url: "rewarded-video-ad", + name: "\u6FC0\u52B1\u89C6\u9891\u5E7F\u544A", + open: false + }, + { + url: "full-screen-video-ad", + name: "\u5168\u5C4F\u89C6\u9891\u5E7F\u544A", + open: false + }, + { + id: "login", + name: "\u767B\u5F55", + open: false, + pages: [ + { + name: "\u767B\u5F55", + url: "login" + }, + { + name: "\u83B7\u53D6\u7528\u6237\u4FE1\u606F", + url: "get-user-info" + } + ] + }, + { + id: "share", + name: "\u5206\u4EAB", + open: false, + pages: [{ + name: "\u5206\u4EAB", + url: "share" + }] + }, + { + id: "payment", + name: "\u652F\u4ED8", + open: false, + pages: [{ + name: "\u53D1\u8D77\u652F\u4ED8", + url: "request-payment" + }] + }, + { + id: "speech", + name: "\u8BED\u97F3", + open: false, + pages: [{ + name: "\u8BED\u97F3\u8BC6\u522B", + url: "/platforms/app-plus/speech/speech" + }] + }, + { + id: "push", + name: "\u63A8\u9001", + open: false, + pages: [{ + name: "\u63A8\u9001", + url: "/platforms/app-plus/push/push" + }] + } + ]; + return { + showSetTabBarPage: false, + list, + notForPc: [{ + name: "\u8BBE\u7F6ETabBar", + url: "set-tabbar" + }] + }; + }, + onShareAppMessage() { + return { + title: "\u6B22\u8FCE\u4F53\u9A8Cuni-app", + path: "/pages/tabBar/API/API" + }; + }, + onNavigationBarButtonTap(e) { + uni.navigateTo({ + url: "/pages/about/about" + }); + }, + onLoad() { + }, + onReady() { + }, + onShow() { + this.navigateFlag = false; + this.leaveSetTabBarPage(); + }, + onHide() { + this.leaveSetTabBarPage(); + }, + methods: { + triggerCollapse(e, id) { + if (!this.list[e].pages) { + this.goDetailPage("", this.list[e].url); + return; + } + for (var i = 0; i < this.list.length; ++i) { + if (e === i) { + this.list[i].open = !this.list[i].open; + } else { + this.list[i].open = false; + } + } + }, + goDetailPage(panel, e) { + if (e === "set-tabbar") { + this.showSetTabBarPage = true; + return; + } + let url = ~e.indexOf("platform") ? e : "/pages/API/" + e + "/" + e; + if (this.hasLeftWin) { + uni.reLaunch({ + url + }); + } else { + uni.navigateTo({ + url + }); + } + }, + leaveSetTabBarPage() { + this.showSetTabBarPage = false; + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_set_tab_bar = resolveComponent("set-tab-bar"); + const _component_u_link = resolveEasycom(resolveDynamicComponent("u-link"), __easycom_0$1); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "uni-container" }, [ + $data.showSetTabBarPage ? (openBlock(), createBlock(_component_set_tab_bar, { + key: 0, + onUnmount: $options.leaveSetTabBarPage + }, null, 8, ["onUnmount"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [ + !$props.hasLeftWin ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-header-logo" + }, [ + createElementVNode("u-image", { + class: "uni-header-image", + src: "/static/apiIndex.png" + }) + ])) : createCommentVNode("v-if", true), + !$props.hasLeftWin ? (openBlock(), createElementBlock("view", { + key: 1, + class: "uni-hello-text" + }, [ + createElementVNode("u-text", { class: "hello-text" }, "\u4EE5\u4E0B\u5C06\u6F14\u793Auni-app\u63A5\u53E3\u80FD\u529B\uFF0C\u8BE6\u7EC6\u6587\u6863\u89C1\uFF1A"), + createVNode(_component_u_link, { + class: "hello-link", + href: "https://uniapp.dcloud.io/api/", + text: "https://uniapp.dcloud.io/api/", + inWhiteList: true + }, null, 8, ["href", "text"]) + ])) : createCommentVNode("v-if", true), + (openBlock(true), createElementBlock(Fragment, null, renderList($data.list, (item, index) => { + return openBlock(), createElementBlock("view", { + class: "uni-panel", + key: item.id + }, [ + createElementVNode("view", { + class: normalizeClass(["uni-panel-h", item.open ? "uni-panel-h-on" : ""]), + onClick: ($event) => $options.triggerCollapse(index, item.id) + }, [ + createElementVNode("u-text", { class: "uni-panel-text" }, toDisplayString(item.name), 1), + createElementVNode("u-text", { + class: normalizeClass(["uni-panel-icon uni-icon", item.open ? "uni-panel-icon-on" : ""]) + }, toDisplayString(item.pages ? "\uE581" : "\uE470"), 3) + ], 10, ["onClick"]), + item.open ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-panel-c" + }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList(item.pages, (item2, key) => { + return openBlock(), createElementBlock("view", { + class: normalizeClass([{ "left-win-active": $props.leftWinActive === item2.url && $props.hasLeftWin, "pc-hide": item2.name === "\u8BBE\u7F6ETabBar" && $props.hasLeftWin }, "uni-navigate-item"]), + key, + url: item.url, + onClick: ($event) => $options.goDetailPage(item.id, item2.url) + }, [ + createElementVNode("u-text", { class: "uni-navigate-text" }, toDisplayString(item2.name ? item2.name : item2), 1), + createElementVNode("u-text", { class: "uni-navigate-icon uni-icon" }, "\uE470") + ], 10, ["url", "onClick"]); + }), 128)) + ])) : createCommentVNode("v-if", true) + ]); + }), 128)) + ], 64)) + ]) + ]); +} +var API = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/tabBar/API/API.nvue"]]); +export { API as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/tabBar/component/component.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/tabBar/component/component.js new file mode 100644 index 000000000..e0bffeaf8 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/tabBar/component/component.js @@ -0,0 +1,226 @@ +import { _ as __easycom_0 } from "../../../u-link.js"; +import { resolveDynamicComponent, openBlock, createElementBlock, createElementVNode, createCommentVNode, createVNode, Fragment, renderList, normalizeClass, toDisplayString } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import "../../../shared.esm-bundler.js"; +var _style_0 = { "uni-icon": { "": { "fontFamily": "uniicons", "fontWeight": "normal" } }, "uni-container": { "": { "paddingTop": 15, "paddingRight": 15, "paddingBottom": 15, "paddingLeft": 15, "backgroundColor": "#f8f8f8" } }, "uni-header-logo": { "": { "paddingTop": 15, "paddingRight": 15, "paddingBottom": 15, "paddingLeft": 15, "flexDirection": "column", "justifyContent": "center", "alignItems": "center", "marginTop": "10rpx" } }, "uni-header-image": { "": { "width": 80, "height": 80 } }, "uni-hello-text": { "": { "marginBottom": 20 } }, "hello-text": { "": { "color": "#7A7E83", "fontSize": 14, "lineHeight": 20 } }, "hello-link": { "": { "color": "#7A7E83", "fontSize": 14, "lineHeight": 20 } }, "uni-panel": { "": { "marginBottom": 12 } }, "uni-panel-h": { "": { "backgroundColor": "#ffffff", "!flexDirection": "row", "!alignItems": "center", "paddingTop": 12, "paddingRight": 12, "paddingBottom": 12, "paddingLeft": 12 } }, "uni-panel-h-on": { "": { "backgroundColor": "#f0f0f0" } }, "uni-panel-text": { "": { "flex": 1, "color": "#000000", "fontSize": 14, "fontWeight": "normal" } }, "uni-panel-icon": { "": { "marginLeft": 15, "color": "#999999", "fontSize": 14, "fontWeight": "normal", "transform": "rotate(0deg)", "transitionDuration": 0, "transitionProperty": "transform" } }, "uni-panel-icon-on": { "": { "transform": "rotate(180deg)" } }, "uni-navigate-item": { "": { "flexDirection": "row", "alignItems": "center", "backgroundColor": "#FFFFFF", "borderTopStyle": "solid", "borderTopColor": "#f0f0f0", "borderTopWidth": 1, "paddingTop": 12, "paddingRight": 12, "paddingBottom": 12, "paddingLeft": 12, "backgroundColor:active": "#f8f8f8" } }, "uni-navigate-text": { "": { "flex": 1, "color": "#000000", "fontSize": 14, "fontWeight": "normal" } }, "uni-navigate-icon": { "": { "marginLeft": 15, "color": "#999999", "fontSize": 14, "fontWeight": "normal" } }, "@TRANSITION": { "uni-panel-icon": { "duration": 0, "property": "transform" } } }; +var domModule = weex.requireModule("dom"); +domModule.addRule("fontFace", { + "fontFamily": "uniicons", + "src": "url('/static/uni.ttf')" +}); +const _sfc_main = { + props: { + hasLeftWin: { + type: Boolean + }, + leftWinActive: { + type: String + } + }, + data() { + return { + list: [ + { + id: "view", + name: "\u89C6\u56FE\u5BB9\u5668", + open: false, + pages: [ + "view", + "scroll-view", + "swiper", + "movable-view", + "cover-view" + ] + }, + { + id: "content", + name: "\u57FA\u7840\u5185\u5BB9", + open: false, + pages: ["text", "rich-text", "progress"] + }, + { + id: "form", + name: "\u8868\u5355\u7EC4\u4EF6", + open: false, + pages: [ + "button", + "checkbox", + "form", + "input", + "label", + "picker", + "picker-view", + "radio", + "slider", + "switch", + "textarea", + "editor" + ] + }, + { + id: "nav", + name: "\u5BFC\u822A", + open: false, + pages: ["navigator"] + }, + { + id: "media", + name: "\u5A92\u4F53\u7EC4\u4EF6", + open: false, + pages: [ + "image", + "video" + ] + }, + { + id: "map", + name: "\u5730\u56FE", + open: false, + pages: ["map"] + }, + { + id: "canvas", + name: "\u753B\u5E03", + open: false, + pages: ["canvas"] + }, + { + id: "web-view", + name: "\u7F51\u9875", + open: false, + pages: [{ + name: "\u7F51\u7EDC\u7F51\u9875", + url: "/pages/component/web-view/web-view" + }, { + name: "\u672C\u5730\u7F51\u9875", + url: "/pages/component/web-view-local/web-view-local" + }] + }, + { + id: "ad", + url: "ad", + name: "AD\u7EC4\u4EF6", + open: false + } + ] + }; + }, + onShareAppMessage() { + return { + title: "\u6B22\u8FCE\u4F53\u9A8Cuni-app", + path: "/pages/tabBar/component/component" + }; + }, + onNavigationBarButtonTap(e) { + uni.navigateTo({ + url: "/pages/about/about" + }); + }, + methods: { + triggerCollapse(e, id) { + if (!this.list[e].pages) { + this.goDetailPage("", this.list[e].url); + return; + } + for (var i = 0; i < this.list.length; ++i) { + if (e === i) { + this.list[i].open = !this.list[i].open; + } else { + this.list[i].open = false; + } + } + }, + goDetailPage(panel, e) { + if (typeof e === "string") { + const url = "/pages/component/" + e + "/" + e; + if (this.hasLeftWin) { + uni.reLaunch({ + url + }); + } else { + uni.navigateTo({ + url + }); + } + } else { + if (this.hasLeftWin) { + uni.reLaunch({ + url: e.url + }); + } else { + uni.navigateTo({ + url: e.url + }); + } + } + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_u_link = resolveEasycom(resolveDynamicComponent("u-link"), __easycom_0); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "uni-container" }, [ + !$props.hasLeftWin ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-header-logo" + }, [ + createElementVNode("u-image", { + class: "uni-header-image", + src: "/static/componentIndex.png" + }) + ])) : createCommentVNode("v-if", true), + !$props.hasLeftWin ? (openBlock(), createElementBlock("view", { + key: 1, + class: "uni-hello-text" + }, [ + createElementVNode("u-text", { class: "hello-text" }, "uni-app\u5185\u7F6E\u7EC4\u4EF6\uFF0C\u5C55\u793A\u6837\u5F0F\u4EC5\u4F9B\u53C2\u8003\uFF0C\u6587\u6863\u8BE6\u89C1\uFF1A"), + createVNode(_component_u_link, { + class: "hello-link", + href: "https://uniapp.dcloud.io/component/", + text: "https://uniapp.dcloud.io/component/", + inWhiteList: true + }, null, 8, ["href", "text"]) + ])) : createCommentVNode("v-if", true), + (openBlock(true), createElementBlock(Fragment, null, renderList($data.list, (item, index) => { + return openBlock(), createElementBlock("view", { + class: "uni-panel", + key: item.id + }, [ + createElementVNode("view", { + class: normalizeClass(["uni-panel-h", item.open ? "uni-panel-h-on" : ""]), + onClick: ($event) => $options.triggerCollapse(index, item.id) + }, [ + createElementVNode("u-text", { class: "uni-panel-text" }, toDisplayString(item.name), 1), + createElementVNode("u-text", { + class: normalizeClass(["uni-panel-icon uni-icon", item.open ? "uni-panel-icon-on" : ""]) + }, toDisplayString(item.pages ? "\uE581" : "\uE470"), 3) + ], 10, ["onClick"]), + item.open ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-panel-c" + }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList(item.pages, (item2, key) => { + return openBlock(), createElementBlock("view", { + class: normalizeClass([{ "left-win-active": $props.leftWinActive === (item2.url ? item2.url.split("/")[3] : item2) && $props.hasLeftWin }, "uni-navigate-item"]), + key, + onClick: ($event) => $options.goDetailPage(item.id, item2) + }, [ + createElementVNode("u-text", { class: "uni-navigate-text" }, toDisplayString(item2.name ? item2.name : item2), 1), + createElementVNode("u-text", { class: "uni-navigate-icon uni-icon" }, "\uE470") + ], 10, ["onClick"]); + }), 128)) + ])) : createCommentVNode("v-if", true) + ]); + }), 128)) + ]) + ]); +} +var component = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/tabBar/component/component.nvue"]]); +export { component as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/tabBar/extUI/extUI.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/tabBar/extUI/extUI.js new file mode 100644 index 000000000..af43df151 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/tabBar/extUI/extUI.js @@ -0,0 +1,273 @@ +import { f as formatAppLog } from "../../../uni-shared.es.js"; +import { _ as __easycom_0 } from "../../../u-link.js"; +import { resolveDynamicComponent, openBlock, createElementBlock, createElementVNode, createCommentVNode, createVNode, Fragment, renderList, normalizeClass, toDisplayString } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import "../../../shared.esm-bundler.js"; +var _style_0 = { "uni-icon": { "": { "fontFamily": "uniicons", "fontWeight": "normal" } }, "uni-container": { "": { "paddingTop": 15, "paddingRight": 15, "paddingBottom": 15, "paddingLeft": 15, "backgroundColor": "#f8f8f8" } }, "uni-header-logo": { "": { "paddingTop": 15, "paddingRight": 15, "paddingBottom": 15, "paddingLeft": 15, "flexDirection": "column", "justifyContent": "center", "alignItems": "center", "marginTop": "10rpx" } }, "uni-header-image": { "": { "width": 80, "height": 80 } }, "uni-hello-text": { "": { "marginBottom": 20 } }, "hello-text": { "": { "color": "#7A7E83", "fontSize": 14, "lineHeight": 20 } }, "hello-link": { "": { "color": "#7A7E83", "fontSize": 14, "lineHeight": 20 } }, "uni-panel": { "": { "marginBottom": 12 } }, "uni-panel-h": { "": { "backgroundColor": "#ffffff", "!flexDirection": "row", "!alignItems": "center", "paddingTop": 12, "paddingRight": 12, "paddingBottom": 12, "paddingLeft": 12 } }, "uni-panel-h-on": { "": { "backgroundColor": "#f0f0f0" } }, "uni-panel-text": { "": { "flex": 1, "color": "#000000", "fontSize": 14, "fontWeight": "normal" } }, "uni-panel-icon": { "": { "marginLeft": 15, "color": "#999999", "fontSize": 14, "fontWeight": "normal", "transform": "rotate(0deg)", "transitionDuration": 0, "transitionProperty": "transform" } }, "uni-panel-icon-on": { "": { "transform": "rotate(180deg)" } }, "uni-navigate-item": { "": { "flexDirection": "row", "alignItems": "center", "backgroundColor": "#FFFFFF", "borderTopStyle": "solid", "borderTopColor": "#f0f0f0", "borderTopWidth": 1, "paddingTop": 12, "paddingRight": 12, "paddingBottom": 12, "paddingLeft": 12, "backgroundColor:active": "#f8f8f8" } }, "uni-navigate-text": { "": { "flex": 1, "color": "#000000", "fontSize": 14, "fontWeight": "normal" } }, "uni-navigate-icon": { "": { "marginLeft": 15, "color": "#999999", "fontSize": 14, "fontWeight": "normal" } }, "@TRANSITION": { "uni-panel-icon": { "duration": 0, "property": "transform" } } }; +const _sfc_main = { + props: { + hasLeftWin: { + type: Boolean + }, + leftWinActive: { + type: String + } + }, + data() { + return { + hideList: [ + "load-more" + ], + lists: [ + { + name: "uni-badge \u6570\u5B57\u89D2\u6807", + url: "badge" + }, + { + name: "uni-breadcrumb \u9762\u5305\u5C51", + url: "breadcrumb" + }, + { + name: "uni-card \u5361\u7247", + url: "card" + }, + { + name: "uni-collapse \u6298\u53E0\u9762\u677F", + url: "collapse" + }, + { + name: "uni-countdown \u5012\u8BA1\u65F6", + url: "countdown" + }, + { + name: "uni-data-checkbox \u6570\u636E\u9009\u62E9\u5668", + url: "data-checkbox" + }, + { + name: "uni-data-picker \u6570\u636E\u9A71\u52A8\u7684picker\u9009\u62E9\u5668", + url: "data-picker" + }, + { + name: "uni-data-select \u6570\u636E\u9A71\u52A8\u7684\u4E0B\u62C9\u6846", + url: "data-select" + }, + { + name: "uni-dateformat \u65E5\u671F\u683C\u5F0F\u5316", + url: "dateformat" + }, + { + name: "uni-datetime-picker \u65E5\u671F\u9009\u62E9\u5668", + url: "datetime-picker" + }, + { + name: "uni-drawer \u62BD\u5C49", + url: "drawer" + }, + { + name: "uni-easyinput \u589E\u5F3A\u8F93\u5165\u6846", + url: "easyinput" + }, + { + name: "uni-fab \u60AC\u6D6E\u6309\u94AE", + url: "fab" + }, + { + name: "uni-fav \u6536\u85CF\u6309\u94AE", + url: "fav" + }, + { + name: "uni-forms \u8868\u5355", + url: "forms" + }, + { + name: "uni-goods-nav \u5546\u54C1\u5BFC\u822A", + url: "goods-nav" + }, + { + name: "uni-grid \u5BAB\u683C", + url: "grid" + }, + { + name: "uni-group \u5206\u7EC4", + url: "group" + }, + { + name: "uni-icons \u56FE\u6807", + url: "icons" + }, + { + name: "uni-indexed-list \u7D22\u5F15\u5217\u8868", + url: "indexed-list" + }, + { + name: "uni-link \u8D85\u94FE\u63A5", + url: "link" + }, + { + name: "uni-list \u5217\u8868", + url: "list" + }, + { + name: "uni-load-more \u52A0\u8F7D\u66F4\u591A", + url: "load-more" + }, + { + name: "uni-nav-bar \u81EA\u5B9A\u4E49\u5BFC\u822A\u680F", + url: "nav-bar" + }, + { + name: "uni-notice-bar \u901A\u544A\u680F", + url: "notice-bar" + }, + { + name: "uni-number-box \u6570\u5B57\u8F93\u5165\u6846", + url: "number-box" + }, + { + name: "uni-pagination \u5206\u9875\u5668", + url: "pagination" + }, + { + name: "uni-popup \u5F39\u51FA\u5C42", + url: "popup" + }, + { + name: "uni-rate \u8BC4\u5206", + url: "rate" + }, + { + name: "uni-row \u5E03\u5C40-\u884C", + url: "row" + }, + { + name: "uni-search-bar \u641C\u7D22\u680F", + url: "search-bar" + }, + { + name: "uni-section \u6807\u9898\u680F", + url: "section" + }, + { + name: "uni-segmented-control \u5206\u6BB5\u5668", + url: "segmented-control" + }, + { + name: "uni-steps \u6B65\u9AA4\u6761", + url: "steps" + }, + { + name: "uni-swipe-action \u6ED1\u52A8\u64CD\u4F5C", + url: "swipe-action" + }, + { + name: "uni-swiper-dot \u8F6E\u64AD\u56FE\u6307\u793A\u70B9", + url: "swiper-dot" + }, + { + name: "uni-tag \u6807\u7B7E", + url: "tag" + }, + { + name: "uni-title \u7AE0\u8282\u6807\u9898", + url: "title" + }, + { + name: "uni-tooltip \u6587\u5B57\u63D0\u793A", + url: "tooltip" + }, + { + name: "uni-transition \u8FC7\u6E21\u52A8\u753B", + url: "transition" + } + ] + }; + }, + onLoad() { + }, + onReady() { + uni.preloadPage({ + url: "/pages/extUI/calendar/calendar", + success() { + formatAppLog("log", "at pages/tabBar/extUI/extUI.nvue:230", "preloadPage /pages/extUI/calendar/calendar"); + }, + fail() { + } + }); + }, + onShareAppMessage() { + return { + title: "\u6B22\u8FCE\u4F53\u9A8Cuni-app", + path: "/pages/tabBar/extUI/extUI" + }; + }, + onNavigationBarButtonTap(e) { + uni.navigateTo({ + url: "/pages/about/about" + }); + }, + methods: { + goDetailPage(path) { + const url = "/pages/extUI/" + path + "/" + path; + if (this.hasLeftWin) { + uni.reLaunch({ + url + }); + } else { + uni.navigateTo({ + url + }); + } + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_u_link = resolveEasycom(resolveDynamicComponent("u-link"), __easycom_0); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "uni-container" }, [ + !$props.hasLeftWin ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-header-logo" + }, [ + createElementVNode("u-image", { + class: "uni-header-image", + src: "/static/extuiIndex.png" + }) + ])) : createCommentVNode("v-if", true), + !$props.hasLeftWin ? (openBlock(), createElementBlock("view", { + key: 1, + class: "uni-hello-text" + }, [ + createElementVNode("u-text", { class: "hello-text" }, "\u4EE5\u4E0B\u662Funi-app\u6269\u5C55\u7EC4\u4EF6\u793A\u4F8B\uFF0C\u66F4\u591A\u7EC4\u4EF6\u89C1\u63D2\u4EF6\u5E02\u573A\uFF1A"), + createVNode(_component_u_link, { + class: "hello-link", + href: "https://ext.dcloud.net.cn/", + text: "https://ext.dcloud.net.cn", + inWhiteList: true + }, null, 8, ["href", "text"]) + ])) : createCommentVNode("v-if", true), + (openBlock(true), createElementBlock(Fragment, null, renderList($data.lists, (item) => { + return openBlock(), createElementBlock("view", { + class: normalizeClass([{ "pc-hide": $data.hideList.indexOf(item.url) !== -1 && $props.hasLeftWin }, "uni-panel"]), + key: item.url + }, [ + createElementVNode("view", { + class: normalizeClass([{ "left-win-active": $props.leftWinActive === item.url && $props.hasLeftWin }, "uni-panel-h"]), + onClick: ($event) => $options.goDetailPage(item.url) + }, [ + createElementVNode("u-text", { class: "uni-panel-text" }, toDisplayString(item.name), 1), + createElementVNode("u-text", { class: "uni-panel-icon uni-icon" }, "\uE470") + ], 10, ["onClick"]) + ], 2); + }), 128)) + ]) + ]); +} +var extUI = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/tabBar/extUI/extUI.nvue"]]); +export { extUI as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/tabBar/template/template.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/tabBar/template/template.js new file mode 100644 index 000000000..b55f7f94e --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/tabBar/template/template.js @@ -0,0 +1,192 @@ +import { _ as __easycom_0 } from "../../../u-link.js"; +import { resolveDynamicComponent, openBlock, createElementBlock, createElementVNode, createCommentVNode, createVNode, Fragment, renderList, normalizeClass, toDisplayString } from "vue"; +import { r as resolveEasycom } from "../../../uni-app.es.js"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import "../../../shared.esm-bundler.js"; +var _style_0 = { "uni-icon": { "": { "fontFamily": "uniicons", "fontWeight": "normal" } }, "uni-container": { "": { "paddingTop": 15, "paddingRight": 15, "paddingBottom": 15, "paddingLeft": 15, "backgroundColor": "#f8f8f8" } }, "uni-header-logo": { "": { "paddingTop": 15, "paddingRight": 15, "paddingBottom": 15, "paddingLeft": 15, "flexDirection": "column", "justifyContent": "center", "alignItems": "center", "marginTop": "10rpx" } }, "uni-header-image": { "": { "width": 80, "height": 80 } }, "uni-hello-text": { "": { "marginBottom": 20 } }, "hello-text": { "": { "color": "#7A7E83", "fontSize": 14, "lineHeight": 20 } }, "hello-link": { "": { "color": "#7A7E83", "fontSize": 14, "lineHeight": 20 } }, "uni-panel": { "": { "marginBottom": 12 } }, "uni-panel-h": { "": { "backgroundColor": "#ffffff", "!flexDirection": "row", "!alignItems": "center", "paddingTop": 12, "paddingRight": 12, "paddingBottom": 12, "paddingLeft": 12 } }, "uni-panel-h-on": { "": { "backgroundColor": "#f0f0f0" } }, "uni-panel-text": { "": { "flex": 1, "color": "#000000", "fontSize": 14, "fontWeight": "normal" } }, "uni-panel-icon": { "": { "marginLeft": 15, "color": "#999999", "fontSize": 14, "fontWeight": "normal", "transform": "rotate(0deg)", "transitionDuration": 0, "transitionProperty": "transform" } }, "uni-panel-icon-on": { "": { "transform": "rotate(180deg)" } }, "uni-navigate-item": { "": { "flexDirection": "row", "alignItems": "center", "backgroundColor": "#FFFFFF", "borderTopStyle": "solid", "borderTopColor": "#f0f0f0", "borderTopWidth": 1, "paddingTop": 12, "paddingRight": 12, "paddingBottom": 12, "paddingLeft": 12, "backgroundColor:active": "#f8f8f8" } }, "uni-navigate-text": { "": { "flex": 1, "color": "#000000", "fontSize": 14, "fontWeight": "normal" } }, "uni-navigate-icon": { "": { "marginLeft": 15, "color": "#999999", "fontSize": 14, "fontWeight": "normal" } }, "@TRANSITION": { "uni-panel-icon": { "duration": 0, "property": "transform" } } }; +const _sfc_main = { + props: { + hasLeftWin: { + type: Boolean + }, + leftWinActive: { + type: String + } + }, + data() { + return { + hideList: [ + "ucharts", + "nav-city-dropdown" + ], + list: [ + { + id: "navbar", + name: "\u9876\u90E8\u539F\u751F\u5BFC\u822A\u6807\u9898\u680F", + open: false, + pages: [ + { + name: "\u5BFC\u822A\u680F\u5E26\u81EA\u5B9A\u4E49\u6309\u94AE", + url: "nav-button" + }, + { + name: "\u5BFC\u822A\u680F\u5E26\u7EA2\u70B9\u548C\u89D2\u6807", + url: "nav-dot" + }, + { + name: "\u5BFC\u822A\u680F\u5E26\u57CE\u5E02\u9009\u62E9", + url: "nav-city-dropdown" + }, + { + name: "\u5BFC\u822A\u680F\u5E26\u641C\u7D22\u6846", + url: "nav-search-input" + }, + { + name: "\u900F\u660E\u6E10\u53D8\u6837\u5F0F", + url: "nav-transparent" + }, + { + name: "\u5BFC\u822A\u680F\u5E26\u56FE\u7247", + url: "nav-image" + } + ] + }, + { + name: "\u9876\u90E8\u9009\u9879\u5361", + url: "tabbar" + }, + { + name: "\u7EC4\u4EF6\u901A\u8BAF", + url: "component-communication" + }, + { + name: "\u5217\u8868\u5230\u8BE6\u60C5\u793A\u4F8B", + url: "list2detail-list" + }, + { + name: "swiper-list", + url: "swiper-list-nvue" + }, + { + name: "GlobalData\u548Cvuex", + url: "global" + }, + { + name: "\u95EE\u9898\u53CD\u9988", + url: "/platforms/app-plus/feedback/feedback" + }, + { + name: "\u6253\u5F00\u5916\u90E8\u5E94\u7528", + url: "scheme" + } + ] + }; + }, + onShareAppMessage() { + return { + title: "\u6B22\u8FCE\u4F53\u9A8Cuni-app", + path: "/pages/tabBar/template/template" + }; + }, + onNavigationBarButtonTap(e) { + uni.navigateTo({ + url: "/pages/about/about" + }); + }, + methods: { + triggerCollapse(e, id) { + if (!this.list[e].pages) { + this.goDetailPage(this.list[e].url); + return; + } + for (var i = 0; i < this.list.length; ++i) { + if (e === i) { + this.list[i].open = !this.list[i].open; + } else { + this.list[i].open = false; + } + } + }, + goDetailPage(e) { + let path = e.url ? e.url : e; + let url = ~path.indexOf("platform") ? path : "/pages/template/" + path + "/" + path; + if (this.hasLeftWin) { + uni.reLaunch({ + url + }); + } else { + uni.navigateTo({ + url + }); + } + return false; + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_u_link = resolveEasycom(resolveDynamicComponent("u-link"), __easycom_0); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "uni-container" }, [ + !$props.hasLeftWin ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-header-logo" + }, [ + createElementVNode("u-image", { + class: "uni-header-image", + src: "/static/templateIndex.png" + }) + ])) : createCommentVNode("v-if", true), + !$props.hasLeftWin ? (openBlock(), createElementBlock("view", { + key: 1, + class: "uni-hello-text" + }, [ + createElementVNode("u-text", { class: "hello-text" }, "\u4EE5\u4E0B\u662F\u90E8\u5206\u6A21\u677F\u793A\u4F8B\uFF0C\u66F4\u591A\u6A21\u677F\u89C1\u63D2\u4EF6\u5E02\u573A\uFF1A"), + createVNode(_component_u_link, { + class: "hello-link", + href: "https://ext.dcloud.net.cn", + text: "https://ext.dcloud.net.cn", + inWhiteList: true + }, null, 8, ["text"]) + ])) : createCommentVNode("v-if", true), + (openBlock(true), createElementBlock(Fragment, null, renderList($data.list, (item, index) => { + return openBlock(), createElementBlock("view", { + class: normalizeClass([{ "pc-hide": $data.hideList.indexOf(item.url) !== -1 && $props.hasLeftWin }, "uni-panel"]), + key: item.id + }, [ + createElementVNode("view", { + class: normalizeClass([{ "left-win-active": $props.leftWinActive === item.url && $props.hasLeftWin, "uni-panel-h-on": item.open }, "uni-panel-h"]), + onClick: ($event) => $options.triggerCollapse(index, item.id) + }, [ + createElementVNode("u-text", { class: "uni-panel-text" }, toDisplayString(item.name), 1), + createElementVNode("u-text", { + class: normalizeClass(["uni-panel-icon uni-icon", item.open ? "uni-panel-icon-on" : ""]) + }, toDisplayString(item.pages ? "\uE581" : "\uE470"), 3) + ], 10, ["onClick"]), + item.open ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-panel-c" + }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList(item.pages, (item2, key) => { + return openBlock(), createElementBlock("view", { + class: normalizeClass([{ "left-win-active": $props.leftWinActive === item2.url && $props.hasLeftWin, "pc-hide": $data.hideList.indexOf(item2.url) !== -1 && $props.hasLeftWin }, "uni-navigate-item"]), + key, + onClick: ($event) => $options.goDetailPage(item2) + }, [ + createElementVNode("u-text", { class: "uni-navigate-text" }, toDisplayString(item2.name ? item2.name : item2), 1), + createElementVNode("u-text", { class: "uni-navigate-icon uni-icon" }, "\uE470") + ], 10, ["onClick"]); + }), 128)) + ])) : createCommentVNode("v-if", true) + ], 2); + }), 128)) + ]) + ]); +} +var template = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/tabBar/template/template.nvue"]]); +export { template as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/template/swiper-list-nvue/swiper-list-nvue.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/template/swiper-list-nvue/swiper-list-nvue.js new file mode 100644 index 000000000..2eab04049 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/template/swiper-list-nvue/swiper-list-nvue.js @@ -0,0 +1,324 @@ +import { openBlock, createElementBlock, createElementVNode, Fragment, renderList, toDisplayString, resolveComponent, normalizeStyle, normalizeClass, createVNode, withCtx, createBlock } from "vue"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +var _style_0$1 = { "uni-swiper-page": { "": { "flex": 1, "position": "absolute", "left": 0, "top": 0, "right": 0, "bottom": 0 } }, "list": { "": { "flex": 1, "backgroundColor": "#ebebeb" } }, "list-item": { "": { "marginLeft": 12, "marginRight": 12, "marginTop": 12, "paddingTop": 20, "paddingRight": 20, "paddingBottom": 20, "paddingLeft": 20, "backgroundColor": "#ffffff", "borderRadius": 5 } }, "loading": { "": { "height": 20 } } }; +const _sfc_main$1 = { + props: { + pid: { + type: [Number, String], + default: "" + }, + parentId: { + type: String, + default: "" + } + }, + data() { + return { + scrollable: true, + dataList: [] + }; + }, + created() { + for (var i = 0; i < 30; i++) { + this.dataList.push({ + id: i, + name: i + }); + } + }, + methods: { + setScrollRef(height) { + if (this.$refs["list"].setSpecialEffects) { + this.$refs["list"].setSpecialEffects({ + id: this.parentId, + headerHeight: height + }); + } + }, + loadData() { + }, + clear() { + this.dataList.length = 0; + } + } +}; +function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("view", { class: "uni-swiper-page" }, [ + createElementVNode("list", { + ref: "list", + class: "list", + offsetAccuracy: 5, + bounce: false, + fixFreezing: "true" + }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.dataList, (item, index) => { + return openBlock(), createElementBlock("cell", { + key: item.id, + ref_for: true, + ref: "item" + index + }, [ + createElementVNode("view", { class: "list-item" }, [ + createElementVNode("u-text", null, toDisplayString(item.name), 1) + ]) + ]); + }), 128)), + createElementVNode("cell", { class: "loading" }) + ], 512) + ]); +} +var swiperPage = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["styles", [_style_0$1]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/template/swiper-list-nvue/swiper-page.nvue"]]); +var _style_0 = { "page": { "": { "flex": 1 } }, "header": { "": { "height": 160, "flexDirection": "row", "alignItems": "center", "justifyContent": "center", "backgroundColor": "#f4f4f4" } }, "header-title": { "": { "fontSize": 30, "fontWeight": "bold", "color": "#444444" } }, "flexible-view": { "": { "backgroundColor": "#f823ff" } }, "page-head": { "": { "height": 200, "flexDirection": "column", "alignItems": "center", "justifyContent": "center", "backgroundColor": "#FF0000" } }, "tabs": { "": { "flexDirection": "column", "overflow": "hidden", "backgroundColor": "#ffffff" } }, "tab-bar": { "": { "width": "750rpx", "height": "84rpx", "flexDirection": "row" } }, "scroll-view-indicator": { "": { "position": "relative", "height": 2, "backgroundColor": "rgba(0,0,0,0)" } }, "scroll-view-underline": { "": { "position": "absolute", "top": 0, "bottom": 0, "width": 0, "backgroundColor": "#007AFF" } }, "scroll-view-animation": { "": { "transitionDuration": 200, "transitionProperty": "left" } }, "tab-bar-line": { "": { "height": "1rpx", "backgroundColor": "#cccccc" } }, "tab-view": { "": { "flex": 1 } }, "uni-tab-item": { "": { "flexWrap": "nowrap", "paddingLeft": 25, "paddingRight": 25 } }, "uni-tab-item-title": { "": { "color": "#555555", "fontSize": "30rpx", "height": "80rpx", "lineHeight": "80rpx", "flexWrap": "nowrap" } }, "uni-tab-item-title-active": { "": { "color": "#007AFF" } }, "swiper-item": { "": { "flex": 1, "flexDirection": "column" } }, "swiper-page": { "": { "flex": 1, "flexDirection": "row", "position": "absolute", "left": 0, "top": 0, "right": 0, "bottom": 0 } }, "@TRANSITION": { "scroll-view-animation": { "duration": 200, "property": "left" } } }; +const dom = weex.requireModule("dom"); +const MAX_CACHE_DATA = 100; +const MAX_CACHE_PAGE = 3; +const TAB_PRELOAD_OFFSET = 1; +const _sfc_main = { + components: { + swiperPage + }, + data() { + return { + tabList: [], + tabIndex: 0, + cacheTab: [], + scrollInto: "", + indicatorLineLeft: 0, + indicatorLineWidth: 0, + isTap: false, + showTitleView: true, + pageHeight: 300, + pageId: "page" + }; + }, + onLoad() { + for (var i = 0; i < 6; i++) { + this.tabList.push({ + id: "tab" + i, + name: "Tab " + (i + 1), + pageid: i + 1 + }); + } + }, + onReady() { + this.pageHeight = uni.getSystemInfoSync().windowHeight; + this._lastTabIndex = 0; + this.swiperWidth = 0; + this.tabbarWidth = 0; + this.tabListSize = {}; + this._touchTabIndex = 0; + this._headHeight = 100; + this.pageList = this.$refs.page; + this.selectorQuery(); + }, + methods: { + ontabtap(e) { + let index = e.target.dataset.current || e.currentTarget.dataset.current; + this.isTap = true; + var currentSize = this.tabListSize[index]; + this.updateIndicator(currentSize.left, currentSize.width); + this._touchTabIndex = index; + this.switchTab(index); + }, + onswiperchange(e) { + }, + onswiperscroll(e) { + if (this.isTap) { + return; + } + var offsetX = e.detail.dx; + var preloadIndex = this._lastTabIndex; + if (offsetX > TAB_PRELOAD_OFFSET) { + preloadIndex++; + } else if (offsetX < -TAB_PRELOAD_OFFSET) { + preloadIndex--; + } + if (preloadIndex === this._lastTabIndex || preloadIndex < 0 || preloadIndex > this.pageList.length - 1) { + return; + } + if (this.pageList[preloadIndex].dataList.length === 0) { + this.loadTabData(preloadIndex); + } + var percentage = Math.abs(this.swiperWidth / offsetX); + var currentSize = this.tabListSize[this._lastTabIndex]; + var preloadSize = this.tabListSize[preloadIndex]; + var lineL = currentSize.left + (preloadSize.left - currentSize.left) / percentage; + var lineW = currentSize.width + (preloadSize.width - currentSize.width) / percentage; + this.updateIndicator(lineL, lineW); + }, + animationfinish(e) { + let index = e.detail.current; + if (this._touchTabIndex === index) { + this.isTap = false; + } + this._lastTabIndex = index; + this.switchTab(index); + this.updateIndicator(this.tabListSize[index].left, this.tabListSize[index].width); + }, + selectorQuery() { + uni.createSelectorQuery().in(this).select("#head").boundingClientRect().exec((rect) => { + this._headHeight = rect[0].height; + }); + uni.createSelectorQuery().in(this).select("#tab-bar").boundingClientRect().exec((rect) => { + this.tabbarWidth = rect[0].width; + }); + uni.createSelectorQuery().in(this).select("#tab-bar-view").boundingClientRect().exec((rect) => { + this.swiperWidth = rect[0].width; + }); + var queryTabSize = uni.createSelectorQuery().in(this); + for (var i = 0; i < this.tabList.length; i++) { + queryTabSize.select("#" + this.tabList[i].id).boundingClientRect(); + } + queryTabSize.exec((rects) => { + rects.forEach((rect) => { + this.tabListSize[rect.dataset.id] = rect; + }); + this.updateIndicator(this.tabListSize[this.tabIndex].left, this.tabListSize[this.tabIndex].width); + this.switchTab(this.tabIndex); + }); + }, + updateIndicator(left, width) { + this.indicatorLineLeft = left; + this.indicatorLineWidth = width; + }, + switchTab(index) { + if (this.pageList[index].dataList.length === 0) { + this.loadTabData(index); + } + this.pageList[index].setScrollRef(this._headHeight); + if (this.tabIndex === index) { + return; + } + if (this.pageList[this.tabIndex].dataList.length > MAX_CACHE_DATA) { + let isExist = this.cacheTab.indexOf(this.tabIndex); + if (isExist < 0) { + this.cacheTab.push(this.tabIndex); + } + } + this.tabIndex = index; + this.scrollTabTo(index); + if (this.cacheTab.length > MAX_CACHE_PAGE) { + let cacheIndex = this.cacheTab[0]; + this.clearTabData(cacheIndex); + this.cacheTab.splice(0, 1); + } + }, + scrollTabTo(index) { + const el = this.$refs["tabitem" + index][0]; + let offset = 0; + if (index > 0) { + offset = this.tabbarWidth / 2 - this.tabListSize[index].width / 2; + if (this.tabListSize[index].right < this.tabbarWidth / 2) { + offset = this.tabListSize[0].width; + } + } + dom.scrollToElement(el, { + offset: -offset + }); + }, + loadTabData(index) { + this.pageList[index].loadData(); + }, + clearTabData(index) { + this.pageList[index].clear(); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_swiper_page = resolveComponent("swiper-page"); + const _component_swiper_item = resolveComponent("swiper-item"); + const _component_swiper = resolveComponent("swiper"); + return openBlock(), createElementBlock("list", { + id: $data.pageId, + class: "page", + bounce: false, + fixFreezing: "true" + }, [ + createElementVNode("cell", null, [ + createElementVNode("view", { + id: "head", + class: "header" + }, [ + createElementVNode("u-text", { class: "header-title" }, "header") + ]) + ]), + createElementVNode("cell", null, [ + createElementVNode("view", { + class: "tabs", + style: normalizeStyle("height:" + $data.pageHeight + "px") + }, [ + createElementVNode("scroll-view", { + ref: "tabbar1", + id: "tab-bar", + class: "tab-bar", + scroll: false, + scrollX: true, + showScrollbar: false, + scrollIntoView: $data.scrollInto + }, [ + createElementVNode("view", { style: { "flex-direction": "column" } }, [ + createElementVNode("view", { style: { "flex-direction": "row" } }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.tabList, (tab, index) => { + return openBlock(), createElementBlock("view", { + class: "uni-tab-item", + key: tab.id, + id: tab.id, + ref_for: true, + ref: "tabitem" + index, + "data-id": index, + "data-current": index, + onClick: _cache[0] || (_cache[0] = (...args) => $options.ontabtap && $options.ontabtap(...args)) + }, [ + createElementVNode("u-text", { + class: normalizeClass(["uni-tab-item-title", $data.tabIndex == index ? "uni-tab-item-title-active" : ""]) + }, toDisplayString(tab.name), 3) + ], 8, ["id", "data-id", "data-current"]); + }), 128)) + ]), + createElementVNode("view", { class: "scroll-view-indicator" }, [ + createElementVNode("view", { + ref: "underline", + class: normalizeClass(["scroll-view-underline", $data.isTap ? "scroll-view-animation" : ""]), + style: normalizeStyle({ left: $data.indicatorLineLeft + "px", width: $data.indicatorLineWidth + "px" }) + }, null, 6) + ]) + ]) + ], 8, ["scrollIntoView"]), + createElementVNode("view", { class: "tab-bar-line" }), + createVNode(_component_swiper, { + class: "tab-view", + ref: "swiper1", + id: "tab-bar-view", + current: $data.tabIndex, + duration: 300, + onChange: $options.onswiperchange, + onTransition: $options.onswiperscroll, + onAnimationfinish: $options.animationfinish, + onOnAnimationEnd: $options.animationfinish + }, { + default: withCtx(() => [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.tabList, (page, index) => { + return openBlock(), createBlock(_component_swiper_item, { + class: "swiper-item", + key: index + }, { + default: withCtx(() => [ + createVNode(_component_swiper_page, { + class: "swiper-page", + pid: page.pageid, + parentId: $data.pageId, + ref_for: true, + ref: "page" + }, null, 8, ["pid", "parentId"]) + ]), + _: 2 + }, 1024); + }), 128)) + ]), + _: 1 + }, 8, ["current", "onChange", "onTransition", "onAnimationfinish", "onOnAnimationEnd"]) + ], 4) + ]) + ], 8, ["id"]); +} +var swiperListNvue = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/template/swiper-list-nvue/swiper-list-nvue.nvue"]]); +export { swiperListNvue as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/template/swiper-list/swiper-list.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/template/swiper-list/swiper-list.js new file mode 100644 index 000000000..aaced85f8 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/template/swiper-list/swiper-list.js @@ -0,0 +1,269 @@ +import { f as formatAppLog } from "../../../uni-shared.es.js"; +import { openBlock, createElementBlock, createElementVNode, toDisplayString, resolveComponent, Fragment, renderList, normalizeClass, normalizeStyle, createVNode, withCtx, createBlock } from "vue"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import "../../../shared.esm-bundler.js"; +var _style_0$1 = { "uni-swiper-page": { "": { "flex": 1, "flexDirection": "column", "position": "absolute", "left": 0, "top": 0, "right": 0, "bottom": 0, "alignItems": "center", "justifyContent": "center" } } }; +const _sfc_main$1 = { + props: { + pid: { + type: [Number, String], + default: "" + } + }, + data() { + return { + dataList: [] + }; + }, + created() { + }, + methods: { + loadData() { + }, + clear() { + this.dataList.length = 0; + } + } +}; +function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("view", { class: "uni-swiper-page" }, [ + createElementVNode("u-text", null, "Tab View " + toDisplayString($props.pid), 1) + ]); +} +var swiperPage = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["styles", [_style_0$1]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/template/swiper-list/swiper-page.nvue"]]); +var _style_0 = { "tabs": { "": { "flex": 1, "flexDirection": "column", "overflow": "hidden", "backgroundColor": "#ffffff" } }, "tab-bar": { "": { "width": "750rpx", "height": "84rpx", "flexDirection": "row" } }, "scroll-view-indicator": { "": { "position": "relative", "height": 2, "backgroundColor": "rgba(0,0,0,0)" } }, "scroll-view-underline": { "": { "position": "absolute", "top": 0, "bottom": 0, "width": 0, "backgroundColor": "#007AFF" } }, "scroll-view-animation": { "": { "transitionDuration": 200, "transitionProperty": "left" } }, "tab-bar-line": { "": { "height": "1rpx", "backgroundColor": "#cccccc" } }, "tab-view": { "": { "flex": 1 } }, "uni-tab-item": { "": { "flexWrap": "nowrap", "paddingLeft": 25, "paddingRight": 25 } }, "uni-tab-item-title": { "": { "color": "#555555", "fontSize": "30rpx", "height": "80rpx", "lineHeight": "80rpx", "flexWrap": "nowrap" } }, "uni-tab-item-title-active": { "": { "color": "#007AFF" } }, "swiper-item": { "": { "flex": 1, "flexDirection": "column" } }, "swiper-page": { "": { "flex": 1, "flexDirection": "row", "position": "absolute", "left": 0, "top": 0, "right": 0, "bottom": 0 } }, "@TRANSITION": { "scroll-view-animation": { "duration": 200, "property": "left" } } }; +const dom = weex.requireModule("dom"); +const MAX_CACHE_DATA = 100; +const MAX_CACHE_PAGE = 3; +const TAB_PRELOAD_OFFSET = 1; +const _sfc_main = { + components: { + swiperPage + }, + data() { + return { + tabList: [], + tabIndex: 0, + cacheTab: [], + scrollInto: "", + indicatorLineLeft: 0, + indicatorLineWidth: 0, + isTap: false + }; + }, + onLoad() { + for (var i = 0; i < 6; i++) { + this.tabList.push({ + id: "tab" + i, + name: "Tab " + (i + 1), + pageid: i + 1 + }); + } + }, + onReady() { + this._lastTabIndex = 0; + this.swiperWidth = 0; + this.tabbarWidth = 0; + this.tabListSize = {}; + this._touchTabIndex = 0; + this.pageList = this.$refs.page; + this.switchTab(this.tabIndex); + this.getTabbarItemsSize(); + }, + methods: { + ontabtap(e) { + let index = e.target.dataset.current || e.currentTarget.dataset.current; + this.isTap = true; + var currentSize = this.tabListSize[index]; + this.updateIndicator(currentSize.left, currentSize.width); + this._touchTabIndex = index; + this.switchTab(index); + }, + onswiperchange(e) { + }, + onswiperscroll(e) { + if (this.isTap) { + return; + } + var offsetX = e.detail.dx; + var preloadIndex = this._lastTabIndex; + if (offsetX > TAB_PRELOAD_OFFSET) { + preloadIndex++; + } else if (offsetX < -TAB_PRELOAD_OFFSET) { + preloadIndex--; + } + if (preloadIndex === this._lastTabIndex || preloadIndex < 0 || preloadIndex > this.pageList.length - 1) { + return; + } + if (this.pageList[preloadIndex].dataList.length === 0) { + this.loadTabData(preloadIndex); + } + var percentage = Math.abs(this.swiperWidth / offsetX); + var currentSize = this.tabListSize[this._lastTabIndex]; + var preloadSize = this.tabListSize[preloadIndex]; + var lineL = currentSize.left + (preloadSize.left - currentSize.left) / percentage; + var lineW = currentSize.width + (preloadSize.width - currentSize.width) / percentage; + this.updateIndicator(lineL, lineW); + }, + animationfinish(e) { + let index = e.detail.current; + if (this._touchTabIndex === index) { + this.isTap = false; + } + this._lastTabIndex = index; + this.switchTab(index); + this.updateIndicator(this.tabListSize[index].left, this.tabListSize[index].width); + }, + getTabbarItemsSize() { + uni.createSelectorQuery().in(this).select("#tab-bar").boundingClientRect().exec((rect) => { + this.tabbarWidth = rect[0].width; + }); + uni.createSelectorQuery().in(this).select("#tab-bar-view").boundingClientRect().exec((rect) => { + this.swiperWidth = rect[0].width; + }); + var queryTabSize = uni.createSelectorQuery().in(this); + for (var i = 0; i < this.tabList.length; i++) { + queryTabSize.select("#" + this.tabList[i].id).boundingClientRect(); + } + queryTabSize.exec((rects) => { + formatAppLog("log", "at pages/template/swiper-list/swiper-list.nvue:169", JSON.stringify(rects)); + rects.forEach((rect) => { + this.tabListSize[rect.dataset.id] = rect; + }); + }); + setTimeout(() => { + this.updateIndicator(this.tabListSize[this.tabIndex].left, this.tabListSize[this.tabIndex].width); + }, 100); + }, + updateIndicator(left, width) { + this.indicatorLineLeft = left; + this.indicatorLineWidth = width; + }, + switchTab(index) { + if (this.pageList[index].dataList.length === 0) { + this.loadTabData(index); + } + if (this.tabIndex === index) { + return; + } + if (this.pageList[this.tabIndex].dataList.length > MAX_CACHE_DATA) { + let isExist = this.cacheTab.indexOf(this.tabIndex); + if (isExist < 0) { + this.cacheTab.push(this.tabIndex); + } + } + this.tabIndex = index; + this.scrollTabTo(index); + if (this.cacheTab.length > MAX_CACHE_PAGE) { + let cacheIndex = this.cacheTab[0]; + this.clearTabData(cacheIndex); + this.cacheTab.splice(0, 1); + } + }, + scrollTabTo(index) { + const el = this.$refs["tabitem" + index][0]; + let offset = 0; + if (index > 0) { + offset = this.tabbarWidth / 2 - this.tabListSize[index].width / 2; + if (this.tabListSize[index].right < this.tabbarWidth / 2) { + offset = this.tabListSize[0].width; + } + } + dom.scrollToElement(el, { + offset: -offset + }); + }, + loadTabData(index) { + this.pageList[index].loadData(); + }, + clearTabData(index) { + this.pageList[index].clear(); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_swiperPage = resolveComponent("swiperPage"); + const _component_swiper_item = resolveComponent("swiper-item"); + const _component_swiper = resolveComponent("swiper"); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "tabs" }, [ + createElementVNode("scroll-view", { + ref: "tabbar1", + id: "tab-bar", + class: "tab-bar", + scroll: false, + scrollX: true, + showScrollbar: false, + scrollIntoView: $data.scrollInto + }, [ + createElementVNode("view", { style: { "flex-direction": "column" } }, [ + createElementVNode("view", { style: { "flex-direction": "row" } }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.tabList, (tab, index) => { + return openBlock(), createElementBlock("view", { + class: "uni-tab-item", + key: tab.id, + id: tab.id, + ref_for: true, + ref: "tabitem" + index, + "data-id": index, + "data-current": index, + onClick: _cache[0] || (_cache[0] = (...args) => $options.ontabtap && $options.ontabtap(...args)) + }, [ + createElementVNode("u-text", { + class: normalizeClass(["uni-tab-item-title", $data.tabIndex == index ? "uni-tab-item-title-active" : ""]) + }, toDisplayString(tab.name), 3) + ], 8, ["id", "data-id", "data-current"]); + }), 128)) + ]), + createElementVNode("view", { class: "scroll-view-indicator" }, [ + createElementVNode("view", { + ref: "underline", + class: normalizeClass(["scroll-view-underline", $data.isTap ? "scroll-view-animation" : ""]), + style: normalizeStyle({ left: $data.indicatorLineLeft + "px", width: $data.indicatorLineWidth + "px" }) + }, null, 6) + ]) + ]) + ], 8, ["scrollIntoView"]), + createElementVNode("view", { class: "tab-bar-line" }), + createVNode(_component_swiper, { + class: "tab-view", + ref: "swiper1", + id: "tab-bar-view", + current: $data.tabIndex, + duration: 300, + onChange: $options.onswiperchange, + onTransition: $options.onswiperscroll, + onAnimationfinish: $options.animationfinish, + onOnAnimationEnd: $options.animationfinish + }, { + default: withCtx(() => [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.tabList, (page, index) => { + return openBlock(), createBlock(_component_swiper_item, { + class: "swiper-item", + key: index + }, { + default: withCtx(() => [ + createVNode(_component_swiperPage, { + class: "swiper-page", + pid: page.pageid, + ref_for: true, + ref: "page" + }, null, 8, ["pid"]) + ]), + _: 2 + }, 1024); + }), 128)) + ]), + _: 1 + }, 8, ["current", "onChange", "onTransition", "onAnimationfinish", "onOnAnimationEnd"]) + ]) + ]); +} +var swiperList = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/template/swiper-list/swiper-list.nvue"]]); +export { swiperList as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/template/swiper-vertical/swiper-vertical.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/template/swiper-vertical/swiper-vertical.js new file mode 100644 index 000000000..6cabc9b4a --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/template/swiper-vertical/swiper-vertical.js @@ -0,0 +1,176 @@ +import { f as formatAppLog } from "../../../uni-shared.es.js"; +import { resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, Fragment, renderList, createBlock } from "vue"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +import "../../../shared.esm-bundler.js"; +var _style_0 = { "page": { "": { "flex": 1 } }, "swiper": { "": { "flex": 1, "backgroundColor": "#007AFF" } }, "swiper-item": { "": { "flex": 1 } }, "video": { "": { "flex": 1 } } }; +const videoData = [ + { + src: "https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/hellouniapp/hello-nvue-swiper-vertical-01.mp4" + }, + { + src: "https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/hellouniapp/hello-nvue-swiper-vertical-02.mp4" + }, + { + src: "https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/hellouniapp/hello-nvue-swiper-vertical-03.mp4" + }, + { + src: "https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/hellouniapp/hello-nvue-swiper-vertical-01.mp4" + }, + { + src: "https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/hellouniapp/hello-nvue-swiper-vertical-02.mp4" + }, + { + src: "https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/hellouniapp/hello-nvue-swiper-vertical-03.mp4" + } +]; +const _sfc_main = { + data() { + return { + circular: true, + videoList: [ + { + id: "video0", + src: "", + img: "" + }, + { + id: "video1", + src: "", + img: "" + }, + { + id: "video2", + src: "", + img: "" + } + ], + videoDataList: [] + }; + }, + onLoad(e) { + }, + onReady() { + this.init(); + this.getData(); + }, + methods: { + init() { + this._videoIndex = 0; + this._videoContextList = []; + for (var i = 0; i < this.videoList.length; i++) { + this._videoContextList.push(uni.createVideoContext("video" + i, this)); + } + this._videoDataIndex = 0; + }, + getData(e) { + this.videoDataList = videoData; + setTimeout(() => { + this.updateVideo(true); + }, 200); + }, + onSwiperChange(e) { + let currentIndex = e.detail.current; + if (currentIndex === this._videoIndex) { + return; + } + let isNext = false; + if (currentIndex === 0 && this._videoIndex === this.videoList.length - 1) { + isNext = true; + } else if (currentIndex === this.videoList.length - 1 && this._videoIndex === 0) { + isNext = false; + } else if (currentIndex > this._videoIndex) { + isNext = true; + } + if (isNext) { + this._videoDataIndex++; + } else { + this._videoDataIndex--; + } + if (this._videoDataIndex < 0) { + this._videoDataIndex = this.videoDataList.length - 1; + } else if (this._videoDataIndex >= this.videoDataList.length) { + this._videoDataIndex = 0; + } + this.circular = this._videoDataIndex != 0; + if (this._videoIndex >= 0) { + this._videoContextList[this._videoIndex].pause(); + this._videoContextList[this._videoIndex].seek(0); + } + this._videoIndex = currentIndex; + setTimeout(() => { + this.updateVideo(isNext); + }, 200); + }, + getNextIndex(isNext) { + let index = this._videoIndex + (isNext ? 1 : -1); + if (index < 0) { + return this.videoList.length - 1; + } else if (index >= this.videoList.length) { + return 0; + } + return index; + }, + getNextDataIndex(isNext) { + let index = this._videoDataIndex + (isNext ? 1 : -1); + if (index < 0) { + return this.videoDataList.length - 1; + } else if (index >= this.videoDataList.length) { + return 0; + } + return index; + }, + updateVideo(isNext) { + this.$set(this.videoList[this._videoIndex], "src", this.videoDataList[this._videoDataIndex].src); + this.$set(this.videoList[this.getNextIndex(isNext)], "src", this.videoDataList[this.getNextDataIndex(isNext)].src); + setTimeout(() => { + this._videoContextList[this._videoIndex].play(); + }, 200); + formatAppLog("log", "at pages/template/swiper-vertical/swiper-vertical.nvue:139", "v:" + this._videoIndex + " d:" + this._videoDataIndex + "; next v:" + this.getNextIndex(isNext) + " next d:" + this.getNextDataIndex(isNext)); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_swiper_item = resolveComponent("swiper-item"); + const _component_swiper = resolveComponent("swiper"); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "page" }, [ + createVNode(_component_swiper, { + class: "swiper", + circular: $data.circular, + vertical: true, + onChange: $options.onSwiperChange + }, { + default: withCtx(() => [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.videoList, (item) => { + return openBlock(), createBlock(_component_swiper_item, { + key: item.id + }, { + default: withCtx(() => [ + createElementVNode("u-video", { + class: "video", + id: item.id, + ref_for: true, + ref: item.id, + src: item.src, + controls: false, + loop: true, + showCenterPlayBtn: false + }, null, 8, ["id", "src"]) + ]), + _: 2 + }, 1024); + }), 128)) + ]), + _: 1 + }, 8, ["circular", "onChange"]) + ]) + ]); +} +var swiperVertical = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/template/swiper-vertical/swiper-vertical.nvue"]]); +export { swiperVertical as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/pages/template/tabbar/tabbar.js b/fe/PDA/unpackage/dist/dev/.nvue/pages/template/tabbar/tabbar.js new file mode 100644 index 000000000..0c1a89a8f --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/pages/template/tabbar/tabbar.js @@ -0,0 +1,417 @@ +import { openBlock, createElementBlock, Fragment, createCommentVNode, createElementVNode, normalizeStyle, normalizeClass, toDisplayString, renderList, withModifiers, resolveComponent, createVNode, withCtx, createBlock } from "vue"; +import { _ as _export_sfc } from "../../../plugin-vue_export-helper.js"; +var _style_0$1 = { "view": { "": { "flexDirection": "column" } }, "flex-row": { "": { "flexDirection": "row" } }, "flex-col": { "": { "flexDirection": "column" } }, "list-cell": { "": { "width": "750rpx", "paddingTop": 0, "paddingRight": "30rpx", "paddingBottom": 0, "paddingLeft": "30rpx" } }, "uni-list-cell-hover": { "": { "backgroundColor": "#eeeeee" } }, "media-item": { "": { "position": "relative", "flex": 1, "flexDirection": "column", "paddingTop": "20rpx", "paddingRight": "30rpx", "paddingBottom": "21rpx", "paddingLeft": "30rpx" } }, "media-item-hover": { "": { "backgroundColor": "#eeeeee" } }, "media-item-line": { "": { "position": "absolute", "left": "30rpx", "right": "30rpx", "bottom": 0, "height": "1rpx", "backgroundColor": "#ebebeb" } }, "media-image-right": { "": { "flexDirection": "row" } }, "media-image-left": { "": { "flexDirection": "row-reverse" } }, "media-title": { "": { "flex": 1, "lines": 3, "textOverflow": "ellipsis", "fontSize": "30rpx", "color": "#555555" } }, "media-title2": { "": { "flex": 1, "marginTop": "6rpx", "lineHeight": "40rpx" } }, "image-section": { "": { "marginTop": "20rpx", "flexDirection": "row", "justifyContent": "space-between" } }, "image-section-right": { "": { "marginTop": "0rpx", "marginLeft": "10rpx", "width": "225rpx", "height": "146rpx" } }, "image-section-left": { "": { "marginTop": "0rpx", "marginRight": "10rpx", "width": "225rpx", "height": "146rpx" } }, "image-list1": { "": { "width": "690rpx", "height": "481rpx" } }, "image-list2": { "": { "width": "225rpx", "height": "146rpx" } }, "image-list3": { "": { "width": "225rpx", "height": "146rpx" } }, "media-info": { "": { "flexDirection": "row", "alignItems": "center" } }, "info-text": { "": { "marginRight": "20rpx", "color": "#999999", "fontSize": "24rpx" } }, "media-foot": { "": { "marginTop": "25rpx", "flexDirection": "row", "alignItems": "center", "justifyContent": "space-between" } }, "max-close-view": { "": { "position": "relative", "alignItems": "center", "flexDirection": "row", "width": "40rpx", "height": "30rpx", "lineHeight": "30rpx", "borderWidth": "1rpx", "borderStyle": "solid", "borderColor": "#aaaaaa", "borderRadius": 4, "justifyContent": "center", "textAlign": "center" } }, "close-l": { "": { "position": "absolute", "width": "18rpx", "height": "1rpx", "backgroundColor": "#aaaaaa" } }, "close-h": { "": { "transform": "rotate(45deg)" } }, "close-v": { "": { "transform": "rotate(-45deg)" } } }; +const _sfc_main$1 = { + props: { + options: { + type: Object, + default: function(e) { + return {}; + } + } + }, + methods: { + click() { + this.$emit("click"); + }, + close(e) { + this.$emit("close"); + } + } +}; +function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock(Fragment, null, [ + createCommentVNode(" remove list-cell layer fix android 4.x overflow limit error: 28 layers! "), + createCommentVNode(' '), + $props.options.title ? (openBlock(), createElementBlock("view", { + key: 0, + class: "media-item view", + hoverClass: "media-item-hover", + onClick: _cache[1] || (_cache[1] = (...args) => $options.click && $options.click(...args)) + }, [ + createCommentVNode(` `), + createCommentVNode(" TODO \u5728\u652F\u4ED8\u5B9D\u5C0F\u7A0B\u5E8F\u4E0B \u9700\u8981\u7528 style \u8986\u76D6\u6807\u7B7E\u7684\u9ED8\u8BA4\u6837\u5F0F "), + createElementVNode("view", { + class: "view", + style: normalizeStyle({ flexDirection: $props.options.article_type === 1 || $props.options.article_type === 2 ? $props.options.article_type === 2 ? "row" : "row-reverse" : "column" }) + }, [ + createElementVNode("u-text", { + class: normalizeClass(["media-title", { "media-title2": $props.options.article_type === 1 || $props.options.article_type === 2 }]) + }, toDisplayString($props.options.title), 3), + $props.options.image_list || $props.options.image_url ? (openBlock(), createElementBlock("view", { + key: 0, + class: normalizeClass(["image-section flex-row", { "image-section-right": $props.options.article_type === 2, "image-section-left": $props.options.article_type === 1 }]), + style: { flexDirection: "row" } + }, [ + $props.options.image_url ? (openBlock(), createElementBlock("u-image", { + key: 0, + class: normalizeClass(["image-list1", { "image-list2": $props.options.article_type === 1 || $props.options.article_type === 2 }]), + src: $props.options.image_url + }, null, 10, ["src"])) : createCommentVNode("v-if", true), + $props.options.image_list ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList($props.options.image_list, (source, i) => { + return openBlock(), createElementBlock("u-image", { + class: "image-list3", + src: source.url, + key: i + }, null, 8, ["src"]); + }), 128)) : createCommentVNode("v-if", true) + ], 2)) : createCommentVNode("v-if", true) + ], 4), + createElementVNode("view", { + class: "media-foot flex-row", + style: { "flex-direction": "row" } + }, [ + createElementVNode("view", { + class: "media-info flex-row", + style: { "flex-direction": "row" } + }, [ + createElementVNode("u-text", { class: "info-text" }, toDisplayString($props.options.source), 1), + createElementVNode("u-text", { class: "info-text" }, toDisplayString($props.options.comment_count) + "\u6761\u8BC4\u8BBA", 1), + createElementVNode("u-text", { class: "info-text" }, toDisplayString($props.options.datetime), 1) + ]), + createElementVNode("view", { + class: "max-close-view", + onClick: _cache[0] || (_cache[0] = withModifiers((...args) => $options.close && $options.close(...args), ["stop"])) + }, [ + createElementVNode("view", { class: "close-l close-h" }), + createElementVNode("view", { class: "close-l close-v" }) + ]) + ]), + createElementVNode("view", { + class: "media-item-line", + style: { "position": "absolute" } + }) + ])) : createCommentVNode("v-if", true) + ], 2112); +} +var mediaItem = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["styles", [_style_0$1]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/template/tabbar/news-item.nvue"]]); +var _style_0 = { "tabs": { "": { "flex": 1, "flexDirection": "column", "overflow": "hidden", "backgroundColor": "#ffffff" } }, "scroll-h": { "": { "width": "750rpx", "height": "80rpx", "flexDirection": "row" } }, "line-h": { "": { "height": "1rpx", "backgroundColor": "#cccccc" } }, "uni-tab-item": { "": { "flexWrap": "nowrap", "paddingLeft": "34rpx", "paddingRight": "34rpx" } }, "uni-tab-item-title": { "": { "color": "#555555", "fontSize": "30rpx", "height": "80rpx", "lineHeight": "80rpx", "flexWrap": "nowrap" } }, "uni-tab-item-title-active": { "": { "color": "#007AFF" } }, "swiper-box": { "": { "flex": 1 } }, "swiper-item": { "": { "flex": 1, "flexDirection": "row" } }, "scroll-v": { "": { "flex": 1, "flexDirection": "column", "width": 100 } }, "update-tips": { "": { "position": "absolute", "left": 0, "top": 41, "right": 0, "paddingTop": 5, "paddingBottom": 5, "backgroundColor": "#FDDD9B", "alignItems": "center", "justifyContent": "center", "textAlign": "center" } }, "update-tips-text": { "": { "fontSize": 14, "color": "#ffffff" } }, "refresh": { "": { "width": 100, "height": 64, "justifyContent": "center" } }, "refresh-view": { "": { "flexDirection": "row", "flexWrap": "nowrap", "alignItems": "center", "justifyContent": "center" } }, "refresh-icon": { "": { "width": 30, "height": 30, "transitionDuration": 500, "transitionProperty": "transform", "transform": "rotate(0deg)", "transformOrigin": "15px 15px" } }, "refresh-icon-active": { "": { "transform": "rotate(180deg)" } }, "loading-icon": { "": { "width": 20, "height": 20, "marginRight": 5, "color": "#999999" } }, "loading-text": { "": { "marginLeft": 2, "fontSize": 16, "color": "#999999" } }, "loading-more": { "": { "alignItems": "center", "justifyContent": "center", "paddingTop": 10, "paddingBottom": 10, "textAlign": "center" } }, "loading-more-text": { "": { "fontSize": "28rpx", "color": "#999999" } }, "@TRANSITION": { "refresh-icon": { "duration": 500, "property": "transform" } } }; +const MAX_CACHE_DATA = 100; +const MAX_CACHE_PAGE = 3; +const newsData = { + data0: { + "datetime": "40\u5206\u949F\u524D", + "article_type": 0, + "title": "uni-app\u884C\u4E1A\u5CF0\u4F1A\u9891\u9891\u4EAE\u76F8\uFF0C\u5F00\u53D1\u8005\u53CD\u54CD\u70ED\u70C8!", + "source": "DCloud", + "comment_count": 639 + }, + data1: { + "datetime": "\u4E00\u5929\u524D", + "article_type": 1, + "title": "DCloud\u5B8C\u6210B2\u8F6E\u878D\u8D44\uFF0Cuni-app\u9707\u64BC\u53D1\u5E03!", + "image_url": "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/b7c7f970-517d-11eb-97b7-0dc4655d6e68.jpg", + "source": "DCloud", + "comment_count": 11395 + }, + data2: { + "datetime": "\u4E00\u5929\u524D", + "article_type": 2, + "title": "\u4E2D\u56FD\u6280\u672F\u754C\u5C0F\u5947\u8FF9\uFF1AHBuilder\u5F00\u53D1\u8005\u7A81\u7834200\u4E07", + "image_url": "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/b4cd3000-517d-11eb-a16f-5b3e54966275.jpg", + "source": "DCloud", + "comment_count": 11395 + }, + data3: { + "article_type": 3, + "image_list": [{ + "url": "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/b2e201d0-517d-11eb-8a36-ebb87efcf8c0.jpg", + "width": 563, + "height": 316 + }, { + "url": "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/b4cd3000-517d-11eb-a16f-5b3e54966275.jpg", + "width": 641, + "height": 360 + }, { + "url": "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/b7c7f970-517d-11eb-97b7-0dc4655d6e68.jpg", + "width": 640, + "height": 360 + }], + "datetime": "5\u5206\u949F\u524D", + "title": "uni-app \u652F\u6301\u4F7F\u7528 npm \u5B89\u88C5\u7B2C\u4E09\u65B9\u5305\uFF0C\u751F\u6001\u66F4\u8D8B\u4E30\u5BCC", + "source": "DCloud", + "comment_count": 11 + }, + data4: { + "datetime": "2\u5C0F\u65F6\u524D", + "article_type": 4, + "title": "uni-app \u652F\u6301\u539F\u751F\u5C0F\u7A0B\u5E8F\u81EA\u5B9A\u4E49\u7EC4\u4EF6\uFF0C\u66F4\u5F00\u653E\u3001\u66F4\u81EA\u7531", + "image_url": "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/b2e201d0-517d-11eb-8a36-ebb87efcf8c0.jpg", + "source": "DCloud", + "comment_count": 69 + } +}; +const _sfc_main = { + components: { + mediaItem + }, + data() { + return { + newsList: [], + cacheTab: [], + tabIndex: 0, + tabBars: [{ + name: "\u5173\u6CE8", + id: "guanzhu" + }, { + name: "\u63A8\u8350", + id: "tuijian" + }, { + name: "\u4F53\u80B2", + id: "tiyu" + }, { + name: "\u70ED\u70B9", + id: "redian" + }, { + name: "\u8D22\u7ECF", + id: "caijing" + }, { + name: "\u5A31\u4E50", + id: "yule" + }, { + name: "\u519B\u4E8B", + id: "junshi" + }, { + name: "\u5386\u53F2", + id: "lishi" + }, { + name: "\u672C\u5730", + id: "bendi" + }], + scrollInto: "", + showTips: false, + navigateFlag: false, + pulling: false, + refreshIcon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAB5QTFRFcHBw3Nzct7e39vb2ycnJioqK7e3tpqam29vb////D8oK7wAAAAp0Uk5T////////////ALLMLM8AAABxSURBVHja7JVBDoAgDASrjqj//7CJBi90iyYeOHTPMwmFZrHjYyyFYYUy1bwUZqtJIYVxhf1a6u0R7iUvWsCcrEtwJHp8MwMdvh2amHduiZD3rpWId9+BgPd7Cc2LIkPyqvlQvKxKBJ//Qwq/CacAAwDUv0a0YuKhzgAAAABJRU5ErkJggg==" + }; + }, + onLoad() { + setTimeout(() => { + this.tabBars.forEach((tabBar) => { + this.newsList.push({ + data: [], + isLoading: false, + refreshText: "", + loadingText: "\u52A0\u8F7D\u66F4\u591A..." + }); + }); + this.getList(0); + }, 350); + }, + methods: { + getList(index) { + let activeTab = this.newsList[index]; + let list = []; + for (let i = 1; i <= 10; i++) { + let item = Object.assign({}, newsData["data" + Math.floor(Math.random() * 5)]); + item.id = this.newGuid(); + list.push(item); + } + activeTab.data = activeTab.data.concat(list); + }, + goDetail(e) { + if (this.navigateFlag) { + return; + } + this.navigateFlag = true; + uni.navigateTo({ + url: "./detail/detail?title=" + e.title + }); + setTimeout(() => { + this.navigateFlag = false; + }, 200); + }, + close(index1, index2) { + uni.showModal({ + content: "\u662F\u5426\u5220\u9664\u672C\u6761\u4FE1\u606F\uFF1F", + success: (res) => { + if (res.confirm) { + this.newsList[index1].data.splice(index2, 1); + } + } + }); + }, + loadMore(e) { + setTimeout(() => { + this.getList(this.tabIndex); + }, 500); + }, + ontabtap(e) { + let index = e.target.dataset.current || e.currentTarget.dataset.current; + this.switchTab(index); + }, + ontabchange(e) { + let index = e.target.current || e.detail.current; + this.switchTab(index); + }, + switchTab(index) { + if (this.newsList[index].data.length === 0) { + this.getList(index); + } + if (this.tabIndex === index) { + return; + } + if (this.newsList[this.tabIndex].data.length > MAX_CACHE_DATA) { + let isExist = this.cacheTab.indexOf(this.tabIndex); + if (isExist < 0) { + this.cacheTab.push(this.tabIndex); + } + } + this.tabIndex = index; + this.scrollInto = this.tabBars[index].id; + if (this.cacheTab.length > MAX_CACHE_PAGE) { + let cacheIndex = this.cacheTab[0]; + this.clearTabData(cacheIndex); + this.cacheTab.splice(0, 1); + } + }, + clearTabData(e) { + this.newsList[e].data.length = 0; + this.newsList[e].loadingText = "\u52A0\u8F7D\u66F4\u591A..."; + }, + refreshData() { + }, + onrefresh(e) { + var tab = this.newsList[this.tabIndex]; + if (!tab.refreshFlag) { + return; + } + tab.refreshing = true; + tab.refreshText = "\u6B63\u5728\u5237\u65B0..."; + setTimeout(() => { + this.refreshData(); + this.pulling = true; + tab.refreshing = false; + tab.refreshFlag = false; + tab.refreshText = "\u5DF2\u5237\u65B0"; + setTimeout(() => { + this.pulling = false; + }, 500); + }, 2e3); + }, + onpullingdown(e) { + var tab = this.newsList[this.tabIndex]; + if (tab.refreshing || this.pulling) { + return; + } + if (Math.abs(e.pullingDistance) > Math.abs(e.viewHeight)) { + tab.refreshFlag = true; + tab.refreshText = "\u91CA\u653E\u7ACB\u5373\u5237\u65B0"; + } else { + tab.refreshFlag = false; + tab.refreshText = "\u4E0B\u62C9\u53EF\u4EE5\u5237\u65B0"; + } + }, + newGuid() { + let s4 = function() { + return (65536 * (1 + Math.random()) | 0).toString(16).substring(1); + }; + return (s4() + s4() + "-" + s4() + "-4" + s4().substr(0, 3) + "-" + s4() + "-" + s4() + s4() + s4()).toUpperCase(); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_media_item = resolveComponent("media-item"); + const _component_swiper_item = resolveComponent("swiper-item"); + const _component_swiper = resolveComponent("swiper"); + return openBlock(), createElementBlock("scroll-view", { + scrollY: true, + showScrollbar: true, + enableBackToTop: true, + bubble: "true", + style: { flexDirection: "column" } + }, [ + createElementVNode("view", { class: "tabs" }, [ + createElementVNode("scroll-view", { + id: "tab-bar", + class: "scroll-h", + scrollX: true, + showScrollbar: false, + scrollIntoView: $data.scrollInto + }, [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.tabBars, (tab, index) => { + return openBlock(), createElementBlock("view", { + key: tab.id, + class: "uni-tab-item", + id: tab.id, + "data-current": index, + onClick: _cache[0] || (_cache[0] = (...args) => $options.ontabtap && $options.ontabtap(...args)) + }, [ + createElementVNode("u-text", { + class: normalizeClass(["uni-tab-item-title", $data.tabIndex == index ? "uni-tab-item-title-active" : ""]) + }, toDisplayString(tab.name), 3) + ], 8, ["id", "data-current"]); + }), 128)) + ], 8, ["scrollIntoView"]), + createElementVNode("view", { class: "line-h" }), + createVNode(_component_swiper, { + current: $data.tabIndex, + class: "swiper-box", + style: { "flex": "1" }, + duration: 300, + onChange: $options.ontabchange + }, { + default: withCtx(() => [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.newsList, (tab, index1) => { + return openBlock(), createBlock(_component_swiper_item, { + class: "swiper-item", + key: index1 + }, { + default: withCtx(() => [ + createElementVNode("list", { + class: "scroll-v list", + enableBackToTop: "true", + scrollY: "", + loadmoreoffset: "15", + onLoadmore: ($event) => $options.loadMore(index1) + }, [ + createElementVNode("refresh", { + class: "refresh", + onRefresh: ($event) => $options.onrefresh(index1), + onPullingdown: _cache[1] || (_cache[1] = (...args) => $options.onpullingdown && $options.onpullingdown(...args)), + display: tab.refreshing ? "show" : "hide" + }, [ + createElementVNode("div", { class: "refresh-view" }, [ + createElementVNode("u-image", { + class: normalizeClass(["refresh-icon", { "refresh-icon-active": tab.refreshFlag }]), + src: $data.refreshIcon, + style: normalizeStyle({ width: tab.refreshing || $data.pulling ? 0 : "30px" }) + }, null, 14, ["src"]), + tab.refreshing ? (openBlock(), createElementBlock("loading-indicator", { + key: 0, + class: "loading-icon", + animating: "true" + })) : createCommentVNode("v-if", true), + createElementVNode("u-text", { class: "loading-text" }, toDisplayString(tab.refreshText), 1) + ]) + ], 40, ["onRefresh", "display"]), + (openBlock(true), createElementBlock(Fragment, null, renderList(tab.data, (newsitem, index2) => { + return openBlock(), createElementBlock("cell", { + key: newsitem.id + }, [ + createVNode(_component_media_item, { + options: newsitem, + onClose: ($event) => $options.close(index1, index2), + onClick: ($event) => $options.goDetail(newsitem) + }, null, 8, ["options", "onClose", "onClick"]) + ]); + }), 128)), + tab.isLoading || tab.data.length > 4 ? (openBlock(), createElementBlock("cell", { + key: 0, + class: "loading-more" + }, [ + createElementVNode("u-text", { class: "loading-more-text" }, toDisplayString(tab.loadingText), 1) + ])) : createCommentVNode("v-if", true) + ], 40, ["onLoadmore"]) + ]), + _: 2 + }, 1024); + }), 128)) + ]), + _: 1 + }, 8, ["current", "onChange"]) + ]) + ]); +} +var tabbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/pages/template/tabbar/tabbar.nvue"]]); +export { tabbar as default }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/plugin-vue_export-helper.js b/fe/PDA/unpackage/dist/dev/.nvue/plugin-vue_export-helper.js new file mode 100644 index 000000000..9e7f4543b --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/plugin-vue_export-helper.js @@ -0,0 +1,8 @@ +var _export_sfc = (sfc, props) => { + const target = sfc.__vccOpts || sfc; + for (const [key, val] of props) { + target[key] = val; + } + return target; +}; +export { _export_sfc as _ }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/shared.esm-bundler.js b/fe/PDA/unpackage/dist/dev/.nvue/shared.esm-bundler.js new file mode 100644 index 000000000..d180c15ca --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/shared.esm-bundler.js @@ -0,0 +1,9 @@ +Object.freeze({}); +Object.freeze([]); +const isString = (val) => typeof val === "string"; +const objectToString = Object.prototype.toString; +const toTypeString = (value) => objectToString.call(value); +const toRawType = (value) => { + return toTypeString(value).slice(8, -1); +}; +export { toRawType as a, isString as i, toTypeString as t }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/static/uni.ttf b/fe/PDA/unpackage/dist/dev/.nvue/static/uni.ttf new file mode 100644 index 000000000..60a1968d0 Binary files /dev/null and b/fe/PDA/unpackage/dist/dev/.nvue/static/uni.ttf differ diff --git a/fe/PDA/unpackage/dist/dev/.nvue/u-link.js b/fe/PDA/unpackage/dist/dev/.nvue/u-link.js new file mode 100644 index 000000000..00a888274 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/u-link.js @@ -0,0 +1,34 @@ +import { openBlock, createElementBlock, toDisplayString } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.js"; +const _sfc_main = { + name: "u-link", + props: { + href: { + type: String, + default: "" + }, + text: { + type: String, + default: "" + }, + inWhiteList: { + type: Boolean, + default: false + } + }, + methods: { + openURL() { + plus.runtime.openURL(this.href); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("u-text", { + style: { "text-decoration": "underline" }, + href: $props.href, + onClick: _cache[0] || (_cache[0] = (...args) => $options.openURL && $options.openURL(...args)), + inWhiteList: $props.inWhiteList + }, toDisplayString($props.text), 9, ["href", "inWhiteList"]); +} +var __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/components/u-link/u-link.vue"]]); +export { __easycom_0 as _ }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/uni-app.es.js b/fe/PDA/unpackage/dist/dev/.nvue/uni-app.es.js new file mode 100644 index 000000000..902418935 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/uni-app.es.js @@ -0,0 +1,12 @@ +import "vue"; +import { i as isString } from "./shared.esm-bundler.js"; +function getCurrentSubNVue() { + return uni.getSubNVueById(plus.webview.currentWebview().id); +} +function requireNativePlugin(name) { + return weex.requireModule(name); +} +function resolveEasycom(component, easycom) { + return isString(component) ? easycom : component; +} +export { requireNativePlugin as a, getCurrentSubNVue as g, resolveEasycom as r }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/uni-badge.js b/fe/PDA/unpackage/dist/dev/.nvue/uni-badge.js new file mode 100644 index 000000000..4ce12e0b8 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/uni-badge.js @@ -0,0 +1,142 @@ +import { openBlock, createElementBlock, renderSlot, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.js"; +var _style_0 = { "uni-badge--x": { "": { "position": "relative" } }, "uni-badge--absolute": { "": { "position": "absolute" } }, "uni-badge--small": { "": { "transform": "scale(0.8)", "transformOrigin": "center center" } }, "uni-badge": { "": { "justifyContent": "center", "flexDirection": "row", "height": 20, "lineHeight": 18, "color": "#ffffff", "borderRadius": 100, "backgroundColor": "rgba(0,0,0,0)", "borderWidth": 1, "borderStyle": "solid", "borderColor": "#ffffff", "textAlign": "center", "fontFamily": '"Helvetica Neue", Helvetica, sans-serif', "fontSize": 12 } }, "uni-badge--info": { "": { "color": "#ffffff", "backgroundColor": "#909399" } }, "uni-badge--primary": { "": { "backgroundColor": "#2979ff" } }, "uni-badge--success": { "": { "backgroundColor": "#4cd964" } }, "uni-badge--warning": { "": { "backgroundColor": "#f0ad4e" } }, "uni-badge--error": { "": { "backgroundColor": "#dd524d" } }, "uni-badge--inverted": { "": { "paddingTop": 0, "paddingRight": 5, "paddingBottom": 0, "paddingLeft": 0, "color": "#909399" } }, "uni-badge--info-inverted": { "": { "color": "#909399", "backgroundColor": "rgba(0,0,0,0)" } }, "uni-badge--primary-inverted": { "": { "color": "#2979ff", "backgroundColor": "rgba(0,0,0,0)" } }, "uni-badge--success-inverted": { "": { "color": "#4cd964", "backgroundColor": "rgba(0,0,0,0)" } }, "uni-badge--warning-inverted": { "": { "color": "#f0ad4e", "backgroundColor": "rgba(0,0,0,0)" } }, "uni-badge--error-inverted": { "": { "color": "#dd524d", "backgroundColor": "rgba(0,0,0,0)" } } }; +const _sfc_main = { + name: "UniBadge", + emits: ["click"], + props: { + type: { + type: String, + default: "error" + }, + inverted: { + type: Boolean, + default: false + }, + isDot: { + type: Boolean, + default: false + }, + maxNum: { + type: Number, + default: 99 + }, + absolute: { + type: String, + default: "" + }, + offset: { + type: Array, + default() { + return [0, 0]; + } + }, + text: { + type: [String, Number], + default: "" + }, + size: { + type: String, + default: "small" + }, + customStyle: { + type: Object, + default() { + return {}; + } + } + }, + data() { + return {}; + }, + computed: { + width() { + return String(this.text).length * 8 + 12; + }, + classNames() { + const { + inverted, + type, + size, + absolute + } = this; + return [ + inverted ? "uni-badge--" + type + "-inverted" : "", + "uni-badge--" + type, + "uni-badge--" + size, + absolute ? "uni-badge--absolute" : "" + ].join(" "); + }, + positionStyle() { + if (!this.absolute) + return {}; + let w = this.width / 2, h = 10; + if (this.isDot) { + w = 5; + h = 5; + } + const x = `${-w + this.offset[0]}px`; + const y = `${-h + this.offset[1]}px`; + const whiteList = { + rightTop: { + right: x, + top: y + }, + rightBottom: { + right: x, + bottom: y + }, + leftBottom: { + left: x, + bottom: y + }, + leftTop: { + left: x, + top: y + } + }; + const match = whiteList[this.absolute]; + return match ? match : whiteList["rightTop"]; + }, + badgeWidth() { + return { + width: `${this.width}px` + }; + }, + dotStyle() { + if (!this.isDot) + return {}; + return { + width: "10px", + height: "10px", + borderRadius: "10px" + }; + }, + displayValue() { + const { + isDot, + text, + maxNum + } = this; + return isDot ? "" : Number(text) > maxNum ? `${maxNum}+` : text; + } + }, + methods: { + onClick() { + this.$emit("click"); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("view", { class: "uni-badge--x" }, [ + renderSlot(_ctx.$slots, "default"), + $props.text ? (openBlock(), createElementBlock("u-text", { + key: 0, + class: normalizeClass([$options.classNames, "uni-badge"]), + style: normalizeStyle([$options.badgeWidth, $options.positionStyle, $props.customStyle, $options.dotStyle]), + onClick: _cache[0] || (_cache[0] = ($event) => $options.onClick()) + }, toDisplayString($options.displayValue), 7)) : createCommentVNode("v-if", true) + ]); +} +var __easycom_5 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-badge/components/uni-badge/uni-badge.vue"]]); +export { __easycom_5 as _ }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/uni-card.js b/fe/PDA/unpackage/dist/dev/.nvue/uni-card.js new file mode 100644 index 000000000..4e9e131de --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/uni-card.js @@ -0,0 +1,135 @@ +import { openBlock, createElementBlock, normalizeClass, normalizeStyle, createCommentVNode, renderSlot, createElementVNode, toDisplayString } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.js"; +var _style_0 = { "uni-card": { "": { "marginTop": 10, "marginRight": 10, "marginBottom": 10, "marginLeft": 10, "paddingTop": 0, "paddingRight": 8, "paddingBottom": 0, "paddingLeft": 8, "borderRadius": 4, "overflow": "hidden", "fontFamily": "Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif", "backgroundColor": "#ffffff", "flex": 1 } }, "uni-card__cover": { ".uni-card ": { "position": "relative", "marginTop": 10, "flexDirection": "row", "overflow": "hidden", "borderRadius": 4 } }, "uni-card__cover-image": { ".uni-card .uni-card__cover ": { "flex": 1 } }, "uni-card__header": { ".uni-card ": { "display": "flex", "borderBottomWidth": 1, "borderBottomStyle": "solid", "borderBottomColor": "#EBEEF5", "flexDirection": "row", "alignItems": "center", "paddingTop": 10, "paddingRight": 10, "paddingBottom": 10, "paddingLeft": 10, "overflow": "hidden" } }, "uni-card__header-box": { ".uni-card .uni-card__header ": { "flex": 1, "flexDirection": "row", "alignItems": "center", "overflow": "hidden" } }, "uni-card__header-avatar": { ".uni-card .uni-card__header ": { "width": 40, "height": 40, "overflow": "hidden", "borderRadius": 5, "marginRight": 10 } }, "uni-card__header-avatar-image": { ".uni-card .uni-card__header .uni-card__header-avatar ": { "flex": 1, "width": 40, "height": 40 } }, "uni-card__header-content": { ".uni-card .uni-card__header ": { "flexDirection": "column", "justifyContent": "center", "flex": 1, "overflow": "hidden" } }, "uni-card__header-content-title": { ".uni-card .uni-card__header .uni-card__header-content ": { "fontSize": 15, "color": "#3a3a3a" } }, "uni-card__header-content-subtitle": { ".uni-card .uni-card__header .uni-card__header-content ": { "fontSize": 12, "marginTop": 5, "color": "#909399" } }, "uni-card__header-extra": { ".uni-card .uni-card__header ": { "lineHeight": 12 } }, "uni-card__header-extra-text": { ".uni-card .uni-card__header .uni-card__header-extra ": { "fontSize": 12, "color": "#909399" } }, "uni-card__content": { ".uni-card ": { "paddingTop": 10, "paddingRight": 10, "paddingBottom": 10, "paddingLeft": 10, "fontSize": 14, "color": "#6a6a6a", "lineHeight": 22 } }, "uni-card__actions": { ".uni-card ": { "fontSize": 12 } }, "uni-card--border": { "": { "borderWidth": 1, "borderStyle": "solid", "borderColor": "#EBEEF5" } }, "uni-card--shadow": { "": { "position": "relative" } }, "uni-card--full": { "": { "marginTop": 0, "marginRight": 0, "marginBottom": 0, "marginLeft": 0, "borderLeftWidth": 0, "borderRadius": 0 } }, "uni-ellipsis": { "": { "lines": 1 } } }; +const _sfc_main = { + name: "UniCard", + emits: ["click"], + props: { + title: { + type: String, + default: "" + }, + subTitle: { + type: String, + default: "" + }, + padding: { + type: String, + default: "10px" + }, + margin: { + type: String, + default: "15px" + }, + spacing: { + type: String, + default: "0 10px" + }, + extra: { + type: String, + default: "" + }, + cover: { + type: String, + default: "" + }, + thumbnail: { + type: String, + default: "" + }, + isFull: { + type: Boolean, + default: false + }, + isShadow: { + type: Boolean, + default: true + }, + shadow: { + type: String, + default: "0px 0px 3px 1px rgba(0, 0, 0, 0.08)" + }, + border: { + type: Boolean, + default: true + } + }, + methods: { + onClick(type) { + this.$emit("click", type); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("view", { + class: normalizeClass(["uni-card", { "uni-card--full": $props.isFull, "uni-card--shadow": $props.isShadow, "uni-card--border": $props.border }]), + style: normalizeStyle({ "margin": $props.isFull ? 0 : $props.margin, "padding": $props.spacing, "box-shadow": $props.isShadow ? $props.shadow : "" }) + }, [ + createCommentVNode(" \u5C01\u9762 "), + renderSlot(_ctx.$slots, "cover", {}, () => [ + $props.cover ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-card__cover" + }, [ + createElementVNode("u-image", { + class: "uni-card__cover-image", + mode: "widthFix", + onClick: _cache[0] || (_cache[0] = ($event) => $options.onClick("cover")), + src: $props.cover + }, null, 8, ["src"]) + ])) : createCommentVNode("v-if", true) + ]), + renderSlot(_ctx.$slots, "title", {}, () => [ + $props.title || $props.extra ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-card__header" + }, [ + createCommentVNode(" \u5361\u7247\u6807\u9898 "), + createElementVNode("view", { + class: "uni-card__header-box", + onClick: _cache[1] || (_cache[1] = ($event) => $options.onClick("title")) + }, [ + $props.thumbnail ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-card__header-avatar" + }, [ + createElementVNode("u-image", { + class: "uni-card__header-avatar-image", + src: $props.thumbnail, + mode: "aspectFit" + }, null, 8, ["src"]) + ])) : createCommentVNode("v-if", true), + createElementVNode("view", { class: "uni-card__header-content" }, [ + createElementVNode("u-text", { class: "uni-card__header-content-title uni-ellipsis" }, toDisplayString($props.title), 1), + $props.title && $props.subTitle ? (openBlock(), createElementBlock("u-text", { + key: 0, + class: "uni-card__header-content-subtitle uni-ellipsis" + }, toDisplayString($props.subTitle), 1)) : createCommentVNode("v-if", true) + ]) + ]), + createElementVNode("view", { + class: "uni-card__header-extra", + onClick: _cache[2] || (_cache[2] = ($event) => $options.onClick("extra")) + }, [ + createElementVNode("u-text", { class: "uni-card__header-extra-text" }, toDisplayString($props.extra), 1) + ]) + ])) : createCommentVNode("v-if", true) + ]), + createCommentVNode(" \u5361\u7247\u5185\u5BB9 "), + createElementVNode("view", { + class: "uni-card__content", + style: normalizeStyle({ padding: $props.padding }), + onClick: _cache[3] || (_cache[3] = ($event) => $options.onClick("content")) + }, [ + renderSlot(_ctx.$slots, "default") + ], 4), + createElementVNode("view", { + class: "uni-card__actions", + onClick: _cache[4] || (_cache[4] = ($event) => $options.onClick("actions")) + }, [ + renderSlot(_ctx.$slots, "actions") + ]) + ], 6); +} +var __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-card/components/uni-card/uni-card.vue"]]); +export { __easycom_0 as _ }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/uni-cloud.es.js b/fe/PDA/unpackage/dist/dev/.nvue/uni-cloud.es.js new file mode 100644 index 000000000..29d117d39 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/uni-cloud.es.js @@ -0,0 +1,1973 @@ +var __defProp = Object.defineProperty; +var __defProps = Object.defineProperties; +var __getOwnPropDescs = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols = Object.getOwnPropertySymbols; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __propIsEnum = Object.prototype.propertyIsEnumerable; +var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues = (a2, b2) => { + for (var prop in b2 || (b2 = {})) + if (__hasOwnProp.call(b2, prop)) + __defNormalProp(a2, prop, b2[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b2)) { + if (__propIsEnum.call(b2, prop)) + __defNormalProp(a2, prop, b2[prop]); + } + return a2; +}; +var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2)); +import { i as initVueI18n } from "./uni-i18n.es.js"; +function t(e) { + return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; +} +function n(e, t2, n2) { + return e(n2 = { path: t2, exports: {}, require: function(e2, t3) { + return function() { + throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs"); + }(t3 == null && n2.path); + } }, n2.exports), n2.exports; +} +var s = n(function(e, t2) { + var n2; + e.exports = (n2 = n2 || function(e2, t3) { + var n3 = Object.create || function() { + function e3() { + } + return function(t4) { + var n4; + return e3.prototype = t4, n4 = new e3(), e3.prototype = null, n4; + }; + }(), s2 = {}, o2 = s2.lib = {}, r2 = o2.Base = { extend: function(e3) { + var t4 = n3(this); + return e3 && t4.mixIn(e3), t4.hasOwnProperty("init") && this.init !== t4.init || (t4.init = function() { + t4.$super.init.apply(this, arguments); + }), t4.init.prototype = t4, t4.$super = this, t4; + }, create: function() { + var e3 = this.extend(); + return e3.init.apply(e3, arguments), e3; + }, init: function() { + }, mixIn: function(e3) { + for (var t4 in e3) + e3.hasOwnProperty(t4) && (this[t4] = e3[t4]); + e3.hasOwnProperty("toString") && (this.toString = e3.toString); + }, clone: function() { + return this.init.prototype.extend(this); + } }, i2 = o2.WordArray = r2.extend({ init: function(e3, n4) { + e3 = this.words = e3 || [], this.sigBytes = n4 != t3 ? n4 : 4 * e3.length; + }, toString: function(e3) { + return (e3 || c2).stringify(this); + }, concat: function(e3) { + var t4 = this.words, n4 = e3.words, s3 = this.sigBytes, o3 = e3.sigBytes; + if (this.clamp(), s3 % 4) + for (var r3 = 0; r3 < o3; r3++) { + var i3 = n4[r3 >>> 2] >>> 24 - r3 % 4 * 8 & 255; + t4[s3 + r3 >>> 2] |= i3 << 24 - (s3 + r3) % 4 * 8; + } + else + for (r3 = 0; r3 < o3; r3 += 4) + t4[s3 + r3 >>> 2] = n4[r3 >>> 2]; + return this.sigBytes += o3, this; + }, clamp: function() { + var t4 = this.words, n4 = this.sigBytes; + t4[n4 >>> 2] &= 4294967295 << 32 - n4 % 4 * 8, t4.length = e2.ceil(n4 / 4); + }, clone: function() { + var e3 = r2.clone.call(this); + return e3.words = this.words.slice(0), e3; + }, random: function(t4) { + for (var n4, s3 = [], o3 = function(t5) { + t5 = t5; + var n5 = 987654321, s4 = 4294967295; + return function() { + var o4 = ((n5 = 36969 * (65535 & n5) + (n5 >> 16) & s4) << 16) + (t5 = 18e3 * (65535 & t5) + (t5 >> 16) & s4) & s4; + return o4 /= 4294967296, (o4 += 0.5) * (e2.random() > 0.5 ? 1 : -1); + }; + }, r3 = 0; r3 < t4; r3 += 4) { + var a3 = o3(4294967296 * (n4 || e2.random())); + n4 = 987654071 * a3(), s3.push(4294967296 * a3() | 0); + } + return new i2.init(s3, t4); + } }), a2 = s2.enc = {}, c2 = a2.Hex = { stringify: function(e3) { + for (var t4 = e3.words, n4 = e3.sigBytes, s3 = [], o3 = 0; o3 < n4; o3++) { + var r3 = t4[o3 >>> 2] >>> 24 - o3 % 4 * 8 & 255; + s3.push((r3 >>> 4).toString(16)), s3.push((15 & r3).toString(16)); + } + return s3.join(""); + }, parse: function(e3) { + for (var t4 = e3.length, n4 = [], s3 = 0; s3 < t4; s3 += 2) + n4[s3 >>> 3] |= parseInt(e3.substr(s3, 2), 16) << 24 - s3 % 8 * 4; + return new i2.init(n4, t4 / 2); + } }, u2 = a2.Latin1 = { stringify: function(e3) { + for (var t4 = e3.words, n4 = e3.sigBytes, s3 = [], o3 = 0; o3 < n4; o3++) { + var r3 = t4[o3 >>> 2] >>> 24 - o3 % 4 * 8 & 255; + s3.push(String.fromCharCode(r3)); + } + return s3.join(""); + }, parse: function(e3) { + for (var t4 = e3.length, n4 = [], s3 = 0; s3 < t4; s3++) + n4[s3 >>> 2] |= (255 & e3.charCodeAt(s3)) << 24 - s3 % 4 * 8; + return new i2.init(n4, t4); + } }, l2 = a2.Utf8 = { stringify: function(e3) { + try { + return decodeURIComponent(escape(u2.stringify(e3))); + } catch (e4) { + throw new Error("Malformed UTF-8 data"); + } + }, parse: function(e3) { + return u2.parse(unescape(encodeURIComponent(e3))); + } }, h2 = o2.BufferedBlockAlgorithm = r2.extend({ reset: function() { + this._data = new i2.init(), this._nDataBytes = 0; + }, _append: function(e3) { + typeof e3 == "string" && (e3 = l2.parse(e3)), this._data.concat(e3), this._nDataBytes += e3.sigBytes; + }, _process: function(t4) { + var n4 = this._data, s3 = n4.words, o3 = n4.sigBytes, r3 = this.blockSize, a3 = o3 / (4 * r3), c3 = (a3 = t4 ? e2.ceil(a3) : e2.max((0 | a3) - this._minBufferSize, 0)) * r3, u3 = e2.min(4 * c3, o3); + if (c3) { + for (var l3 = 0; l3 < c3; l3 += r3) + this._doProcessBlock(s3, l3); + var h3 = s3.splice(0, c3); + n4.sigBytes -= u3; + } + return new i2.init(h3, u3); + }, clone: function() { + var e3 = r2.clone.call(this); + return e3._data = this._data.clone(), e3; + }, _minBufferSize: 0 }); + o2.Hasher = h2.extend({ cfg: r2.extend(), init: function(e3) { + this.cfg = this.cfg.extend(e3), this.reset(); + }, reset: function() { + h2.reset.call(this), this._doReset(); + }, update: function(e3) { + return this._append(e3), this._process(), this; + }, finalize: function(e3) { + return e3 && this._append(e3), this._doFinalize(); + }, blockSize: 16, _createHelper: function(e3) { + return function(t4, n4) { + return new e3.init(n4).finalize(t4); + }; + }, _createHmacHelper: function(e3) { + return function(t4, n4) { + return new d2.HMAC.init(e3, n4).finalize(t4); + }; + } }); + var d2 = s2.algo = {}; + return s2; + }(Math), n2); +}), o = (n(function(e, t2) { + var n2; + e.exports = (n2 = s, function(e2) { + var t3 = n2, s2 = t3.lib, o2 = s2.WordArray, r2 = s2.Hasher, i2 = t3.algo, a2 = []; + !function() { + for (var t4 = 0; t4 < 64; t4++) + a2[t4] = 4294967296 * e2.abs(e2.sin(t4 + 1)) | 0; + }(); + var c2 = i2.MD5 = r2.extend({ _doReset: function() { + this._hash = new o2.init([1732584193, 4023233417, 2562383102, 271733878]); + }, _doProcessBlock: function(e3, t4) { + for (var n3 = 0; n3 < 16; n3++) { + var s3 = t4 + n3, o3 = e3[s3]; + e3[s3] = 16711935 & (o3 << 8 | o3 >>> 24) | 4278255360 & (o3 << 24 | o3 >>> 8); + } + var r3 = this._hash.words, i3 = e3[t4 + 0], c3 = e3[t4 + 1], f2 = e3[t4 + 2], p2 = e3[t4 + 3], g = e3[t4 + 4], m2 = e3[t4 + 5], y2 = e3[t4 + 6], _2 = e3[t4 + 7], w2 = e3[t4 + 8], k2 = e3[t4 + 9], S2 = e3[t4 + 10], v2 = e3[t4 + 11], T2 = e3[t4 + 12], A2 = e3[t4 + 13], P2 = e3[t4 + 14], I2 = e3[t4 + 15], O2 = r3[0], b2 = r3[1], C2 = r3[2], E2 = r3[3]; + O2 = u2(O2, b2, C2, E2, i3, 7, a2[0]), E2 = u2(E2, O2, b2, C2, c3, 12, a2[1]), C2 = u2(C2, E2, O2, b2, f2, 17, a2[2]), b2 = u2(b2, C2, E2, O2, p2, 22, a2[3]), O2 = u2(O2, b2, C2, E2, g, 7, a2[4]), E2 = u2(E2, O2, b2, C2, m2, 12, a2[5]), C2 = u2(C2, E2, O2, b2, y2, 17, a2[6]), b2 = u2(b2, C2, E2, O2, _2, 22, a2[7]), O2 = u2(O2, b2, C2, E2, w2, 7, a2[8]), E2 = u2(E2, O2, b2, C2, k2, 12, a2[9]), C2 = u2(C2, E2, O2, b2, S2, 17, a2[10]), b2 = u2(b2, C2, E2, O2, v2, 22, a2[11]), O2 = u2(O2, b2, C2, E2, T2, 7, a2[12]), E2 = u2(E2, O2, b2, C2, A2, 12, a2[13]), C2 = u2(C2, E2, O2, b2, P2, 17, a2[14]), O2 = l2(O2, b2 = u2(b2, C2, E2, O2, I2, 22, a2[15]), C2, E2, c3, 5, a2[16]), E2 = l2(E2, O2, b2, C2, y2, 9, a2[17]), C2 = l2(C2, E2, O2, b2, v2, 14, a2[18]), b2 = l2(b2, C2, E2, O2, i3, 20, a2[19]), O2 = l2(O2, b2, C2, E2, m2, 5, a2[20]), E2 = l2(E2, O2, b2, C2, S2, 9, a2[21]), C2 = l2(C2, E2, O2, b2, I2, 14, a2[22]), b2 = l2(b2, C2, E2, O2, g, 20, a2[23]), O2 = l2(O2, b2, C2, E2, k2, 5, a2[24]), E2 = l2(E2, O2, b2, C2, P2, 9, a2[25]), C2 = l2(C2, E2, O2, b2, p2, 14, a2[26]), b2 = l2(b2, C2, E2, O2, w2, 20, a2[27]), O2 = l2(O2, b2, C2, E2, A2, 5, a2[28]), E2 = l2(E2, O2, b2, C2, f2, 9, a2[29]), C2 = l2(C2, E2, O2, b2, _2, 14, a2[30]), O2 = h2(O2, b2 = l2(b2, C2, E2, O2, T2, 20, a2[31]), C2, E2, m2, 4, a2[32]), E2 = h2(E2, O2, b2, C2, w2, 11, a2[33]), C2 = h2(C2, E2, O2, b2, v2, 16, a2[34]), b2 = h2(b2, C2, E2, O2, P2, 23, a2[35]), O2 = h2(O2, b2, C2, E2, c3, 4, a2[36]), E2 = h2(E2, O2, b2, C2, g, 11, a2[37]), C2 = h2(C2, E2, O2, b2, _2, 16, a2[38]), b2 = h2(b2, C2, E2, O2, S2, 23, a2[39]), O2 = h2(O2, b2, C2, E2, A2, 4, a2[40]), E2 = h2(E2, O2, b2, C2, i3, 11, a2[41]), C2 = h2(C2, E2, O2, b2, p2, 16, a2[42]), b2 = h2(b2, C2, E2, O2, y2, 23, a2[43]), O2 = h2(O2, b2, C2, E2, k2, 4, a2[44]), E2 = h2(E2, O2, b2, C2, T2, 11, a2[45]), C2 = h2(C2, E2, O2, b2, I2, 16, a2[46]), O2 = d2(O2, b2 = h2(b2, C2, E2, O2, f2, 23, a2[47]), C2, E2, i3, 6, a2[48]), E2 = d2(E2, O2, b2, C2, _2, 10, a2[49]), C2 = d2(C2, E2, O2, b2, P2, 15, a2[50]), b2 = d2(b2, C2, E2, O2, m2, 21, a2[51]), O2 = d2(O2, b2, C2, E2, T2, 6, a2[52]), E2 = d2(E2, O2, b2, C2, p2, 10, a2[53]), C2 = d2(C2, E2, O2, b2, S2, 15, a2[54]), b2 = d2(b2, C2, E2, O2, c3, 21, a2[55]), O2 = d2(O2, b2, C2, E2, w2, 6, a2[56]), E2 = d2(E2, O2, b2, C2, I2, 10, a2[57]), C2 = d2(C2, E2, O2, b2, y2, 15, a2[58]), b2 = d2(b2, C2, E2, O2, A2, 21, a2[59]), O2 = d2(O2, b2, C2, E2, g, 6, a2[60]), E2 = d2(E2, O2, b2, C2, v2, 10, a2[61]), C2 = d2(C2, E2, O2, b2, f2, 15, a2[62]), b2 = d2(b2, C2, E2, O2, k2, 21, a2[63]), r3[0] = r3[0] + O2 | 0, r3[1] = r3[1] + b2 | 0, r3[2] = r3[2] + C2 | 0, r3[3] = r3[3] + E2 | 0; + }, _doFinalize: function() { + var t4 = this._data, n3 = t4.words, s3 = 8 * this._nDataBytes, o3 = 8 * t4.sigBytes; + n3[o3 >>> 5] |= 128 << 24 - o3 % 32; + var r3 = e2.floor(s3 / 4294967296), i3 = s3; + n3[15 + (o3 + 64 >>> 9 << 4)] = 16711935 & (r3 << 8 | r3 >>> 24) | 4278255360 & (r3 << 24 | r3 >>> 8), n3[14 + (o3 + 64 >>> 9 << 4)] = 16711935 & (i3 << 8 | i3 >>> 24) | 4278255360 & (i3 << 24 | i3 >>> 8), t4.sigBytes = 4 * (n3.length + 1), this._process(); + for (var a3 = this._hash, c3 = a3.words, u3 = 0; u3 < 4; u3++) { + var l3 = c3[u3]; + c3[u3] = 16711935 & (l3 << 8 | l3 >>> 24) | 4278255360 & (l3 << 24 | l3 >>> 8); + } + return a3; + }, clone: function() { + var e3 = r2.clone.call(this); + return e3._hash = this._hash.clone(), e3; + } }); + function u2(e3, t4, n3, s3, o3, r3, i3) { + var a3 = e3 + (t4 & n3 | ~t4 & s3) + o3 + i3; + return (a3 << r3 | a3 >>> 32 - r3) + t4; + } + function l2(e3, t4, n3, s3, o3, r3, i3) { + var a3 = e3 + (t4 & s3 | n3 & ~s3) + o3 + i3; + return (a3 << r3 | a3 >>> 32 - r3) + t4; + } + function h2(e3, t4, n3, s3, o3, r3, i3) { + var a3 = e3 + (t4 ^ n3 ^ s3) + o3 + i3; + return (a3 << r3 | a3 >>> 32 - r3) + t4; + } + function d2(e3, t4, n3, s3, o3, r3, i3) { + var a3 = e3 + (n3 ^ (t4 | ~s3)) + o3 + i3; + return (a3 << r3 | a3 >>> 32 - r3) + t4; + } + t3.MD5 = r2._createHelper(c2), t3.HmacMD5 = r2._createHmacHelper(c2); + }(Math), n2.MD5); +}), n(function(e, t2) { + var n2, o2, r2; + e.exports = (o2 = (n2 = s).lib.Base, r2 = n2.enc.Utf8, void (n2.algo.HMAC = o2.extend({ init: function(e2, t3) { + e2 = this._hasher = new e2.init(), typeof t3 == "string" && (t3 = r2.parse(t3)); + var n3 = e2.blockSize, s2 = 4 * n3; + t3.sigBytes > s2 && (t3 = e2.finalize(t3)), t3.clamp(); + for (var o3 = this._oKey = t3.clone(), i2 = this._iKey = t3.clone(), a2 = o3.words, c2 = i2.words, u2 = 0; u2 < n3; u2++) + a2[u2] ^= 1549556828, c2[u2] ^= 909522486; + o3.sigBytes = i2.sigBytes = s2, this.reset(); + }, reset: function() { + var e2 = this._hasher; + e2.reset(), e2.update(this._iKey); + }, update: function(e2) { + return this._hasher.update(e2), this; + }, finalize: function(e2) { + var t3 = this._hasher, n3 = t3.finalize(e2); + return t3.reset(), t3.finalize(this._oKey.clone().concat(n3)); + } }))); +}), n(function(e, t2) { + e.exports = s.HmacMD5; +})); +const r = "FUNCTION", i = "OBJECT", a = "CLIENT_DB"; +function c(e) { + return Object.prototype.toString.call(e).slice(8, -1).toLowerCase(); +} +function u(e) { + return c(e) === "object"; +} +function l(e) { + return e && typeof e == "string" ? JSON.parse(e) : e; +} +const h = true, d = "app", f = l({}.UNICLOUD_DEBUG), p = l("[]"); +let m = ""; +try { + m = "__UNI__43932FE"; +} catch (e) { +} +let y = {}; +function _(e, t2 = {}) { + var n2, s2; + return n2 = y, s2 = e, Object.prototype.hasOwnProperty.call(n2, s2) || (y[e] = t2), y[e]; +} +const w = ["invoke", "success", "fail", "complete"], k = _("_globalUniCloudInterceptor"); +function S(e, t2) { + k[e] || (k[e] = {}), u(t2) && Object.keys(t2).forEach((n2) => { + w.indexOf(n2) > -1 && function(e2, t3, n3) { + let s2 = k[e2][t3]; + s2 || (s2 = k[e2][t3] = []), s2.indexOf(n3) === -1 && typeof n3 == "function" && s2.push(n3); + }(e, n2, t2[n2]); + }); +} +function v(e, t2) { + k[e] || (k[e] = {}), u(t2) ? Object.keys(t2).forEach((n2) => { + w.indexOf(n2) > -1 && function(e2, t3, n3) { + const s2 = k[e2][t3]; + if (!s2) + return; + const o2 = s2.indexOf(n3); + o2 > -1 && s2.splice(o2, 1); + }(e, n2, t2[n2]); + }) : delete k[e]; +} +function T(e, t2) { + return e && e.length !== 0 ? e.reduce((e2, n2) => e2.then(() => n2(t2)), Promise.resolve()) : Promise.resolve(); +} +function A(e, t2) { + return k[e] && k[e][t2] || []; +} +const P = _("_globalUniCloudListener"), I = "response", O = "clientdb", b = "cloudfunction", C = "cloudobject"; +function E(e) { + return P[e] || (P[e] = []), P[e]; +} +function U(e, t2) { + const n2 = E(e); + for (let e2 = 0; e2 < n2.length; e2++) { + (0, n2[e2])(t2); + } +} +function R(e, t2) { + return t2 ? function(n2) { + let s2 = false; + if (t2 === "callFunction") { + const e2 = n2 && n2.type || r; + s2 = e2 !== r; + } + const o2 = t2 === "callFunction" && !s2; + let i2; + i2 = this.isReady ? Promise.resolve() : this.initUniCloud, n2 = n2 || {}; + const a2 = i2.then(() => s2 ? Promise.resolve() : T(A(t2, "invoke"), n2)).then(() => e.call(this, n2)).then((e2) => s2 ? Promise.resolve(e2) : T(A(t2, "success"), e2).then(() => T(A(t2, "complete"), e2)).then(() => (o2 && U(I, { type: b, content: e2 }), Promise.resolve(e2))), (e2) => s2 ? Promise.reject(e2) : T(A(t2, "fail"), e2).then(() => T(A(t2, "complete"), e2)).then(() => (U(I, { type: b, content: e2 }), Promise.reject(e2)))); + if (!(n2.success || n2.fail || n2.complete)) + return a2; + a2.then((e2) => { + n2.success && n2.success(e2), n2.complete && n2.complete(e2), o2 && U(I, { type: b, content: e2 }); + }, (e2) => { + n2.fail && n2.fail(e2), n2.complete && n2.complete(e2), o2 && U(I, { type: b, content: e2 }); + }); + } : function(t3) { + if (!((t3 = t3 || {}).success || t3.fail || t3.complete)) + return e.call(this, t3); + e.call(this, t3).then((e2) => { + t3.success && t3.success(e2), t3.complete && t3.complete(e2); + }, (e2) => { + t3.fail && t3.fail(e2), t3.complete && t3.complete(e2); + }); + }; +} +class x extends Error { + constructor(e) { + super(e.message), this.errMsg = e.message || "", this.errCode = this.code = e.code || "SYSTEM_ERROR", this.requestId = e.requestId; + } +} +function D() { + let e; + try { + if (uni.getLaunchOptionsSync) { + if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1) + return; + const { scene: t2, channel: n2 } = uni.getLaunchOptionsSync(); + e = t2 || n2; + } + } catch (e2) { + } + return e; +} +let q; +function L() { + const e = uni.getLocale && uni.getLocale() || "en"; + if (q) + return __spreadProps(__spreadValues({}, q), { locale: e, LOCALE: e }); + const t2 = uni.getSystemInfoSync(), { deviceId: n2, platform: s2, osName: o2, uniPlatform: r2, appId: i2 } = t2; + return q = __spreadValues({ PLATFORM: r2 || d, OS: o2 || s2, APPID: i2 || m, DEVICEID: n2, channel: D() }, t2), __spreadProps(__spreadValues({}, q), { locale: e, LOCALE: e }); +} +var F = { sign: function(e, t2) { + let n2 = ""; + return Object.keys(e).sort().forEach(function(t3) { + e[t3] && (n2 = n2 + "&" + t3 + "=" + e[t3]); + }), n2 = n2.slice(1), o(n2, t2).toString(); +}, wrappedRequest: function(e, t2) { + return new Promise((n2, s2) => { + t2(Object.assign(e, { complete(e2) { + e2 || (e2 = {}); + const t3 = e2.data && e2.data.header && e2.data.header["x-serverless-request-id"] || e2.header && e2.header["request-id"]; + if (!e2.statusCode || e2.statusCode >= 400) + return s2(new x({ code: "SYS_ERR", message: e2.errMsg || "request:fail", requestId: t3 })); + const o2 = e2.data; + if (o2.error) + return s2(new x({ code: o2.error.code, message: o2.error.message, requestId: t3 })); + o2.result = o2.data, o2.requestId = t3, delete o2.data, n2(o2); + } })); + }); +} }; +var N = { request: (e) => uni.request(e), uploadFile: (e) => uni.uploadFile(e), setStorageSync: (e, t2) => uni.setStorageSync(e, t2), getStorageSync: (e) => uni.getStorageSync(e), removeStorageSync: (e) => uni.removeStorageSync(e), clearStorageSync: () => uni.clearStorageSync() }, M = { "uniCloud.init.paramRequired": "{param} required", "uniCloud.uploadFile.fileError": "filePath should be instance of File" }; +const { t: j } = initVueI18n({ "zh-Hans": { "uniCloud.init.paramRequired": "\u7F3A\u5C11\u53C2\u6570\uFF1A{param}", "uniCloud.uploadFile.fileError": "filePath\u5E94\u4E3AFile\u5BF9\u8C61" }, "zh-Hant": { "uniCloud.init.paramRequired": "\u7F3A\u5C11\u53C2\u6570\uFF1A{param}", "uniCloud.uploadFile.fileError": "filePath\u5E94\u4E3AFile\u5BF9\u8C61" }, en: M, fr: { "uniCloud.init.paramRequired": "{param} required", "uniCloud.uploadFile.fileError": "filePath should be instance of File" }, es: { "uniCloud.init.paramRequired": "{param} required", "uniCloud.uploadFile.fileError": "filePath should be instance of File" }, ja: M }, "zh-Hans"); +var $ = class { + constructor(e) { + ["spaceId", "clientSecret"].forEach((t2) => { + if (!Object.prototype.hasOwnProperty.call(e, t2)) + throw new Error(j("uniCloud.init.paramRequired", { param: t2 })); + }), this.config = Object.assign({}, { endpoint: "https://api.bspapp.com" }, e), this.config.provider = "aliyun", this.config.requestUrl = this.config.endpoint + "/client", this.config.envType = this.config.envType || "public", this.config.accessTokenKey = "access_token_" + this.config.spaceId, this.adapter = N, this._getAccessTokenPromise = null, this._getAccessTokenPromiseStatus = null; + } + get hasAccessToken() { + return !!this.accessToken; + } + setAccessToken(e) { + this.accessToken = e; + } + requestWrapped(e) { + return F.wrappedRequest(e, this.adapter.request); + } + requestAuth(e) { + return this.requestWrapped(e); + } + request(e, t2) { + return Promise.resolve().then(() => this.hasAccessToken ? t2 ? this.requestWrapped(e) : this.requestWrapped(e).catch((t3) => new Promise((e2, n2) => { + !t3 || t3.code !== "GATEWAY_INVALID_TOKEN" && t3.code !== "InvalidParameter.InvalidToken" ? n2(t3) : e2(); + }).then(() => this.getAccessToken()).then(() => { + const t4 = this.rebuildRequest(e); + return this.request(t4, true); + })) : this.getAccessToken().then(() => { + const t3 = this.rebuildRequest(e); + return this.request(t3, true); + })); + } + rebuildRequest(e) { + const t2 = Object.assign({}, e); + return t2.data.token = this.accessToken, t2.header["x-basement-token"] = this.accessToken, t2.header["x-serverless-sign"] = F.sign(t2.data, this.config.clientSecret), t2; + } + setupRequest(e, t2) { + const n2 = Object.assign({}, e, { spaceId: this.config.spaceId, timestamp: Date.now() }), s2 = { "Content-Type": "application/json" }; + return t2 !== "auth" && (n2.token = this.accessToken, s2["x-basement-token"] = this.accessToken), s2["x-serverless-sign"] = F.sign(n2, this.config.clientSecret), { url: this.config.requestUrl, method: "POST", data: n2, dataType: "json", header: s2 }; + } + getAccessToken() { + if (this._getAccessTokenPromiseStatus === "pending") + return this._getAccessTokenPromise; + this._getAccessTokenPromiseStatus = "pending"; + return this._getAccessTokenPromise = this.requestAuth(this.setupRequest({ method: "serverless.auth.user.anonymousAuthorize", params: "{}" }, "auth")).then((e) => new Promise((t2, n2) => { + e.result && e.result.accessToken ? (this.setAccessToken(e.result.accessToken), this._getAccessTokenPromiseStatus = "fulfilled", t2(this.accessToken)) : (this._getAccessTokenPromiseStatus = "rejected", n2(new x({ code: "AUTH_FAILED", message: "\u83B7\u53D6accessToken\u5931\u8D25" }))); + }), (e) => (this._getAccessTokenPromiseStatus = "rejected", Promise.reject(e))), this._getAccessTokenPromise; + } + authorize() { + this.getAccessToken(); + } + callFunction(e) { + const t2 = { method: "serverless.function.runtime.invoke", params: JSON.stringify({ functionTarget: e.name, functionArgs: e.data || {} }) }; + return this.request(this.setupRequest(t2)); + } + getOSSUploadOptionsFromPath(e) { + const t2 = { method: "serverless.file.resource.generateProximalSign", params: JSON.stringify(e) }; + return this.request(this.setupRequest(t2)); + } + uploadFileToOSS({ url: e, formData: t2, name: n2, filePath: s2, fileType: o2, onUploadProgress: r2 }) { + return new Promise((i2, a2) => { + const c2 = this.adapter.uploadFile({ url: e, formData: t2, name: n2, filePath: s2, fileType: o2, header: { "X-OSS-server-side-encrpytion": "AES256" }, success(e2) { + e2 && e2.statusCode < 400 ? i2(e2) : a2(new x({ code: "UPLOAD_FAILED", message: "\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25" })); + }, fail(e2) { + a2(new x({ code: e2.code || "UPLOAD_FAILED", message: e2.message || e2.errMsg || "\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25" })); + } }); + typeof r2 == "function" && c2 && typeof c2.onProgressUpdate == "function" && c2.onProgressUpdate((e2) => { + r2({ loaded: e2.totalBytesSent, total: e2.totalBytesExpectedToSend }); + }); + }); + } + reportOSSUpload(e) { + const t2 = { method: "serverless.file.resource.report", params: JSON.stringify(e) }; + return this.request(this.setupRequest(t2)); + } + uploadFile({ filePath: e, cloudPath: t2, fileType: n2 = "image", onUploadProgress: s2, config: o2 }) { + if (c(t2) !== "string") + throw new x({ code: "INVALID_PARAM", message: "cloudPath\u5FC5\u987B\u4E3A\u5B57\u7B26\u4E32\u7C7B\u578B" }); + if (!(t2 = t2.trim())) + throw new x({ code: "CLOUDPATH_REQUIRED", message: "cloudPath\u4E0D\u53EF\u4E3A\u7A7A" }); + if (/:\/\//.test(t2)) + throw new x({ code: "INVALID_PARAM", message: "cloudPath\u4E0D\u5408\u6CD5" }); + const r2 = o2 && o2.envType || this.config.envType; + let i2, a2; + return this.getOSSUploadOptionsFromPath({ env: r2, filename: t2 }).then((t3) => { + const o3 = t3.result; + i2 = o3.id, a2 = "https://" + o3.cdnDomain + "/" + o3.ossPath; + const r3 = { url: "https://" + o3.host, formData: { "Cache-Control": "max-age=2592000", "Content-Disposition": "attachment", OSSAccessKeyId: o3.accessKeyId, Signature: o3.signature, host: o3.host, id: i2, key: o3.ossPath, policy: o3.policy, success_action_status: 200 }, fileName: "file", name: "file", filePath: e, fileType: n2 }; + return this.uploadFileToOSS(Object.assign({}, r3, { onUploadProgress: s2 })); + }).then(() => this.reportOSSUpload({ id: i2 })).then((t3) => new Promise((n3, s3) => { + t3.success ? n3({ success: true, filePath: e, fileID: a2 }) : s3(new x({ code: "UPLOAD_FAILED", message: "\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25" })); + })); + } + deleteFile({ fileList: e }) { + const t2 = { method: "serverless.file.resource.delete", params: JSON.stringify({ id: e[0] }) }; + return this.request(this.setupRequest(t2)); + } + getTempFileURL({ fileList: e } = {}) { + return new Promise((t2, n2) => { + Array.isArray(e) && e.length !== 0 || n2(new x({ code: "INVALID_PARAM", message: "fileList\u7684\u5143\u7D20\u5FC5\u987B\u662F\u975E\u7A7A\u7684\u5B57\u7B26\u4E32" })), t2({ fileList: e.map((e2) => ({ fileID: e2, tempFileURL: e2 })) }); + }); + } +}; +var B = { init(e) { + const t2 = new $(e), n2 = { signInAnonymously: function() { + return t2.authorize(); + }, getLoginState: function() { + return Promise.resolve(false); + } }; + return t2.auth = function() { + return n2; + }, t2.customAuth = t2.auth, t2; +} }; +const K = typeof location != "undefined" && location.protocol === "http:" ? "http:" : "https:"; +var H; +!function(e) { + e.local = "local", e.none = "none", e.session = "session"; +}(H || (H = {})); +var W = function() { +}; +const z = () => { + let e; + if (!Promise) { + e = () => { + }, e.promise = {}; + const t3 = () => { + throw new x({ message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.' }); + }; + return Object.defineProperty(e.promise, "then", { get: t3 }), Object.defineProperty(e.promise, "catch", { get: t3 }), e; + } + const t2 = new Promise((t3, n2) => { + e = (e2, s2) => e2 ? n2(e2) : t3(s2); + }); + return e.promise = t2, e; +}; +function J(e) { + return e === void 0; +} +function Y(e) { + return Object.prototype.toString.call(e) === "[object Null]"; +} +var V; +function X(e) { + const t2 = (n2 = e, Object.prototype.toString.call(n2) === "[object Array]" ? e : [e]); + var n2; + for (const e2 of t2) { + const { isMatch: t3, genAdapter: n3, runtime: s2 } = e2; + if (t3()) + return { adapter: n3(), runtime: s2 }; + } +} +!function(e) { + e.WEB = "web", e.WX_MP = "wx_mp"; +}(V || (V = {})); +const G = { adapter: null, runtime: void 0 }, Q = ["anonymousUuidKey"]; +class Z extends W { + constructor() { + super(), G.adapter.root.tcbObject || (G.adapter.root.tcbObject = {}); + } + setItem(e, t2) { + G.adapter.root.tcbObject[e] = t2; + } + getItem(e) { + return G.adapter.root.tcbObject[e]; + } + removeItem(e) { + delete G.adapter.root.tcbObject[e]; + } + clear() { + delete G.adapter.root.tcbObject; + } +} +function ee(e, t2) { + switch (e) { + case "local": + return t2.localStorage || new Z(); + case "none": + return new Z(); + default: + return t2.sessionStorage || new Z(); + } +} +class te { + constructor(e) { + if (!this._storage) { + this._persistence = G.adapter.primaryStorage || e.persistence, this._storage = ee(this._persistence, G.adapter); + const t2 = `access_token_${e.env}`, n2 = `access_token_expire_${e.env}`, s2 = `refresh_token_${e.env}`, o2 = `anonymous_uuid_${e.env}`, r2 = `login_type_${e.env}`, i2 = `user_info_${e.env}`; + this.keys = { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2, anonymousUuidKey: o2, loginTypeKey: r2, userInfoKey: i2 }; + } + } + updatePersistence(e) { + if (e === this._persistence) + return; + const t2 = this._persistence === "local"; + this._persistence = e; + const n2 = ee(e, G.adapter); + for (const e2 in this.keys) { + const s2 = this.keys[e2]; + if (t2 && Q.includes(e2)) + continue; + const o2 = this._storage.getItem(s2); + J(o2) || Y(o2) || (n2.setItem(s2, o2), this._storage.removeItem(s2)); + } + this._storage = n2; + } + setStore(e, t2, n2) { + if (!this._storage) + return; + const s2 = { version: n2 || "localCachev1", content: t2 }, o2 = JSON.stringify(s2); + try { + this._storage.setItem(e, o2); + } catch (e2) { + throw e2; + } + } + getStore(e, t2) { + try { + if (!this._storage) + return; + } catch (e2) { + return ""; + } + t2 = t2 || "localCachev1"; + const n2 = this._storage.getItem(e); + if (!n2) + return ""; + if (n2.indexOf(t2) >= 0) { + return JSON.parse(n2).content; + } + return ""; + } + removeStore(e) { + this._storage.removeItem(e); + } +} +const ne = {}, se = {}; +function oe(e) { + return ne[e]; +} +class re { + constructor(e, t2) { + this.data = t2 || null, this.name = e; + } +} +class ie extends re { + constructor(e, t2) { + super("error", { error: e, data: t2 }), this.error = e; + } +} +const ae = new class { + constructor() { + this._listeners = {}; + } + on(e, t2) { + return function(e2, t3, n2) { + n2[e2] = n2[e2] || [], n2[e2].push(t3); + }(e, t2, this._listeners), this; + } + off(e, t2) { + return function(e2, t3, n2) { + if (n2 && n2[e2]) { + const s2 = n2[e2].indexOf(t3); + s2 !== -1 && n2[e2].splice(s2, 1); + } + }(e, t2, this._listeners), this; + } + fire(e, t2) { + if (e instanceof ie) + return console.error(e.error), this; + const n2 = typeof e == "string" ? new re(e, t2 || {}) : e; + const s2 = n2.name; + if (this._listens(s2)) { + n2.target = this; + const e2 = this._listeners[s2] ? [...this._listeners[s2]] : []; + for (const t3 of e2) + t3.call(this, n2); + } + return this; + } + _listens(e) { + return this._listeners[e] && this._listeners[e].length > 0; + } +}(); +function ce(e, t2) { + ae.on(e, t2); +} +function ue(e, t2 = {}) { + ae.fire(e, t2); +} +function le(e, t2) { + ae.off(e, t2); +} +const he = "loginStateChanged", de = "loginStateExpire", fe = "loginTypeChanged", pe = "anonymousConverted", ge = "refreshAccessToken"; +var me; +!function(e) { + e.ANONYMOUS = "ANONYMOUS", e.WECHAT = "WECHAT", e.WECHAT_PUBLIC = "WECHAT-PUBLIC", e.WECHAT_OPEN = "WECHAT-OPEN", e.CUSTOM = "CUSTOM", e.EMAIL = "EMAIL", e.USERNAME = "USERNAME", e.NULL = "NULL"; +}(me || (me = {})); +const ye = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"], _e = { "X-SDK-Version": "1.3.5" }; +function we(e, t2, n2) { + const s2 = e[t2]; + e[t2] = function(t3) { + const o2 = {}, r2 = {}; + n2.forEach((n3) => { + const { data: s3, headers: i3 } = n3.call(e, t3); + Object.assign(o2, s3), Object.assign(r2, i3); + }); + const i2 = t3.data; + return i2 && (() => { + var e2; + if (e2 = i2, Object.prototype.toString.call(e2) !== "[object FormData]") + t3.data = __spreadValues(__spreadValues({}, i2), o2); + else + for (const e3 in o2) + i2.append(e3, o2[e3]); + })(), t3.headers = __spreadValues(__spreadValues({}, t3.headers || {}), r2), s2.call(e, t3); + }; +} +function ke() { + const e = Math.random().toString(16).slice(2); + return { data: { seqId: e }, headers: __spreadProps(__spreadValues({}, _e), { "x-seqid": e }) }; +} +class Se { + constructor(e = {}) { + var t2; + this.config = e, this._reqClass = new G.adapter.reqClass({ timeout: this.config.timeout, timeoutMsg: `\u8BF7\u6C42\u5728${this.config.timeout / 1e3}s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD`, restrictedMethods: ["post"] }), this._cache = oe(this.config.env), this._localCache = (t2 = this.config.env, se[t2]), we(this._reqClass, "post", [ke]), we(this._reqClass, "upload", [ke]), we(this._reqClass, "download", [ke]); + } + async post(e) { + return await this._reqClass.post(e); + } + async upload(e) { + return await this._reqClass.upload(e); + } + async download(e) { + return await this._reqClass.download(e); + } + async refreshAccessToken() { + let e, t2; + this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken()); + try { + e = await this._refreshAccessTokenPromise; + } catch (e2) { + t2 = e2; + } + if (this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t2) + throw t2; + return e; + } + async _refreshAccessToken() { + const { accessTokenKey: e, accessTokenExpireKey: t2, refreshTokenKey: n2, loginTypeKey: s2, anonymousUuidKey: o2 } = this._cache.keys; + this._cache.removeStore(e), this._cache.removeStore(t2); + let r2 = this._cache.getStore(n2); + if (!r2) + throw new x({ message: "\u672A\u767B\u5F55CloudBase" }); + const i2 = { refresh_token: r2 }, a2 = await this.request("auth.fetchAccessTokenWithRefreshToken", i2); + if (a2.data.code) { + const { code: e2 } = a2.data; + if (e2 === "SIGN_PARAM_INVALID" || e2 === "REFRESH_TOKEN_EXPIRED" || e2 === "INVALID_REFRESH_TOKEN") { + if (this._cache.getStore(s2) === me.ANONYMOUS && e2 === "INVALID_REFRESH_TOKEN") { + const e3 = this._cache.getStore(o2), t3 = this._cache.getStore(n2), s3 = await this.send("auth.signInAnonymously", { anonymous_uuid: e3, refresh_token: t3 }); + return this.setRefreshToken(s3.refresh_token), this._refreshAccessToken(); + } + ue(de), this._cache.removeStore(n2); + } + throw new x({ code: a2.data.code, message: `\u5237\u65B0access token\u5931\u8D25\uFF1A${a2.data.code}` }); + } + if (a2.data.access_token) + return ue(ge), this._cache.setStore(e, a2.data.access_token), this._cache.setStore(t2, a2.data.access_token_expire + Date.now()), { accessToken: a2.data.access_token, accessTokenExpire: a2.data.access_token_expire }; + a2.data.refresh_token && (this._cache.removeStore(n2), this._cache.setStore(n2, a2.data.refresh_token), this._refreshAccessToken()); + } + async getAccessToken() { + const { accessTokenKey: e, accessTokenExpireKey: t2, refreshTokenKey: n2 } = this._cache.keys; + if (!this._cache.getStore(n2)) + throw new x({ message: "refresh token\u4E0D\u5B58\u5728\uFF0C\u767B\u5F55\u72B6\u6001\u5F02\u5E38" }); + let s2 = this._cache.getStore(e), o2 = this._cache.getStore(t2), r2 = true; + return this._shouldRefreshAccessTokenHook && !await this._shouldRefreshAccessTokenHook(s2, o2) && (r2 = false), (!s2 || !o2 || o2 < Date.now()) && r2 ? this.refreshAccessToken() : { accessToken: s2, accessTokenExpire: o2 }; + } + async request(e, t2, n2) { + const s2 = `x-tcb-trace_${this.config.env}`; + let o2 = "application/x-www-form-urlencoded"; + const r2 = __spreadValues({ action: e, env: this.config.env, dataVersion: "2019-08-16" }, t2); + if (ye.indexOf(e) === -1) { + const { refreshTokenKey: e2 } = this._cache.keys; + this._cache.getStore(e2) && (r2.access_token = (await this.getAccessToken()).accessToken); + } + let i2; + if (e === "storage.uploadFile") { + i2 = new FormData(); + for (let e2 in i2) + i2.hasOwnProperty(e2) && i2[e2] !== void 0 && i2.append(e2, r2[e2]); + o2 = "multipart/form-data"; + } else { + o2 = "application/json", i2 = {}; + for (let e2 in r2) + r2[e2] !== void 0 && (i2[e2] = r2[e2]); + } + let a2 = { headers: { "content-type": o2 } }; + n2 && n2.onUploadProgress && (a2.onUploadProgress = n2.onUploadProgress); + const c2 = this._localCache.getStore(s2); + c2 && (a2.headers["X-TCB-Trace"] = c2); + const { parse: u2, inQuery: l2, search: h2 } = t2; + let d2 = { env: this.config.env }; + u2 && (d2.parse = true), l2 && (d2 = __spreadValues(__spreadValues({}, l2), d2)); + let f2 = function(e2, t3, n3 = {}) { + const s3 = /\?/.test(t3); + let o3 = ""; + for (let e3 in n3) + o3 === "" ? !s3 && (t3 += "?") : o3 += "&", o3 += `${e3}=${encodeURIComponent(n3[e3])}`; + return /^http(s)?\:\/\//.test(t3 += o3) ? t3 : `${e2}${t3}`; + }(K, "//tcb-api.tencentcloudapi.com/web", d2); + h2 && (f2 += h2); + const p2 = await this.post(__spreadValues({ url: f2, data: i2 }, a2)), g = p2.header && p2.header["x-tcb-trace"]; + if (g && this._localCache.setStore(s2, g), Number(p2.status) !== 200 && Number(p2.statusCode) !== 200 || !p2.data) + throw new x({ code: "NETWORK_ERROR", message: "network request error" }); + return p2; + } + async send(e, t2 = {}) { + const n2 = await this.request(e, t2, { onUploadProgress: t2.onUploadProgress }); + if (n2.data.code === "ACCESS_TOKEN_EXPIRED" && ye.indexOf(e) === -1) { + await this.refreshAccessToken(); + const n3 = await this.request(e, t2, { onUploadProgress: t2.onUploadProgress }); + if (n3.data.code) + throw new x({ code: n3.data.code, message: n3.data.message }); + return n3.data; + } + if (n2.data.code) + throw new x({ code: n2.data.code, message: n2.data.message }); + return n2.data; + } + setRefreshToken(e) { + const { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2 } = this._cache.keys; + this._cache.removeStore(t2), this._cache.removeStore(n2), this._cache.setStore(s2, e); + } +} +const ve = {}; +function Te(e) { + return ve[e]; +} +class Ae { + constructor(e) { + this.config = e, this._cache = oe(e.env), this._request = Te(e.env); + } + setRefreshToken(e) { + const { accessTokenKey: t2, accessTokenExpireKey: n2, refreshTokenKey: s2 } = this._cache.keys; + this._cache.removeStore(t2), this._cache.removeStore(n2), this._cache.setStore(s2, e); + } + setAccessToken(e, t2) { + const { accessTokenKey: n2, accessTokenExpireKey: s2 } = this._cache.keys; + this._cache.setStore(n2, e), this._cache.setStore(s2, t2); + } + async refreshUserInfo() { + const { data: e } = await this._request.send("auth.getUserInfo", {}); + return this.setLocalUserInfo(e), e; + } + setLocalUserInfo(e) { + const { userInfoKey: t2 } = this._cache.keys; + this._cache.setStore(t2, e); + } +} +class Pe { + constructor(e) { + if (!e) + throw new x({ code: "PARAM_ERROR", message: "envId is not defined" }); + this._envId = e, this._cache = oe(this._envId), this._request = Te(this._envId), this.setUserInfo(); + } + linkWithTicket(e) { + if (typeof e != "string") + throw new x({ code: "PARAM_ERROR", message: "ticket must be string" }); + return this._request.send("auth.linkWithTicket", { ticket: e }); + } + linkWithRedirect(e) { + e.signInWithRedirect(); + } + updatePassword(e, t2) { + return this._request.send("auth.updatePassword", { oldPassword: t2, newPassword: e }); + } + updateEmail(e) { + return this._request.send("auth.updateEmail", { newEmail: e }); + } + updateUsername(e) { + if (typeof e != "string") + throw new x({ code: "PARAM_ERROR", message: "username must be a string" }); + return this._request.send("auth.updateUsername", { username: e }); + } + async getLinkedUidList() { + const { data: e } = await this._request.send("auth.getLinkedUidList", {}); + let t2 = false; + const { users: n2 } = e; + return n2.forEach((e2) => { + e2.wxOpenId && e2.wxPublicId && (t2 = true); + }), { users: n2, hasPrimaryUid: t2 }; + } + setPrimaryUid(e) { + return this._request.send("auth.setPrimaryUid", { uid: e }); + } + unlink(e) { + return this._request.send("auth.unlink", { platform: e }); + } + async update(e) { + const { nickName: t2, gender: n2, avatarUrl: s2, province: o2, country: r2, city: i2 } = e, { data: a2 } = await this._request.send("auth.updateUserInfo", { nickName: t2, gender: n2, avatarUrl: s2, province: o2, country: r2, city: i2 }); + this.setLocalUserInfo(a2); + } + async refresh() { + const { data: e } = await this._request.send("auth.getUserInfo", {}); + return this.setLocalUserInfo(e), e; + } + setUserInfo() { + const { userInfoKey: e } = this._cache.keys, t2 = this._cache.getStore(e); + ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach((e2) => { + this[e2] = t2[e2]; + }), this.location = { country: t2.country, province: t2.province, city: t2.city }; + } + setLocalUserInfo(e) { + const { userInfoKey: t2 } = this._cache.keys; + this._cache.setStore(t2, e), this.setUserInfo(); + } +} +class Ie { + constructor(e) { + if (!e) + throw new x({ code: "PARAM_ERROR", message: "envId is not defined" }); + this._cache = oe(e); + const { refreshTokenKey: t2, accessTokenKey: n2, accessTokenExpireKey: s2 } = this._cache.keys, o2 = this._cache.getStore(t2), r2 = this._cache.getStore(n2), i2 = this._cache.getStore(s2); + this.credential = { refreshToken: o2, accessToken: r2, accessTokenExpire: i2 }, this.user = new Pe(e); + } + get isAnonymousAuth() { + return this.loginType === me.ANONYMOUS; + } + get isCustomAuth() { + return this.loginType === me.CUSTOM; + } + get isWeixinAuth() { + return this.loginType === me.WECHAT || this.loginType === me.WECHAT_OPEN || this.loginType === me.WECHAT_PUBLIC; + } + get loginType() { + return this._cache.getStore(this._cache.keys.loginTypeKey); + } +} +class Oe extends Ae { + async signIn() { + this._cache.updatePersistence("local"); + const { anonymousUuidKey: e, refreshTokenKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e) || void 0, s2 = this._cache.getStore(t2) || void 0, o2 = await this._request.send("auth.signInAnonymously", { anonymous_uuid: n2, refresh_token: s2 }); + if (o2.uuid && o2.refresh_token) { + this._setAnonymousUUID(o2.uuid), this.setRefreshToken(o2.refresh_token), await this._request.refreshAccessToken(), ue(he), ue(fe, { env: this.config.env, loginType: me.ANONYMOUS, persistence: "local" }); + const e2 = new Ie(this.config.env); + return await e2.user.refresh(), e2; + } + throw new x({ message: "\u533F\u540D\u767B\u5F55\u5931\u8D25" }); + } + async linkAndRetrieveDataWithTicket(e) { + const { anonymousUuidKey: t2, refreshTokenKey: n2 } = this._cache.keys, s2 = this._cache.getStore(t2), o2 = this._cache.getStore(n2), r2 = await this._request.send("auth.linkAndRetrieveDataWithTicket", { anonymous_uuid: s2, refresh_token: o2, ticket: e }); + if (r2.refresh_token) + return this._clearAnonymousUUID(), this.setRefreshToken(r2.refresh_token), await this._request.refreshAccessToken(), ue(pe, { env: this.config.env }), ue(fe, { loginType: me.CUSTOM, persistence: "local" }), { credential: { refreshToken: r2.refresh_token } }; + throw new x({ message: "\u533F\u540D\u8F6C\u5316\u5931\u8D25" }); + } + _setAnonymousUUID(e) { + const { anonymousUuidKey: t2, loginTypeKey: n2 } = this._cache.keys; + this._cache.removeStore(t2), this._cache.setStore(t2, e), this._cache.setStore(n2, me.ANONYMOUS); + } + _clearAnonymousUUID() { + this._cache.removeStore(this._cache.keys.anonymousUuidKey); + } +} +class be extends Ae { + async signIn(e) { + if (typeof e != "string") + throw new x({ param: "PARAM_ERROR", message: "ticket must be a string" }); + const { refreshTokenKey: t2 } = this._cache.keys, n2 = await this._request.send("auth.signInWithTicket", { ticket: e, refresh_token: this._cache.getStore(t2) || "" }); + if (n2.refresh_token) + return this.setRefreshToken(n2.refresh_token), await this._request.refreshAccessToken(), ue(he), ue(fe, { env: this.config.env, loginType: me.CUSTOM, persistence: this.config.persistence }), await this.refreshUserInfo(), new Ie(this.config.env); + throw new x({ message: "\u81EA\u5B9A\u4E49\u767B\u5F55\u5931\u8D25" }); + } +} +class Ce extends Ae { + async signIn(e, t2) { + if (typeof e != "string") + throw new x({ code: "PARAM_ERROR", message: "email must be a string" }); + const { refreshTokenKey: n2 } = this._cache.keys, s2 = await this._request.send("auth.signIn", { loginType: "EMAIL", email: e, password: t2, refresh_token: this._cache.getStore(n2) || "" }), { refresh_token: o2, access_token: r2, access_token_expire: i2 } = s2; + if (o2) + return this.setRefreshToken(o2), r2 && i2 ? this.setAccessToken(r2, i2) : await this._request.refreshAccessToken(), await this.refreshUserInfo(), ue(he), ue(fe, { env: this.config.env, loginType: me.EMAIL, persistence: this.config.persistence }), new Ie(this.config.env); + throw s2.code ? new x({ code: s2.code, message: `\u90AE\u7BB1\u767B\u5F55\u5931\u8D25: ${s2.message}` }) : new x({ message: "\u90AE\u7BB1\u767B\u5F55\u5931\u8D25" }); + } + async activate(e) { + return this._request.send("auth.activateEndUserMail", { token: e }); + } + async resetPasswordWithToken(e, t2) { + return this._request.send("auth.resetPasswordWithToken", { token: e, newPassword: t2 }); + } +} +class Ee extends Ae { + async signIn(e, t2) { + if (typeof e != "string") + throw new x({ code: "PARAM_ERROR", message: "username must be a string" }); + typeof t2 != "string" && (t2 = "", console.warn("password is empty")); + const { refreshTokenKey: n2 } = this._cache.keys, s2 = await this._request.send("auth.signIn", { loginType: me.USERNAME, username: e, password: t2, refresh_token: this._cache.getStore(n2) || "" }), { refresh_token: o2, access_token_expire: r2, access_token: i2 } = s2; + if (o2) + return this.setRefreshToken(o2), i2 && r2 ? this.setAccessToken(i2, r2) : await this._request.refreshAccessToken(), await this.refreshUserInfo(), ue(he), ue(fe, { env: this.config.env, loginType: me.USERNAME, persistence: this.config.persistence }), new Ie(this.config.env); + throw s2.code ? new x({ code: s2.code, message: `\u7528\u6237\u540D\u5BC6\u7801\u767B\u5F55\u5931\u8D25: ${s2.message}` }) : new x({ message: "\u7528\u6237\u540D\u5BC6\u7801\u767B\u5F55\u5931\u8D25" }); + } +} +class Ue { + constructor(e) { + this.config = e, this._cache = oe(e.env), this._request = Te(e.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), ce(fe, this._onLoginTypeChanged); + } + get currentUser() { + const e = this.hasLoginState(); + return e && e.user || null; + } + get loginType() { + return this._cache.getStore(this._cache.keys.loginTypeKey); + } + anonymousAuthProvider() { + return new Oe(this.config); + } + customAuthProvider() { + return new be(this.config); + } + emailAuthProvider() { + return new Ce(this.config); + } + usernameAuthProvider() { + return new Ee(this.config); + } + async signInAnonymously() { + return new Oe(this.config).signIn(); + } + async signInWithEmailAndPassword(e, t2) { + return new Ce(this.config).signIn(e, t2); + } + signInWithUsernameAndPassword(e, t2) { + return new Ee(this.config).signIn(e, t2); + } + async linkAndRetrieveDataWithTicket(e) { + this._anonymousAuthProvider || (this._anonymousAuthProvider = new Oe(this.config)), ce(pe, this._onAnonymousConverted); + return await this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e); + } + async signOut() { + if (this.loginType === me.ANONYMOUS) + throw new x({ message: "\u533F\u540D\u7528\u6237\u4E0D\u652F\u6301\u767B\u51FA\u64CD\u4F5C" }); + const { refreshTokenKey: e, accessTokenKey: t2, accessTokenExpireKey: n2 } = this._cache.keys, s2 = this._cache.getStore(e); + if (!s2) + return; + const o2 = await this._request.send("auth.logout", { refresh_token: s2 }); + return this._cache.removeStore(e), this._cache.removeStore(t2), this._cache.removeStore(n2), ue(he), ue(fe, { env: this.config.env, loginType: me.NULL, persistence: this.config.persistence }), o2; + } + async signUpWithEmailAndPassword(e, t2) { + return this._request.send("auth.signUpWithEmailAndPassword", { email: e, password: t2 }); + } + async sendPasswordResetEmail(e) { + return this._request.send("auth.sendPasswordResetEmail", { email: e }); + } + onLoginStateChanged(e) { + ce(he, () => { + const t3 = this.hasLoginState(); + e.call(this, t3); + }); + const t2 = this.hasLoginState(); + e.call(this, t2); + } + onLoginStateExpired(e) { + ce(de, e.bind(this)); + } + onAccessTokenRefreshed(e) { + ce(ge, e.bind(this)); + } + onAnonymousConverted(e) { + ce(pe, e.bind(this)); + } + onLoginTypeChanged(e) { + ce(fe, () => { + const t2 = this.hasLoginState(); + e.call(this, t2); + }); + } + async getAccessToken() { + return { accessToken: (await this._request.getAccessToken()).accessToken, env: this.config.env }; + } + hasLoginState() { + const { refreshTokenKey: e } = this._cache.keys; + return this._cache.getStore(e) ? new Ie(this.config.env) : null; + } + async isUsernameRegistered(e) { + if (typeof e != "string") + throw new x({ code: "PARAM_ERROR", message: "username must be a string" }); + const { data: t2 } = await this._request.send("auth.isUsernameRegistered", { username: e }); + return t2 && t2.isRegistered; + } + getLoginState() { + return Promise.resolve(this.hasLoginState()); + } + async signInWithTicket(e) { + return new be(this.config).signIn(e); + } + shouldRefreshAccessToken(e) { + this._request._shouldRefreshAccessTokenHook = e.bind(this); + } + getUserInfo() { + return this._request.send("auth.getUserInfo", {}).then((e) => e.code ? e : __spreadProps(__spreadValues({}, e.data), { requestId: e.seqId })); + } + getAuthHeader() { + const { refreshTokenKey: e, accessTokenKey: t2 } = this._cache.keys, n2 = this._cache.getStore(e); + return { "x-cloudbase-credentials": this._cache.getStore(t2) + "/@@/" + n2 }; + } + _onAnonymousConverted(e) { + const { env: t2 } = e.data; + t2 === this.config.env && this._cache.updatePersistence(this.config.persistence); + } + _onLoginTypeChanged(e) { + const { loginType: t2, persistence: n2, env: s2 } = e.data; + s2 === this.config.env && (this._cache.updatePersistence(n2), this._cache.setStore(this._cache.keys.loginTypeKey, t2)); + } +} +const Re = function(e, t2) { + t2 = t2 || z(); + const n2 = Te(this.config.env), { cloudPath: s2, filePath: o2, onUploadProgress: r2, fileType: i2 = "image" } = e; + return n2.send("storage.getUploadMetadata", { path: s2 }).then((e2) => { + const { data: { url: a2, authorization: c2, token: u2, fileId: l2, cosFileId: h2 }, requestId: d2 } = e2, f2 = { key: s2, signature: c2, "x-cos-meta-fileid": h2, success_action_status: "201", "x-cos-security-token": u2 }; + n2.upload({ url: a2, data: f2, file: o2, name: s2, fileType: i2, onUploadProgress: r2 }).then((e3) => { + e3.statusCode === 201 ? t2(null, { fileID: l2, requestId: d2 }) : t2(new x({ code: "STORAGE_REQUEST_FAIL", message: `STORAGE_REQUEST_FAIL: ${e3.data}` })); + }).catch((e3) => { + t2(e3); + }); + }).catch((e2) => { + t2(e2); + }), t2.promise; +}, xe = function(e, t2) { + t2 = t2 || z(); + const n2 = Te(this.config.env), { cloudPath: s2 } = e; + return n2.send("storage.getUploadMetadata", { path: s2 }).then((e2) => { + t2(null, e2); + }).catch((e2) => { + t2(e2); + }), t2.promise; +}, De = function({ fileList: e }, t2) { + if (t2 = t2 || z(), !e || !Array.isArray(e)) + return { code: "INVALID_PARAM", message: "fileList\u5FC5\u987B\u662F\u975E\u7A7A\u7684\u6570\u7EC4" }; + for (let t3 of e) + if (!t3 || typeof t3 != "string") + return { code: "INVALID_PARAM", message: "fileList\u7684\u5143\u7D20\u5FC5\u987B\u662F\u975E\u7A7A\u7684\u5B57\u7B26\u4E32" }; + const n2 = { fileid_list: e }; + return Te(this.config.env).send("storage.batchDeleteFile", n2).then((e2) => { + e2.code ? t2(null, e2) : t2(null, { fileList: e2.data.delete_list, requestId: e2.requestId }); + }).catch((e2) => { + t2(e2); + }), t2.promise; +}, qe = function({ fileList: e }, t2) { + t2 = t2 || z(), e && Array.isArray(e) || t2(null, { code: "INVALID_PARAM", message: "fileList\u5FC5\u987B\u662F\u975E\u7A7A\u7684\u6570\u7EC4" }); + let n2 = []; + for (let s3 of e) + typeof s3 == "object" ? (s3.hasOwnProperty("fileID") && s3.hasOwnProperty("maxAge") || t2(null, { code: "INVALID_PARAM", message: "fileList\u7684\u5143\u7D20\u5FC5\u987B\u662F\u5305\u542BfileID\u548CmaxAge\u7684\u5BF9\u8C61" }), n2.push({ fileid: s3.fileID, max_age: s3.maxAge })) : typeof s3 == "string" ? n2.push({ fileid: s3 }) : t2(null, { code: "INVALID_PARAM", message: "fileList\u7684\u5143\u7D20\u5FC5\u987B\u662F\u5B57\u7B26\u4E32" }); + const s2 = { file_list: n2 }; + return Te(this.config.env).send("storage.batchGetDownloadUrl", s2).then((e2) => { + e2.code ? t2(null, e2) : t2(null, { fileList: e2.data.download_list, requestId: e2.requestId }); + }).catch((e2) => { + t2(e2); + }), t2.promise; +}, Le = async function({ fileID: e }, t2) { + const n2 = (await qe.call(this, { fileList: [{ fileID: e, maxAge: 600 }] })).fileList[0]; + if (n2.code !== "SUCCESS") + return t2 ? t2(n2) : new Promise((e2) => { + e2(n2); + }); + const s2 = Te(this.config.env); + let o2 = n2.download_url; + if (o2 = encodeURI(o2), !t2) + return s2.download({ url: o2 }); + t2(await s2.download({ url: o2 })); +}, Fe = function({ name: e, data: t2, query: n2, parse: s2, search: o2 }, r2) { + const i2 = r2 || z(); + let a2; + try { + a2 = t2 ? JSON.stringify(t2) : ""; + } catch (e2) { + return Promise.reject(e2); + } + if (!e) + return Promise.reject(new x({ code: "PARAM_ERROR", message: "\u51FD\u6570\u540D\u4E0D\u80FD\u4E3A\u7A7A" })); + const c2 = { inQuery: n2, parse: s2, search: o2, function_name: e, request_data: a2 }; + return Te(this.config.env).send("functions.invokeFunction", c2).then((e2) => { + if (e2.code) + i2(null, e2); + else { + let t3 = e2.data.response_data; + if (s2) + i2(null, { result: t3, requestId: e2.requestId }); + else + try { + t3 = JSON.parse(e2.data.response_data), i2(null, { result: t3, requestId: e2.requestId }); + } catch (e3) { + i2(new x({ message: "response data must be json" })); + } + } + return i2.promise; + }).catch((e2) => { + i2(e2); + }), i2.promise; +}, Ne = { timeout: 15e3, persistence: "session" }, Me = {}; +class je { + constructor(e) { + this.config = e || this.config, this.authObj = void 0; + } + init(e) { + switch (G.adapter || (this.requestClient = new G.adapter.reqClass({ timeout: e.timeout || 5e3, timeoutMsg: `\u8BF7\u6C42\u5728${(e.timeout || 5e3) / 1e3}s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD` })), this.config = __spreadValues(__spreadValues({}, Ne), e), true) { + case this.config.timeout > 6e5: + console.warn("timeout\u5927\u4E8E\u53EF\u914D\u7F6E\u4E0A\u9650[10\u5206\u949F]\uFF0C\u5DF2\u91CD\u7F6E\u4E3A\u4E0A\u9650\u6570\u503C"), this.config.timeout = 6e5; + break; + case this.config.timeout < 100: + console.warn("timeout\u5C0F\u4E8E\u53EF\u914D\u7F6E\u4E0B\u9650[100ms]\uFF0C\u5DF2\u91CD\u7F6E\u4E3A\u4E0B\u9650\u6570\u503C"), this.config.timeout = 100; + } + return new je(this.config); + } + auth({ persistence: e } = {}) { + if (this.authObj) + return this.authObj; + const t2 = e || G.adapter.primaryStorage || Ne.persistence; + var n2; + return t2 !== this.config.persistence && (this.config.persistence = t2), function(e2) { + const { env: t3 } = e2; + ne[t3] = new te(e2), se[t3] = new te(__spreadProps(__spreadValues({}, e2), { persistence: "local" })); + }(this.config), n2 = this.config, ve[n2.env] = new Se(n2), this.authObj = new Ue(this.config), this.authObj; + } + on(e, t2) { + return ce.apply(this, [e, t2]); + } + off(e, t2) { + return le.apply(this, [e, t2]); + } + callFunction(e, t2) { + return Fe.apply(this, [e, t2]); + } + deleteFile(e, t2) { + return De.apply(this, [e, t2]); + } + getTempFileURL(e, t2) { + return qe.apply(this, [e, t2]); + } + downloadFile(e, t2) { + return Le.apply(this, [e, t2]); + } + uploadFile(e, t2) { + return Re.apply(this, [e, t2]); + } + getUploadMetadata(e, t2) { + return xe.apply(this, [e, t2]); + } + registerExtension(e) { + Me[e.name] = e; + } + async invokeExtension(e, t2) { + const n2 = Me[e]; + if (!n2) + throw new x({ message: `\u6269\u5C55${e} \u5FC5\u987B\u5148\u6CE8\u518C` }); + return await n2.invoke(t2, this); + } + useAdapters(e) { + const { adapter: t2, runtime: n2 } = X(e) || {}; + t2 && (G.adapter = t2), n2 && (G.runtime = n2); + } +} +var $e = new je(); +function Be(e, t2, n2) { + n2 === void 0 && (n2 = {}); + var s2 = /\?/.test(t2), o2 = ""; + for (var r2 in n2) + o2 === "" ? !s2 && (t2 += "?") : o2 += "&", o2 += r2 + "=" + encodeURIComponent(n2[r2]); + return /^http(s)?:\/\//.test(t2 += o2) ? t2 : "" + e + t2; +} +class Ke { + post(e) { + const { url: t2, data: n2, headers: s2 } = e; + return new Promise((e2, o2) => { + N.request({ url: Be("https:", t2), data: n2, method: "POST", header: s2, success(t3) { + e2(t3); + }, fail(e3) { + o2(e3); + } }); + }); + } + upload(e) { + return new Promise((t2, n2) => { + const { url: s2, file: o2, data: r2, headers: i2, fileType: a2 } = e, c2 = N.uploadFile({ url: Be("https:", s2), name: "file", formData: Object.assign({}, r2), filePath: o2, fileType: a2, header: i2, success(e2) { + const n3 = { statusCode: e2.statusCode, data: e2.data || {} }; + e2.statusCode === 200 && r2.success_action_status && (n3.statusCode = parseInt(r2.success_action_status, 10)), t2(n3); + }, fail(e2) { + n2(new Error(e2.errMsg || "uploadFile:fail")); + } }); + typeof e.onUploadProgress == "function" && c2 && typeof c2.onProgressUpdate == "function" && c2.onProgressUpdate((t3) => { + e.onUploadProgress({ loaded: t3.totalBytesSent, total: t3.totalBytesExpectedToSend }); + }); + }); + } +} +const He = { setItem(e, t2) { + N.setStorageSync(e, t2); +}, getItem: (e) => N.getStorageSync(e), removeItem(e) { + N.removeStorageSync(e); +}, clear() { + N.clearStorageSync(); +} }; +var We = { genAdapter: function() { + return { root: {}, reqClass: Ke, localStorage: He, primaryStorage: "local" }; +}, isMatch: function() { + return true; +}, runtime: "uni_app" }; +$e.useAdapters(We); +const ze = $e, Je = ze.init; +ze.init = function(e) { + e.env = e.spaceId; + const t2 = Je.call(this, e); + t2.config.provider = "tencent", t2.config.spaceId = e.spaceId; + const n2 = t2.auth; + return t2.auth = function(e2) { + const t3 = n2.call(this, e2); + return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach((e3) => { + t3[e3] = R(t3[e3]).bind(t3); + }), t3; + }, t2.customAuth = t2.auth, t2; +}; +var Ye = ze; +function Ve(e) { + return e && Ve(e.__v_raw) || e; +} +function Xe() { + return { token: N.getStorageSync("uni_id_token") || N.getStorageSync("uniIdToken"), tokenExpired: N.getStorageSync("uni_id_token_expired") }; +} +function Ge({ token: e, tokenExpired: t2 } = {}) { + e && N.setStorageSync("uni_id_token", e), t2 && N.setStorageSync("uni_id_token_expired", t2); +} +var Ze = class extends $ { + getAccessToken() { + return new Promise((e, t2) => { + const n2 = "Anonymous_Access_token"; + this.setAccessToken(n2), e(n2); + }); + } + setupRequest(e, t2) { + const n2 = Object.assign({}, e, { spaceId: this.config.spaceId, timestamp: Date.now() }), s2 = { "Content-Type": "application/json" }; + t2 !== "auth" && (n2.token = this.accessToken, s2["x-basement-token"] = this.accessToken), s2["x-serverless-sign"] = F.sign(n2, this.config.clientSecret); + const o2 = L(); + s2["x-client-info"] = JSON.stringify(o2); + const { token: r2 } = Xe(); + return s2["x-client-token"] = r2, { url: this.config.requestUrl, method: "POST", data: n2, dataType: "json", header: JSON.parse(JSON.stringify(s2)) }; + } + uploadFileToOSS({ url: e, formData: t2, name: n2, filePath: s2, fileType: o2, onUploadProgress: r2 }) { + return new Promise((i2, a2) => { + const c2 = this.adapter.uploadFile({ url: e, formData: t2, name: n2, filePath: s2, fileType: o2, success(e2) { + e2 && e2.statusCode < 400 ? i2(e2) : a2(new x({ code: "UPLOAD_FAILED", message: "\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25" })); + }, fail(e2) { + a2(new x({ code: e2.code || "UPLOAD_FAILED", message: e2.message || e2.errMsg || "\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25" })); + } }); + typeof r2 == "function" && c2 && typeof c2.onProgressUpdate == "function" && c2.onProgressUpdate((e2) => { + r2({ loaded: e2.totalBytesSent, total: e2.totalBytesExpectedToSend }); + }); + }); + } + uploadFile({ filePath: e, cloudPath: t2, fileType: n2 = "image", onUploadProgress: s2 }) { + if (!t2) + throw new x({ code: "CLOUDPATH_REQUIRED", message: "cloudPath\u4E0D\u53EF\u4E3A\u7A7A" }); + let o2; + return this.getOSSUploadOptionsFromPath({ cloudPath: t2 }).then((t3) => { + const { url: r2, formData: i2, name: a2 } = t3.result; + o2 = t3.result.fileUrl; + const c2 = { url: r2, formData: i2, name: a2, filePath: e, fileType: n2 }; + return this.uploadFileToOSS(Object.assign({}, c2, { onUploadProgress: s2 })); + }).then(() => this.reportOSSUpload({ cloudPath: t2 })).then((t3) => new Promise((n3, s3) => { + t3.success ? n3({ success: true, filePath: e, fileID: o2 }) : s3(new x({ code: "UPLOAD_FAILED", message: "\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25" })); + })); + } + deleteFile({ fileList: e }) { + const t2 = { method: "serverless.file.resource.delete", params: JSON.stringify({ fileList: e }) }; + return this.request(this.setupRequest(t2)); + } + getTempFileURL({ fileList: e } = {}) { + const t2 = { method: "serverless.file.resource.getTempFileURL", params: JSON.stringify({ fileList: e }) }; + return this.request(this.setupRequest(t2)); + } +}; +var et = { init(e) { + const t2 = new Ze(e), n2 = { signInAnonymously: function() { + return t2.authorize(); + }, getLoginState: function() { + return Promise.resolve(false); + } }; + return t2.auth = function() { + return n2; + }, t2.customAuth = t2.auth, t2; +} }; +function tt({ data: e }) { + let t2; + t2 = L(); + const n2 = JSON.parse(JSON.stringify(e || {})); + if (Object.assign(n2, { clientInfo: t2 }), !n2.uniIdToken) { + const { token: e2 } = Xe(); + e2 && (n2.uniIdToken = e2); + } + return n2; +} +function nt({ name: e, data: t2 }) { + const { localAddress: n2, localPort: s2 } = this, o2 = { aliyun: "aliyun", tencent: "tcb" }[this.config.provider], r2 = this.config.spaceId, i2 = `http://${n2}:${s2}/system/check-function`, a2 = `http://${n2}:${s2}/cloudfunctions/${e}`; + return new Promise((t3, n3) => { + N.request({ method: "POST", url: i2, data: { name: e, platform: d, provider: o2, spaceId: r2 }, timeout: 3e3, success(e2) { + t3(e2); + }, fail() { + t3({ data: { code: "NETWORK_ERROR", message: "\u8FDE\u63A5\u672C\u5730\u8C03\u8BD5\u670D\u52A1\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u5BA2\u6237\u7AEF\u662F\u5426\u548C\u4E3B\u673A\u5728\u540C\u4E00\u5C40\u57DF\u7F51\u4E0B\uFF0C\u81EA\u52A8\u5207\u6362\u4E3A\u5DF2\u90E8\u7F72\u7684\u4E91\u51FD\u6570\u3002" } }); + } }); + }).then(({ data: e2 } = {}) => { + const { code: t3, message: n3 } = e2 || {}; + return { code: t3 === 0 ? 0 : t3 || "SYS_ERR", message: n3 || "SYS_ERR" }; + }).then(({ code: n3, message: s3 }) => { + if (n3 !== 0) { + switch (n3) { + case "MODULE_ENCRYPTED": + console.error(`\u6B64\u4E91\u51FD\u6570\uFF08${e}\uFF09\u4F9D\u8D56\u52A0\u5BC6\u516C\u5171\u6A21\u5757\u4E0D\u53EF\u672C\u5730\u8C03\u8BD5\uFF0C\u81EA\u52A8\u5207\u6362\u4E3A\u4E91\u7AEF\u5DF2\u90E8\u7F72\u7684\u4E91\u51FD\u6570`); + break; + case "FUNCTION_ENCRYPTED": + console.error(`\u6B64\u4E91\u51FD\u6570\uFF08${e}\uFF09\u5DF2\u52A0\u5BC6\u4E0D\u53EF\u672C\u5730\u8C03\u8BD5\uFF0C\u81EA\u52A8\u5207\u6362\u4E3A\u4E91\u7AEF\u5DF2\u90E8\u7F72\u7684\u4E91\u51FD\u6570`); + break; + case "ACTION_ENCRYPTED": + console.error(s3 || "\u9700\u8981\u8BBF\u95EE\u52A0\u5BC6\u7684uni-clientDB-action\uFF0C\u81EA\u52A8\u5207\u6362\u4E3A\u4E91\u7AEF\u73AF\u5883"); + break; + case "NETWORK_ERROR": { + const e2 = "\u8FDE\u63A5\u672C\u5730\u8C03\u8BD5\u670D\u52A1\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u5BA2\u6237\u7AEF\u662F\u5426\u548C\u4E3B\u673A\u5728\u540C\u4E00\u5C40\u57DF\u7F51\u4E0B"; + throw console.error(e2), new Error(e2); + } + case "SWITCH_TO_CLOUD": + break; + default: { + const e2 = `\u68C0\u6D4B\u672C\u5730\u8C03\u8BD5\u670D\u52A1\u51FA\u73B0\u9519\u8BEF\uFF1A${s3}\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u73AF\u5883\u6216\u91CD\u542F\u5BA2\u6237\u7AEF\u518D\u8BD5`; + throw console.error(e2), new Error(e2); + } + } + return this._originCallFunction({ name: e, data: t2 }); + } + return new Promise((e2, n4) => { + const s4 = tt.call(this, { data: t2 }); + N.request({ method: "POST", url: a2, data: { provider: o2, platform: d, param: s4 }, success: ({ statusCode: t3, data: s5 } = {}) => !t3 || t3 >= 400 ? n4(new x({ code: s5.code || "SYS_ERR", message: s5.message || "request:fail" })) : e2({ result: s5 }), fail(e3) { + n4(new x({ code: e3.code || e3.errCode || "SYS_ERR", message: e3.message || e3.errMsg || "request:fail" })); + } }); + }); + }); +} +const st = [{ rule: /fc_function_not_found|FUNCTION_NOT_FOUND/, content: "\uFF0C\u4E91\u51FD\u6570[{functionName}]\u5728\u4E91\u7AEF\u4E0D\u5B58\u5728\uFF0C\u8BF7\u68C0\u67E5\u6B64\u4E91\u51FD\u6570\u540D\u79F0\u662F\u5426\u6B63\u786E\u4EE5\u53CA\u8BE5\u4E91\u51FD\u6570\u662F\u5426\u5DF2\u4E0A\u4F20\u5230\u670D\u52A1\u7A7A\u95F4", mode: "append" }]; +var ot = /[\\^$.*+?()[\]{}|]/g, rt = RegExp(ot.source); +function it(e, t2, n2) { + return e.replace(new RegExp((s2 = t2) && rt.test(s2) ? s2.replace(ot, "\\$&") : s2, "g"), n2); + var s2; +} +function at({ functionName: e, result: t2, logPvd: n2 }) { + if (this.config.useDebugFunction && t2 && t2.requestId) { + const s2 = JSON.stringify({ spaceId: this.config.spaceId, functionName: e, requestId: t2.requestId }); + console.log(`[${n2}-request]${s2}[/${n2}-request]`); + } +} +function ct(e) { + const t2 = e.callFunction, n2 = function(n3) { + const s2 = n3.name; + n3.data = tt.call(e, { data: n3.data }); + const o2 = { aliyun: "aliyun", tencent: "tcb", tcb: "tcb" }[this.config.provider]; + return t2.call(this, n3).then((e2) => (e2.errCode = 0, at.call(this, { functionName: s2, result: e2, logPvd: o2 }), Promise.resolve(e2)), (e2) => (at.call(this, { functionName: s2, result: e2, logPvd: o2 }), e2 && e2.message && (e2.message = function({ message: e3 = "", extraInfo: t3 = {}, formatter: n4 = [] } = {}) { + for (let s3 = 0; s3 < n4.length; s3++) { + const { rule: o3, content: r2, mode: i2 } = n4[s3], a2 = e3.match(o3); + if (!a2) + continue; + let c2 = r2; + for (let e4 = 1; e4 < a2.length; e4++) + c2 = it(c2, `{$${e4}}`, a2[e4]); + for (const e4 in t3) + c2 = it(c2, `{${e4}}`, t3[e4]); + return i2 === "replace" ? c2 : e3 + c2; + } + return e3; + }({ message: `[${n3.name}]: ${e2.message}`, formatter: st, extraInfo: { functionName: s2 } })), Promise.reject(e2))); + }; + e.callFunction = function(t3) { + let s2; + return e.debugInfo && !e.debugInfo.forceRemote && p ? (e._originCallFunction || (e._originCallFunction = n2), s2 = nt.call(this, t3)) : s2 = n2.call(this, t3), Object.defineProperty(s2, "result", { get: () => (console.warn("\u5F53\u524D\u8FD4\u56DE\u7ED3\u679C\u4E3APromise\u7C7B\u578B\uFF0C\u4E0D\u53EF\u76F4\u63A5\u8BBF\u95EE\u5176result\u5C5E\u6027\uFF0C\u8BE6\u60C5\u8BF7\u53C2\u8003\uFF1Ahttps://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {}) }), s2; + }; +} +const ut = Symbol("CLIENT_DB_INTERNAL"); +function lt(e, t2) { + return e.then = "DoNotReturnProxyWithAFunctionNamedThen", e._internalType = ut, e.__v_raw = void 0, new Proxy(e, { get(e2, n2, s2) { + if (n2 === "_uniClient") + return null; + if (n2 in e2 || typeof n2 != "string") { + const t3 = e2[n2]; + return typeof t3 == "function" ? t3.bind(e2) : t3; + } + return t2.get(e2, n2, s2); + } }); +} +function ht(e) { + return { on: (t2, n2) => { + e[t2] = e[t2] || [], e[t2].indexOf(n2) > -1 || e[t2].push(n2); + }, off: (t2, n2) => { + e[t2] = e[t2] || []; + const s2 = e[t2].indexOf(n2); + s2 !== -1 && e[t2].splice(s2, 1); + } }; +} +const dt = ["db.Geo", "db.command", "command.aggregate"]; +function ft(e, t2) { + return dt.indexOf(`${e}.${t2}`) > -1; +} +function pt(e) { + switch (c(e = Ve(e))) { + case "array": + return e.map((e2) => pt(e2)); + case "object": + return e._internalType === ut || Object.keys(e).forEach((t2) => { + e[t2] = pt(e[t2]); + }), e; + case "regexp": + return { $regexp: { source: e.source, flags: e.flags } }; + case "date": + return { $date: e.toISOString() }; + default: + return e; + } +} +class gt { + constructor(e, t2, n2) { + this.content = e, this.prevStage = t2 || null, this.udb = null, this._database = n2; + } + toJSON() { + let e = this; + const t2 = [e.content]; + for (; e.prevStage; ) + e = e.prevStage, t2.push(e.content); + return { $db: t2.reverse().map((e2) => ({ $method: e2.$method, $param: pt(e2.$param) })) }; + } + getAction() { + const e = this.toJSON().$db.find((e2) => e2.$method === "action"); + return e && e.$param && e.$param[0]; + } + getCommand() { + return { $db: this.toJSON().$db.filter((e) => e.$method !== "action") }; + } + get useAggregate() { + let e = this, t2 = false; + for (; e.prevStage; ) { + e = e.prevStage; + const n2 = e.content.$method; + if (n2 === "aggregate" || n2 === "pipeline") { + t2 = true; + break; + } + } + return t2; + } + get count() { + if (!this.useAggregate) + return function() { + return this._send("count", Array.from(arguments)); + }; + const e = this; + return function() { + return mt({ $method: "count", $param: pt(Array.from(arguments)) }, e, this._database); + }; + } + get() { + return this._send("get", Array.from(arguments)); + } + add() { + return this._send("add", Array.from(arguments)); + } + remove() { + return this._send("remove", Array.from(arguments)); + } + update() { + return this._send("update", Array.from(arguments)); + } + end() { + return this._send("end", Array.from(arguments)); + } + set() { + throw new Error("clientDB\u7981\u6B62\u4F7F\u7528set\u65B9\u6CD5"); + } + _send(e, t2) { + const n2 = this.getAction(), s2 = this.getCommand(); + if (s2.$db.push({ $method: e, $param: pt(t2) }), h) { + const e2 = s2.$db.find((e3) => e3.$method === "collection"), t3 = e2 && e2.$param; + t3 && t3.length === 1 && typeof e2.$param[0] == "string" && e2.$param[0].indexOf(",") > -1 && console.warn("\u68C0\u6D4B\u5230\u4F7F\u7528JQL\u8BED\u6CD5\u8054\u8868\u67E5\u8BE2\u65F6\uFF0C\u672A\u4F7F\u7528getTemp\u5148\u8FC7\u6EE4\u4E3B\u8868\u6570\u636E\uFF0C\u5728\u4E3B\u8868\u6570\u636E\u91CF\u5927\u7684\u60C5\u51B5\u4E0B\u53EF\u80FD\u4F1A\u67E5\u8BE2\u7F13\u6162\u3002\n- \u5982\u4F55\u4F18\u5316\u8BF7\u53C2\u8003\u6B64\u6587\u6863\uFF1Ahttps://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- \u5982\u679C\u4E3B\u8868\u6570\u636E\u91CF\u5F88\u5C0F\u8BF7\u5FFD\u7565\u6B64\u4FE1\u606F\uFF0C\u9879\u76EE\u53D1\u884C\u65F6\u4E0D\u4F1A\u51FA\u73B0\u6B64\u63D0\u793A\u3002"); + } + return this._database._callCloudFunction({ action: n2, command: s2 }); + } +} +function mt(e, t2, n2) { + return lt(new gt(e, t2, n2), { get(e2, t3) { + let s2 = "db"; + return e2 && e2.content && (s2 = e2.content.$method), ft(s2, t3) ? mt({ $method: t3 }, e2, n2) : function() { + return mt({ $method: t3, $param: pt(Array.from(arguments)) }, e2, n2); + }; + } }); +} +function yt({ path: e, method: t2 }) { + return class { + constructor() { + this.param = Array.from(arguments); + } + toJSON() { + return { $newDb: [...e.map((e2) => ({ $method: e2 })), { $method: t2, $param: this.param }] }; + } + }; +} +class _t extends class { + constructor({ uniClient: e = {} } = {}) { + this._uniClient = e, this._authCallBacks = {}, this._dbCallBacks = {}, e.isDefault && (this._dbCallBacks = _("_globalUniCloudDatabaseCallback")), this.auth = ht(this._authCallBacks), Object.assign(this, ht(this._dbCallBacks)), this.env = lt({}, { get: (e2, t2) => ({ $env: t2 }) }), this.Geo = lt({}, { get: (e2, t2) => yt({ path: ["Geo"], method: t2 }) }), this.serverDate = yt({ path: [], method: "serverDate" }), this.RegExp = yt({ path: [], method: "RegExp" }); + } + getCloudEnv(e) { + if (typeof e != "string" || !e.trim()) + throw new Error("getCloudEnv\u53C2\u6570\u9519\u8BEF"); + return { $env: e.replace("$cloudEnv_", "") }; + } + _callback(e, t2) { + const n2 = this._dbCallBacks; + n2[e] && n2[e].forEach((e2) => { + e2(...t2); + }); + } + _callbackAuth(e, t2) { + const n2 = this._authCallBacks; + n2[e] && n2[e].forEach((e2) => { + e2(...t2); + }); + } + multiSend() { + const e = Array.from(arguments), t2 = e.map((e2) => { + const t3 = e2.getAction(), n2 = e2.getCommand(); + if (n2.$db[n2.$db.length - 1].$method !== "getTemp") + throw new Error("multiSend\u53EA\u652F\u6301\u5B50\u547D\u4EE4\u5185\u4F7F\u7528getTemp"); + return { action: t3, command: n2 }; + }); + return this._callCloudFunction({ multiCommand: t2, queryList: e }); + } +} { + _callCloudFunction({ action: e, command: t2, multiCommand: n2, queryList: s2 }) { + function o2(e2, t3) { + if (n2 && s2) + for (let n3 = 0; n3 < s2.length; n3++) { + const o3 = s2[n3]; + o3.udb && typeof o3.udb.setResult == "function" && (t3 ? o3.udb.setResult(t3) : o3.udb.setResult(e2.result.dataList[n3])); + } + } + const r2 = this; + function i2(e2) { + return r2._callback("error", [e2]), T(A("database", "fail"), e2).then(() => T(A("database", "complete"), e2)).then(() => (o2(null, e2), U(I, { type: O, content: e2 }), Promise.reject(e2))); + } + const c2 = T(A("database", "invoke")), u2 = this._uniClient; + return c2.then(() => u2.callFunction({ name: "DCloud-clientDB", type: a, data: { action: e, command: t2, multiCommand: n2 } })).then((e2) => { + const { code: t3, message: n3, token: s3, tokenExpired: r3, systemInfo: a2 = [] } = e2.result; + if (a2) + for (let e3 = 0; e3 < a2.length; e3++) { + const { level: t4, message: n4, detail: s4 } = a2[e3], o3 = console[t4] || console.log; + let r4 = "[System Info]" + n4; + s4 && (r4 = `${r4} +\u8BE6\u7EC6\u4FE1\u606F\uFF1A${s4}`), o3(r4); + } + if (t3) { + return i2(new x({ code: t3, message: n3, requestId: e2.requestId })); + } + e2.result.errCode = e2.result.code, e2.result.errMsg = e2.result.message, s3 && r3 && (Ge({ token: s3, tokenExpired: r3 }), this._callbackAuth("refreshToken", [{ token: s3, tokenExpired: r3 }]), this._callback("refreshToken", [{ token: s3, tokenExpired: r3 }])); + const c3 = [{ prop: "affectedDocs", tips: "affectedDocs\u4E0D\u518D\u63A8\u8350\u4F7F\u7528\uFF0C\u8BF7\u4F7F\u7528inserted/deleted/updated/data.length\u66FF\u4EE3" }, { prop: "code", tips: "code\u4E0D\u518D\u63A8\u8350\u4F7F\u7528\uFF0C\u8BF7\u4F7F\u7528errCode\u66FF\u4EE3" }, { prop: "message", tips: "message\u4E0D\u518D\u63A8\u8350\u4F7F\u7528\uFF0C\u8BF7\u4F7F\u7528errMsg\u66FF\u4EE3" }]; + for (let t4 = 0; t4 < c3.length; t4++) { + const { prop: n4, tips: s4 } = c3[t4]; + if (n4 in e2.result) { + const t5 = e2.result[n4]; + Object.defineProperty(e2.result, n4, { get: () => (console.warn(s4), t5) }); + } + } + return function(e3) { + return T(A("database", "success"), e3).then(() => T(A("database", "complete"), e3)).then(() => (o2(e3, null), U(I, { type: O, content: e3 }), Promise.resolve(e3))); + }(e2); + }, (e2) => { + /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e2.message) && console.warn("clientDB\u672A\u521D\u59CB\u5316\uFF0C\u8BF7\u5728web\u63A7\u5236\u53F0\u4FDD\u5B58\u4E00\u6B21schema\u4EE5\u5F00\u542FclientDB"); + return i2(new x({ code: e2.code || "SYSTEM_ERROR", message: e2.message, requestId: e2.requestId })); + }); + } +} +function wt(e) { + e.database = function(t2) { + if (t2 && Object.keys(t2).length > 0) + return e.init(t2).database(); + if (this._database) + return this._database; + const n2 = function(e2, t3 = {}) { + return lt(new e2(t3), { get: (e3, t4) => ft("db", t4) ? mt({ $method: t4 }, null, e3) : function() { + return mt({ $method: t4, $param: pt(Array.from(arguments)) }, null, e3); + } }); + }(_t, { uniClient: e }); + return this._database = n2, n2; + }; +} +function kt(e) { + e.onResponse = function(e2) { + !function(e3, t2) { + const n2 = E(e3); + n2.includes(t2) || n2.push(t2); + }(I, e2); + }, e.offResponse = function(e2) { + !function(e3, t2) { + const n2 = E(e3), s2 = n2.indexOf(t2); + s2 !== -1 && n2.splice(s2, 1); + }(I, e2); + }; +} +let St; +const vt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", Tt = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/; +function At() { + const e = Xe().token || "", t2 = e.split("."); + if (!e || t2.length !== 3) + return { uid: null, role: [], permission: [], tokenExpired: 0 }; + let n2; + try { + n2 = JSON.parse((s2 = t2[1], decodeURIComponent(St(s2).split("").map(function(e2) { + return "%" + ("00" + e2.charCodeAt(0).toString(16)).slice(-2); + }).join("")))); + } catch (e2) { + throw new Error("\u83B7\u53D6\u5F53\u524D\u7528\u6237\u4FE1\u606F\u51FA\u9519\uFF0C\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F\u4E3A\uFF1A" + e2.message); + } + var s2; + return n2.tokenExpired = 1e3 * n2.exp, delete n2.exp, delete n2.iat, n2; +} +St = typeof atob != "function" ? function(e) { + if (e = String(e).replace(/[\t\n\f\r ]+/g, ""), !Tt.test(e)) + throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded."); + var t2; + e += "==".slice(2 - (3 & e.length)); + for (var n2, s2, o2 = "", r2 = 0; r2 < e.length; ) + t2 = vt.indexOf(e.charAt(r2++)) << 18 | vt.indexOf(e.charAt(r2++)) << 12 | (n2 = vt.indexOf(e.charAt(r2++))) << 6 | (s2 = vt.indexOf(e.charAt(r2++))), o2 += n2 === 64 ? String.fromCharCode(t2 >> 16 & 255) : s2 === 64 ? String.fromCharCode(t2 >> 16 & 255, t2 >> 8 & 255) : String.fromCharCode(t2 >> 16 & 255, t2 >> 8 & 255, 255 & t2); + return o2; +} : atob; +var Pt = t(n(function(e, t2) { + Object.defineProperty(t2, "__esModule", { value: true }); + const n2 = "chooseAndUploadFile:ok", s2 = "chooseAndUploadFile:fail"; + function o2(e2, t3) { + return e2.tempFiles.forEach((e3, n3) => { + e3.name || (e3.name = e3.path.substring(e3.path.lastIndexOf("/") + 1)), t3 && (e3.fileType = t3), e3.cloudPath = Date.now() + "_" + n3 + e3.name.substring(e3.name.lastIndexOf(".")); + }), e2.tempFilePaths || (e2.tempFilePaths = e2.tempFiles.map((e3) => e3.path)), e2; + } + function r2(e2, t3, { onChooseFile: s3, onUploadProgress: o3 }) { + return t3.then((e3) => { + if (s3) { + const t4 = s3(e3); + if (t4 !== void 0) + return Promise.resolve(t4).then((t5) => t5 === void 0 ? e3 : t5); + } + return e3; + }).then((t4) => t4 === false ? { errMsg: n2, tempFilePaths: [], tempFiles: [] } : function(e3, t5, s4 = 5, o4) { + (t5 = Object.assign({}, t5)).errMsg = n2; + const r3 = t5.tempFiles, i2 = r3.length; + let a2 = 0; + return new Promise((n3) => { + for (; a2 < s4; ) + c2(); + function c2() { + const s5 = a2++; + if (s5 >= i2) + return void (!r3.find((e4) => !e4.url && !e4.errMsg) && n3(t5)); + const u2 = r3[s5]; + e3.uploadFile({ filePath: u2.path, cloudPath: u2.cloudPath, fileType: u2.fileType, onUploadProgress(e4) { + e4.index = s5, e4.tempFile = u2, e4.tempFilePath = u2.path, o4 && o4(e4); + } }).then((e4) => { + u2.url = e4.fileID, s5 < i2 && c2(); + }).catch((e4) => { + u2.errMsg = e4.errMsg || e4.message, s5 < i2 && c2(); + }); + } + }); + }(e2, t4, 5, o3)); + } + t2.initChooseAndUploadFile = function(e2) { + return function(t3 = { type: "all" }) { + return t3.type === "image" ? r2(e2, function(e3) { + const { count: t4, sizeType: n3, sourceType: r3 = ["album", "camera"], extension: i2 } = e3; + return new Promise((e4, a2) => { + uni.chooseImage({ count: t4, sizeType: n3, sourceType: r3, extension: i2, success(t5) { + e4(o2(t5, "image")); + }, fail(e5) { + a2({ errMsg: e5.errMsg.replace("chooseImage:fail", s2) }); + } }); + }); + }(t3), t3) : t3.type === "video" ? r2(e2, function(e3) { + const { camera: t4, compressed: n3, maxDuration: r3, sourceType: i2 = ["album", "camera"], extension: a2 } = e3; + return new Promise((e4, c2) => { + uni.chooseVideo({ camera: t4, compressed: n3, maxDuration: r3, sourceType: i2, extension: a2, success(t5) { + const { tempFilePath: n4, duration: s3, size: r4, height: i3, width: a3 } = t5; + e4(o2({ errMsg: "chooseVideo:ok", tempFilePaths: [n4], tempFiles: [{ name: t5.tempFile && t5.tempFile.name || "", path: n4, size: r4, type: t5.tempFile && t5.tempFile.type || "", width: a3, height: i3, duration: s3, fileType: "video", cloudPath: "" }] }, "video")); + }, fail(e5) { + c2({ errMsg: e5.errMsg.replace("chooseVideo:fail", s2) }); + } }); + }); + }(t3), t3) : r2(e2, function(e3) { + const { count: t4, extension: n3 } = e3; + return new Promise((e4, r3) => { + let i2 = uni.chooseFile; + if (typeof wx != "undefined" && typeof wx.chooseMessageFile == "function" && (i2 = wx.chooseMessageFile), typeof i2 != "function") + return r3({ errMsg: s2 + " \u8BF7\u6307\u5B9A type \u7C7B\u578B\uFF0C\u8BE5\u5E73\u53F0\u4EC5\u652F\u6301\u9009\u62E9 image \u6216 video\u3002" }); + i2({ type: "all", count: t4, extension: n3, success(t5) { + e4(o2(t5)); + }, fail(e5) { + r3({ errMsg: e5.errMsg.replace("chooseFile:fail", s2) }); + } }); + }); + }(t3), t3); + }; + }; +})); +const It = "manual"; +function Ot(e) { + return { props: { localdata: { type: Array, default: () => [] }, options: { type: [Object, Array], default: () => ({}) }, spaceInfo: { type: Object, default: () => ({}) }, collection: { type: [String, Array], default: "" }, action: { type: String, default: "" }, field: { type: String, default: "" }, orderby: { type: String, default: "" }, where: { type: [String, Object], default: "" }, pageData: { type: String, default: "add" }, pageCurrent: { type: Number, default: 1 }, pageSize: { type: Number, default: 20 }, getcount: { type: [Boolean, String], default: false }, gettree: { type: [Boolean, String], default: false }, gettreepath: { type: [Boolean, String], default: false }, startwith: { type: String, default: "" }, limitlevel: { type: Number, default: 10 }, groupby: { type: String, default: "" }, groupField: { type: String, default: "" }, distinct: { type: [Boolean, String], default: false }, foreignKey: { type: String, default: "" }, loadtime: { type: String, default: "auto" }, manual: { type: Boolean, default: false } }, data: () => ({ mixinDatacomLoading: false, mixinDatacomHasMore: false, mixinDatacomResData: [], mixinDatacomErrorMessage: "", mixinDatacomPage: {} }), created() { + this.mixinDatacomPage = { current: this.pageCurrent, size: this.pageSize, count: 0 }, this.$watch(() => { + var e2 = []; + return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach((t2) => { + e2.push(this[t2]); + }), e2; + }, (e2, t2) => { + if (this.loadtime === It) + return; + let n2 = false; + const s2 = []; + for (let o2 = 2; o2 < e2.length; o2++) + e2[o2] !== t2[o2] && (s2.push(e2[o2]), n2 = true); + e2[0] !== t2[0] && (this.mixinDatacomPage.current = this.pageCurrent), this.mixinDatacomPage.size = this.pageSize, this.onMixinDatacomPropsChange(n2, s2); + }); + }, methods: { onMixinDatacomPropsChange(e2, t2) { + }, mixinDatacomEasyGet({ getone: e2 = false, success: t2, fail: n2 } = {}) { + this.mixinDatacomLoading || (this.mixinDatacomLoading = true, this.mixinDatacomErrorMessage = "", this.mixinDatacomGet().then((n3) => { + this.mixinDatacomLoading = false; + const { data: s2, count: o2 } = n3.result; + this.getcount && (this.mixinDatacomPage.count = o2), this.mixinDatacomHasMore = s2.length < this.pageSize; + const r2 = e2 ? s2.length ? s2[0] : void 0 : s2; + this.mixinDatacomResData = r2, t2 && t2(r2); + }).catch((e3) => { + this.mixinDatacomLoading = false, this.mixinDatacomErrorMessage = e3, n2 && n2(e3); + })); + }, mixinDatacomGet(t2 = {}) { + let n2 = e.database(this.spaceInfo); + const s2 = t2.action || this.action; + s2 && (n2 = n2.action(s2)); + const o2 = t2.collection || this.collection; + n2 = Array.isArray(o2) ? n2.collection(...o2) : n2.collection(o2); + const r2 = t2.where || this.where; + r2 && Object.keys(r2).length && (n2 = n2.where(r2)); + const i2 = t2.field || this.field; + i2 && (n2 = n2.field(i2)); + const a2 = t2.foreignKey || this.foreignKey; + a2 && (n2 = n2.foreignKey(a2)); + const c2 = t2.groupby || this.groupby; + c2 && (n2 = n2.groupBy(c2)); + const u2 = t2.groupField || this.groupField; + u2 && (n2 = n2.groupField(u2)); + (t2.distinct !== void 0 ? t2.distinct : this.distinct) === true && (n2 = n2.distinct()); + const l2 = t2.orderby || this.orderby; + l2 && (n2 = n2.orderBy(l2)); + const h2 = t2.pageCurrent !== void 0 ? t2.pageCurrent : this.mixinDatacomPage.current, d2 = t2.pageSize !== void 0 ? t2.pageSize : this.mixinDatacomPage.size, f2 = t2.getcount !== void 0 ? t2.getcount : this.getcount, p2 = t2.gettree !== void 0 ? t2.gettree : this.gettree, g = t2.gettreepath !== void 0 ? t2.gettreepath : this.gettreepath, m2 = { getCount: f2 }, y2 = { limitLevel: t2.limitlevel !== void 0 ? t2.limitlevel : this.limitlevel, startWith: t2.startwith !== void 0 ? t2.startwith : this.startwith }; + return p2 && (m2.getTree = y2), g && (m2.getTreePath = y2), n2 = n2.skip(d2 * (h2 - 1)).limit(d2).get(m2), n2; + } } }; +} +function bt(e) { + return function(t2, n2 = {}) { + n2 = function(e2, t3 = {}) { + return e2.customUI = t3.customUI || e2.customUI, Object.assign(e2.loadingOptions, t3.loadingOptions), Object.assign(e2.errorOptions, t3.errorOptions), e2; + }({ customUI: false, loadingOptions: { title: "\u52A0\u8F7D\u4E2D...", mask: true }, errorOptions: { type: "modal", retry: false } }, n2); + const { customUI: s2, loadingOptions: o2, errorOptions: r2 } = n2, a2 = !s2; + return new Proxy({}, { get: (n3, s3) => async function n4(...c2) { + let u2; + a2 && uni.showLoading({ title: o2.title, mask: o2.mask }); + try { + u2 = await e.callFunction({ name: t2, type: i, data: { method: s3, params: c2 } }); + } catch (e2) { + u2 = { result: e2 }; + } + const { errCode: l2, errMsg: h2, newToken: d2 } = u2.result || {}; + if (a2 && uni.hideLoading(), d2 && d2.token && d2.tokenExpired && Ge(d2), l2) { + if (a2) + if (r2.type === "toast") + uni.showToast({ title: h2, icon: "none" }); + else { + if (r2.type !== "modal") + throw new Error(`Invalid errorOptions.type: ${r2.type}`); + { + const { confirm: e3 } = await async function({ title: e4, content: t3, showCancel: n5, cancelText: s4, confirmText: o3 } = {}) { + return new Promise((r3, i2) => { + uni.showModal({ title: e4, content: t3, showCancel: n5, cancelText: s4, confirmText: o3, success(e5) { + r3(e5); + }, fail() { + r3({ confirm: false, cancel: true }); + } }); + }); + }({ title: "\u63D0\u793A", content: h2, showCancel: r2.retry, cancelText: "\u53D6\u6D88", confirmText: r2.retry ? "\u91CD\u8BD5" : "\u786E\u5B9A" }); + if (r2.retry && e3) + return n4(...c2); + } + } + const e2 = new x({ code: l2, message: h2, requestId: u2.requestId }); + throw e2.detail = u2.result, U(I, { type: C, content: e2 }), e2; + } + return U(I, { type: C, content: u2.result }), u2.result; + } }); + }; +} +async function Ct(e, t2) { + const n2 = `http://${e}:${t2}/system/ping`; + try { + const e2 = await (s2 = { url: n2, timeout: 500 }, new Promise((e3, t3) => { + N.request(__spreadProps(__spreadValues({}, s2), { success(t4) { + e3(t4); + }, fail(e4) { + t3(e4); + } })); + })); + return !(!e2.data || e2.data.code !== 0); + } catch (e2) { + return false; + } + var s2; +} +function Et(e) { + if (e.initUniCloudStatus && e.initUniCloudStatus !== "rejected") + return; + let t2 = Promise.resolve(); + var n2; + n2 = 1, t2 = new Promise((e2, t3) => { + setTimeout(() => { + e2(); + }, n2); + }), e.isReady = false, e.isDefault = false; + const s2 = e.auth(); + e.initUniCloudStatus = "pending", e.initUniCloud = t2.then(() => s2.getLoginState()).then((e2) => e2 ? Promise.resolve() : s2.signInAnonymously()).then(() => { + if (e.debugInfo) { + const { address: t3, servePort: n3 } = e.debugInfo; + return async function(e2, t4) { + let n4; + for (let s3 = 0; s3 < e2.length; s3++) { + const o2 = e2[s3]; + if (await Ct(o2, t4)) { + n4 = o2; + break; + } + } + return { address: n4, port: t4 }; + }(t3, n3); + } + }).then(({ address: t3, port: n3 } = {}) => { + if (t3) + e.localAddress = t3, e.localPort = n3; + else if (e.debugInfo) { + const t4 = console["warn"]; + let n4 = ""; + e.debugInfo.initialLaunchType === "remote" ? (e.debugInfo.forceRemote = true, n4 = "\u5F53\u524D\u5BA2\u6237\u7AEF\u548CHBuilderX\u4E0D\u5728\u540C\u4E00\u5C40\u57DF\u7F51\u4E0B\uFF08\u6216\u5176\u4ED6\u7F51\u7EDC\u539F\u56E0\u65E0\u6CD5\u8FDE\u63A5HBuilderX\uFF09\uFF0CuniCloud\u672C\u5730\u8C03\u8BD5\u670D\u52A1\u4E0D\u5BF9\u5F53\u524D\u5BA2\u6237\u7AEF\u751F\u6548\u3002\n- \u5982\u679C\u4E0D\u4F7F\u7528uniCloud\u672C\u5730\u8C03\u8BD5\u670D\u52A1\uFF0C\u8BF7\u76F4\u63A5\u5FFD\u7565\u6B64\u4FE1\u606F\u3002\n- \u5982\u9700\u4F7F\u7528uniCloud\u672C\u5730\u8C03\u8BD5\u670D\u52A1\uFF0C\u8BF7\u5C06\u5BA2\u6237\u7AEF\u4E0E\u4E3B\u673A\u8FDE\u63A5\u5230\u540C\u4E00\u5C40\u57DF\u7F51\u4E0B\u5E76\u91CD\u65B0\u8FD0\u884C\u5230\u5BA2\u6237\u7AEF\u3002\n- \u5982\u679C\u5728HBuilderX\u5F00\u542F\u7684\u72B6\u6001\u4E0B\u5207\u6362\u8FC7\u7F51\u7EDC\u73AF\u5883\uFF0C\u8BF7\u91CD\u542FHBuilderX\u540E\u518D\u8BD5\n- \u68C0\u67E5\u7CFB\u7EDF\u9632\u706B\u5899\u662F\u5426\u62E6\u622A\u4E86HBuilderX\u81EA\u5E26\u7684nodejs") : n4 = "\u65E0\u6CD5\u8FDE\u63A5uniCloud\u672C\u5730\u8C03\u8BD5\u670D\u52A1\uFF0C\u8BF7\u68C0\u67E5\u5F53\u524D\u5BA2\u6237\u7AEF\u662F\u5426\u4E0E\u4E3B\u673A\u5728\u540C\u4E00\u5C40\u57DF\u7F51\u4E0B\u3002\n- \u5982\u9700\u4F7F\u7528uniCloud\u672C\u5730\u8C03\u8BD5\u670D\u52A1\uFF0C\u8BF7\u5C06\u5BA2\u6237\u7AEF\u4E0E\u4E3B\u673A\u8FDE\u63A5\u5230\u540C\u4E00\u5C40\u57DF\u7F51\u4E0B\u5E76\u91CD\u65B0\u8FD0\u884C\u5230\u5BA2\u6237\u7AEF\u3002\n- \u5982\u679C\u5728HBuilderX\u5F00\u542F\u7684\u72B6\u6001\u4E0B\u5207\u6362\u8FC7\u7F51\u7EDC\u73AF\u5883\uFF0C\u8BF7\u91CD\u542FHBuilderX\u540E\u518D\u8BD5\n- \u68C0\u67E5\u7CFB\u7EDF\u9632\u706B\u5899\u662F\u5426\u62E6\u622A\u4E86HBuilderX\u81EA\u5E26\u7684nodejs", t4(n4); + } + }).then(() => { + e.isReady = true, e.initUniCloudStatus = "fulfilled"; + }).catch((t3) => { + console.error(t3), e.initUniCloudStatus = "rejected"; + }); +} +let Ut = new class { + init(e) { + let t2 = {}; + const n2 = e.debugFunction !== false && h && d === "app-plus"; + switch (e.provider) { + case "tcb": + case "tencent": + t2 = Ye.init(Object.assign(e, { useDebugFunction: n2 })); + break; + case "aliyun": + t2 = B.init(Object.assign(e, { useDebugFunction: n2 })); + break; + case "private": + t2 = et.init(Object.assign(e, { useDebugFunction: n2 })); + break; + default: + throw new Error("\u672A\u63D0\u4F9B\u6B63\u786E\u7684provider\u53C2\u6570"); + } + const s2 = f; + s2 && !s2.code && (t2.debugInfo = s2), Et(t2), t2.reInit = function() { + Et(this); + }, ct(t2), function(e2) { + const t3 = e2.uploadFile; + e2.uploadFile = function(e3) { + return t3.call(this, e3); + }; + }(t2), wt(t2), function(e2) { + e2.getCurrentUserInfo = At, e2.chooseAndUploadFile = Pt.initChooseAndUploadFile(e2), Object.assign(e2, { get mixinDatacom() { + return Ot(e2); + } }), e2.importObject = bt(e2); + }(t2); + return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach((e2) => { + if (!t2[e2]) + return; + const n3 = t2[e2]; + t2[e2] = function() { + return t2.reInit(), n3.apply(t2, Array.from(arguments)); + }, t2[e2] = R(t2[e2], e2).bind(t2); + }), t2.init = this.init, t2; + } +}(); +(() => { + { + const e = p; + let t2 = {}; + if (e.length === 1) + t2 = e[0], Ut = Ut.init(t2), Ut.isDefault = true; + else { + const t3 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"]; + let n2; + n2 = e && e.length > 0 ? "\u5E94\u7528\u6709\u591A\u4E2A\u670D\u52A1\u7A7A\u95F4\uFF0C\u8BF7\u901A\u8FC7uniCloud.init\u65B9\u6CD5\u6307\u5B9A\u8981\u4F7F\u7528\u7684\u670D\u52A1\u7A7A\u95F4" : "\u5E94\u7528\u672A\u5173\u8054\u670D\u52A1\u7A7A\u95F4\uFF0C\u8BF7\u5728uniCloud\u76EE\u5F55\u53F3\u952E\u5173\u8054\u670D\u52A1\u7A7A\u95F4", t3.forEach((e2) => { + Ut[e2] = function() { + return console.error(n2), Promise.reject(new x({ code: "SYS_ERR", message: n2 })); + }; + }); + } + Object.assign(Ut, { get mixinDatacom() { + return Ot(Ut); + } }), kt(Ut), Ut.addInterceptor = S, Ut.removeInterceptor = v; + } +})(); +var Rt = Ut; +export { Rt as R }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/uni-data-checkbox.js b/fe/PDA/unpackage/dist/dev/.nvue/uni-data-checkbox.js new file mode 100644 index 000000000..482817c19 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/uni-data-checkbox.js @@ -0,0 +1,444 @@ +import { R as Rt } from "./uni-cloud.es.js"; +import { _ as __easycom_0 } from "./uni-load-more.js"; +import { resolveDynamicComponent, resolveComponent, openBlock, createElementBlock, normalizeStyle, createBlock, toDisplayString, Fragment, normalizeClass, withCtx, renderList, createVNode, createElementVNode, createCommentVNode } from "vue"; +import { r as resolveEasycom } from "./uni-app.es.js"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.js"; +var _style_0 = { "uni-data-loading": { "": { "flexDirection": "row", "justifyContent": "center", "alignItems": "center", "height": 36, "paddingLeft": 10, "color": "#999999" } }, "uni-data-checklist": { "": { "position": "relative", "zIndex": 0, "flex": 1 } }, "checklist-group": { ".uni-data-checklist ": { "flexDirection": "row", "flexWrap": "wrap" }, ".uni-data-checklist .is-list": { "flexDirection": "column" } }, "checklist-box": { ".uni-data-checklist .checklist-group ": { "flexDirection": "row", "alignItems": "center", "position": "relative", "marginTop": 5, "marginRight": 25, "marginBottom": 5, "marginLeft": 0 }, ".uni-data-checklist .checklist-group .is--button": { "marginRight": 10, "paddingTop": 5, "paddingRight": 10, "paddingBottom": 5, "paddingLeft": 10, "borderWidth": 1, "borderStyle": "solid", "borderColor": "#DCDFE6", "borderRadius": 3, "transitionProperty": "borderColor", "transitionDuration": 200 }, ".uni-data-checklist .checklist-group .is--button.is-disable": { "borderWidth": 1, "borderStyle": "solid", "borderColor": "#eeeeee", "opacity": 0.4 }, ".uni-data-checklist .checklist-group .is--button.is-checked": { "borderColor": "#2979ff" }, ".uni-data-checklist .checklist-group .is--button.is-checked.is-disable": { "opacity": 0.4 }, ".uni-data-checklist .checklist-group .is--tag": { "marginRight": 10, "paddingTop": 5, "paddingRight": 10, "paddingBottom": 5, "paddingLeft": 10, "borderWidth": 1, "borderStyle": "solid", "borderColor": "#DCDFE6", "borderRadius": 3, "backgroundColor": "#f5f5f5" }, ".uni-data-checklist .checklist-group .is--tag.is-disable": { "opacity": 0.4 }, ".uni-data-checklist .checklist-group .is--tag.is-checked": { "backgroundColor": "#2979ff", "borderColor": "#2979ff" }, ".uni-data-checklist .checklist-group .is--list": { "paddingTop": 10, "paddingRight": 15, "paddingBottom": 10, "paddingLeft": 0, "marginTop": 0, "marginRight": 0, "marginBottom": 0, "marginLeft": 0 }, ".uni-data-checklist .checklist-group .is--list.is-list-border": { "borderTopWidth": 1, "borderTopStyle": "solid", "borderTopColor": "#eeeeee" } }, "hidden": { ".uni-data-checklist .checklist-group .checklist-box ": { "position": "absolute", "opacity": 0 } }, "checklist-content": { ".uni-data-checklist .checklist-group .checklist-box ": { "flex": 1, "flexDirection": "row", "alignItems": "center", "justifyContent": "space-between" } }, "checklist-text": { ".uni-data-checklist .checklist-group .checklist-box .checklist-content ": { "fontSize": 14, "color": "#666666", "marginLeft": 5, "lineHeight": 14 }, ".uni-data-checklist .checklist-group .checklist-box.is--default.is-disable ": { "color": "#999999" }, ".uni-data-checklist .checklist-group .checklist-box.is--default.is-checked ": { "color": "#2979ff" }, ".uni-data-checklist .checklist-group .checklist-box.is--default.is-checked.is-disable ": { "opacity": 0.4 }, ".uni-data-checklist .checklist-group .checklist-box.is--button.is-disable ": { "color": "#999999" }, ".uni-data-checklist .checklist-group .checklist-box.is--button.is-checked ": { "color": "#2979ff" }, ".uni-data-checklist .checklist-group .checklist-box.is--tag ": { "marginTop": 0, "marginRight": 0, "marginBottom": 0, "marginLeft": 0, "color": "#666666" }, ".uni-data-checklist .checklist-group .checklist-box.is--tag.is-checked ": { "color": "#ffffff" }, ".uni-data-checklist .checklist-group .checklist-box.is--list.is-disable ": { "color": "#999999" }, ".uni-data-checklist .checklist-group .checklist-box.is--list.is-checked ": { "color": "#2979ff" }, ".uni-data-checklist .checklist-group .checklist-box.is--list.is-checked.is-disable ": { "opacity": 0.4 } }, "checkobx__list": { ".uni-data-checklist .checklist-group .checklist-box .checklist-content ": { "borderRightWidth": 1, "borderRightColor": "#007aff", "borderRightStyle": "solid", "borderBottomWidth": 1, "borderBottomColor": "#007aff", "borderBottomStyle": "solid", "height": 12, "width": 6, "left": -5, "transformOrigin": "center", "transform": "rotate(45deg)", "opacity": 0 }, ".uni-data-checklist .checklist-group .checklist-box.is--list.is-checked .checklist-content ": { "opacity": 1, "borderColor": "#2979ff" } }, "checkbox__inner": { ".uni-data-checklist .checklist-group .checklist-box ": { "position": "relative", "width": 16, "height": 16, "borderWidth": 1, "borderStyle": "solid", "borderColor": "#DCDFE6", "borderRadius": 4, "backgroundColor": "#ffffff", "zIndex": 1 }, ".uni-data-checklist .checklist-group .checklist-box.is--default.is-disable ": { "backgroundColor": "#F2F6FC", "borderColor": "#DCDFE6" }, ".uni-data-checklist .checklist-group .checklist-box.is--default.is-checked ": { "borderColor": "#2979ff", "backgroundColor": "#2979ff" }, ".uni-data-checklist .checklist-group .checklist-box.is--default.is-checked.is-disable ": { "opacity": 0.4 }, ".uni-data-checklist .checklist-group .checklist-box.is--button.is-disable ": { "backgroundColor": "#F2F6FC", "borderColor": "#DCDFE6" }, ".uni-data-checklist .checklist-group .checklist-box.is--button.is-checked ": { "borderColor": "#2979ff", "backgroundColor": "#2979ff" }, ".uni-data-checklist .checklist-group .checklist-box.is--list.is-disable ": { "backgroundColor": "#F2F6FC", "borderColor": "#DCDFE6" }, ".uni-data-checklist .checklist-group .checklist-box.is--list.is-checked ": { "borderColor": "#2979ff", "backgroundColor": "#2979ff" }, ".uni-data-checklist .checklist-group .checklist-box.is--list.is-checked.is-disable ": { "opacity": 0.4 } }, "checkbox__inner-icon": { ".uni-data-checklist .checklist-group .checklist-box .checkbox__inner ": { "position": "absolute", "top": 2, "left": 5, "height": 8, "width": 4, "borderRightWidth": 1, "borderRightColor": "#ffffff", "borderRightStyle": "solid", "borderBottomWidth": 1, "borderBottomColor": "#ffffff", "borderBottomStyle": "solid", "opacity": 0, "transformOrigin": "center", "transform": "rotate(40deg)" }, ".uni-data-checklist .checklist-group .checklist-box.is--default.is-checked .checkbox__inner ": { "opacity": 1, "transform": "rotate(45deg)" }, ".uni-data-checklist .checklist-group .checklist-box.is--button.is-checked .checkbox__inner ": { "opacity": 1, "transform": "rotate(45deg)" }, ".uni-data-checklist .checklist-group .checklist-box.is--list.is-checked .checkbox__inner ": { "opacity": 1, "transform": "rotate(45deg)" } }, "radio__inner": { ".uni-data-checklist .checklist-group .checklist-box ": { "justifyContent": "center", "alignItems": "center", "position": "relative", "width": 16, "height": 16, "borderWidth": 1, "borderStyle": "solid", "borderColor": "#DCDFE6", "borderRadius": 16, "backgroundColor": "#ffffff", "zIndex": 1 }, ".uni-data-checklist .checklist-group .checklist-box.is--default.is-disable ": { "backgroundColor": "#F2F6FC", "borderColor": "#DCDFE6" }, ".uni-data-checklist .checklist-group .checklist-box.is--default.is-checked ": { "borderColor": "#2979ff" }, ".uni-data-checklist .checklist-group .checklist-box.is--default.is-checked.is-disable ": { "opacity": 0.4 }, ".uni-data-checklist .checklist-group .checklist-box.is--button.is-disable ": { "backgroundColor": "#F2F6FC", "borderColor": "#DCDFE6" }, ".uni-data-checklist .checklist-group .checklist-box.is--button.is-checked ": { "borderColor": "#2979ff" } }, "radio__inner-icon": { ".uni-data-checklist .checklist-group .checklist-box .radio__inner ": { "width": 8, "height": 8, "borderRadius": 10, "opacity": 0 }, ".uni-data-checklist .checklist-group .checklist-box.is--default.is-checked .radio__inner ": { "opacity": 1, "backgroundColor": "#2979ff" }, ".uni-data-checklist .checklist-group .checklist-box.is--button.is-checked .radio__inner ": { "opacity": 1, "backgroundColor": "#2979ff" }, ".uni-data-checklist .checklist-group .checklist-box.is--list.is-checked .radio__inner ": { "opacity": 1 } }, "@TRANSITION": { "checklist-box": { "property": "borderColor", "duration": 200 } } }; +const _sfc_main = { + name: "uniDataChecklist", + mixins: [Rt.mixinDatacom || {}], + emits: ["input", "update:modelValue", "change"], + props: { + mode: { + type: String, + default: "default" + }, + multiple: { + type: Boolean, + default: false + }, + value: { + type: [Array, String, Number], + default() { + return ""; + } + }, + modelValue: { + type: [Array, String, Number], + default() { + return ""; + } + }, + localdata: { + type: Array, + default() { + return []; + } + }, + min: { + type: [Number, String], + default: "" + }, + max: { + type: [Number, String], + default: "" + }, + wrap: { + type: Boolean, + default: false + }, + icon: { + type: String, + default: "left" + }, + selectedColor: { + type: String, + default: "" + }, + selectedTextColor: { + type: String, + default: "" + }, + emptyText: { + type: String, + default: "\u6682\u65E0\u6570\u636E" + }, + disabled: { + type: Boolean, + default: false + }, + map: { + type: Object, + default() { + return { + text: "text", + value: "value" + }; + } + } + }, + watch: { + localdata: { + handler(newVal) { + this.range = newVal; + this.dataList = this.getDataList(this.getSelectedValue(newVal)); + }, + deep: true + }, + mixinDatacomResData(newVal) { + this.range = newVal; + this.dataList = this.getDataList(this.getSelectedValue(newVal)); + }, + value(newVal) { + this.dataList = this.getDataList(newVal); + }, + modelValue(newVal) { + this.dataList = this.getDataList(newVal); + } + }, + data() { + return { + dataList: [], + range: [], + contentText: { + contentdown: "\u67E5\u770B\u66F4\u591A", + contentrefresh: "\u52A0\u8F7D\u4E2D", + contentnomore: "\u6CA1\u6709\u66F4\u591A" + }, + isLocal: true, + styles: { + selectedColor: "#2979ff", + selectedTextColor: "#666" + }, + isTop: 0 + }; + }, + computed: { + dataValue() { + if (this.value === "") + return this.modelValue; + if (this.modelValue === "") + return this.value; + return this.value; + } + }, + created() { + if (this.localdata && this.localdata.length !== 0) { + this.isLocal = true; + this.range = this.localdata; + this.dataList = this.getDataList(this.getSelectedValue(this.range)); + } else { + if (this.collection) { + this.isLocal = false; + this.loadData(); + } + } + }, + methods: { + loadData() { + this.mixinDatacomGet().then((res) => { + this.mixinDatacomResData = res.result.data; + if (this.mixinDatacomResData.length === 0) { + this.isLocal = false; + this.mixinDatacomErrorMessage = this.emptyText; + } else { + this.isLocal = true; + } + }).catch((err) => { + this.mixinDatacomErrorMessage = err.message; + }); + }, + getForm(name = "uniForms") { + let parent = this.$parent; + let parentName = parent.$options.name; + while (parentName !== name) { + parent = parent.$parent; + if (!parent) + return false; + parentName = parent.$options.name; + } + return parent; + }, + chagne(e) { + const values = e.detail.value; + let detail = { + value: [], + data: [] + }; + if (this.multiple) { + this.range.forEach((item) => { + if (values.includes(item[this.map.value] + "")) { + detail.value.push(item[this.map.value]); + detail.data.push(item); + } + }); + } else { + const range = this.range.find((item) => item[this.map.value] + "" === values); + if (range) { + detail = { + value: range[this.map.value], + data: range + }; + } + } + this.$emit("input", detail.value); + this.$emit("update:modelValue", detail.value); + this.$emit("change", { + detail + }); + if (this.multiple) { + this.dataList = this.getDataList(detail.value, true); + } else { + this.dataList = this.getDataList(detail.value); + } + }, + getDataList(value) { + let dataList = JSON.parse(JSON.stringify(this.range)); + let list = []; + if (this.multiple) { + if (!Array.isArray(value)) { + value = []; + } + } + dataList.forEach((item, index) => { + item.disabled = item.disable || item.disabled || false; + if (this.multiple) { + if (value.length > 0) { + let have = value.find((val) => val === item[this.map.value]); + item.selected = have !== void 0; + } else { + item.selected = false; + } + } else { + item.selected = value === item[this.map.value]; + } + list.push(item); + }); + return this.setRange(list); + }, + setRange(list) { + let selectList = list.filter((item) => item.selected); + let min = Number(this.min) || 0; + let max = Number(this.max) || ""; + list.forEach((item, index) => { + if (this.multiple) { + if (selectList.length <= min) { + let have = selectList.find((val) => val[this.map.value] === item[this.map.value]); + if (have !== void 0) { + item.disabled = true; + } + } + if (selectList.length >= max && max !== "") { + let have = selectList.find((val) => val[this.map.value] === item[this.map.value]); + if (have === void 0) { + item.disabled = true; + } + } + } + this.setStyles(item, index); + list[index] = item; + }); + return list; + }, + setStyles(item, index) { + item.styleBackgroud = this.setStyleBackgroud(item); + item.styleIcon = this.setStyleIcon(item); + item.styleIconText = this.setStyleIconText(item); + item.styleRightIcon = this.setStyleRightIcon(item); + }, + getSelectedValue(range) { + if (!this.multiple) + return this.dataValue; + let selectedArr = []; + range.forEach((item) => { + if (item.selected) { + selectedArr.push(item[this.map.value]); + } + }); + return this.dataValue.length > 0 ? this.dataValue : selectedArr; + }, + setStyleBackgroud(item) { + let styles = {}; + let selectedColor = this.selectedColor ? this.selectedColor : "#2979ff"; + if (this.mode !== "list") { + styles["border-color"] = item.selected ? selectedColor : "#DCDFE6"; + } + if (this.mode === "tag") { + styles["background-color"] = item.selected ? selectedColor : "#f5f5f5"; + } + let classles = ""; + for (let i in styles) { + classles += `${i}:${styles[i]};`; + } + return classles; + }, + setStyleIcon(item) { + let styles = {}; + let classles = ""; + let selectedColor = this.selectedColor ? this.selectedColor : "#2979ff"; + styles["background-color"] = item.selected ? selectedColor : "#fff"; + styles["border-color"] = item.selected ? selectedColor : "#DCDFE6"; + if (!item.selected && item.disabled) { + styles["background-color"] = "#F2F6FC"; + styles["border-color"] = item.selected ? selectedColor : "#DCDFE6"; + } + for (let i in styles) { + classles += `${i}:${styles[i]};`; + } + return classles; + }, + setStyleIconText(item) { + let styles = {}; + let classles = ""; + let selectedColor = this.selectedColor ? this.selectedColor : "#2979ff"; + if (this.mode === "tag") { + styles.color = item.selected ? this.selectedTextColor ? this.selectedTextColor : "#fff" : "#666"; + } else { + styles.color = item.selected ? this.selectedTextColor ? this.selectedTextColor : selectedColor : "#666"; + } + if (!item.selected && item.disabled) { + styles.color = "#999"; + } + for (let i in styles) { + classles += `${i}:${styles[i]};`; + } + return classles; + }, + setStyleRightIcon(item) { + let styles = {}; + let classles = ""; + if (this.mode === "list") { + styles["border-color"] = item.selected ? this.styles.selectedColor : "#DCDFE6"; + } + for (let i in styles) { + classles += `${i}:${styles[i]};`; + } + return classles; + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_load_more = resolveEasycom(resolveDynamicComponent("uni-load-more"), __easycom_0); + const _component_checkbox = resolveComponent("checkbox"); + const _component_label = resolveComponent("label"); + const _component_checkbox_group = resolveComponent("checkbox-group"); + const _component_radio = resolveComponent("radio"); + const _component_radio_group = resolveComponent("radio-group"); + return openBlock(), createElementBlock("view", { + class: "uni-data-checklist", + style: normalizeStyle({ "margin-top": $data.isTop + "px" }) + }, [ + !$data.isLocal ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-data-loading" + }, [ + !_ctx.mixinDatacomErrorMessage ? (openBlock(), createBlock(_component_uni_load_more, { + key: 0, + status: "loading", + iconType: "snow", + iconSize: 18, + "content-text": $data.contentText + }, null, 8, ["content-text"])) : (openBlock(), createElementBlock("u-text", { key: 1 }, toDisplayString(_ctx.mixinDatacomErrorMessage), 1)) + ])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [ + $props.multiple ? (openBlock(), createBlock(_component_checkbox_group, { + key: 0, + class: normalizeClass(["checklist-group", { "is-list": $props.mode === "list" || $props.wrap }]), + onChange: $options.chagne + }, { + default: withCtx(() => [ + (openBlock(true), createElementBlock(Fragment, null, renderList($data.dataList, (item, index) => { + return openBlock(), createBlock(_component_label, { + class: normalizeClass(["checklist-box", ["is--" + $props.mode, item.selected ? "is-checked" : "", $props.disabled || !!item.disabled ? "is-disable" : "", index !== 0 && $props.mode === "list" ? "is-list-border" : ""]]), + style: normalizeStyle(item.styleBackgroud), + key: index + }, { + default: withCtx(() => [ + createVNode(_component_checkbox, { + class: "hidden", + hidden: "", + disabled: $props.disabled || !!item.disabled, + value: item[$props.map.value] + "", + checked: item.selected + }, null, 8, ["disabled", "value", "checked"]), + $props.mode !== "tag" && $props.mode !== "list" || $props.mode === "list" && $props.icon === "left" ? (openBlock(), createElementBlock("view", { + key: 0, + class: "checkbox__inner", + style: normalizeStyle(item.styleIcon) + }, [ + createElementVNode("view", { class: "checkbox__inner-icon" }) + ], 4)) : createCommentVNode("v-if", true), + createElementVNode("view", { + class: normalizeClass(["checklist-content", { "list-content": $props.mode === "list" && $props.icon === "left" }]) + }, [ + createElementVNode("u-text", { + class: "checklist-text", + style: normalizeStyle(item.styleIconText) + }, toDisplayString(item[$props.map.text]), 5), + $props.mode === "list" && $props.icon === "right" ? (openBlock(), createElementBlock("view", { + key: 0, + class: "checkobx__list", + style: normalizeStyle(item.styleBackgroud) + }, null, 4)) : createCommentVNode("v-if", true) + ], 2) + ]), + _: 2 + }, 1032, ["class", "style"]); + }), 128)) + ]), + _: 1 + }, 8, ["class", "onChange"])) : (openBlock(), createBlock(_component_radio_group, { + key: 1, + class: normalizeClass(["checklist-group", { "is-list": $props.mode === "list", "is-wrap": $props.wrap }]), + onChange: $options.chagne + }, { + default: withCtx(() => [ + createCommentVNode(" "), + (openBlock(true), createElementBlock(Fragment, null, renderList($data.dataList, (item, index) => { + return openBlock(), createBlock(_component_label, { + class: normalizeClass(["checklist-box", ["is--" + $props.mode, item.selected ? "is-checked" : "", $props.disabled || !!item.disabled ? "is-disable" : "", index !== 0 && $props.mode === "list" ? "is-list-border" : ""]]), + style: normalizeStyle(item.styleBackgroud), + key: index + }, { + default: withCtx(() => [ + createVNode(_component_radio, { + class: "hidden", + hidden: "", + disabled: $props.disabled || item.disabled, + value: item[$props.map.value] + "", + checked: item.selected + }, null, 8, ["disabled", "value", "checked"]), + $props.mode !== "tag" && $props.mode !== "list" || $props.mode === "list" && $props.icon === "left" ? (openBlock(), createElementBlock("view", { + key: 0, + class: "radio__inner", + style: normalizeStyle(item.styleBackgroud) + }, [ + createElementVNode("view", { + class: "radio__inner-icon", + style: normalizeStyle(item.styleIcon) + }, null, 4) + ], 4)) : createCommentVNode("v-if", true), + createElementVNode("view", { + class: normalizeClass(["checklist-content", { "list-content": $props.mode === "list" && $props.icon === "left" }]) + }, [ + createElementVNode("u-text", { + class: "checklist-text", + style: normalizeStyle(item.styleIconText) + }, toDisplayString(item[$props.map.text]), 5), + $props.mode === "list" && $props.icon === "right" ? (openBlock(), createElementBlock("view", { + key: 0, + style: normalizeStyle(item.styleRightIcon), + class: "checkobx__list" + }, null, 4)) : createCommentVNode("v-if", true) + ], 2) + ]), + _: 2 + }, 1032, ["class", "style"]); + }), 128)) + ]), + _: 1 + }, 8, ["class", "onChange"])) + ], 2112)) + ], 4); +} +var __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue"]]); +export { __easycom_1 as _ }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/uni-i18n.es.js b/fe/PDA/unpackage/dist/dev/.nvue/uni-i18n.es.js new file mode 100644 index 000000000..6fd846576 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/uni-i18n.es.js @@ -0,0 +1,282 @@ +const isArray = Array.isArray; +const isObject = (val) => val !== null && typeof val === "object"; +const defaultDelimiters = ["{", "}"]; +class BaseFormatter { + constructor() { + this._caches = /* @__PURE__ */ Object.create(null); + } + interpolate(message, values, delimiters = defaultDelimiters) { + if (!values) { + return [message]; + } + let tokens = this._caches[message]; + if (!tokens) { + tokens = parse(message, delimiters); + this._caches[message] = tokens; + } + return compile(tokens, values); + } +} +const RE_TOKEN_LIST_VALUE = /^(?:\d)+/; +const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/; +function parse(format, [startDelimiter, endDelimiter]) { + const tokens = []; + let position = 0; + let text = ""; + while (position < format.length) { + let char = format[position++]; + if (char === startDelimiter) { + if (text) { + tokens.push({ type: "text", value: text }); + } + text = ""; + let sub = ""; + char = format[position++]; + while (char !== void 0 && char !== endDelimiter) { + sub += char; + char = format[position++]; + } + const isClosed = char === endDelimiter; + const type = RE_TOKEN_LIST_VALUE.test(sub) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? "named" : "unknown"; + tokens.push({ value: sub, type }); + } else { + text += char; + } + } + text && tokens.push({ type: "text", value: text }); + return tokens; +} +function compile(tokens, values) { + const compiled = []; + let index = 0; + const mode = isArray(values) ? "list" : isObject(values) ? "named" : "unknown"; + if (mode === "unknown") { + return compiled; + } + while (index < tokens.length) { + const token = tokens[index]; + switch (token.type) { + case "text": + compiled.push(token.value); + break; + case "list": + compiled.push(values[parseInt(token.value, 10)]); + break; + case "named": + if (mode === "named") { + compiled.push(values[token.value]); + } else { + { + console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`); + } + } + break; + case "unknown": + { + console.warn(`Detect 'unknown' type of token!`); + } + break; + } + index++; + } + return compiled; +} +const LOCALE_ZH_HANS = "zh-Hans"; +const LOCALE_ZH_HANT = "zh-Hant"; +const LOCALE_EN = "en"; +const LOCALE_FR = "fr"; +const LOCALE_ES = "es"; +const hasOwnProperty = Object.prototype.hasOwnProperty; +const hasOwn = (val, key) => hasOwnProperty.call(val, key); +const defaultFormatter = new BaseFormatter(); +function include(str, parts) { + return !!parts.find((part) => str.indexOf(part) !== -1); +} +function startsWith(str, parts) { + return parts.find((part) => str.indexOf(part) === 0); +} +function normalizeLocale(locale, messages) { + if (!locale) { + return; + } + locale = locale.trim().replace(/_/g, "-"); + if (messages && messages[locale]) { + return locale; + } + locale = locale.toLowerCase(); + if (locale === "chinese") { + return LOCALE_ZH_HANS; + } + if (locale.indexOf("zh") === 0) { + if (locale.indexOf("-hans") > -1) { + return LOCALE_ZH_HANS; + } + if (locale.indexOf("-hant") > -1) { + return LOCALE_ZH_HANT; + } + if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) { + return LOCALE_ZH_HANT; + } + return LOCALE_ZH_HANS; + } + const lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]); + if (lang) { + return lang; + } +} +class I18n { + constructor({ locale, fallbackLocale, messages, watcher, formater }) { + this.locale = LOCALE_EN; + this.fallbackLocale = LOCALE_EN; + this.message = {}; + this.messages = {}; + this.watchers = []; + if (fallbackLocale) { + this.fallbackLocale = fallbackLocale; + } + this.formater = formater || defaultFormatter; + this.messages = messages || {}; + this.setLocale(locale || LOCALE_EN); + if (watcher) { + this.watchLocale(watcher); + } + } + setLocale(locale) { + const oldLocale = this.locale; + this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale; + if (!this.messages[this.locale]) { + this.messages[this.locale] = {}; + } + this.message = this.messages[this.locale]; + if (oldLocale !== this.locale) { + this.watchers.forEach((watcher) => { + watcher(this.locale, oldLocale); + }); + } + } + getLocale() { + return this.locale; + } + watchLocale(fn) { + const index = this.watchers.push(fn) - 1; + return () => { + this.watchers.splice(index, 1); + }; + } + add(locale, message, override = true) { + const curMessages = this.messages[locale]; + if (curMessages) { + if (override) { + Object.assign(curMessages, message); + } else { + Object.keys(message).forEach((key) => { + if (!hasOwn(curMessages, key)) { + curMessages[key] = message[key]; + } + }); + } + } else { + this.messages[locale] = message; + } + } + f(message, values, delimiters) { + return this.formater.interpolate(message, values, delimiters).join(""); + } + t(key, locale, values) { + let message = this.message; + if (typeof locale === "string") { + locale = normalizeLocale(locale, this.messages); + locale && (message = this.messages[locale]); + } else { + values = locale; + } + if (!hasOwn(message, key)) { + console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`); + return key; + } + return this.formater.interpolate(message[key], values).join(""); + } +} +function watchAppLocale(appVm, i18n) { + if (appVm.$watchLocale) { + appVm.$watchLocale((newLocale) => { + i18n.setLocale(newLocale); + }); + } else { + appVm.$watch(() => appVm.$locale, (newLocale) => { + i18n.setLocale(newLocale); + }); + } +} +function getDefaultLocale() { + if (typeof uni !== "undefined" && uni.getLocale) { + return uni.getLocale(); + } + if (typeof global !== "undefined" && global.getLocale) { + return global.getLocale(); + } + return LOCALE_EN; +} +function initVueI18n(locale, messages = {}, fallbackLocale, watcher) { + if (typeof locale !== "string") { + [locale, messages] = [ + messages, + locale + ]; + } + if (typeof locale !== "string") { + locale = getDefaultLocale(); + } + if (typeof fallbackLocale !== "string") { + fallbackLocale = typeof __uniConfig !== "undefined" && __uniConfig.fallbackLocale || LOCALE_EN; + } + const i18n = new I18n({ + locale, + fallbackLocale, + messages, + watcher + }); + let t = (key, values) => { + if (typeof getApp !== "function") { + t = function(key2, values2) { + return i18n.t(key2, values2); + }; + } else { + let isWatchedAppLocale = false; + t = function(key2, values2) { + const appVm = getApp().$vm; + if (appVm) { + appVm.$locale; + if (!isWatchedAppLocale) { + isWatchedAppLocale = true; + watchAppLocale(appVm, i18n); + } + } + return i18n.t(key2, values2); + }; + } + return t(key, values); + }; + return { + i18n, + f(message, values, delimiters) { + return i18n.f(message, values, delimiters); + }, + t(key, values) { + return t(key, values); + }, + add(locale2, message, override = true) { + return i18n.add(locale2, message, override); + }, + watch(fn) { + return i18n.watchLocale(fn); + }, + getLocale() { + return i18n.getLocale(); + }, + setLocale(newLocale) { + return i18n.setLocale(newLocale); + } + }; +} +export { initVueI18n as i }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/uni-icons.js b/fe/PDA/unpackage/dist/dev/.nvue/uni-icons.js new file mode 100644 index 000000000..e92e77361 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/uni-icons.js @@ -0,0 +1,1237 @@ +import { openBlock, createElementBlock, normalizeStyle, toDisplayString } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.js"; +var icons = { + "id": "2852637", + "name": "uniui\u56FE\u6807\u5E93", + "font_family": "uniicons", + "css_prefix_text": "uniui-", + "description": "", + "glyphs": [ + { + "icon_id": "25027049", + "name": "yanse", + "font_class": "color", + "unicode": "e6cf", + "unicode_decimal": 59087 + }, + { + "icon_id": "25027048", + "name": "wallet", + "font_class": "wallet", + "unicode": "e6b1", + "unicode_decimal": 59057 + }, + { + "icon_id": "25015720", + "name": "settings-filled", + "font_class": "settings-filled", + "unicode": "e6ce", + "unicode_decimal": 59086 + }, + { + "icon_id": "25015434", + "name": "shimingrenzheng-filled", + "font_class": "auth-filled", + "unicode": "e6cc", + "unicode_decimal": 59084 + }, + { + "icon_id": "24934246", + "name": "shop-filled", + "font_class": "shop-filled", + "unicode": "e6cd", + "unicode_decimal": 59085 + }, + { + "icon_id": "24934159", + "name": "staff-filled-01", + "font_class": "staff-filled", + "unicode": "e6cb", + "unicode_decimal": 59083 + }, + { + "icon_id": "24932461", + "name": "VIP-filled", + "font_class": "vip-filled", + "unicode": "e6c6", + "unicode_decimal": 59078 + }, + { + "icon_id": "24932462", + "name": "plus_circle_fill", + "font_class": "plus-filled", + "unicode": "e6c7", + "unicode_decimal": 59079 + }, + { + "icon_id": "24932463", + "name": "folder_add-filled", + "font_class": "folder-add-filled", + "unicode": "e6c8", + "unicode_decimal": 59080 + }, + { + "icon_id": "24932464", + "name": "yanse-filled", + "font_class": "color-filled", + "unicode": "e6c9", + "unicode_decimal": 59081 + }, + { + "icon_id": "24932465", + "name": "tune-filled", + "font_class": "tune-filled", + "unicode": "e6ca", + "unicode_decimal": 59082 + }, + { + "icon_id": "24932455", + "name": "a-rilidaka-filled", + "font_class": "calendar-filled", + "unicode": "e6c0", + "unicode_decimal": 59072 + }, + { + "icon_id": "24932456", + "name": "notification-filled", + "font_class": "notification-filled", + "unicode": "e6c1", + "unicode_decimal": 59073 + }, + { + "icon_id": "24932457", + "name": "wallet-filled", + "font_class": "wallet-filled", + "unicode": "e6c2", + "unicode_decimal": 59074 + }, + { + "icon_id": "24932458", + "name": "paihangbang-filled", + "font_class": "medal-filled", + "unicode": "e6c3", + "unicode_decimal": 59075 + }, + { + "icon_id": "24932459", + "name": "gift-filled", + "font_class": "gift-filled", + "unicode": "e6c4", + "unicode_decimal": 59076 + }, + { + "icon_id": "24932460", + "name": "fire-filled", + "font_class": "fire-filled", + "unicode": "e6c5", + "unicode_decimal": 59077 + }, + { + "icon_id": "24928001", + "name": "refreshempty", + "font_class": "refreshempty", + "unicode": "e6bf", + "unicode_decimal": 59071 + }, + { + "icon_id": "24926853", + "name": "location-ellipse", + "font_class": "location-filled", + "unicode": "e6af", + "unicode_decimal": 59055 + }, + { + "icon_id": "24926735", + "name": "person-filled", + "font_class": "person-filled", + "unicode": "e69d", + "unicode_decimal": 59037 + }, + { + "icon_id": "24926703", + "name": "personadd-filled", + "font_class": "personadd-filled", + "unicode": "e698", + "unicode_decimal": 59032 + }, + { + "icon_id": "24923351", + "name": "back", + "font_class": "back", + "unicode": "e6b9", + "unicode_decimal": 59065 + }, + { + "icon_id": "24923352", + "name": "forward", + "font_class": "forward", + "unicode": "e6ba", + "unicode_decimal": 59066 + }, + { + "icon_id": "24923353", + "name": "arrowthinright", + "font_class": "arrow-right", + "unicode": "e6bb", + "unicode_decimal": 59067 + }, + { + "icon_id": "24923353", + "name": "arrowthinright", + "font_class": "arrowthinright", + "unicode": "e6bb", + "unicode_decimal": 59067 + }, + { + "icon_id": "24923354", + "name": "arrowthinleft", + "font_class": "arrow-left", + "unicode": "e6bc", + "unicode_decimal": 59068 + }, + { + "icon_id": "24923354", + "name": "arrowthinleft", + "font_class": "arrowthinleft", + "unicode": "e6bc", + "unicode_decimal": 59068 + }, + { + "icon_id": "24923355", + "name": "arrowthinup", + "font_class": "arrow-up", + "unicode": "e6bd", + "unicode_decimal": 59069 + }, + { + "icon_id": "24923355", + "name": "arrowthinup", + "font_class": "arrowthinup", + "unicode": "e6bd", + "unicode_decimal": 59069 + }, + { + "icon_id": "24923356", + "name": "arrowthindown", + "font_class": "arrow-down", + "unicode": "e6be", + "unicode_decimal": 59070 + }, + { + "icon_id": "24923356", + "name": "arrowthindown", + "font_class": "arrowthindown", + "unicode": "e6be", + "unicode_decimal": 59070 + }, + { + "icon_id": "24923349", + "name": "arrowdown", + "font_class": "bottom", + "unicode": "e6b8", + "unicode_decimal": 59064 + }, + { + "icon_id": "24923349", + "name": "arrowdown", + "font_class": "arrowdown", + "unicode": "e6b8", + "unicode_decimal": 59064 + }, + { + "icon_id": "24923346", + "name": "arrowright", + "font_class": "right", + "unicode": "e6b5", + "unicode_decimal": 59061 + }, + { + "icon_id": "24923346", + "name": "arrowright", + "font_class": "arrowright", + "unicode": "e6b5", + "unicode_decimal": 59061 + }, + { + "icon_id": "24923347", + "name": "arrowup", + "font_class": "top", + "unicode": "e6b6", + "unicode_decimal": 59062 + }, + { + "icon_id": "24923347", + "name": "arrowup", + "font_class": "arrowup", + "unicode": "e6b6", + "unicode_decimal": 59062 + }, + { + "icon_id": "24923348", + "name": "arrowleft", + "font_class": "left", + "unicode": "e6b7", + "unicode_decimal": 59063 + }, + { + "icon_id": "24923348", + "name": "arrowleft", + "font_class": "arrowleft", + "unicode": "e6b7", + "unicode_decimal": 59063 + }, + { + "icon_id": "24923334", + "name": "eye", + "font_class": "eye", + "unicode": "e651", + "unicode_decimal": 58961 + }, + { + "icon_id": "24923335", + "name": "eye-filled", + "font_class": "eye-filled", + "unicode": "e66a", + "unicode_decimal": 58986 + }, + { + "icon_id": "24923336", + "name": "eye-slash", + "font_class": "eye-slash", + "unicode": "e6b3", + "unicode_decimal": 59059 + }, + { + "icon_id": "24923337", + "name": "eye-slash-filled", + "font_class": "eye-slash-filled", + "unicode": "e6b4", + "unicode_decimal": 59060 + }, + { + "icon_id": "24923305", + "name": "info-filled", + "font_class": "info-filled", + "unicode": "e649", + "unicode_decimal": 58953 + }, + { + "icon_id": "24923299", + "name": "reload-01", + "font_class": "reload", + "unicode": "e6b2", + "unicode_decimal": 59058 + }, + { + "icon_id": "24923195", + "name": "mic_slash_fill", + "font_class": "micoff-filled", + "unicode": "e6b0", + "unicode_decimal": 59056 + }, + { + "icon_id": "24923165", + "name": "map-pin-ellipse", + "font_class": "map-pin-ellipse", + "unicode": "e6ac", + "unicode_decimal": 59052 + }, + { + "icon_id": "24923166", + "name": "map-pin", + "font_class": "map-pin", + "unicode": "e6ad", + "unicode_decimal": 59053 + }, + { + "icon_id": "24923167", + "name": "location", + "font_class": "location", + "unicode": "e6ae", + "unicode_decimal": 59054 + }, + { + "icon_id": "24923064", + "name": "starhalf", + "font_class": "starhalf", + "unicode": "e683", + "unicode_decimal": 59011 + }, + { + "icon_id": "24923065", + "name": "star", + "font_class": "star", + "unicode": "e688", + "unicode_decimal": 59016 + }, + { + "icon_id": "24923066", + "name": "star-filled", + "font_class": "star-filled", + "unicode": "e68f", + "unicode_decimal": 59023 + }, + { + "icon_id": "24899646", + "name": "a-rilidaka", + "font_class": "calendar", + "unicode": "e6a0", + "unicode_decimal": 59040 + }, + { + "icon_id": "24899647", + "name": "fire", + "font_class": "fire", + "unicode": "e6a1", + "unicode_decimal": 59041 + }, + { + "icon_id": "24899648", + "name": "paihangbang", + "font_class": "medal", + "unicode": "e6a2", + "unicode_decimal": 59042 + }, + { + "icon_id": "24899649", + "name": "font", + "font_class": "font", + "unicode": "e6a3", + "unicode_decimal": 59043 + }, + { + "icon_id": "24899650", + "name": "gift", + "font_class": "gift", + "unicode": "e6a4", + "unicode_decimal": 59044 + }, + { + "icon_id": "24899651", + "name": "link", + "font_class": "link", + "unicode": "e6a5", + "unicode_decimal": 59045 + }, + { + "icon_id": "24899652", + "name": "notification", + "font_class": "notification", + "unicode": "e6a6", + "unicode_decimal": 59046 + }, + { + "icon_id": "24899653", + "name": "staff", + "font_class": "staff", + "unicode": "e6a7", + "unicode_decimal": 59047 + }, + { + "icon_id": "24899654", + "name": "VIP", + "font_class": "vip", + "unicode": "e6a8", + "unicode_decimal": 59048 + }, + { + "icon_id": "24899655", + "name": "folder_add", + "font_class": "folder-add", + "unicode": "e6a9", + "unicode_decimal": 59049 + }, + { + "icon_id": "24899656", + "name": "tune", + "font_class": "tune", + "unicode": "e6aa", + "unicode_decimal": 59050 + }, + { + "icon_id": "24899657", + "name": "shimingrenzheng", + "font_class": "auth", + "unicode": "e6ab", + "unicode_decimal": 59051 + }, + { + "icon_id": "24899565", + "name": "person", + "font_class": "person", + "unicode": "e699", + "unicode_decimal": 59033 + }, + { + "icon_id": "24899566", + "name": "email-filled", + "font_class": "email-filled", + "unicode": "e69a", + "unicode_decimal": 59034 + }, + { + "icon_id": "24899567", + "name": "phone-filled", + "font_class": "phone-filled", + "unicode": "e69b", + "unicode_decimal": 59035 + }, + { + "icon_id": "24899568", + "name": "phone", + "font_class": "phone", + "unicode": "e69c", + "unicode_decimal": 59036 + }, + { + "icon_id": "24899570", + "name": "email", + "font_class": "email", + "unicode": "e69e", + "unicode_decimal": 59038 + }, + { + "icon_id": "24899571", + "name": "personadd", + "font_class": "personadd", + "unicode": "e69f", + "unicode_decimal": 59039 + }, + { + "icon_id": "24899558", + "name": "chatboxes-filled", + "font_class": "chatboxes-filled", + "unicode": "e692", + "unicode_decimal": 59026 + }, + { + "icon_id": "24899559", + "name": "contact", + "font_class": "contact", + "unicode": "e693", + "unicode_decimal": 59027 + }, + { + "icon_id": "24899560", + "name": "chatbubble-filled", + "font_class": "chatbubble-filled", + "unicode": "e694", + "unicode_decimal": 59028 + }, + { + "icon_id": "24899561", + "name": "contact-filled", + "font_class": "contact-filled", + "unicode": "e695", + "unicode_decimal": 59029 + }, + { + "icon_id": "24899562", + "name": "chatboxes", + "font_class": "chatboxes", + "unicode": "e696", + "unicode_decimal": 59030 + }, + { + "icon_id": "24899563", + "name": "chatbubble", + "font_class": "chatbubble", + "unicode": "e697", + "unicode_decimal": 59031 + }, + { + "icon_id": "24881290", + "name": "upload-filled", + "font_class": "upload-filled", + "unicode": "e68e", + "unicode_decimal": 59022 + }, + { + "icon_id": "24881292", + "name": "upload", + "font_class": "upload", + "unicode": "e690", + "unicode_decimal": 59024 + }, + { + "icon_id": "24881293", + "name": "weixin", + "font_class": "weixin", + "unicode": "e691", + "unicode_decimal": 59025 + }, + { + "icon_id": "24881274", + "name": "compose", + "font_class": "compose", + "unicode": "e67f", + "unicode_decimal": 59007 + }, + { + "icon_id": "24881275", + "name": "qq", + "font_class": "qq", + "unicode": "e680", + "unicode_decimal": 59008 + }, + { + "icon_id": "24881276", + "name": "download-filled", + "font_class": "download-filled", + "unicode": "e681", + "unicode_decimal": 59009 + }, + { + "icon_id": "24881277", + "name": "pengyouquan", + "font_class": "pyq", + "unicode": "e682", + "unicode_decimal": 59010 + }, + { + "icon_id": "24881279", + "name": "sound", + "font_class": "sound", + "unicode": "e684", + "unicode_decimal": 59012 + }, + { + "icon_id": "24881280", + "name": "trash-filled", + "font_class": "trash-filled", + "unicode": "e685", + "unicode_decimal": 59013 + }, + { + "icon_id": "24881281", + "name": "sound-filled", + "font_class": "sound-filled", + "unicode": "e686", + "unicode_decimal": 59014 + }, + { + "icon_id": "24881282", + "name": "trash", + "font_class": "trash", + "unicode": "e687", + "unicode_decimal": 59015 + }, + { + "icon_id": "24881284", + "name": "videocam-filled", + "font_class": "videocam-filled", + "unicode": "e689", + "unicode_decimal": 59017 + }, + { + "icon_id": "24881285", + "name": "spinner-cycle", + "font_class": "spinner-cycle", + "unicode": "e68a", + "unicode_decimal": 59018 + }, + { + "icon_id": "24881286", + "name": "weibo", + "font_class": "weibo", + "unicode": "e68b", + "unicode_decimal": 59019 + }, + { + "icon_id": "24881288", + "name": "videocam", + "font_class": "videocam", + "unicode": "e68c", + "unicode_decimal": 59020 + }, + { + "icon_id": "24881289", + "name": "download", + "font_class": "download", + "unicode": "e68d", + "unicode_decimal": 59021 + }, + { + "icon_id": "24879601", + "name": "help", + "font_class": "help", + "unicode": "e679", + "unicode_decimal": 59001 + }, + { + "icon_id": "24879602", + "name": "navigate-filled", + "font_class": "navigate-filled", + "unicode": "e67a", + "unicode_decimal": 59002 + }, + { + "icon_id": "24879603", + "name": "plusempty", + "font_class": "plusempty", + "unicode": "e67b", + "unicode_decimal": 59003 + }, + { + "icon_id": "24879604", + "name": "smallcircle", + "font_class": "smallcircle", + "unicode": "e67c", + "unicode_decimal": 59004 + }, + { + "icon_id": "24879605", + "name": "minus-filled", + "font_class": "minus-filled", + "unicode": "e67d", + "unicode_decimal": 59005 + }, + { + "icon_id": "24879606", + "name": "micoff", + "font_class": "micoff", + "unicode": "e67e", + "unicode_decimal": 59006 + }, + { + "icon_id": "24879588", + "name": "closeempty", + "font_class": "closeempty", + "unicode": "e66c", + "unicode_decimal": 58988 + }, + { + "icon_id": "24879589", + "name": "clear", + "font_class": "clear", + "unicode": "e66d", + "unicode_decimal": 58989 + }, + { + "icon_id": "24879590", + "name": "navigate", + "font_class": "navigate", + "unicode": "e66e", + "unicode_decimal": 58990 + }, + { + "icon_id": "24879591", + "name": "minus", + "font_class": "minus", + "unicode": "e66f", + "unicode_decimal": 58991 + }, + { + "icon_id": "24879592", + "name": "image", + "font_class": "image", + "unicode": "e670", + "unicode_decimal": 58992 + }, + { + "icon_id": "24879593", + "name": "mic", + "font_class": "mic", + "unicode": "e671", + "unicode_decimal": 58993 + }, + { + "icon_id": "24879594", + "name": "paperplane", + "font_class": "paperplane", + "unicode": "e672", + "unicode_decimal": 58994 + }, + { + "icon_id": "24879595", + "name": "close", + "font_class": "close", + "unicode": "e673", + "unicode_decimal": 58995 + }, + { + "icon_id": "24879596", + "name": "help-filled", + "font_class": "help-filled", + "unicode": "e674", + "unicode_decimal": 58996 + }, + { + "icon_id": "24879597", + "name": "plus-filled", + "font_class": "paperplane-filled", + "unicode": "e675", + "unicode_decimal": 58997 + }, + { + "icon_id": "24879598", + "name": "plus", + "font_class": "plus", + "unicode": "e676", + "unicode_decimal": 58998 + }, + { + "icon_id": "24879599", + "name": "mic-filled", + "font_class": "mic-filled", + "unicode": "e677", + "unicode_decimal": 58999 + }, + { + "icon_id": "24879600", + "name": "image-filled", + "font_class": "image-filled", + "unicode": "e678", + "unicode_decimal": 59e3 + }, + { + "icon_id": "24855900", + "name": "locked-filled", + "font_class": "locked-filled", + "unicode": "e668", + "unicode_decimal": 58984 + }, + { + "icon_id": "24855901", + "name": "info", + "font_class": "info", + "unicode": "e669", + "unicode_decimal": 58985 + }, + { + "icon_id": "24855903", + "name": "locked", + "font_class": "locked", + "unicode": "e66b", + "unicode_decimal": 58987 + }, + { + "icon_id": "24855884", + "name": "camera-filled", + "font_class": "camera-filled", + "unicode": "e658", + "unicode_decimal": 58968 + }, + { + "icon_id": "24855885", + "name": "chat-filled", + "font_class": "chat-filled", + "unicode": "e659", + "unicode_decimal": 58969 + }, + { + "icon_id": "24855886", + "name": "camera", + "font_class": "camera", + "unicode": "e65a", + "unicode_decimal": 58970 + }, + { + "icon_id": "24855887", + "name": "circle", + "font_class": "circle", + "unicode": "e65b", + "unicode_decimal": 58971 + }, + { + "icon_id": "24855888", + "name": "checkmarkempty", + "font_class": "checkmarkempty", + "unicode": "e65c", + "unicode_decimal": 58972 + }, + { + "icon_id": "24855889", + "name": "chat", + "font_class": "chat", + "unicode": "e65d", + "unicode_decimal": 58973 + }, + { + "icon_id": "24855890", + "name": "circle-filled", + "font_class": "circle-filled", + "unicode": "e65e", + "unicode_decimal": 58974 + }, + { + "icon_id": "24855891", + "name": "flag", + "font_class": "flag", + "unicode": "e65f", + "unicode_decimal": 58975 + }, + { + "icon_id": "24855892", + "name": "flag-filled", + "font_class": "flag-filled", + "unicode": "e660", + "unicode_decimal": 58976 + }, + { + "icon_id": "24855893", + "name": "gear-filled", + "font_class": "gear-filled", + "unicode": "e661", + "unicode_decimal": 58977 + }, + { + "icon_id": "24855894", + "name": "home", + "font_class": "home", + "unicode": "e662", + "unicode_decimal": 58978 + }, + { + "icon_id": "24855895", + "name": "home-filled", + "font_class": "home-filled", + "unicode": "e663", + "unicode_decimal": 58979 + }, + { + "icon_id": "24855896", + "name": "gear", + "font_class": "gear", + "unicode": "e664", + "unicode_decimal": 58980 + }, + { + "icon_id": "24855897", + "name": "smallcircle-filled", + "font_class": "smallcircle-filled", + "unicode": "e665", + "unicode_decimal": 58981 + }, + { + "icon_id": "24855898", + "name": "map-filled", + "font_class": "map-filled", + "unicode": "e666", + "unicode_decimal": 58982 + }, + { + "icon_id": "24855899", + "name": "map", + "font_class": "map", + "unicode": "e667", + "unicode_decimal": 58983 + }, + { + "icon_id": "24855825", + "name": "refresh-filled", + "font_class": "refresh-filled", + "unicode": "e656", + "unicode_decimal": 58966 + }, + { + "icon_id": "24855826", + "name": "refresh", + "font_class": "refresh", + "unicode": "e657", + "unicode_decimal": 58967 + }, + { + "icon_id": "24855808", + "name": "cloud-upload", + "font_class": "cloud-upload", + "unicode": "e645", + "unicode_decimal": 58949 + }, + { + "icon_id": "24855809", + "name": "cloud-download-filled", + "font_class": "cloud-download-filled", + "unicode": "e646", + "unicode_decimal": 58950 + }, + { + "icon_id": "24855810", + "name": "cloud-download", + "font_class": "cloud-download", + "unicode": "e647", + "unicode_decimal": 58951 + }, + { + "icon_id": "24855811", + "name": "cloud-upload-filled", + "font_class": "cloud-upload-filled", + "unicode": "e648", + "unicode_decimal": 58952 + }, + { + "icon_id": "24855813", + "name": "redo", + "font_class": "redo", + "unicode": "e64a", + "unicode_decimal": 58954 + }, + { + "icon_id": "24855814", + "name": "images-filled", + "font_class": "images-filled", + "unicode": "e64b", + "unicode_decimal": 58955 + }, + { + "icon_id": "24855815", + "name": "undo-filled", + "font_class": "undo-filled", + "unicode": "e64c", + "unicode_decimal": 58956 + }, + { + "icon_id": "24855816", + "name": "more", + "font_class": "more", + "unicode": "e64d", + "unicode_decimal": 58957 + }, + { + "icon_id": "24855817", + "name": "more-filled", + "font_class": "more-filled", + "unicode": "e64e", + "unicode_decimal": 58958 + }, + { + "icon_id": "24855818", + "name": "undo", + "font_class": "undo", + "unicode": "e64f", + "unicode_decimal": 58959 + }, + { + "icon_id": "24855819", + "name": "images", + "font_class": "images", + "unicode": "e650", + "unicode_decimal": 58960 + }, + { + "icon_id": "24855821", + "name": "paperclip", + "font_class": "paperclip", + "unicode": "e652", + "unicode_decimal": 58962 + }, + { + "icon_id": "24855822", + "name": "settings", + "font_class": "settings", + "unicode": "e653", + "unicode_decimal": 58963 + }, + { + "icon_id": "24855823", + "name": "search", + "font_class": "search", + "unicode": "e654", + "unicode_decimal": 58964 + }, + { + "icon_id": "24855824", + "name": "redo-filled", + "font_class": "redo-filled", + "unicode": "e655", + "unicode_decimal": 58965 + }, + { + "icon_id": "24841702", + "name": "list", + "font_class": "list", + "unicode": "e644", + "unicode_decimal": 58948 + }, + { + "icon_id": "24841489", + "name": "mail-open-filled", + "font_class": "mail-open-filled", + "unicode": "e63a", + "unicode_decimal": 58938 + }, + { + "icon_id": "24841491", + "name": "hand-thumbsdown-filled", + "font_class": "hand-down-filled", + "unicode": "e63c", + "unicode_decimal": 58940 + }, + { + "icon_id": "24841492", + "name": "hand-thumbsdown", + "font_class": "hand-down", + "unicode": "e63d", + "unicode_decimal": 58941 + }, + { + "icon_id": "24841493", + "name": "hand-thumbsup-filled", + "font_class": "hand-up-filled", + "unicode": "e63e", + "unicode_decimal": 58942 + }, + { + "icon_id": "24841494", + "name": "hand-thumbsup", + "font_class": "hand-up", + "unicode": "e63f", + "unicode_decimal": 58943 + }, + { + "icon_id": "24841496", + "name": "heart-filled", + "font_class": "heart-filled", + "unicode": "e641", + "unicode_decimal": 58945 + }, + { + "icon_id": "24841498", + "name": "mail-open", + "font_class": "mail-open", + "unicode": "e643", + "unicode_decimal": 58947 + }, + { + "icon_id": "24841488", + "name": "heart", + "font_class": "heart", + "unicode": "e639", + "unicode_decimal": 58937 + }, + { + "icon_id": "24839963", + "name": "loop", + "font_class": "loop", + "unicode": "e633", + "unicode_decimal": 58931 + }, + { + "icon_id": "24839866", + "name": "pulldown", + "font_class": "pulldown", + "unicode": "e632", + "unicode_decimal": 58930 + }, + { + "icon_id": "24813798", + "name": "scan", + "font_class": "scan", + "unicode": "e62a", + "unicode_decimal": 58922 + }, + { + "icon_id": "24813786", + "name": "bars", + "font_class": "bars", + "unicode": "e627", + "unicode_decimal": 58919 + }, + { + "icon_id": "24813788", + "name": "cart-filled", + "font_class": "cart-filled", + "unicode": "e629", + "unicode_decimal": 58921 + }, + { + "icon_id": "24813790", + "name": "checkbox", + "font_class": "checkbox", + "unicode": "e62b", + "unicode_decimal": 58923 + }, + { + "icon_id": "24813791", + "name": "checkbox-filled", + "font_class": "checkbox-filled", + "unicode": "e62c", + "unicode_decimal": 58924 + }, + { + "icon_id": "24813794", + "name": "shop", + "font_class": "shop", + "unicode": "e62f", + "unicode_decimal": 58927 + }, + { + "icon_id": "24813795", + "name": "headphones", + "font_class": "headphones", + "unicode": "e630", + "unicode_decimal": 58928 + }, + { + "icon_id": "24813796", + "name": "cart", + "font_class": "cart", + "unicode": "e631", + "unicode_decimal": 58929 + } + ] +}; +var iconUrl = "/uni_modules/uni-icons/components/uni-icons/uniicons.ttf"; +var _style_0 = { "uni-icons": { "": { "fontFamily": "uniicons", "textDecoration": "none", "textAlign": "center" } } }; +const getVal = (val) => { + const reg = /^[0-9]*$/g; + return typeof val === "number" || reg.test(val) ? val + "px" : val; +}; +var domModule = weex.requireModule("dom"); +domModule.addRule("fontFace", { + "fontFamily": "uniicons", + "src": "url('" + iconUrl + "')" +}); +const _sfc_main = { + name: "UniIcons", + emits: ["click"], + props: { + type: { + type: String, + default: "" + }, + color: { + type: String, + default: "#333333" + }, + size: { + type: [Number, String], + default: 16 + }, + customPrefix: { + type: String, + default: "" + } + }, + data() { + return { + icons: icons.glyphs + }; + }, + computed: { + unicode() { + let code = this.icons.find((v) => v.font_class === this.type); + if (code) { + return unescape(`%u${code.unicode}`); + } + return ""; + }, + iconSize() { + return getVal(this.size); + } + }, + methods: { + _onClick() { + this.$emit("click"); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("u-text", { + style: normalizeStyle({ color: $props.color, "font-size": $options.iconSize }), + class: "uni-icons", + onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args)) + }, toDisplayString($options.unicode), 5); +} +var __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]); +export { __easycom_1 as _ }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/uni-list.js b/fe/PDA/unpackage/dist/dev/.nvue/uni-list.js new file mode 100644 index 000000000..348097433 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/uni-list.js @@ -0,0 +1,313 @@ +import { _ as __easycom_1 } from "./uni-icons.js"; +import { resolveDynamicComponent, resolveComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, createCommentVNode, renderSlot, createVNode, toDisplayString, createBlock } from "vue"; +import { r as resolveEasycom } from "./uni-app.es.js"; +import { _ as __easycom_5 } from "./uni-badge.js"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.js"; +var _style_0$1 = { "uni-list-item": { "": { "fontSize": 16, "position": "relative", "justifyContent": "space-between", "alignItems": "center", "backgroundColor": "#ffffff", "flexDirection": "row" } }, "uni-list-item--disabled": { "": { "opacity": 0.3 } }, "uni-list-item--hover": { "": { "backgroundColor": "#f1f1f1" } }, "uni-list-item__container": { "": { "position": "relative", "flexDirection": "row", "paddingTop": 12, "paddingRight": 15, "paddingBottom": 12, "paddingLeft": 15, "flex": 1, "overflow": "hidden" } }, "container--right": { "": { "paddingRight": 0 } }, "uni-list--border": { "": { "position": "absolute", "top": 0, "right": 0, "left": 0, "borderTopColor": "#e5e5e5", "borderTopStyle": "solid", "borderTopWidth": 0.5 } }, "uni-list-item__content": { "": { "paddingRight": 8, "flex": 1, "color": "#3b4144", "flexDirection": "column", "justifyContent": "space-between", "overflow": "hidden" } }, "uni-list-item__content--center": { "": { "justifyContent": "center" } }, "uni-list-item__content-title": { "": { "fontSize": 14, "color": "#3b4144", "overflow": "hidden" } }, "uni-list-item__content-note": { "": { "marginTop": "6rpx", "color": "#999999", "fontSize": 12, "overflow": "hidden" } }, "uni-list-item__extra": { "": { "flexDirection": "row", "justifyContent": "flex-end", "alignItems": "center" } }, "uni-list-item__header": { "": { "flexDirection": "row", "alignItems": "center" } }, "uni-list-item__icon": { "": { "marginRight": "18rpx", "flexDirection": "row", "justifyContent": "center", "alignItems": "center" } }, "uni-list-item__icon-img": { "": { "height": 26, "width": 26, "marginRight": 10 } }, "uni-icon-wrapper": { "": { "alignItems": "center", "paddingTop": 0, "paddingRight": 10, "paddingBottom": 0, "paddingLeft": 10 } }, "flex--direction": { "": { "flexDirection": "column" } }, "uni-list--lg": { "": { "height": 40, "width": 40 } }, "uni-list--base": { "": { "height": 26, "width": 26 } }, "uni-list--sm": { "": { "height": 20, "width": 20 } }, "uni-list-item__extra-text": { "": { "color": "#999999", "fontSize": 12 } }, "uni-ellipsis-1": { "": { "lines": 1, "textOverflow": "ellipsis" } }, "uni-ellipsis-2": { "": { "lines": 2, "textOverflow": "ellipsis" } } }; +const _sfc_main$1 = { + name: "UniListItem", + emits: ["click", "switchChange"], + props: { + direction: { + type: String, + default: "row" + }, + title: { + type: String, + default: "" + }, + note: { + type: String, + default: "" + }, + ellipsis: { + type: [Number, String], + default: 0 + }, + disabled: { + type: [Boolean, String], + default: false + }, + clickable: { + type: Boolean, + default: false + }, + showArrow: { + type: [Boolean, String], + default: false + }, + link: { + type: [Boolean, String], + default: false + }, + to: { + type: String, + default: "" + }, + showBadge: { + type: [Boolean, String], + default: false + }, + showSwitch: { + type: [Boolean, String], + default: false + }, + switchChecked: { + type: [Boolean, String], + default: false + }, + badgeText: { + type: String, + default: "" + }, + badgeType: { + type: String, + default: "success" + }, + badgeStyle: { + type: Object, + default() { + return {}; + } + }, + rightText: { + type: String, + default: "" + }, + thumb: { + type: String, + default: "" + }, + thumbSize: { + type: String, + default: "base" + }, + showExtraIcon: { + type: [Boolean, String], + default: false + }, + extraIcon: { + type: Object, + default() { + return { + type: "", + color: "#000000", + size: 20 + }; + } + }, + border: { + type: Boolean, + default: true + } + }, + data() { + return { + isFirstChild: false + }; + }, + mounted() { + this.list = this.getForm(); + if (this.list) { + if (!this.list.firstChildAppend) { + this.list.firstChildAppend = true; + this.isFirstChild = true; + } + } + }, + methods: { + getForm(name = "uniList") { + let parent = this.$parent; + let parentName = parent.$options.name; + while (parentName !== name) { + parent = parent.$parent; + if (!parent) + return false; + parentName = parent.$options.name; + } + return parent; + }, + onClick() { + if (this.to !== "") { + this.openPage(); + return; + } + if (this.clickable || this.link) { + this.$emit("click", { + data: {} + }); + } + }, + onSwitchChange(e) { + this.$emit("switchChange", e.detail); + }, + openPage() { + if (["navigateTo", "redirectTo", "reLaunch", "switchTab"].indexOf(this.link) !== -1) { + this.pageApi(this.link); + } else { + this.pageApi("navigateTo"); + } + }, + pageApi(api) { + let callback = { + url: this.to, + success: (res) => { + this.$emit("click", { + data: res + }); + }, + fail: (err) => { + this.$emit("click", { + data: err + }); + } + }; + switch (api) { + case "navigateTo": + uni.navigateTo(callback); + break; + case "redirectTo": + uni.redirectTo(callback); + break; + case "reLaunch": + uni.reLaunch(callback); + break; + case "switchTab": + uni.switchTab(callback); + break; + default: + uni.navigateTo(callback); + } + } + } +}; +function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { + const _component_uni_icons = resolveEasycom(resolveDynamicComponent("uni-icons"), __easycom_1); + const _component_uni_badge = resolveEasycom(resolveDynamicComponent("uni-badge"), __easycom_5); + const _component_switch = resolveComponent("switch"); + return openBlock(), createElementBlock("cell", null, [ + createElementVNode("view", { + class: normalizeClass([{ "uni-list-item--disabled": $props.disabled }, "uni-list-item"]), + hoverClass: !$props.clickable && !$props.link || $props.disabled || $props.showSwitch ? "" : "uni-list-item--hover", + onClick: _cache[0] || (_cache[0] = (...args) => $options.onClick && $options.onClick(...args)) + }, [ + !$data.isFirstChild ? (openBlock(), createElementBlock("view", { + key: 0, + class: normalizeClass(["border--left", { "uni-list--border": $props.border }]) + }, null, 2)) : createCommentVNode("v-if", true), + createElementVNode("view", { + class: normalizeClass(["uni-list-item__container", { "container--right": $props.showArrow || $props.link, "flex--direction": $props.direction === "column" }]) + }, [ + renderSlot(_ctx.$slots, "header", {}, () => [ + createElementVNode("view", { class: "uni-list-item__header" }, [ + $props.thumb ? (openBlock(), createElementBlock("view", { + key: 0, + class: "uni-list-item__icon" + }, [ + createElementVNode("u-image", { + src: $props.thumb, + class: normalizeClass(["uni-list-item__icon-img", ["uni-list--" + $props.thumbSize]]) + }, null, 10, ["src"]) + ])) : $props.showExtraIcon ? (openBlock(), createElementBlock("view", { + key: 1, + class: "uni-list-item__icon" + }, [ + createVNode(_component_uni_icons, { + color: $props.extraIcon.color, + size: $props.extraIcon.size, + type: $props.extraIcon.type + }, null, 8, ["color", "size", "type"]) + ])) : createCommentVNode("v-if", true) + ]) + ]), + renderSlot(_ctx.$slots, "body", {}, () => [ + createElementVNode("view", { + class: normalizeClass(["uni-list-item__content", { "uni-list-item__content--center": $props.thumb || $props.showExtraIcon || $props.showBadge || $props.showSwitch }]) + }, [ + $props.title ? (openBlock(), createElementBlock("u-text", { + key: 0, + class: normalizeClass(["uni-list-item__content-title", [$props.ellipsis !== 0 && $props.ellipsis <= 2 ? "uni-ellipsis-" + $props.ellipsis : ""]]) + }, toDisplayString($props.title), 3)) : createCommentVNode("v-if", true), + $props.note ? (openBlock(), createElementBlock("u-text", { + key: 1, + class: "uni-list-item__content-note" + }, toDisplayString($props.note), 1)) : createCommentVNode("v-if", true) + ], 2) + ]), + renderSlot(_ctx.$slots, "footer", {}, () => [ + $props.rightText || $props.showBadge || $props.showSwitch ? (openBlock(), createElementBlock("view", { + key: 0, + class: normalizeClass(["uni-list-item__extra", { "flex--justify": $props.direction === "column" }]) + }, [ + $props.rightText ? (openBlock(), createElementBlock("u-text", { + key: 0, + class: "uni-list-item__extra-text" + }, toDisplayString($props.rightText), 1)) : createCommentVNode("v-if", true), + $props.showBadge ? (openBlock(), createBlock(_component_uni_badge, { + key: 1, + type: $props.badgeType, + text: $props.badgeText, + "custom-style": $props.badgeStyle + }, null, 8, ["type", "text", "custom-style"])) : createCommentVNode("v-if", true), + $props.showSwitch ? (openBlock(), createBlock(_component_switch, { + key: 2, + disabled: $props.disabled, + checked: $props.switchChecked, + onChange: $options.onSwitchChange + }, null, 8, ["disabled", "checked", "onChange"])) : createCommentVNode("v-if", true) + ], 2)) : createCommentVNode("v-if", true) + ]) + ], 2), + $props.showArrow || $props.link ? (openBlock(), createBlock(_component_uni_icons, { + key: 1, + size: 16, + class: "uni-icon-wrapper", + color: "#bbb", + type: "arrowright" + })) : createCommentVNode("v-if", true) + ], 10, ["hoverClass"]) + ]); +} +var __easycom_3 = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["styles", [_style_0$1]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue"]]); +var _style_0 = { "uni-list": { "": { "backgroundColor": "#ffffff", "position": "relative", "flexDirection": "column" } }, "uni-list--border": { "": { "position": "relative", "borderTopColor": "#e5e5e5", "borderTopStyle": "solid", "borderTopWidth": 0.5, "borderBottomColor": "#e5e5e5", "borderBottomStyle": "solid", "borderBottomWidth": 0.5, "zIndex": -1 } } }; +const _sfc_main = { + name: "uniList", + "mp-weixin": { + options: { + multipleSlots: false + } + }, + props: { + enableBackToTop: { + type: [Boolean, String], + default: false + }, + scrollY: { + type: [Boolean, String], + default: false + }, + border: { + type: Boolean, + default: true + } + }, + created() { + this.firstChildAppend = false; + }, + methods: { + loadMore(e) { + this.$emit("scrolltolower"); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("list", { + class: normalizeClass(["uni-list", { "uni-list--border": $props.border }]), + enableBackToTop: $props.enableBackToTop, + loadmoreoffset: "15" + }, [ + renderSlot(_ctx.$slots, "default") + ], 10, ["enableBackToTop"]); +} +var __easycom_4 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-list/components/uni-list/uni-list.vue"]]); +export { __easycom_3 as _, __easycom_4 as a }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/uni-load-more.js b/fe/PDA/unpackage/dist/dev/.nvue/uni-load-more.js new file mode 100644 index 000000000..1605e5d75 --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/uni-load-more.js @@ -0,0 +1,132 @@ +import { i as initVueI18n } from "./uni-i18n.es.js"; +import { openBlock, createElementBlock, normalizeStyle, createCommentVNode, toDisplayString } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.js"; +var en = { + "uni-load-more.contentdown": "Pull up to show more", + "uni-load-more.contentrefresh": "loading...", + "uni-load-more.contentnomore": "No more data" +}; +var zhHans = { + "uni-load-more.contentdown": "\u4E0A\u62C9\u663E\u793A\u66F4\u591A", + "uni-load-more.contentrefresh": "\u6B63\u5728\u52A0\u8F7D...", + "uni-load-more.contentnomore": "\u6CA1\u6709\u66F4\u591A\u6570\u636E\u4E86" +}; +var zhHant = { + "uni-load-more.contentdown": "\u4E0A\u62C9\u986F\u793A\u66F4\u591A", + "uni-load-more.contentrefresh": "\u6B63\u5728\u52A0\u8F09...", + "uni-load-more.contentnomore": "\u6C92\u6709\u66F4\u591A\u6578\u64DA\u4E86" +}; +var messages = { + en, + "zh-Hans": zhHans, + "zh-Hant": zhHant +}; +var _style_0 = { "uni-load-more": { "": { "flexDirection": "row", "height": 40, "alignItems": "center", "justifyContent": "center" } }, "uni-load-more__text": { "": { "fontSize": 14, "marginLeft": 8 } }, "uni-load-more__img": { "": { "width": 24, "height": 24 } }, "uni-load-more__img--nvue": { "": { "color": "#666666" } }, "uni-load-more__img--android": { "": { "width": 24, "height": 24, "transform": "rotate(0deg)" } }, "uni-load-more__img--ios": { "": { "width": 24, "height": 24, "transform": "rotate(0deg)" } } }; +let platform; +setTimeout(() => { + platform = uni.getSystemInfoSync().platform; +}, 16); +const { + t +} = initVueI18n(messages); +const _sfc_main = { + name: "UniLoadMore", + emits: ["clickLoadMore"], + props: { + status: { + type: String, + default: "more" + }, + showIcon: { + type: Boolean, + default: true + }, + iconType: { + type: String, + default: "auto" + }, + iconSize: { + type: Number, + default: 24 + }, + color: { + type: String, + default: "#777777" + }, + contentText: { + type: Object, + default() { + return { + contentdown: "", + contentrefresh: "", + contentnomore: "" + }; + } + }, + showText: { + type: Boolean, + default: true + } + }, + data() { + return { + webviewHide: false, + platform, + imgBase64: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzlBMzU3OTlEOUM0MTFFOUI0NTZDNERBQURBQzI4RkUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzlBMzU3OUFEOUM0MTFFOUI0NTZDNERBQURBQzI4RkUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDOUEzNTc5N0Q5QzQxMUU5QjQ1NkM0REFBREFDMjhGRSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDOUEzNTc5OEQ5QzQxMUU5QjQ1NkM0REFBREFDMjhGRSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pt+ALSwAAA6CSURBVHja1FsLkFZVHb98LM+F5bHL8khA1iSeiyQBCRM+YGqKUnnJTDLGI0BGZlKDIU2MMglUiDApEZvSsZnQtBRJtKwQNKQMFYeRDR10WOLd8ljYXdh+v8v5fR3Od+797t1dnOnO/Ofce77z+J//+b/P+ZqtXbs2sJ9MJhNUV1cHJ06cCJo3bx7EPc2aNcvpy7pWrVoF+/fvDyoqKoI2bdoE9fX1F7TjN8a+EXBn/fkfvw942Tf+wYMHg9mzZwfjxo0LDhw4EPa1x2MbFw/fOGfPng1qa2tzcCkILsLDydq2bRsunpOTMM7TD/W/tZDZhPdeKD+yGxHhdu3aBV27dg3OnDlzMVANMheLAO3btw8KCwuDmpoaX5OxbgUIMEq7K8IcPnw4KCsrC/r37x8cP378/4cAXAB3vqSkJMuiDhTkw+XcuXNhOWbMmKBly5YhUT8xArhyFvP0BfwRsAuwxJZJsm/nzp2DTp06he/OU+cZ64K6o0ePBkOHDg2GDx8e6gEbJ5Q/NHNuAJQ1hgBeHUDlR7nVTkY8rQAvAi4z34vR/mPs1FoRsaCgIJThI0eOBC1atEiFGGV+5MiRoS45efJkqFjJFXV1dQuA012m2WcwTw98fy6CqBdsaiIO4CScrGPHjvk4odhavPquRtFWXEC25VgkREKOCh/qDSq+vn37htzD/mZTOmOc5U7zKzBPEedygWshcDyWvs30igAbU+6oyMgJBCFhwQE0fccxN60Ay9iebbjoDh06hMowjQxT4fXq1SskArmHZpkArvixp/kWzHdMeArExSJEaiXIjjRjRJ4DaAGWpibLzXN3Fm1vA5teBgh3j1Rv3bp1YgKwPdmf2p9zcyNYYgPKMfY0T5f5nNYdw158nJ8QawW4CLKwiOBSEgO/hok2eBydR+3dYH+PLxA5J8Vv0KBBwenTp0P2JWAx6+yFEBfs8lMY+y0SWMBNI9E4ThKi58VKTg3FQZS1RQF1cz27eC0QHMu+3E0SkUowjhVt5VdaWhp07949ZHv2Qd1EjDXM2cla1M0nl3GxAs3J9yREzyTdFVKVFOaE9qRA8GM0WebRuo9JGZKA7Mv2SeS/Z8+eoQ9BArMfFrLGo6jvxbhHbJZnKX2Rzz1O7QhJJ9Cs2ZMaWIyq/zhdeqPNfIoHd58clIQD+JSXl4dKlyIAuBdVXZwFVWKspSSoxE++h8x4k3uCnEhE4I5KwRiFWGOU0QWKiCYLbdoRMRKAu2kQ9vkfLU6dOhX06NEjlH+yMRZSinnuyWnYosVcji8CEA/6Cg2JF+IIUBqnGKUTCNwtwBN4f89RiK1R96DEgO2o0NDmtEdvVFdVVYV+P3UAPUEs6GFwV3PHmXkD4vh74iDFJysVI/MlaQhwKeBNTLYX5VuA8T4/gZxA4MRGFxDB6R7OmYPfyykGRJbyie+XnGYnQIC/coH9+vULiYrxrkL9ZA9+0ykaHIfEpM7ge8TiJ2CsHYwyMfafAF1yCGBHYIbCVDjDjKt7BeB51D+LgQa6OkG7IDYEEtvQ7lnXLKLtLdLuJBpE4gPUXcW2+PkZwOex+4cGDhwYDBkyRL7/HFcEwUGPo/8uWRUpYnfxGHco8HkewLHLyYmAawAPuIFZxhOpDfJQ8gbUv41yORAptMWBNr6oqMhWird5+u+iHmBb2nhjDV7HWBNQTgK8y11l5NetWzc5ULscAtSj7nbNI0skhWeUZCc0W4nyH/jO4Vz0u1IeYhbk4AiwM6tjxIWByHsoZ9qcIBPJd/y+DwPfBESOmCa/QF3WiZHucLlEDpNxcNhmheEOPgdQNx6/VZFQzFZ5TN08AHXQt2Ii3EdyFuUsPtTcGPhW5iMiCNELvz+Gdn9huG4HUJaW/w3g0wxV0XaG7arG2WeKiUWYM4Y7GO5ezshTARbbWGw/DvXkpp/ivVvE0JVoMxN4rpGzJMhE5Pl+xlATsDIqikP9F9D2z3h9nOksEUFhK+qO4rcPkoalMQ/HqJLIyb3F3JdjrCcw1yZ8joyJLR5gCo54etlag7qIoeNh1N1BRYj3DTFJ0elotxPlVzkGuYAmL0VSJVGAJA41c4Z6A3BzTLfn0HYwYKEI6CUAMzZEWvLsIcQOo1AmmyyM72nHJCfYsogflGV6jEk9vyQZXSuq6w4c16NsGcGZbwOPr+H1RkOk2LEzjNepxQkihHSCQ4ynAYNRx2zMKV92CQMWqj8J0BRE8EShxRFN6YrfCRhC0x3r/Zm4IbQCcmJoV0kMamllccR6FjHqUC5F2R/wS2dcymOlfAKOS4KmzQb5cpNC2MC7JhVn5wjXoJ44rYhLh8n0eXOCorJxa7POjbSlCGVczr34/RsAmrcvo9s+wGp3tzVhntxiXiJ4nvEYb4FJkf0O8HocAePmLvCxnL0AORraVekJk6TYjDabRVXfRE2lCN1h6ZQRN1+InUbsCpKwoBZHh0dODN9JBCUffItXxEavTQkUtnfTVAplCWL3JISz29h4NjotnuSsQKJCk8dF+kJR6RARjrqFVmfPnj3ZbK8cIJ0msd6jgHPGtfVTQ8VLmlvh4mct9sobRmPic0DyDQQnx/NlfYUgyz59+oScsH379pAwXABD32nTpoUHIToESeI5mnbE/UqDdyLcafEBf2MCqgC7NwxIbMREJQ0g4D4sfJwnD+AmRrII05cfMWJE+L1169bQr+fip06dGp4oJ83lmYd5wj/EmMa4TaHivo4EeCguYZBnkB5g2aWA69OIEnUHOaGysjIYMGBAMGnSpODYsWPZwCpFmm4lNq+4gSLQA7jcX8DwtjEyRC8wjabnXEx9kfWnTJkSJkAo90xpJVV+FmcVNeYAF5zWngS4C4O91MBxmAv8blLEpbjI5sz9MTdAhcgkCT1RO8mZkAjfiYpTEvStAS53Uw1vAiUGgZ3GpuQEYvoiBqlIan7kSDHnTwJQFNiPu0+5VxCVYhcZIjNrdXUDdp+Eq5AZ3Gkg8QAyVZRZIk4Tl4QAbF9cXJxNYZMAtAokgs4BrNxEpCtteXg7DDTMDKYNSuQdKsnJBek7HxewvxaosWxLYXtw+cJp18217wql4aKCfBNoEu0O5VU+PhctJ0YeXD4C6JQpyrlpSLTojpGGGN5YwNziChdIZLk4lvLcFJ9jMX3QdiImY9bmGQU+TRUL5CHITTRlgF8D9ouD1MfmLoEPl5xokIumZ2cfgMpHt47IW9N64Hsh7wQYYjyIugWuF5fCqYncXRd5vPMWyizzvhi/32+nvG0dZc9vR6fZOu0md5e+uC408FvKSIOZwXlGvxPv95izA2Vtvg1xKFWARI+vMX66HUhpQQb643uW1bSjuTWyw2SBvDrBvjFic1eGGlz5esq3ko9uSIlBRqPuFcCv8F4WIcN12nVaBd0SaYwI6PDDImR11JkqgHcPmQssjxIn6bUshygDFJUTxPMpHk+jfjPgupgdnYV2R/g7xSjtpah8RJBewhwf0gGK6XI92u4wXFEU40afJ4DN4h5LcAd+40HI3JgJecuT0c062W0i2hQJUTcxan3/CMW1PF2K6bbA+Daz4xRs1D3Br1Cm0OihKCqizW78/nXAF/G5TXrEcVzaNMH6CyMswqsAHqDyDLEyou8lwOXnKF8DjI6KjV3KzMBiXkDH8ij/H214J5A596ekrZ3F0zXlWeL7+P5eUrNo3/QwC15uxthuzidy7DzKRwEDaAViiDgKbTbz7CJnzo0bN7pIfIiid8SuPwn25o3QCmpnyjlZkyxPP8EomCJzrGb7GJMx7tNsq4MT2xMUYaiErZOluTzKsnz3gwCeCZyVRZJfYplNEokEjwrPtxlxjeYAk+F1F74VAzPxQRNYYdtpOUvWs8J1sGhBJMNsb7igN8plJs1eSmLIhLKE4rvaCX27gOhLpLOsIzJ7qn/i+wZzcvSOZ23/du8TZjwV8zHIXoP4R3ifBxiFz1dcVpa3aPntPE+c6TmIWE9EtcMmAcPdWAhYhAXxcLOQi9L1WhD1Sc8p1d2oL7XGiRKp8F4A2i8K/nfI+y/gsTDJ/YC/8+AD5Uh04KHiGl+cIFPnBDDrPMjwRGkLXyxO4VGbfQWnDH2v0bVWE3C9QOXlepbgjEfIJQI6XDG3z5ahD9cw2pS78ipB85wyScNTvsVzlzzhL8/jRrnmVjfFJK/m3m4nj9vbgQTguT8XZTjsm672R5uJKEaQmBI/c58gyus8ZDagLpEVSJBIyHp4jn++xqPV71OgQgJYEWOtZ/haxRtKmWOBu8xdBLftWltsY84zE6WIEy/eIOWL+BaayMx+KHtL7EAkqdNDLiEXmEMUHniedtJqg9HmZtfvt26vNi0BdG3Ft3g8ZOf7PAu59TxtzivLNIekyi+wD1i8CuUiD9FXAa8C+/xS3JPmZnomyc7H+fb4/Se0bk41Fel621r4cgVxbq91V4jVqwB7HTe2M7jgB+QWHavZkDRPmZcASoZEmBx6i75bGjPcMdL4/VKGFAGWZkGzPG0XAbdL9A81G5LOmUnC9hHKJeO7dcUMjblSl12867ElFTtaGl20xvvLGPdVz/8TVuU7y0x1PG7vtNg24oz9Uo/Z412++VFWI7Fcog9tu9Lm6gvRmIPv9x1xmQAu6RDkXtbOtlGEmpgD5Nvnyc0dcv0EE6cfdi1HmhMf9wDF3k3gtRvEedhxjpgfqPb9PU9iEJHnyOUA7bQUXh6kq/D7l2iTjWv7XOD530BDr8jIrus+srXjt4MzumJMHuTsBa63YKE1+RR5lBjEikCCnWKWiHdzOgKO+nRIBAF88za/IFmJ3eMZov4CYxGBabcpGL8EYx+SeMXJeRwHNsV/h+vdxeuhEpN3ZyNY78Gm2fknJxVGhyjixPiQvVkNzT1elD9Py/aTAL64Hb9vcYmC9zfdXdT/C1LeGbg4rnBaAihDFJH12W5ulfNCNe/xTsP3bp8ikzJs5BF+5PNfAQYAPaseTdsEcaYAAAAASUVORK5CYII=" + }; + }, + computed: { + iconSnowWidth() { + return (Math.floor(this.iconSize / 24) || 1) * 2; + }, + contentdownText() { + return this.contentText.contentdown || t("uni-load-more.contentdown"); + }, + contentrefreshText() { + return this.contentText.contentrefresh || t("uni-load-more.contentrefresh"); + }, + contentnomoreText() { + return this.contentText.contentnomore || t("uni-load-more.contentnomore"); + } + }, + mounted() { + var pages = getCurrentPages(); + var page = pages[pages.length - 1]; + var currentWebview = page.$getAppWebview(); + currentWebview.addEventListener("hide", () => { + this.webviewHide = true; + }); + currentWebview.addEventListener("show", () => { + this.webviewHide = false; + }); + }, + methods: { + onClick() { + this.$emit("clickLoadMore", { + detail: { + status: this.status + } + }); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("view", { + class: "uni-load-more", + onClick: _cache[0] || (_cache[0] = (...args) => $options.onClick && $options.onClick(...args)) + }, [ + !$data.webviewHide && $props.status === "loading" && $props.showIcon ? (openBlock(), createElementBlock("loading-indicator", { + key: 0, + style: normalizeStyle({ color: $props.color, width: $props.iconSize + "px", height: $props.iconSize + "px" }), + animating: true, + class: "uni-load-more__img uni-load-more__img--nvue" + }, null, 4)) : createCommentVNode("v-if", true), + $props.showText ? (openBlock(), createElementBlock("u-text", { + key: 1, + class: "uni-load-more__text", + style: normalizeStyle({ color: $props.color }) + }, toDisplayString($props.status === "more" ? $options.contentdownText : $props.status === "loading" ? $options.contentrefreshText : $options.contentnomoreText), 5)) : createCommentVNode("v-if", true) + ]); +} +var __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue"]]); +export { __easycom_0 as _ }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/uni-section.js b/fe/PDA/unpackage/dist/dev/.nvue/uni-section.js new file mode 100644 index 000000000..d14a88c9c --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/uni-section.js @@ -0,0 +1,97 @@ +import { openBlock, createElementBlock, createElementVNode, normalizeClass, renderSlot, normalizeStyle, toDisplayString, createCommentVNode } from "vue"; +import { _ as _export_sfc } from "./plugin-vue_export-helper.js"; +var _style_0 = { "uni-section": { "": { "backgroundColor": "#ffffff" } }, "uni-section-header": { ".uni-section ": { "position": "relative", "flexDirection": "row", "alignItems": "center", "paddingTop": 12, "paddingRight": 10, "paddingBottom": 12, "paddingLeft": 10, "fontWeight": "normal" } }, "uni-section-header__decoration": { ".uni-section ": { "marginRight": 6, "backgroundColor": "#2979ff" }, ".uni-section .line": { "width": 4, "height": 12, "borderRadius": 10 }, ".uni-section .circle": { "width": 8, "height": 8, "borderTopRightRadius": 50, "borderTopLeftRadius": 50, "borderBottomLeftRadius": 50, "borderBottomRightRadius": 50 }, ".uni-section .square": { "width": 8, "height": 8 } }, "uni-section-header__content": { ".uni-section ": { "flexDirection": "column", "flex": 1, "color": "#333333" } }, "distraction": { ".uni-section .uni-section-header__content ": { "flexDirection": "row", "alignItems": "center" } }, "uni-section-header__content-sub": { ".uni-section ": { "marginTop": 2 } }, "uni-section-header__slot-right": { ".uni-section ": { "fontSize": 14 } }, "uni-section-content": { ".uni-section ": { "fontSize": 14 } } }; +const _sfc_main = { + name: "UniSection", + emits: ["click"], + props: { + type: { + type: String, + default: "" + }, + title: { + type: String, + required: true, + default: "" + }, + titleFontSize: { + type: String, + default: "14px" + }, + titleColor: { + type: String, + default: "#333" + }, + subTitle: { + type: String, + default: "" + }, + subTitleFontSize: { + type: String, + default: "12px" + }, + subTitleColor: { + type: String, + default: "#999" + }, + padding: { + type: [Boolean, String], + default: false + } + }, + computed: { + _padding() { + if (typeof this.padding === "string") { + return this.padding; + } + return this.padding ? "10px" : ""; + } + }, + watch: { + title(newVal) { + if (uni.report && newVal !== "") { + uni.report("title", newVal); + } + } + }, + methods: { + onClick() { + this.$emit("click"); + } + } +}; +function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("view", { class: "uni-section" }, [ + createElementVNode("view", { + class: "uni-section-header", + onClick: _cache[0] || (_cache[0] = (...args) => $options.onClick && $options.onClick(...args)) + }, [ + $props.type ? (openBlock(), createElementBlock("view", { + key: 0, + class: normalizeClass(["uni-section-header__decoration", $props.type]) + }, null, 2)) : renderSlot(_ctx.$slots, "decoration", { key: 1 }), + createElementVNode("view", { class: "uni-section-header__content" }, [ + createElementVNode("u-text", { + style: normalizeStyle({ "font-size": $props.titleFontSize, "color": $props.titleColor }), + class: normalizeClass(["uni-section__content-title", { "distraction": !$props.subTitle }]) + }, toDisplayString($props.title), 7), + $props.subTitle ? (openBlock(), createElementBlock("u-text", { + key: 0, + style: normalizeStyle({ "font-size": $props.subTitleFontSize, "color": $props.subTitleColor }), + class: "uni-section-header__content-sub" + }, toDisplayString($props.subTitle), 5)) : createCommentVNode("v-if", true) + ]), + createElementVNode("view", { class: "uni-section-header__slot-right" }, [ + renderSlot(_ctx.$slots, "right") + ]) + ]), + createElementVNode("view", { + class: "uni-section-content", + style: normalizeStyle({ padding: $options._padding }) + }, [ + renderSlot(_ctx.$slots, "default") + ], 4) + ]); +} +var __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["styles", [_style_0]], ["__file", "E:/20220718_wenyin/uni-app/WMS_PDA_3.0/uni_modules/uni-section/components/uni-section/uni-section.vue"]]); +export { __easycom_2 as _ }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/uni-shared.es.js b/fe/PDA/unpackage/dist/dev/.nvue/uni-shared.es.js new file mode 100644 index 000000000..60e07d45b --- /dev/null +++ b/fe/PDA/unpackage/dist/dev/.nvue/uni-shared.es.js @@ -0,0 +1,48 @@ +import { t as toTypeString, a as toRawType } from "./shared.esm-bundler.js"; +function isDebugMode() { + return typeof __channelId__ === "string" && __channelId__; +} +function jsonStringifyReplacer(k, p) { + switch (toRawType(p)) { + case "Function": + return "function() { [native code] }"; + default: + return p; + } +} +function normalizeLog(type, filename, args) { + if (isDebugMode()) { + args.push(filename.replace("at ", "uni-app:///")); + return console[type].apply(console, args); + } + const msgs = args.map(function(v) { + const type2 = toTypeString(v).toLowerCase(); + if (["[object object]", "[object array]", "[object module]"].indexOf(type2) !== -1) { + try { + v = "---BEGIN:JSON---" + JSON.stringify(v, jsonStringifyReplacer) + "---END:JSON---"; + } catch (e) { + v = type2; + } + } else { + if (v === null) { + v = "---NULL---"; + } else if (v === void 0) { + v = "---UNDEFINED---"; + } else { + const vType = toRawType(v).toUpperCase(); + if (vType === "NUMBER" || vType === "BOOLEAN") { + v = "---BEGIN:" + vType + "---" + v + "---END:" + vType + "---"; + } else { + v = String(v); + } + } + } + return v; + }); + return msgs.join("---COMMA---") + " " + filename; +} +function formatAppLog(type, filename, ...args) { + const res = normalizeLog(type, filename, args); + res && console[type](res); +} +export { formatAppLog as f }; diff --git a/fe/PDA/unpackage/dist/dev/.nvue/uni_modules/uni-icons/components/uni-icons/uniicons.ttf b/fe/PDA/unpackage/dist/dev/.nvue/uni_modules/uni-icons/components/uni-icons/uniicons.ttf new file mode 100644 index 000000000..835f33bc9 Binary files /dev/null and b/fe/PDA/unpackage/dist/dev/.nvue/uni_modules/uni-icons/components/uni-icons/uniicons.ttf differ diff --git a/fe/PDA/views/login/index.vue b/fe/PDA/views/login/index.vue new file mode 100644 index 000000000..0115c7a62 --- /dev/null +++ b/fe/PDA/views/login/index.vue @@ -0,0 +1,360 @@ + + + + + diff --git a/fe/PDA/vue.config.js b/fe/PDA/vue.config.js new file mode 100644 index 000000000..81b06f61b --- /dev/null +++ b/fe/PDA/vue.config.js @@ -0,0 +1,17 @@ +//vue.config.js +const TransformPages = require('uni-read-pages') +const {webpack} = new TransformPages() +module.exports = { + configureWebpack: { + plugins: [ + new webpack.DefinePlugin({ + ROUTES: webpack.DefinePlugin.runtimeValue(() => { + const tfPages = new TransformPages({ + includes: ['path', 'name', 'aliasPath'] + }); + return JSON.stringify(tfPages.routes) + }, true ) + }) + ] + } +} \ No newline at end of file diff --git a/fe/PDA/windows/left-window.vue b/fe/PDA/windows/left-window.vue new file mode 100644 index 000000000..a0442d748 --- /dev/null +++ b/fe/PDA/windows/left-window.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/fe/PDA/windows/top-window.vue b/fe/PDA/windows/top-window.vue new file mode 100644 index 000000000..48bee54ab --- /dev/null +++ b/fe/PDA/windows/top-window.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/fe/PDA/wxcomponents/vant/button/index.d.ts b/fe/PDA/wxcomponents/vant/button/index.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/fe/PDA/wxcomponents/vant/button/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/fe/PDA/wxcomponents/vant/button/index.js b/fe/PDA/wxcomponents/vant/button/index.js new file mode 100644 index 000000000..e32509e8c --- /dev/null +++ b/fe/PDA/wxcomponents/vant/button/index.js @@ -0,0 +1,68 @@ +import { VantComponent } from '../common/component'; +import { button } from '../mixins/button'; +import { openType } from '../mixins/open-type'; +VantComponent({ + mixins: [button, openType], + classes: ['hover-class', 'loading-class'], + data: { + style: '' + }, + props: { + icon: String, + plain: Boolean, + block: Boolean, + round: Boolean, + square: Boolean, + loading: Boolean, + hairline: Boolean, + disabled: Boolean, + loadingText: String, + customStyle: String, + loadingType: { + type: String, + value: 'circular' + }, + type: { + type: String, + value: 'default' + }, + size: { + type: String, + value: 'normal' + }, + loadingSize: { + type: String, + value: '20px' + }, + color: { + type: String, + observer(color) { + let style = ''; + if (color) { + style += `color: ${this.data.plain ? color : 'white'};`; + if (!this.data.plain) { + // Use background instead of backgroundColor to make linear-gradient work + style += `background: ${color};`; + } + // hide border when color is linear-gradient + if (color.indexOf('gradient') !== -1) { + style += 'border: 0;'; + } + else { + style += `border-color: ${color};`; + } + } + if (style !== this.data.style) { + this.setData({ style }); + } + } + } + }, + methods: { + onClick() { + if (!this.data.disabled && !this.data.loading) { + this.$emit('click'); + } + } + } +}); diff --git a/fe/PDA/wxcomponents/vant/button/index.json b/fe/PDA/wxcomponents/vant/button/index.json new file mode 100644 index 000000000..e00a58870 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/button/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-icon": "../icon/index", + "van-loading": "../loading/index" + } +} diff --git a/fe/PDA/wxcomponents/vant/button/index.wxml b/fe/PDA/wxcomponents/vant/button/index.wxml new file mode 100644 index 000000000..77b49429e --- /dev/null +++ b/fe/PDA/wxcomponents/vant/button/index.wxml @@ -0,0 +1,52 @@ + + + diff --git a/fe/PDA/wxcomponents/vant/button/index.wxss b/fe/PDA/wxcomponents/vant/button/index.wxss new file mode 100644 index 000000000..0d302cb07 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/button/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-button{position:relative;display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;padding:0;line-height:20px;text-align:center;vertical-align:middle;-webkit-appearance:none;-webkit-text-size-adjust:100%;height:44px;height:var(--button-default-height,44px);font-size:16px;font-size:var(--button-default-font-size,16px);transition:opacity .2s;transition:opacity var(--animation-duration-fast,.2s);border-radius:2px;border-radius:var(--button-border-radius,2px)}.van-button:before{position:absolute;top:50%;left:50%;width:100%;height:100%;border:inherit;border-radius:inherit;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);opacity:0;content:" ";background-color:#000;background-color:var(--black,#000);border-color:#000;border-color:var(--black,#000)}.van-button:after{border-width:0}.van-button--active:before{opacity:.15}.van-button--unclickable:after{display:none}.van-button--default{color:#323233;color:var(--button-default-color,#323233);background-color:#fff;background-color:var(--button-default-background-color,#fff);border:1px solid #ebedf0;border:1px solid var(--button-default-border-color,#ebedf0)}.van-button--primary{color:#fff;color:var(--button-primary-color,#fff);background-color:#07c160;background-color:var(--button-primary-background-color,#07c160);border:1px solid #07c160;border:1px solid var(--button-primary-border-color,#07c160)}.van-button--info{color:#fff;color:var(--button-info-color,#fff);background-color:#1989fa;background-color:var(--button-info-background-color,#1989fa);border:1px solid #1989fa;border:1px solid var(--button-info-border-color,#1989fa)}.van-button--danger{color:#fff;color:var(--button-danger-color,#fff);background-color:#ee0a24;background-color:var(--button-danger-background-color,#ee0a24);border:1px solid #ee0a24;border:1px solid var(--button-danger-border-color,#ee0a24)}.van-button--warning{color:#fff;color:var(--button-warning-color,#fff);background-color:#ff976a;background-color:var(--button-warning-background-color,#ff976a);border:1px solid #ff976a;border:1px solid var(--button-warning-border-color,#ff976a)}.van-button--plain{background-color:#fff;background-color:var(--button-plain-background-color,#fff)}.van-button--plain.van-button--primary{color:#07c160;color:var(--button-primary-background-color,#07c160)}.van-button--plain.van-button--info{color:#1989fa;color:var(--button-info-background-color,#1989fa)}.van-button--plain.van-button--danger{color:#ee0a24;color:var(--button-danger-background-color,#ee0a24)}.van-button--plain.van-button--warning{color:#ff976a;color:var(--button-warning-background-color,#ff976a)}.van-button--large{width:100%;height:50px;height:var(--button-large-height,50px)}.van-button--normal{padding:0 15px;font-size:14px;font-size:var(--button-normal-font-size,14px)}.van-button--small{min-width:60px;min-width:var(--button-small-min-width,60px);height:30px;height:var(--button-small-height,30px);padding:0 8px;padding:0 var(--padding-xs,8px);font-size:12px;font-size:var(--button-small-font-size,12px)}.van-button--mini{display:inline-block;min-width:50px;min-width:var(--button-mini-min-width,50px);height:22px;height:var(--button-mini-height,22px);font-size:10px;font-size:var(--button-mini-font-size,10px)}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{display:-webkit-flex;display:flex;width:100%}.van-button--round{border-radius:999px;border-radius:var(--button-round-border-radius,999px)}.van-button--square{border-radius:0}.van-button--disabled{opacity:.5;opacity:var(--button-disabled-opacity,.5)}.van-button__text{display:inline}.van-button__icon+.van-button__text:not(:empty),.van-button__loading-text{margin-left:4px}.van-button__icon{min-width:1em;line-height:inherit!important;vertical-align:top}.van-button--hairline{padding-top:1px;border-width:0}.van-button--hairline:after{border-color:inherit;border-width:1px;border-radius:4px;border-radius:calc(var(--button-border-radius, 2px)*2)}.van-button--hairline.van-button--round:after{border-radius:999px;border-radius:var(--button-round-border-radius,999px)}.van-button--hairline.van-button--square:after{border-radius:0} \ No newline at end of file diff --git a/fe/PDA/wxcomponents/vant/common/color.d.ts b/fe/PDA/wxcomponents/vant/common/color.d.ts new file mode 100644 index 000000000..386f3077e --- /dev/null +++ b/fe/PDA/wxcomponents/vant/common/color.d.ts @@ -0,0 +1,7 @@ +export declare const RED = "#ee0a24"; +export declare const BLUE = "#1989fa"; +export declare const WHITE = "#fff"; +export declare const GREEN = "#07c160"; +export declare const ORANGE = "#ff976a"; +export declare const GRAY = "#323233"; +export declare const GRAY_DARK = "#969799"; diff --git a/fe/PDA/wxcomponents/vant/common/color.js b/fe/PDA/wxcomponents/vant/common/color.js new file mode 100644 index 000000000..6b285bd6c --- /dev/null +++ b/fe/PDA/wxcomponents/vant/common/color.js @@ -0,0 +1,7 @@ +export const RED = '#ee0a24'; +export const BLUE = '#1989fa'; +export const WHITE = '#fff'; +export const GREEN = '#07c160'; +export const ORANGE = '#ff976a'; +export const GRAY = '#323233'; +export const GRAY_DARK = '#969799'; diff --git a/fe/PDA/wxcomponents/vant/common/component.d.ts b/fe/PDA/wxcomponents/vant/common/component.d.ts new file mode 100644 index 000000000..307a96cc7 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/common/component.d.ts @@ -0,0 +1,3 @@ +import { VantComponentOptions, CombinedComponentInstance } from '../definitions/index'; +declare function VantComponent(vantOptions?: VantComponentOptions>): void; +export { VantComponent }; diff --git a/fe/PDA/wxcomponents/vant/common/component.js b/fe/PDA/wxcomponents/vant/common/component.js new file mode 100644 index 000000000..63ef1a9d0 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/common/component.js @@ -0,0 +1,48 @@ +import { basic } from '../mixins/basic'; +import { observe } from '../mixins/observer/index'; +function mapKeys(source, target, map) { + Object.keys(map).forEach(key => { + if (source[key]) { + target[map[key]] = source[key]; + } + }); +} +function VantComponent(vantOptions = {}) { + const options = {}; + mapKeys(vantOptions, options, { + data: 'data', + props: 'properties', + mixins: 'behaviors', + methods: 'methods', + beforeCreate: 'created', + created: 'attached', + mounted: 'ready', + relations: 'relations', + destroyed: 'detached', + classes: 'externalClasses' + }); + const { relation } = vantOptions; + if (relation) { + options.relations = Object.assign(options.relations || {}, { + [`../${relation.name}/index`]: relation + }); + } + // add default externalClasses + options.externalClasses = options.externalClasses || []; + options.externalClasses.push('custom-class'); + // add default behaviors + options.behaviors = options.behaviors || []; + options.behaviors.push(basic); + // map field to form-field behavior + if (vantOptions.field) { + options.behaviors.push('wx://form-field'); + } + // add default options + options.options = { + multipleSlots: true, + addGlobalClass: true + }; + observe(vantOptions, options); + Component(options); +} +export { VantComponent }; diff --git a/fe/PDA/wxcomponents/vant/common/index.wxss b/fe/PDA/wxcomponents/vant/common/index.wxss new file mode 100644 index 000000000..6e6891ffb --- /dev/null +++ b/fe/PDA/wxcomponents/vant/common/index.wxss @@ -0,0 +1 @@ +.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{display:table;clear:both;content:""}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #eee;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px} \ No newline at end of file diff --git a/fe/PDA/wxcomponents/vant/common/style/clearfix.wxss b/fe/PDA/wxcomponents/vant/common/style/clearfix.wxss new file mode 100644 index 000000000..a0ca83843 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/common/style/clearfix.wxss @@ -0,0 +1 @@ +.van-clearfix:after{display:table;clear:both;content:""} \ No newline at end of file diff --git a/fe/PDA/wxcomponents/vant/common/style/ellipsis.wxss b/fe/PDA/wxcomponents/vant/common/style/ellipsis.wxss new file mode 100644 index 000000000..1e9dbc9e0 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/common/style/ellipsis.wxss @@ -0,0 +1 @@ +.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3} \ No newline at end of file diff --git a/fe/PDA/wxcomponents/vant/common/style/hairline.wxss b/fe/PDA/wxcomponents/vant/common/style/hairline.wxss new file mode 100644 index 000000000..f64e2f83e --- /dev/null +++ b/fe/PDA/wxcomponents/vant/common/style/hairline.wxss @@ -0,0 +1 @@ +.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #eee;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px} \ No newline at end of file diff --git a/fe/PDA/wxcomponents/vant/common/style/mixins/clearfix.wxss b/fe/PDA/wxcomponents/vant/common/style/mixins/clearfix.wxss new file mode 100644 index 000000000..e69de29bb diff --git a/fe/PDA/wxcomponents/vant/common/style/mixins/ellipsis.wxss b/fe/PDA/wxcomponents/vant/common/style/mixins/ellipsis.wxss new file mode 100644 index 000000000..e69de29bb diff --git a/fe/PDA/wxcomponents/vant/common/style/mixins/hairline.wxss b/fe/PDA/wxcomponents/vant/common/style/mixins/hairline.wxss new file mode 100644 index 000000000..e69de29bb diff --git a/fe/PDA/wxcomponents/vant/common/style/theme.wxss b/fe/PDA/wxcomponents/vant/common/style/theme.wxss new file mode 100644 index 000000000..e69de29bb diff --git a/fe/PDA/wxcomponents/vant/common/style/var.wxss b/fe/PDA/wxcomponents/vant/common/style/var.wxss new file mode 100644 index 000000000..e69de29bb diff --git a/fe/PDA/wxcomponents/vant/common/utils.d.ts b/fe/PDA/wxcomponents/vant/common/utils.d.ts new file mode 100644 index 000000000..9fad27d9d --- /dev/null +++ b/fe/PDA/wxcomponents/vant/common/utils.d.ts @@ -0,0 +1,8 @@ +/// +export declare function isDef(value: any): boolean; +export declare function isObj(x: any): boolean; +export declare function isNumber(value: any): boolean; +export declare function range(num: number, min: number, max: number): number; +export declare function nextTick(fn: Function): void; +export declare function getSystemInfoSync(): WechatMiniprogram.GetSystemInfoSuccessCallbackResult; +export declare function addUnit(value?: string | number): string | undefined; diff --git a/fe/PDA/wxcomponents/vant/common/utils.js b/fe/PDA/wxcomponents/vant/common/utils.js new file mode 100644 index 000000000..cc0f8f11b --- /dev/null +++ b/fe/PDA/wxcomponents/vant/common/utils.js @@ -0,0 +1,32 @@ +export function isDef(value) { + return value !== undefined && value !== null; +} +export function isObj(x) { + const type = typeof x; + return x !== null && (type === 'object' || type === 'function'); +} +export function isNumber(value) { + return /^\d+(\.\d+)?$/.test(value); +} +export function range(num, min, max) { + return Math.min(Math.max(num, min), max); +} +export function nextTick(fn) { + setTimeout(() => { + fn(); + }, 1000 / 30); +} +let systemInfo = null; +export function getSystemInfoSync() { + if (systemInfo == null) { + systemInfo = wx.getSystemInfoSync(); + } + return systemInfo; +} +export function addUnit(value) { + if (!isDef(value)) { + return undefined; + } + value = String(value); + return isNumber(value) ? `${value}px` : value; +} diff --git a/fe/PDA/wxcomponents/vant/icon/index.d.ts b/fe/PDA/wxcomponents/vant/icon/index.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/fe/PDA/wxcomponents/vant/icon/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/fe/PDA/wxcomponents/vant/icon/index.js b/fe/PDA/wxcomponents/vant/icon/index.js new file mode 100644 index 000000000..8d83ff191 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/icon/index.js @@ -0,0 +1,39 @@ +import { VantComponent } from '../common/component'; +import { addUnit } from '../common/utils'; +VantComponent({ + props: { + dot: Boolean, + info: null, + size: { + type: null, + observer: 'setSizeWithUnit' + }, + color: String, + customStyle: String, + classPrefix: { + type: String, + value: 'van-icon' + }, + name: { + type: String, + observer(val) { + this.setData({ + isImageName: val.indexOf('/') !== -1 + }); + } + } + }, + data: { + sizeWithUnit: null, + }, + methods: { + onClick() { + this.$emit('click'); + }, + setSizeWithUnit(size) { + this.setData({ + sizeWithUnit: addUnit(size) + }); + } + } +}); diff --git a/fe/PDA/wxcomponents/vant/icon/index.json b/fe/PDA/wxcomponents/vant/icon/index.json new file mode 100644 index 000000000..bf0ebe009 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/icon/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-info": "../info/index" + } +} diff --git a/fe/PDA/wxcomponents/vant/icon/index.wxml b/fe/PDA/wxcomponents/vant/icon/index.wxml new file mode 100644 index 000000000..c568b58e5 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/icon/index.wxml @@ -0,0 +1,18 @@ + + + + diff --git a/fe/PDA/wxcomponents/vant/icon/index.wxss b/fe/PDA/wxcomponents/vant/icon/index.wxss new file mode 100644 index 000000000..d9c7fa22c --- /dev/null +++ b/fe/PDA/wxcomponents/vant/icon/index.wxss @@ -0,0 +1,957 @@ +@import '../common/index.wxss'; + +@font-face { + font-weight: 400; + font-family: vant-icon; + font-style: normal; + font-display: auto; + src: url(https://img.yzcdn.cn/vant/vant-icon-d3825a.woff2) format("woff2"), url(https://img.yzcdn.cn/vant/vant-icon-d3825a.woff) format("woff"), url(https://img.yzcdn.cn/vant/vant-icon-d3825a.ttf) format("truetype") +} + +.van-icon { + position: relative; + font: normal normal normal 14px/1 vant-icon; + font-size: inherit; + text-rendering: auto; + -webkit-font-smoothing: antialiased +} + +.van-icon, +.van-icon:before { + display: inline-block +} + +.van-icon-add-o:before { + content: "\F000" +} + +.van-icon-add-square:before { + content: "\F001" +} + +.van-icon-add:before { + content: "\F002" +} + +.van-icon-after-sale:before { + content: "\F003" +} + +.van-icon-aim:before { + content: "\F004" +} + +.van-icon-alipay:before { + content: "\F005" +} + +.van-icon-apps-o:before { + content: "\F006" +} + +.van-icon-arrow-down:before { + content: "\F007" +} + +.van-icon-arrow-left:before { + content: "\F008" +} + +.van-icon-arrow-up:before { + content: "\F009" +} + +.van-icon-arrow:before { + content: "\F00A" +} + +.van-icon-ascending:before { + content: "\F00B" +} + +.van-icon-audio:before { + content: "\F00C" +} + +.van-icon-award-o:before { + content: "\F00D" +} + +.van-icon-award:before { + content: "\F00E" +} + +.van-icon-bag-o:before { + content: "\F00F" +} + +.van-icon-bag:before { + content: "\F010" +} + +.van-icon-balance-list-o:before { + content: "\F011" +} + +.van-icon-balance-list:before { + content: "\F012" +} + +.van-icon-balance-o:before { + content: "\F013" +} + +.van-icon-balance-pay:before { + content: "\F014" +} + +.van-icon-bar-chart-o:before { + content: "\F015" +} + +.van-icon-bars:before { + content: "\F016" +} + +.van-icon-bell:before { + content: "\F017" +} + +.van-icon-bill-o:before { + content: "\F018" +} + +.van-icon-bill:before { + content: "\F019" +} + +.van-icon-birthday-cake-o:before { + content: "\F01A" +} + +.van-icon-bookmark-o:before { + content: "\F01B" +} + +.van-icon-bookmark:before { + content: "\F01C" +} + +.van-icon-browsing-history-o:before { + content: "\F01D" +} + +.van-icon-browsing-history:before { + content: "\F01E" +} + +.van-icon-brush-o:before { + content: "\F01F" +} + +.van-icon-bulb-o:before { + content: "\F020" +} + +.van-icon-bullhorn-o:before { + content: "\F021" +} + +.van-icon-calender-o:before { + content: "\F022" +} + +.van-icon-card:before { + content: "\F023" +} + +.van-icon-cart-circle-o:before { + content: "\F024" +} + +.van-icon-cart-circle:before { + content: "\F025" +} + +.van-icon-cart-o:before { + content: "\F026" +} + +.van-icon-cart:before { + content: "\F027" +} + +.van-icon-cash-back-record:before { + content: "\F028" +} + +.van-icon-cash-on-deliver:before { + content: "\F029" +} + +.van-icon-cashier-o:before { + content: "\F02A" +} + +.van-icon-certificate:before { + content: "\F02B" +} + +.van-icon-chart-trending-o:before { + content: "\F02C" +} + +.van-icon-chat-o:before { + content: "\F02D" +} + +.van-icon-chat:before { + content: "\F02E" +} + +.van-icon-checked:before { + content: "\F02F" +} + +.van-icon-circle:before { + content: "\F030" +} + +.van-icon-clear:before { + content: "\F031" +} + +.van-icon-clock-o:before { + content: "\F032" +} + +.van-icon-clock:before { + content: "\F033" +} + +.van-icon-close:before { + content: "\F034" +} + +.van-icon-closed-eye:before { + content: "\F035" +} + +.van-icon-cluster-o:before { + content: "\F036" +} + +.van-icon-cluster:before { + content: "\F037" +} + +.van-icon-column:before { + content: "\F038" +} + +.van-icon-comment-circle-o:before { + content: "\F039" +} + +.van-icon-comment-circle:before { + content: "\F03A" +} + +.van-icon-comment-o:before { + content: "\F03B" +} + +.van-icon-comment:before { + content: "\F03C" +} + +.van-icon-completed:before { + content: "\F03D" +} + +.van-icon-contact:before { + content: "\F03E" +} + +.van-icon-coupon-o:before { + content: "\F03F" +} + +.van-icon-coupon:before { + content: "\F040" +} + +.van-icon-credit-pay:before { + content: "\F041" +} + +.van-icon-cross:before { + content: "\F042" +} + +.van-icon-debit-pay:before { + content: "\F043" +} + +.van-icon-delete:before { + content: "\F044" +} + +.van-icon-descending:before { + content: "\F045" +} + +.van-icon-description:before { + content: "\F046" +} + +.van-icon-desktop-o:before { + content: "\F047" +} + +.van-icon-diamond-o:before { + content: "\F048" +} + +.van-icon-diamond:before { + content: "\F049" +} + +.van-icon-discount:before { + content: "\F04A" +} + +.van-icon-down:before { + content: "\F04B" +} + +.van-icon-ecard-pay:before { + content: "\F04C" +} + +.van-icon-edit:before { + content: "\F04D" +} + +.van-icon-ellipsis:before { + content: "\F04E" +} + +.van-icon-empty:before { + content: "\F04F" +} + +.van-icon-envelop-o:before { + content: "\F050" +} + +.van-icon-exchange:before { + content: "\F051" +} + +.van-icon-expand-o:before { + content: "\F052" +} + +.van-icon-expand:before { + content: "\F053" +} + +.van-icon-eye-o:before { + content: "\F054" +} + +.van-icon-eye:before { + content: "\F055" +} + +.van-icon-fail:before { + content: "\F056" +} + +.van-icon-failure:before { + content: "\F057" +} + +.van-icon-filter-o:before { + content: "\F058" +} + +.van-icon-fire-o:before { + content: "\F059" +} + +.van-icon-fire:before { + content: "\F05A" +} + +.van-icon-flag-o:before { + content: "\F05B" +} + +.van-icon-flower-o:before { + content: "\F05C" +} + +.van-icon-free-postage:before { + content: "\F05D" +} + +.van-icon-friends-o:before { + content: "\F05E" +} + +.van-icon-friends:before { + content: "\F05F" +} + +.van-icon-gem-o:before { + content: "\F060" +} + +.van-icon-gem:before { + content: "\F061" +} + +.van-icon-gift-card-o:before { + content: "\F062" +} + +.van-icon-gift-card:before { + content: "\F063" +} + +.van-icon-gift-o:before { + content: "\F064" +} + +.van-icon-gift:before { + content: "\F065" +} + +.van-icon-gold-coin-o:before { + content: "\F066" +} + +.van-icon-gold-coin:before { + content: "\F067" +} + +.van-icon-good-job-o:before { + content: "\F068" +} + +.van-icon-good-job:before { + content: "\F069" +} + +.van-icon-goods-collect-o:before { + content: "\F06A" +} + +.van-icon-goods-collect:before { + content: "\F06B" +} + +.van-icon-graphic:before { + content: "\F06C" +} + +.van-icon-home-o:before { + content: "\F06D" +} + +.van-icon-hot-o:before { + content: "\F06E" +} + +.van-icon-hot-sale-o:before { + content: "\F06F" +} + +.van-icon-hot-sale:before { + content: "\F070" +} + +.van-icon-hot:before { + content: "\F071" +} + +.van-icon-hotel-o:before { + content: "\F072" +} + +.van-icon-idcard:before { + content: "\F073" +} + +.van-icon-info-o:before { + content: "\F074" +} + +.van-icon-info:before { + content: "\F075" +} + +.van-icon-invition:before { + content: "\F076" +} + +.van-icon-label-o:before { + content: "\F077" +} + +.van-icon-label:before { + content: "\F078" +} + +.van-icon-like-o:before { + content: "\F079" +} + +.van-icon-like:before { + content: "\F07A" +} + +.van-icon-live:before { + content: "\F07B" +} + +.van-icon-location-o:before { + content: "\F07C" +} + +.van-icon-location:before { + content: "\F07D" +} + +.van-icon-lock:before { + content: "\F07E" +} + +.van-icon-logistics:before { + content: "\F07F" +} + +.van-icon-manager-o:before { + content: "\F080" +} + +.van-icon-manager:before { + content: "\F081" +} + +.van-icon-map-marked:before { + content: "\F082" +} + +.van-icon-medal-o:before { + content: "\F083" +} + +.van-icon-medal:before { + content: "\F084" +} + +.van-icon-more-o:before { + content: "\F085" +} + +.van-icon-more:before { + content: "\F086" +} + +.van-icon-music-o:before { + content: "\F087" +} + +.van-icon-music:before { + content: "\F088" +} + +.van-icon-new-arrival-o:before { + content: "\F089" +} + +.van-icon-new-arrival:before { + content: "\F08A" +} + +.van-icon-new-o:before { + content: "\F08B" +} + +.van-icon-new:before { + content: "\F08C" +} + +.van-icon-newspaper-o:before { + content: "\F08D" +} + +.van-icon-notes-o:before { + content: "\F08E" +} + +.van-icon-orders-o:before { + content: "\F08F" +} + +.van-icon-other-pay:before { + content: "\F090" +} + +.van-icon-paid:before { + content: "\F091" +} + +.van-icon-passed:before { + content: "\F092" +} + +.van-icon-pause-circle-o:before { + content: "\F093" +} + +.van-icon-pause-circle:before { + content: "\F094" +} + +.van-icon-pause:before { + content: "\F095" +} + +.van-icon-peer-pay:before { + content: "\F096" +} + +.van-icon-pending-payment:before { + content: "\F097" +} + +.van-icon-phone-circle-o:before { + content: "\F098" +} + +.van-icon-phone-circle:before { + content: "\F099" +} + +.van-icon-phone-o:before { + content: "\F09A" +} + +.van-icon-phone:before { + content: "\F09B" +} + +.van-icon-photo-o:before { + content: "\F09C" +} + +.van-icon-photo:before { + content: "\F09D" +} + +.van-icon-photograph:before { + content: "\F09E" +} + +.van-icon-play-circle-o:before { + content: "\F09F" +} + +.van-icon-play-circle:before { + content: "\F0A0" +} + +.van-icon-play:before { + content: "\F0A1" +} + +.van-icon-plus:before { + content: "\F0A2" +} + +.van-icon-point-gift-o:before { + content: "\F0A3" +} + +.van-icon-point-gift:before { + content: "\F0A4" +} + +.van-icon-points:before { + content: "\F0A5" +} + +.van-icon-printer:before { + content: "\F0A6" +} + +.van-icon-qr-invalid:before { + content: "\F0A7" +} + +.van-icon-qr:before { + content: "\F0A8" +} + +.van-icon-question-o:before { + content: "\F0A9" +} + +.van-icon-question:before { + content: "\F0AA" +} + +.van-icon-records:before { + content: "\F0AB" +} + +.van-icon-refund-o:before { + content: "\F0AC" +} + +.van-icon-replay:before { + content: "\F0AD" +} + +.van-icon-scan:before { + content: "\F0AE" +} + +.van-icon-search:before { + content: "\F0AF" +} + +.van-icon-send-gift-o:before { + content: "\F0B0" +} + +.van-icon-send-gift:before { + content: "\F0B1" +} + +.van-icon-service-o:before { + content: "\F0B2" +} + +.van-icon-service:before { + content: "\F0B3" +} + +.van-icon-setting-o:before { + content: "\F0B4" +} + +.van-icon-setting:before { + content: "\F0B5" +} + +.van-icon-share:before { + content: "\F0B6" +} + +.van-icon-shop-collect-o:before { + content: "\F0B7" +} + +.van-icon-shop-collect:before { + content: "\F0B8" +} + +.van-icon-shop-o:before { + content: "\F0B9" +} + +.van-icon-shop:before { + content: "\F0BA" +} + +.van-icon-shopping-cart-o:before { + content: "\F0BB" +} + +.van-icon-shopping-cart:before { + content: "\F0BC" +} + +.van-icon-shrink:before { + content: "\F0BD" +} + +.van-icon-sign:before { + content: "\F0BE" +} + +.van-icon-smile-comment-o:before { + content: "\F0BF" +} + +.van-icon-smile-comment:before { + content: "\F0C0" +} + +.van-icon-smile-o:before { + content: "\F0C1" +} + +.van-icon-smile:before { + content: "\F0C2" +} + +.van-icon-star-o:before { + content: "\F0C3" +} + +.van-icon-star:before { + content: "\F0C4" +} + +.van-icon-stop-circle-o:before { + content: "\F0C5" +} + +.van-icon-stop-circle:before { + content: "\F0C6" +} + +.van-icon-stop:before { + content: "\F0C7" +} + +.van-icon-success:before { + content: "\F0C8" +} + +.van-icon-thumb-circle-o:before { + content: "\F0C9" +} + +.van-icon-thumb-circle:before { + content: "\F0CA" +} + +.van-icon-todo-list-o:before { + content: "\F0CB" +} + +.van-icon-todo-list:before { + content: "\F0CC" +} + +.van-icon-tosend:before { + content: "\F0CD" +} + +.van-icon-tv-o:before { + content: "\F0CE" +} + +.van-icon-umbrella-circle:before { + content: "\F0CF" +} + +.van-icon-underway-o:before { + content: "\F0D0" +} + +.van-icon-underway:before { + content: "\F0D1" +} + +.van-icon-upgrade:before { + content: "\F0D2" +} + +.van-icon-user-circle-o:before { + content: "\F0D3" +} + +.van-icon-user-o:before { + content: "\F0D4" +} + +.van-icon-video-o:before { + content: "\F0D5" +} + +.van-icon-video:before { + content: "\F0D6" +} + +.van-icon-vip-card-o:before { + content: "\F0D7" +} + +.van-icon-vip-card:before { + content: "\F0D8" +} + +.van-icon-volume-o:before { + content: "\F0D9" +} + +.van-icon-volume:before { + content: "\F0DA" +} + +.van-icon-wap-home-o:before { + content: "\F0DB" +} + +.van-icon-wap-home:before { + content: "\F0DC" +} + +.van-icon-wap-nav:before { + content: "\F0DD" +} + +.van-icon-warn-o:before { + content: "\F0DE" +} + +.van-icon-warning-o:before { + content: "\F0DF" +} + +.van-icon-warning:before { + content: "\F0E0" +} + +.van-icon-weapp-nav:before { + content: "\F0E1" +} + +.van-icon-wechat:before { + content: "\F0E2" +} + +.van-icon-youzan-shield:before { + content: "\F0E3" +} + +:host { + display: -webkit-inline-flex; + display: inline-flex; + -webkit-align-items: center; + align-items: center; + -webkit-justify-content: center; + justify-content: center +} + +.van-icon--image { + width: 1em; + height: 1em +} + +.van-icon__image { + width: 100%; + height: 100% +} + +.van-icon__info { + z-index: 1 +} diff --git a/fe/PDA/wxcomponents/vant/info/index.d.ts b/fe/PDA/wxcomponents/vant/info/index.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/fe/PDA/wxcomponents/vant/info/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/fe/PDA/wxcomponents/vant/info/index.js b/fe/PDA/wxcomponents/vant/info/index.js new file mode 100644 index 000000000..8e34c0f7d --- /dev/null +++ b/fe/PDA/wxcomponents/vant/info/index.js @@ -0,0 +1,8 @@ +import { VantComponent } from '../common/component'; +VantComponent({ + props: { + dot: Boolean, + info: null, + customStyle: String + } +}); diff --git a/fe/PDA/wxcomponents/vant/info/index.json b/fe/PDA/wxcomponents/vant/info/index.json new file mode 100644 index 000000000..467ce2945 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/info/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} diff --git a/fe/PDA/wxcomponents/vant/info/index.wxml b/fe/PDA/wxcomponents/vant/info/index.wxml new file mode 100644 index 000000000..3112dfc9d --- /dev/null +++ b/fe/PDA/wxcomponents/vant/info/index.wxml @@ -0,0 +1,7 @@ + + +{{ dot ? '' : info }} diff --git a/fe/PDA/wxcomponents/vant/info/index.wxss b/fe/PDA/wxcomponents/vant/info/index.wxss new file mode 100644 index 000000000..16e3f329a --- /dev/null +++ b/fe/PDA/wxcomponents/vant/info/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';.van-info{position:absolute;top:0;right:0;box-sizing:border-box;white-space:nowrap;text-align:center;-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%);-webkit-transform-origin:100%;transform-origin:100%;min-width:16px;min-width:var(--info-size,16px);padding:0 3px;padding:var(--info-padding,0 3px);color:#fff;color:var(--info-color,#fff);font-weight:500;font-weight:var(--info-font-weight,500);font-size:12px;font-size:var(--info-font-size,12px);font-family:PingFang SC,Helvetica Neue,Arial,sans-serif;font-family:var(--info-font-family,PingFang SC,Helvetica Neue,Arial,sans-serif);line-height:14px;line-height:calc(var(--info-size, 16px) - var(--info-border-width, 1px)*2);background-color:#ee0a24;background-color:var(--info-background-color,#ee0a24);border:1px solid #fff;border:var(--info-border-width,1px) solid var(--white,#fff);border-radius:16px;border-radius:var(--info-size,16px)}.van-info--dot{min-width:0;border-radius:100%;width:8px;width:var(--info-dot-size,8px);height:8px;height:var(--info-dot-size,8px);background-color:#ee0a24;background-color:var(--info-dot-color,#ee0a24)} \ No newline at end of file diff --git a/fe/PDA/wxcomponents/vant/loading/index.d.ts b/fe/PDA/wxcomponents/vant/loading/index.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/fe/PDA/wxcomponents/vant/loading/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/fe/PDA/wxcomponents/vant/loading/index.js b/fe/PDA/wxcomponents/vant/loading/index.js new file mode 100644 index 000000000..af510c87c --- /dev/null +++ b/fe/PDA/wxcomponents/vant/loading/index.js @@ -0,0 +1,32 @@ +import { VantComponent } from '../common/component'; +import { addUnit } from '../common/utils'; +VantComponent({ + props: { + color: String, + vertical: Boolean, + type: { + type: String, + value: 'circular' + }, + size: { + type: String, + observer: 'setSizeWithUnit' + }, + textSize: { + type: String, + observer: 'setTextSizeWithUnit' + } + }, + methods: { + setSizeWithUnit(size) { + this.setData({ + sizeWithUnit: addUnit(size) + }); + }, + setTextSizeWithUnit(size) { + this.set({ + textSizeWithUnit: addUnit(size) + }); + } + } +}); diff --git a/fe/PDA/wxcomponents/vant/loading/index.json b/fe/PDA/wxcomponents/vant/loading/index.json new file mode 100644 index 000000000..32640e0dc --- /dev/null +++ b/fe/PDA/wxcomponents/vant/loading/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/fe/PDA/wxcomponents/vant/loading/index.wxml b/fe/PDA/wxcomponents/vant/loading/index.wxml new file mode 100644 index 000000000..5229d0439 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/loading/index.wxml @@ -0,0 +1,16 @@ + + + + + + + + diff --git a/fe/PDA/wxcomponents/vant/loading/index.wxss b/fe/PDA/wxcomponents/vant/loading/index.wxss new file mode 100644 index 000000000..f28a6b46f --- /dev/null +++ b/fe/PDA/wxcomponents/vant/loading/index.wxss @@ -0,0 +1 @@ +@import '../common/index.wxss';:host{font-size:0;line-height:1}.van-loading{display:-webkit-inline-flex;display:inline-flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;color:#c8c9cc;color:var(--loading-spinner-color,#c8c9cc)}.van-loading__spinner{position:relative;box-sizing:border-box;width:30px;width:var(--loading-spinner-size,30px);max-width:100%;max-height:100%;height:30px;height:var(--loading-spinner-size,30px);-webkit-animation:van-rotate .8s linear infinite;animation:van-rotate .8s linear infinite;-webkit-animation:van-rotate var(--loading-spinner-animation-duration,.8s) linear infinite;animation:van-rotate var(--loading-spinner-animation-duration,.8s) linear infinite}.van-loading__spinner--spinner{-webkit-animation-timing-function:steps(12);animation-timing-function:steps(12)}.van-loading__spinner--circular{border:1px solid transparent;border-top-color:initial;border-radius:100%}.van-loading__text{margin-left:8px;margin-left:var(--padding-xs,8px);color:#969799;color:var(--loading-text-color,#969799);font-size:14px;font-size:var(--loading-text-font-size,14px);line-height:20px;line-height:var(--loading-text-line-height,20px)}.van-loading__text:empty{display:none}.van-loading--vertical{-webkit-flex-direction:column;flex-direction:column}.van-loading--vertical .van-loading__text{margin:8px 0 0;margin:var(--padding-xs,8px) 0 0}.van-loading__dot{position:absolute;top:0;left:0;width:100%;height:100%}.van-loading__dot:before{display:block;width:2px;height:25%;margin:0 auto;background-color:currentColor;border-radius:40%;content:" "}.van-loading__dot:first-of-type{-webkit-transform:rotate(30deg);transform:rotate(30deg);opacity:1}.van-loading__dot:nth-of-type(2){-webkit-transform:rotate(60deg);transform:rotate(60deg);opacity:.9375}.van-loading__dot:nth-of-type(3){-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:.875}.van-loading__dot:nth-of-type(4){-webkit-transform:rotate(120deg);transform:rotate(120deg);opacity:.8125}.van-loading__dot:nth-of-type(5){-webkit-transform:rotate(150deg);transform:rotate(150deg);opacity:.75}.van-loading__dot:nth-of-type(6){-webkit-transform:rotate(180deg);transform:rotate(180deg);opacity:.6875}.van-loading__dot:nth-of-type(7){-webkit-transform:rotate(210deg);transform:rotate(210deg);opacity:.625}.van-loading__dot:nth-of-type(8){-webkit-transform:rotate(240deg);transform:rotate(240deg);opacity:.5625}.van-loading__dot:nth-of-type(9){-webkit-transform:rotate(270deg);transform:rotate(270deg);opacity:.5}.van-loading__dot:nth-of-type(10){-webkit-transform:rotate(300deg);transform:rotate(300deg);opacity:.4375}.van-loading__dot:nth-of-type(11){-webkit-transform:rotate(330deg);transform:rotate(330deg);opacity:.375}.van-loading__dot:nth-of-type(12){-webkit-transform:rotate(1turn);transform:rotate(1turn);opacity:.3125}@-webkit-keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes van-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}} \ No newline at end of file diff --git a/fe/PDA/wxcomponents/vant/mixins/basic.d.ts b/fe/PDA/wxcomponents/vant/mixins/basic.d.ts new file mode 100644 index 000000000..b27336900 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/mixins/basic.d.ts @@ -0,0 +1 @@ +export declare const basic: string; diff --git a/fe/PDA/wxcomponents/vant/mixins/basic.js b/fe/PDA/wxcomponents/vant/mixins/basic.js new file mode 100644 index 000000000..2fdd634f7 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/mixins/basic.js @@ -0,0 +1,22 @@ +export const basic = Behavior({ + methods: { + $emit(...args) { + this.triggerEvent(...args); + }, + getRect(selector, all) { + return new Promise(resolve => { + wx.createSelectorQuery() + .in(this)[all ? 'selectAll' : 'select'](selector) + .boundingClientRect(rect => { + if (all && Array.isArray(rect) && rect.length) { + resolve(rect); + } + if (!all && rect) { + resolve(rect); + } + }) + .exec(); + }); + } + } +}); diff --git a/fe/PDA/wxcomponents/vant/mixins/button.d.ts b/fe/PDA/wxcomponents/vant/mixins/button.d.ts new file mode 100644 index 000000000..b51db8759 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/mixins/button.d.ts @@ -0,0 +1 @@ +export declare const button: string; diff --git a/fe/PDA/wxcomponents/vant/mixins/button.js b/fe/PDA/wxcomponents/vant/mixins/button.js new file mode 100644 index 000000000..5d3b4dc48 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/mixins/button.js @@ -0,0 +1,18 @@ +export const button = Behavior({ + externalClasses: ['hover-class'], + properties: { + id: String, + lang: { + type: String, + value: 'en' + }, + businessId: Number, + sessionFrom: String, + sendMessageTitle: String, + sendMessagePath: String, + sendMessageImg: String, + showMessageCard: Boolean, + appParameter: String, + ariaLabel: String + } +}); diff --git a/fe/PDA/wxcomponents/vant/mixins/link.d.ts b/fe/PDA/wxcomponents/vant/mixins/link.d.ts new file mode 100644 index 000000000..d58043bc2 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/mixins/link.d.ts @@ -0,0 +1 @@ +export declare const link: string; diff --git a/fe/PDA/wxcomponents/vant/mixins/link.js b/fe/PDA/wxcomponents/vant/mixins/link.js new file mode 100644 index 000000000..d7aed0c9d --- /dev/null +++ b/fe/PDA/wxcomponents/vant/mixins/link.js @@ -0,0 +1,17 @@ +export const link = Behavior({ + properties: { + url: String, + linkType: { + type: String, + value: 'navigateTo' + } + }, + methods: { + jumpLink(urlKey = 'url') { + const url = this.data[urlKey]; + if (url) { + wx[this.data.linkType]({ url }); + } + } + } +}); diff --git a/fe/PDA/wxcomponents/vant/mixins/observer/behavior.d.ts b/fe/PDA/wxcomponents/vant/mixins/observer/behavior.d.ts new file mode 100644 index 000000000..3da2a645b --- /dev/null +++ b/fe/PDA/wxcomponents/vant/mixins/observer/behavior.d.ts @@ -0,0 +1 @@ +export declare const behavior: string; diff --git a/fe/PDA/wxcomponents/vant/mixins/observer/behavior.js b/fe/PDA/wxcomponents/vant/mixins/observer/behavior.js new file mode 100644 index 000000000..948f446b2 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/mixins/observer/behavior.js @@ -0,0 +1,14 @@ +export const behavior = Behavior({ + methods: { + set(data, callback) { + return new Promise(resolve => { + this.setData(data, () => { + if (callback && typeof callback === 'function') { + callback.call(this); + } + resolve(); + }); + }); + } + } +}); diff --git a/fe/PDA/wxcomponents/vant/mixins/observer/index.d.ts b/fe/PDA/wxcomponents/vant/mixins/observer/index.d.ts new file mode 100644 index 000000000..4e54b2e54 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/mixins/observer/index.d.ts @@ -0,0 +1 @@ +export declare function observe(vantOptions: any, options: any): void; diff --git a/fe/PDA/wxcomponents/vant/mixins/observer/index.js b/fe/PDA/wxcomponents/vant/mixins/observer/index.js new file mode 100644 index 000000000..d6f608d1d --- /dev/null +++ b/fe/PDA/wxcomponents/vant/mixins/observer/index.js @@ -0,0 +1,19 @@ +import { behavior } from './behavior'; +export function observe(vantOptions, options) { + const { watch } = vantOptions; + options.behaviors.push(behavior); + if (watch) { + const props = options.properties || {}; + Object.keys(watch).forEach(key => { + if (key in props) { + let prop = props[key]; + if (prop === null || !('type' in prop)) { + prop = { type: prop }; + } + prop.observer = watch[key]; + props[key] = prop; + } + }); + options.properties = props; + } +} diff --git a/fe/PDA/wxcomponents/vant/mixins/open-type.d.ts b/fe/PDA/wxcomponents/vant/mixins/open-type.d.ts new file mode 100644 index 000000000..64b023d78 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/mixins/open-type.d.ts @@ -0,0 +1 @@ +export declare const openType: string; diff --git a/fe/PDA/wxcomponents/vant/mixins/open-type.js b/fe/PDA/wxcomponents/vant/mixins/open-type.js new file mode 100644 index 000000000..514517e0e --- /dev/null +++ b/fe/PDA/wxcomponents/vant/mixins/open-type.js @@ -0,0 +1,25 @@ +export const openType = Behavior({ + properties: { + openType: String + }, + methods: { + bindGetUserInfo(event) { + this.$emit('getuserinfo', event.detail); + }, + bindContact(event) { + this.$emit('contact', event.detail); + }, + bindGetPhoneNumber(event) { + this.$emit('getphonenumber', event.detail); + }, + bindError(event) { + this.$emit('error', event.detail); + }, + bindLaunchApp(event) { + this.$emit('launchapp', event.detail); + }, + bindOpenSetting(event) { + this.$emit('opensetting', event.detail); + }, + } +}); diff --git a/fe/PDA/wxcomponents/vant/mixins/touch.d.ts b/fe/PDA/wxcomponents/vant/mixins/touch.d.ts new file mode 100644 index 000000000..35ee831d9 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/mixins/touch.d.ts @@ -0,0 +1 @@ +export declare const touch: string; diff --git a/fe/PDA/wxcomponents/vant/mixins/touch.js b/fe/PDA/wxcomponents/vant/mixins/touch.js new file mode 100644 index 000000000..2a794267e --- /dev/null +++ b/fe/PDA/wxcomponents/vant/mixins/touch.js @@ -0,0 +1,35 @@ +const MIN_DISTANCE = 10; +function getDirection(x, y) { + if (x > y && x > MIN_DISTANCE) { + return 'horizontal'; + } + if (y > x && y > MIN_DISTANCE) { + return 'vertical'; + } + return ''; +} +export const touch = Behavior({ + methods: { + resetTouchStatus() { + this.direction = ''; + this.deltaX = 0; + this.deltaY = 0; + this.offsetX = 0; + this.offsetY = 0; + }, + touchStart(event) { + this.resetTouchStatus(); + const touch = event.touches[0]; + this.startX = touch.clientX; + this.startY = touch.clientY; + }, + touchMove(event) { + const touch = event.touches[0]; + this.deltaX = touch.clientX - this.startX; + this.deltaY = touch.clientY - this.startY; + this.offsetX = Math.abs(this.deltaX); + this.offsetY = Math.abs(this.deltaY); + this.direction = this.direction || getDirection(this.offsetX, this.offsetY); + } + } +}); diff --git a/fe/PDA/wxcomponents/vant/mixins/transition.d.ts b/fe/PDA/wxcomponents/vant/mixins/transition.d.ts new file mode 100644 index 000000000..ee7b6ca8e --- /dev/null +++ b/fe/PDA/wxcomponents/vant/mixins/transition.d.ts @@ -0,0 +1 @@ +export declare const transition: (showDefaultValue: boolean) => any; diff --git a/fe/PDA/wxcomponents/vant/mixins/transition.js b/fe/PDA/wxcomponents/vant/mixins/transition.js new file mode 100644 index 000000000..a64df6abd --- /dev/null +++ b/fe/PDA/wxcomponents/vant/mixins/transition.js @@ -0,0 +1,120 @@ +import { isObj } from '../common/utils'; +const getClassNames = (name) => ({ + enter: `van-${name}-enter van-${name}-enter-active enter-class enter-active-class`, + 'enter-to': `van-${name}-enter-to van-${name}-enter-active enter-to-class enter-active-class`, + leave: `van-${name}-leave van-${name}-leave-active leave-class leave-active-class`, + 'leave-to': `van-${name}-leave-to van-${name}-leave-active leave-to-class leave-active-class` +}); +const nextTick = () => new Promise(resolve => setTimeout(resolve, 1000 / 30)); +export const transition = function (showDefaultValue) { + return Behavior({ + properties: { + customStyle: String, + // @ts-ignore + show: { + type: Boolean, + value: showDefaultValue, + observer: 'observeShow' + }, + // @ts-ignore + duration: { + type: null, + value: 300, + observer: 'observeDuration' + }, + name: { + type: String, + value: 'fade' + } + }, + data: { + type: '', + inited: false, + display: false + }, + attached() { + if (this.data.show) { + this.enter(); + } + }, + methods: { + observeShow(value) { + value ? this.enter() : this.leave(); + }, + enter() { + const { duration, name } = this.data; + const classNames = getClassNames(name); + const currentDuration = isObj(duration) ? duration.enter : duration; + this.status = 'enter'; + this.$emit('before-enter'); + Promise.resolve() + .then(nextTick) + .then(() => { + this.checkStatus('enter'); + this.$emit('enter'); + this.setData({ + inited: true, + display: true, + classes: classNames.enter, + currentDuration + }); + }) + .then(nextTick) + .then(() => { + this.checkStatus('enter'); + this.transitionEnded = false; + this.setData({ + classes: classNames['enter-to'] + }); + }) + .catch(() => { }); + }, + leave() { + if (!this.data.display) { + return; + } + const { duration, name } = this.data; + const classNames = getClassNames(name); + const currentDuration = isObj(duration) ? duration.leave : duration; + this.status = 'leave'; + this.$emit('before-leave'); + Promise.resolve() + .then(nextTick) + .then(() => { + this.checkStatus('leave'); + this.$emit('leave'); + this.setData({ + classes: classNames.leave, + currentDuration + }); + }) + .then(nextTick) + .then(() => { + this.checkStatus('leave'); + this.transitionEnded = false; + setTimeout(() => this.onTransitionEnd(), currentDuration); + this.setData({ + classes: classNames['leave-to'] + }); + }) + .catch(() => { }); + }, + checkStatus(status) { + if (status !== this.status) { + throw new Error(`incongruent status: ${status}`); + } + }, + onTransitionEnd() { + if (this.transitionEnded) { + return; + } + this.transitionEnded = true; + this.$emit(`after-${this.status}`); + const { show, display } = this.data; + if (!show && display) { + this.setData({ display: false }); + } + } + } + }); +}; diff --git a/fe/PDA/wxcomponents/vant/wxs/array.wxs b/fe/PDA/wxcomponents/vant/wxs/array.wxs new file mode 100644 index 000000000..783241686 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/wxs/array.wxs @@ -0,0 +1,5 @@ +function isArray(array) { + return array && (array.constructor === 'Array' || (typeof Array !== 'undefined' && Array.isArray(array))); +} + +module.exports.isArray = isArray; diff --git a/fe/PDA/wxcomponents/vant/wxs/bem.wxs b/fe/PDA/wxcomponents/vant/wxs/bem.wxs new file mode 100644 index 000000000..93b2777b1 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/wxs/bem.wxs @@ -0,0 +1,38 @@ +var array = require('./array.wxs'); +var object = require('./object.wxs'); +var PREFIX = 'van-'; + +function join(name, mods) { + name = PREFIX + name; + mods = mods.map(function(mod) { + return name + '--' + mod; + }); + mods.unshift(name); + return mods.join(' '); +} + +function traversing(mods, conf) { + if (!conf) { + return; + } + + if (typeof conf === 'string' || typeof conf === 'number') { + mods.push(conf); + } else if (array.isArray(conf)) { + conf.forEach(function(item) { + traversing(mods, item); + }); + } else if (typeof conf === 'object') { + object.keys(conf).forEach(function(key) { + conf[key] && mods.push(key); + }); + } +} + +function bem(name, conf) { + var mods = []; + traversing(mods, conf); + return join(name, mods); +} + +module.exports.bem = bem; diff --git a/fe/PDA/wxcomponents/vant/wxs/memoize.wxs b/fe/PDA/wxcomponents/vant/wxs/memoize.wxs new file mode 100644 index 000000000..261ae67df --- /dev/null +++ b/fe/PDA/wxcomponents/vant/wxs/memoize.wxs @@ -0,0 +1,54 @@ +/** + * Simple memoize + * wxs doesn't support fn.apply, so this memoize only support up to 2 args + */ + +function isPrimitive(value) { + var type = typeof value; + return ( + type === 'boolean' || + type === 'number' || + type === 'string' || + type === 'undefined' || + value === null + ); +} + +// mock simple fn.call in wxs +function call(fn, args) { + if (args.length === 2) { + return fn(args[0], args[1]); + } + + if (args.length === 1) { + return fn(args[0]); + } + + return fn(); +} + +function serializer(args) { + if (args.length === 1 && isPrimitive(args[0])) { + return args[0]; + } + var obj = {}; + for (var i = 0; i < args.length; i++) { + obj['key' + i] = args[i]; + } + return JSON.stringify(obj); +} + +function memoize(fn) { + var cache = {}; + + return function() { + var key = serializer(arguments); + if (cache[key] === undefined) { + cache[key] = call(fn, arguments); + } + + return cache[key]; + }; +} + +module.exports.memoize = memoize; diff --git a/fe/PDA/wxcomponents/vant/wxs/object.wxs b/fe/PDA/wxcomponents/vant/wxs/object.wxs new file mode 100644 index 000000000..e07710776 --- /dev/null +++ b/fe/PDA/wxcomponents/vant/wxs/object.wxs @@ -0,0 +1,13 @@ +/* eslint-disable */ +var REGEXP = getRegExp('{|}|"', 'g'); + +function keys(obj) { + return JSON.stringify(obj) + .replace(REGEXP, '') + .split(',') + .map(function(item) { + return item.split(':')[0]; + }); +} + +module.exports.keys = keys; diff --git a/fe/PDA/wxcomponents/vant/wxs/utils.wxs b/fe/PDA/wxcomponents/vant/wxs/utils.wxs new file mode 100644 index 000000000..a18662dfc --- /dev/null +++ b/fe/PDA/wxcomponents/vant/wxs/utils.wxs @@ -0,0 +1,7 @@ +var bem = require('./bem.wxs').bem; +var memoize = require('./memoize.wxs').memoize; + +module.exports = { + bem: memoize(bem), + memoize: memoize +};