根据url来获取分享用户的id
This commit is contained in:
parent
f3a78fb8f6
commit
6bf7bb02b3
@ -76,7 +76,7 @@ cc.Class({
|
|||||||
// LIFE-CYCLE CALLBACKS:
|
// LIFE-CYCLE CALLBACKS:
|
||||||
|
|
||||||
onLoad () {
|
onLoad () {
|
||||||
this.shareUser = '5c7655c484dde4098f2196fa';
|
this.shareUser = stringUtil.getRequest('uid');
|
||||||
let self = this;
|
let self = this;
|
||||||
webapi.preLogin({})
|
webapi.preLogin({})
|
||||||
.then(rep => {
|
.then(rep => {
|
||||||
|
@ -9,6 +9,19 @@ export default {
|
|||||||
return /^[a-z,0-9]{4}$/.test(code);
|
return /^[a-z,0-9]{4}$/.test(code);
|
||||||
},
|
},
|
||||||
parseMobile(mobile) {
|
parseMobile(mobile) {
|
||||||
return mobile.slice(0,3) + '****' + mobile.slice(7);
|
return mobile.slice(0, 3) + '****' + mobile.slice(7);
|
||||||
|
},
|
||||||
|
|
||||||
|
getRequest(name) {
|
||||||
|
var url = location.search;
|
||||||
|
var theRequest = {};
|
||||||
|
if (url.indexOf("?") !== -1) {
|
||||||
|
var str = url.substr(1);
|
||||||
|
var strs = str.split("&");
|
||||||
|
for (var i = 0; i < strs.length; i++) {
|
||||||
|
theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return theRequest[name];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user