page.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625
  1. module.exports = {
  2. currentPage: null,
  3. currentPageOptions: {},
  4. navbarPages: ["pages/index/index", "pages/cat/cat", "pages/cart/cart", "pages/user/user", "pages/list/list", "pages/search/search", "pages/topic-list/topic-list", "pages/video/video-list", "pages/miaosha/miaosha", "pages/shop/shop", "pages/pt/index/index", "pages/book/index/index", "pages/share/index", "pages/quick-purchase/index/index", "mch/m/myshop/myshop", "mch/shop-list/shop-list", "pages/integral-mall/index/index", "pages/integral-mall/register/index", "pages/article-detail/article-detail", "pages/article-list/article-list", "pages/order/order"],
  5. onLoad: function(t, e) {
  6. this.currentPage = t, this.currentPageOptions = e;
  7. var o = this;
  8. if (this.setUserInfo(), this.setWxappImg(), this.setStore(), this.setParentId(e), this.getNavigationBarColor(), this.setDeviceInfo(), this.setPageClasses(), this.setPageNavbar(null), this.setBarTitle(), this.setNavi(), "function" == typeof t.onSelfLoad && t.onSelfLoad(e), o._setFormIdSubmit(), "undefined" != typeof my && "pages/login/login" != t.route && e && (t.options || (t.options = e), getApp().core.setStorageSync("last_page_options", e)), "lottery/goods/goods" == t.route && e) {
  9. if (e.user_id) var n = e.user_id,
  10. a = e.id;
  11. else if (e.scene && isNaN(e.scene)) {
  12. var i = decodeURIComponent(e.scene);
  13. if (i && (i = getApp().helper.scene_decode(i)) && i.uid) n = i.uid, a = i.gid
  14. }
  15. getApp().request({
  16. data: {
  17. user_id: n,
  18. lottery_id: a
  19. },
  20. url: getApp().api.lottery.clerk,
  21. success: function(e) {
  22. e.code
  23. }
  24. })
  25. }
  26. t.navigatorClick = function(e) {
  27. o.navigatorClick(e, t)
  28. }, t.setData({
  29. __platform: getApp().platform
  30. }), void 0 === t.showToast && (t.showToast = function(e) {
  31. o.showToast(e)
  32. }), getApp().shareSendCoupon = function(e) {
  33. o.shareSendCoupon(e)
  34. }, void 0 === t.setTimeList && (t.setTimeList = function(e) {
  35. return o.setTimeList(e)
  36. }), void 0 === t.showLoading && (t.showLoading = function(e) {
  37. o.showLoading(e)
  38. }), void 0 === t.hideLoading && (t.hideLoading = function(e) {
  39. o.hideLoading(e)
  40. }), void 0 === t.modalConfirm && (t.modalConfirm = function(e) {
  41. o.modalConfirm(e)
  42. }), void 0 === t.modalClose && (t.modalClose = function(e) {
  43. o.modalClose(e)
  44. }), void 0 === t.modalShow && (t.modalShow = function(e) {
  45. o.modalShow(e)
  46. }), void 0 === t.myLogin && (t.myLogin = function() {
  47. o.myLogin()
  48. }), void 0 === t.getUserInfo && (t.getUserInfo = function(e) {
  49. o.getUserInfo(e)
  50. }), void 0 === t.getPhoneNumber && (t.getPhoneNumber = function(e) {
  51. o.getPhoneNumber(e)
  52. }), void 0 === t.bindParent && (t.bindParent = function(e) {
  53. o.bindParent(e)
  54. }), void 0 === t.closeCouponBox && (t.closeCouponBox = function(e) {
  55. o.closeCouponBox(e)
  56. }), void 0 === t.relevanceSuccess && (t.relevanceSuccess = function(e) {
  57. o.relevanceSuccess(e)
  58. }), void 0 === t.relevanceError && (t.relevanceError = function(e) {
  59. o.relevanceError(e)
  60. }), void 0 === t.saveQrcode && (t.saveQrcode = function(e) {
  61. o.saveQrcode(e)
  62. }), void 0 === t.setUserInfoShowFalse && (t.setUserInfoShowFalse = function(e) {
  63. o.setUserInfoShowFalse();
  64. }), void 0 === t.cancelLogin && (t.cancelLogin = function(e) {
  65. o.cancelLogin();
  66. });
  67. },
  68. onReady: function(e) {
  69. this.currentPage = e
  70. },
  71. onShow: function(e) {
  72. var t = getApp();
  73. if (this.currentPage = e, t.onShowData && t.onShowData.scene) {
  74. var o = [1045, 1046, 1058, 1067, 1084, 1091];
  75. 0 <= o.indexOf(t.onShowData.scene) ? this.setPageNavbar(t.onShowData.scene) : (console.log("no in array--\x3e", t.onShowData.scene), console.log("the array--\x3e", o))
  76. }
  77. getApp().orderPay.init(e, getApp()), require("../components/quick-navigation/quick-navigation.js").init(this.currentPage)
  78. },
  79. onHide: function(e) {
  80. this.currentPage = e
  81. },
  82. onUnload: function(e) {
  83. this.currentPage = e
  84. },
  85. onPullDownRefresh: function(e) {
  86. this.currentPage = e
  87. },
  88. onReachBottom: function(e) {
  89. this.currentPage = e
  90. },
  91. onShareAppMessage: function(e) {
  92. this.currentPage = e, setTimeout(function() {
  93. getApp().shareSendCoupon(e)
  94. }, 1e3)
  95. },
  96. imageClick: function(e) {
  97. console.log("image click", e)
  98. },
  99. textClick: function(e) {
  100. console.log("text click", e)
  101. },
  102. tap1: function(e) {
  103. console.log("tap1", e)
  104. },
  105. tap2: function(e) {
  106. console.log("tap2", e)
  107. },
  108. formSubmit_collect: function(e) {
  109. e.detail.formId;
  110. console.log("formSubmit_collect--\x3e", e)
  111. },
  112. setUserInfo: function() {
  113. var e = this.currentPage,
  114. t = getApp().getUser();
  115. t && e.setData({
  116. __user_info: t
  117. })
  118. },
  119. setWxappImg: function(e) {
  120. var t = this.currentPage;
  121. getApp().getConfig(function(e) {
  122. t.setData({
  123. __wxapp_img: e.wxapp_img,
  124. store: e.store
  125. })
  126. })
  127. },
  128. setStore: function(e) {
  129. var t = this.currentPage;
  130. getApp().getConfig(function(e) {
  131. e.store && t.setData({
  132. store: e.store,
  133. __is_comment: e.store ? e.store.is_comment : 1,
  134. __is_sales: e.store ? e.store.is_sales : 1,
  135. __is_member_price: e.store ? e.store.is_member_price : 1,
  136. __is_share_price: e.store ? e.store.is_share_price : 1,
  137. __alipay_mp_config: e.alipay_mp_config
  138. })
  139. })
  140. },
  141. setParentId: function(e) {
  142. var t = this.currentPage;
  143. if ("/pages/index/index" == t.route && this.setOfficalAccount(), e) {
  144. var o = 0;
  145. if (e.user_id) o = e.user_id;
  146. else if (e.scene) {
  147. if (isNaN(e.scene)) {
  148. var n = decodeURIComponent(e.scene);
  149. n && (n = getApp().helper.scene_decode(n)) && n.uid && (o = n.uid)
  150. } else -1 == t.route.indexOf("clerk") && (o = e.scene);
  151. this.setOfficalAccount()
  152. } else if (null !== getApp().query) {
  153. var a = getApp().query;
  154. o = a.uid
  155. }
  156. o && void 0 !== o && (getApp().core.setStorageSync(getApp().const.PARENT_ID, o), getApp().trigger.remove(getApp().trigger.events.login, "TRY_TO_BIND_PARENT"), getApp().trigger.add(getApp().trigger.events.login, "TRY_TO_BIND_PARENT", function() {
  157. t.bindParent({
  158. parent_id: o,
  159. condition: 0
  160. })
  161. }))
  162. }
  163. },
  164. showToast: function(e) {
  165. var t = this.currentPage,
  166. o = e.duration || 2500,
  167. n = e.title || "",
  168. a = (e.success, e.fail, e.complete || null);
  169. t._toast_timer && clearTimeout(t._toast_timer), t.setData({
  170. _toast: {
  171. title: n
  172. }
  173. }), t._toast_timer = setTimeout(function() {
  174. var e = t.data._toast;
  175. e.hide = !0, t.setData({
  176. _toast: e
  177. }), "function" == typeof a && a()
  178. }, o)
  179. },
  180. setDeviceInfo: function() {
  181. var e = this.currentPage,
  182. t = [{
  183. id: "device_iphone_5",
  184. model: "iPhone 5"
  185. }, {
  186. id: "device_iphone_x",
  187. model: "iPhone X"
  188. }],
  189. o = getApp().core.getSystemInfoSync();
  190. if (o.model)
  191. for (var n in 0 <= o.model.indexOf("iPhone X") && (o.model = "iPhone X"), t) t[n].model == o.model && e.setData({
  192. __device: t[n].id
  193. })
  194. },
  195. setPageNavbar: function(s) {
  196. var c = this,
  197. p = this.currentPage,
  198. e = getApp().core.getStorageSync("_navbar");
  199. e && n(e);
  200. var t = !1;
  201. for (var o in c.navbarPages)
  202. if (p.route == c.navbarPages[o]) {
  203. t = !0;
  204. break
  205. }
  206. function n(e) {
  207. var t = !1;
  208. for (var o in e.navs) {
  209. var n = e.navs[o].url,
  210. a = p.route || p.__route__ || null;
  211. if (n = e.navs[o].new_url, void 0 !== e.navs[o].params || "/pages/index/index" == e.navs[o].url)
  212. for (var i in p.options) getApp().helper.inArray(i, ["scene", "user_id", "uid"]) || "page_id" == i && -1 == p.options[i] || (-1 == a.indexOf("?") ? a += "?" : a += "&", a += i + "=" + p.options[i]);
  213. console.log(a);
  214. var r = a;
  215. 1058 == s && -1 != r.indexOf("?appid=") && (r = r.substr(0, r.indexOf("?appid="))), n === "/" + r ? t = e.navs[o].active = !0 : e.navs[o].active = !1
  216. }
  217. t && (p.setData({
  218. _navbar: e
  219. }), c.setPageClasses())
  220. }
  221. t && getApp().request({
  222. url: getApp().api.default.navbar,
  223. success: function(e) {
  224. 0 == e.code && (n(e.data), getApp().core.setStorageSync("_navbar", e.data))
  225. }
  226. })
  227. },
  228. setPageClasses: function() {
  229. var e = this.currentPage,
  230. t = e.data.__device;
  231. e.data._navbar && e.data._navbar.navs && 0 < e.data._navbar.navs.length && (t += " show_navbar"), t && e.setData({
  232. __page_classes: t
  233. })
  234. },
  235. showLoading: function(e) {
  236. var t = t;
  237. t.setData({
  238. _loading: !0
  239. })
  240. },
  241. hideLoading: function(e) {
  242. this.currentPage.setData({
  243. _loading: !1
  244. })
  245. },
  246. setTimeList: function(e) {
  247. function t(e) {
  248. return e <= 0 && (e = 0), e < 10 ? "0" + e : e
  249. }
  250. var o = "00",
  251. n = "00",
  252. a = "00",
  253. i = 0,
  254. r = "",
  255. s = "",
  256. c = "";
  257. if (86400 <= e && (i = parseInt(e / 86400), e %= 86400, r += i + "天", s += i + "天", c += i + "天"), e < 86400) {
  258. var p = parseInt(e / 3600);
  259. e %= 3600, r += (a = t(p)) + "小时", s += a + ":", c = 0 < i || 0 < p ? c + a + ":" : ""
  260. }
  261. return e < 3600 && (n = t(parseInt(e / 60)), e %= 60, r += n + "分", s += n + ":", c += n + ":"), e < 60 && (r += (o = t(e)) + "秒", s += o, c += o), {
  262. d: i,
  263. h: a,
  264. m: n,
  265. s: o,
  266. content: r,
  267. content_1: s,
  268. content_ms: c
  269. }
  270. },
  271. setBarTitle: function(e) {
  272. var t = this.currentPage.route,
  273. o = getApp().core.getStorageSync(getApp().const.WX_BAR_TITLE);
  274. for (var n in o) o[n].url === t && getApp().core.setNavigationBarTitle({
  275. title: o[n].title
  276. })
  277. },
  278. getNavigationBarColor: function() {
  279. var t = getApp(),
  280. o = this;
  281. t.request({
  282. url: t.api.default.navigation_bar_color,
  283. success: function(e) {
  284. 0 == e.code && (t.core.setStorageSync(getApp().const.NAVIGATION_BAR_COLOR, e.data), o.setNavigationBarColor(), t.navigateBarColorCall && "function" == typeof t.navigateBarColorCall && t.navigateBarColorCall(e))
  285. }
  286. })
  287. },
  288. setNavigationBarColor: function() {
  289. var t = this.currentPage,
  290. e = getApp().core.getStorageSync(getApp().const.NAVIGATION_BAR_COLOR);
  291. e && (getApp().core.setNavigationBarColor(e), t.setData({
  292. _navigation_bar_color: e
  293. })), getApp().navigateBarColorCall = function(e) {
  294. getApp().core.setNavigationBarColor(e.data), t.setData({
  295. _navigation_bar_color: e.data
  296. })
  297. }
  298. },
  299. navigatorClick: function(e, t) {
  300. var o = e.currentTarget.dataset.open_type;
  301. if ("redirect" == o) return !0;
  302. if ("wxapp" != o) {
  303. if ("tel" == o) {
  304. var n = e.currentTarget.dataset.tel;
  305. getApp().core.makePhoneCall({
  306. phoneNumber: n
  307. })
  308. }
  309. return !1
  310. }
  311. },
  312. shareSendCoupon: function(o) {
  313. var n = getApp();
  314. n.core.showLoading({
  315. mask: !0
  316. }), o.hideGetCoupon || (o.hideGetCoupon = function(e) {
  317. var t = e.currentTarget.dataset.url || !1;
  318. o.setData({
  319. get_coupon_list: null
  320. }), t && n.core.navigateTo({
  321. url: t
  322. })
  323. }), n.request({
  324. url: n.api.coupon.share_send,
  325. success: function(e) {
  326. 0 == e.code && o.setData({
  327. get_coupon_list: e.data.list
  328. })
  329. },
  330. complete: function() {
  331. n.core.hideLoading()
  332. }
  333. })
  334. },
  335. bindParent: function(e) {
  336. var t = getApp();
  337. if ("undefined" != e.parent_id && 0 != e.parent_id) {
  338. var o = t.getUser();
  339. if (0 < t.core.getStorageSync(t.const.SHARE_SETTING).level) 0 != e.parent_id && t.request({
  340. url: t.api.share.bind_parent,
  341. data: {
  342. parent_id: e.parent_id,
  343. condition: e.condition
  344. },
  345. success: function(e) {
  346. 0 == e.code && (o.parent = e.data, t.setUser(o))
  347. }
  348. })
  349. }
  350. },
  351. _setFormIdSubmit: function(e) {
  352. var g = this.currentPage;
  353. g._formIdSubmit || (g._formIdSubmit = function(e) {
  354. var t = e.currentTarget.dataset,
  355. o = e.detail.formId,
  356. n = t.bind || null,
  357. a = t.type || null,
  358. i = t.url || null,
  359. r = t.appId || null,
  360. s = getApp().core.getStorageSync(getApp().const.FORM_ID_LIST);
  361. s && s.length || (s = []);
  362. var c = [];
  363. for (var p in s) c.push(s[p].form_id);
  364. switch (console.log("form_id"), "the formId is a mock one" === o || getApp().helper.inArray(o, c) || (s.push({
  365. time: getApp().helper.time(),
  366. form_id: o
  367. }), getApp().core.setStorageSync(getApp().const.FORM_ID_LIST, s)), g[n] && "function" == typeof g[n] && g[n](e), a) {
  368. case "navigate":
  369. i && getApp().core.navigateTo({
  370. url: i
  371. });
  372. break;
  373. case "redirect":
  374. i && getApp().core.redirectTo({
  375. url: i
  376. });
  377. break;
  378. case "switchTab":
  379. i && getApp().core.switchTab({
  380. url: i
  381. });
  382. break;
  383. case "reLaunch":
  384. i && getApp().core.reLaunch({
  385. url: i
  386. });
  387. break;
  388. case "navigateBack":
  389. i && getApp().core.navigateBack({
  390. url: i
  391. });
  392. break;
  393. case "wxapp":
  394. r && getApp().core.navigateToMiniProgram({
  395. url: i,
  396. appId: r,
  397. path: t.path || ""
  398. })
  399. }
  400. })
  401. },
  402. modalClose: function(e) {
  403. this.currentPage.setData({
  404. modal_show: !1
  405. }), console.log("你点击了关闭按钮")
  406. },
  407. modalConfirm: function(e) {
  408. this.currentPage.setData({
  409. modal_show: !1
  410. }), console.log("你点击了确定按钮")
  411. },
  412. modalShow: function(e) {
  413. this.currentPage.setData({
  414. modal_show: !0
  415. }), console.log("点击会弹出弹框")
  416. },
  417. getUserInfo: function(o) {
  418. var n = this;
  419. "getUserInfo:ok" == o.detail.errMsg && getApp().core.login({
  420. success: function(e) {
  421. var t = e.code;
  422. n.unionLogin({
  423. code: t,
  424. user_info: o.detail.rawData,
  425. encrypted_data: o.detail.encryptedData,
  426. iv: o.detail.iv,
  427. signature: o.detail.signature
  428. })
  429. },
  430. fail: function(e) {}
  431. })
  432. },
  433. myLogin: function() {
  434. console.log('123')
  435. var t = this;
  436. "my" === getApp().platform && (console.log(getApp().login_complete), getApp().login_complete || (getApp().login_complete = !0, my.getAuthCode({
  437. scopes: "auth_user",
  438. success: function(e) {
  439. t.unionLogin({
  440. code: e.authCode
  441. })
  442. },
  443. fail: function(e) {
  444. getApp().login_complete = !1, getApp().core.redirectTo({
  445. url: "/pages/index/index"
  446. })
  447. }
  448. })))
  449. },
  450. unionLogin: function(e) {
  451. var o = this.currentPage,
  452. n = this;
  453. getApp().core.showLoading({
  454. title: "正在登录",
  455. mask: !0
  456. }), getApp().request({
  457. url: getApp().api.passport.login,
  458. method: "POST",
  459. data: e,
  460. success: function(e) {
  461. if (0 == e.code) {
  462. o.setData({
  463. __user_info: e.data
  464. }), getApp().setUser(e.data), getApp().core.setStorageSync(getApp().const.ACCESS_TOKEN, e.data.access_token), getApp().trigger.run(getApp().trigger.events.login);
  465. var t = getApp().core.getStorageSync(getApp().const.STORE);
  466. e.data.binding || !t.option.phone_auth || t.option.phone_auth && 0 == t.option.phone_auth ? n.loadRoute() : ("undefined" == typeof wx && n.loadRoute(), n.setPhone()), n.setUserInfoShowFalse()
  467. } else getApp().login_complete = !1, getApp().core.showModal({
  468. title: "提示",
  469. content: e.msg,
  470. showCancel: !1
  471. })
  472. },
  473. fail: function() {
  474. getApp().login_complete = !1
  475. },
  476. complete: function() {
  477. getApp().core.hideLoading()
  478. }
  479. })
  480. },
  481. getPhoneNumber: function(o) {
  482. var n = this.currentPage,
  483. a = this;
  484. "getPhoneNumber:fail user deny" == o.detail.errMsg ? getApp().core.showModal({
  485. title: "提示",
  486. showCancel: !1,
  487. content: "未授权"
  488. }) : (getApp().core.showLoading({
  489. title: "授权中"
  490. }), getApp().core.login({
  491. success: function(e) {
  492. if (e.code) {
  493. var t = e.code;
  494. getApp().request({
  495. url: getApp().api.user.user_binding,
  496. method: "POST",
  497. data: {
  498. iv: o.detail.iv,
  499. encryptedData: o.detail.encryptedData,
  500. code: t
  501. },
  502. success: function(e) {
  503. if (0 == e.code) {
  504. var t = n.data.__user_info;
  505. t.binding = e.data.dataObj, getApp().setUser(t), n.setData({
  506. PhoneNumber: e.data.dataObj,
  507. __user_info: t,
  508. binding: !0,
  509. binding_num: e.data.dataObj
  510. }), a.loadRoute()
  511. } else getApp().core.showToast({
  512. title: "授权失败,请重试"
  513. })
  514. },
  515. complete: function(e) {
  516. getApp().core.hideLoading()
  517. }
  518. })
  519. } else getApp().core.showToast({
  520. title: "获取用户登录态失败!" + e.errMsg
  521. })
  522. }
  523. }))
  524. },
  525. setUserInfoShow: function() {
  526. var e = this.currentPage;
  527. "wx" == getApp().platform ? e.setData({
  528. user_info_show: !0
  529. }) : this.myLogin()
  530. },
  531. setPhone: function() {
  532. var e = this.currentPage;
  533. "undefined" == typeof my && e.setData({
  534. user_bind_show: !0
  535. })
  536. },
  537. setUserInfoShowFalse: function() {
  538. this.currentPage.setData({
  539. user_info_show: !1
  540. })
  541. },
  542. closeCouponBox: function(e) {
  543. this.currentPage.setData({
  544. get_coupon_list: ""
  545. })
  546. },
  547. relevanceSuccess: function(e) {
  548. console.log(e)
  549. },
  550. relevanceError: function(e) {
  551. console.log(e)
  552. },
  553. setOfficalAccount: function(e) {
  554. this.currentPage.setData({
  555. __is_offical_account: !0
  556. })
  557. },
  558. loadRoute: function() {
  559. var e = this.currentPage;
  560. "pages/index/index" == e.route || getApp().core.redirectTo({
  561. url: "/" + e.route + "?" + getApp().helper.objectToUrlParams(e.options)
  562. }), this.setUserInfoShowFalse()
  563. },
  564. setNavi: function() {
  565. var o = this.currentPage; - 1 != ["pages/index/index", "pages/book/details/details", "pages/pt/details/details", "pages/goods/goods"].indexOf(this.currentPage.route) && o.setData({
  566. home_icon: !0
  567. }), getApp().getConfig(function(e) {
  568. var t = e.store.quick_navigation;
  569. t.home_img || (t.home_img = "/images/quick-home.png"), o.setData({
  570. setnavi: t
  571. })
  572. })
  573. },
  574. saveQrcode: function() {
  575. var t = this.currentPage;
  576. getApp().core.saveImageToPhotosAlbum ? (getApp().core.showLoading({
  577. title: "正在保存图片",
  578. mask: !1
  579. }), getApp().core.downloadFile({
  580. url: t.data.qrcode_pic,
  581. success: function(e) {
  582. getApp().core.showLoading({
  583. title: "正在保存图片",
  584. mask: !1
  585. }), getApp().core.saveImageToPhotosAlbum({
  586. filePath: e.tempFilePath,
  587. success: function() {
  588. getApp().core.showModal({
  589. title: "提示",
  590. content: "保存成功",
  591. showCancel: !1
  592. })
  593. },
  594. fail: function(e) {
  595. getApp().core.showModal({
  596. title: "图片保存失败",
  597. content: e.errMsg,
  598. showCancel: !1
  599. })
  600. },
  601. complete: function(e) {
  602. getApp().core.hideLoading()
  603. }
  604. })
  605. },
  606. fail: function(e) {
  607. getApp().core.showModal({
  608. title: "图片下载失败",
  609. content: e.errMsg + ";" + t.data.goods_qrcode,
  610. showCancel: !1
  611. })
  612. },
  613. complete: function(e) {
  614. getApp().core.hideLoading()
  615. }
  616. })) : getApp().core.showModal({
  617. title: "提示",
  618. content: "当前版本过低,无法使用该功能,请升级到最新版本后重试。",
  619. showCancel: !1
  620. })
  621. },
  622. cancelLogin: function() {
  623. this.setUserInfoShowFalse();
  624. }
  625. };