Commit dbcf051f by 程默

fix

parent f555208b
......@@ -6,7 +6,7 @@
<script>
import spokesman from "@/api/spokesman.js";
import { serialize } from "@/utils/index";
import { serialize,getQueryVariable } from "@/utils/index";
export default {
data() {
return {
......@@ -42,6 +42,11 @@ export default {
if (options.share) {
//来自分享
this.link = decodeURIComponent(options.share);
this.spokesmanGroupId=getQueryVariable(this.link,"spokesmanGroupId");
this.spokesmanShopId=getQueryVariable(this.link,"spokesmanShopId");
this.spokesmanRelId=getQueryVariable(this.link,"spokesmanRelId");
this.spokesmanBindId=getQueryVariable(this.link,"spokesmanBindId");
this.page = "";
this.params = "";
} else if (options.from && options.from == "h5login") {
......
......@@ -204,7 +204,11 @@ export default {
country:this.userInfo.country,
province:this.userInfo.province,
city:this.userInfo.city,
otherPhone:0
otherPhone:0,
spokesmanRelId:'',
spokesmanGroupId:'',
spokesmanShopId:'',
spokesmanBindId:''
})
.then(res => {
//绑定成功
......
......@@ -33,7 +33,14 @@ export function serialize(obj) {
return str.join("&");
}
export default {
formatNumber,
formatTime
}
//获取url参数
export function getQueryVariable(query,variable) {
// var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] == variable) { return pair[1]; }
}
return (false);
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment