index.js
1.72 KB
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
import { IMG_URL } from "~/utils/constantData";
import USERAPI from '~/api/usersApi/index'
import {taskLoginAndRegister} from '../../../common/common'
Page({
data: {
IMG_URL:IMG_URL
},
onRoute(options) {
taskLoginAndRegister({options,pages:'addFLGStep'})
// console.log(options);
// if (!options) {
// return
// }
// if (options.merchantId) {
// options.pages = 'addFLGStep'
// const sessionId = wx.$storage.get('sessionId')
// if (!sessionId) {
// let para = {
// merchantId: options.merchantId,
// type: 1,
// pages:'addFLGStep'
// }
// let temp = encodeURIComponent(JSON.stringify(para))
// wx.navigateTo({
// url: '/packageStoreAssistant/packageAuth/pages/authentication/register/register?data=' + temp,
// });
// } else {
// const USERINFO = wx.$storage.get('userInfo')
// if (USERINFO.merchantId == options.merchantId) {
// USERAPI.checkSession().then(({
// code
// }) => {
// if (code == '0') {
// // this.getFLG(true,options.merchantId)
// } else {
// wx.$router.reLaunch('/packageStoreAssistant/packageAuth/pages/authentication/login/login', options)
// }
// })
// } else {
// let para = {
// merchantId: options.merchantId,
// type: 1,
// pages:'addFLGStep'
// }
// let temp = encodeURIComponent(JSON.stringify(para))
// wx.navigateTo({
// url: '/packageStoreAssistant/packageAuth/pages/authentication/register/register?data=' + temp,
// });
// }
// }
// }
},
})