"use weex:vue";

if (typeof Promise !== 'undefined' && !Promise.prototype.finally) {
  Promise.prototype.finally = function(callback) {
    const promise = this.constructor
    return this.then(
      value => promise.resolve(callback()).then(() => value),
      reason => promise.resolve(callback()).then(() => {
        throw reason
      })
    )
  }
};

if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
  const global = uni.requireGlobal()
  ArrayBuffer = global.ArrayBuffer
  Int8Array = global.Int8Array
  Uint8Array = global.Uint8Array
  Uint8ClampedArray = global.Uint8ClampedArray
  Int16Array = global.Int16Array
  Uint16Array = global.Uint16Array
  Int32Array = global.Int32Array
  Uint32Array = global.Uint32Array
  Float32Array = global.Float32Array
  Float64Array = global.Float64Array
  BigInt64Array = global.BigInt64Array
  BigUint64Array = global.BigUint64Array
};


(()=>{var N=Object.create;var E=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var B=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var F=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var M=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of O(t))!R.call(e,i)&&i!==r&&E(e,i,{get:()=>t[i],enumerable:!(o=k(t,i))||o.enumerable});return e};var C=(e,t,r)=>(r=e!=null?N(B(e)):{},M(t||!e||!e.__esModule?E(r,"default",{value:e,enumerable:!0}):r,e));var m=(e,t,r)=>new Promise((o,i)=>{var a=u=>{try{s(r.next(u))}catch(g){i(g)}},c=u=>{try{s(r.throw(u))}catch(g){i(g)}},s=u=>u.done?o(u.value):Promise.resolve(u.value).then(a,c);s((r=r.apply(e,t)).next())});var S=F((Y,D)=>{D.exports=Vue});var J=C(S());function T(e,t,...r){uni.__log__?uni.__log__(e,t,...r):console[e].apply(console,[...r,t])}var P={tips(e,t=2e3,r="bottom"){plus.nativeUI.toast(e,{type:"text",duration:t,align:"center",verticalAlign:r})},isIOS(){return uni.getSystemInfoSync().platform==="ios"},isAndroid(){return uni.getSystemInfoSync().platform==="android"},getUUID(){return m(this,null,function*(){return new Promise((e,t)=>{plus.device.getInfo({success:r=>{e(r.uuid)},fail:r=>{t(r)}})})})},timeToTimestamp(e){return new Date(e.replace(/-/g,"/"))},friendlyDate(e){let t=this.timeToTimestamp(e);var r={year:"%n% \u5E74\u524D",month:"%n% \u6708\u524D",day:"%n% \u5929\u524D",hour:"%n% \u5C0F\u65F6\u524D",minute:"%n% \u5206\u949F\u524D",second:"%n% \u79D2\u524D"},o=Date.now(),i=Math.floor((o-t)/1e3),a=Math.floor(i/60),c=Math.floor(a/60),s=Math.floor(c/24),u=Math.floor(s/30),g=Math.floor(u/12),p="",f=0;return g>0?(p="year",f=g):u>0?(p="month",f=u):s>0?(p="day",f=s):c>0?(p="hour",f=c):a>0?(p="minute",f=a):(p="second",f=i===0?i=1:i),r[p].replace("%n%",f)},base64Encode(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r="",o,i,a,c,s,u,g,p=0;for(e=this.utf8Encode(e);p<e.length;)o=e.charCodeAt(p++),i=e.charCodeAt(p++),a=e.charCodeAt(p++),c=o>>2,s=(o&3)<<4|i>>4,u=(i&15)<<2|a>>6,g=a&63,isNaN(i)?u=g=64:isNaN(a)&&(g=64),r=r+t.charAt(c)+t.charAt(s)+t.charAt(u)+t.charAt(g);return r},utf8Encode(e){e=e.replace(/\r\n/g,`
`);for(var t="",r=0;r<e.length;r++){var o=e.charCodeAt(r);o<128?t+=String.fromCharCode(o):o>127&&o<2048?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(o&63|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(o&63|128))}return t},utf8Decode(e){var t=[],r=0,o=0,i=0,a=0,c=0;for(e+="";r<e.length;)i=e.charCodeAt(r),i<128?(t[o++]=String.fromCharCode(i),r++):i>191&&i<224?(a=e.charCodeAt(r+1),t[o++]=String.fromCharCode((i&31)<<6|a&63),r+=2):(a=e.charCodeAt(r+1),c=e.charCodeAt(r+2),t[o++]=String.fromCharCode((i&15)<<12|(a&63)<<6|c&63),r+=3);return t.join("")},base64Decode(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r,o,i,a,c,s,u,g,p=0,f=0,A="",_=[];if(!e)return e;for(e+="";p<e.length;)a=t.indexOf(e.charAt(p++)),c=t.indexOf(e.charAt(p++)),s=t.indexOf(e.charAt(p++)),u=t.indexOf(e.charAt(p++)),g=a<<18|c<<12|s<<6|u,r=g>>16&255,o=g>>8&255,i=g&255,s==64?_[f++]=String.fromCharCode(r):u==64?_[f++]=String.fromCharCode(r,o):_[f++]=String.fromCharCode(r,o,i);return A=_.join(""),this.utf8Decode(A)},hasNotchInScreen(){return plus.navigator.hasNotchInScreen()}},y=P,I=!1;function l(e){uni.getNetworkType({success:function(o){if(o.networkType=="none")return y.tips("\u8BF7\u68C0\u6D4B\u7F51\u7EDC\u8FDE\u63A5"),!1}}),e.loading&&uni.showLoading({title:"\u52A0\u8F7D\u4E2D...",mask:!0,icon:"none"});let t={};var r=uni.getStorageSync("USER_TOKEN");return t.Authorization=r,t["Content-Type"]="application/x-www-form-urlencoded",new Promise((o,i)=>{uni.request({url:e.url,method:e.method||"POST",data:e.data||{},header:t,timeout:5e3,success:a=>{I&&T("log","at utils/request.js:48",a),o(a.data)},fail:a=>{I&&T("log","at utils/request.js:52",a),i(a)},complete:a=>{e.loading&&uni.hideLoading()}})})}l.baseURL="https://newapp.cheshi.com";var b="USER_TOKEN",x="USER_INFO",d=l.baseURL+"/v1",H={baseURL:d,STORAGE_USER_KEY:x,isLogin(){return!!(uni.getStorageSync(b)&&uni.getStorageSync(x))},login(){return uni.navigateTo({url:"/pages/login/index"}),!1},bindThird(e){let t={url:d+"/user/bind-app",data:{openid:e.openid,type:e.type,unionid:e.unionid,nickname:e.nickname,avatar:e.avatar}};return l(t)},getUserInfo(e=!1){return m(this,null,function*(){if(!e){let o=uni.getStorageSync(x);if(o)return o}let t={url:d+"/person/user-info"};return(yield l(t)).data})},getCode(e,t,r,o){let i={url:d+"/user/get-code",data:{device_id:e,mobile:t,token:r,type:o}};return l(i)},fastLogin(e,t){let r={url:d+"/user/fast-login",data:{mobile:e,code:t}};return l(r)},logOff(){let e={url:d+"/person/log-off"};return l(e)},oAuthLogin(e,t,r,o,i,a,c){let s={url:d+"/user/oauth-login",data:{openid:e,type:t,unionid:r,nickname:o,user_img:i,mobile:a,code:c}};return l(s)},updateUserInfo(e,t){let r={url:d+"/person/update-user-info",data:{key:e,value:t}};return l(r)},bindMobile(e,t){let r={url:d+"/user/bind-mobile",data:{mobile:e,code:t}};return l(r)},getNewsHistory(e,t="news",r=10){let o={url:d+"/person/my-history",data:{type:t,page:e,limit:r},method:"POST"};return l(o)},getFocus(e,t=10){let r={url:d+"/person/my-focus",data:{page:e,limit:t},method:"POST"};return l(r)},addFocus(e){let t={url:d+"/person/add-focus",data:{to_uid:e},method:"post"};return l(t)},delFocus(e){let t={url:d+"/person/del-focus",data:{to_uid:e},method:"post"};return l(t)},getMyLikes(e){let t={url:d+"/collect/list",data:{type:e.type,page:e.page,limit:e.limit||30},method:"post"};return l(t)},getProvinceList(){let e={url:d+"/user/get-provinces"};return l(e)},getCityList(e){let t={url:d+"/user/get-citys",data:{provinceID:e}};return l(t)},logout(){this.updateUserClientId("del"),uni.removeStorageSync(b),uni.removeStorageSync(x)},getFavoriteList(e){let t={url:d+"/story/collectlist",data:{action:e.type||"all",page:e.page||1,pagesize:e.limit||10}};return l(t)},thirdLogin(e){return m(this,null,function*(){let t={url:d+"/user/oauth-login",data:{openid:e.openid,type:e.type,unionid:e.unionid,nickname:e.nickname,avatar:e.avatar,mobile:e.mobile,code:e.code}},r=yield l(t);if(y.tips(r.message),r.code==204&&e.mobile==0&&e.code==0)return uni.setStorageSync("LOGIN_BIND_INFO",t.data),uni.redirectTo({url:"/pages/user/bind-mobile/index"}),!1;if(r.code!=200)return uni.removeStorageSync(b),uni.removeStorageSync(x),!1;uni.setStorageSync(b,r.data.login_token),uni.setStorageSync(x,r.data.user_info),this.updateUserClientId("add"),uni.switchTab({url:"/pages/index/index"})})},share(e){return m(this,null,function*(){if(!this.isAppExists("wechat"))return!1;let[t,r]=yield uni.showActionSheet({itemList:["\u5206\u4EAB\u7ED9\u670B\u53CB","\u5206\u4EAB\u5230\u670B\u53CB\u5708"]});if(!r)return!1;let o=yield this.getUserInfo(),i=["video","live"].includes(e.imageType)?o.base_share_host+"/app_"+e.imageType+"_"+e.id+"/?s_id="+o.id:o.base_share_host+"/kaizen/article/"+o.id+"/"+e.id+".html",a=e.title_pic1||e.share_logo,c={provider:"weixin",scene:r.tapIndex==0?"WXSceneSession":"WXSenceTimeline",type:0,href:i,title:e.title+" - KAIZEN",summary:e.short_summary,imageUrl:a};uni.setClipboardData({data:e.short_summary}),yield uni.share(c);let s={url:d+"/story/share",data:{favid:e.id,action:e.imageType}};yield l(s)})},updateUserClientId(e){let t=uni.getStorageSync("UNI_PUSH_CLIENT_ID")||"";if(t=="")return!1;let r={url:d+"/user/push-device",data:{action:e,cid:t,from:y.isIOS()?"ios":"android"}};return l(r)},updateAppBadge(){let e=uni.getStorageSync("UNI_PUSH_CLIENT_ID")||"";if(e==""||y.isAndroid())return!1;let t={url:d+"/public/delete-badge",data:{cid:e,badge:0}};return l(t)},isAppExists(e){let t={};switch(e){case"wechat":t.pname="com.tencent.mm",t.action="weixin://";break;default:t.pname="",t.action=""}return plus.runtime.isApplicationExist(t)}},U=H;var h=C(S());var v=(e,t)=>{let r=e.__vccOpts||e;for(let[o,i]of t)r[o]=i;return r};var q={nodata_template:{"":{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"}},wrap:{".nodata_template ":{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},nodataimg:{".nodata_template .wrap ":{width:"360rpx",marginBottom:"20rpx"}},text:{".nodata_template .wrap .nodatatxt ":{textAlign:"center",fontSize:"24rpx",color:"#8E8E93"}}},z={props:{oWidth:{type:[String],default:"750rpx"},oHeight:{type:[String],default:"600rpx"},oTxt:{type:[String],default:"\u6682\u65E0\u6570\u636E"}},methods:{}};function V(e,t,r,o,i,a){return(0,h.openBlock)(),(0,h.createElementBlock)("view",{class:"nodata_template",style:(0,h.normalizeStyle)({height:r.oHeight,width:r.oWidth}),renderWhole:!0},[(0,h.createElementVNode)("view",{class:"wrap"},[(0,h.createElementVNode)("u-image",{class:"nodataimg",src:"/static/nodata.png",mode:"widthFix"}),(0,h.createElementVNode)("view",{class:"nodatatxt"},[(0,h.createElementVNode)("u-text",{class:"text"},(0,h.toDisplayString)(r.oTxt),1)])])],4)}var j=v(z,[["render",V],["styles",[q]]]);var n=C(S());var W={page:{"":{flex:1,paddingTop:0,paddingRight:"32rpx",paddingBottom:0,paddingLeft:"32rpx",backgroundColor:"#ffffff"}},nodata:{"":{paddingTop:"100rpx",paddingRight:0,paddingBottom:"100rpx",paddingLeft:0,color:"#8E8E93",fontSize:"24rpx",textAlign:"center"}},nrbox:{"":{marginTop:"20rpx"}},onebox:{"":{flexDirection:"row",justifyContent:"space-between"}},onetitle:{"":{width:"388rpx",height:"150rpx"}},"one-title-text":{"":{overflow:"hidden",lines:3,textOverflow:"ellipsis",fontSize:"36rpx",color:"#333333",fontWeight:"600",lineHeight:"48rpx"}},"one-img-box":{"":{width:"226rpx",height:"150rpx",overflow:"hidden",borderRadius:"16rpx"}},"one-img":{"":{borderRadius:"16rpx",width:"226rpx",height:"150rpx"}},"bottom-box":{"":{marginTop:"20rpx",height:"33rpx",lineHeight:"33rpx",flexDirection:"row",alignItems:"center"}},"b-t-box":{"":{flexDirection:"row",alignItems:"center",height:"33rpx",marginRight:"16rpx"}},"bot-text":{"":{fontSize:"24rpx",color:"#8E8E93",marginRight:"16rpx"}},ldbox:{"":{paddingTop:"20rpx",paddingRight:0,paddingBottom:"20rpx",paddingLeft:0,textAlign:"center",flexDirection:"row",justifyContent:"center",alignItems:"flex-start"}}},G={components:{noData:j},data(){return{theList:[],pages:1,isLoading:!1,canLoad:!1,loadingText:"\u52A0\u8F7D\u4E2D..."}},onLoad(e){this.getList()},methods:{getList(){return m(this,null,function*(){if(this.canLoad)return;this.canLoad=!0;let e=yield U.getNewsHistory(this.pages,"news",20);this.pages+=1,e.code==200?e.data.length>0?(this.theList=this.theList.concat(e.data),this.canLoad=!1,this.isLoading=!1):this.loadingText="\u6CA1\u6709\u66F4\u591A\u4E86":uni.showToast({title:e.message,icon:"none",mask:!0})})},goDetail(e){uni.navigateTo({url:"/pages/news/index?id="+e+"&type=news"})},onloading(e){this.isLoading=!0,setTimeout(()=>{this.getList()},2e3)}}};function K(e,t,r,o,i,a){let c=(0,n.resolveComponent)("no-data");return(0,n.openBlock)(),(0,n.createElementBlock)("list",{class:"page",bounce:!0,loadmoreoffset:"1"},[i.theList.length<=0?((0,n.openBlock)(),(0,n.createElementBlock)("cell",{key:0},[(0,n.createVNode)(c,{oHeight:"800rpx",oWidth:"686rpx"})])):(0,n.createCommentVNode)("",!0),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(i.theList,(s,u)=>((0,n.openBlock)(),(0,n.createElementBlock)("cell",{key:u},[(0,n.createElementVNode)("view",{class:"nrbox",onClick:g=>a.goDetail(s.id)},[(0,n.createElementVNode)("view",{class:"onebox"},[(0,n.createElementVNode)("view",{class:"onetitle"},[(0,n.createElementVNode)("u-text",{class:"one-title-text"},(0,n.toDisplayString)(s.title),1)]),(0,n.createElementVNode)("view",{class:"one-img-box"},[(0,n.createElementVNode)("u-image",{class:"one-img",src:s.imgurl,fadeShow:"true"},null,8,["src"])])]),(0,n.createElementVNode)("view",{class:"bottom-box"},[(0,n.createElementVNode)("view",{class:"b-t-box"},[(0,n.createElementVNode)("u-text",{class:"bot-text"},(0,n.toDisplayString)(s.date),1)])])],8,["onClick"])]))),128)),i.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("cell",{key:1},[(0,n.createElementVNode)("view",{class:"ldbox"},[(0,n.createElementVNode)("u-text",null,(0,n.toDisplayString)(i.loadingText),1)])])):(0,n.createCommentVNode)("",!0),i.theList.length>0?((0,n.openBlock)(),(0,n.createElementBlock)("loading",{key:2,class:"loadingbox",onLoading:t[0]||(t[0]=(...s)=>a.onloading&&a.onloading(...s)),display:i.isLoading?"show":"hide"},null,40,["display"])):(0,n.createCommentVNode)("",!0)])}var w=v(G,[["render",K],["styles",[W]]]);var L=plus.webview.currentWebview();if(L){let e=parseInt(L.id),t="pages/mycenter/history",r={};try{r=JSON.parse(L.__query__)}catch(i){}w.mpType="page";let o=Vue.createPageApp(w,{$store:getApp({allowDefault:!0}).$store,__pageId:e,__pagePath:t,__pageQuery:r});o.provide("__globalStyles",Vue.useCssStyles([...__uniConfig.styles,...w.styles||[]])),o.mount("#root")}})();
