Commit e1697b67 by 张立顺

perf: move heavy assets into subpackages

1 parent 6338052c
Showing 99 changed files with 886 additions and 840 deletions
......@@ -27,7 +27,6 @@ import { checkYqdSuper, checkScene } from '~/store/index'
import eventbus from './utils/eventbus'
import api from './api/api'
import { Version } from 'glsx-common-sdk'
import { areaList } from '@vant/area-data' //预加载省市区
import globalDataFunction from './mixins/globalDataFunction'
import {
......@@ -86,7 +85,6 @@ App({
wx.$util = util
wx.$api = wxApi
wx.$eventbus = eventbus
wx.$areaList = areaList
wx.$track = $Track
let userInfo = util.getStorageSync('dj_boutique_user_info')
// ,this.globalData, userInfo
......
......@@ -154,7 +154,6 @@
"usingComponents": {
"gl-textarea": "/components/GlTextarea/GlTextarea",
"gl-cell": "/components/GlCell/GlCell",
"gl-cust-form": "/components/GLCustForm/GLCustForm",
"calendar": "/components/Calendar/Calendar",
"navigation-bar": "/components/navigationBar/navigationBar",
"popup": "/components/Popup/Popup",
......
......@@ -20,14 +20,14 @@
| `api/api.js#createQrcodeImage` | `tabWorkOrder/components/OrderPopup/OrderPopup.js` | `dj.api.smartcarlife.common.createWeappQrcode` |
| `api/api.js#findBeiSenSSOToken` | `components/studyPermissionModal/studyPermissionModal.js` | `dj.pad.api.beisen.findBeiSenSSOToken` |
| `api/api.js#getAllStaffListAPI` | `pages/mattersHandle/mattersHandle.js` | `dj.api.staff.miniprogram.recruitment.staff.page` |
| `api/api.js#getBrandList` | `components/CarBrands/CarBrands.js` | `dj.api.get.car.brandList` |
| `api/api.js#getBrandList` | `tabWorkOrder/components/CarBrands/CarBrands.js` | `dj.api.get.car.brandList` |
| `api/api.js#getConfigList` | — | `dj.api.smartcarlife.config.list` |
| `api/api.js#getConversionEmployeeList` | `pages/tabWorkOrder/components/OrderScreen/OrderScreen.js` | `dj.api.smartcarlife.employee.getByMerchantId` |
| `api/api.js#getCouponList` | `tabWorkOrder/components/Coupon/Coupon.js` | `dj.api.smartCarLife.merchant.coupon.list` |
| `api/api.js#getCurShopList` | — | `dj.api.smartcarlife.serviceMerchant.curShopList` |
| `api/api.js#getCustomerClueRemind` | — | `dj.api.smartcarlife.customer.clue.tips.newCount` |
| `api/api.js#getCustomerCouponList` | `tabWorkOrder/components/Coupon/Coupon.js` | `dj.api.customer.coupon.list` |
| `api/api.js#getCustomerFileList` | `components/CustomerInfo/CustomerInfo.js` | `dj.api.smartcarlife.vehicle.damage.upgrade.quotation.customer.page` |
| `api/api.js#getCustomerFileList` | `tabWorkOrder/components/CustomerInfo/CustomerInfo.js` | `dj.api.smartcarlife.vehicle.damage.upgrade.quotation.customer.page` |
| `api/api.js#getDemandStoreListAPI` | `pages/components/recruitPopup/recruitPopup.js` | `dj.api.staff.miniprogram.recruitment.demand.store.list` |
| `api/api.js#getEmployeeList` | `tabWorkOrder/pages/createOrder/services/merchantStaffSelection.js` | `dj.api.smartcarlife.employee.onTheJob.getByMerchantId` |
| `api/api.js#getGoodsTypeList` | — | `dj.api.goods.type.list` |
......@@ -72,7 +72,7 @@
| `api/api.js#getUserScene` | `pages/tabWorkOrder/components/OrderScreen/OrderScreen.js` | `dj.api.smartcarlife.scene.config.getUserScene` |
| `api/api.js#getWaitAuditCountAPI` | `packageWorkspace/pages/refundOperationList/refundOperationList.js`<br>`pages/tab/workspace/workspace.js` | `dj.api.smartcarlife.refundApplyRecord.waitForAudit.count` |
| `api/api.js#getWorkList` | — | `dj.api.smartcarlife.order.search` |
| `api/api.js#getWorkPackageGoodsList` | `components/CustomerInfo/CustomerInfo.js` | `dj.api.smartcarlife.order.search.containPackageGoods` |
| `api/api.js#getWorkPackageGoodsList` | `tabWorkOrder/components/CustomerInfo/CustomerInfo.js` | `dj.api.smartcarlife.order.search.containPackageGoods` |
| `api/api.js#getWsUrl` | `store/index.js` | `dj.api.smartcarlife.getWsUrl` |
| `api/api.js#getYQList` | `store/index.js`<br>`tabWorkOrder/pages/createOrder/services/merchantStaffSelection.js` | `dj.api.smartcarlife.serviceMerchant.curYqList` |
| `api/api.js#getYqMerchantListPage` | — | `dj.api.scenemerchantref.listYqShopByRef.page` |
......
......@@ -4,8 +4,8 @@
## 规模
- 节点:4218
- 关系:8097
- 节点:4231
- 关系:8107
- 未解析:88
## 节点类型
......@@ -14,14 +14,14 @@
| --- | --- |
| apiOperation | 332 |
| component | 109 |
| document | 79 |
| document | 83 |
| domain | 6 |
| endpoint | 234 |
| globalState | 34 |
| method | 2914 |
| module | 363 |
| globalState | 33 |
| method | 2921 |
| module | 365 |
| page | 71 |
| test | 76 |
| test | 77 |
## 关系类型
......@@ -31,16 +31,16 @@
| calls | 885 |
| callsApi | 221 |
| callsEndpoint | 332 |
| contains | 708 |
| coveredBy | 60 |
| declares | 2915 |
| contains | 710 |
| coveredBy | 62 |
| declares | 2922 |
| definesApi | 332 |
| documentedBy | 53 |
| imports | 436 |
| imports | 438 |
| navigatesTo | 71 |
| readsState | 778 |
| usesComponent | 315 |
| writesState | 52 |
| readsState | 777 |
| usesComponent | 314 |
| writesState | 51 |
## 使用入口
......
......@@ -4,8 +4,8 @@
| 来源 | 目标页面 | 证据 |
| --- | --- | --- |
| `app.js` | `pages/wxLogin/wxLogin` | `app.js:209` |
| `app.js` | `pages/wxLogin/wxLogin` | `app.js:229` |
| `app.js` | `pages/wxLogin/wxLogin` | `app.js:207` |
| `app.js` | `pages/wxLogin/wxLogin` | `app.js:227` |
| `packageStudy/pages/aiCheck/detail/components/fluent/fluent.js` | `packageStudy/pages/aiCheck/redundance/redundance` | `packageStudy/pages/aiCheck/detail/components/fluent/fluent.js:77` |
| `packageStudy/pages/aiCheck/detail/detail.js` | `packageStudy/pages/aiCheck/scene/scene` | `packageStudy/pages/aiCheck/detail/detail.js:36` |
| `packageStudy/pages/aiCheck/detail/detail.js` | `packageStudy/pages/aiCheck/scene/scene` | `packageStudy/pages/aiCheck/detail/detail.js:40` |
......
......@@ -22,7 +22,7 @@
| page | 11 |
| component | 5 |
| apiOperation | 9 |
| globalState | 21 |
| globalState | 20 |
| test | 0 |
| document | 1 |
......@@ -54,7 +54,6 @@
| globalState | `globalData.yqdInfo` |
| globalState | `wx.$LOGIN_ROLE` |
| globalState | `wx.$api` |
| globalState | `wx.$areaList` |
| globalState | `wx.$eventbus` |
| globalState | `wx.$globalDataFunction` |
| globalState | `wx.$hasPermission` |
......
......@@ -20,7 +20,7 @@
| 类型 | 数量 |
| --- | --- |
| page | 0 |
| component | 31 |
| component | 17 |
| apiOperation | 110 |
| globalState | 8 |
| test | 1 |
......@@ -142,27 +142,14 @@
| apiOperation | `api/specialMentoring/index.js#getTaskCenterDetail` |
| component | `components/Calendar/Calendar` |
| component | `components/CalendarMonth/CalendarMonth` |
| component | `components/CarBrands/CarBrands` |
| component | `components/CustomerInfo/CustomerInfo` |
| component | `components/DateSelect/dateSelect` |
| component | `components/EmptyData/EmptyData` |
| component | `components/FilterBar/FilterBar` |
| component | `components/GLCustForm/GLCustForm` |
| component | `components/GlCell/GlCell` |
| component | `components/GlImage/index` |
| component | `components/GlTextarea/GlTextarea` |
| component | `components/Goods/Goods` |
| component | `components/InventoryInfo/InventoryInfo` |
| component | `components/Popup/Popup` |
| component | `components/Qrbox/Qrbox` |
| component | `components/RemarkPopup/RemarkPopup` |
| component | `components/SearchInput/SearchInput` |
| component | `components/SkuGoods/Goods` |
| component | `components/StoreSelectPopup/StoreSelectPopup` |
| component | `components/TabBar/TabBar` |
| component | `components/TechnicianSelectPopup/TechnicianSelectPopup` |
| component | `components/TopToolbarPopup/TopToolbarPopup` |
| component | `components/areaOperationsModal/areaOperationsModal` |
| component | `components/cover-tab-bar/cover-tab-bar` |
| component | `components/modal/modal` |
| component | `components/navigationBar/navigationBar` |
......@@ -170,7 +157,6 @@
| component | `components/report-template-popup/report-template-popup` |
| component | `components/selectPopup/selectPopup` |
| component | `components/studyPermissionModal/studyPermissionModal` |
| component | `components/tipsBottom/index` |
| document | `docs/README.md` |
| globalState | `globalData.YQorderSettingMerchantId` |
| globalState | `globalData.YQorderSettingYqMerchantId` |
......
......@@ -20,7 +20,7 @@
| 类型 | 数量 |
| --- | --- |
| page | 5 |
| component | 10 |
| component | 21 |
| apiOperation | 79 |
| globalState | 2 |
| test | 35 |
......@@ -110,13 +110,24 @@
| apiOperation | `tabWorkOrder/api.js#waitinputorder` |
| apiOperation | `tabWorkOrder/api.js#waitinputorderSelectById` |
| component | `pages/tabWorkOrder/components/OrderScreen/OrderScreen` |
| component | `tabWorkOrder/components/CarBrands/CarBrands` |
| component | `tabWorkOrder/components/ConstructionDetailModal/ConstructionDetailModal` |
| component | `tabWorkOrder/components/Coupon/Coupon` |
| component | `tabWorkOrder/components/CustomerInfo/CustomerInfo` |
| component | `tabWorkOrder/components/DateSelect/dateSelect` |
| component | `tabWorkOrder/components/FilmRollNoPopup/FilmRollNoPopup` |
| component | `tabWorkOrder/components/Goods/Goods` |
| component | `tabWorkOrder/components/InventoryInfo/InventoryInfo` |
| component | `tabWorkOrder/components/OrderPopup/OrderPopup` |
| component | `tabWorkOrder/components/Qrbox/Qrbox` |
| component | `tabWorkOrder/components/RemarkPopup/RemarkPopup` |
| component | `tabWorkOrder/components/SetMeal/SetMeal` |
| component | `tabWorkOrder/components/SkuGoods/Goods` |
| component | `tabWorkOrder/components/TechnicianSelectPopup/TechnicianSelectPopup` |
| component | `tabWorkOrder/components/applyRefundBtn/applyRefundBtn` |
| component | `tabWorkOrder/components/areaOperationsModal/areaOperationsModal` |
| component | `tabWorkOrder/components/subShopMerchant/subShopMerchant` |
| component | `tabWorkOrder/components/tipsBottom/index` |
| component | `tabWorkOrder/pages/createOrder/components/OrderGoodsRow/order-goods-row` |
| component | `tabWorkOrder/pages/createOrder/components/merchant-staff-picker/merchant-staff-picker` |
| document | `docs/order-creation/README.md` |
......
......@@ -20,10 +20,10 @@
| 类型 | 数量 |
| --- | --- |
| page | 34 |
| component | 38 |
| component | 41 |
| apiOperation | 134 |
| globalState | 2 |
| test | 0 |
| test | 1 |
| document | 2 |
## 可定位实体
......@@ -164,6 +164,9 @@
| apiOperation | `packageWorkspace/pages/residentManage/api.js#getyqMerchantList` |
| apiOperation | `packageWorkspace/pages/residentManage/api.js#updateAccountStatus` |
| apiOperation | `packageWorkspace/pages/residentManage/api.js#updateDailyReportConfig` |
| component | `packageWorkspace/components/FilterBar/FilterBar` |
| component | `packageWorkspace/components/GLCustForm/GLCustForm` |
| component | `packageWorkspace/components/TopToolbarPopup/TopToolbarPopup` |
| component | `packageWorkspace/components/selectPopup/selectPopup` |
| component | `packageWorkspace/pages/carSeries/components/PageLoading/PageLoading` |
| component | `packageWorkspace/pages/cashFlowReview/components/approvalPopup/approvalPopup` |
......@@ -240,3 +243,4 @@
| page | `packageWorkspace/pages/validReferralCount/referralCountList/referralCountList` |
| page | `pages/tab/index/index` |
| page | `pages/tab/workspace/workspace` |
| test | `tests/package-size/mainPackageBudget.test.mjs` |
This diff could not be displayed because it is too large.
......@@ -7,7 +7,7 @@
| 学习图表 | `utils/wxcharts.js` | `packageStudy/utils/wxcharts.js` |
| 工单二维码 | `utils/lib/wxqrcode.js` | `tabWorkOrder/utils/wxqrcode.js` |
| 督导表单 | 根全局组件 | `packageWorkspace` 本地组件 |
| 地区数据 | 根 npm 依赖并挂载 `wx.$areaList` | `packageWorkspace/utils/area-data.js` 本地数据 |
| 地区数据 | 根 npm 依赖并挂载 `wx.$areaList` | `packageWorkspace/utils/area-data.js` 本地数据;旧 npm 产物显式排除上传 |
| workspace 筛选 | 根组件 | `packageWorkspace/components` |
| 工单独占组件 | 根组件 | `tabWorkOrder/components` |
| 主包预算 | 无 | `npm run size:main`,最大 2,000,000 字节 |
......@@ -8,6 +8,7 @@
"package.json",
"package-lock.json",
"yarn.lock",
"project.config.json",
"miniprogram_npm",
"utils",
"components",
......@@ -29,13 +30,15 @@
"id": "migration-readiness-contract",
"file": "tests/migration-readiness/checkMigrationReadiness.test.mjs",
"level": "contract",
"expectedBefore": "pass"
"expectedBefore": "pass",
"status": "pass"
},
{
"id": "main-package-budget-contract",
"file": "tests/package-size/mainPackageBudget.test.mjs",
"level": "integration",
"expectedBefore": "fail"
"expectedBefore": "pass",
"status": "pass"
}
],
"baseline": {
......@@ -43,5 +46,29 @@
"result": "87171bc"
},
"apiInventory": "docs/migrations/main-package-size-optimization/api-inventory.md",
"acceptance": "docs/migrations/main-package-size-optimization/test-acceptance.md"
"acceptance": "docs/migrations/main-package-size-optimization/test-acceptance.md",
"verification": {
"commands": [
{
"command": "npm run size:main",
"status": "pass"
},
{
"command": "node scripts/run-node-tests.mjs tests/package-size/mainPackageBudget.test.mjs",
"status": "pass"
},
{
"command": "npm run test:workOrder",
"status": "pass"
},
{
"command": "npm run knowledge:check",
"status": "pass"
},
{
"command": "npm test",
"status": "pass"
}
]
}
}
......@@ -2,11 +2,21 @@
| ID | 验收项 | Pre | Post |
|---|---|---|---|
| SIZE-001 | 物理主包不超过 2,000,000 字节 | fail: 2,360,562 bytes | pending |
| SIZE-002 | wxcharts 仅位于 packageStudy | fail | pending |
| SIZE-003 | wxqrcode 仅位于 tabWorkOrder | fail | pending |
| SIZE-004 | 地区数据与 GLCustForm 仅位于 packageWorkspace | fail | pending |
| SIZE-005 | 工单独占根组件全部迁入 tabWorkOrder | fail | pending |
| SIZE-006 | workspace 独占筛选组件迁入分包 | fail | pending |
| SIZE-007 | 上传依赖、路由和 API 闭包 | pass | pending |
| SIZE-008 | 全仓离线测试 | pass | pending |
| SIZE-001 | 物理主包不超过 2,000,000 字节 | fail: 2,360,562 bytes | pass: 1,981,498 bytes |
| SIZE-002 | wxcharts 仅位于 packageStudy | fail | pass |
| SIZE-003 | wxqrcode 仅位于 tabWorkOrder | fail | pass |
| SIZE-004 | 地区数据与 GLCustForm 仅位于 packageWorkspace | fail | pass |
| SIZE-005 | 工单独占根组件全部迁入 tabWorkOrder | fail | pass |
| SIZE-006 | workspace 独占筛选组件迁入分包 | fail | pass |
| SIZE-007 | 上传依赖、路由和 API 闭包 | pass | pass |
| SIZE-008 | 全仓离线测试 | pass | pass |
## 最终证据(2026-08-21)
- 保守物理主包从 2,360,562 字节降到 1,981,498 字节,减少 379,064 字节;低于内部 2,000,000 字节预算 18,502 字节,低于微信 2 MiB 上限 115,654 字节。
- 主包预算与分包边界合同 5 项通过,覆盖地区数据结构、许可文件、旧路径清理和消费者新路径。
- 精品工单迁移、创建页、生命周期和闭包命令全部通过;生命周期回归为 82 项通过,4 个 Live 用例默认跳过。
- 知识图谱回归 29 项通过;12 个生成产物保持最新,最终图谱包含 4,231 个节点、8,107 条边、71 个页面和 88 个已知未解析项。
- `npm test` 退出码为 0;Node 24.19 上传 guard 扫描 235 个工单文件,依赖、路由和 API 闭包均无缺口。
- `@vant/area-data` 已从依赖清单移除;workspace 内保留 1.5.2 的地区数据与 MIT 许可,并通过 `project.config.json` 排除可能残留的旧 npm 构建产物。
- 登录及写入型 Live 用例继续依赖运行时环境变量与显式开关,本次验证未运行 Live 写入,也未在仓库写入测试账号。
......@@ -5,7 +5,6 @@
"packages": {
"": {
"dependencies": {
"@vant/area-data": "^1.5.1",
"@vant/weapp": "^1.10.24",
"dayjs": "^1.11.11",
"glsk-applet-component": "^1.0.0",
......@@ -585,11 +584,6 @@
"dev": true,
"license": "MIT"
},
"node_modules/@vant/area-data": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/@vant/area-data/-/area-data-1.5.2.tgz",
"integrity": "sha512-Gtxgt6Rjgopt6234ANpO0bBsSwtjZ23lBlVDHIy8Mi2NJqyoj1vgVWY0dri8/2LCZAWzQ6EnwRrUVViUZ0cvMA=="
},
"node_modules/@vant/weapp": {
"version": "1.11.7",
"resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.11.7.tgz",
......
{
"dependencies": {
"@vant/area-data": "^1.5.1",
"@vant/weapp": "^1.10.24",
"dayjs": "^1.11.11",
"glsk-applet-component": "^1.0.0",
......
// packageEquity/pages/aiCheck/result/result.js
var wxCharts = require("../../../../utils/wxcharts");
var wxCharts = require("../../../utils/wxcharts");
import aiApi from "~/packageStudy/aiApi";
import carLifeApi from "~/packageStudy/studyApi";
var windowW = 0;
......
......@@ -2106,3 +2106,4 @@ Charts.prototype.toDataURL = function({
})
}
module.exports = Charts;
......@@ -4,6 +4,6 @@
"TopToolbarPopup": "../TopToolbarPopup/TopToolbarPopup",
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-picker": "@vant/weapp/picker/index",
"calendar": "../Calendar/Calendar"
"calendar": "/components/Calendar/Calendar"
}
}
......@@ -97,4 +97,4 @@
font-size: 26rpx;
padding: 10rpx;
flex-shrink: 0;
}
\ No newline at end of file
}
// components/GLCustForm/GLCustForm.js
import { areaList as regionalAreaList } from '../../utils/area-data'
Component({
externalClasses: ['custom-class'],
options: {
......@@ -252,7 +254,7 @@ Component({
showArea,
areaList
} = this.data
if (!areaList.length) areaList = wx.$areaList // 省市区数据
if (!areaList || !Object.keys(areaList).length) areaList = regionalAreaList
this.setData({
showArea: !showArea,
areaList
......@@ -263,4 +265,4 @@ Component({
this.showAreaFun()
}
}
})
\ No newline at end of file
})
......@@ -4,4 +4,4 @@
"van-area": "@vant/weapp/area/index",
"van-popup": "@vant/weapp/popup/index"
}
}
\ No newline at end of file
}
......@@ -109,4 +109,4 @@
/* @media screen and (min-device-width: 600px) and (-webkit-min-device-pixel-ratio: 1) {
} */
\ No newline at end of file
} */
......@@ -119,3 +119,4 @@
</gl-cell>
<slot wx:if="{{item.type == 'otherSlot'}}" name="{{item.name}}" />
</view>
......@@ -16,4 +16,4 @@ var isShowFn = function (formData, targetItem) {
module.exports = {
isShowFn: isShowFn
}
\ No newline at end of file
}
......@@ -42,4 +42,4 @@ const checkRequired = function (obj, formRule) {
export default {
checkRequired
}
\ No newline at end of file
}
{
"usingComponents": {
"FilterBar": "/components/FilterBar/FilterBar",
"FilterBar": "../../../components/FilterBar/FilterBar",
"van-icon": "@vant/weapp/icon/index"
},
"navigationBarTitleText": "申诉单列表"
}
\ No newline at end of file
}
{
"usingComponents": {
"FilterBar": "/components/FilterBar/FilterBar",
"FilterBar": "../../../components/FilterBar/FilterBar",
"van-icon": "@vant/weapp/icon/index"
},
"navigationBarTitleText": "考勤列表"
......
......@@ -3,7 +3,7 @@ var util = require("~/utils/timeFormat/time-utils.js");
import { resData } from "./resData";
import { tempRuleFnObj } from "./ruleFnObj";
import { reportFirstAutoObj } from "./reportFirstAuto";
import fn from "~/components/GLCustForm/ruleFn";
import fn from "~/packageWorkspace/components/GLCustForm/ruleFn";
import api from "../../api";
import apiDefault from "~/api/api";
import reportPageTrackMixin from '~/mixins/reportPageTrackMixin'
......
......@@ -6,6 +6,7 @@
"select-item-popup": "./components/selectItemPopup/selectItemPopup",
"select-popup": "./components/selectPopup/selectPopup",
"monthCalendar": "./components/monthCalendar/monthCalendar",
"weeklyCalendar": "./components/weeklyCalendar/weeklyCalendar"
"weeklyCalendar": "./components/weeklyCalendar/weeklyCalendar",
"gl-cust-form": "../../components/GLCustForm/GLCustForm"
}
}
\ No newline at end of file
}
{
"usingComponents": {
"FilterBar": "/components/FilterBar/FilterBar"
"FilterBar": "../../../components/FilterBar/FilterBar"
}
}
\ No newline at end of file
}
MIT License
Copyright (c) Youzan
Copyright (c) Chen Jiahan and other contributors
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.
This diff could not be displayed because it is too large.
......@@ -45,6 +45,10 @@
"type": "folder"
},
{
"value": "miniprogram_npm/@vant/area-data",
"type": "folder"
},
{
"value": "docs",
"type": "folder"
},
......
// components/CarBrands/CarBrands.js
import api from "../../api/api.js";
import api from "~/api/api.js";
let isNum, num, y, time;
Component({
/**
......
......@@ -40,7 +40,7 @@
data-that="{{c}}">
{{c.name}}
<view class="icon">
<image src="../images/choose.png" />
<image src="/components/images/choose.png" />
</view>
</view>
</block>
......
/* components/CarBrands/CarBrands.wxss */
.car-brands-box {
width: calc(100% + var(--fontSize64));
height: 100%;
margin-left: calc(-1 * var(--fontSize32));
}
.car-brands {
height: calc(100% - var(--fontSize104));
position: relative;
/* display: flex; */
}
.y-center {
display: flex;
align-items: center;
}
.car-brands .title {
background: #f7f8fa;
font-size: var(--fontSize24);
color: #969799;
padding-left: var(--fontSize32);
height: var(--fontSize64);
/* position: sticky;
left: 0;
top: 0;
z-index: 998; */
}
.list {
height: var(--fontSize88);
padding-left: var(--fontSize32);
font-size: var(--fontSize32);
font-weight: 700;
color: #323436;
}
.child {
font-weight: normal;
padding-left: var(--fontSize96);
font-size: var(--fontSize28);
color: #323436;
position: relative;
}
.child.active {
color: #347BFF;
}
.child.title {
color: #282829;
padding-left: var(--fontSize64);
/* color: #347BFF; */
}
.child .icon {
display: none;
width: var(--fontSize32);
height: var(--fontSize32);
position: absolute;
top: 50%;
left: var(--fontSize40);
transform: translateY(-50%);
}
.child.active .icon {
display: block;
}
.side-bar {
z-index: 999;
/* display: none; */
/* position: fixed; */
position: absolute;
top: 50%;
transform: translateY(-50%);
font-size: var(--fontSize24);
color: #4c4c4c;
width: 10%;
/* width: var(--fontSize452); */
opacity: 0;
animation: show-side-bar 0.5s forwards;
}
@media screen and (min-device-width: 600px) and (-webkit-min-device-pixel-ratio: 1) {
.side-bar {
font-size: var(--fontSize12);
}
}
@keyframes show-side-bar {
0% {
opacity: 0;
right: -100%;
}
100% {
opacity: 1;
right: 0;
}
}
.side-bar .view {
width: 100%;
text-align: center;
}
.tips {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: var(--fontSize140);
height: var(--fontSize140);
border-radius: 50%;
color: #fff;
background: rgba(153, 153, 153, 0.7);
z-index: 9999;
font-size: var(--fontSize60);
font-weight: bold;
display: flex;
align-items: center;
justify-content: center;
}
.nothing {
padding: var(--fontSize100);
text-align: center;
color: #999;
}
\ No newline at end of file
/* components/CarBrands/CarBrands.wxss */
.car-brands-box {
width: calc(100% + var(--fontSize64));
height: 100%;
margin-left: calc(-1 * var(--fontSize32));
}
.car-brands {
height: calc(100% - var(--fontSize104));
position: relative;
/* display: flex; */
}
.y-center {
display: flex;
align-items: center;
}
.car-brands .title {
background: #f7f8fa;
font-size: var(--fontSize24);
color: #969799;
padding-left: var(--fontSize32);
height: var(--fontSize64);
/* position: sticky;
left: 0;
top: 0;
z-index: 998; */
}
.list {
height: var(--fontSize88);
padding-left: var(--fontSize32);
font-size: var(--fontSize32);
font-weight: 700;
color: #323436;
}
.child {
font-weight: normal;
padding-left: var(--fontSize96);
font-size: var(--fontSize28);
color: #323436;
position: relative;
}
.child.active {
color: #347BFF;
}
.child.title {
color: #282829;
padding-left: var(--fontSize64);
/* color: #347BFF; */
}
.child .icon {
display: none;
width: var(--fontSize32);
height: var(--fontSize32);
position: absolute;
top: 50%;
left: var(--fontSize40);
transform: translateY(-50%);
}
.child.active .icon {
display: block;
}
.side-bar {
z-index: 999;
/* display: none; */
/* position: fixed; */
position: absolute;
top: 50%;
transform: translateY(-50%);
font-size: var(--fontSize24);
color: #4c4c4c;
width: 10%;
/* width: var(--fontSize452); */
opacity: 0;
animation: show-side-bar 0.5s forwards;
}
@media screen and (min-device-width: 600px) and (-webkit-min-device-pixel-ratio: 1) {
.side-bar {
font-size: var(--fontSize12);
}
}
@keyframes show-side-bar {
0% {
opacity: 0;
right: -100%;
}
100% {
opacity: 1;
right: 0;
}
}
.side-bar .view {
width: 100%;
text-align: center;
}
.tips {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: var(--fontSize140);
height: var(--fontSize140);
border-radius: 50%;
color: #fff;
background: rgba(153, 153, 153, 0.7);
z-index: 9999;
font-size: var(--fontSize60);
font-weight: bold;
display: flex;
align-items: center;
justify-content: center;
}
.nothing {
padding: var(--fontSize100);
text-align: center;
color: #999;
}
/**
* @file 客户档案选择弹框:分页拉取工单客户列表,不调 setData 外的页面实例。
*/
import api from '../../api/api.js'
import api from '~/api/api.js'
import {
DEFAULT_PAGE_SIZE,
canLoadMorePage,
......
......@@ -19,7 +19,7 @@
</span>
<span class="phone">{{item.customer.customerPhone}}</span>
<view class="icon">
<image src="../images/choose.png" />
<image src="/components/images/choose.png" />
</view>
</view>
</block>
......
/* components/CarBrands/CarBrands.wxss */
.car-brands-box {
width: calc(100% + var(--fontSize64));
height: 100%;
margin-left: calc(-1 * var(--fontSize32));
}
.car-brands {
height: calc(100% - var(--fontSize104));
position: relative;
/* display: flex; */
}
.label {
padding-left: var(--fontSize32);
line-height: var(--fontSize88);
}
.labelName {
font-size: var(--fontSize32);
color: #333333;
padding-right: var(--fontSize20);
}
.text-hide {
/* display: inline-block; */
/* width: var(--fontSize200); */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
/* line-height: var(--fontSize37); */
}
.labelPhone {
font-size: var(--fontSize24);
color: #999999;
}
.y-center {
display: flex;
align-items: center;
}
.list {
box-sizing: border-box;
height: var(--fontSize88);
/* padding-left: var(--fontSize32); */
margin: 0 var(--fontSize32) 0 var(--fontSize92);
font-weight: 700;
border-top: var(--fontSize2) solid #EBEDF0;
}
.list .name {
/* flex: 4; */
max-width: var(--fontSize150);
}
.list .carType {
/* flex: 10; */
display: flex;
align-items: center;
margin-left: 15px;
max-width: var(--fontSize300);
}
.cartypeLabel {
flex: 1;
}
.list .phone {
/* flex: 5; */
margin-left: auto;
}
.child {
font-weight: normal;
/* padding-left: var(--fontSize96); */
font-size: var(--fontSize28);
/* color: #888888; */
position: relative;
color: #333333;
}
.child.active {
color: #347BFF;
}
.child.title {
color: #282829;
padding-left: var(--fontSize64);
/* color: #347BFF; */
}
.child .icon {
display: none;
width: var(--fontSize32);
height: var(--fontSize32);
position: absolute;
top: 50%;
left: calc(-1 * var(--fontSize46));
transform: translateY(-50%);
}
.child.active .icon {
display: block;
}
@keyframes show-side-bar {
0% {
opacity: 0;
right: -100%;
}
100% {
opacity: 1;
right: 0;
}
}
.tips {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: var(--fontSize140);
height: var(--fontSize140);
border-radius: 50%;
color: #fff;
background: rgba(153, 153, 153, 0.7);
z-index: 9999;
font-size: var(--fontSize60);
font-weight: bold;
display: flex;
align-items: center;
justify-content: center;
}
.nothing {
padding: var(--fontSize100);
text-align: center;
color: #999;
}
.list-nothing {
padding: var(--fontSize32) 0 var(--fontSize48);
text-align: center;
font-size: var(--fontSize24);
color: #999;
}
\ No newline at end of file
/* components/CarBrands/CarBrands.wxss */
.car-brands-box {
width: calc(100% + var(--fontSize64));
height: 100%;
margin-left: calc(-1 * var(--fontSize32));
}
.car-brands {
height: calc(100% - var(--fontSize104));
position: relative;
/* display: flex; */
}
.label {
padding-left: var(--fontSize32);
line-height: var(--fontSize88);
}
.labelName {
font-size: var(--fontSize32);
color: #333333;
padding-right: var(--fontSize20);
}
.text-hide {
/* display: inline-block; */
/* width: var(--fontSize200); */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
/* line-height: var(--fontSize37); */
}
.labelPhone {
font-size: var(--fontSize24);
color: #999999;
}
.y-center {
display: flex;
align-items: center;
}
.list {
box-sizing: border-box;
height: var(--fontSize88);
/* padding-left: var(--fontSize32); */
margin: 0 var(--fontSize32) 0 var(--fontSize92);
font-weight: 700;
border-top: var(--fontSize2) solid #EBEDF0;
}
.list .name {
/* flex: 4; */
max-width: var(--fontSize150);
}
.list .carType {
/* flex: 10; */
display: flex;
align-items: center;
margin-left: 15px;
max-width: var(--fontSize300);
}
.cartypeLabel {
flex: 1;
}
.list .phone {
/* flex: 5; */
margin-left: auto;
}
.child {
font-weight: normal;
/* padding-left: var(--fontSize96); */
font-size: var(--fontSize28);
/* color: #888888; */
position: relative;
color: #333333;
}
.child.active {
color: #347BFF;
}
.child.title {
color: #282829;
padding-left: var(--fontSize64);
/* color: #347BFF; */
}
.child .icon {
display: none;
width: var(--fontSize32);
height: var(--fontSize32);
position: absolute;
top: 50%;
left: calc(-1 * var(--fontSize46));
transform: translateY(-50%);
}
.child.active .icon {
display: block;
}
@keyframes show-side-bar {
0% {
opacity: 0;
right: -100%;
}
100% {
opacity: 1;
right: 0;
}
}
.tips {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: var(--fontSize140);
height: var(--fontSize140);
border-radius: 50%;
color: #fff;
background: rgba(153, 153, 153, 0.7);
z-index: 9999;
font-size: var(--fontSize60);
font-weight: bold;
display: flex;
align-items: center;
justify-content: center;
}
.nothing {
padding: var(--fontSize100);
text-align: center;
color: #999;
}
.list-nothing {
padding: var(--fontSize32) 0 var(--fontSize48);
text-align: center;
font-size: var(--fontSize24);
color: #999;
}
......@@ -197,4 +197,4 @@ Component({
this.initDate()
},
},
})
\ No newline at end of file
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
}
......@@ -35,4 +35,4 @@
</view>
</view>
</view>
</block>
\ No newline at end of file
</block>
......@@ -126,4 +126,4 @@
display: flex;
justify-content: center;
align-items: center;
}
\ No newline at end of file
}
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
}
/* components/Goods/Goods.wxss */
/* 商品弹层布局(与 tabWorkOrder Coupon 组件独立维护,勿 @import) */
.coupon-box {
width: calc(100% + var(--fontSize64));
height: 100%;
margin-left: calc(-1 * var(--fontSize32));
}
.coupon {
height: calc(100% - var(--fontSize104));
}
.box {
border-bottom: var(--fontSize2) solid #EBEDF0;
padding-left: 0;
}
.item {
border-top: var(--fontSize2) solid #EBEDF0;
height: var(--fontSize84);
display: flex;
align-items: center;
font-size: var(--fontSize28);
color: #888888;
position: relative;
justify-content: space-between;
padding-right: var(--fontSize32);
width: calc(100% - var(--fontSize130));
}
.title .tips {
font-size: var(--fontSize24);
color: #999999;
}
.item .value {
width: 100%;
display: flex;
justify-content: space-between;
}
.item .labelWidth {
width: calc(100% - var(--fontSize180));
}
.item .value .name {
max-width: 85%;
min-width: 0;
flex: 1;
}
.item .value .name.goods-name {
display: flex;
align-items: center;
flex-wrap: wrap;
overflow: hidden;
}
.item .value .name .goods-name-with-icon {
display: flex;
align-items: center;
flex: 0 1 auto;
max-width: 100%;
min-width: 0;
}
.item .value .name .goods-name-text {
flex: 0 1 auto;
min-width: 0;
}
.item .value .name .marketing-icon {
width: var(--fontSize56);
height: var(--fontSize28);
flex-shrink: 0;
margin-left: var(--fontSize8);
}
.item .value .name .warning_text {
color: #F24724;
margin-left: var(--fontSize10);
font-size: var(--fontSize22);
}
.item .value .textWidth {
max-width: 100%;
}
.item .value .last {
max-width: 15%;
}
.item .value .price {
color: #347BFF;
}
.item .control {
display: flex;
align-items: center;
}
.item .control .minus,
.item .control .add {
width: var(--fontSize44);
height: var(--fontSize44);
color: #347BFF;
background: #F7F7F7;
border-radius: var(--fontSize6);
display: flex;
align-items: center;
justify-content: center;
font-size: var(--fontSize32);
font-weight: 700;
}
.item .control .input {
width: var(--fontSize72);
height: var(--fontSize40);
text-align: center;
font-size: var(--fontSize28);
color: #333333;
margin: 0 var(--fontSize5);
}
.disableSelect {
opacity: 0.4;
}
.choose {
width: var(--fontSize32);
height: var(--fontSize32);
margin: 0 var(--fontSize32);
}
.choose .arc {
width: 100%;
height: 100%;
border: var(--fontSize2) solid #979797;
border-radius: 100%;
box-sizing: border-box;
}
.nothing {
padding: var(--fontSize100);
text-align: center;
color: #999;
}
.itemBox {
display: flex;
align-items: center;
}
.itemBox .item {
flex: 1;
}
.specification {
background: #F7F7F7;
border-radius: 16rpx 16rpx 0 0;
width: calc(100% - var(--fontSize80));
margin: var(--fontSize9) 0 var(--fontSize32) var(--fontSize52);
}
.picker {
display: flex;
flex-direction: row-reverse;
height: var(--fontSize80);
line-height: var(--fontSize80);
text-align: right;
}
.placeholder {
font-weight: 400;
font-size: var(--fontSize28);
color: #B6B6B8;
}
.arrow {
width: var(--fontSize28);
height: var(--fontSize26);
margin-top: var(--fontSize26);
flex-shrink: 0;
}
/* components/Goods/Goods.wxss */
/* 商品弹层布局(与 tabWorkOrder Coupon 组件独立维护,勿 @import) */
.coupon-box {
width: calc(100% + var(--fontSize64));
height: 100%;
margin-left: calc(-1 * var(--fontSize32));
}
.coupon {
height: calc(100% - var(--fontSize104));
}
.box {
border-bottom: var(--fontSize2) solid #EBEDF0;
padding-left: 0;
}
.item {
border-top: var(--fontSize2) solid #EBEDF0;
height: var(--fontSize84);
display: flex;
align-items: center;
font-size: var(--fontSize28);
color: #888888;
position: relative;
justify-content: space-between;
padding-right: var(--fontSize32);
width: calc(100% - var(--fontSize130));
}
.title .tips {
font-size: var(--fontSize24);
color: #999999;
}
.item .value {
width: 100%;
display: flex;
justify-content: space-between;
}
.item .labelWidth {
width: calc(100% - var(--fontSize180));
}
.item .value .name {
max-width: 85%;
min-width: 0;
flex: 1;
}
.item .value .name.goods-name {
display: flex;
align-items: center;
flex-wrap: wrap;
overflow: hidden;
}
.item .value .name .goods-name-with-icon {
display: flex;
align-items: center;
flex: 0 1 auto;
max-width: 100%;
min-width: 0;
}
.item .value .name .goods-name-text {
flex: 0 1 auto;
min-width: 0;
}
.item .value .name .marketing-icon {
width: var(--fontSize56);
height: var(--fontSize28);
flex-shrink: 0;
margin-left: var(--fontSize8);
}
.item .value .name .warning_text {
color: #F24724;
margin-left: var(--fontSize10);
font-size: var(--fontSize22);
}
.item .value .textWidth {
max-width: 100%;
}
.item .value .last {
max-width: 15%;
}
.item .value .price {
color: #347BFF;
}
.item .control {
display: flex;
align-items: center;
}
.item .control .minus,
.item .control .add {
width: var(--fontSize44);
height: var(--fontSize44);
color: #347BFF;
background: #F7F7F7;
border-radius: var(--fontSize6);
display: flex;
align-items: center;
justify-content: center;
font-size: var(--fontSize32);
font-weight: 700;
}
.item .control .input {
width: var(--fontSize72);
height: var(--fontSize40);
text-align: center;
font-size: var(--fontSize28);
color: #333333;
margin: 0 var(--fontSize5);
}
.disableSelect {
opacity: 0.4;
}
.choose {
width: var(--fontSize32);
height: var(--fontSize32);
margin: 0 var(--fontSize32);
}
.choose .arc {
width: 100%;
height: 100%;
border: var(--fontSize2) solid #979797;
border-radius: 100%;
box-sizing: border-box;
}
.nothing {
padding: var(--fontSize100);
text-align: center;
color: #999;
}
.itemBox {
display: flex;
align-items: center;
}
.itemBox .item {
flex: 1;
}
.specification {
background: #F7F7F7;
border-radius: 16rpx 16rpx 0 0;
width: calc(100% - var(--fontSize80));
margin: var(--fontSize9) 0 var(--fontSize32) var(--fontSize52);
}
.picker {
display: flex;
flex-direction: row-reverse;
height: var(--fontSize80);
line-height: var(--fontSize80);
text-align: right;
}
.placeholder {
font-weight: 400;
font-size: var(--fontSize28);
color: #B6B6B8;
}
.arrow {
width: var(--fontSize28);
height: var(--fontSize26);
margin-top: var(--fontSize26);
flex-shrink: 0;
}
<wxs src="/components/Goods/index.wxs" module="filter" />
<wxs src="/tabWorkOrder/components/Goods/index.wxs" module="filter" />
<popup show="{{ show }}" title="选择商品" bindconfirm="confirm" bindcancel="cancel">
<view class="coupon-box">
<search-input bindsearch="searchGoods" value="{{ keyWord }}" />
......
/**
* @file 全局商品组件 wxs
* 用法:<wxs src="/components/Goods/index.wxs" module="filter" />
* 用法:<wxs src="/tabWorkOrder/components/Goods/index.wxs" module="filter" />
*
* replaceItemText:将商品名中的 ;~; 分隔符显示为空格
* getImageSrc:单选按钮图(带时间戳防缓存)
......@@ -11,7 +11,7 @@ var replaceItemText = function (item) {
}
var getImageSrc = function (active) {
var baseImagePath = active ? '../images/radio.png' : '../images/radio_icon.png';
var baseImagePath = active ? '/components/images/radio.png' : '/components/images/radio_icon.png';
var timestamp = Date.now(); // 使用 Date.now() 获取当前时间戳
return baseImagePath + '?t=' + timestamp; // 使用字符串拼接
}
......
......@@ -161,4 +161,4 @@ Component({
externalClasses: [
'custom-class'
]
});
\ No newline at end of file
});
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
"component": true,
"usingComponents": {}
}
......@@ -21,4 +21,4 @@
</view>
</view>
</view>
<!--components/InventoryInfo/InventoryInfo.wxml-->
\ No newline at end of file
<!--components/InventoryInfo/InventoryInfo.wxml-->
// components/OrderPopup/OrderPopup.js
import qrcode from '~/utils/lib/wxqrcode'
import qrcode from '../../utils/wxqrcode'
import api from '~/api/api.js'
import { getSystemInfoSync } from '~/utils/systemInfo'
Component({
......
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
"component": true,
"usingComponents": {}
}
/* components/Qrbox.wxss */
.qr-box {
display: flex;
justify-content: center;
align-items: center;
min-height: var(--fontSize400);
margin-bottom: var(--fontSize14);
}
.qr-box .qrImg {
width: var(--fontSize400);
height: var(--fontSize400);
display: inline-block;
}
.loadingBox {
width: var(--fontSize400);
height: var(--fontSize400);
position: relative;
}
.loader {
border-top:0.2em solid rgba(0,0,0,0.1);
border-right:0.2em solid rgba(0,0,0,0.1);
border-bottom:0.2em solid rgba(0,0,0,0.1);
border-left:0.2em solid #555;
transform:translateZ(0);
animation:loader 500ms infinite linear;
transition:all 500ms ease;
}
.loader,.loader:after {
border-radius:50%;
width:1.5em;
height:1.5em;
}
@keyframes loader {
0% {
-webkit-transform:rotate(0deg);
transform:rotate(0deg);
}
100% {
-webkit-transform:rotate(360deg);
transform:rotate(360deg);
}
}
\ No newline at end of file
/* components/Qrbox.wxss */
.qr-box {
display: flex;
justify-content: center;
align-items: center;
min-height: var(--fontSize400);
margin-bottom: var(--fontSize14);
}
.qr-box .qrImg {
width: var(--fontSize400);
height: var(--fontSize400);
display: inline-block;
}
.loadingBox {
width: var(--fontSize400);
height: var(--fontSize400);
position: relative;
}
.loader {
border-top:0.2em solid rgba(0,0,0,0.1);
border-right:0.2em solid rgba(0,0,0,0.1);
border-bottom:0.2em solid rgba(0,0,0,0.1);
border-left:0.2em solid #555;
transform:translateZ(0);
animation:loader 500ms infinite linear;
transition:all 500ms ease;
}
.loader,.loader:after {
border-radius:50%;
width:1.5em;
height:1.5em;
}
@keyframes loader {
0% {
-webkit-transform:rotate(0deg);
transform:rotate(0deg);
}
100% {
-webkit-transform:rotate(360deg);
transform:rotate(360deg);
}
}
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
}
/* components/RemarkPopup/RemarkPopup.wxss */
.fixed-box {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 998;
perspective: 99999999px;
}
.fixed-bg {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
animation: show-bg .1s forwards .5s;
}
@keyframes show-bg {
0% {
background-color: rgba(0, 0, 0, 0);
}
100% {
background-color: rgba(0, 0, 0, .6);
}
}
.fixed-content {
position: absolute;
left: 50%;
top: 50%;
background: #FFFFFF;
border-radius: var(--fontSize20);
width: var(--fontSize622);
animation: show-modal .5s forwards;
}
@keyframes show-modal {
0% {
opacity: 0;
transform: translate3d(-50%, -50%, -99999999px);
}
100% {
opacity: 1;
transform: translate3d(-50%, -50%, 0);
}
}
.fixed-content .fixed-title {
height: var(--fontSize96);
font-size: var(--fontSize32);
color: #333333;
}
.fixed-date-box .fixed-body {
height: var(--fontSize360);
display: flex;
}
.fixed-content .fixed-footer {
height: var(--fontSize96);
display: flex;
align-items: center;
position: relative;
}
.fixed-content .fixed-footer .text-center {
width: 50%;
height: 100%;
font-size: var(--fontSize32);
color: #333333;
}
.fixed-content .fixed-footer .fixed-confirm {
color: #347BFF;
}
.fixed-content .fixed-footer::after {
background-color: #EBEDF0;
width: var(--fontSize1);
height: 100%;
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
content: '';
}
.fixed-remark-box .fixed-body{
padding: var(--fontSize30) 0 var(--fontSize72);
}
.fixed-remark {
background: #F4F5F7;
border: var(--fontSize2) solid #EFF0F2;
border-radius: var(--fontSize12);
width: var(--fontSize552);
height: var(--fontSize260);
box-sizing: border-box;
padding: var(--fontSize24) var(--fontSize46);
animation: show-remark .1s forwards .4s;
opacity: 0;
}
@keyframes show-remark {
0%{
opacity: 0;
}
100%{
opacity: 1;
}
}
.text-center{
display: flex;
align-items: center;
justify-content: center;
}
\ No newline at end of file
/* components/RemarkPopup/RemarkPopup.wxss */
.fixed-box {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 998;
perspective: 99999999px;
}
.fixed-bg {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
animation: show-bg .1s forwards .5s;
}
@keyframes show-bg {
0% {
background-color: rgba(0, 0, 0, 0);
}
100% {
background-color: rgba(0, 0, 0, .6);
}
}
.fixed-content {
position: absolute;
left: 50%;
top: 50%;
background: #FFFFFF;
border-radius: var(--fontSize20);
width: var(--fontSize622);
animation: show-modal .5s forwards;
}
@keyframes show-modal {
0% {
opacity: 0;
transform: translate3d(-50%, -50%, -99999999px);
}
100% {
opacity: 1;
transform: translate3d(-50%, -50%, 0);
}
}
.fixed-content .fixed-title {
height: var(--fontSize96);
font-size: var(--fontSize32);
color: #333333;
}
.fixed-date-box .fixed-body {
height: var(--fontSize360);
display: flex;
}
.fixed-content .fixed-footer {
height: var(--fontSize96);
display: flex;
align-items: center;
position: relative;
}
.fixed-content .fixed-footer .text-center {
width: 50%;
height: 100%;
font-size: var(--fontSize32);
color: #333333;
}
.fixed-content .fixed-footer .fixed-confirm {
color: #347BFF;
}
.fixed-content .fixed-footer::after {
background-color: #EBEDF0;
width: var(--fontSize1);
height: 100%;
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
content: '';
}
.fixed-remark-box .fixed-body{
padding: var(--fontSize30) 0 var(--fontSize72);
}
.fixed-remark {
background: #F4F5F7;
border: var(--fontSize2) solid #EFF0F2;
border-radius: var(--fontSize12);
width: var(--fontSize552);
height: var(--fontSize260);
box-sizing: border-box;
padding: var(--fontSize24) var(--fontSize46);
animation: show-remark .1s forwards .4s;
opacity: 0;
}
@keyframes show-remark {
0%{
opacity: 0;
}
100%{
opacity: 1;
}
}
.text-center{
display: flex;
align-items: center;
justify-content: center;
}
......@@ -157,4 +157,4 @@
display: flex;
align-items: center;
justify-content: center;
}
\ No newline at end of file
}
......@@ -6,7 +6,7 @@
<view class="item-wrap {{i.active?'active':''}}" wx:for="{{goodsData.multipleSpecificationsGoods.skuGoodsList}}" wx:key="ind" wx:for-index="index" wx:for-item="i">
<view class="icon" catchtap="choose" data-index="{{index}}" data-item="{{i}}">
<block wx:if="{{i.active}}">
<image src="./images/radio.png" />
<image src="/components/images/radio.png" />
</block>
<block wx:else>
<view class="arc" />
......@@ -41,4 +41,4 @@
<view class="cancel btn text-center" bind:tap="hidePopup">取消</view>
<view class="confirm btn text-center" bind:tap="confirm">确认</view>
</view>
</van-popup>
\ No newline at end of file
</van-popup>
......@@ -31,7 +31,7 @@
>
<view class="checked_img">
<block wx:if="{{ multiple }}">
<image src="{{ item.active ? '../images/radio.png' : '../images/radio_icon.png' }}" />
<image src="{{ item.active ? '/components/images/radio.png' : '/components/images/radio_icon.png' }}" />
</block>
<block wx:else>
<image wx:if="{{ item.active }}" src="{{ IMG_URL }}checked.png"></image>
......@@ -69,4 +69,4 @@
</view>
</view>
</view>
</popup>
\ No newline at end of file
</popup>
......@@ -144,3 +144,4 @@ export function buildConfirmPayload({ artificerSelectObj, activeArr, idKey, depu
}
return { ok: true, payload }
}
{
"component": true,
"usingComponents": {
"area-operations-modal": "/components/areaOperationsModal/areaOperationsModal"
"area-operations-modal": "/tabWorkOrder/components/areaOperationsModal/areaOperationsModal"
}
}
\ No newline at end of file
}
......@@ -27,4 +27,4 @@ Component({
this.triggerEvent('close')
}
}
})
\ No newline at end of file
})
......@@ -69,4 +69,4 @@
font-size: var(--fontSize36);
color: #FFFFFF;
margin-top: var(--fontSize48);
}
\ No newline at end of file
}
......@@ -7,4 +7,4 @@
<view class="tipTxt">未配置区域运营,请联系总部处理</view>
<view class="btn" bindtap="handleClose">知道了</view>
</view>
</view>
\ No newline at end of file
</view>
// tabWorkOrder/pages/createOrder/createOrderComponents/Popup/Popup.js
import { CLOSE_ICON_URL } from '../../utils/imageBase.js'
import { CLOSE_ICON_URL } from '~/utils/imageBase.js'
Component({
externalClasses: ["custom-class"],
options: {
......@@ -49,4 +49,4 @@ Component({
}
},
}
})
\ No newline at end of file
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
}
......@@ -5,4 +5,4 @@
</view>
<image class="closeIcon" wx:if="{{tipsProps.type == 1}}" bindtap="tapCallback" data-type="{{tipsProps.type}}" src="{{tipsProps.iconUrl || defaultCloseIconUrl}}" />
<view class="btn" wx:if="{{tipsProps.type == 2}}" bindtap="tapCallback" data-type="{{tipsProps.type}}">{{tipsProps.typeText}}</view>
</view>
\ No newline at end of file
</view>
......@@ -45,4 +45,4 @@
margin-left: auto;
border: 1px solid #F24724;
border-radius: var(--fontSize28);
}
\ No newline at end of file
}
{
"navigationBarTitleText": "工单确认",
"usingComponents": {
"artificer-select-popup": "/components/TechnicianSelectPopup/TechnicianSelectPopup",
"date-select":"/components/DateSelect/dateSelect",
"artificer-select-popup": "/tabWorkOrder/components/TechnicianSelectPopup/TechnicianSelectPopup",
"date-select":"/tabWorkOrder/components/DateSelect/dateSelect",
"order-popup": "/tabWorkOrder/components/OrderPopup/OrderPopup",
"calendar": "/components/CalendarMonth/CalendarMonth"
}
......
{
"navigationBarTitleText": "新增工单",
"usingComponents": {
"car-brands": "/components/CarBrands/CarBrands",
"car-brands": "/tabWorkOrder/components/CarBrands/CarBrands",
"merchant-staff-picker": "/tabWorkOrder/pages/createOrder/components/merchant-staff-picker/merchant-staff-picker",
"coupon": "/tabWorkOrder/components/Coupon/Coupon",
"goods": "/components/Goods/Goods",
"sku-goods": "/components/SkuGoods/Goods",
"customerInfo": "/components/CustomerInfo/CustomerInfo",
"goods": "/tabWorkOrder/components/Goods/Goods",
"sku-goods": "/tabWorkOrder/components/SkuGoods/Goods",
"customerInfo": "/tabWorkOrder/components/CustomerInfo/CustomerInfo",
"sub-shop-merchant": "/tabWorkOrder/components/subShopMerchant/subShopMerchant",
"van-picker": "@vant/weapp/picker/index",
"van-popup": "@vant/weapp/popup/index",
......@@ -15,6 +15,6 @@
"order-goods-row": "/tabWorkOrder/pages/createOrder/components/OrderGoodsRow/order-goods-row",
"recording-order-popup": "/tabIndex/components/recordingOrderPopup/recordingOrderPopup",
"study-permission-modal": "/components/studyPermissionModal/studyPermissionModal",
"remark-popup": "/components/RemarkPopup/RemarkPopup"
"remark-popup": "/tabWorkOrder/components/RemarkPopup/RemarkPopup"
}
}
......@@ -2,13 +2,13 @@
"navigationBarTitleText": "工单详情",
"enablePullDownRefresh": true,
"usingComponents": {
"artificer-select-popup": "/components/TechnicianSelectPopup/TechnicianSelectPopup",
"artificer-select-popup": "/tabWorkOrder/components/TechnicianSelectPopup/TechnicianSelectPopup",
"film-roll-no-popup": "/tabWorkOrder/components/FilmRollNoPopup/FilmRollNoPopup",
"ConstructionDetailModal": "/tabWorkOrder/components/ConstructionDetailModal/ConstructionDetailModal",
"study-permission-modal": "/components/studyPermissionModal/studyPermissionModal",
"order-popup": "/tabWorkOrder/components/OrderPopup/OrderPopup",
"inventory-info": "/components/InventoryInfo/InventoryInfo",
"qr-box": "/components/Qrbox/Qrbox",
"tips-bottom": "/components/tipsBottom/index"
"inventory-info": "/tabWorkOrder/components/InventoryInfo/InventoryInfo",
"qr-box": "/tabWorkOrder/components/Qrbox/Qrbox",
"tips-bottom": "/tabWorkOrder/components/tipsBottom/index"
}
}
......@@ -1620,4 +1620,4 @@ var createQrCodeImg = function(text, options) {
// var module = {}; 需要注释这一行,否则微信小程序无法使用
module.exports = {
createQrCodeImg : createQrCodeImg
};
\ No newline at end of file
};
......@@ -95,20 +95,21 @@ test('packageWorkspace resolves to workspace pages and modules', () => {
)
})
test('gl-cust-form connects global registration with its workspace consumer', () => {
test('gl-cust-form is locally registered by its workspace consumer', () => {
const result = query('gl-cust-form', 3)
const componentId =
'component:packageWorkspace/components/GLCustForm/GLCustForm'
assert.ok(
result.directMatches.some(
(node) => node.id === 'component:components/GLCustForm/GLCustForm',
),
result.directMatches.some((node) => node.id === componentId),
)
assert.ok(
result.evidence.some(
(edge) =>
edge.type === 'usesComponent' &&
edge.evidence.path === 'app.json' &&
edge.to === 'component:components/GLCustForm/GLCustForm',
edge.evidence.path ===
'packageWorkspace/pages/supervisorDaily/supervisorDaily.json' &&
edge.to === componentId,
),
)
assert.ok(
......@@ -116,7 +117,11 @@ test('gl-cust-form connects global registration with its workspace consumer', ()
(edge) =>
edge.type === 'usesComponent' &&
nodeById.get(edge.from)?.domain === 'workspace' &&
edge.to === 'component:components/GLCustForm/GLCustForm',
edge.to === componentId,
),
)
assert.equal(
result.evidence.some((edge) => edge.evidence.path === 'app.json'),
false,
)
})
......@@ -9,7 +9,9 @@ const projectRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '
const script = path.join(projectRoot, 'scripts/check-migration-readiness.mjs');
function createFixture(options = {}) {
const fixtureRoot = mkdtempSync(path.join(projectRoot, '.migration-readiness-'));
const fixtureRoot = mkdtempSync(
path.join(projectRoot, 'tests', '.migration-readiness-'),
);
mkdirSync(path.join(fixtureRoot, 'docs'), { recursive: true });
mkdirSync(path.join(fixtureRoot, 'tests'), { recursive: true });
writeFileSync(path.join(fixtureRoot, 'docs/api-inventory.md'), 'API inventory');
......
......@@ -2,19 +2,17 @@ import assert from 'node:assert/strict'
import fs from 'node:fs'
import path from 'node:path'
import test from 'node:test'
import { fileURLToPath, pathToFileURL } from 'node:url'
import { fileURLToPath } from 'node:url'
import { areaList } from '../../packageWorkspace/utils/area-data.js'
import { analyzeMainPackage } from '../../scripts/main-package-size.mjs'
const projectRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..')
const analyzerPath = path.join(projectRoot, 'scripts/main-package-size.mjs')
const budgetBytes = 2_000_000
async function loadAnalyzer() {
test('physical main package stays below the guarded upload budget', () => {
assert.equal(fs.existsSync(analyzerPath), true, 'main package analyzer must exist')
return import(pathToFileURL(analyzerPath))
}
test('physical main package stays below the guarded upload budget', async () => {
const { analyzeMainPackage } = await loadAnalyzer()
const first = analyzeMainPackage({ rootDir: projectRoot })
const second = analyzeMainPackage({ rootDir: projectRoot })
......@@ -38,14 +36,23 @@ test('heavy libraries and single-subpackage components are physically isolated',
['components/InventoryInfo', 'tabWorkOrder/components/InventoryInfo'],
['components/Qrbox', 'tabWorkOrder/components/Qrbox'],
['components/RemarkPopup', 'tabWorkOrder/components/RemarkPopup'],
['components/SkuGoods', 'tabWorkOrder/components/SkuGoods'],
['components/SkuGoods/Goods.js', 'tabWorkOrder/components/SkuGoods'],
['components/TechnicianSelectPopup', 'tabWorkOrder/components/TechnicianSelectPopup'],
['components/tipsBottom', 'tabWorkOrder/components/tipsBottom'],
['components/areaOperationsModal', 'tabWorkOrder/components/areaOperationsModal'],
]
for (const [oldPath, newPath] of movedPaths) {
assert.equal(fs.existsSync(path.join(projectRoot, oldPath)), false, oldPath)
const oldEntry = fs.statSync(path.join(projectRoot, oldPath), { throwIfNoEntry: false })
if (oldEntry?.isDirectory()) {
assert.equal(
fs.readdirSync(path.join(projectRoot, oldPath)).length,
0,
`${oldPath} must not contain main-package files`,
)
} else {
assert.equal(oldEntry, undefined, oldPath)
}
assert.equal(fs.existsSync(path.join(projectRoot, newPath)), true, newPath)
}
})
......@@ -54,6 +61,9 @@ test('root entries no longer pull workspace-only form and area data into main',
const appSource = fs.readFileSync(path.join(projectRoot, 'app.js'), 'utf8')
const appConfig = JSON.parse(fs.readFileSync(path.join(projectRoot, 'app.json'), 'utf8'))
const packageJson = JSON.parse(fs.readFileSync(path.join(projectRoot, 'package.json'), 'utf8'))
const projectConfig = JSON.parse(
fs.readFileSync(path.join(projectRoot, 'project.config.json'), 'utf8'),
)
const supervisorConfig = JSON.parse(
fs.readFileSync(
path.join(projectRoot, 'packageWorkspace/pages/supervisorDaily/supervisorDaily.json'),
......@@ -65,11 +75,33 @@ test('root entries no longer pull workspace-only form and area data into main',
assert.equal(appConfig.usingComponents['gl-cust-form'], undefined)
assert.equal(packageJson.dependencies['@vant/area-data'], undefined)
assert.equal(
projectConfig.packOptions.ignore.some(
item =>
item.type === 'folder' &&
item.value === 'miniprogram_npm/@vant/area-data',
),
true,
)
assert.equal(
supervisorConfig.usingComponents['gl-cust-form'],
'../../components/GLCustForm/GLCustForm',
)
})
test('workspace-local area data preserves the Vant area payload contract', () => {
const licensePath = path.join(projectRoot, 'packageWorkspace/utils/area-data.LICENSE')
assert.deepEqual(Object.keys(areaList).sort(), [
'city_list',
'county_list',
'province_list',
])
assert.equal(areaList.province_list[110000], '北京市')
assert.equal(areaList.city_list[440300], '深圳市')
assert.equal(areaList.county_list[440305], '南山区')
assert.match(fs.readFileSync(licensePath, 'utf8'), /MIT License/)
})
test('subpackage consumers no longer import the former main-package paths', () => {
const studyResult = fs.readFileSync(
path.join(projectRoot, 'packageStudy/pages/aiCheck/result/result.js'),
......
import wxqrcode from '~/utils/lib/wxqrcode.js'
/**
* 微信校验通知类工具封装
*/
......@@ -105,55 +104,6 @@ const previewImage = params => {
wx.previewImage(params)
}
export function handleCopy(url) {
// var { idx } = e.currentTarget.dataset
// var currentItem = this.data.orderObj.activityList[idx]
// var qr = wxqrcode.createQrCodeImg(url)
const base64src = function (base64data) {
return new Promise((resolve, reject) => {
const [a, format, bodyData] =
/data:image\/(\w+);base64,(.*)/.exec(base64data) || []
if (!format) reject(new Error('ERROR_BASE64SRC_PARSE'))
const filePath = `${wx.env.USER_DATA_PATH}/tmp_base64src.${format}`
const buffer = wx.base64ToArrayBuffer(bodyData)
wx.getFileSystemManager().writeFile({
filePath,
data: buffer,
encoding: 'binary',
success() {
resolve(filePath)
},
fail() {
reject(new Error('ERROR_BASE64SRC_WRITE'))
}
})
})
}
return new Promise((resolve, reject) => {
let qr = wxqrcode.createQrCodeImg(url)
resolve(qr)
// base64src(qr)
// .then(res => {
// console.log(res)
// // return res
// resolve(res)
// // wx.getImageInfo({
// // src: res,
// // success(obj) {
// // return obj.path
// // // wx.showShareImageMenu({
// // // path: obj.path
// // // })
// // },
// // fail() {}
// // })
// })
// .catch(err => {
// reject(err)
// })
})
}
/**获取节点信息
* name(id获取class)
* callBack 回调函数
......@@ -259,8 +209,7 @@ const wxApi = {
getViewInfo,
wxShowToast,
getDeviceSize,
isFullSucreen,
handleCopy
isFullSucreen
}
export default wxApi
......@@ -2,11 +2,6 @@
# yarn lockfile v1
"@vant/area-data@^1.5.1":
version "1.5.2"
resolved "https://registry.npmjs.org/@vant/area-data/-/area-data-1.5.2.tgz"
integrity sha512-Gtxgt6Rjgopt6234ANpO0bBsSwtjZ23lBlVDHIy8Mi2NJqyoj1vgVWY0dri8/2LCZAWzQ6EnwRrUVViUZ0cvMA==
"@vant/weapp@^1.10.24":
version "1.11.7"
resolved "https://registry.npmjs.org/@vant/weapp/-/weapp-1.11.7.tgz"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!