宜轩到家/服务到家第三版,换个颜色
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.

320 lines
7.0 KiB

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