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.

316 lines
6.9 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. <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.vid = uni.getStorageSync("ivcode");
  106. this.$api('getConfig', {}, res => {
  107. if (res.code == 200) {
  108. res.result.forEach(n => {
  109. if (n.keyValue == 'phone') {
  110. this.phone = this.deleteTag(item.content);
  111. }
  112. })
  113. this.config = res.result
  114. }
  115. })
  116. },
  117. //删除html标签
  118. deleteTag(html){
  119. return html.replace(/<[^>]*>/g, '');
  120. },
  121. logout() {
  122. uni.removeStorageSync('token')
  123. uni.removeStorageSync('userInfo')
  124. uni.showToast({
  125. title: '已退出',
  126. icon: 'none'
  127. })
  128. uni.navigateTo({
  129. url: '/pages/login/mobile'
  130. })
  131. },
  132. clickUpload() {
  133. uni.navigateTo({
  134. url: '/pages/mine/upload'
  135. })
  136. },
  137. clickSettled() {
  138. uni.navigateTo({
  139. url: '/pages/mine/settled'
  140. })
  141. },
  142. clickWallet() {
  143. uni.navigateTo({
  144. url: '/pages/mine/wallet'
  145. })
  146. },
  147. clickServerTime() {
  148. uni.navigateTo({
  149. url: `/pages/mine/serverTime?uid=${this.userInfo.id}`
  150. })
  151. },
  152. clickAuthentication() {
  153. uni.navigateTo({
  154. url: '/pages/mine/authentication'
  155. })
  156. },
  157. clickService() {
  158. if (this.phone.includes('http')) {
  159. window.open(this.phone, true)
  160. return
  161. }
  162. uni.makePhoneCall({
  163. phoneNumber: this.phone,
  164. success: () => {},
  165. fail: () => {}
  166. });
  167. },
  168. }
  169. }
  170. </script>
  171. <style scoped>
  172. body {
  173. background-color: #f5f5f5;
  174. }
  175. .banner {
  176. width: 100%;
  177. height: calc(392rpx - 60rpx);
  178. background: #fff;
  179. }
  180. .head-div {
  181. width: calc(100vw - 72rpx);
  182. height: 268rpx;
  183. padding: 72rpx 36rpx 0;
  184. margin: 0 auto;
  185. }
  186. .nickname {
  187. font-size: 36rpx;
  188. font-family: PingFang SC, PingFang SC-Bold;
  189. font-weight: 700;
  190. text-align: left;
  191. color: #323232;
  192. line-height: 42rpx;
  193. }
  194. .days {
  195. font-size: 28rpx;
  196. font-family: PingFang SC, PingFang SC-Regular;
  197. font-weight: 400;
  198. text-align: left;
  199. color: #ababab;
  200. line-height: 40rpx;
  201. }
  202. .one-card {
  203. width: 678rpx;
  204. height: 116rpx;
  205. border-radius: 16rpx;
  206. margin: -30rpx auto 0;
  207. }
  208. .two-card {
  209. width: calc(675rpx);
  210. height: 228rpx;
  211. border-radius: 16rpx;
  212. margin: 20rpx auto;
  213. padding: 40rpx 0;
  214. }
  215. .title {
  216. height: 40rpx;
  217. line-height: 40rpx;
  218. font-size: 28rpx;
  219. font-family: PingFang SC, PingFang SC-Regular;
  220. font-weight: 400;
  221. text-align: center;
  222. color: #2f2e2e;
  223. margin-top: 15rpx;
  224. }
  225. .icons {
  226. width: 100%;
  227. box-sizing: border-box;
  228. margin-top: 30rpx;
  229. padding: 20rpx 0rpx;
  230. }
  231. .icon {
  232. margin: 0 32rpx;
  233. width: 48rpx;
  234. height: 48rpx;
  235. border-radius: 50%;
  236. }
  237. .head-title {
  238. font-size: 30rpx;
  239. font-family: PingFang SC, PingFang SC-Bold;
  240. color: #2f2e2e;
  241. line-height: 30rpx;
  242. margin-left: 10rpx;
  243. font-weight: 700;
  244. }
  245. .font-4 {
  246. font-size: 28rpx;
  247. font-family: PingFang SC, PingFang SC-Bold;
  248. font-weight: 700;
  249. text-align: left;
  250. color: #ffffff;
  251. text-shadow: 0 4rpx 6rpx 0 rgba(40, 170, 133, 0.81);
  252. line-height: 44rpx;
  253. position: absolute;
  254. top: 32rpx;
  255. left: 52rpx;
  256. z-index: 1;
  257. }
  258. .font-5 {
  259. font-size: 42rpx;
  260. font-family: PingFang SC, PingFang SC-Bold;
  261. font-weight: bolder;
  262. text-align: left;
  263. color: #ffffff;
  264. line-height: 72rpx;
  265. text-shadow: 0 4rpx 6rpx 0 rgba(0, 0, 0, 0.16);
  266. }
  267. .button-cz {
  268. width: 200rpx;
  269. height: 58rpx;
  270. line-height: 58rpx;
  271. background: linear-gradient(182deg, #ffffff 2%, #a6fce3 88%);
  272. border-radius: 30rpx;
  273. box-shadow: 0 6rpx 12rpx 0 rgba(129, 209, 186, 0.66);
  274. font-size: 28rpx;
  275. font-family: PingFang SC, PingFang SC-Bold;
  276. font-weight: 700;
  277. text-align: center;
  278. color: #3fc791;
  279. position: absolute;
  280. top: 72rpx;
  281. right: 52rpx;
  282. z-index: 1;
  283. }
  284. .menuItem {
  285. width: 25%;
  286. display: flex;
  287. flex-direction: column;
  288. align-items: center;
  289. }
  290. </style>