1 line
14 KiB
JavaScript
1 line
14 KiB
JavaScript
"use strict";require("./common"),require("./vendors"),require("./taro"),require("./runtime"),(wx.webpackJsonp=wx.webpackJsonp||[]).push([[2143],{8153:function(e,t,n){n(7488);var r=n(2180),o=n(8744),a=n(2954),i=n.n(a),s=n(5998),u=n(1002),c=n(1413);var d="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 t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function miniKindOf(e){if(void 0===e)return"undefined";if(null===e)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(function isDate(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function isError(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";var n=function ctorName(e){return"function"==typeof e.constructor?e.constructor.name:null}(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}function kindOf(e){return miniKindOf(e)}function createStore(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function. Instead, received: '"+kindOf(n)+"'");return n(createStore)(e,t)}if("function"!=typeof e)throw new Error("Expected the root reducer to be a function. Instead, received: '"+kindOf(e)+"'");var o=e,a=t,i=[],s=i,u=!1;function ensureCanMutateNextListeners(){s===i&&(s=i.slice())}function getState(){if(u)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return a}function subscribe(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function. Instead, received: '"+kindOf(e)+"'");if(u)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var t=!0;return ensureCanMutateNextListeners(),s.push(e),function unsubscribe(){if(t){if(u)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");t=!1,ensureCanMutateNextListeners();var n=s.indexOf(e);s.splice(n,1),i=null}}}function dispatch(e){if(!isPlainObject(e))throw new Error("Actions must be plain objects. Instead, the actual type was: '"+kindOf(e)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(u)throw new Error("Reducers may not dispatch actions.");try{u=!0,a=o(a,e)}finally{u=!1}for(var t=i=s,n=0;n<t.length;n++){(0,t[n])()}return e}return dispatch({type:l.INIT}),(r={dispatch:dispatch,subscribe:subscribe,getState:getState,replaceReducer:function replaceReducer(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function. Instead, received: '"+kindOf(e));o=e,dispatch({type:l.REPLACE})}})[d]=function observable(){var e,t=subscribe;return(e={subscribe:function subscribe(e){if("object"!=typeof e||null===e)throw new Error("Expected the observer to be an object. Instead, received: '"+kindOf(e)+"'");function observeState(){e.next&&e.next(getState())}return observeState(),{unsubscribe:t(observeState)}}})[d]=function(){return this},e},r}function warning(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}function compose(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function createThunkMiddleware(e){return function middleware(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"==typeof o?o(n,r,e):t(o)}}}}var f=createThunkMiddleware();f.withExtraArgument=createThunkMiddleware;var g=f,h=n(1660),y={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},S="storage_shopcount",v={shopCount:i().getStorageSync(S)?JSON.parse(i().getStorageSync(S)).shopCount:0},x=function combineReducers(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];void 0===e[o]&&warning('No reducer provided for key "'+o+'"'),"function"==typeof e[o]&&(n[o]=e[o])}var a,i,s=Object.keys(n);a={};try{!function assertReducerShape(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:l.INIT}))throw new Error('The slice reducer for key "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:l.PROBE_UNKNOWN_ACTION()}))throw new Error('The slice reducer for key "'+t+"\" returned undefined when probed with a random type. Don't try to handle '"+l.INIT+'\' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(n)}catch(e){i=e}return function combination(e,t){if(void 0===e&&(e={}),i)throw i;var r=function getUnexpectedStateShapeWarningMessage(e,t,n,r){var o=Object.keys(t),a=n&&n.type===l.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(0===o.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!isPlainObject(e))return"The "+a+' has unexpected type of "'+kindOf(e)+'". Expected argument to be an object with the following keys: "'+o.join('", "')+'"';var i=Object.keys(e).filter((function(e){return!t.hasOwnProperty(e)&&!r[e]}));return i.forEach((function(e){r[e]=!0})),n&&n.type===l.REPLACE?void 0:i.length>0?"Unexpected "+(i.length>1?"keys":"key")+' "'+i.join('", "')+'" found in '+a+'. Expected to find one of the known reducer keys instead: "'+o.join('", "')+'". Unexpected keys will be ignored.':void 0}(e,n,t,a);r&&warning(r);for(var o=!1,u={},c=0;c<s.length;c++){var d=s[c],p=n[d],f=e[d],g=p(f,t);if(void 0===g){var h=t&&t.type;throw new Error("When called with an action of type "+(h?'"'+String(h)+'"':"(unknown type)")+', the slice reducer for key "'+d+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.')}u[d]=g,o=o||g!==f}return(o=o||s.length!==Object.keys(e).length)?u:e}}({userInfoData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.data;switch(n){case h.S.SET_USERINFO:return i().setStorageSync("userInfo",JSON.stringify(null==r?void 0:r.userInfo)),(0,c.Z)((0,c.Z)({},e),r);case h.S.SET_ADMINUSERINFO:return i().setStorageSync("adminUserInfo",JSON.stringify(null==r?void 0:r.adminUserInfo)),(0,c.Z)((0,c.Z)({},e),r);case h.S.SET_TOKEN:return i().setStorageSync("token",null==r?void 0:r.token),(0,c.Z)((0,c.Z)({},e),r);case h.S.SET_SESSIONKEY:return i().setStorageSync("session_key",null==r?void 0:r.session_key),(0,c.Z)((0,c.Z)({},e),r);case h.S.SET_SORTCODE:return i().setStorageSync("sort_code",JSON.stringify(null==r?void 0:r.sort_code)),(0,c.Z)((0,c.Z)({},e),r);case h.S.CLEAR_TOKEN:return i().removeStorageSync("token"),(0,c.Z)((0,c.Z)({},e),{},{token:""});case h.S.CLEAR_SESSIONKEY:return i().removeStorageSync("session_key"),(0,c.Z)((0,c.Z)({},e),{},{session_key:""});case h.S.CLEAR_USERINFO:return i().removeStorageSync("userInfo"),(0,c.Z)((0,c.Z)({},e),{},{userInfo:null});case h.S.CLEAR_ADMINUSERINFO:return i().removeStorageSync("adminUserInfo"),(0,c.Z)((0,c.Z)({},e),{},{adminUserInfo:null});case h.S.CLEAR_SORTCODE:return i().removeStorageSync("sort_code"),(0,c.Z)((0,c.Z)({},e),{},{sortCode:null});case h.S.LOGIN_STATUS:return(0,c.Z)((0,c.Z)({},e),r);default:return e}},commonData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.data;switch(n){case"set_shopCount":return i().setStorageSync(S,JSON.stringify(null==r?void 0:r.shopCount)),(0,c.Z)((0,c.Z)({},e),r);case"clear_shopCount":return i().removeStorageSync(S),(0,c.Z)((0,c.Z)({},e),{},{shopCount:0});default:return e}},tabBarData:n(8932).ZP}),m=n(2180).window;var w=("object"===(void 0===m?"undefined":(0,u.Z)(m))&&m.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?m.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}):compose)(function applyMiddleware(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function dispatch(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},o={getState:n.getState,dispatch:function dispatch(){return r.apply(void 0,arguments)}},a=t.map((function(e){return e(o)}));return r=compose.apply(void 0,a)(n.dispatch),(0,c.Z)((0,c.Z)({},n),{},{dispatch:r})}}}.apply(void 0,[g]));var b=n(7227),E=n(1894),O=n(5893),k=function configStore(){return createStore(x,w)}(),I=function App(e){var t=e.children;return i().showShareMenu({withShareTicket:!0}),(0,b.WL)(),(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(t){t.confirm&&e.applyUpdate()}})})),e.onUpdateFailed((function(){console.log("新版本更新失败")}))})),(0,O.jsx)(E.Z,{children:(0,O.jsx)(s.zt,{store:k,children:t})})},C=n(7294),N=n(8967),_={pages:["pages/index/index","pages/order/index","pages/shopping/index","pages/user/index","pages/login/index"],window:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#fff",navigationBarTitleText:"WeChat",navigationBarTextStyle:"black",backgroundColor:"#ffffff"},tabBar:{custom:!0,list:[{pagePath:"pages/index/index",text:"首页"},{pagePath:"pages/shopping/index",text:"购物"},{pagePath:"pages/order/index",text:"订单"},{pagePath:"pages/user/index",text:"我的"}],color:"#707070",selectedColor:"#2680EB",backgroundColor:"#fff",borderStyle:"white"},usingComponents:{"custom-wrapper":"/custom-wrapper"},subPackages:[{root:"pages/orderWarningAnalysis",pages:["index","orderWarningAnalysisDetail/index"]},{root:"pages/wareHousePage",pages:["index"]},{root:"pages/clauseDetail",pages:["index"]},{root:"pages/sampleCutting",pages:["index","addSampleCutting/index","sampleCuttingList/index","sampleCuttingDetail/index"]},{root:"pages/getColorCard",pages:["index","addColorCard/index","colorCardList/index","colorCardDetail/index"]},{root:"pages/inviteCode",pages:["index"]},{root:"pages/saleStatistic",pages:["index"]},{root:"pages/takeDelivery",pages:["index"]},{root:"pages/takeDeliveryDetail",pages:["index"]},{root:"pages/delivery",pages:["index"]},{root:"pages/deliveryDetail",pages:["index"]},{root:"pages/colorRelated",pages:["sampleComparison/index","takeColor/index","findColor/index"]},{root:"pages/addAddress",pages:["index"]},{root:"pages/addressManager",pages:["index"]},{root:"pages/customerPage",pages:["index"]},{root:"pages/orderDetails",pages:["index"]},{root:"pages/saleuserPage",pages:["index"]},{root:"pages/searchPage",pages:["index"]},{root:"pages/submitOrder",pages:["index"]},{root:"pages/refundPage",pages:["index"]},{root:"pages/refundDetail",pages:["index"]},{root:"pages/refundMoneyDetail",pages:["index"]},{root:"pages/applyGoods",pages:["index"]},{root:"pages/applyMoney",pages:["index"]},{root:"pages/newCollection",pages:["index"]},{root:"pages/addCollection",pages:["index"]},{root:"pages/accountPage",pages:["index"]},{root:"pages/collectionDetail",pages:["index"]},{root:"pages/customerManagement",pages:["index"]},{root:"pages/customerDetails",pages:["index"]},{root:"pages/customerEditor",pages:["index"]},{root:"pages/orderEdit",pages:["index"]},{root:"pages/addFabric",pages:["index"]}]};r.window.__taroAppConfig=_;App((0,o.Ox)(I,C,N.ZP,_));(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 t=8153,e(e.s=t);var t}));e.O()}]); |