search-order.vue 26 KB

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