|
|
@@ -19,7 +19,8 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <u-button @click="toAuth" :custom-style="customStyle" shape="circle">去授权</u-button>
|
|
|
+ <u-button v-if="!isCopy" @click="toAuth" :custom-style="customStyle" shape="circle">点击复制授权链接</u-button>
|
|
|
+ <u-button v-else :disabled="true" :custom-style="disableStyle" shape="circle">已复制请用浏览器打开</u-button>
|
|
|
</image>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
@@ -32,6 +33,7 @@
|
|
|
data() {
|
|
|
return {
|
|
|
show: false,
|
|
|
+ isCopy: false,
|
|
|
popupStyle: {
|
|
|
'u-mode-center-box': 'red'
|
|
|
},
|
|
|
@@ -41,6 +43,10 @@
|
|
|
background: "#E72226",
|
|
|
width: '400rpx',
|
|
|
margin: '25rpx auto'
|
|
|
+ },
|
|
|
+ disableStyle: {
|
|
|
+ width: '400rpx',
|
|
|
+ margin: '25rpx auto'
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
@@ -49,20 +55,30 @@
|
|
|
showAuth(url) {
|
|
|
this.authUrl = url;
|
|
|
this.show = true;
|
|
|
+ this.isCopy = false;
|
|
|
},
|
|
|
hide() {
|
|
|
this.show = false;
|
|
|
},
|
|
|
close() {
|
|
|
- console.log("close");
|
|
|
this.$emit('close')
|
|
|
},
|
|
|
toAuth() {
|
|
|
- let params = {
|
|
|
- url: encodeURIComponent(this.authUrl),
|
|
|
- title: '移动积分授权'
|
|
|
- }
|
|
|
- this.$jump('/pages/webview/webview' + this.$u.queryParams(params));
|
|
|
+ uni.setClipboardData({
|
|
|
+ data: this.authUrl,
|
|
|
+ showToast: false,
|
|
|
+ success: ()=> {
|
|
|
+ this.isCopy =true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // console.log(this.authUrl);
|
|
|
+ // this.authUrl = this.authUrl.replace(this.$config.transformDomains,this.$config.baseURL+'/phoneAuth');
|
|
|
+ // let params = {
|
|
|
+ // url: encodeURIComponent(this.authUrl),
|
|
|
+ // title: '移动积分授权'
|
|
|
+ // }
|
|
|
+ // console.log(this.authUrl);
|
|
|
+ // this.$jump('/pages/webview/webview' + this.$u.queryParams(params));
|
|
|
}
|
|
|
}
|
|
|
}
|