search-order.vue 27 KB

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