vaneditor
Version:
``` 移动端ui框架统一用uView,css扩展语言用scss,全局数据管理vuex,统一样式主体风格颜色定义/src/uni.scss ```
1 lines • 9.03 kB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-specialty-list"],{"0b90":function(t,e,a){"use strict";var i=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("8e6e"),a("ac6a"),a("456d"),a("386d");var n=i(a("bd86"));a("28a5");var s=i(a("588f")),r=i(a("f0ab")),o=i(a("09c2")),c=i(a("1427"));function l(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function f(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?l(a,!0).forEach((function(e){(0,n.default)(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):l(a).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var d={data:function(){return{defaultSelect:"类型",selectList:[],columnsForSort:["销量从高到低","价格从高到低","价格从低到高"],header:"",noImg:a("ee95"),headerJumpUrl:"",list:[],dataList:{dataList1:[],dataList2:[]},name:"",end:!1,page:{pageSize:10,currentPage:1,count:0,loading:!1},form:{type:0,specialtyName:"",specialtyCode:""},menu:[{title:"特产类型",detailList:[]},{title:"特产排序",detailList:[{name:"销量从高到低",code:1},{name:"价格从高到低",code:2},{name:"价格从低到高",code:3},{name:"评分从高到低",code:5}]}]}},components:{uniIcon:r.default,uniLoadMore:o.default,search:c.default},onReady:function(){this.$wxShare("","金华本地旅游生活体验,新鲜好玩,惊喜不断!",window.location.hash.split("#")[1])},onLoad:function(){this.getList(),this.getLabelList()},onPullDownRefresh:function(){this.dataList.dataList1=[],this.dataList.dataList2=[],this.page.currentPage=1,this.getList("refresh")},onReachBottom:function(){this.dataList.dataList1.length+this.dataList.dataList2.length<this.count&&this.getList()},filters:{subLength:function(t,e){return s.default._subLength(t,e)}},methods:{mountMenu:function(t){var e=this,a=e.list,i=t||0,n=uni.createSelectorQuery().in(this);n.selectAll(".specialty").boundingClientRect((function(t){if(a.length>i){var n=t[0].height,s=t[1].height;n<=s?e.dataList["dataList1"].push(e.list[i]):e.dataList["dataList2"].push(e.list[i]),e.$nextTick((function(){e.mountMenu(i+1)}))}})).exec()},getList:function(t){var e=this;e.page.loading=!0,this.$ajax({method:"post",url:"/weChat/specialtyProduct/queryPage",data:f({},e.form,{currentPage:e.page.currentPage,pageSize:e.page.pageSize})}).then((function(a){a.data&&(e.list=a.data,e.list=e.list.map((function(t){return f({},t,{specialtyCodeNames:t.specialtyCodeName.split(",")})})),e.count=a.count,e.list.length+e.dataList.dataList1.length+e.dataList.dataList2.length>=e.count&&(e.end=!0),e.page.currentPage+=1,"refresh"===t&&uni.stopPullDownRefresh(),e.$nextTick((function(){e.mountMenu()}))),e.page.loading=!1}))},search:function(){this.dataList.dataList1=[],this.dataList.dataList2=[],this.page.currentPage=1,this.getList()},nameInput:function(t){this.form.specialtyName=t.target.value},confirm:function(t){0===t.index?this.form.specialtyCode=t.code||"":1===t.index&&(this.form.type=t.code||""),this.search()},reset:function(t){0===t?this.form.specialtyCode="":1===t&&(this.form.type=0),this.search()},getLabelList:function(){var t=this;this.$ajax({method:"post",url:"/weChat/specialtyProduct/querySpecialtyTypeList",data:{}}).then((function(e){t.menu[0].detailList=e.data.specialtyTypeInfos}))}}};e.default=d},"22ba":function(t,e,a){"use strict";a.r(e);var i=a("0b90"),n=a.n(i);for(var s in i)"default"!==s&&function(t){a.d(e,t,(function(){return i[t]}))}(s);e["default"]=n.a},"3d69":function(t,e,a){"use strict";var i=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=i(a("7618"));function s(t){if(null===t||void 0===t)return!0;if("number"===typeof t)return 0===t||isNaN(t);if(Array.isArray(t)||"string"===typeof t||"function"===typeof t.splice)return!t.length;if("object"===(0,n.default)(t))for(var e in t)if(hasOwnProperty.call(t,e))return!1;return!0}},"419a":function(t,e,a){var i=a("6f92");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=a("4f06").default;n("010474b6",i,!0,{sourceMap:!1,shadowMode:!1})},"588f":function(t,e,a){"use strict";var i=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(a("3d69")),s=i(a("d3ed")),r={_isEmpty:n.default,_subLength:s.default};e.default=r},6815:function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"specialtyContain"},[a("search",{staticClass:"searchFiex",attrs:{name:t.name,isFixed:!0,menu:t.menu},on:{search:function(e){e=t.$handleEvent(e),t.search(e)},nameInput:function(e){e=t.$handleEvent(e),t.nameInput(e)},confirm:function(e){e=t.$handleEvent(e),t.confirm(e)},reset:function(e){e=t.$handleEvent(e),t.reset(e)}}}),a("div",{staticStyle:{overflow:"hidden",background:"#fff","padding-left":"20upx"}},t._l(t.dataList,(function(e,i,n){return a("ul",{key:n,staticClass:"specialty"},t._l(e,(function(e){return a("li",{key:e.id},[a("v-uni-navigator",{attrs:{url:"/pages/specialty/order?id="+e.storeProductId}},[a("v-uni-image",{staticClass:"imgBox",attrs:{src:t.$getImg(e.coverImage)||t.noImg,mode:"aspectFill"}}),a("div",{staticClass:"divBox"},[a("p",[t._v(t._s(e.specialtyName))]),e.specialtyCodeName?a("p",{staticClass:"specialtyType"},t._l(e.specialtyCodeNames,(function(e,i){return a("span",{key:i},[t._v(t._s(e))])})),0):t._e(),a("p",{staticClass:"price"},[e.referencePrice&&e.referencePrice>=0?a("span",{staticClass:"discount"},[a("span",{staticClass:"icon"},[t._v("¥")]),t._v(t._s(e.referencePrice||0)),a("span",{staticClass:"qi"},[t._v("起")])]):t._e(),e.virtualSale>1e3?a("span",{staticClass:"real"},[t._v("销量1000+")]):a("span",{staticClass:"real"},[t._v("销量"+t._s(e.virtualSale))])])])],1)],1)})),0)})),0),t.end&&!t.page.loading?a("p",{staticClass:"end"},[t._v("没有更多...")]):t._e(),t.page.loading?a("uni-load-more",{ref:"loadMore",attrs:{status:"loading"}}):t._e(),a("scroll-top")],1)},n=[];a.d(e,"a",(function(){return i})),a.d(e,"b",(function(){return n}))},"6f92":function(t,e,a){e=t.exports=a("2350")(!1),e.push([t.i,".specialtyContain[data-v-14c896ff]{padding-bottom:%?40?%;min-height:%?1334?%}.specialtyContain .end[data-v-14c896ff]{margin-top:%?20?%;text-align:center;font-size:%?28?%}.selectionBlock[data-v-14c896ff]{height:40px;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-around;justify-content:space-around;background:#fff;font-size:12px;border-bottom:1px solid #e4e4e4}.selectionBlock .icon[data-v-14c896ff]{width:%?20?%;height:%?14?%;margin-left:%?10?%}.head[data-v-14c896ff]{width:100%;height:%?350?%;background-size:%?750?% %?350?%}.specialty[data-v-14c896ff]{float:left;width:%?356?%;background:#fff;margin-bottom:%?20?%;padding-bottom:%?20?%}.specialty li[data-v-14c896ff]{width:%?336?%;margin:%?30?% %?10?% 0;margin-top:%?30?%;padding-bottom:%?18?%;background-color:#fff;border-radius:%?6?%;position:relative;float:left;box-shadow:0 0 %?20?% rgba(0,0,0,.1)}.specialty li .imgBox[data-v-14c896ff]{width:100%;height:%?224?%;border-radius:%?6?% %?6?% 0 0;background-size:cover;background-position:top;background-repeat:no-repeat;overflow:hidden}.specialty li p[data-v-14c896ff]{font-size:%?28?%;color:#333;margin-top:%?20?%;line-height:%?38?%;font-weight:600;padding-left:%?22?%;padding-right:%?10?%}.specialty li .divBox .specialtyType span[data-v-14c896ff]{display:inline-block;padding:0 %?10?%;margin-right:%?16?%;margin-top:%?6?%;color:#ff740b;border:1px solid #ff740b;border-radius:%?4?%;font-size:%?20?%}.specialty li .price[data-v-14c896ff]{margin-top:%?32?%}.specialty li .price .real[data-v-14c896ff]{font-size:%?20?%!important}.specialty li .price .discount[data-v-14c896ff]{font-size:%?28?%;margin-right:%?10?%;color:#fc4747;font-weight:400}.specialty li .price .qi[data-v-14c896ff]{font-size:%?22?%;color:#888;font-weight:400}.specialty li .price .icon[data-v-14c896ff]{font-size:%?26?%}.specialty li .price .real[data-v-14c896ff]{position:absolute;bottom:10px;right:%?20?%;font-size:%?20?%;line-height:%?32?%;color:#888;font-weight:400}.specialty li[data-v-14c896ff]:nth-child(2n){margin-right:0}",""])},"92b7":function(t,e,a){"use strict";var i=a("419a"),n=a.n(i);n.a},c939:function(t,e,a){"use strict";a.r(e);var i=a("6815"),n=a("22ba");for(var s in n)"default"!==s&&function(t){a.d(e,t,(function(){return n[t]}))}(s);a("92b7");var r=a("2877"),o=Object(r["a"])(n["default"],i["a"],i["b"],!1,null,"14c896ff",null);e["default"]=o.exports},d3ed:function(t,e,a){"use strict";function i(t,e){var a=/[^\\x00-\xff]/g;if(t.replace(a,"mm").length<=e)return t;for(var i=Math.floor(e/2),n=i;n<t.length;n++)if(t.substr(0,n).replace(a,"mm").length>=e)return t.substr(0,n)+"...";return t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i,a("a481")}}]);