File tree Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 4
4
const Api = window . Api || { }
5
5
/** 主请求域名**/
6
6
Api . domain = process . env . NODE_ENV == 'production' ? '' : ''
7
+ Api . auth_call_back = process . env . NODE_ENV == 'production' ? 'http://api.daimatu.cn' : 'http://xingke.iask.in'
7
8
8
9
export default Api
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ import Util from '../../libs/util' // 工具
10
10
import Http from '../../libs/http' //请求工具
11
11
import Plugin from '../../libs/plugin/formatDate' //插件
12
12
import '../../libs/filter' //过滤器
13
+ import Api from '../../libs/api'
14
+ window . Api = Api
13
15
14
16
Vue . use ( Plugin )
15
17
Vue . use ( Toast )
Original file line number Diff line number Diff line change 25
25
<span style =" padding-left : 10px ;" >我已阅读上述绑定说明</span >
26
26
</div >
27
27
<div class =" button" >
28
- <Button :type =" type" size =" large" style =" width : 200px ;" @click =" bind" >一键绑定授权</Button >
28
+ <Button :type =" type" size =" large" style =" width : 200px ;" :loading = " loading " @click =" bind" >一键绑定授权</Button >
29
29
</div >
30
30
</div >
31
31
39
39
data () {
40
40
return {
41
41
isSwitch: false ,
42
- type: ' default'
42
+ type: ' default' ,
43
+ loading: false ,
43
44
}
44
45
},
45
46
methods: {
55
56
this .$Message .info (' 请先同意授权说明' );
56
57
return false ;
57
58
}
58
- this .request (' MerchantPublicBind' , {}, ' 跳转中...' ).then ((res ) => {
59
- if (res .status ) {
60
- window .open (res .data .url );
61
- this .$Message .success (" 请在打开的新页面中授权" );
62
- } else {
63
- this .$Message .error (res .msg )
64
- }
65
- })
59
+ // 临时域名
60
+ window .open (Api .auth_call_back + " /merchants/public_signal/bind" );
61
+ this .$Message .success (" 请注意是否有打开新的授权页面" );
62
+ this .loading = true
63
+ setTimeout (() => {
64
+ this .loading = false
65
+ }, 5000 );
66
66
}
67
67
},
68
68
components: {
You can’t perform that action at this time.
0 commit comments