|
|
@@ -72,8 +72,32 @@
|
|
|
},
|
|
|
specialInit() {
|
|
|
let that = this
|
|
|
- let id = this.option.id?this.option.id:0
|
|
|
- let salt = this.option.salt?this.option.salt:''
|
|
|
+ let id = 0
|
|
|
+ let salt = ''
|
|
|
+ if(this.option.id && this.option.salt){
|
|
|
+ id = this.option.id?this.option.id:0
|
|
|
+ salt = this.option.salt?this.option.salt:''
|
|
|
+ }else{
|
|
|
+ if(this.option.q){
|
|
|
+ let currentUrl = decodeURIComponent(this.option.q)
|
|
|
+ let str = currentUrl.substring(currentUrl.lastIndexOf("?") + 1)
|
|
|
+ var sceneItem = str.split("&");
|
|
|
+ var arr, name, value;
|
|
|
+ var sceneArray = new Array();
|
|
|
+ for (var i = 0, l = sceneItem.length; i < l; i++) {
|
|
|
+ arr = sceneItem[i].split("=");
|
|
|
+ name = arr[0];
|
|
|
+ value = arr[1];
|
|
|
+ sceneArray[name] = value;
|
|
|
+ }
|
|
|
+ if(sceneArray.id){
|
|
|
+ id =sceneArray.id
|
|
|
+ }
|
|
|
+ if(sceneArray.salt){
|
|
|
+ salt = sceneArray.salt
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
this.id = id
|
|
|
this.salt = salt
|
|
|
getGhsData({id:id,salt:salt}).then(res=>{
|