uview-plus 3.3.2 → 3.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/libs/mixin/button.js +3 -0
- package/libs/mixin/mpMixin.js +3 -0
- package/libs/mixin/mpShare.js +10 -2
- package/package.json +1 -1
package/libs/mixin/button.js
CHANGED
package/libs/mixin/mpMixin.js
CHANGED
package/libs/mixin/mpShare.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineMixin } from '../vue'
|
|
2
|
-
|
|
2
|
+
import { queryParams } from '../function/index'
|
|
3
3
|
export const mpShare = defineMixin({
|
|
4
4
|
data() {
|
|
5
5
|
return {
|
|
@@ -10,7 +10,15 @@ export const mpShare = defineMixin({
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
|
-
|
|
13
|
+
async onLoad(options) {
|
|
14
|
+
var pages = getCurrentPages();
|
|
15
|
+
var page = pages[pages.length - 1];
|
|
16
|
+
this.mpShare.path = page.route + queryParams(options);
|
|
17
|
+
},
|
|
18
|
+
onShareAppMessage(res) {
|
|
19
|
+
if (res.from === 'button') {// 来自页面内分享按钮
|
|
20
|
+
console.log(res.target)
|
|
21
|
+
}
|
|
14
22
|
return this.mpShare;
|
|
15
23
|
}
|
|
16
24
|
})
|