pointAuth.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <template>
  2. <view>
  3. <u-popup :custom-style="popupStyle"
  4. close-icon-size="50"
  5. :mask-close-able="false"
  6. @close="close" class="auth-point" :closeable="true" close-icon-color="#fff"
  7. close-icon="close-circle" v-model="show" mode="center" width="80%" height="680rpx" border-radius="16">
  8. <view class="">
  9. <image class="auth-bg" mode="aspectFill" src="../../static/poster/bg_shouyetc.png">
  10. <view class="auth-msg" style="display: flex;flex-direction: column;">
  11. <view class="margin-bottom-20 flex justify-start"
  12. style="font-size: 26rpx;color: #353535;font-family: PingFang-SC-Medium;line-height: 45rpx;"
  13. v-for="(item,index) in vuex_active_setting.helpExplainList" :key="index">
  14. <view class="center">
  15. <u-icon name="/static/icon/titles.png" size="30"></u-icon>
  16. </view>
  17. <view class="center margin-left-10">
  18. <text>{{item.helpExplain}}</text>
  19. </view>
  20. </view>
  21. </view>
  22. <u-button v-if="!isCopy" @click="toAuth" :custom-style="customStyle" shape="circle">点击复制授权链接</u-button>
  23. <u-button v-else :disabled="true" :custom-style="disableStyle" shape="circle">已复制请用浏览器打开</u-button>
  24. </image>
  25. </view>
  26. </u-popup>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. name: "pointAuth",
  32. data() {
  33. return {
  34. show: false,
  35. isCopy: false,
  36. popupStyle: {
  37. 'u-mode-center-box': 'red'
  38. },
  39. authUrl: '',
  40. customStyle: {
  41. color: 'white',
  42. background: "#E72226",
  43. width: '400rpx',
  44. margin: '25rpx auto'
  45. },
  46. disableStyle: {
  47. width: '400rpx',
  48. margin: '25rpx auto'
  49. }
  50. };
  51. },
  52. methods: {
  53. showAuth(url) {
  54. this.authUrl = url;
  55. this.show = true;
  56. this.isCopy = false;
  57. },
  58. hide() {
  59. this.show = false;
  60. },
  61. close() {
  62. this.$emit('close')
  63. },
  64. toAuth() {
  65. uni.setClipboardData({
  66. data: this.authUrl,
  67. showToast: false,
  68. success: ()=> {
  69. this.isCopy =true;
  70. }
  71. });
  72. // console.log(this.authUrl);
  73. // this.authUrl = this.authUrl.replace(this.$config.transformDomains,this.$config.baseURL+'/phoneAuth');
  74. // let params = {
  75. // url: encodeURIComponent(this.authUrl),
  76. // title: '移动积分授权'
  77. // }
  78. // console.log(this.authUrl);
  79. // this.$jump('/pages/webview/webview' + this.$u.queryParams(params));
  80. }
  81. }
  82. }
  83. </script>
  84. <style lang="scss" scoped>
  85. .auth-bg {
  86. width: 100%;
  87. height: 266rpx;
  88. }
  89. .auth-msg {
  90. padding: 40rpx 40rpx 20rpx 40rpx;
  91. display: flex;
  92. align-items: center;
  93. justify-content: left;
  94. }
  95. </style>
  96. <!-- <template>
  97. <view>
  98. <u-popup :custom-style="popupStyle" class="auth-point" v-model="show" mode="center" width="80%" border-radius="18" >
  99. <image class="auth-bg" mode="aspectFill" src="../../static/poster/bg_shouyetc.png">
  100. <view class="auth-msg">
  101. <view class="info-item" v-for="(item,index) in vuex_active_setting.helpExplainList" :key="index">
  102. {{item.helpExplain}}
  103. </view>
  104. </view>
  105. <u-button @click="toAuth" :custom-style="customStyle" shape="circle" >去授权</u-button>
  106. </image>
  107. </u-popup>
  108. </view>
  109. </template>
  110. <script>
  111. export default {
  112. name:"pointAuth",
  113. data() {
  114. return {
  115. show: true,
  116. popupStyle: {
  117. 'u-mode-center-box': 'red'
  118. },
  119. authUrl: '',
  120. customStyle: {
  121. color: 'white',
  122. background: "#E72226",
  123. width: '400rpx',
  124. margin: '25rpx auto'
  125. }
  126. };
  127. },
  128. methods: {
  129. showAuth(url){
  130. this.authUrl = url;
  131. this.show = true;
  132. },
  133. hide(){
  134. this.show = false;
  135. },
  136. close(){
  137. this.$emit('close')
  138. },
  139. toAuth(){
  140. let params={
  141. url:encodeURIComponent(this.authUrl),
  142. title:'移动积分授权'
  143. }
  144. this.$jump('/pages/webview/webview'+this.$u.queryParams(params));
  145. }
  146. }
  147. }
  148. </script>
  149. <style lang="scss" scoped>
  150. .auth-bg{
  151. width: 100%;
  152. height: 266rpx;
  153. }
  154. .auth-msg{
  155. padding: 40rpx 20rpx 20rpx 20rpx;
  156. .info-item{
  157. font-size: 26rpx;
  158. color: #353535;
  159. position: relative;
  160. padding: 10rpx 30rpx 10rpx 30rpx;
  161. margin-left: 30rpx;
  162. }
  163. .info-item::before{
  164. content: "";
  165. position: absolute;
  166. left: -20rpx;
  167. top: 10rpx;
  168. width: 25rpx;
  169. height: 25rpx;
  170. background: url(../../static/icon/item-dot.png) no-repeat center/contain;
  171. }
  172. }
  173. </style> -->