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.

279 lines
6.6 KiB

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"
  54. style="margin-top: 0;">
  55. <view class="menuItem" @click="clickServerTime">
  56. <image class="icon" src="/static/icons/m1.png" />
  57. <view class="title">服务时间</view>
  58. </view>
  59. <view class="menuItem" @click="logout">
  60. <image class="icon" src="/static/icons/exit.png" />
  61. <view class="title">退出登录</view>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. <configPopup
  67. :keyValue="keyValue"
  68. :show="configPopupShow"
  69. :list="config"
  70. @close="configPopupShow = false"/>
  71. </view>
  72. </template>
  73. <script>
  74. import configPopup from '@/components/configPopup'
  75. export default {
  76. components : {
  77. configPopup
  78. },
  79. data() {
  80. return {
  81. userInfo : {},
  82. belece : {},
  83. configPopupShow : false,
  84. keyValue : 'phone',
  85. config : [],
  86. phone : '',
  87. }
  88. },
  89. onShow() {
  90. this.getUserInfo()
  91. this.getConfig()
  92. },
  93. methods: {
  94. getUserInfo() {
  95. this.$api('giveTenInfo', {}, res => {
  96. if (res.code == 200) {
  97. this.userInfo = res.result.msgTen;
  98. this.belece = res.result.belece;
  99. }
  100. if (res.code == 500 && res.message === '操作失败,用户不存在!') {
  101. uni.removeStorageSync('token')
  102. uni.removeStorageSync('userInfo')
  103. uni.navigateTo({
  104. url: '/pages/login/login'
  105. })
  106. }
  107. })
  108. },
  109. getConfig() {
  110. // this.vid = uni.getStorageSync("ivcode");
  111. this.$api('getConfig', {} ,res => {
  112. if(res.code == 200){
  113. res.result.forEach(n => {
  114. if(n.keyValue == 'phone'){
  115. this.phone = n.name
  116. }
  117. })
  118. this.config = res.result
  119. }
  120. })
  121. },
  122. logout(){
  123. uni.removeStorageSync('token')
  124. uni.removeStorageSync('userInfo')
  125. uni.showToast({
  126. title: '已退出',
  127. icon: 'none'
  128. })
  129. uni.navigateTo({
  130. url: '/pages/login/mobile'
  131. })
  132. },
  133. clickUpload(){ uni.navigateTo({ url: '/pages/mine/upload' }) },
  134. clickSettled(){ uni.navigateTo({ url: '/pages/mine/settled' }) },
  135. clickWallet(){ uni.navigateTo({ url: '/pages/mine/wallet'}) },
  136. clickServerTime(){ uni.navigateTo({ url: `/pages/mine/serverTime?uid=${this.userInfo.id}` }) },
  137. clickAuthentication(){ uni.navigateTo({ url: '/pages/mine/authentication'}) },
  138. clickService(){ uni.makePhoneCall({ phoneNumber: this.phone, success:() => {}, fail: () => {} });},
  139. }
  140. }
  141. </script>
  142. <style scoped>
  143. body{
  144. background-color: #f5f5f5;
  145. }
  146. .banner {
  147. width: 100%;
  148. height: calc(392rpx - 60rpx);
  149. background: #fff;
  150. }
  151. .head-div{
  152. width: calc(100vw - 72rpx);
  153. height: 268rpx;
  154. padding: 72rpx 36rpx 0;
  155. margin: 0 auto;
  156. }
  157. .nickname{
  158. font-size: 36rpx;
  159. font-family: PingFang SC, PingFang SC-Bold;
  160. font-weight: 700;
  161. text-align: left;
  162. color: #323232;
  163. line-height: 42rpx;
  164. }
  165. .days{
  166. font-size: 28rpx;
  167. font-family: PingFang SC, PingFang SC-Regular;
  168. font-weight: 400;
  169. text-align: left;
  170. color: #ababab;
  171. line-height: 40rpx;
  172. }
  173. .one-card{
  174. width: 678rpx;
  175. height: 116rpx;
  176. border-radius: 16rpx;
  177. margin: -30rpx auto 0;
  178. }
  179. .two-card{
  180. width: calc(675rpx);
  181. height: 228rpx;
  182. border-radius: 16rpx;
  183. margin: 20rpx auto;
  184. padding: 40rpx 0;
  185. }
  186. .title{
  187. height: 40rpx;
  188. line-height: 40rpx;
  189. font-size: 28rpx;
  190. font-family: PingFang SC, PingFang SC-Regular;
  191. font-weight: 400;
  192. text-align: center;
  193. color: #2f2e2e;
  194. margin-top: 15rpx;
  195. }
  196. .icons{
  197. width: 100%;
  198. box-sizing: border-box;
  199. margin-top: 30rpx;
  200. padding: 20rpx 0rpx;
  201. }
  202. .icon{
  203. margin: 0 32rpx;
  204. width: 48rpx;
  205. height: 48rpx;
  206. border-radius: 50%;
  207. }
  208. .head-title{
  209. font-size: 30rpx;
  210. font-family: PingFang SC, PingFang SC-Bold;
  211. color: #2f2e2e;
  212. line-height: 30rpx;
  213. margin-left: 10rpx;
  214. font-weight: 700;
  215. }
  216. .font-4{
  217. font-size: 28rpx;
  218. font-family: PingFang SC, PingFang SC-Bold;
  219. font-weight: 700;
  220. text-align: left;
  221. color: #ffffff;
  222. text-shadow: 0 4rpx 6rpx 0 rgba(40,170,133,0.81);
  223. line-height: 44rpx;
  224. position: absolute;
  225. top: 32rpx;
  226. left: 52rpx;
  227. z-index: 1;
  228. }
  229. .font-5{
  230. font-size: 42rpx;
  231. font-family: PingFang SC, PingFang SC-Bold;
  232. font-weight: bolder;
  233. text-align: left;
  234. color: #ffffff;
  235. line-height: 72rpx;
  236. text-shadow: 0 4rpx 6rpx 0 rgba(0,0,0,0.16);
  237. }
  238. .button-cz{
  239. width: 200rpx;
  240. height: 58rpx;
  241. line-height: 58rpx;
  242. background: linear-gradient(182deg,#ffffff 2%, #a6fce3 88%);
  243. border-radius: 30rpx;
  244. box-shadow: 0 6rpx 12rpx 0 rgba(129,209,186,0.66);
  245. font-size: 28rpx;
  246. font-family: PingFang SC, PingFang SC-Bold;
  247. font-weight: 700;
  248. text-align: center;
  249. color: #3fc791;
  250. position: absolute;
  251. top: 72rpx;
  252. right: 52rpx;
  253. z-index: 1;
  254. }
  255. .menuItem{
  256. width: 25%;
  257. display: flex;
  258. flex-direction: column;
  259. align-items: center;
  260. }
  261. </style>