order.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870
  1. <template>
  2. <view class="index-home flex-common-css">
  3. <!-- 1 -->
  4. <view class="box-1 align-items-start">
  5. <image src="@/static/img/jiankong.png" mode=""></image>
  6. <view class="fs-32 fc-3 fw-b">你已进入扫码区域</view>
  7. <view class="box-1-time">
  8. <Countdown ref="countdown"></Countdown>
  9. </view>
  10. </view>
  11. <!-- 2 -->
  12. <view v-if="goodsList.length == 0" class="scroll-view-css">
  13. <image class="no-img" src="@/static/img/no-goods.png" mode="scaleToFill"></image>
  14. <view class="fs-30 fc-6 text-align-center">请扫码添加商品</view>
  15. </view>
  16. <scroll-view v-else scroll-y="true" class="scroll-view-css list-box">
  17. <view class="goods-box flex-justify-space" v-for="(item,i) in goodsList" :key="i">
  18. <image :src="item.cover_img" mode="scaleToFill"></image>
  19. <view class="flex-1">
  20. <view class="flex-justify-space">
  21. <view class="text-1 text-overflow-ellipsis-one">{{item.goods_name}}</view>
  22. <uni-icons @click="delGoods(i)" type="trash" size="20"></uni-icons>
  23. </view>
  24. <view class="flex-justify-space">
  25. <view class="fs-24 fc-ED301D">¥{{item.price}}</view>
  26. <view class="align-items-center">
  27. <view class="num-buttom" v-if="item.num > 1" @click="reduce(i)">-</view>
  28. <view class="num-box">{{item.num}}</view>
  29. <view class="num-buttom" @click="add(i)">+</view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </scroll-view>
  35. <view class="box-2-b align-items-center">
  36. <view class="box-2-shou flex-justify-center align-items-center" @click="headInput()">
  37. <image src="@/static/img/txm.png" mode=""></image>
  38. <view class="fs-30 fc-3 fw-400">手输条码</view>
  39. </view>
  40. <view v-if="shop_id == 299" class="box-2-shou flex-justify-center align-items-center" @click="openMenber()">
  41. <image src="@/static/img/huiyuan.png" mode=""></image>
  42. <view v-if="!member_id" class="fs-30 fc-3 fw-400">消费股东</view>
  43. <view v-else class="fs-30 fc-3 fw-400">更换股东</view>
  44. </view>
  45. <view v-if="member_id" class="flex-justify-center align-items-center">
  46. <view class="fs-24 fc-074B86 fw-400">股东ID {{member_id}}</view>
  47. </view>
  48. </view>
  49. <!-- 3 -->
  50. <view class="box-2">
  51. <view class="flex-justify-space">
  52. <view class="">
  53. <view class="fs-30 fc-3">
  54. 共{{totalNum}}件
  55. <span v-if="discount&&discount>0">,已优惠</span>
  56. <span class="fs-30 fc-ED301D fw-600 mr-10" v-if="discount&&discount>0">¥{{setYHmoney()}}</span>
  57. <span class="fs-30 fc-ED301D fw-600" v-if="discount&&discount>0">{{discount*10||'0'}}折</span>
  58. </view>
  59. <view class="">
  60. <span class="fs-30 fc-3">合计</span>
  61. <span class="fs-30 fc-ED301D">¥</span>
  62. <span class="fs-40 fc-ED301D fw-600" v-if="discount&&discount>0">{{setMoney()}}</span>
  63. <span class="fs-40 fc-ED301D fw-600" v-else>{{totalPrice}}</span>
  64. </view>
  65. </view>
  66. <view class="to-save text-align-center fs-32 fc-f" @click="save()">去结算</view>
  67. </view>
  68. </view>
  69. <keyboard-listener v-if="outscan" @keyup="monitorKeyboard"></keyboard-listener>
  70. <!-- 支付类型 -->
  71. <uni-popup ref="popup" :mask-click="false">
  72. <view class="">
  73. <view class="pop-view mb-25">
  74. <view class="fs-32 fw-600 pop-1 pop-view-1">请选择支付类型</view>
  75. <view class="pop-2">
  76. <view class="fs-32 pop-1 pop-view-1 fc-lv" @click="selectTyep(1)">微信</view>
  77. <view class="fs-32 pop-1 fc-lan" @click="selectTyep(2)">支付宝</view>
  78. </view>
  79. </view>
  80. <view class="code-view-1" @click="closePay()">取消支付</view>
  81. </view>
  82. </uni-popup>
  83. <!-- 付款码 -->
  84. <uni-popup ref="popupCode" :mask-click="false">
  85. <view class="">
  86. <view class="code-view">
  87. <view class="fs-42 fw-b fc-lan text-align-center">请出示{{payType == 1?'微信':'支付宝'}}付款码</view>
  88. <view class="text-align-center">
  89. <span class="fs-30 fc-9">应付</span>
  90. <span class="fs-40 fc-ED301D fw-b" v-if="discount&&discount>0">¥{{setMoney()}}</span>
  91. <span class="fs-42 fc-ED301D fw-b" v-else>¥{{totalPrice}}</span>
  92. </view>
  93. <image src="@/static/img/code-1.png" mode="scaleToFill"></image>
  94. <view class="fs-30 fc-6 text-align-center">对准下方扫描口</view>
  95. </view>
  96. <view class="code-view-1" @click="closePay()">取消支付</view>
  97. </view>
  98. </uni-popup>
  99. <!-- 手动输入条形码 -->
  100. <uni-popup ref="inputDialog" type="dialog">
  101. <uni-popup-dialog v-model="headValue" mode="input" title="输入条码" placeholder="请输入条码"
  102. @confirm="dialogInputConfirm"></uni-popup-dialog>
  103. </uni-popup>
  104. <!-- 选择会员登录方式 -->
  105. <uni-popup ref="memberType" type="center" :mask-click="false">
  106. <view class="member-type-box">
  107. <view class="member-type-box-title mb-40">
  108. <view class="fs-32 fw-b text-align-center">选择股东登录方式</view>
  109. <image @click="closeMemberTypePop()" src="@/static/member/close.png" mode=""></image>
  110. </view>
  111. <view class="flex-justify-around member-type-box-icon">
  112. <view class="" @click="openPhone()">
  113. <image src="@/static/img/phone-login.png" mode=""></image>
  114. <view class="fs-30">手机号登录</view>
  115. </view>
  116. <view class="" @click="openPOP()">
  117. <image src="@/static/img/code-login.png" mode=""></image>
  118. <view class="fs-30">扫码登录</view>
  119. </view>
  120. </view>
  121. </view>
  122. </uni-popup>
  123. <!-- 会员输入手机号 -->
  124. <uni-popup ref="inputPhone" type="bottom" :mask-click="false">
  125. <view class="flex-common-css member-pop-view">
  126. <view class="member-pop-phone-1 flex-1"></view>
  127. <view class="member-pop-phone-2">
  128. <view class="member-type-box-title mb-40">
  129. <view class="fs-32 fw-b text-align-center">手机号登录股东</view>
  130. <image @click="closePhone()" src="@/static/member/fanhui.png" mode=""></image>
  131. </view>
  132. <view class="member-phone-input mb-25 fs-30" :class="phone?'fc-3':'fc-9'">
  133. {{phone||'请输入手机号'}}
  134. <image @click="closeALL()" src="@/static/member/close.png" mode=""></image>
  135. </view>
  136. <view class="flex-wrap-wrap flex-justify-space">
  137. <view class="phone-num-box text-align-center fw-600 fs-30" @click="inputPhoneNum(item)" v-for="(item,i) in numList" :key="i">{{item}}</view>
  138. <view class="phone-num-box text-align-center fw-600 fs-30 fc-f bgc-lv" @click="memberPhoneLogin()">登录</view>
  139. <view class="phone-num-box text-align-center fw-600 fs-30" @click="inputPhoneNum(0)">0</view>
  140. <view class="phone-num-box text-align-center fw-600 fs-42 bgc-hui fc-ED301D" @click="delPhoneNum()">←</view>
  141. </view>
  142. </view>
  143. </view>
  144. </uni-popup>
  145. <!-- 会员扫码 -->
  146. <uni-popup ref="inputMember" type="bottom" :mask-click="false">
  147. <view class="flex-common-css member-pop-view">
  148. <view class="member-pop-view-1"></view>
  149. <view class="member-pop-view-2 flex-1">
  150. <view class="flex-justify-space align-items-center mb-40">
  151. <image class="img-11" src="@/static/member/shuom.png" mode=""></image>
  152. <image @click="closePOP()" class="img-close" src="@/static/member/close.png" mode=""></image>
  153. </view>
  154. <view class="mb-40">
  155. <view class="align-items-center mb-13">
  156. <view class="yuan">1</view>
  157. <view class="align-items-center">
  158. <view class="fs-30">微信搜索</view>
  159. <view class="fs-30 fc-1778FD">振合网实体联盟</view>
  160. <view class="fs-30">公众号,点击</view>
  161. <view class="fs-30 fc-1778FD">民营经济</view>
  162. </view>
  163. </view>
  164. <view class="bg-1 flex-justify-center align-items-center">
  165. <image class="img-12" src="@/static/member/1.png" mode=""></image>
  166. <image class="img-13" src="@/static/member/right.png" mode=""></image>
  167. <image class="img-12" src="@/static/member/2.png" mode=""></image>
  168. </view>
  169. </view>
  170. <view class="mb-40">
  171. <view class="align-items-center mb-13">
  172. <view class="yuan">2</view>
  173. <view class="align-items-center">
  174. <view class="fs-30">找到个人中心点击</view>
  175. <view class="fs-30 fc-1778FD">分享码</view>
  176. </view>
  177. </view>
  178. <view class="bg-1 flex-justify-center align-items-center">
  179. <image class="img-12" src="@/static/member/3.png" mode=""></image>
  180. <image class="img-13" src="@/static/member/right.png" mode=""></image>
  181. <image class="img-12" src="@/static/member/4.png" mode=""></image>
  182. </view>
  183. </view>
  184. <view class="">
  185. <view class="align-items-center mb-13">
  186. <view class="yuan">3</view>
  187. <view class="align-items-center">
  188. <view class="fs-30">二维码对准扫描口,</view>
  189. <view class="fs-30 fc-1778FD">识别完成,显示股东IP</view>
  190. </view>
  191. </view>
  192. <view class="bg-1 flex-justify-center align-items-center">
  193. <image class="img-12" src="@/static/member/5.png" mode=""></image>
  194. <image class="img-13" src="@/static/member/right.png" mode=""></image>
  195. <image class="img-12" src="@/static/member/6.png" mode=""></image>
  196. </view>
  197. </view>
  198. </view>
  199. </view>
  200. </uni-popup>
  201. </view>
  202. </template>
  203. <script>
  204. import {
  205. projectDiscount,projectWriteDiscount
  206. } from '@/api/project.js';
  207. import keyboardListener from 'uniapp-keyboard-listener';
  208. import {
  209. GoodsInfo,
  210. OrderCreate,
  211. OrderPay
  212. } from '@/api/cashierApi.js'
  213. import tools from '@/common/js/tools';
  214. import Countdown from '../mod/countdown.vue'
  215. export default {
  216. components: {
  217. keyboardListener,
  218. Countdown
  219. },
  220. data() {
  221. return {
  222. isMemeber: false,//是否打开会员扫描
  223. discount: 0, //折扣
  224. member_id: '', //会员id
  225. invite_code: '', //推荐码
  226. totalNum: 0, //总数量
  227. totalPrice: 0, //总金额
  228. payType: '', //1微信 2支护宝
  229. goodsList: [], //商品列表
  230. outscan: false,//是否加载扫码组件
  231. keyArr: [],
  232. nvalue: '',
  233. auth_code: '', //付款码
  234. order_id: '',
  235. payFLag: true, //支付还是添加商品 true 添加商品 false 结算扫码
  236. isAJAX: false,
  237. headValue: '', //手动输入的值
  238. shop_id: '',
  239. phone:'',
  240. numList:[1,2,3,4,5,6,7,8,9],
  241. };
  242. },
  243. onLoad() {
  244. this.outscan = true
  245. },
  246. beforeDestroy() {
  247. this.outscan = false
  248. },
  249. deactivated() {
  250. this.outscan = false
  251. },
  252. onShow() {
  253. this.shop_id = uni.getStorageSync('shop_id');
  254. this.setYHmoney();
  255. },
  256. methods: {
  257. setYHmoney(){
  258. let num1 = this.totalPrice*1
  259. let num2 = this.discount*1
  260. let num3 = (((num1*num2*10000)/100).toFixed(0)/100).toFixed(2)
  261. let num4 = ((((num1-num3)*10000)/100).toFixed(0)/100).toFixed(2)
  262. return num4
  263. },
  264. setMoney(){
  265. let num1 = this.totalPrice*1
  266. let num2 = this.discount*1
  267. let num3 = (((num1*num2*10000)/100).toFixed(0)/100).toFixed(2)
  268. return num3
  269. },
  270. monitorKeyboard(e) {
  271. if (e.key.length == 1) { // 字母和数字的长度都是1,所以只要字母和数字的按键,适配不同的设备
  272. this.keyArr.push(e.key)
  273. } else if (e.key == 'Enter') { // 监听到回车
  274. let newArr = [];
  275. this.nvalue = '';
  276. // 条码中可能会有大写字母和未定义的按键,所以要过滤出来
  277. newArr = this.keyArr.filter(item => item != 'Shift' && item != 'Enter' && item != 'Unidentified')
  278. if (this.isMemeber) {
  279. if (this.isAJAX) {
  280. return
  281. }
  282. this.isAJAX = true;
  283. let href = newArr.join("")
  284. let index = href.indexOf('membercode=') + 11
  285. this.invite_code = href.substring(index, index + 8)
  286. projectDiscount({
  287. invite_code: this.invite_code
  288. }).then((res) => {
  289. if (res.code == 1) {
  290. this.isAJAX = false;
  291. this.member_id = res.data.member_id;
  292. this.discount = res.data.discount * 1 / 10;
  293. this.isMemeber = false;
  294. this.$refs.inputMember.close();
  295. } else {
  296. this.isAJAX = false;
  297. tools.error(res.msg)
  298. }
  299. })
  300. } else {
  301. if (this.payFLag) {
  302. // 添加商品
  303. if (this.isAJAX) {
  304. return
  305. }
  306. this.isAJAX = true;
  307. this.nvalue = newArr.join("")
  308. this.getGoods();
  309. } else {
  310. // 支付扫码
  311. if (this.isAJAX) {
  312. return
  313. }
  314. this.isAJAX = true;
  315. this.auth_code = newArr.join("")
  316. OrderPay({
  317. order_id: this.order_id,
  318. pay_type: this.payType,
  319. auth_code: this.auth_code
  320. }).then((res) => {
  321. if (res.code == 1) {
  322. this.payFLag = true;
  323. this.isAJAX = false;
  324. this.upData();
  325. uni.redirectTo({
  326. url: '/pages/index/success?money=' + this.totalPrice +
  327. "&discount=" + this.discount + '&invite_code=' + this
  328. .invite_code
  329. })
  330. } else {
  331. this.isAJAX = false;
  332. tools.error(res.msg)
  333. }
  334. })
  335. }
  336. }
  337. this.keyArr = [];
  338. }
  339. },
  340. upData() {
  341. this.shop_id = uni.getStorageSync('shop_id')
  342. if (this.shop_id == 299) {
  343. projectWriteDiscount({
  344. order_money: this.totalPrice,
  345. invite_code: this.invite_code,
  346. discount: this.discount,
  347. phone: this.phone
  348. }).then((res) => {})
  349. }
  350. },
  351. // 获取商品
  352. getGoods() {
  353. GoodsInfo({
  354. goods_sn: this.nvalue
  355. }).then((res) => {
  356. if (res.code == 1) {
  357. this.isAJAX = false;
  358. if (this.goodsList.length == 0) {
  359. let obj = res.data;
  360. obj.num = 1;
  361. this.goodsList.push(obj)
  362. this.totalNum = 1;
  363. this.totalPrice = res.data.price;
  364. } else {
  365. let obj = res.data;
  366. let flag = true;
  367. this.goodsList.forEach((v, i) => {
  368. if (v.id == obj.id) {
  369. v.num += 1;
  370. this.totalNum += 1;
  371. this.totalPrice = (this.totalPrice * 1 + v.price * 1).toFixed(2);
  372. flag = false;
  373. }
  374. })
  375. if (flag) {
  376. obj.num = 1;
  377. this.goodsList.push(obj)
  378. this.totalNum += 1;
  379. this.totalPrice = (this.totalPrice * 1 + res.data.price * 1).toFixed(2);
  380. }
  381. }
  382. this.headValue = '';
  383. } else {
  384. this.isAJAX = false;
  385. this.headValue = '';
  386. tools.error(res.msg)
  387. }
  388. })
  389. },
  390. // 删除商品
  391. delGoods(i) {
  392. this.totalNum = this.totalNum - this.goodsList[i].num;
  393. this.totalPrice = (this.totalPrice * 1 - (this.goodsList[i].price * this.goodsList[i].num)).toFixed(2);
  394. this.goodsList.splice(i, 1)
  395. },
  396. // 减少
  397. reduce(i) {
  398. this.goodsList[i].num -= 1
  399. this.totalNum -= 1;
  400. this.totalPrice = (this.totalPrice * 1 - (this.goodsList[i].price * 1)).toFixed(2);
  401. },
  402. // 添加
  403. add(i) {
  404. this.goodsList[i].num += 1
  405. this.totalNum += 1;
  406. this.totalPrice = (this.totalPrice * 1 + this.goodsList[i].price * 1).toFixed(2);
  407. },
  408. // 支付
  409. save() {
  410. if (this.goodsList.length > 0) {
  411. this.payFLag = false;
  412. this.$refs.popup.open('center')
  413. } else {
  414. this.payFLag = true;
  415. tools.error('请添加商品')
  416. }
  417. },
  418. // 选择支付类型
  419. selectTyep(type) {
  420. this.payType = type;
  421. if (this.isAJAX) {
  422. return
  423. }
  424. this.isAJAX = true;
  425. OrderCreate({
  426. goods: this.goodsList,
  427. discount: this.discount
  428. }).then((res) => {
  429. if (res.code == 1) {
  430. this.isAJAX = false;
  431. this.order_id = res.data.order_id;
  432. this.$refs.popup.close();
  433. this.$refs.countdown.timeFun();
  434. // 扫码弹窗
  435. this.$refs.popupCode.open('center')
  436. } else {
  437. tools.error(res.msg)
  438. this.isAJAX = false;
  439. this.payFLag = true;
  440. this.order_id = '';
  441. this.payType = '';
  442. this.$refs.popup.close();
  443. }
  444. })
  445. },
  446. // 取消支付
  447. closePay() {
  448. this.payFLag = true;
  449. this.order_id = '';
  450. this.payType = '';
  451. this.$refs.popup.close();
  452. this.$refs.popupCode.close();
  453. },
  454. // 手动输入
  455. headInput() {
  456. this.$refs.inputDialog.open();
  457. },
  458. // 手动输入获取商品
  459. dialogInputConfirm() {
  460. this.nvalue = this.headValue;
  461. this.getGoods();
  462. },
  463. // 选择会员登录方式
  464. openMenber() {
  465. this.$refs.memberType.open();
  466. },
  467. closeMemberTypePop(){
  468. this.$refs.memberType.close();
  469. },
  470. // 扫码登录会员
  471. openPOP(){
  472. this.isMemeber = true;
  473. this.$refs.memberType.close();
  474. this.$refs.inputMember.open();
  475. },
  476. closePOP() {
  477. this.isMemeber = false;
  478. this.$refs.inputMember.close();
  479. },
  480. // 手机号登录会员
  481. openPhone(){
  482. this.$refs.memberType.close();
  483. this.$refs.inputPhone.open();
  484. },
  485. closePhone(){
  486. this.$refs.inputPhone.close();
  487. },
  488. closeALL(){
  489. this.phone = '';
  490. },
  491. inputPhoneNum(num){
  492. this.phone = this.phone + num + ''
  493. },
  494. delPhoneNum(){
  495. if(this.phone.length > 0){
  496. this.phone = this.phone.slice(0,-1)
  497. }
  498. },
  499. memberPhoneLogin(){
  500. if(this.phone.length < 11||this.phone.length>11){
  501. return tools.error('手机号格式错误')
  502. }
  503. if (this.isAJAX) {
  504. return
  505. }
  506. this.isAJAX = true;
  507. projectDiscount({
  508. phone: this.phone
  509. }).then((res) => {
  510. this.isAJAX = false;
  511. if (res.code == 1) {
  512. this.member_id = res.data.member_id;
  513. this.discount = res.data.discount * 1 / 10;
  514. this.$refs.inputPhone.close();
  515. } else {
  516. tools.error(res.msg)
  517. }
  518. })
  519. },
  520. },
  521. };
  522. </script>
  523. <style scoped lang="scss">
  524. .member-phone-input{
  525. width: 100%;
  526. height: 92rpx;
  527. background: #F4F4F4;
  528. border-radius: 25rpx;
  529. border: 2rpx solid #333333;
  530. line-height: 92rpx;
  531. box-sizing: border-box;
  532. padding: 0 100rpx 0 30rpx;
  533. position: relative;
  534. image{
  535. width: 40rpx;
  536. height: 40rpx;
  537. position: absolute;
  538. right: 20rpx;
  539. top: 25rpx;
  540. }
  541. }
  542. .phone-num-box{
  543. width: 32%;
  544. height: 100rpx;
  545. line-height: 100rpx;
  546. border: 1rpx solid #ccc;
  547. margin-bottom: 10rpx;
  548. border-radius: 20rpx;
  549. }
  550. .member-type-box-title{
  551. position: relative;
  552. image{
  553. position: absolute;
  554. top: 0;
  555. right: 0;
  556. width: 50rpx;
  557. height: 50rpx;
  558. }
  559. }
  560. .member-type-box{
  561. width: 600rpx;
  562. height: 300rpx;
  563. background-color: #fff;
  564. border-radius: 20rpx;
  565. box-sizing: border-box;
  566. padding: 24rpx;
  567. .member-type-box-icon{
  568. image{
  569. width: 100rpx;
  570. height: 100rpx;
  571. margin: 0 auto;
  572. }
  573. }
  574. }
  575. .member-pop-view {
  576. width: 100%;
  577. height: 100vh;
  578. background: #939394;
  579. .member-pop-phone-1{
  580. width: 100%;
  581. }
  582. .member-pop-phone-2{
  583. width: 100%;
  584. min-height: 600rpx;
  585. background-color: #fff;
  586. box-sizing: border-box;
  587. padding: 38rpx;
  588. border-radius: 20rpx 20rpx 0 0;
  589. }
  590. .member-pop-view-1 {
  591. width: 100%;
  592. height: 187rpx;
  593. }
  594. .member-pop-view-2 {
  595. background-color: #fff;
  596. box-sizing: border-box;
  597. padding: 38rpx;
  598. border-radius: 20rpx;
  599. .img-11 {
  600. width: 258rpx;
  601. height: 50rpx;
  602. }
  603. .img-close {
  604. width: 58rpx;
  605. height: 58rpx;
  606. }
  607. .yuan {
  608. width: 41rpx;
  609. height: 41rpx;
  610. border-radius: 50%;
  611. background: #1778FD;
  612. margin-right: 17rpx;
  613. text-align: center;
  614. line-height: 41rpx;
  615. font-size: 24rpx;
  616. font-weight: bold;
  617. color: #fff;
  618. }
  619. .bg-1 {
  620. width: 100%;
  621. height: 221rpx;
  622. background: #E8EFF9;
  623. border-radius: 25rpx;
  624. }
  625. .img-12 {
  626. width: 270rpx;
  627. ;
  628. height: 210rpx;
  629. }
  630. .img-13 {
  631. width: 42rpx;
  632. ;
  633. height: 42rpx;
  634. }
  635. }
  636. }
  637. .index-home {
  638. .no-img {
  639. width: 200rpx;
  640. height: 200rpx;
  641. margin: 30% auto 30rpx auto;
  642. }
  643. .box-1 {
  644. width: 100%;
  645. height: 150rpx;
  646. box-sizing: border-box;
  647. padding: 80rpx 0 0 24rpx;
  648. position: relative;
  649. .box-1-time {
  650. position: absolute;
  651. bottom: 20rpx;
  652. right: 20rpx;
  653. }
  654. image {
  655. width: 48rpx;
  656. height: 48rpx;
  657. margin-right: 10rpx;
  658. }
  659. }
  660. .list-box {
  661. background-color: #F2F3F5;
  662. box-sizing: border-box;
  663. padding: 17rpx 24rpx;
  664. .goods-box {
  665. width: 100%;
  666. height: 179rpx;
  667. background: #FFFFFF;
  668. border-radius: 17rpx;
  669. margin-bottom: 17rpx;
  670. box-sizing: border-box;
  671. padding: 25rpx;
  672. image {
  673. width: 129rpx;
  674. height: 129rpx;
  675. border-radius: 14rpx;
  676. margin-right: 16rpx;
  677. }
  678. .text-1 {
  679. width: 440rpx;
  680. font-size: 25rpx;
  681. margin-bottom: 40rpx;
  682. }
  683. .num-buttom {
  684. width: 50rpx;
  685. height: 50rpx;
  686. line-height: 50rpx;
  687. border-radius: 50%;
  688. background-color: #DAE9FF;
  689. color: #1778FD;
  690. font-weight: 600;
  691. text-align: center;
  692. font-size: 32rpx
  693. }
  694. .num-box {
  695. width: 110rpx;
  696. height: 50rpx;
  697. line-height: 50rpx;
  698. text-align: center;
  699. font-size: 33rpx;
  700. font-weight: 600;
  701. }
  702. }
  703. }
  704. .box-2-b {
  705. width: 100%;
  706. height: 83rpx;
  707. background: #E6E7E9;
  708. box-sizing: border-box;
  709. padding: 12rpx 23rpx;
  710. .box-2-shou {
  711. width: 177rpx;
  712. height: 58rpx;
  713. border-radius: 104rpx;
  714. background: #fff;
  715. margin-right: 20rpx;
  716. image {
  717. width: 25rpx;
  718. height: 25rpx;
  719. margin-right: 2rpx;
  720. }
  721. }
  722. }
  723. .box-2 {
  724. width: 100%;
  725. height: 150rpx;
  726. box-sizing: border-box;
  727. padding: 20rpx 23rpx;
  728. .to-save {
  729. margin-top: auto;
  730. width: 292rpx;
  731. height: 83rpx;
  732. line-height: 83rpx;
  733. background: linear-gradient(90deg, #4AB6FF 0%, #1778FD 100%);
  734. box-shadow: 0rpx 0rpx 4rpx 0rpx rgba(108, 168, 252, 0.64);
  735. border-radius: 104rpx;
  736. }
  737. }
  738. }
  739. .pop-view {
  740. width: 500rpx;
  741. min-height: 100rpx;
  742. background-color: #fff;
  743. border-radius: 20rpx;
  744. .pop-1 {
  745. box-sizing: border-box;
  746. height: 120rpx;
  747. width: 100%;
  748. text-align: center;
  749. line-height: 120rpx;
  750. }
  751. .pop-2 {
  752. box-sizing: border-box;
  753. padding: 0 50rpx;
  754. }
  755. .pop-view-1 {
  756. border-bottom: 1rpx solid #ccc;
  757. }
  758. }
  759. .code-view {
  760. width: 633rpx;
  761. height: 710rpx;
  762. background-image: url('@/static/img/code-bg.png');
  763. background-size: 100% 100%;
  764. box-sizing: border-box;
  765. padding: 62rpx 0 0 0;
  766. margin-bottom: 62rpx;
  767. image {
  768. width: 327rpx;
  769. height: 327rpx;
  770. margin: 50rpx auto 25rpx auto;
  771. }
  772. }
  773. .code-view-1 {
  774. text-align: center;
  775. margin: 0 auto;
  776. width: 223rpx;
  777. height: 57rpx;
  778. line-height: 57rpx;
  779. border-radius: 104rpx;
  780. border: 2rpx solid #fff;
  781. text-align: center;
  782. color: #fff;
  783. font-size: 32rpx;
  784. }
  785. </style>