diff --git a/api/address.js b/api/address.js
new file mode 100644
index 0000000..845d525
--- /dev/null
+++ b/api/address.js
@@ -0,0 +1,24 @@
+import request from '@/utils/request';
+
+export const provinceListApi = (data) => {
+ return request.get('/province', data);
+}
+
+export const cityListApi = (data) => {
+ return request.get('/city', data);
+}
+
+export const areaListApi = (data) => {
+ return request.get('/area', data);
+}
+
+export const streetListApi = (data) => {
+ return request.get('/street', data);
+}
+
+export const villageListApi = (data) => {
+ return request.get('/village', data);
+}
+export const brigadeListApi = (data) => {
+ return request.get('/brigade', data);
+}
\ No newline at end of file
diff --git a/api/user.js b/api/user.js
index 7accac7..f8dbe79 100644
--- a/api/user.js
+++ b/api/user.js
@@ -93,4 +93,31 @@ export const capitalCountAPi = (data) => {
// 会员账户详情
export const chargeListApi = (data) => {
return request.post('/user/user/capital_flow', data);
+}
+
+export const vipRechargeApi = (data) => {
+ return request.post('/store/store/recharge', data);
+}
+
+export const rechargeCountApi = (data) => {
+ return request.get('/store/store/recharge_count', data);
+}
+
+export const rechargeListsApi = (data) => {
+ return request.get('/user/UserRecharge/lists', data);
+}
+
+export const updataOrderApi = (data) => {
+ return request.get('/pay/wechatQuery', data);
+}
+
+
+
+export const getStoreByPhone = (data) => {
+ return request.get('/store/Store/detail', data);
+}
+
+
+export const getStoreInfo = (data) => {
+ return request.get('/config', data);
}
\ No newline at end of file
diff --git a/pageQuota/vipUser/index.vue b/pageQuota/vipUser/index.vue
index 4600120..cd67bd8 100644
--- a/pageQuota/vipUser/index.vue
+++ b/pageQuota/vipUser/index.vue
@@ -1,119 +1,374 @@
-
- 开通行业会员
- 已开通列表
-
+
+
+
+
+
+
+
-
-
-
-
- 行业会员开通报备
-
-
-
-
-
-
-
-
+
+
+ 开通行业会员
+ 已开通列表
+
+
-
-
-
-
-
-
-
- 报备人:{{STORE_INFO.detailed_address}}
+
+
+
+
+ 行业会员开通报备
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 报备人:{{STORE_INFO.name}}
+
+
+
+
+
+ 完成并收款
+
+
+
+
+
+
+
+
+ 当前已开通:
+
+ 位行业会员
+
+
+
+
+
+
+ 序号
+ 行业会员
+ 经营资金
+ 开通时间
+ 状态
+
+
+
+ {{index+1}}
+ {{item.real_name}}
+ {{item.price}}
+ {{item.create_time}}
+
+ 已开通
+ 未开通,查询
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.city_name}}
+
+
+
+
+
+ {{item.area_name}}
+
+
+
+
+
+ {{item.street_name}}
+
+
+
+
+
+ {{item.village_name}}
+
+
+
+
+
+ {{item.brigade_name}}
+
+
-
-
-
-
-
-
-
-
- 当前已开通:
- 100
- 位行业会员
-
-
-
-
-
-
- 序号
- 行业会员
- 经营资金
- 开通时间
- 状态
-
-
-
- 1
- 军哥
- 1000.00
- 2020-10-20
- 已开通
-
-
-
-
-
-
-
-
-
-
-
-
+
-
\ No newline at end of file
diff --git a/pages/cart/cart.vue b/pages/cart/cart.vue
index e52ab5d..1e7ddac 100644
--- a/pages/cart/cart.vue
+++ b/pages/cart/cart.vue
@@ -434,15 +434,6 @@
}
}
-
- .shop-item:last-child {
- margin-bottom: 100px;
- background-color: red;
- }
-
-
-
-
}
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 367c878..19241d9 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -21,15 +21,15 @@
+
- {{shareInfo.real_name?(shareInfo.real_name + '-' + STORE_INFO.name):STORE_INFO.name}}
+ {{(shareInfo.real_name||userStore.userInfo.nickname + '的供销个人门店' )}}
+ {{shareInfo.real_name?(shareInfo.real_name + '的' + STORE_INFO.name):STORE_INFO.store_name}}
-
- {{STORE_INFO.detailed_address}}
-
@@ -226,7 +226,7 @@
const STORE_INFO = ref({
name: '',
- id: '',
+ id: 5,
detailed_address: '',
image: ''
});
@@ -260,9 +260,11 @@
})
const navgo = (url) => {
- uni.navigateTo({
- url
- })
+ if (userStore.userInfo.vip_name) return
+
+ // uni.navigateTo({
+ // url
+ // })
}
/*商品列表滚动隐藏头部导航 */
@@ -313,7 +315,7 @@
cart_num: cart_num,
is_new: 0, // 是否直接购买0否1是
// goods_id: id,
- store_id: STORE_INFO.value.id,
+ store_id: STORE_INFO.value.id || 5,
product_id: product_id
}).then(res => {
getCartList();
@@ -341,7 +343,7 @@
name: '',
order: '',
store_name: '',
- store_id: STORE_INFO.value.id || ''
+ store_id: STORE_INFO.value.id || '5'
})
const loading = ref(true);
@@ -390,7 +392,7 @@
page_no: page_no,
page_size: 30,
level: three,
- store_id: STORE_INFO.value.id || '' // 店铺id,用于获取店铺分类列表,如果为空则获取全部分类列表,否则获取店铺分类列表。
+ store_id: STORE_INFO.value.id || '5' // 店铺id,用于获取店铺分类列表,如果为空则获取全部分类列表,否则获取店铺分类列表。
}).then(res => {
if (pid == 0) { // 加载一级分类时设置全部分类
if (!res.data?.lists?.length) return;
@@ -498,7 +500,7 @@
productLogApi({
product_id: item.product_id,
cate_id: item.cate_id,
- store_id: STORE_INFO.value.id || ''
+ store_id: STORE_INFO.value.id || '5'
});
};
const changeGood = (data) => { // 确定选择商品重量
@@ -564,9 +566,9 @@
onLoad(async (opt) => {
// 店铺id
if (opt.id) {
- where.value.store_id = opt.id;
+ where.value.store_id = 5;
const info = await shopDetailApi({
- store_id: opt.id
+ store_id: 5
});
STORE_INFO.value = info.data;
@@ -590,7 +592,7 @@
const info = uni.getStorageSync('STORE_INFO');
if (info) {
STORE_INFO.value = JSON.parse(info);
- where.value.store_id = STORE_INFO.value.id;
+ where.value.store_id = 5;
}
// 分享信息
@@ -1054,6 +1056,6 @@
.store-info {
margin: 0 0 20rpx 20rpx;
- margin-top: 80rpx;
+ margin-top: 20rpx;
}
\ No newline at end of file
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 1718f01..7e22e2e 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -16,6 +16,10 @@
微信快捷登录
+
+ 账号登录
+
支付方式
@@ -182,6 +189,8 @@
const userInfo = useUserStore().userInfo;
+ console.log(userInfo)
+
// 用户选择的门店信息
let STORE_INFO = uni.getStorageSync('STORE_INFO');
if (STORE_INFO)
diff --git a/utils/request.js b/utils/request.js
index 061aad8..5abe6d8 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -1,5 +1,5 @@
import {
- config
+ config
} from '@/config/app';
import useUserStore from '@/store/user';
@@ -7,89 +7,89 @@ import useUserStore from '@/store/user';
const userStore = useUserStore();
function baseRequest(url, method, data, {
- noAuth = false,
- noVerify = false,
- onReLogin = false
+ noAuth = false,
+ noVerify = false,
+ onReLogin = false
}) {
- let Url = config.HTTP_REQUEST_URL,
- header = config.HEADER;
- if (userStore.userInfo) {
- header.TOKEN = userStore.token
- }
+ let Url = config.HTTP_REQUEST_URL,
+ header = config.HEADER;
+ if (userStore.userInfo) {
+ header.TOKEN = userStore.token
+ }
- return new Promise((reslove, reject) => {
- uni.request({
- url: Url + '/api' + url,
- method: method || 'GET',
- header: {
- ...header
- },
- data: method != 'GET' ? data || {} : {},
- params: method == 'GET' ? data : {},
- success: (res) => {
- // console.log(res, 'res')
+ return new Promise((reslove, reject) => {
+ uni.request({
+ url: Url + '/api' + url,
+ method: method || 'GET',
+ header: {
+ ...header
+ },
+ data: method != 'GET' ? data || {} : {},
+ params: method == 'GET' ? data : {},
+ success: (res) => {
+ // console.log(res, 'res')
- if (res.data.show) {
- uni.showToast({
- title: res.data.msg || '操作成功',
- icon: 'none',
- })
- }
- if (noVerify)
- reslove(res.data);
- else if (res.data.code == -1) {
- if (res.data.msg == "登录超时,请重新登录" && !noAuth) {
- userStore.setToken('');
- userStore.setUserInfo({});
- uni.showModal({
- content: '您需要先登录才可使用该功能, 是否前去登录',
- success: (e) => {
- if (e.confirm) uni.navigateTo({
- url: '/pages/login/login'
- })
- }
- })
- }
- } else if (res.data.code == 0) {
- if (res.data.msg == "请求参数缺token" && !noAuth) {
- userStore.setToken('');
- userStore.setUserInfo({});
- uni.showModal({
- content: '您需要先登录才可使用该功能, 是否前去登录',
- success: (e) => {
- if (e.confirm) uni.navigateTo({
- url: '/pages/login/login'
- })
- }
- })
- }
- reject(res.data);
- } else if (res.data.code == 1) {
- reslove(res.data);
- } else if (res.data.code == 200) {
- reslove(res.data.data);
- } else if ([410000, 410001, 410002, 40000].indexOf(res.data.code) !== -1) {
- reject(res.data);
- } else if (res.data.code == 501) {
- reject(res.data);
- } else {
- reject(res.data.msg || '请检查网络');
- }
- },
- fail: (message) => {
- console.log(message, '错误信息')
- uni.showToast({
- title: '网络错误',
- icon: 'none'
- })
- reject('请求失败');
- }
- })
- });
+ if (res.data.show) {
+ uni.showToast({
+ title: res.data.msg || '操作成功',
+ icon: 'none',
+ })
+ }
+ if (noVerify)
+ reslove(res.data);
+ else if (res.data.code == -1) {
+ if (res.data.msg == "登录超时,请重新登录" && !noAuth) {
+ userStore.setToken('');
+ userStore.setUserInfo({});
+ uni.showModal({
+ content: '您需要先登录才可使用该功能, 是否前去登录',
+ success: (e) => {
+ if (e.confirm) uni.navigateTo({
+ url: '/pages/login/login'
+ })
+ }
+ })
+ }
+ } else if (res.data.code == 0) {
+ if (res.data.msg == "请求参数缺token" && !noAuth) {
+ userStore.setToken('');
+ userStore.setUserInfo({});
+ uni.showModal({
+ content: '您需要先登录才可使用该功能, 是否前去登录',
+ success: (e) => {
+ if (e.confirm) uni.navigateTo({
+ url: '/pages/login/login'
+ })
+ }
+ })
+ }
+ reject(res.data);
+ } else if (res.data.code == 1) {
+ reslove(res.data);
+ } else if (res.data.code == 200) {
+ reslove(res.data.data);
+ } else if ([410000, 410001, 410002, 40000].indexOf(res.data.code) !== -1) {
+ reject(res.data);
+ } else if (res.data.code == 501) {
+ reject(res.data);
+ } else {
+ reject(res.data.msg || '请检查网络');
+ }
+ },
+ fail: (message) => {
+ console.log(message, '错误信息')
+ uni.showToast({
+ title: '网络错误',
+ icon: 'none'
+ })
+ reject('请求失败');
+ }
+ })
+ });
}
const syhttp = {};
['options', 'get', 'post', 'put', 'head', 'delete', 'trace', 'connect'].forEach((method) => {
- syhttp[method] = (api, data, opt) => baseRequest(api, method, data, opt || {})
+ syhttp[method] = (api, data, opt) => baseRequest(api, method, data, opt || {})
});
export default syhttp;
\ No newline at end of file