Merge branch 'feature/task1.0.0' into 'msb_test'

Feature/task1.0.0

See merge request yanxuan-frontend/shop-pc!57
merge-requests/59/merge
肖广 3 years ago
commit 10f2033592

@ -107,10 +107,9 @@ export default {
}, },
set(val) { set(val) {
if (!val) { if (!val) {
Object.assign(this.form, { this.$refs.ruleForm.resetFields();
phone: "", this.isAcceptAgreement = false;
verificationCode: "", this.countDown = 0;
});
} }
this.$emit("update:visible", val); this.$emit("update:visible", val);
}, },

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-05-08 17:48:36 * @Date: 2022-05-08 17:48:36
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-05-10 12:19:04 * @LastEditTime: 2022-05-12 19:42:49
* @Description: file content * @Description: file content
--> -->
<template> <template>

@ -2,12 +2,13 @@
* @Author: ch * @Author: ch
* @Date: 2022-05-03 22:41:15 * @Date: 2022-05-03 22:41:15
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-05-12 18:11:55 * @LastEditTime: 2022-05-12 19:40:43
* @Description: file content * @Description: file content
--> -->
<template> <template>
<div> <div>
<UiEmpty v-if="!isLoading && !list.length" desc="购物车空空如也,去挑点喜欢的好货吧~" :icon="require('@/assets/img/cart/empty.png')"> <UiEmpty v-if="!isLoading && !list.length" desc="购物车空空如也,去挑点喜欢的好货吧~"
:icon="require('@/assets/img/cart/empty.png')">
<UiButton type="grey" @click="$router.push('/')"></UiButton> <UiButton type="grey" @click="$router.push('/')"></UiButton>
</UiEmpty> </UiEmpty>
<UiLoading v-if="isLoading" ></UiLoading> <UiLoading v-if="isLoading" ></UiLoading>
@ -32,22 +33,21 @@
<tbody> <tbody>
<tr v-for="item in list" :key="item.id" :class="item.status !== 'normal' && 'disable'"> <tr v-for="item in list" :key="item.id" :class="item.status !== 'normal' && 'disable'">
<td width="50"> <td width="50">
<el-checkbox v-if="item.status === 'normal'" :label="item.id" class="checkbox"></el-checkbox> <el-checkbox v-if="item.status === 'normal'" :label="item.id" class="checkbox" />
<span v-else class="tag">失效</span> <span v-else class="tag">失效</span>
</td> </td>
<td> <td>
<UIGoodsInfo :goods="item"></UIGoodsInfo> <UIGoodsInfo :goods="item" />
</td> </td>
<td width="115"> <td width="115">
<UiMoney :money="item.productSku ? item.productSku.sellPrice : 0"></UiMoney> <UiMoney :money="item.productSku ? item.productSku.sellPrice : 0" />
</td> </td>
<td width="115"> <td width="115">
<el-input-number :value="item.number" @change="onChangeStepper($event, item)" <el-input-number :value="item.number" @change="onChangeStepper($event, item)"
:min="1" :max="item.maxBuyNum" size="mini"> :min="1" :max="item.maxBuyNum" size="mini" />
</el-input-number>
</td> </td>
<td width="115"> <td width="115">
<UiMoney :money="item.totalPrice"></UiMoney> <UiMoney :money="item.totalPrice" />
</td> </td>
<td width="115"> <td width="115">
<a @click="handleDelete(item.id)" class="del">删除</a> <a @click="handleDelete(item.id)" class="del">删除</a>
@ -58,15 +58,15 @@
</el-checkbox-group> </el-checkbox-group>
<div class="operation"> <div class="operation">
<div> <div>
<el-checkbox label="全选" @change="handleCheckAll" <el-checkbox label="全选" @change="handleCheckAll" v-model="checkAll" :indeterminate="isIndeterminate" />
v-model="checkAll" :indeterminate="isIndeterminate"></el-checkbox>
<a @click="handleDelete()" class="operation--del">批量删除</a> <a @click="handleDelete()" class="operation--del">批量删除</a>
</div> </div>
<div class="operation--right"> <div class="operation--right">
<p>已选<span class="operation--count">{{checkedIds.length}}</span></p> <p>已选<span class="operation--count">{{checkedIds.length}}</span></p>
<p class="operation--total">总计 <p class="operation--total">
<UiMoney class="operation--total-price" :money="totalPrice" 总计
size="20px" float prefix preSize="14px"/> <UiMoney class="operation--total-price" size="20px" float prefix preSize="14px"
:money="totalPrice"/>
</p> </p>
<UiButton class="operation--settlement" @click="settlement" :disabled="!checkedIds.length">去结算</UiButton> <UiButton class="operation--settlement" @click="settlement" :disabled="!checkedIds.length">去结算</UiButton>
</div> </div>

@ -23,7 +23,7 @@ export default function ({$axios, store, route}, inject) {
return result.data; return result.data;
} }
if(result.code === 'TOKEN_FAIL'){ if(result.code === 'TOKEN_FAIL'){
await store.dispatch('logout'); await store.commit('setLoginOut');
store.commit('setLoginVisible'); store.commit('setLoginVisible');
return result; return result;
} }

Loading…
Cancel
Save