浏览代码

[码参数][增加]:[码参数接口的修改]

tags/江西版6.1.0
meo 6 年前
父节点
当前提交
4b6ef7d4ad
共有 4 个文件被更改,包括 23 次插入1 次删除
  1. +1
    -0
      app.js
  2. +5
    -1
      config/config.js
  3. +3
    -0
      pages/index/index.js
  4. +14
    -0
      pages/user/index.js

+ 1
- 0
app.js 查看文件

@@ -105,6 +105,7 @@ App({
}
},
globalData: {
scene:"",
// token
token: null,
// user openId


+ 5
- 1
config/config.js 查看文件

@@ -289,7 +289,11 @@ var config = {
/**
* 用户更新信息
*/
updateUserInfo:"/user/updateUserInfo"
updateUserInfo:"/user/updateUserInfo",
/**
* 用户更新scene
*/
updateScene:"/user/updateScene"
},
weapp: {
AppId: weappId


+ 3
- 0
pages/index/index.js 查看文件

@@ -28,10 +28,12 @@ Page({
that.setData({
scene: 0
})
app.globalData.scene = 0;
} else {
that.setData({
scene: decodeURIComponent(options.scene)
});
app.globalData.scene = decodeURIComponent(options.scene)
that.setData({
newArr: this.data.scene.split(':')
})
@@ -347,6 +349,7 @@ Page({
}
});
},

getGameOne: function(token, id) {
let _this = this;
Http.get({


+ 14
- 0
pages/user/index.js 查看文件

@@ -70,6 +70,7 @@ Page({
onLoad() {
this.getLocation();
this.updateUserInfo();
this.updateScene();
},
/**
* 获得经纬度
@@ -114,6 +115,19 @@ Page({
}
})
},
/**
* 用户更新scene
*/
updateScene(){
Http.post({
url: config.api.updateScene,
data: {
scene: app.globalData.scene
}
}).then(res => {
console.log(res)
})
},
/**
* 生命周期函数--监听页面显示
*/


正在加载...
取消
保存