From 345ee6dbb0efdd01423f91c9fedff59bbee6e622 Mon Sep 17 00:00:00 2001 From: iuu <2167162990@qq.com> Date: Fri, 16 Jan 2026 03:58:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=97=A0=E7=94=A8=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/config.ts | 37 - api/control.ts | 92 -- api/goods.ts | 60 - api/house_goods.ts | 171 -- api/house_order.ts | 183 --- api/house_request.ts | 100 -- api/order.ts | 129 -- api/request.ts | 14 +- api/user.ts | 31 - components/da-tree/changelog.md | 196 --- components/da-tree/index.vue | 1160 -------------- components/da-tree/props.ts | 197 --- components/da-tree/readme.md | 310 ---- components/da-tree/utils.ts | 150 -- .../index-custom-navigationbar/index.vue | 139 -- .../index-custom-navigationbar/index.vue- | 132 -- components/inlineSelect/inlineSelect.vue | 341 ---- components/op-drop-down/changelog.md | 7 - .../components/op-cascader/op-cascader.vue | 244 --- .../op-dateTime-picker/op-dateTime-picker.vue | 300 ---- .../components/op-drop-down/op-drop-down.vue | 304 ---- components/op-drop-down/package.json | 88 - components/op-drop-down/readme.md | 167 -- pages.json | 14 +- pages/cart/index.vue | 342 ---- pages/control/goods/index.vue- | 429 ----- pages/index/index - 副本.vue | 283 ---- pages/index/index.vue- | 1427 ----------------- pages/index/index.vue-bac | 717 --------- pages/index/orderAdd copy.vue | 618 ------- pages/mall/detail.vue | 379 ----- pages/mall/houseDetail.vue | 579 ------- pages/order/index.vue | 20 +- types/contorl.d.ts | 40 - types/tabbar.d.ts | 8 - .../.sourcemap/mp-weixin/api/request.js.map | 2 +- .../dist/dev/.sourcemap/mp-weixin/app.js.map | 2 +- .../mp-weixin/pages/mine/index.js.map | 2 +- .../mp-weixin/pages/order/index.js.map | 2 +- .../.sourcemap/mp-weixin/utils/helper.js.map | 2 +- unpackage/dist/dev/mp-weixin/app.js | 1 - unpackage/dist/dev/mp-weixin/app.json | 3 +- .../dist/dev/mp-weixin/pages/mine/index.js | 4 +- .../dist/dev/mp-weixin/pages/order/index.js | 36 +- .../dist/dev/mp-weixin/pages/order/index.json | 1 - .../dist/dev/mp-weixin/pages/order/index.wxml | 2 +- unpackage/dist/dev/mp-weixin/utils/helper.js | 2 +- utils/helper.ts | 100 +- 48 files changed, 100 insertions(+), 9467 deletions(-) delete mode 100644 api/config.ts delete mode 100644 api/control.ts delete mode 100644 api/goods.ts delete mode 100644 api/house_goods.ts delete mode 100644 api/house_order.ts delete mode 100644 api/house_request.ts delete mode 100644 api/order.ts delete mode 100644 api/user.ts delete mode 100644 components/da-tree/changelog.md delete mode 100644 components/da-tree/index.vue delete mode 100644 components/da-tree/props.ts delete mode 100644 components/da-tree/readme.md delete mode 100644 components/da-tree/utils.ts delete mode 100644 components/index-custom-navigationbar/index.vue delete mode 100644 components/index-custom-navigationbar/index.vue- delete mode 100644 components/inlineSelect/inlineSelect.vue delete mode 100644 components/op-drop-down/changelog.md delete mode 100644 components/op-drop-down/components/op-cascader/op-cascader.vue delete mode 100644 components/op-drop-down/components/op-dateTime-picker/op-dateTime-picker.vue delete mode 100644 components/op-drop-down/components/op-drop-down/op-drop-down.vue delete mode 100644 components/op-drop-down/package.json delete mode 100644 components/op-drop-down/readme.md delete mode 100644 pages/cart/index.vue delete mode 100644 pages/control/goods/index.vue- delete mode 100644 pages/index/index - 副本.vue delete mode 100644 pages/index/index.vue- delete mode 100644 pages/index/index.vue-bac delete mode 100644 pages/index/orderAdd copy.vue delete mode 100644 pages/mall/detail.vue delete mode 100644 pages/mall/houseDetail.vue delete mode 100644 types/contorl.d.ts delete mode 100644 types/tabbar.d.ts diff --git a/api/config.ts b/api/config.ts deleted file mode 100644 index 6783fa7..0000000 --- a/api/config.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { request } from './request'; - - - -// 获取配置 -export function fetchGetConfig() { - return request({ - url: '/config/get', // id : number - }); -} - - -// 设置配置 -export function fetchSetConfig(data : {}) { - return request({ - url: '/config/set', - data: data, - method: 'POST' - }) -} - -// 设置价格规则 -export function fetchSetPriceRules(data : {}) { - return request({ - url: '/config/setPriceRules', - data: data, - method: 'POST' - }) -} - - -// 获取价格规则 -export function fetchGetPriceRules() { - return request({ - url: '/config/getPriceRules', // id : number - }); -} diff --git a/api/control.ts b/api/control.ts deleted file mode 100644 index 87d8d24..0000000 --- a/api/control.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { request } from "./request"; -// import { EditGoodsParams } from "../types/contorl"; - - -// 根据串号搜索列表 -export function fetchGoodsListByGoodsNo(goods_no: string) { - return request({ - url: '/store.control/goodsListByGoodsNo', - data: { - goods_no: goods_no, - }, - }); -} - -// 编辑商品 -export function fetchControlEditGoods(form:{}) { - return request({ - url: '/store.control/editGoods', - data: form, - method: 'POST' - }) -} - - -// 工作台商品详情 -export function fetchControlGoodsDetail(id:number) { - return request({ - url: '/store.control/goodsDetail', - data: {id:id} - }) -} - -// // 获取配件详情 -// export function fetchControlPartsGoodsDetail(id:number) { -// return request({ -// url: '/parts.goods/detail', -// data: {id:id} -// }) -// } -// // 获取配件所属机型-机型选项 -// export function fetchControlPartsProducts() { -// return request({ -// url: '/parts.goods/products', -// // data: {id:id} -// }) -// } -// // 获取配件所属分类-分类选项 -// export function fetchControlPartsTypes() { -// return request({ -// url: '/parts.goods/types', -// // data: {id:id} -// }) -// } -// // 获取配件所属分类的子类 -// export function fetchControlPartsDegree(id:number) { -// return request({ -// url: '/parts.goods/filterDegree', -// data: {type_id:id} -// }) -// } - -// // 根据 分类 子类 机型 筛选配件 -// export function fetchControlPartsFilterGoods(params: {type_id: number;product_id?: number;degree_id?: number;}) { -// // 验证必填参数 -// if (params.type_id === undefined || params.type_id === null) { -// return Promise.reject(new Error('type_id 是必填参数')); -// } -// // 构建请求数据,只包含有值的字段 -// const requestData: Record = { -// type_id: params.type_id -// }; -// if (params.product_id !== undefined && params.product_id !== null) { -// requestData.product_id = params.product_id; -// } -// if (params.degree_id !== undefined && params.degree_id !== null) { -// requestData.degree_id = params.degree_id; -// } -// return request({ -// url: '/parts.goods/filterGoods', -// data: requestData -// }); -// } - - -// // 配件工作台-修改配件 -// export function editGoods(params:EditGoodsParams) { -// return request({ -// url: '/parts.goods/editGoods', -// data: params, -// method: 'POST' -// }) -// } \ No newline at end of file diff --git a/api/goods.ts b/api/goods.ts deleted file mode 100644 index 50c19a9..0000000 --- a/api/goods.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { request } from './request'; - - - - - -// 编辑商品 -export function fetchGoodsEdit(form:{}) { - return request({ - url: '/goods/edit', - data: form, - method: 'POST' - }) -} - - -// 商品详情 -export function fetchGoodsDetail(id:number) { - return request({ - url: '/goods/detail', - data: {goods_id:id} - }) -} - - - - - -// 新增商品 -export function fetchGoodsAdd(form:{}) { - return request({ - url: '/goods/add', - data: form, - method: 'POST' - }) -} - - - -// 筛选 -export function fetchFilterParmas(is_origin : number = 0) { - return request({ - url: '/goods/filterParams', - data: { - is_origin: is_origin - } - }) -} - - - - -// 首页机器列表 -export function fetchGoodsList(data : {}) { - return request({ - url: '/goods/lists', - data: data, - method: 'POST' - }); -} \ No newline at end of file diff --git a/api/house_goods.ts b/api/house_goods.ts deleted file mode 100644 index aa23e54..0000000 --- a/api/house_goods.ts +++ /dev/null @@ -1,171 +0,0 @@ -import { request } from './request'; -import { houseRequest } from './house_request'; - -// 仓库筛选 -export function houseFetchFilterParmas(is_origin : number = 0) { - return houseRequest({ - url: '/store.goods/filterParams', - data: { - is_origin: is_origin - } - }) -} - -export interface goodsListParams { - page ?: string; - pageSize ?: string; - price_sort ?: string; - degree_ids ?: string[]; // 新增的 ID 数组字段(假设是字符串数组) - product_ids ?: string[]; - search ?: string; - type_id ?: number; - brand_id ?: number; - [property : string] : any; -} - - -// 仓库机器列表 -export function houseFetchGoodsList(filter : goodsListParams) { - return houseRequest({ - url: '/store.goods/lists', - data: filter, - method: 'POST', - }); -} - - -// 仓库商品详情 -export function houseFetchGoodsDetail(id : number) { - return houseRequest({ - url: '/store.goods/detail', - data: { id: id }, - }); -} - -// 获取购物车商品列表 -export function houseFetchCartGoodsIds() { - return houseRequest({ - url: '/store.goods/cartGoodsIds', - }); -} - - -// 检测报告树 -export function fetchGoodsReportTags () { - return houseRequest({ - url:'/store.goods/reportTags', - }) -} - - - - - -// 添加购物车 -export function fetchAddCart(goods_id : number) { - return request({ - url: '/store.goods/addCart', - data: { goods_id: goods_id }, - }); -} - -// 删除购物车 -export function fetchDelCart(goods_id : number) { - return request({ - url: '/store.goods/delCart', - data: { goods_id: goods_id }, - }); -} - -// 获取购物车商品 -export function fetchCartList() { - return request({ - url: '/store.goods/cartList', - }); -} - - - - - - - - - - - - - - - - - - -// export interface PartsListParams { -// /** -// * 子类id -// */ -// degree_id ?: string; -// page ?: string; -// pageSize ?: string; -// /** -// * 配件机型id -// */ -// product_id ?: string; -// /** -// * 配件id -// */ -// type_id ?: string; -// [property : string] : any; -// } -// export function fetcPartsList(filter : PartsListParams) { -// return request({ -// url: '/parts.goods/filtergoodslist', -// data: filter, -// method: 'POST', -// }); -// } - -// export function fetchPartsDetail(id: number) { -// return request({ -// url: '/goods/detail', -// data: { id: id }, -// }); -// } - -// export function addPartsCart(goods_id : number) { -// return request({ -// url: '/parts.cart/addCart', -// data: { goods_id }, -// }); -// } -// export function incPartsCartNum(goods_id : number) { -// return request({ -// url: '/parts.cart/incNum', -// data: { goods_id }, -// }); -// } -// export function decPartsCartNum(goods_id : number) { -// return request({ -// url: '/parts.cart/decNum', -// data: { goods_id }, -// }); -// } -// export function setPartsCartNum(goods_id : number, quantity : number) { -// return request({ -// url: '/parts.cart/setNum', -// data: { goods_id, quantity }, -// }); -// } - -// export function delPartsCart(goods_id : number) { -// return request({ -// url: '/parts.cart/delCart', -// data: { goods_id }, -// }); -// } -// export function fetchPartsCartList() { -// return request({ -// url: '/parts.cart/cartList', -// }); -// } \ No newline at end of file diff --git a/api/house_order.ts b/api/house_order.ts deleted file mode 100644 index 07d86e1..0000000 --- a/api/house_order.ts +++ /dev/null @@ -1,183 +0,0 @@ -import config from '@/config'; - -import { houseRequest } from "./house_request"; - -// 保存远程收货地址 -export function houseFetchUpdateAddress(form : {}) { - // 设置默认参数 - const defaultParams = { - agent_id: config.wxapp_id, - address: {}, - }; - console.log(defaultParams); - console.log(form); - const requestParams = { - ...defaultParams, - ...form - }; - return houseRequest({ - url: '/store.api/updateAddress', - data: requestParams, - method: 'POST' - }) -} - - -// 仓库商品状态校验 -export function houseFetchCheckGoods(form : {}) { - // 设置默认参数 - const defaultParams = { - agent_id: config.wxapp_id, - goods_id: 0, - }; - console.log(defaultParams); - console.log(form); - const requestParams = { - ...defaultParams, - ...form - }; - return houseRequest({ - url: '/store.api/checkGoods', - data: requestParams, - method: 'POST' - }) -} - - -// 仓库订单预览 -export function houseFetchGoodsPreview(form : {}) { - // 设置默认参数 - const defaultParams = { - agent_id: config.wxapp_id, - goods_id: 0, - }; - console.log(defaultParams); - console.log(form); - const requestParams = { - ...defaultParams, - ...form - }; - return houseRequest({ - url: '/store.api/preview', - data: requestParams, - method: 'POST' - }) -} - - - -// 订单下单 -export function fetchOrderbuyNow(data : {}) { - return houseRequest({ - url: '/order/buyNow', - data: data, - method: 'POST' - }) -} - - - -// // 订单详情 -// export function fetchOrderDetail(id : Number) { -// return request({ -// url: '/order/detail', -// data: { id: id }, -// }) -// } - - - - - - - -// // 订单统计 -// export function fetchOrderTotalCount() { -// return request({ -// url: '/order/totalCount' -// }) -// } - - - - - - - - -// // 获取订单列表 -// interface orderListParams { -// page ?: number; -// pageSize ?: number; -// status ?: 'all' | 'payment' | 'delivery' | 'received' | 'finish'; -// goods_no ?: string; -// [key : string] : any; // 允许其他扩展参数 -// } - -// /** -// * 获取订单列表 -// * @param params 请求参数对象 -// * @returns Promise -// */ -// export function fetchOrderList(params : orderListParams = {}) { -// // 设置默认参数 -// const defaultParams = { -// page: 1, -// pageSize: 10, -// status: 'all', -// goods_no: '', -// }; - -// const requestParams = { -// ...defaultParams, -// ...params -// }; -// return request({ -// url: '/order/getList', -// method: 'GET', // 或 'POST' 根据实际需求 -// data: requestParams -// }); -// } - - - - - - - - -// // 取消订单 -// export function fetchCancelOrder(id : Number) { -// return request({ -// url: '/order/cancel', -// data: { id: id }, -// }) -// } - -// // 标记付款 -// export function fetchPayOrder(id : Number) { -// return request({ -// url: '/order/paid', -// data: { id: id }, -// }) -// } - -// // 标记发货 -// export function fetchDeliveryOrder(form : {}) { -// return request({ -// url: '/order/delivery', -// data: form, -// method: 'POST' -// }) -// } - - - - -// // 确认收货 -// export function fetchReceiptOrder(id : Number) { -// return request({ -// url: '/order/receipt', -// data: { id: id }, -// }) -// } \ No newline at end of file diff --git a/api/house_request.ts b/api/house_request.ts deleted file mode 100644 index acec09d..0000000 --- a/api/house_request.ts +++ /dev/null @@ -1,100 +0,0 @@ -// 针对仓库的Api接口 - - - -import config from '@/config'; -import { goToLoginPage } from '@/utils/helper'; - -// 定义请求参数接口 -interface Options { - url : string; // 请求路径(不包含基础URL) - method ?: 'GET' | 'POST'; // 请求方法,默认为GET - data ?: any; // POST请求体数据 - params ?: any; // GET请求参数(与data二选一) - dataType ?: string; // 返回数据格式,默认json - responseType ?: string; // 响应数据类型,默认text -} - -// 定义响应数据结构接口 -interface Response { - code : number; - msg ?: string; - data : any; -} - -// /** -// * 获取图片上传的完整URL -// * @returns {string} 完整的图片上传URL,包含基础URL、wxapp_id和token参数 -// */ -// export const getUploadImageUrl = () => { -// return config.api_base_url + '/store.upload/image' + '&wxapp_id=10001&token=' + uni.getStorageSync('token'); -// }; - -/** - * 封装uni.request的通用请求方法 - * @param {Options} options 请求配置项 - * @returns {Promise} 返回Promise对象 - * - * 功能说明: - * 1. 自动拼接基础URL和认证参数 - * 2. 统一处理登录状态(code=-1跳转登录页) - * 3. 统一处理错误提示(code=0显示Toast) - * 4. 成功时返回data字段(code=1) - */ -export const houseRequest = (options : Options) => { - return new Promise((resolve, reject) => { - uni.request({ - // 拼接完整请求URL(基础URL + 路径 + 固定参数) - url: config.house_api_base_url + options.url + '&wxapp_id=10001&token=' + uni.getStorageSync('token'), - - method: options.method || 'GET', // 默认GET方法 - data: options.data || options.params || {}, // 兼容data/params传参 - dataType: options.dataType || 'json', // 默认json格式 - responseType: options.responseType || 'text', // 默认text类型 - - // 请求成功回调 - success(res) { - const ret : Response = res.data; - // console.log(ret); - - // 状态码处理 - switch (ret.code) { - case -1: // 未登录状态 - goToLoginPage(); - break; - case 1: // 成功状态 - // console.log(options.url); - // if (options.url === '/parts.order/preview') { - // console.log('ressss', ret); - // resolve(ret); - // break; - // } - resolve(ret.data); // 返回data字段 - break; - case 0: // 失败状态 - // console.log(options.url); - // if (options.url === '/parts.order/preview') { - // console.log('ressss', ret); - // resolve(ret); - // break; - // } - uni.showToast({ - title: ret.msg || '操作失败', // 显示错误信息 - icon: 'none', // 不显示图标 - }); - break; - } - }, - - // 请求失败回调 - fail(err) { - uni.$emit('z-paging-error-emit'); - reject(err); // 返回错误对象 - uni.showToast({ - title: '网络请求失败', - icon: 'none', - }); - }, - }); - }); -}; \ No newline at end of file diff --git a/api/order.ts b/api/order.ts deleted file mode 100644 index 9202b05..0000000 --- a/api/order.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { request } from "./request"; - - - -// 订单预览 -export function fetchOrderPreview(form : {}) { - return request({ - url: '/order/preview', - data: form, - method: 'POST' - }) -} - - -// 订单下单 -export function fetchOrderbuyNow(data : {}) { - return request({ - url: '/order/buyNow', - data: data, - method: 'POST' - }) -} - - - -// 订单详情 -export function fetchOrderDetail(id : Number) { - return request({ - url: '/order/detail', - data: { id: id }, - }) -} - - - - - - - -// 订单统计 -export function fetchOrderTotalCount() { - return request({ - url: '/order/totalCount' - }) -} - - - - - - - - -// 获取订单列表 -interface orderListParams { - page ?: number; - pageSize ?: number; - status ?: 'all' | 'payment' | 'delivery' | 'received' | 'finish'; - goods_no ?: string; - [key : string] : any; // 允许其他扩展参数 -} - -/** - * 获取订单列表 - * @param params 请求参数对象 - * @returns Promise - */ -export function fetchOrderList(params : orderListParams = {}) { - // 设置默认参数 - const defaultParams = { - page: 1, - pageSize: 10, - status: 'all', - goods_no: '', - }; - - const requestParams = { - ...defaultParams, - ...params - }; - return request({ - url: '/order/getList', - method: 'GET', // 或 'POST' 根据实际需求 - data: requestParams - }); -} - - - - - - - - -// 取消订单 -export function fetchCancelOrder(id : Number) { - return request({ - url: '/order/cancel', - data: { id: id }, - }) -} - -// 标记付款 -export function fetchPayOrder(id : Number) { - return request({ - url: '/order/paid', - data: { id: id }, - }) -} - -// 标记发货 -export function fetchDeliveryOrder(form : {}) { - return request({ - url: '/order/delivery', - data: form, - method: 'POST' - }) -} - - - - -// 确认收货 -export function fetchReceiptOrder(id : Number) { - return request({ - url: '/order/receipt', - data: { id: id }, - }) -} \ No newline at end of file diff --git a/api/request.ts b/api/request.ts index 61934c2..62c1e9d 100644 --- a/api/request.ts +++ b/api/request.ts @@ -67,13 +67,13 @@ interface Response { data : any; } -/** - * 获取图片上传的完整URL - * @returns {string} 完整的图片上传URL,包含基础URL、wxapp_id和token参数 - */ -export const getUploadImageUrl = () => { - return config.api_base_url + '/upload/image' + '&wxapp_id=' + config.wxapp_id + '&token=' + uni.getStorageSync('token'); -}; +// /** +// * 获取图片上传的完整URL +// * @returns {string} 完整的图片上传URL,包含基础URL、wxapp_id和token参数 +// */ +// export const getUploadImageUrl = () => { +// return config.api_base_url + '/upload/image' + '&wxapp_id=' + config.wxapp_id + '&token=' + uni.getStorageSync('token'); +// }; /** * 封装uni.request的通用请求方法 diff --git a/api/user.ts b/api/user.ts deleted file mode 100644 index ee73dc0..0000000 --- a/api/user.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { request } from "./request"; - -// 用户登录 - -export function login(code : number, user_info : {}) { - return request({ - url: '/user/login', - data: { - code: code, - user_info: user_info - }, - method: 'POST' - }) -} - -// 获取用户信息 -export function fetchUserInfo() { - return request({ - url: '/user/info' - }) -} - -// 绑定手机号 -export function fetchUserPhone(code:string) { - return request({ - url: '/store.user/bindPhone', - data: { - code: code, - }, - }) -} \ No newline at end of file diff --git a/components/da-tree/changelog.md b/components/da-tree/changelog.md deleted file mode 100644 index 7117197..0000000 --- a/components/da-tree/changelog.md +++ /dev/null @@ -1,196 +0,0 @@ -# 1.4.2 - -新增 - -1. 新增`filterValue`属性,支持通过此关键词来搜索并筛选树结构的内容 - -# 1.4.1 - -修复 - -1. 修复单选 onlyRadioLeaf 时末级节点无法选中的 bug - -# 1.4.0 - -版本调整 - -建议更新,但需要注意,异步数据的时候,后台需返回 leaf 字段来判断是否末项数据 - -1. **调整数据项格式,新增 `leaf` 字段,来判断是否为末节点** -2. **调整数据项格式,新增 `sort` 字段,来排序节点位置** -3. **注意:异步加载数据,当为末项的时候,需要服务端数据返回 `leaf` 字段** -4. 新增 `alwaysFirstLoad` ,即异步数据总会在第一次展开节点时,拉取一次后台数据,来比对是否一致 -5. 拆分 `field` 属性,**注意: 1.5.0 版本后将移除 `field` 属性** -6. 新增 `labelField` 同 `field.label`,指定节点对象中某个属性为**标签**字段,默认`label` -7. 新增 `valueField` 同 `field.key`,指定节点对象中某个属性为**值**字段,默认`value` -8. 新增 `childrenField` 同 `field.children`,指定节点对象中某个属性为**子树节点**字段,默认`children` -9. 新增 `disabledField` 同 `field.disabled`,指定节点对象中某个属性为**禁用**字段,默认`disabled` -10. 新增 `appendField` 同 `field.append`,指定节点对象中某个属性为**副标签**字段,默认`append` -11. 新增 `leafField` 同 `field.label`,指定节点对象中某个属性为**末级节点**字段,默认`leaf` -12. 新增 `sortField` 同 `field.label`,指定节点对象中某个属性为**排序**字段,默认`sort` -13. 新增 `isLeafFn` ,用来自定义控制数据项的末项 -14. 更多的项目示例 -15. 支持单选取消选中 -16. 修复节点展开时可能存在的 bug -17. 修复节点选择可能存在的 bug -18. 调整为子节点默认继承父节点禁用属性 -19. `setExpandedKeys` 添加参数一为 `all` 即可支持一键展开/收起全部节点 -20. 其它更多优化 - -# 1.3.4 - -优化 - -1. 优化图标字体命名 - -# 1.3.3 - -优化 - -1. 新增方法调用 - > - 新增`getUncheckedKeys`,返回未选的 key - > - 新增`getUncheckedNodes`,返回未选的节点 - > - 新增`getUnexpandedKeys`,返回未展开的 key - > - 新增`getUnexpandedNodes`,返回未展开的节点 -2. 优化示例项目 - -# 1.3.2 - -修复 - -1. 修复在 APP 真机环境中的报错 - -# 1.3.1 - -修复 - -1. 修复方法`setExpandedKeys`没联动展开上级父子节点 - -# 1.3.0 - -优化 - -1. `field`新增字段 `append` 用于在标签后面显示小提示 -2. 新增支持点击标签也能选中节点 -3. 方法`setExpandedKeys`支持加载动态数据 -4. 修复父节点禁用,则不能展开及图标展开显示 -5. 修复动态加载数据时,末级节点的 `children` 为 `null` 时仍显示展开图标 - -# 1.2.6 - -新增 - -1. 新增支持主题换色 -2. 支持单选的`onlyRadioLeaf`为`true`时可点父节点展开/收起 -3. 优化`expandChecked`调整为不展开无子节点的节点 - -# 1.2.5 - -新增 - -1. 新增 `expandChecked`,控制选择时是否展开当前已选的所有下级节点 - -# 1.2.4 - -修复 - -1. 修复动态数据展开状态异常问题 - -# 1.2.3 - -新增 - -1. 新增 `checkedDisabled`,是否渲染禁用值 -2. 新增 `packDisabledkey`,是否返回已禁用并选中的 key -3. 修复选择父级时,子级已禁用但仍被选中的问题 - -# 1.2.2 - -优化 - -1. 调整动态数据载入处理方式 -2. 修复节点数据因动态数据引起的状态异常 -3. 修复初始节点数据默认选中 - -# 1.2.1 - -修复 - -1. 修复切换`选中状态`被重复选中问题 -2. 修复动态数据引起的重复选择问题 - -# 1.2.0 - -新增 - -1. 新增方法调用 - > - 新增`setCheckedKeys`,方法设置指定 key 的节点选中状态 - > - 新增`setExpandedKeys`,方法设置指定 key 的节点展开状态 -2. 修复小程序重复插槽一直刷报错问题 -3. 优化展开时,会展开子级所以下级节点 - -# 1.1.1 - -新增 - -1. 新增`data`的`disabled`,支持节点禁用状态 -2. 新增`field`的`disabled`,可自定`disabled`字段值 - -# 1.1.0 - -新增 - -1. 新增`loadMode`、`loadApi`,支持展开时加载异步数据 -2. 新增方法调用 - > - 新增`getCheckedKeys`,方法返回已选的 key - > - 新增`getHalfCheckedKeys`,方法返回半选的 key - > - 新增`getExpandedKeys`,方法返回已展开的 key - > - 新增`getCheckedNodes`,方法返回已选的节点 - > - 新增`getHalfCheckedNodes`,方法返回半选的节点 - > - 新增`getExpandedNodes`,方法返回已展开的节点 -3. 对代码进行重构,更易于后期拓展 -4. 此次更新后,页面多个的 DaTee 组件间的数据不再关联 - -# 1.0.6 - -新增 - -1. 新增`checkStrictly`,多选模式下选中时是否父子不关联 - -# 1.0.5 - -修复 - -1. 修复多选时已选数据重复问题 - -# 1.0.4 - -修复 - -1. 修复 `change` 事件回调数据的问题 - -# 1.0.3 - -优化 - -1. 优化文档及示例说明 - -# 1.0.2 - -新增 - -1. 新增 `onlyRadioLeaf` ,单选时只允许选中末级 -2. 优化默认展开及默认选择的展开问题 - -# 1.0.1 - -新增 - -1. 支持展开/收起回调事件`@expand` - -# 1.0.0 - -初始版本 1.0.0,基于 Vue3 进行开发,支持单选、多选,兼容各大平台 - -1. 支持单选 -2. 支持多选 diff --git a/components/da-tree/index.vue b/components/da-tree/index.vue deleted file mode 100644 index 604fdcc..0000000 --- a/components/da-tree/index.vue +++ /dev/null @@ -1,1160 +0,0 @@ - - - - - diff --git a/components/da-tree/props.ts b/components/da-tree/props.ts deleted file mode 100644 index 2b80e0d..0000000 --- a/components/da-tree/props.ts +++ /dev/null @@ -1,197 +0,0 @@ -export default { - /** - * 树的数据 - */ - data: { - type: Array, - default: () => [], - }, - /** - * 主题色 - */ - themeColor: { - type: String, - default: '#007aff', - }, - /** - * 是否开启多选,默认单选 - */ - showCheckbox: { - type: Boolean, - default: false, - }, - /** - * 默认选中的节点,注意单选时为单个key,多选时为key的数组 - */ - defaultCheckedKeys: { - type: [Array, String, Number], - default: null, - }, - /** - * 是否默认展开全部 - */ - defaultExpandAll: { - type: Boolean, - default: false, - }, - /** - * 默认展开的节点 - */ - defaultExpandedKeys: { - type: Array, - default: null, - }, - /** - * 筛选关键词 - */ - filterValue: { - type: String, - default: '', - }, - /** - * 是否自动展开到选中的节点,默认不展开 - */ - expandChecked: { - type: Boolean, - default: false, - }, - - /** - * (旧)字段对应内容,默认为 {label: 'label',key: 'key', children: 'children', disabled: 'disabled', append: 'append'} - * 注意:1.5.0版本后不再兼容 - */ - field: { - type: Object, - default: null, - }, - /** - * 标签字段(新,拆分了) - */ - labelField: { - type: String, - default: 'label', - }, - /** - * 值字段(新,拆分了) - */ - valueField: { - type: String, - default: 'value', - }, - /** - * 下级字段(新,拆分了) - */ - childrenField: { - type: String, - default: 'children', - }, - /** - * 禁用字段(新,拆分了) - */ - disabledField: { - type: String, - default: 'disabled', - }, - /** - * 末级节点字段(新,拆分了) - */ - leafField: { - type: String, - default: 'leaf', - }, - /** - * 副标签字段(新,拆分了) - */ - appendField: { - type: String, - default: 'append', - }, - /** - * 排序字段(新,拆分了) - */ - sortField: { - type: String, - default: 'sort', - }, - /** - * Api数据返回后的结果路径,支持嵌套如`data.list` - */ - resultField: { - type: String, - default: '', - }, - isLeafFn: { - type: Function, - default: null, - }, - /** - * 是否显示单选图标,默认显示 - */ - showRadioIcon: { - type: Boolean, - default: true, - }, - /** - * 单选时只允许选中末级,默认可随意选中 - */ - onlyRadioLeaf: { - type: Boolean, - default: false, - }, - /** - * 多选时,是否执行父子不关联的任意勾选,默认父子关联 - */ - checkStrictly: { - type: Boolean, - default: false, - }, - /** - * 为 true 时,空的 children 数组会显示展开图标 - */ - loadMode: { - type: Boolean, - default: false, - }, - /** - * 异步加载接口 - */ - loadApi: { - type: Function, - default: null, - }, - /** - * 是否总在首次的时候加载一下内容,来比对是否一致 - */ - alwaysFirstLoad: { - type: Boolean, - default: false, - }, - /** - * 是否渲染(操作)禁用值 - */ - checkedDisabled: { - type: Boolean, - default: false, - }, - /** - * 是否返回已禁用的但已选中的key - */ - packDisabledkey: { - type: Boolean, - default: true, - }, - /** - * 选择框的位置,可选 left/right - */ - checkboxPlacement: { - type: String, - default: 'left', - }, - /** - * 子项缩进距离,默认40,单位rpx - */ - indent: { - type: Number, - default: 40, - }, -} diff --git a/components/da-tree/readme.md b/components/da-tree/readme.md deleted file mode 100644 index 9b06ead..0000000 --- a/components/da-tree/readme.md +++ /dev/null @@ -1,310 +0,0 @@ -# da-tree - -一个基于 Vue3 的 tree(树)组件,同时支持主题换色,可能是最适合你的 tree(树)组件 - -组件一直在更新,遇到问题可在下方讨论。 - -`同时更新 Vue2 版本,在此查看 ===>` **[Vue2 版](https://ext.dcloud.net.cn/plugin?id=12692)** - -### 关于使用 - -可在右侧的`使用 HBuilderX 导入插件`或`下载示例项目ZIP`,方便快速上手。 - -可通过下方的示例及文档说明,进一步了解使用组件相关细节参数。 - -插件地址:https://ext.dcloud.net.cn/plugin?id=12384 - -### 组件示例 - -```jsx - -``` - -```js -import { defineComponent, ref } from 'vue' - -/** - * 模拟创建一个接口数据 - */ -function GetApiData(currentNode) { - const { key } = currentNode - - return new Promise((resolve) => { - setTimeout(() => { - // 模拟返回空数据 - if (key.indexOf('-') > -1) { - return resolve(null) - // return resolve([]) - } - - return resolve([ - { - id: `${key}-1`, - name: `行政部X${key}-1`, - }, - { - id: `${key}-2`, - name: `财务部X${key}-2`, - append: '定义了末项数据', - leaf: true, - }, - { - id: `${key}-3`, - name: `资源部X${key}-3`, - }, - { - id: `${key}-4`, - name: `资源部X${key}-3`, - append: '被禁用,无展开图标', - disabled: true, - }, - ]) - }, 2000) - }) -} - -import DaTree from '@/components/da-tree/index.vue' -export default defineComponent({ - components: { DaTree }, - setup() { - const DaTreeRef = ref() - // key的类型必须对应树数据key的类型 - const defaultCheckedKeysValue = ref(['211', '222']) - const defaultCheckedKeysValue2 = ref('222') - const defaultExpandKeysValue3 = ref(['212', '231']) - const roomTreeData = ref([ - { - id: '2', - name: '行政中心', - children: [ - { - id: '21', - name: '行政部', - children: [ - { - id: '211', - name: '行政一部', - children: null, - }, - { - id: '212', - name: '行政二部', - children: [], - disabled: true, - }, - ], - }, - { - id: '22', - name: '财务部', - children: [ - { - id: '221', - name: '财务一部', - children: [], - disabled: true, - }, - { - id: '222', - name: '财务二部', - children: [], - }, - ], - }, - { - id: '23', - name: '人力资源部', - children: [ - { - id: '231', - name: '人力一部', - children: [], - }, - { - id: '232', - name: '人力二部', - append: '更多示例,请下载示例项目查看', - }, - ], - }, - ], - }, - ]) - function doExpandTree(keys, expand) { - DaTreeRef.value?.setExpandedKeys(keys, expand) - - const gek = DaTreeRef.value?.getExpandedKeys() - console.log('当前已展开的KEY ==>', gek) - } - function doCheckedTree(keys, checked) { - DaTreeRef.value?.setCheckedKeys(keys, checked) - - const gek = DaTreeRef.value?.getCheckedKeys() - console.log('当前已选中的KEY ==>', gek) - } - function handleTreeChange(allSelectedKeys, currentItem) { - console.log('handleTreeChange ==>', allSelectedKeys, currentItem) - } - function handleExpandChange(expand, currentItem) { - console.log('handleExpandChange ==>', expand, currentItem) - } - return { - DaTreeRef, - roomTreeData, - defaultCheckedKeysValue, - defaultCheckedKeysValue2, - defaultExpandKeysValue3, - handleTreeChange, - handleExpandChange, - GetApiData, - doExpandTree, - doCheckedTree, - } - }, -}) -``` - -** 更多示例请下载/导入示例项目 ZIP 查看 ** - -### 组件参数 - -| 属性 | 类型 | 默认值 | 必填 | 说明 | -| :------------------ | :------------------------------ | :--------- | :--- | :--------------------------------------------------------------------------- | -| data | `Array` | - | 是 | 树的数据 | -| themeColor | `String` | `#007aff` | 否 | 主题色,十六进制 | -| defaultCheckedKeys | `Array` \| `Number` \| `String` | - | 否 | 默认选中的节点,单选为单个 key,多选为 key 的数组 | -| showCheckbox | `Boolean` | `false` | 否 | 是否开启多选,默认单选 | -| checkStrictly | `Boolean` | `false` | 否 | 多选时,是否执行父子不关联的任意勾选,默认父子关联 | -| showRadioIcon | `Boolean` | `true` | 否 | 是否显示单选图标,默认显示 | -| onlyRadioLeaf | `Boolean` | `true` | 否 | 单选时只允许选中末级,默认可随意选中 | -| defaultExpandAll | `Boolean` | `false` | 否 | 是否默认展开全部 | -| defaultExpandedKeys | `Array` | - | 否 | 默认展开的节点 | -| indent | `Number` | `40` | 否 | 子项缩进距离,单位 rpx | -| checkboxPlacement | `String` | `left` | 否 | 选择框的位置,可选 left/right | -| loadMode | `Boolean` | `false` | 否 | 为 true 时,空的 children 数组会显示展开图标 | -| loadApi | `Function` | - | 否 | 选择框的位置,可选 left/right | -| checkedDisabled | `Boolean` | `false` | 否 | 是否渲染禁用值,默认不渲染 | -| packDisabledkey | `Boolean` | `true` | 否 | 是否返回已禁用的但已选中的 key,默认返回禁用已选值 | -| expandChecked | `Boolean` | `false` | 否 | 是否自动展开到选中的节点,默认不展开 | -| alwaysFirstLoad | `Boolean` | `false` | 否 | 是否总在首次的时候加载一下内容,默认不加载,否则只有展开末级节点才会加载数据 | -| isLeafFn | `Function` | - | 否 | 自定义函数返回来控制数据项的末项 | -| field | `Object` | - | 否 | 字段对应内容,格式参考下方(1.5.0 后移除,请用单独的字段匹配) | -| labelField | `String` | `label` | 否 | 指定节点对象中某个属性为标签字段,默认`label` | -| valueField | `String` | `value` | 否 | 指定节点对象中某个属性为值字段,默认`value` | -| childrenField | `String` | `children` | 否 | 指定节点对象中某个属性为子树节点字段,默认`children` | -| disabledField | `String` | `disabled` | 否 | 指定节点对象中某个属性为禁用字段,默认`disabled` | -| appendField | `String` | `append` | 否 | 指定节点对象中某个属性为副标签字段,默认`append` | -| leafField | `String` | `leaf` | 否 | 指定节点对象中某个属性为末级节点字段,默认`leaf` | -| sortField | `String` | `sort` | 否 | 指定节点对象中某个属性为排序字段,默认`sort` | -| filterValue | `String` | - | 否 | 搜索筛选的关键词,通过输入关键词筛选内容 | - -**field 格式(1.5.0 后移除,请用单独的字段匹配)** - -```js -{ - label: 'label', - key: 'key', - children: 'children', - disabled: 'disabled', - append: 'append' -} -``` - -### 组件事件 - -| 事件名称 | 回调参数 | 说明 | -| :------- | :-------------------------------------- | :-------------- | -| change | `(allCheckedKeys, currentItem) => void` | 选中时回调 | -| expand | `(expandState, currentItem) => void` | 展开/收起时回调 | - -### 组件方法 - -| 方法名称 | 参数 | 说明 | -| :------------------ | :--------------- | :------------------------------------------------------------------------------------------------ | -| setCheckedKeys | `(keys,checked)` | 设置指定 key 的节点选中/取消选中的状态。注: keys 单选时为 key,多选时为 key 的数组 | -| setExpandedKeys | `(keys,expand)` | 设置指定 key 的节点展开/收起的状态,当 keys 为 all 时即代表展开/收起全部。注:keys 为数组或 `all` | -| getCheckedKeys | - | 返回已选的 key | -| getHalfCheckedKeys | - | 返回半选的 key | -| getUncheckedKeys | - | 返回未选的 key | -| getCheckedNodes | - | 返回已选的节点 | -| getUncheckedNodes | - | 返回未选的节点 | -| getHalfCheckedNodes | - | 返回半选的节点 | -| getExpandedKeys | - | 返回已展开的 key | -| getUnexpandedKeys | - | 返回未展开的 key | -| getExpandedNodes | - | 返回已展开的节点 | -| getUnexpandedNodes | - | 返回未展开的节点 | - -### 组件版本 - -v1.4.2 - -### 差异化 - -已通过测试 - -> - H5 页面 -> - 微信小程序 -> - 支付宝、钉钉小程序 -> - 字节跳动、抖音、今日头条小程序 -> - 百度小程序 -> - 飞书小程序 -> - QQ 小程序 -> - 京东小程序 - -未测试 - -> - 快手小程序由于非企业用户暂无演示 -> - 快应用、360 小程序因 Vue3 支持的原因暂无演示 - -### 开发组 - -[@CRLANG](https://crlang.com) diff --git a/components/da-tree/utils.ts b/components/da-tree/utils.ts deleted file mode 100644 index f11bbb3..0000000 --- a/components/da-tree/utils.ts +++ /dev/null @@ -1,150 +0,0 @@ -/** 未选 */ -export const unCheckedStatus = 0 -/** 半选 */ -export const halfCheckedStatus = 1 -/** 选中 */ -export const isCheckedStatus = 2 - -/** - * 深拷贝内容 - * @param originData 拷贝对象 - * @author crlang(https://crlang.com) - */ -export function deepClone(originData) { - const type = Object.prototype.toString.call(originData) - let data - if (type === '[object Array]') { - data = [] - for (let i = 0; i < originData.length; i++) { - data.push(deepClone(originData[i])) - } - } else if (type === '[object Object]') { - data = {} - for (const prop in originData) { - // eslint-disable-next-line no-prototype-builtins - if (originData.hasOwnProperty(prop)) { // 非继承属性 - data[prop] = deepClone(originData[prop]) - } - } - } else { - data = originData - } - return data -} - -/** - * 获取所有指定的节点 - * @param type - * @param value - * @author crlang(https://crlang.com) - */ -export function getAllNodes(list, type, value, packDisabledkey = true) { - if (!list || list.length === 0) { - return [] - } - - const res = [] - for (let i = 0; i < list.length; i++) { - const item = list[i] - if (item[type] === value) { - if ((packDisabledkey && item.disabled) || !item.disabled) { - res.push(item) - } - } - } - - return res -} - -/** - * 获取所有指定的key值 - * @param type - * @param value - * @author crlang(https://crlang.com) - */ -export function getAllNodeKeys(list, type, value, packDisabledkey = true) { - if (!list || list.length === 0) { - return null - } - - const res = [] - for (let i = 0; i < list.length; i++) { - const item = list[i] - if (item[type] === value) { - if ((packDisabledkey && item.disabled) || !item.disabled) { - res.push(item.key) - } - } - } - - return res.length ? res : null -} - -/** - * 错误输出 - * - * @param msg - */ -export function logError(msg, ...args) { - console.error(`DaTree: ${msg}`, ...args) -} - -const toString = Object.prototype.toString - -export function is(val, type) { - return toString.call(val) === `[object ${type}]` -} - -/** - * 是否对象(Object) - * @param val - - */ -export function isObject(val) { - return val !== null && is(val, 'Object') -} - -/** - * 是否数字(Number) - * @param val - - */ -export function isNumber(val) { - return is(val, 'Number') -} - -/** - * 是否字符串(String) - * @param val - - */ -export function isString(val) { - return is(val, 'String') -} - -/** - * 是否函数方法(Function) - * @param val - - */ -export function isFunction(val) { - return typeof val === 'function' -} - -/** - * 是否布尔(Boolean) - * @param val - - */ -export function isBoolean(val) { - return is(val, 'Boolean') -} - -/** - * 是否数组(Array) - * @param val - - */ -export function isArray(val) { - return val && Array.isArray(val) -} diff --git a/components/index-custom-navigationbar/index.vue b/components/index-custom-navigationbar/index.vue deleted file mode 100644 index af06030..0000000 --- a/components/index-custom-navigationbar/index.vue +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/components/index-custom-navigationbar/index.vue- b/components/index-custom-navigationbar/index.vue- deleted file mode 100644 index f071a36..0000000 --- a/components/index-custom-navigationbar/index.vue- +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/components/inlineSelect/inlineSelect.vue b/components/inlineSelect/inlineSelect.vue deleted file mode 100644 index ea3ebdd..0000000 --- a/components/inlineSelect/inlineSelect.vue +++ /dev/null @@ -1,341 +0,0 @@ - - - - - diff --git a/components/op-drop-down/changelog.md b/components/op-drop-down/changelog.md deleted file mode 100644 index 4951b87..0000000 --- a/components/op-drop-down/changelog.md +++ /dev/null @@ -1,7 +0,0 @@ -## 1.1.1(2025-03-06) -1.1.1 -## 1.1.0(2025-03-06) -1.1.0 -## 1.0.0(2025-03-05) -1.0.0 -1.0.0 \ No newline at end of file diff --git a/components/op-drop-down/components/op-cascader/op-cascader.vue b/components/op-drop-down/components/op-cascader/op-cascader.vue deleted file mode 100644 index 27bf53f..0000000 --- a/components/op-drop-down/components/op-cascader/op-cascader.vue +++ /dev/null @@ -1,244 +0,0 @@ - - - - \ No newline at end of file diff --git a/components/op-drop-down/components/op-dateTime-picker/op-dateTime-picker.vue b/components/op-drop-down/components/op-dateTime-picker/op-dateTime-picker.vue deleted file mode 100644 index 52a9cee..0000000 --- a/components/op-drop-down/components/op-dateTime-picker/op-dateTime-picker.vue +++ /dev/null @@ -1,300 +0,0 @@ - - - - \ No newline at end of file diff --git a/components/op-drop-down/components/op-drop-down/op-drop-down.vue b/components/op-drop-down/components/op-drop-down/op-drop-down.vue deleted file mode 100644 index fa57765..0000000 --- a/components/op-drop-down/components/op-drop-down/op-drop-down.vue +++ /dev/null @@ -1,304 +0,0 @@ - - - - \ No newline at end of file diff --git a/components/op-drop-down/package.json b/components/op-drop-down/package.json deleted file mode 100644 index 10e5453..0000000 --- a/components/op-drop-down/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "id": "op-drop-down", - "displayName": "op-drop-down", - "version": "1.1.1", - "description": "多功能下拉筛选,支持tree联机筛选、时间范围筛选、数组筛选、自定义筛选菜单", - "keywords": [ - "drop-down", - "datetimerange", - "cascader", - "自定义", - "下拉筛选" -], - "repository": "", - "engines": { - "HBuilderX": "^3.1.0" - }, - "dcloudext": { - "type": "component-vue", - "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", - "alipay": "y" - }, - "client": { - "Vue": { - "vue2": "u", - "vue3": "y" - }, - "App": { - "app-vue": "y", - "app-nvue": "u", - "app-uvue": "u", - "app-harmony": "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": "y", - "钉钉": "u", - "快手": "u", - "飞书": "u", - "京东": "u" - }, - "快应用": { - "华为": "u", - "联盟": "u" - } - } - } - } -} \ No newline at end of file diff --git a/components/op-drop-down/readme.md b/components/op-drop-down/readme.md deleted file mode 100644 index bf7d674..0000000 --- a/components/op-drop-down/readme.md +++ /dev/null @@ -1,167 +0,0 @@ -# op-drop-down -# 前端UI下拉选择组件, - -### 使用方式 - -```html - - - -``` -```javascript -import OpDropDown from '@/uni_modules/op-drop-down/components/op-drop-down/op-drop-down.vue'; - -export default { - components: { OpDropDown }, - data() { - return { - form: { - type: [], - status: '', - time: '', - dateTimeRange: [], - customKey: '' - }, - paramOptions: [ - { - title: '分类', - key: 'type', - type: 'cascader', - props: { label: 'label', value: 'value', children: 'children', disabled: 'disabled'}, - option: [ - { - label: '标题1', - value: '1', - children: [ - { - label: '标题1-1', - value: '1-1', - children: [ - { label: '标题1-1-1', value: '1-1-1' }, - { label: '标题1-1-2', value: '1-1-2' }, - { label: '标题1-1-3', value: '1-1-3', disabled: true }, - { label: '标题1-1-4', value: '1-1-4', disabled: true }, - { label: '标题1-1-5', value: '1-1-5' }, - { label: '标题1-1-6', value: '1-1-6' } - ] - }, - { - label: '标题1-2', - value: '1-2', - children: [ - { label: '标题1-2-1', value: '1-2-1' }, - { label: '标题1-2-2', value: '1-2-2' } - ] - } - ] - }, - { - label: '标题2', - value: '2', - children: [ - { - label: '标题2-1', - value: '2-1', - children: [ - { label: '标题2-1-1', value: '2-1-1' }, - { label: '标题2-1-2', value: '2-1-2' } - ] - }, - { - label: '标题2-2', - value: '2-2', - children: [ - { label: '标题2-2-1', value: '2-2-1' }, - { label: '标题2-2-2', value: '2-2-2' } - ] - } - ] - }, - { - label: '标题3', - value: '3', - }, - { - label: '标题4', - value: '4', - }, - { - label: '标题5', - value: '5', - } - ] - }, - { - title: '状态', - key: 'status', - type: 'select', - option: [ - { label: '在线', value: 'online'}, - { label: '离线', value: 'offline'}, - ] - }, - { - title: '时间', - key: 'time', - type: 'time', - placeholder: '请选择', - }, - { - title: '日期范围', - key: 'dateTimeRange', - type: 'datetimerange', - startPlaceholder: '请选择', - endPlaceholder: '请选择', - }, - { - title: '自定义', - key: 'customKey', - type: 'custom', - } - ] - } - }, - onLoad() { - - }, - methods: { - onChange(val) { - this.form = val - console.log(val) - }, - reset(val) { - this.form = val - console.log(val) - } - } -} -``` - -###组件的属性说明如下: -| 属性 | 类型 | 默认值 | 必填 | 说明 | -| ---------------- | ------- | ------- | ---- | ------------------------------ | -| defaultValue | Object | {} | 是 | 设置整个下拉的默认键值对 | -| option | Array | [] | 是 | 下拉菜单配置的数据 | -| closeOnClickModal | Boolean | true | 否 | 点击模态窗是否关闭下拉 | - -####option参数说明: -| 属性 | 类型 | 默认值 | 必填 | 说明 | -| ---------------- | ------- | ------- | ---- | ------------------------------ | -| title | String | | 是 | 属性名,显示在页面上 | -| key | String | | 是 | 与defaultValue对应的键 | -| type | String | 可选cascader、select、date、time、yearmonth、year、datetime、daterange、timerange、yearmonthrange、yearrange、datetimerange、custom | 是 | 下拉类型 | -| props | Object | { label: label, value: value, children: children } | 否 | 只针对联级下拉选择项cascader,自定义节点 label、value、options 的字段 | -| placeholder | String | | 否 | 时间选择占位文本 | -| startPlaceholder | String | | 否 | 时间范围选择占位文本 | -| endPlaceholder | String | | 否 | 时间范围选择占位文本 | - -###事件 -| 事件名称 | 回调参数 | 说明 | -| --------- | -------------------- | ------------------------------------------------------------ | -| change | (data) => void | 改变事件,data为当前操作后的数据 | -| reset | (data) => void | 重置其中一个选中数据,data为当前操作后的数据 | \ No newline at end of file diff --git a/pages.json b/pages.json index 10ded14..0d87027 100644 --- a/pages.json +++ b/pages.json @@ -96,13 +96,13 @@ "enablePullDownRefresh": false } }, - { - "path": "pages/order/detail", - "style": { - "navigationBarTitleText": "订单详情", - "enablePullDownRefresh": false - } - } + // { + // "path": "pages/order/detail", + // "style": { + // "navigationBarTitleText": "订单详情", + // "enablePullDownRefresh": false + // } + // } // { // "path": "pages/mall/detail", // "style": { diff --git a/pages/cart/index.vue b/pages/cart/index.vue deleted file mode 100644 index 3e673b6..0000000 --- a/pages/cart/index.vue +++ /dev/null @@ -1,342 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/control/goods/index.vue- b/pages/control/goods/index.vue- deleted file mode 100644 index 7973135..0000000 --- a/pages/control/goods/index.vue- +++ /dev/null @@ -1,429 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/index/index - 副本.vue b/pages/index/index - 副本.vue deleted file mode 100644 index 95d2798..0000000 --- a/pages/index/index - 副本.vue +++ /dev/null @@ -1,283 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/index/index.vue- b/pages/index/index.vue- deleted file mode 100644 index f9c25b6..0000000 --- a/pages/index/index.vue- +++ /dev/null @@ -1,1427 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/index/index.vue-bac b/pages/index/index.vue-bac deleted file mode 100644 index bda3f03..0000000 --- a/pages/index/index.vue-bac +++ /dev/null @@ -1,717 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/index/orderAdd copy.vue b/pages/index/orderAdd copy.vue deleted file mode 100644 index 58130ad..0000000 --- a/pages/index/orderAdd copy.vue +++ /dev/null @@ -1,618 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/pages/mall/detail.vue b/pages/mall/detail.vue deleted file mode 100644 index b49028a..0000000 --- a/pages/mall/detail.vue +++ /dev/null @@ -1,379 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/mall/houseDetail.vue b/pages/mall/houseDetail.vue deleted file mode 100644 index a9c8069..0000000 --- a/pages/mall/houseDetail.vue +++ /dev/null @@ -1,579 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/order/index.vue b/pages/order/index.vue index 8bd2f67..f20e24f 100644 --- a/pages/order/index.vue +++ b/pages/order/index.vue @@ -38,10 +38,10 @@ - {{order?.fee_amount}} + ¥{{order?.fee_amount}} - {{order?.fee_combo_price}} + ¥{{order?.fee_combo_price}} {{order?.fee_pay_status?.text}} @@ -56,7 +56,7 @@ - {{order?.over_amount}} + ¥{{order?.over_amount}} {{order?.over_pay_status?.text}} @@ -70,7 +70,7 @@ - {{goods?.goods_price}} + ¥{{goods?.goods_price}} {{goods?.goods_pay_status_txt}} @@ -78,8 +78,16 @@ - 优惠: - 总计: + 优惠: + + ¥{{order?.discount_amount}} + + + 总计: + + ¥{{order?.discount_amount}} + + 备注 diff --git a/types/contorl.d.ts b/types/contorl.d.ts deleted file mode 100644 index 817948e..0000000 --- a/types/contorl.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -export -interface EditGoodsParams { - /** - * 子类 - */ - degree_id: number; - /** - * 配件id - */ - goods_id: number; - /** - * 价格 - */ - goods_price: number; - /** - * 排序 - */ - goods_sort: number; - /** - * 状态 10 上架 20 下架 - */ - goods_status: number; - /** - * 库存 - */ - goods_stock: number; - /** - * 图片传递id数组 - */ - images: number[]; - /** - * 机型 - */ - product_id: number; - /** - * 分类 - */ - type_id: number; - [property: string]: any; -} \ No newline at end of file diff --git a/types/tabbar.d.ts b/types/tabbar.d.ts deleted file mode 100644 index be034c1..0000000 --- a/types/tabbar.d.ts +++ /dev/null @@ -1,8 +0,0 @@ - -export interface TabItem { - pagePath : string; - iconPath : string; - selectedIconPath : string; - text : string; - // badge ?: number | string; -} \ No newline at end of file diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/api/request.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/api/request.js.map index a50500e..4f10a72 100644 --- a/unpackage/dist/dev/.sourcemap/mp-weixin/api/request.js.map +++ b/unpackage/dist/dev/.sourcemap/mp-weixin/api/request.js.map @@ -1 +1 @@ -{"version":3,"file":"request.js","sources":["api/request.ts"],"sourcesContent":["// import { ref } from \"vue\";\n// import config from \"../config\";\n// import { goToLoginPage } from \"../utils/helper\";\n// interface Options {\n// \turl : string,\n// \tmethod ?: 'GET' | 'POST',\n// \tdata ?: any,\n// \tparams ?: any,\n// \tdataType ?: string,\n// \tresponseType ?: string\n// }\n// interface Response {\n// \tcode : number;\n// \tmsg ?: string;\n// \tdata : any;\n// }\n// export const getUploadImageUrl = () => {\n// \treturn config.api_base_url + '/upload/image' + '&wxapp_id=' + config.wxapp_id + '&token=' + uni.getStorageSync('token');\n// }\n// export const request = (options : Options) => {\n// \treturn new Promise((resolve, reject) => {\n// \t\tuni.request({\n// \t\t\turl: config.api_base_url + options.url + '&wxapp_id=' + config.wxapp_id + '&token=' + uni.getStorageSync('token'),\n// \t\t\tmethod: options.method || 'GET',\n// \t\t\tdata: options.data || options.params || {},\n// \t\t\tdataType: options.dataType || \"json\",\n// \t\t\tresponseType: options.responseType || \"text\",\n// \t\t\tsuccess(res) {\n// \t\t\t\tconst ret : Response = res.data\n// \t\t\t\tif (ret.code === -1) {\n// \t\t\t\t\tgoToLoginPage()\n// \t\t\t\t} else if (ret.code === 1) {\n// \t\t\t\t\tresolve(ret.data)\n// \t\t\t\t} else if (ret.code === 0) {\n// \t\t\t\t\tuni.showToast({\n// \t\t\t\t\t\ttitle:ret.msg,\n// \t\t\t\t\t\ticon:'none'\n// \t\t\t\t\t})\n// \t\t\t\t}\n// \t\t\t},\n// \t\t\tfail(err) {\n// \t\t\t\treject(err)\n// \t\t\t},\n\n// \t\t})\n// \t})\n// }\n\nimport { ref } from 'vue';\nimport config from '@/config';\nimport { goToLoginPage } from '@/utils/helper';\n\n// 定义请求参数接口\ninterface Options {\n\turl : string; // 请求路径(不包含基础URL)\n\tmethod ?: 'GET' | 'POST'; // 请求方法,默认为GET\n\tdata ?: any; // POST请求体数据\n\tparams ?: any; // GET请求参数(与data二选一)\n\tdataType ?: string; // 返回数据格式,默认json\n\tresponseType ?: string; // 响应数据类型,默认text\n}\n\n// 定义响应数据结构接口\ninterface Response {\n\tcode : number;\n\tmsg ?: string;\n\tdata : any;\n}\n\n/**\n * 获取图片上传的完整URL\n * @returns {string} 完整的图片上传URL,包含基础URL、wxapp_id和token参数\n */\nexport const getUploadImageUrl = () => {\n\treturn config.api_base_url + '/upload/image' + '&wxapp_id=' + config.wxapp_id + '&token=' + uni.getStorageSync('token');\n};\n\n/**\n * 封装uni.request的通用请求方法\n * @param {Options} options 请求配置项\n * @returns {Promise} 返回Promise对象\n *\n * 功能说明:\n * 1. 自动拼接基础URL和认证参数\n * 2. 统一处理登录状态(code=-1跳转登录页)\n * 3. 统一处理错误提示(code=0显示Toast)\n * 4. 成功时返回data字段(code=1)\n */\nexport const request = (options : Options) => {\n\treturn new Promise((resolve, reject) => {\n\t\tuni.request({\n\t\t\t// 拼接完整请求URL(基础URL + 路径 + 固定参数)\n\t\t\turl: config.api_base_url + options.url + '&wxapp_id=' + config.wxapp_id + '&token=' + uni.getStorageSync('token'),\n\n\t\t\tmethod: options.method || 'GET', // 默认GET方法\n\t\t\tdata: options.data || options.params || {}, // 兼容data/params传参\n\t\t\tdataType: options.dataType || 'json', // 默认json格式\n\t\t\tresponseType: options.responseType || 'text', // 默认text类型\n\n\t\t\t// 请求成功回调\n\t\t\tsuccess(res) {\n\t\t\t\tconst ret : Response = res.data;\n\t\t\t\t// console.log(ret);\n\n\t\t\t\t// 状态码处理\n\t\t\t\tswitch (ret.code) {\n\t\t\t\t\tcase -1: // 未登录状态\n\t\t\t\t\t\tgoToLoginPage();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1: // 成功状态\n\t\t\t\t\t\t// console.log(options.url);\n\t\t\t\t\t\t// if (options.url === '/parts.order/preview') {\n\t\t\t\t\t\t// \tconsole.log('ressss', ret);\n\t\t\t\t\t\t// \tresolve(ret);\n\t\t\t\t\t\t// \tbreak;\n\t\t\t\t\t\t// }\n\t\t\t\t\t\tresolve(ret.data); // 返回data字段\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 0: // 失败状态\n\t\t\t\t\t\t// console.log(options.url);\n\t\t\t\t\t\t// if (options.url === '/parts.order/preview') {\n\t\t\t\t\t\t// \tconsole.log('ressss', ret);\n\t\t\t\t\t\t// \tresolve(ret);\n\t\t\t\t\t\t// \tbreak;\n\t\t\t\t\t\t// }\n\t\t\t\t\t\tuni.showToast({\n\t\t\t\t\t\t\ttitle: ret.msg || '操作失败', // 显示错误信息\n\t\t\t\t\t\t\ticon: 'none', // 不显示图标\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// 请求失败回调\n\t\t\tfail(err) {\n\t\t\t\tuni.$emit('z-paging-error-emit');\n\t\t\t\treject(err); // 返回错误对象\n\t\t\t\tuni.showToast({\n\t\t\t\t\ttitle: '网络请求失败',\n\t\t\t\t\ticon: 'none',\n\t\t\t\t});\n\t\t\t},\n\t\t});\n\t});\n};"],"names":["uni","config","goToLoginPage"],"mappings":";;;;AAwFa,MAAA,UAAU,CAAC,YAAsB;AAC7C,SAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACvCA,kBAAAA,MAAI,QAAQ;AAAA;AAAA,MAEX,KAAKC,OAAO,OAAA,eAAe,QAAQ,MAAM,eAAeA,OAAA,OAAO,WAAW,YAAYD,oBAAI,eAAe,OAAO;AAAA,MAEhH,QAAQ,QAAQ,UAAU;AAAA;AAAA,MAC1B,MAAM,QAAQ,QAAQ,QAAQ,UAAU,CAAC;AAAA;AAAA,MACzC,UAAU,QAAQ,YAAY;AAAA;AAAA,MAC9B,cAAc,QAAQ,gBAAgB;AAAA;AAAA;AAAA,MAGtC,QAAQ,KAAK;AACZ,cAAM,MAAiB,IAAI;AAI3B,gBAAQ,IAAI,MAAM;AAAA,UACjB,KAAK;AACUE,yBAAAA;AACd;AAAA,UACD,KAAK;AAOJ,oBAAQ,IAAI,IAAI;AAChB;AAAA,UACD,KAAK;AAOJF,0BAAAA,MAAI,UAAU;AAAA,cACb,OAAO,IAAI,OAAO;AAAA;AAAA,cAClB,MAAM;AAAA;AAAA,YAAA,CACN;AACD;AAAA,QACF;AAAA,MACD;AAAA;AAAA,MAGA,KAAK,KAAK;AACTA,4BAAI,MAAM,qBAAqB;AAC/B,eAAO,GAAG;AACVA,sBAAAA,MAAI,UAAU;AAAA,UACb,OAAO;AAAA,UACP,MAAM;AAAA,QAAA,CACN;AAAA,MACF;AAAA,IAAA,CACA;AAAA,EAAA,CACD;AACF;;"} \ No newline at end of file +{"version":3,"file":"request.js","sources":["api/request.ts"],"sourcesContent":["// import { ref } from \"vue\";\n// import config from \"../config\";\n// import { goToLoginPage } from \"../utils/helper\";\n// interface Options {\n// \turl : string,\n// \tmethod ?: 'GET' | 'POST',\n// \tdata ?: any,\n// \tparams ?: any,\n// \tdataType ?: string,\n// \tresponseType ?: string\n// }\n// interface Response {\n// \tcode : number;\n// \tmsg ?: string;\n// \tdata : any;\n// }\n// export const getUploadImageUrl = () => {\n// \treturn config.api_base_url + '/upload/image' + '&wxapp_id=' + config.wxapp_id + '&token=' + uni.getStorageSync('token');\n// }\n// export const request = (options : Options) => {\n// \treturn new Promise((resolve, reject) => {\n// \t\tuni.request({\n// \t\t\turl: config.api_base_url + options.url + '&wxapp_id=' + config.wxapp_id + '&token=' + uni.getStorageSync('token'),\n// \t\t\tmethod: options.method || 'GET',\n// \t\t\tdata: options.data || options.params || {},\n// \t\t\tdataType: options.dataType || \"json\",\n// \t\t\tresponseType: options.responseType || \"text\",\n// \t\t\tsuccess(res) {\n// \t\t\t\tconst ret : Response = res.data\n// \t\t\t\tif (ret.code === -1) {\n// \t\t\t\t\tgoToLoginPage()\n// \t\t\t\t} else if (ret.code === 1) {\n// \t\t\t\t\tresolve(ret.data)\n// \t\t\t\t} else if (ret.code === 0) {\n// \t\t\t\t\tuni.showToast({\n// \t\t\t\t\t\ttitle:ret.msg,\n// \t\t\t\t\t\ticon:'none'\n// \t\t\t\t\t})\n// \t\t\t\t}\n// \t\t\t},\n// \t\t\tfail(err) {\n// \t\t\t\treject(err)\n// \t\t\t},\n\n// \t\t})\n// \t})\n// }\n\nimport { ref } from 'vue';\nimport config from '@/config';\nimport { goToLoginPage } from '@/utils/helper';\n\n// 定义请求参数接口\ninterface Options {\n\turl : string; // 请求路径(不包含基础URL)\n\tmethod ?: 'GET' | 'POST'; // 请求方法,默认为GET\n\tdata ?: any; // POST请求体数据\n\tparams ?: any; // GET请求参数(与data二选一)\n\tdataType ?: string; // 返回数据格式,默认json\n\tresponseType ?: string; // 响应数据类型,默认text\n}\n\n// 定义响应数据结构接口\ninterface Response {\n\tcode : number;\n\tmsg ?: string;\n\tdata : any;\n}\n\n// /**\n// * 获取图片上传的完整URL\n// * @returns {string} 完整的图片上传URL,包含基础URL、wxapp_id和token参数\n// */\n// export const getUploadImageUrl = () => {\n// \treturn config.api_base_url + '/upload/image' + '&wxapp_id=' + config.wxapp_id + '&token=' + uni.getStorageSync('token');\n// };\n\n/**\n * 封装uni.request的通用请求方法\n * @param {Options} options 请求配置项\n * @returns {Promise} 返回Promise对象\n *\n * 功能说明:\n * 1. 自动拼接基础URL和认证参数\n * 2. 统一处理登录状态(code=-1跳转登录页)\n * 3. 统一处理错误提示(code=0显示Toast)\n * 4. 成功时返回data字段(code=1)\n */\nexport const request = (options : Options) => {\n\treturn new Promise((resolve, reject) => {\n\t\tuni.request({\n\t\t\t// 拼接完整请求URL(基础URL + 路径 + 固定参数)\n\t\t\turl: config.api_base_url + options.url + '&wxapp_id=' + config.wxapp_id + '&token=' + uni.getStorageSync('token'),\n\n\t\t\tmethod: options.method || 'GET', // 默认GET方法\n\t\t\tdata: options.data || options.params || {}, // 兼容data/params传参\n\t\t\tdataType: options.dataType || 'json', // 默认json格式\n\t\t\tresponseType: options.responseType || 'text', // 默认text类型\n\n\t\t\t// 请求成功回调\n\t\t\tsuccess(res) {\n\t\t\t\tconst ret : Response = res.data;\n\t\t\t\t// console.log(ret);\n\n\t\t\t\t// 状态码处理\n\t\t\t\tswitch (ret.code) {\n\t\t\t\t\tcase -1: // 未登录状态\n\t\t\t\t\t\tgoToLoginPage();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1: // 成功状态\n\t\t\t\t\t\t// console.log(options.url);\n\t\t\t\t\t\t// if (options.url === '/parts.order/preview') {\n\t\t\t\t\t\t// \tconsole.log('ressss', ret);\n\t\t\t\t\t\t// \tresolve(ret);\n\t\t\t\t\t\t// \tbreak;\n\t\t\t\t\t\t// }\n\t\t\t\t\t\tresolve(ret.data); // 返回data字段\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 0: // 失败状态\n\t\t\t\t\t\t// console.log(options.url);\n\t\t\t\t\t\t// if (options.url === '/parts.order/preview') {\n\t\t\t\t\t\t// \tconsole.log('ressss', ret);\n\t\t\t\t\t\t// \tresolve(ret);\n\t\t\t\t\t\t// \tbreak;\n\t\t\t\t\t\t// }\n\t\t\t\t\t\tuni.showToast({\n\t\t\t\t\t\t\ttitle: ret.msg || '操作失败', // 显示错误信息\n\t\t\t\t\t\t\ticon: 'none', // 不显示图标\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// 请求失败回调\n\t\t\tfail(err) {\n\t\t\t\tuni.$emit('z-paging-error-emit');\n\t\t\t\treject(err); // 返回错误对象\n\t\t\t\tuni.showToast({\n\t\t\t\t\ttitle: '网络请求失败',\n\t\t\t\t\ticon: 'none',\n\t\t\t\t});\n\t\t\t},\n\t\t});\n\t});\n};"],"names":["uni","config","goToLoginPage"],"mappings":";;;;AAwFa,MAAA,UAAU,CAAC,YAAsB;AAC7C,SAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACvCA,kBAAAA,MAAI,QAAQ;AAAA;AAAA,MAEX,KAAKC,OAAO,OAAA,eAAe,QAAQ,MAAM,eAAeA,OAAA,OAAO,WAAW,YAAYD,oBAAI,eAAe,OAAO;AAAA,MAEhH,QAAQ,QAAQ,UAAU;AAAA;AAAA,MAC1B,MAAM,QAAQ,QAAQ,QAAQ,UAAU,CAAC;AAAA;AAAA,MACzC,UAAU,QAAQ,YAAY;AAAA;AAAA,MAC9B,cAAc,QAAQ,gBAAgB;AAAA;AAAA;AAAA,MAGtC,QAAQ,KAAK;AACZ,cAAM,MAAiB,IAAI;AAI3B,gBAAQ,IAAI,MAAM;AAAA,UACjB,KAAK;AACUE,yBAAAA;AACd;AAAA,UACD,KAAK;AAOJ,oBAAQ,IAAI,IAAI;AAChB;AAAA,UACD,KAAK;AAOJF,0BAAAA,MAAI,UAAU;AAAA,cACb,OAAO,IAAI,OAAO;AAAA;AAAA,cAClB,MAAM;AAAA;AAAA,YAAA,CACN;AACD;AAAA,QACF;AAAA,MACD;AAAA;AAAA,MAGA,KAAK,KAAK;AACTA,4BAAI,MAAM,qBAAqB;AAC/B,eAAO,GAAG;AACVA,sBAAAA,MAAI,UAAU;AAAA,UACb,OAAO;AAAA,UACP,MAAM;AAAA,QAAA,CACN;AAAA,MACF;AAAA,IAAA,CACA;AAAA,EAAA,CACD;AACF;;"} \ No newline at end of file diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/app.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/app.js.map index 29a554a..36749d5 100644 --- a/unpackage/dist/dev/.sourcemap/mp-weixin/app.js.map +++ b/unpackage/dist/dev/.sourcemap/mp-weixin/app.js.map @@ -1 +1 @@ -{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["\r\n\r\n","import App from './App'\n\n// #ifndef VUE3\nimport Vue from 'vue'\nimport './uni.promisify.adaptor'\nVue.config.productionTip = false\nApp.mpType = 'app'\nconst app = new Vue({\n ...App\n})\napp.$mount()\n// #endif\n\n// #ifdef VUE3\nimport { createSSRApp } from 'vue'\nexport function createApp() {\n const app = createSSRApp(App)\n return {\n app\n }\n}\n// #endif"],"names":["uni","createSSRApp","App"],"mappings":";;;;;;;;;;;;;;;AAEC,MAAK,YAAU;AAAA,EACd,UAAU,WAAW;AAOpBA,kBAAAA,MAAA,MAAA,OAAA,iBAAY,YAAY;AAAA,EACxB;AAAA,EACD,QAAQ,WAAW;AAElBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACtB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACvB;AACD;ACJM,SAAS,YAAY;AAC1B,QAAM,MAAMC,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;;;"} \ No newline at end of file +{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["\r\n\r\n","import App from './App'\n\n// #ifndef VUE3\nimport Vue from 'vue'\nimport './uni.promisify.adaptor'\nVue.config.productionTip = false\nApp.mpType = 'app'\nconst app = new Vue({\n ...App\n})\napp.$mount()\n// #endif\n\n// #ifdef VUE3\nimport { createSSRApp } from 'vue'\nexport function createApp() {\n const app = createSSRApp(App)\n return {\n app\n }\n}\n// #endif"],"names":["uni","createSSRApp","App"],"mappings":";;;;;;;;;;;;;;AAEC,MAAK,YAAU;AAAA,EACd,UAAU,WAAW;AAOpBA,kBAAAA,MAAA,MAAA,OAAA,iBAAY,YAAY;AAAA,EACxB;AAAA,EACD,QAAQ,WAAW;AAElBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACtB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACvB;AACD;ACJM,SAAS,YAAY;AAC1B,QAAM,MAAMC,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;;;"} \ No newline at end of file diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/index.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/index.js.map index 990a978..563070e 100644 --- a/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/index.js.map +++ b/unpackage/dist/dev/.sourcemap/mp-weixin/pages/mine/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["pages/mine/index.vue","pages/mine/index.vue?type=page"],"sourcesContent":["\r\n\r\n\r\n","import MiniProgramPage from '/Users/iuu/Developer/PHP/Work/cmgd/mini-app/pages/mine/index.vue'\nwx.createPage(MiniProgramPage)"],"names":["ref","onLoad","uni","onShow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA4IC,UAAM,MAAMA,kBAAI,CAAC;AACjB,UAAM,YAAYA,kBAAI,EAAE;AAoBxBC,kBAAAA,OAAO,aAAW;AACjB;IACF,CAAE;AAmBD,UAAM,OAAO,MAAM;AACFC,oBAAG,MAAC,eAAe,WAAW;AAC9C,UAAI,aAAaA,cAAAA,MAAI,eAAe,YAAY;AACrCA,oBAAG,MAAC,eAAe,MAAM;AACpC,UAAI,UAAUA,cAAAA,MAAI,eAAe,KAAK;AACtCA,oBAAA,MAAA,MAAA,OAAA,+BAAY,cAAc,UAAU;AACpC,UAAI,QAAQ;AACZ,gBAAU,QAAQ;AAAA,IAMlB;AAKDC,kBAAAA,OAAO,MAAM;AAEZD,oBAAAA,MAAY,MAAA,OAAA,+BAAA,MAAM;AAClB;IAkCF,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5OF,GAAG,WAAW,eAAe;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["pages/mine/index.vue","pages/mine/index.vue?type=page"],"sourcesContent":["\r\n\r\n\r\n","import MiniProgramPage from '/Users/iuu/Developer/PHP/Work/cmgd/mini-app/pages/mine/index.vue'\nwx.createPage(MiniProgramPage)"],"names":["ref","onLoad","uni","onShow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAgDC,UAAM,MAAMA,kBAAI,CAAC;AACjB,UAAM,YAAYA,kBAAI,EAAE;AAKxBC,kBAAAA,OAAO,aAAW;AACjB;IACF,CAAE;AAOD,UAAM,OAAO,MAAM;AACFC,oBAAG,MAAC,eAAe,WAAW;AAC9C,UAAI,aAAaA,cAAAA,MAAI,eAAe,YAAY;AACrCA,oBAAG,MAAC,eAAe,MAAM;AACpC,UAAI,UAAUA,cAAAA,MAAI,eAAe,KAAK;AACtCA,oBAAA,MAAA,MAAA,OAAA,8BAAY,cAAc,UAAU;AACpC,UAAI,QAAQ;AACZ,gBAAU,QAAQ;AAAA,IAElB;AAKDC,kBAAAA,OAAO,MAAM;AACZD,oBAAAA,MAAY,MAAA,OAAA,8BAAA,MAAM;AAClB;IACF,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/EF,GAAG,WAAW,eAAe;"} \ No newline at end of file diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/pages/order/index.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/pages/order/index.js.map index 455726a..8119469 100644 --- a/unpackage/dist/dev/.sourcemap/mp-weixin/pages/order/index.js.map +++ b/unpackage/dist/dev/.sourcemap/mp-weixin/pages/order/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["pages/order/index.vue","pages/order/index.vue?type=page"],"sourcesContent":["\r\n\r\n\r\n\r\n\r\n","import MiniProgramPage from '/Users/iuu/Developer/PHP/Work/cmgd/mini-app/pages/order/index.vue'\nwx.createPage(MiniProgramPage)"],"names":["ref","uni","fetchOrderList","onLoad","onShow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAoHC,UAAM,kBAAkBA,kBAAI,CAAC;AAE7B,UAAM,cAAc;AAAA,MAEnB;AAAA,QACC,OAAO;AAAA,QACP,QAAQ;AAAA,MACR;AAAA,MACD;AAAA,QACC,OAAO;AAAA,QACP,QAAQ;AAAA,MACR;AAAA,MACD;AAAA,QACC,OAAO;AAAA,QACP,QAAQ;AAAA,MACR;AAAA,MACD;AAAA,QACC,OAAO;AAAA,QACP,QAAQ;AAAA,MACR;AAAA,IAED;AAED,UAAM,WAAWA,kBAAI,CAAA,CAAE;AAEvB,UAAM,SAASA,kBAAI,IAAI;AAGvB,UAAM,cAAc,CAAC,MAAM,QAAQ;AAClC,sBAAgB,QAAQ;AACxB,aAAO,MAAM;IACb;AAeD,UAAM,YAAY,CAAC,SAAS,GAAG,WAAW,OAAO;AAChDC,uEAAY,YAAY,gBAAgB,KAAK,EAAE,QAAQ,CAAC;AACxD,YAAM,SAAS;AAAA,QACd,MAAM;AAAA,QACN,UAAU;AAAA,QACV,QAAQ,YAAY,gBAAgB,KAAK,EAAE,QAAQ;AAAA,MACnD;AACDC,gBAAAA,eAAe,MAAM,EAAE,KAAK,SAAO;AAClCD,sBAAAA,MAAY,MAAA,OAAA,gCAAA,GAAG;AACf,eAAO,MAAM,SAAS,IAAI,IAAI;AAAA,MACjC,CAAG,EAAE,MAAM,SAAO;AACf,eAAO,MAAM,SAAS,KAAK;AAAA,MAC9B,CAAG;AAAA,IACD;AAEDE,kBAAM,OAAC,CAAC,YAAY;AACnB,sBAAgB,QAAQ,SAAS,QAAQ,GAAG;AAAA,IAC9C,CAAE;AAMDC,kBAAAA,OAAO,MAAM;AAGZ,UAAI,OAAO,OAAO;AAEjB,eAAO,MAAM;MAGb;AAAA,IACH,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjMF,GAAG,WAAW,eAAe;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["pages/order/index.vue","pages/order/index.vue?type=page"],"sourcesContent":["\r\n\r\n\r\n\r\n\r\n","import MiniProgramPage from '/Users/iuu/Developer/PHP/Work/cmgd/mini-app/pages/order/index.vue'\nwx.createPage(MiniProgramPage)"],"names":["ref","uni","fetchOrderList","onLoad","onShow"],"mappings":";;;;;;;;;;;;;;;;;;;;AA4HC,UAAM,kBAAkBA,kBAAI,CAAC;AAE7B,UAAM,cAAc;AAAA,MAEnB;AAAA,QACC,OAAO;AAAA,QACP,QAAQ;AAAA,MACR;AAAA,MACD;AAAA,QACC,OAAO;AAAA,QACP,QAAQ;AAAA,MACR;AAAA,MACD;AAAA,QACC,OAAO;AAAA,QACP,QAAQ;AAAA,MACR;AAAA,MACD;AAAA,QACC,OAAO;AAAA,QACP,QAAQ;AAAA,MACR;AAAA,IAED;AAED,UAAM,WAAWA,kBAAI,CAAA,CAAE;AAEvB,UAAM,SAASA,kBAAI,IAAI;AAGvB,UAAM,cAAc,CAAC,MAAM,QAAQ;AAClC,sBAAgB,QAAQ;AACxB,aAAO,MAAM;IACb;AAeD,UAAM,YAAY,CAAC,SAAS,GAAG,WAAW,OAAO;AAChDC,uEAAY,YAAY,gBAAgB,KAAK,EAAE,QAAQ,CAAC;AACxD,YAAM,SAAS;AAAA,QACd,MAAM;AAAA,QACN,UAAU;AAAA,QACV,QAAQ,YAAY,gBAAgB,KAAK,EAAE,QAAQ;AAAA,MACnD;AACDC,gBAAAA,eAAe,MAAM,EAAE,KAAK,SAAO;AAClCD,sBAAAA,MAAY,MAAA,OAAA,gCAAA,GAAG;AACf,eAAO,MAAM,SAAS,IAAI,IAAI;AAAA,MACjC,CAAG,EAAE,MAAM,SAAO;AACf,eAAO,MAAM,SAAS,KAAK;AAAA,MAC9B,CAAG;AAAA,IACD;AAEDE,kBAAM,OAAC,CAAC,YAAY;AACnB,sBAAgB,QAAQ,SAAS,QAAQ,GAAG;AAAA,IAC9C,CAAE;AAMDC,kBAAAA,OAAO,MAAM;AAGZ,UAAI,OAAO,OAAO;AAEjB,eAAO,MAAM;MAGb;AAAA,IACH,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzMF,GAAG,WAAW,eAAe;"} \ No newline at end of file diff --git a/unpackage/dist/dev/.sourcemap/mp-weixin/utils/helper.js.map b/unpackage/dist/dev/.sourcemap/mp-weixin/utils/helper.js.map index 52eba9c..23e2f76 100644 --- a/unpackage/dist/dev/.sourcemap/mp-weixin/utils/helper.js.map +++ b/unpackage/dist/dev/.sourcemap/mp-weixin/utils/helper.js.map @@ -1 +1 @@ -{"version":3,"file":"helper.js","sources":["utils/helper.ts"],"sourcesContent":["\n\n\nconst tabbar_pages = [\n\t'/pages/index/index',\n\t'/pages/cart/index',\n\t'/pages/mine/index',\n]\n\n\nexport const navigateTo = (url : string) => {\n\tlet is_tabbar_pages = false\n\ttabbar_pages.forEach(item => {\n\t\tif (url.indexOf(item) === 0) {\n\t\t\tis_tabbar_pages = true\n\t\t}\n\t})\n\tif (is_tabbar_pages) {\n\t\tswitchTab(url)\n\t} else {\n\t\tuni.navigateTo({\n\t\t\turl: url\n\t\t})\n\t}\n\n}\n\nexport const switchTab = (url : string) => {\n\tuni.switchTab({\n\t\turl: url\n\t})\n}\n\nexport const goToLoginPage = (redirect_url ?: string) => {\n\tnavigateTo('/pages/login/index?redirect_url=' + redirect_url)\n}\n\n\n\n// export const showWechatImg = () => {\n// \tuni.previewImage({\n// \t\turls: ['https://qn.19year.cn/20250329143234415bb1067.jpg']\n// \t})\n// }\n// export const showWechatPayImg = () => {\n// \tuni.previewImage({\n// \t\turls: ['https://qn.19year.cn/20250330193232a6aca4595.jpg']\n// \t})\n// }\n\nexport const goToOtherMiniProgram = async () => {\n\ttry {\n\t\tconst res = await fetchConfig();\n\t\tconsole.log('config response:', res);\n\t\tconst appid = res.go_to_app_id;\n\t\tconst path = res.go_to_app_path;\n\t\tuni.navigateToMiniProgram({\n\t\t\tappId: appid, // 替换为目标小程序的appid\n\t\t\tpath: path,\n\t\t\tsuccess(res) {\n\t\t\t\tconsole.log('跳转成功', res);\n\t\t\t},\n\t\t\tfail(err) {\n\t\t\t\tconsole.error('跳转失败', err);\n\t\t\t}\n\t\t});\n\t} catch (error) {\n\t\tconsole.error('Failed to load shop config:', error);\n\t\tuni.showToast({\n\t\t\ttitle: '加载失败',\n\t\t\ticon: 'none'\n\t\t});\n\t}\n}\n\nexport const showPayImgs = async () => {\n try {\n const res = await fetchConfig();\n console.log('config response:', res);\n // 注意这里可能要根据你的实际数据结构调整\n const store_qr_codes = res.pay_qr_code?.map(item => item.url) || [];\n if (store_qr_codes.length === 0) {\n uni.showToast({\n title: '暂无图片',\n icon: 'none'\n });\n return;\n }\n console.log('preview images:', store_qr_codes);\n uni.previewImage({\n urls: store_qr_codes\n });\n } catch (error) {\n console.error('Failed to load shop config:', error);\n uni.showToast({\n title: '加载失败',\n icon: 'none'\n });\n }\n}\n\nexport const clearReactiveData = (obj) => {\n\tfor (const key in obj) {\n\t\tdelete obj[key]\n\t}\n}\n\n\n// export const switchCart = (type) => {\n// \tuni.setStorageSync('SHOPPING_CART_TYPE', type)\n// \tuni.switchTab({ url: '/pages/cart/index' })\n// }"],"names":["uni"],"mappings":";;AAGA,MAAM,eAAe;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AACD;AAGa,MAAA,aAAa,CAAC,QAAiB;AAC3C,MAAI,kBAAkB;AACtB,eAAa,QAAQ,CAAQ,SAAA;AAC5B,QAAI,IAAI,QAAQ,IAAI,MAAM,GAAG;AACV,wBAAA;AAAA,IACnB;AAAA,EAAA,CACA;AACD,MAAI,iBAAiB;AACpB,cAAU,GAAG;AAAA,EAAA,OACP;AACNA,kBAAAA,MAAI,WAAW;AAAA,MACd;AAAA,IAAA,CACA;AAAA,EACF;AAED;AAEa,MAAA,YAAY,CAAC,QAAiB;AAC1CA,gBAAAA,MAAI,UAAU;AAAA,IACb;AAAA,EAAA,CACA;AACF;AAEa,MAAA,gBAAgB,CAAC,iBAA2B;AACxD,aAAW,qCAAqC,YAAY;AAC7D;;;"} \ No newline at end of file +{"version":3,"file":"helper.js","sources":["utils/helper.ts"],"sourcesContent":["\n\n\nconst tabbar_pages = [\n\t'/pages/index/index',\n\t'/pages/todo/todoList',\n\t'/pages/mine/index',\n]\n\n\nexport const navigateTo = (url : string) => {\n\tlet is_tabbar_pages = false\n\ttabbar_pages.forEach(item => {\n\t\tif (url.indexOf(item) === 0) {\n\t\t\tis_tabbar_pages = true\n\t\t}\n\t})\n\tif (is_tabbar_pages) {\n\t\tswitchTab(url)\n\t} else {\n\t\tuni.navigateTo({\n\t\t\turl: url\n\t\t})\n\t}\n\n}\n\nexport const switchTab = (url : string) => {\n\tuni.switchTab({\n\t\turl: url\n\t})\n}\n\nexport const goToLoginPage = (redirect_url ?: string) => {\n\tnavigateTo('/pages/login/index?redirect_url=' + redirect_url)\n}\n\n\n\n// export const showWechatImg = () => {\n// \tuni.previewImage({\n// \t\turls: ['https://qn.19year.cn/20250329143234415bb1067.jpg']\n// \t})\n// }\n// export const showWechatPayImg = () => {\n// \tuni.previewImage({\n// \t\turls: ['https://qn.19year.cn/20250330193232a6aca4595.jpg']\n// \t})\n// }\n\n// export const goToOtherMiniProgram = async () => {\n// \ttry {\n// \t\tconst res = await fetchConfig();\n// \t\tconsole.log('config response:', res);\n// \t\tconst appid = res.go_to_app_id;\n// \t\tconst path = res.go_to_app_path;\n// \t\tuni.navigateToMiniProgram({\n// \t\t\tappId: appid, // 替换为目标小程序的appid\n// \t\t\tpath: path,\n// \t\t\tsuccess(res) {\n// \t\t\t\tconsole.log('跳转成功', res);\n// \t\t\t},\n// \t\t\tfail(err) {\n// \t\t\t\tconsole.error('跳转失败', err);\n// \t\t\t}\n// \t\t});\n// \t} catch (error) {\n// \t\tconsole.error('Failed to load shop config:', error);\n// \t\tuni.showToast({\n// \t\t\ttitle: '加载失败',\n// \t\t\ticon: 'none'\n// \t\t});\n// \t}\n// }\n\n// export const showPayImgs = async () => {\n// try {\n// const res = await fetchConfig();\n// console.log('config response:', res);\n// // 注意这里可能要根据你的实际数据结构调整\n// const store_qr_codes = res.pay_qr_code?.map(item => item.url) || [];\n// if (store_qr_codes.length === 0) {\n// uni.showToast({\n// title: '暂无图片',\n// icon: 'none'\n// });\n// return;\n// }\n// console.log('preview images:', store_qr_codes);\n// uni.previewImage({\n// urls: store_qr_codes\n// });\n// } catch (error) {\n// console.error('Failed to load shop config:', error);\n// uni.showToast({\n// title: '加载失败',\n// icon: 'none'\n// });\n// }\n// }\n\nexport const clearReactiveData = (obj) => {\n\tfor (const key in obj) {\n\t\tdelete obj[key]\n\t}\n}\n\n\n// export const switchCart = (type) => {\n// \tuni.setStorageSync('SHOPPING_CART_TYPE', type)\n// \tuni.switchTab({ url: '/pages/cart/index' })\n// }"],"names":["uni"],"mappings":";;AAGA,MAAM,eAAe;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AACD;AAGa,MAAA,aAAa,CAAC,QAAiB;AAC3C,MAAI,kBAAkB;AACtB,eAAa,QAAQ,CAAQ,SAAA;AAC5B,QAAI,IAAI,QAAQ,IAAI,MAAM,GAAG;AACV,wBAAA;AAAA,IACnB;AAAA,EAAA,CACA;AACD,MAAI,iBAAiB;AACpB,cAAU,GAAG;AAAA,EAAA,OACP;AACNA,kBAAAA,MAAI,WAAW;AAAA,MACd;AAAA,IAAA,CACA;AAAA,EACF;AAED;AAEa,MAAA,YAAY,CAAC,QAAiB;AAC1CA,gBAAAA,MAAI,UAAU;AAAA,IACb;AAAA,EAAA,CACA;AACF;AAEa,MAAA,gBAAgB,CAAC,iBAA2B;AACxD,aAAW,qCAAqC,YAAY;AAC7D;;;"} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/app.js b/unpackage/dist/dev/mp-weixin/app.js index 70894ee..d3b887c 100644 --- a/unpackage/dist/dev/mp-weixin/app.js +++ b/unpackage/dist/dev/mp-weixin/app.js @@ -11,7 +11,6 @@ if (!Math) { "./pages/index/goodsOrderAdd.js"; "./pages/mine/index.js"; "./pages/order/index.js"; - "./pages/order/detail.js"; } const _sfc_main = { onLaunch: function() { diff --git a/unpackage/dist/dev/mp-weixin/app.json b/unpackage/dist/dev/mp-weixin/app.json index 05586df..22746b1 100644 --- a/unpackage/dist/dev/mp-weixin/app.json +++ b/unpackage/dist/dev/mp-weixin/app.json @@ -8,8 +8,7 @@ "pages/index/orderEdit", "pages/index/goodsOrderAdd", "pages/mine/index", - "pages/order/index", - "pages/order/detail" + "pages/order/index" ], "window": { "navigationBarTextStyle": "black", diff --git a/unpackage/dist/dev/mp-weixin/pages/mine/index.js b/unpackage/dist/dev/mp-weixin/pages/mine/index.js index 514ef07..d43aac2 100644 --- a/unpackage/dist/dev/mp-weixin/pages/mine/index.js +++ b/unpackage/dist/dev/mp-weixin/pages/mine/index.js @@ -30,12 +30,12 @@ const _sfc_main = { let staff_name = common_vendor.index.getStorageSync("staff_name"); common_vendor.index.getStorageSync("role"); let user_id = common_vendor.index.getStorageSync("uid"); - common_vendor.index.__f__("log", "at pages/mine/index.vue:188", "staff_name", staff_name); + common_vendor.index.__f__("log", "at pages/mine/index.vue:69", "staff_name", staff_name); uid.value = user_id; staffName.value = staff_name; }; common_vendor.onShow(() => { - common_vendor.index.__f__("log", "at pages/mine/index.vue:203", "init"); + common_vendor.index.__f__("log", "at pages/mine/index.vue:79", "init"); init(); }); return (_ctx, _cache) => { diff --git a/unpackage/dist/dev/mp-weixin/pages/order/index.js b/unpackage/dist/dev/mp-weixin/pages/order/index.js index be298af..d810e87 100644 --- a/unpackage/dist/dev/mp-weixin/pages/order/index.js +++ b/unpackage/dist/dev/mp-weixin/pages/order/index.js @@ -5,17 +5,15 @@ if (!Array) { const _easycom_nut_tabs2 = common_vendor.resolveComponent("nut-tabs"); const _easycom_nut_sticky2 = common_vendor.resolveComponent("nut-sticky"); const _easycom_nut_tag2 = common_vendor.resolveComponent("nut-tag"); - const _easycom_nut_price2 = common_vendor.resolveComponent("nut-price"); const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging"); - (_easycom_nut_tabs2 + _easycom_nut_sticky2 + _easycom_nut_tag2 + _easycom_nut_price2 + _easycom_z_paging2)(); + (_easycom_nut_tabs2 + _easycom_nut_sticky2 + _easycom_nut_tag2 + _easycom_z_paging2)(); } const _easycom_nut_tabs = () => "../../uni_modules/nutui-uni/components/tabs/tabs.js"; const _easycom_nut_sticky = () => "../../uni_modules/nutui-uni/components/sticky/sticky.js"; const _easycom_nut_tag = () => "../../uni_modules/nutui-uni/components/tag/tag.js"; -const _easycom_nut_price = () => "../../uni_modules/nutui-uni/components/price/price.js"; const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js"; if (!Math) { - (_easycom_nut_tabs + _easycom_nut_sticky + _easycom_nut_tag + _easycom_nut_price + _easycom_z_paging)(); + (_easycom_nut_tabs + _easycom_nut_sticky + _easycom_nut_tag + _easycom_z_paging)(); } const _sfc_main = { __name: "index", @@ -46,14 +44,14 @@ const _sfc_main = { paging.value.reload(); }; const queryList = (pageNo = 1, pageSize = 10) => { - common_vendor.index.__f__("log", "at pages/order/index.vue:164", tabs_config[current_tab_idx.value]["status"]); + common_vendor.index.__f__("log", "at pages/order/index.vue:172", tabs_config[current_tab_idx.value]["status"]); const params = { page: pageNo, pageSize: 10, status: tabs_config[current_tab_idx.value]["status"] }; api_index.fetchOrderList(params).then((res) => { - common_vendor.index.__f__("log", "at pages/order/index.vue:171", res); + common_vendor.index.__f__("log", "at pages/order/index.vue:179", res); paging.value.complete(res.list); }).catch((res) => { paging.value.complete(false); @@ -168,27 +166,17 @@ const _sfc_main = { f: iidx }; }), - M: "17a44f9d-11-" + i0 + ",17a44f9d-2", - N: common_vendor.p({ - price: order.discount_amount, - size: "normal", - ["need-symbol"]: true - }), - O: "17a44f9d-12-" + i0 + ",17a44f9d-2", - P: common_vendor.p({ - price: order.total_price, - size: "normal", - ["need-symbol"]: true - }), - Q: order.remarks + M: common_vendor.t(order == null ? void 0 : order.discount_amount), + N: common_vendor.t(order == null ? void 0 : order.discount_amount), + O: order.remarks }, order.remarks ? {} : {}, { - R: order.remarks + P: order.remarks }, order.remarks ? { - S: common_vendor.t(order.remarks) + Q: common_vendor.t(order.remarks) } : {}, { - T: common_vendor.t(order.create_time), - U: common_vendor.t((_C = order == null ? void 0 : order.user) == null ? void 0 : _C.staff_name), - V: index + R: common_vendor.t(order.create_time), + S: common_vendor.t((_C = order == null ? void 0 : order.user) == null ? void 0 : _C.staff_name), + T: index }); }), e: common_vendor.p({ diff --git a/unpackage/dist/dev/mp-weixin/pages/order/index.json b/unpackage/dist/dev/mp-weixin/pages/order/index.json index b7fe359..ed65182 100644 --- a/unpackage/dist/dev/mp-weixin/pages/order/index.json +++ b/unpackage/dist/dev/mp-weixin/pages/order/index.json @@ -5,7 +5,6 @@ "nut-tabs": "../../uni_modules/nutui-uni/components/tabs/tabs", "nut-sticky": "../../uni_modules/nutui-uni/components/sticky/sticky", "nut-tag": "../../uni_modules/nutui-uni/components/tag/tag", - "nut-price": "../../uni_modules/nutui-uni/components/price/price", "z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging" } } \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/pages/order/index.wxml b/unpackage/dist/dev/mp-weixin/pages/order/index.wxml index a933202..30ad33a 100644 --- a/unpackage/dist/dev/mp-weixin/pages/order/index.wxml +++ b/unpackage/dist/dev/mp-weixin/pages/order/index.wxml @@ -1 +1 @@ -{{item.a}}房间订单商品订单{{order.h}}{{order.l}}{{order.p}}{{order.t}}{{order.z}}{{order.B}}{{order.D}}{{order.E}}超时{{order.I}}小时{{order.J}}{{order.K}}{{goods.a}}{{goods.c}}{{goods.d}}{{goods.e}}优惠:总计:备注{{order.S}}订单时间:{{order.T}}员工:{{order.U}} \ No newline at end of file +{{item.a}}房间订单商品订单{{order.h}}{{order.l}}{{order.p}}{{order.t}}{{order.z}} ¥{{order.B}} ¥{{order.D}}{{order.E}}超时{{order.I}}小时 ¥{{order.J}}{{order.K}}{{goods.a}}{{goods.c}} ¥{{goods.d}}{{goods.e}}优惠: ¥{{order.M}}总计: ¥{{order.N}}备注{{order.Q}}订单时间:{{order.R}}员工:{{order.S}} \ No newline at end of file diff --git a/unpackage/dist/dev/mp-weixin/utils/helper.js b/unpackage/dist/dev/mp-weixin/utils/helper.js index ba2d18c..5c4bb6d 100644 --- a/unpackage/dist/dev/mp-weixin/utils/helper.js +++ b/unpackage/dist/dev/mp-weixin/utils/helper.js @@ -2,7 +2,7 @@ const common_vendor = require("../common/vendor.js"); const tabbar_pages = [ "/pages/index/index", - "/pages/cart/index", + "/pages/todo/todoList", "/pages/mine/index" ]; const navigateTo = (url) => { diff --git a/utils/helper.ts b/utils/helper.ts index 3e5688f..c56146f 100644 --- a/utils/helper.ts +++ b/utils/helper.ts @@ -3,7 +3,7 @@ const tabbar_pages = [ '/pages/index/index', - '/pages/cart/index', + '/pages/todo/todoList', '/pages/mine/index', ] @@ -48,56 +48,56 @@ export const goToLoginPage = (redirect_url ?: string) => { // }) // } -export const goToOtherMiniProgram = async () => { - try { - const res = await fetchConfig(); - console.log('config response:', res); - const appid = res.go_to_app_id; - const path = res.go_to_app_path; - uni.navigateToMiniProgram({ - appId: appid, // 替换为目标小程序的appid - path: path, - success(res) { - console.log('跳转成功', res); - }, - fail(err) { - console.error('跳转失败', err); - } - }); - } catch (error) { - console.error('Failed to load shop config:', error); - uni.showToast({ - title: '加载失败', - icon: 'none' - }); - } -} +// export const goToOtherMiniProgram = async () => { +// try { +// const res = await fetchConfig(); +// console.log('config response:', res); +// const appid = res.go_to_app_id; +// const path = res.go_to_app_path; +// uni.navigateToMiniProgram({ +// appId: appid, // 替换为目标小程序的appid +// path: path, +// success(res) { +// console.log('跳转成功', res); +// }, +// fail(err) { +// console.error('跳转失败', err); +// } +// }); +// } catch (error) { +// console.error('Failed to load shop config:', error); +// uni.showToast({ +// title: '加载失败', +// icon: 'none' +// }); +// } +// } -export const showPayImgs = async () => { - try { - const res = await fetchConfig(); - console.log('config response:', res); - // 注意这里可能要根据你的实际数据结构调整 - const store_qr_codes = res.pay_qr_code?.map(item => item.url) || []; - if (store_qr_codes.length === 0) { - uni.showToast({ - title: '暂无图片', - icon: 'none' - }); - return; - } - console.log('preview images:', store_qr_codes); - uni.previewImage({ - urls: store_qr_codes - }); - } catch (error) { - console.error('Failed to load shop config:', error); - uni.showToast({ - title: '加载失败', - icon: 'none' - }); - } -} +// export const showPayImgs = async () => { +// try { +// const res = await fetchConfig(); +// console.log('config response:', res); +// // 注意这里可能要根据你的实际数据结构调整 +// const store_qr_codes = res.pay_qr_code?.map(item => item.url) || []; +// if (store_qr_codes.length === 0) { +// uni.showToast({ +// title: '暂无图片', +// icon: 'none' +// }); +// return; +// } +// console.log('preview images:', store_qr_codes); +// uni.previewImage({ +// urls: store_qr_codes +// }); +// } catch (error) { +// console.error('Failed to load shop config:', error); +// uni.showToast({ +// title: '加载失败', +// icon: 'none' +// }); +// } +// } export const clearReactiveData = (obj) => { for (const key in obj) {