帧视界壹通告,付费看视频的微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

284 lines
8.4 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view style="display: flex;flex-direction: column; width: 100vw;height: 100vh;">
  3. <tabber :select="2" />
  4. <!-- 顶部 -->
  5. <view style="width: 100%;height: 30%;">
  6. <image src="https://tennis-oss.xzaiyp.top/2024-09-07/05cbb032-8177-478e-8fbe-0a3797096890.png"
  7. style="width: 100%;height: 100%;"></image>
  8. </view>
  9. <!--中部 用户信息-->
  10. <view
  11. style="box-shadow: 0 0 10px rgba(47, 125, 125, 0.5);border-radius: 20rpx;position: absolute;top: 20%;left: 10%; width:80%;height: 12%;z-index: 1;background: white;">
  12. <!--头像-->
  13. <view style="box-shadow: 0 0 10px rgba(47, 125, 125, 0.5);position: absolute;z-index:2;width:30%;height:90%;border-radius: 50%;
  14. overflow: hidden;top: -32%;left: 5%;">
  15. <image :src="userInfo.headImage || '微信用户'" style="width: 100%;height: 100%;"></image>
  16. </view>
  17. <!--福利中心-->
  18. <!-- <view style="position: absolute;z-index:2;width:33%;height:30%;top: 13%;right: 2%;">
  19. <image src="/static/image/center/flzx.png" style="width: 100%;height: 100%;"></image>
  20. </view> -->
  21. <!-- 未认证-->
  22. <view v-if='!isNameValid' style="position: absolute;z-index:2;width:20%;height:25%;top: 38%;left: 31%;">
  23. <image src="/static/image/center/wrz.svg" style="width: 100%;height: 100%;"></image>
  24. </view>
  25. <!-- 去认证 -->
  26. <view v-if='!isNameValid' style="position: absolute;z-index:2;height:20%;top: 39%;left: 52%;">
  27. <span style="font-size: 26rpx;font-weight: 700;" class="textColor" @click="toAuthPage">去认证</span>
  28. </view>
  29. <!-- 用户信息 -->
  30. <view style="position: absolute;z-index:2;width:55%;height:20%;top: 65%;left: 7%;">
  31. <view>
  32. <span style="font-size: 35rpx;margin-right: 5rpx">{{ userInfo.nickName || '微信用户' }}</span>
  33. <!-- <span style="font-size: 18rpx">{{ userInfo.phone||'暂无联系方式' }}</span> -->
  34. </view>
  35. </view>
  36. <!-- 点赞量 -->
  37. <!-- <view
  38. style="display: flex;flex-direction: column;gap:2rpx ;position: absolute;z-index:2;width:15%;height:40%;top: 55%;right: 3%;">
  39. <view style="display: flex;justify-content: center;align-items: center;width: 100%;height: 100%;">
  40. <image src="/static/image/center/dianZan.svg" style="width: 40%;height: 84%;"></image>
  41. </view>
  42. <view style="display: flex;justify-content: center ;font-size: 20rpx;color:#777777">点赞量</view>
  43. </view> -->
  44. </view>
  45. <!-- 下部 -->
  46. <view style="width: 100%;height: 70%;padding-top:150rpx">
  47. <view>
  48. <!--上GridView-->
  49. <view>
  50. <uv-grid :col="4">
  51. <uv-grid-item v-for="(item,index) in baseList" :key="index" @click="goToPage(item)">
  52. <img :src="item.imageUrl" :alt="item.title"
  53. :style="{ width: '60rpx', height: '60rpx',marginBottom: '10rpx'}" />
  54. <text style="font-size: 28rpx;color: #333333;">{{ item.title }}
  55. </text>
  56. </uv-grid-item>
  57. </uv-grid>
  58. </view>
  59. <!--其他-->
  60. <view style="margin:50rpx 0 0 50rpx;font-size: 40rpx;color: #333333;">其他</view>
  61. <!--下GridView-->
  62. <view style="margin-top: 50rpx;">
  63. <uv-grid :col="4">
  64. <uv-grid-item v-for="(item,index) in otherList" :key="index" @click="goToPage(item)">
  65. <img :src="item.imageUrl" :alt="item.title"
  66. :style="{ width: '60rpx', height: '60rpx',marginBottom: '10rpx'}" />
  67. <text style="font-size: 28rpx;color: #333333;">{{ item.title }}
  68. </text>
  69. </uv-grid-item>
  70. </uv-grid>
  71. </view>
  72. </view>
  73. </view>
  74. <!-- 退出弹框-->
  75. <confirmationPopup ref="confirmationPopup" title="提示" :cancel="true" @confirm="handleConfirm"
  76. @cancel="handleCancel" confirmText="确认">
  77. <view class="confirmationPopup">
  78. <view style="text-align:center">
  79. 确认退出登录吗
  80. </view>
  81. </view>
  82. </confirmationPopup>
  83. <!-- 实名信息弹框 -->
  84. <confirmationPopup ref="realNameInfoPopup" title="提示" :cancel="true" @confirm="realNameInfoHandleConfirm"
  85. @cancel="realNameInfoHandleCancel" confirmText="确认">
  86. <view class="confirmationPopup">
  87. <view style="text-align:center">
  88. {{isNameValid?'已实名,是否重新认证?':'确定认证实名信息吗?' }}
  89. </view>
  90. </view>
  91. </confirmationPopup>
  92. </view>
  93. </template>
  94. <script>
  95. import {
  96. mapState
  97. } from 'vuex'
  98. import tabber from '@/components/base/tabbar.vue'
  99. import confirmationPopup from "@/components/toast/confirmationPopup.vue";
  100. export default {
  101. components: {
  102. confirmationPopup,
  103. tabber,
  104. },
  105. computed: {
  106. ...mapState(['userInfo', 'idCardOpenStatus']),
  107. isNameValid() {
  108. return this.userInfo.idCardOpen != 0 && this.idCardOpenStatus
  109. }
  110. },
  111. data() {
  112. return {
  113. // 基础列表
  114. baseList: [{
  115. name: 'myPost',
  116. imageUrl: 'https://tennis-oss.xzaiyp.top/2024-09-09/f9d757ca-a95a-42d7-86aa-38c288f2c54f.svg',
  117. title: '我的发布',
  118. gotoPageUrl: '/mine/releaseRecord'
  119. },
  120. {
  121. name: 'myPromotion',
  122. imageUrl: 'https://tennis-oss.xzaiyp.top/2024-09-09/f6fbb99f-c381-498a-8367-e91fc5e05cd6.svg',
  123. title: '我的推广',
  124. gotoPageUrl: '/mine/promotionRecord'
  125. },
  126. {
  127. name: 'myBankCard',
  128. imageUrl: 'https://tennis-oss.xzaiyp.top/2024-09-09/85fe8ad3-5094-473f-b184-ef4cf5c1db6e.svg',
  129. title: '我的银行卡',
  130. gotoPageUrl: '/mine/addBankCard'
  131. },
  132. {
  133. name: 'myWallet',
  134. imageUrl: 'https://tennis-oss.xzaiyp.top/2024-09-09/45ec00a0-3c12-4246-bfe3-a658ccf1f912.svg',
  135. title: '我的钱包',
  136. gotoPageUrl: '/mine/purse'
  137. },
  138. ],
  139. // 其他列表
  140. otherList: [{
  141. name: 'realNameInfo',
  142. imageUrl: 'https://tennis-oss.xzaiyp.top/2024-09-09/8bc56d2e-380a-4656-8a33-592d374d246a.svg',
  143. title: '实名信息',
  144. gotoPageUrl: '/mine/authOption'
  145. },
  146. {
  147. name: 'helpFeedback',
  148. imageUrl: 'https://tennis-oss.xzaiyp.top/2024-09-09/cd007424-1336-402c-8390-26c4f21deb80.svg',
  149. title: '帮助反馈',
  150. gotoPageUrl: '/mine/help'
  151. },
  152. {
  153. name: 'updateUserInfo',
  154. imageUrl: 'https://tennis-oss.xzaiyp.top/2024-09-09/ef58bc0b-ead6-4053-83b4-339aa02805d2.svg',
  155. title: '修改个人信息',
  156. gotoPageUrl: '/mine/updateUserInfo'
  157. },
  158. {
  159. name: 'outLogin',
  160. imageUrl: 'https://tennis-oss.xzaiyp.top/2024-09-09/4ae3829e-7b07-4d6d-843b-2b7fd21ba346.svg',
  161. title: '退出登录',
  162. },
  163. ],
  164. }
  165. },
  166. onShow() {
  167. // 获取用户个人信息
  168. this.$store.commit('getUserInfo')
  169. },
  170. onPullDownRefresh(){
  171. this.$store.commit('getUserInfo')
  172. },
  173. methods: {
  174. toAuthPage() {
  175. uni.navigateTo({
  176. url: '/pages_mine/mine/authOption'
  177. })
  178. },
  179. // 点击列表跳转页面
  180. goToPage(item) {
  181. if (item.name == 'outLogin') {
  182. this.$refs.confirmationPopup.open()
  183. return
  184. }
  185. // 已完成认证
  186. if (item.name == 'realNameInfo'
  187. && this.userInfo.idCardOpen) {
  188. // this.$refs.realNameInfoPopup.open()
  189. // this.userInfo.idCardOpen 1企业认证 2个人认证
  190. uni.navigateTo({
  191. url: '/pages_mine/mine/certifiedIndividual?type=' +
  192. ['firm', 'person'][this.userInfo.idCardOpen - 1]
  193. })
  194. return
  195. }
  196. uni.navigateTo({
  197. url: '/pages_mine' + item.gotoPageUrl
  198. })
  199. },
  200. handleConfirm() {
  201. // 退出登录
  202. console.log("退出登录")
  203. this.$api('loginLogout', res => {
  204. if (res.code == 200) {
  205. uni.removeStorageSync('token')
  206. this.$store.state.userInfo = {}
  207. uni.redirectTo({
  208. url: '/pages/index/index'
  209. })
  210. }
  211. })
  212. this.$refs.confirmationPopup.close()
  213. },
  214. handleCancel() {
  215. // 取消退出登录
  216. console.log("取消退出登录")
  217. this.$refs.confirmationPopup.close()
  218. },
  219. // 确认实名
  220. realNameInfoHandleConfirm() {
  221. console.log("确认实名")
  222. this.$refs.realNameInfoPopup.close()
  223. uni.navigateTo({
  224. url: '/pages_mine/mine/certifiedIndividual'
  225. })
  226. },
  227. // 取消实名
  228. realNameInfoHandleCancel() {
  229. console.log("取消实名")
  230. this.$refs.realNameInfoPopup.close()
  231. },
  232. }
  233. }
  234. </script>
  235. <style lang="scss" scoped>
  236. * {
  237. box-sizing: border-box;
  238. margin: 0;
  239. padding: 0;
  240. }
  241. .textColor {
  242. background: $uni-linear-gradient-color;
  243. -webkit-background-clip: text;
  244. /*将设置的背景颜色限制在文字中*/
  245. -webkit-text-fill-color: transparent;
  246. /*给文字设置成透明*/
  247. }
  248. .confirmationPopup {
  249. display: flex;
  250. flex-direction: column;
  251. align-items: center;
  252. justify-content: center;
  253. width: 100%;
  254. height: 200rpx;
  255. image {
  256. margin-top: 40rpx;
  257. }
  258. .info {
  259. margin-top: 40rpx;
  260. font-size: 26rpx;
  261. }
  262. }
  263. </style>