2023-05-16 13:02:46 +08:00

1 line
14 KiB
JavaScript

"use strict";require("./common"),require("./vendors"),require("./taro"),require("./runtime"),(wx.webpackJsonp=wx.webpackJsonp||[]).push([[2143],{2051:function(e,r,t){t(7488);var o=t(2180),n=t(8744),a=t(2954),i=t.n(a),s=t(5998),d=t(1002),c=t(1413);function formatProdErrorMessage(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var u="function"==typeof Symbol&&Symbol.observable||"@@observable",p=function randomString(){return Math.random().toString(36).substring(7).split("").join(".")},l={INIT:"@@redux/INIT"+p(),REPLACE:"@@redux/REPLACE"+p(),PROBE_UNKNOWN_ACTION:function PROBE_UNKNOWN_ACTION(){return"@@redux/PROBE_UNKNOWN_ACTION"+p()}};function isPlainObject(e){if("object"!=typeof e||null===e)return!1;for(var r=e;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}function createStore(e,r,t){var o;if("function"==typeof r&&"function"==typeof t||"function"==typeof t&&"function"==typeof arguments[3])throw new Error(formatProdErrorMessage(0));if("function"==typeof r&&void 0===t&&(t=r,r=void 0),void 0!==t){if("function"!=typeof t)throw new Error(formatProdErrorMessage(1));return t(createStore)(e,r)}if("function"!=typeof e)throw new Error(formatProdErrorMessage(2));var n=e,a=r,i=[],s=i,d=!1;function ensureCanMutateNextListeners(){s===i&&(s=i.slice())}function getState(){if(d)throw new Error(formatProdErrorMessage(3));return a}function subscribe(e){if("function"!=typeof e)throw new Error(formatProdErrorMessage(4));if(d)throw new Error(formatProdErrorMessage(5));var r=!0;return ensureCanMutateNextListeners(),s.push(e),function unsubscribe(){if(r){if(d)throw new Error(formatProdErrorMessage(6));r=!1,ensureCanMutateNextListeners();var t=s.indexOf(e);s.splice(t,1),i=null}}}function dispatch(e){if(!isPlainObject(e))throw new Error(formatProdErrorMessage(7));if(void 0===e.type)throw new Error(formatProdErrorMessage(8));if(d)throw new Error(formatProdErrorMessage(9));try{d=!0,a=n(a,e)}finally{d=!1}for(var r=i=s,t=0;t<r.length;t++){(0,r[t])()}return e}return dispatch({type:l.INIT}),(o={dispatch:dispatch,subscribe:subscribe,getState:getState,replaceReducer:function replaceReducer(e){if("function"!=typeof e)throw new Error(formatProdErrorMessage(10));n=e,dispatch({type:l.REPLACE})}})[u]=function observable(){var e,r=subscribe;return(e={subscribe:function subscribe(e){if("object"!=typeof e||null===e)throw new Error(formatProdErrorMessage(11));function observeState(){e.next&&e.next(getState())}return observeState(),{unsubscribe:r(observeState)}}})[u]=function(){return this},e},o}function compose(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return 0===r.length?function(e){return e}:1===r.length?r[0]:r.reduce((function(e,r){return function(){return e(r.apply(void 0,arguments))}}))}function createThunkMiddleware(e){return function middleware(r){var t=r.dispatch,o=r.getState;return function(r){return function(n){return"function"==typeof n?n(t,o,e):r(n)}}}}var g=createThunkMiddleware();g.withExtraArgument=createThunkMiddleware;var _=g,f=t(1660),h={userInfo:i().getStorageSync("userInfo")?JSON.parse(i().getStorageSync("userInfo")):null,adminUserInfo:i().getStorageSync("adminUserInfo")?JSON.parse(i().getStorageSync("adminUserInfo")):null,token:i().getStorageSync("token")||"",session_key:i().getStorageSync("session_key")||"",sort_code:i().getStorageSync("sort_code")?JSON.parse(i().getStorageSync("sort_code")):null,logingStatus:!1};var m=t(9399),v={shopCount:i().getStorageSync(m.t4)?JSON.parse(i().getStorageSync(m.t4)).shopCount:0};var w={data:null,adjust_type:1,custom_print_id:0,sale_order_id:0,admin_data:null,color_item_data:null,update_status:0,purchaser_form_title:{title:"",purchaser_name:"",phone:"",id:0}};var y=function onInitData(e,r){var t,o=r.data,n=void 0===o?{}:o,a=r.custom_print_id,i=r.sale_order_id,s=r.adjust_type,d={adjust_type:parseInt(s.toString()),custom_print_product:[],price:(null==n?void 0:n.price_admin)||0,weight:(null==n?void 0:n.weight_admin)||0,weight_error:(null==n?void 0:n.weight_error_admin)||0,custom_print_id:parseInt(a.toString()),sale_order_id:parseInt(a.toString()),purchaser_form_title_id:null==n?void 0:n.default_title_id},u={total_weight_error:null==n?void 0:n.total_weight_error,total_sale_weight:null==n?void 0:n.total_sale_weight,total_amount:null==n?void 0:n.total_amount};n.weight_admin=0,n.price_admin=0,n.weight_error_admin=0,null==n||null===(t=n.product_details)||void 0===t||t.map((function(e,r){var t;e.weight_admin=0,e.price_admin=0,e.weight_error_admin=0,e.index_str=r.toString(),e.sale_mode_name=n.sale_mode_name,e.sale_mode=n.sale_mode;var o={price:e.price_admin||0,weight:e.weight_admin||0,weight_error:e.weight_error_admin||0,product_id:e.product_id,product_name:e.product_name,custom_print_product_color:[]};null==e||null===(t=e.product_color_details)||void 0===t||t.map((function(r,t){r.index_str="".concat(e.index_str,"_").concat(t),r.weight_setting=r.weight,r.weight_error_setting=r.weight_error,r.price_setting=r.price,r.weight_admin=0,r.price_admin=0,r.weight_error_admin=0,r.sale_mode_name=n.sale_mode_name,r.sale_mode=n.sale_mode,o.custom_print_product_color.push({price:r.price_admin||0,weight:r.weight_admin||0,weight_error:r.weight_error_admin||0,product_color_id:r.product_color_id,product_color_name:r.product_color_name})})),d.custom_print_product.push(o)}));var p={id:null==n?void 0:n.default_title_id,title:null==n?void 0:n.title_name,purchaser_name:null==n?void 0:n.purchaser_name,phone:null==n?void 0:n.purchaser_phone};return(0,c.Z)((0,c.Z)({},e),{},{data:n,custom_print_id:a,sale_order_id:i,custom_order_total:u,admin_data:d,init_state:!0,update_status:0,color_item_data:null,purchaser_form_title:p,adjust_type:s})},S=function onUpdateData(e,r){var t,o=r.data,n=r.update_status,a={adjust_type:parseInt(e.adjust_type),custom_print_product:[],price:0,weight:0,weight_error:0,custom_print_id:parseInt(e.custom_print_id),sale_order_id:parseInt(e.sale_order_id),purchaser_form_title_id:parseInt(e.purchaser_form_title.id)};return a.weight=(null==o?void 0:o.weight_admin)||0,a.price=(null==o?void 0:o.price_admin)||0,a.weight_error=(null==o?void 0:o.weight_error_admin)||0,null==o||null===(t=o.product_details)||void 0===t||t.map((function(e){var r,t={price:e.price_admin||0,weight:e.weight_admin||0,weight_error:e.weight_error_admin||0,product_id:e.product_id,product_name:e.product_name,custom_print_product_color:[]};null==e||null===(r=e.product_color_details)||void 0===r||r.map((function(e){t.custom_print_product_color.push({price:e.price_admin||0,weight:e.weight_admin||0,weight_error:e.weight_error_admin||0,product_color_id:e.product_color_id,product_color_name:e.product_color_name})})),a.custom_print_product.push(t)})),(0,c.Z)((0,c.Z)({},e),{},{admin_data:a,data:(0,c.Z)({},o),update_status:n})},x=function onUpdatePurchaserFormTitle(e,r){var t=r.data;return e.admin_data.purchaser_form_title_id=t.id,(0,c.Z)((0,c.Z)({},e),{},{purchaser_form_title:t})},b=function onUpdateColorData(e,r){var t=r.data,o=r.update_status;return(0,c.Z)((0,c.Z)({},e),{},{color_item_data:t,update_status:o})},E=function combineReducers(e){for(var r=Object.keys(e),t={},o=0;o<r.length;o++){var n=r[o];0,"function"==typeof e[n]&&(t[n]=e[n])}var a,i=Object.keys(t);try{!function assertReducerShape(e){Object.keys(e).forEach((function(r){var t=e[r];if(void 0===t(void 0,{type:l.INIT}))throw new Error(formatProdErrorMessage(12));if(void 0===t(void 0,{type:l.PROBE_UNKNOWN_ACTION()}))throw new Error(formatProdErrorMessage(13))}))}(t)}catch(e){a=e}return function combination(e,r){if(void 0===e&&(e={}),a)throw a;for(var o=!1,n={},s=0;s<i.length;s++){var d=i[s],c=t[d],u=e[d],p=c(u,r);if(void 0===p){r&&r.type;throw new Error(formatProdErrorMessage(14))}n[d]=p,o=o||p!==u}return(o=o||i.length!==Object.keys(e).length)?n:e}}({userInfo:function counter(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,r=arguments.length>1?arguments[1]:void 0,t=r.type,o=r.data;switch(t){case f.FP:return i().setStorageSync("userInfo",JSON.stringify(null==o?void 0:o.userInfo)),(0,c.Z)((0,c.Z)({},e),o);case f.bt:return i().setStorageSync("adminUserInfo",JSON.stringify(null==o?void 0:o.adminUserInfo)),(0,c.Z)((0,c.Z)({},e),o);case f.L4:return i().setStorageSync("token",null==o?void 0:o.token),(0,c.Z)((0,c.Z)({},e),o);case f.Vb:return i().setStorageSync("session_key",null==o?void 0:o.session_key),(0,c.Z)((0,c.Z)({},e),o);case f.nr:return i().setStorageSync("sort_code",JSON.stringify(null==o?void 0:o.sort_code)),(0,c.Z)((0,c.Z)({},e),o);case f.A7:return i().removeStorageSync("token"),(0,c.Z)((0,c.Z)({},e),{},{token:""});case f.f_:return i().removeStorageSync("session_key"),(0,c.Z)((0,c.Z)({},e),{},{session_key:""});case f.gN:return i().removeStorageSync("userInfo"),(0,c.Z)((0,c.Z)({},e),{},{userInfo:null});case f.SD:return i().removeStorageSync("adminUserInfo"),(0,c.Z)((0,c.Z)({},e),{},{adminUserInfo:null});case f.Lv:return i().removeStorageSync("sort_code"),(0,c.Z)((0,c.Z)({},e),{},{sortCode:null});case f.uw:return(0,c.Z)((0,c.Z)({},e),o);default:return e}},commonData:function commonData_counter(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,r=arguments.length>1?arguments[1]:void 0,t=r.type,o=r.data;switch(t){case m.qx:return i().setStorageSync(m.t4,JSON.stringify(null==o?void 0:o.shopCount)),(0,c.Z)((0,c.Z)({},e),o);case m.oE:return i().removeStorageSync(m.t4),(0,c.Z)((0,c.Z)({},e),{},{shopCount:0});default:return e}},codeData:function codeData_counter(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w,r=arguments.length>1?arguments[1]:void 0,t=r.type,o=r.data;switch(r.admin_data,t){case"setInitData":return y(e,r);case"updateData":return S(e,r);case"changeAdjustType":return(0,c.Z)((0,c.Z)({},e),{},{adjust_type:o});case"setColorData":return(0,c.Z)((0,c.Z)({},e),{},{color_item_data:JSON.parse(JSON.stringify(o))});case"updateColorData":return b(e,r);case"setPurchaserFormTitle":return x(e,r);default:return e}}}),O=t(2180).window;var P=("object"===(void 0===O?"undefined":(0,d.Z)(O))&&O.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?O.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}):compose)(function applyMiddleware(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return function(e){return function(){var t=e.apply(void 0,arguments),o=function dispatch(){throw new Error(formatProdErrorMessage(15))},n={getState:t.getState,dispatch:function dispatch(){return o.apply(void 0,arguments)}},a=r.map((function(e){return e(n)}));return o=compose.apply(void 0,a)(t.dispatch),(0,c.Z)((0,c.Z)({},t),{},{dispatch:o})}}}.apply(void 0,[_]));var I=t(8093),Z=t(4158),C=t(1341),N=t(1894),M=t(5893),k=function configStore(){return createStore(E,P)}(),L=function App(e){return i().showShareMenu({withShareTicket:!0}),(0,I.Er)(),(0,a.onAppShow)((function(){var e=i().getUpdateManager();e.onCheckForUpdate((function(e){console.log("版本信息:",e.hasUpdate)})),e.onUpdateReady((function(){i().showModal({title:"更新提示",content:"新版本已经准备好,是否重启应用?",success:function success(r){r.confirm&&e.applyUpdate()}})})),e.onUpdateFailed((function(){console.log("新版本更新失败")}))})),(0,a.onAppHide)((function(){var e=i().getCurrentPages(),r=e[e.length-1].route,t=JSON.parse(i().getStorageSync("adminUserInfo")||"{}");(0,C.tp)({page_name:r||"未知页面",trigger_time:(0,Z.o0)(new Date),purchaser_name:t.user_name||"未知用户",purchaser_id:t.user_id||0})})),(0,M.jsx)(N.Z,{children:(0,M.jsx)(s.zt,{store:k,children:e.children})})},j=t(7294),U=t.t(j,2),T=t(8967),A={pages:["pages/index/index","pages/user/index","pages/shopCar/index"],window:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#fff",navigationBarTitleText:"WeChat",navigationBarTextStyle:"black",backgroundColor:"#ffffff"},tabBar:{list:[{pagePath:"pages/index/index",text:"首页",iconPath:"./styles/tabbar/home.png",selectedIconPath:"./styles/tabbar/home_selected.png"},{pagePath:"pages/shopCar/index",text:"购物车",iconPath:"./styles/tabbar/shop.png",selectedIconPath:"./styles/tabbar/shop_selected.png"},{pagePath:"pages/user/index",text:"我的",iconPath:"./styles/tabbar/my.png",selectedIconPath:"./styles/tabbar/my_selected.png"}],color:"#707070",selectedColor:"#2680EB",backgroundColor:"#fff",borderStyle:"white"},subPackages:[{root:"pages/category",pages:["index"]},{root:"pages/search",pages:["index"]},{root:"pages/classList",pages:["index"]},{root:"pages/details",pages:["index"]},{root:"pages/searchList",pages:["searchList","hightSearchList","search"]},{root:"pages/userEdit",pages:["index"]},{root:"pages/addressManager",pages:["index"]},{root:"pages/addressAdd",pages:["index"]},{root:"pages/company",pages:["index"]},{root:"pages/weightList",pages:["index"]},{root:"pages/weightListAdd",pages:["index"]},{root:"pages/order",pages:["index","comfirm","speedComfirm","orderList/index"]},{root:"pages/editOrder",pages:["index"]},{root:"pages/subjectList",pages:["index"]},{root:"pages/creditLine",pages:["index"]},{root:"pages/creditUsed",pages:["index"]},{root:"pages/depositBeforehandDetail",pages:["index"]},{root:"pages/depositBeforehand",pages:["index"]},{root:"pages/depositList",pages:["index"]},{root:"pages/salesAfter",pages:["index","salesAfterList/index"]},{root:"pages/applyAfterSales",pages:["index"]},{root:"pages/collection",pages:["index","collectionDetail/index"]},{root:"pages/sampleComparison",pages:["index"]},{root:"pages/inviteCode",pages:["index","inviteFriends/index"]},{root:"pages/codeSetting",pages:["index","codeColorList/index"]},{root:"pages/codeList",pages:["index"]},{root:"pages/colorCardClipping",pages:["index"]},{root:"pages/colorCardList",pages:["index"]},{root:"pages/colorCardOrder",pages:["index"]},{root:"pages/colorCardOrderDetail",pages:["index"]},{root:"pages/cutSampleList",pages:["index"]},{root:"pages/cutSampleListOrder",pages:["index"]},{root:"pages/cutSampleListOrderDetail",pages:["index"]},{root:"pages/login",pages:["index"]},{root:"pages/clauseDetail",pages:["index"]},{root:"pages/activityIncome",pages:["index","withdraw/index","withdrawalRecord/index","withdrawalRecordDetail/index"]},{root:"pages/bankCardMananger",pages:["addBankCard/index","editBankCard/index"]}]};o.window.__taroAppConfig=A;App((0,n.Ox)(L,U,T.ZP,A));(0,a.initPxTransform)({designWidth:750,deviceRatio:{640:1.17,750:1,828:.905},baseFontSize:20,unitPrecision:void 0,targetUnit:void 0}),(0,a.initAppInfo)({platform:"MiniProgram",taroVersion:"3.6.6",designWidth:750})}},function(e){e.O(0,[2107,1216,8592],(function(){return r=2051,e(e.s=r);var r}));e.O()}]);