index-legacy.5dba4c1d.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  1. ;(function () {
  2. System.register(
  3. [
  4. './vendor-legacy.fe38492d.js',
  5. './index-legacy.f25f109a2.js',
  6. './index-legacy.f25f109a10.js',
  7. './index-legacy.f25f109a19.js',
  8. './index-legacy.f25f109a.js',
  9. './index-legacy.f25f109a4.js',
  10. './index-legacy.f25f109a18.js',
  11. './cart-legacy.df34a7d8.js',
  12. './index.module-legacy.2b6ca4e3.js',
  13. './index-legacy.d27e4b36.js',
  14. './index-legacy.fa2b2f51.js',
  15. './index-legacy.481d9d75.js',
  16. './index-legacy.1ceeb134.js',
  17. './index-legacy.083f1bda.js',
  18. './index-legacy.2c5b9d97.js',
  19. './index-legacy.f25f109a13.js',
  20. './index-legacy.f25f109a14.js',
  21. './icon_checkbox_default-legacy.e33240bc.js',
  22. './index-legacy.675a26fc.js',
  23. './index-legacy.f25f109a8.js',
  24. './index-legacy.637f35565.js',
  25. './orderStatus-legacy.17826dad.js',
  26. './hooks-legacy.f95e49a8.js',
  27. './index-legacy.c75fe8a2.js',
  28. './index-legacy.82b754f3.js',
  29. './index-legacy.637f35563.js',
  30. './index-legacy.f25f109a5.js'
  31. ],
  32. function (exports) {
  33. 'use strict'
  34. var defineComponent,
  35. ref,
  36. reactive,
  37. watch,
  38. useRouter,
  39. createVNode,
  40. Card,
  41. CellGroup,
  42. Cell,
  43. SubmitBar,
  44. createTextVNode,
  45. Popup,
  46. Fragment,
  47. Toast,
  48. cartConfirm,
  49. formateAttr,
  50. styles,
  51. Address,
  52. ColProtocol,
  53. Payment,
  54. moneyFormat,
  55. ColResult,
  56. state,
  57. ColPopup,
  58. UserAuth
  59. return {
  60. setters: [
  61. function (module) {
  62. defineComponent = module.d
  63. ref = module.l
  64. reactive = module.h
  65. watch = module.a0
  66. useRouter = module.k
  67. createVNode = module.a
  68. Card = module.aA
  69. CellGroup = module.y
  70. Cell = module.C
  71. SubmitBar = module.ay
  72. createTextVNode = module.j
  73. Popup = module.P
  74. Fragment = module.F
  75. Toast = module.T
  76. },
  77. function () {},
  78. function () {},
  79. function () {},
  80. function () {},
  81. function () {},
  82. function () {},
  83. function (module) {
  84. cartConfirm = module.c
  85. formateAttr = module.f
  86. },
  87. function (module) {
  88. styles = module.s
  89. },
  90. function (module) {
  91. Address = module.A
  92. },
  93. function (module) {
  94. ColProtocol = module.C
  95. },
  96. function (module) {
  97. Payment = module.P
  98. },
  99. function (module) {
  100. moneyFormat = module.o
  101. ColResult = module.C
  102. state = module.s
  103. },
  104. function (module) {
  105. ColPopup = module.C
  106. },
  107. function (module) {
  108. UserAuth = module.U
  109. },
  110. function () {},
  111. function () {},
  112. function () {},
  113. function () {},
  114. function () {},
  115. function () {},
  116. function () {},
  117. function () {},
  118. function () {},
  119. function () {},
  120. function () {},
  121. function () {}
  122. ],
  123. execute: function execute() {
  124. var index = exports(
  125. 'default',
  126. defineComponent({
  127. name: 'cartConfirmAgin',
  128. setup: function setup() {
  129. var _cartConfirm$orderInf,
  130. _cartConfirm$orderInf2,
  131. _cartConfirm$orderInf3,
  132. _cartConfirm$orderInf4,
  133. _cartConfirm$orderInf5,
  134. _cartConfirm$orderInf6,
  135. _cartConfirm$orderInf7,
  136. _cartConfirm$orderInf8,
  137. _cartConfirm$orderInf9,
  138. _cartConfirm$orderInf10,
  139. _cartConfirm$orderInf11,
  140. _cartConfirm$orderInf12,
  141. _cartConfirm$orderInf13,
  142. _cartConfirm$orderInf14 // console.log(cartConfirm)
  143. var list =
  144. ((_cartConfirm$orderInf = cartConfirm.orderInfo) === null ||
  145. _cartConfirm$orderInf === void 0
  146. ? void 0
  147. : _cartConfirm$orderInf.orderItemList) || []
  148. var calcAmount = {
  149. totalAmount:
  150. ((_cartConfirm$orderInf2 = cartConfirm.orderInfo) ===
  151. null || _cartConfirm$orderInf2 === void 0
  152. ? void 0
  153. : _cartConfirm$orderInf2.totalAmount) || 0,
  154. payAmount:
  155. ((_cartConfirm$orderInf3 = cartConfirm.orderInfo) ===
  156. null || _cartConfirm$orderInf3 === void 0
  157. ? void 0
  158. : _cartConfirm$orderInf3.payAmount) || 0,
  159. freightAmount:
  160. ((_cartConfirm$orderInf4 = cartConfirm.orderInfo) ===
  161. null || _cartConfirm$orderInf4 === void 0
  162. ? void 0
  163. : _cartConfirm$orderInf4.freightAmount) || 0,
  164. couponAmount:
  165. (_cartConfirm$orderInf5 = cartConfirm.orderInfo) === null ||
  166. _cartConfirm$orderInf5 === void 0
  167. ? void 0
  168. : _cartConfirm$orderInf5.couponAmount
  169. }
  170. ref(0) // 0->未支付;1->支付宝;2->微信
  171. var address = {
  172. city:
  173. (_cartConfirm$orderInf6 = cartConfirm.orderInfo) === null ||
  174. _cartConfirm$orderInf6 === void 0
  175. ? void 0
  176. : _cartConfirm$orderInf6.receiverCity,
  177. detailAddress:
  178. (_cartConfirm$orderInf7 = cartConfirm.orderInfo) === null ||
  179. _cartConfirm$orderInf7 === void 0
  180. ? void 0
  181. : _cartConfirm$orderInf7.receiverDetailAddress,
  182. name:
  183. (_cartConfirm$orderInf8 = cartConfirm.orderInfo) === null ||
  184. _cartConfirm$orderInf8 === void 0
  185. ? void 0
  186. : _cartConfirm$orderInf8.receiverName,
  187. phoneNumber:
  188. (_cartConfirm$orderInf9 = cartConfirm.orderInfo) === null ||
  189. _cartConfirm$orderInf9 === void 0
  190. ? void 0
  191. : _cartConfirm$orderInf9.receiverPhone,
  192. postCode:
  193. (_cartConfirm$orderInf10 = cartConfirm.orderInfo) ===
  194. null || _cartConfirm$orderInf10 === void 0
  195. ? void 0
  196. : _cartConfirm$orderInf10.receiverPostCode,
  197. province:
  198. (_cartConfirm$orderInf11 = cartConfirm.orderInfo) ===
  199. null || _cartConfirm$orderInf11 === void 0
  200. ? void 0
  201. : _cartConfirm$orderInf11.receiverProvince,
  202. region:
  203. (_cartConfirm$orderInf12 = cartConfirm.orderInfo) ===
  204. null || _cartConfirm$orderInf12 === void 0
  205. ? void 0
  206. : _cartConfirm$orderInf12.receiverRegion
  207. }
  208. var agreeStatus = ref(false)
  209. var paymentPopup = ref(false)
  210. var authPopup = ref(false)
  211. var orderInfo = reactive({
  212. orderNo:
  213. ((_cartConfirm$orderInf13 = cartConfirm.orderInfo) ===
  214. null || _cartConfirm$orderInf13 === void 0
  215. ? void 0
  216. : _cartConfirm$orderInf13.orderSn) || '',
  217. actualPrice:
  218. ((_cartConfirm$orderInf14 = cartConfirm.orderInfo) ===
  219. null || _cartConfirm$orderInf14 === void 0
  220. ? void 0
  221. : _cartConfirm$orderInf14.payAmount) || 0
  222. }) //修复实名认证头部问题
  223. watch(authPopup, function (value, oldValue) {
  224. if (authPopup.value) {
  225. // 设置是否显示导航栏 0 显示 1 不显示
  226. postMessage({ api: 'setBarStatus', content: { status: 0 } })
  227. } else {
  228. postMessage({ api: 'setBarStatus', content: { status: 1 } })
  229. }
  230. }) // 提交
  231. var _onSubmit = function onSubmit() {
  232. if (!agreeStatus.value) {
  233. Toast('请先阅读并同意《酷乐秀平台服务协议》')
  234. return
  235. }
  236. var users = state.user.data // 判断是否需要实名认证
  237. if (
  238. !(users !== null && users !== void 0 && users.realName) ||
  239. !(users !== null && users !== void 0 && users.idCardNo)
  240. ) {
  241. authPopup.value = true
  242. return
  243. } // 判断是否有订单号
  244. if (orderInfo.orderNo) {
  245. paymentPopup.value = true
  246. return
  247. }
  248. Toast('没有订单号!')
  249. }
  250. var router = useRouter() //认证成功
  251. var onAuthSuccess = function onAuthSuccess() {
  252. authPopup.value = false
  253. _onSubmit() // 实名成功后自动支付
  254. }
  255. return function () {
  256. return createVNode(Fragment, null, [
  257. list.length
  258. ? createVNode('div', { class: styles.cartConfirm }, [
  259. createVNode('div', { class: styles.cartConfirmBox }, [
  260. createVNode(
  261. Address,
  262. { item: address, isLink: false },
  263. null
  264. )
  265. ]),
  266. createVNode(
  267. 'div',
  268. {
  269. style: { marginTop: '20px' },
  270. class: [styles.cartBox, styles.cartConfirmBox]
  271. },
  272. [
  273. createVNode('div', { class: styles.shopBox }, [
  274. list.map(function (item) {
  275. return createVNode(
  276. 'div',
  277. {
  278. class: [styles.cartItem],
  279. style: { marginBottom: '10px' }
  280. },
  281. [
  282. createVNode(
  283. Card,
  284. {
  285. price: moneyFormat(item.productPrice),
  286. desc: formateAttr(item.productAttr),
  287. title: item.productName,
  288. thumb: item.productPic,
  289. num: item.productQuantity
  290. },
  291. null
  292. )
  293. ]
  294. )
  295. })
  296. ]),
  297. createVNode(
  298. CellGroup,
  299. { border: false },
  300. {
  301. default: function _default() {
  302. return [
  303. createVNode(
  304. Cell,
  305. { border: false, title: '优惠券' },
  306. {
  307. value: function value() {
  308. return createVNode(
  309. 'span',
  310. {
  311. style: {
  312. fontSize: '0.42667rem',
  313. color: '#ff3535',
  314. fontWeight: 'bold'
  315. }
  316. },
  317. ['-¥ ' + calcAmount.couponAmount]
  318. )
  319. }
  320. }
  321. ),
  322. createVNode(
  323. Cell,
  324. {
  325. border: false,
  326. title: '总额',
  327. value: '¥ ' + calcAmount.totalAmount
  328. },
  329. null
  330. )
  331. ]
  332. }
  333. }
  334. )
  335. ]
  336. ),
  337. createVNode('div', { class: styles.payProtocol }, [
  338. createVNode(
  339. ColProtocol,
  340. {
  341. modelValue: agreeStatus.value,
  342. 'onUpdate:modelValue':
  343. function onUpdateModelValue($event) {
  344. return (agreeStatus.value = $event)
  345. }
  346. },
  347. null
  348. ),
  349. createVNode(
  350. SubmitBar,
  351. {
  352. buttonText: '\u7ED3\u7B97('.concat(
  353. list.length,
  354. ')'
  355. ),
  356. buttonColor: 'var(--van-primary)',
  357. disabled: list.length === 0,
  358. onSubmit: function onSubmit() {
  359. return _onSubmit()
  360. }
  361. },
  362. {
  363. default: function _default() {
  364. return [
  365. createVNode(
  366. 'div',
  367. { class: styles.confirmBottom },
  368. [
  369. createTextVNode('\u5408\u8BA1'),
  370. ' ',
  371. createVNode(
  372. 'span',
  373. { class: styles['price-des'] },
  374. [
  375. createTextVNode('\xA5'),
  376. moneyFormat(calcAmount.payAmount)
  377. ]
  378. )
  379. ]
  380. )
  381. ]
  382. }
  383. }
  384. )
  385. ]),
  386. createVNode(
  387. 'div',
  388. {
  389. style: { height: 'var(--van-submit-bar-height)' }
  390. },
  391. null
  392. ),
  393. createVNode(
  394. ColPopup,
  395. {
  396. modelValue: authPopup.value,
  397. 'onUpdate:modelValue':
  398. function onUpdateModelValue($event) {
  399. return (authPopup.value = $event)
  400. }
  401. },
  402. {
  403. default: function _default() {
  404. return [
  405. createVNode(
  406. UserAuth,
  407. { onSuccess: onAuthSuccess },
  408. null
  409. )
  410. ]
  411. }
  412. }
  413. ),
  414. createVNode(
  415. Popup,
  416. {
  417. show: paymentPopup.value,
  418. closeOnClickOverlay: false,
  419. position: 'bottom',
  420. round: true,
  421. closeOnPopstate: true,
  422. safeAreaInsetBottom: true,
  423. style: { minHeight: '30%' }
  424. },
  425. {
  426. default: function _default() {
  427. return [
  428. createVNode(
  429. Payment,
  430. {
  431. modelValue: paymentPopup.value,
  432. 'onUpdate:modelValue':
  433. function onUpdateModelValue($event) {
  434. return (paymentPopup.value = $event)
  435. },
  436. orderInfo: orderInfo,
  437. paymentType: 'goodsPay',
  438. onBackOut: function onBackOut() {
  439. return (paymentPopup.value = false)
  440. }
  441. },
  442. null
  443. )
  444. ]
  445. }
  446. }
  447. )
  448. ])
  449. : createVNode(
  450. ColResult,
  451. {
  452. buttonText: '去购物车',
  453. onClick: function onClick() {
  454. router.push({ path: '/cart' })
  455. }
  456. },
  457. null
  458. )
  459. ])
  460. }
  461. }
  462. })
  463. )
  464. }
  465. }
  466. }
  467. )
  468. })()