Commit dbcf051f by 程默

fix

parent f555208b
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<script> <script>
import spokesman from "@/api/spokesman.js"; import spokesman from "@/api/spokesman.js";
import { serialize } from "@/utils/index"; import { serialize,getQueryVariable } from "@/utils/index";
export default { export default {
data() { data() {
return { return {
...@@ -42,6 +42,11 @@ export default { ...@@ -42,6 +42,11 @@ export default {
if (options.share) { if (options.share) {
//来自分享 //来自分享
this.link = decodeURIComponent(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.page = "";
this.params = ""; this.params = "";
} else if (options.from && options.from == "h5login") { } else if (options.from && options.from == "h5login") {
......
...@@ -204,7 +204,11 @@ export default { ...@@ -204,7 +204,11 @@ export default {
country:this.userInfo.country, country:this.userInfo.country,
province:this.userInfo.province, province:this.userInfo.province,
city:this.userInfo.city, city:this.userInfo.city,
otherPhone:0 otherPhone:0,
spokesmanRelId:'',
spokesmanGroupId:'',
spokesmanShopId:'',
spokesmanBindId:''
}) })
.then(res => { .then(res => {
//绑定成功 //绑定成功
......
...@@ -33,7 +33,14 @@ export function serialize(obj) { ...@@ -33,7 +33,14 @@ export function serialize(obj) {
return str.join("&"); return str.join("&");
} }
export default {
formatNumber, //获取url参数
formatTime 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