(window.webpackJsonp=window.webpackJsonp||[]).push([[331],{"3592":function(e,t,o){"use strict";o.r(t);var s=o(18),a=o.n(s),i=o(31),r=o(21),n={"data":function data(){return{"webviewUrl":"","host":"https://c.lohashow.com","activityId":"","activityName":"","previewPage":"首页","cover":"","shareWriting":""}},"onLoad":function onLoad(e){console.log("webview",e),this.activityId=e.activityId},"onShow":function onShow(){var e=this;wx.setNavigationBarTitle({"title":"大转盘"});var t=this;this.$utils.storage.global.get("mallCode")!==this.$route.query.mallCode&&this.$route.query.share&&("WEAPP"===this.$utils.webType()&&this.$utils.storage.global.get("mallCode")?Object(r.showModal)({"title":"切换门店","content":"此分享内容与您的定位门店不匹配，或会影响您的体验，是否切换看看？","confirmText":"切换门店","cancelText":"暂不切换","showCancel":!0,"success":function success(e){e.confirm?(t.$utils.storage.global.set("mallCode",t.$route.query.mallCode),t.$utils.storage.global.set("homecityCode",t.$route.query.cityCode)):console.log("取消")}}):(t.$utils.storage.global.set("mallCode",t.$route.query.mallCode),t.$utils.storage.global.set("homecityCode",t.$route.query.cityCode),Object(r.showToast)({"title":"已经切换到所在门店","icon":"success","duration":2e3}))),getCurrentPages().length>1&&wx.hideHomeButton({"success":function success(){console.log("success")}});this.$route.query;var o=this.host;this.$utils.NODE_ENV.DEV_ENV;var s=this.$utils.storage.get("userToken");JSON.stringify(this.$utils.storage.get("userInfo"));if(s){var a=this.$route.query;console.log("query",this.$utils.storage.global.get("mallCode"),this.$utils.storage.global.get("homecityCode"));var i=[];for(var n in a)i.push("".concat(n,"=").concat(a[n]));var l=this.$utils.storage.get("sessionToken");this.webviewUrl="",setTimeout((function(){e.webviewUrl="".concat(o+"/pages/member/pages/subPage/coupons/game/index","?userToken=").concat(encodeURIComponent(s),"&sessionToken=").concat(encodeURIComponent(l),"&previewPage=").concat(encodeURIComponent(e.previewPage),"&activityId=").concat(e.$route.query.activityId,"&mallCode=").concat(e.$route.query.mallCode?e.$route.query.mallCode:e.$utils.storage.global.get("mallCode"),"&cityCode=").concat(e.$route.query.cityCode?e.$route.query.cityCode:e.$utils.storage.global.get("cityCode"),"&share=").concat(e.$route.query.mallCode!==e.$utils.storage.global.get("mallCode")?e.$route.query.share:""),console.log("this.webviewUrl",e.webviewUrl)}),100)}else this.$router.push({"path":"/pages/login/login"});wx.setNavigationBarColor({"frontColor":"#ffffff","backgroundColor":"#f87443","animation":{"duration":400,"timingFunc":"easeIn"}})},"onShareAppMessage":function onShareAppMessage(){console.log("this.webviewUrl",this.$utils.storage.global.get("mallCode"),this.webviewUrl,this.$route.query.activityId);var e=JSON.parse(this.$utils.storage.get("userInfo")).customerUser,t=this.$utils.storage.get("sessionToken"),o=this.$utils.storage.get("userToken");console.log("233=>",e);var s={"title":e.nickname+"邀请您参加"+this.activityName,"path":"/pages/member/pages/subPage/webview/game/index?userToken=".concat(encodeURIComponent(o),"&sessionToken=").concat(encodeURIComponent(t),"&previewPage=").concat(encodeURIComponent(this.previewPage),"&activityId=").concat(this.$route.query.activityId,"&mallCode=").concat(this.$utils.storage.global.get("mallCode"),"&cityCode=").concat(this.$utils.storage.global.get("homecityCode"),"&share=1"),"imageUrl":this.cover};return console.log(s),s},"created":function created(){var e=this;return Object(i.a)(a.a.mark((function _callee(){var t;return a.a.wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:return t={"id":e.$route.query.activityId},o.next=3,e.$api.gameDetail(t).then((function(t){console.log("res.data",t.data),e.activityName=t.data.activity.activityName,e.cover=t.data.activity.cover,e.shareWriting=t.data.activity.shareWriting}));case 3:e.addSensors();case 4:case"end":return o.stop()}}),_callee)})))()},"methods":{"addSensors":function addSensors(){var e;console.log("分享2345678",this.$route),e="home"===this.$route.query.from?"首页":"activity"===this.$route.query.from?this.$route.query.activityName:"分享",this.previewPage=e,this.$sensors.tracks(this.$utils.sensorsPageView(),{"url_data_code":e,"$title":"活动页面","now_page":this.activityName?this.activityName:"大转盘","page_code":this.activityId})}}},l=o(3),c=Object(l.a)(n,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",[this.webviewUrl?t("taro-web-view",{"attrs":{"src":this.webviewUrl}}):this._e()],1)}),[],!1,null,null,null);t.default=c.exports}}]);