diff --git a/src/pages/frameDetail/frameDetail.vue b/src/pages/frameDetail/frameDetail.vue index 6c24475..ddf4a80 100644 --- a/src/pages/frameDetail/frameDetail.vue +++ b/src/pages/frameDetail/frameDetail.vue @@ -308,7 +308,10 @@ @tap="toCart()" class="botton_1" > - + + + {{cartNumber}} + 购物车 @@ -396,12 +399,13 @@ export default { this.parameter[5].slength = `${this.goodInfo.weight}mm` this.tag = this.goodInfo.tag this.test = this.goodInfo.prodIntro1 - this.test = this.test.replace(/\Px)m`OxIRA>d&nOkgBMHt8T)?GE}dZAtlLaB(LV586nG^o^SB8W*bx`_$Cne9EM zCK`hw+4vxjYMNdXB0d;Jqa+4Qihx8T5U_@*#1g9#QCos&$;LMAZd-rfaE9!j-LrcR z)IFz@Ous#I`Op79^UXJBPJO<4p8UeUv9WRA?Ck8OJX+2L0)chCy}f7h)On&PP=v*; z)IVONjjPom8NIKs?@2R@cs%|pWjk1zmF7AxJzK5-u5((5B4CA=2%EVS5-?;mo}Vj_ zPN#?cet#MfOWWJqBWC4ZdA3}E{{H?HB!49bXJ%&Z^a^1!4@&_?L*+)()6<@HBNc_r zsxqEMz*B7G^+cs7`0ctY;no)jFuQwtdX5RtVghs|dX%;`(!uS-Wcu)k_NJz$1`gQ0 z1qGmXNIGCs*ci&M@qmE!aEX&&hf84r!C-KR4J@3Ov#CFFo4kzQ($cbr2pQ++J@Q;| z6L)oWT@ar`ZM3beZJ~5ZGWO&g8<ndwpe#A zmE|&3#vACnG9I)4o)H<<@U{dPMAa$)P|_2b*XR2f|7%u$EmrO)+YCO+6ui)6Hk8if zN64}dJ}0Zh?5spoKfu@PvbnP0E@I{v7cZ(cK&JOa+9@@DZiWY zhcw_^S|&x{E+S+nzqgyoOQmfAfT*1h&|}h3C+?+txSv*2AJt`ZWw{Y1D=I3^@(Pi* z!n7SxAnu3gS?r=vD0F{!clSvv&{CG$-o(tXtmpee4!_*Vtb|KR)M_l-0tBGEygY&V zk-TPPWMnU&9B=2htI4(tX_j)JumX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AP^Zg&n2-Q+vh{yK4`pKl00qK5N0r^5GKZGpE^g2EA3C0 z#2O??Rs;P3n0Ifc#qOo|R{^~36>VM>Q~L#BA8j`ol~~Bs_jNTh*9p5jVmWWtcl#(A pJ2~xg`C`tp { state.defaultInfo = data - } + }, } const actions = { @@ -28,12 +28,12 @@ const actions = { fail: () => { uni.showModal({ content: '编辑失败', - showCancel: false + showCancel: false, }) }, complete: (res) => { console.log('complete status === > ', res) - } + }, })) }, list({ commit }) { @@ -45,9 +45,9 @@ const actions = { fail: () => { uni.showModal({ content: '获取地址列表失败', - showCancel: false + showCancel: false, }) - } + }, }) }, details({ commit }, param) { @@ -58,15 +58,15 @@ const actions = { commit('DETAILS', res.data.data) resolve({ code: res.data.code, - data: res.data.data + data: res.data.data, }) }, fail: () => { uni.showModal({ content: '获取地址信息失败', - showCancel: false + showCancel: false, }) - } + }, })) }, default({ commit }, param) { @@ -76,22 +76,22 @@ const actions = { success: (res) => { resolve({ code: res.data.code, - data: res.data.data + data: res.data.data, }) }, fail: () => { uni.showModal({ content: '获取默认地址信息失败', - showCancel: false + showCancel: false, }) - } + }, })) - } + }, } export default { namespaced: true, state, mutations, - actions + actions, } diff --git a/src/store/modules/cart.js b/src/store/modules/cart.js index 86f6227..9650267 100644 --- a/src/store/modules/cart.js +++ b/src/store/modules/cart.js @@ -4,7 +4,7 @@ import request from '../request' const { cartList, cartModi, cartDel, cartAdd } = urlAlias const state = { - cartList: [] + cartList: [], } const mutations = { @@ -22,11 +22,12 @@ const mutations = { console.log('mutations====>isadd', args) state.cartList[args.index].num = args.num console.log('the num', state.cartList[args.index].num) - } + }, } const actions = { + // 获取购物车列表 getCartList({ commit }, param) { request({ url: cartList, @@ -40,10 +41,10 @@ const actions = { }, complete: (res) => { console.log('complete status === > ', res) - } + }, }) }, - + // 修改购物车数量 modiCart({ commit }, param) { const arg = Object.assign({ num: param.num }, param.args) delete param.args @@ -60,10 +61,10 @@ const actions = { }, complete: (res) => { console.log('complete status === > ', res) - } + }, }) }, - + // 删除购物车商品 delCart({ commit }, param) { const arg = param.arg delete param.arg @@ -80,10 +81,10 @@ const actions = { }, complete: (res) => { console.log('complete status === > ', res) - } + }, }) }, - + // 添加到购物车 addCart({ commit }, param) { console.log('请求接口开始') request({ @@ -99,15 +100,14 @@ const actions = { }, complete: (res) => { console.log('complete status === > ', res) - } + }, }) - } - + }, } export default { namespaced: true, state, mutations, - actions + actions, } diff --git a/src/tab-cart.png b/src/tab-cart.png new file mode 100644 index 0000000000000000000000000000000000000000..2fb3e8c24f42f5c5e2d6000b0eac029708629534 GIT binary patch literal 2915 zcmaJ@dpy(o8~?hLrpaA6(wY-pY%^xsa%nc#T<4xnY&N!bcCpQUG)f35)G?wkl2XT| zj&gD-UBoY!C`qTtEhM7TB6X(Q`Tg>1l z>E8Z)e^(c52%8Bftzh8MOpcTd0G2k<98w5_%7>7tVRV)i^mRiM6hfz1LH*2KOLhM1ZlO%W#27Y#$Au;ys2sRiWg1C@H? zQbMsrg8f%t(v=mI#^-ae2t-s=6g=mH1a?RSlgi?M<5K?R+W(Nd(h5wD)H8v~rAJaJ_FOg-@;PNJ{l~H3 zf2jABOZjmugdcJd(qIrPh5fHWf7_CF&&u?B+e#PT8=uOOb~{(v*3m|lsQ{qx$ccdS zjvkoa%lK8pN5gu2hPCysfl`t()Lui=WWT^}lPCEQ;X`6xMYp^iQf(QBlHX{9GK5HW zBUQ;=G+n2R1G~T_Y1$FP%aw1P%;jHIKks`ztM=)*-1sdQ%R4fO)=>=sd%T%pjkP3g+_aw%T zmKS!WaaBd{-X;TN*pf>^sEts6?E^>QRd8^TLo!a!`0|BAeZbs};6FwJ#B|eu9eT#s zYV7ZTTYGI1U+0$;Fde$LZ*|zA*|}qESenK+LBR+G?ZuXn z(G##)QH>1HspA|)OB$h|%Ie#F@t8kw)37^=rrH-@|1Re2%OM9`mxGOa8jmWv}!05zumEO@}U44ZI zf6c5)c>^hrPmBgy%H&$8#Ef02bmp_e1wxfqXK$2hSNq--O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