推广小程序前端代码
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.

435 lines
8.8 KiB

2 months ago
  1. <template>
  2. <view class="page">
  3. <navbar title="个人中心" />
  4. <view class="head">
  5. <view class="headImage">
  6. <image :src="userInfo.headImage" mode="aspectFill"></image>
  7. </view>
  8. <view class="info">
  9. <view class="name">
  10. <view class="one">{{ userInfo.nickName }}</view>
  11. <!-- <view class="two">黄金会员</view> -->
  12. <view class="two">
  13. <image :src="configList[vipImage[userInfo.isPay]]" mode="widthFix"></image>
  14. </view>
  15. </view>
  16. <view class="vip">
  17. ID{{ userInfo.id }}
  18. </view>
  19. <view class="tips">
  20. 注册时间{{ userInfo.createTime }}
  21. </view>
  22. </view>
  23. <!-- <view class="setting">
  24. <uv-icon name="setting" size="40rpx"></uv-icon>
  25. </view> -->
  26. </view>
  27. <view class="earnings">
  28. <view class="member"
  29. v-if="userInfo.isPay"
  30. @click="$utils.navigateTo('/pages/index/member')">
  31. <view>会员等级{{ vipType[userInfo.isPay] }}</view>
  32. <view>查看权益></view>
  33. </view>
  34. <view class="deposit">
  35. <view class="box"
  36. @click="$utils.navigateTo('/pages_order/mine/balance')">
  37. <view>
  38. <view class="num">{{ riceInfo.income || 0 }}</view>
  39. <view class="text">收益明细()</view>
  40. </view>
  41. <view class="boxs">收益明细</view>
  42. </view>
  43. <!-- <view class="box">
  44. <view
  45. @click="$utils.navigateTo('/pages_order/mine/balance')">
  46. <view class="num">{{ riceInfo.balance || 0 }}</view>
  47. <view class="text">余额()</view>
  48. </view>
  49. <view class="boxs"
  50. @click="$utils.navigateTo('/pages_order/mine/recharge')">去充值</view>
  51. </view> -->
  52. <view class="box"
  53. @click="clickNo">
  54. <view>
  55. <view class="num">{{ riceInfo.balance || 0 }}</view>
  56. <view class="text">余额()</view>
  57. </view>
  58. <view class="boxs"
  59. >去充值</view>
  60. </view>
  61. <view class="box">
  62. <view
  63. @click="$utils.navigateTo('/pages_order/mine/commission')">
  64. <view class="num" style="border: none;">{{ riceInfo.canWithdraw || 0 }}</view>
  65. <view class="text">可提现()</view>
  66. </view>
  67. <view class="boxs"
  68. @click="$utils.navigateTo('/pages_order/mine/withdraw')">去提现</view>
  69. </view>
  70. </view>
  71. </view>
  72. <view class="myOrder">
  73. <view>我的订单</view>
  74. <view
  75. @click="$utils.navigateTo('/pages/index/order')">
  76. 查看全部>
  77. </view>
  78. </view>
  79. <view class="order">
  80. <view class="box">
  81. <view class="boxs"
  82. @click="$utils.navigateTo('/pages/index/order?type=1')">
  83. <image src="../../static/image/center/13.png" mode="aspectFill" />
  84. <view>待付款</view>
  85. </view>
  86. <view class="boxs"
  87. @click="$utils.navigateTo('/pages/index/order?type=2')">
  88. <image src="../../static/image/center/14.png" mode="aspectFill" />
  89. <view>已付款</view>
  90. </view>
  91. <view class="boxs"
  92. @click="$utils.navigateTo('/pages/index/order?type=3')">
  93. <image src="../../static/image/center/15.png" mode="aspectFill" />
  94. <view>待发货</view>
  95. </view>
  96. <view class="boxs"
  97. @click="$utils.navigateTo('/pages/index/order?type=4')">
  98. <image src="../../static/image/center/16.png" mode="aspectFill" />
  99. <view>待收货</view>
  100. </view>
  101. <view class="boxs"
  102. @click="$utils.navigateTo('/pages/index/order?type=5')">
  103. <image src="../../static/image/center/17.png" mode="aspectFill" />
  104. <view>已完成</view>
  105. </view>
  106. </view>
  107. </view>
  108. <!-- 酒店 -->
  109. <view class="user">
  110. <view class="line grid">
  111. <view class="title">
  112. 常用功能
  113. </view>
  114. </view>
  115. <view class="cell-bottom">
  116. <uv-cell-group>
  117. <uv-cell icon="grid" title="我的邀请码"
  118. @click="$utils.navigateTo('/pages_order/mine/promotion')"
  119. :isLink="true" arrow-direction="right" />
  120. <uv-cell icon="account" title="我的推荐" :isLink="true" arrow-direction="right"
  121. @click="$utils.navigateTo('/pages_order/mine/recommend')" />
  122. <uv-cell icon="kefu-ermai" title="联系客服"
  123. @click="$refs.customerServicePopup.open()"
  124. :isLink="true" arrow-direction="right" />
  125. <uv-cell
  126. title="我的地址"
  127. icon="list-dot"
  128. :isLink="true"
  129. arrow-direction="right"
  130. @click="$utils.navigateTo('/pages_order/mine/address')">
  131. </uv-cell>
  132. <uv-cell icon="reload" title="退出登录" :isLink="true" arrow-direction="right"
  133. @click="$store.commit('logout')"/>
  134. </uv-cell-group>
  135. </view>
  136. </view>
  137. <!-- <customerServicePopup ref="customerServicePopup"/> -->
  138. <tabber select="center" />
  139. </view>
  140. </template>
  141. <script>
  142. import tabber from '@/components/base/tabbar.vue'
  143. import { mapState } from 'vuex'
  144. import customerServicePopup from '@/components/config/customerServicePopup.vue'
  145. export default {
  146. components: {
  147. tabber,
  148. customerServicePopup,
  149. },
  150. computed: {
  151. },
  152. data() {
  153. return {
  154. vipType : ['普通会员', '黄金会员', '渠道商'],
  155. vipImage : ['vip_vip', 'vip_user', 'vip_shop']
  156. }
  157. },
  158. onShow() {
  159. },
  160. methods: {
  161. clickNo(){
  162. uni.showModal({
  163. title: '暂未开放',
  164. })
  165. },
  166. }
  167. }
  168. </script>
  169. <style scoped lang="scss">
  170. .page {
  171. .warp {
  172. display: flex;
  173. align-items: center;
  174. justify-content: center;
  175. height: 100%;
  176. }
  177. .rect {
  178. width: 600rpx;
  179. height: 300rpx;
  180. background-color: #fff;
  181. border-radius: 20rpx;
  182. overflow: hidden;
  183. .title {
  184. padding: 10rpx 0 0 15rpx;
  185. background-color: #fd5100;
  186. color: #FFF;
  187. text-align: left;
  188. width: 100%;
  189. height: 18%;
  190. font-size: 36rpx;
  191. }
  192. .center {
  193. height: 40%;
  194. display: flex;
  195. justify-content: center;
  196. align-items: center;
  197. font-size: 36rpx;
  198. }
  199. .bottom {
  200. display: flex;
  201. justify-content: center;
  202. gap: 50rpx;
  203. }
  204. }
  205. }
  206. image {
  207. width: 100%;
  208. height: 100%;
  209. }
  210. .head {
  211. display: flex;
  212. background-color: #fff;
  213. padding: 40rpx 20rpx;
  214. align-items: center;
  215. position: relative;
  216. .headImage {
  217. width: 130rpx;
  218. height: 130rpx;
  219. background-image: url(/static/image/center/3.png);
  220. background-size: 100% 100%;
  221. overflow: hidden;
  222. border-radius: 50%;
  223. margin-right: 40rpx;
  224. }
  225. .info {
  226. font-size: 28rpx;
  227. display: flex;
  228. flex-direction: column;
  229. gap: 10rpx;
  230. .vip {
  231. color: #909294;
  232. font-size: 24rpx;
  233. }
  234. .name {
  235. display: flex;
  236. align-items: center;
  237. .one {
  238. color: #343140;
  239. font-size: 32rpx;
  240. font-weight: 600;
  241. margin-right: 20rpx;
  242. }
  243. .two {
  244. display: flex;
  245. align-items: center;
  246. justify-content: center;
  247. flex-shrink: 0;
  248. // font-size: 24rpx;
  249. // margin-left: 10rpx;
  250. // padding: 3rpx 16rpx;
  251. // border-radius: 18rpx;
  252. // background-color: rgb(252, 213, 157);
  253. image{
  254. width: 120rpx;
  255. }
  256. }
  257. }
  258. .tips {
  259. font-size: 26rpx;
  260. color: #ABABAB;
  261. }
  262. }
  263. }
  264. .setting {
  265. position: absolute;
  266. right: 50rpx;
  267. top: 50rpx;
  268. }
  269. .earnings {
  270. width: 94%;
  271. margin-left: 3%;
  272. .member {
  273. display: flex;
  274. align-items: center;
  275. justify-content: space-between;
  276. width: 90%;
  277. margin-left: 5%;
  278. height: 80rpx;
  279. font-size: 28rpx;
  280. background-color: #000;
  281. color: #F9CF93;
  282. border-top-left-radius: 30rpx;
  283. border-top-right-radius: 30rpx;
  284. view {
  285. margin: 0 20rpx;
  286. }
  287. }
  288. .deposit {
  289. display: flex;
  290. justify-content: space-around;
  291. align-items: center;
  292. height: 300rpx;
  293. // margin-top: -20rpx;
  294. background-color: rgb(163, 201, 80);
  295. border-radius: 40rpx;
  296. .box {
  297. display: flex;
  298. height: 80%;
  299. padding: 0rpx 30rpx;
  300. text-align: center;
  301. flex-direction: column;
  302. justify-content: space-around;
  303. color: #fff;
  304. border-right: 2rpx dashed;
  305. flex: 1;
  306. .num {
  307. font-size: 48rpx;
  308. // border-right: 2rpx dashed;
  309. width: 100%;
  310. padding: 0 30rpx 0 0;
  311. }
  312. .text {
  313. font-size: 20rpx;
  314. }
  315. .boxs {
  316. font-size: 32rpx;
  317. background-color: rgb(252, 213, 157);
  318. padding: 14rpx 20rpx;
  319. border-radius: 30rpx;
  320. color: #aa5500;
  321. font-weight: 600;
  322. }
  323. }
  324. }
  325. }
  326. .myOrder {
  327. display: flex;
  328. width: 94%;
  329. margin-left: 3%;
  330. align-items: center;
  331. justify-content: space-between;
  332. padding: 20rpx 0;
  333. view:nth-child(1) {
  334. font-weight: 600;
  335. font-size: 32rpx;
  336. border-left: 7rpx solid #A3D250;
  337. }
  338. view:nth-child(2) {
  339. font-size: 28rpx;
  340. color: #A3D250;
  341. }
  342. view {
  343. padding: 0 20rpx;
  344. }
  345. }
  346. .order {
  347. display: flex;
  348. align-items: center;
  349. justify-content: center;
  350. width: 94%;
  351. margin-left: 3%;
  352. background-color: #fff;
  353. border-radius: 16rpx;
  354. .box {
  355. display: flex;
  356. width: 100%;
  357. justify-content: space-around;
  358. padding: 70rpx 0 90rpx;
  359. }
  360. }
  361. .user {
  362. .grid {
  363. flex-direction: column;
  364. font-size: 26rpx;
  365. padding: 20rpx;
  366. .title {
  367. font-weight: 600;
  368. padding: 10rpx;
  369. border-left: 6rpx solid #A3D250;
  370. }
  371. }
  372. .cell-bottom {
  373. width: 96%;
  374. margin-top: 20rpx;
  375. margin-left: 2%;
  376. background-color: #fff;
  377. border-radius: 20rpx;
  378. }
  379. }
  380. </style>