diff --git a/.env.development b/.env.development index f5f48a0..d46ca2a 100644 --- a/.env.development +++ b/.env.development @@ -4,11 +4,11 @@ VITE_NOW_TYPE = 'dist' # VITE_PUSH_URL = 'ws://192.168.1.201:8787' # VITE_BASE_URL = 'http://192.168.1.201:8545' -# VITE_PUSH_URL = 'ws://192.168.1.22:8787' -# VITE_BASE_URL = 'http://192.168.1.22:8545' +VITE_PUSH_URL = 'ws://192.168.1.22:8787' +VITE_BASE_URL = 'http://192.168.1.22:8545' -VITE_PUSH_URL ='wss://test-multi-store.lihaink.cn/pull' -VITE_BASE_URL = 'https://test-multi-store.lihaink.cn' +# VITE_PUSH_URL ='wss://test-multi-store.lihaink.cn/pull' +# VITE_BASE_URL = 'https://test-multi-store.lihaink.cn' # VITE_PUSH_URL ='wss://multi-store.lihaink.cn/pull' # VITE_BASE_URL = 'https://multi-store.lihaink.cn' \ No newline at end of file diff --git a/src/api/shop.js b/src/api/shop.js index 9443b45..4dc3b78 100644 --- a/src/api/shop.js +++ b/src/api/shop.js @@ -1,4 +1,5 @@ import request from '@/utils/axios.js' +import api from '@/utils/axiosAPI.js' /** * @description 商品列表 @@ -7,6 +8,7 @@ export function storeListApi(id, data) { return request.get(`server/${id}/product/lst`, { params: data }) } + /** * @description 商品详情 */ @@ -63,11 +65,18 @@ export function productDetailApi(store_id, id, data) { return request.get(`server/${store_id}/product/detail/${id}`, { params: data }) } +// /** +// * @description 批发商品列表 +// */ +// export function saleStoreListApi(data) { +// return request.get(`/store_product/storeProduct/lists`, { params: data }) +// } + /** * @description 批发商品列表 */ export function saleStoreListApi(data) { - return request.get(`/store_product/storeProduct/lists`, { params: data }) + return api.get(`/product/product/lists`, { params: data }) } /** diff --git a/src/api/user.js b/src/api/user.js index ce4c09f..326f649 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -41,6 +41,13 @@ export function userAddApi(data) { return request.post(`/user/user/add`, data) } +/** +* @description 发送新增用户档案验证码 +*/ +export function userArchivesSmsApi(data) { + return request.post(`/user/user/archives_sms`, data) +} + /** * @description 会员列表 */ diff --git a/src/components/pay.vue b/src/components/pay.vue index 3e8f843..ab513f7 100644 --- a/src/components/pay.vue +++ b/src/components/pay.vue @@ -101,7 +101,7 @@ const regexPay = /^(25|26|27|28|29|30)\d{14,22}$/; //支付宝条码正则 25-30 const order_id = ref(""); // 支付 const handleEnter = () => { - if (form.value.pay_price < minMoney.value) return ElMessage.error(`起购金额为${minMoney.value}元`) + // if (form.value.pay_price < minMoney.value) return ElMessage.error(`起购金额为${minMoney.value}元`) loading.value = true; codeRef.value.blur(); if (isRePay.value) orderPay(); @@ -332,7 +332,7 @@ const numTap = (item) => { }; // 现金结算 const cashBnt = () => { - if (form.value.pay_price < minMoney.value) return ElMessage.error(`起购金额为${minMoney.value}元`) + // if (form.value.pay_price < minMoney.value) return ElMessage.error(`起购金额为${minMoney.value}元`) if ( changePrice.value === "" || changePrice.value === null || @@ -428,7 +428,7 @@ const keyboard = (event) => { }; const getSms = () => { - if (form.value.pay_price < minMoney.value && active.value === 3) return ElMessage.error(`起购金额为${minMoney.value}元`) + // if (form.value.pay_price < minMoney.value && active.value === 3) return ElMessage.error(`起购金额为${minMoney.value}元`) if (!uid.value) return ElMessage.error('请先选择用户'); let type = 1; // 采购款支付 if (active.value == 4) type = 2; //礼品券兑换 @@ -446,7 +446,7 @@ const getSms = () => { const smsCode = ref(''); // 提交验证码/支付 const handlecodeEnter = () => { - if (form.value.pay_price < minMoney.value && active.value === 3) return ElMessage.error(`起购金额为${minMoney.value}元`) + // if (form.value.pay_price < minMoney.value && active.value === 3) return ElMessage.error(`起购金额为${minMoney.value}元`) if (!uid.value) return ElMessage.error('请先选择用户'); let pay_type = 18; // 采购款支付 if (active.value == 4) pay_type = 19; //礼品券兑换 @@ -503,7 +503,7 @@ onUnmounted(() => {
现金收款
-
+
采购款
@@ -519,7 +519,7 @@ onUnmounted(() => {
-
{{ form.activity || active == 2 ? '活动折扣:' : '消费返利:' }} +
活动折扣:
{{ form.activity }}¥{{ form.activity_price }} diff --git a/src/views/saleHome/component/order.vue b/src/views/saleHome/component/order.vue index 457dcc3..7b29297 100644 --- a/src/views/saleHome/component/order.vue +++ b/src/views/saleHome/component/order.vue @@ -72,7 +72,10 @@ const changeCartNum = (val, old) => { }); costPrice.value = allPrice.value; }).catch((err)=>{ - val.cart_num = err?.msg?.match(/\d+\.\d+/) || 1; + let match = err?.msg?.match(/\b\d+(\.\d+)?\b/); + if(match){ + val.cart_num = +match[0]; + }else val.cart_num = 1; }); }; diff --git a/src/views/saleHome/index.vue b/src/views/saleHome/index.vue index 26fe52b..3ef37f2 100644 --- a/src/views/saleHome/index.vue +++ b/src/views/saleHome/index.vue @@ -41,7 +41,10 @@ const getStoreList = (data = {}, reload = false) => { loadEnd.value = false; } loading.value = true; - saleStoreListApi(where.value).then((res) => { + saleStoreListApi({ + ...where.value, + store_id: userStore.userInfo?.store_id + }).then((res) => { loading.value = false; if (res.data?.lists?.length < where.value.page_size) loadEnd.value = true; storeList.value = storeList.value.concat(res.data.lists); diff --git a/src/views/user/component/add.vue b/src/views/user/component/add.vue index 1b4c6dc..602511b 100644 --- a/src/views/user/component/add.vue +++ b/src/views/user/component/add.vue @@ -1,7 +1,7 @@