"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 U=Object.create;var A=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var B=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty;var R=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var P=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of F(t))!O.call(e,n)&&n!==r&&A(e,n,{get:()=>t[n],enumerable:!(o=N(t,n))||o.enumerable});return e};var C=(e,t,r)=>(r=e!=null?U(B(e)):{},P(t||!e||!e.__esModule?A(r,"default",{value:e,enumerable:!0}):r,e));var m=(e,t,r)=>new Promise((o,n)=>{var s=u=>{try{a(r.next(u))}catch(g){n(g)}},d=u=>{try{a(r.throw(u))}catch(g){n(g)}},a=u=>u.done?o(u.value):Promise.resolve(u.value).then(s,d);a((r=r.apply(e,t)).next())});var _=R((X,L)=>{L.exports=Vue});var J=C(_());function T(e,t,...r){uni.__log__?uni.__log__(e,t,...r):console[e].apply(console,[...r,t])}var M={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(),n=Math.floor((o-t)/1e3),s=Math.floor(n/60),d=Math.floor(s/60),a=Math.floor(d/24),u=Math.floor(a/30),g=Math.floor(u/12),p="",h=0;return g>0?(p="year",h=g):u>0?(p="month",h=u):a>0?(p="day",h=a):d>0?(p="hour",h=d):s>0?(p="minute",h=s):(p="second",h=n===0?n=1:n),r[p].replace("%n%",h)},base64Encode(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r="",o,n,s,d,a,u,g,p=0;for(e=this.utf8Encode(e);p<e.length;)o=e.charCodeAt(p++),n=e.charCodeAt(p++),s=e.charCodeAt(p++),d=o>>2,a=(o&3)<<4|n>>4,u=(n&15)<<2|s>>6,g=s&63,isNaN(n)?u=g=64:isNaN(s)&&(g=64),r=r+t.charAt(d)+t.charAt(a)+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,n=0,s=0,d=0;for(e+="";r<e.length;)n=e.charCodeAt(r),n<128?(t[o++]=String.fromCharCode(n),r++):n>191&&n<224?(s=e.charCodeAt(r+1),t[o++]=String.fromCharCode((n&31)<<6|s&63),r+=2):(s=e.charCodeAt(r+1),d=e.charCodeAt(r+2),t[o++]=String.fromCharCode((n&15)<<12|(s&63)<<6|d&63),r+=3);return t.join("")},base64Decode(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r,o,n,s,d,a,u,g,p=0,h=0,D="",w=[];if(!e)return e;for(e+="";p<e.length;)s=t.indexOf(e.charAt(p++)),d=t.indexOf(e.charAt(p++)),a=t.indexOf(e.charAt(p++)),u=t.indexOf(e.charAt(p++)),g=s<<18|d<<12|a<<6|u,r=g>>16&255,o=g>>8&255,n=g&255,a==64?w[h++]=String.fromCharCode(r):u==64?w[h++]=String.fromCharCode(r,o):w[h++]=String.fromCharCode(r,o,n);return D=w.join(""),this.utf8Decode(D)},hasNotchInScreen(){return plus.navigator.hasNotchInScreen()}},y=M,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,n)=>{uni.request({url:e.url,method:e.method||"POST",data:e.data||{},header:t,timeout:5e3,success:s=>{I&&T("log","at utils/request.js:48",s),o(s.data)},fail:s=>{I&&T("log","at utils/request.js:52",s),n(s)},complete:s=>{e.loading&&uni.hideLoading()}})})}l.baseURL="https://newapp.cheshi.com";var v="USER_TOKEN",x="USER_INFO",c=l.baseURL+"/v1",z={baseURL:c,STORAGE_USER_KEY:x,isLogin(){return!!(uni.getStorageSync(v)&&uni.getStorageSync(x))},login(){return uni.navigateTo({url:"/pages/login/index"}),!1},bindThird(e){let t={url:c+"/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:c+"/person/user-info"};return(yield l(t)).data})},getCode(e,t,r,o){let n={url:c+"/user/get-code",data:{device_id:e,mobile:t,token:r,type:o}};return l(n)},fastLogin(e,t){let r={url:c+"/user/fast-login",data:{mobile:e,code:t}};return l(r)},logOff(){let e={url:c+"/person/log-off"};return l(e)},oAuthLogin(e,t,r,o,n,s,d){let a={url:c+"/user/oauth-login",data:{openid:e,type:t,unionid:r,nickname:o,user_img:n,mobile:s,code:d}};return l(a)},updateUserInfo(e,t){let r={url:c+"/person/update-user-info",data:{key:e,value:t}};return l(r)},bindMobile(e,t){let r={url:c+"/user/bind-mobile",data:{mobile:e,code:t}};return l(r)},getNewsHistory(e,t="news",r=10){let o={url:c+"/person/my-history",data:{type:t,page:e,limit:r},method:"POST"};return l(o)},getFocus(e,t=10){let r={url:c+"/person/my-focus",data:{page:e,limit:t},method:"POST"};return l(r)},addFocus(e){let t={url:c+"/person/add-focus",data:{to_uid:e},method:"post"};return l(t)},delFocus(e){let t={url:c+"/person/del-focus",data:{to_uid:e},method:"post"};return l(t)},getMyLikes(e){let t={url:c+"/collect/list",data:{type:e.type,page:e.page,limit:e.limit||30},method:"post"};return l(t)},getProvinceList(){let e={url:c+"/user/get-provinces"};return l(e)},getCityList(e){let t={url:c+"/user/get-citys",data:{provinceID:e}};return l(t)},logout(){this.updateUserClientId("del"),uni.removeStorageSync(v),uni.removeStorageSync(x)},getFavoriteList(e){let t={url:c+"/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:c+"/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(v),uni.removeStorageSync(x),!1;uni.setStorageSync(v,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(),n=["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",s=e.title_pic1||e.share_logo,d={provider:"weixin",scene:r.tapIndex==0?"WXSceneSession":"WXSenceTimeline",type:0,href:n,title:e.title+" - KAIZEN",summary:e.short_summary,imageUrl:s};uni.setClipboardData({data:e.short_summary}),yield uni.share(d);let a={url:c+"/story/share",data:{favid:e.id,action:e.imageType}};yield l(a)})},updateUserClientId(e){let t=uni.getStorageSync("UNI_PUSH_CLIENT_ID")||"";if(t=="")return!1;let r={url:c+"/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:c+"/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)}},k=z;var f=C(_());var b=(e,t)=>{let r=e.__vccOpts||e;for(let[o,n]of t)r[o]=n;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"}}},H={props:{oWidth:{type:[String],default:"750rpx"},oHeight:{type:[String],default:"600rpx"},oTxt:{type:[String],default:"\u6682\u65E0\u6570\u636E"}},methods:{}};function W(e,t,r,o,n,s){return(0,f.openBlock)(),(0,f.createElementBlock)("view",{class:"nodata_template",style:(0,f.normalizeStyle)({height:r.oHeight,width:r.oWidth}),renderWhole:!0},[(0,f.createElementVNode)("view",{class:"wrap"},[(0,f.createElementVNode)("u-image",{class:"nodataimg",src:"/static/nodata.png",mode:"widthFix"}),(0,f.createElementVNode)("view",{class:"nodatatxt"},[(0,f.createElementVNode)("u-text",{class:"text"},(0,f.toDisplayString)(r.oTxt),1)])])],4)}var j=b(H,[["render",W],["styles",[q]]]);var i=C(_());var V={"page-news":{"":{flex:1,flexDirection:"column",position:"absolute",left:0,top:0,right:0,bottom:0}},listview:{"":{position:"absolute",left:0,top:0,right:0,bottom:0}},infobox:{"":{marginTop:"30rpx",marginRight:0,marginBottom:"30rpx",marginLeft:0,flexDirection:"row",alignItems:"center",justifyContent:"space-between"}},"info-left":{"":{justifyContent:"center"}},carname:{"":{width:"426rpx",fontSize:"36rpx",fontWeight:"600",color:"#333333",lineHeight:"50rpx",marginBottom:"10rpx"}},pricebox:{"":{flexDirection:"row",height:"33rpx",alignItems:"center"}},normal:{"":{lineHeight:"33rpx",fontSize:"20rpx",color:"#c7c7cc",marginRight:"10rpx"}},price:{"":{fontSize:"24rpx",fontWeight:"600",color:"#ff0005"}},"info-right":{"":{width:"240rpx",height:"160rpx"}},carimg:{"":{width:"240rpx",height:"160rpx"}},newstitle:{"":{width:"430rpx",lines:2,textOverflow:"ellipsis",fontSize:"36rpx",fontWeight:"600",color:"#333333",lineHeight:"50rpx",marginBottom:"8rpx"}},newsdate:{"":{lineHeight:"33rpx",fontSize:"24rpx",color:"#8E8E93"}},"news-right":{"":{width:"226rpx",height:"150rpx",borderRadius:"16rpx",overflow:"hidden"}},newsimg:{"":{width:"226rpx",height:"150rpx",borderRadius:"16rpx"}},"video-right":{"":{width:"226rpx",height:"142rpx",alignItems:"center",justifyContent:"center"}},"video-img":{"":{width:"226rpx",height:"142rpx",position:"absolute",top:0,left:0,borderRadius:"16rpx"}},bf:{"":{width:"50rpx",height:"50rpx"}},nodata:{"":{paddingTop:"100rpx",paddingRight:0,paddingBottom:"100rpx",paddingLeft:0,color:"#8E8E93",fontSize:"24rpx",textAlign:"center"}},ldbox:{"":{paddingTop:"20rpx",paddingRight:0,paddingBottom:"20rpx",paddingLeft:0,textAlign:"center",flexDirection:"row",justifyContent:"center",alignItems:"flex-start"}}},G={components:{noData:j},props:{ntype:{type:[String],default:""}},data(){return{dataList:[],canLoad:!1,isLoading:!1,page:1,loadingText:"\u52A0\u8F7D\u4E2D..."}},created(){this.pullTimer=null,this.requestParams={type:this.ntype,page:this.page,limit:30}},methods:{loadDate(){return m(this,null,function*(){if(this.canLoad)return;this.canLoad=!0;let e=yield k.getMyLikes(this.requestParams);e.code==200?(e.data.length>0?(this.dataList=this.dataList.concat(e.data),this.canLoad=!1,this.isLoading=!1):this.loadingText="\u6CA1\u6709\u66F4\u591A\u4E86",this.page+=1):uni.showToast({title:e.message,icon:"none",mask:!0})})},onloading(){this.isLoading=!0,setTimeout(()=>{this.loadDate()},2e3)},goDetail(e){e.type=="bseries"&&uni.navigateTo({url:"/pages/bseries/index?id="+e.eid}),e.type=="model"&&uni.navigateTo({url:"/pages/bseries/model?id="+e.eid}),e.type=="news"&&uni.navigateTo({url:"/pages/news/index?id="+e.eid+"&type=news"}),e.type=="video"&&uni.navigateTo({url:"/pages/video/index?id="+e.eid+"&type=video"})}}};function K(e,t,r,o,n,s){let d=(0,i.resolveComponent)("no-data");return(0,i.openBlock)(),(0,i.createElementBlock)("scroll-view",{scrollY:!0,showScrollbar:!0,enableBackToTop:!0,bubble:"true",style:{flexDirection:"column"}},[(0,i.createElementVNode)("view",{class:"page-news"},[(0,i.createElementVNode)("list",{ref:"list",class:"listview",bounce:!0,loadmoreoffset:"1"},[n.dataList.length>0&&!n.isLoading?((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,{key:0},(0,i.renderList)(n.dataList,(a,u)=>((0,i.openBlock)(),(0,i.createElementBlock)("cell",{key:u,onClick:g=>s.goDetail(a)},[r.ntype=="bseries"?((0,i.openBlock)(),(0,i.createElementBlock)("view",{key:0,class:"infobox"},[(0,i.createElementVNode)("view",{class:"info-left"},[(0,i.createElementVNode)("u-text",{class:"carname"},(0,i.toDisplayString)(a.info.name),1),(0,i.createElementVNode)("view",{class:"pricebox"},[(0,i.createElementVNode)("u-text",{class:"normal"},"\u6307\u5BFC\u4EF7"),(0,i.createElementVNode)("u-text",{class:"price"},(0,i.toDisplayString)((a.info.minmsrp/1e4).toFixed(2))+" - "+(0,i.toDisplayString)((a.info.maxmsrp/1e4).toFixed(2))+"\u4E07",1)])]),(0,i.createElementVNode)("view",{class:"info-right"},[(0,i.createElementVNode)("u-image",{class:"carimg",src:a.info.pic,mode:""},null,8,["src"])])])):(0,i.createCommentVNode)("",!0),r.ntype=="model"?((0,i.openBlock)(),(0,i.createElementBlock)("view",{key:1,class:"infobox"},[(0,i.createElementVNode)("view",{class:"info-left"},[(0,i.createElementVNode)("u-text",{class:"carname"},(0,i.toDisplayString)(a.info.name),1),(0,i.createElementVNode)("view",{class:"pricebox"},[(0,i.createElementVNode)("u-text",{class:"normal"},"\u6307\u5BFC\u4EF7"),(0,i.createElementVNode)("u-text",{class:"price"},(0,i.toDisplayString)((a.info.minprice/1e4).toFixed(2))+" - "+(0,i.toDisplayString)((a.info.maxprice/1e4).toFixed(2))+"\u4E07",1)])]),(0,i.createElementVNode)("view",{class:"info-right"},[(0,i.createElementVNode)("u-image",{class:"carimg",src:a.info.imgurl,mode:""},null,8,["src"])])])):(0,i.createCommentVNode)("",!0),r.ntype=="news"?((0,i.openBlock)(),(0,i.createElementBlock)("view",{key:2,class:"infobox"},[(0,i.createElementVNode)("view",{class:"info-left"},[(0,i.createElementVNode)("u-text",{class:"newstitle"},(0,i.toDisplayString)(a.info.title),1),(0,i.createElementVNode)("u-text",{class:"newsdate"},(0,i.toDisplayString)(a.info.modi_date),1)]),(0,i.createElementVNode)("view",{class:"news-right"},[(0,i.createElementVNode)("u-image",{class:"newsimg",src:a.info.title_pic1,mode:""},null,8,["src"])])])):(0,i.createCommentVNode)("",!0),r.ntype=="video"?((0,i.openBlock)(),(0,i.createElementBlock)("view",{key:3,class:"infobox"},[(0,i.createElementVNode)("view",{class:"info-left"},[(0,i.createElementVNode)("u-text",{class:"newstitle"},(0,i.toDisplayString)(a.info.title),1),(0,i.createElementVNode)("u-text",{class:"newsdate"},(0,i.toDisplayString)(a.info.modi_date),1)]),(0,i.createElementVNode)("view",{class:"video-right"},[(0,i.createElementVNode)("u-image",{class:"video-img",src:a.info.title_pic1,mode:""},null,8,["src"]),(0,i.createElementVNode)("u-image",{class:"bf",src:"/static/bf.png",mode:""})])])):(0,i.createCommentVNode)("",!0)],8,["onClick"]))),128)):n.isLoading?(0,i.createCommentVNode)("",!0):((0,i.openBlock)(),(0,i.createElementBlock)("cell",{key:1},[(0,i.createVNode)(d,{oHeight:"800rpx",oWidth:"686rpx"})])),n.isLoading?((0,i.openBlock)(),(0,i.createElementBlock)("cell",{key:2},[(0,i.createElementVNode)("view",{class:"ldbox"},[(0,i.createElementVNode)("u-text",null,(0,i.toDisplayString)(n.loadingText),1)])])):(0,i.createCommentVNode)("",!0),n.dataList.length>20?((0,i.openBlock)(),(0,i.createElementBlock)("loading",{key:3,class:"loadingbox",onLoading:t[0]||(t[0]=(...a)=>s.onloading&&s.onloading(...a)),display:n.isLoading?"show":"hide"},null,40,["display"])):(0,i.createCommentVNode)("",!0)],512)])])}var S=b(G,[["render",K],["styles",[V]]]);var E=plus.webview.currentWebview();if(E){let e=parseInt(E.id),t="pages/mycenter/collect-page",r={};try{r=JSON.parse(E.__query__)}catch(n){}S.mpType="page";let o=Vue.createPageApp(S,{$store:getApp({allowDefault:!0}).$store,__pageId:e,__pagePath:t,__pageQuery:r});o.provide("__globalStyles",Vue.useCssStyles([...__uniConfig.styles,...S.styles||[]])),o.mount("#root")}})();
