vip.js 4.6 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/vip/vip"],{"0032":function(e,t,n){"use strict";n.r(t);var i=n("34a9"),o=n.n(i);for(var r in i)"default"!==r&&function(e){n.d(t,e,(function(){return i[e]}))}(r);t["default"]=o.a},"0e29":function(e,t,n){"use strict";n.r(t);var i=n("c2c1"),o=n("0032");for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);n("4131");var c,a=n("f0c5"),s=Object(a["a"])(o["default"],i["b"],i["c"],!1,null,"2acd2066",null,!1,i["a"],c);t["default"]=s.exports},"34a9":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(){n.e("components/TopBar/TopBar").then(function(){return resolve(n("f619"))}.bind(null,n)).catch(n.oe)},o={components:{TopBar:i},data:function(){return{topbarIcon:"back",topbarTitle:"会员中心",assetsUrl:this.$util.assetsUrl,scrollRefreshing:!1,scrollTriggered:!0,scrollHeight:0,topNavHeight:0,tabIndex:0,priceDatas:{},promotions:[],totalPrice:0,priceConfig:{feeFen:null,sceneId:null,scene:null,body:null,userId:null,pkgCate:"JyPark"}}},mounted:function(){this.computedScollviewHeight(),this.getConfigData(),this.getPromotionsData()},computed:{statusBarHeight:function(){return this.$store.state.statusBarHeight},topbarOffsetHeight:function(){return this.$store.state.topbarOffsetHeight},userInfo:function(){return this.$store.state.userInfo||JSON.parse(e.getStorageSync("userInfo"))}},methods:{catchTouchMove:function(){return!1},back:function(){e.navigateBack({delta:1})},toAddedService:function(){e.navigateTo({url:"/pages/webview/webview?url=".concat(this.$util.protocal.addedService)})},computedScollviewHeight:function(){var t=this,n=e.createSelectorQuery().in(this),i=0;n.select("#topnav").boundingClientRect((function(e){t.topNavHeight=e.height,i+=e.height})).exec((function(){var n=e.getSystemInfoSync();t.scrollHeight=n.windowHeight-i}))},scrollRefresh:function(){var e=this;this.scrollRefreshing||(this.scrollRefreshing=!0,setTimeout((function(){e.scrollTriggered=!1,e.scrollRefreshing=!1}),1e3),this.getConfigData())},scrollPulling:function(e){},scrollRestore:function(){this.scrollTriggered=!0},scrollAbort:function(){},scrollToBottom:function(){},getConfigData:function(){var t=this,n=JSON.parse(e.getStorageSync("user"));this.$api.public.priceBySceneConfigs({completeUser:n,scene:"Member"}).then((function(n){t.priceDatas=n.data,t.totalPrice=t.priceDatas.prices2[t.tabIndex].priceFen,t.priceConfig.feeFen=t.priceDatas.prices2[t.tabIndex].priceFen,t.priceConfig.scene=t.priceDatas.prices2[t.tabIndex].sceneCate,t.priceConfig.sceneId=t.priceDatas.prices2[t.tabIndex].sceneId,t.priceConfig.body=t.priceDatas.prices2[t.tabIndex].name,t.priceConfig.userId=(t.$store.state.userInfo||JSON.parse(e.getStorageSync("userInfo"))).id}))},getPromotionsData:function(){var e=this;this.$api.public.vipPromotions({}).then((function(t){e.promotions=t.data}))},tabClick:function(t){this.tabIndex=t,this.totalPrice=this.priceDatas.prices2[t].priceFen,this.priceConfig.feeFen=this.priceDatas.prices2[t].priceFen,this.priceConfig.scene=this.priceDatas.prices2[t].sceneCate,this.priceConfig.sceneId=this.priceDatas.prices2[t].sceneId,this.priceConfig.body=this.priceDatas.prices2[t].name,this.priceConfig.userId=(this.$store.state.userInfo||JSON.parse(e.getStorageSync("userInfo"))).id},pay:function(){var t=this;e.getProvider({service:"payment",success:function(n){console.log(n.provider),t.$api.pay.creatWxOrder(t.priceConfig).then((function(t){t.data.succ&&e.requestPayment({provider:n.provider[0],timeStamp:String(t.data.timeStamp),nonceStr:t.data.nonceStr,package:"prepay_id=".concat(t.data.wxUniPrePayId),signType:"MD5",paySign:t.data.paySign,success:function(t){console.log(t),"requestPayment:ok"===t.errMsg&&e.showToast({icon:"success",title:"支付成功"})},fail:function(e){console.log(e)}})}))}})},toService:function(){e.openCustomerServiceChat({extInfo:{url:"https://work.weixin.qq.com/kfid/kfca1b21d2f7e8a18e9"},corpId:"wwa8f2a0d8a6dc0950",fail:function(e){console.log(e),wx.showToast({title:"客服联系失败",icon:"none"})}})}}};t.default=o}).call(this,n("543d")["default"])},4131:function(e,t,n){"use strict";var i=n("ab47"),o=n.n(i);o.a},"68ed":function(e,t,n){"use strict";(function(e){n("39a3");i(n("66fd"));var t=i(n("0e29"));function i(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=n,e(t.default)}).call(this,n("543d")["createPage"])},ab47:function(e,t,n){},c2c1:function(e,t,n){"use strict";var i;n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return i}));var o=function(){var e=this,t=e.$createElement;e._self._c},r=[]}},[["68ed","common/runtime","common/vendor"]]]);