3 lines
16 KiB
JavaScript
3 lines
16 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9871525a"],{"074c":function(e,t,r){"use strict";r("fe2e")},"0980":function(e,t,r){e.exports=r.p+"static/app/img/code_top_bgimg@2x.ef715274.png"},"1da1":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));r("d3b7");function o(e,t,r,o,n,i,a){try{var c=e[i](a),s=c.value}catch(u){return void r(u)}c.done?t(s):Promise.resolve(s).then(o,n)}function n(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function c(e){o(a,n,i,c,s,"next",e)}function s(e){o(a,n,i,c,s,"throw",e)}c(void 0)}))}}},"676b":function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,o=e._self._c||t;return e.pageShow?o("div",{staticClass:"group-details"},[o("c-title",{attrs:{text:"升级码"}}),o("img",{staticClass:"page-bgimg",attrs:{src:r("0980"),srcset:r("d4a0")+" 3x"}}),o("div",{staticClass:"group-main"},[o("p",{staticClass:"group-name"},[e._v(e._s(e.codes.code.code.name))]),o("img",{staticClass:"group-qrcode",attrs:{src:e.codes.qr_code}}),o("p",{staticClass:"group-scan-prompt"},[e._v("扫码升级")]),o("div",{staticClass:"group-level"},[o("div",{staticClass:"group-level-title"},[e._v("升级等级")]),o("div",{staticClass:"group-level-description"},[e._v(e._s(e.codes.code._level_text))])]),!1===e.isFromShare&&!0===e.isCodeMember?o("div",{staticClass:"group-module-decoration"},[o("div",{staticClass:"group-module-decoration-circle"}),o("div",{staticClass:"group-module-decoration-connect"}),o("div",{staticClass:"group-module-decoration-circle"})]):e._e()]),!1===e.isFromShare&&!0===e.isCodeMember?o("div",{staticClass:"group-footer"},[o("ul",{staticClass:"group-codes-count"},[o("li",{staticClass:"group-codes-count-item"},[o("p",{staticClass:"group-codes-count-number"},[e._v(e._s(e.codes.code.num-e.codes.code.used_num)+"个")]),o("p",[e._v("剩余数量")])]),o("li",{staticClass:"group-codes-count-item"},[o("p",{staticClass:"group-codes-count-number"},[e._v(e._s(e.codes.code.used_num)+"个")]),o("p",{staticClass:"group-codes-count-title"},[e._v("已使用")])])]),o("button",{staticClass:"group-view-used-log",on:{click:e.viewUsedLog}},[e._v("使用记录")])]):e._e()],1):e._e()},n=[],i=r("c7eb"),a=r("1da1"),c=(r("e7e5"),r("d399")),s={activated:function(){this.$route.query.key&&this.$route.query.codes_id?(this.codesKey=this.$route.query.key,this.isFromShare=!0,this.getCodesDetailsByKey()):this.$route.query.codes_id?(this.codesId=this.$route.query.codes_id,this.getCodesDetails()):(c["a"].fail("升级码不存在"),this.$router.go(-1))},data:function(){return{codesKey:null,codesId:null,codes:null,pageShow:!1,isFromShare:!1,isCodeMember:!1,memberId:0}},methods:{getCodesDetails:function(){var e=this,t=c["a"].loading();$http.post("plugin.upgrade-code.Frontend.controllers.code.index",{id:this.codesId,basic_info:0,validate_page:0}).then(function(){var r=Object(a["a"])(Object(i["a"])().mark((function r(o){var n,a,s;return Object(i["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(n=o.data,a=o.msg,s=o.result,0!==s){r.next=5;break}return c["a"].fail(a),setTimeout((function(){e.$router.go(-1)}),1e3),r.abrupt("return");case 5:return n||(c["a"].fail("升级码不存在"),e.$router.go(-1)),n.code["_level_text"]="",n.code["member_level"]&&n.code["dividend_level"]?n.code["_level_text"]=n.code["member_level"]["level_name"]+" + "+n.code["dividend_level"]["level_name"]:n.code["member_level"]?n.code["_level_text"]=n.code["member_level"]["level_name"]:n.code["dividend_level"]&&(n.code["_level_text"]=n.code["dividend_level"]["level_name"]),e.memberId=n.code.member_id,e.codes=n,r.next=12,e.initShare();case 12:e.pageShow=!0,t.close();case 14:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}())},getCodesDetailsByKey:function(){var e=this,t=c["a"].loading();$http.post("plugin.upgrade-code.Frontend.controllers.code.share",{key:this.codesKey}).then(function(){var r=Object(a["a"])(Object(i["a"])().mark((function r(o){var n,a,s,u;return Object(i["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(n=o.data,a=o.msg,s=o.result,0!==s){r.next=5;break}return c["a"].fail(a),e.$router.go(-1),r.abrupt("return");case 5:return n||(c["a"].fail("升级码不存在"),e.$router.go(-1)),e.codes=n,u=e,r.next=10,u.fun.wxShare("",{mid:u.fun.getKeyByMid()},{title:"升级码",link:location.href+"&share_tag=2&key="+u.codes.code.key,imgUrl:u.codes.qr_code,description:"好友邀请您升级啦"},(function(e){e.info.uid==u.memberId&&(u.isCodeMember=!0)}));case 10:e.pageShow=!0,t.close();case 12:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}())},viewUsedLog:function(){this.$router.push(this.fun.getUrl("MemberUpgradeCodeUsedLog",{},{codes_id:this.codesId}))},initShare:function(){var e=this;return Object(a["a"])(Object(i["a"])().mark((function t(){var r,o;return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r="android"===e.fun.isIosOrAndroid()?window.location.href+"&key="+e.codes.code.key:window.initUrl+"&key="+e.codes.code.key,o={url:r,mid:e.fun.getKeyByMid()},t.next=4,$http.post("member.member.wxJsSdkConfig",o).then((function(t){t.data.info.uid==e.memberId&&(e.isCodeMember=!0),1===t.result&&t.data.config&&t.data.config.appId&&e.share(t.data)}));case 4:case"end":return t.stop()}}),t)})))()},share:function(e){var t=this;wx.config(e.config),wx.ready((function(){var r=t.codes.qr_code,o="升级码",n="好友邀请您升级啦",i=location.href+"&share_tag=2&key="+t.codes.code.key;i=t.fun.isMid(i,e.info.uid),wx.updateAppMessageShareData({title:o,link:i,desc:n,imgUrl:r}),wx.showOptionMenu(),wx.hideMenuItems({menuList:["menuItem:copyUrl"]}),wx.updateTimelineShareData({title:o,link:i,imgUrl:r})}))}}},u=s,d=(r("074c"),r("2877")),l=Object(d["a"])(u,o,n,!1,null,"9ca319b8",null);t["default"]=l.exports},a8c7:function(e,t,r){var o=r("24fb");t=o(!1),t.push([e.i,'.group-details[data-v-9ca319b8]{padding:5.31rem 0 2.31rem;min-height:100vh;background-color:#9a7aff}.page-bgimg[data-v-9ca319b8]{position:absolute;z-index:0;top:.59rem;left:0;right:0;margin:0 auto;width:17.5rem}.group-main[data-v-9ca319b8]{position:relative;z-index:1;margin:0 auto;padding:1.53rem 1.09rem;width:21.56rem;background-color:#fff;border-radius:.31rem}.group-name[data-v-9ca319b8]{font-size:1.88rem;color:#9a7aff;font-weight:700;text-shadow:#5e34e2 1.5px 1.5px;text-overflow:ellipsis;overflow:hidden}.group-qrcode[data-v-9ca319b8]{margin-top:1.22rem;width:9.66rem;height:9.66rem;background-color:#fff;border-radius:.25rem;-webkit-box-shadow:0 0 15px rgba(20,20,20,.2);box-shadow:0 0 15px rgba(20,20,20,.2)}.group-scan-prompt[data-v-9ca319b8]{margin-top:.78rem;font-size:.81rem;color:#666}.group-level[data-v-9ca319b8]{margin-top:.91rem;text-align:left}.group-level-title[data-v-9ca319b8]{position:relative;padding-left:.41rem;width:100%;overflow:hidden;font-size:1.13rem;color:#333;white-space:nowrap;text-overflow:ellipsis}.group-level-title[data-v-9ca319b8]:before{content:"";position:absolute;left:0;bottom:0;top:0;margin:auto 0;width:.19rem;height:.94rem;background:#9a7aff}.group-level-description[data-v-9ca319b8]{margin-top:.29rem;font-size:.81rem;color:#333}.group-module-decoration[data-v-9ca319b8]{position:absolute;bottom:-2.28rem;left:2rem;right:2rem;width:calc(100% - 4rem);height:3.31rem}.group-module-decoration div[data-v-9ca319b8]{position:relative}.group-module-decoration-circle[data-v-9ca319b8]{height:.72rem}.group-module-decoration-circle[data-v-9ca319b8]:before{left:0}.group-module-decoration-circle[data-v-9ca319b8]:after,.group-module-decoration-circle[data-v-9ca319b8]:before{content:"";position:absolute;top:0;width:.72rem;height:.72rem;border-radius:50%;background:#9a7aff}.group-module-decoration-circle[data-v-9ca319b8]:after{right:0}.group-module-decoration-connect[data-v-9ca319b8]{height:1.87rem}.group-module-decoration-connect[data-v-9ca319b8]:before{left:0}.group-module-decoration-connect[data-v-9ca319b8]:after,.group-module-decoration-connect[data-v-9ca319b8]:before{content:"";position:absolute;top:0;bottom:0;margin:auto 0;width:.66rem;height:1.25rem;background:#fff}.group-module-decoration-connect[data-v-9ca319b8]:after{right:0}.group-footer[data-v-9ca319b8]{margin:1.25rem auto 0;padding:1.47rem 1.34rem 1.53rem;width:21.56rem;background-color:#fff;border-radius:.31rem}.group-codes-count[data-v-9ca319b8]{display:grid;grid-template-columns:repeat(5,50%);line-height:.82rem;font-size:.81rem;color:#333}.group-codes-count-number[data-v-9ca319b8]{margin-bottom:.47rem;padding:0 .315rem;width:100%;overflow:hidden;white-space:nowrap;font-size:.94rem;font-weight:600;text-overflow:ellipsis}.group-view-used-log[data-v-9ca319b8]{margin-top:1.47rem;padding:.78rem;width:100%;font-size:.94rem;color:#fff;background:#9a7aff;border-radius:25rem;border:none;outline:none}.group-view-used-log[data-v-9ca319b8]:active{-webkit-filter:brightness(95%);filter:brightness(95%)}',""]),e.exports=t},c7eb:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0"),r("b636"),r("944a"),r("0c47"),r("23dc"),r("d9e2"),r("3410"),r("159b"),r("b0c0"),r("131a"),r("fb6a");var o=r("53ca");function n(){
|
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
n=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(j){u=function(e,t,r){return e[t]=r}}function d(e,t,r,o){var n=t&&t.prototype instanceof p?t:p,i=Object.create(n.prototype),a=new L(o||[]);return i._invoke=function(e,t,r){var o="suspendedStart";return function(n,i){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===n)throw i;return E()}for(r.method=n,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===o)throw o="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o="executing";var s=l(e,t,r);if("normal"===s.type){if(o=r.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o="completed",r.method="throw",r.arg=s.arg)}}}(e,r,a),i}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(j){return{type:"throw",arg:j}}}e.wrap=d;var f={};function p(){}function h(){}function g(){}var m={};u(m,a,(function(){return this}));var v=Object.getPrototypeOf,b=v&&v(v(O([])));b&&b!==t&&r.call(b,a)&&(m=b);var y=g.prototype=p.prototype=Object.create(m);function w(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(i,a,c,s){var u=l(e[i],e,a);if("throw"!==u.type){var d=u.arg,f=d.value;return f&&"object"==Object(o["a"])(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,c,s)}),(function(e){n("throw",e,c,s)})):t.resolve(f).then((function(e){d.value=e,c(d)}),(function(e){return n("throw",e,c,s)}))}s(u.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}}function x(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator["return"]&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var o=l(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var n=o.arg;return n?n.done?(t[e.resultName]=n.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):n:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,n=function t(){for(;++o<e.length;)if(r.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:E}}function E(){return{value:void 0,done:!0}}return h.prototype=g,u(y,"constructor",g),u(g,"constructor",h),h.displayName=u(g,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,s,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},w(_.prototype),u(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,o,n,i){void 0===i&&(i=Promise);var a=new _(d(t,r,o,n),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},w(y),u(y,s,"Generator"),u(y,a,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var o=t.pop();if(o in e)return r.value=o,r.done=!1,r}return r.done=!0,r}},e.values=O,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function o(r,o){return a.type="throw",a.arg=e,t.next=r,o&&(t.method="next",t.arg=void 0),!!o}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var o=this.tryEntries.length-1;o>=0;--o){var n=this.tryEntries[o];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var o=r.completion;if("throw"===o.type){var n=o.arg;C(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},e}},d4a0:function(e,t,r){e.exports=r.p+"static/app/img/code_top_bgimg@3x.5b5b8840.png"},fe2e:function(e,t,r){var o=r("a8c7");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var n=r("499e").default;n("0a90b832",o,!0,{sourceMap:!1,shadowMode:!1})}}]); |