加油站付款小程序,打印小票
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.

241 lines
4.4 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <view class="">
  3. <uni-nav-bar dark :fixed="true" background-color="#00aaff" :border="false" status-bar title="个人中心" />
  4. <view class="content">
  5. <view class="topBox">
  6. <view class="users">
  7. <view class="u-top" v-if="userInfo.appletOpenid">
  8. <image class="img" :src="userInfo.headImage" mode="widthFix"></image>
  9. <view class="tit">
  10. {{ userInfo.nickName }}
  11. </view>
  12. </view>
  13. <view class="u-top" v-else>
  14. <image class="img"
  15. src="https://img2.baidu.com/it/u=2953585264,744730101&fm=253&fmt=auto&app=138&f=JPEG?w=360&h=360"
  16. mode="widthFix"></image>
  17. <view class="tit">
  18. 登录 / 注册
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="listBox">
  24. <view class="lists">
  25. <uni-section title="我的订单" type="line" titleFontSize="34rpx"
  26. style="border-radius: 10rpx;"></uni-section>
  27. <view class="order-list">
  28. <view v-for="(item,index) in orderList" :key="item.id" class="order-item">
  29. <view class="order-item-top">
  30. <view class="order-id">{{ item.id }}</view>
  31. <view class="time">{{ item.createTime }}</view>
  32. </view>
  33. <div class="order-item-main">
  34. <div class="title">付款金额</div>
  35. <view class="money-detail">
  36. <view class="unie"></view>
  37. <view class="number">{{ item.price }}</view>
  38. </view>
  39. </div>
  40. </view>
  41. </view>
  42. <view v-if="false" class="no-data">
  43. <image src="@/static/empty/noData.png" mode=""></image>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. import {
  52. mapState
  53. } from 'vuex'
  54. export default {
  55. name: 'Center',
  56. computed: {
  57. ...mapState(['userInfo']),
  58. },
  59. data() {
  60. return {
  61. queryParams: {
  62. pageNo: 1,
  63. pageSize: 10
  64. },
  65. orderList: []
  66. }
  67. },
  68. onShow() {
  69. if (uni.getStorageSync('token')) {
  70. this.$store.commit('getUserInfo')
  71. }
  72. this.getOrderList()
  73. },
  74. //滚动到屏幕底部
  75. onReachBottom() {
  76. this.queryParams.pageSize += 10
  77. this.getOrderList()
  78. },
  79. methods: {
  80. //获取订单列表
  81. getOrderList() {
  82. this.$api('getOrderWaterPage', this.queryParams, res => {
  83. this.orderList = res.result.records
  84. })
  85. },
  86. }
  87. }
  88. </script>
  89. <style scoped>
  90. .content {
  91. background: #F1F5F8;
  92. min-height: 100vh;
  93. }
  94. /* 弧形背景 */
  95. .topBox {
  96. width: 100%;
  97. position: relative;
  98. z-index: 1;
  99. overflow: hidden;
  100. padding: 60rpx 20rpx 20rpx;
  101. box-sizing: border-box;
  102. }
  103. .topBox::after {
  104. content: "";
  105. width: 140%;
  106. height: 100px;
  107. position: absolute;
  108. left: -20%;
  109. top: 0;
  110. z-index: -1;
  111. border-radius: 0 0 30% 50%;
  112. background: #00aaff;
  113. }
  114. .txt {
  115. color: #fff;
  116. font-size: 30rpx;
  117. }
  118. .set-right .uni-icons {
  119. margin-right: 10rpx;
  120. }
  121. .users {
  122. display: flex;
  123. align-items: center;
  124. margin-top: 0rpx;
  125. padding: 0rpx 30rpx;
  126. box-sizing: border-box;
  127. height: 200rpx;
  128. background-color: #fff;
  129. box-shadow: 1px 10rpx 20rpx #ececec;
  130. border-radius: 12rpx;
  131. }
  132. .u-top {
  133. display: flex;
  134. justify-content: flex-start;
  135. align-items: center;
  136. }
  137. .users .u-top .img {
  138. width: 130rpx;
  139. height: 130rpx;
  140. border-radius: 50%;
  141. margin-right: 20rpx;
  142. }
  143. .u-top .tit {
  144. font-size: 30rpx;
  145. font-weight: 700;
  146. color: #333;
  147. }
  148. .u-item {
  149. text-align: center;
  150. }
  151. .u-item .u-tit {
  152. color: #757575;
  153. font-size: 26rpx;
  154. margin-top: 10rpx;
  155. }
  156. .u-item .num {
  157. color: #000000;
  158. font-size: 33rpx;
  159. font-weight: 700;
  160. }
  161. .bottomBox {
  162. padding: 20rpx;
  163. box-sizing: border-box;
  164. }
  165. .order-list {
  166. padding-top: 20rpx;
  167. }
  168. .order-item {
  169. width: 100%;
  170. background: white;
  171. border-radius: 20rpx;
  172. margin-bottom: 20rpx;
  173. }
  174. .order-item .order-item-top {
  175. display: flex;
  176. align-items: center;
  177. justify-content: space-between;
  178. height: 80rpx;
  179. font-size: 24rpx;
  180. box-sizing: border-box;
  181. padding: 0rpx 20rpx;
  182. }
  183. .order-item .order-item-main {
  184. padding: 60rpx 0rpx;
  185. display: flex;
  186. flex-direction: column;
  187. align-items: center;
  188. }
  189. .order-item-main .title {
  190. color: #5a5a5a;
  191. }
  192. .order-item-main .money-detail {
  193. display: flex;
  194. align-items: center;
  195. margin-top: 20rpx;
  196. }
  197. .money-detail .unit {
  198. font-size: 34rpx;
  199. }
  200. .money-detail .number {
  201. font-size: 60rpx;
  202. }
  203. .no-data {
  204. padding: 30rpx;
  205. box-sizing: border-box;
  206. background-color: #fff;
  207. display: flex;
  208. justify-content: space-around;
  209. align-items: center;
  210. }
  211. .listBox {
  212. margin: -10rpx auto 0;
  213. padding: 20rpx;
  214. box-sizing: border-box;
  215. border-radius: 20rpx;
  216. }
  217. </style>