bookticket.vue 26 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003
  1. <template>
  2. <view class="pages">
  3. <view class="" :style="{height: navHeight+'px' }"></view>
  4. <view class="navbar-box">
  5. <u-navbar title="订单详情" :safeAreaInsetTop="true" @leftClick="leftClick" :titleStyle="{color:'#fff'}"
  6. leftIconColor="#fff" bgColor="transparent"></u-navbar>
  7. </view>
  8. <view class="page-wrap">
  9. <view class="base-info">
  10. <view class="up u-flex">
  11. <image class="img" :src="pageContent.performImg" mode="aspectFill" alt="">
  12. <view class="text">
  13. <view class="name text-item">{{pageContent.performName}}-{{pageContent.goodsName}}</view>
  14. <view class="time text-item">日期 {{pageContent.timeDate}}({{pageContent.timeWeek}})</view>
  15. <view class="time text-item">场次 {{pageContent.performTimeStart}} -
  16. {{pageContent.performTimeEnd}}</view>
  17. <view class="num text-item">{{pageContent.goodsName}} / {{pageContent.seatTypeName}}</view>
  18. <view class=" text-item">{{pageContent.auditoriumName}}</view>
  19. <!-- <view class="position text-item">{{performInfo.name}}</view> -->
  20. <!-- <view class="addr u-flex u-row-between">
  21. <view class="u-line-1">地址:遵义市《伟大转折》演艺中心</view>
  22. <u-icon name="arrow-right" color="#2D2D2D" size="36rpx"></u-icon>
  23. </view> -->
  24. </view>
  25. </view>
  26. <view class="down">
  27. <view class="num-wrap u-flex u-row-between">
  28. <view class="title">选购数量</view>
  29. <view class="num">{{totalVisitor}}</view>
  30. </view>
  31. </view>
  32. </view>
  33. <!-- <view class="block-wrap purchaser">
  34. <view class="block-title u-flex">
  35. <view class="name">购票人信息</view>
  36. </view>
  37. <view class="" v-if="vuex_member_info.isAuth">
  38. <view class="item">姓名:{{pageContent.purchaser.name}}</view>
  39. <view class="item">手机号:{{pageContent.purchaser.mobile|hidePhoneNumber}}</view>
  40. <view class="item">身份证:{{pageContent.purchaser.cardId|maskID}}</view>
  41. </view>
  42. <view class="un-auth" v-else @click="$u.route('center/factorauth',{from:'bookticket'})">
  43. 请先<text style="color: #ED0000;">实名认证</text>
  44. </view>
  45. </view> -->
  46. <view class="block-wrap visitors">
  47. <view class="block-title u-flex">
  48. <view class="name">观影人信息</view>
  49. <!-- <text>用于入园身份验证</text> -->
  50. </view>
  51. <view class="people-list">
  52. <!-- <view class="people btn" v-if="visitors.length>0" v-for="(visitor,index) in visitors" :key="index">
  53. {{visitor.name}}
  54. </view> -->
  55. <view class="add-wrap">
  56. <u--input placeholder="请输入观影人姓名" border="surround" v-model="newVisitor.name"></u--input>
  57. <u--input placeholder="请输入观影人身份证" border="surround" v-model="newVisitor.cardId"></u--input>
  58. </view>
  59. <view class="btn u-flex u-row-center" @click="addVisitor">
  60. <u-icon name="plus-circle" color="#2D2D2D" size="32rpx"></u-icon>
  61. <text class="text">新增观影人</text>
  62. </view>
  63. </view>
  64. <!-- <view class="no-people u-flex" v-if="!visitors.length>0">
  65. <text>游客</text>
  66. <text class="right" @click="visitorShow = true">点击选择游客</text>
  67. </view> -->
  68. <view class="peoples" v-if="visitors.length>0">
  69. <view class="peoples-item u-flex u-row-between" v-for="(visitor,index) in visitors" :key="index">
  70. <view class="left u-flex">
  71. <u-icon @click="delVisitor(visitor)" name="close-circle" color="#2D2D2D"
  72. size="32rpx"></u-icon>
  73. <text style="margin-left: 8rpx;">观影人{{ index + 1 }}</text>
  74. <text class="name">{{visitor.name}}</text>
  75. <!-- <text class="people-id">{{ visitor.cardId | maskID }}</text> -->
  76. </view>
  77. <!-- <view class="right" @click="editVisitor(visitor)">编辑</view> -->
  78. </view>
  79. </view>
  80. </view>
  81. <!-- <view class="coupon">
  82. <view class="title u-flex u-row-between u-border-bottom">
  83. <text>本单可享优惠</text>
  84. </view>
  85. <view class="single-til u-flex u-row-between">
  86. <view class="text">优惠券</view>
  87. <view class="more-text u-flex">
  88. <text>未使用</text>
  89. <u-icon name="arrow-right" color="#E6E6E6" size="24rpx"></u-icon>
  90. </view>
  91. </view>
  92. <view class="no-coupon">
  93. 您暂无可使用优惠券~
  94. </view>
  95. </view> -->
  96. <view class="notice">
  97. <view class="title u-flex u-row-between u-border-bottom">
  98. <text>购票须知</text>
  99. </view>
  100. <view class="notice-item parse-content">
  101. <u-parse :content="pageContent.ticketNotice"></u-parse>
  102. </view>
  103. <!-- <view class="notice-item">
  104. 1.由于设备故障等不可抗力因素,存在少量场次取消的情况,会
  105. 进行退票退款
  106. </view>
  107. <view class="notice-item">
  108. 2.由于影院系统不稳定等因素,存在出票失败的情况,会进行退款
  109. </view>
  110. <view class="notice-item">
  111. 3.取票码可以在“我的-订单页”中查看
  112. </view> -->
  113. </view>
  114. </view>
  115. <u-popup :show="visitorShow">
  116. <view class="people-show-content">
  117. <view class="title">
  118. <view class="cancel" @click="visitorShow=false">取消</view>
  119. 选择观影人
  120. </view>
  121. <view class="add-btn u-flex u-row-center" @click="addVisitor">
  122. <!-- <image class="img" :src="staticUrl+'/img/car.png'" ></image> -->
  123. 添加观影人信息
  124. </view>
  125. <view class="list">
  126. <u-checkbox-group v-model="selectedVisitor" iconPlacement="left">
  127. <view class="people u-flex u-row-between" v-for="(item,index) in visitorList" :key="index">
  128. <u-checkbox activeColor="#ED0303" :label="item.name" :name="item.id"></u-checkbox>
  129. <u-icon name="edit-pen-fill" color="#7F7F7F" size="32rpx"
  130. @click="editVisitor(item)"></u-icon>
  131. </view>
  132. </u-checkbox-group>
  133. </view>
  134. <view class="full-btn" @click="confirmVisitor">确定</view>
  135. </view>
  136. </u-popup>
  137. <view class="page-bottom">
  138. <view class="inner u-flex u-row-between">
  139. <view class="left u-flex">
  140. <text>应付金额:</text>
  141. <view class="total-price">
  142. {{totalPrice}}
  143. </view>
  144. </view>
  145. <view class="right">
  146. <view class="btn active" v-if="totalPrice>0&&cansubmit"
  147. @click="applyOrder">提交报名</view>
  148. <view class="btn" v-else>提交报名</view>
  149. </view>
  150. </view>
  151. </view>
  152. </view>
  153. </template>
  154. <script>
  155. import {
  156. systemInfo
  157. } from "@/mixin.js";
  158. // #ifdef H5
  159. import wxH5 from "weixin-jsapi";
  160. // #endif
  161. export default {
  162. mixins: [systemInfo],
  163. data() {
  164. return {
  165. theatreId:'',
  166. theatreName:'',
  167. performId: '',
  168. performInfo: {},
  169. pageData: {}, //上个页面传过来的数据
  170. pageContent: {
  171. performName: '',
  172. goodsName: '',
  173. timeDate: '',
  174. timeWeek: '',
  175. seatTypeName: '',
  176. auditoriumName: '',
  177. performTimeEnd: '',
  178. performTimeStart: '',
  179. purchaser: {
  180. mobile: '',
  181. cardId: ''
  182. },
  183. ticketNotice: '',
  184. viewerList: [],
  185. }, //页面信息
  186. ticketNotice: '',
  187. cansubmit: true,
  188. staticUrl: this.$commonConfig.staticUrl,
  189. visitors: [], //确认的游客
  190. visitorShow: false, //游客弹层
  191. visitorList: [], //游客列表
  192. selectedVisitor: [], //选中的游客(id)
  193. params: {}, //要提交的数据
  194. orderId: '', //订单提交获取
  195. payResult: {}, //gotoPay结果
  196. paysuccess: false, //支付结果
  197. templateIdList: [], //微信小程序订阅消息
  198. newVisitor:{
  199. name:'',
  200. cardId:''
  201. },
  202. }
  203. },
  204. computed: {
  205. totalPrice() {
  206. let that = this;
  207. return this.visitors.reduce((total, item) => {
  208. let price = null;
  209. price = Number(that.pageData.salePrice);
  210. total += price;
  211. return total;
  212. }, 0).toFixed(2);
  213. },
  214. totalVisitor() {
  215. let that = this;
  216. return this.visitors.reduce((total, item) => {
  217. total += 1;
  218. return total;
  219. }, 0);
  220. },
  221. },
  222. onShow() {
  223. // this.getSettlement();
  224. },
  225. onLoad(page) {
  226. console.log('page', page);
  227. this.pageData = page;
  228. this.performId = page.performId;
  229. this.pageData.performTimeId = page.performTimeId;
  230. this.pageData.seatTypeId = page.seatTypeId;
  231. this.theatreId = page.theatreId;
  232. this.theatreName = page.theatreName;
  233. this.getSystemInfo();
  234. this.getSettlement();
  235. // this.getTemplateIdList(); //获取微信订阅模板列表
  236. },
  237. methods: {
  238. leftClick(e) {
  239. let pages = getCurrentPages();
  240. if (pages.length == 1) {
  241. uni.$u.route('/pages/index/index')
  242. } else {
  243. uni.navigateBack()
  244. };
  245. },
  246. getSettlement() {
  247. this.$u.api.getSettlement(this.pageData).then(res => {
  248. // console.log('getSettlement',res.data);
  249. this.pageContent = res.data;
  250. // this.getMemberAll();
  251. }).catch(err => {
  252. console.log('getSettlement', err);
  253. })
  254. },
  255. getMemberAll() {
  256. let that = this;
  257. // const userId = this.vuex_member_info.id;
  258. const userId = this.pageContent.viewerList[0]?.id;
  259. this.$u.api.selectMemberAll({
  260. userid: userId
  261. }).then(res => {
  262. // console.log('getMemberAll',res.data);
  263. this.visitorList = res.data.list;
  264. // this.visitors = this.visitorList.filter(obj => obj.memberId==userId);
  265. this.visitors = this.visitorList.filter(obj => that.selectedVisitor.includes(obj.cardId));
  266. // console.log('this.visitorList',this.visitorList);
  267. // console.log('this.selectedVisitor',this.selectedVisitor);
  268. // console.log('this.visitors',this.visitors);
  269. }).catch(err => {
  270. console.log('getMemberAll', err);
  271. })
  272. },
  273. confirmVisitor() {
  274. let that = this;
  275. // console.log('selectedVisitor',this.selectedVisitor);
  276. this.visitorShow = false;
  277. this.visitors = this.visitorList.filter(obj => that.selectedVisitor.includes(obj.id)).map(item => {
  278. return {
  279. name: item.name,
  280. mobile: item.mobile,
  281. cardId: item.cardId
  282. }
  283. });
  284. // console.log('this.visitors',this.visitors);
  285. },
  286. delVisitor(visitor) {
  287. // console.log('delVisitor',visitor);
  288. // console.log('this.visitors',this.visitors);
  289. this.visitors = this.visitors.filter(obj => obj.cardId != visitor.cardId);
  290. },
  291. addVisitor() {
  292. uni.$u.route('/center/people', {
  293. type: 'addVisitor',
  294. fromPage: 'bookticket'
  295. });
  296. },
  297. editVisitor(item) {
  298. uni.$u.route('/center/people', {
  299. type: 'editVisitor',
  300. fromPage: 'bookticket',
  301. id: item.id,
  302. name: item.name,
  303. mobile: item.mobile,
  304. cardId: item.cardId,
  305. });
  306. },
  307. getTemplateIdList() {
  308. this.$u.api.templateIdList({
  309. templateLabel: 'order_pay'
  310. }).then(res => {
  311. console.log('getTemplateIdList', res.data);
  312. this.templateIdList = res.data.list.map(item => {
  313. return item.templateId
  314. });
  315. // if(this.templateIdList.length>0){
  316. // this.templateEven();
  317. // }
  318. }).catch(err => {
  319. console.log('getTemplateIdList', err);
  320. })
  321. },
  322. applyOrder(){
  323. console.log('applyOrder');
  324. this.cansubmit = false;
  325. // console.log('this.pageContent',this.pageContent);
  326. let params = {
  327. theatreId:this.theatreId,
  328. theatreName:this.theatreName,
  329. auditoriumId:this.pageContent.auditoriumId,
  330. auditoriumName:this.pageContent.auditoriumName,
  331. performId:this.pageContent.performId,
  332. performName:this.pageContent.performName,
  333. seatTypeId:this.pageContent.seatTypeId,
  334. seatTypeName:this.pageContent.seatTypeName,
  335. goodsId:this.pageContent.goodsId,
  336. goodsName:this.pageContent.goodsName,
  337. performTimeId:this.pageContent.performTimeId,
  338. price:this.pageContent.salePrice,
  339. priceTotal:this.totalPrice,
  340. viewerList:this.visitors,
  341. }
  342. console.log('params',params);
  343. this.$u.api.teamApply(params).then(res => {
  344. uni.$u.route('/center/paysuccess')
  345. }).catch(err => {
  346. this.cansubmit = true;
  347. uni.$u.toast(err.msg);
  348. console.log('applyOrder', err);
  349. })
  350. },
  351. submitorder() {
  352. let params = {
  353. performId: this.pageContent.performId,
  354. goodsList: [{
  355. goodsId: this.pageContent.goodsId,
  356. salePeice: this.pageContent.salePrice,
  357. saleNum: 1
  358. }],
  359. auditoriumId: this.pageContent.auditoriumId,
  360. performTimeId: this.pageContent.performTimeId,
  361. seatTypeId: this.pageContent.seatTypeId,
  362. purchaser: {
  363. name: this.pageContent.purchaser.name,
  364. mobile: this.pageContent.purchaser.mobile,
  365. cardId: this.pageContent.purchaser.cardId
  366. },
  367. viewerList: this.visitors
  368. }
  369. // #ifdef MP
  370. params['source'] = 1
  371. // #endif
  372. // #ifdef H5
  373. params['source'] = 4
  374. // #endif
  375. this.cansubmit = false;
  376. // console.log('pageData',this.pageData);
  377. // console.log('visitors',this.visitors);
  378. // console.log('params',params);
  379. this.$u.api.submitOrder(params).then(res => {
  380. // console.log('submitOrder',res.data);
  381. this.orderId = res.data.orderId;
  382. // this.templateEven()
  383. this.setTemplate();
  384. }).catch(err => {
  385. this.cansubmit = true;
  386. uni.$u.toast(err.msg);
  387. if (err.msg.includes('限购')) {
  388. setTimeout(() => {
  389. uni.$u.route('/center/order', {
  390. status: 0
  391. });
  392. }, 2000)
  393. }
  394. console.log('submitOrder', err);
  395. })
  396. },
  397. // 订阅消息
  398. templateEven() {
  399. let that = this
  400. wx.showModal({
  401. title: '温馨提示',
  402. content: '为更好的促进与您的交流,服务号需要实时向您发送消息',
  403. confirmText: "同意",
  404. cancelText: "拒绝",
  405. success: function(res) {
  406. if (res.confirm) {
  407. //调用订阅消息
  408. console.log('用户点击确定');
  409. //调用订阅
  410. that.setTemplate();
  411. } else if (res.cancel) {
  412. console.log('用户点击取消');
  413. ///显示第二个弹说明一下
  414. wx.showModal({
  415. title: '温馨提示',
  416. content: '拒绝后您将无法获取实时的消息',
  417. confirmText: "知道了",
  418. showCancel: false,
  419. success: function(res) {
  420. that.gotoPay();
  421. ///点击知道了的后续操作
  422. ///如跳转首页面
  423. }
  424. });
  425. }
  426. }
  427. });
  428. },
  429. // 设置小程序订阅消息
  430. setTemplate() {
  431. let that = this;
  432. console.log('templateIdList', this.templateIdList);
  433. // #ifdef MP
  434. uni.requestSubscribeMessage({
  435. tmplIds: that.templateIdList,
  436. success(res) {
  437. // that.gotoPay();
  438. console.log("success:", res);
  439. },
  440. fail(res) {
  441. console.log("fail:", res);
  442. },
  443. complete(res) {
  444. that.gotoPay();
  445. console.log("complete:", res);
  446. }
  447. })
  448. // #endif
  449. // #ifdef H5
  450. that.gotoPay()
  451. // #endif
  452. },
  453. gotoPay() {
  454. this.$u.api.gotoPay({
  455. orderId: this.orderId,
  456. openid: ''
  457. }).then(res => {
  458. this.payResult = res.data.payInfo;
  459. this.payResult.package = res.data.payInfo.packageValue;
  460. // #ifdef H5
  461. this.initConfig(this.payResult)
  462. // #endif
  463. // #ifdef MP
  464. this.wxPay()
  465. // #endif
  466. // if(this.params.paymentMode==1||this.params.paymentMode==4){
  467. // this.wxPay()
  468. // }else{
  469. // uni.$u.route('/shopping/paysuccess');
  470. // }
  471. console.log('gotoPayres', res.data);
  472. }).catch(err => {
  473. this.cansubmit = true;
  474. // this.paypass = '';
  475. // this.checkPassShow = false;
  476. console.log('gotoPay', err);
  477. })
  478. },
  479. wxPay() {
  480. let that = this;
  481. uni.requestPayment({
  482. ...this.payResult,
  483. "provider": "wxpay",
  484. "orderInfo": {
  485. // "appid": "wx499********7c70e", // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
  486. // "noncestr": "c5sEwbaNPiXAF3iv", // 随机字符串
  487. // "package": "Sign=WXPay", // 固定值
  488. // "partnerid": "148*****52", // 微信支付商户号
  489. // "prepayid": "wx202254********************fbe90000", // 统一下单订单号
  490. // "timestamp": 1597935292, // 时间戳(单位:秒)
  491. // "sign": "A842B45937F6EFF60DEC7A2EAA52D5A0" // 签名,这里用的 MD5/RSA 签名
  492. },
  493. success(res) {
  494. that.payQuery();
  495. },
  496. fail(e) {
  497. uni.$u.route('/center/order', {
  498. status: 0
  499. });
  500. console.log('wxPayfail', e);
  501. },
  502. complete() {
  503. this.cansubmit = true;
  504. }
  505. })
  506. },
  507. payQuery() {
  508. let that = this;
  509. let retryCount = 0;
  510. let maxRetryCount = 5; // 设置最大重试次数
  511. let interval = 2000; // 设置间隔时间为2秒
  512. let timeout = 10000; // 设置超时时间为10秒
  513. let timer;
  514. uni.showLoading({
  515. title: '支付结果查询中'
  516. })
  517. timer = setInterval(() => {
  518. retryCount++;
  519. if (retryCount > maxRetryCount || retryCount * interval > timeout) {
  520. clearInterval(timer);
  521. uni.hideLoading();
  522. console.log("支付查询超时或达到最大重试次数");
  523. // 在这里添加超时或达到最大重试次数的处理逻辑
  524. uni.$u.route('/center/order');
  525. } else {
  526. console.log("第" + retryCount + "次查询");
  527. // 调用查询支付状态的方法
  528. // 如果支付状态为成功,则清除定时器并处理成功的逻辑
  529. // 如果支付状态为失败,则清除定时器并处理失败的逻辑
  530. this.$u.api.payQuery({
  531. orderId: this.orderId
  532. }).then(res => {
  533. // 0-未支付 1-已支付 2-支付中 3-支付失败 4-支付退款
  534. let payStatus = res.data.payStatus;
  535. if (payStatus === 1) {
  536. uni.$u.route('/center/order', {
  537. status: 3
  538. });
  539. // uni.$u.route('/center/paysuccess');
  540. } else if (payStatus === 0 || payStatus === 2) {
  541. this.payQuery()
  542. } else if (payStatus === 3) {
  543. uni.$u.toast('支付失败')
  544. }
  545. clearInterval(timer);
  546. }).catch(err => {
  547. console.log('payQuery', err);
  548. }).finally(() => {
  549. uni.hideLoading()
  550. })
  551. }
  552. }, interval);
  553. },
  554. addVisitor(){
  555. if(!this.newVisitor.name){
  556. uni.$u.toast('请填写观影人姓名')
  557. return
  558. }
  559. if(!uni.$u.test.idCard(this.newVisitor.cardId)){
  560. uni.$u.toast('请正确填写观影人身份证')
  561. return
  562. }
  563. // console.log('this.newVisitor.cardId',this.newVisitor.cardId);
  564. // console.log('visitors',this.visitors);
  565. // 检查是否存在相同身份证号的观影人
  566. if(this.visitors.some(visitor => visitor.cardId === this.newVisitor.cardId)){
  567. uni.$u.toast('相同身份证号的观影人已存在')
  568. return
  569. }
  570. console.log('this.newVisitor',this.newVisitor);
  571. this.$u.api.authID({name:this.newVisitor.name,idcard:this.newVisitor.cardId}).then(res=>{
  572. if(res.data.status===1){
  573. this.visitors.push(this.newVisitor);
  574. this.newVisitor = {name:'',cardId:''};
  575. }else{
  576. uni.$u.toast(res.data.errReason)
  577. }
  578. // console.log('res',res.data);
  579. }).catch(err=>{
  580. uni.$u.toast('认证失败')
  581. console.log('login',err);
  582. })
  583. },
  584. /**
  585. * 公众号微信支付
  586. */
  587. initConfig() {
  588. // #ifdef H5
  589. let that = this
  590. wxH5.config({
  591. debug: false, // 这里一般在测试阶段先用ture,等打包给后台的时候就改回false,
  592. appId: that.payResult.appId, // 必填,公众号的唯一标识
  593. timestamp: that.payResult.timeStamp, // 必填,生成签名的时间戳
  594. nonceStr: that.payResult.nonceStr, // 必填,生成签名的随机串
  595. signature: that.payResult.paySign, // 必填,签名
  596. jsApiList: ['chooseWXPay', 'checkJsApi'] // 必填,需要使用的JS接口列表
  597. })
  598. wxH5.ready(() => {
  599. wxH5.chooseWXPay({
  600. timestamp: that.payResult.timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
  601. nonceStr: that.payResult.nonceStr, // 支付签名随机串,不长于 32 位
  602. package: that.payResult.packageValue, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)
  603. signType: 'SHA1', // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
  604. paySign: that.payResult.paySign, // 支付签名
  605. success: () => {
  606. that.payQuery();
  607. },
  608. fail: (e) => {
  609. uni.$u.route('/center/order', {
  610. status: 0
  611. });
  612. console.log('wxPayfail', e);
  613. },
  614. cancel: () => {
  615. uni.$u.route('/center/order', {
  616. status: 0
  617. });
  618. that.cansubmit = true;
  619. }
  620. })
  621. })
  622. // #endif
  623. }
  624. }
  625. }
  626. </script>
  627. <style>
  628. page {
  629. background: linear-gradient(180deg, #ED0000 0%, #F9FBFD 50%, #fff 100%);
  630. background-repeat: no-repeat;
  631. }
  632. </style>
  633. <style lang="scss" scoped>
  634. .base-info {
  635. border-radius: 30rpx;
  636. overflow: hidden;
  637. background: radial-gradient(circle at -26rpx 294rpx, transparent 8%, #fff 4%) left, radial-gradient(circle at calc(100% + 26rpx) 294rpx, transparent 8%, #fff 4%) right;
  638. background-size: 50% 100%;
  639. background-repeat: no-repeat;
  640. padding: 34rpx 36rpx;
  641. box-sizing: border-box;
  642. margin: 30rpx 0 40rpx;
  643. .up {
  644. margin-bottom: 36rpx;
  645. .img {
  646. display: block;
  647. width: 172rpx;
  648. height: 230rpx;
  649. border-radius: 20rpx;
  650. margin-right: 32rpx;
  651. }
  652. .text {
  653. font-size: 22rpx;
  654. font-weight: 400;
  655. color: #606060;
  656. line-height: 1;
  657. }
  658. .text-item {
  659. margin-bottom: 18rpx;
  660. }
  661. .name {
  662. font-size: 32rpx;
  663. font-weight: bold;
  664. color: #2D2D2D;
  665. }
  666. .addr {
  667. font-size: 24rpx;
  668. font-weight: 500;
  669. color: #2D2D2D;
  670. }
  671. }
  672. .down {
  673. position: relative;
  674. &:before {
  675. content: '';
  676. width: calc(100% + 26rpx);
  677. height: 1px;
  678. position: absolute;
  679. left: -13rpx;
  680. top: -2rpx;
  681. border-top: 4rpx dashed #F39FA0;
  682. }
  683. .num-wrap {
  684. padding-top: 36rpx;
  685. .title {
  686. font-size: 14px;
  687. color: #4E4E4E;
  688. }
  689. }
  690. }
  691. }
  692. .block-wrap {
  693. background: #FFFFFF;
  694. box-shadow: 0rpx 0rpx 20rpx 2rpx rgba(221, 221, 221, 0.5);
  695. border-radius: 20rpx;
  696. margin-bottom: 28rpx;
  697. padding: 32rpx 30rpx 34rpx;
  698. .block-title {
  699. // padding-left: 16rpx;
  700. position: relative;
  701. margin-bottom: 22rpx;
  702. font-size: 24rpx;
  703. font-weight: 500;
  704. color: #CACACA;
  705. // &:before{
  706. // content: '';
  707. // width: 6rpx;
  708. // height: 32rpx;
  709. // background: #1677FF;
  710. // border-radius: 4rpx;
  711. // position: absolute;
  712. // left: 0;
  713. // top: 50%;
  714. // margin-top: -16rpx;
  715. // }
  716. .name {
  717. font-size: 32rpx;
  718. font-weight: bold;
  719. color: #2D2D2D;
  720. margin-right: 20rpx;
  721. }
  722. }
  723. .no-people {
  724. font-size: 28rpx;
  725. font-weight: 400;
  726. color: #7F7F7F;
  727. .right {
  728. margin-left: 20rpx;
  729. color: #1677FF;
  730. }
  731. }
  732. .peoples {
  733. font-size: 28rpx;
  734. font-weight: 400;
  735. color: #7F7F7F;
  736. margin-bottom: 24rpx;
  737. .peoples-item {
  738. margin-bottom: 10rpx;
  739. }
  740. .name {
  741. margin-left: 20rpx;
  742. margin-right: 28rpx;
  743. font-size: 28rpx;
  744. font-weight: bold;
  745. color: #363636;
  746. }
  747. .people-id {
  748. font-size: 20rpx;
  749. font-weight: 400;
  750. color: #606060;
  751. }
  752. .right {
  753. font-size: 28rpx;
  754. font-weight: 400;
  755. color: #ED0303;
  756. }
  757. }
  758. }
  759. .people-list {
  760. margin-bottom: 20rpx;
  761. .btn {
  762. width: 185rpx;
  763. height: 60rpx;
  764. line-height: 60rpx;
  765. font-size: 24rpx;
  766. font-weight: 500;
  767. color: #2D2D2D;
  768. background-color: #F1F1F1;
  769. border: 1px solid #F1F1F1;
  770. border-radius: 8rpx;
  771. margin-bottom: 12rpx;
  772. .text {
  773. margin-left: 16rpx;
  774. }
  775. &.people {
  776. margin-right: 16rpx;
  777. text-align: center;
  778. background-color: #FFF2F2;
  779. border-color: #ED0303;
  780. }
  781. }
  782. .add-wrap{
  783. margin-bottom: 24rpx;
  784. .u-input{
  785. margin-bottom: 24rpx;
  786. }
  787. }
  788. }
  789. .visitors {
  790. margin-bottom: 20rpx;
  791. }
  792. .people-show-content {
  793. background: #FFFFFF;
  794. border-radius: 40rpx 40rpx 0rpx 0rpx;
  795. padding: 30rpx 40rpx;
  796. .title {
  797. position: relative;
  798. font-size: 32rpx;
  799. font-weight: 500;
  800. color: #606060;
  801. margin-bottom: 46rpx;
  802. text-align: center;
  803. .cancel {
  804. position: absolute;
  805. left: 0;
  806. top: 0;
  807. }
  808. }
  809. .add-btn {
  810. margin-bottom: 28rpx;
  811. background: #ffdee1;
  812. border-radius: 44rpx;
  813. padding: 26rpx;
  814. font-size: 24rpx;
  815. font-weight: 400;
  816. color: #ff1616;
  817. .img {
  818. width: 28rpx;
  819. height: 36rpx;
  820. margin-right: 36rpx;
  821. }
  822. }
  823. .list {
  824. /deep/ .u-radio-group {
  825. flex-wrap: wrap;
  826. }
  827. /deep/ .u-checkbox-group {
  828. flex-wrap: wrap;
  829. }
  830. overflow-y: auto;
  831. height: 40vh;
  832. .people {
  833. width: 100%;
  834. margin-bottom: 24rpx;
  835. }
  836. }
  837. .btn {}
  838. }
  839. .coupon {
  840. background: #FFFFFF;
  841. box-shadow: 0rpx 0rpx 16rpx 2rpx rgba(232, 232, 232, 0.5);
  842. border-radius: 16rpx;
  843. padding: 44rpx 36rpx;
  844. margin-bottom: 24rpx;
  845. .title {
  846. font-size: 28rpx;
  847. font-weight: bold;
  848. color: #2D2D2D;
  849. padding-bottom: 20rpx;
  850. margin-bottom: 26rpx;
  851. border-bottom-style: dashed;
  852. }
  853. .single-til {
  854. margin-bottom: 28rpx;
  855. .text {
  856. font-weight: 400;
  857. }
  858. }
  859. .no-coupon {
  860. height: 116rpx;
  861. line-height: 116rpx;
  862. text-align: center;
  863. background: #F9FAFD;
  864. border-radius: 8rpx;
  865. font-size: 24rpx;
  866. font-weight: 400;
  867. color: #C0C0C0;
  868. }
  869. }
  870. .notice {
  871. background: #FFFFFF;
  872. box-shadow: 0rpx 0rpx 16rpx 2rpx rgba(232, 232, 232, 0.5);
  873. border-radius: 16rpx;
  874. padding: 44rpx 36rpx;
  875. margin-bottom: 24rpx;
  876. .title {
  877. font-size: 28rpx;
  878. font-weight: bold;
  879. color: #2D2D2D;
  880. padding-bottom: 20rpx;
  881. margin-bottom: 26rpx;
  882. border-bottom-style: dashed;
  883. }
  884. .notice-item {
  885. font-size: 24rpx;
  886. font-weight: 400;
  887. color: #7F7F7F;
  888. line-height: 36rpx;
  889. margin-bottom: 8rpx;
  890. }
  891. }
  892. .page-bottom {
  893. position: relative;
  894. z-index: 1001;
  895. height: 98rpx;
  896. padding: 24rpx 20rpx 50rpx;
  897. .inner {
  898. position: fixed;
  899. background-color: #fff;
  900. height: 98rpx;
  901. left: 0;
  902. right: 0;
  903. bottom: 0;
  904. padding: 24rpx 20rpx 50rpx;
  905. box-shadow: 0rpx -4rpx 12rpx 0rpx rgba(215, 215, 215, 0.5);
  906. .total-price {
  907. font-size: 40rpx;
  908. font-weight: bold;
  909. color: #ED0000;
  910. }
  911. .btn {
  912. font-size: 28rpx;
  913. height: 80rpx;
  914. line-height: 80rpx;
  915. border-radius: 50rpx;
  916. padding: 0 50rpx;
  917. background-color: #eee;
  918. color: #333;
  919. text-align: center;
  920. &.active {
  921. background: linear-gradient(90deg, #FF7979 0%, #ED0000 100%);
  922. color: #fff;
  923. }
  924. }
  925. }
  926. }
  927. .purchaser {
  928. .item {
  929. margin-bottom: 10rpx;
  930. font-size: 26rpx;
  931. color: #333;
  932. }
  933. .un-auth {
  934. padding: 26rpx;
  935. background-color: #eee;
  936. color: #333;
  937. text-align: center;
  938. border-radius: 8rpx;
  939. }
  940. }
  941. </style>