takeOrderPublicCode.js
864 Bytes
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
// pages/webpage/webpage.js
const restapi = require('../../utils/restapi.js')
var app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
jumpLink: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if('orderId' in options){
wx.setStorageSync('takeOrderId', options.orderId)
}
let domain = restapi.domain.split('//')[1]
let url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx93785bf5cd95e63f&redirect_uri=https%3a%2f%2f${domain}%2fcarservice%2fusercenter%2ftakeorder.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect`
this.setData({
jumpLink: url
});
},
/**
* 接收H5传过来的参数
*/
onMessage(e) {
console.log("onMessage", e)
},
onShow: function () {
},
onUnload: function () {
}
})