From a7e34bc4caff6e29f309585b9eaa4fda7664005a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=93=E5=B9=B3=E8=89=BA?= <52643018@qq.com>
Date: Fri, 9 Jul 2021 17:57:51 +0800
Subject: [PATCH 1/2] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E5=95=86=E5=93=81?=
=?UTF-8?q?=E8=AF=A6=E6=83=85=E8=B7=AF=E7=94=B1=E5=88=86=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/goodsDetail/index.vue | 6 ++++--
pages/route/index.vue | 22 ++++++++++++++++++++--
2 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/pages/goodsDetail/index.vue b/pages/goodsDetail/index.vue
index e652d3e..3a4192f 100644
--- a/pages/goodsDetail/index.vue
+++ b/pages/goodsDetail/index.vue
@@ -135,7 +135,8 @@
imagePath: '',
userToken: '',
wxCode: '',
- onceCode: ''
+ onceCode: '',
+ pt: 1
}
},
computed: {
@@ -147,6 +148,7 @@
},
onLoad(options) {
this.goods_id = options.id;
+ this.pt = options.pt || 1;
this.getGoodsDetail();
this.getWxCode()
},
@@ -305,7 +307,7 @@
toAddOrder() {
let goods_id = this.goods_detail.id;
let goods_specs_id = this.goods_detail.specs[0].id
- this.$url('/pages/order/confirm-order?goods_id=' + goods_id + '&goods_specs_id=' + goods_specs_id);
+ this.$url('/pages/order/confirm-order?goods_id=' + goods_id + '&goods_specs_id=' + goods_specs_id +'&pt='+ this.pt);
},
// 预览图片
lookImg(index) {
diff --git a/pages/route/index.vue b/pages/route/index.vue
index e9c215e..8820ea6 100644
--- a/pages/route/index.vue
+++ b/pages/route/index.vue
@@ -6,12 +6,18 @@
/* 路由分发页面仅供跳转页面 */
export default {
onLoad(options){
- this.routeToPage(options);
+ if(this.$shared.isValueType(options.scene) != 'undefined'){
+ const scene = decodeURIComponent(options.scene); // 二维码扫码进入
+ const par = this.strToObj(scene);
+ this.routeToPage(par);
+ }else{
+ this.routeToPage(options); // 普通小程序分享进入
+ }
},
methods: {
// 路由分发
routeToPage(options){
- if(options.route == 'goods_detail'){
+ if(options.route == 'goods_detail' || options.route == 'goods'){
options.page_url = '/pages/goodsDetail/index';
this.joinPagePath(options);
}else if(options.route == 'home'){
@@ -45,6 +51,18 @@
}else{
this.$url(path, {type: 'redirect'});
}
+ },
+ // 将key=value&key=value形式的字符串转为对象
+ strToObj(str){
+ let obj = {};
+ if(!str) return obj;
+
+ let arr = str.split('&');
+ arr.map(item => {
+ let a = item.split('=');
+ obj[a[0]] = a[1];
+ });
+ return obj;
}
}
}
From 059a80ba7b93c404211f3624de98da22f2e50f78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=93=E5=B9=B3=E8=89=BA?= <52643018@qq.com>
Date: Fri, 9 Jul 2021 18:51:12 +0800
Subject: [PATCH 2/2] =?UTF-8?q?[=E4=BC=98=E5=8C=96]=20=E6=88=91=E7=9A=84?=
=?UTF-8?q?=E9=92=B1=E5=8C=85=E9=A1=B5=E9=9D=A2UI?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 3 +-
pages/center/fans.vue | 7 +++--
pages/center/wallet.vue | 67 +++++++++++++++++++++++++++++++----------
3 files changed, 58 insertions(+), 19 deletions(-)
diff --git a/pages.json b/pages.json
index 16d9686..475697e 100644
--- a/pages.json
+++ b/pages.json
@@ -118,7 +118,8 @@
{
"path": "pages/center/wallet",
"style": {
- "navigationBarTitleText": "我的钱包"
+ "navigationBarTitleText": "我的钱包",
+ "disableScroll": true
}
},
{
diff --git a/pages/center/fans.vue b/pages/center/fans.vue
index 622cd24..a827253 100644
--- a/pages/center/fans.vue
+++ b/pages/center/fans.vue
@@ -23,8 +23,11 @@
时空网的内部网友 达人
2021-7-6 21:32:53
-
-
+
+
+ {{ tabItem.loadingText }}
+
+
diff --git a/pages/center/wallet.vue b/pages/center/wallet.vue
index a1c8565..3e2f6c4 100644
--- a/pages/center/wallet.vue
+++ b/pages/center/wallet.vue
@@ -1,5 +1,6 @@
+
2000.48
@@ -9,13 +10,21 @@
+
- 佣金记录
- 提取记录
+ {{ item.name }}
+
-
-
-
+
+
+
+
-¥10.00
结余 ¥34.43
@@ -27,16 +36,18 @@
- {{ tab.loadingText }}
+ {{ tab_list[0].loadingText }}
-
-
-
+
-¥11.00
@@ -49,11 +60,9 @@
- {{ tab.loadingText }}
+ {{ tab_list[1].loadingText }}
-
-
@@ -63,13 +72,30 @@
export default {
data() {
return {
- tabIndex: 0,
+ current: 0,
pageSize: 10,
isRefresher: false, // scroll-view下拉刷新状态,当前默认没有触发
- page: 1,
- isPage: false
+ tab_list: [{
+ name: '佣金记录',
+ list: [1,2,3,4,5,6,7,8,9],
+ page: 1,
+ isPage: false,
+ loadingClass: false,
+ loadingText: '已加载全部数据'
+ },{
+ name: '提取记录',
+ list: [1],
+ page: 1,
+ isPage: false,
+ loadingClass: true,
+ loadingText: '正在加载中'
+ }],
+ windowHeight: 0
}
},
+ onLoad(){
+ this.windowHeight = uni.getSystemInfoSync().windowHeight;
+ },
methods: {
// 页面触底,加载下一页
onScrolltolower(){
@@ -86,7 +112,16 @@
}
}
-