diff --git a/api/address.js b/api/address.js index 7cd7b05..7c46129 100644 --- a/api/address.js +++ b/api/address.js @@ -33,4 +33,8 @@ export const setPayPassword = (data) => { export const getFundList = (data) => { return request.get('/user/user/fundList', data); +} + +export const getUserSingList = (data) => { + return request.get('/user/user/userSing', data); } \ No newline at end of file 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/asset.js b/api/asset.js new file mode 100644 index 0000000..761c258 --- /dev/null +++ b/api/asset.js @@ -0,0 +1,11 @@ +import request from '@/utils/request'; + + +export const getUserProductStorageLists = (data) => { + return request.get('/user_product_storage/UserProductStorage/lists', data); +} + + +export const reservationUserProductStorage = (data) => { + return request.post('/user_product_storage/UserProductStorage/reservation', data); +} \ No newline at end of file diff --git a/api/order.js b/api/order.js index 193cb14..7e04004 100644 --- a/api/order.js +++ b/api/order.js @@ -74,4 +74,8 @@ export const refundReasonListApi = (data) => { // 订单退款申请 export const applyRefundApi = (data) => { return request.post('/order/order/apply_refund', data); +} + +export const UserProductStorageLogApi = (data) => { + return request.get('/user_product_storage_log/UserProductStorageLog/lists', data); } \ No newline at end of file diff --git a/api/user.js b/api/user.js index 11f60ff..6af8132 100644 --- a/api/user.js +++ b/api/user.js @@ -149,4 +149,20 @@ 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); +} + +export const checkInventoryApi = (data) => { + return request.post('/order/order/checkInventory', data); +} + +export const isUserShipApi = (data) => { + return request.post('/user_ship/UserShip/is_user_ship', data); +} + +export const getRechargeListApi = (data) => { + return request.get('/user/UserRecharge/recharge_list', data); } \ No newline at end of file diff --git a/components/goodPopup.vue b/components/goodPopup.vue index e3fedb6..1744c24 100644 --- a/components/goodPopup.vue +++ b/components/goodPopup.vue @@ -37,13 +37,13 @@ 购买重量* - + 购买数量* - + @@ -63,14 +63,7 @@ computed, nextTick, ref, - } from "vue" - import { - toast - } from "../uni_modules/uview-plus"; - import { - onShow - } from '@dcloudio/uni-app'; const foucs1 = ref(null) const props = defineProps({ @@ -78,20 +71,17 @@ type: Boolean, default: false }, + priceKey: { + type: Object, + default: () => ({}) + } + }) const valChange = () => { uni.vibrateShort(); } - let priceKey = ref({}) - if (uni.getStorageSync('PRICE_KEY')) { - priceKey.value = JSON.parse(uni.getStorageSync('PRICE_KEY')); - } else { - priceKey.value = {}; - } - - const datas = ref({ cart_num: '' }); @@ -115,20 +105,18 @@ datas.value.cart_num = ''; return; } - emit('change', datas.value); + datas.value.types = true + emit('change', datas.value, ); } const subtotal = computed(() => { let num = +datas.value.cart_num || 1; - let sell = +datas.value[priceKey.value.off_activity == 1 ? priceKey.value.price : priceKey.value.op_price]; + let sell = +datas.value[props.priceKey.off_activity == 1 ? props.priceKey.price : props + .priceKey + .op_price]; return Number(num * sell * 100 / 100).toFixed(2) }) - - - - - defineExpose({ setData, // founcsFn diff --git a/config/app.js b/config/app.js index a484fa4..0d6283a 100644 --- a/config/app.js +++ b/config/app.js @@ -17,7 +17,7 @@ switch (env) { WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull' break; case 'local': - BASE_URL = 'http://192.168.1.201:8545'; + BASE_URL = 'http://192.168.1.22:8545'; WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull' break; default: diff --git a/multipleShop/index/index.vue b/multipleShop/index/index.vue index 5637c50..97f3843 100644 --- a/multipleShop/index/index.vue +++ b/multipleShop/index/index.vue @@ -15,8 +15,8 @@ {{item.name}} - 可自提 - 可配送 + 次日可提 + 当日可提 { - // 获取定位 + onLoad((opt) => { + event = opt.event + if (opt.cart_id) queryParams.cart_id = opt.cart_id; getLocation(); }); // 门店选择 const onChooseShop = (item) => { + let { + id, + name, + phone, + detailed_address + } = item + uni.$emit(event, JSON.stringify({ + id, + name, + phone, + detailed_address + })) + uni.navigateBack() return - currShop.value = item.id; - uni.setStorageSync('STORE_INFO', JSON.stringify(item)); - // 如果选择了新店铺,删除之前的分享信息 - uni.removeStorageSync('SHARE_INFO'); - setTimeout(() => { - uni.reLaunch({ - url: '/pages/index/index?id=' + item.id, - fail(err) { - console.log(err); - } - }) - }, 300) + // currShop.value = item.id; + // uni.setStorageSync('STORE_INFO', JSON.stringify(item)); + // uni.removeStorageSync('SHARE_INFO'); + // setTimeout(() => { + // uni.reLaunch({ + // url: '/pages/index/index?id=' + item.id, + // fail(err) { + // console.log(err); + // } + // }) + // }, 300) } // 触底刷新 @@ -162,8 +176,9 @@ const getLocation = () => { let location = uni.getStorageSync('location'); if (location) { - queryParams.longitude = location.lat - queryParams.latitude = location.long + location = JSON.parse(location); + queryParams.longitude = location.long + queryParams.latitude = location.lat // 加载店铺列表 getShopList(); } else { @@ -172,16 +187,19 @@ success(res) { queryParams.latitude = res.latitude; queryParams.longitude = res.longitude; - // 加载店铺列表 getShopList(); - // 避免下次再获取 - uni.setStorageSync('location', { + uni.setStorageSync('location', JSON.stringify({ lat: queryParams.latitude, long: queryParams.longitude - }) + }, )) + }, + fail() { + console.log("获取定位失败") + getShopList(); } + }) } } @@ -259,7 +277,7 @@ margin-bottom: 16rpx; text { - width: 90rpx; + width: 120rpx; height: 42rpx; line-height: 42rpx; text-align: center; diff --git a/pageQuota/Gifts/index.vue b/pageQuota/Gifts/index.vue new file mode 100644 index 0000000..dbc874f --- /dev/null +++ b/pageQuota/Gifts/index.vue @@ -0,0 +1,288 @@ + + + + + \ No newline at end of file diff --git a/pageQuota/asset/index.vue b/pageQuota/asset/index.vue new file mode 100644 index 0000000..618b3cf --- /dev/null +++ b/pageQuota/asset/index.vue @@ -0,0 +1,294 @@ + + + + + \ No newline at end of file diff --git a/pageQuota/asset/lists.vue b/pageQuota/asset/lists.vue new file mode 100644 index 0000000..a900e08 --- /dev/null +++ b/pageQuota/asset/lists.vue @@ -0,0 +1,137 @@ + + + + + \ No newline at end of file diff --git a/pageQuota/balanceDetail/index.vue b/pageQuota/balanceDetail/index.vue index 8296aaa..fc1d53b 100644 --- a/pageQuota/balanceDetail/index.vue +++ b/pageQuota/balanceDetail/index.vue @@ -13,16 +13,16 @@ {{item.create_time}} - 余额 {{item.before_balance}} + 余额 {{item.balance}} - + {{item.title}} - {{ !item.financial_pm?'+':'-' }}{{item.number}} + {{ item.financial_pm?'+':'-' }}{{item.number}} {{item.create_time}} @@ -32,7 +32,7 @@ - {{item.order_sn}} + {{item.title}} {{ !item.status?'+':'-' }}{{item.number}} @@ -60,10 +60,11 @@ onPullDownRefresh } from "@dcloudio/uni-app" import { - getFundList + getFundList, + getUserSingList } from "@/api/address.js" - const navLists = ['', '采购款明细', '余额明细', '礼品券明细', '返还金明细'] + const navLists = ['', '采购款明细', '余额明细', '礼品券明细', '返还金明细', '冻结券明细'] const tabsLst = reactive([{ name: '全部' }, @@ -84,11 +85,25 @@ const lists = ref([]) let type = ref('') const getLists = async (isPullDown = false) => { - let res = await getFundList({ - type: type.value, - mark: mark.value || '' - }) - lists.value = res.data.lists + if (type.value == 3 || type.value == 5) { + let res = await getUserSingList({ + type: type.value == 3 ? 1 : 0, + page_no: 1, + page_size: 999, + mark: mark.value || '' + }) + lists.value = res.data.lists + console.log(lists.value) + + } else { + + let res = await getFundList({ + type: type.value, + mark: mark.value || '' + }) + lists.value = res.data.lists + } + if (isPullDown) uni.stopPullDownRefresh() } diff --git a/pageQuota/vipUser/activePage.vue b/pageQuota/vipUser/activePage.vue new file mode 100644 index 0000000..d3f000f --- /dev/null +++ b/pageQuota/vipUser/activePage.vue @@ -0,0 +1,11 @@ + + + + + \ No newline at end of file diff --git a/pageQuota/vipUser/index.vue b/pageQuota/vipUser/index.vue index 1b4edaf..67a60b9 100644 --- a/pageQuota/vipUser/index.vue +++ b/pageQuota/vipUser/index.vue @@ -1,10 +1,354 @@ - \ No newline at end of file diff --git a/pages.json b/pages.json index 0a14628..cec1e78 100644 --- a/pages.json +++ b/pages.json @@ -53,7 +53,7 @@ "style": { "navigationBarTitleText": "个人中心", "enablePullDownRefresh": true, - "navigationBarBackgroundColor": "#D3FDCA" + "navigationBarBackgroundColor": "#CDFBBC" } }, { "path": "pages/charge/charge_record", @@ -235,6 +235,35 @@ "enablePullDownRefresh": true } }, + { + "path": "vipUser/activePage", + "style": { + "navigationBarTitleText": "采购礼包", + "enablePullDownRefresh": false + } + }, + { + "path": "asset/index", + "style": { + "navigationBarTitleText": "用户资产", + "enablePullDownRefresh": true + } + }, + { + "path": "asset/lists", + "style": { + "navigationBarTitleText": "预约记录", + "enablePullDownRefresh": false + } + }, + { + "path": "Gifts/index", + "style": { + "navigationBarTitleText": "赠品区", + "enablePullDownRefresh": true + } + }, + { "path": "balanceDetail/index", "style": { diff --git a/pages/index/index.vue b/pages/index/index.vue index ff84b16..c1d8a34 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -23,10 +23,13 @@