pointAuth.vue 4.4 KB

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