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.
1 lines
6.3 KiB
1 lines
6.3 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["package1/inventory/inventoryUpNew"],{"0c35":function(t,e,i){"use strict";i.r(e);var s=i("3fb2"),o=i.n(s);for(var c in s)["default"].indexOf(c)<0&&function(t){i.d(e,t,(function(){return s[t]}))}(c);e["default"]=o.a},2464:function(t,e,i){"use strict";i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return c})),i.d(e,"a",(function(){return s}));var s={uniIcons:function(){return Promise.all([i.e("common/vendor"),i.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(i.bind(null,"6bbb6"))},uniPopup:function(){return i.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(i.bind(null,"2864"))}},o=function(){var t=this,e=t.$createElement,i=(t._self._c,t.carList.length);t._isMounted||(t.e0=function(e){return t.$refs.upNewPopup.open()}),t.$mp.data=Object.assign({},{$root:{g0:i}})},c=[]},2752:function(t,e,i){"use strict";i.r(e);var s=i("2464"),o=i("0c35");for(var c in o)["default"].indexOf(c)<0&&function(t){i.d(e,t,(function(){return o[t]}))}(c);i("284d");var n=i("828b"),a=Object(n["a"])(o["default"],s["b"],s["c"],!1,null,null,null,!1,s["a"],void 0);e["default"]=a.exports},"284d":function(t,e,i){"use strict";var s=i("3e3f"),o=i.n(s);o.a},"3e3f":function(t,e,i){},"3fb2":function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={components:{},data:function(){return{bigImg:[],swiperDotIndex:0,canvasshow:!1,indexList:[],isCheck:!0,pageNum:1,shopList:[],info:0,classId:"",gateType:"",goodsList:[],categoryId:"",searchName:"",shopId:"",checkbox:"",id:"",carList:[],zheng:"",fu:"",khName:[],carNum:0,carType:0,type:"",gwcList:[],data:{},height:0,base64:"",shareSuccess:!1,tempFilePath:"",mini_program_openid:"",unionid:"",official_account_openid:"",customerCategoryList:[],FWHPic:"https://jewel-shop.oss-cn-beijing.aliyuncs.com/f2ba2080aaa54c618c2e47df4f220087.png"}},onLoad:function(t){this.geetGoodsInfo(t.id),this.getCustomerCategoryList()},methods:{getCustomerCategoryList:function(){var e=this;this.tui.request("/app/customerCategory/getCustomerCategoryListByShopId","POST",{shopId:t.getStorageSync("shopId")},!1,!0).then((function(t){if(200==t.code)if(t.result.length>0){e.customerCategoryList=t.result;for(var i=0;i<e.customerCategoryList.length;i++){var s={categoryName:e.customerCategoryList[i].categoryName,categoryId:e.customerCategoryList[i].id,categoryPrice:""};e.customerCategoryList[i]=s}}else e.customerCategoryList=null;else e.tui.toast(t.message)})).catch((function(t){}))},geetGoodsInfo:function(t){var e=this;this.tui.request("/app/purchase/getPurchaseAllData","post",{id:t},!1,!0).then((function(t){if(200==t.code){for(var i=0;i<t.result.purchaseDetails.length;i++)""!=t.result.purchaseDetails&&(t.result.purchaseDetails[i].checked=!1);e.$nextTick((function(){e.shopList=t.result.purchaseDetails}))}else e.tui.toast(t.message)})).catch((function(t){}))},lunbochange:function(t){this.current=t.detail.current},largeImg:function(t){if(null==t.productPicture&&null==t.productPictures||""==t.productPicture&&null==t.productPictures)this.tui.toast("暂无可展示的图片",300);else{if(this.bigImg=[],null!=t.productPicture){var e={productPicture:t.productPicture};this.bigImg.push(e)}if(null!=t.productPictures)for(var i=0;i<t.productPictures.length;i++)this.bigImg.push(t.productPictures[i]);this.$refs.imgPopup.open()}},upNewRemind:function(){this.checkUserClass("4"),this.$refs.upNewPopup.close()},checkUserClass:function(t,e){if(0!=this.carList.length){if("31"==t){for(var i=0;i<this.customerCategoryList.length;i++)this.upNew("3",this.customerCategoryList[i]);this.upNew("5","")}else"3"==t?this.upNew("3",e):"0"==t?this.upNew("0",""):"1"==t?this.upNew("1",""):"4"==t&&this.upNew("3",this.khName)}else this.tui.toast("请选择商品后再推送")},upNew:function(e,i){var s=this;if(this.$refs.upNewPopup.close(),this.data={shareType:"2",shareProductId:this.carList},this.data.priceType="5"==e?"1":"4"==e?""!=this.khName.categoryId&&null!=this.khName.categoryId&&"null"!=this.khName.categoryId?"3":"1":e,"3"==e){var o={id:i.categoryId,name:i.categoryName,userId:this.khName.userId,customId:this.khName.id,mini_program_openid:this.khName.mini_program_openid,unionid:this.khName.unionid,official_account_openid:this.khName.official_account_openid};this.data.scene=JSON.stringify(o)}this.tui.request("/app/productShare/save","POST",this.data,!1,!0).then((function(o){if(200==o.code){s.khid=o.result.id;var c={thing3:"【"+t.getStorageSync("shopName")+"】上新啦!点击查看详情",time2:o.result.createTime};s.tui.request("/social/wechat/sendWechatTempMessage","post",{tempId:"M45X8AmPi58c16M9YVTMEOhwEVEa9s5md-6i3TwjpRQ",title:"店铺上新",content:JSON.stringify(c),pagePath:"package1/index/downStearmList?khid="+s.khid+"&userId="+s.khName.userId+"&shareType="+s.data.shareType+"&mini_program_openid="+s.khName.miniProgramOpenid+"&unionid="+s.khName.unionid+"&official_account_openid="+s.khName.officialAccountOpenid+"&customId="+s.khName.id,upNewType:"0"==e||"1"==e?e:"",userId:"4"==e?s.khName.userId:"",categoryId:"4"==e?s.khName.categoryId:i.categoryId?i.categoryId:"",isAll:"5"==e?"1":""},!1,!1).then((function(e){200==e.code?(s.tui.toast("推送成功"),t.navigateBack({delta:3})):s.tui.toast(e.message)})).catch((function(t){}))}else s.tui.toast(o.message)})).catch((function(t){}))},clearkhName:function(){this.khName="",this.$forceUpdate()},goPopleList:function(){t.navigateTo({url:"/package1/index/peopleList?popleType=khName"})},checkboxChange:function(t){if(t.checked=!t.checked,-1!=this.carList.indexOf(t.productId)?this.carList.splice(this.carList.indexOf(t.productId),1):this.carList.push(t.productId),0==this.gwcList.length)this.gwcList.push(t);else for(var e=0;e<this.gwcList.length;e++)if(this.gwcList[e].productId==t.productId)this.gwcList.splice(e,1);else if(this.gwcList.length==e+1)return void this.gwcList.push(t)},checkGoods:function(t){for(var e=0;e<this.shopList.length;e++)this.checkboxChange(this.shopList[e]);this.isCheck="1"!=t},closeCar:function(){this.$refs.carPopup.close()}}};e.default=i}).call(this,i("df3c")["default"])},"971a":function(t,e,i){"use strict";(function(t,e){var s=i("47a9");i("7859");s(i("3240"));var o=s(i("2752"));t.__webpack_require_UNI_MP_PLUGIN__=i,e(o.default)}).call(this,i("3223")["default"],i("df3c")["createPage"])}},[["971a","common/runtime","common/vendor"]]]);
|