search-order.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107
  1. <template>
  2. <view class="search-container">
  3. <view class="search-main">
  4. <view class="search">
  5. <view class="search-input">
  6. <text class="iconfont icon-iconfonticonfontsousuo1"></text>
  7. <input
  8. maxlength="20"
  9. focus
  10. type="text"
  11. value=""
  12. confirm-type="search"
  13. @focus="onFocus"
  14. @input="onShowClose"
  15. @confirm="subMitSearch()"
  16. placeholder="请输入商品关键词"
  17. v-model.trim="listQuery.searchWord"
  18. />
  19. <text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
  20. </view>
  21. <view class="search-btn" @click="subMitSearch">搜索</view>
  22. </view>
  23. </view>
  24. <view class="search-container-history" v-if="!isShowWrapper">
  25. <view :class="'s-' + themeClass" v-if="serachRecordList.length > 0">
  26. <view class="header">
  27. 搜索历史 <text class="iconfont icon-shanchu" @click="confirmDetele"></text>
  28. </view>
  29. <view class="list">
  30. <view
  31. v-for="(item, index) in serachRecordList"
  32. :key="index"
  33. @click="keywordsClick(item.searchWord)"
  34. >{{ item.searchWord }}</view
  35. >
  36. </view>
  37. </view>
  38. </view>
  39. <view
  40. class=" order-container"
  41. v-if="isShowWrapper"
  42. :style="{ overflow: 'auto', height: showSkeleton ? windowHeight + 'px' : 'auto' }"
  43. >
  44. <scroll-view
  45. class="tui-skeleton"
  46. :style="{ height: scrollHeight + 'px' }"
  47. @scrolltolower="scrolltolower"
  48. scroll-y
  49. >
  50. <view :class="{ 'tui-order-list': scrollTop >= 0 }" class="tui-skeleton clearfix">
  51. <!-- 空白页 -->
  52. <empty v-if="isShowEmpty" :navbarHeight="navbarHeight"></empty>
  53. <!-- 列表 -->
  54. <view v-else class="tui-order-content">
  55. <view
  56. class="tui-order-item"
  57. v-for="(order, orderIndex) in orderList"
  58. :key="orderIndex"
  59. @click.stop="detail(order.shopOrderId)"
  60. >
  61. <view class="order-title">
  62. <view class="order-title-t">
  63. <text
  64. class="bage buss tui-skeleton-fillet"
  65. v-if="order.orderSubmitType == 3 || order.orderSubmitType == 4"
  66. >协销</text
  67. >
  68. <text
  69. class="bage auto tui-skeleton-fillet"
  70. v-if="
  71. order.orderSubmitType == 0 ||
  72. order.orderSubmitType == 1 ||
  73. order.orderSubmitType == 2
  74. "
  75. >自主</text
  76. >
  77. <view class="order-title-tip tui-skeleton-fillet">
  78. {{ order.status | statusFilters }}
  79. </view>
  80. </view>
  81. </view>
  82. <view
  83. class="goods-item"
  84. v-for="(pros, prosIndex) in order.orderProductList"
  85. :key="prosIndex"
  86. >
  87. <view class="goods-title">
  88. <view v-if="pros.shopPromotion" class="floor-item-act">
  89. <view class="floor-tags">{{ pros.shopPromotion.name }}</view>
  90. </view>
  91. <view class="title-text tui-skeleton-fillet">
  92. {{ pros.shopName }}
  93. </view>
  94. </view>
  95. <view class="goods-pros-t">
  96. <view class="pros-img tui-skeleton-fillet">
  97. <image :src="pros.image" alt="" />
  98. <text class="tips" v-if="pros.giftType == 2 || pros.giftType == 1"
  99. >赠品</text
  100. >
  101. </view>
  102. <view class="pros-product clearfix">
  103. <view class="producttitle tui-skeleton-fillet">{{ pros.name }}</view>
  104. <view
  105. class="productspec tui-skeleton-fillet"
  106. v-if="pros.productCategory != 2"
  107. >规格:{{ pros.productUnit }}</view
  108. >
  109. <view class="productprice">
  110. <view
  111. class="price tui-skeleton-fillet"
  112. :class="
  113. pros.svipPriceFlag == 1 ||
  114. PromotionsFormat(pros.productPromotion)
  115. ? 'none'
  116. : ''
  117. "
  118. >
  119. <text>¥{{ pros.price | NumFormat }}</text>
  120. </view>
  121. <view class="count tui-skeleton-fillet">
  122. <text class="small">x</text>{{ pros.num }}
  123. </view>
  124. </view>
  125. <view class="floor-item-act">
  126. <template v-if="pros.productPromotion">
  127. <view
  128. v-if="PromotionsFormat(pros.productPromotion)"
  129. class="floor-tags"
  130. @click.stop="clickPopupShow(pros.productPromotion)"
  131. >
  132. {{ pros.productPromotion.name }}
  133. <text
  134. v-if="
  135. pros.productPromotion != null &&
  136. pros.productPromotion.type != 3
  137. "
  138. >
  139. :¥{{
  140. pros.productPromotion == null
  141. ? '0.00'
  142. : pros.productPromotion.touchPrice | NumFormat
  143. }}
  144. </text>
  145. </view>
  146. <view
  147. v-else-if="pros.productPromotion.type != 3"
  148. class="floor-tags"
  149. @click.stop="clickPopupShow(pros.productPromotion)"
  150. >{{ pros.productPromotion.name }}</view
  151. >
  152. </template>
  153. <template v-if="pros.svipPriceFlag == 1">
  154. <view class="svip-tags">
  155. <view class="tags">SVIP</view>
  156. <view class="price">{{ pros.svipPriceTag }}</view>
  157. </view>
  158. </template>
  159. </view>
  160. </view>
  161. </view>
  162. </view>
  163. <view class="order-footer">
  164. <view class="order-footer-bot">
  165. <view class="count tui-skeleton-fillet">共{{ order.itemCount }}件商品</view>
  166. <view
  167. class="money tui-skeleton-fillet"
  168. v-if="order.status == 31 || order.status == 32 || order.status == 33"
  169. >
  170. 已支付:<label style="color:#f94b4b ;"
  171. >¥{{ order.receiptAmount | NumFormat }}</label
  172. >
  173. </view>
  174. <view class="money tui-skeleton-fillet" v-else>
  175. 待付总额:<label style="color:#f94b4b ;"
  176. >¥{{ order.obligation | NumFormat }}</label
  177. >
  178. </view>
  179. </view>
  180. </view>
  181. <!-- 底部button -->
  182. <cm-list-button
  183. ref="orderButton"
  184. :status="order.status"
  185. :order="order"
  186. :onlinePayFlag="order.onlinePayFlag"
  187. @buttonConfirm="handButtonConfirm"
  188. />
  189. </view>
  190. <!--加载loadding-->
  191. <tui-loadmore :visible="loadding" :index="3" type="black" />
  192. <tui-nomore :visible="!pullUpOn" :backgroundColor="'#ffffff'" :text="nomoreText" />
  193. <!--加载loadding-->
  194. </view>
  195. </view>
  196. </scroll-view>
  197. </view>
  198. <!-- 付款弹窗 -->
  199. <cm-orderpay-popup
  200. v-if="isPayModel"
  201. :payModelData="payModelData"
  202. :modelType="modelType"
  203. @cancelConfirm="hanldCancelConfirm"
  204. @paymentConfirm="hanldPaymentConfirm"
  205. />
  206. <!-- 分享弹窗 -->
  207. <cm-share-popup :shopOrderId="handleShopOrderId" v-if="isShareModal" @shareConfirm="onShareAppMessage" />
  208. <!-- 采美豆提示弹窗 -->
  209. <activityBean
  210. v-if="isActivityBean"
  211. :show="isActivityBean"
  212. :beansType="beansType"
  213. :beanNumber="beanNumber"
  214. @cancel="handleBeanlClick"
  215. />
  216. <!-- 提示弹窗 -->
  217. <tui-modal
  218. :show="modal"
  219. @click="handleClick"
  220. :content="contentModalText"
  221. :button="modalButton"
  222. color="#333"
  223. :size="32"
  224. shape="circle"
  225. :maskClosable="false"
  226. />
  227. <!-- 透明模态层 -->
  228. <modal-layer v-if="isModalLayer"/>
  229. </view>
  230. </template>
  231. <script>
  232. import empty from '@/components/empty'
  233. import modalLayer from '@/components/modal-layer'
  234. import cmListButton from './components/cm-list-button' //底部按钮
  235. import cmSharePopup from './components/cm-share-popup' //分享弹窗
  236. import cmOrderpayPopup from './components/cm-orderpay-popup' //付款弹窗
  237. import activityBean from '@/components/cm-module/activity/activityBean.vue'
  238. const defaultListQuery = {
  239. pageNum: 1, // 页码
  240. pageSize: 10, // 每页条数
  241. userId: 0, // 用户Id
  242. searchWord: '' // 搜索关键词
  243. }
  244. export default {
  245. components: {
  246. empty,
  247. modalLayer,
  248. cmListButton,
  249. cmSharePopup,
  250. cmOrderpayPopup,
  251. activityBean
  252. },
  253. data() {
  254. return {
  255. listQuery: Object.assign({}, defaultListQuery),
  256. themeClass: 'block',
  257. isShowClose: false, // 是否显示清空输入框图标
  258. isSearchHistory: false, // 是都显示搜索历史
  259. serachRecordList: [],
  260. isShowWrapper: false,
  261. isModallayer: false,
  262. isShowEmpty: false,
  263. windowHeight: '',
  264. showSkeleton: true,
  265. orderList: [],
  266. scrollTop: 0,
  267. skeletonShow: true,
  268. isPayModel:false, // 付款弹窗
  269. isShareModal: false, // 控制分享弹窗
  270. isCenceModal: false, // 控制取消订单弹窗
  271. isShowDelModal: false, // 控制删除订单弹窗
  272. isModalLayer: false,
  273. loadding: false,
  274. pullUpOn: true,
  275. hasNextPage: false,
  276. pullFlag: true,
  277. navbarHeight: '',
  278. nomoreText: '上拉显示更多',
  279. scrollHeight: '',
  280. modelType: 0,
  281. beansType: 1,
  282. beanNumber: 0,
  283. isActivityBean: false,
  284. payModelData: {},
  285. handleShopOrderId: 0, //点击按钮传入的的子订单ID
  286. handleModelEven:0,
  287. modal:false,
  288. contentModalText: '订单查询失败,请稍候重试~', //操作文字提示语句
  289. modalButton: [
  290. {
  291. text: '取消',
  292. type: 'gray',
  293. plain: true //是否空心
  294. },
  295. {
  296. text: '确定',
  297. customStyle: {
  298. color: '#fff',
  299. bgColor: 'linear-gradient(90deg, #F28F31 0%, #FF5B00 100%)'
  300. },
  301. plain: false
  302. }
  303. ]
  304. }
  305. },
  306. onLoad() {
  307. this.initGetSerachRecord()
  308. },
  309. filters: {
  310. NumFormat(value) {
  311. //处理金额
  312. return Number(value).toFixed(2)
  313. },
  314. statusFilters(value) {
  315. //处理订单状态显示
  316. const map = {
  317. 0: '待确认',
  318. 2: '交易完成',
  319. 4: '已关闭',
  320. 5: '交易全退',
  321. 6: '交易全退',
  322. 11: '待付款待发货',
  323. 12: '待付款部分发货',
  324. 13: '待付款已发货',
  325. 21: '部分付款待发货',
  326. 22: '部分付款部分发货',
  327. 23: '部分付款已发货',
  328. 31: '已付款待发货',
  329. 32: '已付款部分发货',
  330. 33: '已付款已发货'
  331. }
  332. return map[value]
  333. }
  334. },
  335. methods: {
  336. subMitSearch() {
  337. if (this.listQuery.searchWord == '') {
  338. this.$util.msg('请输入商品关键词', 2000)
  339. } else {
  340. this.getList()
  341. }
  342. },
  343. async initGetSerachRecord() {
  344. try{
  345. const userInfo = await this.$api.getStorage()
  346. this.listQuery.userId = userInfo.userId ? userInfo.userId : 0
  347. const res = await this.OrderService.SearchOrderHistory({ userId: this.listQuery.userId })
  348. this.serachRecordList = res.data
  349. if (this.serachRecordList.length > 0) {
  350. this.isSearchHistory = true
  351. } else {
  352. this.isSearchHistory = false
  353. }
  354. }catch(error){
  355. this.$util.msg(error.msg, 2000)
  356. }
  357. },
  358. //清空历史记录
  359. async confirmDetele() {
  360. try{
  361. const res = await this.OrderService.ClearOrderHistory({ userId: this.listQuery.userId })
  362. this.$util.msg(res.msg, 2000, true, 'success')
  363. this.serachRecordList = []
  364. }catch(error){
  365. this.$util.msg(error.msg, 2000)
  366. }
  367. },
  368. async getList() {
  369. try{
  370. const res = await this.OrderService.SearchOrderInfo(this.listQuery)
  371. const data = res.data
  372. if (data && data.list.length > 0) {
  373. this.orderList = data.list
  374. this.hasNextPage = data
  375. if (this.hasNextPage) {
  376. this.pullUpOn = false
  377. this.nomoreText = '上拉显示更多'
  378. } else {
  379. if (this.orderList.length < 2) {
  380. this.pullUpOn = true
  381. } else {
  382. this.pullUpOn = false
  383. this.nomoreText = '已至底部'
  384. }
  385. }
  386. this.isShowWrapper = true
  387. this.showSkeleton = true
  388. this.isShowEmpty = false
  389. } else {
  390. this.isShowEmpty = true
  391. }
  392. }catch(error){
  393. this.$util.msg(error.msg, 2000)
  394. }
  395. },
  396. async getOnReachBottomData() {
  397. //上拉加载
  398. try{
  399. this.listQuery.pageNum += 1
  400. const res = await this.OrderService.SearchOrderInfo(this.listQuery)
  401. const data = res.data
  402. this.orderList = this.orderList.concat(data.list)
  403. this.hasNextPage = data.hasNextPage
  404. this.pullFlag = false // 防上拉暴滑
  405. setTimeout(() => {
  406. this.pullFlag = true
  407. }, 500)
  408. if (this.hasNextPage) {
  409. this.pullUpOn = false
  410. this.nomoreText = '上拉显示更多'
  411. } else {
  412. this.loadding = false
  413. this.pullUpOn = false
  414. this.nomoreText = '已至底部'
  415. }
  416. }catch(error){
  417. this.$util.msg(error.msg, 2000)
  418. }
  419. },
  420. async handButtonConfirm(data) {
  421. //获取点击
  422. this.handleShopOrderId = data.shopOrderId
  423. switch (data.type) {
  424. case 'cancel'://取消订单
  425. this.modal = true
  426. this.contentModalText = '确认取消该订单吗?'
  427. this.handleModelEven = 1
  428. break
  429. case 'confirm'://确认收货
  430. this.modal = true
  431. this.contentModalText = '确认收货吗?'
  432. this.handleModelEven = 2
  433. break
  434. case 'delete'://删除订单
  435. this.modal = true
  436. this.contentModalText = '确认删除该订单吗?'
  437. this.handleModelEven = 3
  438. break
  439. case 'confirmation': // 确认订单
  440. this.modal = true
  441. this.contentModalText = '确认此订单吗?'
  442. this.handleModelEven = 4
  443. break
  444. case 'payment': //打款给供应商
  445. this.modal = true
  446. this.contentModalText = '确定委托采美平台打款给供应商吗?确定之前请务必确保货品完好!'
  447. this.handleModelEven = 5
  448. break
  449. case 'pay':
  450. this.getOrderPaymentValidation(data)
  451. break
  452. case 'query':
  453. this.isModalLayer = true
  454. this.$api.navigateTo('/pages/user/order/order-logistics?shopOrderId=' + data.shopOrderId)
  455. break
  456. case 'upload':
  457. this.$api.navigateTo('/pages/user/order/order-addpay?shopOrderId=' + data.shopOrderId)
  458. break
  459. }
  460. },
  461. handleClick(e){
  462. //确认操作
  463. if (e.index == 1) {
  464. switch(this.handleModelEven){
  465. case 1://取消订单
  466. this.cancelOrder(this.handleShopOrderId)
  467. break
  468. case 2://确认收货
  469. this.confirmReceipt(this.handleShopOrderId)
  470. break
  471. case 3://删除订单
  472. this.deleteOrder(this.handleShopOrderId)
  473. break
  474. case 4://确认订单
  475. this.affirmOrder(this.handleShopOrderId)
  476. break
  477. case 5://打款给供应商
  478. this.confirmpayment(this.handleShopOrderId)
  479. break
  480. }
  481. }
  482. this.modal = false
  483. },
  484. //取消订单
  485. async cancelOrder(shopOrderId) {
  486. try{
  487. const res = await this.OrderService.CancelOrder({ shopOrderId: shopOrderId, userIdentity : 0 })
  488. this.$util.msg(res.msg, 2000, true, 'success')
  489. setTimeout(() => {
  490. this.getList()
  491. }, 2000)
  492. }catch(error){
  493. this.$util.msg(error.msg, 2000)
  494. }
  495. },
  496. //确认收货
  497. async confirmReceipt(shopOrderId) {
  498. try{
  499. const res = await this.OrderService.ConfirmReceipt({ shopOrderId: shopOrderId })
  500. this.beansType = 7
  501. this.beanNumber = 100
  502. this.isActivityBean = true
  503. }catch(error){
  504. this.$util.msg(error.msg, 2000)
  505. }
  506. },
  507. //删除订单
  508. async deleteOrder(shopOrderId) {
  509. try{
  510. const res = await this.OrderService.DeleteOrder({ shopOrderId: shopOrderId })
  511. this.$util.msg(res.msg, 2000, true, 'success')
  512. setTimeout(() => {
  513. this.getList()
  514. }, 2000)
  515. }catch(error){
  516. this.$util.msg(error.msg, 2000)
  517. }
  518. },
  519. //确认订单
  520. async affirmOrder(shopOrderId) {
  521. try{
  522. const res = await this.OrderService.AffirmOrder({ shopOrderId: shopOrderId })
  523. this.$util.msg(res.msg, 2000, true, 'success')
  524. setTimeout(() => {
  525. this.getList()
  526. }, 2000)
  527. }catch(error){
  528. this.$util.msg(error.msg, 2000)
  529. }
  530. },
  531. //确认打款给供应商
  532. async confirmpayment(shopOrderId) {
  533. try{
  534. const res = await this.OrderService.confirmpayment({ shopOrderId: shopOrderId })
  535. this.$util.msg(res.msg, 2000, true, 'success')
  536. setTimeout(() => {
  537. this.getList()
  538. }, 2000)
  539. }catch(error){
  540. this.$util.msg(error.msg, 2000)
  541. }
  542. },
  543. //监听根据付款状态做操作
  544. async getOrderPaymentValidation(order) {
  545. try {
  546. const res = await this.OrderService.OrderPaymentValidation({ shopOrderId: order.shopOrderId })
  547. const data = res.data
  548. this.payModelData = data
  549. if (data.balanceFlag == 1) {
  550. // 0可以走余额抵扣,1不能走余额抵扣
  551. this.$api.navigateTo(`/pages/user/order/order-pay-list?shopOrderId=${order.order.shopOrderId}`)
  552. } else {
  553. switch (data.code) {
  554. case 1:
  555. this.isPayModel = true
  556. this.modelType = 1
  557. break
  558. case 2:
  559. this.isPayModel = true
  560. this.modelType = 2
  561. break
  562. case -1:
  563. this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
  564. break
  565. default:
  566. this.$api.navigateTo(`/pages/user/order/order-pay-list?shopOrderId=${order.order.shopOrderId}`)
  567. }
  568. }
  569. } catch (error) {
  570. this.$util.msg(error.msg, 2000)
  571. }
  572. },
  573. //余额抵扣跳转
  574. async hanldPaymentConfirm(order) {
  575. try {
  576. await this.OrderService.OrderBalanceDeduction({ shopOrderId: order.order.shopOrderId })
  577. if (order.type === 2) {
  578. const data = { shopOrderId: order.order.shopOrderId }
  579. this.$api.navigateTo(
  580. `/pages/user/order/success?type=deduction&data=${JSON.stringify({ data: data })}`
  581. )
  582. } else {
  583. this.$api.navigateTo(`/pages/user/order/order-pay-list?shopOrderId=${order.order.shopOrderId}`)
  584. }
  585. } catch (error) {
  586. this.$util.msg(error.msg, 2000)
  587. }
  588. },
  589. hanldCancelConfirm(data) {
  590. //不使用余额抵扣直接跳转收银台
  591. this.$api.navigateTo(`/pages/user/order/order-pay-list?shopOrderId=${data.shopOrderId}`)
  592. },
  593. detail(shopOrderId) {
  594. //订单详情跳转
  595. this.isModalLayer = true
  596. this.$api.navigateTo(`/pages/user/order/order-details?shopOrderId=${shopOrderId}`)
  597. },
  598. onShowClose() {
  599. //输入框失去焦点时触发
  600. this.inputEmpty(this.listQuery.searchWord)
  601. },
  602. onFocus() {
  603. //输入框获取焦点时触发
  604. this.inputEmpty(this.listQuery.searchWord)
  605. this.initGetSerachRecord()
  606. },
  607. inputEmpty(val) {
  608. this.isShowWrapper = false
  609. if (val != '') {
  610. this.isShowClose = true
  611. } else {
  612. this.isShowClose = false
  613. }
  614. },
  615. delInputText() {
  616. //清除输入框内容
  617. this.listQuery.searchWord = ''
  618. this.isShowClose = false
  619. this.isShowWrapper = false
  620. this.inputEmpty(this.listQuery.searchWord)
  621. this.initGetSerachRecord()
  622. },
  623. keywordsClick(item) {
  624. //关键词搜索与历史搜索
  625. this.listQuery.searchWord = item
  626. this.isShowClose = true
  627. this.subMitSearch()
  628. },
  629. onShareAppMessage(res) {
  630. //分享转发
  631. this.isShareModal = false
  632. if (res.from === 'button') {
  633. // 来自页面内转发按钮
  634. }
  635. return {
  636. title: '您有新的分享订单,快来查看吧~',
  637. path: `/pages/user/order/order-sharelogin?shopOrderId=${this.handleShopOrderId}&userId=${this.listQuery.userId}`,
  638. imageUrl: 'https://static.caimei365.com/app/img/bg/min-banner.jpg'
  639. }
  640. },
  641. scrolltolower() {
  642. if (this.hasNextPage) {
  643. this.loadding = true
  644. this.pullUpOn = true
  645. this.showSkeleton = false
  646. this.getOnReachBottomData()
  647. }
  648. },
  649. setScrollHeight() {
  650. const { windowHeight, pixelRatio } = wx.getSystemInfoSync()
  651. this.windowHeight = windowHeight - 1
  652. this.scrollHeight = windowHeight - 1
  653. },
  654. PromotionsFormat(promo) {
  655. //促销活动类型数据处理
  656. if (promo != null) {
  657. if (promo.type == 1 && promo.mode == 1) {
  658. return true
  659. } else {
  660. return false
  661. }
  662. }
  663. return false
  664. },
  665. handleBeanlClick() {
  666. //关闭采美豆弹窗
  667. this.isActivityBean = false
  668. this.getList()
  669. }
  670. },
  671. onPageScroll(e) {
  672. this.scrollTop = e.scrollTop
  673. },
  674. onShow() {
  675. this.isModalLayer = false
  676. this.setScrollHeight()
  677. }
  678. }
  679. </script>
  680. <style lang="scss">
  681. @import '@/uni.scss';
  682. page {
  683. background-color: #f7f7f7 !important;
  684. }
  685. .search {
  686. width: 702rpx;
  687. height: 70rpx;
  688. padding: 12rpx 24rpx;
  689. border-bottom: 1px solid #f0f0f0;
  690. position: fixed;
  691. top: 0;
  692. left: 0;
  693. background: #ffffff;
  694. z-index: 1001;
  695. .search-input {
  696. width: 448rpx;
  697. height: 70rpx;
  698. padding: 0 68rpx;
  699. line-height: 70rpx;
  700. border-radius: 40rpx;
  701. position: relative;
  702. background: #f0f0f0;
  703. float: left;
  704. .icon-iconfonticonfontsousuo1 {
  705. font-size: 36rpx;
  706. color: #8a8a8a;
  707. position: absolute;
  708. left: 24rpx;
  709. z-index: 10;
  710. }
  711. .icon-shanchu1 {
  712. font-size: 36rpx;
  713. color: #8a8a8a;
  714. position: absolute;
  715. right: 24rpx;
  716. top: 0;
  717. padding: 0 10rpx;
  718. z-index: 10;
  719. }
  720. input {
  721. width: 448rpx;
  722. height: 70rpx;
  723. background-color: #f0f0f0;
  724. font-size: 26rpx;
  725. }
  726. }
  727. .search-btn {
  728. width: 118rpx;
  729. height: 70rpx;
  730. line-height: 70rpx;
  731. color: $color-system;
  732. font-size: 30rpx;
  733. text-align: center;
  734. float: left;
  735. }
  736. .voice-icon {
  737. width: 36rpx;
  738. height: 36rpx;
  739. padding: 16rpx 20rpx 16rpx 0;
  740. position: absolute;
  741. left: 16rpx;
  742. top: 4rpx;
  743. z-index: 10;
  744. }
  745. }
  746. .search-container {
  747. padding-top: 106rpx;
  748. }
  749. .s-block {
  750. background: #ffffff;
  751. .header {
  752. font-size: 32rpx;
  753. padding: 40rpx 24rpx 22rpx 24rpx;
  754. line-height: 42rpx;
  755. font-size: 30rpx;
  756. font-weight: bold;
  757. position: relative;
  758. .icon-shanchu {
  759. font-size: 36rpx;
  760. color: #333333;
  761. float: right;
  762. padding: 0 10rpx;
  763. z-index: 10;
  764. font-weight: normal;
  765. }
  766. }
  767. .list {
  768. display: flex;
  769. flex-wrap: wrap;
  770. padding-bottom: 40rpx;
  771. view {
  772. color: #8a8a8a;
  773. font-size: 24rpx;
  774. box-sizing: border-box;
  775. text-align: center;
  776. height: 48rpx;
  777. line-height: 48rpx;
  778. border-radius: 24rpx;
  779. margin: 12rpx;
  780. padding: 0 30rpx;
  781. overflow: hidden;
  782. white-space: nowrap;
  783. text-overflow: ellipsis;
  784. background-color: #f3f3f3;
  785. }
  786. }
  787. }
  788. .s-circle {
  789. margin-top: 30rpx;
  790. .header {
  791. font-size: 32rpx;
  792. padding: 30rpx;
  793. border-bottom: 2rpx solid #f9f9f9;
  794. position: relative;
  795. image {
  796. width: 36rpx;
  797. height: 36rpx;
  798. padding: 10rpx;
  799. position: absolute;
  800. right: 40rpx;
  801. top: 24rpx;
  802. }
  803. }
  804. .list {
  805. display: flex;
  806. flex-wrap: wrap;
  807. padding: 0 30rpx 20rpx;
  808. view {
  809. padding: 8rpx 30rpx;
  810. margin: 20rpx 30rpx 0 0;
  811. font-size: 28rpx;
  812. color: #8a8a8a;
  813. background-color: #f7f7f7;
  814. box-sizing: border-box;
  815. text-align: center;
  816. border-radius: 20rpx;
  817. }
  818. }
  819. }
  820. .wanted-block {
  821. margin-top: 30rpx;
  822. .header {
  823. font-size: 32rpx;
  824. padding: 30rpx;
  825. }
  826. .list {
  827. display: flex;
  828. flex-wrap: wrap;
  829. view {
  830. width: 50%;
  831. color: #8a8a8a;
  832. font-size: 28rpx;
  833. box-sizing: border-box;
  834. text-align: center;
  835. padding: 20rpx 0;
  836. border-top: 2rpx solid #fff;
  837. border-left: 2rpx solid #fff;
  838. background-color: #f7f7f7;
  839. overflow: hidden;
  840. white-space: nowrap;
  841. text-overflow: ellipsis;
  842. }
  843. }
  844. }
  845. .wanted-circle {
  846. margin-top: 30rpx;
  847. .header {
  848. font-size: 32rpx;
  849. padding: 30rpx;
  850. }
  851. .list {
  852. display: flex;
  853. flex-wrap: wrap;
  854. padding: 0 30rpx 20rpx;
  855. view {
  856. padding: 8rpx 30rpx;
  857. margin: 20rpx 30rpx 0 0;
  858. font-size: 28rpx;
  859. color: #8a8a8a;
  860. background-color: #f7f7f7;
  861. box-sizing: border-box;
  862. text-align: center;
  863. border-radius: 20rpx;
  864. }
  865. }
  866. }
  867. .order-container {
  868. scroll-view {
  869. height: 100%;
  870. overflow: scroll;
  871. }
  872. }
  873. .container {
  874. padding-bottom: env(safe-area-inset-bottom);
  875. height: auto;
  876. position: relative;
  877. }
  878. .tui-order-content {
  879. width: 100%;
  880. height: auto;
  881. box-sizing: border-box;
  882. padding: 0 20rpx;
  883. }
  884. .tui-order-list {
  885. width: 100%;
  886. position: relative;
  887. }
  888. .tui-order-item {
  889. display: flex;
  890. flex-direction: column;
  891. width: 100%;
  892. padding: 0rpx 24rpx 0 24rpx;
  893. background: #fff;
  894. box-sizing: border-box;
  895. border-radius: 16rpx;
  896. overflow: hidden;
  897. margin: 20rpx 0;
  898. }
  899. .order-title {
  900. width: 100%;
  901. height: auto;
  902. .order-title-t {
  903. width: 100%;
  904. height: 68rpx;
  905. float: left;
  906. line-height: 68rpx;
  907. position: relative;
  908. display: flex;
  909. .bage-icon {
  910. width: 50rpx;
  911. height: 50rpx;
  912. display: block;
  913. position: absolute;
  914. right: 110rpx;
  915. top: 12rpx;
  916. }
  917. .bage{
  918. display: inline-block;
  919. width: 72rpx;
  920. height: 32rpx;
  921. margin: 19rpx 10rpx 0 0;
  922. border-radius: 4rpx;
  923. line-height: 32rpx;
  924. font-size: $font-size-22;
  925. text-align: center;
  926. color: #ffffff;
  927. margin-right: 12rpx;
  928. &.buss{
  929. background: rgb(223, 240, 255);
  930. color: rgb(126, 172, 213);
  931. padding: 0 6rpx;
  932. }
  933. &.auto{
  934. background: #7fba4f;
  935. color: #ffffff;
  936. }
  937. &.ebate{
  938. background: #ff7a51;
  939. }
  940. }
  941. .order-title-tip {
  942. font-size: $font-size-24;
  943. line-height: 68rpx;
  944. text-align: right;
  945. color: #ff2a2a;
  946. }
  947. }
  948. }
  949. .goods-title {
  950. width: 100%;
  951. height: 56rpx;
  952. float: left;
  953. margin-top: 10rpx;
  954. .floor-item-act {
  955. height: 56rpx;
  956. text-align: center;
  957. box-sizing: border-box;
  958. float: left;
  959. padding: 10rpx 0;
  960. margin-right: 12rpx;
  961. }
  962. .title-text {
  963. width: 400rpx;
  964. overflow: hidden;
  965. text-overflow: ellipsis;
  966. white-space: nowrap;
  967. float: left;
  968. font-size: $font-size-28;
  969. color: $text-color;
  970. text-align: left;
  971. line-height: 56rpx;
  972. font-weight: bold;
  973. }
  974. }
  975. .goods-item {
  976. width: 100%;
  977. height: auto;
  978. }
  979. .goods-pros-t {
  980. display: flex;
  981. align-items: center;
  982. width: 100%;
  983. height: 217rpx;
  984. padding: 24rpx 0;
  985. .pros-img {
  986. float: left;
  987. width: 210rpx;
  988. height: 100%;
  989. border-radius: 10rpx;
  990. margin: 0 26rpx 0 0;
  991. position: relative;
  992. .tips {
  993. display: inline-block;
  994. width: 80rpx;
  995. height: 40rpx;
  996. background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
  997. line-height: 40rpx;
  998. text-align: center;
  999. font-size: $font-size-24;
  1000. color: #ffffff;
  1001. border-radius: 10rpx 0 10rpx 0;
  1002. position: absolute;
  1003. top: 0;
  1004. left: 0;
  1005. }
  1006. image {
  1007. width: 210rpx;
  1008. height: 210rpx;
  1009. border-radius: 10rpx;
  1010. border: 1px solid #f3f3f3;
  1011. }
  1012. }
  1013. }
  1014. .pros-product {
  1015. width: 468rpx;
  1016. height: 100%;
  1017. line-height: 36rpx;
  1018. font-size: $font-size-26;
  1019. position: relative;
  1020. .producttitle {
  1021. width: 100%;
  1022. display: inline-block;
  1023. height: auto;
  1024. text-overflow: ellipsis;
  1025. display: -webkit-box;
  1026. word-break: break-all;
  1027. -webkit-box-orient: vertical;
  1028. -webkit-line-clamp: 2;
  1029. overflow: hidden;
  1030. margin-bottom: 8rpx;
  1031. }
  1032. .productspec {
  1033. height: 36rpx;
  1034. color: #999999;
  1035. }
  1036. .productprice {
  1037. height: 48rpx;
  1038. position: absolute;
  1039. width: 100%;
  1040. bottom: 0;
  1041. .price {
  1042. line-height: 48rpx;
  1043. font-size: $font-size-28;
  1044. width: 48%;
  1045. color: #ff2a2a;
  1046. float: left;
  1047. font-weight: bold;
  1048. &.none {
  1049. text-decoration: line-through;
  1050. color: #999999;
  1051. }
  1052. }
  1053. .count {
  1054. height: 100%;
  1055. float: right;
  1056. position: relative;
  1057. .small {
  1058. color: #666666;
  1059. }
  1060. }
  1061. }
  1062. .floor-item-act {
  1063. width: 100%;
  1064. height: 56rpx;
  1065. text-align: center;
  1066. box-sizing: border-box;
  1067. float: left;
  1068. padding: 0 0 10rpx 0;
  1069. }
  1070. }
  1071. .order-footer {
  1072. width: 100%;
  1073. height: 78rpx;
  1074. float: left;
  1075. .order-footer-top {
  1076. width: 100%;
  1077. height: 34rpx;
  1078. line-height: 34rpx;
  1079. font-size: $font-size-24;
  1080. color: #999999;
  1081. text-align: right;
  1082. }
  1083. .order-footer-bot {
  1084. width: 100%;
  1085. float: left;
  1086. height: 48rpx;
  1087. line-height: 48rpx;
  1088. font-size: $font-size-28;
  1089. font-weight: bold;
  1090. color: $text-color;
  1091. .count {
  1092. width: 50%;
  1093. float: left;
  1094. text-align: left;
  1095. }
  1096. .money {
  1097. width: 50%;
  1098. float: right;
  1099. text-align: right;
  1100. }
  1101. }
  1102. }
  1103. </style>