123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <template>
- <view>
- <!-- <u-modal v-model="show" title="淘宝授权" content="首次淘宝授权, 请复制地址后, 打开浏览器粘贴地址进行授权." :show-cancel-button="true" confirm-text="复制地址" @confirm="confirmEvent" @cancel="cancelEvent"></u-modal> -->
- <u-modal v-model="show" title="授权" content="请复制地址后, 打开浏览器粘贴地址进行授权." :show-cancel-button="true" confirm-text="复制地址" @confirm="confirmEvent" @cancel="cancelEvent"></u-modal>
- </view>
- </template>
- <script>
- export default {
- props: {
- tb_show: {
- type:Boolean,
- default:false
- }
- },
- data() {
- return {
- show: this.tb_show
- }
- },
- methods: {
- // 点击了确认
- confirmEvent(){
- const token = uni.getStorageSync('token')
- let redirect_uri = `https://ld.726p.com/newh5/warrant.html?token=${token}&h5=applet`
- redirect_uri = encodeURIComponent(redirect_uri)
- this.$copyEvent({text:`https://oauth.taobao.com/authorize?response_type=code&client_id=25234720&redirect_uri=${redirect_uri}&state=3001&view=wap`,cb: () => {
- this.$emit('closeTask')
- }})
- },
- // 取消
- cancelEvent() {
- this.$emit('closeTask')
- },
- }
- }
- </script>
- <style>
- </style>
|