1 line
4.8 KiB
JavaScript
1 line
4.8 KiB
JavaScript
|
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"199d":function(t,e,n){"use strict";(function(t,e){var o=n("4ea4");n("eaf2");o(n("66fd"));var i=o(n("737b"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(i.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},2233:function(t,e,n){"use strict";(function(t){var o=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=o(n("2eee")),r=o(n("c973")),a=o(n("9523")),s=n("26cb");function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){(0,a.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var l={data:function(){return{list:[],token:""}},computed:u(u({},(0,s.mapState)(["user","HomeContent","InfoList"])),{},{mobile:function(){return this.user.name?this.user.cominfo.mobile:""},centerList:function(){return this.HomeContent?this.HomeContent.centerbannerlist:[]},todayviewer:function(){return this.HomeContent?this.HomeContent.todayviewer:[]},fimages:function(){return this.HomeContent?this.HomeContent.bannerlist:[]},notices:function(){return this.HomeContent?this.HomeContent.noticelist:[]},newsList:function(){return this.InfoList.rows?this.InfoList.rows:[]},tools:function(){return this.$json.tools}}),components:{list:function(){n.e("components/newsList").then(function(){return resolve(n("a85c"))}.bind(null,n)).catch(n.oe)},pikerSearch:function(){Promise.all([n.e("common/vendor"),n.e("components/search")]).then(function(){return resolve(n("a9a6"))}.bind(null,n)).catch(n.oe)},UniNoticeBar:function(){n.e("uni_modules/uni-notice-bar/uni-notice-bar").then(function(){return resolve(n("37c9"))}.bind(null,n)).catch(n.oe)}},onLoad:function(){var e=this;return(0,r.default)(i.default.mark((function n(){var o;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return o=e,n.next=3,o.login();case 3:o.token=t.getStorageSync("token"),o.$store.dispatch("getInfoList",{searchValue:"",pageNo:1,pageSize:3}),o.handleVipList();case 6:case"end":return n.stop()}}),n)})))()},methods:{login:function(){var e=this;t.login({success:function(n){n.code&&(n.errMsg="login:ok")&&e.$model.onlogin({code:n.code}).then((function(n){if(2==n.code)return e.token=null,t.clearStorageSync(),void t.setStorageSync("sessionid",n.data.sessionid);0==n.code&&(e.token=n.data.token,t.setStorageSync("token",n.data.token),t.setStorageSync("refreshtoken",n.data.refreshtoken),t.setStorageSync("sessionid",n.data.sessionid),e.$store.dispatch("getUserInfo"))})).catch((function(t){}))}})},handleVipList:function(){var t=this;this.$model.getVipList({pageNo:1,pageSize:6}).then((function(e){0==e.code&&(t.list=e.data.rows)}))},handleDetail:function(e){this.token?t.navigateTo({url:"/pages/phoneList/detail?id="+e.id}):this.$tools.msg("登录后查看更多")},handleSearch:function(e){console.log("搜索信息返回",e),this.token?t.navigateTo({url:"/pages/index/searchList?ite="+e}):this.$tools.msg("登录后查看更多")},handlePath:function(e,n){3==e?t.switchTab({url:n}):2==e?t.navigateTo({url:n+"?content=2"}):this.navTo(n)},detail:function(t,e){var n=this;if(n.token)return n.$model.getInfoDetail({id:t,type:e}).then((function(t){console.log("资讯列表",t),0==t.code&&(t.data.type=e,n.$tools.NewsPtype(t.data))}));n.$tools.msg("登录后查看更多")},handleLogin:function(){t.navigateTo({url:"/pageTwo/login/login"})},navTo:function(e){t.navigateTo({url:e})}}};e.default=l}).call(this,n("543d")["default"])},3562:function(t,e,n){},"362a":function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var o=function(){var t=this,e=t.$createElemen
|