From 5b9bef92143b104d88ff1913349b906c97e096f3 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Fri, 16 Jan 2026 12:00:21 +0800 Subject: [PATCH] =?UTF-8?q?chore(build):=20=E8=B0=83=E6=95=B4=E4=B8=AA?= =?UTF-8?q?=E5=88=AB=E7=BB=84=E4=BB=B6=E7=9A=84=E4=BD=8D=E7=BD=AE=EF=BC=8C?= =?UTF-8?q?=E5=87=8F=E5=B0=91=E5=AF=B9=E4=B8=BB=E5=8C=85=E5=B0=BA=E5=AF=B8?= =?UTF-8?q?=E7=9A=84=E5=BD=B1=E5=93=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/js/uniapp.utils.js | 89 ++ components-diy/diy-kefu.vue | 2 +- .../xiao-star-component.vue | 468 +++++----- docs/components_usage_documentation.md | 834 ++++++++++++++++++ pages/contact/contact.vue | 511 ----------- .../_components}/goods-detail-view/detail.js | 0 .../goods-detail-view/goods-detail-view.vue | 199 +++-- .../ns-goods-promotion/ns-goods-promotion.vue | 0 .../pengpai-fadein-out/pengpai-fadein-out.vue | 0 pages_goods/detail.vue | 13 +- .../common-payment/common-payment.vue | 3 - .../_components}/common-payment/payment.js | 0 pages_order/payment.vue | 5 + .../img-cropping/img-cropping.vue | 0 .../_components}/myp-one/myp-one.vue | 0 .../ns-birthday-gift/ns-birthday-gift.vue | 0 .../_components}/ns-new-gift/ns-new-gift.vue | 0 .../_components}/ns-newform/ns-newform.vue | 0 .../_components}/sx-rate/common.js | 0 .../_components/sx-rate/fonts}/iconfont.eot | Bin .../_components/sx-rate/fonts}/iconfont.svg | 0 .../_components/sx-rate/fonts}/iconfont.ttf | Bin .../_components/sx-rate/fonts}/iconfont.woff | Bin .../_components/sx-rate/fonts}/iconfont.woff2 | Bin .../_components}/sx-rate/iconfont.css | 13 +- .../_components}/sx-rate/sx-rate.vue | 4 +- pages_tool/contact/contact.vue | 181 ++-- pages_tool/form/formdata.vue | 6 + pages_tool/login/find.vue | 6 + pages_tool/member/index.vue | 7 + pages_tool/member/modify_face.vue | 293 +++--- pages_tool/member/pay_password.vue | 4 + pages_tool/order/evaluate.vue | 56 +- 33 files changed, 1588 insertions(+), 1106 deletions(-) create mode 100644 common/js/uniapp.utils.js create mode 100644 docs/components_usage_documentation.md delete mode 100644 pages/contact/contact.vue rename {components => pages_goods/_components}/goods-detail-view/detail.js (100%) rename {components => pages_goods/_components}/goods-detail-view/goods-detail-view.vue (75%) rename {components => pages_goods/_components}/ns-goods-promotion/ns-goods-promotion.vue (100%) rename {components => pages_goods/_components}/pengpai-fadein-out/pengpai-fadein-out.vue (100%) rename {components => pages_order/_components}/common-payment/common-payment.vue (99%) rename {components => pages_order/_components}/common-payment/payment.js (100%) rename {components => pages_tool/_components}/img-cropping/img-cropping.vue (100%) rename {components => pages_tool/_components}/myp-one/myp-one.vue (100%) rename {components => pages_tool/_components}/ns-birthday-gift/ns-birthday-gift.vue (100%) rename {components => pages_tool/_components}/ns-new-gift/ns-new-gift.vue (100%) rename {components => pages_tool/_components}/ns-newform/ns-newform.vue (100%) rename {components => pages_tool/_components}/sx-rate/common.js (100%) rename {components/sx-rate/sx-rate => pages_tool/_components/sx-rate/fonts}/iconfont.eot (100%) rename {components/sx-rate/sx-rate => pages_tool/_components/sx-rate/fonts}/iconfont.svg (100%) rename {components/sx-rate/sx-rate => pages_tool/_components/sx-rate/fonts}/iconfont.ttf (100%) rename {components/sx-rate/sx-rate => pages_tool/_components/sx-rate/fonts}/iconfont.woff (100%) rename {components/sx-rate/sx-rate => pages_tool/_components/sx-rate/fonts}/iconfont.woff2 (100%) rename {components/sx-rate => pages_tool/_components}/sx-rate/iconfont.css (68%) rename {components => pages_tool/_components}/sx-rate/sx-rate.vue (93%) diff --git a/common/js/uniapp.utils.js b/common/js/uniapp.utils.js new file mode 100644 index 0000000..e450d28 --- /dev/null +++ b/common/js/uniapp.utils.js @@ -0,0 +1,89 @@ +/** + * 将常用的Uniapp提供的函数,存放到这里,按需引用 + */ + + +/** + * 显示错误信息 + * @param {Exception} err + */ +const showError = (err) => { + uni.showToast({ + title: err?.message || err?.errMsg || err?.toString(), + icon: 'none', + duration: 2000 + }); +} + +/** + * 打电话 + * @param {string} mobile 电话号码 + */ +export const makePhoneCall = (mobile) => { + try { + uni.makePhoneCall({ + phoneNumber: `${mobile}`, + success(e) { + console.log(e); + } + }); + } catch (err) { + showError(err); + } +} + +/** + * 拷贝文本 + * @param {*} text + * @param {*} options + */ +export const copyText = (text, { copySuccess = '', copyFailed = '' } = {}) => { + try { + console.log('copyText'); + uni.setClipboardData({ + data: `${text}`, + success: () => { + console.error('复制成功'); + try { + uni.showToast({ + title: copySuccess, + icon: 'success', + duration: 2000 + }); + } catch (e) { + showError(e); + } + }, + fail: (err) => { + console.error('复制失败:', err); + try { + uni.showToast({ + title: err.message || err.errMsg || copyFailed, + icon: 'none', + duration: 2000 + }); + } catch (e) { + showError(e); + } + } + }); + } catch (err) { + showError(err); + } +} + +/** + * 打开定位 + * @param {Object} options + */ +export const openLocation = ({ latitude, longitude, name } = {}) => { + try { + uni.openLocation({ + latitude, + longitude, + name, + }); + } catch (err) { + showError(err); + } +} \ No newline at end of file diff --git a/components-diy/diy-kefu.vue b/components-diy/diy-kefu.vue index 4a631a4..7f68ecd 100644 --- a/components-diy/diy-kefu.vue +++ b/components-diy/diy-kefu.vue @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/components/ns-goods-promotion/ns-goods-promotion.vue b/pages_goods/_components/ns-goods-promotion/ns-goods-promotion.vue similarity index 100% rename from components/ns-goods-promotion/ns-goods-promotion.vue rename to pages_goods/_components/ns-goods-promotion/ns-goods-promotion.vue diff --git a/components/pengpai-fadein-out/pengpai-fadein-out.vue b/pages_goods/_components/pengpai-fadein-out/pengpai-fadein-out.vue similarity index 100% rename from components/pengpai-fadein-out/pengpai-fadein-out.vue rename to pages_goods/_components/pengpai-fadein-out/pengpai-fadein-out.vue diff --git a/pages_goods/detail.vue b/pages_goods/detail.vue index 2328b31..5e7d1f1 100644 --- a/pages_goods/detail.vue +++ b/pages_goods/detail.vue @@ -519,12 +519,19 @@ - \ No newline at end of file diff --git a/pages_tool/form/formdata.vue b/pages_tool/form/formdata.vue index 7743cc8..db3deb7 100644 --- a/pages_tool/form/formdata.vue +++ b/pages_tool/form/formdata.vue @@ -20,7 +20,13 @@ \ No newline at end of file diff --git a/pages_tool/member/pay_password.vue b/pages_tool/member/pay_password.vue index 233fd4a..0511b4b 100644 --- a/pages_tool/member/pay_password.vue +++ b/pages_tool/member/pay_password.vue @@ -16,7 +16,11 @@ \ No newline at end of file