confirm_pay.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802
  1. <template>
  2. <view>
  3. <nav-bar title="订单支付"></nav-bar>
  4. <view>
  5. <view>
  6. <view class="box2">
  7. <view class="title2">支付信息</view>
  8. <!-- <view style="padding:10rpx 30rpx;" v-for="(item,index) in shoppingCartList" :key="index">
  9. <view class="list_title">
  10. <view class="txt_left">商品名称</view>
  11. <view class="txt_right">{{item.goodsName}}</view>
  12. </view>
  13. <view class="list_item">
  14. <view class="txt_left">应付金额</view>
  15. <view class="txt_right_price">¥ {{item.standPrice}}</view>
  16. </view>
  17. </view> -->
  18. <view v-for="(item, index) in shoppingCartList" :key="index" style="
  19. display: flex;
  20. justify-content: space-between;
  21. margin-bottom: 32rpx;
  22. ">
  23. <image :src="$method.splitImgHost(item.coverUrl)"
  24. style="height: 120rpx; width: 204rpx; border-radius: 16rpx"></image>
  25. <view class="right_con" style="margin-left: 20rpx">
  26. <view style="color: #333333; font-size: 30rpx; font-weight: bold">
  27. {{ item.goodsName }}
  28. </view>
  29. <view class="priceTag"> ¥ {{ item.standPrice }} </view>
  30. <Class-time-tip v-if="item.gradObj && item.gradObj.gradeId"
  31. :classInfo="item.gradObj"></Class-time-tip>
  32. </view>
  33. </view>
  34. <view class="info_right">
  35. <!-- <u-line color="#D6D6DB" /> -->
  36. <view class="list_item">
  37. <view class="txt_left">应付总金额</view>
  38. <view class="txt_right_price">¥ {{ totalPrice }}</view>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="box4" v-if="shoppingCartList.some(i => i.mailSign == 1)">
  43. <view style="font-weight: bold;font-size: 28rpx;">
  44. 收件信息
  45. </view>
  46. <u-form :model="ruleForm" ref="ruleForm" label-position="top">
  47. <u-form-item required label="收件人" prop="consignee">
  48. <u-input v-model="ruleForm.consignee" />
  49. </u-form-item>
  50. <u-form-item required label="手机号码" prop="consigneePhone">
  51. <u-input v-model="ruleForm.consigneePhone" />
  52. </u-form-item>
  53. <u-form-item required label="收件地址" prop="consigneeSite">
  54. <u-input v-model="ruleForm.consigneeSite" />
  55. </u-form-item>
  56. </u-form>
  57. </view>
  58. <view class="box3">
  59. <view class="title2">支付方式</view>
  60. <view>
  61. <u-radio-group v-model="value" @change="radioGroupChange">
  62. <view class="list_item">
  63. <view class="txt_left_pay">
  64. <image src="/static/wepay.png" class="pay_icon"></image>微信支付
  65. </view>
  66. <view><u-radio @change="radioChange" name="wepay"></u-radio></view>
  67. </view>
  68. <view class="list_item" v-if="false">
  69. <view class="txt_left_pay">
  70. <image src="/static/unipay.png" class="pay_icon"></image>云闪付
  71. </view>
  72. <view><u-radio @change="radioChange" name="unipay"></u-radio></view>
  73. </view>
  74. </u-radio-group>
  75. </view>
  76. <u-line color="#D6D6DB" />
  77. </view>
  78. </view>
  79. </view>
  80. <view class="bottomBox safeArea">
  81. <view class="sums">
  82. <text class="all_sum">总金额:</text>
  83. <text class="priceTag">¥ {{ totalPrice }}</text>
  84. </view>
  85. <view style="display: flex; color: #ffffff; align-items: center">
  86. <button class="btn2" @click="pay()" :disabled="btnNo">确认支付</button>
  87. </view>
  88. </view>
  89. <u-modal v-model="showModal" :confirm-text="confirmText" cancel-text="知道了" cancel-color="#666666"
  90. confirm-color="rgba(0, 122, 255, 1);" :show-confirm-button="showConfirmButton" :show-cancel-button="true"
  91. :content="modalMsg" @cancel="modalCancel()" @confirm="modalConfirm()" ref="uModal"></u-modal>
  92. </view>
  93. </template>
  94. <script>
  95. import {
  96. tenantId
  97. } from "@/common/request.js";
  98. import {
  99. mapGetters,
  100. mapActions
  101. } from "vuex";
  102. import {
  103. getQueryString
  104. } from "../../common/navTo";
  105. import ClassTimeTip from "../../components/common/ClassTimeTip.vue";
  106. export default {
  107. data() {
  108. const validateTel = (rule, value, callback) => {
  109. var reg = /^1[345789][0-9]{9}$/;
  110. if (!reg.test(value)) {
  111. return callback(new Error("请输入正确手机号码"));
  112. } else {
  113. callback();
  114. }
  115. };
  116. return {
  117. ruleForm: {
  118. consignee: '',
  119. consigneePhone: '',
  120. consigneeSite: '',
  121. },
  122. rules: {
  123. consignee: [{
  124. required: true,
  125. message: '请输入收件人',
  126. trigger: 'blur'
  127. }],
  128. consigneePhone: [{
  129. required: true,
  130. validator: validateTel,
  131. trigger: 'blur'
  132. }],
  133. consigneeSite: [{
  134. required: true,
  135. message: '请输入收件地址',
  136. trigger: 'blur'
  137. }],
  138. },
  139. showModal: false,
  140. modalMsg: "",
  141. list: [{
  142. name: "网课",
  143. },
  144. {
  145. name: "题库通",
  146. },
  147. ],
  148. array: [
  149. "全部",
  150. "建设工程施工管理",
  151. "机电全科",
  152. "机电工程管理与实",
  153. "机电全科",
  154. "全科",
  155. ],
  156. current: 0,
  157. menuIndex: 0,
  158. value: "wepay",
  159. btnNo: false,
  160. isBK: "",
  161. fromCart: "",
  162. hasPaying: false,
  163. showConfirmButton: false,
  164. confirmText: "",
  165. options: {},
  166. };
  167. },
  168. onPullDownRefresh() {},
  169. onLoad(option) {
  170. this.fromCart = option.fromCart;
  171. this.isBK = option.isBK;
  172. this.options = option;
  173. this.ruleForm.consignee = this.$store.state.userInfo.realname || "";
  174. this.ruleForm.consigneePhone =
  175. this.$store.state.userInfo.telphone || "";
  176. this.ruleForm.consigneeSite = "";
  177. },
  178. onShow() {
  179. console.log(process.env, 'env')
  180. // #ifdef H5
  181. this.authorize();
  182. // #endif
  183. },
  184. // 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
  185. onReady() {
  186. if (this.shoppingCartList.some(i => i.mailSign == 1)) {
  187. this.$refs.ruleForm.setRules(this.rules);
  188. }
  189. },
  190. methods: {
  191. ...mapActions(["getUserInfo"]),
  192. authorize() {
  193. console.log("process.env", process.env)
  194. if (location.search.includes("code")) {
  195. const code = getQueryString("code");
  196. this.$store.commit("setShoppingCartList", {
  197. shoppingCartList: uni.getStorageSync("shopList"),
  198. });
  199. uni.setStorageSync("h5_code", code);
  200. this.OfficialLogin(code);
  201. } else {
  202. // 没有code,就重定向到地址https://www.xyyxt.net?ask_type=https://api.xyyxt.net/pages2/order/confirm_pay 去获取code,授权后就会把code带上然后访问域名
  203. // ?fromCart=&code=061F5a1w3aolh03SLe1w3sMsCF4F5a16&state=STATE
  204. this.$api.checkBindGzh().then((res) => {
  205. // && process.env.NODE_ENV !== "development"
  206. if (!res.data.data) {
  207. uni.setStorageSync("shopList", this.shoppingCartList);
  208. const url = window.location.host + "/pages2/order/confirm_pay";
  209. // 跳自己授权
  210. if (this.config.gzhSelfLicense) {
  211. uni.request({
  212. url: `https://cloud.xyyxt.net/app/common/wx/config`,
  213. method: "get",
  214. data: {},
  215. header: {
  216. TenantId: tenantId,
  217. },
  218. success: (res) => {
  219. location.replace(
  220. `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${
  221. res.data.data.gzhAppId
  222. }&redirect_uri=${encodeURIComponent(
  223. "https://" + url
  224. )}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
  225. );
  226. },
  227. fail: (err) => {
  228. uni.showToast({
  229. title: "请求接口失败",
  230. icon: "none",
  231. });
  232. },
  233. });
  234. // this.$api.getWxConfig().then((res) => {
  235. // location.replace(
  236. // `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${
  237. // res.data.data.gzhAppId
  238. // }&redirect_uri=${encodeURIComponent(
  239. // "https://" + url
  240. // )}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
  241. // );
  242. // });
  243. } else {
  244. location.replace("https://www.xyyxt.net/?ask_type=" + url);
  245. }
  246. }
  247. });
  248. }
  249. },
  250. OfficialLogin(code) {
  251. this.$api
  252. .OfficialLogin({
  253. code,
  254. })
  255. .then((res) => {
  256. if (res.data.code !== 200) {
  257. this.$u.toast(res.data.msg);
  258. }
  259. });
  260. },
  261. // 二建 && 七大员 需要先完善信息
  262. async checkNeedInfo() {
  263. let keys = [];
  264. this.shoppingCartList.forEach((item) => {
  265. if (item.erJianErZao) {
  266. keys.push("realname", "idCard");
  267. }
  268. if (item.jjShiGongYuan && item.sevenYear != '2021' && item.sevenYear != '2022') {
  269. keys.push("realname", "idCard", "sex", "companyName", "eduLevel");
  270. }
  271. });
  272. if (keys.length) {
  273. if (!this.userInfo) await this.getUserInfo();
  274. if (keys.some((key) => !this.userInfo[key])) {
  275. uni.showModal({
  276. title: "提示",
  277. content: "请先完善个人信息!",
  278. success: (res) => {
  279. if (res.confirm) {
  280. uni.navigateTo({
  281. url: "/pages2/verify/info_fill?keys=" +
  282. Array.from(new Set(keys)).toString(),
  283. });
  284. }
  285. },
  286. });
  287. return false;
  288. }
  289. }
  290. return true;
  291. },
  292. async postOrder() {
  293. let list = this.shoppingCartList;
  294. for (let i = 0; i < list.length; i++) {
  295. let item = list[i];
  296. if (item.goodsType == 1) {
  297. if (item.templateType == "class") {
  298. delete item.gradObj.goodsList;
  299. let goodsInputData = {
  300. type: "class",
  301. gradeId: item.gradObj.gradeId,
  302. gradeJson: JSON.stringify(item.gradObj),
  303. };
  304. item.goodsInputData = goodsInputData;
  305. }
  306. if (item.templateType == "apply") {
  307. let goodsInputData = {
  308. type: "apply",
  309. applyAreasJson: JSON.stringify(item.applyAreas),
  310. examDateJson: JSON.stringify(item.examDate),
  311. };
  312. item.goodsInputData = goodsInputData;
  313. }
  314. }
  315. if (this.options.distributionCode) {
  316. item.distributionLinkCode = this.options.linkCode;
  317. item.distributionCode = this.options.distributionCode;
  318. }
  319. }
  320. list = list.map(i => {
  321. if (i.mailSign == 1) {
  322. let ij = JSON.parse(JSON.stringify(i))
  323. return {...this.ruleForm,...ij}
  324. } else {
  325. return i;
  326. }
  327. });
  328. let data = {
  329. goodsList: list
  330. };
  331. // 邀请码
  332. if (this.sac) {
  333. data["shareActivityCode"] = this.sac;
  334. }
  335. // #ifdef MP-WEIXIN
  336. this.$api.placeSmallOrder(data).then((res) => {
  337. this.orderResult(res);
  338. });
  339. // #endif
  340. // #ifdef H5
  341. data["url"] = location.href;
  342. this.$api.placeGzhOrder(data).then((res) => {
  343. console.log(res, "h5支付res");
  344. this.orderResult(res);
  345. });
  346. // #endif
  347. },
  348. orderResult(res) {
  349. if (res.data.code == 200) {
  350. uni.setStorageSync("updateCart", 1); //提醒刷新购物车
  351. if (this.totalPrice == 0) {
  352. //免费商品
  353. uni.redirectTo({
  354. url: `/pages2/order/confirm_success?sn=${res.data.data.orderSn}&isBk=${this.isBK}`,
  355. });
  356. } else {
  357. let data = res.data.data;
  358. uni.showLoading({
  359. title: "支付中",
  360. mask: true,
  361. });
  362. // #ifdef MP-WEIXIN
  363. uni.requestPayment({
  364. provider: data.provider,
  365. nonceStr: data.nonceStr,
  366. package: data.package,
  367. signType: data.signType,
  368. paySign: data.sign,
  369. timeStamp: String(data.timeStamp),
  370. success: (res) => {
  371. uni.hideLoading();
  372. this.btnNo = false;
  373. uni.redirectTo({
  374. url: `/pages2/order/confirm_success?sn=${data.orderSn}&isBk=${this.isBK}`,
  375. });
  376. console.log("success:" + JSON.stringify(res));
  377. },
  378. fail: (err) => {
  379. uni.hideLoading();
  380. this.btnNo = false;
  381. console.log("fail:" + JSON.stringify(err));
  382. },
  383. });
  384. // #endif
  385. // #ifdef H5
  386. this.h5_wxpay(data);
  387. // #endif
  388. }
  389. } else if (res.data.code == 510) {
  390. //有未支付订单
  391. this.hasPaying = true;
  392. this.btnNo = false;
  393. this.modalMsg = res.data.msg;
  394. this.showConfirmButton = true;
  395. this.confirmText = "跳转到【我的订单】\n查看未支付订单";
  396. this.showModal = true;
  397. } else if (res.data.code == 511) {
  398. //511 重复购买
  399. this.hasPaying = false;
  400. this.btnNo = false;
  401. this.modalMsg = res.data.msg;
  402. this.showConfirmButton = true;
  403. this.showModal = true;
  404. if (this.fromCart) {
  405. console.log(this.fromCart);
  406. this.confirmText = "返回购物车";
  407. } else {
  408. let type = "";
  409. if (this.shoppingCartList.length == 1) {
  410. type = this.shoppingCartList[0].goodsType;
  411. } else {
  412. type = this.shoppingCartList[0].goodsType;
  413. if (this.shoppingCartList.find((item) => item.goodsType != type)) {
  414. type = 3;
  415. }
  416. }
  417. this.confirmText =
  418. type == 1 || type == 6 ?
  419. "继续选课" :
  420. type == 2 ?
  421. "继续选题" :
  422. type == 3 || type == 8 ?
  423. "继续选购" :
  424. "";
  425. }
  426. } else {
  427. this.hasPaying = false;
  428. this.btnNo = false;
  429. this.showConfirmButton = false;
  430. this.modalMsg = res.data.msg;
  431. this.showModal = true;
  432. }
  433. },
  434. h5_wxpay(data) {
  435. console.log("====调起支付状态", data);
  436. let self = this;
  437. function onBridgeReady() {
  438. // 加载框
  439. WeixinJSBridge.invoke(
  440. "getBrandWCPayRequest", {
  441. appId: data.appId, // 公众号名称,由商户传入
  442. timeStamp: data.timeStamp, // 时间戳,自1970年以来的秒数
  443. nonceStr: data.nonceStr, // 随机串
  444. package: data.package,
  445. signType: data.signType, // 微信签名方式:
  446. paySign: data.paySign, // 微信签名
  447. },
  448. function(res) {
  449. // 判断支付状态
  450. console.log("支付状态", res, "this:", this, self);
  451. if (res.err_msg === "get_brand_wcpay_request:ok") {
  452. self.$u.toast("支付成功");
  453. uni.hideLoading();
  454. self.btnNo = false;
  455. uni.redirectTo({
  456. url: `/pages2/order/confirm_success?sn=${data.orderSn}&isBk=${self.isBK}`,
  457. });
  458. } else if (res.err_msg === "get_brand_wcpay_request:cancel") {
  459. self.$u.toast("取消支付");
  460. } else {
  461. uni.hideLoading();
  462. self.btnNo = false;
  463. self.$u.toast("支付失败");
  464. }
  465. }
  466. );
  467. }
  468. if (typeof WeixinJSBridge === "undefined") {
  469. if (document.addEventListener) {
  470. document.addEventListener(
  471. "WeixinJSBridgeReady",
  472. onBridgeReady,
  473. false
  474. );
  475. } else if (document.attachEvent) {
  476. document.attachEvent("WeixinJSBridgeReady", onBridgeReady);
  477. document.attachEvent("onWeixinJSBridgeReady", onBridgeReady);
  478. }
  479. } else {
  480. onBridgeReady();
  481. }
  482. },
  483. modalCancel() {
  484. this.showModal = false;
  485. },
  486. modalConfirm() {
  487. if (this.hasPaying) {
  488. uni.navigateTo({
  489. url: "/pages2/order/index?current=0",
  490. });
  491. } else {
  492. if (this.fromCart) {
  493. uni.navigateTo({
  494. url: "/pages4/shopping/shoppingCart",
  495. });
  496. } else {
  497. if (this.shoppingCartList[0].goodsType == 8) {
  498. this.$store.state.current = 3
  499. uni.switchTab({
  500. url: '/pages/course/index'
  501. });
  502. // uni.reLaunch({
  503. // url: "/pages/information/index",
  504. // });
  505. return;
  506. }
  507. uni.switchTab({
  508. url: "/pages/course/index",
  509. });
  510. }
  511. }
  512. },
  513. getOpenid(code) {
  514. let self = this;
  515. this.$api.wxOpenid({
  516. code: code
  517. }).then((res) => {
  518. if (res.data.code == 200) {
  519. self.postOrder();
  520. }
  521. });
  522. },
  523. async pay() {
  524. if (this.shoppingCartList.some(i => i.mailSign == 1)) {
  525. var DontStatus = false;
  526. this.$refs.ruleForm.validate(valid => {
  527. if (valid) {
  528. DontStatus = false;
  529. console.log('验证通过');
  530. } else {
  531. DontStatus = true;
  532. console.log('验证失败');
  533. return
  534. }
  535. });
  536. if (DontStatus) return
  537. }
  538. if (!(await this.checkNeedInfo())) {
  539. return;
  540. }
  541. let self = this;
  542. this.btnNo = true;
  543. // #ifdef MP-WEIXIN
  544. uni.login({
  545. provider: "weixin",
  546. success: function(loginRes) {
  547. self.getOpenid(loginRes.code);
  548. },
  549. });
  550. // #endif
  551. // #ifdef H5
  552. // 在首页已经请求过接口/gzh_login 提交code了
  553. this.postOrder();
  554. // #endif
  555. },
  556. radioChange(e) {
  557. // console.log(e);
  558. },
  559. // 选中任一radio时,由radio-group触发
  560. radioGroupChange(e) {
  561. // console.log(e);
  562. },
  563. cMenu(index) {
  564. this.menuIndex = index;
  565. },
  566. change(index) {
  567. this.current = index;
  568. },
  569. },
  570. onReachBottom() {},
  571. computed: {
  572. ...mapGetters(["userInfo", "shoppingCartList", "sac", "config"]),
  573. totalPrice() {
  574. return this.shoppingCartList.reduce(
  575. (a, b) => a + Number(b.standPrice),
  576. 0
  577. );
  578. },
  579. },
  580. components: {
  581. ClassTimeTip
  582. },
  583. };
  584. </script>
  585. <style>
  586. ::-webkit-scrollbar {
  587. width: 0;
  588. height: 0;
  589. color: transparent;
  590. }
  591. page {
  592. background-color: #eaeef1;
  593. }
  594. </style>
  595. <style lang="scss" scoped>
  596. .txt_left_pay {
  597. display: flex;
  598. align-items: center;
  599. height: 64rpx;
  600. font-size: 24rpx;
  601. color: #666666;
  602. }
  603. .pay_icon {
  604. width: 64rpx;
  605. height: 64rpx;
  606. margin-right: 10rpx;
  607. }
  608. .box4 {
  609. width: 100%;
  610. background: #ffffff;
  611. // border-radius: 16rpx;
  612. margin-top: 16rpx;
  613. padding: 32rpx 32rpx 0rpx 32rpx;
  614. }
  615. .box3 {
  616. width: 100%;
  617. // height: 886rpx;
  618. background: #ffffff;
  619. // border-radius: 16rpx;
  620. margin-top: 16rpx;
  621. padding: 32rpx 32rpx 0rpx 32rpx;
  622. }
  623. .tip {
  624. font-size: 24rpx;
  625. color: #999999;
  626. height: 40rpx;
  627. line-height: 40rpx;
  628. }
  629. .txt_right_sn {
  630. font-size: 30rpx;
  631. font-weight: bold;
  632. color: #666666;
  633. }
  634. .txt_right_price {
  635. font-size: 32rpx;
  636. font-weight: bold;
  637. color: #ff2d55;
  638. }
  639. .txt_left {
  640. font-size: 28rpx;
  641. color: #666666;
  642. }
  643. .txt_right {
  644. text-align: right;
  645. color: #333333;
  646. font-weight: bold;
  647. width: 75%;
  648. }
  649. .list_title {
  650. display: flex;
  651. justify-content: space-between;
  652. }
  653. .list_item {
  654. display: flex;
  655. justify-content: space-between;
  656. height: 110rpx;
  657. align-items: center;
  658. }
  659. .title2 {
  660. font-size: 32rpx;
  661. font-weight: bold;
  662. color: #333333;
  663. // height: 80rpx;
  664. // line-height: 80rpx;
  665. // margin-left: 30rpx;
  666. margin-bottom: 32rpx;
  667. }
  668. .box2 {
  669. width: 100%;
  670. background: #ffffff;
  671. // border-radius: 16rpx;
  672. padding: 32rpx 32rpx 0rpx 32rpx;
  673. .right_con {
  674. width: 450rpx;
  675. }
  676. .priceTag {
  677. font-size: 28rpx;
  678. font-family: PingFang SC;
  679. font-weight: bold;
  680. color: #fc3f3f;
  681. margin-top: 6rpx;
  682. margin-bottom: 10rpx;
  683. }
  684. .info_right {
  685. height: 110rpx;
  686. line-height: 110rpx;
  687. border-top: 1rpx solid #f2f2f2;
  688. }
  689. }
  690. .box1_t2 {
  691. font-size: 24rpx;
  692. color: #999999;
  693. text-align: center;
  694. }
  695. .box1_t1 {
  696. font-size: 30rpx;
  697. font-weight: bold;
  698. color: #333333;
  699. height: 70rpx;
  700. display: flex;
  701. align-items: center;
  702. justify-content: center;
  703. }
  704. .box1 {
  705. width: 100%;
  706. height: 120rpx;
  707. background: #ffffff;
  708. border-radius: 16rpx;
  709. }
  710. .bottomBtn {
  711. position: fixed;
  712. bottom: 0;
  713. width: 100%;
  714. height: 98rpx;
  715. background: linear-gradient(0deg, #015eea, #00c0fa);
  716. color: #ffffff;
  717. text-align: center;
  718. line-height: 98rpx;
  719. font-weight: bold;
  720. font-size: 30rpx;
  721. border-radius: 0;
  722. }
  723. .bottomBox {
  724. position: fixed;
  725. bottom: 0;
  726. width: 100%;
  727. left: 0;
  728. height: 132rpx;
  729. background-color: #ffffff;
  730. display: flex;
  731. justify-content: space-between;
  732. align-items: center;
  733. box-sizing: unset;
  734. box-shadow: 0px -2px 6px 0px rgba(0, 0, 0, 0.1);
  735. >view {
  736. margin: 0 30rpx;
  737. }
  738. .sums {
  739. display: flex;
  740. }
  741. .all_sum {
  742. font-size: 28rpx;
  743. font-weight: 500;
  744. color: #303030;
  745. }
  746. .priceTag {
  747. font-size: 32rpx;
  748. font-weight: 800;
  749. color: #fc3f3f;
  750. }
  751. .btn2 {
  752. width: 232rpx;
  753. height: 92rpx;
  754. background: #fc3f3f;
  755. border-radius: 120rpx;
  756. text-align: center;
  757. line-height: 92rpx;
  758. color: #fff;
  759. }
  760. }
  761. </style>