|
@@ -70,48 +70,56 @@ const playletGroup = reactive({
|
70
|
70
|
page_size: 10,
|
71
|
71
|
})
|
72
|
72
|
|
73
|
|
-const handleGetPlayletGroup = async () => {
|
74
|
|
- console.log('handleGetPlayletGroup => ')
|
75
|
|
- try {
|
76
|
|
- Toast.loading({
|
77
|
|
- message: '加载中...',
|
78
|
|
- duration: 0,
|
79
|
|
- forbidClick: true,
|
80
|
|
- })
|
81
|
|
- const { errno, rst } = await $axios.get('/api/h5/userSop/customer', {
|
82
|
|
- corpid: params.corpid,
|
83
|
|
- rule_id: params.rule_id,
|
84
|
|
- user_id: params.user_id,
|
85
|
|
- page: playletGroup.page,
|
86
|
|
- page_size: playletGroup.page_size,
|
87
|
|
- }) as IRes
|
88
|
|
- if (errno == 0) {
|
89
|
|
- if (Array.isArray(rst?.data)) {
|
90
|
|
- playletGroup.list = [...playletGroup.list, ...rst.data]
|
91
|
|
- if (playletGroup.page < rst?.pageInfo?.pages) {
|
92
|
|
- playletGroup.page = playletGroup.page + 1
|
93
|
|
- } else {
|
94
|
|
- playletGroup.finished = true
|
95
|
|
- }
|
96
|
|
- }
|
97
|
|
- }
|
98
|
|
- } catch (error) {
|
99
|
|
- console.log('error =>', error)
|
100
|
|
- } finally {
|
101
|
|
- Toast.clear();
|
102
|
|
- playletGroup.loading = false
|
103
|
|
- }
|
104
|
|
-}
|
|
73
|
+// const handleGetPlayletGroup = async () => {
|
|
74
|
+// console.log('handleGetPlayletGroup => ')
|
|
75
|
+// try {
|
|
76
|
+// Toast.loading({
|
|
77
|
+// message: '加载中...',
|
|
78
|
+// duration: 0,
|
|
79
|
+// forbidClick: true,
|
|
80
|
+// })
|
|
81
|
+// const { errno, rst } = await $axios.get('/api/h5/userSop/customer', {
|
|
82
|
+// corpid: params.corpid,
|
|
83
|
+// rule_id: params.rule_id,
|
|
84
|
+// user_id: params.user_id,
|
|
85
|
+// page: playletGroup.page,
|
|
86
|
+// page_size: playletGroup.page_size,
|
|
87
|
+// }) as IRes
|
|
88
|
+// if (errno == 0) {
|
|
89
|
+// if (Array.isArray(rst?.data)) {
|
|
90
|
+// playletGroup.list = [...playletGroup.list, ...rst.data]
|
|
91
|
+// if (playletGroup.page < rst?.pageInfo?.pages) {
|
|
92
|
+// playletGroup.page = playletGroup.page + 1
|
|
93
|
+// } else {
|
|
94
|
+// playletGroup.finished = true
|
|
95
|
+// }
|
|
96
|
+// }
|
|
97
|
+// }
|
|
98
|
+// } catch (error) {
|
|
99
|
+// console.log('error =>', error)
|
|
100
|
+// } finally {
|
|
101
|
+// Toast.clear();
|
|
102
|
+// playletGroup.loading = false
|
|
103
|
+// }
|
|
104
|
+// }
|
105
|
105
|
|
106
|
106
|
const onClickMiniapp = () => {
|
|
107
|
+ Toast({
|
|
108
|
+ message: '点击跳转',
|
|
109
|
+ })
|
107
|
110
|
wx.invoke('launchMiniprogram', {
|
108
|
111
|
"appid" : "wx34a41e0e17327363", // 需跳转的小程序appid
|
109
|
112
|
"path" : "/pages/index/index.html?pathId=63856f98b86c030805fad962", // 所需跳转的小程序内页面路径及参数。非必填
|
110
|
113
|
}, function(res) {
|
111
|
114
|
if(res.err_msg == "launchMiniprogram:ok") {
|
112
|
115
|
// 正常
|
|
116
|
+ Toast({
|
|
117
|
+ message: JSON.stringify(res),
|
|
118
|
+ })
|
113
|
119
|
} else {
|
114
|
|
- // 错误处理
|
|
120
|
+ Toast({
|
|
121
|
+ message: JSON.stringify(res),
|
|
122
|
+ })
|
115
|
123
|
}
|
116
|
124
|
}
|
117
|
125
|
);
|