提交 4ac03861 编写于 作者: G gongfuxiang

修复小程序海报参数错误

上级 51fe237f
......@@ -60,19 +60,12 @@
* 启动参数处理
*/
launch_params_handle(params) {
// 启动参数处理
if ((params.query || null) != null) {
params = params.query;
}
if ((params.scene || null) != null) {
params = this.url_params_to_json(decodeURIComponent(params.scene));
}
// 缓存启动参数
uni.setStorage({
key: this.data.cache_launch_info_key,
data: params
});
return params;
},
......@@ -303,8 +296,7 @@
*/
get_user_login_info(object, method, login_data, auth_data) {
// 邀请人参数
var params = uni.getStorageSync(this.data.cache_launch_info_key) || null;
console.log(params);
var params = uni.getStorageSync(this.data.cache_launch_info_key) || null;
var referrer = params == null ? 0 : params.referrer || 0;
// 请求数据
......@@ -1018,8 +1010,12 @@
* 小程序初始化
*/
onLaunch(params) {
// 启动参数处理
params = this.globalData.launch_params_handle(params);
// 启动参数处理+缓存
params = this.globalData.launch_params_handle(params);
uni.setStorage({
key: this.globalData.data.cache_launch_info_key,
data: params
});
// 设置设备信息
this.globalData.set_system_info();
......
......@@ -625,7 +625,7 @@
onLoad(params) {
var system_info = app.globalData.get_system_info();
this.setData({
params: params,
params: app.globalData.launch_params_handle(params),
system_info: system_info,
photo_height: (system_info || null) == null ? '55vh' : (system_info.windowWidth || system_info.screenWidth) + 'px'
});
......
......@@ -79,7 +79,7 @@
onLoad(params) {
this.setData({
params: params
params: app.globalData.launch_params_handle(params)
});
this.init();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册