center.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <view>
  3. <view class="head">
  4. <u-cell-group title-bg-color="rgb(243, 244, 246)" :border="true">
  5. <u-cell title="我的订单" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}" :isLink="true"
  6. center @click="pageJump('')"></u-cell>
  7. </u-cell-group>
  8. <view style="margin: 10rpx 0;padding: 14px 0;">
  9. <u-grid :border="false" col="4">
  10. <!-- <u-grid-item @click="pageJump('待付款')">
  11. <u-badge v-for="(item , index) in badgeList" v-if="item.status == 1" :key="index" type="error"
  12. max="99" :value="item.count" absolute :offset="[3,15]"></u-badge>
  13. <u-icon name="order" color="#919399" size="32"></u-icon>
  14. <text style="color: #525454;font-size: 24rpx;">待付款</text>
  15. </u-grid-item> -->
  16. <u-grid-item @click="pageJump('待发货')">
  17. <u-badge v-for="(item , index) in badgeList" v-if="item.status == 3" :key="index" type="error"
  18. max="99" :value="item.count" absolute :offset="[3,15]"></u-badge>
  19. <u-icon name="grid" color="#919399" size="32"></u-icon>
  20. <text style="color: #525454;font-size: 24rpx;">待发货</text>
  21. </u-grid-item>
  22. <u-grid-item @click="pageJump('待收货')">
  23. <u-badge v-for="(item , index) in badgeList" v-if="item.status == 5" :key="index" type="error"
  24. max="99" :value="item.count" absolute :offset="[3,15]"></u-badge>
  25. <u-icon name="car" color="#919399" size="32"></u-icon>
  26. <text style="color: #525454;font-size: 24rpx;">待收货</text>
  27. </u-grid-item>
  28. <u-grid-item @click="pageJump('已完成')">
  29. <u-badge v-for="(item , index) in badgeList" v-if="item.status == 5" :key="index" type="error"
  30. max="99" :value="item.count" absolute :offset="[3,15]"></u-badge>
  31. <u-icon name="list-dot" color="#919399" size="32"></u-icon>
  32. <text style="color: #525454;font-size: 24rpx;">已完成</text>
  33. </u-grid-item>
  34. <u-grid-item @click="pageJump('退款售后')">
  35. <u-badge v-for="(item , index) in badgeList" v-if="item.status == 13" :key="index" type="error"
  36. max="99" :value="item.count" absolute :offset="[3,15]"></u-badge>
  37. <u-icon name="rmb-circle" color="#919399" size="32"></u-icon>
  38. <text style="color: #525454;font-size: 24rpx;">退款售后</text>
  39. </u-grid-item>
  40. </u-grid>
  41. </view>
  42. <u-cell-group title-bg-color="rgb(243, 244, 246)" :border="true">
  43. <u-cell title="个人资料" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}" :isLink="true" center @click="clickMeans"></u-cell>
  44. <u-cell title="地址管理" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}" :isLink="true"
  45. center @click="clickAddress"></u-cell>
  46. <!-- <u-cell title="联系客服" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}" :isLink="true"
  47. center @click="clickCall"></u-cell> -->
  48. <u-cell title="设置" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}" :isLink="true"
  49. :border="false" center @click="setUp"></u-cell>
  50. </u-cell-group>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. export default {
  56. data() {
  57. return {
  58. badgeList: [],
  59. form: {}
  60. }
  61. },
  62. onShow() {
  63. uni.setNavigationBarTitle({
  64. title: uni.getStorageSync('userInfo').account
  65. })
  66. // statusStatisticsApi().then(res => {
  67. // this.badgeList = res.data
  68. // this.$u.api.user().then(res => {
  69. // this.form = res.data
  70. // })
  71. // })
  72. },
  73. methods: {
  74. clickCall() {
  75. uni.makePhoneCall({
  76. phoneNumber: this.form.contactNumber,
  77. success: function() {
  78. console.log('拨打电话成功');
  79. },
  80. fail() {
  81. console.log('打电话失败了');
  82. }
  83. })
  84. },
  85. setUp() {
  86. this.$u.route('/pages/user/setUp');
  87. },
  88. clickMeans() {
  89. uni.$u.route('/pages/views/personalInformation/index');
  90. },
  91. clickAddress() {
  92. this.$u.route('/pages/views/personalInformation/addressManagement');
  93. },
  94. pageJump(value) {
  95. uni.$u.route('/pages/views/salesSlip/index', {
  96. text: value
  97. });
  98. }
  99. }
  100. }
  101. </script>
  102. <style lang="scss" scoped>
  103. .topBackground {
  104. width: 100%;
  105. height: 300rpx;
  106. background-image: url("https://td.echepei.com/file/applets/resources/parts/images/view/home/head_bg.png");
  107. background-repeat: no-repeat;
  108. background-size: 100% 100%;
  109. overflow: hidden;
  110. padding-top: var(--status-bar-height);
  111. }
  112. .topBackgroundTwo {
  113. background-image: url("https://td.echepei.com/file/applets/resources/parts/images/vip.png");
  114. background-repeat: no-repeat;
  115. background-size: 100% 100%;
  116. }
  117. .tips {
  118. width: 96%;
  119. margin: 0 auto;
  120. padding: 40rpx 0;
  121. background-color: #FFFFFF;
  122. margin-top: -100rpx;
  123. border-radius: 20rpx;
  124. box-shadow: 0px 1px 14px 4px rgba(0, 0, 0, 0.04);
  125. z-index: 999;
  126. }
  127. .personal {
  128. margin: 0 auto;
  129. background-color: #FFFFFF;
  130. margin-top: 20rpx;
  131. border-radius: 40rpx;
  132. padding: 20rpx;
  133. box-shadow: 0px 1px 14px 4px rgba(0, 0, 0, 0.04);
  134. }
  135. .head {
  136. width: calc(96% - 20rpx);
  137. margin: 0 auto;
  138. background-color: #FFFFFF;
  139. margin-top: 20rpx;
  140. border-radius: 20rpx;
  141. // padding: 15rpx 10rpx 15rpx 10rpx;
  142. box-shadow: 0px 1px 14px 4px rgba(0, 0, 0, 0.04);
  143. }
  144. .vip {
  145. z-index: 999;
  146. width: calc(96% - 20rpx);
  147. margin: 0 auto;
  148. margin-top: -100rpx;
  149. border-radius: 20rpx;
  150. // padding: 15rpx 10rpx 15rpx 10rpx;
  151. box-shadow: 0px 1px 14px 4px rgba(0, 0, 0, 0.04);
  152. }
  153. .grid-text {
  154. font-size: 14px;
  155. color: #909399;
  156. padding: 10rpx 0 20rpx 0rpx;
  157. /* #ifndef APP-PLUS */
  158. box-sizing: border-box;
  159. /* #endif */
  160. }
  161. .vipName {
  162. view {
  163. margin: 10rpx 0;
  164. }
  165. }
  166. </style>