| xqd
@@ -122,25 +122,6 @@ const shareMessage = user => {
|
|
|
*/
|
|
|
const share = (user,scene = "WXSenceTimeline") => {
|
|
|
uni.share({
|
|
|
- provider: 'weixin',
|
|
|
- scene: "WXSceneSession",
|
|
|
- type: 5,
|
|
|
- imageUrl: 'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/962fc340-4f2c-11eb-bdc1-8bd33eb6adaa.png',
|
|
|
- title: '欢迎体验uniapp',
|
|
|
- miniProgram: {
|
|
|
- id: 'gh_abcdefg',
|
|
|
- path: 'pages/index/index',
|
|
|
- type: 0,
|
|
|
- webUrl: 'http://uniapp.dcloud.io'
|
|
|
- },
|
|
|
- success: ret => {
|
|
|
- console.log(JSON.stringify(ret));
|
|
|
- },
|
|
|
- fail: err => {
|
|
|
- console.error("fail:" + JSON.stringify(err));
|
|
|
- }
|
|
|
- });
|
|
|
- /*uni.share({
|
|
|
provider: "weixin",
|
|
|
scene: scene,
|
|
|
type: 5, // 小程序
|
| xqd
@@ -157,7 +138,19 @@ const share = (user,scene = "WXSenceTimeline") => {
|
|
|
fail: function (err) {
|
|
|
console.error("fail:" + JSON.stringify(err));
|
|
|
}
|
|
|
- });*/
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+const login = () => {
|
|
|
+ let page = getCurrentPages()[0]
|
|
|
+ let route = page.route;
|
|
|
+ let arr = [];
|
|
|
+ for (const key in page.options) {
|
|
|
+ arr.push(`${key}=${page.options[key]}`)
|
|
|
+ }
|
|
|
+ uni.reLaunch({
|
|
|
+ url: `/pages/login/login?redirect=${route}&${arr.join("&")}`,
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
|
| xqd
@@ -178,5 +171,6 @@ export {
|
|
|
round,
|
|
|
objectToUrlParams,
|
|
|
shareMessage,
|
|
|
- share
|
|
|
+ share,
|
|
|
+ login
|
|
|
}
|