order.vue 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149
  1. <template>
  2. <app-layout>
  3. <view v-if="!toSearch" style="z-index: 50">
  4. <view class='status' v-if="is_mall">
  5. <view class='status-list main-between'>
  6. <view @click='tab(1)' :class="[`${status==1?'active':''}`,`left-status`]">订单</view>
  7. <view @click='tab(2)' :class="[`${status==2?'active':''}`,``]">卡券</view>
  8. <view @click='tab(3)' :class="[`${status==3?'active':''}`,`right-status`]">碎屏险</view>
  9. </view>
  10. </view>
  11. <view :class="[`search`, `${is_mall?'':'no-mall'}`]">
  12. <view @click='beSearch' class="main-center search-content cross-center">
  13. <image src="/static/image/icon/icon-search.png"></image>
  14. <text>搜索</text>
  15. </view>
  16. </view>
  17. <app-tab-nav :setTop="setTop" :placeHeight="placeHeight" setHeight="96" :tabList="tabList" padding="0"
  18. :activeItem="activeTab" @click="tabStatus"></app-tab-nav>
  19. <view v-if="_num == 2" @click="scan" class='scan'>
  20. <image src='./../image/scan.png'></image>
  21. </view>
  22. </view>
  23. <view v-if="toSearch" class="search-item main-between cross-center">
  24. <view class="search-input">
  25. <image src='/static/image/icon/icon-search.png'></image>
  26. <input v-if="status == 1 && toSearch" focus @confirm='search' confirm-type='search' v-model='keyword'
  27. placeholder-style='color:#999999;font-size:13px;' placeholder='输入订单号/商品名称/店铺名称搜索'/>
  28. <input v-if="status == 2 && toSearch" focus @confirm='search' confirm-type='search' v-model='keyword'
  29. placeholder-style='color:#999999;font-size:13px;' placeholder='输入卡券名称/用户昵称搜索'/>
  30. </view>
  31. <view @click="cancelSeacrch">取消</view>
  32. </view>
  33. <view v-if="!searchResult && toSearch" :class="[`search-history`,`${list.length == 0 ? '' : 'go-out'}`]">
  34. <view v-if="candidate.length != 0" class='main-between search-title'>
  35. <view>历史搜索</view>
  36. <view @click="clear">
  37. <image class="history-img" src="/static/image/icon/delete.png"></image>
  38. </view>
  39. </view>
  40. <view class='flex-wrap history-list'>
  41. <view @click="keywordSearch(item)" class="keyword-item box-grow-0" v-for="item in candidate"
  42. :key="item">
  43. <text class="t-omit">{{item}}</text>
  44. </view>
  45. </view>
  46. </view>
  47. <view v-if="toSearch" class="search-place"></view>
  48. <template v-if="status == 1">
  49. <view v-for="item in list" :key="item.id" class="item">
  50. <view class='main-between item-top'>
  51. <view class='shop t-omit'>
  52. <image src='./../image/shop.png'></image>
  53. <text>{{item.store.name}}</text>
  54. </view>
  55. <view class="item-status" v-if="item.clerk_id > 0">已核销</view>
  56. <view class="item-status" v-else-if="item.cancel_status == 1">已退款</view>
  57. <view class="item-status" v-else>未核销</view>
  58. </view>
  59. <view @click="toDetail(item.id)">
  60. <view class="goods" :style="{'margin-top':`${index == 0 ?'0':'12'}px`}" v-for="goods in item.detail"
  61. :key="goods.id">
  62. <image :src='goods.goods.goodsWarehouse.cover_pic'></image>
  63. <view class='goods-info'>
  64. <view class='goods-name t-omit-two'>{{goods.goods.goodsWarehouse.name}}</view>
  65. <view class="goods-attr">
  66. <text v-for="attr in goods.attr_list" :key="attr.id">
  67. {{attr.attr_group_name}}:{{attr.attr_name}}
  68. </text>
  69. </view>
  70. <view>x{{goods.num}}</view>
  71. </view>
  72. <view class='goods-price'>¥ {{goods.total_price}}</view>
  73. </view>
  74. </view>
  75. <view class='total'>合计
  76. <text>¥{{item.total_pay_price}}</text>
  77. (含运费¥{{item.express_price}})
  78. </view>
  79. <view class='dir-right-nowrap' v-if="item.clerk_id == 0 && item.cancel_status != 1">
  80. <view class="refund-text" v-if="item.refund">{{item.refund}}</view>
  81. <view v-else class="clerk-btn dir-right-nowrap" >
  82. <button @click="toClerk(item.id)">核销</button>
  83. <button v-if="item.sign=='booking'" @click="toTell(item.id)" style="width: 180upx;">完成维修</button>
  84. </view>
  85. </view>
  86. </view>
  87. </template>
  88. <template v-if="status == 2||status==3">
  89. <view v-for="item in list" :key="item.id" class="item card-item">
  90. <image class='card-img' :src='item.pic_url'></image>
  91. <view @click="toCardDetail(item.id)">
  92. <view class='t-omit-two card-name'>{{item.name}}</view>
  93. <view class="surplus-number" v-if="status == 2" >剩余{{item.number - item.use_number}}次</view>
  94. <view class='dir-left-nowrap platform cross-center'>
  95. <image class='platform-img' v-if="item.platform == 'wxapp'" src='./../image/wx.png'></image>
  96. <image class='platform-img' v-if="item.platform == 'aliapp'" src='./../image/ali.png'></image>
  97. <view>{{item.nickname}}</view>
  98. </view>
  99. </view>
  100. <view class='cross-center card-clerk'>
  101. <view v-if="item.is_use == 0 && item.receive_id == 0" class="clerk-btn dir-right-nowrap" @click="toClerkCard(item.id)">
  102. <button>核销</button>
  103. </view>
  104. <view v-else-if="item.is_use == 0 && item.receive_id > 0" class="clerk-btn-1">
  105. 已转赠
  106. </view>
  107. <image v-else class='clerked-img' src='./../image/clerked.png'></image>
  108. </view>
  109. </view>
  110. </template>
  111. <view class='no-tip' v-if="list.length == 0 && status == 1">
  112. <image :src='clerkImg.order'></image>
  113. <view>没有任何订单哦~</view>
  114. </view>
  115. <view class='no-tip' v-if="list.length == 0 && status == 2">
  116. <image :src='clerkImg.card'></image>
  117. <view>没有任何卡券哦~</view>
  118. </view>
  119. </app-layout>
  120. </template>
  121. <script>
  122. import appTabNav from "@/components/basic-component/app-tab-nav/app-tab-nav.vue";
  123. import {mapState} from "vuex";
  124. export default {
  125. name: "about",
  126. components: {
  127. "app-tab-nav": appTabNav,
  128. },
  129. data() {
  130. return {
  131. activeTab: 3,
  132. order_list: [
  133. {id: 2, name: '未核销'},
  134. {id: 1, name: '已核销'},
  135. {id: 5, name: '已退款'},
  136. {id: 3, name: '我的'},
  137. ],
  138. card_list: [
  139. {id: 2, name: '未核销'},
  140. {id: 1, name: '已核销'},
  141. {id: 3, name: '我的'},
  142. ],
  143. tabList: [],
  144. candidate: [],
  145. status: 1,
  146. placeHeight: 312,
  147. setTop: 190,
  148. more_list: false,
  149. is_mall: false,
  150. toSearch: false,
  151. searchResult: false,
  152. first: false,
  153. keyword: '',
  154. list: []
  155. };
  156. },
  157. computed: {
  158. ...mapState({
  159. clerkImg: state => state.mallConfig.__wxapp_img.clerk,
  160. mall: state => state.mallConfig.mall
  161. }),
  162. },
  163. onLoad(options) {
  164. this.status = options.status||3
  165. if (options.type > 0) {
  166. this.activeTab = options.type
  167. }
  168. this.$showLoading({
  169. type: 'global',
  170. text: '加载中...'
  171. });
  172. this.$request({
  173. url: this.$api.clerk.info
  174. }).then(response => {
  175. if (response.code == 0) {
  176. this.is_mall = response.data.is_mall;
  177. if (!response.data.is_mall) {
  178. this.placeHeight = 210;
  179. this.setTop = 88;
  180. }
  181. this.list = [];
  182. if (this.status == 1) {
  183. this.tabList = this.order_list;
  184. this.getList();
  185. uni.setNavigationBarTitle({
  186. title: "订单",
  187. })
  188. } else if (this.status == 2) {
  189. this.tabList = this.card_list;
  190. this.getCard();
  191. uni.setNavigationBarTitle({
  192. title: "卡券",
  193. })
  194. }else if(this.status == 3){
  195. this.tabList = this.card_list;
  196. this.getSp();
  197. uni.setNavigationBarTitle({
  198. title: "碎屏险",
  199. })
  200. }
  201. } else {
  202. uni.redirectTo({
  203. url: '/pages/user-center/user-center'
  204. })
  205. }
  206. })
  207. },
  208. onReachBottom: function () {
  209. if (this.more_list) {
  210. this.getMore();
  211. }
  212. },
  213. onShow(options) {
  214. let that = this;
  215. if (that.first) {
  216. that.$request({
  217. url: that.$api.clerk.info
  218. }).then(response => {
  219. if (response.code == 0) {
  220. that.is_mall = response.data.is_mall;
  221. if (!response.data.is_mall) {
  222. this.placeHeight = 112
  223. }
  224. if (that.status == 1) {
  225. that.getList();
  226. uni.setNavigationBarTitle({
  227. title: "订单",
  228. })
  229. } else if (Sp) {
  230. that.getCard();
  231. uni.setNavigationBarTitle({
  232. title: "卡券",
  233. })
  234. }else if (that.status == 3) {
  235. that.getSp();
  236. uni.setNavigationBarTitle({
  237. title: "碎屏险",
  238. })
  239. }
  240. } else {
  241. uni.redirectTo({
  242. url: '/pages/user-center/user-center'
  243. })
  244. }
  245. })
  246. }
  247. if (!that.first) {
  248. if (that.status == 1) {
  249. that.getList();
  250. } else if (that.status == 2) {
  251. that.getCard();
  252. }else if (that.status == 3) {
  253. that.getSp();
  254. }
  255. }
  256. },
  257. methods: {
  258. getMore() {
  259. let that = this;
  260. let url;
  261. let para;
  262. if (that.load) {
  263. return false
  264. }
  265. that.load = true;
  266. if (that.status == 1) {
  267. if (that.activeTab == 3) {
  268. url = that.$api.clerk.my;
  269. para = {
  270. page: that.page,
  271. }
  272. } else if (that.activeTab == 5) {
  273. url = that.$api.clerk.order;
  274. para = {
  275. status: that.activeTab,
  276. keyword_1: 8,
  277. keyword: that.keyword
  278. }
  279. } else {
  280. url = that.$api.clerk.order;
  281. para = {
  282. page: that.page,
  283. is_clerk: that.activeTab,
  284. }
  285. }
  286. } else {
  287. if (that.activeTab == 3) {
  288. url = that.$api.clerk.my_card;
  289. para = {
  290. page: that.page,
  291. }
  292. } else {
  293. url = that.$api.clerk.card;
  294. para = {
  295. page: that.page,
  296. is_clerk: that.activeTab,
  297. }
  298. }
  299. }
  300. that.$request({
  301. url: url,
  302. data: para,
  303. }).then(response => {
  304. that.$hideLoading();
  305. that.load = false;
  306. if (response.code == 0) {
  307. that.list = that.list.concat(response.data.list);
  308. that.page++;
  309. that.more_list = false;
  310. if (response.data.list.length == response.data.pagination.pageSize) {
  311. that.more_list = true;
  312. }
  313. that.list.forEach(function (row) {
  314. row.refund = null;
  315. if (row.cancel_status == 2) {
  316. row.refund = '申请取消中'
  317. } else if (row.is_pay == 0) {
  318. row.refund = '订单未支付'
  319. }
  320. })
  321. } else {
  322. uni.showToast({
  323. title: response.msg,
  324. icon: 'none',
  325. duration: 1000
  326. });
  327. }
  328. }).catch(response => {
  329. that.load = false;
  330. that.$hideLoading();
  331. });
  332. },
  333. toClerk(id) {
  334. uni.navigateTo({
  335. url: '/pages/order/clerk/clerk?id=' + id
  336. });
  337. },
  338. toClerkCard(id) {
  339. if(this.status==3){
  340. uni.navigateTo({
  341. url: '/pages/sp/clerk/clerk?cardId=' + id
  342. });
  343. return;
  344. }
  345. uni.navigateTo({
  346. url: '/pages/card/clerk/clerk?cardId=' + id
  347. });
  348. },
  349. toDetail(id) {
  350. if(this.status==3){
  351. uni.navigateTo({
  352. url: '/pages/sp/clerk/clerk?cardId=' + id
  353. });
  354. return;
  355. }
  356. uni.navigateTo({
  357. url: '/plugins/clerk/detail/detail?id=' + id
  358. });
  359. },
  360. toCardDetail(id) {
  361. if(this.status==3){
  362. uni.navigateTo({
  363. url: '/plugins/clerk/spdetail/spdetail?card_id=' + id
  364. });
  365. return;
  366. }
  367. uni.navigateTo({
  368. url: '/plugins/clerk/detail/detail?card_id=' + id
  369. });
  370. },
  371. keywordSearch(e) {
  372. this.keyword = e;
  373. this.searchResult = true;
  374. if (this.status == 1) {
  375. this.getList();
  376. } else {
  377. this.getCard();
  378. }
  379. },
  380. beSearch() {
  381. this.candidate = uni.getStorageSync('clerk_keyword');
  382. if (this.status == 2) {
  383. this.candidate = uni.getStorageSync('clerk_card_keyword');
  384. }else if(this.status==3){
  385. this.candidate = uni.getStorageSync('clerk_sp_keyword');
  386. }
  387. this.toSearch = !this.toSearch;
  388. this.list = [];
  389. this.searchResult = false;
  390. uni.setNavigationBarTitle({
  391. title: "搜索",
  392. })
  393. },
  394. cancelSeacrch() {
  395. this.toSearch = !this.toSearch;
  396. this.keyword = '';
  397. if (this.status == 1) {
  398. this.getList();
  399. uni.setNavigationBarTitle({
  400. title: "订单",
  401. })
  402. } else if(this.status == 2){
  403. this.getCard();
  404. uni.setNavigationBarTitle({
  405. title: "卡券",
  406. })
  407. }else {
  408. this.getSp();
  409. uni.setNavigationBarTitle({
  410. title: "碎屏险",
  411. })
  412. }
  413. },
  414. search() {
  415. var value = uni.getStorageSync('clerk_keyword');
  416. if (this.status == 2) {
  417. this.candidate = uni.getStorageSync('clerk_card_keyword');
  418. }else if(this.status==3){
  419. this.candidate = uni.getStorageSync('clerk_sp_keyword');
  420. }
  421. if (this.keyword.length == 0 || this.keyword.trim().length == 0) {
  422. this.keyword = ''
  423. return
  424. } else if (value.length > 0) {
  425. value.unshift(this.keyword)
  426. } else {
  427. value = [this.keyword]
  428. }
  429. value.forEach(function (row, index) {
  430. if (value[0] == value[index] && index > 0) {
  431. value.splice(index, 1)
  432. }
  433. })
  434. if (this.status == 1) {
  435. uni.setStorage({
  436. key: "clerk_keyword",
  437. data: value
  438. })
  439. this.getList();
  440. } else if(this.status == 2){
  441. uni.setStorage({
  442. key: "clerk_card_keyword",
  443. data: value
  444. })
  445. this.getCard();
  446. }else{
  447. uni.setStorage({
  448. key: "clerk_sp_keyword",
  449. data: value
  450. })
  451. this.getCard();
  452. }
  453. },
  454. // 清除搜索记录
  455. clear() {
  456. let that = this;
  457. if(this.status==1){
  458. uni.removeStorage({
  459. key: 'clerk_keyword',
  460. success(res) {
  461. that.candidate = [];
  462. uni.showToast({
  463. title: '清理成功',
  464. duration: 1000,
  465. type: 'success',
  466. mask: false
  467. });
  468. }
  469. });
  470. }
  471. else if(this.status==2){
  472. uni.removeStorage({
  473. key: 'clerk_card_keyword',
  474. success(res) {
  475. that.candidate = [];
  476. uni.showToast({
  477. title: '清理成功',
  478. duration: 1000,
  479. type: 'success',
  480. mask: false
  481. });
  482. }
  483. });
  484. }else {
  485. uni.removeStorage({
  486. key: 'clerk_sp_keyword',
  487. success(res) {
  488. that.candidate = [];
  489. uni.showToast({
  490. title: '清理成功',
  491. duration: 1000,
  492. type: 'success',
  493. mask: false
  494. });
  495. }
  496. });
  497. }
  498. },
  499. tabStatus(e) {
  500. let that = this;
  501. if (that.load) {
  502. return false
  503. }
  504. uni.showLoading({
  505. title: '加载中...'
  506. });
  507. that.list = [];
  508. that.page = 2;
  509. that.activeTab = e.currentTarget.dataset.id;
  510. if (this.status == 1) {
  511. this.getList();
  512. } else if(this.status==2){
  513. this.getCard();
  514. }else if(this.status==3){
  515. this.getSp();
  516. }
  517. },
  518. tab(e) {
  519. let that = this;
  520. if (that.load) {
  521. return false
  522. }
  523. uni.showLoading({
  524. title: '加载中...'
  525. });
  526. that.list = [];
  527. that.page = 2;
  528. that.activeTab = 2;
  529. that.status = e;
  530. if (e == 1) {
  531. this.tabList = this.order_list;
  532. this.getList();
  533. } else if(e==2){
  534. this.tabList = this.card_list;
  535. this.getCard();
  536. }else {
  537. this.tabList = this.card_list;
  538. this.getSp();
  539. }
  540. },
  541. toTell(id){
  542. let that=this;
  543. that.$request({
  544. url: that.$api.order.order_tell,
  545. data:{
  546. id:id
  547. },
  548. }).then(response => {
  549. uni.hideLoading();
  550. that.$hideLoading();
  551. that.load = false;
  552. if (response.code == 0) {
  553. that.getList()
  554. } else {
  555. uni.showToast({
  556. title: response.msg,
  557. icon: 'none',
  558. duration: 1000
  559. });
  560. }
  561. }).catch(response => {
  562. that.load = false;
  563. uni.hideLoading();
  564. that.$hideLoading();
  565. });
  566. },
  567. getList() {
  568. let that = this;
  569. let url;
  570. let para;
  571. if (that.load) {
  572. return false
  573. }
  574. that.load = true;
  575. if (this.activeTab == 3) {
  576. url = that.$api.clerk.my;
  577. para = {
  578. keyword_1: 8,
  579. keyword: this.keyword
  580. }
  581. } else if (this.activeTab == 5) {
  582. url = that.$api.clerk.order;
  583. para = {
  584. status: this.activeTab,
  585. keyword_1: 8,
  586. keyword: this.keyword
  587. }
  588. } else {
  589. url = that.$api.clerk.order;
  590. para = {
  591. is_clerk: this.activeTab,
  592. keyword_1: 8,
  593. keyword: this.keyword
  594. }
  595. }
  596. that.$request({
  597. url: url,
  598. data: para,
  599. }).then(response => {
  600. uni.hideLoading();
  601. that.$hideLoading();
  602. that.load = false;
  603. if (response.code == 0) {
  604. that.first = true;
  605. that.list = response.data.list;
  606. that.page = 2;
  607. that.searchResult = true;
  608. that.more_list = false;
  609. if (response.data.list.length == response.data.pagination.pageSize) {
  610. that.more_list = true;
  611. }
  612. that.list.forEach(function (row) {
  613. row.refund = null;
  614. if (row.cancel_status == 2) {
  615. row.refund = '申请退款中'
  616. } else if (row.is_pay == 0) {
  617. row.refund = '订单未支付'
  618. }
  619. })
  620. } else {
  621. uni.showToast({
  622. title: response.msg,
  623. icon: 'none',
  624. duration: 1000
  625. });
  626. }
  627. }).catch(response => {
  628. that.load = false;
  629. uni.hideLoading();
  630. that.$hideLoading();
  631. });
  632. },
  633. getCard() {
  634. let that = this;
  635. let url;
  636. let para;
  637. if (that.load) {
  638. return false
  639. }
  640. that.load = true;
  641. if (this.activeTab == 3) {
  642. url = that.$api.clerk.my_card;
  643. para = {
  644. keyword: this.keyword
  645. }
  646. } else {
  647. url = that.$api.clerk.card;
  648. para = {
  649. is_clerk: this.activeTab,
  650. keyword: this.keyword
  651. }
  652. }
  653. that.$request({
  654. url: url,
  655. data: para,
  656. }).then(response => {
  657. that.load = false;
  658. uni.hideLoading();
  659. that.$hideLoading();
  660. if (response.code == 0) {
  661. that.list = response.data.list;
  662. that.page = 2;
  663. that.searchResult = true;
  664. that.more_list = false;
  665. if (response.data.list.length == response.data.pagination.pageSize) {
  666. that.more_list = true;
  667. }
  668. } else {
  669. uni.showToast({
  670. title: response.msg,
  671. icon: 'none',
  672. duration: 1000
  673. });
  674. }
  675. }).catch(response => {
  676. that.load = false;
  677. uni.hideLoading();
  678. that.$hideLoading();
  679. });
  680. },
  681. getSp() {
  682. let that = this;
  683. let url;
  684. let para;
  685. if (that.load) {
  686. return false
  687. }
  688. that.load = true;
  689. if (this.activeTab == 3) {
  690. url = that.$api.clerk.my_sp;
  691. para = {
  692. keyword: this.keyword
  693. }
  694. } else {
  695. url = that.$api.clerk.sp;
  696. para = {
  697. is_clerk: this.activeTab,
  698. keyword: this.keyword
  699. }
  700. }
  701. that.$request({
  702. url: url,
  703. data: para,
  704. }).then(response => {
  705. that.load = false;
  706. uni.hideLoading();
  707. that.$hideLoading();
  708. if (response.code == 0) {
  709. that.list = response.data.list;
  710. that.page = 2;
  711. that.searchResult = true;
  712. that.more_list = false;
  713. if (response.data.list.length == response.data.pagination.pageSize) {
  714. that.more_list = true;
  715. }
  716. } else {
  717. uni.showToast({
  718. title: response.msg,
  719. icon: 'none',
  720. duration: 1000
  721. });
  722. }
  723. }).catch(response => {
  724. that.load = false;
  725. uni.hideLoading();
  726. that.$hideLoading();
  727. });
  728. },
  729. }
  730. }
  731. </script>
  732. <style scoped lang="scss">
  733. .search {
  734. height: #{88rpx};
  735. padding: #{16rpx} #{26rpx};
  736. background-color: #efeff4;
  737. position: fixed;
  738. top: #{104rpx};
  739. left: 0;
  740. right: 0;
  741. z-index: 10;
  742. }
  743. .search-place {
  744. height: #{120rpx};
  745. width: 100%;
  746. }
  747. .search.no-mall {
  748. top: 0;
  749. }
  750. .search-content {
  751. background-color: #fff;
  752. height: #{56rpx};
  753. border-radius: #{28rpx};
  754. }
  755. .search-content image {
  756. height: #{24rpx};
  757. width: #{24rpx};
  758. }
  759. .search-content text {
  760. color: #b2b2b2;
  761. font-size: #{24rpx};
  762. margin: 0 #{5rpx};
  763. }
  764. .tab-list {
  765. height: #{96rpx};
  766. position: fixed;
  767. top: #{192rpx};
  768. left: 0;
  769. right: 0;
  770. z-index: 10;
  771. width: 100%;
  772. background-color: #fff;
  773. border-bottom: #{1rpx} solid #e2e2e2;
  774. }
  775. .tab-list.no-mall {
  776. top: #{88rpx};
  777. }
  778. .tab-item {
  779. text-align: center;
  780. font-size: #{28rpx};
  781. color: #666;
  782. }
  783. .tab-item text {
  784. height: #{92rpx};
  785. line-height: #{92rpx};
  786. display: inline-block;
  787. }
  788. .tab-item text.active {
  789. border-bottom: #{4rpx} solid #ff4544;
  790. color: #ff4544;
  791. }
  792. .status {
  793. width: 100%;
  794. height: #{104rpx};
  795. background-color: #fff;
  796. position: fixed;
  797. top: 0;
  798. left: 0;
  799. right: 0;
  800. z-index: 10;
  801. }
  802. .status-list {
  803. width: #{368rpx};
  804. height: #{56rpx};
  805. margin: #{24rpx} auto;
  806. border-radius: #{28rpx};
  807. line-height: #{54rpx};
  808. font-size: #{24rpx};
  809. color: #666666;
  810. background-color: #fff;
  811. }
  812. .status-list view {
  813. width: 50%;
  814. text-align: center;
  815. border: #{2rpx} solid #ff4544;
  816. }
  817. .status-list .active {
  818. background-color: #ff4544;
  819. height: #{56rpx};
  820. color: #ffffff;
  821. }
  822. .item {
  823. width: #{702rpx};
  824. margin: 0 #{24rpx} #{24rpx};
  825. background-color: #fff;
  826. border-radius: #{16rpx};
  827. padding: #{24rpx};
  828. position: relative;
  829. }
  830. .item.card-item {
  831. padding: #{40rpx} #{160rpx} #{40rpx} #{132rpx};
  832. }
  833. .shop {
  834. font-size: #{24rpx};
  835. color: #353535;
  836. max-width: #{500rpx};
  837. }
  838. .shop image {
  839. height: #{24rpx};
  840. width: #{24rpx};
  841. margin-right: #{12rpx};
  842. }
  843. .goods {
  844. height: #{160rpx};
  845. position: relative;
  846. }
  847. .goods image {
  848. height: #{160rpx};
  849. width: #{160rpx};
  850. border-radius: #{10rpx};
  851. float: left;
  852. margin-right: #{20rpx};
  853. }
  854. .goods-info {
  855. font-size: #{24rpx};
  856. color: #999999;
  857. }
  858. .goods-name {
  859. color: #353535;
  860. height: #{72rpx};
  861. }
  862. .goods-price {
  863. color: #353535;
  864. font-size: #{24rpx};
  865. position: absolute;
  866. bottom: 0;
  867. right: 0;
  868. }
  869. .total {
  870. font-size: #{24rpx};
  871. margin-top: #{28rpx};
  872. color: #999999;
  873. text-align: right;
  874. }
  875. .total text {
  876. color: #353535;
  877. font-size: #{28rpx};
  878. }
  879. .clerk-btn button {
  880. width: #{138rpx};
  881. text-align: center;
  882. height: #{48rpx} !important;
  883. border-radius: #{24rpx};
  884. border: #{1rpx} solid #ff4544;
  885. line-height: #{46rpx};
  886. margin-top: #{28rpx};
  887. font-size: #{24rpx};
  888. color: #ff4544;
  889. background-color: #fff;
  890. }
  891. .card-clerk .clerk-btn button {
  892. margin-top: 0;
  893. }
  894. .clerk-btn button::after {
  895. border: 0;
  896. }
  897. .clerk-btn-1 {
  898. width: #{138rpx};
  899. padding: #{8rpx 0};
  900. text-align: center;
  901. color: #ff4544;
  902. background-color: #ffecec;
  903. font-size: $uni-font-size-weak-one;
  904. }
  905. .search-item {
  906. height: #{96rpx};
  907. background-color: #efeff4;
  908. padding: 0 #{24rpx};
  909. font-size: #{28rpx};
  910. color: #00c203;
  911. width: 100%;
  912. position: fixed;
  913. top: 0;
  914. left: 0;
  915. z-index: 22;
  916. }
  917. .search-input {
  918. height: #{64rpx};
  919. position: relative;
  920. width: #{620rpx};
  921. }
  922. .search-input image {
  923. height: #{22rpx};
  924. width: #{22rpx};
  925. position: absolute;
  926. top: #{21rpx};
  927. left: #{28rpx};
  928. z-index: 10;
  929. }
  930. .search-input input {
  931. padding-left: #{62rpx};
  932. background-color: #fff;
  933. border-radius: #{32rpx};
  934. height: #{64rpx};
  935. font-size: #{26rpx};
  936. color: #353535;
  937. }
  938. .search-history {
  939. position: fixed;
  940. top: 0;
  941. left: 0;
  942. right: 0;
  943. height: 100%;
  944. background-color: #fff;
  945. padding: #{120rpx} #{4rpx} #{24rpx};
  946. font-size: #{28rpx};
  947. color: #666;
  948. z-index: 20;
  949. }
  950. .search-title {
  951. padding: 0 #{20rpx};
  952. margin-bottom: #{24rpx};
  953. }
  954. .keyword-item {
  955. height: #{64rpx};
  956. line-height: #{64rpx};
  957. padding: 0 #{20rpx};
  958. background-color: #f7f7f7;
  959. color: #333;
  960. border-radius: #{32rpx};
  961. font-size: #{28rpx};
  962. margin-left: #{20rpx};
  963. margin-bottom: #{20rpx};
  964. max-width: 90%;
  965. }
  966. .scan {
  967. position: fixed;
  968. bottom: #{80rpx};
  969. right: 0;
  970. z-index: 30;
  971. height: #{116rpx};
  972. width: #{112rpx};
  973. }
  974. .scan button {
  975. height: #{116rpx} !important;
  976. width: #{112rpx};
  977. border-top-left-radius: #{58rpx};
  978. border-bottom-left-radius: #{58rpx};
  979. border: #{1rpx} solid #cdcdcd;
  980. border-right: 0;
  981. background-color: rgba(255, 255, 255, 0.8);
  982. box-shadow: 0 0 #{10rpx} rgb(239, 239, 239);
  983. text-align: center;
  984. }
  985. .scan button image {
  986. height: #{64rpx};
  987. width: #{64rpx};
  988. margin-top: #{26rpx};
  989. }
  990. .item .card-img {
  991. position: absolute;
  992. top: #{40rpx};
  993. left: #{24rpx};
  994. width: #{88rpx};
  995. height: #{88rpx};
  996. border-radius: 50%;
  997. }
  998. .platform {
  999. font-size: #{24rpx};
  1000. color: #999999;
  1001. height: #{24rpx};
  1002. margin-top: #{20rpx};
  1003. }
  1004. .platform-img {
  1005. height: #{24rpx};
  1006. width: #{24rpx};
  1007. margin-right: #{12rpx};
  1008. }
  1009. .card-name {
  1010. width: #{370rpx};
  1011. font-size: #{28rpx};
  1012. color: #353535;
  1013. }
  1014. .card-clerk {
  1015. position: absolute;
  1016. right: #{24rpx};
  1017. top: 0;
  1018. height: #{168rpx};
  1019. }
  1020. .card-clerk .clerked-img {
  1021. width: #{120rpx};
  1022. height: #{120rpx};
  1023. }
  1024. .no-tip {
  1025. position: fixed;
  1026. top: #{400rpx};
  1027. left: 0;
  1028. right: 0;
  1029. margin: 0 auto;
  1030. color: #666666;
  1031. font-size: #{24rpx};
  1032. width: #{240rpx};
  1033. text-align: center;
  1034. }
  1035. .no-tip image {
  1036. height: #{240rpx};
  1037. width: #{240rpx};
  1038. margin-bottom: #{20rpx};
  1039. }
  1040. .left-status {
  1041. border-top-left-radius: #{28rpx};
  1042. border-bottom-left-radius: #{28rpx};
  1043. }
  1044. .right-status {
  1045. border-top-right-radius: #{28rpx};
  1046. border-bottom-right-radius: #{28rpx};
  1047. }
  1048. .history-img {
  1049. height: #{34rpx};
  1050. width: #{28rpx};
  1051. }
  1052. .history-list {
  1053. max-height: #{420rpx};
  1054. overflow: hidden;
  1055. }
  1056. .item-top {
  1057. margin-bottom: #{28rpx};
  1058. }
  1059. .item-top .item-status {
  1060. font-size: #{24rpx};
  1061. color: #ff4544;
  1062. }
  1063. .goods-attr {
  1064. margin-bottom: #{16rpx};
  1065. }
  1066. .goods-attr text {
  1067. margin-right: #{18rpx};
  1068. }
  1069. .refund-text {
  1070. font-size: #{24rpx};
  1071. color: #ff4544;
  1072. margin-top: #{24rpx};
  1073. text-align: right;
  1074. }
  1075. .surplus-number {
  1076. font-size: 24#{rpx};
  1077. color: #999999;
  1078. margin: 12#{rpx} 0;
  1079. }
  1080. </style>