Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui

# Conflicts:
#	manager/vue.config.js
#	seller/vue.config.js
master
Chopper 2021-05-17 15:41:08 +08:00
commit a3953b9ab5
11 changed files with 56 additions and 47 deletions

View File

@ -45,14 +45,14 @@
</div> </div>
<div class="sign-out" @click="signOutFun"> <div class="sign-out" @click="signOutFun">
<Icon type="md-exit"></Icon> <Icon type="md-exit"></Icon>
<p>退出登</p> <p>退出登</p>
</div> </div>
</div> </div>
</DropdownMenu> </DropdownMenu>
</Dropdown> </Dropdown>
</li> </li>
<li class="hover-color" @click="goUserCenter('home/MyOrder')"><span class="nav-item">我的订单</span></li> <li class="hover-color" @click="goUserCenter('/home/MyOrder')"><span class="nav-item">我的订单</span></li>
<li class="hover-color" @click="goUserCenter('home/MyTracks')"><span class="nav-item">我的足迹</span></li> <li class="hover-color" @click="goUserCenter('/home/MyTracks')"><span class="nav-item">我的足迹</span></li>
<li v-if="$route.name !== 'Cart'" style="position:relative;" @mouseenter="getCartList"> <li v-if="$route.name !== 'Cart'" style="position:relative;" @mouseenter="getCartList">
<i class="cart-badge" v-show="cartNum">{{cartNum < 100 ? cartNum : '99'}}</i> <i class="cart-badge" v-show="cartNum">{{cartNum < 100 ? cartNum : '99'}}</i>
<Dropdown placement="bottom-start"> <Dropdown placement="bottom-start">
@ -83,7 +83,7 @@
</div> </div>
<div class="shopping-cart-info"> <div class="shopping-cart-info">
<div class="shopping-cart-title "> <div class="shopping-cart-title ">
<p class="hover-pointer goods-title">{{ item.goodsSku.goodsName }}</p> <p class="hover-pointer goods-title ellipsis">{{ item.goodsSku.goodsName }}</p>
</div> </div>
<div class="shopping-cart-detail"> <div class="shopping-cart-detail">
<p> <p>
@ -173,6 +173,8 @@ export default {
storage.removeItem('accessToken'); storage.removeItem('accessToken');
storage.removeItem('refreshToken'); storage.removeItem('refreshToken');
storage.removeItem('userInfo'); storage.removeItem('userInfo');
storage.removeItem('cartNum');
this.$store.commit('SET_CARTNUM', 0)
this.$router.push('/login'); this.$router.push('/login');
}, },
goUserCenter (path) { // goUserCenter (path) { //
@ -301,7 +303,7 @@ export default {
.shopping-cart-list { .shopping-cart-list {
padding: 10px 15px; padding: 10px 15px;
box-sizing: border-box; box-sizing: border-box;
height: 300px; max-height: 300px;
overflow: scroll; overflow: scroll;
} }
.shopping-cart-box { .shopping-cart-box {

View File

@ -245,6 +245,7 @@ export default {
this.$Message.success('验证码发送成功'); this.$Message.success('验证码发送成功');
let that = this; let that = this;
this.interval = setInterval(() => { this.interval = setInterval(() => {
console.log(that.time);
that.time--; that.time--;
if (that.time === 0) { if (that.time === 0) {
that.time = 60; that.time = 60;

View File

@ -193,9 +193,7 @@ export default {
components: { region }, components: { region },
props: { props: {
content: { content: {
default () { default: {},
return {};
},
type: Object type: Object
} }
}, },
@ -325,11 +323,13 @@ export default {
}, },
mounted () { mounted () {
this.accessToken.accessToken = storage.getItem('accessToken'); this.accessToken.accessToken = storage.getItem('accessToken');
this.form = JSON.parse(JSON.stringify(this.content)); if (Object.keys(this.content).length) {
if (this.form.licencePhoto) { this.form = JSON.parse(JSON.stringify(this.content));
this.form.legalPhoto = this.content.legalPhoto.split(','); if (this.form.licencePhoto) {
this.form.licencePhoto = this.content.licencePhoto.split(','); this.form.legalPhoto = this.content.legalPhoto.split(',');
this.address = this.form.addressIdPath; this.form.licencePhoto = this.content.licencePhoto.split(',');
this.address = this.form.addressIdPath;
}
} }
} }
}; };

View File

@ -9,6 +9,7 @@ import {
import Storage from './storage'; import Storage from './storage';
import config from '@/config'; import config from '@/config';
import router from '../router/index.js'; import router from '../router/index.js';
import store from '../vuex/store';
import { import {
handleRefreshToken handleRefreshToken
} from '@/api/index'; } from '@/api/index';
@ -80,7 +81,6 @@ service.interceptors.response.use(
const errorData = errorResponse.data || {}; const errorData = errorResponse.data || {};
if (errorResponse.status === 403) { if (errorResponse.status === 403) {
isRefreshToken++; isRefreshToken++;
if (isRefreshToken === 1) { if (isRefreshToken === 1) {
@ -96,6 +96,9 @@ service.interceptors.response.use(
Storage.removeItem('accessToken'); Storage.removeItem('accessToken');
Storage.removeItem('refreshToken'); Storage.removeItem('refreshToken');
Storage.removeItem('userInfo'); Storage.removeItem('userInfo');
Storage.setItem('cartNum', 0)
store.commit('SET_CARTNUM', 0)
console.log('1111');
Modal.confirm({ Modal.confirm({
title: '请登录', title: '请登录',
content: '<p>请登录后执行此操作</p>', content: '<p>请登录后执行此操作</p>',

View File

@ -18,12 +18,6 @@ module.exports = {
}, },
devServer: { devServer: {
port: 10003 port: 10003
// proxy: {
// '/lili': {
// target: 'http://127.0.0.1:8888', // 请求本地 需要lili后台项目
// ws: true
// }
// }
}, },
chainWebpack: config => { chainWebpack: config => {

View File

@ -405,7 +405,7 @@ export const result = [
type: 0, type: 0,
title: "满额活动", title: "满额活动",
path: "full-cut", path: "full-cut",
component: "promotion/fullCut/full-cut", component: "promotion/fullCut/fullCut",
icon: "md-person", icon: "md-person",
isMenu: true, isMenu: true,
url: "", url: "",

View File

@ -111,6 +111,7 @@
<script> <script>
import { getFullDiscountList, delFullDiscount } from "@/api/promotion.js"; import { getFullDiscountList, delFullDiscount } from "@/api/promotion.js";
export default { export default {
name: 'full-cut',
data() { data() {
return { return {
loading: false, // loading: false, //
@ -256,7 +257,7 @@ export default {
}); });
}, },
}, },
activated() { activated () {
this.init(); this.init();
} }
}; };

View File

@ -496,6 +496,7 @@ export default {
this.form.promotionGoodsList.splice(index, 1); this.form.promotionGoodsList.splice(index, 1);
}, },
selectedGoodsData(item) { selectedGoodsData(item) {
console.log(item);
// //
let ids = []; let ids = [];
let list = []; let list = [];
@ -509,11 +510,13 @@ export default {
price: e.price, price: e.price,
quantity: e.quantity, quantity: e.quantity,
storeId: e.storeId, storeId: e.storeId,
sellerName: e.sellerName, storeName: e.storeName,
thumbnail: e.thumbnail,
skuId: e.id, skuId: e.id,
}); });
} }
}); });
console.log(list);
this.form.promotionGoodsList.push(...list); this.form.promotionGoodsList.push(...list);
}, },
getCouponList(query) { getCouponList(query) {

View File

@ -68,9 +68,16 @@
type="info" type="info"
v-if="row.promotionStatus == 'NEW'" v-if="row.promotionStatus == 'NEW'"
size="small" size="small"
@click="manage(row)" @click="manage(row, 'manager')"
>管理</Button >管理</Button
>&nbsp; >&nbsp;
<Button
type="info"
v-if="row.promotionStatus !== 'NEW'"
size="small"
@click="manage(row, 'view')"
>查看</Button
>&nbsp;
<Button <Button
type="error" type="error"
size="small" size="small"
@ -252,8 +259,8 @@ export default {
edit(v) { edit(v) {
this.$router.push({ name: "new-pintuan", query: { id: v.id } }); this.$router.push({ name: "new-pintuan", query: { id: v.id } });
}, },
manage(v) { manage(v, status) {
this.$router.push({ name: "pintuan-goods", query: { id: v.id } }); this.$router.push({ name: "pintuan-goods", query: { id: v.id, status: status } });
}, },
open(v) { open(v) {
this.$Modal.confirm({ this.$Modal.confirm({

View File

@ -3,22 +3,19 @@
<Card> <Card>
<Table style="margin: 10px 0" border :columns="columns" :data="data"></Table> <Table style="margin: 10px 0" border :columns="columns" :data="data"></Table>
<Row class="operation"> <Row class="operation" v-if="status == 'manager'">
<Button type="primary" @click="openSkuList"></Button> <Button type="primary" @click="openSkuList"></Button>
<Button @click="delAll"></Button> <Button @click="delAll"></Button>
<Button @click="getDataList" icon="md-refresh">刷新</Button> <Button @click="getDataList" icon="md-refresh">刷新</Button>
<Button type="dashed" @click=" <Button type="dashed" @click="openTip = !openTip">{{ openTip ? "关闭提示" : "开启提示" }}</Button>
() => {
openTip = !openTip;
}
">{{ openTip ? "关闭提示" : "开启提示" }}</Button>
</Row> </Row>
<Row v-show="openTip"> <Row v-show="openTip" v-if="status == 'manager'">
<Alert show-icon> <Alert show-icon>
已选择 <span class="select-count">{{ selectCount }}</span> 已选择 <span class="select-count">{{ selectCount }}</span>
<a class="select-clear" @click="clearSelectAll"></a> <a class="select-clear" @click="clearSelectAll"></a>
</Alert> </Alert>
</Row> </Row>
<h3 class="act-goods">活动商品</h3>
<Row class="operation"> <Row class="operation">
<Table :loading="loading" border :columns="goodsColumns" :data="goodsData" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"> <Table :loading="loading" border :columns="goodsColumns" :data="goodsData" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
<template slot-scope="{ row, index }" slot="price"> <template slot-scope="{ row, index }" slot="price">
@ -35,7 +32,7 @@
</Row> </Row>
<Row class="operation"> <Row class="operation">
<Button @click="closeCurrentPage"></Button> <Button @click="closeCurrentPage"></Button>
<Button type="primary" :loading="submitLoading" @click="save"></Button> <Button v-if="status == 'manager'" type="primary" :loading="submitLoading" @click="save"></Button>
</Row> </Row>
</Card> </Card>
@ -57,8 +54,7 @@ export default {
return { return {
openTip: true, // openTip: true, //
loading: false, // loading: false, //
searchForm: { searchForm: { //
//
pageNumber: 0, // pageNumber: 0, //
pageSize: 10, // pageSize: 10, //
}, },
@ -68,6 +64,7 @@ export default {
selectCount: 0, // selectCount: 0, //
data: [], // data: [], //
total: 0, // total: 0, //
status: this.$route.query.status, //
columns: [ columns: [
{ {
title: "活动名称", title: "活动名称",
@ -326,4 +323,16 @@ export default {
.operation { .operation {
margin-bottom: 10px; margin-bottom: 10px;
} }
.act-goods {
margin: 20px 0;
font-size: 15px;
&::before{
content: '';
border: 1px solid $theme_color;
height: 10px;
font-weight: bold;
font-size: 16px;
margin-right: 5px;
}
}
</style> </style>

View File

@ -16,14 +16,7 @@ module.exports = {
} }
}, },
devServer: { devServer: {
port: 10002, port: 10002,
// proxy: {
// '/lili': {
// target: 'http://127.0.0.1:8888', // 请求本地 需要lili后台项目
// ws: true
// }
// }
}, },
chainWebpack: config => { chainWebpack: config => {
@ -76,12 +69,9 @@ module.exports = {
vendor: { vendor: {
test: /[\\/]node_modules[\\/]/, test: /[\\/]node_modules[\\/]/,
name(module) { name(module) {
// get the name. E.g. node_modules/packageName/not/this/part.js
// or node_modules/packageName
const packageName = module.context.match( const packageName = module.context.match(
/[\\/]node_modules[\\/](.*?)([\\/]|$)/ /[\\/]node_modules[\\/](.*?)([\\/]|$)/
)[1]; )[1];
// npm package names are URL-safe, but some servers don't like @ symbols
return `npm.${packageName.replace("@", "")}`; return `npm.${packageName.replace("@", "")}`;
} }
} }
@ -89,7 +79,6 @@ module.exports = {
} }
} }
}, },
pluginOptions: { pluginOptions: {
'style-resources-loader': { 'style-resources-loader': {
preProcessor: 'scss', preProcessor: 'scss',