【类 型】:refactor
【主 题】:vux 用comit形式赋值 【描 述】: [原因]:符合vue代码规范 [过程]: [影响]: 【结 束】 # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动
This commit is contained in:
parent
2e4184429a
commit
1645e9c70b
@ -72,10 +72,10 @@
|
|||||||
<view v-else class="bg-m rad16 flex" style="height: 108rpx;">
|
<view v-else class="bg-m rad16 flex" style="height: 108rpx;">
|
||||||
<view class="flex md p-b-12">
|
<view class="flex md p-b-12">
|
||||||
<u--image src="/static/icons/planeBox-100.svg" width="136rpx" height="136rpx"
|
<u--image src="/static/icons/planeBox-100.svg" width="136rpx" height="136rpx"
|
||||||
@click="$store.state.cartShow = !$store.state.cartShow" />
|
@click="$store.commit('setCartShow',!$store.state.cartShow)" />
|
||||||
</view>
|
</view>
|
||||||
<view class="fci fz36 flex1 flex msb">
|
<view class="fci fz36 flex1 flex msb">
|
||||||
<view class="flex1 p-l-12 flex column mc" @click="$store.state.cartShow = !$store.state.cartShow">
|
<view class="flex1 p-l-12 flex column mc" @click="$store.commit('setCartShow',!$store.state.cartShow)">
|
||||||
<view class="fz36 fb">¥{{total | formatPrice}}</view>
|
<view class="fz36 fb">¥{{total | formatPrice}}</view>
|
||||||
<view class="fz24" v-if="minimumOrderDifference>0">还差¥{{minimumOrderDifference | formatPrice}}起送
|
<view class="fz24" v-if="minimumOrderDifference>0">还差¥{{minimumOrderDifference | formatPrice}}起送
|
||||||
</view>
|
</view>
|
||||||
|
@ -43,6 +43,10 @@ const store = new Vuex.Store({
|
|||||||
},
|
},
|
||||||
//修改状态
|
//修改状态
|
||||||
mutations: {
|
mutations: {
|
||||||
|
//设置 列表页 购物车折叠显隐
|
||||||
|
setCartShow(state,val){
|
||||||
|
Vue.set(state,'cartShow', val)
|
||||||
|
},
|
||||||
//设置 标记用户登录状态
|
//设置 标记用户登录状态
|
||||||
setMqttState(state,val){
|
setMqttState(state,val){
|
||||||
Vue.set(state,'mqttState', val)
|
Vue.set(state,'mqttState', val)
|
||||||
|
Loading…
Reference in New Issue
Block a user