From 5b6d14c85be7db389ca71a4983005ef55a88b043 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Mon, 5 Aug 2024 18:00:36 +0800 Subject: [PATCH 1/2] 1 --- api/user.js | 19 ++ config/app.js | 6 +- pages.json | 21 ++ pages/index/index.vue | 3 +- pages/login/login.vue | 9 +- pages/my/my.vue | 5 +- pages/product/product.vue | 85 +++++-- pages/user_cash/index.vue | 506 +++++++++++++++++++++++++++++++++++++ pages/user_cash/list.vue | 93 +++++++ pages/user_cash/status.vue | 34 +++ 10 files changed, 756 insertions(+), 25 deletions(-) create mode 100644 pages/user_cash/index.vue create mode 100644 pages/user_cash/list.vue create mode 100644 pages/user_cash/status.vue diff --git a/api/user.js b/api/user.js index 6af8132..a8e631b 100644 --- a/api/user.js +++ b/api/user.js @@ -165,4 +165,23 @@ export const isUserShipApi = (data) => { export const getRechargeListApi = (data) => { return request.get('/user/UserRecharge/recharge_list', data); +} + +/** + * 提现信息 + */ +export const getCashInfoApi = (data) => { + return request.get('/user/User/cash_info', data); +} +/** + * 提交提现申请 + */ +export const CashApplicationApi = (data) => { + return request.post('/user/User/cash_application', data); +} +/** + * 提现申请记录 + */ +export const getCashRecordApi = (data) => { + return request.get('/user/User/cash_record', data); } \ No newline at end of file diff --git a/config/app.js b/config/app.js index 5657b7c..da7298e 100644 --- a/config/app.js +++ b/config/app.js @@ -3,9 +3,9 @@ let WSS_URL import store from "@/store/user.js" // 环境 // let env = "dev" -// let env = "prod" +let env = "prod" // let env = "release"; -let env = "local"; +// let env = "local"; switch (env) { case 'dev': @@ -17,7 +17,7 @@ switch (env) { WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull' break; case 'local': - BASE_URL = 'http://192.168.1.22:8545'; + BASE_URL = 'http://192.168.1.231:8545'; WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull' break; default: diff --git a/pages.json b/pages.json index 3df30a7..c50dca4 100644 --- a/pages.json +++ b/pages.json @@ -100,6 +100,27 @@ "navigationBarTitleText" : "商品列表", "enablePullDownRefresh": true } + }, + { + "path" : "pages/user_cash/index", + "style" : + { + "navigationBarTitleText" : "提现" + } + }, + { + "path" : "pages/user_cash/status", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/user_cash/list", + "style" : + { + "navigationBarTitleText" : "提现申请记录" + } } ], "subPackages": [{ diff --git a/pages/index/index.vue b/pages/index/index.vue index 9ac8b1b..5ba2761 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -655,8 +655,7 @@ } const settleAccounts = () => { - - if (+cartInfo.value.pay_price < 500) return showOverlay.value = true; + if (+cartInfo.value.pay_price < 500 && userStore.userInfo.user_ship==0 ) return showOverlay.value = true; uni.navigateTo({ url: '/pagesOrder/settle/settle' }) diff --git a/pages/login/login.vue b/pages/login/login.vue index 0b1ddc5..8018f19 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -7,7 +7,7 @@ - + 欢迎登录泸优采 @@ -16,7 +16,7 @@ 手机号快捷登录 - + 账号登录 @@ -100,8 +100,11 @@ config } from "@/config/app.js" - + const test_click=ref(0); const showOfficial = ref(false); + const test=()=>{ + test_click.value++ + } const navToIndex = () => { if (userStore.userInfo && userStore.token) uni.reLaunch({ url: '/pages/index/index' diff --git a/pages/my/my.vue b/pages/my/my.vue index 3ae918c..f4045a6 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -51,7 +51,8 @@ 会员报备 - + + 余额: @@ -121,7 +122,7 @@ --> - + diff --git a/pages/product/product.vue b/pages/product/product.vue index c3e03bc..2163cc4 100644 --- a/pages/product/product.vue +++ b/pages/product/product.vue @@ -4,14 +4,14 @@ - - - + + + - + - + @@ -29,15 +29,15 @@ - - + + - + @@ -57,7 +57,7 @@ let status = ref('loadmore') let list1 = ['零售', '商户', '会员'] let keyword = ref(''); - + let enable_flex=ref(true) const where = ref({ page_no: 1, page_size: 15, @@ -99,6 +99,34 @@ \ No newline at end of file diff --git a/pages/user_cash/index.vue b/pages/user_cash/index.vue new file mode 100644 index 0000000..56ecc43 --- /dev/null +++ b/pages/user_cash/index.vue @@ -0,0 +1,506 @@ + + + + + \ No newline at end of file diff --git a/pages/user_cash/list.vue b/pages/user_cash/list.vue new file mode 100644 index 0000000..a4cb8db --- /dev/null +++ b/pages/user_cash/list.vue @@ -0,0 +1,93 @@ + + + + + \ No newline at end of file diff --git a/pages/user_cash/status.vue b/pages/user_cash/status.vue new file mode 100644 index 0000000..14757fd --- /dev/null +++ b/pages/user_cash/status.vue @@ -0,0 +1,34 @@ + + + + + -- 2.40.1 From 551b0b49b5188f413927a9460e1b6281a2eab1ab Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 8 Aug 2024 17:16:48 +0800 Subject: [PATCH 2/2] 1 --- config/app.js | 4 +- pages.json | 7 + pages/my/my.vue | 2 + pagesOrder/delivery/index.vue | 596 ++++++++++++++++++++++++++++++++++ pagesOrder/settle/settle.vue | 44 +-- 5 files changed, 623 insertions(+), 30 deletions(-) create mode 100644 pagesOrder/delivery/index.vue diff --git a/config/app.js b/config/app.js index da7298e..971d6b2 100644 --- a/config/app.js +++ b/config/app.js @@ -3,9 +3,9 @@ let WSS_URL import store from "@/store/user.js" // 环境 // let env = "dev" -let env = "prod" +// let env = "prod" // let env = "release"; -// let env = "local"; +let env = "local"; switch (env) { case 'dev': diff --git a/pages.json b/pages.json index c50dca4..e30cb07 100644 --- a/pages.json +++ b/pages.json @@ -197,6 +197,13 @@ "navigationBarTitleText": "设置密码", "enablePullDownRefresh": false } + }, + { + "path" : "delivery/index", + "style" : + { + "navigationBarTitleText" : "配送员订单" + } } ] }, diff --git a/pages/my/my.vue b/pages/my/my.vue index f4045a6..6fbab3d 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -123,6 +123,8 @@ + + diff --git a/pagesOrder/delivery/index.vue b/pagesOrder/delivery/index.vue new file mode 100644 index 0000000..39dbecb --- /dev/null +++ b/pagesOrder/delivery/index.vue @@ -0,0 +1,596 @@ + + + + + \ No newline at end of file diff --git a/pagesOrder/settle/settle.vue b/pagesOrder/settle/settle.vue index 3840893..b1f8337 100644 --- a/pagesOrder/settle/settle.vue +++ b/pagesOrder/settle/settle.vue @@ -83,13 +83,17 @@ + 价格明细 商品总价 共计{{ cartList.length }}款商品 - + ¥{{ c_price(orderInfo.pay_price, 0) }}.{{ c_price(orderInfo.pay_price, 1) }} + + + 运费 @@ -255,10 +259,13 @@ import ZyPasswordboard from '@/uni_modules/zy-passwordboard/components/zy-passwordboard/zy-passwordboard.vue'; const userInfo = useUserStore().userInfo; + const shop_Info = ref({}) + // 用户选择的门店信息 let STORE_INFO = uni.getStorageSync('STORE_INFO'); - if (STORE_INFO) - STORE_INFO = JSON.parse(STORE_INFO) + if (STORE_INFO){ + shop_Info.value = JSON.parse(STORE_INFO) + } const cartStore = useCartStore(); const reservation_time = ref('') @@ -344,23 +351,6 @@ }) } - // getMerchantList(); - // 定位 - // const LoadAddress = () => { - // uni.getLocation({ - // success: (res) => {}, - // fail: (err) => { - // uni.$u.toast('定位失败, 请手动选择提货点!') - // }, - // complete: (res) => { - // myAddressInfo.value.long = res.longitude || ""; - // myAddressInfo.value.lat = res.latitude || ""; - // getMerchantList(); - // } - // }) - // } - // LoadAddress(); - const changeShop = (e) => { shopInfo.value = e; shopListShow.value = false; @@ -395,7 +385,7 @@ } // 提交订单 - const submitOrder = () => { + const submitOrder = () => { if (orderInfo.value.pay_price == 0) { pay_type.value = 3; return uni.$u.toast('当前支付金额为0,暂不能使用微信支付') @@ -412,13 +402,12 @@ long: "", }; let reservation = ref(0); - const shop_Info = ref({}) const cartList = ref([]); const orderInfo = ref({}); const checkOrder = (store_id) => { checkOrderApi({ cart_id: cartStore.cartList, - store_id: STORE_INFO.id || 0, + store_id: shop_Info.value.id || 0, ...location }).then(res => { cartList.value = res.data.cart_list; @@ -447,7 +436,7 @@ }).then(res => { reservation.value = res.data.reservation }) - + checkOrder(datas.id) // formData.store_id = datas.id // formData.store_name = datas.name }) @@ -483,7 +472,6 @@ cart_id: cartStore.cartList, address_id: addressInfo.value.address_id, pay_type: pay_type.value, - store_id: STORE_INFO.id || 0, store_id: shop_Info.value.id, shipping_type: orderInfo.value.shipping_type, mark: formData.value.remark, @@ -564,8 +552,8 @@ price = price + ''; return price.split('.')[index] || (index ? '00' : '0'); } - const toastAddressoff=()=>{ - toastAddressShow.value=false; + const toastAddressoff = () => { + toastAddressShow.value = false; uni.redirectTo({ url: '/pagesOrder/settle/settle' }); @@ -607,7 +595,7 @@ const userLocationfalse = () => { LocationShow.value = false; uni.$u.toast('获取位置当前失败,为你推荐当前门店') - checkOrder(STORE_INFO.id); + checkOrder(shop_Info.value.id); } const opensettings = (a = false) => { if (a == false) { -- 2.40.1