order-list.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962
  1. <template>
  2. <view class="container" :style="{ paddingTop: navbarHeight + 82 + 'px' }">
  3. <!-- 自定义返回 -->
  4. <header-back
  5. :systeminfo="systeminfo"
  6. :navbar-data="nvabarData"
  7. :headerBtnPosi="headerBtnPosi"
  8. :isDelete="isDelete"
  9. :isUsertype="1"
  10. :screenTab="screenTab"
  11. @goSearchPath="handlSearchPath"
  12. >
  13. </header-back>
  14. <view class="order-section-top" :style="{ marginTop: navbarHeight + 'px' }">
  15. <scroll-view scroll-x scroll-with-animation class="tab-view" :scroll-left="scrollLeft">
  16. <view
  17. v-for="(item, index) in orderTabBar"
  18. :key="index"
  19. class="tab-bar-item"
  20. :class="[currentTab == index ? 'active' : '']"
  21. :data-current="index"
  22. @tap.stop="onClickTab"
  23. >
  24. <text class="tab-bar-title">{{ item.text }}</text>
  25. </view>
  26. </scroll-view>
  27. <scroll-view scroll-x scroll-with-animation class="tab-screen" :scroll-left="scrollLeft">
  28. <view
  29. v-for="(item, index) in screenTabBar"
  30. :key="index"
  31. class="tab-screen-item"
  32. :class="[screenTab == index ? 'active' : '']"
  33. :data-current="index"
  34. @tap.stop="onClickScreenTab(index)"
  35. >{{ item.text }}</view
  36. >
  37. </scroll-view>
  38. </view>
  39. <swiper
  40. class="tab-content"
  41. :current="currentTab"
  42. duration="80"
  43. @animationfinish="onChange"
  44. :style="{ height: winHeight + 'px' }"
  45. >
  46. <swiper-item v-for="(tabItem, index) in orderTabBar" :key="index">
  47. <tui-skeleton
  48. v-if="skeletonShow"
  49. backgroundColor="#fafafa"
  50. borderRadius="10rpx"
  51. :isLoading="false"
  52. :loadingType="5"
  53. ></tui-skeleton>
  54. <scroll-view
  55. scroll-y
  56. class="scoll-y tui-skeleton"
  57. @scrolltolower="scrolltolower"
  58. :style="{ height: winHeight + 'px' }"
  59. >
  60. <view :class="{ 'tui-order-list': scrollTop >= 0 }" class="tui-skeleton clearfix">
  61. <!-- 空白页 -->
  62. <empty
  63. v-if="tabItem.loaded === true && tabItem.orderList.length === 0"
  64. :typeIndex="currentTab"
  65. :navbarHeight="navbarHeight"
  66. ></empty>
  67. <!-- 列表 -->
  68. <view v-else class="tui-order-content">
  69. <view
  70. class="tui-order-item"
  71. v-for="(order, orderIndex) in tabItem.orderList"
  72. :key="orderIndex"
  73. @click.stop="detail(order)"
  74. >
  75. <view class="order-title">
  76. <view class="order-title-name">
  77. <text>{{ order.clubName ? order.clubName : '' }}</text>
  78. <view class="name" v-if="screenTab === 3"
  79. >【 {{ order.serviceName ? order.serviceName : '' }} 】</view
  80. >
  81. </view>
  82. <view class="order-title-t">
  83. <text
  84. class="bage-buss tui-skeleton-fillet"
  85. v-if="order.orderSubmitType == 3 || order.orderSubmitType == 4"
  86. >
  87. 采购员
  88. </text>
  89. <text
  90. class="bage-auto tui-skeleton-fillet"
  91. v-if="
  92. order.orderSubmitType == 0 ||
  93. order.orderSubmitType == 1 ||
  94. order.orderSubmitType == 2
  95. "
  96. >
  97. 自主
  98. </text>
  99. <text class="bage-text tui-skeleton-fillet">
  100. 订单编号:{{ order.orderNo }}({{ order.orderId }})
  101. </text>
  102. </view>
  103. <view class="order-title-b">
  104. <view class="order-title-btxt tui-skeleton-fillet">
  105. 下单时间:{{ order.orderTime }}
  106. </view>
  107. <view class="order-title-tip tui-skeleton-fillet">
  108. {{ StateExpFormat(order.status) }}
  109. </view>
  110. </view>
  111. </view>
  112. <block v-for="(shop, index) in order.shopOrderList" :key="index">
  113. <view class="goods-title">
  114. <view class="title-text tui-skeleton-fillet">{{ shop.shopName }}</view>
  115. </view>
  116. <view
  117. class="goods-item"
  118. v-for="(pros, prosIndex) in shop.orderProductList"
  119. :key="prosIndex"
  120. >
  121. <view class="goods-pros-t">
  122. <view class="pros-img tui-skeleton-fillet">
  123. <image :src="pros.image" alt="" />
  124. </view>
  125. <view class="pros-product clearfix">
  126. <view class="producttitle tui-skeleton-fillet">{{ pros.name }}</view>
  127. <view
  128. class="productspec tui-skeleton-fillet"
  129. v-if="pros.productCategory != 2"
  130. >
  131. 规格:{{ pros.productUnit ? pros.productUnit : '' }}
  132. </view>
  133. <view class="productprice">
  134. <view class="price tui-skeleton-fillet">
  135. <text>¥{{ pros.price | NumFormat }}</text>
  136. </view>
  137. <view class="count tui-skeleton-fillet">
  138. <text class="small">x</text>{{ pros.num }}
  139. </view>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. </block>
  145. <view class="order-footer">
  146. <view class="order-footer-bot">
  147. <view class="count tui-skeleton-fillet">共{{ order.productCount }}件商品</view>
  148. <view
  149. class="money tui-skeleton-fillet"
  150. v-if="order.status == 31 || order.status == 32 || order.status == 33"
  151. >
  152. 已支付:<label style="color:#f94b4b ;"
  153. >¥{{ order.receiptAmount | NumFormat }}</label
  154. >
  155. </view>
  156. <view class="money tui-skeleton-fillet" v-else
  157. >待付总额:<label style="color:#f94b4b ;">
  158. ¥{{ order.pendingPayments | NumFormat }}</label
  159. >
  160. </view>
  161. </view>
  162. </view>
  163. <!-- 底部button -->
  164. <order-button
  165. ref="orderButton"
  166. v-if="screenTab != 3"
  167. :status="order.status"
  168. :order="order"
  169. :orderId="order.orderId"
  170. :rechargeGoods="order.rechargeGoods"
  171. :userId="order.userId"
  172. :secondHandOrderFlag="order.secondHandOrderFlag"
  173. @buttonConfirm="handButtonConfirm"
  174. >
  175. </order-button>
  176. </view>
  177. <!--加载loadding-->
  178. <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
  179. <tui-nomore
  180. :visible="!pullUpOn"
  181. :backgroundColor="'#ffffff'"
  182. :text="nomoreText"
  183. ></tui-nomore>
  184. <!--加载loadding-->
  185. </view>
  186. </view>
  187. </scroll-view>
  188. </swiper-item>
  189. </swiper>
  190. <!-- 分享弹窗 -->
  191. <share-alert
  192. v-if="isShareModal"
  193. :orderId="btnoRderID"
  194. :shareType="isShareType"
  195. @shareConfirm="onShareAppMessage"
  196. >
  197. </share-alert>
  198. <!-- 透明模态层 -->
  199. <modal-layer v-if="isModalLayer"></modal-layer>
  200. </view>
  201. </template>
  202. <script>
  203. import { mapState, mapMutations } from 'vuex'
  204. import headerBack from '@/components/cm-module/headerNavbar/header-back' //自定义顶部导航
  205. import btSearch from '@/components/uni-search/bt-search.vue' //搜索
  206. import orderButton from './components/sellerOrderButton' //操作按钮
  207. import modalLayer from '@/components/modal-layer'
  208. import empty from './components/empty'
  209. import shareAlert from './components/sellerShareAlert.vue' //分享弹窗
  210. export default {
  211. components: {
  212. headerBack,
  213. empty,
  214. btSearch,
  215. orderButton,
  216. modalLayer,
  217. shareAlert
  218. },
  219. data() {
  220. return {
  221. orderTabBar: [
  222. { listType: 0, text: '全部订单', orderList: [] },
  223. { listType: 1, text: '待确认', orderList: [] },
  224. { listType: 2, text: '待付款', orderList: [] },
  225. { listType: 3, text: '待发货', orderList: [] },
  226. { listType: 4, text: '已发货', orderList: [] },
  227. { listType: 5, text: '退货/款', orderList: [] }
  228. ],
  229. screenTabBar: [
  230. { type: 0, text: '全部订单' },
  231. { type: 1, text: '自主订单' },
  232. { type: 2, text: '采购员订单' }
  233. ],
  234. headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
  235. systeminfo: this.setSysteminfo(), //获取设备信息
  236. nvabarData: {
  237. //顶部自定义导航
  238. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  239. showSearch: 1,
  240. title: ' ' // 导航栏中间的标题
  241. },
  242. CustomBar: this.CustomBar, // 顶部导航栏高度
  243. winHeight: '', //窗口高度
  244. currentTab: 0, //预设当前项的值
  245. screenTab: 0, //筛选预设当前项的值
  246. scrollLeft: 0, //tab标题的滚动条位置
  247. serviceProviderId: 0, //协销用户ID
  248. orderData: [],
  249. btnClubUserID: 0,
  250. btnoRderID: 0, //点击按钮传入的的订单ID
  251. pageNum: 1, //页数
  252. pageSize: 10, //条数
  253. groupServiceId: 0,
  254. scrollTop: 0,
  255. deteleType: '',
  256. skeletonShow: true,
  257. isClickChange: false,
  258. isShareModal: false, //控制分享弹窗
  259. isShareType: 2,
  260. isSeller: false,
  261. isModalLayer: false,
  262. loadding: false,
  263. pullUpOn: true,
  264. hasNextPage: false,
  265. pullFlag: true,
  266. navbarHeight: '',
  267. nomoreText: '上拉显示更多',
  268. userId: 0,
  269. manager: 0,
  270. rightDrawer: false //控制筛选抽屉
  271. }
  272. },
  273. onLoad(option) {
  274. let self = this
  275. if (option.type === 'detele') {
  276. self.isDelete = true
  277. }
  278. self.currentTab = option.listType
  279. self.getHeaderTopHeight() //设置自定义导航高度
  280. // 高度自适应
  281. uni.getSystemInfo({
  282. success: function(res) {
  283. let calc = res.windowHeight
  284. self.winHeight = calc - self.CustomBar - 82
  285. }
  286. })
  287. },
  288. filters: {
  289. NumFormat(value) {
  290. //处理金额
  291. return Number(value).toFixed(2)
  292. }
  293. },
  294. computed: {
  295. ...mapState(['isManage'])
  296. },
  297. methods: {
  298. async initGetStotage() {
  299. const userInfo = await this.$api.getStorage()
  300. this.userId = userInfo.userId ? userInfo.userId : 0
  301. this.manager = userInfo.manager ? userInfo.manager : 0
  302. this.getOrderDatainit(this.currentTab)
  303. },
  304. // 滚动切换标签样式
  305. onChange(e) {
  306. let index = e.target.current || e.detail.current
  307. if (this.isClickChange) {
  308. this.currentTab = index
  309. this.isClickChange = false
  310. return
  311. }
  312. this.isClickChange = false
  313. this.currentTab = index
  314. this.checkCor()
  315. this.pageNum = 1
  316. this.pullUpOn = true //切换时隐藏
  317. this.loadding = false //切换时隐藏
  318. this.nomoreText = ''
  319. this.getOrderDatainit(this.currentTab, 'tabChange')
  320. },
  321. // 点击标题切换当前页时改变样式
  322. onClickTab(e) {
  323. let tabIndex = e.target.dataset.current || e.currentTarget.dataset.current
  324. if (this.currentTab === tabIndex) {
  325. return false
  326. } else {
  327. this.isClickChange = true
  328. this.currentTab = tabIndex
  329. this.pageNum = 1
  330. this.pullUpOn = true //切换时隐藏
  331. this.loadding = false //切换时隐藏
  332. this.getOrderDatainit(this.currentTab)
  333. }
  334. },
  335. onClickScreenTab(index) {
  336. this.screenTab = index
  337. this.pageNum = 1
  338. this.pullUpOn = true //切换时隐藏
  339. this.loadding = false //切换时隐藏
  340. this.nomoreText = ''
  341. this.getOrderDatainit(this.currentTab)
  342. },
  343. //判断当前滚动超过一屏时,设置tab标题滚动条。
  344. checkCor: function() {
  345. if (this.currentTab > 3) {
  346. //这里距离按实际计算
  347. this.scrollLeft = 300
  348. } else {
  349. this.scrollLeft = 0
  350. }
  351. },
  352. getOrderDatainit(index, source) {
  353. setTimeout(() => {
  354. this.skeletonShow = false
  355. }, 1500)
  356. let orderItem = this.orderTabBar[index]
  357. let listType = orderItem.listType
  358. if (source === 'tabChange' && orderItem.loaded === true) {
  359. //tab切换只有第一次需要加载数据
  360. return
  361. }
  362. setTimeout(() => {
  363. this.$api.getStorage().then(resolve => {
  364. this.serviceProviderId = resolve.serviceProviderId
  365. this.SellerService.GetSellerOrderList({
  366. listType: index,
  367. orderSubmitType: this.screenTab,
  368. serviceProviderId: this.serviceProviderId,
  369. pageNum: 1,
  370. pageSize: this.pageSize,
  371. groupServiceId: this.groupServiceId
  372. })
  373. .then(response => {
  374. let data = response.data
  375. if (data.list && data.list.length > 0) {
  376. let orderList = data.list.filter(item => {
  377. //添加不同状态下订单的表现形式
  378. item = Object.assign(item, this.StateExpFormat(item.listType))
  379. return item
  380. })
  381. orderItem.orderList = []
  382. orderList.forEach(item => {
  383. orderItem.orderList.push(item)
  384. })
  385. //loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
  386. this.$set(orderItem, 'loaded', true)
  387. this.hasNextPage = data.hasNextPage
  388. if (this.hasNextPage) {
  389. this.pullUpOn = false
  390. this.nomoreText = '上拉显示更多'
  391. } else {
  392. if (orderItem.orderList.length < 2) {
  393. this.pullUpOn = true
  394. } else {
  395. this.pullUpOn = false
  396. this.nomoreText = '已至底部'
  397. }
  398. }
  399. } else {
  400. orderItem.orderList = []
  401. }
  402. })
  403. .catch(error => {
  404. this.$util.msg(error.msg, 2000)
  405. })
  406. })
  407. }, 600)
  408. },
  409. getOnReachBottomData(index) {
  410. //上拉加载
  411. this.SellerService.GetSellerOrderList({
  412. listType: index,
  413. orderSubmitType: this.screenTab,
  414. serviceProviderId: this.serviceProviderId,
  415. pageNum: (this.pageNum += 1),
  416. pageSize: this.pageSize,
  417. groupServiceId: this.groupServiceId
  418. })
  419. .then(response => {
  420. let orderItem = this.orderTabBar[index]
  421. let data = response.data
  422. this.hasNextPage = data.hasNextPage
  423. orderItem.orderList = orderItem.orderList.concat(data.list)
  424. this.pullFlag = false // 防上拉暴滑
  425. setTimeout(() => {
  426. this.pullFlag = true
  427. }, 500)
  428. if (this.hasNextPage) {
  429. this.pullUpOn = false
  430. this.nomoreText = '上拉显示更多'
  431. } else {
  432. this.loadding = false
  433. this.pullUpOn = false
  434. this.nomoreText = '已至底部'
  435. }
  436. })
  437. .catch(error => {
  438. this.$util.msg(error.msg, 2000)
  439. })
  440. },
  441. scrolltolower() {
  442. if (this.hasNextPage) {
  443. this.loadding = true
  444. this.pullUpOn = true
  445. this.getOnReachBottomData(this.currentTab)
  446. }
  447. },
  448. detail(order) {
  449. //订单详情跳转
  450. this.isModalLayer = true
  451. if (this.screenTab === 3) {
  452. this.$api.navigateTo(
  453. `/pages/seller/order/order-club-details?listType=${this.currentTab}&orderId=${
  454. order.orderId
  455. }&userId=${order.userId}`
  456. )
  457. } else {
  458. this.$api.navigateTo(
  459. `/pages/seller/order/order-details?listType=${this.currentTab}&orderId=${order.orderId}&userId=${
  460. order.userId
  461. }`
  462. )
  463. }
  464. },
  465. handButtonConfirm(data) {
  466. //获取点击
  467. this.handShowAlert(data)
  468. this.btnoRderID = data.orderId
  469. },
  470. handShowAlert(data) {
  471. //执行
  472. console.log(data)
  473. switch (data.type) {
  474. case 'query':
  475. this.isModalLayer = true
  476. this.$api.navigateTo('/pages/user/order/order-logistics?orderId=' + data.orderId)
  477. break
  478. case 'delete':
  479. this.handOrderDetele(data.orderId)
  480. break
  481. case 'cancel':
  482. this.handCenceConfirm(data.orderId)
  483. break
  484. case 'confirm':
  485. this.handOrderConfirm(data.orderId)
  486. break
  487. }
  488. },
  489. handOrderConfirm(orderId) {
  490. //确认订单
  491. this.$util.modal('提示', '确认此订单?', '确定', '取消', true, () => {
  492. this.OrderService.AffirmOrder({ orderId: orderId })
  493. .then(response => {
  494. this.$util.msg(response.msg, 2000, true, 'success')
  495. setTimeout(() => {
  496. this.getOrderDatainit(this.currentTab)
  497. }, 2000)
  498. })
  499. .catch(error => {
  500. this.$util.msg(error.msg, 2000)
  501. })
  502. })
  503. },
  504. handOrderDetele(orderId) {
  505. //删除订单
  506. this.$util.modal('提示', '确认删除该订单吗?', '确定', '取消', true, () => {
  507. this.OrderService.DeleteOrder({ orderId: orderId })
  508. .then(response => {
  509. this.$util.msg(response.msg, 2000, true, 'success')
  510. setTimeout(() => {
  511. this.getOrderDatainit(this.currentTab)
  512. }, 2000)
  513. })
  514. .catch(error => {
  515. this.$util.msg(error.msg, 2000)
  516. })
  517. })
  518. },
  519. handCenceConfirm(orderId) {
  520. //取消订单
  521. this.$util.modal('提示', '确认取消该订单吗?', '确定', '取消', true, () => {
  522. this.OrderService.CancelOrder({ orderId: orderId, userIdentity: 1 })
  523. .then(response => {
  524. this.$util.msg(response.msg, 2000, true, 'success')
  525. setTimeout(() => {
  526. this.getOrderDatainit(this.currentTab)
  527. }, 2000)
  528. })
  529. .catch(error => {
  530. this.$util.msg(error.msg, 2000)
  531. })
  532. })
  533. },
  534. handSearchConfirmData(data) {
  535. //确定筛选
  536. this.groupServiceId = data.serviceProviderId
  537. this.getOrderDatainit(this.currentTab)
  538. },
  539. handlSearchPath() {
  540. this.$api.navigateTo('/pages/seller/order/order-search')
  541. },
  542. onShareAppMessage(res) {
  543. //分享转发
  544. this.isShareModal = false
  545. if (res.from === 'button') {
  546. // 来自页面内转发按钮
  547. // console.log(res.target)
  548. }
  549. return {
  550. title: '您有新的订单,请点击查看~',
  551. path: `/pages/user/order/order-sharelogin?orderId=${this.btnoRderID}&userId=${
  552. this.btnClubUserID
  553. }&serviceProviderId=${this.serviceProviderId}`,
  554. imageUrl: 'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
  555. }
  556. },
  557. PromotionsFormat(promo) {
  558. //促销活动类型数据处理
  559. if (promo != null) {
  560. if (promo.type == 1 && promo.mode == 1) {
  561. return true
  562. } else {
  563. return false
  564. }
  565. }
  566. return false
  567. },
  568. //订单状态文字和颜色
  569. StateExpFormat(state) {
  570. let stateText = '',
  571. stateTextObject = {
  572. 0: '待确认',
  573. 4: '交易完成',
  574. 5: '订单完成',
  575. 6: '已关闭',
  576. 7: '交易全退',
  577. 77: '交易全退',
  578. 11: '待付款待发货',
  579. 12: '待付款部分发货',
  580. 13: '待付款已发货',
  581. 21: '部分付款待发货',
  582. 22: '部分付款部分发货',
  583. 23: '部分付款已发货',
  584. 31: '已付款待发货',
  585. 32: '已付款部分发货',
  586. 33: '已付款已发货',
  587. 111: '待付款待发货'
  588. }
  589. Object.keys(stateTextObject).forEach(key => {
  590. if (key == state) {
  591. stateText = stateTextObject[key]
  592. }
  593. })
  594. return stateText
  595. },
  596. orderPriceToFixed(n) {
  597. let price = ''
  598. price = n.toFixed(2)
  599. return price
  600. },
  601. getHeaderTopHeight() {
  602. // 状态栏高度
  603. let statusBarHeight = this.systeminfo.statusBarHeight
  604. let headerPosi = this.headerBtnPosi
  605. let btnPosi = {
  606. // 胶囊实际位置,坐标信息不是左上角原点
  607. height: headerPosi.height,
  608. width: headerPosi.width,
  609. // 胶囊top - 状态栏高度
  610. top: headerPosi.top - statusBarHeight,
  611. // 胶囊bottom - 胶囊height - 状态栏height (现胶囊bottom 为距离导航栏底部的长度)
  612. bottom: headerPosi.bottom - headerPosi.height - statusBarHeight,
  613. // 屏幕宽度 - 胶囊right
  614. right: this.systeminfo.screenWidth - headerPosi.right
  615. }
  616. this.navbarHeight = headerPosi.bottom + btnPosi.bottom // 原胶囊bottom + 现胶囊bottom
  617. },
  618. setHeaderBtnPosi() {
  619. // 获得胶囊按钮位置信息
  620. let headerBtnPosi = uni.getMenuButtonBoundingClientRect()
  621. return headerBtnPosi
  622. },
  623. setSysteminfo() {
  624. let systeminfo
  625. uni.getSystemInfo({
  626. // 获取设备信息
  627. success: res => {
  628. systeminfo = res
  629. }
  630. })
  631. return systeminfo
  632. }
  633. },
  634. onPageScroll(e) {
  635. this.scrollTop = e.scrollTop
  636. },
  637. onShow() {
  638. this.isModalLayer = false
  639. this.initGetStotage()
  640. }
  641. }
  642. </script>
  643. <style lang="scss">
  644. page {
  645. background-color: #ffffff;
  646. }
  647. /*tabbar start*/
  648. ::-webkit-scrollbar {
  649. width: 0;
  650. height: 0;
  651. color: transparent;
  652. }
  653. .order-section-top {
  654. width: 100%;
  655. position: fixed;
  656. top: 0;
  657. left: 0;
  658. z-index: 99;
  659. background: #ffffff;
  660. .tab-screen {
  661. width: 100%;
  662. box-sizing: border-box;
  663. background: #fff;
  664. white-space: nowrap;
  665. height: 80rpx;
  666. padding: 10rpx 0;
  667. border-top: 1px solid #f7f7f7;
  668. border-bottom: 1px solid #f7f7f7;
  669. overflow: hidden;
  670. .tab-screen-item {
  671. min-width: 100rpx;
  672. height: 60rpx;
  673. border-radius: 10rpx;
  674. background: #f7f7f7;
  675. margin: 0 15rpx;
  676. padding: 0 15rpx;
  677. line-height: 60rpx;
  678. font-size: $font-size-28;
  679. color: #333333;
  680. text-align: center;
  681. display: inline-block;
  682. &.active {
  683. color: $color-system;
  684. }
  685. }
  686. }
  687. }
  688. .tab-view::before {
  689. content: '';
  690. position: absolute;
  691. border-bottom: 1rpx solid #eaeef1;
  692. -webkit-transform: scaleY(0.5);
  693. transform: scaleY(0.5);
  694. bottom: 0;
  695. right: 0;
  696. left: 0;
  697. }
  698. .tab-view {
  699. width: 100%;
  700. height: 80rpx;
  701. overflow: hidden;
  702. box-sizing: border-box;
  703. background: #fff;
  704. white-space: nowrap;
  705. border-top: 1px solid #f7f7f7;
  706. }
  707. .tab-bar-item {
  708. padding: 0;
  709. height: 80rpx;
  710. min-width: 80rpx;
  711. line-height: 80rpx;
  712. margin: 0 28rpx;
  713. display: inline-block;
  714. text-align: center;
  715. box-sizing: border-box;
  716. &.active {
  717. border-bottom: 6rpx solid $color-system;
  718. }
  719. .tab-bar-title {
  720. height: 80rpx;
  721. line-height: 80rpx;
  722. font-size: $font-size-28;
  723. color: $text-color;
  724. }
  725. &.active .tab-bar-title {
  726. color: $color-system !important;
  727. }
  728. }
  729. .container {
  730. padding-bottom: env(safe-area-inset-bottom);
  731. height: auto;
  732. position: relative;
  733. }
  734. .tui-order-content {
  735. width: 100%;
  736. height: auto;
  737. }
  738. .tui-order-list {
  739. width: 100%;
  740. position: relative;
  741. }
  742. .tui-order-item {
  743. display: flex;
  744. flex-direction: column;
  745. width: 702rpx;
  746. padding: 20rpx 24rpx 0 24rpx;
  747. background: #fff;
  748. border-bottom: 20rpx solid #f7f7f7;
  749. }
  750. .order-title {
  751. width: 100%;
  752. height: auto;
  753. .order-title-name {
  754. width: 100%;
  755. height: 72rpx;
  756. border-bottom: 1px solid #f7f7f7;
  757. line-height: 72rpx;
  758. text-align: left;
  759. font-size: $font-size-28;
  760. color: #333333;
  761. .name {
  762. float: right;
  763. font-size: 26rpx;
  764. color: #999999;
  765. }
  766. }
  767. .order-title-t {
  768. width: 100%;
  769. height: 68rpx;
  770. float: left;
  771. line-height: 68rpx;
  772. position: relative;
  773. .bage-buss {
  774. display: inline-block;
  775. width: 72rpx;
  776. height: 30rpx;
  777. background: radial-gradient(circle, rgba(255, 39, 180, 1) 0%, rgba(193, 77, 245, 1) 100%);
  778. border-radius: 4rpx;
  779. line-height: 30rpx;
  780. font-size: $font-size-22;
  781. text-align: center;
  782. color: #ffffff;
  783. }
  784. .bage-auto {
  785. display: inline-block;
  786. width: 72rpx;
  787. height: 30rpx;
  788. background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
  789. border-radius: 4rpx;
  790. line-height: 30rpx;
  791. font-size: $font-size-22;
  792. text-align: center;
  793. color: #ffffff;
  794. }
  795. .bage-text {
  796. display: inline-block;
  797. font-size: $font-size-28;
  798. line-height: 68rpx;
  799. text-align: left;
  800. color: $text-color;
  801. margin-left: 10rpx;
  802. }
  803. }
  804. .order-title-b {
  805. width: 100%;
  806. height: 40rpx;
  807. float: left;
  808. margin-top: 8rpx;
  809. .order-title-btxt {
  810. float: left;
  811. font-size: $font-size-28;
  812. line-height: 40rpx;
  813. color: #999999;
  814. text-align: lef;
  815. }
  816. .order-title-tip {
  817. float: right;
  818. font-size: $font-size-28;
  819. line-height: 40rpx;
  820. text-align: right;
  821. color: #ff2a2a;
  822. }
  823. }
  824. }
  825. .goods-title {
  826. width: 100%;
  827. height: 56rpx;
  828. float: left;
  829. margin-top: 10rpx;
  830. .title-text {
  831. width: 400rpx;
  832. overflow: hidden;
  833. text-overflow: ellipsis;
  834. white-space: nowrap;
  835. float: left;
  836. font-size: $font-size-28;
  837. color: $text-color;
  838. text-align: left;
  839. line-height: 56rpx;
  840. font-weight: bold;
  841. }
  842. }
  843. .goods-item {
  844. width: 100%;
  845. height: auto;
  846. }
  847. .goods-pros-t {
  848. width: 100%;
  849. height: auto;
  850. padding: 24rpx 0;
  851. .pros-img {
  852. float: left;
  853. width: 210rpx;
  854. height: 100%;
  855. border-radius: 10rpx;
  856. margin: 0 26rpx 0 0;
  857. position: relative;
  858. .tips {
  859. display: inline-block;
  860. width: 80rpx;
  861. height: 40rpx;
  862. background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
  863. line-height: 40rpx;
  864. text-align: center;
  865. font-size: $font-size-24;
  866. color: #ffffff;
  867. border-radius: 10rpx 0 10rpx 0;
  868. position: absolute;
  869. top: 0;
  870. left: 0;
  871. }
  872. image {
  873. width: 210rpx;
  874. height: 210rpx;
  875. border-radius: 10rpx;
  876. border: 1px solid #f3f3f3;
  877. }
  878. }
  879. }
  880. .pros-product {
  881. width: 460rpx;
  882. height: 100%;
  883. line-height: 36rpx;
  884. font-size: $font-size-26;
  885. position: relative;
  886. float: left;
  887. .producttitle {
  888. width: 100%;
  889. display: inline-block;
  890. height: auto;
  891. text-overflow: ellipsis;
  892. display: -webkit-box;
  893. word-break: break-all;
  894. -webkit-box-orient: vertical;
  895. -webkit-line-clamp: 2;
  896. overflow: hidden;
  897. margin-bottom: 8rpx;
  898. }
  899. .productspec {
  900. height: 36rpx;
  901. color: #999999;
  902. text-overflow: ellipsis;
  903. display: -webkit-box;
  904. word-break: break-all;
  905. -webkit-box-orient: vertical;
  906. -webkit-line-clamp: 1;
  907. overflow: hidden;
  908. }
  909. .productprice {
  910. height: 48rpx;
  911. width: 100%;
  912. float: left;
  913. .price {
  914. line-height: 48rpx;
  915. font-size: $font-size-28;
  916. width: 48%;
  917. color: #ff2a2a;
  918. float: left;
  919. font-weight: bold;
  920. &.none {
  921. text-decoration: line-through;
  922. color: #999999;
  923. }
  924. }
  925. .count {
  926. height: 100%;
  927. float: right;
  928. position: relative;
  929. .small {
  930. color: #666666;
  931. }
  932. }
  933. }
  934. }
  935. .order-footer {
  936. width: 100%;
  937. height: 78rpx;
  938. float: left;
  939. .order-footer-bot {
  940. width: 100%;
  941. float: left;
  942. height: 48rpx;
  943. line-height: 48rpx;
  944. font-size: $font-size-28;
  945. font-weight: bold;
  946. color: $text-color;
  947. .count {
  948. width: 50%;
  949. float: left;
  950. text-align: left;
  951. }
  952. .money {
  953. width: 50%;
  954. float: right;
  955. text-align: right;
  956. }
  957. }
  958. }
  959. </style>