createOrder.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948
  1. <template>
  2. <view>
  3. <radio-group @change="changeTab">
  4. <ul class="tab_list">
  5. <li><label>快递配送<radio :value="1" :checked="tabActive==1" /></label></li>
  6. <li><label>到店自提<radio :value="2" :checked="tabActive==2" /></label></li>
  7. </ul>
  8. </radio-group>
  9. <!-- 地址 -->
  10. <navigator v-if="tabActive == 1" url="/pages/address/address?source=1" class="address-section">
  11. <view class="order-content">
  12. <text class="yticon icon-shouhuodizhi"></text>
  13. <view class="cen" v-if="addressData && addressData.name">
  14. <view class="top">
  15. <text class="name">{{addressData.name}}</text>
  16. <text class="mobile">{{addressData.mobile}}</text>
  17. </view>
  18. <text class="address">{{addressData.province.name+addressData.city.name+addressData.area.name+' '+addressData.address}}</text>
  19. </view>
  20. <view class="cen" v-else>请选择收货地址</view>
  21. <text class="yticon icon-you"></text>
  22. </view>
  23. <image class="a-bg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAu4AAAAFCAYAAAAaAWmiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG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BcWY65q9UAQb+c6+k3iePnaS+P5Pq8spOJ38fJ09RVI1OFuWo6xtJXSD+J6xh++OHN8PEt8HxtNY4pbAczC+m2Rnh8V3J9Q0Fa4LeG97YQdehj4aoSL9NZiZNMTKStp6g5/x5NsW37vWQaS1WXzPHvjihzYS/lgshbeJ75WySHm7wNXXk8SbK/xutOX4ntHtYRxE0eJn6uARaGf6ie++7GPNxVkf/78AAwCn1+RYqusbZQAAAABJRU5ErkJggg=="></image>
  24. </navigator>
  25. <navigator v-else url="/pages/store/index?source=1" class="address-section">
  26. <view class="order-content">
  27. <text class="yticon icon-shouhuodizhi"></text>
  28. <view class="cen" v-if="storeData && storeData.storename">
  29. <view class="top">
  30. <text class="name">{{storeData.storename}}</text>
  31. <text class="mobile">{{storeData.phone}}</text>
  32. </view>
  33. <text class="address">{{storeData.storeaddress}}</text>
  34. </view>
  35. <view class="cen" v-else>请选择附近网点</view>
  36. <text class="yticon icon-you"></text>
  37. </view>
  38. <image class="a-bg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAu4AAAAFCAYAAAAaAWmiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29t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9BYIeBZm0ap1BO2yHLMOIxjH111chmDocXg9XzZFR4fD74e5cA9GtQEulbLGbfaNMvv4+BfG3hiet9wxlUeDGdDPn68uqXVgVKKezbiBN/HHYoTnrqlORkDx0BHr/ABzVVbknbZysZ3wnRVyda6HU1UIjvpt28p2C+T+GEtYeeEh3jqcdKjl2BcWY65q9UAQb+c6+k3iePnaS+P5Pq8spOJ38fJ09RVI1OFuWo6xtJXSD+J6xh++OHN8PEt8HxtNY4pbAczC+m2Rnh8V3J9Q0Fa4LeG97YQdehj4aoSL9NZiZNMTKStp6g5/x5NsW37vWQaS1WXzPHvjihzYS/lgshbeJ75WySHm7wNXXk8SbK/xutOX4ntHtYRxE0eJn6uARaGf6ie++7GPNxVkf/78AAwCn1+RYqusbZQAAAABJRU5ErkJggg=="></image>
  39. </navigator>
  40. <view class="progress" v-if="progress.number"></view>
  41. <view class="goods-section">
  42. <!-- 商品列表 -->
  43. <view class="g-item" v-for="(item, index) in product" :key="item.id">
  44. <image :src="item.image" mode="aspectFill"></image>
  45. <view class="right">
  46. <text class="title clamp">{{item.title}}</text>
  47. <view class="spec">{{item.spec ? "规格:" + item.spec : ""}} {{" 库存:"+item.stock}} {{progress.number ? "(秒:"+progress.number+"件,剩:"+(progress.number - progress.sold)+"件)": ""}}</view>
  48. <view class="price-box">
  49. <view class="price">¥{{item.sales_price}} <del class="market_price">¥{{item.market_price}}</del></view>
  50. <!-- <text class="number">x 1</text> -->
  51. <uni-number-box v-if="progress.number" class="step" :min="1" :max="progress.number - progress.sold" :disabled="item.number>=(progress.number - progress.sold)" :value="item.number" :isMax="(progress.number - progress.sold) <= item.number?true:false"
  52. :isMin="item.number===1" :index="index" @eventChange="numberChange"></uni-number-box>
  53. <uni-number-box v-else class="step" :min="1" :max="item.stock" :disabled="item.number>=item.stock" :value="item.number" :isMax="item.stock <= item.number?true:false"
  54. :isMin="item.number===1" :index="index" @eventChange="numberChange"></uni-number-box>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. <!-- 优惠明细 -->
  60. <view class="yt-list" v-if="couponList && couponList.length">
  61. <view class="yt-list-cell b-b" @click="toggleMask('show')">
  62. <view class="cell-icon">
  63. </view>
  64. <text class="cell-tit clamp">优惠券</text>
  65. <text class="cell-tip active">
  66. {{useCouponIndex !== -1 ? couponList[useCouponIndex].title : '选择优惠券'}}
  67. </text>
  68. <text class="cell-more wanjia wanjia-gengduo-d"></text>
  69. </view>
  70. </view>
  71. <!-- 金额明细 -->
  72. <view class="yt-list">
  73. <view class="yt-list-cell b-b">
  74. <view class="cell-tit clamp">总共合计</view>
  75. <view class="cell-tip">¥{{price}}</view>
  76. </view>
  77. <label class="yt-list-cell b-b" @click="changeDeductionScore(maxDeductionScore)" for="maxDeductionScoreCheckbox" v-if="maxDeductionScore < userInfo['score']">
  78. <view class="cell-tit clamp"><checkbox id="maxDeductionScoreCheckbox" value="maxDeductionScore" ></checkbox>使用积分抵扣</view>
  79. <view class="cell-tip red">{{maxDeductionScore}}元</view>
  80. </label>
  81. <label class="yt-list-cell b-b" for="userInfoScore" v-else>
  82. <view class="cell-tit clamp"><checkbox @click="changeDeductionScore(userInfo['score'])" id="userInfoScore" value="userInfo['score']" ></checkbox>使用积分抵扣</view>
  83. <view class="cell-tip red">{{userInfo['score']}}元</view>
  84. </label>
  85. <view class="yt-list-cell b-b" v-if="couponList && couponList.length">
  86. <view class="cell-tit clamp">优惠金额</view>
  87. <view class="cell-tip red">-¥{{coupon_price}}</view>
  88. </view>
  89. <view class="yt-list-cell b-b">
  90. <view class="cell-tit clamp">配送方式
  91. <!-- <text style="color:red" @click="deliveryTemplate">(查看详情)</text> -->
  92. </view>
  93. <view class="cell-tip" v-if="deliveryList && deliveryList.length > 0">
  94. <picker @change="deliveryChange" range-key="name" :value="deliveryIndex" :range="deliveryList">
  95. <view class="uni-input">{{deliveryList[deliveryIndex].name}}</view>
  96. </picker>
  97. </view>
  98. </view>
  99. <view class="yt-list-cell b-b">
  100. <view class="cell-tit clamp">运费</view>
  101. <view class="cell-tip">¥{{deliveryPrice}}</view>
  102. </view>
  103. <view class="yt-list-cell desc-cell">
  104. <view class="cell-tit clamp">备注</view>
  105. <input class="desc" type="text" v-model="remark" placeholder="请填写备注信息" placeholder-class="placeholder" />
  106. </view>
  107. </view>
  108. <!-- 底部 -->
  109. <view class="footer">
  110. <view class="price-content">
  111. <text>实付款</text>
  112. <text class="price-tip">¥</text>
  113. <text class="price">{{total - deductionScore}}</text>
  114. </view>
  115. <text class="submit" @click="submit">提交订单</text>
  116. </view>
  117. <!-- 优惠券面板 -->
  118. <view class="mask" :class="maskState===0 ? 'none' : maskState===1 ? 'show' : ''" @click="toggleMask">
  119. <view class="mask-content" @click.stop.prevent="stopPrevent">
  120. <!-- 优惠券页面,仿mt -->
  121. <view class="coupon-item" v-for="(item,index) in couponList" :key="index" :class="useCouponIndex === index ? 'selectCoupon' : ''">
  122. <view class="con" v-on:click="useCoupon(index)">
  123. <view class="left">
  124. <text class="title">{{item.title}}</text>
  125. <text class="time">有效期至{{item.endtime_text}}</text>
  126. </view>
  127. <view class="right">
  128. <text class="price">{{item.value}}</text>
  129. <text>满{{item.least}}可用</text>
  130. </view>
  131. <view class="circle l"></view>
  132. <view class="circle r"></view>
  133. </view>
  134. <text class="tips">限一张使用</text>
  135. </view>
  136. </view>
  137. <button class="btn" @click="toggleMask">收起</button>
  138. </view>
  139. </view>
  140. </template>
  141. <script>
  142. import uniNumberBox from '@/components/uni-number-box.vue';
  143. export default {
  144. components: {
  145. uniNumberBox
  146. },
  147. data() {
  148. return {
  149. maskState: 0, //优惠券面板显示状态
  150. remark: '', //备注
  151. payType: 1, //1微信 2支付宝
  152. couponList: [],
  153. useCouponIndex: -1,
  154. addressData: {},
  155. storeData: {},
  156. product: [],
  157. userInfo: {
  158. score: 0
  159. },
  160. maxDeductionScore: 0,
  161. price: 0.00, //商品金额
  162. coupon_price: 0.00, //优惠券金额
  163. total: 0.00, //实付金额
  164. deliveryList: [],
  165. deliveryIndex: 0,
  166. deliveryPrice: 0.00,
  167. cart: [], // 购物车id
  168. flash_id: 0, // 秒杀id
  169. progress:{},
  170. submitLock:false ,// 提交按钮锁
  171. deductionScore: 0,
  172. tabActive: 1
  173. }
  174. },
  175. onLoad(options) {
  176. if (options.hasOwnProperty('flash_id')) {
  177. this.flash_id = options.flash_id;
  178. }
  179. if (options.hasOwnProperty('cart')) {
  180. this.cart = options.cart;
  181. // 从购物车进入
  182. this.getOrderCreate({
  183. cart: options.cart
  184. });
  185. } else {
  186. // 从商品进入
  187. this.getOrderCreate({
  188. id: options.id,
  189. spec: options.spec,
  190. flash_id: this.flash_id
  191. });
  192. }
  193. },
  194. onShow() {
  195. if (this.addressData && this.addressData.hasOwnProperty('city_id')) {
  196. // 检查当前地址是否存在于运费模板中
  197. this.getDelivery();
  198. }
  199. },
  200. methods: {
  201. // 计算百分比
  202. percentage(number, sold) {
  203. if (!sold) {
  204. return 0;
  205. }
  206. return parseInt(sold / number * 100);
  207. },
  208. // 获取运费模板
  209. async getDelivery() {
  210. let delivery = await this.$api.request('/order/getDelivery?city_id=' + this.addressData.city_id);
  211. if (delivery) {
  212. this.deliveryList = delivery;
  213. this.deliveryIndex = 0;
  214. this.calcTotal();
  215. }
  216. },
  217. // 选择运费模板
  218. deliveryChange(e) {
  219. this.deliveryIndex = e.detail.value;
  220. this.calcTotal();
  221. },
  222. // 使用优惠券
  223. useCoupon(index) {
  224. if (this.useCouponIndex !== index) {
  225. this.useCouponIndex = index;
  226. //this.coupon_price = this.couponList[index].value;
  227. } else {
  228. this.useCouponIndex = -1;
  229. // this.coupon_price = 0;
  230. }
  231. this.calcTotal();
  232. },
  233. //获取创建订单信息
  234. async getOrderCreate(param) {
  235. let that = this;
  236. let apiUrl = !param.flash_id || param.flash_id == 0 ? '/order/create' : '/flash/createOrder';
  237. let data = await this.$api.request(apiUrl, 'POST', param);
  238. let maxDeductionScore = 0;
  239. if (data) {
  240. this.addressData = data.address;
  241. const product = this.product = data.product;
  242. this.couponList = data.coupon;
  243. this.deliveryList = data.delivery;
  244. this.userInfo = data.userInfo;
  245. this.calcTotal();
  246. for(const i in product){
  247. maxDeductionScore += product[i]['maxDeductionScore'];
  248. }
  249. this.maxDeductionScore = maxDeductionScore;
  250. if (data.flash) {
  251. this.progress = data.flash;
  252. }
  253. } else {
  254. setTimeout(function() {
  255. that.$api.prePage().getDetail(param.id, param.flash_id);
  256. uni.navigateBack();
  257. }, 3000)
  258. }
  259. },
  260. //显示优惠券面板
  261. toggleMask(type) {
  262. let timer = type === 'show' ? 10 : 300;
  263. let state = type === 'show' ? 1 : 0;
  264. this.maskState = 2;
  265. setTimeout(() => {
  266. this.maskState = state;
  267. }, timer)
  268. },
  269. changePayType(type) {
  270. this.payType = type;
  271. },
  272. async submit() {
  273. // 如果没有地址则提示先加地址
  274. if (this.tabActive == 1 && (!this.addressData || !this.addressData.hasOwnProperty('city_id'))) {
  275. this.$api.msg('请选择收货地址');
  276. return;
  277. }
  278. if (this.tabActive == 2 && (!this.storeData || !this.storeData.hasOwnProperty('id'))) {
  279. this.$api.msg('请选择提货门店');
  280. return;
  281. }
  282. this.$api.msg('提交中...', 20000);
  283. let delivery_id = 0;
  284. if (this.deliveryList && this.deliveryList[this.deliveryIndex] && this.deliveryList[this.deliveryIndex].id) {
  285. delivery_id = this.deliveryList[this.deliveryIndex].id;
  286. }
  287. let coupon_id = 0;
  288. if (this.couponList && this.couponList[this.useCouponIndex] && this.couponList[this.useCouponIndex].id) {
  289. coupon_id = this.couponList[this.useCouponIndex].id;
  290. }
  291. let data = {
  292. delivery_id: delivery_id,
  293. coupon_id: coupon_id,
  294. remark: this.remark,
  295. product_id: [],
  296. spec: [],
  297. number: [],
  298. cart: this.cart,
  299. flash_id: this.flash_id,
  300. deductionScore: this.deductionScore
  301. };
  302. if (this.tabActive == 1) {
  303. data.city_id = this.addressData.city_id;
  304. data.address_id = this.addressData.id;
  305. data.sid = 0;
  306. } else {
  307. data.city_id = 0;
  308. data.address_id = 0;
  309. data.sid = this.storeData.id;
  310. }
  311. this.product.forEach((item, index) => {
  312. data.product_id.push(item.id);
  313. data.spec.push(item.spec.replace(/,/g, '|'));
  314. data.number.push(item.number);
  315. });
  316. if (this.submitLock) {
  317. return;
  318. }
  319. this.submitLock = true; // 提交锁
  320. let apiUrl = this.flash_id == 0 ? '/order/submit' : '/flash/submitOrder';
  321. let result = await this.$api.request(apiUrl, 'POST', data);
  322. if (result) {
  323. this.submitLock = false; // 解除锁
  324. this.$api.msg('已提交', 2000);
  325. uni.redirectTo({
  326. url: `/pages/money/pay?order_id=${result.order_id}&total=${this.total-this.deductionScore}&out_trade_no=${result.out_trade_no}`
  327. });
  328. }
  329. this.submitLock = false; // 解除锁
  330. },
  331. stopPrevent() {},
  332. //数量
  333. async numberChange(data) {
  334. let oldNumber = this.product[data.index].number;
  335. let newNumber = data.number;
  336. this.product[data.index].number = newNumber;
  337. this.calcTotal();
  338. //判断当前库存
  339. let stock = this.product[data.index].stock;
  340. if (newNumber > this.product[data.index].stock) {
  341. this.product[data.index].number = stock;
  342. }
  343. },
  344. // 计算价格
  345. calcTotal() {
  346. let price = 0;
  347. let number = 0; // 产品数量
  348. let product = this.product;
  349. product.forEach(item => {
  350. price = price + parseFloat(item.sales_price) * item.number;
  351. number = number + item.number;
  352. });
  353. this.price = price.toFixed(2);
  354. let total = price;
  355. // 检查当前优惠券是否满足使用条件
  356. this.coupon_price = 0.00;
  357. if (this.useCouponIndex != -1 && this.couponList && this.couponList[this.useCouponIndex]) {
  358. this.coupon_price = this.couponList[this.useCouponIndex].value
  359. if (this.price >= this.couponList[this.useCouponIndex].least) {
  360. total = total - this.coupon_price;
  361. } else {
  362. this.$api.msg('选中的优惠券不满足使用条件', 2000);
  363. this.useCouponIndex = -1; //取消选中的优惠券
  364. this.coupon_price = 0; //设置优惠金额为0
  365. total = total - this.coupon_price;
  366. }
  367. }
  368. // 计算当前运费模板
  369. // id: 29 运费模板id
  370. // name: "购买2件以上包邮" 标题
  371. // type: "quantity" // 续重类型
  372. // min: 2 // 至少购买量
  373. // first: 1 // 首件数量
  374. // first_fee: "0.00" // 首单价钱
  375. // additional: 1 // 续件数量
  376. // additional_fee: "0" // 续件价钱
  377. let delivery = this.deliveryList[this.deliveryIndex];
  378. if (delivery) {
  379. let deliveryPrice = 0;
  380. if (delivery.hasOwnProperty('id')) {
  381. if (delivery.min > number) {
  382. this.$api.msg('必须至少购买' + delivery.min + '件商品才能使用此配送方式', 6000)
  383. }
  384. // 如何为0就赋值1,不然下面的循环会死循环
  385. delivery.first = delivery.first == 0 ? 1 : delivery.first;
  386. delivery.additional = delivery.additional == 0 ? 1 : delivery.additional;
  387. for (let i = 0; i < number;) {
  388. if (i === 0) {
  389. deliveryPrice = deliveryPrice + parseInt(delivery.first_fee);
  390. i = i + parseInt(delivery.first);
  391. } else {
  392. deliveryPrice = deliveryPrice + parseInt(delivery.additional_fee);
  393. i = i + parseInt(delivery.additional);
  394. }
  395. }
  396. }
  397. this.deliveryPrice = deliveryPrice.toFixed(2);
  398. total = total + deliveryPrice;
  399. }
  400. this.total = total.toFixed(2);
  401. },
  402. // 查看运费模板
  403. deliveryTemplate() {
  404. this.$api.navTo('/pages/order/delivery');
  405. },
  406. changeDeductionScore(num) {
  407. if(this.deductionScore == 0) {
  408. this.deductionScore = num;
  409. } else {
  410. this.deductionScore = 0;
  411. }
  412. },
  413. changeTab(e){
  414. this.tabActive = e.detail.value;
  415. }
  416. }
  417. }
  418. </script>
  419. <style lang="scss">
  420. page {
  421. background: $page-color-base;
  422. padding-bottom: 100upx;
  423. }
  424. .uni-numbox {
  425. left: initial !important;
  426. right: 0 !important;
  427. }
  428. .address-section {
  429. padding: 30upx 0;
  430. background: #fff;
  431. position: relative;
  432. .order-content {
  433. display: flex;
  434. align-items: center;
  435. }
  436. .icon-shouhuodizhi {
  437. flex-shrink: 0;
  438. display: flex;
  439. align-items: center;
  440. justify-content: center;
  441. width: 90upx;
  442. color: #888;
  443. font-size: 44upx;
  444. }
  445. .cen {
  446. display: flex;
  447. flex-direction: column;
  448. flex: 1;
  449. font-size: 28upx;
  450. color: $font-color-dark;
  451. }
  452. .name {
  453. font-size: 34upx;
  454. margin-right: 24upx;
  455. }
  456. .address {
  457. margin-top: 16upx;
  458. margin-right: 20upx;
  459. color: $font-color-light;
  460. }
  461. .icon-you {
  462. font-size: 32upx;
  463. color: $font-color-light;
  464. margin-right: 30upx;
  465. }
  466. .a-bg {
  467. position: absolute;
  468. left: 0;
  469. bottom: 0;
  470. display: block;
  471. width: 100%;
  472. height: 5upx;
  473. }
  474. }
  475. .goods-section {
  476. margin-top: 16upx;
  477. background: #fff;
  478. padding-bottom: 1px;
  479. .g-header {
  480. display: flex;
  481. align-items: center;
  482. height: 84upx;
  483. padding: 0 30upx;
  484. position: relative;
  485. }
  486. .logo {
  487. display: block;
  488. width: 50upx;
  489. height: 50upx;
  490. border-radius: 100px;
  491. }
  492. .name {
  493. font-size: 30upx;
  494. color: $font-color-base;
  495. margin-left: 24upx;
  496. }
  497. .g-item {
  498. display: flex;
  499. margin: 20upx 30upx;
  500. image {
  501. flex-shrink: 0;
  502. display: block;
  503. width: 160upx;
  504. height: 160upx;
  505. border-radius: 4upx;
  506. }
  507. .right {
  508. height: 160upx;
  509. flex: 1;
  510. padding-left: 24upx;
  511. overflow: hidden;
  512. position: relative;
  513. }
  514. .title {
  515. font-size: 30upx;
  516. color: $font-color-dark;
  517. }
  518. .spec {
  519. font-size: 26upx;
  520. color: $font-color-light;
  521. }
  522. .price-box {
  523. display: flex;
  524. align-items: center;
  525. font-size: 32upx;
  526. color: $font-color-dark;
  527. padding-top: 5px;
  528. .price {
  529. margin-bottom: 4upx;
  530. color: red;
  531. }
  532. .market_price {
  533. font-size: 26upx;
  534. margin-left: 20upx;
  535. color: #b2b2b2;
  536. text-decoration: line-through;
  537. margin-top: -8rpx;
  538. }
  539. .number {
  540. font-size: 26upx;
  541. color: $font-color-base;
  542. margin-left: 20upx;
  543. }
  544. .step {
  545. left: unset;
  546. right: 10upx;
  547. }
  548. }
  549. .step-box {
  550. position: relative;
  551. }
  552. }
  553. }
  554. .yt-list {
  555. margin-top: 16upx;
  556. background: #fff;
  557. }
  558. .yt-list-cell {
  559. display: flex;
  560. align-items: center;
  561. padding: 10upx 30upx 10upx 40upx;
  562. line-height: 70upx;
  563. position: relative;
  564. &.cell-hover {
  565. background: #fafafa;
  566. }
  567. &.b-b:after {
  568. left: 30upx;
  569. }
  570. .cell-icon {
  571. height: 32upx;
  572. width: 32upx;
  573. font-size: 22upx;
  574. color: #fff;
  575. text-align: center;
  576. line-height: 32upx;
  577. background: #f85e52;
  578. border-radius: 4upx;
  579. margin-right: 12upx;
  580. &.hb {
  581. background: #ffaa0e;
  582. }
  583. &.lpk {
  584. background: #3ab54a;
  585. }
  586. }
  587. .cell-more {
  588. align-self: center;
  589. font-size: 24upx;
  590. color: $font-color-light;
  591. margin-left: 8upx;
  592. margin-right: -10upx;
  593. }
  594. .cell-tit {
  595. flex: 1;
  596. font-size: 26upx;
  597. color: $font-color-light;
  598. margin-right: 10upx;
  599. }
  600. .cell-tip {
  601. font-size: 26upx;
  602. color: $font-color-dark;
  603. &.disabled {
  604. color: $font-color-light;
  605. }
  606. &.active {
  607. color: $base-color;
  608. }
  609. &.red {
  610. color: $base-color;
  611. }
  612. picker{
  613. max-width: 500rpx;
  614. line-height: 50rpx;
  615. }
  616. }
  617. &.desc-cell {
  618. .cell-tit {
  619. max-width: 90upx;
  620. }
  621. }
  622. .desc {
  623. flex: 1;
  624. font-size: $font-base;
  625. color: $font-color-dark;
  626. }
  627. }
  628. /* 支付列表 */
  629. .pay-list {
  630. padding-left: 40upx;
  631. margin-top: 16upx;
  632. background: #fff;
  633. .pay-item {
  634. display: flex;
  635. align-items: center;
  636. padding-right: 20upx;
  637. line-height: 1;
  638. height: 110upx;
  639. position: relative;
  640. }
  641. .icon-weixinzhifu {
  642. width: 80upx;
  643. font-size: 40upx;
  644. color: #6BCC03;
  645. }
  646. .icon-alipay {
  647. width: 80upx;
  648. font-size: 40upx;
  649. color: #06B4FD;
  650. }
  651. .icon-xuanzhong2 {
  652. display: flex;
  653. align-items: center;
  654. justify-content: center;
  655. width: 60upx;
  656. height: 60upx;
  657. font-size: 40upx;
  658. color: $base-color;
  659. }
  660. .tit {
  661. font-size: 32upx;
  662. color: $font-color-dark;
  663. flex: 1;
  664. }
  665. }
  666. .footer {
  667. position: fixed;
  668. left: 0;
  669. bottom: 0;
  670. z-index: 995;
  671. display: flex;
  672. align-items: center;
  673. width: 100%;
  674. height: 90upx;
  675. justify-content: space-between;
  676. font-size: 30upx;
  677. background-color: #fff;
  678. z-index: 99;
  679. color: $font-color-base;
  680. box-shadow: 0 -1px 5px rgba(0, 0, 0, .1);
  681. .price-content {
  682. padding-left: 30upx;
  683. }
  684. .price-tip {
  685. color: $base-color;
  686. margin-left: 8upx;
  687. }
  688. .price {
  689. font-size: 36upx;
  690. color: $base-color;
  691. }
  692. .submit {
  693. display: flex;
  694. align-items: center;
  695. justify-content: center;
  696. width: 280upx;
  697. height: 100%;
  698. color: #fff;
  699. font-size: 32upx;
  700. background-color: $base-color;
  701. }
  702. }
  703. /* 优惠券面板 */
  704. .mask {
  705. display: flex;
  706. align-items: flex-end;
  707. position: fixed;
  708. left: 0;
  709. top: var(--window-top);
  710. bottom: 0;
  711. width: 100%;
  712. background: rgba(0, 0, 0, 0);
  713. z-index: 100;
  714. transition: .3s;
  715. .mask-content {
  716. width: 100%;
  717. min-height: 30vh;
  718. max-height: 70vh;
  719. background: #f3f3f3;
  720. transform: translateY(100%);
  721. transition: .3s;
  722. overflow-y: scroll;
  723. padding-bottom: 100rpx;
  724. }
  725. .btn {
  726. background: #fa436a;
  727. position: absolute;
  728. bottom: 0;
  729. width: 700rpx;
  730. margin: 20rpx 25rpx;
  731. color: #fff;
  732. border-radius: 40rpx;
  733. }
  734. &.none {
  735. display: none;
  736. }
  737. &.show {
  738. background: rgba(0, 0, 0, .4);
  739. .mask-content {
  740. transform: translateY(0);
  741. }
  742. }
  743. }
  744. /* 选中的优惠券 */
  745. .selectCoupon {
  746. border: 1upx solid red;
  747. }
  748. /* 优惠券列表 */
  749. .coupon-item {
  750. display: flex;
  751. flex-direction: column;
  752. margin: 20upx 24upx;
  753. background: #fff;
  754. .con {
  755. display: flex;
  756. align-items: center;
  757. position: relative;
  758. height: 120upx;
  759. padding: 0 30upx;
  760. &:after {
  761. position: absolute;
  762. left: 0;
  763. bottom: 0;
  764. content: '';
  765. width: 100%;
  766. height: 0;
  767. border-bottom: 1px dashed #f3f3f3;
  768. transform: scaleY(50%);
  769. }
  770. }
  771. .left {
  772. display: flex;
  773. flex-direction: column;
  774. justify-content: center;
  775. flex: 1;
  776. overflow: hidden;
  777. height: 100upx;
  778. }
  779. .title {
  780. font-size: 32upx;
  781. color: $font-color-dark;
  782. margin-bottom: 10upx;
  783. }
  784. .time {
  785. font-size: 24upx;
  786. color: $font-color-light;
  787. }
  788. .right {
  789. display: flex;
  790. flex-direction: column;
  791. justify-content: center;
  792. align-items: center;
  793. font-size: 26upx;
  794. color: $font-color-base;
  795. height: 100upx;
  796. }
  797. .price {
  798. font-size: 44upx;
  799. color: $base-color;
  800. &:before {
  801. content: '¥';
  802. font-size: 34upx;
  803. }
  804. }
  805. .tips {
  806. font-size: 24upx;
  807. color: $font-color-light;
  808. line-height: 60upx;
  809. padding-left: 30upx;
  810. }
  811. .circle {
  812. position: absolute;
  813. left: -6upx;
  814. bottom: -10upx;
  815. z-index: 10;
  816. width: 20upx;
  817. height: 20upx;
  818. background: #f3f3f3;
  819. border-radius: 100px;
  820. &.r {
  821. left: auto;
  822. right: -6upx;
  823. }
  824. }
  825. }
  826. .tab_list {
  827. background: #ffffff;
  828. height: 3rem;
  829. border-bottom: 1px #ececec solid;
  830. li {
  831. float: left;
  832. width: 50%;
  833. label {
  834. display: block;
  835. margin: 12rpx auto;
  836. width: 8em;
  837. height: 2em;
  838. line-height: 1.6em;
  839. border: 1px #ececec solid;
  840. text-align: center;
  841. border-radius: 3px;
  842. radio {
  843. transform:scale(0.7);
  844. }
  845. }
  846. }
  847. }
  848. </style>