center.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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="5">
  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"
  44. center @click="clickMeans"></u-cell>
  45. <u-cell title="员工信息" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}" :isLink="true"
  46. center @click="clickContacts"></u-cell>
  47. <u-cell title="地址管理" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}" :isLink="true"
  48. center @click="clickAddress"></u-cell>
  49. <u-cell title="车型" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}" :isLink="true"
  50. center @click="clickVehicle"></u-cell>
  51. <!-- <u-cell title="积分商城" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}" :isLink="true"
  52. center @click="clickPointsMall"></u-cell> -->
  53. <u-cell title="我的积分" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}"
  54. :isLink="true" center @click="RedemptionOfPoints"></u-cell>
  55. <!-- <u-cell title="积分获取记录" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}"
  56. :isLink="true" center @click="obtainRecord"></u-cell> -->
  57. <!-- <u-cell title="额度消费记录" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}"
  58. :isLink="true" center @click="consumptionRecord"></u-cell> -->
  59. <!-- <u-cell title="联系客服" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}" :isLink="true"
  60. center @click="clickCall"></u-cell> -->
  61. <u-cell title="设置" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}" :isLink="true"
  62. :border="false" center @click="setUp"></u-cell>
  63. </u-cell-group>
  64. </view>
  65. <!-- 提取去登录 -->
  66. <u-modal :show="adminShow" :showCancelButton="true" content='当前还未登录请先登录!!' @confirm="adminConfirm"
  67. @cancel="adminCancel"></u-modal>
  68. </view>
  69. </template>
  70. <script>
  71. export default {
  72. data() {
  73. return {
  74. badgeList: [],
  75. form: {},
  76. adminShow: false,
  77. }
  78. },
  79. onShow() {
  80. if (uni.getStorageSync('userInfo').tenant_id == '000000') {
  81. this.adminShow = true
  82. }
  83. uni.setNavigationBarTitle({
  84. title: uni.getStorageSync('userInfo').account
  85. })
  86. // statusStatisticsApi().then(res => {
  87. // this.badgeList = res.data
  88. // this.$u.api.user().then(res => {
  89. // this.form = res.data
  90. // })
  91. // })
  92. },
  93. methods: {
  94. // 确认
  95. adminConfirm() {
  96. uni.clearStorageSync();
  97. uni.redirectTo({
  98. url: '/pages/login/login'
  99. })
  100. },
  101. // 取消
  102. adminCancel() {
  103. uni.switchTab({
  104. url: '/pages/tabBar/home'
  105. })
  106. },
  107. clickCall() {
  108. uni.makePhoneCall({
  109. phoneNumber: this.form.contactNumber,
  110. success: function() {
  111. console.log('拨打电话成功');
  112. },
  113. fail() {
  114. console.log('打电话失败了');
  115. }
  116. })
  117. },
  118. setUp() {
  119. this.$u.route('/pages/user/setUp');
  120. },
  121. clickMeans() {
  122. uni.$u.route('/pages/views/personalInformation/index');
  123. },
  124. clickContacts() {
  125. uni.$u.route('/pages/views/personalInformation/contacts');
  126. },
  127. clickAddress() {
  128. this.$u.route('/pages/views/personalInformation/addressManagement');
  129. },
  130. // 车型
  131. clickVehicle() {
  132. this.$u.route('/pages/tabBar/vehicleModel');
  133. },
  134. // 积分商城
  135. clickPointsMall() {
  136. this.$u.route('/pages/tabBar/pointsMall');
  137. },
  138. // 积分兑换记录
  139. RedemptionOfPoints() {
  140. this.$u.route('/pages/tabBar/integralList/index');
  141. },
  142. // 积分获取记录
  143. obtainRecord() {
  144. this.$u.route('/pages/tabBar/integralList/obtainRecord');
  145. },
  146. // 消费记录
  147. consumptionRecord() {
  148. this.$u.route('/pages/tabBar/integralList/consumptionRecord');
  149. },
  150. pageJump(value) {
  151. uni.$u.route('/pages/views/salesSlip/index', {
  152. text: value
  153. });
  154. },
  155. obligationBtn(value) {
  156. uni.$u.route('/pages/views/salesSlip/obligation', {
  157. text: value
  158. });
  159. }
  160. }
  161. }
  162. </script>
  163. <style lang="scss" scoped>
  164. .topBackground {
  165. width: 100%;
  166. height: 300rpx;
  167. background-image: url("https://td.echepei.com/file/applets/resources/parts/images/view/home/head_bg.png");
  168. background-repeat: no-repeat;
  169. background-size: 100% 100%;
  170. overflow: hidden;
  171. padding-top: var(--status-bar-height);
  172. }
  173. .topBackgroundTwo {
  174. background-image: url("https://td.echepei.com/file/applets/resources/parts/images/vip.png");
  175. background-repeat: no-repeat;
  176. background-size: 100% 100%;
  177. }
  178. .tips {
  179. width: 96%;
  180. margin: 0 auto;
  181. padding: 40rpx 0;
  182. background-color: #FFFFFF;
  183. margin-top: -100rpx;
  184. border-radius: 20rpx;
  185. box-shadow: 0px 1px 14px 4px rgba(0, 0, 0, 0.04);
  186. z-index: 999;
  187. }
  188. .personal {
  189. margin: 0 auto;
  190. background-color: #FFFFFF;
  191. margin-top: 20rpx;
  192. border-radius: 40rpx;
  193. padding: 20rpx;
  194. box-shadow: 0px 1px 14px 4px rgba(0, 0, 0, 0.04);
  195. }
  196. .head {
  197. width: calc(96% - 20rpx);
  198. margin: 0 auto;
  199. background-color: #FFFFFF;
  200. margin-top: 20rpx;
  201. border-radius: 20rpx;
  202. // padding: 15rpx 10rpx 15rpx 10rpx;
  203. box-shadow: 0px 1px 14px 4px rgba(0, 0, 0, 0.04);
  204. }
  205. .vip {
  206. z-index: 999;
  207. width: calc(96% - 20rpx);
  208. margin: 0 auto;
  209. margin-top: -100rpx;
  210. border-radius: 20rpx;
  211. // padding: 15rpx 10rpx 15rpx 10rpx;
  212. box-shadow: 0px 1px 14px 4px rgba(0, 0, 0, 0.04);
  213. }
  214. .grid-text {
  215. font-size: 14px;
  216. color: #909399;
  217. padding: 10rpx 0 20rpx 0rpx;
  218. /* #ifndef APP-PLUS */
  219. box-sizing: border-box;
  220. /* #endif */
  221. }
  222. .vipName {
  223. view {
  224. margin: 10rpx 0;
  225. }
  226. }
  227. </style>