search-order.vue 27 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109
  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: 16rpx 0;
  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: #7fba4f;
  936. color: #ffffff;
  937. }
  938. &.ebate{
  939. background: #ff7a51;
  940. }
  941. }
  942. .order-title-tip {
  943. float: left;
  944. font-size: $font-size-28;
  945. line-height: 68rpx;
  946. text-align: right;
  947. color: #ff2a2a;
  948. }
  949. }
  950. }
  951. .goods-title {
  952. width: 100%;
  953. height: 56rpx;
  954. float: left;
  955. margin-top: 10rpx;
  956. .floor-item-act {
  957. height: 56rpx;
  958. text-align: center;
  959. box-sizing: border-box;
  960. float: left;
  961. padding: 10rpx 0;
  962. margin-right: 12rpx;
  963. }
  964. .title-text {
  965. width: 400rpx;
  966. overflow: hidden;
  967. text-overflow: ellipsis;
  968. white-space: nowrap;
  969. float: left;
  970. font-size: $font-size-28;
  971. color: $text-color;
  972. text-align: left;
  973. line-height: 56rpx;
  974. font-weight: bold;
  975. }
  976. }
  977. .goods-item {
  978. width: 100%;
  979. height: auto;
  980. }
  981. .goods-pros-t {
  982. display: flex;
  983. align-items: center;
  984. width: 100%;
  985. height: 217rpx;
  986. padding: 24rpx 0;
  987. .pros-img {
  988. float: left;
  989. width: 210rpx;
  990. height: 100%;
  991. border-radius: 10rpx;
  992. margin: 0 26rpx 0 0;
  993. position: relative;
  994. .tips {
  995. display: inline-block;
  996. width: 80rpx;
  997. height: 40rpx;
  998. background-image: linear-gradient(214deg, #ff4500 0%, #ff5800 53%, #ff4367 100%);
  999. line-height: 40rpx;
  1000. text-align: center;
  1001. font-size: $font-size-24;
  1002. color: #ffffff;
  1003. border-radius: 10rpx 0 10rpx 0;
  1004. position: absolute;
  1005. top: 0;
  1006. left: 0;
  1007. }
  1008. image {
  1009. width: 210rpx;
  1010. height: 210rpx;
  1011. border-radius: 10rpx;
  1012. border: 1px solid #f3f3f3;
  1013. }
  1014. }
  1015. }
  1016. .pros-product {
  1017. width: 468rpx;
  1018. height: 100%;
  1019. line-height: 36rpx;
  1020. font-size: $font-size-26;
  1021. position: relative;
  1022. .producttitle {
  1023. width: 100%;
  1024. display: inline-block;
  1025. height: auto;
  1026. text-overflow: ellipsis;
  1027. display: -webkit-box;
  1028. word-break: break-all;
  1029. -webkit-box-orient: vertical;
  1030. -webkit-line-clamp: 2;
  1031. overflow: hidden;
  1032. margin-bottom: 8rpx;
  1033. }
  1034. .productspec {
  1035. height: 36rpx;
  1036. color: #999999;
  1037. }
  1038. .productprice {
  1039. height: 48rpx;
  1040. position: absolute;
  1041. width: 100%;
  1042. bottom: 0;
  1043. .price {
  1044. line-height: 48rpx;
  1045. font-size: $font-size-28;
  1046. width: 48%;
  1047. color: #ff2a2a;
  1048. float: left;
  1049. font-weight: bold;
  1050. &.none {
  1051. text-decoration: line-through;
  1052. color: #999999;
  1053. }
  1054. }
  1055. .count {
  1056. height: 100%;
  1057. float: right;
  1058. position: relative;
  1059. .small {
  1060. color: #666666;
  1061. }
  1062. }
  1063. }
  1064. .floor-item-act {
  1065. width: 100%;
  1066. height: 56rpx;
  1067. text-align: center;
  1068. box-sizing: border-box;
  1069. float: left;
  1070. padding: 0 0 10rpx 0;
  1071. }
  1072. }
  1073. .order-footer {
  1074. width: 100%;
  1075. height: 78rpx;
  1076. float: left;
  1077. .order-footer-top {
  1078. width: 100%;
  1079. height: 34rpx;
  1080. line-height: 34rpx;
  1081. font-size: $font-size-24;
  1082. color: #999999;
  1083. text-align: right;
  1084. }
  1085. .order-footer-bot {
  1086. width: 100%;
  1087. float: left;
  1088. height: 48rpx;
  1089. line-height: 48rpx;
  1090. font-size: $font-size-28;
  1091. font-weight: bold;
  1092. color: $text-color;
  1093. .count {
  1094. width: 50%;
  1095. float: left;
  1096. text-align: left;
  1097. }
  1098. .money {
  1099. width: 50%;
  1100. float: right;
  1101. text-align: right;
  1102. }
  1103. }
  1104. }
  1105. </style>