From 4cb256af6c9b9c364f398b0104f8dc2e1272a59c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=90=BD=E6=97=A5=E6=99=9A=E9=A3=8E?= <1811466536@qq.com>
Date: Mon, 18 Dec 2023 14:02:47 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E6=B8=85=E7=A9=BA=E4=BB=A3=E7=A0=81-?=
=?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96yudao?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 1429 ++++++++---------
pages/app/score-shop.vue | 77 -
pages/coupon/detail.vue | 650 ++++----
pages/coupon/list.vue | 451 +++---
pages/goods/comment/add.vue | 158 +-
.../components/detail/detail-cell-params.vue | 115 --
.../components/detail/detail-cell-service.vue | 121 --
pages/goods/components/detail/detail-cell.vue | 2 +-
.../components/detail/detail-content-card.vue | 3 +-
.../goods/components/detail/detail-navbar.vue | 1 +
.../components/detail/detail-progress.vue | 1 +
.../goods/components/detail/detail-tabbar.vue | 46 +-
.../goods/components/list/list-goods-card.vue | 2 +-
pages/goods/components/list/list-navbar.vue | 1 +
pages/goods/groupon.vue | 10 +-
pages/goods/index.vue | 97 +-
pages/goods/list.vue | 218 +--
pages/goods/score.vue | 368 -----
pages/goods/seckill.vue | 4 -
pages/index/index.vue | 3 -
pages/index/search.vue | 10 +-
pages/order/aftersale/apply.vue | 517 +++---
pages/order/aftersale/detail.vue | 190 +--
pages/order/aftersale/list.vue | 165 +-
pages/order/aftersale/log-item.vue | 42 +-
pages/order/aftersale/log.vue | 36 +-
pages/order/confirm.vue | 722 ++++-----
pages/order/detail.vue | 1171 +++++++-------
pages/order/dispatch/content.vue | 84 -
pages/order/express/list.vue | 104 --
pages/order/express/log.vue | 86 +-
pages/order/invoice.vue | 329 ----
pages/order/list.vue | 373 ++---
pages/pay/index.vue | 178 +-
pages/pay/result.vue | 120 +-
pages/public/error.vue | 11 +-
pages/public/feedback.vue | 226 ---
pages/public/setting.vue | 47 +-
pages/public/webview.vue | 5 +-
pages/user/address/edit.vue | 203 ++-
pages/user/address/list.vue | 28 +-
pages/user/goods-collect.vue | 129 +-
pages/user/info.vue | 130 +-
pages/user/invoice/edit.vue | 277 ----
pages/user/invoice/list.vue | 82 -
pages/user/set.vue | 88 -
pages/user/wallet/money.vue | 631 ++++----
sheep/api/app.js | 95 --
sheep/api/coupon.js | 18 +-
sheep/api/index.js | 5 +-
sheep/api/infra/file.js | 49 +
sheep/api/member/address.js | 45 +
sheep/api/member/auth.js | 42 +
sheep/api/member/user.js | 32 +
sheep/api/order.js | 6 -
sheep/api/pay/channel.js | 14 +
sheep/api/pay/order.js | 22 +
sheep/api/pay/wallet.js | 26 +
sheep/api/product/category.js | 23 +-
sheep/api/product/favorite.js | 44 +
sheep/api/promotion/coupon.js | 44 +-
sheep/api/system/area.js | 13 +
sheep/api/trade/afterSale.js | 45 +
sheep/api/trade/cart.js | 47 +
sheep/api/trade/config.js | 14 +
sheep/api/trade/order.js | 103 ++
sheep/api/user.js | 112 --
.../s-address-item/s-address-item.vue | 18 +-
.../s-auth-modal/components/account-login.vue | 2 +-
.../components/change-password.vue | 105 +-
.../components/change-username.vue | 72 -
.../components/reset-password.vue | 33 +-
.../s-auth-modal/components/sms-login.vue | 24 +-
.../s-auth-modal/components/sms-register.vue | 130 --
.../components/s-auth-modal/s-auth-modal.vue | 27 +-
.../components/s-block-item/s-block-item.vue | 6 +-
.../components/s-coupon-get/s-coupon-get.vue | 19 +-
.../s-coupon-list/s-coupon-list.vue | 346 ++--
.../components/s-float-menu/s-float-menu.vue | 14 +-
.../s-goods-column/s-goods-column.vue | 31 +-
.../components/s-goods-item/s-goods-item.vue | 11 +-
.../s-goods-scroll/s-goods-scroll.vue | 3 +-
.../s-hotzone-block/s-hotzone-block.vue | 14 +-
.../s-invoice-item/s-invoice-item.vue | 96 --
.../s-menu-button/s-menu-button.vue | 8 +-
.../components/s-menu-tools/s-menu-tools.vue | 8 +-
.../s-notice-block/s-notice-block.vue | 2 +-
.../s-score-block/s-score-block.vue | 202 ---
.../components/s-score-card/s-score-card.vue | 459 ------
sheep/components/s-statusbar/s-statusbar.vue | 2 +-
.../s-title-block/s-title-block.vue | 58 +-
sheep/hooks/useGoods.js | 198 ++-
sheep/hooks/useModal.js | 27 +-
sheep/platform/pay.js | 132 +-
sheep/request/index.js | 13 +-
sheep/request2/index.js | 7 +-
sheep/store/cart.js | 101 +-
sheep/store/modal.js | 3 +-
sheep/store/user.js | 39 +-
.../ui/su-region-picker/su-region-picker.vue | 3 +-
sheep/util/index.js | 13 +
sheep/validate/form.js | 29 -
102 files changed, 4959 insertions(+), 7836 deletions(-)
delete mode 100644 pages/app/score-shop.vue
delete mode 100644 pages/goods/components/detail/detail-cell-params.vue
delete mode 100644 pages/goods/components/detail/detail-cell-service.vue
delete mode 100644 pages/goods/score.vue
delete mode 100644 pages/order/dispatch/content.vue
delete mode 100644 pages/order/express/list.vue
delete mode 100644 pages/order/invoice.vue
delete mode 100644 pages/public/feedback.vue
delete mode 100644 pages/user/invoice/edit.vue
delete mode 100644 pages/user/invoice/list.vue
delete mode 100644 pages/user/set.vue
create mode 100644 sheep/api/infra/file.js
create mode 100644 sheep/api/member/address.js
create mode 100644 sheep/api/member/auth.js
create mode 100644 sheep/api/member/user.js
create mode 100644 sheep/api/pay/channel.js
create mode 100644 sheep/api/pay/order.js
create mode 100644 sheep/api/pay/wallet.js
create mode 100644 sheep/api/product/favorite.js
create mode 100644 sheep/api/system/area.js
create mode 100644 sheep/api/trade/afterSale.js
create mode 100644 sheep/api/trade/cart.js
create mode 100644 sheep/api/trade/config.js
create mode 100644 sheep/api/trade/order.js
delete mode 100644 sheep/components/s-auth-modal/components/change-username.vue
delete mode 100644 sheep/components/s-auth-modal/components/sms-register.vue
delete mode 100644 sheep/components/s-invoice-item/s-invoice-item.vue
delete mode 100644 sheep/components/s-score-block/s-score-block.vue
delete mode 100644 sheep/components/s-score-card/s-score-card.vue
diff --git a/pages.json b/pages.json
index 84f07a8d..70ff2492 100644
--- a/pages.json
+++ b/pages.json
@@ -1,758 +1,675 @@
{
- "easycom": {
- "autoscan": true,
- "custom": {
- "^s-(.*)": "@/sheep/components/s-$1/s-$1.vue",
- "^su-(.*)": "@/sheep/ui/su-$1/su-$1.vue"
- }
- },
- "pages": [{
- "path": "pages/index/index",
- "aliasPath": "/",
- "style": {
- "navigationBarTitleText": "首页",
- "enablePullDownRefresh": true
- },
- "meta": {
- "auth": false,
- "sync": true,
- "title": "首页",
- "group": "商城"
- }
- },
- {
- "path": "pages/index/user",
- "style": {
- "navigationBarTitleText": "个人中心",
- "enablePullDownRefresh": true
- },
- "meta": {
- "sync": true,
- "title": "个人中心",
- "group": "商城"
- }
- },
- {
- "path": "pages/index/category",
- "style": {
- "navigationBarTitleText": "商品分类"
- },
- "meta": {
- "sync": true,
- "title": "商品分类",
- "group": "商城"
- }
- },
- {
- "path": "pages/index/cart",
- "style": {
- "navigationBarTitleText": "购物车"
- },
- "meta": {
- "sync": true,
- "title": "购物车",
- "group": "商城"
- }
- },
- {
- "path": "pages/index/login",
- "style": {
- "navigationBarTitleText": "登录"
- }
- },
- {
- "path": "pages/index/search",
- "style": {
- "navigationBarTitleText": "搜索"
- },
- "meta": {
- "sync": true,
- "title": "搜索",
- "group": "商城"
- }
- },
- {
- "path": "pages/index/page",
- "style": {
- "navigationBarTitleText": ""
- },
- "meta": {
- "auth": false,
- "sync": true,
- "title": "自定义页面",
- "group": "商城"
- }
- }
- ],
- "subPackages": [{
- "root": "pages/goods",
- "pages": [{
- "path": "index",
- "style": {
- "navigationBarTitleText": "商品详情"
- },
- "meta": {
- "sync": true,
- "title": "普通商品",
- "group": "商品"
- }
- },
- {
- "path": "groupon",
- "style": {
- "navigationBarTitleText": "拼团商品"
- },
- "meta": {
- "sync": true,
- "title": "拼团商品",
- "group": "商品"
- }
- },
+ "easycom": {
+ "autoscan": true,
+ "custom": {
+ "^s-(.*)": "@/sheep/components/s-$1/s-$1.vue",
+ "^su-(.*)": "@/sheep/ui/su-$1/su-$1.vue"
+ }
+ },
+ "pages": [
+ {
+ "path": "pages/index/index",
+ "aliasPath": "/",
+ "style": {
+ "navigationBarTitleText": "首页",
+ "enablePullDownRefresh": true
+ },
+ "meta": {
+ "auth": false,
+ "sync": true,
+ "title": "首页",
+ "group": "商城"
+ }
+ },
+ {
+ "path": "pages/index/user",
+ "style": {
+ "navigationBarTitleText": "个人中心",
+ "enablePullDownRefresh": true
+ },
+ "meta": {
+ "sync": true,
+ "title": "个人中心",
+ "group": "商城"
+ }
+ },
+ {
+ "path": "pages/index/category",
+ "style": {
+ "navigationBarTitleText": "商品分类"
+ },
+ "meta": {
+ "sync": true,
+ "title": "商品分类",
+ "group": "商城"
+ }
+ },
+ {
+ "path": "pages/index/cart",
+ "style": {
+ "navigationBarTitleText": "购物车"
+ },
+ "meta": {
+ "sync": true,
+ "title": "购物车",
+ "group": "商城"
+ }
+ },
+ {
+ "path": "pages/index/login",
+ "style": {
+ "navigationBarTitleText": "登录"
+ }
+ },
+ {
+ "path": "pages/index/search",
+ "style": {
+ "navigationBarTitleText": "搜索"
+ },
+ "meta": {
+ "sync": true,
+ "title": "搜索",
+ "group": "商城"
+ }
+ },
+ {
+ "path": "pages/index/page",
+ "style": {
+ "navigationBarTitleText": ""
+ },
+ "meta": {
+ "auth": false,
+ "sync": true,
+ "title": "自定义页面",
+ "group": "商城"
+ }
+ }
+ ],
+ "subPackages": [
+ {
+ "root": "pages/goods",
+ "pages": [
+ {
+ "path": "index",
+ "style": {
+ "navigationBarTitleText": "商品详情"
+ },
+ "meta": {
+ "sync": true,
+ "title": "普通商品",
+ "group": "商品"
+ }
+ },
+ {
+ "path": "groupon",
+ "style": {
+ "navigationBarTitleText": "拼团商品"
+ },
+ "meta": {
+ "sync": true,
+ "title": "拼团商品",
+ "group": "商品"
+ }
+ },
- {
- "path": "seckill",
- "style": {
- "navigationBarTitleText": "秒杀商品"
- },
- "meta": {
- "sync": true,
- "title": "秒杀商品",
- "group": "商品"
- }
- },
-
- {
- "path": "score",
- "style": {
- "navigationBarTitleText": "积分商品"
- },
- "meta": {
- "sync": true,
- "title": "积分商品",
- "group": "商品"
- }
- },
- {
- "path": "list",
- "style": {
- "navigationBarTitleText": "商品列表"
- },
- "meta": {
- "sync": true,
- "title": "商品列表",
- "group": "商品"
- }
- },
- {
- "path": "comment/add",
- "style": {
- "navigationBarTitleText": "评价商品"
- },
- "meta": {
- "auth": true
- }
- },
- {
- "path": "comment/list",
- "style": {
- "navigationBarTitleText": "商品评价"
- }
- }
- ]
- },
- {
- "root": "pages/order",
- "pages": [{
- "path": "detail",
- "style": {
- "navigationBarTitleText": "订单详情"
- },
- "meta": {
- "auth": true,
- "title": "订单详情"
- }
- },
- {
- "path": "confirm",
- "style": {
- "navigationBarTitleText": "确认订单"
- },
- "meta": {
- "auth": true,
- "title": "确认订单"
- }
- },
- {
- "path": "list",
- "style": {
- "navigationBarTitleText": "我的订单",
- "enablePullDownRefresh": true
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "用户订单",
- "group": "订单中心"
- }
- },
- {
- "path": "invoice",
- "style": {
- "navigationBarTitleText": "发票详情"
- },
- "meta": {
- "auth": true,
- "title": "发票详情"
- }
- },
- {
- "path": "dispatch/content",
- "style": {
- "navigationBarTitleText": "发货内容"
- },
- "meta": {
- "auth": true,
- "title": "发货内容"
- }
- },
- {
- "path": "aftersale/apply",
- "style": {
- "navigationBarTitleText": "申请售后"
- },
- "meta": {
- "auth": true,
- "title": "申请售后"
- }
- },
- {
- "path": "aftersale/list",
- "style": {
- "navigationBarTitleText": "售后列表"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "售后订单",
- "group": "订单中心"
- }
- },
- {
- "path": "aftersale/detail",
- "style": {
- "navigationBarTitleText": "售后详情"
- },
- "meta": {
- "auth": true,
- "title": "售后详情"
- }
- },
- {
- "path": "aftersale/log",
- "style": {
- "navigationBarTitleText": "售后进度"
- },
- "meta": {
- "auth": true,
- "title": "售后进度"
- }
- },
- {
- "path": "express/log",
- "style": {
- "navigationBarTitleText": "物流轨迹"
- },
- "meta": {
- "auth": true,
- "title": "物流轨迹"
- }
- },
- {
- "path": "express/list",
- "style": {
- "navigationBarTitleText": "订单包裹"
- },
- "meta": {
- "auth": true,
- "title": "订单包裹"
- }
- }, {
- "path": "aftersale/eturn-delivery",
- "style": {
- "navigationBarTitleText": "退货物流"
- },
- "meta": {
- "auth": true
- // "title": "退货物流"
- }
- }
- ]
- },
- {
- "root": "pages/user",
- "pages": [{
- "path": "info",
- "style": {
- "navigationBarTitleText": "我的信息"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "用户信息",
- "group": "用户中心"
- }
- },
- {
- "path": "goods-collect",
- "style": {
- "navigationBarTitleText": "我的收藏"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "商品收藏",
- "group": "用户中心"
- }
- },
- {
- "path": "goods-log",
- "style": {
- "navigationBarTitleText": "我的足迹"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "浏览记录",
- "group": "用户中心"
- }
- },
- {
- "path": "address/list",
- "style": {
- "navigationBarTitleText": "收货地址"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "地址管理",
- "group": "用户中心"
- }
- },
- {
- "path": "address/edit",
- "style": {
- "navigationBarTitleText": "编辑地址"
- },
- "meta": {
- "auth": true,
- "title": "编辑地址"
- }
- },
- {
- "path": "invoice/list",
- "style": {
- "navigationBarTitleText": "发票管理"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "发票管理",
- "group": "用户中心"
- }
- },
- {
- "path": "invoice/edit",
- "style": {
- "navigationBarTitleText": "编辑发票"
- },
- "meta": {
- "auth": true,
- "title": "编辑发票"
- }
- },
- {
- "path": "wallet/money",
- "style": {
- "navigationBarTitleText": "我的余额"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "用户余额",
- "group": "用户中心"
- }
- },
- {
- "path": "wallet/commission",
- "style": {
- "navigationBarTitleText": "我的佣金"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "用户佣金",
- "group": "分销中心"
- }
- },
- {
- "path": "wallet/score",
- "style": {
- "navigationBarTitleText": "我的积分"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "用户积分",
- "group": "用户中心"
- }
- }
- ]
- },
- {
- "root": "pages/commission",
- "pages": [{
- "path": "index",
- "style": {
- "navigationBarTitleText": "分销"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "分销中心",
- "group": "分销商城"
- }
- },
- {
- "path": "apply",
- "style": {
- "navigationBarTitleText": "申请分销商"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "申请分销商",
- "group": "分销商城"
- }
- },
- {
- "path": "goods",
- "style": {
- "navigationBarTitleText": "推广商品"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "推广商品",
- "group": "分销商城"
- }
- },
- {
- "path": "order",
- "style": {
- "navigationBarTitleText": "分销订单"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "分销订单",
- "group": "分销商城"
- }
- },
- {
- "path": "share-log",
- "style": {
- "navigationBarTitleText": "分享记录"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "分享记录",
- "group": "分销商城"
- }
- },
- {
- "path": "team",
- "style": {
- "navigationBarTitleText": "我的团队"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "我的团队",
- "group": "分销商城"
- }
- }
- ]
- },
- {
- "root": "pages/app",
- "pages": [{
- "path": "sign",
- "style": {
- "navigationBarTitleText": "签到中心"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "签到中心",
- "group": "应用"
- }
- },
- {
- "path": "score-shop",
- "style": {
- "navigationBarTitleText": "积分商城"
- },
- "meta": {
- "auth": false,
- "sync": true,
- "title": "积分商城",
- "group": "应用"
- }
- }
- ]
- },
- {
- "root": "pages/public",
- "pages": [{
- "path": "setting",
- "style": {
- "navigationBarTitleText": "系统设置"
- },
- "meta": {
- "sync": true,
- "title": "系统设置",
- "group": "通用"
- }
- },
- {
- "path": "feedback",
- "style": {
- "navigationBarTitleText": "问题反馈"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "问题反馈",
- "group": "通用"
- }
- },
- {
- "path": "richtext",
- "style": {
- "navigationBarTitleText": "富文本"
- },
- "meta": {
- "sync": true,
- "title": "富文本",
- "group": "通用"
- }
- },
- {
- "path": "faq",
- "style": {
- "navigationBarTitleText": "常见问题"
- },
- "meta": {
- "sync": true,
- "title": "常见问题",
- "group": "通用"
- }
- },
- {
- "path": "error",
- "style": {
- "navigationBarTitleText": "错误页面"
- }
- },
- {
- "path": "webview",
- "style": {
- "navigationBarTitleText": ""
- }
- }
- ]
- },
- {
- "root": "pages/coupon",
- "pages": [{
- "path": "list",
- "style": {
- "navigationBarTitleText": "领券中心"
- },
- "meta": {
- "sync": true,
- "title": "领券中心",
- "group": "优惠券"
- }
- },
- {
- "path": "detail",
- "style": {
- "navigationBarTitleText": "优惠券"
- },
- "meta": {
- "auth": false,
- "sync": true,
- "title": "优惠券详情",
- "group": "优惠券"
- }
- }
- ]
- },
- {
- "root": "pages/chat",
- "pages": [{
- "path": "index",
- "style": {
- "navigationBarTitleText": "客服"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "客服",
- "group": "客服"
- }
- }]
- },
- {
- "root": "pages/pay",
- "pages": [{
- "path": "index",
- "style": {
- "navigationBarTitleText": "收银台"
- }
- },
- {
- "path": "result",
- "style": {
- "navigationBarTitleText": "支付结果"
- }
- },
- {
- "path": "recharge",
- "style": {
- "navigationBarTitleText": "充值余额"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "充值余额",
- "group": "支付"
- }
- },
- {
- "path": "recharge-log",
- "style": {
- "navigationBarTitleText": "充值记录"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "充值记录",
- "group": "支付"
- }
- },
- {
- "path": "withdraw",
- "style": {
- "navigationBarTitleText": "申请提现"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "申请提现",
- "group": "支付"
- }
- },
- {
- "path": "withdraw-log",
- "style": {
- "navigationBarTitleText": "提现记录"
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "提现记录",
- "group": "支付"
- }
- }
- ]
- },
- {
- "root": "pages/activity",
- "pages": [{
- "path": "groupon/detail",
- "style": {
- "navigationBarTitleText": "拼团详情"
- }
- },
- {
- "path": "groupon/order",
- "style": {
- "navigationBarTitleText": "我的拼团",
- "enablePullDownRefresh": true
- },
- "meta": {
- "auth": true,
- "sync": true,
- "title": "拼团订单",
- "group": "营销活动"
- }
- },
- {
- "path": "index",
- "style": {
- "navigationBarTitleText": "营销商品"
- },
- "meta": {
- "sync": true,
- "title": "营销商品",
- "group": "营销活动"
- }
- },
- {
- "path": "groupon/list",
- "style": {
- "navigationBarTitleText": "拼团活动"
- },
- "meta": {
- "sync": true,
- "title": "拼团活动",
- "group": "营销活动"
- }
- },
- {
- "path": "seckill/list",
- "style": {
- "navigationBarTitleText": "秒杀活动"
- },
- "meta": {
- "sync": true,
- "title": "秒杀活动",
- "group": "营销活动"
- }
- }
- ]
- }
- ],
- "globalStyle": {
- "navigationBarTextStyle": "black",
- "navigationBarTitleText": "星品购",
- "navigationBarBackgroundColor": "#FFFFFF",
- "backgroundColor": "#FFFFFF",
- "navigationStyle": "custom"
- },
- "tabBar": {
- "list": [{
- "pagePath": "pages/index/index"
- },
- {
- "pagePath": "pages/index/cart"
- },
- {
- "pagePath": "pages/index/user"
- }
- ]
- }
-}
\ No newline at end of file
+ {
+ "path": "seckill",
+ "style": {
+ "navigationBarTitleText": "秒杀商品"
+ },
+ "meta": {
+ "sync": true,
+ "title": "秒杀商品",
+ "group": "商品"
+ }
+ },
+ {
+ "path": "list",
+ "style": {
+ "navigationBarTitleText": "商品列表"
+ },
+ "meta": {
+ "sync": true,
+ "title": "商品列表",
+ "group": "商品"
+ }
+ },
+ {
+ "path": "comment/add",
+ "style": {
+ "navigationBarTitleText": "评价商品"
+ },
+ "meta": {
+ "auth": true
+ }
+ },
+ {
+ "path": "comment/list",
+ "style": {
+ "navigationBarTitleText": "商品评价"
+ }
+ }
+ ]
+ },
+ {
+ "root": "pages/order",
+ "pages": [
+ {
+ "path": "detail",
+ "style": {
+ "navigationBarTitleText": "订单详情"
+ },
+ "meta": {
+ "auth": true,
+ "title": "订单详情"
+ }
+ },
+ {
+ "path": "confirm",
+ "style": {
+ "navigationBarTitleText": "确认订单"
+ },
+ "meta": {
+ "auth": true,
+ "title": "确认订单"
+ }
+ },
+ {
+ "path": "list",
+ "style": {
+ "navigationBarTitleText": "我的订单",
+ "enablePullDownRefresh": true
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "用户订单",
+ "group": "订单中心"
+ }
+ },
+ {
+ "path": "aftersale/apply",
+ "style": {
+ "navigationBarTitleText": "申请售后"
+ },
+ "meta": {
+ "auth": true,
+ "title": "申请售后"
+ }
+ },
+ {
+ "path": "aftersale/list",
+ "style": {
+ "navigationBarTitleText": "售后列表"
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "售后订单",
+ "group": "订单中心"
+ }
+ },
+ {
+ "path": "aftersale/detail",
+ "style": {
+ "navigationBarTitleText": "售后详情"
+ },
+ "meta": {
+ "auth": true,
+ "title": "售后详情"
+ }
+ },
+ {
+ "path": "aftersale/log",
+ "style": {
+ "navigationBarTitleText": "售后进度"
+ },
+ "meta": {
+ "auth": true,
+ "title": "售后进度"
+ }
+ },
+ {
+ "path": "express/log",
+ "style": {
+ "navigationBarTitleText": "物流轨迹"
+ },
+ "meta": {
+ "auth": true,
+ "title": "物流轨迹"
+ }
+ }
+ ]
+ },
+ {
+ "root": "pages/user",
+ "pages": [
+ {
+ "path": "info",
+ "style": {
+ "navigationBarTitleText": "我的信息"
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "用户信息",
+ "group": "用户中心"
+ }
+ },
+ {
+ "path": "goods-collect",
+ "style": {
+ "navigationBarTitleText": "我的收藏"
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "商品收藏",
+ "group": "用户中心"
+ }
+ },
+ {
+ "path": "goods-log",
+ "style": {
+ "navigationBarTitleText": "我的足迹"
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "浏览记录",
+ "group": "用户中心"
+ }
+ },
+ {
+ "path": "address/list",
+ "style": {
+ "navigationBarTitleText": "收货地址"
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "地址管理",
+ "group": "用户中心"
+ }
+ },
+ {
+ "path": "address/edit",
+ "style": {
+ "navigationBarTitleText": "编辑地址"
+ },
+ "meta": {
+ "auth": true,
+ "title": "编辑地址"
+ }
+ },
+ {
+ "path": "wallet/money",
+ "style": {
+ "navigationBarTitleText": "我的余额"
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "用户余额",
+ "group": "用户中心"
+ }
+ },
+ {
+ "path": "wallet/commission",
+ "style": {
+ "navigationBarTitleText": "我的佣金"
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "用户佣金",
+ "group": "分销中心"
+ }
+ },
+ {
+ "path": "wallet/score",
+ "style": {
+ "navigationBarTitleText": "我的积分"
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "用户积分",
+ "group": "用户中心"
+ }
+ }
+ ]
+ },
+ {
+ "root": "pages/commission",
+ "pages": [
+ {
+ "path": "index",
+ "style": {
+ "navigationBarTitleText": "分销"
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "分销中心",
+ "group": "分销商城"
+ }
+ },
+ {
+ "path": "apply",
+ "style": {
+ "navigationBarTitleText": "申请分销商"
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "申请分销商",
+ "group": "分销商城"
+ }
+ },
+ {
+ "path": "goods",
+ "style": {
+ "navigationBarTitleText": "推广商品"
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "推广商品",
+ "group": "分销商城"
+ }
+ },
+ {
+ "path": "order",
+ "style": {
+ "navigationBarTitleText": "分销订单"
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "分销订单",
+ "group": "分销商城"
+ }
+ },
+ {
+ "path": "share-log",
+ "style": {
+ "navigationBarTitleText": "分享记录"
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "分享记录",
+ "group": "分销商城"
+ }
+ },
+ {
+ "path": "team",
+ "style": {
+ "navigationBarTitleText": "我的团队"
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "我的团队",
+ "group": "分销商城"
+ }
+ }
+ ]
+ },
+ {
+ "root": "pages/app",
+ "pages": [
+ {
+ "path": "sign",
+ "style": {
+ "navigationBarTitleText": "签到中心"
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "签到中心",
+ "group": "应用"
+ }
+ }
+ ]
+ },
+ {
+ "root": "pages/public",
+ "pages": [
+ {
+ "path": "setting",
+ "style": {
+ "navigationBarTitleText": "系统设置"
+ },
+ "meta": {
+ "sync": true,
+ "title": "系统设置",
+ "group": "通用"
+ }
+ },
+ {
+ "path": "richtext",
+ "style": {
+ "navigationBarTitleText": "富文本"
+ },
+ "meta": {
+ "sync": true,
+ "title": "富文本",
+ "group": "通用"
+ }
+ },
+ {
+ "path": "faq",
+ "style": {
+ "navigationBarTitleText": "常见问题"
+ },
+ "meta": {
+ "sync": true,
+ "title": "常见问题",
+ "group": "通用"
+ }
+ },
+ {
+ "path": "error",
+ "style": {
+ "navigationBarTitleText": "错误页面"
+ }
+ },
+ {
+ "path": "webview",
+ "style": {
+ "navigationBarTitleText": ""
+ }
+ }
+ ]
+ },
+ {
+ "root": "pages/coupon",
+ "pages": [
+ {
+ "path": "list",
+ "style": {
+ "navigationBarTitleText": "领券中心"
+ },
+ "meta": {
+ "sync": true,
+ "title": "领券中心",
+ "group": "优惠券"
+ }
+ },
+ {
+ "path": "detail",
+ "style": {
+ "navigationBarTitleText": "优惠券"
+ },
+ "meta": {
+ "auth": false,
+ "sync": true,
+ "title": "优惠券详情",
+ "group": "优惠券"
+ }
+ }
+ ]
+ },
+ {
+ "root": "pages/chat",
+ "pages": [
+ {
+ "path": "index",
+ "style": {
+ "navigationBarTitleText": "客服"
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "客服",
+ "group": "客服"
+ }
+ }
+ ]
+ },
+ {
+ "root": "pages/pay",
+ "pages": [
+ {
+ "path": "index",
+ "style": {
+ "navigationBarTitleText": "收银台"
+ }
+ },
+ {
+ "path": "result",
+ "style": {
+ "navigationBarTitleText": "支付结果"
+ }
+ },
+ {
+ "path": "recharge",
+ "style": {
+ "navigationBarTitleText": "充值余额"
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "充值余额",
+ "group": "支付"
+ }
+ },
+ {
+ "path": "recharge-log",
+ "style": {
+ "navigationBarTitleText": "充值记录"
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "充值记录",
+ "group": "支付"
+ }
+ },
+ {
+ "path": "withdraw",
+ "style": {
+ "navigationBarTitleText": "申请提现"
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "申请提现",
+ "group": "支付"
+ }
+ },
+ {
+ "path": "withdraw-log",
+ "style": {
+ "navigationBarTitleText": "提现记录"
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "提现记录",
+ "group": "支付"
+ }
+ }
+ ]
+ },
+ {
+ "root": "pages/activity",
+ "pages": [
+ {
+ "path": "groupon/detail",
+ "style": {
+ "navigationBarTitleText": "拼团详情"
+ }
+ },
+ {
+ "path": "groupon/order",
+ "style": {
+ "navigationBarTitleText": "我的拼团",
+ "enablePullDownRefresh": true
+ },
+ "meta": {
+ "auth": true,
+ "sync": true,
+ "title": "拼团订单",
+ "group": "营销活动"
+ }
+ },
+ {
+ "path": "index",
+ "style": {
+ "navigationBarTitleText": "营销商品"
+ },
+ "meta": {
+ "sync": true,
+ "title": "营销商品",
+ "group": "营销活动"
+ }
+ },
+ {
+ "path": "groupon/list",
+ "style": {
+ "navigationBarTitleText": "拼团活动"
+ },
+ "meta": {
+ "sync": true,
+ "title": "拼团活动",
+ "group": "营销活动"
+ }
+ },
+ {
+ "path": "seckill/list",
+ "style": {
+ "navigationBarTitleText": "秒杀活动"
+ },
+ "meta": {
+ "sync": true,
+ "title": "秒杀活动",
+ "group": "营销活动"
+ }
+ }
+ ]
+ }
+ ],
+ "globalStyle": {
+ "navigationBarTextStyle": "black",
+ "navigationBarTitleText": "星品购",
+ "navigationBarBackgroundColor": "#FFFFFF",
+ "backgroundColor": "#FFFFFF",
+ "navigationStyle": "custom"
+ },
+ "tabBar": {
+ "list": [
+ {
+ "pagePath": "pages/index/index"
+ },
+ {
+ "pagePath": "pages/index/cart"
+ },
+ {
+ "pagePath": "pages/index/user"
+ }
+ ]
+ }
+}
diff --git a/pages/app/score-shop.vue b/pages/app/score-shop.vue
deleted file mode 100644
index e00605fe..00000000
--- a/pages/app/score-shop.vue
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/coupon/detail.vue b/pages/coupon/detail.vue
index 92318996..0a760d27 100644
--- a/pages/coupon/detail.vue
+++ b/pages/coupon/detail.vue
@@ -1,350 +1,378 @@
-
-
-
-
-
-
-
-
-
- {{ state.list.name }}
- 满{{ state.list.enough }}减{{ state.list.amount }}
-
-
-
- 领取时间:{{ state.list.get_start_time }}至{{ state.list.get_end_time }}
-
-
- 有效期:{{ state.list.use_start_time }}至{{ state.list.use_end_time }}
-
-
-
-
-
- 优惠券类型
- {{ state.list.type_text }}
-
-
-
-
- {{ state.list.description }}
-
-
-
-
-
-
-
-
- {{ state.list.use_scope_text }}
-
+
+
+
+
+
+
+
+
+
+ {{ state.coupon.name }}
+
+ 满 {{ fen2yuan(state.coupon.usePrice) }} 元,
+ {{ state.coupon.discountType === 1
+ ? '减 ' + fen2yuan(state.coupon.discountPrice) + ' 元'
+ : '打 ' + state.coupon.discountPercent / 10.0 + ' 折' }}
+
+
+
+ 有效期:领取后 {{ state.coupon.fixedEndTerm }} 天内可用
+
+
+ 有效期: {{ sheep.$helper.timeFormat(state.coupon.validStartTime, 'yyyy-mm-dd') }} 至
+ {{ sheep.$helper.timeFormat(state.coupon.validEndTime, 'yyyy-mm-dd') }}
+
+
+
+
+
+ 优惠券类型
+ {{ state.coupon.discountType === 1 ? '满减券' : '折扣券' }}
+
+
+
+
+
+ {{ state.coupon.description }}
+
+
+
+
+
+
-
- {{ state.list.use_scope_text }}
-
-
-
-
-
+ 全场通用
+
+
+
+
+ {{ state.coupon.productScope === 2 ? '指定商品可用' : '指定分类可用' }}
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
-
+ }"
+ @tap="loadMore"
+ />
+
+
+
\ No newline at end of file
+ .all-user {
+ width: 100%;
+ height: 300rpx;
+ font-size: 34rpx;
+ font-weight: bold;
+ color: #333333;
+ }
+
diff --git a/pages/coupon/list.vue b/pages/coupon/list.vue
index 4833d38b..5c01f294 100644
--- a/pages/coupon/list.vue
+++ b/pages/coupon/list.vue
@@ -1,265 +1,222 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ }" @tap="loadMore" />
+
\ No newline at end of file
+ .disabled-btn {
+ background: #cccccc;
+ background-color: #cccccc !important;
+ color: #fff !important;
+ }
+
diff --git a/pages/goods/comment/add.vue b/pages/goods/comment/add.vue
index a0902194..9ffda276 100644
--- a/pages/goods/comment/add.vue
+++ b/pages/goods/comment/add.vue
@@ -3,35 +3,34 @@
-
+
-
+
-
-
- 商品质量
-
-
+ 商品质量
+
-
-
- 服务态度
-
-
+ 服务态度
+
-
+ placeholder="宝贝满足你的期待吗?说说你的使用心得,分享给想买的他们吧~" />
+
@@ -41,6 +40,7 @@
+
diff --git a/pages/order/aftersale/list.vue b/pages/order/aftersale/list.vue
index 4cf824b0..1201386b 100644
--- a/pages/order/aftersale/list.vue
+++ b/pages/order/aftersale/list.vue
@@ -3,92 +3,73 @@
-
+
-
-
+
-
服务单号:{{ order.no }}
- {{ status[order.status] }}
+ {{ formatAfterSaleStatus(order) }}
-
+
-
- {{ status2[order.way] }}
-
- {{ order.applyReason }}
+ {{ order.way === 10 ? '仅退款' : '退款退货' }}
+ {{ formatAfterSaleStatusDescription(order) }}
-
+ v-if="order?.buttons.includes('cancel')">取消申请
-
-
-
- -->
+
+ }" @tap="loadMore" />
diff --git a/pages/order/aftersale/log-item.vue b/pages/order/aftersale/log-item.vue
index edd28c5e..01329df3 100644
--- a/pages/order/aftersale/log-item.vue
+++ b/pages/order/aftersale/log-item.vue
@@ -1,57 +1,35 @@
+
-
-
+
+
- {{ item.log_type_text }}
-
-
-
-
-
-
-
-
-
+ {{ item.content }}
+
+ {{ sheep.$helper.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}
- {{ item.create_time }}
\ No newline at end of file
+ .cicon-box {
+ font-size: 36rpx;
+ color: #999999;
+ }
+
diff --git a/pages/order/detail.vue b/pages/order/detail.vue
index c6b370fc..52998739 100644
--- a/pages/order/detail.vue
+++ b/pages/order/detail.vue
@@ -1,692 +1,625 @@
-
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
-
-
- {{ state.orderInfo.status_text }}
-
- {{ state.orderInfo.status_desc }}
-
+ "
+ class="state-img"
+ :src="sheep.$url.static('/static/img/shop/order/order_success.png')"
+ >
+
+
+
+
+
+ {{ formatOrderStatus(state.orderInfo) }}
+
+ {{
+ formatOrderStatusDescription(state.orderInfo)
+ }}
+
-
-
-
-
- {{ state.orderInfo.address.consignee }}
-
- {{ state.orderInfo.address.mobile }}
-
- {{ addressText }}
-
+
+
+
+
+ {{ state.orderInfo.receiverName }}
+
+ {{ state.orderInfo.receiverMobile }}
+
+
+ {{ state.orderInfo.receiverAreaName }} {{ state.orderInfo.receiverDetailAddress }}
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
-
+
-
-
-
-
- -->
-
-
-
-
-
-
-
-
-
- 订单编号:
- {{ state.orderInfo.order_sn }}
-
-
-
-
- 下单时间:
- {{ state.orderInfo.create_time }}
-
-
- 支付时间:
- {{ state.orderInfo.paid_time || '-' }}
-
-
- 支付方式:
- {{ state.orderInfo.pay_types_text?.join(',') || '-' }}
-
-
-
-
-
-
- 商品总额
-
- ¥{{ state.orderInfo.goods_amount }}
- +
-
-
- {{ state.orderInfo.score_amount }}
-
-
-
-
- 运费
- ¥{{ state.orderInfo.dispatch_amount }}
-
-
- 优惠金额
- ¥{{ state.orderInfo.total_discount_fee }}
-
-
- {{
- ['paid', 'completed'].includes(state.orderInfo.status) ? '已付款' : '需付款'
- }}
- ¥{{ state.orderInfo.pay_fee }}
- +
-
-
- {{ state.orderInfo.score_amount }}
-
-
-
- 已退款
- ¥{{ refundFee.toFixed(2) }}
-
-
+ "
+ >
+ 退款成功
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
\ No newline at end of file
+ .pay-btn {
+ width: 160rpx;
+ height: 60rpx;
+ font-size: 26rpx;
+ border-radius: 30rpx;
+ font-weight: 500;
+ color: #fff;
+ }
+ }
+
diff --git a/pages/order/dispatch/content.vue b/pages/order/dispatch/content.vue
deleted file mode 100644
index 5095c6c0..00000000
--- a/pages/order/dispatch/content.vue
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- 发货信息
-
-
- {{ item.title }}: {{ item.content }}
-
-
- {{ state.data.ext?.dispatch_content }}
-
-
-
-
-
diff --git a/pages/order/express/list.vue b/pages/order/express/list.vue
deleted file mode 100644
index 5e285a27..00000000
--- a/pages/order/express/list.vue
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- {{ item.logs[0]?.content }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pages/order/express/log.vue b/pages/order/express/log.vue
index 1dd80910..0292dbf3 100644
--- a/pages/order/express/log.vue
+++ b/pages/order/express/log.vue
@@ -2,65 +2,46 @@
+
-
+
-
+
-
-
- 物流状态:
- {{ state.info.status_text }}
-
- 快递单号:{{ state.info.express_no }}
- 快递公司:{{ state.info.express_name }}
+
+
+
+
+
+ 快递单号:{{ state.info.logisticsNo }}
+ 快递公司:{{ state.info.logisticsName }}
+
+
-
-
-
+
+
- {{ item.status_text }}
+
+
+
+
{{ item.content }}
- {{ item.change_date }}
+
+ {{ sheep.$helper.timeFormat(item.time, 'yyyy-mm-dd hh:MM:ss') }}
+
@@ -72,31 +53,38 @@
import sheep from '@/sheep';
import { onLoad } from '@dcloudio/uni-app';
import { computed, reactive } from 'vue';
+ import OrderApi from '@/sheep/api/trade/order';
const state = reactive({
info: [],
- current: 0,
+ tracks: [],
});
+
const goodsImages = computed(() => {
let array = [];
if (state.info.items) {
state.info.items.forEach((item) => {
array.push({
- image: item.goods_image,
+ image: item.picUrl,
});
});
}
return array;
});
- function change(e) {
- state.current = e.detail.current;
+
+ async function getExpressDetail(id) {
+ const { data } = await OrderApi.getOrderExpressTrackList(id);
+ state.tracks = data.reverse();
}
- async function getExpressdetail(id, orderId) {
- const { data } = await sheep.$api.order.express(id, orderId);
+
+ async function getOrderDetail(id) {
+ const { data } = await OrderApi.getOrder(id)
state.info = data;
}
- onLoad((Option) => {
- getExpressdetail(Option.id, Option.orderId);
+
+ onLoad((options) => {
+ getExpressDetail(options.id);
+ getOrderDetail(options.id);
});
diff --git a/pages/order/invoice.vue b/pages/order/invoice.vue
deleted file mode 100644
index dd33fa19..00000000
--- a/pages/order/invoice.vue
+++ /dev/null
@@ -1,329 +0,0 @@
-
-
-
-
-
-
-
- {{ state.data.status_text }}
-
-
- 预计可开发票金额:
- ¥{{ state.data.amount }}
-
-
-
- 增值税电子普通发票
-
-
-
-
-
-
-
- {{ item.title }}
-
-
-
-
-
- 发票类型
- {{ state.data.type_text }}
-
-
- 发票抬头
- {{ state.data.name }}
-
-
- 发票税号
- {{ state.data.tax_no }}
-
-
- 实开金额
- ¥{{ state.data.invoice_amount }}
-
-
- 开票时间
- {{ state.data.finish_time }}
-
-
- 申请时间
- {{ state.data.create_time }}
-
-
-
-
-
-
-
-
- 共{{ state.numImage }}张
- 点击预览发票
-
-
-
-
-
-
-
-
-
- 订单状态
- {{ state.data.order?.status_text }}
-
-
- 订单编号
- {{ state.data.order?.order_sn }}
-
-
- 下单时间
- {{ state.data.order?.create_time }}
-
-
-
-
-
-
-
-
-
diff --git a/pages/order/list.vue b/pages/order/list.vue
index 5cc39aae..4b47f940 100644
--- a/pages/order/list.vue
+++ b/pages/order/list.vue
@@ -1,153 +1,71 @@
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
+
-
-
- 共{{count}}件商品,总金额:
-
- ¥{{ order.payPrice/100 }}
- +
-
-
-
- {{ order.score_amount }}
-
+ 共 {{ order.productCount }} 件商品,总金额:
+
+ ¥{{ fen2yuan(order.payPrice) }}
+
-
-
@@ -156,52 +74,45 @@
+ }" @tap="loadMore" />
diff --git a/pages/pay/result.vue b/pages/pay/result.vue
index 5b18ba8e..82943712 100644
--- a/pages/pay/result.vue
+++ b/pages/pay/result.vue
@@ -2,34 +2,27 @@
-
+
+
+ />
- {{
- state.orderInfo.pay_mode === 'offline' ? '下单成功' : '支付成功'
- }}
- 支付失败
- 该订单已关闭
- 检测支付结果...
+ />
+ 支付成功
+ 支付失败
+ 该订单已关闭
+ 检测支付结果...
- ¥{{ state.orderInfo.pay_fee }}
- +
-
-
- {{ state.orderInfo.score_amount }}
-
+ ¥{{ fen2yuan(state.orderInfo.price) }}
+
+
+
+
-
+
获取实时发货信息与订单状态
立即订阅
@@ -74,15 +66,20 @@
import { reactive, computed } from 'vue';
import { isEmpty } from 'lodash';
import sheep from '@/sheep';
+ import PayOrderApi from '@/sheep/api/pay/order';
+ import { fen2yuan } from '../../sheep/hooks/useGoods';
+ import OrderApi from '@/sheep/api/trade/order';
const state = reactive({
- orderId: 0,
- orderType: 'goods',
+ id: 0, // 支付单号
+ orderType: 'goods', // 订单类型
result: 'unpaid', // 支付状态
- orderInfo: {}, // 订单详情
+ orderInfo: {}, // 支付订单信息
+ tradeOrder: {}, // 商品订单信息,只有在 orderType 为 goods 才会请求。目的:【我的拼团】按钮的展示
counter: 0, // 获取结果次数
});
+ // 支付结果 result => payResult
const payResult = computed(() => {
if (state.result === 'unpaid') {
return 'waiting';
@@ -93,57 +90,65 @@
if (state.result === 'failed') {
return 'failed';
}
-
if (state.result === 'closed') {
return 'closed';
}
});
- async function getOrderInfo(orderId) {
- let checkPayResult;
+
+ // 获得订单信息
+ async function getOrderInfo(id) {
state.counter++;
- if (state.orderType === 'recharge') {
- checkPayResult = sheep.$api.trade.order;
- } else {
- checkPayResult = sheep.$api.order.detail;
- }
- const { data, error } = await checkPayResult(orderId);
- if (error === 0) {
+ // 1. 加载订单信息
+ const { data, code } = await PayOrderApi.getOrder(id);
+ if (code === 0) {
state.orderInfo = data;
- if (state.orderInfo.status === 'closed') {
+ if (!state.orderInfo || state.orderInfo.status === 30) {
+ // 支付关闭
state.result = 'closed';
return;
}
- if (state.orderInfo.status !== 'unpaid') {
+ if (state.orderInfo.status !== 0) {
+ // 非待支付,可能是已支付,可能是已退款
state.result = 'paid';
// #ifdef MP
subscribeMessage();
// #endif
+ // 特殊:获得商品订单信息
+ if (state.orderType === 'goods') {
+ const { data, code } = await OrderApi.getOrder(state.orderInfo.merchantOrderId);
+ if (code === 0) {
+ state.tradeOrder = data;
+ }
+ }
return;
}
}
+ // 2.1 情况三一:未支付,且轮询次数小于三次,则继续轮询
if (state.counter < 3 && state.result === 'unpaid') {
setTimeout(() => {
- getOrderInfo(orderId);
+ getOrderInfo(id);
}, 1500);
}
- // 超过三次检测才判断为支付失败
+ // 2.2 情况二:超过三次检测才判断为支付失败
if (state.counter >= 3) {
state.result = 'failed';
}
}
function onOrder() {
- if ((state.orderType === 'recharge')) {
+ // TODO 芋艿:待测试
+ if (state.orderType === 'recharge') {
sheep.$router.redirect('/pages/pay/recharge-log');
} else {
sheep.$router.redirect('/pages/order/list');
}
}
+ // TODO 芋艿:待测试
// #ifdef MP
function subscribeMessage() {
let event = ['order_dispatched'];
- if (['groupon', 'groupon_ladder'].includes(state.orderInfo.activity_type)) {
+ if (state.tradeOrder.type === 3) {
event.push('groupon_finish');
event.push('groupon_fail');
}
@@ -152,18 +157,13 @@
// #endif
onLoad(async (options) => {
- let id = '';
// 支付订单号
- if (options.orderSN) {
- id = options.orderSN;
- }
if (options.id) {
- id = options.id;
+ state.id = options.id;
}
- state.orderId = id;
-
- if (options.orderType === 'recharge') {
- state.orderType = 'recharge';
+ // 订单类型
+ if (options.orderType) {
+ state.orderType = options.orderType;
}
// 支付结果传值过来是失败,则直接显示失败界面
@@ -171,14 +171,16 @@
state.result = 'failed';
} else {
// 轮询三次检测订单支付结果
- getOrderInfo(state.orderId);
+ await getOrderInfo(state.id);
}
});
onShow(() => {
- if(isEmpty(state.orderInfo)) return;
- getOrderInfo(state.orderId);
- })
+ if (isEmpty(state.orderInfo)) {
+ return;
+ }
+ getOrderInfo(state.id);
+ });
onHide(() => {
state.result = 'unpaid';
diff --git a/pages/public/error.vue b/pages/public/error.vue
index a16d4d5c..3ccc14d9 100644
--- a/pages/public/error.vue
+++ b/pages/public/error.vue
@@ -1,3 +1,4 @@
+
+ />
+ />
+ />
@@ -37,16 +38,18 @@
const errCode = ref('');
const errMsg = ref('');
+
onLoad((options) => {
errCode.value = options.errCode;
errMsg.value = options.errMsg;
});
+
// 重新连接
async function onReconnect() {
uni.reLaunch({
url: '/pages/index/index',
});
- ShoproInit();
+ await ShoproInit();
}
diff --git a/pages/public/feedback.vue b/pages/public/feedback.vue
deleted file mode 100644
index f482d60d..00000000
--- a/pages/public/feedback.vue
+++ /dev/null
@@ -1,226 +0,0 @@
-
-
-
-
- 请选择类型
-
-
-
-
-
-
-
- 相关描述
-
-
-
-
-
-
- 联系方式
-
-
-
-
-
-
-
-
- 联系客服
-
-
- 提交
-
-
-
-
-
-
-
-
-
diff --git a/pages/public/setting.vue b/pages/public/setting.vue
index c3cfc1f3..91722e37 100644
--- a/pages/public/setting.vue
+++ b/pages/public/setting.vue
@@ -19,22 +19,15 @@
:border="false"
class="list-border"
@tap="onCheckUpdate"
- >
+ />
-
+ />
+
-
+ />
+
+ />
-
+
+ }"
+ />
+
\ No newline at end of file
+ .minus {
+ color: $dark-3;
+ }
+ }
+ }
+
diff --git a/sheep/api/app.js b/sheep/api/app.js
index 2bb92c6c..a456039a 100644
--- a/sheep/api/app.js
+++ b/sheep/api/app.js
@@ -1,19 +1,6 @@
import request from '@/sheep/request';
-import { baseUrl } from '@/sheep/config';
export default {
- // TODO 芋艿:测试
- test: () =>
- request({
- url: '/app-api/promotion/decorate/list',
- params: {
- page: 1
- },
- custom: {
- showError: false,
- showLoading: false,
- },
- }),
// 系统初始化
init: (templateId) =>
request({
@@ -39,50 +26,12 @@ export default {
showLoading: false,
},
}),
- // 发送短信
- sendSms: (data) =>
- request({
- url: 'sendSms',
- method: 'POST',
- data,
- custom: {
- showSuccess: true,
- loadingMsg: '发送中',
- },
- }),
- //意见反馈
- feedback: (data) =>
- request({
- url: 'feedback',
- method: 'POST',
- data,
- }),
// 自定义页面
page: (id) =>
request({
url: 'page/' + id,
method: 'GET',
}),
- //积分商城
- scoreShop: {
- list: (params) =>
- request({
- url: 'app/scoreShop',
- method: 'GET',
- params,
- }),
- ids: (params = {}) =>
- request({
- url: 'app/scoreShop/ids',
- method: 'GET',
- params,
- }),
- detail: (id) =>
- request({
- url: 'app/scoreShop/' + id,
- method: 'GET',
- }),
- },
//小程序直播
mplive: {
getRoomList: (ids) =>
@@ -99,48 +48,4 @@ export default {
method: 'GET'
}),
},
-
- //上传
- upload: (file, group = 'ugc', callback) => {
- const token = uni.getStorageSync('token');
- uni.showLoading({
- title: '上传中',
- });
- return new Promise((resolve, reject) => {
- // 此处先换成yudao
- uni.uploadFile({
- url: 'http://api-dashboard.yudao.iocoder.cn' + '/app-api/infra/file/upload',
- filePath: file,
- name: 'file',
- formData: {
- group,
- },
- header: {
- // Accept: 'text/json',
- // Authorization: token,
- Accept : '*/*',
- 'tenant-id' :'1',
- Authorization: 'Bearer test247',
- },
- success: (uploadFileRes) => {
- let result = JSON.parse(uploadFileRes.data);
- if (result.error === 1) {
- uni.showToast({
- icon: 'none',
- title: result.msg,
- });
- } else {
- return resolve(result.data);
- }
- },
- fail: (error) => {
- console.log('上传失败:', error);
- return resolve(false);
- },
- complete: () => {
- uni.hideLoading();
- },
- });
- });
- },
};
diff --git a/sheep/api/coupon.js b/sheep/api/coupon.js
index 3f5e8e6e..95fd11c8 100644
--- a/sheep/api/coupon.js
+++ b/sheep/api/coupon.js
@@ -12,18 +12,7 @@ export default {
showLoading: false,
},
}),
- userCoupon: (params) =>
- request2({
- url: 'promotion/coupon/page',
- method: 'GET',
- params,
- }),
- // userCoupon: (params) =>
- // request({
- // url: 'user/coupon',
- // method: 'GET',
- // params,
- // }),
+
detail: (id, user_coupon_id) =>
request({
url: 'coupon/' + id,
@@ -37,9 +26,4 @@ export default {
url: 'coupon/get/' + id,
method: 'POST',
}),
- listByGoods: (id) =>
- request({
- url: 'coupon/listByGoods/' + id,
- method: 'GET',
- }),
};
\ No newline at end of file
diff --git a/sheep/api/index.js b/sheep/api/index.js
index c25a3493..d415fa47 100644
--- a/sheep/api/index.js
+++ b/sheep/api/index.js
@@ -7,4 +7,7 @@ Object.keys(files).forEach((key) => {
};
});
-export default api;
+// TODO 芋艿:直接在 useModal 引入 AuthUtil 会报错,所以采用这用这方式先
+api.AuthUtil = import.meta.globEager('./member/auth.js')['./member/auth.js'].default;
+
+export default api;
\ No newline at end of file
diff --git a/sheep/api/infra/file.js b/sheep/api/infra/file.js
new file mode 100644
index 00000000..264f646d
--- /dev/null
+++ b/sheep/api/infra/file.js
@@ -0,0 +1,49 @@
+import request2 from '@/sheep/request2';
+
+const FileApi = {
+ // 上传文件
+ uploadFile: (file) => {
+ const token = uni.getStorageSync('token');
+ uni.showLoading({
+ title: '上传中',
+ });
+ return new Promise((resolve, reject) => {
+ // 此处先换成yudao
+ // TODO 芋艿:后续搞下
+ uni.uploadFile({
+ // url: 'http://api-dashboard.yudao.iocoder.cn' + '/app-api/infra/file/upload',
+ url: 'http://127.0.0.1:48080' + '/app-api/infra/file/upload',
+ filePath: file,
+ name: 'file',
+ header: {
+ // Accept: 'text/json',
+ // Authorization: token,
+ Accept : '*/*',
+ 'tenant-id' :'1',
+ Authorization: 'Bearer test247',
+ },
+ success: (uploadFileRes) => {
+ debugger
+ let result = JSON.parse(uploadFileRes.data);
+ if (result.error === 1) {
+ uni.showToast({
+ icon: 'none',
+ title: result.msg,
+ });
+ } else {
+ return resolve(result);
+ }
+ },
+ fail: (error) => {
+ console.log('上传失败:', error);
+ return resolve(false);
+ },
+ complete: () => {
+ uni.hideLoading();
+ },
+ });
+ });
+ },
+};
+
+export default FileApi;
diff --git a/sheep/api/member/address.js b/sheep/api/member/address.js
new file mode 100644
index 00000000..d84643ec
--- /dev/null
+++ b/sheep/api/member/address.js
@@ -0,0 +1,45 @@
+import request2 from '@/sheep/request2';
+
+const AddressApi = {
+ // 获得用户收件地址列表
+ getAddressList: () => {
+ return request2({
+ url: '/app-api/member/address/list',
+ method: 'GET'
+ });
+ },
+ // 创建用户收件地址
+ createAddress: (data) => {
+ return request2({
+ url: '/app-api/member/address/create',
+ method: 'POST',
+ data
+ });
+ },
+ // 更新用户收件地址
+ updateAddress: (data) => {
+ return request2({
+ url: '/app-api/member/address/update',
+ method: 'PUT',
+ data
+ });
+ },
+ // 获得用户收件地址
+ getAddress: (id) => {
+ return request2({
+ url: '/app-api/member/address/get',
+ method: 'GET',
+ params: { id }
+ });
+ },
+ // 删除用户收件地址
+ deleteAddress: (id) => {
+ return request2({
+ url: '/app-api/member/address/delete',
+ method: 'DELETE',
+ params: { id }
+ });
+ },
+};
+
+export default AddressApi;
diff --git a/sheep/api/member/auth.js b/sheep/api/member/auth.js
new file mode 100644
index 00000000..92ec829f
--- /dev/null
+++ b/sheep/api/member/auth.js
@@ -0,0 +1,42 @@
+import request from '@/sheep/request';
+
+const AuthUtil = {
+ // 使用手机 + 验证码登录
+ smsLogin: (data) => {
+ return request({
+ url: '/app-api/member/auth/sms-login',
+ method: 'POST',
+ data,
+ custom: {
+ showSuccess: true,
+ loadingMsg: '登录中',
+ successMsg: '登录成功',
+ },
+ });
+ },
+ // 发送手机验证码
+ sendSmsCode: (mobile, scene) => {
+ return request({
+ url: '/app-api/member/auth/send-sms-code',
+ method: 'POST',
+ data: {
+ mobile,
+ scene,
+ },
+ custom: {
+ loadingMsg: '发送中',
+ showSuccess: true,
+ successMsg: '发送成功',
+ },
+ });
+ },
+ // 登出系统
+ logout: () => {
+ return request({
+ url: '/app-api/member/auth/logout',
+ method: 'POST',
+ });
+ },
+};
+
+export default AuthUtil;
diff --git a/sheep/api/member/user.js b/sheep/api/member/user.js
new file mode 100644
index 00000000..38ed1103
--- /dev/null
+++ b/sheep/api/member/user.js
@@ -0,0 +1,32 @@
+import request from '@/sheep/request2';
+
+const UserApi = {
+ // 修改密码
+ updateUserPassword: (data) => {
+ return request({
+ url: '/app-api/member/user/update-password',
+ method: 'PUT',
+ data,
+ custom: {
+ loadingMsg: '验证中',
+ showSuccess: true,
+ successMsg: '修改成功'
+ },
+ });
+ },
+ // 重置密码
+ resetUserPassword: (data) => {
+ return request({
+ url: '/app-api/member/user/reset-password',
+ method: 'PUT',
+ data,
+ custom: {
+ loadingMsg: '验证中',
+ showSuccess: true,
+ successMsg: '修改成功'
+ }
+ });
+ },
+};
+
+export default UserApi;
diff --git a/sheep/api/order.js b/sheep/api/order.js
index 8fb48cad..7b27d441 100644
--- a/sheep/api/order.js
+++ b/sheep/api/order.js
@@ -15,12 +15,6 @@ export default {
// method: 'GET',
// params,
// }),
- // 发票详情
- invoice: (id) =>
- request({
- url: 'order/invoice/' + id,
- method: 'GET',
- }),
// 获取支付结果
payResult: (id) =>
request({
diff --git a/sheep/api/pay/channel.js b/sheep/api/pay/channel.js
new file mode 100644
index 00000000..20a8c28f
--- /dev/null
+++ b/sheep/api/pay/channel.js
@@ -0,0 +1,14 @@
+import request from '@/sheep/request';
+
+const PayChannelApi = {
+ // 获得指定应用的开启的支付渠道编码列表
+ getEnableChannelCodeList: (appId) => {
+ return request({
+ url: '/app-api/pay/channel/get-enable-code-list',
+ method: 'GET',
+ params: { appId }
+ });
+ },
+};
+
+export default PayChannelApi;
diff --git a/sheep/api/pay/order.js b/sheep/api/pay/order.js
new file mode 100644
index 00000000..f1935293
--- /dev/null
+++ b/sheep/api/pay/order.js
@@ -0,0 +1,22 @@
+import request from '@/sheep/request';
+
+const PayOrderApi = {
+ // 获得支付订单
+ getOrder: (id) => {
+ return request({
+ url: '/app-api/pay/order/get',
+ method: 'GET',
+ params: { id }
+ });
+ },
+ // 提交支付订单
+ submitOrder: (data) => {
+ return request({
+ url: '/app-api/pay/order/submit',
+ method: 'POST',
+ data
+ });
+ }
+};
+
+export default PayOrderApi;
diff --git a/sheep/api/pay/wallet.js b/sheep/api/pay/wallet.js
new file mode 100644
index 00000000..9ac844fc
--- /dev/null
+++ b/sheep/api/pay/wallet.js
@@ -0,0 +1,26 @@
+import request from '@/sheep/request';
+
+const PayWalletApi = {
+ // 获得钱包流水分页
+ getWalletTransactionPage: (params) => {
+ const queryString = Object.keys(params)
+ .map((key) => encodeURIComponent(key) + '=' + params[key])
+ .join('&');
+ return request({
+ url: `/app-api/pay/wallet-transaction/page?${queryString}`,
+ method: 'GET'
+ });
+ },
+ // 获得钱包流水统计
+ getWalletTransactionSummary: (params) => {
+ const queryString = `createTime=${params.createTime[0]}&createTime=${params.createTime[1]}`
+ return request({
+ url: `/app-api/pay/wallet-transaction/get-summary?${queryString}`,
+ // url: `/app-api/pay/wallet-transaction/get-summary`,
+ method: 'GET',
+ // params: params
+ });
+ },
+};
+
+export default PayWalletApi;
diff --git a/sheep/api/product/category.js b/sheep/api/product/category.js
index 6549acf5..4578e8aa 100644
--- a/sheep/api/product/category.js
+++ b/sheep/api/product/category.js
@@ -1,12 +1,21 @@
import request from '@/sheep/request';
const CategoryApi = {
- // 查询分类列表
- getCategoryList: () => {
- return request({
- url: '/app-api/product/category/list',
- method: 'GET'
- });
- }
+ // 查询分类列表
+ getCategoryList: () => {
+ return request({
+ url: '/app-api/product/category/list',
+ method: 'GET',
+ });
+ },
+ // 查询分类列表,指定编号
+ getCategoryListByIds: (ids) => {
+ return request({
+ url: '/app-api/product/category/list-by-ids',
+ method: 'GET',
+ params: { ids },
+ });
+ },
};
+
export default CategoryApi;
diff --git a/sheep/api/product/favorite.js b/sheep/api/product/favorite.js
new file mode 100644
index 00000000..7e1d41f5
--- /dev/null
+++ b/sheep/api/product/favorite.js
@@ -0,0 +1,44 @@
+import request from '@/sheep/request';
+
+const FavoriteApi = {
+ // 获得商品收藏分页
+ getFavoritePage: (data) => {
+ return request({
+ url: '/app-api/product/favorite/page',
+ method: 'GET',
+ params: data
+ });
+ },
+ // 检查是否收藏过商品
+ isFavoriteExists: (spuId) => {
+ return request({
+ url: '/app-api/product/favorite/exits',
+ method: 'GET',
+ params: {
+ spuId
+ }
+ });
+ },
+ // 添加商品收藏
+ createFavorite: (spuId) => {
+ return request({
+ url: '/app-api/product/favorite/create',
+ method: 'POST',
+ data: {
+ spuId
+ }
+ });
+ },
+ // 取消商品收藏
+ deleteFavorite: (spuId) => {
+ return request({
+ url: '/app-api/product/favorite/delete',
+ method: 'DELETE',
+ data: {
+ spuId
+ }
+ });
+ }
+};
+
+export default FavoriteApi;
\ No newline at end of file
diff --git a/sheep/api/promotion/coupon.js b/sheep/api/promotion/coupon.js
index 9bdbb19e..be8364e7 100644
--- a/sheep/api/promotion/coupon.js
+++ b/sheep/api/promotion/coupon.js
@@ -1,6 +1,6 @@
import request from '@/sheep/request';
-export default {
+const CouponApi = {
// 获得优惠劵模板列表
getCouponTemplateListByIds: (ids) => {
return request({
@@ -17,4 +17,46 @@ export default {
params: { spuId, productScope, count },
});
},
+ // 获得优惠劵模版分页
+ getCouponTemplatePage: (params) => {
+ return request({
+ url: '/app-api/promotion/coupon-template/page',
+ method: 'GET',
+ params,
+ });
+ },
+ // 获得优惠劵模版
+ getCouponTemplate: (id) => {
+ return request({
+ url: '/app-api/promotion/coupon-template/get',
+ method: 'GET',
+ params: { id },
+ });
+ },
+ // 我的优惠劵列表
+ getCouponPage: (params) => {
+ return request({
+ url: '/app-api/promotion/coupon/page',
+ method: 'GET',
+ params,
+ });
+ },
+ // 领取优惠券
+ takeCoupon: (templateId) => {
+ return request({
+ url: '/app-api/promotion/coupon/take',
+ method: 'POST',
+ data: { templateId },
+ });
+ },
+ // 获得优惠劵
+ getCoupon: (id) => {
+ return request({
+ url: '/app-api/promotion/coupon/get',
+ method: 'GET',
+ params: { id },
+ });
+ },
};
+
+export default CouponApi;
\ No newline at end of file
diff --git a/sheep/api/system/area.js b/sheep/api/system/area.js
new file mode 100644
index 00000000..2ef9f1ed
--- /dev/null
+++ b/sheep/api/system/area.js
@@ -0,0 +1,13 @@
+import request2 from '@/sheep/request2';
+
+const AreaApi = {
+ // 获得地区树
+ getAreaTree: () => {
+ return request2({
+ url: '/app-api/system/area/tree',
+ method: 'GET'
+ });
+ },
+};
+
+export default AreaApi;
diff --git a/sheep/api/trade/afterSale.js b/sheep/api/trade/afterSale.js
new file mode 100644
index 00000000..e5488dcc
--- /dev/null
+++ b/sheep/api/trade/afterSale.js
@@ -0,0 +1,45 @@
+import request2 from '@/sheep/request2';
+import request from '@/sheep/request';
+
+const AfterSaleApi = {
+ // 创建售后
+ createAfterSale: (data) => {
+ return request2({
+ url: `/app-api/trade/after-sale/create`,
+ method: 'POST',
+ data,
+ });
+ },
+ // 获得售后
+ getAfterSale: (id) => {
+ return request2({
+ url: `/app-api/trade/after-sale/get`,
+ method: 'GET',
+ params: {
+ id,
+ },
+ });
+ },
+ // 取消售后
+ cancelAfterSale: (id) => {
+ return request2({
+ url: `/app-api/trade/after-sale/cancel`,
+ method: 'DELETE',
+ params: {
+ id,
+ },
+ });
+ },
+ // 获得售后日志列表
+ getAfterSaleLogList: (afterSaleId) => {
+ return request2({
+ url: `/app-api/trade/after-sale-log/list`,
+ method: 'GET',
+ params: {
+ afterSaleId,
+ },
+ });
+ }
+};
+
+export default AfterSaleApi;
diff --git a/sheep/api/trade/cart.js b/sheep/api/trade/cart.js
new file mode 100644
index 00000000..f6a0104a
--- /dev/null
+++ b/sheep/api/trade/cart.js
@@ -0,0 +1,47 @@
+import request2 from '@/sheep/request2';
+
+const CartApi = {
+ addCart: (data) => {
+ return request2({
+ url: '/app-api/trade/cart/add',
+ method: 'POST',
+ data: data,
+ // TODO 芋艿:这里没提示
+ custom: {
+ showSuccess: true,
+ successMsg: '已添加到购物车~',
+ }
+ });
+ },
+ updateCartCount: (data) => {
+ return request2({
+ url: '/app-api/trade/cart/update-count',
+ method: 'PUT',
+ data: data
+ });
+ },
+ updateCartSelected: (data) => {
+ return request2({
+ url: '/app-api/trade/cart/update-selected',
+ method: 'PUT',
+ data: data
+ });
+ },
+ deleteCart: (ids) => {
+ return request2({
+ url: '/app-api/trade/cart/delete',
+ method: 'DELETE',
+ params: {
+ ids
+ }
+ });
+ },
+ getCartList: () => {
+ return request2({
+ url: '/app-api/trade/cart/list',
+ method: 'GET',
+ });
+ },
+};
+
+export default CartApi;
\ No newline at end of file
diff --git a/sheep/api/trade/config.js b/sheep/api/trade/config.js
new file mode 100644
index 00000000..f397dd44
--- /dev/null
+++ b/sheep/api/trade/config.js
@@ -0,0 +1,14 @@
+import request2 from '@/sheep/request2';
+import request from '@/sheep/request';
+
+const TradeConfigApi = {
+ // 获得交易配置
+ getTradeConfig: () => {
+ return request2({
+ url: `/app-api/trade/config/get`,
+ method: 'GET',
+ });
+ },
+};
+
+export default TradeConfigApi;
diff --git a/sheep/api/trade/order.js b/sheep/api/trade/order.js
new file mode 100644
index 00000000..f2a2b691
--- /dev/null
+++ b/sheep/api/trade/order.js
@@ -0,0 +1,103 @@
+import request2 from '@/sheep/request2';
+import request from '@/sheep/request';
+
+const OrderApi = {
+ // 计算订单信息
+ settlementOrder: (data) => {
+ const data2 = {
+ ...data,
+ };
+ // 移除多余字段
+ if (!(data.couponId > 0)) {
+ delete data2.couponId;
+ }
+ if (!(data.addressId > 0)) {
+ delete data2.addressId;
+ }
+ // 解决 SpringMVC 接受 List- 参数的问题
+ delete data2.items;
+ for (let i = 0; i < data.items.length; i++) {
+ data2[encodeURIComponent('items[' + i + '' + '].skuId')] = data.items[i].skuId + '';
+ data2[encodeURIComponent('items[' + i + '' + '].count')] = data.items[i].count + '';
+ if (data.items[i].cartId) {
+ data2[encodeURIComponent('items[' + i + '' + '].cartId')] = data.items[i].cartId + '';
+ }
+ }
+ const queryString = Object.keys(data2)
+ .map((key) => key + '=' + data2[key])
+ .join('&');
+ return request2({
+ url: `trade/order/settlement?${queryString}`,
+ method: 'GET',
+ });
+ },
+ // 创建订单
+ createOrder: (data) => {
+ return request2({
+ url: `trade/order/create`,
+ method: 'POST',
+ data,
+ });
+ },
+ // 获得订单
+ getOrder: (id) => {
+ return request2({
+ url: `trade/order/get-detail`,
+ method: 'GET',
+ params: {
+ id,
+ },
+ });
+ },
+ // 订单列表
+ getOrderPage: (params) => {
+ return request({
+ url: '/app-api/trade/order/page',
+ method: 'GET',
+ params,
+ custom: {
+ showLoading: false,
+ },
+ });
+ },
+ // 确认收货
+ receiveOrder: (id) => {
+ return request2({
+ url: `/app-api/trade/order/receive`,
+ method: 'PUT',
+ params: {
+ id,
+ },
+ });
+ },
+ // 取消订单
+ cancelOrder: (id) => {
+ return request2({
+ url: `/app-api/trade/order/cancel`,
+ method: 'DELETE',
+ params: {
+ id,
+ },
+ });
+ },
+ // 删除订单
+ deleteOrder: (id) => {
+ return request2({
+ url: `/app-api/trade/order/delete`,
+ method: 'DELETE',
+ params: {
+ id,
+ },
+ });
+ },
+ // 创建单个评论
+ createOrderItemComment: (data) => {
+ return request2({
+ url: `/app-api/trade/order/item/create-comment`,
+ method: 'POST',
+ data,
+ });
+ },
+};
+
+export default OrderApi;
diff --git a/sheep/api/user.js b/sheep/api/user.js
index fb3e809c..9c2e862b 100644
--- a/sheep/api/user.js
+++ b/sheep/api/user.js
@@ -92,29 +92,6 @@ export default {
loadingMsg: '正在注册',
},
}),
- // 重置密码
- resetPassword: (data) =>
- request({
- url: '/user/api/user/resetPassword',
- method: 'POST',
- data,
- custom: {
- showSuccess: true,
- loadingMsg: '验证中',
- },
- }),
-
- // 修改密码
- changePassword: (data) =>
- request({
- url: '/user/api/user/changePassword',
- method: 'POST',
- data,
- custom: {
- showSuccess: true,
- loadingMsg: '验证中',
- },
- }),
// 绑定、更换手机号
changeMobile: (data) =>
@@ -128,18 +105,6 @@ export default {
},
}),
- // 修改用户名
- changeUsername: (data) =>
- request({
- url: '/user/api/user/changeUsername',
- method: 'POST',
- data,
- custom: {
- showSuccess: true,
- loadingMsg: '验证中',
- },
- }),
-
// 更新小程序信息
updateMpUserInfo: (data) =>
request({
@@ -218,12 +183,6 @@ export default {
method: 'GET',
custom: {},
}),
- // list: () =>
- // request({
- // url: 'user/address',
- // method: 'GET',
- // custom: {},
- // }),
create: (data) =>
request2({
url: 'member/address/create',
@@ -233,15 +192,6 @@ export default {
showSuccess: true,
},
}),
- // create: (data) =>
- // request({
- // url: 'user/address',
- // method: 'POST',
- // data,
- // custom: {
- // showSuccess: true,
- // },
- // }),
update: (data) =>
request2({
url: 'member/address/update',
@@ -251,71 +201,16 @@ export default {
showSuccess: true,
},
}),
- // update: (id, data) =>
- // request({
- // url: 'user/address/' + id,
- // method: 'PUT',
- // data,
- // custom: {
- // showSuccess: true,
- // },
- // }),
detail: (id) =>
request2({
url: 'member/address/get?id=' + id,
method: 'GET',
}),
- // detail: (id) =>
- // request({
- // url: 'user/address/' + id,
- // method: 'GET',
- // }),
delete: (id) =>
request2({
url: 'member/address/delete?id=' + id,
method: 'DELETE',
}),
- // delete: (id) =>
- // request({
- // url: 'user/address/' + id,
- // method: 'DELETE',
- // }),
- },
- invoice: {
- list: () =>
- request({
- url: 'user/invoice',
- method: 'GET',
- custom: {},
- }),
- create: (data) =>
- request({
- url: 'user/invoice',
- method: 'POST',
- data,
- custom: {
- showSuccess: true,
- },
- }),
- update: (id, data) =>
- request({
- url: 'user/invoice/' + id,
- method: 'PUT',
- data,
- custom: {
- showSuccess: true,
- },
- }),
- detail: (id) =>
- request({
- url: 'user/invoice/' + id,
- method: 'GET',
- }),
- delete: (id) =>
- request({
- url: 'user/invoice/' + id,
- method: 'DELETE',
- }),
},
favorite: {
list: (params) =>
@@ -398,13 +293,6 @@ export default {
params,
custom: {},
}),
- // log: (params) =>
- // request({
- // url: '/user/api/walletLog',
- // method: 'GET',
- // params,
- // custom: {},
- // }),
},
account: {
info: (params) =>
diff --git a/sheep/components/s-address-item/s-address-item.vue b/sheep/components/s-address-item/s-address-item.vue
index 37c2a9aa..f1b54b39 100644
--- a/sheep/components/s-address-item/s-address-item.vue
+++ b/sheep/components/s-address-item/s-address-item.vue
@@ -1,3 +1,4 @@
+
+ />
{{ props.item.areaName }}
-
- {{ props.item.detailAddress }}
- {{ props.item.name }} {{ props.item.mobile }}
+
+ {{ props.item.detailAddress }}
+
+
+ {{ props.item.name }} {{ props.item.mobile }}
+
+
+
+ 请选择收货地址
- 请选择收货地址
-
+
diff --git a/sheep/components/s-auth-modal/components/account-login.vue b/sheep/components/s-auth-modal/components/account-login.vue
index 7663204b..187e2a9f 100644
--- a/sheep/components/s-auth-modal/components/account-login.vue
+++ b/sheep/components/s-auth-modal/components/account-login.vue
@@ -4,10 +4,10 @@
- 账号登录
短信登录
+ 账号登录
如果未设置过密码,请点击忘记密码
diff --git a/sheep/components/s-auth-modal/components/change-password.vue b/sheep/components/s-auth-modal/components/change-password.vue
index 0e0af5cc..b02ea021 100644
--- a/sheep/components/s-auth-modal/components/change-password.vue
+++ b/sheep/components/s-auth-modal/components/change-password.vue
@@ -1,4 +1,4 @@
-
+
@@ -16,29 +16,32 @@
labelWidth="140"
labelAlign="center"
>
-
+
+ >
+
+
+ {{ getSmsTimer('resetPassword') }}
+
+
+
-
+
-
-
-
-
@@ -50,69 +53,51 @@
-
-
- 忘记密码
-
-
+
+ 取消修改
+
diff --git a/sheep/components/s-auth-modal/components/change-username.vue b/sheep/components/s-auth-modal/components/change-username.vue
deleted file mode 100644
index 82d3de95..00000000
--- a/sheep/components/s-auth-modal/components/change-username.vue
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
-
-
- 修改用户名
- 用户名仅限修改一次
-
-
-
-
-
-
-
-
-
-
- 保存
-
-
-
-
-
-
-
-
-
diff --git a/sheep/components/s-auth-modal/components/reset-password.vue b/sheep/components/s-auth-modal/components/reset-password.vue
index 81858ad9..bc1be8b3 100644
--- a/sheep/components/s-auth-modal/components/reset-password.vue
+++ b/sheep/components/s-auth-modal/components/reset-password.vue
@@ -1,4 +1,4 @@
-
+
@@ -43,7 +43,7 @@
type="number"
maxlength="4"
:inputBorder="false"
- >
+ />
@@ -69,10 +69,11 @@
diff --git a/sheep/components/s-auth-modal/components/sms-login.vue b/sheep/components/s-auth-modal/components/sms-login.vue
index 567866c5..0651b780 100644
--- a/sheep/components/s-auth-modal/components/sms-login.vue
+++ b/sheep/components/s-auth-modal/components/sms-login.vue
@@ -4,12 +4,12 @@
- 账号登录
短信登录
+
+ 账号登录
+
- 未注册手机号请先点击下方立即注册
+ 未注册的手机号,验证后自动注册账号
@@ -59,10 +59,11 @@
-
-
diff --git a/sheep/components/s-auth-modal/s-auth-modal.vue b/sheep/components/s-auth-modal/s-auth-modal.vue
index ab3ef690..52052689 100644
--- a/sheep/components/s-auth-modal/s-auth-modal.vue
+++ b/sheep/components/s-auth-modal/s-auth-modal.vue
@@ -12,13 +12,6 @@
-
-
-
@@ -26,10 +19,7 @@
-
-
-
-
+
@@ -42,22 +32,13 @@
还没有账号?
- 立即注册立即注册
或
快捷登录
-
- 立即注册
-
-
-
+
@@ -28,7 +28,7 @@
-
+
@@ -39,8 +39,6 @@
-
-
diff --git a/sheep/components/s-coupon-get/s-coupon-get.vue b/sheep/components/s-coupon-get/s-coupon-get.vue
index bfa9b9bb..6df6b558 100644
--- a/sheep/components/s-coupon-get/s-coupon-get.vue
+++ b/sheep/components/s-coupon-get/s-coupon-get.vue
@@ -1,3 +1,4 @@
+
- {{ item.get_status_text }}
+ {{ item.canTake ? '立即领取' : '已领取' }}
@@ -38,6 +37,7 @@
\ No newline at end of file
diff --git a/sheep/components/s-float-menu/s-float-menu.vue b/sheep/components/s-float-menu/s-float-menu.vue
index bed65138..ac0339ed 100644
--- a/sheep/components/s-float-menu/s-float-menu.vue
+++ b/sheep/components/s-float-menu/s-float-menu.vue
@@ -25,19 +25,7 @@
const props = defineProps({
data: {
type: Object,
- default() {
- return {
- // horizontal vertical
- direction: 'vertical',
- showText: true,
- list: [{
- imgUrl: 'http://localhost/logo.gif',
- url: '',
- text: '客服',
- textColor: '',
- }],
- }
- },
+ default() {},
}
})
diff --git a/sheep/components/s-goods-column/s-goods-column.vue b/sheep/components/s-goods-column/s-goods-column.vue
index 40a9cec9..33ffce0c 100644
--- a/sheep/components/s-goods-column/s-goods-column.vue
+++ b/sheep/components/s-goods-column/s-goods-column.vue
@@ -29,7 +29,7 @@
:style="[{ color: goodsFields.price.color }]"
>
{{ priceUnit }}
- {{ isArray(data.price) ? data.price[0] : data.price }}
+ {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }}
@@ -55,7 +55,7 @@
:style="[{ color: goodsFields.price.color }]"
>
{{ priceUnit }}
- {{ isArray(data.price) ? data.price[0] : data.price }}
+ {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }}
@@ -102,7 +102,7 @@
:style="[{ color: goodsFields.price.color }]"
>
{{ priceUnit }}
- {{ isArray(data.price) ? data.price[0] : data.price }}
+ {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }}
{{ priceUnit }}
- {{ data.original_price||data.marketPrice }}
+ {{ fen2yuan(data.marketPrice) }}
@@ -122,7 +122,7 @@
-
+
@@ -174,7 +174,7 @@
:style="[{ color: goodsFields.price.color }]"
>
{{ priceUnit }}
- {{ isArray(data.price) ? data.price[0] : data.price }}
+ {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }}
{{ priceUnit }}
- {{ data.original_price||data.marketPrice }}
+ {{ fen2yuan(data.marketPrice) }}
@@ -191,11 +191,11 @@
- 去购买
+
+
+ 去购买
+
+
@@ -238,7 +238,7 @@
{{ priceUnit }}
- {{ isArray(data.price) ? data.price[0] : data.price }}
+ {{ isArray(data.price) ? fen2yuan(data.price[0]) : fen2yuan(data.price) }}
{{ priceUnit }}
- {{ data.original_price||data.marketPrice }}
+ {{ fen2yuan(data.marketPrice) }}
@@ -293,7 +293,7 @@
*/
import { computed, reactive, getCurrentInstance, onMounted, nextTick } from 'vue';
import sheep from '@/sheep';
- import { formatSales } from '@/sheep/hooks/useGoods';
+ import { fen2yuan, formatSales } from '@/sheep/hooks/useGoods';
import { formatStock } from '@/sheep/hooks/useGoods';
import goodsCollectVue from '@/pages/user/goods-collect.vue';
import { isArray } from 'lodash';
@@ -307,6 +307,7 @@
type: [Array, Object],
default() {
return {
+ // TODO @疯狂:旧的要不剔除掉,后续都用新的
// 商品名称(旧)
title: { show: true },
// 商品介绍(旧)
diff --git a/sheep/components/s-goods-item/s-goods-item.vue b/sheep/components/s-goods-item/s-goods-item.vue
index d599f28e..456bb163 100644
--- a/sheep/components/s-goods-item/s-goods-item.vue
+++ b/sheep/components/s-goods-item/s-goods-item.vue
@@ -26,15 +26,7 @@
:style="[{ color: priceColor }]"
v-if="price && Number(price) > 0"
>
- ¥{{ price }}
-
- +
-
-
- {{ score }}
+ ¥{{ fen2yuan(price) }}
x {{ num }}
@@ -54,6 +46,7 @@
-
-
diff --git a/sheep/components/s-menu-button/s-menu-button.vue b/sheep/components/s-menu-button/s-menu-button.vue
index 50886d0e..110c492f 100644
--- a/sheep/components/s-menu-button/s-menu-button.vue
+++ b/sheep/components/s-menu-button/s-menu-button.vue
@@ -197,7 +197,7 @@
},
iconSize: {
type: Number,
- default: 96,
+ default: 80,
},
color: {
type: String,
@@ -264,13 +264,13 @@
.menu-icon {
transform: translate(0, 0);
- width: 98rpx;
- height: 98rpx;
+ width: 80rpx;
+ height: 80rpx;
padding-bottom: 10rpx;
}
.menu-title {
- font-size: 30rpx;
+ font-size: 24rpx;
color: #333;
}
}
diff --git a/sheep/components/s-menu-tools/s-menu-tools.vue b/sheep/components/s-menu-tools/s-menu-tools.vue
index 8ad0d05e..ee2058c5 100644
--- a/sheep/components/s-menu-tools/s-menu-tools.vue
+++ b/sheep/components/s-menu-tools/s-menu-tools.vue
@@ -1,3 +1,4 @@
+
@@ -10,7 +11,7 @@
class="ss-reset-button list-image ss-flex ss-row-center ss-col-center"
@tap="onClick(item)"
>
-
+
{{ item.title }}
@@ -63,11 +64,6 @@
icon: '/static/img/shop/tools/collect.png',
title: '我的收藏',
},
- {
- url: '/pages/public/feedback',
- icon: '/static/img/shop/tools/feedback.png',
- title: '意见反馈',
- },
{
url: '/pages/chat/index',
icon: '/static/img/shop/tools/service.png',
diff --git a/sheep/components/s-notice-block/s-notice-block.vue b/sheep/components/s-notice-block/s-notice-block.vue
index c0c76655..1ac4942c 100644
--- a/sheep/components/s-notice-block/s-notice-block.vue
+++ b/sheep/components/s-notice-block/s-notice-block.vue
@@ -32,7 +32,7 @@
diff --git a/sheep/components/s-score-block/s-score-block.vue b/sheep/components/s-score-block/s-score-block.vue
deleted file mode 100644
index 569f5d28..00000000
--- a/sheep/components/s-score-block/s-score-block.vue
+++ /dev/null
@@ -1,202 +0,0 @@
-
-
-
-
-
-
-
-
- {{ buyNowStyle.mode === 1 ? buyNowStyle.text : '' }}
-
-
-
-
-
-
-
-
-
-
- {{ buyNowStyle.mode === 1 ? buyNowStyle.text : '' }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ buyNowStyle.mode === 1 ? buyNowStyle.text : '' }}
-
-
-
-
-
-
-
-
-
diff --git a/sheep/components/s-score-card/s-score-card.vue b/sheep/components/s-score-card/s-score-card.vue
deleted file mode 100644
index ae2fd59b..00000000
--- a/sheep/components/s-score-card/s-score-card.vue
+++ /dev/null
@@ -1,459 +0,0 @@
-
-
-
-
-
-
-
- {{ data.title }}
-
-
- {{ data.subtitle }}
-
-
-
- {{ Number(data.price[0]) > 0 ? '¥' + data.price[0] + '+' : '' }}
-
- {{ data.score }}
-
-
-
- {{ priceUnit }}
- {{ data.original_price }}
-
-
-
-
- {{ salesAndStock }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ data.title }}
-
-
- {{ data.subtitle }}
-
-
-
-
-
- {{ Number(data.price[0]) > 0 ? '¥' + data.price[0] + '+' : '' }}
-
- {{ data.score }}
-
-
- {{ priceUnit }}
- {{ data.original_price }}
-
-
-
- {{ salesAndStock }}
-
-
-
-
- 去兑换
-
-
-
-
-
-
-
-
- {{ data.title }}
-
-
- {{ data.subtitle }}
-
-
-
-
-
-
- {{ item.title }}
-
-
-
-
-
- {{ Number(data.price[0]) > 0 ? '¥' + data.price[0] + '+' : '' }}
-
- {{ data.score ? data.score : '' }}
-
-
- ¥
- {{ data.original_price }}
-
-
-
- {{ salesAndStock }}
-
-
-
-
- 去兑换
-
-
-
-
-
-
diff --git a/sheep/components/s-statusbar/s-statusbar.vue b/sheep/components/s-statusbar/s-statusbar.vue
index 97287206..8b58c97c 100644
--- a/sheep/components/s-statusbar/s-statusbar.vue
+++ b/sheep/components/s-statusbar/s-statusbar.vue
@@ -1,5 +1,5 @@
-
+
+ .account-card {
+ width: 694rpx;
+ margin: 0 auto;
+ padding: 2rpx;
+ background: linear-gradient(180deg, #ffffff 0.88%, #fff9ec 100%);
+ border-radius: 12rpx;
+ z-index: 3;
+ position: relative;
+
+ .account-card-box {
+ background: #ffefd6;
+
+ .card-box-header {
+ padding: 0 30rpx;
+ height: 72rpx;
+ box-shadow: 0px 2px 6px #f2debe;
+
+ .header-title {
+ font-size: 24rpx;
+ font-weight: 500;
+ color: #a17545;
+ line-height: 30rpx;
+ }
+
+ .cicon-play-arrow {
+ color: #a17545;
+ font-size: 24rpx;
+ line-height: 30rpx;
+ }
+ }
+
+ .card-content {
+ height: 190rpx;
+ background: #fdfae9;
+
+ .item-title {
+ font-size: 24rpx;
+ font-weight: 500;
+ color: #cba67e;
+ line-height: 30rpx;
+ margin-bottom: 24rpx;
+ }
+
+ .item-detail {
+ font-size: 36rpx;
+ font-family: OPPOSANS;
+ font-weight: bold;
+ color: #692e04;
+ line-height: 30rpx;
+ }
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/pages/commission/components/commission-info.vue b/pages/commission/components/commission-info.vue
index fea225fd..e2ad24eb 100644
--- a/pages/commission/components/commission-info.vue
+++ b/pages/commission/components/commission-info.vue
@@ -1,126 +1,126 @@
-
-
-
-
-
-
-
-
- {{ userInfo.nickname }}
-
-
-
-
- {{ agentInfo.level_info?.name }}
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ {{ userInfo.nickname }}
+
+
+
+
+ {{ agentInfo.level_info?.name }}
+
+
+
+
+
+
+
+
+ .tag-img {
+ width: 36rpx;
+ height: 36rpx;
+ border-radius: 50%;
+ margin-left: -2rpx;
+ }
+
+ .tag-title {
+ font-size: 24rpx;
+ padding: 0 10rpx;
+ font-weight: 500;
+ line-height: 36rpx;
+ color: #fff;
+ }
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/pages/commission/goods.vue b/pages/commission/goods.vue
index 7b186f02..1d4ce36d 100644
--- a/pages/commission/goods.vue
+++ b/pages/commission/goods.vue
@@ -1,137 +1,123 @@
-
-
-
-
-
- 预计佣金:¥{{ item.commission }}
-
- 分享赚
-
-
-
-
-
-
-
-
+
+
+
+
+ 预计佣金:¥{{ item.commission }}
+
+ 分享赚
+
+
+
+
+
+
+
+
-
+ }" @tap="loadmore" />
+
+ .share-btn {
+ width: 120rpx;
+ height: 50rpx;
+ border-radius: 25rpx;
+ }
+ }
+
\ No newline at end of file
diff --git a/pages/commission/order.vue b/pages/commission/order.vue
index 4e92e778..56ceb786 100644
--- a/pages/commission/order.vue
+++ b/pages/commission/order.vue
@@ -1,417 +1,411 @@
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
- 佣金:
- {{ item.rewards[0]?.commission }}
-
-
- {{ item.commission_order_status_text }}
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ 佣金:
+ {{ item.rewards[0]?.commission }}
+
+
+ {{ item.commission_order_status_text }}
+
+
+
+
+
+
+
+
+
+
-
-
-
+ }" @tap="loadmore" />
+
+
+
+ &::before {
+ content: '¥';
+ font-size: 22rpx;
+ }
+ }
+
+ .order-status {
+ line-height: 30rpx;
+ padding: 0 10rpx;
+ border-radius: 30rpx;
+ margin-left: 20rpx;
+ font-size: 24rpx;
+ color: var(--ui-BG-Main);
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/project.config.json b/project.config.json
new file mode 100644
index 00000000..d554d96e
--- /dev/null
+++ b/project.config.json
@@ -0,0 +1,28 @@
+{
+ "appid": "wxd4da84f87dcafd80",
+ "compileType": "miniprogram",
+ "libVersion": "3.2.4",
+ "packOptions": {
+ "ignore": [],
+ "include": []
+ },
+ "setting": {
+ "coverView": true,
+ "es6": true,
+ "postcss": true,
+ "minified": true,
+ "enhance": true,
+ "showShadowRootInWxmlPanel": true,
+ "packNpmRelationList": [],
+ "babelSetting": {
+ "ignore": [],
+ "disablePlugins": [],
+ "outputPath": ""
+ }
+ },
+ "condition": {},
+ "editorSetting": {
+ "tabIndent": "insertSpaces",
+ "tabSize": 2
+ }
+}
\ No newline at end of file
diff --git a/project.private.config.json b/project.private.config.json
new file mode 100644
index 00000000..31ea5724
--- /dev/null
+++ b/project.private.config.json
@@ -0,0 +1,7 @@
+{
+ "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+ "projectname": "uni3",
+ "setting": {
+ "compileHotReLoad": true
+ }
+}
\ No newline at end of file
diff --git a/sheep/api/commission.js b/sheep/api/commission.js
index e3b44c75..35c18d3b 100644
--- a/sheep/api/commission.js
+++ b/sheep/api/commission.js
@@ -1,65 +1,71 @@
import request from '@/sheep/request';
export default {
- // 分销商详情
- agent: () =>
- request({
- url: 'commission/agent',
- method: 'GET',
- custom: {
- showLoading: false,
- showError: false,
- },
- }),
- // 分销表单
- form: () =>
- request({
- url: 'commission/agent/form',
- method: 'GET',
- }),
- // 申请分销商
- apply: (data) =>
- request({
- url: 'commission/agent/apply',
- method: 'POST',
- data,
- custom: {
- showSuccess: true,
- },
- }),
- // 分销动态
- log: (params) =>
- request({
- url: 'commission/log',
- method: 'GET',
- params,
- }),
- // 分销订单
- order: (params) =>
- request({
- url: 'commission/order',
- method: 'GET',
- params,
- }),
- // 分销商品
- goods: (params) =>
- request({
- url: 'commission/goods',
- method: 'GET',
- params,
- }),
- // 我的团队
- team: (params) =>
- request({
- url: 'commission/agent/team',
- method: 'GET',
- params,
- }),
- // 佣金转余额
- transfer: (data) =>
- request({
- url: 'commission/agent/transfer',
- method: 'POST',
- data,
- }),
-};
+ // 分销商详情
+ agent: () =>
+ request({
+ url: 'commission/agent',
+ method: 'GET',
+ custom: {
+ showLoading: false,
+ showError: false,
+ },
+ }),
+ // 分销表单
+ form: () =>
+ request({
+ url: 'commission/agent/form',
+ method: 'GET',
+ }),
+ // 申请分销商
+ apply: (data) =>
+ request({
+ url: 'commission/agent/apply',
+ method: 'POST',
+ data,
+ custom: {
+ showSuccess: true,
+ },
+ }),
+ // 分销动态
+ log: (params) =>
+ request({
+ url: 'commission/log',
+ method: 'GET',
+ params,
+ }),
+ // 分销订单
+ order: (params) =>
+ request({
+ url: 'commission/order',
+ method: 'GET',
+ params,
+ }),
+
+ // 分销商品
+ goods: (params) =>
+ request({
+ url: '/app-api/product/spu/page',
+ method: 'GET',
+ params,
+ }),
+ // 我的团队
+ team: (params) =>
+ request({
+ url: 'commission/agent/team',
+ method: 'GET',
+ params,
+ }),
+ // 佣金转余额
+ transfer: (data) =>
+ request({
+ url: 'commission/agent/transfer',
+ method: 'POST',
+ data,
+ }),
+ getSummary: (data) =>
+ request({
+ url: '/app-api/trade/brokerage-user/get-summary',
+ method: 'GET',
+ }),
+};
\ No newline at end of file
diff --git a/sheep/request/index.js b/sheep/request/index.js
index 7ec6d3cd..a0f41207 100644
--- a/sheep/request/index.js
+++ b/sheep/request/index.js
@@ -94,7 +94,7 @@ http.interceptors.request.use(
if (config.url.indexOf('/app-api/') !== -1) {
config.header['Accept'] = '*/*'
config.header['tenant-id'] = '1';
- config.header['terminal'] = '20';
+ config.header['terminal'] = '20';
config.header['Authorization'] = 'Bearer test247';
}
return config;
@@ -113,7 +113,7 @@ http.interceptors.response.use(
if (response.header.authorization || response.header.Authorization) {
$store('user').setToken(response.header.authorization || response.header.Authorization);
}
- // TODO 芋艿:如果是登录的 API,则自动设置 token
+ // TODO 芋艿:如果是登录的 API,则自动设置 token
response.config.custom.showLoading && closeLoading();
if (response.data.error !== 0 && response.data.code !== 0) {
@@ -125,10 +125,10 @@ http.interceptors.response.use(
});
return Promise.resolve(response.data);
}
- // 成功时的提示
+ // 成功时的提示
if (
(response.data.error === 0 || response.data.code === 0) &&
- ( response.data.msg !== '' || response.config.custom.successMsg !== '' ) &&
+ (response.data.msg !== '' || response.config.custom.successMsg !== '') &&
response.config.custom.showSuccess
) {
uni.showToast({
@@ -215,8 +215,8 @@ const request = (config) => {
}
// TODO 芋艿:额外拼接
if (config.url.indexOf('/app-api/') >= 0) {
- // config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
- config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
+ config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
+ // config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
}
return http.middleware(config);
};
diff --git a/sheep/request2/index.js b/sheep/request2/index.js
index 545cc012..56b19a33 100644
--- a/sheep/request2/index.js
+++ b/sheep/request2/index.js
@@ -95,8 +95,8 @@ http.interceptors.request.use(
if (config.url.indexOf('/app-api/') !== -1) {
config.header['Accept'] = '*/*'
config.header['tenant-id'] = '1';
- config.header['terminal'] = '20';
- config.header['Authorization'] = 'Bearer test247';
+ config.header['terminal'] = '20';
+ config.header['Authorization'] = 'Bearer test247';
}
return config;
},