app-diy-goods-list.js 6.5 KB

12345678910
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/page-component/app-diy-goods-list/app-diy-goods-list"],{"530f":function(t,n,e){"use strict";e.r(n);var o=e("578a"),i=e("fbc31");for(var r in i)"default"!==r&&function(t){e.d(n,t,(function(){return i[t]}))}(r);e("5bfa");var a,u=e("f0c5"),c=Object(u["a"])(i["default"],o["b"],o["c"],!1,null,"47764455",null,!1,o["a"],a);n["default"]=c.exports},"578a":function(t,n,e){"use strict";var o;e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return r})),e.d(n,"a",(function(){return o}));var i=function(){var t=this,n=t.$createElement;t._self._c},r=[]},"5bfa":function(t,n,e){"use strict";var o=e("8a0b"),i=e.n(o);i.a},"5f14":function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=e("2f62");function i(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,o)}return e}function r(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?i(Object(e),!0).forEach((function(n){a(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):i(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function a(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var u=function(){e.e("components/page-component/goods/app-price").then(function(){return resolve(e("e82c"))}.bind(null,e)).catch(e.oe)},c=function(){e.e("components/page-component/app-diy-goods-list/app-goods-timer").then(function(){return resolve(e("c5ea"))}.bind(null,e)).catch(e.oe)},s=function(){e.e("components/page-component/app-attr/app-attr").then(function(){return resolve(e("58fd"))}.bind(null,e)).catch(e.oe)},l=function(){e.e("components/page-component/app-member-mark/app-member-price").then(function(){return resolve(e("07a4"))}.bind(null,e)).catch(e.oe)},p=function(){e.e("components/page-component/app-sup-vip/app-sup-vip").then(function(){return resolve(e("a8ec"))}.bind(null,e)).catch(e.oe)},f={name:"app-diy-goods-list",components:{"app-price":u,"app-goods-timer":c,"app-attr":s,"app-member-price":l,"app-sup-vip":p},props:{catPosition:{type:String,default:function(){return"top"}},showCat:{type:Boolean,default:function(){return!1}},catList:{type:Array,default:function(){return[]}},catStyle:{type:Number,default:function(){return 1}},list:{type:Array,default:function(){return[]}},goodsStyle:{type:Number,default:function(){return 1}},textStyle:{type:Number,default:function(){return 1}},listStyle:{type:Number,default:function(){return-1}},showBuyBtn:{type:Boolean,default:function(){return!1}},buyBtn:{type:String,default:function(){return"cart"}},buyBtnText:{type:String,default:function(){return"购买"}},buyBtnStyle:{type:Number,default:function(){return 1}},fill:{type:Number,default:function(){return 1}},showGoodsName:{type:Boolean,default:function(){return!0}},showGoodsPrice:{type:Boolean,default:function(){return!0}},showGoodsTag:{type:Boolean,default:function(){return!0}},goodsCoverProportion:{type:String,default:function(){return"1-1"}},customizeGoodsTag:{type:Boolean,default:function(){return!1}},goodsTagPicUrl:String,sign:String,buttonColor:{type:String,default:function(){return"#ff4544"}},pageHide:Boolean},data:function(){return{activeCurrent:0,goods:null,imgRadius:"16rpx 16rpx 0 0",lisRadius:"16rpx",attrShow:0}},computed:r(r(r({},(0,o.mapState)({appImg:function(t){return t.mallConfig.__wxapp_img.mall},appSetting:function(t){return t.mallConfig.mall.setting},theme:function(t){return t.mallConfig.theme}})),(0,o.mapGetters)("mallConfig",{vip:"getVip",getVideo:"getVideo"})),{},{newData:function(){return this.showCat?this.catList[this.activeCurrent].goodsList:this.list},listClass:function(){var t="";return 0===this.listStyle?"dir-left-nowrap scroll":2===this.listStyle?"dir-left-wrap column-2 main-between ":3===this.listStyle?"dir-left-wrap column-3 ":t},buyBtnClass:function(){var t="";return 2!==this.buyBtnStyle&&4!==this.buyBtnStyle||(t+="buy-btn-border "),4!==this.buyBtnStyle&&3!==this.buyBtnStyle||(t+="buy-btn-radius"),t},btnStyle:function(){var t="";return 1===this.buyBtnStyle||3===this.buyBtnStyle?t+="background-color: ".concat(this.buttonColor,";color: #ffffff;"):t+="border-color: ".concat(this.buttonColor,";color: ").concat(this.buttonColor,";"),t},coverPicHeight:function(){return"1-1"===this.goodsCoverProportion?"702rpx":"468rpx"},goodsClass:function(){var t="";return 2===this.goodsStyle&&(t+="border "),2===this.textStyle&&(t+="text-center "),t},tag:function(){var t="";return t="miaosha"===this.sign?"秒杀":"bargain"===this.sign?"砍价":"pintuan"===this.sign?"人团":"advance"===this.sign?"预售":"pick"===this.sign?"N元任选":null,t},showTimer:function(){return"miaosha"===this.sign||"bargain"===this.sign||"lottery"===this.sign||"advance"===this.sign}}),methods:{change:function(t){this.activeCurrent=t},jump:function(n){if(console.log(n),n.video_url&&1==this.getVideo&&"lottery"!==n.sign&&"bargain"!==n.sign){var e=n.id;"advance"===n.sign&&(e=n.goods_id),t.navigateTo({url:"/pages/goods/video?goods_id=".concat(e,"&sign=").concat(n.sign)})}else t.navigateTo({url:n.page_url})},buyProduct:function(n){var e=this;if("goods"!=this.sign&&"mch"!=this.sign||"undefined"!=typeof n.is_negotiable&&1==n.is_negotiable)this.jump(n);else{t.showLoading();var o=this.$api.goods.detail;n.mch_id>0&&(o=this.$api.mch.goods_detail),this.$request({url:o,data:{id:n.id,mch_id:n.mch_id}}).then((function(o){t.hideLoading(),0===o.code?(n.mch_id>0?e.goods=o.data.detail:e.goods=o.data.goods,e.attrShow=Math.random()):t.showModal({title:"提示",content:o.msg,showCancel:!1})})).catch((function(n){t.hideLoading()}))}}}};n.default=f}).call(this,e("543d")["default"])},"8a0b":function(t,n,e){},fbc31:function(t,n,e){"use strict";e.r(n);var o=e("5f14"),i=e.n(o);for(var r in o)"default"!==r&&function(t){e.d(n,t,(function(){return o[t]}))}(r);n["default"]=i.a}}]);
  2. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  3. 'components/page-component/app-diy-goods-list/app-diy-goods-list-create-component',
  4. {
  5. 'components/page-component/app-diy-goods-list/app-diy-goods-list-create-component':(function(module, exports, __webpack_require__){
  6. __webpack_require__('543d')['createComponent'](__webpack_require__("530f"))
  7. })
  8. },
  9. [['components/page-component/app-diy-goods-list/app-diy-goods-list-create-component']]
  10. ]);