index.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <template>
  2. <view class="app-page">
  3. <view class="card-box">
  4. <text class="left-title">{{mData.platform}}</text>
  5. <view class="h-view">
  6. <text
  7. style="margin-right: 20rpx;">{{mData.status == '2' ? '已认证' : mData.status == '1' ? '审核中' : '未认证'}}</text>
  8. </view>
  9. </view>
  10. <view class="card-box">
  11. <text class="left-title">链接地址</text>
  12. <view class="h-view">
  13. <u-input v-model="url" placeholder="请输入" type="text" border="none" :auto-height="true" clearable
  14. customStyle="margin:0 20rpx;text-align: right;" />
  15. </view>
  16. </view>
  17. <view class="tips-card">
  18. <view class="tips-box">
  19. <u--image width='22rpx' height='22rpx' mode="heightFix" :src="`${$getImgBaseUrl()}ic-tips.png`"
  20. :fade="true" duration="450" customStyle="margin-left: 0rpx" />
  21. <text>温馨提醒:</text>
  22. </view>
  23. <text>认证后再修改,会变为非认证状态,等后台审核确认后方可变为已认证状态。</text>
  24. </view>
  25. <view class="bottom-view">
  26. </view>
  27. <view class="bottom-menu-box">
  28. <button class="primary-btn" @click="saveAuthentication">提交</button>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. import {
  34. saveAuthentication
  35. } from "@/common/api/user.js";
  36. export default {
  37. data() {
  38. return {
  39. url: undefined,
  40. mData: {}
  41. }
  42. },
  43. computed: {
  44. formData() {
  45. return {
  46. code: this.mData.code,
  47. platform: this.mData.platform,
  48. url: this.url
  49. }
  50. }
  51. },
  52. onLoad(options) {
  53. uni.hideShareMenu({
  54. })
  55. const mData = uni.getStorageSync('selectAuthentication') || undefined
  56. console.log(uni.getStorageSync('selectAuthentication'));
  57. if (mData) {
  58. this.mData = JSON.parse(mData)
  59. console.log(this.mData);
  60. this.url = JSON.parse(JSON.stringify(this.mData.url))
  61. }
  62. },
  63. methods: {
  64. saveAuthentication() {
  65. uni.showLoading({
  66. })
  67. const data = this.formData
  68. saveAuthentication(data)
  69. .then(res => {
  70. uni.hideLoading();
  71. uni.$u.toast('提交成功,请耐心等待审核。')
  72. setTimeout(() => {
  73. uni.navigateBack()
  74. }, 800);
  75. })
  76. .catch(() => {
  77. uni.hideLoading();
  78. });
  79. },
  80. }
  81. }
  82. </script>
  83. <style lang="scss" scoped>
  84. .app-page {
  85. width: 100%;
  86. display: flex;
  87. padding-top: 20rpx;
  88. align-items: center;
  89. flex-direction: column;
  90. }
  91. .card-box {
  92. width: 710rpx;
  93. background: #FFFFFF;
  94. border-radius: 15rpx 15rpx 15rpx 15rpx;
  95. margin: 0 auto 20rpx auto;
  96. display: flex;
  97. padding: 20rpx 0;
  98. flex-direction: row;
  99. align-items: center;
  100. justify-content: space-between;
  101. }
  102. .h-view {
  103. flex: 1;
  104. display: flex;
  105. flex-direction: row;
  106. justify-content: flex-end;
  107. align-items: center;
  108. }
  109. .left-title {
  110. margin-left: 20rpx;
  111. font-size: 28rpx;
  112. }
  113. button::after {
  114. border: none;
  115. }
  116. .avatar-wrapper button::before {
  117. padding: 0;
  118. margin: 0;
  119. border-radius: 20rpx;
  120. background: transparent;
  121. border: none;
  122. line-height: 1;
  123. }
  124. .avatar-wrapper button::after {
  125. padding: 0;
  126. margin: 0;
  127. border-radius: 20rpx;
  128. background: transparent;
  129. border: none;
  130. line-height: 1;
  131. }
  132. .tips-card {
  133. width: 710rpx;
  134. background: #F6F0FD;
  135. border-radius: 12rpx 12rpx 12rpx 12rpx;
  136. margin: 0 auto 20rpx auto;
  137. display: flex;
  138. flex-direction: column;
  139. text {
  140. margin-left: 20rpx;
  141. margin-right: 20rpx;
  142. margin-bottom: 20rpx;
  143. font-size: 22rpx;
  144. font-family: PingFang SC-Medium, PingFang SC;
  145. font-weight: 500;
  146. color: #9C81B7;
  147. line-height: 38rpx;
  148. }
  149. .tips-box {
  150. margin: 23rpx 20rpx 0rpx 20rpx;
  151. display: flex;
  152. align-items: center;
  153. flex-direction: row;
  154. text {
  155. margin-left: 4rpx;
  156. margin-bottom: 0;
  157. font-size: 22rpx;
  158. font-family: PingFang SC-Medium, PingFang SC;
  159. font-weight: 500;
  160. color: #765AEE;
  161. line-height: 38rpx;
  162. }
  163. }
  164. }
  165. .bottom-view {
  166. margin-bottom: var(--window-bottom);
  167. padding-bottom: calc(150rpx);
  168. }
  169. .bottom-menu-box {
  170. height: calc(150rpx);
  171. display: flex;
  172. flex-direction: row;
  173. justify-content: center;
  174. align-items: flex-start;
  175. position: fixed;
  176. z-index: 9;
  177. background: white;
  178. bottom: var(--window-bottom);
  179. left: 0;
  180. right: 0;
  181. width: 100vw;
  182. .primary-btn {
  183. width: 713rpx;
  184. margin-top: 14rpx;
  185. height: 78rpx;
  186. line-height: 78rpx;
  187. background: #815BFF;
  188. border-radius: 40rpx;
  189. font-size: 32rpx;
  190. font-family: PingFang SC-Medium, PingFang SC;
  191. font-weight: 500;
  192. color: #FFFFFF;
  193. }
  194. button::after {
  195. height: 78rpx;
  196. line-height: 78rpx;
  197. }
  198. .primary-btn:active {
  199. opacity: 0.7;
  200. }
  201. }
  202. </style>