product.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889
  1. <template>
  2. <view>
  3. <page-meta :page-style="'overflow:' + (show ? 'hidden' : 'visible')"></page-meta>
  4. <view>
  5. <view class="product_image_box">
  6. <image class="product_image" :src="productInfo.thumb" mode="heightFix"></image>
  7. </view>
  8. <view class="product_info">
  9. <view class="stock_price">
  10. <view class="product_price">
  11. <text>{{ productInfo.score }} 积分</text>
  12. </view>
  13. <view class="product_stock">剩{{ productInfo.stock }}个</view>
  14. </view>
  15. <view class="product_name">{{ productInfo.name }}</view>
  16. <view class="product_spec">{{ productInfo.spec }}</view>
  17. </view>
  18. <view class="product_description">
  19. <rich-text :nodes="productInfo.description"></rich-text>
  20. </view>
  21. <view class="order_car">
  22. <button class="show_order" data-eventsync="true" @click="showSpecPopup(1)">立即兑换</button>
  23. </view>
  24. <view class="to_bottom"> --- 到底了 --- </view>
  25. <uni-popup ref="specPopup" :show="true" type="bottom" class="popup" background-color="#FFFFFF" @change="popupChange">
  26. <view class="order_info">
  27. <view class="custom_addr" @click="showAddrPopup()">
  28. <view class="contact_user">
  29. <text class="contact_none" v-if="!checkedAddr.id">请选择收货地址</text>
  30. <text class="contact_name">{{ checkedAddr.contact_name }}</text>
  31. <text class="contact_phone">{{ checkedAddr.contact_phone }}</text>
  32. <text class="contact_more"> &gt;</text>
  33. <view class="contact_shop text-ellipsis" style="width: 250rpx; text-align: end">
  34. <text v-if="checkedAddr.shop_type">({{ $CONSTANTS.SHOP_TYPES[checkedAddr.shop_type] }})&nbsp;</text>
  35. {{ checkedAddr.contact_shop }}
  36. </view>
  37. </view>
  38. <view class="contact_addr" style="display: flex"> {{ checkedAddr.contact_province }} {{ checkedAddr.contact_city }} {{ checkedAddr.contact_area }} {{ checkedAddr.contact_addr }} </view>
  39. </view>
  40. <view class="car_item">
  41. <view class="box_left">
  42. <image class="car_image" :src="productInfo.thumb" mode=""></image>
  43. </view>
  44. <view class="box_right">
  45. <view class="car_name">{{ productInfo.name }}</view>
  46. <view class="stock_price">
  47. <view class="product_price">
  48. <text>{{ productInfo.score }} 积分</text>
  49. </view>
  50. <view class="product_quantity_box">
  51. <button class="product_quantity_sub" @click="changeQuantity(-1)" data-eventsync="true">
  52. <image class="sub_icon" src="https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/icon/sub_icon.png" mode=""></image>
  53. </button>
  54. <input type="number" class="product_quantity" placeholder="数量" v-model="quantity" @blur="changeQuantity(0)" />
  55. <button class="product_quantity_add" @click="changeQuantity(+1)" data-eventsync="true">
  56. <image class="add_icon" src="https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/icon/add_icon.png" mode=""></image>
  57. </button>
  58. </view>
  59. </view>
  60. <view class="product_stock">剩{{ productInfo.stock }}个</view>
  61. </view>
  62. </view>
  63. <!-- 购物车增加两个撑高度 -->
  64. <view class="to_select_coupon"></view>
  65. <view class="to_select_coupon"></view>
  66. <view class="order_price">合计: {{ priceTotal }} 积分</view>
  67. <view class="order_btn">
  68. <button class="to_order" @click="createOrder()" data-eventsync="true">兑换</button>
  69. </view>
  70. </view>
  71. </uni-popup>
  72. <uni-popup ref="addrPopup" type="bottom" class="popup" background-color="#FFFFFF">
  73. <view class="popup_title"
  74. >收货地址
  75. <navigator url="/pages/addr/index?notify=addr" class="to_addr_page">管理</navigator>
  76. </view>
  77. <view class="addr_list">
  78. <view class="addr_item" v-for="(item, index) in addrList" :key="index" @click="checkedAddrItem(item)">
  79. <view class="radio_label">
  80. <image
  81. class="radio_icon"
  82. :src="item.id == checkedAddr.id ? 'https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/icon/radioed.png' : 'https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/icon/radio.png'"
  83. ></image>
  84. </view>
  85. <view class="contact_user">
  86. <text class="contact_name">{{ item.contact_name }}</text>
  87. <text class="contact_phone">{{ item.contact_phone }}</text>
  88. <text class="contact_default" v-if="item.is_default">默认</text>
  89. <view class="contact_shop text-ellipsis" style="width: 250rpx; text-align: end">
  90. <text v-if="item.shop_type">({{ $CONSTANTS.SHOP_TYPES[item.shop_type] }})&nbsp;</text>
  91. {{ item.contact_shop }}
  92. </view>
  93. </view>
  94. <view class="contact_addr" style="display: flex"> {{ item.contact_province }} {{ item.contact_city }} {{ item.contact_area }} {{ item.contact_addr }} </view>
  95. </view>
  96. </view>
  97. <view class="create_box">
  98. <navigator url="/pages/addr/index?notify=addr&type=create" class="create_addr">新建收货地址</navigator>
  99. </view>
  100. </uni-popup>
  101. </view>
  102. </view>
  103. </template>
  104. <script>
  105. export default {
  106. data() {
  107. return {
  108. show: false, // 使用Popup组件时,阻止禁止滚动穿透
  109. productInfo: {
  110. id: 0,
  111. name: "",
  112. score: 0,
  113. spec: "",
  114. stock: 0,
  115. thumb: "",
  116. description: "",
  117. },
  118. requestParam: {
  119. id: 0,
  120. },
  121. // 数量
  122. quantity: 1,
  123. // 总价
  124. priceTotal: "0.00",
  125. // 规格选择按钮类型
  126. specBtnType: 1, // 1预约。2购物车
  127. // 地址列表
  128. addrList: [],
  129. // 已选地址
  130. checkedAddr: {
  131. id: 0,
  132. contact_name: "",
  133. contact_phone: "",
  134. contact_province: "",
  135. contact_city: "",
  136. contact_area: "",
  137. contact_addr: "",
  138. is_default: 0,
  139. },
  140. };
  141. },
  142. onLoad(param) {
  143. // 接受路由参数,产品ID
  144. this.requestParam.id = param.id;
  145. var that = this;
  146. // 监听地址变动
  147. uni.$on("addr_list_change", function (data) {
  148. // 地址列表
  149. that.addrList = data.list;
  150. });
  151. // #ifdef MP-WEIXIN
  152. //分享按钮
  153. uni.showShareMenu({
  154. withShareTicket: true,
  155. menus: ["shareAppMessage", "shareTimeline"],
  156. });
  157. // #endif
  158. },
  159. onShareAppMessage(obj) {
  160. return {
  161. title: `999智控终端平台\n${this.productInfo.name}`,
  162. path: "/pages/score/product?id=" + this.productInfo.id,
  163. promise: new Promise((resolve, reject) => {
  164. this.$http.request("api/share_message/get_item", { item_id: this.productInfo.id, pages: "/pages/score/product" }).then((callback) => {
  165. console.log(callback, "api/share_message/get_item");
  166. let obj = {
  167. title: callback.data?.title == "" ? `999智控终端平台\n${this.productInfo.name}` : callback.data.title,
  168. path: "/pages/score/product?id=" + this.productInfo.id,
  169. };
  170. if (callback.data?.image_url !== "") {
  171. obj.imageUrl = callback.data.image_url;
  172. }
  173. resolve(obj);
  174. });
  175. }),
  176. };
  177. },
  178. onShow() {
  179. // 如果存在产品ID的话
  180. if (this.requestParam.id > 0) {
  181. // 请求详情
  182. this.$http.request("api/score_product/get_detail", this.requestParam).then((re) => {
  183. // 成功渲染数据
  184. if (re.code == "success") {
  185. // 刷新数据
  186. this.productInfo = re.data;
  187. }
  188. });
  189. }
  190. },
  191. methods: {
  192. // 地址弹出层
  193. showAddrPopup() {
  194. // 显示下单弹出层
  195. this.$refs.addrPopup.open("bottom");
  196. },
  197. // 规格弹出层
  198. showSpecPopup(type) {
  199. // 登录提示
  200. // if( !this.$checkAccess.alterLogin()) return ;
  201. // 显示下单弹出层
  202. this.$refs.specPopup.open("bottom");
  203. // 地址列表
  204. this.getAddrList();
  205. // 计算价格
  206. this.priceHandler();
  207. },
  208. // 数量调整
  209. changeQuantity(number) {
  210. // 如果不是0.表示两侧按钮点击,0表示输入的修改
  211. if (number != 0) {
  212. // 计算个数
  213. this.quantity = this.quantity + number;
  214. }
  215. // 如果大于库存设置为库存
  216. if (this.quantity > this.productInfo.stock) {
  217. this.quantity = this.productInfo.stock;
  218. uni.showToast({
  219. title: "库存不足",
  220. icon: "none",
  221. });
  222. }
  223. // 如果小于1.设置为1
  224. if (this.quantity < 1) {
  225. this.quantity = 1;
  226. uni.showToast({ title: "数量不可以小于0", icon: "none" });
  227. }
  228. // 计算价格
  229. this.priceHandler();
  230. },
  231. // 创建订单
  232. createOrder() {
  233. // 不可预约
  234. if (!this.$checkAccess.alertCity()) return;
  235. // 下单数量小于0
  236. if (this.quantity < 1) {
  237. uni.showToast({
  238. title: "至少兑换1个",
  239. });
  240. return;
  241. }
  242. // 如果大于库存设置为库存
  243. if (this.productInfo.stock < 1) {
  244. uni.showToast({
  245. title: "库存不足",
  246. icon: "none",
  247. });
  248. return;
  249. }
  250. // 地址未填
  251. if (!this.checkedAddr.id) {
  252. uni.showToast({
  253. title: "请选择收货地址",
  254. icon: "none",
  255. });
  256. return;
  257. }
  258. // 请求接口
  259. this.$http
  260. .request(
  261. "api/score_orders/create",
  262. {
  263. product_id: this.productInfo.id,
  264. buy_num: this.quantity,
  265. addr_id: this.checkedAddr.id,
  266. },
  267. "post"
  268. )
  269. .then((re) => {
  270. // 判断结果
  271. if (re.code == "success") {
  272. // 处理结果
  273. this.productInfo.stock = this.productInfo.stock - this.quantity;
  274. // 关闭弹窗
  275. this.$refs.specPopup.close();
  276. // 跳转到订单列表
  277. uni.navigateTo({ url: "/pages/score/orders" });
  278. return;
  279. } else {
  280. uni.showModal({ title: re.msg, showCancel: false });
  281. }
  282. });
  283. },
  284. // 计算价格
  285. priceHandler() {
  286. // 小数点保留
  287. this.priceTotal = this.productInfo.score * this.quantity;
  288. },
  289. popupChange(e) {
  290. // 禁止滚动穿透
  291. this.show = e.show;
  292. },
  293. // 选择地址
  294. checkedAddrItem(item) {
  295. this.checkedAddr = item;
  296. this.$refs.addrPopup.close();
  297. },
  298. getAddrList() {
  299. // 判断数据
  300. this.$http.request("api/custom_addr/get_list").then((callback) => {
  301. // 获取成功
  302. if (callback.code == "success") {
  303. this.addrList = callback.data;
  304. // 如果有的话
  305. if (this.addrList.length) {
  306. // 获取默认的
  307. for (let i in this.addrList) {
  308. // 如果是默认的
  309. if (this.addrList[i].is_default) this.checkedAddr = this.addrList[i];
  310. }
  311. // 如果没有默认的话
  312. if (!this.checkedAddr.id) {
  313. this.checkedAddr = this.addrList[this.addrList.length - 1];
  314. }
  315. }
  316. }
  317. });
  318. },
  319. },
  320. };
  321. </script>
  322. <style lang="less">
  323. .product_image_box {
  324. display: block;
  325. overflow: hidden;
  326. background: #ffffff;
  327. margin: 10rpx auto;
  328. .product_image {
  329. display: block;
  330. margin: 0 auto;
  331. width: 750rpx;
  332. height: 750rpx;
  333. }
  334. }
  335. .product_info {
  336. display: block;
  337. background: #ffffff;
  338. margin: 10rpx 0rpx;
  339. padding: 10px 10px;
  340. .product_name {
  341. max-height: 80rpx;
  342. font-size: 30rpx;
  343. line-height: 40rpx;
  344. overflow: hidden;
  345. padding: 10rpx 0rpx;
  346. }
  347. .product_spec {
  348. color: #999999;
  349. font-size: 24rpx;
  350. line-height: 30rpx;
  351. }
  352. .stock_price {
  353. font-size: 20rpx;
  354. overflow: hidden;
  355. margin-top: 10rpx;
  356. line-height: 30rpx;
  357. .product_price {
  358. float: left;
  359. color: red;
  360. font-size: 38rpx;
  361. line-height: 60rpx;
  362. .product_market {
  363. font-size: 24rpx;
  364. color: #999999;
  365. line-height: 30rpx;
  366. margin-left: 10rpx;
  367. text-decoration: line-through;
  368. }
  369. }
  370. .product_stock {
  371. color: #333333;
  372. float: right;
  373. font-size: 20rpx;
  374. line-height: 60rpx;
  375. }
  376. }
  377. }
  378. // 描述简介
  379. .product_business {
  380. display: block;
  381. overflow: hidden;
  382. padding: 20rpx 20rpx;
  383. margin: 10rpx auto;
  384. background: #ffffff;
  385. .logopic {
  386. float: left;
  387. width: 80rpx;
  388. height: 80rpx;
  389. border-radius: 50%;
  390. margin-right: 20rpx;
  391. }
  392. .business_info {
  393. float: left;
  394. width: 600rpx;
  395. overflow: hidden;
  396. .business_name {
  397. font-size: 26rpx;
  398. line-height: 40rpx;
  399. }
  400. .business_desc {
  401. color: #999999;
  402. font-size: 24rpx;
  403. line-height: 40rpx;
  404. }
  405. }
  406. }
  407. .product_description {
  408. width: 700rpx;
  409. display: block;
  410. overflow: hidden;
  411. background: #ffffff;
  412. min-height: 600rpx;
  413. font-size: 26rpx;
  414. margin: 0rpx auto;
  415. line-height: 50rpx;
  416. padding: 10rpx 25rpx;
  417. [alt] {
  418. //web_view图片
  419. max-width: 100%; // 避免图片超宽
  420. vertical-align: bottom; // 避免图片之间间隙
  421. }
  422. }
  423. .product_poster {
  424. display: block;
  425. overflow: hidden;
  426. padding: 10rpx 0rpx;
  427. margin: 10rpx auto;
  428. background: #ffffff;
  429. .product_image {
  430. width: 750rpx;
  431. display: block;
  432. }
  433. }
  434. .order_car {
  435. left: 0rpx;
  436. width: 750rpx;
  437. height: 140rpx;
  438. display: block;
  439. position: fixed;
  440. padding-top: 20rpx;
  441. background: #ffffff;
  442. bottom: var(--window-bottom);
  443. border-top: 2rpx solid #dddddd;
  444. .show_order {
  445. width: 700rpx;
  446. height: 80rpx;
  447. display: block;
  448. color: #ffffff;
  449. font-size: 30rpx;
  450. overflow: hidden;
  451. line-height: 80rpx;
  452. padding: 0rpx 0rpx;
  453. text-align: center;
  454. margin: 0rpx auto;
  455. border-radius: 40rpx;
  456. background-color: #e03519;
  457. }
  458. }
  459. .popup {
  460. overflow: hidden;
  461. .popup_title {
  462. display: block;
  463. overflow: hidden;
  464. margin: 0rpx auto;
  465. font-size: 36rpx;
  466. height: 120rpx;
  467. line-height: 120rpx;
  468. padding: 0rpx 20rpx;
  469. border-bottom: 10rpx solid #f8f8f8;
  470. .to_addr_page {
  471. float: right;
  472. color: #f59a23;
  473. display: block;
  474. height: 120rpx;
  475. line-height: 120rpx;
  476. font-size: 26rpx;
  477. padding: 0rpx 10rpx;
  478. }
  479. }
  480. .order_info {
  481. overflow: hidden;
  482. background: #ffffff;
  483. .custom_addr {
  484. width: 680rpx;
  485. display: block;
  486. font-size: 24rpx;
  487. overflow: hidden;
  488. margin: 0rpx auto;
  489. line-height: 40rpx;
  490. padding: 20rpx 35rpx;
  491. background-color: #ffffff;
  492. border-bottom: 2rpx solid #dddddd;
  493. .contact_user {
  494. display: block;
  495. font-size: 24rpx;
  496. line-height: 50rpx;
  497. .contact_none {
  498. color: #e03519;
  499. font-size: 26rpx;
  500. font-weight: bold;
  501. }
  502. .contact_name {
  503. font-size: 26rpx;
  504. font-weight: bold;
  505. margin-right: 16rpx;
  506. }
  507. .contact_more {
  508. float: right;
  509. font-size: 40rpx;
  510. font-weight: bold;
  511. }
  512. .contact_shop {
  513. float: right;
  514. font-size: 26rpx;
  515. margin-right: 16rpx;
  516. }
  517. }
  518. .contact_addr {
  519. width: 620rpx;
  520. display: block;
  521. font-size: 24rpx;
  522. line-height: 30rpx;
  523. padding: 10rpx 5rpx;
  524. }
  525. }
  526. .min600 {
  527. min-height: 600rpx;
  528. }
  529. .car_item {
  530. height: 200rpx;
  531. display: block;
  532. background: #ffffff;
  533. margin: 20rpx auto;
  534. .box_left {
  535. float: left;
  536. width: 160rpx;
  537. height: 200rpx;
  538. margin-left: 35rpx;
  539. .car_image {
  540. width: 160rpx;
  541. height: 160rpx;
  542. margin: 20rpx 0rpx;
  543. border-radius: 5rpx;
  544. }
  545. }
  546. .box_right {
  547. float: left;
  548. width: 485rpx;
  549. margin-left: 35rpx;
  550. padding-top: 20rpx;
  551. .car_name {
  552. max-height: 80rpx;
  553. font-size: 30rpx;
  554. line-height: 40rpx;
  555. overflow: hidden;
  556. padding: 0rpx 0rpx;
  557. }
  558. .car_spec {
  559. color: #999999;
  560. font-size: 24rpx;
  561. line-height: 30rpx;
  562. padding: 0rpx 0rpx;
  563. }
  564. .stock_price {
  565. width: 485rpx;
  566. color: #dddddd;
  567. font-size: 20rpx;
  568. overflow: hidden;
  569. margin-top: 10rpx;
  570. line-height: 30rpx;
  571. .product_price {
  572. float: left;
  573. color: red;
  574. font-size: 30rpx;
  575. line-height: 60rpx;
  576. .car_market {
  577. font-size: 24rpx;
  578. color: #999999;
  579. line-height: 30rpx;
  580. vertical-align: middle;
  581. text-decoration: line-through;
  582. }
  583. }
  584. .product_quantity_box {
  585. float: right;
  586. color: #333333;
  587. overflow: hidden;
  588. font-size: 24rpx;
  589. margin-top: 10rpx;
  590. text-align: center;
  591. .product_quantity_sub {
  592. float: left;
  593. border: none;
  594. height: 36rpx;
  595. background: none;
  596. text-align: center;
  597. line-height: 36rpx;
  598. padding: 10rpx 10rpx;
  599. .sub_icon {
  600. width: 22rpx;
  601. height: 22rpx;
  602. display: block;
  603. }
  604. }
  605. .product_quantity_sub::after {
  606. border: none;
  607. background: none;
  608. }
  609. .product_quantity {
  610. float: left;
  611. width: 100rpx;
  612. height: 36rpx;
  613. font-size: 24rpx;
  614. min-height: 36rpx;
  615. line-height: 36rpx;
  616. padding: 0rpx 0rpx;
  617. border-radius: 8rpx;
  618. border: 2rpx solid #dddddd;
  619. }
  620. .product_quantity_add {
  621. float: left;
  622. border: none;
  623. height: 36rpx;
  624. background: none;
  625. text-align: center;
  626. padding: 10rpx 10rpx;
  627. line-height: 36rpx;
  628. .add_icon {
  629. width: 22rpx;
  630. height: 22rpx;
  631. display: block;
  632. }
  633. }
  634. .product_quantity_add::after {
  635. border: none;
  636. background: none;
  637. }
  638. }
  639. }
  640. .product_stock {
  641. font-size: 20rpx;
  642. line-height: 60rpx;
  643. }
  644. }
  645. }
  646. .to_select_coupon {
  647. font-size: 28rpx;
  648. padding: 30rpx 35rpx;
  649. margin-bottom: 20rpx;
  650. .coupon_deduction {
  651. color: red;
  652. float: right;
  653. }
  654. }
  655. .order_price {
  656. font-size: 28rpx;
  657. text-align: right;
  658. margin: 0rpx 35rpx;
  659. padding: 20rpx 0rpx;
  660. border-top: 2rpx solid #dddddd;
  661. .coupon_deduction {
  662. color: red;
  663. float: right;
  664. }
  665. }
  666. .order_btn {
  667. width: 700rpx;
  668. height: 100rpx;
  669. display: block;
  670. margin: 0 auto;
  671. margin-top: 70rpx;
  672. line-height: 80rpx;
  673. text-align: center;
  674. font-size: 30rpx;
  675. .to_car {
  676. color: #ffffff;
  677. float: right;
  678. width: 700rpx;
  679. height: 80rpx;
  680. display: block;
  681. overflow: hidden;
  682. font-size: 30rpx;
  683. line-height: 80rpx;
  684. padding: 0rpx 0rpx;
  685. border-radius: 40rpx;
  686. border: 0rpx solid transparent;
  687. background-color: #f59a23;
  688. }
  689. .to_car::after {
  690. border: 0rpx solid transparent;
  691. }
  692. .to_order {
  693. color: #ffffff;
  694. float: right;
  695. width: 700rpx;
  696. height: 80rpx;
  697. display: block;
  698. font-size: 30rpx;
  699. overflow: hidden;
  700. line-height: 80rpx;
  701. padding: 0rpx 0rpx;
  702. border-radius: 40rpx;
  703. background-color: #e03519;
  704. border: 0rpx solid transparent;
  705. }
  706. .to_order::after {
  707. border: 0rpx solid transparent;
  708. }
  709. }
  710. }
  711. .coupon_list {
  712. display: block;
  713. overflow: hidden;
  714. min-height: 600rpx;
  715. margin: 10rpx auto;
  716. background: #ffffff;
  717. padding-bottom: 50rpx;
  718. .coupon_item {
  719. height: 200rpx;
  720. display: block;
  721. margin: 10rpx auto;
  722. border-bottom: 2rpx solid #dddddd;
  723. .box_left {
  724. float: left;
  725. width: 160rpx;
  726. height: 160rpx;
  727. font-size: 20rpx;
  728. text-align: center;
  729. margin-left: 35rpx;
  730. line-height: 60rpx;
  731. margin-top: 20rpx;
  732. background: pink;
  733. .rebate {
  734. width: 120rpx;
  735. height: 60rpx;
  736. margin: 0rpx auto;
  737. line-height: 60rpx;
  738. margin-top: 20rpx;
  739. overflow: hidden;
  740. white-space: nowrap;
  741. text-overflow: ellipsis;
  742. }
  743. }
  744. .box_right {
  745. float: left;
  746. width: 485rpx;
  747. margin-left: 35rpx;
  748. padding-top: 20rpx;
  749. .coupon_title {
  750. width: 485rpx;
  751. max-height: 80rpx;
  752. font-size: 30rpx;
  753. overflow: hidden;
  754. line-height: 40rpx;
  755. padding: 0rpx 0rpx;
  756. .coupon_name {
  757. float: left;
  758. height: 40rpx;
  759. width: 380rpx;
  760. }
  761. .coupon_status {
  762. width: 85rpx;
  763. float: right;
  764. color: #999999;
  765. font-size: 24rpx;
  766. }
  767. }
  768. .product_scope {
  769. width: 485rpx;
  770. height: 80rpx;
  771. color: #999999;
  772. font-size: 24rpx;
  773. overflow: hidden;
  774. line-height: 80rpx;
  775. .check_label {
  776. float: right;
  777. display: block;
  778. overflow: hidden;
  779. padding: 20rpx 20rpx;
  780. .isstd {
  781. line-height: 40rpx;
  782. }
  783. .checkbox {
  784. float: right;
  785. width: 40rpx;
  786. height: 40rpx;
  787. }
  788. }
  789. }
  790. .coupon_info {
  791. width: 485rpx;
  792. max-height: 80rpx;
  793. font-size: 30rpx;
  794. overflow: hidden;
  795. line-height: 40rpx;
  796. padding: 0rpx 0rpx;
  797. .coupon_exp {
  798. float: left;
  799. font-size: 20rpx;
  800. }
  801. }
  802. }
  803. }
  804. .coupon_item:last-child {
  805. border-bottom: none;
  806. }
  807. }
  808. .addr_list {
  809. width: 730rpx;
  810. display: block;
  811. overflow: hidden;
  812. margin: 0rpx auto;
  813. min-height: 500rpx;
  814. .addr_item {
  815. display: block;
  816. font-size: 24rpx;
  817. overflow: hidden;
  818. line-height: 40rpx;
  819. padding: 15rpx 10rpx;
  820. border-radius: 15rpx;
  821. border-bottom: 2rpx solid #dddddd;
  822. .radio_label {
  823. width: 40rpx;
  824. float: left;
  825. height: 50rpx;
  826. padding-top: 30rpx;
  827. margin-right: 20rpx;
  828. .radio_icon {
  829. float: left;
  830. width: 40rpx;
  831. height: 40rpx;
  832. }
  833. }
  834. .contact_user {
  835. float: left;
  836. width: 640rpx;
  837. display: block;
  838. height: 50rpx;
  839. font-size: 24rpx;
  840. line-height: 50rpx;
  841. .contact_name {
  842. font-size: 26rpx;
  843. font-weight: bold;
  844. margin-right: 16rpx;
  845. }
  846. .contact_default {
  847. color: #f59a23;
  848. font-size: 20rpx;
  849. margin-left: 16rpx;
  850. border: 1rpx solid #f59a23;
  851. }
  852. .contact_shop {
  853. float: right;
  854. font-size: 26rpx;
  855. }
  856. }
  857. .contact_addr {
  858. float: left;
  859. width: 640rpx;
  860. display: block;
  861. font-size: 24rpx;
  862. line-height: 30rpx;
  863. padding: 10rpx 5rpx;
  864. }
  865. }
  866. }
  867. .create_box {
  868. height: 140rpx;
  869. display: block;
  870. .create_addr {
  871. width: 700rpx;
  872. height: 80rpx;
  873. display: block;
  874. color: #ffffff;
  875. font-size: 30rpx;
  876. overflow: hidden;
  877. line-height: 80rpx;
  878. padding: 0rpx 0rpx;
  879. text-align: center;
  880. margin: 0rpx auto;
  881. margin-top: 20rpx;
  882. border-radius: 40rpx;
  883. background-color: #e03519;
  884. }
  885. }
  886. }
  887. </style>