index.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  1. <template>
  2. <view>
  3. <view class="wrap">
  4. <view class="u-tabs-box">
  5. <u-tabs-swiper activeColor="#0094FE" ref="tabs" :list="list" :current="current" @change="change" :is-scroll="false"
  6. swiperWidth="750"></u-tabs-swiper>
  7. </view>
  8. <swiper class="swiper-box" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
  9. <swiper-item class="swiper-item">
  10. <scroll-view scroll-y style="height: 100%;width: 100%;">
  11. <view class="page-box">
  12. <view class="order" v-for="(res, index) in orderList" :key="res.id">
  13. <view class="order-one">
  14. </view>
  15. <text class="order-one-text">核销金额:¥100000</text>
  16. <view class="order-one-xian">
  17. </view>
  18. <view class="order-two">
  19. <view class="">
  20. 创建时间
  21. </view>
  22. <view class="">
  23. 2020-10-28 08:10:42
  24. </view>
  25. </view>
  26. <view class="order-two">
  27. <view class="">
  28. 核审时间
  29. </view>
  30. <view class="">
  31. 2020-10-28 08:10:42
  32. </view>
  33. </view>
  34. <view class="order-two">
  35. <view class="">
  36. 当前状态
  37. </view>
  38. <view class="">
  39. 2020-10-28 08:10:42
  40. </view>
  41. </view>
  42. </view>
  43. <!-- <u-loadmore :status="loadStatus[0]" bgColor="#f2f2f2"></u-loadmore> -->
  44. </view>
  45. </scroll-view>
  46. </swiper-item>
  47. <swiper-item class="swiper-item">
  48. <scroll-view scroll-y style="height: 100%;width: 100%;">
  49. <view class="page-box">
  50. <view class="order" v-for="(res, index) in orderList" :key="res.id">
  51. <view class="order-one">
  52. </view>
  53. <text class="order-one-text">核销金额:¥100000</text>
  54. <view class="order-one-xian">
  55. </view>
  56. <view class="order-two">
  57. <view class="">
  58. 创建时间
  59. </view>
  60. <view class="">
  61. 2020-10-28 08:10:42
  62. </view>
  63. </view>
  64. <view class="order-two">
  65. <view class="">
  66. 核审时间
  67. </view>
  68. <view class="">
  69. 2020-10-28 08:10:42
  70. </view>
  71. </view>
  72. <view class="order-two">
  73. <view class="">
  74. 当前状态
  75. </view>
  76. <view class="">
  77. 2020-10-28 08:10:42
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. </scroll-view>
  83. </swiper-item>
  84. <swiper-item class="swiper-item">
  85. <scroll-view scroll-y style="height: 100%;width: 100%;">
  86. <view class="page-box">
  87. <view class="order" v-for="(res, index) in orderList" :key="res.id">
  88. <view class="order-one">
  89. </view>
  90. <text class="order-one-text">核销金额:¥100000</text>
  91. <view class="order-one-xian">
  92. </view>
  93. <view class="order-two">
  94. <view class="">
  95. 创建时间
  96. </view>
  97. <view class="">
  98. 2020-10-28 08:10:42
  99. </view>
  100. </view>
  101. <view class="order-two">
  102. <view class="">
  103. 核审时间
  104. </view>
  105. <view class="">
  106. 2020-10-28 08:10:42
  107. </view>
  108. </view>
  109. <view class="order-two">
  110. <view class="">
  111. 当前状态
  112. </view>
  113. <view class="">
  114. 2020-10-28 08:10:42
  115. </view>
  116. </view>
  117. </view>
  118. </view>
  119. </scroll-view>
  120. </swiper-item>
  121. </swiper>
  122. </view>
  123. </view>
  124. </template>
  125. <script>
  126. export default {
  127. data() {
  128. return {
  129. orderList: [
  130. [
  131. ],
  132. [],
  133. []
  134. ],
  135. list: [{
  136. name: '待付款'
  137. },
  138. {
  139. name: '待发货'
  140. },
  141. {
  142. name: '待收货'
  143. },
  144. ],
  145. current: 0,
  146. swiperCurrent: 0,
  147. tabsHeight: 0,
  148. dx: 0,
  149. loadStatus: ['loadmore', 'loadmore', 'loadmore', 'loadmore'],
  150. };
  151. },
  152. onLoad() {
  153. // this.getOrderList(0);
  154. // this.getOrderList(1);
  155. // this.getOrderList(3);
  156. },
  157. computed: {
  158. // 价格小数
  159. priceDecimal() {
  160. return val => {
  161. if (val !== parseInt(val)) return val.slice(-2);
  162. else return '00';
  163. };
  164. },
  165. // 价格整数
  166. priceInt() {
  167. return val => {
  168. if (val !== parseInt(val)) return val.split('.')[0];
  169. else return val;
  170. };
  171. }
  172. },
  173. methods: {
  174. // tab栏切换
  175. change(index) {
  176. this.swiperCurrent = index;
  177. },
  178. transition({
  179. detail: {
  180. dx
  181. }
  182. }) {
  183. this.$refs.tabs.setDx(dx);
  184. },
  185. animationfinish({
  186. detail: {
  187. current
  188. }
  189. }) {
  190. this.$refs.tabs.setFinishCurrent(current);
  191. this.swiperCurrent = current;
  192. this.current = current;
  193. }
  194. }
  195. };
  196. </script>
  197. <style>
  198. /* #ifndef H5 */
  199. page {
  200. height: 100%;
  201. background-color: #f2f2f2;
  202. }
  203. /* #endif */
  204. </style>
  205. <style lang="scss" scoped>
  206. // 插件代码
  207. .order {
  208. width: 710rpx;
  209. background-color: #ffffff;
  210. margin: 20rpx auto;
  211. border-radius: 20rpx;
  212. box-sizing: border-box;
  213. padding: 20rpx;
  214. font-size: 28rpx;
  215. .top {
  216. display: flex;
  217. justify-content: space-between;
  218. .left {
  219. display: flex;
  220. align-items: center;
  221. .store {
  222. margin: 0 10rpx;
  223. font-size: 32rpx;
  224. font-weight: bold;
  225. }
  226. }
  227. .right {
  228. color: $u-type-warning-dark;
  229. }
  230. }
  231. .item {
  232. display: flex;
  233. margin: 20rpx 0 0;
  234. .left {
  235. margin-right: 20rpx;
  236. image {
  237. width: 200rpx;
  238. height: 200rpx;
  239. border-radius: 10rpx;
  240. }
  241. }
  242. .content {
  243. .title {
  244. font-size: 28rpx;
  245. line-height: 50rpx;
  246. }
  247. .type {
  248. margin: 10rpx 0;
  249. font-size: 24rpx;
  250. color: $u-tips-color;
  251. }
  252. .delivery-time {
  253. color: #e5d001;
  254. font-size: 24rpx;
  255. }
  256. }
  257. .right {
  258. margin-left: 10rpx;
  259. padding-top: 20rpx;
  260. text-align: right;
  261. .decimal {
  262. font-size: 24rpx;
  263. margin-top: 4rpx;
  264. }
  265. .number {
  266. color: $u-tips-color;
  267. font-size: 24rpx;
  268. }
  269. }
  270. }
  271. .total {
  272. margin-top: 20rpx;
  273. text-align: right;
  274. font-size: 24rpx;
  275. .total-price {
  276. font-size: 32rpx;
  277. }
  278. }
  279. .bottom {
  280. display: flex;
  281. margin-top: 40rpx;
  282. padding: 0 10rpx;
  283. justify-content: space-between;
  284. align-items: center;
  285. .btn {
  286. line-height: 52rpx;
  287. width: 160rpx;
  288. border-radius: 26rpx;
  289. border: 2rpx solid $u-border-color;
  290. font-size: 26rpx;
  291. text-align: center;
  292. color: $u-type-info-dark;
  293. }
  294. .evaluate {
  295. color: $u-type-warning-dark;
  296. border-color: $u-type-warning-dark;
  297. }
  298. }
  299. }
  300. .centre {
  301. text-align: center;
  302. margin: 200rpx auto;
  303. font-size: 32rpx;
  304. image {
  305. width: 164rpx;
  306. height: 164rpx;
  307. border-radius: 50%;
  308. margin-bottom: 20rpx;
  309. }
  310. .tips {
  311. font-size: 24rpx;
  312. color: #999999;
  313. margin-top: 20rpx;
  314. }
  315. .btn {
  316. margin: 80rpx auto;
  317. width: 200rpx;
  318. border-radius: 32rpx;
  319. line-height: 64rpx;
  320. color: #ffffff;
  321. font-size: 26rpx;
  322. background: linear-gradient(270deg, rgba(249, 116, 90, 1) 0%, rgba(255, 158, 1, 1) 100%);
  323. }
  324. }
  325. .wrap {
  326. display: flex;
  327. flex-direction: column;
  328. height: calc(100vh - var(--window-top));
  329. width: 100%;
  330. }
  331. .swiper-box {
  332. flex: 1;
  333. }
  334. .swiper-item {
  335. height: 100%;
  336. }
  337. // 手敲代码
  338. .order-one {
  339. width: 6rpx;
  340. height: 30rpx;
  341. margin-top: 5rpx;
  342. margin-right: 30rpx;
  343. background-color: #0292FD;
  344. float: left;
  345. }
  346. .order-two {
  347. display: flex;
  348. justify-content: space-between;
  349. margin-top: 15rpx;
  350. font-size: 24rpx;
  351. color: #6A6A6A;
  352. }
  353. // 线
  354. .order-one-xian {
  355. width: 642rpx;
  356. height: 1rpx;
  357. border-bottom: 1rpx solid #E7E8EA;
  358. margin: 0 auto;
  359. margin-top: 20rpx;
  360. margin-bottom: 30rpx;
  361. }
  362. .order-one-text {
  363. font-size: 24rpx;
  364. font-weight: bold;
  365. color: #000;
  366. }
  367. </style>