share.js 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/user/share" ], {
  2. 331: function(n, e, t) {
  3. (function(n) {
  4. function e(n) {
  5. return n && n.__esModule ? n : {
  6. default: n
  7. };
  8. }
  9. t(4), e(t(2)), n(e(t(332)).default);
  10. }).call(this, t(1).createPage);
  11. },
  12. 332: function(n, e, t) {
  13. t.r(e);
  14. var o = t(333), i = t(335);
  15. for (var r in i) "default" !== r && function(n) {
  16. t.d(e, n, function() {
  17. return i[n];
  18. });
  19. }(r);
  20. t(338);
  21. var s = t(13), a = Object(s.default)(i.default, o.render, o.staticRenderFns, !1, null, null, null, !1, o.components, void 0);
  22. a.options.__file = "pages/user/share.vue", e.default = a.exports;
  23. },
  24. 333: function(n, e, t) {
  25. t.r(e);
  26. var o = t(334);
  27. t.d(e, "render", function() {
  28. return o.render;
  29. }), t.d(e, "staticRenderFns", function() {
  30. return o.staticRenderFns;
  31. }), t.d(e, "recyclableRender", function() {
  32. return o.recyclableRender;
  33. }), t.d(e, "components", function() {
  34. return o.components;
  35. });
  36. },
  37. 334: function(n, e, t) {
  38. t.r(e), t.d(e, "render", function() {
  39. return o;
  40. }), t.d(e, "staticRenderFns", function() {
  41. return r;
  42. }), t.d(e, "recyclableRender", function() {
  43. return i;
  44. }), t.d(e, "components", function() {});
  45. var o = function() {
  46. var n = this;
  47. n.$createElement;
  48. n._self._c;
  49. }, i = !1, r = [];
  50. o._withStripped = !0;
  51. },
  52. 335: function(n, e, t) {
  53. t.r(e);
  54. var o = t(336), i = t.n(o);
  55. for (var r in o) "default" !== r && function(n) {
  56. t.d(e, n, function() {
  57. return o[n];
  58. });
  59. }(r);
  60. e.default = i.a;
  61. },
  62. 336: function(n, e, t) {
  63. (function(n) {
  64. Object.defineProperty(e, "__esModule", {
  65. value: !0
  66. }), e.default = void 0;
  67. var o = t(337), i = (t(27), {
  68. data: function() {
  69. return {
  70. shareList: [],
  71. swiperIndex: 0,
  72. poster: ""
  73. };
  74. },
  75. onLoad: function() {
  76. this.loadData();
  77. },
  78. methods: {
  79. bindchange: function(n) {
  80. var e = this.shareList;
  81. this.swiperIndex = n.detail.current, this.poster = e[this.swiperIndex].poster, console.log(this.poster);
  82. },
  83. savePosterPath: function() {
  84. var e = this;
  85. "" == e.poster && (e.poster = e.shareList[0].poster), n.downloadFile({
  86. url: e.poster,
  87. success: function(t) {
  88. if (200 !== t.statusCode) return e.$api.msg(t.errMsg);
  89. n.getSetting({
  90. success: function(o) {
  91. o.authSetting["scope.writePhotosAlbum"] ? n.saveImageToPhotosAlbum({
  92. filePath: t.tempFilePath,
  93. success: function(n) {
  94. return e.$api.msg("保存成功");
  95. },
  96. fail: function(n) {
  97. return e.$api.msg(n.errMsg);
  98. },
  99. complete: function(n) {}
  100. }) : n.authorize({
  101. scope: "scope.writePhotosAlbum",
  102. success: function() {
  103. n.saveImageToPhotosAlbum({
  104. filePath: t.tempFilePath,
  105. success: function(n) {
  106. return e.$api.msg("保存成功");
  107. },
  108. fail: function(n) {
  109. return e.$api.msg(n.errMsg);
  110. },
  111. complete: function(n) {}
  112. });
  113. },
  114. fail: function() {
  115. n.showModal({
  116. title: "您已拒绝获取相册权限",
  117. content: "是否进入权限管理,调整授权?",
  118. success: function(t) {
  119. if (t.confirm) n.openSetting({
  120. success: function(n) {
  121. console.log(n.authSetting);
  122. }
  123. }); else if (t.cancel) return e.$api.msg("已取消!");
  124. }
  125. });
  126. }
  127. });
  128. },
  129. fail: function(n) {}
  130. });
  131. },
  132. fail: function(n) {
  133. return e.$api.msg(n.errMsg);
  134. }
  135. });
  136. },
  137. seav: function(e) {
  138. n.showLoading({
  139. title: "生成中...",
  140. mask: !0
  141. }), n.saveImageToPhotosAlbum({
  142. filePath: this.poster,
  143. complete: function(e) {
  144. n.hideLoading(), console.log(e), n.showToast({
  145. title: "保存图片成功!",
  146. duration: 2e3,
  147. icon: "none"
  148. });
  149. }
  150. });
  151. },
  152. loadData: function() {
  153. var e = this;
  154. n.showLoading({
  155. title: "获取中",
  156. mask: !0
  157. }), (0, o.spreadBanner)({
  158. type: 1
  159. }).then(function(t) {
  160. n.hideLoading(), e.shareList = t.data;
  161. }).catch(function(e) {
  162. n.hideLoading();
  163. });
  164. }
  165. }
  166. });
  167. e.default = i;
  168. }).call(this, t(1).default);
  169. },
  170. 338: function(n, e, t) {
  171. t.r(e);
  172. var o = t(339), i = t.n(o);
  173. for (var r in o) "default" !== r && function(n) {
  174. t.d(e, n, function() {
  175. return o[n];
  176. });
  177. }(r);
  178. e.default = i.a;
  179. },
  180. 339: function(n, e, t) {}
  181. }, [ [ 331, "common/runtime", "common/vendor" ] ] ]);