1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
|
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"102d":function(e,t,o){},"40ad":function(e,t,o){"use strict";(function(e,n){var a=o("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=a(o("7eb4")),s=a(o("ee10")),r=(a(o("b530")),a(o("7073"))),c=(o("3240"),{data:function(){return{isOpen:!1,chainStoreId:"",indicatorDots:!0,autoplay:!0,interval:3e3,duration:500,joinmsg:"",msg:"1",show:!1,shows:"",title:"",oilTypeList:"",columns:[],oilInfo:{oilName:"未添加",oilPrice:"0",gbPrice:"0"},AppToken:e.getStorageSync("App-Token"),list1:[],list3:["http://47.95.206.185:83/topbj.png"],longitude:"",latitude:"",lon:"",lat:"",store:{name:"测试油站",description:"济南分店",address:"济南槐荫区"},welfare:[],distance:"",storeId:"",staffId:"",baseUrl:this.$baseUrl}},onLoad:function(t){var o=this;return(0,s.default)(i.default.mark((function n(){var a,s,r,c,l,u,d;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(t.storeId&&e.setStorageSync("storeId",t.storeId),t.type&&e.setStorageSync("y_type",t.type),t.userId&&e.setStorageSync("y_userId",t.userId),"WECHAT"!=e.getStorageSync("appltType")){n.next=12;break}return a=decodeURIComponent(t.q),t.q?(s=a.split("?")[1],r="",c="",l="",u="",console.log(111),s.includes("&")?(d=s.split("&"),d.forEach((function(e){e.includes("storeId")?r=e.split("=")[1]:e.includes("staffId")?c=e.split("=")[1]:e.includes("userId")?l=e.split("=")[1]:e.includes("type")&&(u=e.split("=")[1])}))):r=s.split("=")[1],e.setStorageSync("storeId",r),e.setStorageSync("y_type",u),e.setStorageSync("y_userId",l),e.setStorageSync("inviteStaffId",c),o.storeId=e.getStorageSync("storeId"),o.chainStoreId=e.getStorageSync("chainStoreId"),o.staffId=e.getStorageSync("inviteStaffId")):e.getStorageSync("storeId")&&(o.storeId=e.getStorageSync("storeId")),n.next=8,o.getUserAuthority();case 8:return n.next=10,o.getTheJudgmentIsTheSame();case 10:n.next=16;break;case 12:return n.next=14,o.getUserAuthority();case 14:return n.next=16,o.getTheJudgmentIsTheSame();case 16:case"end":return n.stop()}}),n)})))()},onShow:function(){var e=this;return(0,s.default)(i.default.mark((function t(){return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getTheJudgmentIsTheSame();case 2:return t.next=4,e.isJoined();case 4:e.isRecharge();case 5:case"end":return t.stop()}}),t)})))()},components:{tabbar:function(){o.e("components/tabbar/tabbar").then(function(){return resolve(o("45e5"))}.bind(null,o)).catch(o.oe)}},methods:{isRecharge:function(){var e=this;(0,r.default)({url:"business/storeInformation/store/isRecharge",method:"get"}).then((function(t){t.data?e.isOpen=!0:e.isOpen=!1}))},getBannerUrl:function(e){var t="";return t=e.includes("http")?e:this.baseUrl+e,t},goPage:function(t){e.navigateTo({url:t})},getIndexBanner:function(){var t=this;e.getStorageSync("storeId")&&(0,r.default)({url:"business/indexBanner/list/"+e.getStorageSync("storeId"),method:"get"}).then((function(e){if(t.list1=e.data,e.data.length>0){for(var o=0;o<e.data.length;o++)e.data[o].bannerUrl.includes("http")?t.list1[o].bannerUrl=e.data[o].bannerUrl:t.list1[o].bannerUrl=t.baseUrl+e.data[o].bannerUrl;console.log(t.list1)}}))},isJoined:function(){var t=this,o={storeId:e.getStorageSync("storeId")};this.AppToken&&(0,r.default)({url:"business/marketingActivity/activeNewlywedsRecords/applet",method:"get",params:o}).then((function(e){console.log("11111"+e),200==e.code&&1==e.data?t.shows=!0:t.shows=!1}))},drawDown:function(){var t=this;(0,r.default)({url:"business/marketingActivity/activeNewlywedsRecords",method:"post",data:{storeId:this.storeId,chainStoreId:this.chainStoreId}}).then((function(o){console.log("11111"+o),200==o.code&&1==o.data?(t.shows=!1,e.showToast({title:"领取成功!"})):(t.shows=!1,e.showToast({title:"领取失败!"}))}))},selectActiveNewlyweds:function(){this.AppToken&&(0,r.default)({url:"business/marketingActivity/activeNewlyweds/applet",method:"get"}).then((function(e){console.log("11111"+e)}))},isExistStoreId:function(){e.getStorageSync("storeId")?this.g
|