From e2de69c7974cdf59257f3cd436713775f6e6e589 Mon Sep 17 00:00:00 2001 From: dengxiongfei Date: Thu, 6 Jan 2022 22:33:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=85=A8=E5=B1=80=20userInfo?= =?UTF-8?q?\supplierInfo=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E6=8E=88=E4=BF=A1=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/clientCreditApi.js | 9 + apis/commonApi.js | 29 +- common/css/reset.scss | 2 +- .../qn-data-picker => }/keypress.js | 0 .../qn-data-picker => }/qn-data-picker.vue | 2 +- .../qn-data-pickerview/qn-data-picker.js | 0 .../qn-data-pickerview/qn-data-pickerview.vue | 0 components/qn-form/qn-form.vue | 84 +++++ pages.json | 335 ++++++++++-------- pages/add-user/index.vue | 2 +- pages/client-credit-limit/index.vue | 0 pages/client-credit-list/index.vue | 0 pages/client-credit/index.vue | 267 ++++++++++++++ pages/client-signing/index.vue | 0 pages/login/index.vue | 15 + pages/mine/index.vue | 6 +- static/imgs/client-credit/fs-credit-icon.png | Bin 0 -> 922 bytes .../imgs/client-credit/month-credit-icon.png | Bin 0 -> 1114 bytes static/imgs/client-credit/selected-icon.png | Bin 0 -> 1169 bytes store/index.js | 72 ++++ 20 files changed, 662 insertions(+), 161 deletions(-) create mode 100644 apis/clientCreditApi.js rename components/qn-data-picker/{components/qn-data-picker => }/keypress.js (100%) rename components/qn-data-picker/{components/qn-data-picker => }/qn-data-picker.vue (99%) rename components/{qn-data-picker/components => }/qn-data-pickerview/qn-data-picker.js (100%) rename components/{qn-data-picker/components => }/qn-data-pickerview/qn-data-pickerview.vue (100%) create mode 100644 components/qn-form/qn-form.vue create mode 100644 pages/client-credit-limit/index.vue create mode 100644 pages/client-credit-list/index.vue create mode 100644 pages/client-credit/index.vue create mode 100644 pages/client-signing/index.vue create mode 100644 static/imgs/client-credit/fs-credit-icon.png create mode 100644 static/imgs/client-credit/month-credit-icon.png create mode 100644 static/imgs/client-credit/selected-icon.png diff --git a/apis/clientCreditApi.js b/apis/clientCreditApi.js new file mode 100644 index 0000000..c1c30d4 --- /dev/null +++ b/apis/clientCreditApi.js @@ -0,0 +1,9 @@ +import http from '../utils/http/index.js' + +// 根据名称模糊查询企业列表 +export function getCompanyList(data) { + return http.get({ + url: '/base-paper-trading/get/customers/enterprise/basic/list', + data + }) +} diff --git a/apis/commonApi.js b/apis/commonApi.js index b6f2bf2..1a07f27 100644 --- a/apis/commonApi.js +++ b/apis/commonApi.js @@ -1,6 +1,9 @@ import http from '../utils/http/index.js' let areaCache = null -// 获取省市区 +/** + * 获取省市区街道 + * @returns array + */ export function getArea(data = {}) { return new Promise((resolve, reject) => { if (areaCache) { @@ -17,3 +20,27 @@ export function getArea(data = {}) { } }) } + +let baseInfo = null +/** + * 获取当前账号的基础信息 + * @param {object} data 参数,暂时不需要,可以传{} + * @param {boolean} refresh 是否强制刷新,默认false拿缓存数据 + * @returns object + */ +export function getBaseInfo(data = {}, refresh = false) { + return new Promise((resolve, reject) => { + if (!refresh && baseInfo) { + resolve(baseInfo) + } else { + http.get({ url: '/yyt-uec/get/base-info', data }, { hideLoading: true }).then((res) => { + if (res) { + baseInfo = res + resolve(res) + } else { + resolve(null) + } + }) + } + }) +} diff --git a/common/css/reset.scss b/common/css/reset.scss index ca1fcb7..6204afe 100644 --- a/common/css/reset.scss +++ b/common/css/reset.scss @@ -1,7 +1,7 @@ page { font-size: $uni-font-size-base; line-height: 1; - background-color: #fff; + background-color: #f7f8fa; -webkit-overflow-scrolling: touch; /* 使ios列表滑动流畅*/ } diff --git a/components/qn-data-picker/components/qn-data-picker/keypress.js b/components/qn-data-picker/keypress.js similarity index 100% rename from components/qn-data-picker/components/qn-data-picker/keypress.js rename to components/qn-data-picker/keypress.js diff --git a/components/qn-data-picker/components/qn-data-picker/qn-data-picker.vue b/components/qn-data-picker/qn-data-picker.vue similarity index 99% rename from components/qn-data-picker/components/qn-data-picker/qn-data-picker.vue rename to components/qn-data-picker/qn-data-picker.vue index de01cc3..56a5b22 100644 --- a/components/qn-data-picker/components/qn-data-picker/qn-data-picker.vue +++ b/components/qn-data-picker/qn-data-picker.vue @@ -94,7 +94,7 @@ const styleEnum = { right: 'flex-end' } export default { - name: 'UniDataPicker', + name: 'qnDataPicker', emits: ['popupopened', 'popupclosed', 'nodeclick', 'input', 'change', 'update:modelValue'], mixins: [dataPicker], components: { diff --git a/components/qn-data-picker/components/qn-data-pickerview/qn-data-picker.js b/components/qn-data-pickerview/qn-data-picker.js similarity index 100% rename from components/qn-data-picker/components/qn-data-pickerview/qn-data-picker.js rename to components/qn-data-pickerview/qn-data-picker.js diff --git a/components/qn-data-picker/components/qn-data-pickerview/qn-data-pickerview.vue b/components/qn-data-pickerview/qn-data-pickerview.vue similarity index 100% rename from components/qn-data-picker/components/qn-data-pickerview/qn-data-pickerview.vue rename to components/qn-data-pickerview/qn-data-pickerview.vue diff --git a/components/qn-form/qn-form.vue b/components/qn-form/qn-form.vue new file mode 100644 index 0000000..4b75a5e --- /dev/null +++ b/components/qn-form/qn-form.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/pages.json b/pages.json index a911a82..3ea8906 100644 --- a/pages.json +++ b/pages.json @@ -1,157 +1,182 @@ { - "pages": [ - //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages - - { - "path": "pages/client/index", - "style": { - "navigationBarTitleText": "客户", - "navigationStyle": "custom" - } - }, - { - "path": "pages/client-list/index", - "style": { - "navigationBarTitleText": "客户列表", - "navigationStyle": "custom" - } - }, - { - "path": "pages/search/index", - "style": { - "navigationBarTitleText": "客户搜索", - "navigationStyle": "custom" - } - }, - { - "path": "pages/add-user/index", - "style": { - "navigationBarTitleText": "添加客户", - "navigationStyle": "custom" - } - }, - { - "path": "pages/trade/index", - "style": { - "navigationBarTitleText": "交易", - "navigationStyle": "custom" - } - }, - { - "path": "pages/mall/index", - "style": { - "navigationBarTitleText": "商城" - } - }, - { - "path": "pages/mine/index", - "style": { - "navigationBarTitleText": "我的" - } - }, - { - "path": "pages/login/index", - "style": { - "navigationBarTitleText": "登录", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - }, - { - "path": "pages/agreement/index", - "style": { - "navigationBarTitleText": "用户与隐私协议" - } - }, - { - "path": "pages/client-detail/index", - "style": { - "navigationBarTitleText": "客户详情", - "navigationStyle": "custom" - } - } - ,{ - "path" : "components/not-logged/not-logged", - "style" : - { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - - } - ,{ - "path" : "pages/trade/quotationList", - "style" : - { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - - } - ,{ - "path" : "pages/trade/orderList", - "style" : - { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - - } - ,{ - "path" : "pages/trade/my-offer", - "style" : - { - "navigationBarTitleText": "我的报价", - "enablePullDownRefresh": false - } - - } - ], - "globalStyle": { - "navigationBarTextStyle": "black", - "navigationBarTitleText": "uni-app", - "navigationBarBackgroundColor": "#F8F8F8", - "backgroundColor": "#F8F8F8", - "backgroundColorTop": "#FFFFFF" - }, - "tabBar": { - "color": "#888", - "selectedColor": "#007AFF", - "borderStyle": "white", - "backgroundColor": "#f9f9f9", - "list": [{ - "pagePath": "pages/client/index", - "iconPath": "static/imgs/tabbar/client-gray.png", - "selectedIconPath": "static/imgs/tabbar/client-blue.png", - "text": "客户" - }, - { - "pagePath": "pages/trade/index", - "iconPath": "static/imgs/tabbar/trade-gray.png", - "selectedIconPath": "static/imgs/tabbar/trade-blue.png", - "text": "交易" - }, - { - "pagePath": "pages/mall/index", - "iconPath": "static/imgs/tabbar/mall-gray.png", - "selectedIconPath": "static/imgs/tabbar/mall-blue.png", - "text": "纸商城" - }, - { - "pagePath": "pages/mine/index", - "iconPath": "static/imgs/tabbar/mine-gray.png", - "selectedIconPath": "static/imgs/tabbar/mine-blue.png", - "text": "我的" - } - ] - }, - "condition": { - //模式配置,仅开发期间生效 - "current": 0, //当前激活的模式(list 的索引项) - "list": [{ - "name": "", //模式名称 - "path": "", //启动页面,必选 - "query": "" //启动参数,在页面的onLoad函数里面得到 - }] - } + "pages": [ + { + "path": "pages/client/index", + "style": { + "navigationBarTitleText": "客户", + "navigationStyle": "custom" + } + }, + { + "path": "pages/client-list/index", + "style": { + "navigationBarTitleText": "客户列表", + "navigationStyle": "custom" + } + }, + { + "path": "pages/search/index", + "style": { + "navigationBarTitleText": "客户搜索", + "navigationStyle": "custom" + } + }, + { + "path": "pages/add-user/index", + "style": { + "navigationBarTitleText": "添加客户", + "navigationStyle": "custom" + } + }, + { + "path": "pages/trade/index", + "style": { + "navigationBarTitleText": "交易", + "navigationStyle": "custom" + } + }, + { + "path": "pages/mall/index", + "style": { + "navigationBarTitleText": "商城" + } + }, + { + "path": "pages/mine/index", + "style": { + "navigationBarTitleText": "我的" + } + }, + { + "path": "pages/login/index", + "style": { + "navigationBarTitleText": "登录", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, + { + "path": "pages/agreement/index", + "style": { + "navigationBarTitleText": "用户与隐私协议" + } + }, + { + "path": "pages/client-detail/index", + "style": { + "navigationBarTitleText": "客户详情", + "navigationStyle": "custom" + } + }, + { + "path": "pages/client-credit/index", + "style": { + "navigationBarTitleText": "客户授信", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/client-signing/index", + "style": { + "navigationBarTitleText": "客户签约", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/client-credit-limit/index", + "style": { + "navigationBarTitleText": "授信额度", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/client-credit-list/index", + "style": { + "navigationBarTitleText": "客户授信列表", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + }, + { + "path": "components/not-logged/not-logged", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/trade/quotationList", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/trade/orderList", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/trade/my-offer", + "style": { + "navigationBarTitleText": "我的报价", + "enablePullDownRefresh": false + } + } + ], + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "uni-app", + "navigationBarBackgroundColor": "#F8F8F8", + "backgroundColor": "#F8F8F8", + "backgroundColorTop": "#FFFFFF" + }, + "tabBar": { + "color": "#888", + "selectedColor": "#007AFF", + "borderStyle": "white", + "backgroundColor": "#f9f9f9", + "list": [ + { + "pagePath": "pages/client/index", + "iconPath": "static/imgs/tabbar/client-gray.png", + "selectedIconPath": "static/imgs/tabbar/client-blue.png", + "text": "客户" + }, + { + "pagePath": "pages/trade/index", + "iconPath": "static/imgs/tabbar/trade-gray.png", + "selectedIconPath": "static/imgs/tabbar/trade-blue.png", + "text": "交易" + }, + { + "pagePath": "pages/mall/index", + "iconPath": "static/imgs/tabbar/mall-gray.png", + "selectedIconPath": "static/imgs/tabbar/mall-blue.png", + "text": "纸商城" + }, + { + "pagePath": "pages/mine/index", + "iconPath": "static/imgs/tabbar/mine-gray.png", + "selectedIconPath": "static/imgs/tabbar/mine-blue.png", + "text": "我的" + } + ] + }, + "condition": { + //模式配置,仅开发期间生效 + "current": 0, //当前激活的模式(list 的索引项) + "list": [ + { + "name": "", //模式名称 + "path": "", //启动页面,必选 + "query": "" //启动参数,在页面的onLoad函数里面得到 + } + ] + } } diff --git a/pages/add-user/index.vue b/pages/add-user/index.vue index c77a674..7bde349 100644 --- a/pages/add-user/index.vue +++ b/pages/add-user/index.vue @@ -257,7 +257,7 @@ import { back, uploadImage } from '@/utils/hook.js' import { getArea } from '@/apis/commonApi.js' import { getCompanyList, getCompanyInfoById, addCustomer } from '@/apis/addUserApi.js' import qnEasyinput from '@/components/qn-easyinput/qn-easyinput.vue' -import qnDataPicker from '@/components/qn-data-picker/components/qn-data-picker/qn-data-picker.vue' +import qnDataPicker from '@/components/qn-data-picker/qn-data-picker.vue' import qnDatetimePicker from '@/components/qn-datetime-picker/qn-datetime-picker.vue' import qnFooter from '@/components/qn-footer/qn-footer.vue' const validateFields = [ diff --git a/pages/client-credit-limit/index.vue b/pages/client-credit-limit/index.vue new file mode 100644 index 0000000..e69de29 diff --git a/pages/client-credit-list/index.vue b/pages/client-credit-list/index.vue new file mode 100644 index 0000000..e69de29 diff --git a/pages/client-credit/index.vue b/pages/client-credit/index.vue new file mode 100644 index 0000000..e9ffbcf --- /dev/null +++ b/pages/client-credit/index.vue @@ -0,0 +1,267 @@ + + + + + diff --git a/pages/client-signing/index.vue b/pages/client-signing/index.vue new file mode 100644 index 0000000..e69de29 diff --git a/pages/login/index.vue b/pages/login/index.vue index 2642882..fa4315a 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -44,6 +44,7 @@ diff --git a/static/imgs/client-credit/fs-credit-icon.png b/static/imgs/client-credit/fs-credit-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..f9caf9ba5b10f3a3c6869704f11eb1bed43bcfb5 GIT binary patch literal 922 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpTC#^NA%Cx&(BWL^R}E~ycoX}-P; zT0k}j17mw80}DtA5K93u0|WB{Mh0de%?J`(zyy~ySip>6gB0F2&*1?oXYq7#49Q@9 z8|j@b;wZ2#PCi4agX3dk(*sXO7gvr~^#KBVJ7#ouv@67wJ4>(@3+lVsvK(O*bz#xB z)9Z4y;kHv?|EM5mqtVIXWU%9H`0m@U-}sf^zPs6Y^C1zD+p(dsUu&;kww=uzsF})s zito>LSpl{$)(P{Q)*1i!Y^J{;LDcGb)DK0brwy9PULLB6nUZWvKNnU+`J8?%*!I!= zM!aNANZ@bv+^c`}=J@?9h3(Y;vfxPjy`%?KCm{6Lio^Svrl4(NwGw72}Z^vL<*86D3oSD38lUUb{zP$f`` zp}cGT#Y3uJ1k@Ydi;R6wD0{kZoAys&#mT@s&c;_3FrO=k_qbR4b+rfc^iTQEw{ARe z!F|P4C$C2Kmm+Fw>OS@GB{wR4=&vun!9~6z$K5N{-j_aG*0?0JVC~x- z+Fv#qf0Jo>e?Z80@wIL9s{XL%JNN5ahSsL{FW}$O`cAF+j?Tk$hfAU&^UJjtcTW1k zeEm7I)WSk5<(hj>Vox3_Pw?8a++*Icv$BmR)}@7czR&2;D-XTk`{QV+Xnd(&e6$7Q zI+4!GUHa!QOIvl{41A&F+j0KQDep^y2~*bIek|pC$}*AUFp3p9ZeAkZ{-%<+Dt7#Wv22 t|7(L8EZNo@hz9J_i7Z?2#vx7i2eYlhT$NqiPd0$^g{P~Z%Q~loCIIB2eMkTR literal 0 HcmV?d00001 diff --git a/static/imgs/client-credit/month-credit-icon.png b/static/imgs/client-credit/month-credit-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..f9df5e3ea44d1d482e1cb18b1521cc1826d78d66 GIT binary patch literal 1114 zcmV-g1f~0lP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91FrWhf1ONa40RR91FaQ7m0NXcg3;+NF#7RU!RA>e5SzU;YK^UInSY-Vr z7g!fc5|T)Y3)w5VK#@yzT47@^*eh<3*eeo6Emz`#A{!}*b%;{RPb9VL0wE+xBJ3W| zbL_kOo;lyoeBXZG+30)f*?DK?op;`MX1V|-YTat7^%umISm4)n7<9(7B>A}B$8fjk-X1=qYN)A_-`B>)%uqoDL06u(+@ zqhUG&d9KQzQnHIU0ZJ=Cj;bFxTa6%hC|CS|;yIrDo?}L*- z8zWJ01?&X7!HJ+Nv@c_IBRc?H7e(eYi_`NVb0d&E?XbQBT*(Z;e3Ssnja>f7I%BG5 z!=>#ODCzdx1SH?1WR@KSqo5heV(Uy$Ls4QHH2~V(3Thi(@?k1QM9l)AUqL~{ah^77 z8h~FAah)HM03-GP4kSFK$l=?7f20)*AVIxyRya3uub>^j+ zW%7ZiuDjED(__Y&F4LO(?%wFHX1oAinKoSE78$PaBtSc#%o}sFR4|P>o*&MLdlJuf z?!jHL0Y9HAt_dzpW>@aB6vR#S$r?ux9mX2Eg0qY4932Bdv(yeFNd%(0LwS3;I-xNSA{zz(kS84A{=o;b~wIOnfGi z4#3NK_+3USK_nSKkn^bpkz@ep;ias3I{ZkyM*0l=*_Y=`@cT&Q3`r^go}kP69AvT` zL zz69RDKERBe#!CWChF7*KTV8LY;T8rojwxG*28vD9yAY>ZZ~y||a)ugQY6a!QT_soj zplL(pDv$>pU(onibr#eQOUU+vv(*jW>MwB@MniQCSnty$k8(P{5u`5h5WHNL0{-kn zoh&2QbghTIuqAXcVn2LhoM-o=KMtwe4S|nT{4ib7;Hs$fqP&mtgI^3jQSHkjmx>oo zppfsF-1<0;+$OysONhIQ4Sny?vgkEI;4JwqA?`LGL4KDVApe(8b8JA5E#Qcn_ndW@ gjX*X6|HcUX0f1;Q7=et9{{R3007*qoM6N<$g7AOdmjD0& literal 0 HcmV?d00001 diff --git a/static/imgs/client-credit/selected-icon.png b/static/imgs/client-credit/selected-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..6e54dc4fa349875fee107c2195013710f2c05fb8 GIT binary patch literal 1169 zcmV;C1aA9@P)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91D4+uX1ONa40RR91C;$Ke0D9(TtN;K5`$@h^Pp&ABsd;^aCWQ z5DK>JkBTie6Z@%AuDZAH*}LPsc{B6g8+T`R4&3+dJ@?#uKb(8dxo^g?$sfnlMx(`X zOzRG5*)MRs%{-L{-HA9xPDV%L%7(N(=W3k=Dyzlt27`PfXRU~@os(j60OKT{iv+rp z&Hfqk-nd4kMeaSSj^>dOHgIwj=P`R4>93>BW_lRp*mm0)JlITZ5tc3V`_`O%*qnfN zCI?w=fZs-_o2%+s-Xg#QqOve?lR-E09B4fY{`wF8Da(Q^&XIRV1ori0z^%L-4m}QE zu7fFOS0HfA3HiqHVTJCxs%}$?eq|+`9DzGug`rB>SjoJQ5E}}3V>j$r9k#Z2H|!s* z?u!68oqalie^)n~xSqvxVb{IT(F)r>hklhL34rU}zcSj9WH=Fhmz@vq-3OiR@R_`} zZddxO0nqGnyqs=cw8$yutz?y+sjznqOjpz%(s{FUH+(96bP@1LK9TwN=|jLgG4L>a za6inOl0IT?7wnVmY`uqd&sGhJ3R4vUo%1?}TPoO;sRjx_EsROpWETE}bGh?&R9jAHxH0!Ko2gb!G78P4cQqM+@v$v@TNAnq&=%U|oEc zAM@vY2S*r?Nq5mKxwhg`cugK`7nGNKpWiR9&4gPQgmD%Wi(agfjFYFXa{q4fx9fI( zH)U)|_mcVW&OOi-+hz-jrQ4H}amhrnM(Gw8I-hcup=tvB=m!POHaL8&FiCjV8Wg3Y z!xwd27ut?q`S;Jtot3o*eu3-y;m1Eh|Ct0ueCF~q7`52!?_h*CqpB?R*`3gLGpyAf zWJ$(Jb0!1Y$c=uho)0BWQqR81XE3^A8;@$M6_=AE=^iw$yr0G}pQ@&W(pbp`XiRy3 z0Vm{1&xMUdOyA-HP2T;it-eL&r-G^x@9cm^)8`J-%C)N5P16vm4bYIxlWknzsKBWm zFhKq;PcBvU1#8w*vIj{u3QOjm?JDP0GZ~Nm%sd!fvCr*P^J { + if (userInfoParams.includes(item.key)) { + userInfo[item.key] = item.value + } + }) try { uni.setStorageSync('userInfo', JSON.stringify(userInfo)) state.userInfo = userInfo @@ -97,6 +138,37 @@ const store = new Vuex.Store({ console.error('supplierInfo必须是对象') return } + for (let i = 0; i < supplierInfoParams.length; i++) { + if (supplierInfo[supplierInfoParams[i]] === undefined) { + console.error(`supplierInfo必须包含${supplierInfoParams[i]}`) + return + } + } + try { + uni.setStorageSync('supplierInfo', JSON.stringify(supplierInfo)) + state.supplierInfo = supplierInfo + } catch (e) { + console.error('设置supplierInfo失败:', e) + } + }, + /** + * 更改当前供应商信息 + * @param {*} state 状态 + * @param {arr} map 以key-value形式存储的数组 + * @value key 需要更改的key + * @value value 更改后的值 + */ + changeSupplierInfo(state, map) { + if (!isArray(map)) { + console.error('map必须是数组') + return + } + let supplierInfo = state.supplierInfo + map.forEach((item) => { + if (supplierInfoParams.includes(item.key)) { + supplierInfo[item.key] = item.value + } + }) try { uni.setStorageSync('supplierInfo', JSON.stringify(supplierInfo)) state.supplierInfo = supplierInfo