diff --git a/api/api.js b/api/api.js index 701edeb..73fb5d1 100644 --- a/api/api.js +++ b/api/api.js @@ -6,4 +6,10 @@ export const goodListApi = (data) => { export const goodClassListApi = (data) => { return request.get('/goods/goodsclass/lists', data); +} + + + +export const getPush = (data) => { + return request.get('/push', data); } \ No newline at end of file diff --git a/api/user.js b/api/user.js index 11f60ff..98fcf50 100644 --- a/api/user.js +++ b/api/user.js @@ -149,4 +149,8 @@ export const getReportingSms = (data) => { export const uploadImg = (data) => { return request.post('/Upload/image', data); +} + +export const getVipInfoByPhone = (data) => { + return request.get('/user/user/other_user_info', data); } \ No newline at end of file diff --git a/pageQuota/balanceDetail/index.vue b/pageQuota/balanceDetail/index.vue index 8296aaa..4efc17d 100644 --- a/pageQuota/balanceDetail/index.vue +++ b/pageQuota/balanceDetail/index.vue @@ -13,7 +13,7 @@ {{item.create_time}} - 余额 {{item.before_balance}} + 余额 {{item.balance}} @@ -21,8 +21,8 @@ {{item.title}} - {{ !item.financial_pm?'+':'-' }}{{item.number}} + {{ item.financial_pm?'+':'-' }}{{item.number}} {{item.create_time}} diff --git a/pageQuota/vipUser/index.vue b/pageQuota/vipUser/index.vue index ef01bb8..e4ccde1 100644 --- a/pageQuota/vipUser/index.vue +++ b/pageQuota/vipUser/index.vue @@ -6,26 +6,28 @@ - - + - + --> + + + + + + - {{ Role == 1 ? '行业会员' : '商户' }}开通报备 + 行业会员开通报备 @@ -51,7 +53,7 @@ suffixIcon='arrow-down'> - + - - - - --> @@ -88,15 +81,15 @@ 报备人:{{ STORE_INFO.name }} - + - - {{formData.label_name}}角色最低金额不能低于{{formData.label_limit}}元 + {{formData.label_name}}角色最低金额不能低于{{formData.label_limit}}元且最高金额不能超过10000.00元 @@ -105,14 +98,85 @@ - {{ Role == 1 ? '完成并收款' : '完成' }} + 完成并收款 + + + + 行业会员追加经营资金 + + + + + + + + + + + + + + + + + + 报备人:{{ STORE_INFO.name }} + + + + + + + + + {{formData2.label_name}}会员最低金额不能低于{{formData2.label_limit}}元 + + + 最高金额不能超过10000.00元 + + + 可单次多笔累计操作 + + + + + + + + + + 完成并收款 + + + + - + 当前已开通: @@ -123,25 +187,22 @@ - 序号 - 行业会员 - 经营资金 - 开通时间 - 商户 - 角色 + + 行业会员 + 经营资金 + 开通时间 + 角色 状态 - {{index+1}} - {{ item.real_name }} - {{ item.price }} - {{ item.create_time }} - {{ item.nickname }} - {{ item.label_name }} + + {{ item.real_name }} + {{ item.price }} + {{ item.create_time }} + {{ item.label_name }} - 已开通 + 已开通 未开通,查询 @@ -229,7 +290,8 @@ getUserLabel, getUserShip, getCreateLists, - getReportingSms + getReportingSms, + getVipInfoByPhone } from "@/api/user.js" import Push from "@/utils/push.js" import { @@ -247,6 +309,28 @@ const columns = ref([]) const showModa = ref(true) const storePhone = ref('') + const tabsLst = reactive([{ + name: '开通行业会员' + }, + { + name: '追加经营资金' + }, + { + name: '已开通列表' + }, + ]); + + + const tabsChange = (e) => { + currentTab.value = e.index + if (e.index == 2) { + getCount() + getLists() + } + // getLists() + } + + const confirmStore = () => { getStoreByPhone({ phone: storePhone.value @@ -294,7 +378,7 @@ const code = ref('') const checkPhone = (phone) => { const regex = /^1[3-9]\d{9}$/; - return regex.test(formData.mobile) ? true : false + return regex.test(phone) ? true : false } const getCode = async () => { @@ -315,7 +399,7 @@ // 验证码结束 - const currentTab = ref(1) + const currentTab = ref(0) const formData = reactive({ store_id: STORE_INFO.id, mobile: "", @@ -347,10 +431,65 @@ // label_name: "", // label_id: "4", // user_ship: '1', - // code: '' + // price: 0.02, + // code: '12' }) - const tofixedPrice = () => { + + const formData2 = reactive({ + store_id: STORE_INFO.id, + mobile: "", + province: 510000, + city: '', + area: "", + street: "", + village: "", + real_name: "", + auth_code: "", + address: "", + label_name: "", + label_id: "", + label_limit: "", + user_ship: '', + brigade: "", + price: "", + }) + + const phoneChnge = async () => { + if (formData2.mobile.length == 0) resetFormData(); + if (!checkPhone(formData2.mobile)) return + uni.showLoading({ + title: '查询用户中' + }) + let { + data + } = await getVipInfoByPhone({ + mobile: formData2.mobile + }) + uni.hideLoading() + formData2.city = data.address_info?.city + formData2.area = data.address_info?.area + formData2.province = data.address_info?.province + formData2.street = data.address_info?.street + formData2.village = data.address_info?.village + formData2.real_name = data.real_name + formData2.address = data.address_info?.address_like + formData2.label_id = data.label_id + // formData2.label_limit = data.label_id + formData2.user_ship = data.user_ship + formData2.brigade = data.address_info?.brigade + columns.value[0].forEach(item => { + if (item.label_id == data.label_id) { + formData2.label_name = item.label_name + formData2.label_limit = item.limit + } + }) + + } + + + const tofixedPrice = (type = 1) => { + if (type == 2) return formData2.price = (+formData2.price).toFixed(2) formData.price = (+formData.price).toFixed(2) } @@ -358,10 +497,16 @@ for (let key in formData) { formData[key] = '' } + for (let key in formData2) { + formData2[key] = '' + } + + tabsList.forEach(item => { item.name = '请选择' }) formData.province = 510000 + formData2.province = 510000 cutDown.value = 0 currentAddressIndex.value = 0 } @@ -481,7 +626,10 @@ const user_channel = connection.subscribe(`wechat_mmp_${userInfo.id}`); user_channel.on('message', function(data) { try { + uni.hideLoading({}); + console.log(timerInvol) clearTimeout(timerInvol); + console.log("清除" + timerInvol) paySuccessToTabs2() } catch (error) {} }); @@ -489,30 +637,22 @@ // 提交 - const submit = async () => { - if (!formData.real_name) return uni.$u.toast('请填写真实姓名'); - if (!formData.mobile) return uni.$u.toast('请填写电话号码'); - if (!formData.code) return uni.$u.toast('请输入短信验证码'); - if (!formData.address) return uni.$u.toast('请选择地址'); - if (!formData.label_id) return uni.$u.toast('请选择用户身份'); - if (formData.price < formData.label_limit) return uni.$u.toast( - `${formData.label_name}角色最低金额不能低于${formData.label_limit}元`); - formData.store_id = STORE_INFO.id - if (Role.value == 1) { - // formData.recharge_type = 'INDUSTRYMEMBERS' - // formData.user_ship = 1 - // vipRechargeApi(formData).then(res => {}) - // return + const submit = async (type = 1) => { + if (type == 2) { + if (!formData2.mobile) return uni.$u.toast('请填写电话号码'); + if (formData2.price < formData2.label_limit) return uni.$u.toast( + `${formData2.label_name}角色最低金额不能低于${formData2.label_limit}元`); + formData2.store_id = STORE_INFO.id uni.scanCode({ success: function(res) { if (String(res.result.length) != 18) return uni.$u.toast('二维码未扫描完整'); uni.showLoading({ title: '支付中...' }); - formData.auth_code = res.result - formData.recharge_type = 'INDUSTRYMEMBERS' - formData.user_ship = 1 - vipRechargeApi(formData).then(res => { + formData2.auth_code = res.result + formData2.recharge_type = 'INDUSTRYMEMBERS' + formData2.user_ship = 1 + vipRechargeApi(formData2).then(res => { timerInvol = setTimeout(() => { uni.hideLoading(); if (currentTab.value == 2) return; @@ -522,7 +662,52 @@ } }); + } else { + if (!formData.real_name) return uni.$u.toast('请填写真实姓名'); + if (!formData.mobile) return uni.$u.toast('请填写电话号码'); + if (!formData.code) return uni.$u.toast('请输入短信验证码'); + if (!formData.address) return uni.$u.toast('请选择地址'); + if (!formData.label_id) return uni.$u.toast('请选择用户身份'); + if (formData.price < formData.label_limit) return uni.$u.toast( + `${formData.label_name}角色最低金额不能低于${formData.label_limit}元`); + formData.store_id = STORE_INFO.id + if (Role.value == 1) { + // formData.recharge_type = 'INDUSTRYMEMBERS' + // formData.user_ship = 1 + // vipRechargeApi(formData).then(res => { + // uni.showLoading({ + // title: '支付中...' + // }); + // timerInvol = setTimeout(() => { + // uni.hideLoading(); + // uni.$u.toast('支付超时'); + // console.log("支付超时") + // }, 10000) + // }) + // return + uni.scanCode({ + success: function(res) { + if (String(res.result.length) != 18) return uni.$u.toast('二维码未扫描完整'); + uni.showLoading({ + title: '支付中...' + }); + formData.auth_code = res.result + formData.recharge_type = 'INDUSTRYMEMBERS' + formData.user_ship = 1 + vipRechargeApi(formData).then(res => { + timerInvol = setTimeout(() => { + uni.hideLoading(); + if (currentTab.value == 2) return; + uni.$u.toast('支付超时'); + }, 30000) + }) + + } + }); + } + } + } const rePay = (item) => { @@ -538,7 +723,6 @@ }).then(res => { timerInvol = setTimeout(() => { uni.hideLoading(); - if (currentTab.value == 2) return; uni.$u.toast('支付超时'); }, 30000) }) @@ -595,8 +779,6 @@ } - getCount() - getLists() const upadtaStatus = (item) => { updataOrderApi({ diff --git a/pages.json b/pages.json index 0a14628..f3b81ad 100644 --- a/pages.json +++ b/pages.json @@ -53,7 +53,7 @@ "style": { "navigationBarTitleText": "个人中心", "enablePullDownRefresh": true, - "navigationBarBackgroundColor": "#D3FDCA" + "navigationBarBackgroundColor": "#CDFBBC" } }, { "path": "pages/charge/charge_record", diff --git a/pages/index/index.vue b/pages/index/index.vue index ff84b16..cb5f161 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -24,9 +24,12 @@ {{ - (shareInfo.real_name || ( - userStore.userInfo.real_name || userStore.userInfo.nickname)) + '的供销个人门店' }} + style="max-width: 400rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"> + + {{ (userStore.userInfo.real_name || userStore.userInfo.nickname) + '的供销个人门店' }} + + {{(shareInfo.real_name || (userStore.userInfo.real_name || userStore.userInfo.nickname)) + '的供销个人门店' }} + {{ STORE_INFO.store_name }} diff --git a/pages/login/login.vue b/pages/login/login.vue index 3431173..3222c18 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -16,13 +16,25 @@ 手机号快捷登录 + + + -