提交 9c09cd22 authored 作者: GOD_ZYX's avatar GOD_ZYX

简单修改一下 提交

上级 a5d47f04
...@@ -29,8 +29,12 @@ Page({ ...@@ -29,8 +29,12 @@ Page({
}, },
onLoad: function (query) { onLoad: function (query) {
/* 获取扫描过来的 小程序 可以取到 绑定的 id 和 课程 */ /* 获取扫描过来的 小程序 可以取到 绑定的 id 和 课程 */
const scene = decodeURIComponent(query.scene) if (query.scene) {
wx.setStorageSync('scene', scene) const scene = decodeURIComponent(query.scene)
wx.setStorageSync('scene', scene)
} else {
wx.setStorageSync('scene', '')
}
}, },
/* 进入页面,先判断是否获取用户信息 */ /* 进入页面,先判断是否获取用户信息 */
onReady: function () { onReady: function () {
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
"id": 0, "id": 0,
"name": "扫码编译", "name": "扫码编译",
"pathName": "pages/index/index", "pathName": "pages/index/index",
"query": "scene=123%261%2C3", "query": "scene=8%262",
"scene": "1048" "scene": "1048"
} }
] ]
......
...@@ -116,6 +116,9 @@ const loginApi = (obj, callback) => { ...@@ -116,6 +116,9 @@ const loginApi = (obj, callback) => {
cids = scene.split('&')[1] + ',' cids = scene.split('&')[1] + ','
cids = cids.replace(/1,/gi, '6489392145194024960,').replace(/2,/gi, '6489392226584494080,').replace(/3,/gi, '6489392240857710592,') cids = cids.replace(/1,/gi, '6489392145194024960,').replace(/2,/gi, '6489392226584494080,').replace(/3,/gi, '6489392240857710592,')
cids = cids.substr(0, cids.length - 1) cids = cids.substr(0, cids.length - 1)
} else {
class_id = ''
semester_id = ''
} }
wx.request({ wx.request({
url: config.URL_PATH + '/user/authorization', url: config.URL_PATH + '/user/authorization',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论