diff --git a/pages.json b/pages.json
index c8bb6b5..cccdb57 100644
--- a/pages.json
+++ b/pages.json
@@ -84,6 +84,12 @@
"style": {
"navigationBarTitleText": "积分流水"
}
+ },
+ {
+ "path": "pages/inviteUsers/index",
+ "style": {
+ "navigationBarTitleText": "我邀请的用户"
+ }
}
],
"globalStyle": {
diff --git a/pages/inviteUsers/index.vue b/pages/inviteUsers/index.vue
new file mode 100644
index 0000000..eb982be
--- /dev/null
+++ b/pages/inviteUsers/index.vue
@@ -0,0 +1,293 @@
+
+
+
+
+ {{ total }}
+ 已邀请用户
+
+
+
+ {{ totalPoints }}
+ 累计积分
+
+
+
+
+
+
+
+
+
+ 邀请时间:{{ formatDate(user.created_at) }}
+
+
+
+
+ 🤝
+ 暂时还没有邀请记录
+
+
+
+ 加载中...
+
+
+
+ 没有更多了
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/login/index.vue b/pages/login/index.vue
index 552d76b..eb5f92e 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -54,14 +54,14 @@ export default {
if (!loginRes.code) {
throw new Error('获取微信登录code失败');
}
-
- const open_id = (await request('xcx/basic_login', 'post', {code: loginRes.code})).openid
+
+ const open_id = (await request('xcx/basic_login', 'post', { code: loginRes.code })).openid
// 调用登录接口,传递code和加密数据
const loginData = {
code: e.detail.code,
invitation_code: '',
- openid: open_id
+ openid: open_id
// iv: e.detail.iv
};
@@ -69,7 +69,7 @@ export default {
await wx.setStorageSync('access_token', result.token);
await wx.setStorageSync('is_personal_information_complete', result.is_personal_information_complete);
// if (result.is_personal_information_complete) {
- wx.navigateBack();
+ wx.navigateBack();
// } else {
// wx.navigateTo({
// url: `/pages/my/editInfo/index`,
diff --git a/pages/my/index.vue b/pages/my/index.vue
index 1bdc314..5cd1518 100644
--- a/pages/my/index.vue
+++ b/pages/my/index.vue
@@ -262,6 +262,7 @@ export default {
quickActions: [
{ icon: '💳', label: '我的钱包' },
{ icon: '📍', label: '地址管理', path: '/pages/address/index' },
+ { icon: '🤝', label: '邀请用户', path: '/pages/inviteUsers/index' },
{ icon: '🔔', label: '消息通知' },
{ icon: '❓', label: '帮助中心' }
],
@@ -701,6 +702,9 @@ export default {
if (item.label === '当前积分') {
this.navigateTo('/pages/pointsLog/index');
}
+ if (item.label === '总订单数') {
+ this.navigateTo('/pages/order/index');
+ }
},
toEditInfoPage() {
uni.navigateTo({
diff --git a/pages/order/create.vue b/pages/order/create.vue
index 903fe21..9a8bf90 100644
--- a/pages/order/create.vue
+++ b/pages/order/create.vue
@@ -266,29 +266,29 @@ export default {
this.submitting = true;
// 获取小程序的appid
- if (!this.app_id) {
- const accountInfo = wx.getAccountInfoSync && wx.getAccountInfoSync();
- this.app_id = accountInfo && accountInfo.miniProgram && accountInfo.miniProgram.appId
- ? accountInfo.miniProgram.appId
- : '';
- }
+ // if (!this.app_id) {
+ // const accountInfo = wx.getAccountInfoSync && wx.getAccountInfoSync();
+ // this.app_id = accountInfo && accountInfo.miniProgram && accountInfo.miniProgram.appId
+ // ? accountInfo.miniProgram.appId
+ // : '';
+ // }
try {
// 构建订单数据
const orderData = {
- app_id: this.app_id,
+ // app_id: this.app_id,
address_id: this.selectedAddress.id,
- items: this.orderItems.map(item => ({
- cart_id: item.cart_id,
- product_id: item.product_id,
- sku_id: item.sku_id,
- quantity: item.quantity,
- price: item.price
- })),
- remark: this.orderRemark,
- total_price: this.totalPrice,
- shipping_fee: this.shippingFee,
- discount_amount: this.discountAmount,
- final_price: this.finalPrice
+ // items: this.orderItems.map(item => ({
+ // cart_id: item.cart_id,
+ // product_id: item.product_id,
+ // sku_id: item.sku_id,
+ // quantity: item.quantity,
+ // price: item.price
+ // })),
+ // remark: this.orderRemark,
+ // total_price: this.totalPrice,
+ // shipping_fee: this.shippingFee,
+ // discount_amount: this.discountAmount,
+ // final_price: this.finalPrice
};
// 调用创建订单接口
diff --git a/pages/order/index.vue b/pages/order/index.vue
index 684d0c5..5419537 100644
--- a/pages/order/index.vue
+++ b/pages/order/index.vue
@@ -26,14 +26,14 @@