You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bjhedasx/public/h5/static/js/pages-integral-detail.31a72...

1 line
15 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-integral-detail"],{"241f":function(t,n,e){"use strict";var i=e("5d2c"),a=e.n(i);a.a},4777:function(t,n,e){"use strict";e.r(n);var i=e("77b4"),a=e("c163");for(var r in a)["default"].indexOf(r)<0&&function(t){e.d(n,t,(function(){return a[t]}))}(r);e("241f");var u=e("f0c5"),o=Object(u["a"])(a["default"],i["b"],i["c"],!1,null,"edab9526",null,!1,i["a"],void 0);n["default"]=o.exports},"5d2c":function(t,n,e){var i=e("707e");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=e("4f06").default;a("148556b6",i,!0,{sourceMap:!1,shadowMode:!1})},"707e":function(t,n,e){var i=e("24fb");n=i(!1),n.push([t.i,"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* 轮播图 */.swiper-block[data-v-edab9526]{width:%?750?%;height:%?750?%}\n/* 商品详情 */.border-line[data-v-edab9526]{width:%?60?%;height:%?1?%;background:#ccc}\n/* 返回首页和顶部 */.btn-block[data-v-edab9526]{position:fixed;z-index:900;right:%?30?%;bottom:calc(var(--window-bottom) + var(--footerHeight) + %?40?% + env(safe-area-inset-bottom))}\n/* 底部条 */.btn[data-v-edab9526]{width:%?200?%;height:%?73?%;line-height:%?73?%;border:0}.btn[data-v-edab9526]:first-child{border-radius:%?36?% 0 0 %?36?%}.btn[data-v-edab9526]:last-child{border-radius:%?0?% %?36?% %?36?% 0}.cart_number[data-v-edab9526]{position:absolute;top:%?-6?%;right:%?-6?%;width:%?30?%;height:%?30?%;line-height:%?30?%;background:#fff;border-radius:50%;border:%?2?% solid var(--main);font-size:%?20?%;color:var(--main)}",""]),t.exports=n},"77b4":function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"c",(function(){return r})),e.d(n,"a",(function(){return i}));var i={tySwiperSwiperDetail:e("afc9").default,tyTextRichText:e("3cef").default,tyTextNoData:e("34a9").default,tyTextTopHome:e("d9d5").default,tyLayerShare:e("29a5").default,tyLayerSku:e("a9c2").default},a=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("v-uni-view",{staticClass:"integral-detail-page"},[e("v-uni-view",{staticClass:"page-content padding-bottom-safe-footer-20"},[t.loadFinish&&t.product.id?e("v-uni-view",[e("v-uni-view",{staticClass:"jc-header"},[e("v-uni-view",{staticClass:"width-100p flex align-center justify-between",staticStyle:{padding:"19rpx 30rpx"}},[e("v-uni-view"),t.isWeixinEnv?t._e():e("v-uni-view",[e("v-uni-view",{staticClass:"radius-50p text-center",staticStyle:{width:"60rpx",height:"60rpx",background:"rgba(0, 0, 0, 0.3)"},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.isShareLayerShow=!0}}},[e("v-uni-text",{staticClass:"tyIcon-fenxiang line-height-60 text-34 text-ff"})],1)],1)],1)],1),e("v-uni-view",{staticClass:"swiper-block"},[e("ty-swiper-swiper-detail",{attrs:{list:t.product.carousel}})],1),e("v-uni-view",{staticClass:"padding-lr-30 padding-tb-30 bg-ff"},[e("v-uni-view",{staticClass:"text-40 flex align-end"},[t.product.integral?e("v-uni-text",{staticClass:"text-40 text-main"},[e("v-uni-text",{staticClass:"tyIcon-jifen1 text-40"}),t._v(t._s(t.product.integral))],1):t._e(),0!=t.product.price?e("v-uni-text",{staticClass:"margin-left-5 text-30 text-66"},[t._v("+¥"+t._s(t.product.price))]):t._e()],1),e("v-uni-view",{staticClass:"margin-top-20 line-45 text-34 text-bold"},[t._v(t._s(t.product.name))]),e("v-uni-view",{staticClass:"margin-top-20 text-24 text-98"},[t._v("已兑"+t._s(t.product.sales_number))])],1),e("v-uni-view",{staticClass:"line-height-90 flex align-center justify-center"},[e("v-uni-view",{staticClass:"border-line"}),e("v-uni-text",{staticClass:"margin-lr-15 text-24 text-98"},[t._v("商品详情")]),e("v-uni-view",{staticClass:"border-line"})],1),e("v-uni-view",[e("ty-text-rich-text",{attrs:{html:t.product.description}})],1),e("v-uni-view",{staticClass:"jc-footer-safe height-footer-safe border-top-e6 bg-ff"},[e("v-uni-view",{staticClass:"padding-lr-30 height-footer flex align-center"},[e("v-uni-view",{staticClass:"padding-right-30 flex-one flex justify-between"},[e("v-uni-view",{staticClass:"position-relative flex flex-direction align-center",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.go("/pages/integral/cart")}}},[e("v-uni-text",{staticClass:"tyIcon-cart-Empty line-height-50 text-54 text-4d"}),e("v-uni-text",{staticClass:"text-18 text-4d"},[t._v("兑换车")]),0!=t.cartTypeNumber?e("v-uni-view",{staticClass:"cart_number flex justify-center align-center"},[t._v(t._s(t.cartTypeNumber))]):t._e()],1)],1),e("v-uni-view",{staticClass:"btns flex"},[e("v-uni-view",{staticClass:"btn bg-auxiliary-gradient text-center text-26 text-ff",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.buy(1)}}},[t._v("加入兑换车")]),e("v-uni-view",{staticClass:"btn bg-main-gradient text-center text-26 text-ff",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.buy(2)}}},[t._v("立即兑换")])],1)],1)],1)],1):t._e(),t.loadFinish&&!t.product.id?e("v-uni-view",[e("ty-text-no-data",{attrs:{text:"商品已过期或已删除"},on:{btnClick:function(n){arguments[0]=n=t.$handleEvent(n),t.go("/pages/integral/index")}}})],1):t._e(),e("v-uni-view",{staticClass:"btn-block"},[e("ty-text-top-home",{attrs:{"scroll-top":t.scrollTop},on:{homeClick:function(n){arguments[0]=n=t.$handleEvent(n),t.go("/pages/integral/index")}}})],1)],1),e("v-uni-view",{staticClass:"page-layer"},[e("ty-layer-share",{attrs:{show:t.isShareLayerShow},on:{"update:show":function(n){arguments[0]=n=t.$handleEvent(n),t.isShareLayerShow=n}}}),e("ty-layer-sku",{attrs:{product:t.product,show:t.isSkuLayerShow,"btn-type":t.skuLayerBtnType,type:"2"},on:{"update:product":function(n){arguments[0]=n=t.$handleEvent(n),t.product=n},"update:show":function(n){arguments[0]=n=t.$handleEvent(n),t.isSkuLayerShow=n},confirm:function(n){arguments[0]=n=t.$handleEvent(n),t.confirm.apply(void 0,arguments)}}})],1)],1)},r=[]},a03a:function(t,n,e){"use strict";e("7a82");var i=e("4ea4").default;Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,e("d3b7");var a=i(e("798d")),r={getCarousel:function(){return new Promise((function(t,n){a.default.getData("integral/api/Config/getCarousel").then((function(n){t(n)})).catch((function(t){n(t)}))}))},getdeliveryType:function(){return new Promise((function(t,n){a.default.getData("integral/api/Config/getDeliveryType").then((function(n){t(n)})).catch((function(t){n(t)}))}))},getAdvertise:function(){return new Promise((function(t,n){a.default.getData("integral/api/Config/getAdvertise").then((function(n){t(n)})).catch((function(t){n(t)}))}))},listHotSearch:function(){return new Promise((function(t,n){a.default.getData("integral/api/Search/listHotSearch").then((function(n){t(n)})).catch((function(t){n(t)}))}))},listHistorySearch:function(){return new Promise((function(t,n){a.default.getData("integral/api/Search/listHistorySearch").then((function(n){t(n)})).catch((function(t){n(t)}))}))},insertHistorySearch:function(t){return new Promise((function(n,e){a.default.getData("integral/api/Search/insertHistorySearch",{keyword:t}).then((function(t){n(t)})).catch((function(t){e(t)}))}))},deleteAllHistorySearch:function(t){return new Promise((function(n,e){a.default.getData("integral/api/Search/deleteAllHistorySearch",{keyword:t}).then((function(t){n(t)})).catch((function(t){e(t)}))}))},listCategory:function(){return new Promise((function(t,n){a.default.getData("integral/api/Product/listCategory").then((function(n){t(n)})).catch((function(t){n(t)}))}))},listProduct:function(t,n,e,i,r,u){return new Promise((function(o,c){a.default.getList("integral/api/Product/listProduct",{category_id:e,keyword:i,is_recommend:r,order:u},{that:t,first_page:n}).then((function(t){o(t)})).catch((function(t){c(t)}))}))},getProduct:function(t){return new Promise((function(n,e){a.default.getData("integral/api/Product/getProduct",{product_id:t}).then((function(t){n(t)})).catch((function(t){e(t)}))}))},listCartProduct:function(){return new Promise((function(t,n){a.default.getData("integral/api/Cart/listCartProduct").then((function(n){t(n)})).catch((function(t){n(t)}))}))},countCartTypeNumber:function(){return new Promise((function(t,n){a.default.getData("integral/api/Cart/countCartTypeNumber").then((function(n){t(n)})).catch((function(t){n(t)}))}))},updateCartProduct:function(t,n,e){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return new Promise((function(r,u){a.default.getData("integral/api/Cart/updateCartProduct",{product_id:t,sku:n,number:e,is_select:i},{loading:!0}).then((function(t){r(t)})).catch((function(t){u(t)}))}))},updateCartProductNumber:function(t,n,e){return new Promise((function(i,r){a.default.getData("integral/api/Cart/updateCartProductNumber",{cart_id:t,type:n,number:e},{loading:!0}).then((function(t){i(t)})).catch((function(t){r(t)}))}))},updateCartProductSelectedStatus:function(t,n){return new Promise((function(e,i){a.default.getData("integral/api/Cart/updateCartProductSelectedStatus",{cart_id:t,is_select:n},{loading:!0}).then((function(t){e(t)})).catch((function(t){i(t)}))}))},updateAllCartProductSelectedStatus:function(t){return new Promise((function(n,e){a.default.getData("integral/api/Cart/updateAllCartProductSelectedStatus",{is_select:t},{loading:!0}).then((function(t){n(t)})).catch((function(t){e(t)}))}))},deleteCartInvalidProduct:function(){return new Promise((function(t,n){a.default.getData("integral/api/Cart/deleteCartInvalidProduct").then((function(n){t(n)}),{loading:!0}).catch((function(t){n(t)}))}))},deleteCartSelectedProduct:function(){return new Promise((function(t,n){a.default.getData("integral/api/Cart/deleteCartSelectedProduct").then((function(n){t(n)}),{loading:!0}).catch((function(t){n(t)}))}))},listStore:function(t,n,e){return new Promise((function(i,r){a.default.getData("integral/api/Order/listStore",{lat:t,lng:n,is_location:e}).then((function(t){i(t)})).catch((function(t){r(t)}))}))},getOrderReady:function(t,n,e,i,r,u){return new Promise((function(o,c){a.default.getData("integral/api/Order/getOrderReady",{buy_type:t,my_address_id:n,product_id:e,product_sku:i,number:r,delivery_type:u}).then((function(t){o(t)})).catch((function(t){c(t)}))}))},insertOrder:function(t,n,e,i,r,u,o,c,d){return new Promise((function(s,l){a.default.getData("integral/api/Order/insertOrder",{buy_type:t,delivery_type:n,my_address_id:e,store_id:i,product_id:r,product_sku:u,number:o,pay_type:c,remark:d},{loading:!0}).then((function(t){s(t)})).catch((function(t){l(t)}))}))},listMyOrder:function(t,n,e){return new Promise((function(i,r){a.default.getListByLastId("integral/api/Order/listMyOrder",{index:e},{that:t,first_page:n},{loading:!0}).then((function(t){i(t)})).catch((function(t){r(t)}))}))},getMyOrder:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Promise((function(e,i){a.default.getData("integral/api/Order/getMyOrder",{order_id:t,is_check_user:n}).then((function(t){e(t)})).catch((function(t){i(t)}))}))},rePayOrder:function(t,n){return new Promise((function(e,i){a.default.getData("integral/api/Order/rePayOrder",{order_id:t,pay_type:n},{loading:!0}).then((function(t){e(t)})).catch((function(t){i(t)}))}))},cancelOrder:function(t){return new Promise((function(n,e){a.default.getData("integral/api/Order/cancelOrder",{order_id:t},{loading:!0}).then((function(t){n(t)})).catch((function(t){e(t)}))}))},remindOrder:function(t){return new Promise((function(n,e){a.default.getData("integral/api/Order/remindOrder",{order_id:t},{loading:!0}).then((function(t){n(t)})).catch((function(t){e(t)}))}))},finishOrder:function(t){return new Promise((function(n,e){a.default.getData("integral/api/Order/finishOrder",{order_id:t},{loading:!0}).then((function(t){n(t)})).catch((function(t){e(t)}))}))},deleteOrder:function(t){return new Promise((function(n,e){a.default.getData("integral/api/Order/deleteOrder",{order_id:t},{loading:!0}).then((function(t){n(t)})).catch((function(t){e(t)}))}))},getLogistics:function(t){return new Promise((function(n,e){a.default.getData("integral/api/Order/getLogistics",{order_id:t}).then((function(t){n(t)})).catch((function(t){e(t)}))}))},isCanWriteOffOrder:function(t){return new Promise((function(n,e){a.default.getData("integral/api/Order/isCanWriteOffOrder",{order_id:t}).then((function(t){n(t)})).catch((function(t){e(t)}))}))},writeOffOrder:function(t){return new Promise((function(n,e){a.default.getData("integral/api/Order/writeOffOrder",{order_id:t},{loading:!0}).then((function(t){n(t)})).catch((function(t){e(t)}))}))},listLog:function(t,n,e){return new Promise((function(i,r){a.default.getList("integral/api/Integral/listLog",{index:e},{that:t,first_page:n}).then((function(t){i(t)})).catch((function(t){r(t)}))}))},getMyIntegral:function(){return new Promise((function(t,n){a.default.getData("integral/api/Integral/getMyIntegral").then((function(n){t(n)})).catch((function(t){n(t)}))}))},getMyRank:function(){return new Promise((function(t,n){a.default.getData("integral/api/Integral/getMyRank").then((function(n){t(n)})).catch((function(t){n(t)}))}))},listRank:function(){return new Promise((function(t,n){a.default.getData("integral/api/Integral/listRank").then((function(n){t(n)})).catch((function(t){n(t)}))}))}},u=r;n.default=u},c163:function(t,n,e){"use strict";e.r(n);var i=e("fc98"),a=e.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(r);n["default"]=a.a},fc98:function(t,n,e){"use strict";e("7a82");var i=e("4ea4").default;Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=i(e("a03a")),r={data:function(){return{productId:"",product:{},loadFinish:!1,scrollTop:0,cartTypeNumber:0,isShareLayerShow:!1,isSkuLayerShow:!1,isWeixinEnv:!1,buyType:2,skuLayerBtnType:1}},onLoad:function(t){this.productId=t.id||0},onShow:function(){this.cn.isLogin()&&this.countCartNumber()},onReady:function(){"weixin"==this.cn.userAgent()&&(this.isWeixinEnv=!0),this.getDetail()},onPageScroll:function(t){this.scrollTop=t.scrollTop},methods:{getDetail:function(){var t=this;a.default.getProduct(this.productId).then((function(n){t.loadFinish=!0,t.product=n.data.product}))},countCartNumber:function(){var t=this;a.default.countCartTypeNumber().then((function(n){t.cartTypeNumber=n.data.cart_type_number}))},buy:function(t){if(!this.cn.isLogin())return uni.navigateTo({url:"/pages/user/register/index"}),!1;this.isSkuLayerShow=!0,this.skuLayerBtnType=1,this.buyType=t},confirm:function(t){var n=this;if(0==this.product.is_spec_open&&this.product.stock<=0)return this.cn.toast("库存不足啦!"),!1;this.buyType=1==t.type||2==t.type?t.type:this.buyType,1==this.buyType?a.default.updateCartProduct(this.productId,t.choose_sku,t.buy_number,0).then((function(t){0==t.code&&(n.isSkuLayerShow=!1,n.cn.toast(t.msg),n.cartTypeNumber=t.data.cart_type_number)})):2==this.buyType&&(this.isSkuLayerShow=!1,uni.navigateTo({url:"/pages/integral/order?product_id="+this.productId+"&product_sku="+t.choose_sku+"&number="+t.buy_number+"&buy_type=2"}))}}};n.default=r}}]);