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.

311 lines
6.8 KiB

8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
  1. <template>
  2. <view class="content">
  3. <view class="banner">
  4. <view class="head-div flex">
  5. <view style="width: 118rpx;height: 118rpx;overflow: hidden;border-radius: 50%;">
  6. <image style="width: 118rpx;" :src="userInfo.image" mode="widthFix"></image>
  7. </view>
  8. <view style="padding: 10rpx 34rpx;">
  9. <view class="nickname">{{ userInfo.title }}</view>
  10. <view class="days">{{ userInfo.notes }}</view>
  11. </view>
  12. </view>
  13. <view style="position: absolute; top: 96rpx;right: 32rpx;">
  14. <image src="/static/icons/icon8.png" mode="aspectFit" style="width: 32rpx; height: 32rpx"></image>
  15. </view>
  16. </view>
  17. <view class="one-card b-relative">
  18. <view style="position: absolute; top: -65rpx;left: 0rpx;">
  19. <image style="width: 675rpx;height: 200rpx;" src="/static/ms/tx.png"></image>
  20. <view class="font-4">
  21. <view>账号余额</view>
  22. <view class="font-5">
  23. <span style="font-size: 32rpx;margin-right: 10rpx">¥</span>{{ belece.money }}
  24. </view>
  25. </view>
  26. <view class="button-cz" @click="clickWallet">立即提现</view>
  27. </view>
  28. </view>
  29. <view class="two-card">
  30. <view class="flex">
  31. <view style="width: 10rpx;height: 30rpx;background: #4a9ca6;border-radius: 6rpx;" />
  32. <view class="head-title">常用功能</view>
  33. </view>
  34. <view style="background-color: #fff;border-radius: 16rpx;">
  35. <view class="flex icons">
  36. <view class="menuItem" @click="clickUpload">
  37. <image class="icon" src="/static/icons/photo-album.png" />
  38. <view class="title">我的相册</view>
  39. </view>
  40. <view class="menuItem" @click="clickSettled">
  41. <image class="icon" src="/static/icons/m2.png" />
  42. <view class="title">邀请入驻</view>
  43. </view>
  44. <view class="menuItem" @click="clickService">
  45. <image class="icon" src="/static/icons/m3.png" />
  46. <view class="title">联系客服</view>
  47. </view>
  48. <view class="menuItem" @click="clickAuthentication">
  49. <image class="icon" src="/static/icons/m4.png" />
  50. <view class="title">实名认证</view>
  51. </view>
  52. </view>
  53. <view class="flex icons" style="margin-top: 0;">
  54. <view class="menuItem" @click="clickServerTime">
  55. <image class="icon" src="/static/icons/m1.png" />
  56. <view class="title">服务时间</view>
  57. </view>
  58. <view class="menuItem" @click="logout">
  59. <image class="icon" src="/static/icons/exit.png" />
  60. <view class="title">退出登录</view>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. <configPopup :keyValue="keyValue" :show="configPopupShow" :list="config" @close="configPopupShow = false" />
  66. </view>
  67. </template>
  68. <script>
  69. import configPopup from '@/components/configPopup'
  70. export default {
  71. components: {
  72. configPopup
  73. },
  74. data() {
  75. return {
  76. userInfo: {},
  77. belece: {},
  78. configPopupShow: false,
  79. keyValue: 'phone',
  80. config: [],
  81. phone: '',
  82. }
  83. },
  84. onShow() {
  85. this.getUserInfo()
  86. this.getConfig()
  87. },
  88. methods: {
  89. getUserInfo() {
  90. this.$api('giveTenInfo', {}, res => {
  91. if (res.code == 200) {
  92. this.userInfo = res.result.msgTen;
  93. this.belece = res.result.belece;
  94. }
  95. if (res.code == 500 && res.message === '操作失败,用户不存在!') {
  96. uni.removeStorageSync('token')
  97. uni.removeStorageSync('userInfo')
  98. uni.navigateTo({
  99. url: '/pages/login/login'
  100. })
  101. }
  102. })
  103. },
  104. getConfig() {
  105. this.$api('getConfig', {}, res => {
  106. if (res.code == 200) {
  107. res.result.forEach(n => {
  108. if (n.keyValue == 'phone') {
  109. this.phone = n.content
  110. }
  111. })
  112. this.config = res.result
  113. }
  114. })
  115. },
  116. logout() {
  117. uni.removeStorageSync('token')
  118. uni.removeStorageSync('userInfo')
  119. uni.showToast({
  120. title: '已退出',
  121. icon: 'none'
  122. })
  123. uni.navigateTo({
  124. url: '/pages/login/mobile'
  125. })
  126. },
  127. clickUpload() {
  128. uni.navigateTo({
  129. url: '/pages/mine/upload'
  130. })
  131. },
  132. clickSettled() {
  133. uni.navigateTo({
  134. url: '/pages/mine/settled'
  135. })
  136. },
  137. clickWallet() {
  138. uni.navigateTo({
  139. url: '/pages/mine/wallet'
  140. })
  141. },
  142. clickServerTime() {
  143. uni.navigateTo({
  144. url: `/pages/mine/serverTime?uid=${this.userInfo.id}`
  145. })
  146. },
  147. clickAuthentication() {
  148. uni.navigateTo({
  149. url: '/pages/mine/authentication'
  150. })
  151. },
  152. clickService() {
  153. if (this.phone.includes('http')) {
  154. window.open(this.phone, true)
  155. return
  156. }
  157. uni.makePhoneCall({
  158. phoneNumber: this.phone,
  159. success: () => {},
  160. fail: () => {}
  161. });
  162. },
  163. }
  164. }
  165. </script>
  166. <style scoped>
  167. body {
  168. background-color: #f5f5f5;
  169. }
  170. .banner {
  171. width: 100%;
  172. height: calc(392rpx - 60rpx);
  173. background: #fff;
  174. }
  175. .head-div {
  176. width: calc(100vw - 72rpx);
  177. height: 268rpx;
  178. padding: 72rpx 36rpx 0;
  179. margin: 0 auto;
  180. }
  181. .nickname {
  182. font-size: 36rpx;
  183. font-family: PingFang SC, PingFang SC-Bold;
  184. font-weight: 700;
  185. text-align: left;
  186. color: #323232;
  187. line-height: 42rpx;
  188. }
  189. .days {
  190. font-size: 28rpx;
  191. font-family: PingFang SC, PingFang SC-Regular;
  192. font-weight: 400;
  193. text-align: left;
  194. color: #ababab;
  195. line-height: 40rpx;
  196. }
  197. .one-card {
  198. width: 678rpx;
  199. height: 116rpx;
  200. border-radius: 16rpx;
  201. margin: -30rpx auto 0;
  202. }
  203. .two-card {
  204. width: calc(675rpx);
  205. height: 228rpx;
  206. border-radius: 16rpx;
  207. margin: 20rpx auto;
  208. padding: 40rpx 0;
  209. }
  210. .title {
  211. height: 40rpx;
  212. line-height: 40rpx;
  213. font-size: 28rpx;
  214. font-family: PingFang SC, PingFang SC-Regular;
  215. font-weight: 400;
  216. text-align: center;
  217. color: #2f2e2e;
  218. margin-top: 15rpx;
  219. }
  220. .icons {
  221. width: 100%;
  222. box-sizing: border-box;
  223. margin-top: 30rpx;
  224. padding: 20rpx 0rpx;
  225. }
  226. .icon {
  227. margin: 0 32rpx;
  228. width: 48rpx;
  229. height: 48rpx;
  230. border-radius: 50%;
  231. }
  232. .head-title {
  233. font-size: 30rpx;
  234. font-family: PingFang SC, PingFang SC-Bold;
  235. color: #2f2e2e;
  236. line-height: 30rpx;
  237. margin-left: 10rpx;
  238. font-weight: 700;
  239. }
  240. .font-4 {
  241. font-size: 28rpx;
  242. font-family: PingFang SC, PingFang SC-Bold;
  243. font-weight: 700;
  244. text-align: left;
  245. color: #ffffff;
  246. text-shadow: 0 4rpx 6rpx 0 rgba(40, 170, 133, 0.81);
  247. line-height: 44rpx;
  248. position: absolute;
  249. top: 32rpx;
  250. left: 52rpx;
  251. z-index: 1;
  252. }
  253. .font-5 {
  254. font-size: 42rpx;
  255. font-family: PingFang SC, PingFang SC-Bold;
  256. font-weight: bolder;
  257. text-align: left;
  258. color: #ffffff;
  259. line-height: 72rpx;
  260. text-shadow: 0 4rpx 6rpx 0 rgba(0, 0, 0, 0.16);
  261. }
  262. .button-cz {
  263. width: 200rpx;
  264. height: 58rpx;
  265. line-height: 58rpx;
  266. background: linear-gradient(182deg, #ffffff 2%, #a6fce3 88%);
  267. border-radius: 30rpx;
  268. box-shadow: 0 6rpx 12rpx 0 rgba(129, 209, 186, 0.66);
  269. font-size: 28rpx;
  270. font-family: PingFang SC, PingFang SC-Bold;
  271. font-weight: 700;
  272. text-align: center;
  273. color: #3fc791;
  274. position: absolute;
  275. top: 72rpx;
  276. right: 52rpx;
  277. z-index: 1;
  278. }
  279. .menuItem {
  280. width: 25%;
  281. display: flex;
  282. flex-direction: column;
  283. align-items: center;
  284. }
  285. </style>