center.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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="obligationBtn('待付款')">
  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. obligationBtn(value){
  100. uni.$u.route('/pages/views/salesSlip/obligation', {
  101. text: value
  102. });
  103. }
  104. }
  105. }
  106. </script>
  107. <style lang="scss" scoped>
  108. .topBackground {
  109. width: 100%;
  110. height: 300rpx;
  111. background-image: url("https://td.echepei.com/file/applets/resources/parts/images/view/home/head_bg.png");
  112. background-repeat: no-repeat;
  113. background-size: 100% 100%;
  114. overflow: hidden;
  115. padding-top: var(--status-bar-height);
  116. }
  117. .topBackgroundTwo {
  118. background-image: url("https://td.echepei.com/file/applets/resources/parts/images/vip.png");
  119. background-repeat: no-repeat;
  120. background-size: 100% 100%;
  121. }
  122. .tips {
  123. width: 96%;
  124. margin: 0 auto;
  125. padding: 40rpx 0;
  126. background-color: #FFFFFF;
  127. margin-top: -100rpx;
  128. border-radius: 20rpx;
  129. box-shadow: 0px 1px 14px 4px rgba(0, 0, 0, 0.04);
  130. z-index: 999;
  131. }
  132. .personal {
  133. margin: 0 auto;
  134. background-color: #FFFFFF;
  135. margin-top: 20rpx;
  136. border-radius: 40rpx;
  137. padding: 20rpx;
  138. box-shadow: 0px 1px 14px 4px rgba(0, 0, 0, 0.04);
  139. }
  140. .head {
  141. width: calc(96% - 20rpx);
  142. margin: 0 auto;
  143. background-color: #FFFFFF;
  144. margin-top: 20rpx;
  145. border-radius: 20rpx;
  146. // padding: 15rpx 10rpx 15rpx 10rpx;
  147. box-shadow: 0px 1px 14px 4px rgba(0, 0, 0, 0.04);
  148. }
  149. .vip {
  150. z-index: 999;
  151. width: calc(96% - 20rpx);
  152. margin: 0 auto;
  153. margin-top: -100rpx;
  154. border-radius: 20rpx;
  155. // padding: 15rpx 10rpx 15rpx 10rpx;
  156. box-shadow: 0px 1px 14px 4px rgba(0, 0, 0, 0.04);
  157. }
  158. .grid-text {
  159. font-size: 14px;
  160. color: #909399;
  161. padding: 10rpx 0 20rpx 0rpx;
  162. /* #ifndef APP-PLUS */
  163. box-sizing: border-box;
  164. /* #endif */
  165. }
  166. .vipName {
  167. view {
  168. margin: 10rpx 0;
  169. }
  170. }
  171. </style>