C端小程序
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

823 wiersze
22 KiB

  1. // pages/spellGroup/mySpellGroup/index.js
  2. const navigationBarHeight = (getApp().statusBarHeight + 50) + 'px'
  3. var config = require("../../../config/config.js");
  4. const Http = require("../../../utils/HttpBasics");
  5. const imgurl = require("../../../utils/imgurl");
  6. const utils = require("../../../utils/util.js");
  7. let app = getApp();
  8. Page({
  9. /**
  10. * 页面的初始数据
  11. */
  12. data: {
  13. navigationBarHeight,
  14. fenxiang: imgurl.fenxiang1.url,
  15. homeSelectedO: imgurl.homeSelectedO.url,
  16. isshowposter: false, //是否显示分享弹框
  17. teljpgUrl: imgurl.teljpg.url,
  18. wmhome: imgurl.wmhome.url,
  19. share01: imgurl.share01.url,
  20. close02: imgurl.close02.url,
  21. closedUrl: imgurl.closed.url,
  22. quesGouUrl: imgurl.ques_gou.url,
  23. headbgUrl: imgurl.headbg.url,
  24. quesBgUrl: imgurl.ques_bg.url,
  25. couponChannelId: '',
  26. couponId: '',
  27. data: null,
  28. spellData: null,
  29. canSpell: true,
  30. canBuyIf: true,
  31. clock: "00",
  32. day: "00",
  33. hour: "00",
  34. min: "00",
  35. sec: "00",
  36. detailPicture: [],
  37. coverPicture: [],
  38. swiperCurrent: 0,
  39. showTime: true,
  40. limitCondition: "",
  41. minLimit: 0,
  42. maxLimit: 0,
  43. spellGroupOrder: false,
  44. opacity: 0,
  45. queueData: null,
  46. zIndex: 11,
  47. display: "none",
  48. orderGroupId: '',
  49. merchantVoList: []
  50. },
  51. /**
  52. * 生命周期函数--监听页面加载
  53. */
  54. onLoad: function (options) {
  55. Http.get({
  56. url: config.api.checkUserStatus,
  57. data: {
  58. token: app.globalData.token
  59. }
  60. }).then(res => {
  61. Http.get({
  62. url: config.api.checkPhoneStatus,
  63. data: {}
  64. }).then(res => {
  65. this.setData({
  66. couponChannelId: options.couponChannelId,
  67. couponId: options.couponId ? options.couponId : ''
  68. })
  69. if (options && options.couponChannelId) {
  70. this.getDetail(options.couponChannelId);
  71. }
  72. if (options && options.couponId) {
  73. this.getOneSpell(options.couponId)
  74. }
  75. }).catch(res => {
  76. wx.redirectTo({
  77. url: `/pages/getphoneInfo/index`
  78. });
  79. })
  80. }).catch(res => {
  81. wx.redirectTo({
  82. url: `/pages/getuserinfo/index`
  83. })
  84. })
  85. },
  86. /**
  87. * 显示分享海报
  88. */
  89. /* showPoster: function() {
  90. //跳转到海报生成页
  91. wx.navigateTo({
  92. url: `/pages/canvas/index?couponChannelId=${this.data.data.id}`
  93. })
  94. }, */
  95. showPoster: function () {
  96. console.log(this.data.data)
  97. let that = this;
  98. Http.get({
  99. url: config.api.checkUserStatus,
  100. data: {
  101. token: app.globalData.token
  102. }
  103. }).then(res => {
  104. wx.navigateTo({
  105. url: `/pages/canvas/index?couponChannelId=${that.data.data.id}`
  106. })
  107. }).catch(err => {
  108. console.log(err)
  109. if (err.code == 11004) {
  110. // 用户昵称未授权
  111. wx.redirectTo({
  112. url: `/pages/getuserinfo/index?couponChannelId=${that.data.data.id}&fromflag=poster`
  113. })
  114. }
  115. })
  116. //跳转到海报生成页
  117. },
  118. /**
  119. * 显示分享弹框
  120. */
  121. showshare: function () {
  122. this.setData({
  123. isshowposter: true,
  124. })
  125. },
  126. /**
  127. * 隐藏分享弹框
  128. */
  129. hidemodal: function () {
  130. this.setData({
  131. isshowposter: false,
  132. })
  133. },
  134. gotoIndex: function () {
  135. wx.switchTab({
  136. url: '/index/index',
  137. })
  138. },
  139. /**
  140. * 拨打电话
  141. */
  142. phone: function (e) {
  143. let that = this;
  144. wx.makePhoneCall({
  145. phoneNumber: e.target.dataset.merchantlinkphone
  146. });
  147. },
  148. /**
  149. * 直接购买
  150. */
  151. gotoBuy(e) {
  152. let that = this;
  153. this.setData({
  154. canBuyIf: false,
  155. formId: e.detail.formId,
  156. queueData: null,
  157. orderGroupId: ''
  158. })
  159. that.getQuestions();
  160. },
  161. getQuestions(type) {
  162. let that = this;
  163. Http.get({
  164. url: config.api.getQuestion,
  165. data: {
  166. couponType: JSON.stringify(that.data.data.type)
  167. }
  168. })
  169. .then(res => {
  170. wx.hideLoading();
  171. if (res.data == undefined) {
  172. // 立即购买
  173. that.orderFunc(type);
  174. } else if (res.data) {
  175. var animation = wx.createAnimation({});
  176. animation.translate((that.data.widthScreen - that.data.widthScreen), 0).scale(1).opacity(1).step({
  177. duration: 500
  178. })
  179. that.setData({
  180. queueData: animation.export(),
  181. zIndex: 9,
  182. opacity: 1,
  183. display: "block",
  184. questionnaire: JSON.parse(res.data.content),
  185. questionId: res.data.id
  186. });
  187. }
  188. })
  189. .catch(err => {
  190. wx.hideLoading();
  191. wx.showToast({
  192. title: err.message,
  193. icon: 'none',
  194. duration: 2000,
  195. mask: false
  196. });
  197. })
  198. },
  199. /**
  200. * 点击提交问题单选
  201. */
  202. formSubmit: function (e) {
  203. console.log(e);
  204. let that = this;
  205. /**
  206. * 多选
  207. */
  208. if (e.currentTarget.dataset.flags == 'multi') {
  209. if (that.data.anwserId.length == 0) {
  210. var answserIs = null
  211. } else {
  212. var answserIs = that.data.anwserId.join(",");
  213. }
  214. } else if (e.currentTarget.dataset.flags == 'single') {
  215. var answserIs = e.detail.value;
  216. }
  217. console.log(answserIs)
  218. console.log(e.currentTarget.dataset.questionid)
  219. Http.post({
  220. url: config.api.answerQuestion,
  221. data: {
  222. answer: answserIs,
  223. questionId: e.currentTarget.dataset.questionid
  224. }
  225. })
  226. .then(res => {
  227. that.closeQuestion();
  228. })
  229. .catch(err => {
  230. wx.showToast({
  231. title: err.message,
  232. icon: 'none',
  233. duration: 2000,
  234. mask: false
  235. });
  236. })
  237. },
  238. /**
  239. * 多选
  240. */
  241. checkboxChange: function (e) {
  242. console.log(e)
  243. this.setData({
  244. anwserId: e.detail.value
  245. })
  246. },
  247. closeQuestion: function () {
  248. let that = this;
  249. that.setData({
  250. display: "none",
  251. zIndex: 11,
  252. opacity: 0
  253. })
  254. setTimeout(function () {
  255. that.orderFunc();
  256. }, 500)
  257. },
  258. // 时间格式化输出,如11:03 25:19 每1s都会调用一次
  259. dateformat(micro_second) {
  260. // 总秒数
  261. var second = Math.floor(micro_second / 1000);
  262. // 天数
  263. var day = Math.floor(second / 3600 / 24) < 10 ? "0" + Math.floor(second / 3600 / 24) : Math.floor(second / 3600 / 24);
  264. // 小时
  265. var hr = Math.floor(second / 3600 % 24) < 10 ? "0" + Math.floor(second / 3600 % 24) : Math.floor(second / 3600 % 24);
  266. // 分钟
  267. var min = Math.floor(second / 60 % 60) < 10 ? "0" + Math.floor(second / 60 % 60) : Math.floor(second / 60 % 60);
  268. // 秒
  269. var sec = Math.floor(second % 60) < 10 ? "0" + Math.floor(second % 60) : Math.floor(second % 60);
  270. // return day + "天" + hr + "小时" + min + "分钟" + sec + "秒";
  271. return {
  272. a1: day,
  273. b1: hr,
  274. c1: min,
  275. d1: sec
  276. }
  277. },
  278. countdown(time) {
  279. let that = this;
  280. var EndTime = time;
  281. if (that.data.spellData != null) {
  282. EndTime = that.data.spellData.expiredDate;
  283. }
  284. var NowTime = new Date().getTime();
  285. var total_micro_second = EndTime - NowTime || [];
  286. // 渲染倒计时时钟
  287. let obj = that.dateformat(total_micro_second);
  288. if (total_micro_second > 0) {
  289. that.setData({
  290. clock: obj,
  291. day: obj.a1,
  292. hour: obj.b1,
  293. min: obj.c1,
  294. sec: obj.d1,
  295. })
  296. } else {
  297. that.setData({
  298. clock: "00",
  299. day: "00",
  300. hour: "00",
  301. min: "00",
  302. sec: "00",
  303. })
  304. }
  305. if (that.data.showTime) {
  306. setTimeout(function () {
  307. total_micro_second -= 1000;
  308. that.countdown();
  309. }, 1000)
  310. }
  311. },
  312. // 获得未支付的订单
  313. getUnPaidOrder(couponId) {
  314. let that = this;
  315. Http.get({
  316. url: config.api.getUnPaidOrder,
  317. data: {
  318. couponId: couponId
  319. }
  320. }).then(res => {
  321. that.setData({
  322. disOrderNumber: res.data.orderNumber,
  323. couponChannelId: res.data.couponChannelId,
  324. orderGroupId: res.data.orderGroupId,
  325. composeOrderType: res.data.composeOrderType
  326. })
  327. // 拼团订单
  328. if (res.data.payment / 100 != Number(that.data.data.price)) {
  329. that.setData({
  330. spellGroupOrder: true
  331. })
  332. } else {
  333. // 原价购买订单
  334. that.setData({
  335. spellGroupOrder: false
  336. })
  337. }
  338. if (that.data.spellGroupOrder) {
  339. wx.showModal({
  340. title: '提示',
  341. content: "您有未支付拼团订单,请先进行支付",
  342. confirmText: "去支付",
  343. success: function (res) {
  344. if (res.confirm) {
  345. wx.navigateTo({
  346. url: `/pages/spellGroup/paySpellGroup/index?orderId=${that.data.disOrderNumber}&couponChannelId=${that.data.couponChannelId}&couponId=${couponId}&orderGroupId={that.data.orderGroupId}&composeOrderType=${that.data.composeOrderType}`,
  347. })
  348. }
  349. }
  350. })
  351. } else {
  352. wx.showModal({
  353. title: '提示',
  354. content: '您有未支付订单,请先进行支付',
  355. confirmText: "去支付",
  356. success: function (res) {
  357. if (res.confirm) {
  358. wx.navigateTo({
  359. url: `/pages/order/detail/index?orderId=${that.data.disOrderNumber}&composeOrderType=${that.data.composeOrderType}`,
  360. })
  361. }
  362. }
  363. })
  364. }
  365. }).catch(error => {
  366. console.log(error)
  367. wx.showToast({
  368. title: error.message,
  369. icon: "none",
  370. duration: 3000
  371. })
  372. })
  373. },
  374. /**
  375. * 发起拼团
  376. */
  377. gotoSpell(e) {
  378. app.globalData.previewFlag = false
  379. let that = this;
  380. that.setData({
  381. canSpell: false,
  382. formId: e.detail.formId,
  383. orderGroupId: 0
  384. })
  385. that.getQuestions(0);
  386. },
  387. //参与别人的拼团
  388. gotoPartner() {
  389. wx.navigateTo({
  390. url: `/pages/joinFrDpell/index?orderId=${this.data.spellData.orderId}&couponId=${this.data.spellData.couponId}&orderGroupId=${this.data.spellData.orderGroupId}&couponChannelId=${this.data.couponChannelId}&avatarUrl=${this.data.spellData.avatarUrl}&nickName=${this.data.spellData.nickName}`
  391. });
  392. },
  393. /**
  394. * 获取一个拼团信息
  395. */
  396. getOneSpell(couponId) {
  397. let that = this;
  398. Http.get({
  399. url: config.api.queryRemainOne,
  400. data: {
  401. couponId: couponId
  402. }
  403. }).then(res => {
  404. wx.stopPullDownRefresh();
  405. if (res.data) {
  406. that.countdown(res.data.expiredDate);
  407. that.setData({
  408. spellData: res.data
  409. });
  410. }
  411. });
  412. },
  413. /**
  414. * 获取券详情信息
  415. */
  416. getDetail(couponChannelId) {
  417. let that = this;
  418. Http.get({
  419. url: config.api.couponDetail,
  420. data: {
  421. couponChannelId: couponChannelId
  422. }
  423. }).then(res => {
  424. wx.stopPullDownRefresh();
  425. let data = res.data;
  426. if (res && res.data && res.data.detailPicture) {
  427. that.setData({
  428. detailPicture: JSON.parse(res.data.detailPicture)
  429. })
  430. }
  431. if (res && res.data && res.data.coverPicture) {
  432. that.setData({
  433. coverPicture: JSON.parse(res.data.coverPicture)
  434. })
  435. }
  436. if (res && res.data && res.data.conditions) {
  437. that.setData({
  438. limitCondition: JSON.parse(res.data.conditions).type
  439. })
  440. if (JSON.parse(res.data.conditions).type == 2 && (JSON.parse(res.data.conditions).min || JSON.parse(res.data.conditions).min == 0)) {
  441. that.setData({
  442. minLimit: JSON.parse(res.data.conditions).min
  443. })
  444. }
  445. if (JSON.parse(res.data.conditions).type == 2 && (JSON.parse(res.data.conditions).max) || JSON.parse(res.data.conditions).max == 0) {
  446. that.setData({
  447. maxLimit: JSON.parse(res.data.conditions).max
  448. })
  449. }
  450. }
  451. data.price = (data.price / 100).toFixed(2)
  452. data.salePrice = (data.salePrice / 100).toFixed(2);
  453. data.validStartDate = utils.formatTime(data.validStartDate, 'yyyy-MM-dd')
  454. data.validEndDate = utils.formatTime(data.validEndDate, 'yyyy-MM-dd')
  455. that.setData({
  456. data,
  457. merchantVoList: data.merchantVoList
  458. });
  459. });
  460. },
  461. /**
  462. * 去拼团
  463. */
  464. goToOrderGroup(orderId, orderGroupId, _this) {
  465. let that = this;
  466. // 支付成功
  467. Http.post({
  468. url: config.api.toOrderGroup,
  469. data: {
  470. id: orderGroupId,
  471. orderId,
  472. couponId: _this.data.data.couponId
  473. }
  474. })
  475. .then(res => {
  476. wx.navigateTo({
  477. url: `/pages/spellDetail/index?orderId=${orderId}&couponId=${_this.data.data.couponId}&orderGroupId=${res.data.orderGroupId}&couponChannelId=${_this.data.couponChannelId}`
  478. });
  479. })
  480. .catch(err => {
  481. console.log(err);
  482. })
  483. },
  484. /**
  485. * 支付订单更新
  486. */
  487. payOrderUpdate: (orderId, payOrderId, status, reason, _this, orderGroupId) => {
  488. console.log(orderGroupId, 7777)
  489. let that = this;
  490. // 支付成功
  491. Http.post({
  492. url: config.api.payOrderUpdate,
  493. data: {
  494. payOrderId: payOrderId,
  495. composeOrderId: orderId,
  496. status: status,
  497. reason: reason
  498. }
  499. })
  500. .then(res => {
  501. wx.hideLoading()
  502. if (orderGroupId !== 0) {
  503. wx.navigateTo({
  504. url: '/pages/order/detail/index?orderId=' + res.data.mainOrderId,
  505. })
  506. } else {
  507. _this.goToOrderGroup(orderId, res.data.mainOrderId, _this)
  508. }
  509. })
  510. .catch(err => {
  511. if (err.code != 12002) {
  512. setTimeout(function () {
  513. _this.payOrderUpdate(orderId, payOrderId, status, reason, _this, orderGroupId);
  514. }, 2000)
  515. }
  516. })
  517. },
  518. /**
  519. * 发起支付
  520. */
  521. orderFunc() {
  522. let that = this;
  523. let orderGroupId = this.data.orderGroupId;
  524. let data = {
  525. couponChannelId: this.data.data.id,
  526. couponId: this.data.data.couponId,
  527. formId: this.data.formId
  528. }
  529. /**
  530. * 拼团订单
  531. */
  532. if (this.data.orderGroupId == 0) {
  533. data.orderGroupId = this.data.orderGroupId,
  534. that.setData({
  535. isFromSpell: true
  536. })
  537. } else {
  538. that.setData({
  539. isFromSpell: false
  540. })
  541. }
  542. Http.get({
  543. url: config.api.checkUserStatus,
  544. data: {
  545. token: app.globalData.token
  546. }
  547. }).then(res => {
  548. Http.get({
  549. url: config.api.checkPhoneStatus,
  550. data: {}
  551. }).then(res => {
  552. /**
  553. * orderSave 下单
  554. */
  555. return Http.post({
  556. url: config.api.orderSave,
  557. data: data
  558. });
  559. }).catch(err => {
  560. console.log(err);
  561. that.setData({
  562. showbutton: false,
  563. showbutton1: false,
  564. canSpell: true,
  565. canBuyIf: true
  566. })
  567. if (err.code == 2011) {
  568. wx.showToast({
  569. title: "商户信息没找到",
  570. image: './../../../assets/images/fail.png',
  571. duration: 2000,
  572. mask: false
  573. });
  574. } else if (err.code == 2013) {
  575. wx.showToast({
  576. title: "商户信息禁用",
  577. image: './../../../assets/images/fail.png',
  578. duration: 2000,
  579. mask: false
  580. });
  581. } else if (err.code == 3000) {
  582. wx.showToast({
  583. title: "库存不足",
  584. image: './../../../assets/images/fail.png',
  585. duration: 2000,
  586. mask: false
  587. });
  588. } else if (err.code == 3001) {
  589. wx.showToast({
  590. title: "您已超过限购",
  591. image: './../../../assets/images/fail.png',
  592. duration: 2000,
  593. mask: false
  594. });
  595. } else if (err.code == 3002) {
  596. wx.showToast({
  597. title: "订单失败",
  598. image: './../../../assets/images/fail.png',
  599. duration: 2000,
  600. mask: false
  601. });
  602. } else if (err.code == 3003) {
  603. wx.showToast({
  604. title: "订单不存在",
  605. image: './../../../assets/images/fail.png',
  606. duration: 2000,
  607. mask: false
  608. });
  609. } else if (err.code == 3004) {
  610. wx.showToast({
  611. title: "订单不存在",
  612. image: './../../../assets/images/fail.png',
  613. duration: 2000,
  614. mask: false
  615. });
  616. } else if (err.code == 4003) {
  617. wx.showToast({
  618. title: "卡券已作废",
  619. image: './../../../assets/images/fail.png',
  620. duration: 2000,
  621. mask: false
  622. });
  623. } else if (err.code == 3012) {
  624. // wx.showToast({
  625. // title: err.message,
  626. // icon: "none"
  627. // })
  628. that.getUnPaidOrder(that.data.data.couponId);
  629. } else if (err.code == 11005) {
  630. /**
  631. * 将值传到用户手机号授权的页面
  632. *
  633. */
  634. wx.redirectTo({
  635. url: `/pages/getphoneInfo/index?path=spell&couponChannelId=${that.data.couponChannelId}&couponId=${that.data.data.couponId}`
  636. });
  637. } else if (err.code == 11006) {
  638. // 用户手机已加密
  639. wx.redirectTo({
  640. url: `/pages/phoneinput/phoneinput?path=spell&couponChannelId=${that.data.couponChannelId}&couponId=${that.data.data.couponId}`
  641. });
  642. } else {
  643. wx.showToast({
  644. title: err.message,
  645. icon: 'none',
  646. duration: 2000,
  647. mask: false
  648. });
  649. }
  650. }).then(res => {
  651. console.log(res,"123")
  652. if (typeof (res) != "undefined") {
  653. let orderId = "" + res.data.mainOrderId;
  654. that.setData({
  655. orderId: orderId,
  656. composeOrderType: res.data.composeOrderType,
  657. canSpell: false,
  658. canBuyIf: true
  659. });
  660. // 支付金额不为0
  661. /**
  662. * 支付订单创建
  663. */
  664. Http.post({
  665. url: config.api.payOrderCreate,
  666. data: {
  667. orderId: orderId,
  668. composeOrderType: that.data.composeOrderType
  669. }
  670. }).then(res => {
  671. var payOrderId = "" + res.data.payOrderId;
  672. wx.hideLoading();
  673. wx.requestPayment({
  674. timeStamp: res.data.timeStamp,
  675. nonceStr: res.data.nonceStr,
  676. package: res.data.package,
  677. signType: (res.data.signType) ? res.data.signType : "MD5",
  678. paySign: res.data.paySign,
  679. success: res => {
  680. that.setData({
  681. canSpell: false
  682. })
  683. wx.showLoading({
  684. title: '订单正在处理中...',
  685. })
  686. // setTimeout(function() {
  687. // wx.hideLoading()
  688. // }, 5000)
  689. that.payOrderUpdate(that.data.orderId, payOrderId, 1, '', that, orderGroupId);
  690. if (res.errMsg == "requestPayment:ok") {
  691. setTimeout(function () {
  692. wx.hideLoading();
  693. }, 2000);
  694. }
  695. },
  696. fail: res => {
  697. /**
  698. * 支付失败,需要更新订单的状态
  699. */
  700. that.payOrderUpdate(that.data.orderId, payOrderId, 2, '', that, orderGroupId);
  701. that.setData({
  702. showbutton: false,
  703. canSpell: true,
  704. canBuyIf: true
  705. })
  706. return;
  707. },
  708. complete: res => { }
  709. });
  710. /// End payment --------
  711. })
  712. .catch(err => {
  713. that.setData({
  714. canSpell: true,
  715. canBuyIf: true
  716. })
  717. wx.showToast({
  718. title: err.message,
  719. icon: 'none',
  720. duration: 2000,
  721. mask: false
  722. });
  723. })
  724. }
  725. })
  726. })
  727. .catch(err => {
  728. console.log(err)
  729. if (err.code == 11004) {
  730. wx.redirectTo({
  731. url: `/pages/getuserinfo/index?fromflag=spellcoupondetail&couponChannelIdflag=${that.data.couponChannelId}`,
  732. })
  733. } else {
  734. wx.showToast({
  735. title: err.message,
  736. icon: "none",
  737. duration: 2500
  738. })
  739. }
  740. })
  741. },
  742. /**
  743. * 生命周期函数--监听页面显示
  744. */
  745. onShow: function () {
  746. this.setData({
  747. canSpell: true,
  748. canBuyIf: true,
  749. showTime: true
  750. })
  751. if (this.data.spellData != null) {
  752. this.countdown()
  753. }
  754. },
  755. /**
  756. * 生命周期函数--监听页面隐藏
  757. */
  758. onHide: function () {
  759. this.setData({
  760. showTime: false
  761. })
  762. },
  763. /**
  764. * 生命周期函数--监听页面卸载
  765. */
  766. onUnload: function () {
  767. this.setData({
  768. showTime: false
  769. })
  770. },
  771. /**
  772. * 页面相关事件处理函数--监听用户下拉动作
  773. */
  774. onPullDownRefresh: function (e) {
  775. let that = this;
  776. console.log(this.data.couponId, 222)
  777. that.getDetail(that.data.couponChannelId);
  778. if (that.data.couponId) {
  779. that.getOneSpell(that.data.couponId)
  780. }
  781. },
  782. onShareAppMessage: function (options) {
  783. app.globalData.previewFlag = true
  784. console.log(options)
  785. var that = this;
  786. var shareObj = {
  787. title: that.data.data.title,
  788. path: `/pages/index/index?couponChannelId=${that.data.couponChannelId}&couponId=${that.data.data.couponId}&spellGroup=spellGroup`,
  789. success: function (res) {
  790. if (res.errMsg == 'shareAppMessage:ok') { }
  791. },
  792. fail: function (error) {
  793. if (res.errMsg == 'shareAppMessage:fail cancel') { } else if (res.errMsg == 'shareAppMessage:fail') { }
  794. }
  795. };
  796. // 来自页面内的按钮的转发
  797. if (options.from == 'button') {
  798. var eData = options.target.dataset.id;
  799. shareObj.path = `/pages/index/index?couponChannelId=${eData}&couponId=${that.data.data.couponId}&spellGroup=spellGroup&frommd=JC`;
  800. }
  801. // 返回shareObj
  802. return shareObj;
  803. },
  804. })