修改buyer api路径 将buyer manager seller 统一为 public/config下修改api地址,新增buyer底部 公司,备案号等信息展示,修改商家端seller秒杀bug以及部分issue中的优化方案
parent
7cbd2b698c
commit
dbe5a21f4d
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB |
|
@ -0,0 +1,18 @@
|
||||||
|
var BASE = {
|
||||||
|
/**
|
||||||
|
* @description api请求基础路径
|
||||||
|
*/
|
||||||
|
API_DEV: {
|
||||||
|
common: "https://common-api.pickmall.cn",
|
||||||
|
buyer: "https://buyer-api.pickmall.cn",
|
||||||
|
seller: "https://store-api.pickmall.cn",
|
||||||
|
manager: "https://admin-api.pickmall.cn"
|
||||||
|
},
|
||||||
|
API_PROD: {
|
||||||
|
common: "https://common-api.pickmall.cn",
|
||||||
|
buyer: "https://buyer-api.pickmall.cn",
|
||||||
|
seller: "https://store-api.pickmall.cn",
|
||||||
|
manager: "https://admin-api.pickmall.cn"
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
|
@ -14,7 +14,9 @@
|
||||||
<% for(var js of htmlWebpackPlugin.options.cdn.js) { %>
|
<% for(var js of htmlWebpackPlugin.options.cdn.js) { %>
|
||||||
<script src="<%=js%>"></script>
|
<script src="<%=js%>"></script>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<script src="/config.js"></script>
|
||||||
<noscript>
|
<noscript>
|
||||||
|
|
||||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||||
</noscript>
|
</noscript>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 374 KiB |
|
@ -29,18 +29,38 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<div class="friend-link">
|
<div class="friend-link flex">
|
||||||
<div class="friend-link-item">
|
<div class="friend-link-item">
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="(link, index) in moreLink" :key="index" @click="goArticle">
|
<li v-for="(link, index) in moreLink" :key="index" @click="goArticle">
|
||||||
<span class="link-item" :class="{'link-last-item': index === 4}">{{link}}</span>
|
<span class="link-item" :class="{'link-last-item': index === 4}">{{link}}</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
<div class="icp">
|
||||||
|
<li v-if="config.icpCard">
|
||||||
|
<a href="https://beian.miit.gov.cn/" target="_blank">
|
||||||
|
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li v-if="config.icpMessage">
|
||||||
|
<a href="https://beian.miit.gov.cn/" target="_blank">
|
||||||
|
{{config.icpMessage}}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="information">
|
||||||
|
|
||||||
|
<a class="flex " :href="config.company.href">
|
||||||
|
<img class="zhizhao" src="@/assets/images/zhizhao.jpg" mode="" />{{config.company.title}}
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<div class="copyright">
|
<div class="copyright">
|
||||||
<p>Copyright © {{year}} LILI</p>
|
<p>Copyright © {{year}} {{config.title}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -48,28 +68,32 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import config from '@/config'
|
||||||
export default {
|
export default {
|
||||||
name: 'Footer',
|
name: "Footer",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
guideArr: [ // 导航链接
|
config,
|
||||||
[ '购物指南', '购物流程', '会员介绍', '生活旅行', '常见问题' ],
|
guideArr: [
|
||||||
[ '配送方式', '上门自提', '配送服务查询', '收取标准', '物流规则' ],
|
// 导航链接
|
||||||
[ '支付方式', '在线支付', '公司转账', '余额支付', '积分支付' ],
|
["购物指南", "购物流程", "会员介绍", "生活旅行", "常见问题"],
|
||||||
[ '售后服务', '售后政策', '退款说明', '返修/退货', '取消订单' ]
|
["配送方式", "上门自提", "配送服务查询", "收取标准", "物流规则"],
|
||||||
|
["支付方式", "在线支付", "公司转账", "余额支付", "积分支付"],
|
||||||
|
["售后服务", "售后政策", "退款说明", "返修/退货", "取消订单"],
|
||||||
],
|
],
|
||||||
moreLink: ['关于我们', '联系我们', '联系客服', '商家帮助', '隐私政策'], // 更多链接
|
moreLink: ["关于我们", "联系我们", "联系客服", "商家帮助", "隐私政策"], // 更多链接
|
||||||
year: new Date().getFullYear() // 当前年份
|
year: new Date().getFullYear(), // 当前年份
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goArticle () { // 跳转文章页
|
goArticle() {
|
||||||
|
// 跳转文章页
|
||||||
let routeUrl = this.$router.resolve({
|
let routeUrl = this.$router.resolve({
|
||||||
path: '/article'
|
path: "/article",
|
||||||
})
|
});
|
||||||
window.open(routeUrl.href, '_blank')
|
window.open(routeUrl.href, "_blank");
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -77,11 +101,9 @@ export default {
|
||||||
/*****************************底 部 开 始*****************************/
|
/*****************************底 部 开 始*****************************/
|
||||||
.footer {
|
.footer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 380px;
|
|
||||||
padding-top: 30px;
|
padding-top: 30px;
|
||||||
|
|
||||||
@include background_color($light_background_color);
|
@include background_color($light_background_color);
|
||||||
|
|
||||||
}
|
}
|
||||||
.icon-row {
|
.icon-row {
|
||||||
margin: 15px auto;
|
margin: 15px auto;
|
||||||
|
@ -112,6 +134,19 @@ export default {
|
||||||
.footer-icon-child-4 {
|
.footer-icon-child-4 {
|
||||||
background-position: 0 -129px;
|
background-position: 0 -129px;
|
||||||
}
|
}
|
||||||
|
.icp {
|
||||||
|
>*{
|
||||||
|
margin: 0 4px;
|
||||||
|
}
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.flex{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
>img{
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.footer-icon-text {
|
.footer-icon-text {
|
||||||
margin-left: 45px;
|
margin-left: 45px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
|
@ -146,14 +181,24 @@ export default {
|
||||||
|
|
||||||
.friend-link {
|
.friend-link {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: flex-start;
|
||||||
|
justify-content: space-between;
|
||||||
width: 908px;
|
width: 908px;
|
||||||
height: 30px;
|
padding: 10px 0;
|
||||||
margin: 0px auto;
|
margin: 0px auto;
|
||||||
border-top: 1px solid $border_color;
|
border-top: 1px solid $border_color;
|
||||||
}
|
}
|
||||||
.friend-link-item {
|
.information {
|
||||||
margin: 0px auto;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
> * {
|
||||||
|
margin: 2px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.zhizhao {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
.friend-link-item ul {
|
.friend-link-item ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
@ -180,10 +225,12 @@ export default {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
.footer-icon-text {
|
.footer-icon-text {
|
||||||
@include title_color($light_title_color)
|
@include title_color($light_title_color);
|
||||||
}
|
}
|
||||||
.copyright,.friend-link,.servece-type-info {
|
.copyright,
|
||||||
@include sub_color($light_sub_color)
|
.friend-link,
|
||||||
|
.servece-type-info {
|
||||||
|
@include sub_color($light_sub_color);
|
||||||
}
|
}
|
||||||
/*****************************底 部 结 束*****************************/
|
/*****************************底 部 结 束*****************************/
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<div class="person-msg">
|
<div class="person-msg">
|
||||||
<img :src="userInfo.face" v-if="userInfo.face" alt />
|
<img :src="userInfo.face" v-if="userInfo.face" alt />
|
||||||
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
|
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
|
||||||
<div>Hi,{{ userInfo.nickName || "欢迎来到LiLi Shop" | secrecyMobile }}</div>
|
<div>Hi,{{ userInfo.nickName || `欢迎来到${config.title}` | secrecyMobile }}</div>
|
||||||
<div v-if="userInfo.id">
|
<div v-if="userInfo.id">
|
||||||
<Button type="error" shape="circle" @click="$router.push('home')">会员中心</Button>
|
<Button type="error" shape="circle" @click="$router.push('home')">会员中心</Button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -49,6 +49,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import config from '@/config'
|
||||||
import {articleList} from '@/api/common.js'
|
import {articleList} from '@/api/common.js'
|
||||||
import storage from '@/plugins/storage';
|
import storage from '@/plugins/storage';
|
||||||
export default {
|
export default {
|
||||||
|
@ -56,6 +57,7 @@ export default {
|
||||||
props: ['data'],
|
props: ['data'],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
config,
|
||||||
userInfo: {}, // 用户信息
|
userInfo: {}, // 用户信息
|
||||||
articleList: [], // 常见问题
|
articleList: [], // 常见问题
|
||||||
params: { // 请求常见问题参数
|
params: { // 请求常见问题参数
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<div class="person-msg">
|
<div class="person-msg">
|
||||||
<img :src="userInfo.face" v-if="userInfo.face" alt />
|
<img :src="userInfo.face" v-if="userInfo.face" alt />
|
||||||
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
|
<Avatar icon="ios-person" class="mb_10" v-else size="80" />
|
||||||
<div>Hi,{{ userInfo.nickName || "欢迎来到LiLi Shop" | secrecyMobile }}</div>
|
<div>Hi,{{ userInfo.nickName || `欢迎来到${config.title}` | secrecyMobile }}</div>
|
||||||
<div v-if="userInfo.id">
|
<div v-if="userInfo.id">
|
||||||
<Button type="error" shape="circle">会员中心</Button>
|
<Button type="error" shape="circle">会员中心</Button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -57,6 +57,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import config from '@/config'
|
||||||
import {articleList} from '@/api/common.js'
|
import {articleList} from '@/api/common.js'
|
||||||
import storage from '@/plugins/storage';
|
import storage from '@/plugins/storage';
|
||||||
export default {
|
export default {
|
||||||
|
@ -64,6 +65,7 @@ export default {
|
||||||
props: ['data'],
|
props: ['data'],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
config,
|
||||||
userInfo: {}, // 用户信息
|
userInfo: {}, // 用户信息
|
||||||
articleList: [], // 常见问题
|
articleList: [], // 常见问题
|
||||||
params: { // 请求常见问题参数
|
params: { // 请求常见问题参数
|
||||||
|
|
|
@ -1,8 +1,21 @@
|
||||||
export default {
|
export default {
|
||||||
/**
|
/**
|
||||||
* @description 配置显示在浏览器标签的title
|
* @description 配置显示在浏览器标签的title、底部信息、部分信息展示的值
|
||||||
*/
|
*/
|
||||||
title: "Lili电商",
|
title: "lili-shop",
|
||||||
|
/**
|
||||||
|
* @description icp证
|
||||||
|
*/
|
||||||
|
icpCard: "",
|
||||||
|
|
||||||
|
company:{
|
||||||
|
href:"https://pickmall.cn",
|
||||||
|
name:"北京宏业汇成科技有限公司"
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* @description icp备案号
|
||||||
|
*/
|
||||||
|
icpMessage: "京ICP备20009696号-1",
|
||||||
/**
|
/**
|
||||||
* @description token在Cookie中存储的天数,默认1天
|
* @description token在Cookie中存储的天数,默认1天
|
||||||
*/
|
*/
|
||||||
|
@ -17,30 +30,6 @@ export default {
|
||||||
* @description 高德web端申请的api key
|
* @description 高德web端申请的api key
|
||||||
*/
|
*/
|
||||||
aMapKey: "b440952723253aa9fe483e698057bf7d",
|
aMapKey: "b440952723253aa9fe483e698057bf7d",
|
||||||
/**
|
|
||||||
* @description api请求基础路径
|
|
||||||
*/
|
|
||||||
api_dev: {
|
|
||||||
// common: 'http://192.168.0.101:8890',
|
|
||||||
// buyer: 'http://192.168.0.101:8888',
|
|
||||||
// seller: 'http://192.168.0.101:8889',
|
|
||||||
// manager: 'http://192.168.0.101:8887'
|
|
||||||
|
|
||||||
common: "https://common-api.pickmall.cn",
|
|
||||||
buyer: "https://buyer-api.pickmall.cn",
|
|
||||||
seller: "https://store-api.pickmall.cn",
|
|
||||||
manager: "https://admin-api.pickmall.cn"
|
|
||||||
},
|
|
||||||
api_prod: {
|
|
||||||
common: "https://common-api.pickmall.cn",
|
|
||||||
buyer: "https://buyer-api.pickmall.cn",
|
|
||||||
seller: "https://store-api.pickmall.cn",
|
|
||||||
manager: "https://admin-api.pickmall.cn"
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* @description api请求基础路径前缀
|
|
||||||
*/
|
|
||||||
baseUrlPrefix: "/buyer",
|
|
||||||
/**
|
/**
|
||||||
* @description 需要加载的插件
|
* @description 需要加载的插件
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<!-- LOGO 搜索 -->
|
<!-- LOGO 搜索 -->
|
||||||
<div class="width_1200 logo">
|
<div class="width_1200 logo">
|
||||||
<div>
|
<div>
|
||||||
<router-link to="/"><img :src="$store.state.logoImg" alt="lili shop" title="lilishop" /></router-link>
|
<router-link to="/"><img :src="$store.state.logoImg" /></router-link>
|
||||||
<div>
|
<div>
|
||||||
购物车(<span>{{ goodsTotal }}</span>)
|
购物车(<span>{{ goodsTotal }}</span>)
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -99,7 +99,7 @@
|
||||||
<Row type="flex" justify="center" class="copyright">
|
<Row type="flex" justify="center" class="copyright">
|
||||||
Copyright © {{year}} - Present
|
Copyright © {{year}} - Present
|
||||||
<a href="https://pickmall.cn/" target="_blank" style="margin: 0 5px"
|
<a href="https://pickmall.cn/" target="_blank" style="margin: 0 5px"
|
||||||
>lili-shop</a
|
>{{config.title}}</a
|
||||||
>
|
>
|
||||||
版权所有
|
版权所有
|
||||||
</Row>
|
</Row>
|
||||||
|
@ -108,6 +108,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import config from '@/config'
|
||||||
import * as RegExp from '@/plugins/RegExp.js';
|
import * as RegExp from '@/plugins/RegExp.js';
|
||||||
import { md5 } from '@/plugins/md5.js';
|
import { md5 } from '@/plugins/md5.js';
|
||||||
import * as apiLogin from '@/api/login.js';
|
import * as apiLogin from '@/api/login.js';
|
||||||
|
@ -118,6 +119,7 @@ export default {
|
||||||
components: { Verify },
|
components: { Verify },
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
config,
|
||||||
loading: false, // 加载状态
|
loading: false, // 加载状态
|
||||||
loading1: false, // 第二步加载状态
|
loading1: false, // 第二步加载状态
|
||||||
formFirst: { // 手机验证码表单
|
formFirst: { // 手机验证码表单
|
||||||
|
|
|
@ -95,7 +95,7 @@
|
||||||
</Row>
|
</Row>
|
||||||
<Row type="flex" justify="center" class="copyright">
|
<Row type="flex" justify="center" class="copyright">
|
||||||
Copyright © {{year}} - Present
|
Copyright © {{year}} - Present
|
||||||
<a href="https://pickmall.cn" target="_blank" style="margin: 0 5px">lili-shop</a>
|
<a href="https://pickmall.cn" target="_blank" style="margin: 0 5px">{{config.title}}</a>
|
||||||
版权所有
|
版权所有
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
|
@ -103,6 +103,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import config from '@/config'
|
||||||
import * as RegExp from "@/plugins/RegExp.js";
|
import * as RegExp from "@/plugins/RegExp.js";
|
||||||
import { md5 } from "@/plugins/md5.js";
|
import { md5 } from "@/plugins/md5.js";
|
||||||
import * as apiLogin from "@/api/login.js";
|
import * as apiLogin from "@/api/login.js";
|
||||||
|
@ -118,6 +119,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
config,
|
||||||
type: true, // true 账号登录 false 验证码登录
|
type: true, // true 账号登录 false 验证码登录
|
||||||
formData: {
|
formData: {
|
||||||
// 登录表单
|
// 登录表单
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
</Row>
|
</Row>
|
||||||
<Row type="flex" justify="center" class="copyright">
|
<Row type="flex" justify="center" class="copyright">
|
||||||
Copyright © {{year}} - Present
|
Copyright © {{year}} - Present
|
||||||
<a href="https://pickmall.cn" target="_blank" style="margin: 0 5px">lili-shop</a>
|
<a href="https://pickmall.cn" target="_blank" style="margin: 0 5px">{{config.title}}</a>
|
||||||
版权所有
|
版权所有
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
|
@ -97,6 +97,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import config from '@/config'
|
||||||
import * as RegExp from '@/plugins/RegExp.js';
|
import * as RegExp from '@/plugins/RegExp.js';
|
||||||
import { md5 } from '@/plugins/md5.js';
|
import { md5 } from '@/plugins/md5.js';
|
||||||
import * as apiLogin from '@/api/login.js';
|
import * as apiLogin from '@/api/login.js';
|
||||||
|
@ -107,6 +108,7 @@ export default {
|
||||||
components: { Verify },
|
components: { Verify },
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
config,
|
||||||
year: new Date().getFullYear(),
|
year: new Date().getFullYear(),
|
||||||
formRegist: {
|
formRegist: {
|
||||||
// 注册表单
|
// 注册表单
|
||||||
|
|
|
@ -2,23 +2,12 @@
|
||||||
<div>
|
<div>
|
||||||
<card _Title="收货地址" />
|
<card _Title="收货地址" />
|
||||||
<div class="add-box">
|
<div class="add-box">
|
||||||
<Form
|
<Form :model="formData" ref="form" label-position="left" :label-width="100" :rules="ruleInline">
|
||||||
:model="formData"
|
|
||||||
ref="form"
|
|
||||||
label-position="left"
|
|
||||||
:label-width="100"
|
|
||||||
:rules="ruleInline"
|
|
||||||
>
|
|
||||||
<FormItem label="收件人" prop="name">
|
<FormItem label="收件人" prop="name">
|
||||||
<i-input v-model="formData.name" placeholder="请输入收件人姓名" style="width: 600px"></i-input>
|
<i-input v-model="formData.name" placeholder="请输入收件人姓名" style="width: 600px"></i-input>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="收件地区" prop="address">
|
<FormItem label="收件地区" prop="address">
|
||||||
<i-input
|
<i-input v-model="formData.address" disabled placeholder="请选择收货地址" style="width: 600px"></i-input>
|
||||||
v-model="formData.address"
|
|
||||||
disabled
|
|
||||||
placeholder="请选择收货地址"
|
|
||||||
style="width: 600px"
|
|
||||||
></i-input>
|
|
||||||
<Button type="primary" size="small" @click="$refs.map.showMap = true">选择</Button>
|
<Button type="primary" size="small" @click="$refs.map.showMap = true">选择</Button>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="详细地址" prop="detail">
|
<FormItem label="详细地址" prop="detail">
|
||||||
|
@ -28,13 +17,8 @@
|
||||||
<i-input v-model="formData.mobile" placeholder="请输入收件人手机号" style="width: 600px"></i-input>
|
<i-input v-model="formData.mobile" placeholder="请输入收件人手机号" style="width: 600px"></i-input>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="地址别名">
|
<FormItem label="地址别名">
|
||||||
<i-input
|
<i-input v-model="formData.alias" length :maxlength="4" placeholder="请输入地址别名,例如公司" style="width: 600px">
|
||||||
v-model="formData.alias"
|
</i-input>
|
||||||
length
|
|
||||||
:maxlength="4"
|
|
||||||
placeholder="请输入地址别名,例如公司"
|
|
||||||
style="width: 600px"
|
|
||||||
></i-input>
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="默认地址">
|
<FormItem label="默认地址">
|
||||||
<i-switch v-model="formData.isDefault" />
|
<i-switch v-model="formData.isDefault" />
|
||||||
|
@ -42,9 +26,7 @@
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt_20">
|
<div class="mt_20">
|
||||||
<Button type="primary" class="mr_10" :loading="loading" @click="save"
|
<Button type="primary" class="mr_10" :loading="loading" @click="save">保存收货地址</Button>
|
||||||
>保存收货地址</Button
|
|
||||||
>
|
|
||||||
<Button @click="$router.back()">返回</Button>
|
<Button @click="$router.back()">返回</Button>
|
||||||
</div>
|
</div>
|
||||||
<lili-map ref="map" @getAddress="getAddress"></lili-map>
|
<lili-map ref="map" @getAddress="getAddress"></lili-map>
|
||||||
|
@ -52,55 +34,74 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import card from '@/components/card';
|
import card from "@/components/card";
|
||||||
import liliMap from '@/components/map';
|
import liliMap from "@/components/map";
|
||||||
|
|
||||||
|
import * as RegExp from "@/plugins/RegExp.js";
|
||||||
import {
|
import {
|
||||||
newMemberAddress,
|
newMemberAddress,
|
||||||
editMemberAddress,
|
editMemberAddress,
|
||||||
getAddrDetail
|
getAddrDetail,
|
||||||
} from '@/api/address';
|
} from "@/api/address";
|
||||||
export default {
|
export default {
|
||||||
name: 'AddAddress',
|
name: "AddAddress",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
formData: { // 添加地址表单
|
formData: {
|
||||||
isDefault: false
|
// 添加地址表单
|
||||||
|
isDefault: false,
|
||||||
},
|
},
|
||||||
ruleInline: { // 验证规则
|
ruleInline: {
|
||||||
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
|
// 验证规则
|
||||||
address: [{ required: true, message: '请输入地址', trigger: 'change' }],
|
name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
|
||||||
|
address: [{ required: true, message: "请输入地址", trigger: "change" }],
|
||||||
detail: [
|
detail: [
|
||||||
{ required: true, message: '请输入详细地址', trigger: 'blur' }
|
{ required: true, message: "请输入详细地址", trigger: "blur" },
|
||||||
],
|
],
|
||||||
mobile: [
|
mobile: [
|
||||||
]
|
{ required: true, message: "请输入手机号码" },
|
||||||
|
{
|
||||||
|
pattern: RegExp.mobile,
|
||||||
|
trigger: "blur",
|
||||||
|
message: "请输入正确的手机号",
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
loading: false, // 加载状态
|
loading: false, // 加载状态
|
||||||
mapMsg: {} // 地图信息
|
mapMsg: {}, // 地图信息
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
save () { // 保存地址
|
save() {
|
||||||
|
// 保存地址
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const params = JSON.parse(JSON.stringify(this.formData));
|
const params = JSON.parse(JSON.stringify(this.formData));
|
||||||
params.consigneeAddressPath = params.address.replace(/\s/g, ',');
|
params.consigneeAddressPath = params.address.replace(/\s/g, ",");
|
||||||
delete params.address;
|
delete params.address;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
if (this.$route.query.id) {
|
if (this.$route.query.id) {
|
||||||
editMemberAddress(params).then((res) => {
|
editMemberAddress(params)
|
||||||
|
.then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$router.push('/home/MyAddress');
|
this.$router.push("/home/MyAddress");
|
||||||
}
|
}
|
||||||
}).catch(() => { this.loading = false; });
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
newMemberAddress(params).then((res) => {
|
newMemberAddress(params)
|
||||||
|
.then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$router.push('/home/MyAddress');
|
this.$router.push("/home/MyAddress");
|
||||||
}
|
}
|
||||||
}).catch(() => { this.loading = false; });
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -111,7 +112,7 @@ export default {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
const data = res.result;
|
const data = res.result;
|
||||||
data.address = res.result.consigneeAddressPath.replace(/,/g, ' ');
|
data.address = res.result.consigneeAddressPath.replace(/,/g, " ");
|
||||||
this.formData = data;
|
this.formData = data;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -120,12 +121,12 @@ export default {
|
||||||
// 获取地图选择信息
|
// 获取地图选择信息
|
||||||
console.log(item);
|
console.log(item);
|
||||||
this.mapMsg = item;
|
this.mapMsg = item;
|
||||||
this.$set(this.formData, 'address', item.addr);
|
this.$set(this.formData, "address", item.addr);
|
||||||
this.$set(this.formData, 'consigneeAddressIdPath', item.addrId);
|
this.$set(this.formData, "consigneeAddressIdPath", item.addrId);
|
||||||
this.$set(this.formData, 'detail', item.detail);
|
this.$set(this.formData, "detail", item.detail);
|
||||||
this.formData.lat = item.position.lat;
|
this.formData.lat = item.position.lat;
|
||||||
this.formData.lon = item.position.lng;
|
this.formData.lon = item.position.lng;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const id = this.$route.query.id;
|
const id = this.$route.query.id;
|
||||||
|
@ -133,8 +134,8 @@ export default {
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
card,
|
card,
|
||||||
liliMap
|
liliMap,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<div class="width_1200 logo">
|
<div class="width_1200 logo">
|
||||||
<div>
|
<div>
|
||||||
<router-link to="/"
|
<router-link to="/"
|
||||||
><img :src="$store.state.logoImg" alt="lili shop" title="lilishop"
|
><img :src="$store.state.logoImg"
|
||||||
/></router-link>
|
/></router-link>
|
||||||
<div>结算页</div>
|
<div>结算页</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,6 @@ import axios from 'axios';
|
||||||
import https from 'https';
|
import https from 'https';
|
||||||
import { Message, Spin, Modal } from 'view-design';
|
import { Message, Spin, Modal } from 'view-design';
|
||||||
import Storage from './storage';
|
import Storage from './storage';
|
||||||
import config from '@/config';
|
|
||||||
import router from '../router/index.js';
|
import router from '../router/index.js';
|
||||||
import store from '../vuex/store';
|
import store from '../vuex/store';
|
||||||
import { handleRefreshToken } from '@/api/index';
|
import { handleRefreshToken } from '@/api/index';
|
||||||
|
@ -10,20 +9,20 @@ const qs = require('qs');
|
||||||
// api地址
|
// api地址
|
||||||
export const buyerUrl =
|
export const buyerUrl =
|
||||||
process.env.NODE_ENV === 'development'
|
process.env.NODE_ENV === 'development'
|
||||||
? config.api_dev.buyer
|
? BASE.API_DEV.buyer
|
||||||
: config.api_prod.buyer;
|
: BASE.API_PROD.buyer;
|
||||||
export const commonUrl =
|
export const commonUrl =
|
||||||
process.env.NODE_ENV === 'development'
|
process.env.NODE_ENV === 'development'
|
||||||
? config.api_dev.common
|
? BASE.API_DEV.common
|
||||||
: config.api_prod.common;
|
: BASE.API_PROD.common;
|
||||||
export const managerUrl =
|
export const managerUrl =
|
||||||
process.env.NODE_ENV === 'development'
|
process.env.NODE_ENV === 'development'
|
||||||
? config.api_dev.manager
|
? BASE.API_DEV.manager
|
||||||
: config.api_prod.manager;
|
: BASE.API_PROD.manager;
|
||||||
export const sellerUrl =
|
export const sellerUrl =
|
||||||
process.env.NODE_ENV === 'development'
|
process.env.NODE_ENV === 'development'
|
||||||
? config.api_dev.seller
|
? BASE.API_DEV.seller
|
||||||
: config.api_prod.seller;
|
: BASE.API_PROD.seller;
|
||||||
// 创建axios实例
|
// 创建axios实例
|
||||||
var isRefreshToken = 0;
|
var isRefreshToken = 0;
|
||||||
const refreshToken = getTokenDebounce();
|
const refreshToken = getTokenDebounce();
|
||||||
|
|
|
@ -80,7 +80,7 @@ export default new Router({
|
||||||
name: 'login',
|
name: 'login',
|
||||||
component: Login,
|
component: Login,
|
||||||
meta: {
|
meta: {
|
||||||
title: 'LiLi 登录'
|
title: '登录'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -88,7 +88,7 @@ export default new Router({
|
||||||
name: 'SignUp',
|
name: 'SignUp',
|
||||||
component: SignUp,
|
component: SignUp,
|
||||||
meta: {
|
meta: {
|
||||||
title: 'LiLi 注册'
|
title: '注册'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -96,7 +96,7 @@ export default new Router({
|
||||||
name: 'forgetPassword',
|
name: 'forgetPassword',
|
||||||
component: ForgetPassword,
|
component: ForgetPassword,
|
||||||
meta: {
|
meta: {
|
||||||
title: 'LiLi 忘记密码'
|
title: '忘记密码'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -283,7 +283,7 @@ export default new Router({
|
||||||
path: 'AfterSale',
|
path: 'AfterSale',
|
||||||
name: 'AfterSale',
|
name: 'AfterSale',
|
||||||
component: AfterSale,
|
component: AfterSale,
|
||||||
meta: {title: 'LiLi 售后'}
|
meta: {title: '售后'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'ApplyAfterSale',
|
path: 'ApplyAfterSale',
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
<Input v-model="formAdd.name" clearable style="width: 100%" />
|
<Input v-model="formAdd.name" clearable style="width: 100%" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="排序值" prop="sortOrder">
|
<FormItem label="排序值" prop="sortOrder">
|
||||||
<Input v-model="formAdd.sortOrder" clearable style="width: 100%" />
|
<InputNumber v-model="formAdd.sortOrder" :min="0" clearable style="width: 100%" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
|
@ -80,6 +80,7 @@ export default {
|
||||||
name: "",
|
name: "",
|
||||||
deleteFlag: 0,
|
deleteFlag: 0,
|
||||||
level: 0,
|
level: 0,
|
||||||
|
sortOrder:1
|
||||||
},
|
},
|
||||||
// 表单验证规则
|
// 表单验证规则
|
||||||
formValidate: {
|
formValidate: {
|
||||||
|
|
|
@ -21,10 +21,9 @@
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem label="是否自营" prop="selfOperated">
|
<FormItem label="是否自营" prop="selfOperated">
|
||||||
|
|
||||||
<RadioGroup type="button" button-style="solid" v-model="shopForm.selfOperated" >
|
<RadioGroup type="button" button-style="solid" v-model="shopForm.selfOperated" >
|
||||||
<Radio :label=true>自营</Radio>
|
<Radio :label="1">自营</Radio>
|
||||||
<Radio :label=false>非自营</Radio>
|
<Radio :label="0">非自营</Radio>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
|
@ -81,7 +80,6 @@
|
||||||
<FormItem label="小程序唯一标识">
|
<FormItem label="小程序唯一标识">
|
||||||
<Input v-model="shopForm.yzfMpSign" clearable style="width: 350px" />
|
<Input v-model="shopForm.yzfMpSign" clearable style="width: 350px" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<Spin fix v-if="loading"></Spin>
|
|
||||||
</div>
|
</div>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
|
||||||
|
@ -167,7 +165,7 @@
|
||||||
<Button @click="handleCLickImg('licencePhoto')" type="primary">选择图片</Button>
|
<Button @click="handleCLickImg('licencePhoto')" type="primary">选择图片</Button>
|
||||||
</div>
|
</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<Spin fix v-if="loading"></Spin>
|
|
||||||
</div>
|
</div>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
<TabPane label="经营范围" class="tab" name="category">
|
<TabPane label="经营范围" class="tab" name="category">
|
||||||
|
@ -361,11 +359,12 @@ export default {
|
||||||
indeterminate: true, // 复选框全选样式
|
indeterminate: true, // 复选框全选样式
|
||||||
checkAll: false, // 全选
|
checkAll: false, // 全选
|
||||||
checkAllGroup: [], // 全选数组
|
checkAllGroup: [], // 全选数组
|
||||||
|
|
||||||
submitLoading: false, // 添加或编辑提交状态
|
submitLoading: false, // 添加或编辑提交状态
|
||||||
settlementCycle: [], // 结算周期
|
settlementCycle: [], // 结算周期
|
||||||
shopForm: { // 店铺数据
|
shopForm: { // 店铺数据
|
||||||
settlementCycle: "",
|
settlementCycle: "",
|
||||||
selfOperated: false,
|
selfOperated: 0,
|
||||||
memberName: "",
|
memberName: "",
|
||||||
companyName: "",
|
companyName: "",
|
||||||
addressPath: "",
|
addressPath: "",
|
||||||
|
|
|
@ -84,10 +84,10 @@ export default {
|
||||||
if (params.row.price) {
|
if (params.row.price) {
|
||||||
return h(
|
return h(
|
||||||
"div",
|
"div",
|
||||||
this.$options.filters.unitPrice(params.row.price, "¥")
|
this.$options.filters.unitPrice((params.row.price || 0), "¥")
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return h("div", params.row.couponDiscount + "折");
|
return h("div", (params.row.couponDiscount || 0) + "折");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -18,90 +18,45 @@
|
||||||
</Row>
|
</Row>
|
||||||
<Row class="operation">
|
<Row class="operation">
|
||||||
<Tabs type="card" v-model="tabIndex">
|
<Tabs type="card" v-model="tabIndex">
|
||||||
<TabPane
|
<TabPane v-for="(tab, tabIndex) in goodsList" :key="tabIndex" :label="tab.hour" :name="tabIndex + ''">
|
||||||
v-for="(tab, tabIndex) in goodsList"
|
<Table :loading="loading" border :columns="goodsColumns" :data="tab.list" :ref="'table' + tabIndex"
|
||||||
:key="tabIndex"
|
@on-selection-change="changeSelect">
|
||||||
:label="tab.hour"
|
|
||||||
:name="tabIndex + ''"
|
|
||||||
>
|
|
||||||
<Table
|
|
||||||
:loading="loading"
|
|
||||||
border
|
|
||||||
:columns="goodsColumns"
|
|
||||||
:data="tab.list"
|
|
||||||
:ref="'table' + tabIndex"
|
|
||||||
@on-selection-change="changeSelect"
|
|
||||||
>
|
|
||||||
<template slot-scope="{ row }" slot="originalPrice">
|
<template slot-scope="{ row }" slot="originalPrice">
|
||||||
<div>{{ row.originalPrice | unitPrice("¥") }}</div>
|
<div>{{ row.originalPrice | unitPrice("¥") }}</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot-scope="{ row, index }" slot="quantity">
|
<template slot-scope="{ row, index }" slot="quantity">
|
||||||
<Input
|
<Input v-model="row.quantity" :disabled="row.promotionApplyStatus == 'PASS'" @input="
|
||||||
v-model="row.quantity"
|
|
||||||
:disabled="row.promotionApplyStatus == 'PASS'"
|
|
||||||
@input="
|
|
||||||
goodsList[tabIndex].list[index].quantity = row.quantity
|
goodsList[tabIndex].list[index].quantity = row.quantity
|
||||||
"
|
" />
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot-scope="{ row, index }" slot="price">
|
<template slot-scope="{ row, index }" slot="price">
|
||||||
<Input
|
<Input v-model="row.price" :disabled="row.promotionApplyStatus == 'PASS'"
|
||||||
v-model="row.price"
|
@input="goodsList[tabIndex].list[index].price = row.price" />
|
||||||
:disabled="row.promotionApplyStatus == 'PASS'"
|
|
||||||
@input="goodsList[tabIndex].list[index].price = row.price"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot-scope="{ row }" slot="promotionApplyStatus">
|
<template slot-scope="{ row }" slot="promotionApplyStatus">
|
||||||
<Badge
|
<Badge status="success" v-if="row.promotionApplyStatus == 'PASS'"
|
||||||
status="success"
|
:text="promotionApplyStatus(row.promotionApplyStatus)" />
|
||||||
v-if="row.promotionApplyStatus == 'PASS'"
|
<Badge status="blue" v-if="row.promotionApplyStatus == 'APPLY'"
|
||||||
:text="promotionApplyStatus(row.promotionApplyStatus)"
|
:text="promotionApplyStatus(row.promotionApplyStatus)" />
|
||||||
/>
|
<Badge status="error" v-if="row.promotionApplyStatus == 'REFUSE'"
|
||||||
<Badge
|
:text="promotionApplyStatus(row.promotionApplyStatus)" />
|
||||||
status="blue"
|
<span v-if="row.promotionApplyStatus == 'REFUSE'" @click="showReason(row.failReason)"
|
||||||
v-if="row.promotionApplyStatus == 'APPLY'"
|
class="reason">(拒绝原因)</span>
|
||||||
:text="promotionApplyStatus(row.promotionApplyStatus)"
|
<Badge status="error" v-if="row.promotionApplyStatus == ''"
|
||||||
/>
|
:text="promotionApplyStatus(row.promotionApplyStatus)" />
|
||||||
<Badge
|
|
||||||
status="error"
|
|
||||||
v-if="row.promotionApplyStatus == 'REFUSE'"
|
|
||||||
:text="promotionApplyStatus(row.promotionApplyStatus)"
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
v-if="row.promotionApplyStatus == 'REFUSE'"
|
|
||||||
@click="showReason(row.failReason)"
|
|
||||||
class="reason"
|
|
||||||
>(拒绝原因)</span
|
|
||||||
>
|
|
||||||
<Badge
|
|
||||||
status="error"
|
|
||||||
v-if="row.promotionApplyStatus == ''"
|
|
||||||
:text="promotionApplyStatus(row.promotionApplyStatus)"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot-scope="{ row }" slot="QRCode">
|
<template slot-scope="{ row }" slot="QRCode">
|
||||||
<img
|
<img v-if="row.QRCode" :src="row.QRCode || '../../../assets/lili.png'" width="50px" height="50px"
|
||||||
v-if="row.QRCode"
|
alt="" />
|
||||||
:src="row.QRCode || '../../../assets/lili.png'"
|
|
||||||
width="50px"
|
|
||||||
height="50px"
|
|
||||||
alt=""
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
<template slot-scope="{ row, index }" slot="action">
|
<template slot-scope="{ row, index }" slot="action">
|
||||||
<Button
|
<Button type="error" v-if="promotionStatus === 'NEW'" size="small" ghost
|
||||||
type="error"
|
@click="delGoods(index, row)">删除
|
||||||
v-if="promotionStatus === 'NEW'"
|
</Button>
|
||||||
size="small"
|
|
||||||
ghost
|
|
||||||
@click="delGoods(index, row)"
|
|
||||||
>删除
|
|
||||||
</Button
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
@ -110,21 +65,12 @@
|
||||||
|
|
||||||
<Row class="operation">
|
<Row class="operation">
|
||||||
<Button @click="closeCurrentPage">返回</Button>
|
<Button @click="closeCurrentPage">返回</Button>
|
||||||
<Button
|
<Button type="primary" :loading="submitLoading" v-if="promotionStatus === 'NEW'" @click="save">提交
|
||||||
type="primary"
|
</Button>
|
||||||
:loading="submitLoading"
|
|
||||||
v-if="promotionStatus === 'NEW'"
|
|
||||||
@click="save"
|
|
||||||
>提交
|
|
||||||
</Button
|
|
||||||
>
|
|
||||||
</Row>
|
</Row>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<sku-select
|
<sku-select ref="skuSelect" @selectedGoodsData="selectedGoodsData"></sku-select>
|
||||||
ref="skuSelect"
|
|
||||||
@selectedGoodsData="selectedGoodsData"
|
|
||||||
></sku-select>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -132,7 +78,7 @@
|
||||||
seckillGoodsList,
|
seckillGoodsList,
|
||||||
seckillDetail,
|
seckillDetail,
|
||||||
setSeckillGoods,
|
setSeckillGoods,
|
||||||
delSeckillGoods
|
delSeckillGoods,
|
||||||
} from "@/api/promotion.js";
|
} from "@/api/promotion.js";
|
||||||
import skuSelect from "@/views/lili-dialog";
|
import skuSelect from "@/views/lili-dialog";
|
||||||
|
|
||||||
|
@ -181,7 +127,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "商品价格",
|
title: "商品价格",
|
||||||
slot: "originalPrice",
|
slot: "price",
|
||||||
minWidth: 50,
|
minWidth: 50,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -205,7 +151,8 @@
|
||||||
minWidth: 50,
|
minWidth: 50,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
goodsList: [] // 商品列表
|
goodsList: [], // 商品列表
|
||||||
|
defaultGoodsList: [], //默认查询秒杀的商品
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -219,14 +166,12 @@
|
||||||
},
|
},
|
||||||
// 提交秒杀商品
|
// 提交秒杀商品
|
||||||
save() {
|
save() {
|
||||||
|
|
||||||
let list = JSON.parse(JSON.stringify(this.goodsList));
|
let list = JSON.parse(JSON.stringify(this.goodsList));
|
||||||
|
|
||||||
console.warn(list)
|
|
||||||
let params = {
|
let params = {
|
||||||
seckillId: this.$route.query.id,
|
seckillId: this.$route.query.id,
|
||||||
applyVos: [],
|
applyVos: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
list.forEach((e, index) => {
|
list.forEach((e, index) => {
|
||||||
e.list.forEach((i) => {
|
e.list.forEach((i) => {
|
||||||
// if(e.id) delete e.id
|
// if(e.id) delete e.id
|
||||||
|
@ -235,7 +180,7 @@
|
||||||
});
|
});
|
||||||
this.submitLoading = true;
|
this.submitLoading = true;
|
||||||
|
|
||||||
console.log(list)
|
console.log(list);
|
||||||
|
|
||||||
setSeckillGoods(params).then((res) => {
|
setSeckillGoods(params).then((res) => {
|
||||||
this.submitLoading = false;
|
this.submitLoading = false;
|
||||||
|
@ -285,6 +230,8 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.defaultGoodsList = this.goodsList[this.tabIndex].list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -303,31 +250,31 @@
|
||||||
},
|
},
|
||||||
delGoods(index, row) {
|
delGoods(index, row) {
|
||||||
// 删除商品
|
// 删除商品
|
||||||
if (row.promotionApplyStatus === 'PASS') {
|
if (row.promotionApplyStatus === "PASS") {
|
||||||
const params = {
|
const params = {
|
||||||
seckillId: row.seckillId,
|
seckillId: row.seckillId,
|
||||||
id: row.id
|
id: row.id,
|
||||||
}
|
};
|
||||||
delSeckillGoods(params).then(res => {
|
delSeckillGoods(params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.goodsList[this.tabIndex].list.splice(index, 1);
|
this.goodsList[this.tabIndex].list.splice(index, 1);
|
||||||
this.$Message.success("删除成功!");
|
this.$Message.success("删除成功!");
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
this.goodsList[this.tabIndex].list.splice(index, 1);
|
this.goodsList[this.tabIndex].list.splice(index, 1);
|
||||||
this.$Message.success("删除成功!");
|
this.$Message.success("删除成功!");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectedGoodsData(item) {
|
selectedGoodsData(callback) {
|
||||||
// 选择器添加商品
|
let way = [];
|
||||||
item.forEach((e) => {
|
let data = JSON.parse(JSON.stringify(callback));
|
||||||
if(this.goodsList[this.tabIndex].list.length == 0){
|
data.forEach((e) => {
|
||||||
this.goodsList[this.tabIndex].list.push({
|
way.push({
|
||||||
goodsName: e.goodsName,
|
goodsName: e.goodsName,
|
||||||
price: e.price,
|
price: e.price,
|
||||||
originalPrice: e.price,
|
originalPrice: e.price,
|
||||||
promotionApplyStatus: e.promotionApplyStatus || '',
|
promotionApplyStatus: e.promotionApplyStatus || "",
|
||||||
quantity: e.quantity,
|
quantity: e.quantity,
|
||||||
seckillId: this.$route.query.id,
|
seckillId: this.$route.query.id,
|
||||||
storeId: e.storeId,
|
storeId: e.storeId,
|
||||||
|
@ -335,41 +282,25 @@
|
||||||
skuId: e.id,
|
skuId: e.id,
|
||||||
timeLine: this.data[0].hours.split(",")[this.tabIndex],
|
timeLine: this.data[0].hours.split(",")[this.tabIndex],
|
||||||
});
|
});
|
||||||
}else{
|
});
|
||||||
this.goodsList[this.tabIndex].list.forEach(goods => {
|
|
||||||
if (e.id != goods.skuId) {
|
|
||||||
this.goodsList[this.tabIndex].list.push(
|
|
||||||
{
|
|
||||||
goodsName: e.goodsName,
|
|
||||||
price: e.price,
|
|
||||||
originalPrice: e.price,
|
|
||||||
promotionApplyStatus: e.promotionApplyStatus || '',
|
|
||||||
quantity: e.quantity,
|
|
||||||
seckillId: this.$route.query.id,
|
|
||||||
storeId: e.storeId,
|
|
||||||
storeName: e.storeName,
|
|
||||||
skuId: e.id,
|
|
||||||
timeLine: this.data[0].hours.split(",")[this.tabIndex],
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
this.$set(this.goodsList[this.tabIndex], "list", [
|
||||||
|
...way,
|
||||||
|
...this.defaultGoodsList,
|
||||||
this.$nextTick(() => {
|
]);
|
||||||
this.$forceUpdate()
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
openSkuList() { // 显示商品选择器
|
openSkuList() {
|
||||||
|
// 显示商品选择器
|
||||||
|
|
||||||
this.$refs.skuSelect.open("goods");
|
this.$refs.skuSelect.open("goods");
|
||||||
let data = JSON.parse(JSON.stringify(this.goodsList[this.tabIndex].list))
|
this.$refs.skuSelect.selectedWay = [];
|
||||||
data.forEach(e => {
|
console.warn(this.goodsList[this.tabIndex].list);
|
||||||
e.id = e.skuId
|
let data = this.goodsList[this.tabIndex].list;
|
||||||
})
|
data.forEach((e) => {
|
||||||
this.$refs.skuSelect.goodsData = data;
|
e.id = e.skuId;
|
||||||
|
});
|
||||||
|
this.$refs.skuSelect.selectedWay = data;
|
||||||
|
console.log(this.$refs.skuSelect.selectedWay);
|
||||||
},
|
},
|
||||||
unixDate(time) {
|
unixDate(time) {
|
||||||
// 处理报名截止时间
|
// 处理报名截止时间
|
||||||
|
@ -412,11 +343,11 @@
|
||||||
},
|
},
|
||||||
// 如果是从详情页返回列表页,修改列表页keepAlive为true,确保不刷新页面
|
// 如果是从详情页返回列表页,修改列表页keepAlive为true,确保不刷新页面
|
||||||
beforeRouteLeave(to, from, next) {
|
beforeRouteLeave(to, from, next) {
|
||||||
if (to.name === 'seckill') {
|
if (to.name === "seckill") {
|
||||||
to.meta.keepAlive = true
|
to.meta.keepAlive = true;
|
||||||
}
|
|
||||||
next()
|
|
||||||
}
|
}
|
||||||
|
next();
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -66,7 +66,9 @@
|
||||||
<Radio label="FREE">包邮</Radio>
|
<Radio label="FREE">包邮</Radio>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
<FormItem label="详细设置" v-if="form.pricingMethod !== 'FREE'">
|
<FormItem label="详细设置" v-if="form.pricingMethod !== 'FREE'">
|
||||||
|
<Alert type="warning" >点击右侧修改按钮编辑数据</Alert>
|
||||||
<div class="ncsu-trans-type" data-delivery="TRANSTYPE">
|
<div class="ncsu-trans-type" data-delivery="TRANSTYPE">
|
||||||
<div class="entity">
|
<div class="entity">
|
||||||
<div class="tbl-except">
|
<div class="tbl-except">
|
||||||
|
@ -84,7 +86,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="bd-line" data-group="n1" v-for="(item,index) in form.freightTemplateChildList" :key="index">
|
<tr class="bd-line" data-group="n1" v-for="(item,index) in form.freightTemplateChildList"
|
||||||
|
:key="index">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td class="tl cell-area">
|
<td class="tl cell-area">
|
||||||
<span class="area-group">
|
<span class="area-group">
|
||||||
|
@ -101,7 +104,8 @@
|
||||||
</Input>
|
</Input>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Input class="text w40" type="text" v-model="item.continuedCompany" maxlength="6" clearable />
|
<Input class="text w40" type="text" v-model="item.continuedCompany" maxlength="6"
|
||||||
|
clearable />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Input class="text w60" type="text" v-model="item.continuedPrice" maxlength="6" clearable>
|
<Input class="text w60" type="text" v-model="item.continuedPrice" maxlength="6" clearable>
|
||||||
|
@ -109,9 +113,11 @@
|
||||||
</Input>
|
</Input>
|
||||||
</td>
|
</td>
|
||||||
<td class="nscs-table-handle">
|
<td class="nscs-table-handle">
|
||||||
<Button @click="editRegion(item,index)" type="info" size="small" style="margin-bottom: 5px">修改
|
<Button @click="editRegion(item,index)" type="info" size="small"
|
||||||
|
style="margin-bottom: 5px">修改
|
||||||
</Button>
|
</Button>
|
||||||
<Button @click="removeTemplateChildren(index)" :loading="submitLoading" type="error" size="small" style="margin-bottom: 5px">删除
|
<Button @click="removeTemplateChildren(index)" :loading="submitLoading" type="error"
|
||||||
|
size="small" style="margin-bottom: 5px">删除
|
||||||
</Button>
|
</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -136,7 +142,8 @@
|
||||||
</div>
|
</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<Form-item>
|
<Form-item>
|
||||||
<Button @click="addShipTemplateChildren(index)" v-if="form.pricingMethod !== 'FREE'" icon="ios-create-outline">为指定城市设置运费模板
|
<Button @click="addShipTemplateChildren(index)" v-if="form.pricingMethod !== 'FREE'"
|
||||||
|
icon="ios-create-outline">为指定城市设置运费模板
|
||||||
</Button>
|
</Button>
|
||||||
<Button @click="handleSubmit" :loading="submitLoading" type="primary" style="margin-right:5px">保存
|
<Button @click="handleSubmit" :loading="submitLoading" type="primary" style="margin-right:5px">保存
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -214,7 +221,7 @@ export default {
|
||||||
},
|
},
|
||||||
//添加运费模板
|
//添加运费模板
|
||||||
add() {
|
add() {
|
||||||
this.$refs.region.clear()
|
this.$refs.region.clear();
|
||||||
this.title = "添加运费模板";
|
this.title = "添加运费模板";
|
||||||
this.csTab = true;
|
this.csTab = true;
|
||||||
this.operation = "ADD";
|
this.operation = "ADD";
|
||||||
|
|
Loading…
Reference in New Issue