"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 F=Object.create;var w=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty;var z=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var E=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of k(e))!D.call(t,o)&&o!==r&&w(t,o,{get:()=>e[o],enumerable:!(n=b(e,o))||n.enumerable});return t};var L=(t,e,r)=>(r=t!=null?F(A(t)):{},E(e||!t||!t.__esModule?w(r,"default",{value:t,enumerable:!0}):r,t));var g=(t,e,r)=>new Promise((n,o)=>{var i=c=>{try{l(r.next(c))}catch(u){o(u)}},a=c=>{try{l(r.throw(c))}catch(u){o(u)}},l=c=>c.done?n(c.value):Promise.resolve(c.value).then(i,a);l((r=r.apply(t,e)).next())});var x=z((U,C)=>{C.exports=Vue});var H=L(x());function f(t,e,...r){uni.__log__?uni.__log__(t,e,...r):console[t].apply(console,[...r,e])}var B={tips(t,e=2e3,r="bottom"){plus.nativeUI.toast(t,{type:"text",duration:e,align:"center",verticalAlign:r})},isIOS(){return uni.getSystemInfoSync().platform==="ios"},isAndroid(){return uni.getSystemInfoSync().platform==="android"},getUUID(){return g(this,null,function*(){return new Promise((t,e)=>{plus.device.getInfo({success:r=>{t(r.uuid)},fail:r=>{e(r)}})})})},timeToTimestamp(t){return new Date(t.replace(/-/g,"/"))},friendlyDate(t){let e=this.timeToTimestamp(t);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"},n=Date.now(),o=Math.floor((n-e)/1e3),i=Math.floor(o/60),a=Math.floor(i/60),l=Math.floor(a/24),c=Math.floor(l/30),u=Math.floor(c/12),h="",p=0;return u>0?(h="year",p=u):c>0?(h="month",p=c):l>0?(h="day",p=l):a>0?(h="hour",p=a):i>0?(h="minute",p=i):(h="second",p=o===0?o=1:o),r[h].replace("%n%",p)},base64Encode(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r="",n,o,i,a,l,c,u,h=0;for(t=this.utf8Encode(t);h<t.length;)n=t.charCodeAt(h++),o=t.charCodeAt(h++),i=t.charCodeAt(h++),a=n>>2,l=(n&3)<<4|o>>4,c=(o&15)<<2|i>>6,u=i&63,isNaN(o)?c=u=64:isNaN(i)&&(u=64),r=r+e.charAt(a)+e.charAt(l)+e.charAt(c)+e.charAt(u);return r},utf8Encode(t){t=t.replace(/\r\n/g,`
`);for(var e="",r=0;r<t.length;r++){var n=t.charCodeAt(r);n<128?e+=String.fromCharCode(n):n>127&&n<2048?(e+=String.fromCharCode(n>>6|192),e+=String.fromCharCode(n&63|128)):(e+=String.fromCharCode(n>>12|224),e+=String.fromCharCode(n>>6&63|128),e+=String.fromCharCode(n&63|128))}return e},utf8Decode(t){var e=[],r=0,n=0,o=0,i=0,a=0;for(t+="";r<t.length;)o=t.charCodeAt(r),o<128?(e[n++]=String.fromCharCode(o),r++):o>191&&o<224?(i=t.charCodeAt(r+1),e[n++]=String.fromCharCode((o&31)<<6|i&63),r+=2):(i=t.charCodeAt(r+1),a=t.charCodeAt(r+2),e[n++]=String.fromCharCode((o&15)<<12|(i&63)<<6|a&63),r+=3);return e.join("")},base64Decode(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r,n,o,i,a,l,c,u,h=0,p=0,S="",d=[];if(!t)return t;for(t+="";h<t.length;)i=e.indexOf(t.charAt(h++)),a=e.indexOf(t.charAt(h++)),l=e.indexOf(t.charAt(h++)),c=e.indexOf(t.charAt(h++)),u=i<<18|a<<12|l<<6|c,r=u>>16&255,n=u>>8&255,o=u&255,l==64?d[p++]=String.fromCharCode(r):c==64?d[p++]=String.fromCharCode(r,n):d[p++]=String.fromCharCode(r,n,o);return S=d.join(""),this.utf8Decode(S)},hasNotchInScreen(){return plus.navigator.hasNotchInScreen()}},N=B,I=!1;function m(t){uni.getNetworkType({success:function(n){if(n.networkType=="none")return N.tips("\u8BF7\u68C0\u6D4B\u7F51\u7EDC\u8FDE\u63A5"),!1}}),t.loading&&uni.showLoading({title:"\u52A0\u8F7D\u4E2D...",mask:!0,icon:"none"});let e={};var r=uni.getStorageSync("USER_TOKEN");return e.Authorization=r,e["Content-Type"]="application/x-www-form-urlencoded",new Promise((n,o)=>{uni.request({url:t.url,method:t.method||"POST",data:t.data||{},header:e,timeout:5e3,success:i=>{I&&f("log","at utils/request.js:48",i),n(i.data)},fail:i=>{I&&f("log","at utils/request.js:52",i),o(i)},complete:i=>{t.loading&&uni.hideLoading()}})})}m.baseURL="https://newapp.cheshi.com";var s=L(x());var _=(t,e)=>{let r=t.__vccOpts||t;for(let[n,o]of e)r[n]=o;return r};var T={content:{"":{flex:1,backgroundColor:"#000000"}},nav:{"":{width:"750rpx",height:"88rpx",backgroundColor:"#000000",paddingTop:0,paddingRight:"32rpx",paddingBottom:0,paddingLeft:"32rpx",flexDirection:"row",justifyContent:"center",alignItems:"center",position:"relative",marginBottom:"40rpx"}},goback:{"":{width:"40rpx",height:"80rpx",alignItems:"center",justifyContent:"center",position:"absolute",top:0,left:"32rpx"}},backicon:{"":{fontFamily:"uniicons",fontWeight:"600",fontSize:"40rpx",lineHeight:"80rpx",color:"#ffffff"}},"nav-item":{"":{color:"#ffffff"}},scrollview:{"":{flexDirection:"row",alignItems:"center",height:"68rpx",width:"750rpx"}},tab:{"":{alignItems:"center",height:"68rpx",justifyContent:"space-between",marginLeft:"50rpx"}},item:{"":{color:"#FFFFFF",fontSize:"36rpx",lineHeight:"50rpx",textAlign:"center"}},active:{"":{fontSize:"48rpx",fontWeight:"600"}},line:{"":{width:"24rpx",height:"8rpx",backgroundColor:"#FF0005",borderRadius:4}},"pic-list":{"":{width:"750rpx",height:"563rpx",marginTop:"200rpx"}},"pic-item":{"":{width:"750rpx",height:"563rpx"}},pic:{"":{height:"563rpx",width:"750rpx"}},bottom:{"":{paddingTop:0,paddingRight:"32rpx",paddingBottom:0,paddingLeft:"32rpx",position:"fixed",left:0,bottom:0,width:"750rpx"}},title:{"":{fontSize:"36rpx",lineHeight:"50rpx",fontWeight:"600",color:"#FFFFFF"}},info:{"":{flexDirection:"row",marginTop:"20rpx",alignItems:"center"}},text:{"":{fontSize:"28rpx",lineHeight:"40rpx",color:"#FFFFFF"}},price:{"":{fontSize:"28rpx",lineHeight:"40rpx",color:"#FF0005",marginLeft:"12rpx",fontWeight:"600"}},button:{"":{marginTop:"60rpx",marginRight:0,marginBottom:"50rpx",marginLeft:0,width:"686rpx",height:"88rpx",backgroundColor:"#FF0005",borderRadius:"44rpx",fontSize:"36rpx",lineHeight:"88rpx",color:"#FFFFFF",textAlign:"center"}}},M=weex.requireModule("dom");M.addRule("fontFace",{fontFamily:"uniicons",src:"url('/static/uni.ttf')"});var q={data(){return{iStatusBarHeight:0,LinkUrl:m.baseURL,current:0,currentSort:0,count:0,price:"",navList:[],picList:[],currentModelName:"",categoryId:0,page:1,pageSize:10,colorid:"",seriesId:0,modelId:0}},onLoad(t){this.seriesId=t.seriesId,this.currentSort=t.sort||1,this.modelId=t.modelId||0,this.categoryId=t.categoryId||1,this.colorid=t.colorid||"",this.current=0},mounted(){return g(this,null,function*(){let t=uni.getSystemInfoSync();this.iStatusBarHeight=t.statusBarHeight;let e=this.currentSort>0?Math.ceil(this.currentSort/this.pageSize):1;yield this.getList(e,this.ategoryId,!0)})},methods:{getList(t=0,e=0,r=!1,n=!1){return g(this,null,function*(){t=t>0?t:this.page,e=e>0?e:this.categoryId;let i=(yield m({url:this.LinkUrl+"/v1/product/photo-cate-list?bseries_id="+this.seriesId+"&prdid="+this.modelId+"&picclassid="+e+"&page="+t+"&pagesize="+this.pageSize+"&colorid="+this.colorid,method:"GET"})).data;if(i.piclist.length>0&&(this.picList=n?i.piclist.concat(this.picList):this.picList.concat(i.piclist)),t==1&&this.currentSort==1&&r&&(this.picList=i.piclist),n||r){for(let a=0;a<this.picList.length;a++)if(this.picList[a].pic_sort==this.currentSort&&this.categoryId==this.picList[a].picclassid){this.current=a;break}}r&&(this.page=t,this.count=i.catecount,this.price=i.bseriseinfo.msrp,this.navList=i.categorylist,this.currentModelName=i.piclist[0].full_name),this.pageSize=10})},changeSwiper(t){return g(this,null,function*(){let e=t.detail.current,r=e,n=this.current;this.current=e;let o=this.picList[e];this.currentModelName=o.full_name,this.currentSort=o.pic_sort,this.categoryId=o.picclassid;for(let i=0;i<this.navList.length;i++)if(this.navList[i].id==this.categoryId){this.count=this.navList[i].count;break}if(r<0)return!1;if(this.currentSort==1&&this.picList.length<=this.pageSize&&this.navList.map(i=>i.id).indexOf(this.categoryId)>0){for(let i=0;i<this.navList.length;i++)if(this.navList[i].id==this.categoryId&&this.navList[i-1]){let a=Math.ceil(this.navList[i-1].count/this.pageSize);yield this.getList(a,this.navList[i-1].id,!1,!0);break}return!1}if(r>=this.picList.length-1){if(this.currentSort<this.count){let i=Math.ceil(this.currentSort/this.pageSize)+1;return yield this.getList(i,this.categoryId),!1}for(let i=0;i<this.navList.length;i++)if(this.navList[i].id==this.categoryId&&this.navList[i+1]){let a=this.navList[i+1].id;return yield this.getList(1,a),!1}}if(r<=1&&r==n-1){let i=this.page,a=this.categoryId;if(this.navList[0].id==this.categoryId)return r<this.currentSort-1&&this.currentSort<=10?(this.pageSize=this.currentSort-1,i=1):i=i-1,yield this.getList(i,a,!0,!0),!1;if(this.currentSort>this.pageSize){for(let l=0;l<this.navList.length;l++)this.categoryId==this.navList[l].id&&(i=Math.ceil(this.currentSort/this.pageSize)-1);return yield this.getList(i,a,!1,!0),!1}for(let l=0;l<this.navList.length;l++)if(this.navList[l].id==this.categoryId&&this.navList[l-1]){a=this.navList[l-1].id,i=Math.ceil(this.navList[l-1].count/this.pageSize);break}yield this.getList(i,a,!1,!0)}})},changeCategory(t){if(this.categoryId==t)return!1;this.categoryId=t,this.currentSort=1,this.getList(1,this.categoryId,!0)},goBack(){uni.navigateBack()},goInquiry(t,e){try{let r={bseriesId:this.seriesId,modelId:this.modelId};uni.navigateTo({url:"/pages/inquiry/index?detail="+encodeURIComponent(JSON.stringify(r))})}catch(r){f("log","at pages/picture/pic-info.nvue:241",r)}}}};function R(t,e,r,n,o,i){let a=(0,s.resolveComponent)("swiper-item"),l=(0,s.resolveComponent)("swiper");return(0,s.openBlock)(),(0,s.createElementBlock)("view",{class:"content"},[(0,s.createElementVNode)("view",{class:"gnt",style:(0,s.normalizeStyle)({height:o.iStatusBarHeight+"px"})},null,4),(0,s.createElementVNode)("view",{class:"nav"},[(0,s.createElementVNode)("view",{class:"goback",onClick:e[0]||(e[0]=c=>i.goBack())},[(0,s.createElementVNode)("u-text",{class:"backicon"},"\uE582")]),(0,s.createElementVNode)("u-text",{class:"nav-item"},(0,s.toDisplayString)(o.currentSort+"/"+o.count),1)]),(0,s.createElementVNode)("scroll-view",{class:"scrollview",scroll:!1,showScrollbar:!1,scrollX:"true"},[((0,s.openBlock)(!0),(0,s.createElementBlock)(s.Fragment,null,(0,s.renderList)(o.navList,c=>((0,s.openBlock)(),(0,s.createElementBlock)("view",{class:"tab"},[(0,s.createElementVNode)("u-text",{class:(0,s.normalizeClass)(o.categoryId==c.id?"item active":"item"),onClick:u=>i.changeCategory(c.id)},(0,s.toDisplayString)(c.name),11,["onClick"]),o.categoryId==c.id?((0,s.openBlock)(),(0,s.createElementBlock)("view",{key:0,class:"line"})):(0,s.createCommentVNode)("",!0)]))),256))]),(0,s.createVNode)(l,{class:"pic-list",current:o.current,"indicator-dots":!1,duration:"1000",onChange:i.changeSwiper,"disable-programmatic-animation":"true","skip-hidden-item-layout":"true"},{default:(0,s.withCtx)(()=>[((0,s.openBlock)(!0),(0,s.createElementBlock)(s.Fragment,null,(0,s.renderList)(o.picList,c=>((0,s.openBlock)(),(0,s.createBlock)(a,{class:"pic-item"},{default:(0,s.withCtx)(()=>[(0,s.createElementVNode)("u-image",{class:"pic",src:c.imgurl,mode:"aspectFill"},null,8,["src"])]),_:2},1024))),256))]),_:1},8,["current","onChange"]),(0,s.createElementVNode)("view",{class:"bottom"},[(0,s.createElementVNode)("u-text",{class:"title"},(0,s.toDisplayString)(o.currentModelName),1),(0,s.createElementVNode)("view",{class:"info"},[(0,s.createElementVNode)("u-text",{class:"text"},"\u6307\u5BFC\u4EF7"),(0,s.createElementVNode)("u-text",{class:"price"},(0,s.toDisplayString)(o.price),1)]),(0,s.createElementVNode)("u-text",{class:"button",onClick:e[1]||(e[1]=(...c)=>i.goInquiry&&i.goInquiry(...c))},"\u8BE2\u5E95\u4EF7")])])}var v=_(q,[["render",R],["styles",[T]]]);var y=plus.webview.currentWebview();if(y){let t=parseInt(y.id),e="pages/picture/pic-info",r={};try{r=JSON.parse(y.__query__)}catch(o){}v.mpType="page";let n=Vue.createPageApp(v,{$store:getApp({allowDefault:!0}).$store,__pageId:t,__pagePath:e,__pageQuery:r});n.provide("__globalStyles",Vue.useCssStyles([...__uniConfig.styles,...v.styles||[]])),n.mount("#root")}})();
