-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathApp.vue
135 lines (121 loc) · 2.47 KB
/
App.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<script>
import store from '@/store'
// import ".env.js";
export default {
onLaunch: function (e) {
console.log("App Launch");
store.dispatch('getStore');
// 记录邀请来源
const { fromUid, scene } = e.query;
console.log("onLaunch fromUid", fromUid);
fromUid && uni.setStorageSync("fromUid", fromUid);
// 海报二维码方式通过 sceneXXX 方式获取 fromUid
if (scene) {
console.log("onLaunch scene", scene.split("fromUid")[1]);
uni.setStorageSync("fromUid", scene.split("fromUid")[1]);
}
},
onShow: function (e) {
console.log("App Show", e);
// 接收收银台小程序回调参数
const [err, res] = e?.referrerInfo?.extraData?.paymentRes || [];
if (res?.errMsg == "requestPayment:ok") {
uni.showToast({
title: "支付成功",
duration: 2000,
});
uni.navigateTo({
url: "/pages/product/paySuccess",
});
}
},
onHide: function () {
console.log("App Hide");
},
};
</script>
<style lang="scss">
/*每个页面公共css */
button {
border-radius: 0;
line-height: inherit;
background: none;
font-size: inherit;
color: inherit;
margin: initial;
&::after {
content: none;
}
}
.b-b {
position: relative;
&::after {
position: absolute;
z-index: 3;
left: 0;
top: auto;
bottom: 0;
right: 0;
height: 0;
content: "";
transform: scaleY(0.5);
border-bottom: 1px solid #e5e5e5;
}
}
.b-t {
position: relative;
&::after {
position: absolute;
z-index: 3;
left: 0;
top: 0;
bottom: auto;
right: 0;
height: 0;
content: "";
transform: scaleY(0.5);
border-top: 1px solid #e5e5e5;
}
}
/* 布局 */
.row {
/* #ifndef APP-PLUS-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
}
.column {
/* #ifndef APP-PLUS-NVUE */
display: flex;
/* #endif */
flex-direction: column;
}
.center {
/* #ifndef APP-PLUS-NVUE */
display: flex;
/* #endif */
align-items: center;
justify-content: center;
}
.fill {
flex: 1;
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translate3d(0, 100%, 0);
}
to {
opacity: 1;
transform: translateZ(0);
}
}
.animate__animated {
animation-duration: 0.5s;
animation-fill-mode: both;
}
.animate__fadeInUp {
animation-name: fadeInUp;
}
</style>