order-list.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690
  1. <template>
  2. <view class="container" :style="{paddingTop:navbarHeight+'px'}">
  3. <!-- 自定义返回 -->
  4. <header-back :systeminfo='systeminfo' :navbar-data='nvabarData' :headerBtnPosi ="headerBtnPosi" :isDelete="isDelete" @goSearchPath="handlSearchPath"></header-back>
  5. <view class="order-section-top" :style="{marginTop:navbarHeight+'px'}">
  6. <scroll-view scroll-x scroll-with-animation class="tab-view" :scroll-left="scrollLeft">
  7. <view v-for="(item,index) in orderTabBar" :key="index" class="tab-bar-item" :class="[currentTab==index ? 'active' : '']"
  8. :data-current="index" @tap.stop="onClickTab">
  9. <text class="tab-bar-title">{{item.text}}</text>
  10. </view>
  11. </scroll-view>
  12. </view>
  13. <swiper class="tab-content" :current="currentTab" duration="80" @animationfinish="onChange" :style="{height:winHeight+'px'}" >
  14. <swiper-item v-for="(tabItem,index) in orderTabBar" :key="index">
  15. <tui-skeleton v-if="skeletonShow" backgroundColor="#fafafa" borderRadius="10rpx" :isLoading ="false" :loadingType="5"></tui-skeleton>
  16. <scroll-view scroll-y class="scoll-y tui-skeleton" @scrolltolower="scrolltolower">
  17. <view :class="{'tui-order-list':scrollTop >= 0}" class="tui-skeleton clearfix">
  18. <!-- 空白页 -->
  19. <empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0" :typeIndex="currentTab" :navbarHeight="navbarHeight"></empty>
  20. <!-- 列表 -->
  21. <view v-else class="tui-order-content">
  22. <view class="tui-order-item" v-for="(order,orderIndex) in tabItem.orderList" :key="orderIndex" @click.stop="detail(order.orderID)">
  23. <view class="order-title">
  24. <view class="order-title-t">
  25. <view class="order-title-num tui-skeleton-fillet">订单号:{{order.orderNo}}</view>
  26. <view class="order-title-tip tui-skeleton-fillet">{{orderStateExp(order.status)}}</view>
  27. </view>
  28. <view class="order-title-b">下单时间:{{order.orderTime}}</view>
  29. </view>
  30. <block v-for="(shop,index) in order.shopOrderList" :key="index">
  31. <view class="goods-title">
  32. <view class="title-logo tui-skeleton-fillet"><image :src="shop.shopLogo" mode=""></image></view>
  33. <view class="title-text tui-skeleton-fillet">{{shop.shopName}}</view>
  34. </view>
  35. <view class="goods-item" v-for="(pros,prosIndex) in shop.orderProductList" :key="prosIndex">
  36. <view class="goods-pros-t">
  37. <view class="pros-img tui-skeleton-fillet"><image :src="pros.productImage" alt="" /></view>
  38. <view class="pros-product">
  39. <view class="producttitle tui-skeleton-fillet">{{pros.name}}</view>
  40. <view class="productspec tui-skeleton-fillet">规格:{{pros.productUnit}}</view>
  41. <view class="productprice">
  42. <view class="price tui-skeleton-fillet">
  43. <text>¥{{pros.price.toFixed(2)}}</text>
  44. </view>
  45. <view class="count tui-skeleton-fillet">
  46. <text class="small">x</text>{{pros.num}}
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </block>
  53. <view class="order-footer">
  54. <view class="order-footer-top" v-if="order.discountFee!=0">经理折扣:¥{{orderPriceToFixed(order.discountFee)}}</view>
  55. <view class="order-footer-bot">
  56. <view class="count tui-skeleton-fillet">共{{order.productCount}}件商品</view>
  57. <view class="money tui-skeleton-fillet">待付总额:¥{{orderPriceToFixed(order.pendingPayments)}}</view>
  58. </view>
  59. </view>
  60. <!-- 底部button -->
  61. <order-button ref="orderButton"
  62. :status="order.status"
  63. :orderID="order.orderID"
  64. @buttonConfirm="handButtonConfirm">
  65. </order-button>
  66. </view>
  67. <!--加载loadding-->
  68. <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
  69. <tui-nomore :visible="!pullUpOn" bgcolor="#F7F7F7" :text='nomoreText'></tui-nomore>
  70. <!--加载loadding-->
  71. </view>
  72. </view>
  73. </scroll-view>
  74. </swiper-item>
  75. </swiper>
  76. <!-- 分享弹窗 -->
  77. <share-alert v-if="isShareModal"
  78. :orderID="btnoRderID"
  79. @shareConfirm ='onShareAppMessage'>
  80. </share-alert>
  81. <!-- 透明模态层 -->
  82. <modal-layer v-if='isModalLayer'></modal-layer>
  83. </view>
  84. </template>
  85. <script>
  86. import headerBack from '@/components/cm-module/headerNavbar/header-back' //自定义导航
  87. import btSearch from '@/components/uni-search/bt-search.vue' //搜索
  88. import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
  89. import tuiListCell from "@/components/tui-components/list-cell/list-cell"
  90. import tuiLoadmore from "@/components/tui-components/loadmore/loadmore"
  91. import tuiNomore from "@/components/tui-components/nomore/nomore"
  92. import orderButton from '@/components/cm-module/orderDetails/orderListButton' //按钮
  93. import modalLayer from "@/components/modal-layer"
  94. import empty from "@/components/empty";
  95. import shareAlert from '@/components/cm-module/modelAlert/shareAlert' //分享弹窗
  96. import { queryOrderList,cancelOrder,deleteOrder,confirmReceipt, affirmOrder } from "@/api/order.js"
  97. export default {
  98. components: {
  99. headerBack,
  100. empty,
  101. btSearch,
  102. tuiListCell,
  103. tuiLoadmore,
  104. tuiNomore,
  105. orderButton,
  106. tuiSkeleton,
  107. modalLayer,
  108. shareAlert
  109. },
  110. data() {
  111. return {
  112. CustomBar:this.CustomBar,// 顶部导航栏高度
  113. orderTabBar: [{state: 0,text: '全部订单',orderList: []},
  114. {state: 1,text: '待确认',orderList: []},
  115. {state: 2,text: '待付款',orderList: []},
  116. {state: 3,text: '待发货',orderList: []},
  117. {state: 4,text: '已发货',orderList: []},
  118. {state: 5,text: '退货/款',orderList: []}
  119. ],
  120. headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
  121. systeminfo: this.setSysteminfo(), //获取设备信息
  122. nvabarData: { //顶部自定义导航
  123. showCapsule: 1, // 是否显示左上角图标 1表示显示 0表示不显示,
  124. showSearch: 1,
  125. title: '我的订单', // 导航栏 中间的标题
  126. },
  127. winHeight: "", //窗口高度
  128. currentTab: 0, //预设当前项的值
  129. scrollLeft: 0 ,//tab标题的滚动条位置
  130. userID:0,
  131. orderData: [],
  132. btnoRderID: 0, //点击按钮传入的的订单ID
  133. pageNum: 1, //页数
  134. pageSize: 10, //条数
  135. scrollTop: 0,
  136. skeletonShow: true,
  137. isDelete:false,
  138. isClickChange: false,
  139. isShareModal: false,//控制分享弹窗
  140. isModalLayer: false,
  141. loadding: false,
  142. pullUpOn: true,
  143. hasNextPage: false,
  144. pullFlag: true,
  145. navbarHeight:'',
  146. nomoreText: '上拉显示更多',
  147. }
  148. },
  149. onLoad(e) {
  150. let self = this;
  151. if(e.type ==='detele'){self.isDelete = true}
  152. self.currentTab = e.state
  153. self.getHeaderTopHeight()//设置自定义导航高度
  154. // 高度自适应
  155. uni.getSystemInfo({
  156. success: function(res) {
  157. let calc = res.windowHeight;
  158. self.winHeight = calc - self.CustomBar;
  159. }
  160. });
  161. },
  162. methods: {
  163. // 滚动切换标签样式
  164. onChange: function(e) {
  165. let index = e.target.current || e.detail.current;
  166. if (this.isClickChange) {
  167. this.currentTab = index;
  168. this.isClickChange = false;
  169. return;
  170. }
  171. this.isClickChange = false;
  172. this.currentTab = index;
  173. this.checkCor();
  174. this.pageNum = 1
  175. this.pullUpOn = true //切换时隐藏
  176. this.loadding = false //切换时隐藏
  177. this.nomoreText = ''
  178. this.getOrderDatainit(this.currentTab,'tabChange')
  179. },
  180. // 点击标题切换当前页时改变样式
  181. onClickTab: function(e) {
  182. let tabIndex = e.target.dataset.current || e.currentTarget.dataset.current;
  183. if (this.currentTab === tabIndex) {
  184. return false;
  185. } else {
  186. this.isClickChange = true;
  187. this.currentTab = tabIndex
  188. this.pageNum = 1
  189. this.pullUpOn = true //切换时隐藏
  190. this.loadding = false //切换时隐藏
  191. this.getOrderDatainit(this.currentTab)
  192. }
  193. },
  194. //判断当前滚动超过一屏时,设置tab标题滚动条。
  195. checkCor: function() {
  196. if (this.currentTab > 3) {
  197. //这里距离按实际计算
  198. this.scrollLeft = 300
  199. } else {
  200. this.scrollLeft = 0
  201. }
  202. },
  203. getOrderDatainit(index,source){
  204. /**
  205. * @订单初始化加载 仅加载第一页码
  206. * @param:orderState(订单状态:0全部,1待付款,2待发货,3已发货,4退货款)
  207. * @param:userID(用户ID)
  208. * @param:pageNum(页码数)
  209. * @param:pageSize(每页条数)
  210. * @param:organizeID(全局变量组织ID)
  211. */
  212. setTimeout(()=>{this.skeletonShow = false},1500)
  213. let orderItem = this.orderTabBar[index];
  214. let state = orderItem.state;
  215. if(source === 'tabChange' && orderItem.loaded === true){
  216. //tab切换只有第一次需要加载数据
  217. return;
  218. }
  219. setTimeout(()=>{
  220. this.$api.getStorage().then((resolve) =>{
  221. this.userID = resolve.userID
  222. let params = {orderState:index,userId:this.userID,pageNum:1,pageSize:this.pageSize};
  223. queryOrderList(params).then(response =>{
  224. let orderList = response.data.results.filter(item=>{
  225. //添加不同状态下订单的表现形式
  226. item = Object.assign(item, this.orderStateExp(item.state));
  227. return item;
  228. });
  229. orderItem.orderList =[];
  230. orderList.forEach(item=>{
  231. orderItem.orderList.push(item);
  232. })
  233. //loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
  234. this.$set(orderItem, 'loaded', true);
  235. this.hasNextPage = response.data.hasNextPage;
  236. if(this.hasNextPage){
  237. this.pullUpOn = false
  238. this.nomoreText = '上拉显示更多'
  239. }else{
  240. if(orderItem.orderList.length < 2){
  241. this.pullUpOn = true
  242. }else{
  243. this.pullUpOn = false
  244. this.nomoreText = '已至底部'
  245. }
  246. }
  247. }).catch(error =>{
  248. this.$util.msg(error.msg,2000);
  249. })
  250. })
  251. }, 600);
  252. },
  253. getOnReachBottomData(index){//上拉加载
  254. this.pageNum+=1
  255. let params = {orderState:index,userId:this.userID,pageNum:1,pageSize:this.pageSize};
  256. queryOrderList(params).then(response =>{
  257. let orderItem = this.orderTabBar[index];
  258. let resData = response.data.results
  259. this.hasNextPage = response.data.hasNextPage;
  260. orderItem.orderList = orderItem.orderList.concat(resData)
  261. this.pullFlag = false;// 防上拉暴滑
  262. setTimeout(()=>{this.pullFlag = true;},500)
  263. if(this.hasNextPage){
  264. this.pullUpOn = false
  265. this.nomoreText = '上拉显示更多'
  266. }else{
  267. this.loadding = false
  268. this.pullUpOn = false
  269. this.nomoreText = '已至底部'
  270. }
  271. }).catch(error =>{
  272. this.$util.msg(error.msg,2000)
  273. })
  274. },
  275. scrolltolower() {
  276. if(this.hasNextPage){
  277. this.loadding = true
  278. this.pullUpOn = true
  279. this.getOnReachBottomData(this.currentTab);
  280. }
  281. },
  282. detail(id) {//订单详情跳转
  283. this.isModalLayer = true;
  284. this.$api.navigateTo(`/pages/user/order/order-details?state=${this.currentTab}&orderID=${id}`)
  285. },
  286. handButtonConfirm(data) {//获取点击
  287. this.handShowAlert(data)
  288. this.btnoRderID = data.orderId
  289. },
  290. handShowAlert(data) {//执行
  291. switch(data.type){
  292. case 'delete':
  293. this.handOrderDetele(data.orderId);
  294. break
  295. case 'cancel':
  296. this.handCenceConfirm(data.orderId)
  297. break
  298. case 'query':
  299. this.isModalLayer = true;
  300. this.$api.navigateTo('/pages/user/order/order-logistics?orderID='+data.orderId)
  301. break
  302. case 'confirm':
  303. this.handOrderConfirm(data.orderId);
  304. break
  305. case 'confirmation':
  306. this.handOrderConfirmation(data.orderId);
  307. break
  308. }
  309. },
  310. handOrderConfirm (id){//确认收货
  311. this.$util.modal('提示','是否确认收货','确定','取消',true,() =>{
  312. confirmReceipt({orderID:id}).then(response =>{
  313. this.$util.msg(response.msg,2000,true,'success');
  314. setTimeout(() => {
  315. this.getOrderDatainit(this.currentTab)
  316. },2000)
  317. }).catch(error =>{
  318. this.$util.msg(error.msg,2000)
  319. })
  320. })
  321. },
  322. handOrderConfirmation (id){//确认订单
  323. this.$util.modal('提示','确认此订单?','确定','取消',true,() =>{
  324. affirmOrder({orderID:id}).then(response =>{
  325. this.$util.msg(response.msg,2000,true,'success');
  326. setTimeout(() => {
  327. this.getOrderDatainit(this.currentTab)
  328. },2000)
  329. }).catch(error =>{
  330. this.$util.msg(error.msg,2000)
  331. })
  332. })
  333. },
  334. handOrderDetele(id){//删除订单
  335. this.$util.modal('提示','确认删除该订单吗?','确定','取消',true,() =>{
  336. deleteOrder({orderID:id}).then(response =>{
  337. this.$util.msg(response.msg,2000,true,'success');
  338. setTimeout(() => {
  339. this.getOrderDatainit(this.currentTab)
  340. },2000)
  341. }).catch(error =>{
  342. this.$util.msg(error.msg,2000)
  343. })
  344. })
  345. },
  346. handCenceConfirm(id){//取消订单
  347. this.$util.modal('提示','确认取消该订单吗?','确定','取消',true,() =>{
  348. cancelOrder({orderID:id}).then(response =>{
  349. this.$util.msg(response.msg,2000,true,'success');
  350. setTimeout(() => {
  351. this.getOrderDatainit(this.currentTab)
  352. },2000)
  353. }).catch(error =>{
  354. this.$util.msg(error.msg,2000)
  355. })
  356. })
  357. },
  358. handlSearchPath(){
  359. this.$api.navigateTo('/pages/search/search-order')
  360. },
  361. onShareAppMessage (res){//分享转发
  362. this.isShareModal = false
  363. if (res.from === 'button') {// 来自页面内转发按钮
  364. }
  365. return {
  366. title: '您有新的分享订单,快来查看吧~',
  367. path: `/pages/user/order/orderShareLogin?orderID=${this.btnoRderID}&userID=${this.userID}`,
  368. imageUrl:'https://img.caimei365.com/group1/M00/03/95/Cmis216Sk_SABnOFABZCgCzFV_g063.png'
  369. }
  370. },
  371. //订单状态文字和颜色
  372. orderStateExp (state){
  373. let stateText = '',
  374. stateTextObject={
  375. 0:'待确认',
  376. 4:'交易完成',
  377. 5:'订单完成',
  378. 6:'已关闭',
  379. 7:'交易全退',
  380. 77:'交易全退',
  381. 11:'待付款待发货',
  382. 12:'待付款部分发货',
  383. 13:'待付款已发货',
  384. 21:'部分付款待发货',
  385. 22:'部分付款部分发货',
  386. 23:'部分付款已发货',
  387. 31:'已付款待发货',
  388. 32:'已付款部分发货',
  389. 33:'已付款已发货',
  390. 111:'待付款待发货',
  391. }
  392. Object.keys(stateTextObject).forEach(key => {
  393. if(key == state){
  394. stateText = stateTextObject[key]
  395. }
  396. })
  397. return stateText;
  398. },
  399. orderPriceToFixed (n){
  400. let price ='';
  401. price = n.toFixed(2);
  402. return price
  403. },
  404. getHeaderTopHeight (){ // 状态栏高度
  405. let statusBarHeight = this.systeminfo.statusBarHeight
  406. let headerPosi = this.headerBtnPosi
  407. let btnPosi = { // 胶囊实际位置,坐标信息不是左上角原点
  408. height: headerPosi.height,
  409. width: headerPosi.width,
  410. // 胶囊top - 状态栏高度
  411. top: headerPosi.top - statusBarHeight,
  412. // 胶囊bottom - 胶囊height - 状态栏height (现胶囊bottom 为距离导航栏底部的长度)
  413. bottom: headerPosi.bottom - headerPosi.height - statusBarHeight,
  414. // 屏幕宽度 - 胶囊right
  415. right: this.systeminfo.screenWidth - headerPosi.right
  416. }
  417. this.navbarHeight= headerPosi.bottom + btnPosi.bottom// 原胶囊bottom + 现胶囊bottom
  418. },
  419. setHeaderBtnPosi (){
  420. // 获得胶囊按钮位置信息
  421. let headerBtnPosi = uni.getMenuButtonBoundingClientRect();
  422. return headerBtnPosi
  423. },
  424. setSysteminfo (){
  425. let systeminfo;
  426. uni.getSystemInfo({ // 获取设备信息
  427. success: (res) => {
  428. systeminfo = res
  429. },
  430. })
  431. return systeminfo
  432. }
  433. },
  434. onPageScroll(e) {
  435. this.scrollTop = e.scrollTop;
  436. },
  437. onShow() {
  438. this.isModalLayer = false;
  439. this.getOrderDatainit(this.currentTab)
  440. }
  441. }
  442. </script>
  443. <style lang="scss">
  444. /*tabbar start*/
  445. ::-webkit-scrollbar {
  446. width: 0;
  447. height: 0;
  448. color: transparent;
  449. }
  450. .order-section-top{
  451. width: 100%;
  452. position: fixed;
  453. top: 0;
  454. left: 0;
  455. z-index: 99;
  456. background: #FFFFFF;
  457. }
  458. .tab-view::before {
  459. content: '';
  460. position: absolute;
  461. border-bottom: 1rpx solid #eaeef1;
  462. -webkit-transform: scaleY(0.5);
  463. transform: scaleY(0.5);
  464. bottom: 0;
  465. right: 0;
  466. left: 0;
  467. }
  468. .tab-view {
  469. width: 100%;
  470. height: 80rpx;
  471. overflow: hidden;
  472. box-sizing: border-box;
  473. background: #fff;
  474. white-space: nowrap;
  475. border-top: 1px solid #F7F7F7;
  476. }
  477. .tab-bar-item {
  478. padding: 0;
  479. height: 80rpx;
  480. min-width: 80rpx;
  481. line-height: 80rpx;
  482. margin: 0 28rpx;
  483. display: inline-block;
  484. text-align: center;
  485. box-sizing: border-box;
  486. }
  487. .tab-bar-title {
  488. height: 80rpx;
  489. line-height: 80rpx;
  490. font-size:$font-size-28;
  491. color: $text-color;
  492. }
  493. .active {
  494. border-bottom: 6rpx solid $color-system;
  495. }
  496. .active .tab-bar-title {
  497. color: $color-system !important;
  498. }
  499. /*tabbar end*/
  500. .scoll-y {
  501. height: 100%;
  502. }
  503. page{
  504. background: #F7F7F7;
  505. }
  506. .container {
  507. padding-bottom: env(safe-area-inset-bottom);
  508. height: auto;
  509. position: relative;
  510. }
  511. .tui-order-content{
  512. width: 100%;
  513. height: auto;
  514. }
  515. .tui-order-list {
  516. margin-top: 90rpx;
  517. width: 100%;
  518. position: relative;
  519. }
  520. .tui-order-item {
  521. display: flex;
  522. flex-direction: column;
  523. width: 702rpx;
  524. padding:20rpx 24rpx 0 24rpx;
  525. background: #fff;
  526. border-bottom: 20rpx solid #F7F7F7;
  527. }
  528. .order-title{
  529. width: 100%;
  530. height: auto;
  531. .order-title-t{
  532. width: 100%;
  533. height: 40rpx;
  534. float: left;
  535. font-size: $font-size-28;
  536. line-height: 40rpx;
  537. font-weight: bold;
  538. .order-title-num{
  539. float: left;
  540. text-align: left;
  541. color: $color-system;
  542. }
  543. .order-title-tip{
  544. float: right;
  545. text-align: right;
  546. color: #FF2A2A;
  547. }
  548. }
  549. .order-title-b{
  550. width: 100%;
  551. height: 40rpx;
  552. float: left;
  553. margin-top: 8rpx;
  554. font-size: $font-size-28;
  555. line-height: 40rpx;
  556. color: #999999;
  557. text-align: left;
  558. }
  559. }
  560. .goods-title{
  561. width: 100%;
  562. height: 48rpx;
  563. float: left;
  564. margin-top: 24rpx;
  565. .title-logo{
  566. width: 48rpx;
  567. height: 48rpx;
  568. float: left;
  569. image{
  570. width: 48rpx;
  571. height: 48rpx;
  572. }
  573. }
  574. .title-text{
  575. float: left;
  576. margin-left: 16rpx;
  577. font-size: $font-size-28;
  578. color: $text-color;
  579. text-align: left;
  580. line-height: 48rpx;
  581. font-weight: bold;
  582. }
  583. }
  584. .goods-item{
  585. width: 100%;
  586. height: auto;
  587. }
  588. .goods-pros-t{
  589. display: flex;
  590. align-items: center;
  591. width: 100%;
  592. height: 217rpx;
  593. padding:24rpx 0;
  594. .pros-img{
  595. width: 210rpx;
  596. height: 100%;
  597. border-radius: 10rpx;
  598. margin:0 26rpx 0 0;
  599. border:1px solid #f3f3f3;
  600. image{
  601. width: 100%;
  602. height: 100%;
  603. border-radius: 10rpx;
  604. }
  605. }
  606. }
  607. .pros-product{
  608. width: 468rpx;
  609. height: 100%;
  610. line-height: 36rpx;
  611. font-size: $font-size-26;
  612. position: relative;
  613. .producttitle{
  614. width: 100%;
  615. display: inline-block;
  616. height: auto;
  617. text-overflow:ellipsis;
  618. display: -webkit-box;
  619. word-break: break-all;
  620. -webkit-box-orient: vertical;
  621. -webkit-line-clamp: 2;
  622. overflow: hidden;
  623. margin-bottom: 8rpx;
  624. }
  625. .productspec{
  626. height: 36rpx;
  627. color: #999999;
  628. }
  629. .productprice{
  630. height: 48rpx;
  631. position: absolute;
  632. width: 100%;
  633. bottom: 0;
  634. .price{
  635. line-height: 48rpx;
  636. font-size: $font-size-28;
  637. width: 48%;
  638. color: #FF2A2A;
  639. float: left;
  640. font-weight: bold;
  641. }
  642. .count{
  643. height: 100%;
  644. float: right;
  645. position: relative;
  646. .small{
  647. color: #666666;
  648. }
  649. }
  650. }
  651. }
  652. .order-footer{
  653. width: 100%;
  654. height: 78rpx;
  655. float: left;
  656. .order-footer-top{
  657. width: 100%;
  658. height: 34rpx;
  659. line-height: 34rpx;
  660. font-size: $font-size-24;
  661. color: #999999;
  662. text-align: right;
  663. }
  664. .order-footer-bot{
  665. width: 100%;
  666. float: left;
  667. height: 48rpx;
  668. line-height: 48rpx;
  669. font-size: $font-size-28;
  670. font-weight: bold;
  671. color: $text-color;
  672. .count{
  673. width: 50%;
  674. float: left;
  675. text-align: left;
  676. }
  677. .money{
  678. width: 50%;
  679. float: right;
  680. text-align: right;
  681. }
  682. }
  683. }
  684. </style>