diff --git a/api/address.js b/api/address.js index 50022aa..7cd7b05 100644 --- a/api/address.js +++ b/api/address.js @@ -29,4 +29,8 @@ export const getMassageCode = (data) => { export const setPayPassword = (data) => { return request.post('/user/user/set_payPassword', data); +} + +export const getFundList = (data) => { + return request.get('/user/user/fundList', data); } \ No newline at end of file diff --git a/api/user.js b/api/user.js index 7f85bac..c0d94dd 100644 --- a/api/user.js +++ b/api/user.js @@ -99,6 +99,10 @@ export const vipRechargeApi = (data) => { return request.post('/store/store/recharge', data); } +export const reVipRechargeApi = (data) => { + return request.post('/store/store/again_recharge', data); +} + export const rechargeCountApi = (data) => { return request.get('/store/store/recharge_count', data); } @@ -137,4 +141,8 @@ export const getCreateLists = (data) => { export const getloginSms = (data) => { return request.post('/user/user/login_sms', data); +} + +export const getReportingSms = (data) => { + return request.post('/user/user/reporting_sms', data); } \ No newline at end of file diff --git a/components/goodPopup.vue b/components/goodPopup.vue index 3ce66f7..f542595 100644 --- a/components/goodPopup.vue +++ b/components/goodPopup.vue @@ -8,13 +8,19 @@ 商品名称 {{ datas.name || datas.goods_name || datas.store_name }} + + 商品规格 + {{ datas.store_info}} + 商品单位 {{ datas.unit_name }} 商品价格 - ¥ {{ datas.price || datas.sell }} / {{ datas.unit_name }} + ¥ {{priceKey.off_activity==1? datas[priceKey.price]: datas[priceKey.op_price] }} / + {{ datas.unit_name }} + 起批量 @@ -28,22 +34,16 @@ ¥ {{ subtotal }} - + 购买重量* - - + + - + 购买数量* - - - - + + @@ -80,13 +80,22 @@ }, }) + + let priceKey = ref({}) + if (uni.getStorageSync('PRICE_KEY')) { + priceKey.value = JSON.parse(uni.getStorageSync('PRICE_KEY')); + } else { + priceKey.value = {}; + } + + const datas = ref({ cart_num: '' }); const setData = (e) => { datas.value = e; if (Number(e.batch) > 0) datas.value.cart_num = e.batch; - else datas.value.cart_num = ''; + else datas.value.cart_num = 1; } @@ -107,13 +116,16 @@ } const subtotal = computed(() => { - let num = +datas.value.cart_num || 0; - let sell = +datas.value.sell || +datas.value.price; + let num = +datas.value.cart_num || 1; + let sell = +datas.value[priceKey.value.off_activity == 1 ? priceKey.value.price : priceKey.value.op_price]; return Number(num * sell * 100 / 100).toFixed(2) }) + + + defineExpose({ setData, // founcsFn diff --git a/config/app.js b/config/app.js index 85facca..36817f7 100644 --- a/config/app.js +++ b/config/app.js @@ -1,4 +1,5 @@ let BASE_URL +let WSS_URL import store from "@/store/user.js" // 环境 // let env = "dev" @@ -7,13 +8,18 @@ let env = "prod" switch (env) { case 'dev': - BASE_URL = 'https://test-multi-store.lihaink.cn'; + // BASE_URL = 'https://test-multi-store.lihaink.cn'; + // WSS_URL = 'wss://test-multi-store.lihaink.cn/pull' + BASE_URL = 'https://ceshi-multi-store.lihaink.cn'; + WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull' break; case 'liu': - BASE_URL = 'http://192.168.1.201:8545'; + BASE_URL = 'https://ceshi-multi-store.lihaink.cn'; + WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull' break; default: BASE_URL = 'https://multi-store.lihaink.cn'; + WSS_URL = 'wss://multi-store.lihaink.cn/pull' } let HTTP_REQUEST_URL @@ -21,6 +27,7 @@ let HEADER let config = { HTTP_REQUEST_URL: BASE_URL, + WSS_URL: WSS_URL, HEADER: { 'content-type': 'application/json', //#ifdef MP diff --git a/pageQuota/balanceDetail/index.vue b/pageQuota/balanceDetail/index.vue new file mode 100644 index 0000000..8296aaa --- /dev/null +++ b/pageQuota/balanceDetail/index.vue @@ -0,0 +1,135 @@ + + + + + \ No newline at end of file diff --git a/pageQuota/vipUser/index.vue b/pageQuota/vipUser/index.vue index bcca843..b33e35d 100644 --- a/pageQuota/vipUser/index.vue +++ b/pageQuota/vipUser/index.vue @@ -17,61 +17,73 @@ - 开通{{Role==1?'行业会员':'商户'}} - 已开通列表 - + 开通{{ Role == 1 ? '行业会员' : '商户' }} + 已开通列表 + - + - {{Role==1?'行业会员':'商户'}}开通报备 + {{ Role == 1 ? '行业会员' : '商户' }}开通报备 - + + :customStyle="{ background: '#F3F3F3', padding: '20rpx', 'border-radius': '30rpx' }" + :placeholderStyle="{ color: '#444444' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"> - + + :customStyle="{ background: '#F3F3F3', padding: '20rpx', 'border-radius': '30rpx' }" + :placeholderStyle="{ color: '#444444' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"> - - - + + - - + + + + + + + + 重新获取({{ cutDown }}) + {{ flag ? '获取验证码' : '重新获取' }} + + + - 报备人:{{STORE_INFO.name}} + 报备人:{{ STORE_INFO.name }} - - {{Role==1?'完成并收款':'完成'}} + {{ Role == 1 ? '完成并收款' : '完成' }} @@ -82,7 +94,7 @@ 当前已开通: - 位{{Role==1?'行业会员':'商户'}} + 位{{ Role == 1 ? '行业会员' : '商户' }} @@ -90,535 +102,657 @@ 序号 - 行业会员 - 经营资金 - 开通时间 - 商户 - 角色 + 行业会员 + 经营资金 + 开通时间 + 商户 + 角色 状态 - - {{index+1}} - {{item.real_name}} - {{item.price}} - {{item.create_time}} - {{item.nickname}} - {{item.label_name}} + + {{ index + 1 }} + {{ item.real_name }} + {{ item.price }} + {{ item.create_time }} + {{ item.nickname }} + {{ item.label_name }} - 已开通 - 未开通,查询 + 已开通 + + + 未开通,查询 + + + 重新支付 + + - - + - + + :activeStyle="{ color: '#20B128' }"> - - + - {{item.city_name}} - + {{ item.city_name }} + - - - {{item.area_name}} - + + + {{ item.area_name }} + - - - {{item.street_name}} - + + + {{ item.street_name }} + - - - {{item.village_name}} - + + + {{ item.village_name }} + - - - {{item.brigade_name}} - + + + {{ item.brigade_name }} + - - + \ No newline at end of file diff --git a/pages.json b/pages.json index c1ae891..0a14628 100644 --- a/pages.json +++ b/pages.json @@ -52,8 +52,8 @@ "path": "pages/my/my", "style": { "navigationBarTitleText": "个人中心", - "enablePullDownRefresh": false, - "navigationStyle": "custom" + "enablePullDownRefresh": true, + "navigationBarBackgroundColor": "#D3FDCA" } }, { "path": "pages/charge/charge_record", @@ -234,9 +234,14 @@ "navigationBarTitleText": "会员报备", "enablePullDownRefresh": true } + }, + { + "path": "balanceDetail/index", + "style": { + "navigationBarTitleText": "余额明细", + "enablePullDownRefresh": true + } } - - ] } ], diff --git a/pages/cart/cart.vue b/pages/cart/cart.vue index 13f6a8b..b805550 100644 --- a/pages/cart/cart.vue +++ b/pages/cart/cart.vue @@ -34,9 +34,12 @@ {{item.goods_name}} {{item.unit_name}} + 原价:¥{{item[priceKey.op_price]}} + - ¥{{item.sell}} + ¥{{item[priceKey.price]}} {{item.cart_num}} @@ -109,14 +112,11 @@ - - + + 去结算({{checkAll}}) - - ¥500起订 - + @@ -132,7 +132,8 @@ \ No newline at end of file diff --git a/pages/login/login.vue b/pages/login/login.vue index d497af0..e8420af 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -120,6 +120,9 @@ // 微信公众号绑定 const officialCode = () => { + console.log("jinfas") + return + uni.navigateTo({ url: `/pages/code/code?id=${userStore.userInfo.id}`, success: () => { @@ -168,7 +171,6 @@ } else { userStore.setUserInfo(res.data); //再次登录 已有手机号 判断是否员工 - //身份授权成功 核销人员 if (res.data.is_staff == 1) { userStore.setUserInfo(res.data); @@ -209,6 +211,7 @@ }).then(res => { //手机号获取成功 可以本地缓存用户信息以及token userStore.setUserInfo(res.data); + userStore.setToken(res.data.token); //身份授权成功 核销人员 if (res.is_staff == 1) { userStore.setUserInfo(res.data); diff --git a/pages/login/test.vue b/pages/login/test.vue index 4611f40..f66e9f3 100644 --- a/pages/login/test.vue +++ b/pages/login/test.vue @@ -39,7 +39,8 @@ userLoginApi, userInfoApi, getStoreInfo, - getloginSms + getloginSms, + loginUpdateUserApi } from "@/api/user.js"; import { ref, @@ -94,10 +95,12 @@ }) uni.setStorageSync('token', res.data.token); userStore.setToken(res.data.token); - console.log(res.data.token) userInfoApi().then(res => { const user = res.data; userStore.setUserInfo(user); + if (!user.openid) loginUpdateUserApi({ + mobile: user.mobile + }) uni.reLaunch({ url: '/pages/index/index' }) // 存储token到本地存储中 diff --git a/pages/my/my.vue b/pages/my/my.vue index 7109249..190edb4 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -1,7 +1,7 @@