order.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795
  1. <template>
  2. <view>
  3. <view class="custom_addr" @click="showAddrPopup()">
  4. <view class="contact_user">
  5. <text class="contact_none" v-if="!checkedAddr.id">请选择收货地址</text>
  6. <text class="contact_name" >{{checkedAddr.contact_name}}</text>
  7. <text class="contact_phone" >{{checkedAddr.contact_phone}}</text>
  8. <text class="contact_more"> &gt;</text>
  9. <text class="contact_shop" >{{checkedAddr.contact_shop}}</text>
  10. </view>
  11. <view class="contact_addr">
  12. {{checkedAddr.contact_province}} {{checkedAddr.contact_city}} {{checkedAddr.contact_area}} {{checkedAddr.contact_addr}}
  13. </view>
  14. </view>
  15. <view class="car_list">
  16. <view class="car_item" v-for="(item,index) in cartList" :key="index">
  17. <view class="box_left">
  18. <image class="car_image" :src="item.thumb" mode=""></image>
  19. </view>
  20. <view class="box_center">
  21. <view class="car_name">{{item.name}}</view>
  22. <view class="car_spec">{{item.spec}}</view>
  23. <view class="car_price">
  24. <text class="price">¥{{item.price}}</text>
  25. </view>
  26. </view>
  27. <view class="box_right">
  28. <view class="buy_num_box">
  29. <view class="buy_num">共{{item.buy_num}}件</view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="to_select_coupon" v-if="couponList.length" @click="popupCoupon()">
  35. <text>优惠券</text>
  36. <view class="coupon_deduction">{{couponUsed}}</view>
  37. </view>
  38. <view class="bottom_box">
  39. <view class="price_box">
  40. 合计:<text class="price_total">¥{{priceTotal}}</text>
  41. </view>
  42. <button class="to_order" @click="createOrder()" data-eventsync="true">提交预约</button>
  43. </view>
  44. <uni-popup ref="popup" type="bottom" class="popup" background-color="#FFFFFF" @touchmove.stop.prevent="()=>{}">
  45. <view class="coupon_list">
  46. <view class="coupon_item" v-for="(item,index) in couponList" :key="index" @click="checkedCoupon(index)">
  47. <view class="box_left">
  48. <view class="rebate" v-if="item.rebate_type == 1" > ¥{{item.rebate}}</view>
  49. <view class="rebate" v-if="item.rebate_type == 2" > 打 {{item.rebate}} 折</view>
  50. <view class="rebate" v-if="item.rebate_type == 3" >
  51. <text v-if="item.rebate_scope.length"> {{item.rebate_scope[0].product_name}} </text>
  52. </view>
  53. <view class="std_pay"> 满{{item.std_pay}}</view>
  54. </view>
  55. <view class="box_right">
  56. <view class="coupon_title">
  57. <view class="coupon_name" v-if="item.rebate_type == 1">满减券</view>
  58. <view class="coupon_name" v-if="item.rebate_type == 2">折扣券</view>
  59. <view class="coupon_name" v-if="item.rebate_type == 3">赠品券</view>
  60. </view>
  61. <view class="product_scope">
  62. <text class="" v-if="item.type_id == 1">限定商品可用</text>
  63. <text class="" v-if="item.type_id == 2">全场可用</text>
  64. <view class="check_label" >
  65. <view class="isstd" v-if="!item.is_std">不可用</view>
  66. <image class="checkbox" v-if="item.is_std" :src="item.checked?'../../static/icon/checked.png':'../../static/icon/checkbox.png'"></image>
  67. </view>
  68. </view>
  69. <view class="coupon_info">
  70. <view class="coupon_exp">{{item.exp_time}} 到期</view>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. </uni-popup>
  76. <uni-popup ref="addrPopup" type="bottom" class="popup" background-color="#FFFFFF" >
  77. <view class="popup_title">收货地址 <navigator url="/pages/addr/index?notify=addr" class="to_addr_page">管理</navigator> </view>
  78. <view class="addr_list">
  79. <view class="addr_item" v-for="(item,index) in addrList" :key="index" @click="checkedAddrItem(item)">
  80. <view class="radio_label">
  81. <image class="radio_icon" :src="item.id == checkedAddr.id? '../../static/icon/radioed.png' : '../../static/icon/radio.png'" ></image>
  82. </view>
  83. <view class="contact_user">
  84. <text class="contact_name">{{item.contact_name}}</text>
  85. <text class="contact_phone">{{item.contact_phone}}</text>
  86. <text class="contact_default" v-if="item.is_default">默认</text>
  87. </view>
  88. <view class="contact_addr">
  89. {{item.contact_province}} {{item.contact_city}} {{item.contact_area}} {{item.contact_addr}}
  90. </view>
  91. </view>
  92. </view>
  93. <view class="create_box">
  94. <navigator url="/pages/addr/index?notify=addr&type=create" class="create_addr" >新建收货地址</navigator>
  95. </view>
  96. </uni-popup>
  97. </view>
  98. </template>
  99. <script>
  100. export default {
  101. data() {
  102. return {
  103. // 购物车列表
  104. cartList:[],
  105. // 优惠券列表
  106. couponList:[],
  107. // 请求参数
  108. requestParam:{
  109. cart_ids:"",
  110. },
  111. // 总价
  112. priceTotal:'0.00',
  113. // 优惠券使用
  114. couponUsed:"去使用 >",
  115. // 扣减金额
  116. rebatePrice:0.00,
  117. // 已经选择的优惠券ID
  118. customCoupon: 0,
  119. // 地址列表
  120. addrList:[],
  121. // 已选地址
  122. checkedAddr:{
  123. id:0,
  124. contact_name:"",
  125. contact_phone:"",
  126. contact_province:"",
  127. contact_city:"",
  128. contact_area:"",
  129. contact_addr:"",
  130. is_default:0,
  131. }
  132. }
  133. },
  134. onLoad(param) {
  135. // 获取路由参数
  136. this.requestParam.cart_ids = param.cart_ids;
  137. var that = this;
  138. // 监听地址变动
  139. uni.$on('addr_list_change',function(data){
  140. // 地址列表
  141. that.addrList = data.list;
  142. })
  143. },
  144. onShow() {
  145. // 结果
  146. this.$http.request('api/shop_cart/check_list',this.requestParam).then((re)=>{
  147. if( re.code == 'success' ){
  148. // 赋值
  149. this.cartList = re.data;
  150. // 结果
  151. this.$http.request('api/custom_coupon/get_checked',this.requestParam).then((re)=>{
  152. if( re.code == 'success' ){
  153. // 赋值
  154. this.couponList = re.data;
  155. // 推荐使用的优惠券
  156. let rebatePrice = 0;
  157. // 循环优惠券
  158. for (let i in this.couponList) {
  159. /* 商品的总价格,决定是否可用 */
  160. var totalPrice = 0.00;
  161. // 循环产品,
  162. for (let j in this.cartList) {
  163. // 如果是商品券
  164. if( this.couponList[i].type_id == 1 ){
  165. // 判断商品是不是在商品范围
  166. var isScope = false;
  167. // 循环商品范围
  168. for (let k in this.couponList[i].product_scope) {
  169. // 如果存在商品范围
  170. if( this.couponList[i].product_scope[k].product_id == this.cartList[j].product_id) isScope = true;
  171. }
  172. // 范围内的做计算
  173. if( isScope ){
  174. totalPrice = this.$decimal.add(totalPrice,this.$decimal.mul(this.cartList[j].price,this.cartList[j].buy_num));
  175. }
  176. // 如果排除商品
  177. }else if( this.couponList[i].type_id == 3 ){
  178. // 判断商品是不是在排除范围
  179. var isExclude = false;
  180. // 循环排除范围
  181. for (let k in this.couponList[i].product_exclude) {
  182. // 如果存在排除范围
  183. if( this.couponList[i].product_exclude[k].product_id == this.cartList[j].product_id) isExclude = true;
  184. }
  185. // 不在排除内的做计算
  186. if( !isExclude ){
  187. totalPrice = this.$decimal.add(totalPrice,this.$decimal.mul(this.cartList[j].price,this.cartList[j].buy_num));
  188. }
  189. // 店铺券
  190. }else{
  191. // 折扣券以及满减券的话,计算价格
  192. totalPrice = this.$decimal.add(totalPrice,this.$decimal.mul(this.cartList[j].price,this.cartList[j].buy_num));
  193. }
  194. // 判断价格到不到限额
  195. this.couponList[i].is_std = parseFloat(totalPrice.toFixed(2)) >= parseFloat(this.$decimal.mul(this.couponList[i].std_pay,1).toFixed(2));
  196. // 如果可用的话,并且没有主动选择优惠券
  197. if( this.couponList[i].is_std ){
  198. // 优惠金额
  199. let newRebatePrice = 0.00;
  200. // 计算满减价格
  201. if( this.couponList[i].rebate_type == 1 ){
  202. // 计算扣减数据
  203. newRebatePrice = this.$decimal.mul(this.couponList[i].rebate,1);
  204. }
  205. // 计算折扣价格
  206. if( this.couponList[i].rebate_type == 2 ){
  207. // 折扣
  208. newRebatePrice = this.$decimal.mul(totalPrice,this.couponList[i].rebate);
  209. // 减数
  210. newRebatePrice = this.$decimal.sub(totalPrice,newRebatePrice.mul(0.1));
  211. }
  212. // 判断哪个比较优惠
  213. if( parseFloat(rebatePrice.toFixed(2)) < parseFloat(newRebatePrice.toFixed(2)) ){
  214. // 覆盖价格
  215. rebatePrice = parseFloat(newRebatePrice.toFixed(2));
  216. // 选中
  217. this.checkedCoupon(i);
  218. }
  219. }
  220. }
  221. }
  222. }
  223. });
  224. // 计算价格
  225. this.priceHandler();
  226. }
  227. });
  228. // 地址列表
  229. this.getAddrList();
  230. },
  231. methods: {
  232. // 地址弹出层
  233. showAddrPopup(){
  234. // 显示下单弹出层
  235. this.$refs.addrPopup.open('bottom');
  236. },
  237. // 价格计算
  238. priceHandler(){
  239. // 总价格
  240. let priceTotal = 0;
  241. // 循环处理
  242. for (let index in this.cartList) {
  243. priceTotal = this.$decimal.add(priceTotal,this.$decimal.mul(this.cartList[index].price,this.cartList[index].buy_num));
  244. }
  245. // 扣减数据
  246. priceTotal = this.$decimal.sub(priceTotal,this.rebatePrice);
  247. // 小数点保留
  248. this.priceTotal = priceTotal.toFixed(2)
  249. },
  250. // 创建订单
  251. createOrder(){
  252. // 不可预约
  253. if( !this.$checkAccess.alertCity() ) return;
  254. // 需要下单的产品列表
  255. let productList = [];
  256. // 循环列表数据
  257. for (let index in this.cartList) {
  258. // 购买数量必须大于0的才行
  259. if( this.cartList[index].buy_num > 0 ){
  260. // 追加需要下单的数据
  261. productList.push({product_id: this.cartList[index].product_id,buy_num:this.cartList[index].buy_num,product_skuid:this.cartList[index].skuid});
  262. }
  263. }
  264. if( productList.length <= 0) {
  265. uni.showToast({
  266. title:"未选择可预约的产品",
  267. icon:"none",
  268. })
  269. return ;
  270. }
  271. // 地址未填
  272. if( !this.checkedAddr.id ) {
  273. uni.showToast({
  274. title:"请选择收货地址",
  275. icon:"none"
  276. })
  277. return;
  278. }
  279. //需要下单的产品信息参数传给OrederCompletion页面
  280. let productInfo = [];
  281. for (let index in this.cartList) {
  282. // 购买数量必须大于0的才行
  283. if( this.cartList[index].buy_num > 0 ){
  284. // 追加需要下单的数据
  285. productInfo.push({name:this.cartList[index].name,spec:this.cartList[index].spec,price:this.cartList[index].price});
  286. }
  287. }
  288. // 转成json字符串
  289. productInfo = JSON.stringify(productInfo);
  290. //加密json格式成编码数组
  291. let encodedArray = encodeURIComponent(productInfo);
  292. // 转成json字符串传输
  293. productList = JSON.stringify(productList);
  294. // 请求接口
  295. this.$http.request('api/orders/create',{"product_list":productList,'custom_coupon_id':this.customCoupon,'is_cart':1,'addr_id':this.checkedAddr.id},'post').then((re)=>{
  296. // 判断结果
  297. if( re.code == 'success' ) {
  298. // 跳转到报单完成页面
  299. uni.redirectTo({url:`/pages/orders/completion?params=${encodedArray}`})
  300. return ;
  301. }else{
  302. uni.showToast({title: re.msg,icon:"none"})
  303. }
  304. });
  305. },
  306. // 弹出优惠券
  307. popupCoupon(){
  308. this.$refs.popup.open();
  309. },
  310. // 选择优惠券
  311. checkedCoupon(index){
  312. // 单个设置选中/未选
  313. this.couponList[index].checked = this.couponList[index].checked ? 0 : 1;
  314. // 循环处理
  315. for (let i in this.couponList) {
  316. // 有未选的就不做全选
  317. if( index != i ) this.couponList[i].checked = 0;
  318. }
  319. // 如果未选中,提示可用
  320. if( !this.couponList[index].checked ) this.couponUsed = '去使用 >';
  321. // 已经选择的优惠券ID
  322. this.customCoupon = this.couponList[index].checked ? this.couponList[index].id : 0
  323. // 计算扣减
  324. this.couponRebate();
  325. // 计算价格
  326. this.priceHandler();
  327. // 关闭弹窗
  328. this.$refs.popup.close();
  329. },
  330. // 计算优惠券扣减
  331. couponRebate(){
  332. // 默认扣减0
  333. this.rebatePrice = 0;
  334. // 循环优惠券
  335. for (let i in this.couponList) {
  336. // 判断是否选中
  337. if( !this.couponList[i].checked ){
  338. // 未选择的不管
  339. continue;
  340. }
  341. /* 商品的总价格,决定是否可用 */
  342. var totalPrice = 0.00;
  343. // 循环产品,
  344. for (let j in this.cartList) {
  345. // 如果是商品券
  346. if( this.couponList[i].type_id == 1 ){
  347. // 判断商品是不是在商品范围
  348. var isScope = false;
  349. // 循环商品范围
  350. for (let k in this.couponList[i].product_scope) {
  351. // 如果存在商品范围
  352. if( this.couponList[i].product_scope[k].product_id == this.cartList[j].product_id) isScope = true;
  353. }
  354. // 范围内的做计算
  355. if( isScope ) totalPrice = this.$decimal.add(totalPrice,this.$decimal.mul(this.cartList[j].price,this.cartList[j].buy_num));
  356. // 店铺券
  357. }else{
  358. // 折扣券以及满减券的话,计算价格
  359. totalPrice = this.$decimal.add(totalPrice,this.$decimal.mul(this.cartList[j].price,this.cartList[j].buy_num));
  360. }
  361. }
  362. // 如果是可以用的话
  363. if( parseFloat(totalPrice.toFixed(2)) >= parseFloat(this.$decimal.mul(this.couponList[i].std_pay,1).toFixed(2)) ){
  364. // 扣减金额
  365. let rebatePrice = 0;
  366. // 满减
  367. if( this.couponList[i].rebate_type == 1 ){
  368. // 计算扣减数据
  369. rebatePrice = this.$decimal.mul(this.couponList[i].rebate,1);
  370. // 替换文字
  371. this.couponUsed = "¥-" + rebatePrice.toFixed(2);
  372. }
  373. // 折扣
  374. if( this.couponList[i].rebate_type == 2 ){
  375. // 折扣
  376. rebatePrice = this.$decimal.mul(totalPrice,this.couponList[i].rebate);
  377. // -0.1 表示折扣
  378. rebatePrice = this.$decimal.sub(totalPrice,rebatePrice.mul(0.1));
  379. // 替换文字
  380. this.couponUsed = "¥-" + rebatePrice.toFixed(2);
  381. }
  382. // 赠品
  383. if( this.couponList[i].rebate_type == 3 ){
  384. // 替换文字
  385. this.couponUsed = "送" + ( this.couponList[i].rebate_scope.length ? this.couponList[i].rebate_scope[0].product_name: "");
  386. }
  387. // 小数点保留
  388. this.rebatePrice = rebatePrice.toFixed(2);
  389. }
  390. }
  391. },
  392. // 选择地址
  393. checkedAddrItem(item){
  394. this.checkedAddr = item;
  395. this.$refs.addrPopup.close();
  396. },
  397. getAddrList(){
  398. // 判断数据
  399. this.$http.request('api/custom_addr/get_list').then((callback)=>{
  400. // 获取成功
  401. if( callback.code == 'success' ){
  402. this.addrList = callback.data;
  403. // 如果有的话
  404. if( this.addrList.length ){
  405. // 获取默认的
  406. for (let i in this.addrList) {
  407. // 如果是默认的
  408. if( this.addrList[i].is_default ) this.checkedAddr = this.addrList[i];
  409. }
  410. // 如果没有默认的话
  411. if( !this.checkedAddr.id ){
  412. this.checkedAddr = this.addrList[this.addrList.length-1];
  413. }
  414. }
  415. }
  416. });
  417. }
  418. }
  419. }
  420. </script>
  421. <style lang="less">
  422. .custom_addr{
  423. width: 680rpx;
  424. display: block;
  425. font-size: 24rpx;
  426. overflow: hidden;
  427. margin: 0rpx auto;
  428. line-height: 40rpx;
  429. padding: 20rpx 35rpx;
  430. background-color: #FFFFFF;
  431. border-bottom: 2rpx solid #dddddd;
  432. .contact_user{
  433. display: block;
  434. font-size: 24rpx;
  435. line-height: 50rpx;
  436. .contact_none{
  437. font-size: 26rpx;
  438. font-weight: bold;
  439. }
  440. .contact_name{
  441. font-size: 26rpx;
  442. font-weight: bold;
  443. margin-right: 16rpx;
  444. }
  445. .contact_more{
  446. float: right;
  447. font-size: 40rpx;
  448. font-weight: bold;
  449. }
  450. .contact_shop{
  451. float: right;
  452. font-size: 26rpx;
  453. margin-right: 16rpx;
  454. }
  455. }
  456. .contact_addr{
  457. width: 620rpx;
  458. display: block;
  459. font-size: 24rpx;
  460. line-height: 30rpx;
  461. padding: 10rpx 5rpx;
  462. }
  463. }
  464. .car_list{
  465. display: block;
  466. overflow: hidden;
  467. margin: 0rpx auto;
  468. margin-top: 20rpx;
  469. background: #FFFFFF;
  470. .car_item{
  471. height: 170rpx;
  472. display: block;
  473. overflow: hidden;
  474. margin: 0rpx auto;
  475. padding: 20rpx 35rpx;
  476. border-bottom: 2rpx solid #DDDDDD;
  477. .box_left{
  478. float: left;
  479. width: 140rpx;
  480. height: 190rpx;
  481. margin-top: 10rpx;
  482. .car_image{
  483. width: 140rpx;
  484. height: 140rpx;
  485. border-radius: 5rpx;
  486. }
  487. }
  488. .box_center{
  489. float: left;
  490. width: 300rpx;
  491. margin-left: 25rpx;
  492. .car_name{
  493. max-height: 80rpx;
  494. font-size: 30rpx;
  495. line-height: 50rpx;
  496. overflow: hidden;
  497. }
  498. .car_spec{
  499. color: #999999;
  500. font-size: 24rpx;
  501. line-height: 60rpx;
  502. max-height: 60rpx;
  503. overflow: hidden;
  504. }
  505. .car_price{
  506. font-size: 30rpx;
  507. line-height: 60rpx;
  508. .price{
  509. color: red;
  510. }
  511. }
  512. }
  513. .box_right{
  514. float: right;
  515. width: 185rpx;
  516. .buy_num_box{
  517. float: right;
  518. color: #333333;
  519. overflow: hidden;
  520. font-size: 24rpx;
  521. margin-top: 130rpx;
  522. text-align: center;
  523. .buy_num{
  524. float: left;
  525. width: 100rpx;
  526. height: 30rpx;
  527. font-size: 24rpx;
  528. line-height: 30rpx;
  529. padding: 0rpx 0rpx;
  530. border-radius: 8rpx;
  531. }
  532. }
  533. }
  534. }
  535. .car_item:last-child{
  536. border-bottom: none;
  537. }
  538. }
  539. .to_select_coupon{
  540. display: block;
  541. height: 120rpx;
  542. font-size: 30rpx;
  543. margin: 20rpx auto;
  544. background: #FFFFFF;
  545. padding: 0rpx 35rpx;
  546. line-height: 120rpx;
  547. .coupon_deduction{
  548. color: red;
  549. float: right;
  550. font-size: 26rpx;
  551. }
  552. }
  553. .bottom_box{
  554. left: 0rpx;
  555. z-index: 9;
  556. width: 100%;
  557. height: 140rpx;
  558. display: block;
  559. position: fixed;
  560. overflow: hidden;
  561. background: #FFFFFF;
  562. padding: 0rpx 35rpx;
  563. bottom: var(--window-bottom);
  564. .price_box{
  565. float: left;
  566. width: 500rpx;
  567. display: block;
  568. color: #666666;
  569. font-size: 26rpx;
  570. text-align: right;
  571. line-height: 100rpx;
  572. margin-right: 20rpx;
  573. .price_total{
  574. color: red;
  575. font-size: 30rpx;
  576. }
  577. }
  578. .to_order{
  579. float: left;
  580. width: 180rpx;
  581. height: 80rpx;
  582. display: block;
  583. color: #FFFFFF;
  584. font-size: 28rpx;
  585. margin-top: 10rpx;
  586. line-height: 80rpx;
  587. padding: 0rpx 0rpx;
  588. text-align: center;
  589. border-radius: 40rpx;
  590. background-color: #E03519;
  591. }
  592. }
  593. .popup{
  594. .popup_title{
  595. display: block;
  596. overflow: hidden;
  597. margin: 0rpx auto;
  598. font-size: 36rpx;
  599. height: 120rpx;
  600. line-height: 120rpx;
  601. padding: 0rpx 20rpx;
  602. border-bottom: 10rpx solid #F8F8F8;
  603. .to_addr_page{
  604. float: right;
  605. color: #F59A23;
  606. display: block;
  607. height: 120rpx;
  608. line-height: 120rpx;
  609. font-size: 26rpx;
  610. padding: 0rpx 10rpx;
  611. }
  612. }
  613. .coupon_list{
  614. display: block;
  615. overflow: hidden;
  616. margin: 10rpx auto;
  617. min-height: 600rpx;
  618. background: #FFFFFF;
  619. padding-bottom: 50rpx;
  620. .coupon_item{
  621. height: 200rpx;
  622. display: block;
  623. margin: 10rpx auto;
  624. border-bottom: 2rpx solid #DDDDDD;
  625. .box_left{
  626. float: left;
  627. width: 160rpx;
  628. height: 160rpx;
  629. font-size: 20rpx;
  630. text-align: center;
  631. margin-left: 35rpx;
  632. line-height: 60rpx;
  633. margin-top: 20rpx;
  634. background: pink;
  635. .rebate{
  636. width: 120rpx;
  637. height: 60rpx;
  638. margin: 0rpx auto;
  639. line-height: 60rpx;
  640. margin-top: 20rpx;
  641. overflow: hidden;
  642. white-space: nowrap;
  643. text-overflow: ellipsis;
  644. }
  645. }
  646. .box_right{
  647. float: left;
  648. width: 485rpx;
  649. margin-left: 35rpx;
  650. padding-top: 20rpx;
  651. .coupon_title{
  652. width: 485rpx;
  653. max-height: 80rpx;
  654. font-size: 30rpx;
  655. overflow: hidden;
  656. line-height: 40rpx;
  657. padding: 0rpx 0rpx;
  658. .coupon_name{
  659. float: left;
  660. height: 40rpx;
  661. width: 380rpx;
  662. }
  663. .coupon_status{
  664. width: 85rpx;
  665. float: right;
  666. color: #999999;
  667. font-size: 24rpx;
  668. }
  669. }
  670. .product_scope{
  671. width: 485rpx;
  672. height: 80rpx;
  673. color: #999999;
  674. font-size: 24rpx;
  675. overflow: hidden;
  676. line-height: 80rpx;
  677. .check_label{
  678. float: right;
  679. display: block;
  680. overflow: hidden;
  681. padding: 20rpx 20rpx;
  682. .isstd{
  683. line-height: 40rpx;
  684. }
  685. .checkbox{
  686. float: right;
  687. width: 40rpx;
  688. height: 40rpx;
  689. }
  690. }
  691. }
  692. .coupon_info{
  693. width: 485rpx;
  694. max-height: 80rpx;
  695. font-size: 30rpx;
  696. overflow: hidden;
  697. line-height: 40rpx;
  698. padding: 0rpx 0rpx;
  699. .coupon_exp{
  700. float: left;
  701. font-size: 20rpx;
  702. }
  703. }
  704. }
  705. }
  706. .coupon_item:last-child{
  707. border-bottom: none;
  708. }
  709. }
  710. .addr_list{
  711. width: 730rpx;
  712. display: block;
  713. overflow: hidden;
  714. margin: 0rpx auto;
  715. min-height: 500rpx;
  716. .addr_item{
  717. display: block;
  718. font-size: 24rpx;
  719. overflow: hidden;
  720. line-height: 40rpx;
  721. padding: 15rpx 10rpx;
  722. border-radius: 15rpx;
  723. border-bottom: 2rpx solid #dddddd;
  724. .radio_label{
  725. width: 40rpx;
  726. float: left;
  727. height: 50rpx;
  728. padding-top: 30rpx;
  729. margin-right: 20rpx;
  730. .radio_icon{
  731. float: left;
  732. width: 40rpx;
  733. height: 40rpx;
  734. }
  735. }
  736. .contact_user{
  737. float: left;
  738. width: 640rpx;
  739. display: block;
  740. height: 50rpx;
  741. font-size: 24rpx;
  742. line-height: 50rpx;
  743. .contact_name{
  744. font-size: 26rpx;
  745. font-weight: bold;
  746. margin-right: 16rpx;
  747. }
  748. .contact_default{
  749. color: #F59A23;
  750. font-size: 20rpx;
  751. margin-left: 16rpx;
  752. border: 1rpx solid #F59A23;
  753. }
  754. .contact_shop{
  755. float: right;
  756. font-size: 26rpx;
  757. margin-right: 16rpx;
  758. }
  759. }
  760. .contact_addr{
  761. float: left;
  762. width: 640rpx;
  763. display: block;
  764. font-size: 24rpx;
  765. line-height: 30rpx;
  766. padding: 10rpx 5rpx;
  767. }
  768. }
  769. }
  770. .create_box{
  771. height: 140rpx;
  772. display: block;
  773. .create_addr{
  774. width: 700rpx;
  775. height: 80rpx;
  776. display: block;
  777. color: #FFFFFF;
  778. font-size: 30rpx;
  779. overflow: hidden;
  780. line-height: 80rpx;
  781. padding: 0rpx 0rpx;
  782. text-align: center;
  783. margin: 0rpx auto;
  784. margin-top: 20rpx;
  785. border-radius: 40rpx;
  786. background-color: #E03519;
  787. }
  788. }
  789. }
  790. </style>