夜良king 2022-02-15 10:12:53 +08:00
commit e8e7d27c0d
82 changed files with 3324 additions and 2258 deletions

View File

@ -1 +1 @@
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui:4.2.2.1 . docker build -t registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui:4.3.0.1 .

View File

@ -3,10 +3,10 @@ var BASE = {
* @description api请求基础路径 * @description api请求基础路径
*/ */
API_DEV: { API_DEV: {
common: "https://common-api.pickmall.cn", seller: "http://127.0.0.1:8889",
buyer: "https://buyer-api.pickmall.cn", manager: "http://127.0.0.1:8887",
seller: "https://store-api.pickmall.cn", buyer: "http://127.0.0.1:8888",
manager: "https://admin-api.pickmall.cn" common: "http://127.0.0.1:8890",
}, },
API_PROD: { API_PROD: {
common: "https://common-api.pickmall.cn", common: "https://common-api.pickmall.cn",
@ -15,4 +15,3 @@ var BASE = {
manager: "https://admin-api.pickmall.cn" manager: "https://admin-api.pickmall.cn"
}, },
}; };

View File

@ -11,7 +11,7 @@ import request, {Method} from '@/plugins/request.js'
// 获取密码状态 // 获取密码状态
export function getPwdStatus (params) { export function getPwdStatus (params) {
return request({ return request({
url: '/buyer/members/wallet/check', url: '/buyer/passport/members/wallet/check',
method: Method.GET, method: Method.GET,
needToken: true, needToken: true,
params params
@ -21,7 +21,7 @@ export function getPwdStatus (params) {
// 设置密码 // 设置密码
export function setPwd (params) { export function setPwd (params) {
return request({ return request({
url: '/buyer/members/wallet/set-password', url: '/buyer/passport/members/wallet/set-password',
method: Method.POST, method: Method.POST,
needToken: true, needToken: true,
data: params data: params
@ -31,7 +31,7 @@ export function setPwd (params) {
// 设置支付密码 // 设置支付密码
export function setUpdatePwdOrdinary (params) { export function setUpdatePwdOrdinary (params) {
return request({ return request({
url: '/buyer/members/wallet/update-password/ordinary', url: '/buyer/passport/members/wallet/update-password/ordinary',
method: Method.GET, method: Method.GET,
needToken: true, needToken: true,
data: params data: params
@ -41,7 +41,7 @@ export function setUpdatePwdOrdinary (params) {
// 修改会员资料 // 修改会员资料
export function editMemberInfo (params) { export function editMemberInfo (params) {
return request({ return request({
url: '/buyer/members/editOwn', url: '/buyer/passport/members/editOwn',
method: Method.PUT, method: Method.PUT,
needToken: true, needToken: true,
data: params data: params
@ -51,7 +51,7 @@ export function editMemberInfo (params) {
// 修改密码 // 修改密码
export function editPwd (params) { export function editPwd (params) {
return request({ return request({
url: `/buyer/members/modifyPass`, url: `/buyer/passport/members/modifyPass`,
method: Method.PUT, method: Method.PUT,
needToken: true, needToken: true,
data: params data: params
@ -61,7 +61,7 @@ export function editPwd (params) {
// 获取密码状态 // 获取密码状态
export function logout () { export function logout () {
return request({ return request({
url: '/buyer/members/logout', url: '/buyer/passport/members/logout',
method: Method.POST, method: Method.POST,
needToken: true needToken: true
}) })

View File

@ -5,7 +5,7 @@ import request, {
// 会员收货地址列表 // 会员收货地址列表
export function memberAddress () { export function memberAddress () {
return request({ return request({
url: '/buyer/memberAddress', url: '/buyer/member/address',
needToken: true, needToken: true,
method: Method.GET method: Method.GET
}); });
@ -14,7 +14,7 @@ export function memberAddress () {
// 添加收货地址 // 添加收货地址
export function newMemberAddress (params) { export function newMemberAddress (params) {
return request({ return request({
url: '/buyer/memberAddress', url: '/buyer/member/address',
needToken: true, needToken: true,
method: Method.POST, method: Method.POST,
data: params data: params
@ -24,7 +24,7 @@ export function newMemberAddress (params) {
// 编辑收货地址 // 编辑收货地址
export function editMemberAddress (params) { export function editMemberAddress (params) {
return request({ return request({
url: '/buyer/memberAddress', url: '/buyer/member/address',
needToken: true, needToken: true,
method: Method.PUT, method: Method.PUT,
params params
@ -34,7 +34,7 @@ export function editMemberAddress (params) {
// 删除收货地址 // 删除收货地址
export function delMemberAddress (id) { export function delMemberAddress (id) {
return request({ return request({
url: `/buyer/memberAddress/delById/${id}`, url: `/buyer/member/address/delById/${id}`,
needToken: true, needToken: true,
method: Method.DELETE method: Method.DELETE
}); });
@ -43,7 +43,7 @@ export function delMemberAddress (id) {
// 根据id获取会员地址详情 // 根据id获取会员地址详情
export function getAddrDetail (id) { export function getAddrDetail (id) {
return request({ return request({
url: `/buyer/memberAddress/get/${id}`, url: `/buyer/member/address/get/${id}`,
needToken: true, needToken: true,
method: Method.GET method: Method.GET
}); });
@ -52,7 +52,7 @@ export function getAddrDetail (id) {
// 传给后台citycode 获取城市街道等id // 传给后台citycode 获取城市街道等id
export function handleRegion (params) { export function handleRegion (params) {
return request({ return request({
url: `${commonUrl}/common/region/region`, url: `${commonUrl}/common/common/region/region`,
needToken: true, needToken: true,
method: Method.GET, method: Method.GET,
params params

View File

@ -5,7 +5,7 @@ import request, {Method, commonUrl} from '@/plugins/request.js';
*/ */
export function getVerifyImg (verificationEnums) { export function getVerifyImg (verificationEnums) {
return request({ return request({
url: `${commonUrl}/common/slider/${verificationEnums}`, url: `${commonUrl}/common/common/slider/${verificationEnums}`,
method: Method.GET, method: Method.GET,
needToken: false needToken: false
}); });
@ -15,7 +15,7 @@ export function getVerifyImg (verificationEnums) {
*/ */
export function postVerifyImg (params) { export function postVerifyImg (params) {
return request({ return request({
url: `${commonUrl}/common/slider/${params.verificationEnums}`, url: `${commonUrl}/common/common/slider/${params.verificationEnums}`,
method: Method.POST, method: Method.POST,
needToken: false, needToken: false,
params params
@ -26,7 +26,7 @@ export function postVerifyImg (params) {
*/ */
export function sendSms (params) { export function sendSms (params) {
return request({ return request({
url: `${commonUrl}/common/sms/${params.verificationEnums}/${params.mobile}`, url: `${commonUrl}/common/common/sms/${params.verificationEnums}/${params.mobile}`,
method: Method.GET, method: Method.GET,
needToken: false, needToken: false,
params params
@ -45,7 +45,7 @@ export function getLogo () {
// 地区数据,用于三级联动 // 地区数据,用于三级联动
export function getRegion (id) { export function getRegion (id) {
return request({ return request({
url: `${commonUrl}/common/region/item/${id}`, url: `${commonUrl}/common/common/region/item/${id}`,
needToken: true, needToken: true,
method: Method.GET method: Method.GET
}); });
@ -57,7 +57,7 @@ export function getRegion (id) {
*/ */
export function articleList (params) { export function articleList (params) {
return request({ return request({
url: `/buyer/article`, url: `/buyer/other/article`,
method: Method.GET, method: Method.GET,
params params
}); });
@ -69,7 +69,7 @@ export function articleList (params) {
*/ */
export function articleCateList () { export function articleCateList () {
return request({ return request({
url: `/buyer/article/articleCategory/list`, url: `/buyer/other/article/articleCategory/list`,
method: Method.GET method: Method.GET
}); });
} }
@ -77,7 +77,7 @@ export function articleCateList () {
// 通过id获取文章 // 通过id获取文章
export function articleDetail (id) { export function articleDetail (id) {
return request({ return request({
url: `/buyer/article/get/${id}`, url: `/buyer/other/article/get/${id}`,
method: Method.GET method: Method.GET
}); });
} }

View File

@ -5,7 +5,7 @@ import request, {
// 商品列表 // 商品列表
export function goodsList (params) { export function goodsList (params) {
return request({ return request({
url: '/buyer/goods/es', url: '/buyer/goods/goods/es',
method: Method.GET, method: Method.GET,
needToken: false, needToken: false,
params params
@ -15,7 +15,7 @@ export function goodsList (params) {
// 商品分类 筛选条件 品牌, 尺寸等 // 商品分类 筛选条件 品牌, 尺寸等
export function filterList (params) { export function filterList (params) {
return request({ return request({
url: '/buyer/goods/es/related', url: '/buyer/goods/goods/es/related',
method: Method.GET, method: Method.GET,
needToken: false, needToken: false,
params params
@ -25,7 +25,7 @@ export function filterList (params) {
// id获取商品详情 // id获取商品详情
export function goodsDetail (goodsId) { export function goodsDetail (goodsId) {
return request({ return request({
url: `/buyer/goods/get/${goodsId}`, url: `/buyer/goods/goods/get/${goodsId}`,
method: Method.GET, method: Method.GET,
needToken: false needToken: false
}); });
@ -34,7 +34,7 @@ export function goodsDetail (goodsId) {
// id获取商品Sku详情 // id获取商品Sku详情
export function goodsSkuDetail (params) { export function goodsSkuDetail (params) {
return request({ return request({
url: `/buyer/goods/sku/${params.goodsId}/${params.skuId}`, url: `/buyer/goods/goods/sku/${params.goodsId}/${params.skuId}`,
method: Method.GET, method: Method.GET,
needToken: true, needToken: true,
params params
@ -44,7 +44,7 @@ export function goodsSkuDetail (params) {
// 获取所有商品分类 // 获取所有商品分类
export function getCategory (parentId) { export function getCategory (parentId) {
return request({ return request({
url: `/buyer/category/get/${parentId}`, url: `/buyer/goods/category/get/${parentId}`,
method: Method.GET, method: Method.GET,
needToken: false needToken: false
}); });
@ -65,7 +65,7 @@ export function pintuanMembers (pintuanId) {
*/ */
export function hotWords (params) { export function hotWords (params) {
return request({ return request({
url: `/buyer/goods/hot-words`, url: `/buyer/goods/goods/hot-words`,
method: Method.GET, method: Method.GET,
needToken: false, needToken: false,
params params

View File

@ -3,7 +3,7 @@ import request, {Method} from '@/plugins/request.js'
// 获取首页楼层装修数据 // 获取首页楼层装修数据
export function indexData (params) { export function indexData (params) {
return request({ return request({
url: '/buyer/pageData/getIndex', url: '/buyer/other/pageData/getIndex',
method: Method.GET, method: Method.GET,
needToken: false, needToken: false,
params params
@ -17,7 +17,7 @@ export function indexData (params) {
*/ */
export function pageData (params) { export function pageData (params) {
return request({ return request({
url: `/buyer/pageData`, url: `/buyer/other/pageData`,
method: Method.GET, method: Method.GET,
needToken: false, needToken: false,
params params
@ -28,7 +28,7 @@ export function pageData (params) {
*/ */
export function handleRefreshToken (token) { export function handleRefreshToken (token) {
return request({ return request({
url: `/buyer/members/refresh/${token}`, url: `/buyer/passport/member/refresh/${token}`,
method: Method.GET, method: Method.GET,
needToken: false needToken: false
}) })

View File

@ -6,7 +6,7 @@ import request, {Method, buyerUrl} from '@/plugins/request.js';
*/ */
export function regist (params) { export function regist (params) {
return request({ return request({
url: '/buyer/members/register', url: '/buyer/passport/member/register',
method: Method.POST, method: Method.POST,
needToken: false, needToken: false,
data: params data: params
@ -18,7 +18,7 @@ export function regist (params) {
*/ */
export function login (params) { export function login (params) {
return request({ return request({
url: '/buyer/members/userLogin', url: '/buyer/passport/member/userLogin',
method: Method.POST, method: Method.POST,
needToken: false, needToken: false,
data: params, data: params,
@ -31,7 +31,7 @@ export function login (params) {
*/ */
export function smsLogin (params) { export function smsLogin (params) {
return request({ return request({
url: '/buyer/members/smsLogin', url: '/buyer/passport/member/smsLogin',
method: Method.POST, method: Method.POST,
needToken: false, needToken: false,
data: params, data: params,
@ -44,7 +44,7 @@ export function smsLogin (params) {
*/ */
export function getMemberMsg (params) { export function getMemberMsg (params) {
return request({ return request({
url: '/buyer/members', url: '/buyer/passport/member',
method: Method.GET, method: Method.GET,
needToken: true, needToken: true,
params params
@ -55,7 +55,7 @@ export function getMemberMsg (params) {
* 第三方登录 支付宝微博qq,微信 * 第三方登录 支付宝微博qq,微信
*/ */
export function webLogin (type) { export function webLogin (type) {
window.open(`${buyerUrl}/buyer/connect/login/web/${type}`, 'blank'); window.open(`${buyerUrl}/buyer/passport/connect/connect/login/web/${type}`, 'blank');
} }
/** /**
@ -63,7 +63,7 @@ export function webLogin (type) {
*/ */
export function loginCallback (uuid) { export function loginCallback (uuid) {
return request({ return request({
url: `/buyer/connect/result?state=${uuid}`, url: `/buyer/passport/connect/connect/result?state=${uuid}`,
method: Method.GET, method: Method.GET,
needToken: false needToken: false
}); });
@ -74,7 +74,7 @@ export function loginCallback (uuid) {
*/ */
export function validateCode (params) { export function validateCode (params) {
return request({ return request({
url: `/buyer/members/resetByMobile`, url: `/buyer/passport/member/resetByMobile`,
method: Method.POST, method: Method.POST,
needToken: false, needToken: false,
params params
@ -86,7 +86,7 @@ export function validateCode (params) {
*/ */
export function resetPassword (params) { export function resetPassword (params) {
return request({ return request({
url: `/buyer/members/resetPassword`, url: `/buyer/passport/member/resetPassword`,
method: Method.POST, method: Method.POST,
needToken: false, needToken: false,
params params

View File

@ -3,7 +3,7 @@ import request, {Method} from '@/plugins/request.js';
// 查询账户余额 // 查询账户余额
export function getMembersWallet () { export function getMembersWallet () {
return request({ return request({
url: '/buyer/members/wallet', url: '/buyer/passport/members/wallet',
method: Method.GET, method: Method.GET,
needToken: true needToken: true
}); });
@ -22,7 +22,7 @@ export function getDepositLog (params) {
// 查询充值记录 // 查询充值记录
export function getRecharge (params) { export function getRecharge (params) {
return request({ return request({
url: '/buyer/member/recharge', url: '/buyer/wallet/recharge',
method: Method.GET, method: Method.GET,
needToken: true, needToken: true,
params params
@ -52,7 +52,7 @@ export function recharge (params) {
// 提现 // 提现
export function withdrawalApply (params) { export function withdrawalApply (params) {
return request({ return request({
url: '/buyer/members/wallet/withdrawal', url: '/buyer/passport/members/wallet/withdrawal',
method: Method.POST, method: Method.POST,
needToken: true, needToken: true,
data: params data: params
@ -99,7 +99,7 @@ export function collectList (params) {
// 单个商品评价 // 单个商品评价
export function goodsComment (params) { export function goodsComment (params) {
return request({ return request({
url: `/buyer/memberEvaluation/${params.goodsId}/goodsEvaluation`, url: `/buyer/member/evaluation/${params.goodsId}/goodsEvaluation`,
method: Method.GET, method: Method.GET,
needToken: false, needToken: false,
params params
@ -109,7 +109,7 @@ export function goodsComment (params) {
// 商品各评价类别数量 // 商品各评价类别数量
export function goodsCommentNum (goodsId) { export function goodsCommentNum (goodsId) {
return request({ return request({
url: `/buyer/memberEvaluation/${goodsId}/evaluationNumber`, url: `/buyer/member/evaluation/${goodsId}/evaluationNumber`,
method: Method.GET, method: Method.GET,
needToken: false needToken: false
}); });
@ -118,7 +118,7 @@ export function goodsCommentNum (goodsId) {
// 添加会员评价 // 添加会员评价
export function addEvaluation (params) { export function addEvaluation (params) {
return request({ return request({
url: `/buyer/memberEvaluation`, url: `/buyer/member/evaluation`,
method: Method.POST, method: Method.POST,
needToken: true, needToken: true,
params params
@ -128,7 +128,7 @@ export function addEvaluation (params) {
// 会员评价详情 // 会员评价详情
export function evaluationDetail (id) { export function evaluationDetail (id) {
return request({ return request({
url: `/buyer/memberEvaluation/get/${id}`, url: `/buyer/member/evaluation/get/${id}`,
method: Method.GET, method: Method.GET,
needToken: true needToken: true
}); });
@ -195,7 +195,7 @@ export function receiveCoupon (couponId) {
// 获取申请售后列表 // 获取申请售后列表
export function afterSaleList (params) { export function afterSaleList (params) {
return request({ return request({
url: `/buyer/afterSale/page`, url: `/buyer/order/afterSale/page`,
method: Method.GET, method: Method.GET,
needToken: true, needToken: true,
params params
@ -205,7 +205,7 @@ export function afterSaleList (params) {
// 获取申请售后页面信息 // 获取申请售后页面信息
export function afterSaleInfo (sn) { export function afterSaleInfo (sn) {
return request({ return request({
url: `/buyer/afterSale/applyAfterSaleInfo/${sn}`, url: `/buyer/order/afterSale/applyAfterSaleInfo/${sn}`,
method: Method.GET, method: Method.GET,
needToken: true needToken: true
}); });
@ -214,7 +214,7 @@ export function afterSaleInfo (sn) {
// 获取申请售后、投诉原因 // 获取申请售后、投诉原因
export function afterSaleReason (serviceType) { export function afterSaleReason (serviceType) {
return request({ return request({
url: `/buyer/afterSale/get/afterSaleReason/${serviceType}`, url: `/buyer/order/afterSale/get/afterSaleReason/${serviceType}`,
method: Method.GET, method: Method.GET,
needToken: true needToken: true
}); });
@ -222,7 +222,7 @@ export function afterSaleReason (serviceType) {
// 获取申请售后详情 // 获取申请售后详情
export function afterSaleDetail (sn) { export function afterSaleDetail (sn) {
return request({ return request({
url: `/buyer/afterSale/get/${sn}`, url: `/buyer/order/afterSale/get/${sn}`,
method: Method.GET, method: Method.GET,
needToken: true needToken: true
}); });
@ -230,7 +230,7 @@ export function afterSaleDetail (sn) {
// 售后日志 // 售后日志
export function afterSaleLog (sn) { export function afterSaleLog (sn) {
return request({ return request({
url: `/buyer/afterSale/get/getAfterSaleLog/${sn}`, url: `/buyer/order/afterSale/get/getAfterSaleLog/${sn}`,
method: Method.GET, method: Method.GET,
needToken: true needToken: true
}); });
@ -239,7 +239,7 @@ export function afterSaleLog (sn) {
// 申请售后 // 申请售后
export function applyAfterSale (params) { export function applyAfterSale (params) {
return request({ return request({
url: `/buyer/afterSale/save/${params.orderItemSn}`, url: `/buyer/order/afterSale/save/${params.orderItemSn}`,
method: Method.POST, method: Method.POST,
needToken: true, needToken: true,
params params
@ -249,7 +249,7 @@ export function applyAfterSale (params) {
// 取消售后申请 // 取消售后申请
export function cancelAfterSale (afterSaleSn) { export function cancelAfterSale (afterSaleSn) {
return request({ return request({
url: `/buyer/afterSale/cancel/${afterSaleSn}`, url: `/buyer/order/afterSale/cancel/${afterSaleSn}`,
method: Method.POST, method: Method.POST,
needToken: true needToken: true
}); });
@ -258,7 +258,7 @@ export function cancelAfterSale (afterSaleSn) {
// 投诉商品 // 投诉商品
export function handleComplain (data) { export function handleComplain (data) {
return request({ return request({
url: `/buyer/complain`, url: `/buyer/order/complain`,
method: Method.POST, method: Method.POST,
needToken: true, needToken: true,
data data
@ -267,7 +267,7 @@ export function handleComplain (data) {
// 分页获取我的投诉列表 // 分页获取我的投诉列表
export function complainList (params) { export function complainList (params) {
return request({ return request({
url: `/buyer/complain`, url: `/buyer/order/complain`,
method: Method.GET, method: Method.GET,
needToken: true, needToken: true,
params params
@ -279,7 +279,7 @@ export function complainList (params) {
*/ */
export function getComplainDetail (id) { export function getComplainDetail (id) {
return request({ return request({
url: `/buyer/complain/${id}`, url: `/buyer/order/complain/${id}`,
method: Method.GET, method: Method.GET,
needToken: true needToken: true
}); });
@ -290,7 +290,7 @@ export function getComplainDetail (id) {
*/ */
export function clearComplain (id) { export function clearComplain (id) {
return request({ return request({
url: `/buyer/complain/status/${id}`, url: `/buyer/order/complain/status/${id}`,
method: Method.PUT, method: Method.PUT,
needToken: true needToken: true
}); });
@ -301,7 +301,7 @@ export function clearComplain (id) {
*/ */
export function distribution () { export function distribution () {
return request({ return request({
url: `/buyer/distribution`, url: `/buyer/distribution/distribution`,
method: Method.GET, method: Method.GET,
needToken: true needToken: true
}); });
@ -314,7 +314,7 @@ export function distribution () {
*/ */
export function applyDistribution (params) { export function applyDistribution (params) {
return request({ return request({
url: `/buyer/distribution`, url: `/buyer/distribution/distribution`,
method: Method.POST, method: Method.POST,
needToken: true, needToken: true,
params params
@ -326,7 +326,7 @@ export function applyDistribution (params) {
*/ */
export function getDistOrderList (params) { export function getDistOrderList (params) {
return request({ return request({
url: `/buyer/distribution/distributionOrder`, url: `/buyer/distribution/order`,
method: Method.GET, method: Method.GET,
needToken: true, needToken: true,
params params
@ -338,7 +338,7 @@ export function getDistOrderList (params) {
*/ */
export function getDistGoodsList (params) { export function getDistGoodsList (params) {
return request({ return request({
url: `/buyer/distributionGoods`, url: `/buyer/distribution/goods`,
method: Method.GET, method: Method.GET,
needToken: true, needToken: true,
params params
@ -352,7 +352,7 @@ export function getDistGoodsList (params) {
*/ */
export function selectDistGoods (params) { export function selectDistGoods (params) {
return request({ return request({
url: `/buyer/distributionGoods/checked/${params.distributionGoodsId}`, url: `/buyer/distribution/goods/checked/${params.distributionGoodsId}`,
method: Method.GET, method: Method.GET,
needToken: true, needToken: true,
params params
@ -390,7 +390,7 @@ export function distCash (params) {
*/ */
export function tracksList (params) { export function tracksList (params) {
return request({ return request({
url: `/buyer/footprint`, url: `/buyer/member/footprint`,
method: Method.GET, method: Method.GET,
needToken: true, needToken: true,
params params
@ -402,7 +402,7 @@ export function tracksList (params) {
*/ */
export function clearTracks () { export function clearTracks () {
return request({ return request({
url: `/buyer/footprint`, url: `/buyer/member/footprint`,
method: Method.DELETE, method: Method.DELETE,
needToken: true needToken: true
}); });
@ -414,7 +414,7 @@ export function clearTracks () {
*/ */
export function clearTracksById (ids) { export function clearTracksById (ids) {
return request({ return request({
url: `/buyer/footprint/delByIds/${ids}`, url: `/buyer/member/footprint/delByIds/${ids}`,
method: Method.DELETE, method: Method.DELETE,
needToken: true needToken: true
}); });
@ -449,7 +449,7 @@ export function memberPointHistory (params) {
*/ */
export function memberMsgList (params) { export function memberMsgList (params) {
return request({ return request({
url: `/buyer/member/message`, url: `/buyer/message/member`,
method: Method.GET, method: Method.GET,
needToken: true, needToken: true,
params params
@ -462,7 +462,7 @@ export function memberMsgList (params) {
export function readMemberMsg (id) { export function readMemberMsg (id) {
return request({ return request({
url: `/buyer/member/message/${id}`, url: `/buyer/message/member/${id}`,
method: Method.PUT, method: Method.PUT,
needToken: true needToken: true
}); });
@ -473,7 +473,7 @@ export function readMemberMsg (id) {
*/ */
export function delMemberMsg (id) { export function delMemberMsg (id) {
return request({ return request({
url: `/buyer/member/message/${id}`, url: `/buyer/message/member/${id}`,
method: Method.DELETE, method: Method.DELETE,
needToken: true needToken: true
}); });

View File

@ -5,7 +5,7 @@ import request, {
// 查询会员订单列表 // 查询会员订单列表
export function getOrderList (params) { export function getOrderList (params) {
return request({ return request({
url: `/buyer/orders`, url: `/buyer/order/order`,
method: Method.GET, method: Method.GET,
needToken: true, needToken: true,
params params
@ -18,7 +18,7 @@ export function getOrderList (params) {
*/ */
export function orderDetail (orderSn) { export function orderDetail (orderSn) {
return request({ return request({
url: `/buyer/orders/${orderSn}`, url: `/buyer/order/order/${orderSn}`,
method: Method.GET, method: Method.GET,
needToken: true needToken: true
}); });
@ -31,7 +31,7 @@ export function orderDetail (orderSn) {
*/ */
export function cancelOrder (params) { export function cancelOrder (params) {
return request({ return request({
url: `/buyer/orders/${params.orderSn}/cancel`, url: `/buyer/order/order/${params.orderSn}/cancel`,
method: Method.POST, method: Method.POST,
needToken: true, needToken: true,
params params
@ -44,7 +44,7 @@ export function cancelOrder (params) {
*/ */
export function delOrder (orderSn) { export function delOrder (orderSn) {
return request({ return request({
url: `/buyer/orders/${orderSn}`, url: `/buyer/order/order/${orderSn}`,
method: Method.DELETE, method: Method.DELETE,
needToken: true needToken: true
}); });
@ -56,7 +56,7 @@ export function delOrder (orderSn) {
*/ */
export function sureReceived (orderSn) { export function sureReceived (orderSn) {
return request({ return request({
url: `/buyer/orders/${orderSn}/receiving`, url: `/buyer/order/order/${orderSn}/receiving`,
method: Method.POST, method: Method.POST,
needToken: true needToken: true
}); });
@ -68,7 +68,7 @@ export function sureReceived (orderSn) {
*/ */
export function getTraces (orderSn) { export function getTraces (orderSn) {
return request({ return request({
url: `/buyer/orders/getTraces/${orderSn}`, url: `/buyer/order/order/getTraces/${orderSn}`,
method: Method.POST, method: Method.POST,
needToken: true needToken: true
}); });
@ -80,7 +80,7 @@ export function getTraces (orderSn) {
*/ */
export function evolutionList (params) { export function evolutionList (params) {
return request({ return request({
url: `/buyer/memberEvaluation`, url: `/buyer/member/evaluation`,
method: Method.GET, method: Method.GET,
needToken: true, needToken: true,
params params
@ -90,7 +90,7 @@ export function evolutionList (params) {
// 添加交易投诉对话 // 添加交易投诉对话
export function communication (params) { export function communication (params) {
return request({ return request({
url: `/buyer/complain/communication`, url: `/buyer/order/complain/communication`,
method: Method.POST, method: Method.POST,
needToken: true, needToken: true,
params params
@ -100,7 +100,7 @@ export function communication (params) {
// 退换货服务 提交物流 // 退换货服务 提交物流
export function afterSaleDelivery (params) { export function afterSaleDelivery (params) {
return request({ return request({
url: `/buyer/afterSale/delivery/${params.afterSaleSn}`, url: `/buyer/order/afterSale/delivery/${params.afterSaleSn}`,
method: Method.POST, method: Method.POST,
needToken: true, needToken: true,
params params
@ -109,7 +109,7 @@ export function afterSaleDelivery (params) {
// 获取退货可选物流公司 // 获取退货可选物流公司
export function getLogisticsCompany () { export function getLogisticsCompany () {
return request({ return request({
url: `/buyer/logistics`, url: `/buyer/other/logistics`,
method: Method.GET, method: Method.GET,
needToken: true, needToken: true,
params: { pageNumber: 1, pageSize: 200, disabled: 'OPEN' } params: { pageNumber: 1, pageSize: 200, disabled: 'OPEN' }

View File

@ -10,7 +10,7 @@ import request, {
*/ */
export function tradeDetail (params) { export function tradeDetail (params) {
return request({ return request({
url: '/buyer/cashier/tradeDetail', url: '/buyer/payment/cashier/tradeDetail',
needToken: true, needToken: true,
method: Method.GET, method: Method.GET,
params params
@ -26,7 +26,7 @@ export function tradeDetail (params) {
*/ */
export function pay (params) { export function pay (params) {
return request({ return request({
url: `/buyer/cashier/pay/${params.paymentMethod}/${params.paymentClient}`, url: `/buyer/payment/cashier/pay/${params.paymentMethod}/${params.paymentClient}`,
needToken: true, needToken: true,
method: Method.GET, method: Method.GET,
params params
@ -40,7 +40,7 @@ export function pay (params) {
*/ */
export function payCallback (params) { export function payCallback (params) {
return request({ return request({
url: `/buyer/cashier/result`, url: `/buyer/payment/cashier/result`,
needToken: true, needToken: true,
method: Method.GET, method: Method.GET,
params params

View File

@ -5,7 +5,7 @@ import request, {
// 店铺分页列表 // 店铺分页列表
export function shopList (params) { export function shopList (params) {
return request({ return request({
url: '/buyer/store', url: '/buyer/store/store',
needToken: true, needToken: true,
method: Method.GET, method: Method.GET,
params params
@ -15,7 +15,7 @@ export function shopList (params) {
// 申请店铺第一步-填写企业信息 // 申请店铺第一步-填写企业信息
export function applyFirst (params) { export function applyFirst (params) {
return request({ return request({
url: '/buyer/store/apply/first', url: '/buyer/store/store/apply/first',
needToken: true, needToken: true,
method: Method.PUT, method: Method.PUT,
params params
@ -25,7 +25,7 @@ export function applyFirst (params) {
// 申请店铺第一步-填写企业信息 // 申请店铺第一步-填写企业信息
export function applySecond (params) { export function applySecond (params) {
return request({ return request({
url: '/buyer/store/apply/second', url: '/buyer/store/store/apply/second',
needToken: true, needToken: true,
method: Method.PUT, method: Method.PUT,
params params
@ -35,7 +35,7 @@ export function applySecond (params) {
// 申请店铺第一步-填写企业信息 // 申请店铺第一步-填写企业信息
export function applyThird (params) { export function applyThird (params) {
return request({ return request({
url: '/buyer/store/apply/third', url: '/buyer/store/store/apply/third',
needToken: true, needToken: true,
method: Method.PUT, method: Method.PUT,
params params
@ -45,7 +45,7 @@ export function applyThird (params) {
// 店铺详情 // 店铺详情
export function getDetailById (id) { export function getDetailById (id) {
return request({ return request({
url: `/buyer/store/get/detail/${id}`, url: `/buyer/store/store/get/detail/${id}`,
needToken: true, needToken: true,
method: Method.GET method: Method.GET
}) })
@ -53,7 +53,7 @@ export function getDetailById (id) {
// 店铺分类 // 店铺分类
export function getCateById (id) { export function getCateById (id) {
return request({ return request({
url: `/buyer/store/label/get/${id}`, url: `/buyer/goods/store/label/get/${id}`,
needToken: true, needToken: true,
method: Method.GET method: Method.GET
}) })
@ -61,7 +61,7 @@ export function getCateById (id) {
// 店铺入驻协议 // 店铺入驻协议
export function agreement () { export function agreement () {
return request({ return request({
url: `/buyer/article/type/STORE_REGISTER`, url: `/buyer/other/article/type/STORE_REGISTER`,
needToken: true, needToken: true,
method: Method.GET method: Method.GET
}) })
@ -70,7 +70,7 @@ export function agreement () {
// 获取当前登录会员的店铺信息 // 获取当前登录会员的店铺信息
export function applyStatus () { export function applyStatus () {
return request({ return request({
url: `/buyer/store/apply`, url: `/buyer/store/store/apply`,
needToken: true, needToken: true,
method: Method.GET method: Method.GET
}) })

View File

@ -159,6 +159,6 @@ export default {
position: relative; position: relative;
height: 0px; height: 0px;
top: -38px; top: -38px;
left: 339px; left: 352px;
} }
</style> </style>

View File

@ -7,7 +7,7 @@ import storage from '@/plugins/storage.js';
*/ */
export function getVerifyImg (verificationEnums) { export function getVerifyImg (verificationEnums) {
return request({ return request({
url: `${commonUrl}/common/slider/${verificationEnums}`, url: `${commonUrl}/common/common/slider/${verificationEnums}`,
method: Method.GET, method: Method.GET,
needToken: false, needToken: false,
headers: {uuid: storage.getItem('uuid')} headers: {uuid: storage.getItem('uuid')}
@ -19,7 +19,7 @@ export function getVerifyImg (verificationEnums) {
*/ */
export function postVerifyImg (params) { export function postVerifyImg (params) {
return request({ return request({
url: `${commonUrl}/common/slider/${params.verificationEnums}`, url: `${commonUrl}/common/common/slider/${params.verificationEnums}`,
method: Method.POST, method: Method.POST,
needToken: false, needToken: false,
params, params,

View File

@ -7,6 +7,6 @@ module.exports = {
}, //公司信息 }, //公司信息
icpMessage: "京ICP备20009696号-1", //icp备案 icpMessage: "京ICP备20009696号-1", //icp备案
aMapKey: "b440952723253aa9fe483e698057bf7d", //高德web端申请的api key aMapKey: "b440952723253aa9fe483e698057bf7d", //高德web端申请的api key
enableCDN: true, //生产环境 是否启用cdn加载 vue等js enableCDN: false, //生产环境 是否启用cdn加载 vue等js
port: 10000, //端口 port: 10000, //端口
}; };

View File

@ -51,6 +51,7 @@ export default {
list: [], // list: [], //
total: 0, // total: 0, //
params: { // params: { //
getType: 'FREE',
pageNumber: 1, pageNumber: 1,
pageSize: 20 pageSize: 20
} }
@ -95,6 +96,7 @@ export default {
content: '<p>优惠券领取成功,可到我的优惠券页面查看</p>', content: '<p>优惠券领取成功,可到我的优惠券页面查看</p>',
okText: '我的优惠券', okText: '我的优惠券',
cancelText: '立即使用', cancelText: '立即使用',
closable: true,
onOk: () => { onOk: () => {
this.$router.push('/home/Coupons') this.$router.push('/home/Coupons')
}, },

View File

@ -69,13 +69,30 @@
>人评价 >人评价
</div> </div>
<div class="goods-show-seller"> <div class="goods-show-seller">
<Tag class="goods-show-buyer" v-if="item.content.selfOperated" size="default" color="error"> <Tag
class="goods-show-buyer"
v-if="item.content.selfOperated"
size="default"
color="error"
>自营
</Tag> </Tag>
<div class="goods-show-right"> <div class="goods-show-right">
<div class="goods-show-middle" v-if="goodsListType.content.goodsType == 'VIRTUAL_GOODS'"></div> <div
<div class="goods-show-middle" v-else-if="goodsListType.content.goodsType == 'PHYSICAL_GOODS'">实物</div> class="goods-show-middle"
v-if="goodsListType.content.goodsType == 'VIRTUAL_GOODS'"
>
虚拟
</div> </div>
<span class="text-bottom" style="color:#e4393c;">{{ item.content.storeName }}</span> <div
class="goods-show-middle"
v-else-if="goodsListType.content.goodsType == 'PHYSICAL_GOODS'"
>
实物
</div>
</div>
<span class="text-bottom" style="color: #e4393c">{{
item.content.storeName
}}</span>
</div> </div>
</div> </div>
</div> </div>
@ -98,10 +115,10 @@
</template> </template>
<script> <script>
import GoodsClassNav from '@/components/nav/GoodsClassNav'; import GoodsClassNav from "@/components/nav/GoodsClassNav";
import * as apiGoods from '@/api/goods'; import * as apiGoods from "@/api/goods";
export default { export default {
name: 'GoodsList', name: "GoodsList",
beforeRouteEnter(to, from, next) { beforeRouteEnter(to, from, next) {
window.scrollTo(0, 0); window.scrollTo(0, 0);
next(); next();
@ -110,60 +127,64 @@ export default {
return { return {
sortIndex: 0, // sortIndex: 0, //
sortPriceIndex: false, // sortPriceIndex: false, //
goodsTool: [ // goodsTool: [
{ title: '综合', en: '' }, //
{ title: '销量', en: 'buyCount' }, { title: "综合", en: "" },
{ title: '评论数', en: 'commentNum' }, { title: "销量", en: "buyCount" },
{ title: '新品', en: 'releaseTime' } { title: "评论数", en: "commentNum" },
{ title: "新品", en: "releaseTime" },
], ],
goodsList: [], // goodsList: [], //
loading: false, // loading: false, //
goodsListType: "", goodsListType: "",
total: 0, // total: 0, //
params: { // params: {
//
pageNumber: 0, pageNumber: 0,
pageSize: 20, pageSize: 20,
categoryId: '' categoryId: "",
} },
}; };
}, },
watch: { watch: {
$route() { $route() {
const keyword = this.$route.query.keyword const keyword = this.$route.query.keyword;
this.handleSearch(keyword) this.handleSearch(keyword);
} },
}, },
methods: { methods: {
// //
handleSearch(key) { handleSearch(key) {
this.params.keyword = key this.params.keyword = key;
this.params.pageNumber = 0 this.params.pageNumber = 0;
this.getGoodsList() this.getGoodsList();
}, },
orderBy(data, index) { orderBy(data, index) {
// //
this.sortIndex = index; this.sortIndex = index;
this.params.sort = data; this.params.sort = data;
this.params.order = 'desc'; this.params.order = "desc";
if (data === 'price') { if (data === "price") {
if (!this.sortPriceIndex) { if (!this.sortPriceIndex) {
this.sortPriceIndex = 'asc'; this.sortPriceIndex = "asc";
} else { } else {
this.sortPriceIndex === 'desc' ? (this.sortPriceIndex = 'asc') : (this.sortPriceIndex = 'desc'); this.sortPriceIndex === "desc"
? (this.sortPriceIndex = "asc")
: (this.sortPriceIndex = "desc");
} }
this.params.order = this.sortPriceIndex this.params.order = this.sortPriceIndex;
} else { } else {
this.sortPriceIndex = false this.sortPriceIndex = false;
} }
this.getGoodsList(); this.getGoodsList();
}, },
goGoodsDetail(skuId, goodsId) { goGoodsDetail(skuId, goodsId) {
// //
let routeUrl = this.$router.resolve({ let routeUrl = this.$router.resolve({
path: '/goodsDetail', path: "/goodsDetail",
query: { skuId, goodsId } query: { skuId, goodsId },
}); });
window.open(routeUrl.href, '_blank'); window.open(routeUrl.href, "_blank");
}, },
// //
changePageNum(val) { changePageNum(val) {
@ -179,7 +200,8 @@ export default {
// //
getGoodsList() { getGoodsList() {
this.loading = true; this.loading = true;
apiGoods.goodsList(this.params) apiGoods
.goodsList(this.params)
.then((res) => { .then((res) => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
@ -189,41 +211,43 @@ export default {
this.goodsListType = this.goodsList[i]; this.goodsListType = this.goodsList[i];
} }
} }
}).catch(() => { })
.catch(() => {
this.loading = false; this.loading = false;
}); });
}, },
getParams(val) { getParams(val) {
// //
Object.assign(this.params, val) Object.assign(this.params, val);
this.getGoodsList() this.getGoodsList();
} },
}, },
created() { created() {
if (this.$route.query.categoryId) { if (this.$route.query.categoryId) {
let cateId = this.$route.query.categoryId.split(',') let cateId = this.$route.query.categoryId.split(",");
Object.assign(this.params, this.$route.query) Object.assign(this.params, this.$route.query);
this.params.categoryId = cateId[cateId.length - 1] this.params.categoryId = cateId[cateId.length - 1];
} else { } else {
Object.assign(this.params, this.$route.query) Object.assign(this.params, this.$route.query);
} }
this.getGoodsList() this.getGoodsList();
}, },
components: { components: {
GoodsClassNav GoodsClassNav,
} },
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import '../assets/styles/goodsList.scss'; @import "../assets/styles/goodsList.scss";
.goods-show-info > .goods-show-seller > .goods-show-buyer { .goods-show-info > .goods-show-seller > .goods-show-buyer {
height:16px;width:30px; height: 16px;
width: 30px;
white-space: nowrap; white-space: nowrap;
line-height: 17px; line-height: 17px;
text-align: center; text-align: center;
padding: 0 3px; padding: 0 3px;
background-color:#E23A3A; background-color: #e23a3a;
} }
.goods-show-seller { .goods-show-seller {
// padding:3px 0; // padding:3px 0;
@ -236,7 +260,7 @@ export default {
position: relative; position: relative;
} }
.price-sort:hover { .price-sort:hover {
color:#E23A3A; color: #e23a3a;
} }
.goods-box { .goods-box {
display: flex; display: flex;

View File

@ -0,0 +1,88 @@
<template>
<div class="box">
<div class="wrapper">
<div class="nav" @click="back">
<img src="@/assets/images/logo2.png" alt="" class="logo" />
<div class="title">{{ detail.title }}</div>
</div>
<div v-html="detail.content"></div>
</div>
</div>
</template>
<script>
import { articleDetail } from "@/api/common.js";
const config = require("@/config/index");
export default {
data() {
return {
config,
detail: "",
};
},
mounted() {
this.init();
},
methods: {
back() {
this.$router.push("/");
},
//
init() {
const id = this.$route.query.id;
articleDetail(id).then((res) => {
if (res.success) {
this.detail = res.result;
}
});
},
},
};
</script>
<style lang="scss" scoped>
.logo {
max-width: 200px;
}
.box {
min-height: 100vh;
width: 1200px;
overflow: hidden;
margin: 0 auto;
padding: 32px;
}
.wrapper {
width: 1200px;
min-height: 600px;
padding: 32px;
background: #fff;
}
.nav {
text-align: center;
font-size: 21px;
font-weight: bold;
}
.title {
text-align: center;
font-size: 21px;
margin: 20px 0;
}
// iphone
@media screen and (max-width: 767px) {
.box {
min-height: 100vh;
width: 100%;
padding: 0;
margin: 0 auto;
}
.wrapper {
width: 100%;
min-height: 600px;
padding: 0 16px;
background: #fff;
}
}
</style>

View File

@ -48,7 +48,7 @@ export default {
nickName: [{required: true, message: '用户昵称不能为空'}, { max: 16, message: '用户昵称不能超过15个字符' }] nickName: [{required: true, message: '用户昵称不能为空'}, { max: 16, message: '用户昵称不能超过15个字符' }]
}, },
formItem: {}, // formItem: {}, //
action: commonUrl + '/common/upload/file', // action: commonUrl + '/common/common/upload/file', //
accessToken: {} // token accessToken: {} // token
} }
}, },

View File

@ -81,7 +81,7 @@ export default {
descriptionScore: 5 descriptionScore: 5
}, // }, //
visible: false, // visible: false, //
action: commonUrl + '/common/upload/file', // action: commonUrl + '/common/common/upload/file', //
accessToken: {}, // token accessToken: {}, // token
previewImage: '', // previewImage: '', //
loading: false // loading: false //

View File

@ -9,7 +9,7 @@
class="width_300" class="width_300"
search search
enter-button enter-button
v-model="params.keywords" v-model="params.sn"
@on-search="getList" @on-search="getList"
placeholder="请输入订单号搜索" placeholder="请输入订单号搜索"
/> />
@ -125,7 +125,7 @@ export default {
params: { // params: { //
pageNumber: 1, pageNumber: 1,
pageSize: 10, pageSize: 10,
keywords: '', sn: '',
sort: 'createTime', sort: 'createTime',
order: 'desc' order: 'desc'
}, },

View File

@ -117,7 +117,7 @@ export default {
num: 1 num: 1
}, },
uploadList: [], // uploadList: [], //
action: commonUrl + '/common/upload/file', // action: commonUrl + '/common/common/upload/file', //
accessToken: {}, // token accessToken: {}, // token
visible: false, // visible: false, //
previewImage: '', // url previewImage: '', // url

View File

@ -68,7 +68,7 @@ export default {
content: '' content: ''
}, // }, //
visible: false, // visible: false, //
action: commonUrl + '/common/upload/file', // action: commonUrl + '/common/common/upload/file', //
accessToken: {}, // token accessToken: {}, // token
previewImage: '', // previewImage: '', //
loading: false, // loading: false, //

View File

@ -313,8 +313,12 @@ export default {
let notSupArea = res.result.notSupportFreight; let notSupArea = res.result.notSupportFreight;
this.selectedCoupon = {}; this.selectedCoupon = {};
if (res.result.platformCoupon) if (res.result.platformCoupon)
this.selectedCoupon.platformCoupon = res.result.platformCoupon; this.selectedCoupon[res.result.platformCoupon.memberCoupon.id] = res.result.platformCoupon;
Object.assign(this.selectedCoupon, res.result.storeCoupons); if (res.result.storeCoupons && Object.keys(res.result.storeCoupons)[0]) {
let storeMemberCouponsId = Object.keys(res.result.storeCoupons)[0];
let storeCouponId = res.result.storeCoupons[storeMemberCouponsId].memberCoupon.id;
this.selectedCoupon[storeCouponId] = res.result.storeCoupons[storeMemberCouponsId];
}
if (notSupArea) { if (notSupArea) {
let content = []; let content = [];
let title = ""; let title = "";
@ -340,7 +344,7 @@ export default {
const couponKeys = Object.keys(this.selectedCoupon); const couponKeys = Object.keys(this.selectedCoupon);
if (couponKeys.length) { if (couponKeys.length) {
this.couponList.forEach((e) => { this.couponList.forEach((e) => {
if (e.id === this.selectedCoupon[couponKeys].memberCoupon.id) { if (this.selectedCoupon[e.id] && e.id === this.selectedCoupon[e.id].memberCoupon.id) {
this.usedCouponId.push(e.id); this.usedCouponId.push(e.id);
} }
}); });

View File

@ -205,7 +205,7 @@ export default {
}, },
data () { data () {
return { return {
action: commonUrl + '/common/upload/file', // action: commonUrl + '/common/common/upload/file', //
accessToken: {}, // token accessToken: {}, // token
visible: false, // visible: false, //
loading: false, // loading: false, //

View File

@ -129,7 +129,7 @@ export default {
return { return {
loading: false, // loading: false, //
uploadLoading: false, // uploadLoading: false, //
action: commonUrl + '/common/upload/file', // action: commonUrl + '/common/common/upload/file', //
accessToken: {}, // token accessToken: {}, // token
previewPicture: '', // previewPicture: '', //
address: '', // address: '', //

View File

@ -142,7 +142,7 @@ service.interceptors.response.use(
const errorResponse = error.response || {}; const errorResponse = error.response || {};
const errorData = errorResponse.data || {}; const errorData = errorResponse.data || {};
if (errorResponse.status === 403) { if (errorResponse.status === 403 || error.response.data.code === 20004) {
isRefreshToken++; isRefreshToken++;
if (isRefreshToken === 1) { if (isRefreshToken === 1) {

View File

@ -1,344 +1,383 @@
import Vue from 'vue'; import Vue from "vue";
import Router from 'vue-router'; import Router from "vue-router";
import Index from '@/pages/Index'; import Index from "@/pages/Index";
const Login = resolve => require(['@/pages/Login'], resolve); const Login = (resolve) => require(["@/pages/Login"], resolve);
const SignUp = resolve => require(['@/pages/SignUp'], resolve); const SignUp = (resolve) => require(["@/pages/SignUp"], resolve);
const ForgetPassword = resolve => require(['@/pages/ForgetPassword'], resolve); const ForgetPassword = (resolve) =>
const GoodsList = resolve => require(['@/pages/GoodsList'], resolve); require(["@/pages/ForgetPassword"], resolve);
const GoodsDetail = resolve => require(['@/pages/GoodsDetail'], resolve); const GoodsList = (resolve) => require(["@/pages/GoodsList"], resolve);
const PointGoodsDetail = resolve => require(['@/pages/promotion/PointGoodsDetail'], resolve); const GoodsDetail = (resolve) => require(["@/pages/GoodsDetail"], resolve);
const ShoppingCart = resolve => require(['@/pages/ShoppingCart'], resolve); const PointGoodsDetail = (resolve) =>
const Cart = resolve => require(['@/pages/Cart'], resolve); require(["@/pages/promotion/PointGoodsDetail"], resolve);
const Pay = resolve => require(['@/pages/payment/Pay'], resolve); const ShoppingCart = (resolve) => require(["@/pages/ShoppingCart"], resolve);
const PayDone = resolve => require(['@/pages/payment/PayDone'], resolve); const Cart = (resolve) => require(["@/pages/Cart"], resolve);
const PayMent = resolve => require(['@/pages/payment/PayMent'], resolve); const Pay = (resolve) => require(["@/pages/payment/Pay"], resolve);
const ThirdPay = resolve => require(['@/pages/payment/ThirdPay'], resolve); const PayDone = (resolve) => require(["@/pages/payment/PayDone"], resolve);
const Coupon = resolve => require(['@/pages/CouponCenter'], resolve); const PayMent = (resolve) => require(["@/pages/payment/PayMent"], resolve);
const seckill = resolve => require(['@/pages/promotion/seckill'], resolve); const ThirdPay = (resolve) => require(["@/pages/payment/ThirdPay"], resolve);
const article = resolve => require(['@/pages/article/index'], resolve); const Coupon = (resolve) => require(["@/pages/CouponCenter"], resolve);
const PointMall = resolve => require(['@/pages/promotion/PointMall'], resolve); const seckill = (resolve) => require(["@/pages/promotion/seckill"], resolve);
const article = (resolve) => require(["@/pages/article/index"], resolve);
const articleDetail = (resolve) => require(["@/pages/article/detail"], resolve);
const PointMall = (resolve) =>
require(["@/pages/promotion/PointMall"], resolve);
/* /*
* 会员中心 * 会员中心
* 订单列表 * 订单列表
*/ */
const MyOrder = resolve => require([`@/pages/home/orderCenter/MyOrder`], resolve); const MyOrder = (resolve) =>
const OrderDetail = resolve => require([`@/pages/home/orderCenter/OrderDetail`], resolve); require([`@/pages/home/orderCenter/MyOrder`], resolve);
const MyAddress = resolve => require(['@/pages/home/orderCenter/MyAddress'], resolve); const OrderDetail = (resolve) =>
const AddAddress = resolve => require(['@/pages/home/orderCenter/AddAddress'], resolve); require([`@/pages/home/orderCenter/OrderDetail`], resolve);
const Complain = resolve => require(['@/pages/home/orderCenter/Complain'], resolve); const MyAddress = (resolve) =>
const AfterSale = resolve => require(['@/pages/home/orderCenter/AfterSale'], resolve); require(["@/pages/home/orderCenter/MyAddress"], resolve);
const AfterSaleDetail = resolve => require(['@/pages/home/orderCenter/AfterSaleDetail'], resolve); const AddAddress = (resolve) =>
const ApplyAfterSale = resolve => require(['@/pages/home/orderCenter/ApplyAfterSale'], resolve); require(["@/pages/home/orderCenter/AddAddress"], resolve);
const Complain = (resolve) =>
require(["@/pages/home/orderCenter/Complain"], resolve);
const AfterSale = (resolve) =>
require(["@/pages/home/orderCenter/AfterSale"], resolve);
const AfterSaleDetail = (resolve) =>
require(["@/pages/home/orderCenter/AfterSaleDetail"], resolve);
const ApplyAfterSale = (resolve) =>
require(["@/pages/home/orderCenter/ApplyAfterSale"], resolve);
/* /*
* 会员中心 * 会员中心
*/ */
const Profile = resolve => require(['@/pages/home/memberCenter/Profile'], resolve); const Profile = (resolve) =>
const AccountSafe = resolve => require(['@/pages/home/memberCenter/AccountSafe'], resolve); require(["@/pages/home/memberCenter/Profile"], resolve);
const ModifyPwd = resolve => require(['@/pages/home/memberCenter/ModifyPwd'], resolve); const AccountSafe = (resolve) =>
const Favorites = resolve => require(['@/pages/home/memberCenter/Favorites'], resolve); require(["@/pages/home/memberCenter/AccountSafe"], resolve);
const Distribution = resolve => require(['@/pages/home/memberCenter/Distribution'], resolve); const ModifyPwd = (resolve) =>
const CommentList = resolve => require(['@/pages/home/memberCenter/CommentList'], resolve); // 评价列表 require(["@/pages/home/memberCenter/ModifyPwd"], resolve);
const AddEval = resolve => require(['@/pages/home/memberCenter/evaluation/AddEval'], resolve); // 添加评价 const Favorites = (resolve) =>
const EvalDetail = resolve => require(['@/pages/home/memberCenter/evaluation/EvalDetail'], resolve); require(["@/pages/home/memberCenter/Favorites"], resolve);
const ComplainList = resolve => require(['@/pages/home/memberCenter/ComplainList'], resolve); const Distribution = (resolve) =>
const ComplainDetail = resolve => require(['@/pages/home/memberCenter/ComplainDetail'], resolve); require(["@/pages/home/memberCenter/Distribution"], resolve);
const Point = resolve => require(['@/pages/home/memberCenter/Point'], resolve); const CommentList = (resolve) =>
const MsgList = resolve => require(['@/pages/home/memberCenter/memberMsg/MsgList'], resolve); require(["@/pages/home/memberCenter/CommentList"], resolve); // 评价列表
const MsgDetail = resolve => require(['@/pages/home/memberCenter/memberMsg/MsgDetail'], resolve); const AddEval = (resolve) =>
require(["@/pages/home/memberCenter/evaluation/AddEval"], resolve); // 添加评价
const EvalDetail = (resolve) =>
require(["@/pages/home/memberCenter/evaluation/EvalDetail"], resolve);
const ComplainList = (resolve) =>
require(["@/pages/home/memberCenter/ComplainList"], resolve);
const ComplainDetail = (resolve) =>
require(["@/pages/home/memberCenter/ComplainDetail"], resolve);
const Point = (resolve) =>
require(["@/pages/home/memberCenter/Point"], resolve);
const MsgList = (resolve) =>
require(["@/pages/home/memberCenter/memberMsg/MsgList"], resolve);
const MsgDetail = (resolve) =>
require(["@/pages/home/memberCenter/memberMsg/MsgDetail"], resolve);
/* /*
* 会员中心 * 会员中心
* 账户中心 * 账户中心
* */ * */
const Coupons = resolve => require(['@/pages/home/userCenter/Coupons'], resolve); const Coupons = (resolve) =>
const MyTracks = resolve => require(['@/pages/home/userCenter/MyTracks'], resolve); require(["@/pages/home/userCenter/Coupons"], resolve);
const MoneyManagement = resolve => require(['@/pages/home/userCenter/MoneyManagement'], resolve); const MyTracks = (resolve) =>
require(["@/pages/home/userCenter/MyTracks"], resolve);
const MoneyManagement = (resolve) =>
require(["@/pages/home/userCenter/MoneyManagement"], resolve);
const Home = resolve => require(['@/pages/user/Home'], resolve); const Home = (resolve) => require(["@/pages/user/Home"], resolve);
const Merchant = resolve => require(['@/pages/Merchant'], resolve); const Merchant = (resolve) => require(["@/pages/Merchant"], resolve);
const UserMain = resolve => require(['@/pages/home/Main'], resolve); const UserMain = (resolve) => require(["@/pages/home/Main"], resolve);
/** /**
* 店铺入驻 * 店铺入驻
*/ */
const ShopEntry = resolve => require(['@/pages/shopEntry/ShopEntry'], resolve); const ShopEntry = (resolve) =>
require(["@/pages/shopEntry/ShopEntry"], resolve);
Vue.use(Router); Vue.use(Router);
export default new Router({ export default new Router({
mode: 'history', mode: "history",
routes: [{ routes: [
path: '/', // 首页 {
name: 'Index', path: "/", // 首页
component: Index name: "Index",
component: Index,
}, },
{ {
path: '/login', // 登陆 path: "/login", // 登陆
name: 'login', name: "login",
component: Login, component: Login,
meta: { meta: {
title: '登录' title: "登录",
} },
}, },
{ {
path: '/SignUp', // 注册 path: "/SignUp", // 注册
name: 'SignUp', name: "SignUp",
component: SignUp, component: SignUp,
meta: { meta: {
title: '注册' title: "注册",
} },
}, },
{ {
path: '/forgetPassword', // 忘记密码 path: "/forgetPassword", // 忘记密码
name: 'forgetPassword', name: "forgetPassword",
component: ForgetPassword, component: ForgetPassword,
meta: { meta: {
title: '忘记密码' title: "忘记密码",
} },
}, },
{ {
path: '/goodsList', // 商品列表 path: "/goodsList", // 商品列表
name: 'GoodsList', name: "GoodsList",
component: GoodsList component: GoodsList,
}, },
{ {
path: '/goodsDetail', // 商品详情 path: "/goodsDetail", // 商品详情
name: 'GoodsDetail', name: "GoodsDetail",
component: GoodsDetail, component: GoodsDetail,
meta: {title: '商品详情'} meta: { title: "商品详情" },
}, },
{ {
path: '/pointGoodsDetail', // 商品详情 path: "/pointGoodsDetail", // 商品详情
name: 'PointGoodsDetail', name: "PointGoodsDetail",
component: PointGoodsDetail, component: PointGoodsDetail,
meta: {title: '积分商品'} meta: { title: "积分商品" },
}, },
{ {
path: '/shoppingCart', // 头部购物车 path: "/shoppingCart", // 头部购物车
name: 'ShoppingCart', name: "ShoppingCart",
component: ShoppingCart component: ShoppingCart,
}, },
{ {
path: '/cart', // 购物车 path: "/cart", // 购物车
name: 'Cart', name: "Cart",
component: Cart, component: Cart,
meta: {title: '购物车'} meta: { title: "购物车" },
}, },
{ {
path: '/pay', // 支付页面 path: "/pay", // 支付页面
name: 'Pay', name: "Pay",
component: Pay, component: Pay,
meta: {title: '订单结算'} meta: { title: "订单结算" },
}, },
{ {
path: '/payMent', path: "/payMent",
name: 'PayMent', name: "PayMent",
component: PayMent component: PayMent,
}, },
{ {
path: '/PointMall', path: "/PointMall",
name: 'PointMall', name: "PointMall",
component: PointMall, component: PointMall,
meta: {title: '积分商城'} meta: { title: "积分商城" },
}, },
{ {
path: '/qrpay', // 三方支付 path: "/qrpay", // 三方支付
name: 'qrpay', name: "qrpay",
component: ThirdPay component: ThirdPay,
}, },
{ {
path: '/payDone', // 支付成功页面 path: "/payDone", // 支付成功页面
name: 'PayDone', name: "PayDone",
component: PayDone component: PayDone,
}, },
{ {
path: '/article', // 文章页面 path: "/article", // 文章页面
name: 'article', name: "article",
component: article, component: article,
meta: { meta: {
title: '帮助中心' title: "帮助中心",
} },
}, },
{ {
path: '/shopEntry', path: "/article/detail", // 文章页面
name: 'shopEntry', name: "articleDetail",
component: articleDetail,
meta: {
title: "帮助中心",
},
},
{
path: "/shopEntry",
name: "shopEntry",
component: ShopEntry, component: ShopEntry,
meta: { meta: {
title: '店铺入驻' title: "店铺入驻",
} },
}, },
{ {
path: '/coupon', path: "/coupon",
name: 'coupon', name: "coupon",
component: Coupon, component: Coupon,
meta: { meta: {
title: '领券中心' title: "领券中心",
} },
}, },
{ {
path: '/seckill', path: "/seckill",
name: 'seckill', name: "seckill",
component: seckill, component: seckill,
meta: { meta: {
title: '限时秒杀' title: "限时秒杀",
} },
}, },
{ {
path: '/home', // 主页 path: "/home", // 主页
component: Home, component: Home,
children: [{ children: [
path: '/', {
name: 'Home', path: "/",
name: "Home",
component: UserMain, component: UserMain,
meta: { meta: {
title: '会员中心' title: "会员中心",
} },
}, },
{ {
path: 'MyTracks', path: "MyTracks",
name: 'MyTracks', name: "MyTracks",
component: MyTracks, component: MyTracks,
meta: {title: '我的足迹'} meta: { title: "我的足迹" },
}, },
{ {
path: 'MoneyManagement', path: "MoneyManagement",
name: 'MoneyManagement', name: "MoneyManagement",
component: MoneyManagement component: MoneyManagement,
}, },
{ {
path: 'Complain', path: "Complain",
name: 'Complain', name: "Complain",
component: Complain component: Complain,
}, },
{ {
path: 'Coupons', path: "Coupons",
name: 'Coupons', name: "Coupons",
component: Coupons component: Coupons,
}, },
{ {
path: 'CommentList', path: "CommentList",
name: 'CommentList', name: "CommentList",
component: CommentList, component: CommentList,
mate: {title: '评价列表'} mate: { title: "评价列表" },
}, },
{ {
path: 'AddEval', path: "AddEval",
name: 'AddEval', name: "AddEval",
component: AddEval, component: AddEval,
mate: {title: '添加评价'} mate: { title: "添加评价" },
}, },
{ {
path: 'EvalDetail', path: "EvalDetail",
name: 'EvalDetail', name: "EvalDetail",
component: EvalDetail, component: EvalDetail,
mate: {title: '评价详情'} mate: { title: "评价详情" },
}, },
{ {
path: 'ComplainList', path: "ComplainList",
name: 'ComplainList', name: "ComplainList",
component: ComplainList component: ComplainList,
}, },
{ {
path: 'ComplainDetail', path: "ComplainDetail",
name: 'ComplainDetail', name: "ComplainDetail",
component: ComplainDetail component: ComplainDetail,
}, },
{ {
path: 'AccountSafe', path: "AccountSafe",
name: 'AccountSafe', name: "AccountSafe",
component: AccountSafe component: AccountSafe,
}, },
{ {
path: 'ModifyPwd', path: "ModifyPwd",
name: 'ModifyPwd', name: "ModifyPwd",
component: ModifyPwd component: ModifyPwd,
}, },
{ {
path: 'Favorites', path: "Favorites",
name: 'Favorites', name: "Favorites",
component: Favorites, component: Favorites,
meta: {title: '我的收藏'} meta: { title: "我的收藏" },
}, },
{ {
path: 'Distribution', path: "Distribution",
name: 'Distribution', name: "Distribution",
component: Distribution, component: Distribution,
meta: {title: '分销推荐'} meta: { title: "分销推荐" },
}, },
{ {
path: 'Point', path: "Point",
name: 'Point', name: "Point",
component: Point, component: Point,
meta: {title: '我的积分'} meta: { title: "我的积分" },
}, },
{ {
path: 'Profile', path: "Profile",
name: 'Profile', name: "Profile",
component: Profile component: Profile,
}, },
{ {
path: 'AfterSale', path: "AfterSale",
name: 'AfterSale', name: "AfterSale",
component: AfterSale, component: AfterSale,
meta: {title: '售后'} meta: { title: "售后" },
}, },
{ {
path: 'ApplyAfterSale', path: "ApplyAfterSale",
name: 'ApplyAfterSale', name: "ApplyAfterSale",
component: ApplyAfterSale, component: ApplyAfterSale,
meta: {title: '申请售后'} meta: { title: "申请售后" },
}, },
{ {
path: '/home/MyAddress', path: "/home/MyAddress",
name: 'MyAddress', name: "MyAddress",
component: MyAddress, component: MyAddress,
meta: {title: '收货地址'} meta: { title: "收货地址" },
}, },
{ {
path: 'AddAddress', path: "AddAddress",
name: 'AddAddress', name: "AddAddress",
component: AddAddress component: AddAddress,
}, },
{ {
path: 'MsgList', path: "MsgList",
name: 'MsgList', name: "MsgList",
component: MsgList, component: MsgList,
meta: {title: '我的消息'} meta: { title: "我的消息" },
}, },
{ {
path: 'MsgDetail', path: "MsgDetail",
name: 'MsgDetail', name: "MsgDetail",
component: MsgDetail, component: MsgDetail,
meta: {title: '我的消息'} meta: { title: "我的消息" },
}, },
{ {
path: 'MyOrder', path: "MyOrder",
name: 'MyOrder', name: "MyOrder",
component: MyOrder, component: MyOrder,
meta: {title: '我的订单'} meta: { title: "我的订单" },
}, },
{ {
path: 'OrderDetail', path: "OrderDetail",
name: 'OrderDetail', name: "OrderDetail",
component: OrderDetail, component: OrderDetail,
meta: {title: '订单详情'} meta: { title: "订单详情" },
}, },
{ {
path: 'AfterSaleDetail', path: "AfterSaleDetail",
name: 'AfterSaleDetail', name: "AfterSaleDetail",
component: AfterSaleDetail, component: AfterSaleDetail,
meta: {title: '售后详情'} meta: { title: "售后详情" },
} },
] ],
}, },
{ {
path: '/merchant', path: "/merchant",
name: 'Merchant', name: "Merchant",
component: Merchant, component: Merchant,
meta: {title: '店铺'} meta: { title: "店铺" },
} },
] ],
}); });

View File

@ -1,5 +1,5 @@
docker push registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui:4.2.2.1 docker push registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui:4.3.0.1
docker push registry.cn-beijing.aliyuncs.com/lili-images/wap-ui:4.2.2.1 docker push registry.cn-beijing.aliyuncs.com/lili-images/wap-ui:4.3.0.1
docker push registry.cn-beijing.aliyuncs.com/lili-images/seller-ui:4.2.2.1 docker push registry.cn-beijing.aliyuncs.com/lili-images/seller-ui:4.3.0.1
docker push registry.cn-beijing.aliyuncs.com/lili-images/manager-ui:4.2.2.1 docker push registry.cn-beijing.aliyuncs.com/lili-images/manager-ui:4.3.0.1

View File

@ -1 +1 @@
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/manager-ui:4.2.2.1 . docker build -t registry.cn-beijing.aliyuncs.com/lili-images/manager-ui:4.3.0.1 .

View File

@ -3,10 +3,10 @@ var BASE = {
* @description api请求基础路径 * @description api请求基础路径
*/ */
API_DEV: { API_DEV: {
common: "https://common-api.pickmall.cn", seller: "http://127.0.0.1:8889",
buyer: "https://buyer-api.pickmall.cn", manager: "http://127.0.0.1:8887",
seller: "https://store-api.pickmall.cn", buyer: "http://127.0.0.1:8888",
manager: "https://admin-api.pickmall.cn" common: "http://127.0.0.1:8890",
}, },
API_PROD: { API_PROD: {
common: "https://common-api.pickmall.cn", common: "https://common-api.pickmall.cn",
@ -27,4 +27,3 @@ var BASE = {
*/ */
PREFIX: "/manager" PREFIX: "/manager"
}; };

View File

@ -2,20 +2,20 @@ import {commonUrl, getRequest, getRequestWithNoToken, postRequestWithNoToken} fr
// 通过id获取子地区 // 通过id获取子地区
export const getChildRegion = (id) => { export const getChildRegion = (id) => {
return getRequest(`${commonUrl}/common/region/item/${id}`); return getRequest(`${commonUrl}/common/common/region/item/${id}`);
}; };
// 点地图获取地址信息 // 点地图获取地址信息
export const getRegion = (params) => { export const getRegion = (params) => {
return getRequest(`${commonUrl}/common/region/region`, params); return getRequest(`${commonUrl}/common/common/region/region`, params);
}; };
// 获取拼图验证 // 获取拼图验证
export const getVerifyImg = (verificationEnums) => { export const getVerifyImg = (verificationEnums) => {
return getRequestWithNoToken(`${commonUrl}/common/slider/${verificationEnums}`); return getRequestWithNoToken(`${commonUrl}/common/common/slider/${verificationEnums}`);
}; };
// 拼图验证 // 拼图验证
export const postVerifyImg = (params) => { export const postVerifyImg = (params) => {
return postRequestWithNoToken(`${commonUrl}/common/slider/${params.verificationEnums}`, params); return postRequestWithNoToken(`${commonUrl}/common/common/slider/${params.verificationEnums}`, params);
}; };

View File

@ -4,21 +4,21 @@ import {getRequest, postRequest, putRequest, deleteRequest} from '@/libs/axios';
//查询分销商 //查询分销商
export const getDistributionListData = (params) => { export const getDistributionListData = (params) => {
return getRequest('/distribution/getByPage', params) return getRequest('/distribution/distribution/getByPage', params)
} }
//审核分销商 //审核分销商
export const auditDistribution = (id, params) => { export const auditDistribution = (id, params) => {
return putRequest(`/distribution/audit/${id}`, params) return putRequest(`/distribution/distribution/audit/${id}`, params)
} }
// 清退分销商 // 清退分销商
export const retreatDistribution = (id, params) => { export const retreatDistribution = (id, params) => {
return putRequest(`/distribution/retreat/${id}`, params) return putRequest(`/distribution/distribution/retreat/${id}`, params)
} }
// 恢复分销商 // 恢复分销商
export const resumeDistribution = (id, params) => { export const resumeDistribution = (id, params) => {
return putRequest(`/distribution/resume/${id}`, params) return putRequest(`/distribution/distribution/resume/${id}`, params)
} }
//保存更新分销设置 //保存更新分销设置

View File

@ -26,15 +26,15 @@ export const disableBrand = (id, params) => {
} }
//根据分类id获取关联品牌 //根据分类id获取关联品牌
export const getCategoryBrandListData = (category_id, params) => { export const getCategoryBrandListData = (category_id, params) => {
return getRequest(`/category/brand/${category_id}`, params) return getRequest(`/goods/categoryBrand/${category_id}`, params)
} }
//保存获取关联品牌 //保存获取关联品牌
export const saveCategoryBrand = (category_id, params) => { export const saveCategoryBrand = (category_id, params) => {
return postRequest(`/category/brand/${category_id}`, params) return postRequest(`/goods/categoryBrand/${category_id}`, params)
} }
//保存获取关联规格 //保存获取关联规格
export const saveCategorySpec = (category_id, params) => { export const saveCategorySpec = (category_id, params) => {
return postRequest(`/goods/category/spec/${category_id}`, params) return postRequest(`/goods/categorySpec/${category_id}`, params)
} }
//获取所有可用品牌 //获取所有可用品牌
@ -88,7 +88,7 @@ export const updateSpec = (id,params) => {
} }
//根据分类id获取关联规格 //根据分类id获取关联规格
export const getCategorySpecListData = (category_id, params) => { export const getCategorySpecListData = (category_id, params) => {
return getRequest(`/goods/category/spec/${category_id}`, params) return getRequest(`/goods/categorySpec/${category_id}`, params)
} }
//删除gUI个 //删除gUI个
export const delSpec = (id, params) => { export const delSpec = (id, params) => {
@ -102,35 +102,35 @@ export const getGoodsCategory = (parent_id) => {
// 上架商品 // 上架商品
export const upGoods = (id, params) => { export const upGoods = (id, params) => {
return putRequest(`/goods/${id}/up`, params) return putRequest(`/goods/goods/${id}/up`, params)
} }
// 下架商品 // 下架商品
export const lowGoods = (id, params) => { export const lowGoods = (id, params) => {
return putRequest(`/goods/${id}/under`, params) return putRequest(`/goods/goods/${id}/under`, params)
} }
// 获取商品sku分页列表 // 获取商品sku分页列表
export const getGoodsSkuData = (params) => { export const getGoodsSkuData = (params) => {
return getRequest('/goods/sku/list', params) return getRequest('/goods/goods/sku/list', params)
} }
// 获取商品分页列表 // 获取商品分页列表
export const getGoodsListData = (params) => { export const getGoodsListData = (params) => {
return getRequest('/goods/list', params) return getRequest('/goods/goods/list', params)
} }
// 获取待审核商品分页列表 // 获取待审核商品分页列表
export const getAuthGoodsListData = (params) => { export const getAuthGoodsListData = (params) => {
return getRequest('/goods/auth/list', params) return getRequest('/goods/goods/auth/list', params)
} }
// 审核商品 // 审核商品
export const authGoods = (id, params) => { export const authGoods = (id, params) => {
return putRequest(`/goods/${id}/auth`, params) return putRequest(`/goods/goods/${id}/auth`, params)
} }
//查询分类绑定参数信息 //查询分类绑定参数信息
export const getCategoryParamsListData = (id, params) => { export const getCategoryParamsListData = (id, params) => {
return getRequest(`/goods/category/parameters/${id}`, params) return getRequest(`/goods/categoryParameters/${id}`, params)
} }
//查询商品绑定参数信息 //查询商品绑定参数信息
@ -151,20 +151,20 @@ export const deleteParams = (id, params) => {
} }
//保存参数组 //保存参数组
export const insertParamsGroup = (params) => { export const insertParamsGroup = (params) => {
return postRequest('/goods/category/parameters', params) return postRequest('/goods/categoryParameters', params)
} }
//更新参数组 //更新参数组
export const updateParamsGroup = (params) => { export const updateParamsGroup = (params) => {
return putRequest('/goods/category/parameters', params) return putRequest('/goods/categoryParameters', params)
} }
//删除参数组 //删除参数组
export const deleteParamsGroup = (id, params) => { export const deleteParamsGroup = (id, params) => {
return deleteRequest(`/goods/category/parameters/${id}`, params) return deleteRequest(`/goods/categoryParameters/${id}`, params)
} }
//保存获取关联规格 //保存获取关联规格
export const getGoodsSpecInfo = (category_id, params) => { export const getGoodsSpecInfo = (category_id, params) => {
return getRequest(`/goods/category/spec/goods/${category_id}`, params) return getRequest(`/goods/categorySpec/goods/${category_id}`, params)
} }
@ -176,7 +176,7 @@ export const getSkuPage = (params) => {
//查看商品详情 //查看商品详情
export const getGoodsDetail = (id) => { export const getGoodsDetail = (id) => {
return getRequest(`/goods/get/${id}`) return getRequest(`/goods/goods/get/${id}`)
} }
@ -225,4 +225,3 @@ export const refundStatistics = (params) => {
export const refundPriceStatistics = (params) => { export const refundPriceStatistics = (params) => {
return getRequest(`/statistics/refund/order/getPrice`, params) return getRequest(`/statistics/refund/order/getPrice`, params)
} }

View File

@ -16,13 +16,13 @@ import {
let commonUrl = (process.env.NODE_ENV === 'development' ? BASE.API_DEV.common : BASE.API_PROD.common) let commonUrl = (process.env.NODE_ENV === 'development' ? BASE.API_DEV.common : BASE.API_PROD.common)
// 文件上传接口 // 文件上传接口
export const uploadFile = commonUrl+ "/common/upload/file"; export const uploadFile = commonUrl+ "/common/common/upload/file";
// Websocket // Websocket
export const ws = managerUrl + "/ws"; export const ws = managerUrl + "/ws";
//获取所有city //获取所有city
export const getAllCity = (params) => { export const getAllCity = (params) => {
return getRequest(commonUrl + '/common/region/allCity', params) return getRequest(commonUrl + '/common/common/region/allCity', params)
} }
@ -48,21 +48,21 @@ export const getNoticePage = (params) => {
// 登陆 // 登陆
export const login = (params) => { export const login = (params) => {
return postRequestWithNoTokenData("/user/login", params); return postRequestWithNoTokenData("/passport/user/login", params);
}; };
// 登出 // 登出
export const logout = () => { export const logout = () => {
return postRequest("/user/logout"); return postRequest("/passport/user/logout");
}; };
// 刷新token // 刷新token
export const handleRefreshToken = (token) => { export const handleRefreshToken = (token) => {
return getRequestWithNoToken(`/user/refresh/${token}`); return getRequestWithNoToken(`/passport/user/refresh/${token}`);
}; };
// 获取用户登录信息 // 获取用户登录信息
export const userInfo = (params) => { export const userInfo = (params) => {
return getRequest("/user/info", params); return getRequest("/passport/user/info", params);
}; };
// 注册 // 注册
export const regist = (params) => { export const regist = (params) => {
@ -99,131 +99,131 @@ export const ipInfo = (params) => {
}; };
// 个人中心编辑 // 个人中心编辑
export const userInfoEdit = (params) => { export const userInfoEdit = (params) => {
return putRequest("/user/edit", params); return putRequest("/passport/user/edit", params);
}; };
// 个人中心修改密码 // 个人中心修改密码
export const changePass = (params) => { export const changePass = (params) => {
return putRequest("/user/editPassword", params); return putRequest("/passport/user/editPassword", params);
}; };
// 个人中心修改手机 // 个人中心修改手机
export const changeMobile = (params) => { export const changeMobile = (params) => {
return postRequest("/user/changeMobile", params); return postRequest("/passport/user/changeMobile", params);
}; };
// 获取用户数据 多条件 // 获取用户数据 多条件
export const getUserListData = (params) => { export const getUserListData = (params) => {
return getRequest("/user", params); return getRequest("/passport/user", params);
}; };
// 通过用户名搜索 // 通过用户名搜索
export const searchUserByName = (username, params) => { export const searchUserByName = (username, params) => {
return getRequest("/user/searchByName/" + username, params); return getRequest("/passport/user/searchByName/" + username, params);
}; };
// 获取全部用户数据 // 获取全部用户数据
export const getAllUserData = (params) => { export const getAllUserData = (params) => {
return getRequest("/user/getAll", params); return getRequest("/passport/user/getAll", params);
}; };
// 添加用户 // 添加用户
export const addUser = (params) => { export const addUser = (params) => {
return postRequest("/user", params); return postRequest("/passport/user", params);
}; };
// 编辑管理员自身 // 编辑管理员自身
export const editUser = (params) => { export const editUser = (params) => {
return putRequest("/user/edit", params); return putRequest("/passport/user/edit", params);
}; };
// 编辑用户 // 编辑用户
export const editOtherUser = (params) => { export const editOtherUser = (params) => {
return putRequest("/user/admin/edit", params); return putRequest("/passport/user/admin/edit", params);
}; };
// 启用用户 // 启用用户
export const enableUser = (id, params) => { export const enableUser = (id, params) => {
return putRequest(`/user/enable/${id}`, params); return putRequest(`/passport/user/enable/${id}`, params);
}; };
// 删除用户 // 删除用户
export const deleteUser = (ids, params) => { export const deleteUser = (ids, params) => {
return deleteRequest(`/user/${ids}`, params); return deleteRequest(`/passport/user/${ids}`, params);
}; };
// 导入用户 // 导入用户
export const importUserData = (params) => { export const importUserData = (params) => {
return importRequest("/user/importData", params); return importRequest("/passport/user/importData", params);
}; };
/****************************** 部门 */ /****************************** 部门 */
// 通过部门获取全部角色数据 // 通过部门获取全部角色数据
export const getUserByDepartmentId = (id, params) => { export const getUserByDepartmentId = (id, params) => {
return getRequest(`/departmentRole/${id}`, params); return getRequest(`/permission/departmentRole/${id}`, params);
}; };
// 通过部门修改绑定角色 // 通过部门修改绑定角色
export const updateDepartmentRole = (id, params) => { export const updateDepartmentRole = (id, params) => {
return putRequestWithNoForm(`/departmentRole/${id}`, params); return putRequestWithNoForm(`/permission/departmentRole/${id}`, params);
}; };
// 获取一级部门 // 获取一级部门
export const initDepartment = (params) => { export const initDepartment = (params) => {
return getRequest("/department", params); return getRequest("/permission/department", params);
}; };
// 加载部门子级数据 // 加载部门子级数据
export const loadDepartment = (id) => { export const loadDepartment = (id) => {
return getRequest(`/department/${id}`); return getRequest(`/permission/department/${id}`);
}; };
// 添加部门 // 添加部门
export const addDepartment = (params) => { export const addDepartment = (params) => {
return postRequest("/department", params); return postRequest("/permission/department", params);
}; };
// 编辑部门 // 编辑部门
export const editDepartment = (ids, params) => { export const editDepartment = (ids, params) => {
return putRequest(`/department/${ids} `, params); return putRequest(`/permission/department/${ids} `, params);
}; };
// 删除部门 // 删除部门
export const deleteDepartment = (ids, params) => { export const deleteDepartment = (ids, params) => {
return deleteRequest(`/department/${ids}`, params); return deleteRequest(`/permission/department/${ids}`, params);
}; };
// 搜索部门 // 搜索部门
export const searchDepartment = (params) => { export const searchDepartment = (params) => {
return getRequest("/department/search", params); return getRequest("/permission/department/search", params);
}; };
/****************************** 部门结束 */ /****************************** 部门结束 */
// 获取全部角色数据 // 获取全部角色数据
export const getAllRoleList = (params) => { export const getAllRoleList = (params) => {
return getRequest("/role", params); return getRequest("/permission/role", params);
}; };
// 分页获取角色数据 // 分页获取角色数据
export const getRoleList = (params) => { export const getRoleList = (params) => {
return getRequest("/role", params); return getRequest("/permission/role", params);
}; };
// 添加角色 // 添加角色
export const addRole = (params) => { export const addRole = (params) => {
return postRequest("/role", params); return postRequest("/permission/role", params);
}; };
// 编辑角色 // 编辑角色
export const editRole = (params) => { export const editRole = (params) => {
return putRequest(`/role/${params.roleId}`, params); return putRequest(`/permission/role/${params.roleId}`, params);
}; };
// 查看某角色拥有的菜单 // 查看某角色拥有的菜单
export const selectRoleMenu = (params) => { export const selectRoleMenu = (params) => {
return getRequest(`/roleMenu/${params}`); return getRequest(`/permission/roleMenu/${params}`);
}; };
// 保存角色菜单 // 保存角色菜单
export const saveRoleMenu = (id, params) => { export const saveRoleMenu = (id, params) => {
return postRequestWithNoForm(`/roleMenu/${id}`, params); return postRequestWithNoForm(`/permission/roleMenu/${id}`, params);
}; };
// 分配角色权限 // 分配角色权限
export const editRolePerm = (params) => { export const editRolePerm = (params) => {
return postRequest("/role/editRolePerm", params); return postRequest("/permission/role/editRolePerm", params);
}; };
// 分配角色数据权限 // 分配角色数据权限
export const editRoleDep = (params) => { export const editRoleDep = (params) => {
return postRequest("/role/editRoleDep", params); return postRequest("/permission/role/editRoleDep", params);
}; };
// 删除角色 // 删除角色
export const deleteRole = (ids, params) => { export const deleteRole = (ids, params) => {
return deleteRequest(`/role/${ids}`, params); return deleteRequest(`/permission/role/${ids}`, params);
}; };
/****************************** 角色结束 */ /****************************** 角色结束 */
@ -232,30 +232,30 @@ export const deleteRole = (ids, params) => {
/****************************** 权限 */ /****************************** 权限 */
// 获取全部权限数据 // 获取全部权限数据
export const getAllPermissionList = (params) => { export const getAllPermissionList = (params) => {
return getRequest("/menu/tree", params); return getRequest("/permission/menu/tree", params);
}; };
// 获取全部权限数据 // 获取全部权限数据
export const getCurrentPermissionList = (params) => { export const getCurrentPermissionList = (params) => {
return getRequest("/menu/memberMenu", params); return getRequest("/permission/menu/memberMenu", params);
}; };
// 添加权限 // 添加权限
export const addPermission = (params) => { export const addPermission = (params) => {
return postRequest("/menu", params); return postRequest("/permission/menu", params);
}; };
// 编辑权限 // 编辑权限
export const editPermission = (params) => { export const editPermission = (params) => {
return putRequest(`/menu/${params.id}`, params); return putRequest(`/permission/menu/${params.id}`, params);
}; };
// 删除权限 // 删除权限
export const deletePermission = (ids, params) => { export const deletePermission = (ids, params) => {
return deleteRequest(`/menu/${ids}`, params); return deleteRequest(`/permission/menu/${ids}`, params);
}; };
// 搜索权限 // 搜索权限
export const searchPermission = (params) => { export const searchPermission = (params) => {
return getRequest("/menu", params); return getRequest("/permission/menu", params);
}; };
/****************************** 权限结束 */ /****************************** 权限结束 */
@ -263,25 +263,25 @@ export const searchPermission = (params) => {
// 分页获取日志数据 // 分页获取日志数据
export const getLogListData = (params) => { export const getLogListData = (params) => {
return getRequest("/log/getAllByPage", params); return getRequest("/setting/log/getAllByPage", params);
}; };
// 删除日志 // 删除日志
export const deleteLog = (ids, params) => { export const deleteLog = (ids, params) => {
return deleteRequest(`/log/${ids}`, params); return deleteRequest(`/setting/log/${ids}`, params);
}; };
// 清空日志 // 清空日志
export const deleteAllLog = (params) => { export const deleteAllLog = (params) => {
return deleteRequest("/log", params); return deleteRequest("/setting/log", params);
}; };
// 分页获取消息数据 // 分页获取消息数据
export const getMessageData = (params) => { export const getMessageData = (params) => {
return getRequest("/message/getByCondition", params); return getRequest("/other/message/getByCondition", params);
}; };
// 获取单个消息详情 // 获取单个消息详情
export const getMessageDataById = (id, params) => { export const getMessageDataById = (id, params) => {
return getRequest(`/message/get/${id}`, params); return getRequest(`/other/message/get/${id}`, params);
}; };
// 发送消息 // 发送消息
export const addMessage = (params) => { export const addMessage = (params) => {
@ -289,11 +289,11 @@ export const addMessage = (params) => {
}; };
// 编辑消息 // 编辑消息
export const editMessage = (params) => { export const editMessage = (params) => {
return postRequest("/message/edit", params); return postRequest("/other/message/edit", params);
}; };
// 删除消息 // 删除消息
export const deleteMessage = (ids, params) => { export const deleteMessage = (ids, params) => {
return deleteRequest(`/message/delByIds/${ids}`, params); return deleteRequest(`/other/message/delByIds/${ids}`, params);
}; };
// 编辑发送消息 // 编辑发送消息
export const editMessageSend = (params) => { export const editMessageSend = (params) => {
@ -306,16 +306,16 @@ export const deleteMessageSend = (ids, params) => {
// 分页获取文件数据 // 分页获取文件数据
export const getFileListData = (params) => { export const getFileListData = (params) => {
return getRequest("/file", params); return getRequest("/common/file", params);
}; };
// 重命名文件 // 重命名文件
export const renameFile = (params) => { export const renameFile = (params) => {
return postRequest("/file/rename", params); return postRequest("/common/file/rename", params);
}; };
// 删除文件 // 删除文件
export const deleteFile = (ids, params) => { export const deleteFile = (ids, params) => {
return deleteRequest(`/file/delete/${ids}`, params); return deleteRequest(`/common/file/delete/${ids}`, params);
}; };
// 下载文件 // 下载文件
export const aliDownloadFile = (fKey, params) => { export const aliDownloadFile = (fKey, params) => {
@ -324,37 +324,37 @@ export const aliDownloadFile = (fKey, params) => {
// base64上传 // base64上传
export const base64Upload = (params) => { export const base64Upload = (params) => {
return postRequest("/upload/file", params); return postRequest("/common/common/upload/file", params);
}; };
// 系统设置 // 系统设置
export const getSetting = (key) => { export const getSetting = (key) => {
return getRequest(`/system/setting/get/${key}`); return getRequest(`/setting/setting/get/${key}`);
}; };
// 更新系统配置 // 更新系统配置
export const setSetting = (key, params) => { export const setSetting = (key, params) => {
return putRequestWithNoForm(`/system/setting/put/${key}`, params); return putRequestWithNoForm(`/setting/setting/put/${key}`, params);
}; };
// 分页查询敏感词 // 分页查询敏感词
export const getSensitiveWordsPage = (params) => { export const getSensitiveWordsPage = (params) => {
return getRequest(`/sensitiveWords`, params); return getRequest(`/other/sensitiveWords`, params);
}; };
// 分页查询敏感词 // 分页查询敏感词
export const insertSensitiveWords = (params) => { export const insertSensitiveWords = (params) => {
return postRequest(`/sensitiveWords`, params); return postRequest(`/other/sensitiveWords`, params);
}; };
// 修改 // 修改
export const updateSensitiveWords = (id, params) => { export const updateSensitiveWords = (id, params) => {
return putRequest(`/sensitiveWords/${id}`, params); return putRequest(`/other/sensitiveWords/${id}`, params);
}; };
// 删除敏感词 // 删除敏感词
export const delSensitive = (ids) => { export const delSensitive = (ids) => {
return deleteRequest(`/sensitiveWords/delByIds/${ids}`); return deleteRequest(`/other/sensitiveWords/delByIds/${ids}`);
}; };
// 添加商品计量单位 // 添加商品计量单位
@ -376,75 +376,74 @@ export const delGoodsUnit = (ids) => {
// 同步高德行政地区数据 // 同步高德行政地区数据
export const asyncRegion = () => { export const asyncRegion = () => {
return postRequest(`/region/sync`); return postRequest(`/setting/region/sync`);
}; };
// 批量id删除 // 批量id删除
export const delRegion = (ids) => { export const delRegion = (ids) => {
return deleteRequest(`/region/${ids}`); return deleteRequest(`/setting/region/${ids}`);
}; };
// 更新地区 // 更新地区
export const updateRegion = (id, params) => { export const updateRegion = (id, params) => {
return putRequest(`/region/${id}`, params); return putRequest(`/setting/region/${id}`, params);
}; };
// 添加地区 // 添加地区
export const addRegion = (params) => { export const addRegion = (params) => {
return postRequest(`/region`, params); return postRequest(`/setting/region`, params);
}; };
// 通过id获取子地区 // 通过id获取子地区
export const getChildRegion = (id) => { export const getChildRegion = (id) => {
return getRequest(`/region/item/${id}`); return getRequest(`/setting/region/item/${id}`);
}; };
// 重置用户密码 // 重置用户密码
export const resetPassword = (params) => { export const resetPassword = (params) => {
return postRequest(`/user/resetPassword/${params}"`); return postRequest(`/passport/user/resetPassword/${params}"`);
}; };
// 初始化商品索引 // 初始化商品索引
export const createIndex = () => { export const createIndex = () => {
return getRequest(`/elasticsearch`); return getRequest(`/other/elasticsearch`);
}; };
// 初始化商品索引 // 初始化商品索引
export const getProgress = () => { export const getProgress = () => {
return getRequest(`/elasticsearch/progress`); return getRequest(`/other/elasticsearch/progress`);
}; };
// 分页查询自定义分词 // 分页查询自定义分词
export const getCustomWordsPage = (params) => { export const getCustomWordsPage = (params) => {
return getRequest(`/custom-words/page`, params); return getRequest(`/other/customWords/page`, params);
}; };
// 添加自定义分词 // 添加自定义分词
export const insertCustomWords = (params) => { export const insertCustomWords = (params) => {
return postRequest(`/custom-words`, params); return postRequest(`/other/customWords`, params);
}; };
// 修改自定义分词 // 修改自定义分词
export const updateCustomWords = (params) => { export const updateCustomWords = (params) => {
return putRequest(`/custom-words`, params); return putRequest(`/other/customWords`, params);
}; };
// 删除自定义分词 // 删除自定义分词
export const delCustom = (id) => { export const delCustom = (id) => {
return deleteRequest(`/custom-words/${id}`); return deleteRequest(`/other/customWords/${id}`);
}; };
// 设置热搜词 // 设置热搜词
export const setHotWords = (params) => { export const setHotWords = (params) => {
return postRequest(`/hotwords`, params); return postRequest(`/hotwords/hotwords`, params);
}; };
// 删除热搜词 // 删除热搜词
export const deleteHotWords = (words) => { export const deleteHotWords = (words) => {
return deleteRequest(`/hotwords/${words}`); return deleteRequest(`/hotwords/hotwords/${words}`);
}; };
// 获取热搜词 // 获取热搜词
export const getHotWords = () => { export const getHotWords = () => {
return getRequest(`/hotwords`); return getRequest(`/hotwords/hotwords`);
}; };

View File

@ -10,23 +10,23 @@ import {
// 分页获取物流公司 // 分页获取物流公司
export const getLogisticsPage = params => { export const getLogisticsPage = params => {
return getRequest(`/logistics/getByPage`, params); return getRequest(`/other/logistics/getByPage`, params);
}; };
// 删除 // 删除
export const delLogistics = id => { export const delLogistics = id => {
return deleteRequest(`/logistics/delete/${id}`); return deleteRequest(`/other/logistics/delete/${id}`);
}; };
// 添加 // 添加
export const addLogistics = params => { export const addLogistics = params => {
return postRequest(`/logistics/save`,params); return postRequest(`/other/logistics/save`,params);
}; };
// 通过id查询详情 // 通过id查询详情
export const getLogisticsDetail = id => { export const getLogisticsDetail = id => {
return getRequest(`/logistics/get/${id}`); return getRequest(`/other/logistics/get/${id}`);
}; };
// 编辑 // 编辑
export const updateLogistics = (id,params) => { export const updateLogistics = (id,params) => {
return putRequest(`/logistics/${id}`,params); return putRequest(`/other/logistics/${id}`,params);
}; };

View File

@ -9,22 +9,22 @@ export const getMember = params => {
// 分页获取会员评价 // 分页获取会员评价
export const getMemberReview = params => { export const getMemberReview = params => {
return getRequest("/memberEvaluation/getByPage", params); return getRequest("/member/evaluation/getByPage", params);
}; };
// 获取id // 获取id
export const getMemberInfoReview = id => { export const getMemberInfoReview = id => {
return getRequest(`/memberEvaluation/get/${id}`); return getRequest(`/member/evaluation/get/${id}`);
}; };
// 删除评论 // 删除评论
export const delMemberReview = id => { export const delMemberReview = id => {
return putRequest(`/memberEvaluation/delete/${id}`); return putRequest(`/member/evaluation/delete/${id}`);
}; };
// 修改评价状态 // 修改评价状态
export const updateMemberReview = (id, params) => { export const updateMemberReview = (id, params) => {
return getRequest(`/memberEvaluation/updateStatus/${id}`, params); return getRequest(`/member/evaluation/updateStatus/${id}`, params);
}; };
@ -35,12 +35,12 @@ export const insertOrUpdateSpec = params => {
// 获取会员列表 // 获取会员列表
export const getMemberListData = params => { export const getMemberListData = params => {
return getRequest("/member", params); return getRequest("/passport/member", params);
}; };
// 获取会员详情 // 获取会员详情
export const getMemberInfoData = (id) => { export const getMemberInfoData = (id) => {
return getRequest(`/member/${id}`); return getRequest(`/passport/member/${id}`);
}; };
// 修改会员基本信息 // 修改会员基本信息
@ -50,26 +50,26 @@ export const updateMember = (params) => {
// 添加会员基本信息 // 添加会员基本信息
export const addMember = params => { export const addMember = params => {
return postRequest(`/member`, params); return postRequest(`/passport/member`, params);
}; };
// 获取会员列表 // 获取会员列表
export const getMemberAll = () => { export const getMemberAll = () => {
return getRequest("/member/getAll"); return getRequest("/passport/member/getAll");
}; };
// 增加或修改会员列表 // 增加或修改会员列表
export const operationMemberListData = params => { export const operationMemberListData = params => {
return postRequest("/member/insertOrUpdate", params); return postRequest("/passport/member/insertOrUpdate", params);
}; };
// 增加或修改会员列表 // 增加或修改会员列表
export const deleteMemberListData = ids => { export const deleteMemberListData = ids => {
return deleteRequest(`/member/delByIds/${ids}`); return deleteRequest(`/passport/member/delByIds/${ids}`);
}; };
// 获取充值记录列表数据 // 获取充值记录列表数据
export const getUserRecharge = params => { export const getUserRecharge = params => {
return getRequest("/recharge", params); return getRequest("/wallet/recharge", params);
}; };
// 获取预存款明细列表数据 // 获取预存款明细列表数据
@ -79,17 +79,17 @@ export const getUserWallet = params => {
// 获取提现申请列表数据 // 获取提现申请列表数据
export const getUserWithdrawApply = params => { export const getUserWithdrawApply = params => {
return getRequest("/members/withdraw-apply", params); return getRequest("/wallet/withdrawApply", params);
}; };
// 审核提现申请 // 审核提现申请
export const withdrawApply = params => { export const withdrawApply = params => {
return postRequest("/members/withdraw-apply", params); return postRequest("/wallet/withdrawApply", params);
}; };
//会员状态修改 //会员状态修改
export const updateMemberStatus = params => { export const updateMemberStatus = params => {
return putRequest("/member/updateMemberStatus", params); return putRequest("/passport/member/updateMemberStatus", params);
}; };
// 获取会员注册统计列表 // 获取会员注册统计列表
@ -110,7 +110,7 @@ export const historyMemberChartList = () => {
//查询会员数量 //查询会员数量
export const getMemberNum = params => { export const getMemberNum = params => {
return getRequest("/member/num", params); return getRequest("/passport/member/num", params);
}; };
//查询会员历史积分 //查询会员历史积分
export const getHistoryPointData = (params) => { export const getHistoryPointData = (params) => {
@ -134,7 +134,7 @@ export const editMemberAddress = (params) => {
} }
//查询会员预存款 //查询会员预存款
export const getMemberWallet = (params) => { export const getMemberWallet = (params) => {
return getRequest(`/members/wallet`, params) return getRequest(`/wallet/wallet`, params)
} }

View File

@ -9,88 +9,88 @@ import {
// 交由商家申诉 // 交由商家申诉
export const storeComplain = (params) => { export const storeComplain = (params) => {
return putRequest(`/complain/status`, params) return putRequest(`/order/complain/status`, params)
} }
// 获取售后原因分页列表 // 获取售后原因分页列表
export const getAfterSaleReasonPage = (params) => { export const getAfterSaleReasonPage = (params) => {
return getRequest('/afterSaleReason/getByPage', params) return getRequest('/order/afterSaleReason/getByPage', params)
} }
// 删除售后原因 // 删除售后原因
export const delAfterSaleReason = (id) => { export const delAfterSaleReason = (id) => {
return deleteRequest(`/afterSaleReason/delByIds/${id}`) return deleteRequest(`/order/afterSaleReason/delByIds/${id}`)
} }
// 添加售后原因 // 添加售后原因
export const addAfterSaleReason = (params) => { export const addAfterSaleReason = (params) => {
return postRequest(`/afterSaleReason`, params) return postRequest(`/order/afterSaleReason`, params)
} }
// 修改售后原因 // 修改售后原因
export const editAfterSaleReason = (id, params) => { export const editAfterSaleReason = (id, params) => {
return putRequest(`/afterSaleReason/update/${id}`, params) return putRequest(`/order/afterSaleReason/update/${id}`, params)
} }
// 售后服务单详情 // 售后服务单详情
export const afterSaleOrderDetail = (sn) => { export const afterSaleOrderDetail = (sn) => {
return getRequest(`/afterSale/${sn}`) return getRequest(`/order/afterSale/${sn}`)
} }
// 商家审核 // 商家审核
export const afterSaleSellerReview = (sn, params) => { export const afterSaleSellerReview = (sn, params) => {
return putRequest(`/afterSale/review/${sn}`, params) return putRequest(`/order/afterSale/review/${sn}`, params)
} }
// 商家确认收货 // 商家确认收货
export const afterSaleSellerConfirm = (sn, params) => { export const afterSaleSellerConfirm = (sn, params) => {
return putRequest(`/afterSale/confirm/${sn}`, params) return putRequest(`/order/afterSale/confirm/${sn}`, params)
} }
// 商家换货业务发货 // 商家换货业务发货
export const afterSaleSellerDelivery = (sn, params) => { export const afterSaleSellerDelivery = (sn, params) => {
return putRequest(`/afterSale/${sn}/delivery`, params) return putRequest(`/order/afterSale/${sn}/delivery`, params)
} }
// 获取交易投诉信息 // 获取交易投诉信息
export const getOrderComplain = (params) => { export const getOrderComplain = (params) => {
return getRequest('/complain', params) return getRequest('/order/complain', params)
} }
// 获取交易投诉详细信息 // 获取交易投诉详细信息
export const getOrderComplainDetail = (id) => { export const getOrderComplainDetail = (id) => {
return getRequest(`/complain/${id}`) return getRequest(`/order/complain/${id}`)
} }
// 交易投诉对话 // 交易投诉对话
export const addOrderCommunication = (params) => { export const addOrderCommunication = (params) => {
return postRequest(`/complain/communication`, params) return postRequest(`/order/complain/communication`, params)
} }
// 平台仲裁 // 平台仲裁
export const orderComplete = (id, params) => { export const orderComplete = (id, params) => {
return putRequest(`/complain/complete/${id}`, params) return putRequest(`/order/complain/complete/${id}`, params)
} }
// 查询订单列表 // 查询订单列表
export const getOrderList = (params) => { export const getOrderList = (params) => {
return getRequest(`/orders`, params) return getRequest(`/order/order`, params)
} }
// 订单付款 // 订单付款
export const orderPay = (sn) => { export const orderPay = (sn) => {
return postRequest(`/orders/${sn}/pay`) return postRequest(`/order/order/${sn}/pay`)
} }
// 订单付款 // 订单付款
export const orderDetail = (sn) => { export const orderDetail = (sn) => {
return getRequest(`/orders/${sn}`) return getRequest(`/order/order/${sn}`)
} }
// 修改订单价格 // 修改订单价格
export const updateOrderPrice = (sn, params) => { export const updateOrderPrice = (sn, params) => {
return putRequest(`/orders/update/${sn}/price`, params) return putRequest(`/order/order/update/${sn}/price`, params)
} }
// 获取订单日志 // 获取订单日志
@ -100,63 +100,58 @@ export const getOrderLog = (params) => {
// 订单取消 // 订单取消
export const orderCancel = (sn, params) => { export const orderCancel = (sn, params) => {
return postRequest(`/orders/${sn}/cancel`, params) return postRequest(`/order/order/${sn}/cancel`, params)
} }
// 修改收货地址 // 修改收货地址
export const editOrderConsignee = (sn, params) => { export const editOrderConsignee = (sn, params) => {
return postRequest(`/orders/update/${sn}/consignee`, params) return postRequest(`/order/order/update/${sn}/consignee`, params)
} }
// 获取售后订单列表 // 获取售后订单列表
export const getAfterSaleOrderPage = (params) => { export const getAfterSaleOrderPage = (params) => {
return getRequest('/afterSale/page', params) return getRequest('/order/afterSale/page', params)
} }
// 获取售后订单详情 // 获取售后订单详情
export const getAfterSaleOrderDetail = (sn) => { export const getAfterSaleOrderDetail = (sn) => {
return getRequest(`/afterSale/get/${sn}`) return getRequest(`/order/afterSale/get/${sn}`)
} }
//售后单查询物流 //售后单查询物流
export const getAfterSaleTraces = (sn) => { export const getAfterSaleTraces = (sn) => {
return getRequest(`/afterSale/getDeliveryTraces/${sn}`) return getRequest(`/order/afterSale/getDeliveryTraces/${sn}`)
} }
// 获取商家选中的物流公司 // 获取商家选中的物流公司
export const getLogisticsChecked = () => { export const getLogisticsChecked = () => {
return getRequest(`/logistics/getChecked`) return getRequest(`/other/logistics/getChecked`)
} }
//查询物流 //查询物流
export const getTraces = (sn, params) => { export const getTraces = (sn, params) => {
return postRequest(`/orders/getTraces/${sn}`, params) return postRequest(`/order/order/getTraces/${sn}`, params)
} }
//获取发票列表 //获取发票列表
export const getReceiptPage = (params) => { export const getReceiptPage = (params) => {
return getRequest(`/receipt`, params) return getRequest(`/trade/receipt`, params)
} }
//平台退款 //平台退款
export const refundPrice = (afterSaleSn, params) => { export const refundPrice = (afterSaleSn, params) => {
return putRequest(`/afterSale/refund/${afterSaleSn}`, params) return putRequest(`/order/afterSale/refund/${afterSaleSn}`, params)
} }
//平台收款记录 //平台收款记录
export const paymentLog = (params) => { export const paymentLog = (params) => {
return getRequest(`/paymentLog`, params) return getRequest(`/order/paymentLog`, params)
} }
//平台退款记录 //平台退款记录
export const refundLog = (params) => { export const refundLog = (params) => {
return getRequest(`/refundLog`, params) return getRequest(`/order/refundLog`, params)
} }
//售后单商家收货信息 //售后单商家收货信息
export const storeAddress = (sn) => { export const storeAddress = (sn) => {
return getRequest(`/afterSale/getStoreAfterSaleAddress/${sn}`) return getRequest(`/order/afterSale/getStoreAfterSaleAddress/${sn}`)
} }

View File

@ -12,7 +12,7 @@ import {
*/ */
export const setHomeSetup = params => { export const setHomeSetup = params => {
return postRequest("/pageData/add", params); return postRequest("/other/pageData/add", params);
}; };
/** /**
@ -21,7 +21,7 @@ export const setHomeSetup = params => {
*/ */
export const getHomeData = params => { export const getHomeData = params => {
return getRequest(`/pageData/${params}`); return getRequest(`/other/pageData/${params}`);
}; };
@ -31,7 +31,7 @@ export const getHomeData = params => {
*/ */
export const getHomeList = params => { export const getHomeList = params => {
return getRequest("/pageData/pageDataList", params); return getRequest("/other/pageData/pageDataList", params);
}; };
@ -41,7 +41,7 @@ export const getHomeList = params => {
*/ */
export const updateHome = (id, params) => { export const updateHome = (id, params) => {
return putRequest(`/pageData/update/${id}`, params); return putRequest(`/other/pageData/update/${id}`, params);
}; };
/** /**
@ -50,7 +50,7 @@ export const updateHome = (id, params) => {
*/ */
export const removePageHome = (id) => { export const removePageHome = (id) => {
return deleteRequest(`/pageData/remove/${id}`); return deleteRequest(`/other/pageData/remove/${id}`);
}; };
@ -60,35 +60,33 @@ export const removePageHome = (id) => {
*/ */
export const releasePageHome = (id) => { export const releasePageHome = (id) => {
return putRequest(`/pageData/release/${id}`); return putRequest(`/other/pageData/release/${id}`);
}; };
//管理员获取发送列表 //管理员获取发送列表
export const getMessagePage = (params) => { export const getMessagePage = (params) => {
return getRequest(`/message`, params); return getRequest(`/other/message`, params);
}; };
//管理员获取发送列表 //管理员获取发送列表
export const sendMessage = (params) => { export const sendMessage = (params) => {
return postRequest(`/message`, params); return postRequest(`/other/message`, params);
}; };
//管理员获取发送详情列表 //管理员获取发送详情列表
export const getShopMessage = (params) => { export const getShopMessage = (params) => {
return getRequest(`/message/store`, params); return getRequest(`/other/storeMessage`, params);
}; };
//管理员获取会员意见反馈 //管理员获取会员意见反馈
export const getMemberFeedback = (params) => { export const getMemberFeedback = (params) => {
return getRequest(`/feedback`, params); return getRequest(`/other/feedback`, params);
}; };
//管理员获取会员意见反馈 //管理员获取会员意见反馈
export const getMemberFeedbackDetail = (id) => { export const getMemberFeedbackDetail = (id) => {
return getRequest(`/feedback/${id}`); return getRequest(`/other/feedback/${id}`);
}; };
//管理员获取发送详情列表 //管理员获取发送详情列表
export const getMemberMessage = (params) => { export const getMemberMessage = (params) => {
return getRequest(`/message/member`, params); return getRequest(`/other/memberMessage`, params);
}; };

View File

@ -63,54 +63,45 @@ export const savePageData = (params) => {
} }
//获取分类列表数据 //获取分类列表数据
export const getArticleCategory = () => { export const getArticleCategory = () => {
return getRequest(`/article-category/all-children`) return getRequest(`/other/articleCategory/all-children`)
} }
//文章分类添加 //文章分类添加
export const saveArticleCategory = (params) => { export const saveArticleCategory = (params) => {
return postRequest('/article-category', params) return postRequest('/other/articleCategory', params)
} }
//删除文章分类 //删除文章分类
export const delArticleCategory = (id) => { export const delArticleCategory = (id) => {
return deleteRequest(`/article-category/${id}`) return deleteRequest(`/other/articleCategory/${id}`)
} }
//修改文章分类 //修改文章分类
export const updateArticleCategory = (params, id) => { export const updateArticleCategory = (params, id) => {
return putRequest(`/article-category/update/${id}`, params) return putRequest(`/other/articleCategory/update/${id}`, params)
} }
//文章添加 //文章添加
export const saveArticle = (params) => { export const saveArticle = (params) => {
return postRequest('/article', params, {"Content-Type": "application/json"}) return postRequest('/other/article', params, {"Content-Type": "application/json"})
} }
//文章修改 //文章修改
export const updateArticle = (params) => { export const updateArticle = (params) => {
return putRequest(`/article/update/${params.id}`, params, {"Content-Type": "application/json"}) return putRequest(`/other/article/update/${params.id}`, params, {"Content-Type": "application/json"})
} }
//文章是否展示修改 //文章是否展示修改
export const updateArticleStatus = (id,params) => { export const updateArticleStatus = (id,params) => {
return putRequest(`/article/update/status/${id}`, params) return putRequest(`/other/article/update/status/${id}`, params)
} }
//查看文章 //查看文章
export const seeArticle = (id) => { export const seeArticle = (id) => {
return getRequest(`/article/${id}`) return getRequest(`/other/article/${id}`)
} }
//获取文章列表数据 //获取文章列表数据
export const getArticle = (params) => { export const getArticle = (params) => {
return getRequest('/article/getByPage', params) return getRequest('/other/article/getByPage', params)
} }
//删除文章数据 //删除文章数据
export const delArticle = (ids) => { export const delArticle = (ids) => {
return deleteRequest(`/article/delByIds/${ids}`) return deleteRequest(`/other/article/delByIds/${ids}`)
} }

View File

@ -66,29 +66,29 @@ export const updatePintuanStatus = (pintuanId, params) => {
// 修改砍价活动商品 // 修改砍价活动商品
export const saveKanJiaActivityGoods = params => { export const saveKanJiaActivityGoods = params => {
return postRequest("/promotion/kan-jia-goods", params, { return postRequest("/promotion/kanJiaGoods", params, {
"Content-type": "application/json" "Content-type": "application/json"
}); });
}; };
// 修改砍价活动商品 // 修改砍价活动商品
export const editKanJiaActivityGoods = params => { export const editKanJiaActivityGoods = params => {
return putRequest("/promotion/kan-jia-goods", params, { return putRequest("/promotion/kanJiaGoods", params, {
"Content-type": "application/json" "Content-type": "application/json"
}); });
}; };
// 获取砍价活动商品 // 获取砍价活动商品
export const getKanJiaGoodsList = params => { export const getKanJiaGoodsList = params => {
return getRequest(`/promotion/kan-jia-goods`, params); return getRequest(`/promotion/kanJiaGoods`, params);
}; };
//删除砍价活动商品 //删除砍价活动商品
export const delKanJiaGoods = ids => { export const delKanJiaGoods = ids => {
return deleteRequest(`/promotion/kan-jia-goods/${ids}`); return deleteRequest(`/promotion/kanJiaGoods/${ids}`);
}; };
// 砍价活动商品详情 // 砍价活动商品详情
export const getKanJiaActivityGoodsById = id => { export const getKanJiaActivityGoodsById = id => {
return getRequest(`/promotion/kan-jia-goods/${id}`); return getRequest(`/promotion/kanJiaGoods/${id}`);
}; };
// 保存平台优惠券 // 保存平台优惠券

View File

@ -7,69 +7,69 @@ import {
// 查询短信站内信信息 // 查询短信站内信信息
export const getMessageData = params => { export const getMessageData = params => {
return getRequest("/message", params); return getRequest("/other/message", params);
}; };
//修改短信模板 //修改短信模板
export const editSmsMessageTemplate = (id, params) => { export const editSmsMessageTemplate = (id, params) => {
return putRequest(`/message/sms/${id}`, params) return putRequest(`/sms/sms/${id}`, params)
} }
//修改站内信模板 //修改站内信模板
export const editNoticeMessage = (id, params) => { export const editNoticeMessage = (id, params) => {
return putRequest(`/noticeMessage/${id}`, params) return putRequest(`/setting/noticeMessage/${id}`, params)
} }
//微信消息同步 //微信消息同步
export const wechatMessageSync = (params) => { export const wechatMessageSync = (params) => {
return getRequest("/message/wechat/init", params) return getRequest("/wechat/wechatMessage/init", params)
} }
//分页获取微信消息 //分页获取微信消息
export const getWechatMessagePage = (params) => { export const getWechatMessagePage = (params) => {
return getRequest("/message/wechat", params) return getRequest("/wechat/wechatMessage", params)
} }
//编辑微信消息模版 //编辑微信消息模版
export const editWechatMessageTemplate = (id, params) => { export const editWechatMessageTemplate = (id, params) => {
return putRequest(`/message/wechat/${id}`, params) return putRequest(`/wechat/wechatMessage/${id}`, params)
} }
//删除微信消息模版 //删除微信消息模版
export const delWechatMessageTemplate = (id, params) => { export const delWechatMessageTemplate = (id, params) => {
return deleteRequest(`/message/wechat/${id}`, params) return deleteRequest(`/wechat/wechatMessage/${id}`, params)
} }
//微信消息订阅同步 //微信消息订阅同步
export const wechatMPMessageSync = (params) => { export const wechatMPMessageSync = (params) => {
return getRequest("/message/wechatMPMessage/init", params) return getRequest("/wechat/wechatMPMessage/init", params)
} }
//分页获取微信消息订阅 //分页获取微信消息订阅
export const getWechatMPMessagePage = (params) => { export const getWechatMPMessagePage = (params) => {
return getRequest("/message/wechatMPMessage", params) return getRequest("/wechat/wechatMPMessage", params)
} }
//编辑微信消息订阅模版 //编辑微信消息订阅模版
export const editWechatMPMessageTemplate = (id, params) => { export const editWechatMPMessageTemplate = (id, params) => {
return putRequest(`/message/wechatMPMessage/${id}`, params) return putRequest(`/wechat/wechatMPMessage/${id}`, params)
} }
//删除微信消息订阅模版 //删除微信消息订阅模版
export const delWechatMPMessageTemplate = (id, params) => { export const delWechatMPMessageTemplate = (id, params) => {
return deleteRequest(`/message/wechatMPMessage/${id}`, params) return deleteRequest(`/wechat/wechatMPMessage/${id}`, params)
} }
// 查询站内信模板信息 // 查询站内信模板信息
export const getNoticeMessageData = params => { export const getNoticeMessageData = params => {
return getRequest("/noticeMessage", params); return getRequest("/setting/noticeMessage", params);
}; };
//删除站内信 //删除站内信
export const deleteMessage = (id) => { export const deleteMessage = (id) => {
return deleteRequest(`message/${id}`); return deleteRequest(`/other/message/${id}`);
}; };
// 开启站内信模板 // 开启站内信模板
export const openNoticeMessage = (id) => { export const openNoticeMessage = (id) => {
return putRequest(`/noticeMessage/${id}/open`); return putRequest(`/setting/noticeMessage/${id}/open`);
}; };
// 修改站内信状态 // 修改站内信状态
export const updateMessageStatus = (id,status) => { export const updateMessageStatus = (id,status) => {
return putRequest(`/noticeMessage/${id}/${status}`); return putRequest(`/setting/noticeMessage/${id}/${status}`);
}; };
//获取短信模板 //获取短信模板
export const getSmsTemplatePage = (params) => { export const getSmsTemplatePage = (params) => {
@ -118,19 +118,19 @@ export const smsSignDetail = (id) => {
//分页查询app版本信息 //分页查询app版本信息
export const appVersionPage = (params) => { export const appVersionPage = (params) => {
return getRequest(`systems/app/version`, params); return getRequest(`/other/appVersion`, params);
}; };
//添加app版本信息 //添加app版本信息
export const addVersion = (params) => { export const addVersion = (params) => {
return postRequest(`systems/app/version`, params); return postRequest(`/other/appVersion`, params);
}; };
//修改app版本信息 //修改app版本信息
export const editVersion = (params, id) => { export const editVersion = (params, id) => {
return putRequest(`systems/app/version/${id}`, params); return putRequest(`/other/appVersion/${id}`, params);
}; };
//删除app版本信息 //删除app版本信息
export const deleteVersion = (id) => { export const deleteVersion = (id) => {
return deleteRequest(`systems/app/version/${id}`); return deleteRequest(`/other/appVersion/${id}`);
}; };
//查询同城配送列表 //查询同城配送列表
export const getInstantDelivery = (params) => { export const getInstantDelivery = (params) => {
@ -153,46 +153,46 @@ export const editInstantDeliveryImage = (bean, params) => {
//查询短信发送记录 //查询短信发送记录
export const getSmsPage = (params) => { export const getSmsPage = (params) => {
return getRequest(`sms`, params); return getRequest(`sms/sms`, params);
}; };
//发送短信 //发送短信
export const sendSms = (params) => { export const sendSms = (params) => {
return postRequest(`sms`, params); return postRequest(`sms/sms`, params);
}; };
/* /*
* 获取 支付支持设置开关 * 获取 支付支持设置开关
*/ */
export const getPaymentSupportForm = () => { export const getPaymentSupportForm = () => {
return getRequest(`system/settingx/paymentSupport`); return getRequest(`setting/settingx/paymentSupport`);
} }
// 验证码源文件删除 // 验证码源文件删除
export const delVerification = (id) => { export const delVerification = (id) => {
return deleteRequest(`/verificationSource/${id}`) return deleteRequest(`/other/verificationSource/${id}`)
} }
// 添加验证码源文件 // 添加验证码源文件
export const addVerification = (params) => { export const addVerification = (params) => {
return postRequest(`/verificationSource`, params) return postRequest(`/other/verificationSource`, params)
} }
// 修改验证码源文件 // 修改验证码源文件
export const editVerification = (id, params) => { export const editVerification = (id, params) => {
return putRequest(`/verificationSource/${id}`, params) return putRequest(`/other/verificationSource/${id}`, params)
} }
// 验证码源文件详情 // 验证码源文件详情
export const verificationDetail = (id) => { export const verificationDetail = (id) => {
return getRequest(`/verificationSource/${id}`) return getRequest(`/other/verificationSource/${id}`)
} }
// 验证码源文件列表 // 验证码源文件列表
export const verificationPage = (params) => { export const verificationPage = (params) => {
return getRequest(`/verificationSource`, params) return getRequest(`/other/verificationSource`, params)
} }
//获取通知类站内信 //获取通知类站内信
export const getNoticeMessageDetail = (id, params) => { export const getNoticeMessageDetail = (id, params) => {
return getRequest(`/noticeMessage/${id}`, params) return getRequest(`/setting/noticeMessage/${id}`, params)
} }

View File

@ -7,77 +7,77 @@ export const getBillPage = (params) => {
} }
//查询店铺列表 //查询店铺列表
export const getShopListData = (params) => { export const getShopListData = (params) => {
return getRequest('/store', params) return getRequest('/store/store', params)
} }
//禁用店铺 //禁用店铺
export const disableShop = (id) => { export const disableShop = (id) => {
return putRequest(`/store/disable/${id}`) return putRequest(`/store/store/disable/${id}`)
} }
//开启店铺 //开启店铺
export const enableBrand = (id) => { export const enableBrand = (id) => {
return putRequest(`/store/enable/${id}`) return putRequest(`/store/store/enable/${id}`)
} }
//查询店铺详细 //查询店铺详细
export const getShopDetailData = (id, params) => { export const getShopDetailData = (id, params) => {
return getRequest(`/store/get/detail/${id}`, params) return getRequest(`/store/store/get/detail/${id}`, params)
} }
//增加店铺列表 //增加店铺列表
export const shopAdd = (params) => { export const shopAdd = (params) => {
return postRequest(`/store/add`, params) return postRequest(`/store/store/add`, params)
} }
//修改店铺列表 //修改店铺列表
export const shopEdit = (id,params) => { export const shopEdit = (id,params) => {
return putRequest(`/store/edit/${id}`, params) return putRequest(`/store/store/edit/${id}`, params)
} }
//审核店铺 //审核店铺
export const shopAudit = (id, passed) => { export const shopAudit = (id, passed) => {
return putRequest(`/store/audit/${id}/${passed}`) return putRequest(`/store/store/audit/${id}/${passed}`)
} }
//查询店铺详情 //查询店铺详情
export const shopDetail = (id) => { export const shopDetail = (id) => {
return getRequest(`/store/get/detail/${id}`) return getRequest(`/store/store/get/detail/${id}`)
} }
// 获取结算单分页 // 获取结算单分页
export const getBuyBillPage = (params) => { export const getBuyBillPage = (params) => {
return getRequest(`/store/bill/getByPage`,params) return getRequest(`/order/bill/getByPage`,params)
} }
// 获取结算单详情 // 获取结算单详情
export const getBuyBillDetail = (id) => { export const getBuyBillDetail = (id) => {
return getRequest(`/store/bill/get/${id}`) return getRequest(`/order/bill/get/${id}`)
} }
// 获取商家结算单流水分页 // 获取商家结算单流水分页
export const getStoreFlow = (id,params) => { export const getStoreFlow = (id,params) => {
return getRequest(`/store/bill/${id}/getStoreFlow`,params) return getRequest(`/order/bill/${id}/getStoreFlow`,params)
} }
// 审核结算单 // 审核结算单
export const examine = (id) => { export const examine = (id) => {
return putRequest(`/store/bill/examine/${id}`) return putRequest(`/order/bill/examine/${id}`)
} }
// 审核结算单 // 审核结算单
export const pay = (id) => { export const pay = (id) => {
return putRequest(`/store/bill/pay/${id}`) return putRequest(`/order/bill/pay/${id}`)
} }
//获取所有商家 //获取所有商家
export const getShopList = () => { export const getShopList = () => {
return getRequest(`/store/all`) return getRequest(`/store/store/all`)
} }
//根据id获取店铺信息 //根据id获取店铺信息
export const getShopByMemberId = (id) => { export const getShopByMemberId = (id) => {
return getRequest(`/store/${id}/member`) return getRequest(`/store/store/${id}/member`)
} }

View File

@ -2,6 +2,6 @@ module.exports = {
title: "lilishop", //配置显示在浏览器标签的title title: "lilishop", //配置显示在浏览器标签的title
aMapKey: "b440952723253aa9fe483e698057bf7d", //高德web端申请的api key aMapKey: "b440952723253aa9fe483e698057bf7d", //高德web端申请的api key
website: "https://www.pickmall.cn", //官网地址 website: "https://www.pickmall.cn", //官网地址
enableCDN: true, //生产环境 是否启用cdn加载 vue等js enableCDN: false, //生产环境 是否启用cdn加载 vue等js
port: 10003, //端口 port: 10003, //端口
}; };

View File

@ -60,6 +60,7 @@ service.interceptors.response.use(
Message.error("系统异常"); Message.error("系统异常");
} }
break; break;
case 20004:
case 401: case 401:
// 未登录 清除已登录状态 // 未登录 清除已登录状态
Cookies.set("userInfoManager", ""); Cookies.set("userInfoManager", "");
@ -93,7 +94,7 @@ service.interceptors.response.use(
// 这种情况一般调到登录页 // 这种情况一般调到登录页
} else if (error.response.status === 404) { } else if (error.response.status === 404) {
// 避免刷新token报错 // 避免刷新token报错
} else if (error.response.status === 403) { } else if (error.response.status === 403 || error.response.data.code === 20004) {
isRefreshToken++; isRefreshToken++;
if (isRefreshToken === 1) { if (isRefreshToken === 1) {
const getTokenRes = await refreshToken(); const getTokenRes = await refreshToken();

View File

@ -4,8 +4,14 @@
<div class="mb_10"> <div class="mb_10">
<Button @click="addParent" icon="md-add">添加一级分类</Button> <Button @click="addParent" icon="md-add">添加一级分类</Button>
</div> </div>
<Table class="table" :load-data="handleLoadData" row-key="id" :loading="loading" :data="tableData" <Table
:columns="columns"> class="table"
:load-data="handleLoadData"
row-key="id"
:loading="loading"
:data="tableData"
:columns="columns"
>
<template slot="action" slot-scope="scope"> <template slot="action" slot-scope="scope">
<Dropdown v-show="scope.row.level == 2" trigger="click"> <Dropdown v-show="scope.row.level == 2" trigger="click">
<Button size="small"> <Button size="small">
@ -13,9 +19,15 @@
<Icon type="ios-arrow-down"></Icon> <Icon type="ios-arrow-down"></Icon>
</Button> </Button>
<DropdownMenu slot="list"> <DropdownMenu slot="list">
<DropdownItem @click.native="brandOperation(scope.row)">编辑绑定品牌</DropdownItem> <DropdownItem @click.native="brandOperation(scope.row)"
<DropdownItem @click.native="specOperation(scope.row)">编辑绑定规格</DropdownItem> >编辑绑定品牌</DropdownItem
<DropdownItem @click.native="parameterOperation(scope.row)">编辑绑定参数</DropdownItem> >
<DropdownItem @click.native="specOperation(scope.row)"
>编辑绑定规格</DropdownItem
>
<DropdownItem @click.native="parameterOperation(scope.row)"
>编辑绑定参数</DropdownItem
>
</DropdownMenu> </DropdownMenu>
</Dropdown> </Dropdown>
@ -27,14 +39,28 @@
</Button> </Button>
<DropdownMenu slot="list"> <DropdownMenu slot="list">
<DropdownItem @click.native="edit(scope.row)">编辑</DropdownItem> <DropdownItem @click.native="edit(scope.row)">编辑</DropdownItem>
<DropdownItem v-if="scope.row.deleteFlag == 1" @click.native="enable(scope.row)"></DropdownItem> <DropdownItem
<DropdownItem v-if="scope.row.deleteFlag == 0" @click.native="disable(scope.row)"></DropdownItem> v-if="scope.row.deleteFlag == 1"
@click.native="enable(scope.row)"
>启用</DropdownItem
>
<DropdownItem
v-if="scope.row.deleteFlag == 0"
@click.native="disable(scope.row)"
>禁用</DropdownItem
>
<DropdownItem @click.native="remove(scope.row)">删除</DropdownItem> <DropdownItem @click.native="remove(scope.row)">删除</DropdownItem>
</DropdownMenu> </DropdownMenu>
</Dropdown> </Dropdown>
&nbsp; &nbsp;
<Button v-show="scope.row.level != 2" type="primary" @click="addChildren(scope.row)" size="small" <Button
icon="md-add" style="margin-right: 5px">添加子分类 v-show="scope.row.level != 2"
type="primary"
@click="addChildren(scope.row)"
size="small"
icon="md-add"
style="margin-right: 5px"
>添加子分类
</Button> </Button>
</template> </template>
@ -43,17 +69,30 @@
</template> </template>
<template slot="deleteFlag" slot-scope="{ row }"> <template slot="deleteFlag" slot-scope="{ row }">
<Tag :class="{'ml_10': row.deleteFlag}" :color="row.deleteFlag == false ? 'success' : 'error'"> <Tag
{{row.deleteFlag == false ? '正常启用' : '禁用'}}</Tag> :class="{ ml_10: row.deleteFlag }"
:color="row.deleteFlag == false ? 'success' : 'error'"
>
{{ row.deleteFlag == false ? "正常启用" : "禁用" }}</Tag
>
</template> </template>
</Table> </Table>
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500"> <Modal
:title="modalTitle"
v-model="modalVisible"
:mask-closable="false"
:width="500"
>
<Form ref="form" :model="formAdd" :label-width="100" :rules="formValidate"> <Form ref="form" :model="formAdd" :label-width="100" :rules="formValidate">
<div v-if="showParent"> <div v-if="showParent">
<FormItem label="上级分类" prop="parentId"> <FormItem label="上级分类" prop="parentId">
{{ parentTitle }} {{ parentTitle }}
<Input v-model="formAdd.parentId" clearable style="width: 100%; display: none" /> <Input
v-model="formAdd.parentId"
clearable
style="width: 100%; display: none"
/>
</FormItem> </FormItem>
</div> </div>
<FormItem label="层级" prop="level" style="display: none"> <FormItem label="层级" prop="level" style="display: none">
@ -63,7 +102,10 @@
<Input v-model="formAdd.name" clearable style="width: 100%" /> <Input v-model="formAdd.name" clearable style="width: 100%" />
</FormItem> </FormItem>
<FormItem label="分类图标" prop="image" v-if="formAdd.level !== 1"> <FormItem label="分类图标" prop="image" v-if="formAdd.level !== 1">
<upload-pic-input v-model="formAdd.image" style="width: 100%"></upload-pic-input> <upload-pic-input
v-model="formAdd.image"
style="width: 100%"
></upload-pic-input>
</FormItem> </FormItem>
<FormItem label="排序值" prop="sortOrder" style="width: 345px"> <FormItem label="排序值" prop="sortOrder" style="width: 345px">
<InputNumber v-model="formAdd.sortOrder"></InputNumber> <InputNumber v-model="formAdd.sortOrder"></InputNumber>
@ -72,7 +114,12 @@
<InputNumber v-model="formAdd.commissionRate"></InputNumber> <InputNumber v-model="formAdd.commissionRate"></InputNumber>
</FormItem> </FormItem>
<FormItem label="是否启用" prop="deleteFlag"> <FormItem label="是否启用" prop="deleteFlag">
<i-switch size="large" v-model="formAdd.deleteFlag" :true-value="0" :false-value="1"> <i-switch
size="large"
v-model="formAdd.deleteFlag"
:true-value="0"
:false-value="1"
>
<span slot="open">启用</span> <span slot="open">启用</span>
<span slot="close">禁用</span> <span slot="close">禁用</span>
</i-switch> </i-switch>
@ -84,33 +131,52 @@
</div> </div>
</Modal> </Modal>
<Modal :title="modalBrandTitle" v-model="modalBrandVisible" :mask-closable="false" :width="500"> <Modal
:title="modalBrandTitle"
v-model="modalBrandVisible"
:mask-closable="false"
:width="500"
>
<Form ref="brandForm" :model="brandForm" :label-width="100"> <Form ref="brandForm" :model="brandForm" :label-width="100">
<Select v-model="brandForm.categoryBrands" filterable multiple> <Select v-model="brandForm.categoryBrands" filterable multiple>
<Option v-for="item in brandWay" :value="item.id" :key="item.id">{{ item.name }}</Option> <Option v-for="item in brandWay" :value="item.id" :key="item.id">{{
item.name
}}</Option>
</Select> </Select>
</Form> </Form>
<div slot="footer"> <div slot="footer">
<Button type="text" @click="modalBrandVisible = false">取消</Button> <Button type="text" @click="modalBrandVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="saveCategoryBrand"></Button> <Button type="primary" :loading="submitLoading" @click="saveCategoryBrand"
>提交</Button
>
</div> </div>
</Modal> </Modal>
<Modal :title="modalSpecTitle" v-model="modalSpecVisible" :mask-closable="false" :width="500"> <Modal
:title="modalSpecTitle"
v-model="modalSpecVisible"
:mask-closable="false"
:width="500"
>
<Form ref="specForm" :model="specForm" :label-width="100"> <Form ref="specForm" :model="specForm" :label-width="100">
<Select v-model="specForm.categorySpecs" multiple> <Select v-model="specForm.categorySpecs" multiple>
<Option v-for="item in specifications" :value="item.id" :key="item.id" :label="item.specName"> <Option
v-for="item in specifications"
:value="item.id"
:key="item.id"
:label="item.specName"
>
</Option> </Option>
</Select> </Select>
</Form> </Form>
<div slot="footer"> <div slot="footer">
<Button type="text" @click="modalSpecVisible = false">取消</Button> <Button type="text" @click="modalSpecVisible = false">取消</Button>
<Button type="primary" :loading="submitLoading" @click="saveCategorySpec"></Button> <Button type="primary" :loading="submitLoading" @click="saveCategorySpec"
>提交</Button
>
</div> </div>
</Modal> </Modal>
</Card> </Card>
</div> </div>
</template> </template>
<script> <script>
@ -170,18 +236,9 @@ export default {
specForm: {}, // specForm: {}, //
// //
formValidate: { formValidate: {
commissionRate: [ commissionRate: [regular.REQUIRED, regular.INTEGER],
regular.REQUIRED, name: [regular.REQUIRED, regular.VARCHAR20],
regular.INTEGER sortOrder: [regular.REQUIRED, regular.INTEGER],
],
name:[
regular.REQUIRED,
regular.VARCHAR20,
],
sortOrder:[
regular.REQUIRED,
regular.INTEGER
]
}, },
columns: [ columns: [
{ {
@ -235,7 +292,6 @@ export default {
// //
brandOperation(v) { brandOperation(v) {
getCategoryBrandListData(v.id).then((res) => { getCategoryBrandListData(v.id).then((res) => {
console.warn(res);
this.categoryId = v.id; this.categoryId = v.id;
this.modalBrandTitle = "品牌关联"; this.modalBrandTitle = "品牌关联";
this.brandForm.categoryBrands = res.result.map((item) => item.id); this.brandForm.categoryBrands = res.result.map((item) => item.id);
@ -277,7 +333,6 @@ export default {
}, },
// //
addChildren(v) { addChildren(v) {
console.log(v);
this.modalType = 0; this.modalType = 0;
this.modalTitle = "添加子分类"; this.modalTitle = "添加子分类";
this.parentTitle = v.name; this.parentTitle = v.name;
@ -367,7 +422,6 @@ export default {
// //
handleLoadData(item, callback) { handleLoadData(item, callback) {
console.warn(item);
if (item.level == 0) { if (item.level == 0) {
let categoryList = JSON.parse(JSON.stringify(this.categoryList)); let categoryList = JSON.parse(JSON.stringify(this.categoryList));
categoryList.forEach((val) => { categoryList.forEach((val) => {
@ -384,7 +438,6 @@ export default {
}); });
} else { } else {
this.deepCategoryChildren(item.id, this.categoryList); this.deepCategoryChildren(item.id, this.categoryList);
console.log(this.checkedCategoryChildren);
setTimeout(() => { setTimeout(() => {
callback(this.checkedCategoryChildren); callback(this.checkedCategoryChildren);
}, 1000); }, 1000);
@ -420,8 +473,6 @@ export default {
} }
return item; return item;
}); });
console.log(this.tableData);
} }
}); });
}, },

View File

@ -304,6 +304,7 @@ export default {
loading: true, loading: true,
onOk: () => { onOk: () => {
API_Member.delMemberReview(v.id).then((res) => { API_Member.delMemberReview(v.id).then((res) => {
this.$Modal.remove();
this.$Message.success("修改成功"); this.$Message.success("修改成功");
this.init(); this.init();
}); });

View File

@ -1,7 +1,12 @@
<template> <template>
<div class="wrapper"> <div class="wrapper">
<Card class="category"> <Card class="category">
<div :class="{active:i == selectedIndex}" class="category-item" v-for="(typeItem,i) in pageTypes" :key="typeItem.type"> <div
:class="{ active: i == selectedIndex }"
class="category-item"
v-for="(typeItem, i) in pageTypes"
:key="typeItem.type"
>
<div @click="clickType(typeItem.type, i)">{{ typeItem.title }}</div> <div @click="clickType(typeItem.type, i)">{{ typeItem.title }}</div>
</div> </div>
</Card> </Card>
@ -24,8 +29,12 @@
<span slot="open"></span> <span slot="open"></span>
<span slot="close"></span> <span slot="close"></span>
</i-switch> </i-switch>
<Button type="info" placement="right" @click="Template(item)" size="small">编辑</Button> <Button type="info" placement="right" @click="Template(item)" size="small"
<Button type="success" placement="right" @click="decorate(item)" size="small">装修</Button> >编辑</Button
>
<Button type="success" placement="right" @click="decorate(item)" size="small"
>装修</Button
>
<Poptip confirm title="删除此模板?" @on-ok="delTemplate(item.id)"> <Poptip confirm title="删除此模板?" @on-ok="delTemplate(item.id)">
<Button type="error" size="small">删除</Button> <Button type="error" size="small">删除</Button>
</Poptip> </Poptip>
@ -33,7 +42,6 @@
</div> </div>
<div class="no-more" v-if="list.length == 0"></div> <div class="no-more" v-if="list.length == 0"></div>
</div> </div>
</Card> </Card>
<Modal <Modal
v-model="showModal" v-model="showModal"
@ -63,11 +71,13 @@ export default {
return { return {
showModal: false, // modal showModal: false, // modal
selectedIndex: 0, // index selectedIndex: 0, // index
formData: { // formData: {
//
status: false, // status: false, //
name: "", // name: "", //
}, },
columns: [ // column columns: [
// column
{ {
title: "页面名称", title: "页面名称",
key: "name", key: "name",
@ -82,11 +92,12 @@ export default {
], ],
loading: false, // loading: false, //
pageTypes: [ // pageTypes: [
//
{ {
type: "INDEX", type: "INDEX",
title: "首页", title: "首页",
} },
// { // {
// type: "SPECIAL", // type: "SPECIAL",
// title: "", // title: "",
@ -134,14 +145,17 @@ export default {
Template(item) { Template(item) {
// //
item.status = item.pageShow item.status = item.pageShow;
this.formData = item; this.formData = item;
this.showModal = true; this.showModal = true;
}, },
decorate(val) { decorate(val) {
// //
this.$router.push({ name: "renovation", query: { id: val.id,pageShow:val.pageShow } }); this.$router.push({
name: "renovation",
query: { id: val.id, pageShow: val.pageShow },
});
}, },
getTemplateList() { getTemplateList() {
@ -155,13 +169,13 @@ export default {
API_floor.getHomeList(params).then((res) => { API_floor.getHomeList(params).then((res) => {
if (res.success) { if (res.success) {
this.list = res.result.records; this.list = res.result.records;
this.list.forEach(e => { this.list.forEach((e) => {
if (e.pageShow === 'OPEN') { if (e.pageShow === "OPEN") {
e.pageShow = true e.pageShow = true;
} else { } else {
e.pageShow = false e.pageShow = false;
} }
}) });
} }
}); });
}, },
@ -184,7 +198,7 @@ export default {
} }
}); });
}, },
} },
}; };
</script> </script>

View File

@ -2,17 +2,27 @@
<div class="decorate"> <div class="decorate">
<div class="decorate-title"> <div class="decorate-title">
{{ res.name }} {{ res.name }}
<Button style="margin-left: 20px" size="small" ghost v-if=" <Button
res.type == 'tpl_ad_list' || style="margin-left: 20px"
res.type == 'tpl_activity_list' || size="small"
res.drawer ghost
" type="primary" @click="selectStyle()">选择风格</Button> v-if="res.type == 'tpl_ad_list' || res.type == 'tpl_activity_list' || res.drawer"
type="primary"
@click="selectStyle()"
>选择风格</Button
>
</div> </div>
<!-- 右侧显示抽屉 --> <!-- 右侧显示抽屉 -->
<Drawer title="选择风格" :closable="false" width="400" v-model="styleFlag"> <Drawer title="选择风格" :closable="false" width="400" v-model="styleFlag">
<div class="drawer"> <div class="drawer">
<div class="drawer-item" @click="clickDrawer(item, index)" v-for="(item, index) in modelData" :key="index" v-if="item.drawer"> <div
class="drawer-item"
@click="clickDrawer(item, index)"
v-for="(item, index) in modelData"
:key="index"
v-if="item.drawer"
>
<img src alt /> <img src alt />
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
</div> </div>
@ -20,18 +30,29 @@
</Drawer> </Drawer>
<!-- 卡片集合 --> <!-- 卡片集合 -->
<div class="decorate-list" v-if=" <div
(res.type != 'tpl_ad_list' && res.type != 'tpl_activity_list') || class="decorate-list"
res.drawer v-if="(res.type != 'tpl_ad_list' && res.type != 'tpl_activity_list') || res.drawer"
"> >
<div class="decorate-item" v-for="(item, index) in res.options.list" :key="index"> <div class="decorate-item" v-for="(item, index) in res.options.list" :key="index">
<div class="decorate-item-title"> <div class="decorate-item-title">
<div>卡片</div> <div>卡片</div>
<Icon @click="closeDecorate(index)" v-if="res.close" size="20" color="#e1251b" type="md-close-circle" /> <Icon
@click="closeDecorate(index)"
v-if="res.close"
size="20"
color="#e1251b"
type="md-close-circle"
/>
</div> </div>
<div class="decorate-item-box"> <div class="decorate-item-box">
<div class="decorate-border" v-if="item.titleWay" v-for="(title_item, title_index) in item.titleWay" :key="title_index"> <div
class="decorate-border"
v-if="item.titleWay"
v-for="(title_item, title_index) in item.titleWay"
:key="title_index"
>
<div class="decorate-view"> <div class="decorate-view">
<div class="decorate-view-title">标题{{ title_index + 1 }}</div> <div class="decorate-view-title">标题{{ title_index + 1 }}</div>
<div> <div>
@ -46,19 +67,28 @@
</div> </div>
<div class="decorate-view"> <div class="decorate-view">
<div class="decorate-view-title">绑定商品</div> <div class="decorate-view-title">绑定商品</div>
<div class="decorate-view-link" v-if="res.options.list[0].listWay.length != 0"> <div
class="decorate-view-link"
v-if="res.options.list[0].listWay.length != 0"
>
<!-- 绑定商品选择器回调已选择的商品 --> <!-- 绑定商品选择器回调已选择的商品 -->
<div v-if="title_item.___index == bindGoods.___index || title_item.title == bindGoods.type" v-for="(bindGoods,bindGoodsIndex) in res.options.list[0].listWay" :key="bindGoodsIndex"> <div
v-if="
title_item.___index == bindGoods.___index ||
title_item.title == bindGoods.type
"
v-for="(bindGoods, bindGoodsIndex) in res.options.list[0].listWay"
:key="bindGoodsIndex"
>
{{ bindGoods.title }}, {{ bindGoods.title }},
</div> </div>
</div> </div>
<div> <div>
<Button @click="bindGoodsId(title_item)" size="small" ghost type="primary">选择商品</Button> <Button @click="bindGoodsId(title_item)" size="small" ghost type="primary"
>选择商品</Button
>
</div> </div>
</div> </div>
</div> </div>
<!-- 选择照片 --> <!-- 选择照片 -->
<div class="decorate-view" v-if="!res.notImg"> <div class="decorate-view" v-if="!res.notImg">
@ -72,7 +102,13 @@
</div> </div>
</div> </div>
<div class="selectBtn"> <div class="selectBtn">
<Button size="small" @click="handleClickFile(item, index)" ghost type="primary">选择照片</Button> <Button
size="small"
@click="handleClickFile(item, index)"
ghost
type="primary"
>选择照片</Button
>
</div> </div>
</div> </div>
<!-- 填写标题 --> <!-- 填写标题 -->
@ -90,7 +126,11 @@
已选链接 已选链接
<span> <span>
{{ ways.find((e)=>{return item.url.___type == e.name}).title }} {{
ways.find((e) => {
return item.url.___type == e.name;
}).title
}}
- -
<!-- 当选择完链接之后的商品名称 --> <!-- 当选择完链接之后的商品名称 -->
<span v-if="item.url.___type == 'goods'"> {{ item.url.goodsName }}</span> <span v-if="item.url.___type == 'goods'"> {{ item.url.goodsName }}</span>
@ -102,38 +142,38 @@
<span v-if="item.url.___type == 'other'"> {{ item.url.title }}</span> <span v-if="item.url.___type == 'other'"> {{ item.url.title }}</span>
<!-- 当选择完活动之后的其他回调 --> <!-- 当选择完活动之后的其他回调 -->
<span v-if="item.url.___type == 'marketing'"> <span v-if="item.url.___type == 'marketing'">
<span v-if="item.url.___promotion =='SECKILL'"> <span v-if="item.url.___promotion == 'SECKILL'"> </span>
秒杀 <span v-if="item.url.___promotion == 'FULL_DISCOUNT'"> </span>
</span> <span v-if="item.url.___promotion == 'PINTUAN'"> </span>
<span v-if="item.url.___promotion =='FULL_DISCOUNT'">
满减
</span>
<span v-if="item.url.___promotion =='PINTUAN'">
拼团
</span>
{{ item.url.title || item.url.goodsName }} {{ item.url.title || item.url.goodsName }}
</span> </span>
<!-- 当选择完活动之后的其他回调 --> <!-- 当选择完活动之后的其他回调 -->
<span v-if="item.url.___type == 'pages'"> {{ item.url.title }}</span> <span v-if="item.url.___type == 'pages'"> {{ item.url.title }}</span>
</span> </span>
</div> </div>
<div> <div>
<Button ghost size="small" type="primary" @click="clickLink(item,index)"></Button> <Button ghost size="small" type="primary" @click="clickLink(item, index)"
>选择链接</Button
>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<Button v-if=" <Button
res.type != 'tpl_ad_list' && v-if="res.type != 'tpl_ad_list' && res.type != 'tpl_activity_list' && !res.notAdd"
res.type != 'tpl_activity_list' && type="primary"
!res.notAdd @click="addDecorate()"
" type="primary" @click="addDecorate()" ghost>添加</Button> ghost
>添加</Button
>
<liliDialog ref="liliDialog" @selectedLink="selectedLink" @selectedGoodsData="selectedGoodsData"></liliDialog> <liliDialog
ref="liliDialog"
@selectedLink="selectedLink"
@selectedGoodsData="selectedGoodsData"
></liliDialog>
<Modal width="1200px" v-model="picModelFlag"> <Modal width="1200px" v-model="picModelFlag">
<ossManage @callback="callbackSelected" ref="ossManage" /> <ossManage @callback="callbackSelected" ref="ossManage" />
@ -179,18 +219,17 @@ export default {
}, },
// //
selectedGoodsData(val) { selectedGoodsData(val) {
if (!val) return false; if (!val) return false;
let data = val.map((item) => { let data = val.map((item) => {
delete item.selected; delete item.selected;
delete item.intro delete item.intro;
delete item.mobileIntro delete item.mobileIntro;
return { return {
img: item.thumbnail, img: item.thumbnail,
title: item.goodsName, title: item.goodsName,
type: this.selectedGoods.title, type: this.selectedGoods.title,
___index: this.selectedGoods.___index, ___index: this.selectedGoods.___index,
...item ...item,
}; };
}); });
this.res.options.list[0].listWay.push(...data); this.res.options.list[0].listWay.push(...data);
@ -236,7 +275,7 @@ export default {
title: "标题", title: "标题",
link: "", link: "",
url: "", url: "",
size: this.res.options.list[0].size, size: this.res.options.list[0]?.size,
}; };
this.res.options.list.push(way); this.res.options.list.push(way);
}, },

View File

@ -3,7 +3,13 @@
<div class="model-title"> <div class="model-title">
<div>店铺装修</div> <div>店铺装修</div>
<div class="btns"> <div class="btns">
<Button @click="clickBtn(item)" size="small" v-for="(item, index) in way" :key="index" :type="item.selected ? 'primary' : ''"> <Button
@click="clickBtn(item)"
size="small"
v-for="(item, index) in way"
:key="index"
:type="item.selected ? 'primary' : ''"
>
{{ item.title }} {{ item.title }}
</Button> </Button>
</div> </div>
@ -18,7 +24,13 @@
</Poptip> --> </Poptip> -->
<Button size="default" type="primary" @click="handleSpinShow"></Button> <Button size="default" type="primary" @click="handleSpinShow"></Button>
<Modal title="保存中" v-model="saveDialog" :closable="true" :mask-closable="false" :footer-hide="true"> <Modal
title="保存中"
v-model="saveDialog"
:closable="true"
:mask-closable="false"
:footer-hide="true"
>
<div v-if="progress"> <div v-if="progress">
<div class="model-item"> <div class="model-item">
模板名称 <Input style="width: 200px" v-model="submitWay.name" /> 模板名称 <Input style="width: 200px" v-model="submitWay.name" />
@ -99,7 +111,7 @@ export default {
return false; return false;
} }
this.submitWay.pageShow this.submitWay?.pageShow === true
? (this.submitWay.pageShow = "OPEN") ? (this.submitWay.pageShow = "OPEN")
: (this.submitWay.pageShow = "CLOSE"); : (this.submitWay.pageShow = "CLOSE");

View File

@ -4,10 +4,10 @@ import {commonUrl, getRequestWithNoToken, postRequestWithNoToken} from '@/libs/a
// 获取拼图验证 // 获取拼图验证
export const getVerifyImg = (verificationEnums) => { export const getVerifyImg = (verificationEnums) => {
return getRequestWithNoToken(`${commonUrl}/common/slider/${verificationEnums}`); return getRequestWithNoToken(`${commonUrl}/common/common/slider/${verificationEnums}`);
}; };
// 拼图验证 // 拼图验证
export const postVerifyImg = (params) => { export const postVerifyImg = (params) => {
return postRequestWithNoToken(`${commonUrl}/common/slider/${params.verificationEnums}`, params); return postRequestWithNoToken(`${commonUrl}/common/common/slider/${params.verificationEnums}`, params);
}; };

View File

@ -2,7 +2,13 @@
<div class="search"> <div class="search">
<Card> <Card>
<Row @keydown.enter.native="handleSearch"> <Row @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Form
ref="searchForm"
:model="searchForm"
inline
:label-width="70"
class="search-form"
>
<Form-item label="订单编号" prop="orderSn"> <Form-item label="订单编号" prop="orderSn">
<Input <Input
type="text" type="text"
@ -22,7 +28,12 @@
/> />
</Form-item> </Form-item>
<Form-item label="售后状态"> <Form-item label="售后状态">
<Select v-model="searchForm.serviceStatus" placeholder="全部" clearable style="width: 200px"> <Select
v-model="searchForm.serviceStatus"
placeholder="全部"
clearable
style="width: 200px"
>
<Option value="APPLY">申请售后</Option> <Option value="APPLY">申请售后</Option>
<Option value="PASS">通过售后</Option> <Option value="PASS">通过售后</Option>
<Option value="REFUSE">拒绝售后</Option> <Option value="REFUSE">拒绝售后</Option>
@ -63,12 +74,23 @@
/> />
</Form-item> </Form-item>
<Form-item label="售后类型"> <Form-item label="售后类型">
<Select v-model="searchForm.serviceType" placeholder="全部" clearable style="width: 200px"> <Select
v-model="searchForm.serviceType"
placeholder="全部"
clearable
style="width: 200px"
>
<Option value="RETURN_MONEY">退款</Option> <Option value="RETURN_MONEY">退款</Option>
<Option value="RETURN_GOODS">退货</Option> <Option value="RETURN_GOODS">退货</Option>
</Select> </Select>
</Form-item> </Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> <Button
@click="handleSearch"
type="primary"
icon="ios-search"
class="search-btn"
>搜索</Button
>
</Form> </Form>
</Row> </Row>
<Table <Table
@ -81,24 +103,35 @@
> >
<!-- 商品栏目格式化 --> <!-- 商品栏目格式化 -->
<template slot="goodsSlot" slot-scope="{ row }"> <template slot="goodsSlot" slot-scope="{ row }">
<div style="margin-top: 5px;height: 80px; display: flex;"> <div style="margin-top: 5px; height: 80px; display: flex">
<div style=""> <div style="">
<img :src="row.goodsImage" style="height: 60px;margin-top: 3px"> <img :src="row.goodsImage" style="height: 60px; margin-top: 3px" />
</div> </div>
<div style="margin-left: 13px;"> <div style="margin-left: 13px">
<div class="div-zoom"> <div class="div-zoom">
<a @click="linkTo(row.goodsId, row.skuId)">{{ row.goodsName }}</a> <a @click="linkTo(row.goodsId, row.skuId)">{{ row.goodsName }}</a>
</div> </div>
<Poptip trigger="hover" title="扫码在手机中查看" transfer> <Poptip trigger="hover" title="扫码在手机中查看" transfer>
<div slot="content"> <div slot="content">
<vue-qr :text="wapLinkTo(row.goodsId,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr> <vue-qr
:text="wapLinkTo(row.goodsId, row.skuId)"
:margin="0"
colorDark="#000"
colorLight="#fff"
:size="150"
></vue-qr>
</div> </div>
<img src="../../../assets/qrcode.svg" class="hover-pointer" width="20" height="20" alt=""> <img
src="../../../assets/qrcode.svg"
class="hover-pointer"
width="20"
height="20"
alt=""
/>
</Poptip> </Poptip>
</div> </div>
</div> </div>
</template> </template>
</Table> </Table>
<Row type="flex" justify="end" class="mt_10"> <Row type="flex" justify="end" class="mt_10">
@ -121,12 +154,12 @@
<script> <script>
import * as API_Order from "@/api/order"; import * as API_Order from "@/api/order";
import vueQr from 'vue-qr' import vueQr from "vue-qr";
export default { export default {
name: "orderList",
components: { components: {
"vue-qr":vueQr "vue-qr": vueQr,
}, },
name: "after-sale-order",
data() { data() {
return { return {
loading: true, // loading: true, //
@ -143,7 +176,6 @@
serviceStatus: "", serviceStatus: "",
storeName: "", storeName: "",
sn: "", sn: "",
}, },
selectDate: null, // selectDate: null, //
form: { form: {
@ -159,13 +191,13 @@
title: "售后服务单号", title: "售后服务单号",
key: "sn", key: "sn",
minWidth: 140, minWidth: 140,
tooltip: true tooltip: true,
}, },
{ {
title: "订单编号", title: "订单编号",
key: "orderSn", key: "orderSn",
minWidth: 120, minWidth: 120,
tooltip: true tooltip: true,
}, },
{ {
title: "商品", title: "商品",
@ -183,7 +215,7 @@
title: "商家名称", title: "商家名称",
key: "storeName", key: "storeName",
minWidth: 100, minWidth: 100,
tooltip: true tooltip: true,
}, },
{ {
title: "售后金额", title: "售后金额",
@ -191,17 +223,13 @@
width: 110, width: 110,
render: (h, params) => { render: (h, params) => {
if (params.row.applyRefundPrice == null) { if (params.row.applyRefundPrice == null) {
return h( return h("div", this.$options.filters.unitPrice(0, "¥"));
"div",
this.$options.filters.unitPrice(0, "¥")
);
} else { } else {
return h( return h(
"div", "div",
this.$options.filters.unitPrice(params.row.applyRefundPrice, "¥") this.$options.filters.unitPrice(params.row.applyRefundPrice, "¥")
); );
} }
}, },
}, },
{ {
@ -210,42 +238,48 @@
width: 100, width: 100,
render: (h, params) => { render: (h, params) => {
if (params.row.serviceType == "RETURN_MONEY") { if (params.row.serviceType == "RETURN_MONEY") {
return h('div', [h('tag', {props: {color: "blue"}}, '退款'),]); return h("div", [h("tag", { props: { color: "blue" } }, "退款")]);
} else if (params.row.serviceType == "RETURN_GOODS") { } else if (params.row.serviceType == "RETURN_GOODS") {
return h('div', [h('tag', {props: {color: "volcano"}}, '退货'),]); return h("div", [h("tag", { props: { color: "volcano" } }, "退货")]);
} else if (params.row.serviceType == "EXCHANGE_GOODS") { } else if (params.row.serviceType == "EXCHANGE_GOODS") {
return h('div', [h('tag', {props: {color: "green"}}, '换货'),]); return h("div", [h("tag", { props: { color: "green" } }, "换货")]);
}
} }
}, },
},
{ {
title: "售后状态", title: "售后状态",
key: "serviceStatus", key: "serviceStatus",
width: 200, width: 150,
render: (h, params) => { render: (h, params) => {
if (params.row.serviceStatus == "APPLY") { if (params.row.serviceStatus == "APPLY") {
return h('div', [h('tag', {props: {color: "blue"}}, '申请中'),]); return h("div", [h("tag", { props: { color: "blue" } }, "申请中")]);
} else if (params.row.serviceStatus == "PASS") { } else if (params.row.serviceStatus == "PASS") {
return h('div', [h('tag', {props: {color: "cyan"}}, '通过售后'),]); return h("div", [h("tag", { props: { color: "cyan" } }, "通过售后")]);
} else if (params.row.serviceStatus == "REFUSE") { } else if (params.row.serviceStatus == "REFUSE") {
return h('div', [h('tag', {props: {color: "volcano"}}, '拒绝售后'),]); return h("div", [h("tag", { props: { color: "volcano" } }, "拒绝售后")]);
} else if (params.row.serviceStatus == "BUYER_RETURN") { } else if (params.row.serviceStatus == "BUYER_RETURN") {
return h('div', [h('tag', {props: {color: "orange"}}, '买家退货,待卖家收货'),]); return h("div", [
h("tag", { props: { color: "orange" } }, "买家退货,待卖家收货"),
]);
} else if (params.row.serviceStatus == "SELLER_CONFIRM") { } else if (params.row.serviceStatus == "SELLER_CONFIRM") {
return h('div', [h('tag', {props: {color: "gold"}}, '卖家确认收货'),]); return h("div", [h("tag", { props: { color: "gold" } }, "卖家确认收货")]);
} else if (params.row.serviceStatus == "SELLER_TERMINATION") { } else if (params.row.serviceStatus == "SELLER_TERMINATION") {
return h('div', [h('tag', {props: {color: "lime"}}, '卖家终止售后'),]); return h("div", [h("tag", { props: { color: "lime" } }, "卖家终止售后")]);
} else if (params.row.serviceStatus == "BUYER_CANCEL") { } else if (params.row.serviceStatus == "BUYER_CANCEL") {
return h('div', [h('tag', {props: {color: "purple"}}, '买家取消售后'),]); return h("div", [h("tag", { props: { color: "purple" } }, "买家取消售后")]);
} else if (params.row.serviceStatus == "COMPLETE") { } else if (params.row.serviceStatus == "COMPLETE") {
return h('div', [h('tag', {props: {color: "green"}}, '完成售后'),]); return h("div", [h("tag", { props: { color: "green" } }, "完成售后")]);
} else if (params.row.serviceStatus == "WAIT_REFUND") { } else if (params.row.serviceStatus == "WAIT_REFUND") {
return h('div', [h('tag', {props: {color: "geekblue"}}, '待平台退款'),]); return h("div", [h("tag", { props: { color: "geekblue" } }, "待平台退款")]);
}
} }
}, },
},
{
title: "申请时间",
key: "createTime",
width: 180,
},
{ {
title: "操作", title: "操作",
key: "action", key: "action",
@ -329,7 +363,6 @@
name: "after-order-detail", name: "after-order-detail",
query: { sn: sn }, query: { sn: sn },
}); });
}, },
}, },
mounted() { mounted() {

View File

@ -39,12 +39,10 @@
</dl> </dl>
<dl> <dl>
<dt>凭证</dt> <dt>凭证</dt>
<dd v-if="afterSaleImage == ''"> <dd v-if="afterSaleImage == ''"></dd>
暂无凭证
</dd>
<dd v-else> <dd v-else>
<div class="div-img" v-for="(item, index) in afterSaleImage" :key="index"> <div class="div-img" v-for="(item, index) in afterSaleImage" :key="index">
<img class="complain-img" :src=item> <img class="complain-img" :src="item" />
</div> </div>
</dd> </dd>
</dl> </dl>
@ -64,7 +62,11 @@
<dt>是否同意</dt> <dt>是否同意</dt>
<dd> <dd>
<div class="div-content"> <div class="div-content">
<RadioGroup type="button" button-style="solid" v-model="params.serviceStatus"> <RadioGroup
type="button"
button-style="solid"
v-model="params.serviceStatus"
>
<Radio label="PASS"> <Radio label="PASS">
<span>同意</span> <span>同意</span>
</Radio> </Radio>
@ -77,7 +79,7 @@
</dl> </dl>
<dl> <dl>
<dt>申请退款金额</dt> <dt>申请退款金额</dt>
<dd>{{ afterSaleInfo.applyRefundPrice | unitPrice('¥') }}</dd> <dd>{{ afterSaleInfo.applyRefundPrice | unitPrice("¥") }}</dd>
</dl> </dl>
<dl> <dl>
<dt>实际退款金额</dt> <dt>实际退款金额</dt>
@ -88,13 +90,25 @@
<dl> <dl>
<dt>备注信息</dt> <dt>备注信息</dt>
<dd> <dd>
<Input v-model="params.remark" type="textarea" maxlength="200" :rows="4" clearable style="width:260px" /> <Input
v-model="params.remark"
type="textarea"
maxlength="200"
:rows="4"
clearable
style="width: 260px"
/>
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dd> <dd>
<div style="text-align: right; width: 45%; margin-top: 10px"> <div style="text-align: right; width: 45%; margin-top: 10px">
<Button type="primary" :loading="submitLoading" @click="handleSubmit" style="margin-left: 5px"> <Button
type="primary"
:loading="submitLoading"
@click="handleSubmit"
style="margin-left: 5px"
>
确定 确定
</Button> </Button>
</div> </div>
@ -128,43 +142,54 @@
<dl> <dl>
<dt>备注信息</dt> <dt>备注信息</dt>
<dd> <dd>
{{afterSaleInfo.auditRemark || '暂无备注信息'}} {{ afterSaleInfo.auditRemark || "暂无备注信息" }}
</dd> </dd>
</dl> </dl>
</div> </div>
</div> </div>
<div class="div-flow-center"> <div class="div-flow-center"></div>
</div>
<div class="div-flow-right"> <div class="div-flow-right">
<div class="div-form-default"> <div class="div-form-default">
<h3>相关商品交易信息</h3> <h3>相关商品交易信息</h3>
<dl> <dl>
<dt> <dt>
<img :src="afterSaleInfo.goodsImage" height="60px"> <img :src="afterSaleInfo.goodsImage" height="60px" />
</dt> </dt>
<dd> <dd>
<div class="div-zoom"> <div class="div-zoom">
<a @click="linkTo(afterSaleInfo.goodsId,afterSaleInfo.skuId)">{{afterSaleInfo.goodsName}}</a> <a @click="linkTo(afterSaleInfo.goodsId, afterSaleInfo.skuId)">{{
afterSaleInfo.goodsName
}}</a>
<Poptip trigger="hover" title="扫码在手机中查看" transfer> <Poptip trigger="hover" title="扫码在手机中查看" transfer>
<div slot="content"> <div slot="content">
<vue-qr :text="wapLinkTo(afterSaleInfo.goodsId,afterSaleInfo.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr> <vue-qr
:text="wapLinkTo(afterSaleInfo.goodsId, afterSaleInfo.skuId)"
:margin="0"
colorDark="#000"
colorLight="#fff"
:size="150"
></vue-qr>
</div> </div>
<img src="../../../assets/qrcode.svg" style="vertical-align:middle" class="hover-pointer ml_10" width="20" height="20" alt=""> <img
src="../../../assets/qrcode.svg"
style="vertical-align: middle"
class="hover-pointer ml_10"
width="20"
height="20"
alt=""
/>
</Poptip> </Poptip>
</div> </div>
<div style="color:#999;font-size:10px">数量x{{afterSaleInfo.num}}</div> <div style="color: #999; font-size: 10px">
数量x{{ afterSaleInfo.num }}
</div>
</dd> </dd>
</dl> </dl>
</div> </div>
<div class="div-form-default"> <div class="div-form-default">
<h3>订单相关信息</h3> <h3>订单相关信息</h3>
<dl> <dl>
<dt> <dt>订单编号</dt>
订单编号
</dt>
<dd> <dd>
{{ afterSaleInfo.orderSn }} {{ afterSaleInfo.orderSn }}
</dd> </dd>
@ -187,9 +212,14 @@
{{ afterSaleInfo.bankAccountNumber }} {{ afterSaleInfo.bankAccountNumber }}
</dd> </dd>
</dl> </dl>
</div> </div>
<div class="div-form-default" v-if="afterSaleInfo.afterSaleAllowOperationVO && afterSaleInfo.afterSaleAllowOperationVO.refund"> <div
class="div-form-default"
v-if="
afterSaleInfo.afterSaleAllowOperationVO &&
afterSaleInfo.afterSaleAllowOperationVO.refund
"
>
<h3>平台退款</h3> <h3>平台退款</h3>
<dl> <dl>
<dt>银行开户行</dt> <dt>银行开户行</dt>
@ -212,19 +242,36 @@
<dl> <dl>
<dt>备注信息</dt> <dt>备注信息</dt>
<dd> <dd>
<Input v-model="refundPriceForm.remark" type="textarea" maxlength="200" :rows="4" clearable style="width:260px" /> <Input
v-model="refundPriceForm.remark"
type="textarea"
maxlength="200"
:rows="4"
clearable
style="width: 260px"
/>
</dd> </dd>
</dl> </dl>
<dl> <dl>
<dt>操作</dt> <dt>操作</dt>
<dd> <dd>
<Button type="primary" :loading="submitLoading" @click="refundPriceSubmit" style="margin-left: 5px"> <Button
type="primary"
:loading="submitLoading"
@click="refundPriceSubmit"
style="margin-left: 5px"
>
退款 退款
</Button> </Button>
</dd> </dd>
</dl> </dl>
</div> </div>
<div class="div-form-default" v-if="afterSaleInfo.showDelivery && afterSaleInfo.serviceType ==='RETURN_GOODS'"> <div
class="div-form-default"
v-if="
afterSaleInfo.showDelivery && afterSaleInfo.serviceType === 'RETURN_GOODS'
"
>
<h3>物流信息</h3> <h3>物流信息</h3>
<dl> <dl>
<dt>收货商家</dt> <dt>收货商家</dt>
@ -236,16 +283,17 @@
</dl> </dl>
<dl> <dl>
<dt>收货地址</dt> <dt>收货地址</dt>
<dd>{{storeMsg.salesConsigneeAddressPath}} {{storeMsg.salesConsigneeDetail}}</dd> <dd>
{{ storeMsg.salesConsigneeAddressPath }}
{{ storeMsg.salesConsigneeDetail }}
</dd>
</dl> </dl>
<dl> <dl>
<dt>物流公司</dt> <dt>物流公司</dt>
<dd>{{ afterSaleInfo.mlogisticsName }}</dd> <dd>{{ afterSaleInfo.mlogisticsName }}</dd>
</dl> </dl>
<dl> <dl>
<dt> <dt>物流单号</dt>
物流单号
</dt>
<dd> <dd>
{{ afterSaleInfo.mlogisticsNo }} {{ afterSaleInfo.mlogisticsNo }}
</dd> </dd>
@ -253,14 +301,17 @@
<dl> <dl>
<dt>操作</dt> <dt>操作</dt>
<dd> <dd>
<Button type="info" :loading="submitLoading" @click="logisticsSeller()" style="margin-left: 5px"> <Button
type="info"
:loading="submitLoading"
@click="logisticsSeller()"
style="margin-left: 5px"
>
查询物流 查询物流
</Button> </Button>
</dd> </dd>
</dl> </dl>
</div> </div>
</div> </div>
</div> </div>
</Card> </Card>
@ -297,9 +348,8 @@
</li> </li>
</template> </template>
<template v-else> <template v-else>
<li style="text-align:center;">暂无物流信息</li> <li style="text-align: center">暂无物流信息</li>
</template> </template>
</ul> </ul>
</div> </div>
</div> </div>
@ -312,8 +362,11 @@
<script> <script>
import * as API_Order from "@/api/order"; import * as API_Order from "@/api/order";
import vueQr from "vue-qr";
export default { export default {
components: {
"vue-qr": vueQr,
},
name: "orderDetail", name: "orderDetail",
data() { data() {
return { return {
@ -334,44 +387,45 @@ export default {
refundPriceForm: { refundPriceForm: {
remark: "", remark: "",
}, },
afterSaleStatusList: [ // afterSaleStatusList: [
//
{ {
name: '申请中', name: "申请中",
status: 'APPLY' status: "APPLY",
}, },
{ {
name: '通过', name: "通过",
status: 'PASS' status: "PASS",
}, },
{ {
name: '拒绝', name: "拒绝",
status: 'REFUSE' status: "REFUSE",
}, },
{ {
name: '买家退货,待卖家收货', name: "买家退货,待卖家收货",
status: 'BUYER_RETURN' status: "BUYER_RETURN",
}, },
{ {
name: '卖家确认收货', name: "卖家确认收货",
status: 'SELLER_CONFIRM' status: "SELLER_CONFIRM",
}, },
{ {
name: '卖家终止售后', name: "卖家终止售后",
status: 'SELLER_TERMINATION' status: "SELLER_TERMINATION",
}, },
{ {
name: '买家取消售后', name: "买家取消售后",
status: 'BUYER_CANCEL' status: "BUYER_CANCEL",
}, },
{ {
name: '完成售后', name: "完成售后",
status: 'COMPLETE' status: "COMPLETE",
}, },
{ {
name: '等待平台退款', name: "等待平台退款",
status: 'WAIT_REFUND' status: "WAIT_REFUND",
} },
] ],
}; };
}, },
methods: { methods: {
@ -382,13 +436,19 @@ export default {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
this.afterSaleInfo = res.result; this.afterSaleInfo = res.result;
this.afterSaleInfo.showDelivery = this.showDelivery(this.afterSaleInfo.serviceStatus) this.afterSaleInfo.showDelivery = this.showDelivery(
this.afterSaleInfo.serviceName = this.filterOrderStatus(this.afterSaleInfo.serviceStatus) this.afterSaleInfo.serviceStatus
);
this.afterSaleInfo.serviceName = this.filterOrderStatus(
this.afterSaleInfo.serviceStatus
);
this.afterSaleImage = (res.result.afterSaleImage || "").split(","); this.afterSaleImage = (res.result.afterSaleImage || "").split(",");
//退 //退
if (this.afterSaleInfo.mconsigneeAddressPath) if (this.afterSaleInfo.mconsigneeAddressPath)
this.afterSaleInfo.mconsigneeAddressPath = this.afterSaleInfo.mconsigneeAddressPath = this.afterSaleInfo.mconsigneeAddressPath.replaceAll(
this.afterSaleInfo.mconsigneeAddressPath.replaceAll(",", " "); ",",
" "
);
this.$set( this.$set(
this.params, this.params,
@ -397,15 +457,17 @@ export default {
); );
// //
if (this.afterSaleInfo.showDelivery) { if (this.afterSaleInfo.showDelivery) {
API_Order.storeAddress(this.sn).then(resu => { API_Order.storeAddress(this.sn).then((resu) => {
if (resu.success) { if (resu.success) {
const obj = resu.result const obj = resu.result;
obj.salesConsigneeAddressPath = obj.salesConsigneeAddressPath.replaceAll(',', '') obj.salesConsigneeAddressPath = obj.salesConsigneeAddressPath.replaceAll(
",",
""
);
this.storeMsg = obj; this.storeMsg = obj;
} }
}) });
} }
} }
}); });
}, },
@ -462,9 +524,12 @@ export default {
} }
}); });
}, },
filterOrderStatus (status) { // filterOrderStatus(status) {
const ob = this.afterSaleStatusList.filter(e => { return e.status === status }); //
return ob[0].name const ob = this.afterSaleStatusList.filter((e) => {
return e.status === status;
});
return ob[0].name;
}, },
// //
showDelivery(status) { showDelivery(status) {
@ -472,11 +537,11 @@ export default {
this.afterSaleStatusList.forEach((e, index) => { this.afterSaleStatusList.forEach((e, index) => {
// 退 // 退
if (e.status === status && index >= 3 && index !== 6) { if (e.status === status && index >= 3 && index !== 6) {
flag = true flag = true;
}
})
return flag
} }
});
return flag;
},
}, },
mounted() { mounted() {
this.sn = this.$route.query.sn; this.sn = this.$route.query.sn;

View File

@ -4,9 +4,22 @@
<Card style="height: 60px"> <Card style="height: 60px">
<div style=""> <div style="">
<Button v-if="allowOperation.editPrice" @click="modifyPrice"></Button> <Button v-if="allowOperation.editPrice" @click="modifyPrice"></Button>
<Button v-if="allowOperation.editConsignee" @click="editAddress" type="primary" ghost>修改收货地址</Button> <Button
<Button v-if="allowOperation.cancel" @click="orderCancel" type="warning" ghost>订单取消</Button> v-if="allowOperation.editConsignee"
<Button v-if="orderInfo.order.orderStatus === 'UNPAID'" @click="confirmPrice" type="primary"></Button> @click="editAddress"
type="primary"
ghost
>修改收货地址</Button
>
<Button v-if="allowOperation.cancel" @click="orderCancel" type="warning" ghost
>订单取消</Button
>
<Button
v-if="orderInfo.order.orderStatus === 'UNPAID'"
@click="confirmPrice"
type="primary"
>收款</Button
>
<Button @click="orderLog" type="info" ghost>订单日志</Button> <Button @click="orderLog" type="info" ghost>订单日志</Button>
</div> </div>
</Card> </Card>
@ -45,21 +58,30 @@
<div class="div-item" v-if="orderInfo.order.needReceipt == true"> <div class="div-item" v-if="orderInfo.order.needReceipt == true">
<div class="div-item-left">发票抬头</div> <div class="div-item-left">发票抬头</div>
<div class="div-item-right">{{ <div class="div-item-right">
orderInfo.receipt.receiptTitle ? orderInfo.receipt.receiptTitle : '暂无' {{
orderInfo.receipt.receiptTitle ? orderInfo.receipt.receiptTitle : "暂无"
}} }}
</div> </div>
</div> </div>
<div class="div-item" v-if="orderInfo.order.needReceipt == true && orderInfo.receipt.taxpayerId"> <div
class="div-item"
v-if="orderInfo.order.needReceipt == true && orderInfo.receipt.taxpayerId"
>
<div class="div-item-left">发票税号</div> <div class="div-item-left">发票税号</div>
<div class="div-item-right">{{ orderInfo.receipt.taxpayerId ? orderInfo.receipt.taxpayerId : '暂无' }}</div> <div class="div-item-right">
{{ orderInfo.receipt.taxpayerId ? orderInfo.receipt.taxpayerId : "暂无" }}
</div>
</div> </div>
<div class="div-item" v-if="orderInfo.order.needReceipt == true"> <div class="div-item" v-if="orderInfo.order.needReceipt == true">
<div class="div-item-left">发票内容</div> <div class="div-item-left">发票内容</div>
<div class="div-item-right">{{ <div class="div-item-right">
orderInfo.receipt.receiptContent ? orderInfo.receipt.receiptContent : '暂无' {{
orderInfo.receipt.receiptContent
? orderInfo.receipt.receiptContent
: "暂无"
}} }}
</div> </div>
</div> </div>
@ -67,13 +89,19 @@
<div class="div-item" v-if="orderInfo.order.needReceipt == true"> <div class="div-item" v-if="orderInfo.order.needReceipt == true">
<div class="div-item-left">发票金额</div> <div class="div-item-left">发票金额</div>
<div class="div-item-right"> <div class="div-item-right">
{{ orderInfo.receipt.receiptPrice ? orderInfo.receipt.receiptPrice : '暂无' | unitPrice('¥') }} {{
orderInfo.receipt.receiptPrice
? orderInfo.receipt.receiptPrice
: "暂无" | unitPrice("¥")
}}
</div> </div>
</div> </div>
<div class="div-item" v-if="orderInfo.order.needReceipt == true"> <div class="div-item" v-if="orderInfo.order.needReceipt == true">
<div class="div-item-left">是否开票</div> <div class="div-item-left">是否开票</div>
<div class="div-item-right">{{ orderInfo.receipt.receiptStatus == 0 ? '未开' : '已开' }}</div> <div class="div-item-right">
{{ orderInfo.receipt.receiptStatus == 0 ? "未开" : "已开" }}
</div>
</div> </div>
</div> </div>
<div style="width: 36%; float: left"> <div style="width: 36%; float: left">
@ -105,21 +133,30 @@
<div class="div-item" v-if="orderInfo.order.needReceipt == true"> <div class="div-item" v-if="orderInfo.order.needReceipt == true">
<div class="div-item-left">发票抬头</div> <div class="div-item-left">发票抬头</div>
<div class="div-item-right">{{ <div class="div-item-right">
orderInfo.receipt.receiptTitle ? orderInfo.receipt.receiptTitle : '暂无' {{
orderInfo.receipt.receiptTitle ? orderInfo.receipt.receiptTitle : "暂无"
}} }}
</div> </div>
</div> </div>
<div class="div-item" v-if="orderInfo.order.needReceipt == true && orderInfo.receipt.taxpayerId"> <div
class="div-item"
v-if="orderInfo.order.needReceipt == true && orderInfo.receipt.taxpayerId"
>
<div class="div-item-left">发票税号</div> <div class="div-item-left">发票税号</div>
<div class="div-item-right">{{ orderInfo.receipt.taxpayerId ? orderInfo.receipt.taxpayerId : '暂无' }}</div> <div class="div-item-right">
{{ orderInfo.receipt.taxpayerId ? orderInfo.receipt.taxpayerId : "暂无" }}
</div>
</div> </div>
<div class="div-item" v-if="orderInfo.order.needReceipt == true"> <div class="div-item" v-if="orderInfo.order.needReceipt == true">
<div class="div-item-left">发票内容</div> <div class="div-item-left">发票内容</div>
<div class="div-item-right">{{ <div class="div-item-right">
orderInfo.receipt.receiptContent ? orderInfo.receipt.receiptContent : '暂无' {{
orderInfo.receipt.receiptContent
? orderInfo.receipt.receiptContent
: "暂无"
}} }}
</div> </div>
</div> </div>
@ -127,13 +164,19 @@
<div class="div-item" v-if="orderInfo.order.needReceipt == true"> <div class="div-item" v-if="orderInfo.order.needReceipt == true">
<div class="div-item-left">发票金额</div> <div class="div-item-left">发票金额</div>
<div class="div-item-right"> <div class="div-item-right">
{{ orderInfo.receipt.receiptPrice ? orderInfo.receipt.receiptPrice : '暂无' | unitPrice('¥') }} {{
orderInfo.receipt.receiptPrice
? orderInfo.receipt.receiptPrice
: "暂无" | unitPrice("¥")
}}
</div> </div>
</div> </div>
<div class="div-item" v-if="orderInfo.order.needReceipt == true"> <div class="div-item" v-if="orderInfo.order.needReceipt == true">
<div class="div-item-left">是否开票</div> <div class="div-item-left">是否开票</div>
<div class="div-item-right">{{ orderInfo.receipt.receiptStatus == 0 ? '未开' : '已开' }}</div> <div class="div-item-right">
{{ orderInfo.receipt.receiptStatus == 0 ? "未开" : "已开" }}
</div>
</div> </div>
<div class="div-item"> <div class="div-item">
@ -145,12 +188,22 @@
</div> </div>
</Card> </Card>
<Card class="mt_10"> <Card class="mt_10">
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"> <Table
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
sortable="custom"
>
<!-- 商品栏目格式化 --> <!-- 商品栏目格式化 -->
<template slot="goodsSlot" slot-scope="{ row }"> <template slot="goodsSlot" slot-scope="{ row }">
<div style="margin-top: 5px; height: 80px; display: flex"> <div style="margin-top: 5px; height: 80px; display: flex">
<div style=""> <div style="">
<img :src="row.image" style="height: 60px; margin-top: 1px; width: 60px" /> <img
:src="row.image"
style="height: 60px; margin-top: 1px; width: 60px"
/>
</div> </div>
<div style="margin-left: 13px"> <div style="margin-left: 13px">
@ -158,16 +211,32 @@
<a @click="linkTo(row.goodsId, row.skuId)">{{ row.goodsName }}</a> <a @click="linkTo(row.goodsId, row.skuId)">{{ row.goodsName }}</a>
</div> </div>
<span v-for="(item, key) in JSON.parse(row.specs)" :key="key"> <span v-for="(item, key) in JSON.parse(row.specs)" :key="key">
<span v-show="key!='images'" style="font-size: 12px;color: #999999;"> <span v-show="key != 'images'" style="font-size: 12px; color: #999999">
{{ key }} : {{ item }} {{ key }} : {{ item }}
</span> </span>
</span> </span>
<Poptip trigger="hover" style="display: block;" title="扫码在手机中查看" transfer> <Poptip
trigger="hover"
style="display: block"
title="扫码在手机中查看"
transfer
>
<div slot="content"> <div slot="content">
<vue-qr :text="wapLinkTo(row.goodsId,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" <vue-qr
:size="150"></vue-qr> :text="wapLinkTo(row.goodsId, row.skuId)"
:margin="0"
colorDark="#000"
colorLight="#fff"
:size="150"
></vue-qr>
</div> </div>
<img src="../../../assets/qrcode.svg" class="hover-pointer" width="20" height="20" alt=""> <img
src="../../../assets/qrcode.svg"
class="hover-pointer"
width="20"
height="20"
alt=""
/>
</Poptip> </Poptip>
</div> </div>
</div> </div>
@ -177,32 +246,56 @@
<ul> <ul>
<li> <li>
<span class="label">商品总额</span> <span class="label">商品总额</span>
<span class="txt">{{ orderInfo.order.priceDetailDTO.goodsPrice | unitPrice('¥') }}</span> <span class="txt">{{
orderInfo.order.priceDetailDTO.goodsPrice | unitPrice("¥")
}}</span>
</li> </li>
<li v-if="orderInfo.order.priceDetailDTO.discountPrice && orderInfo.order.priceDetailDTO.discountPrice > 0"> <li
v-if="
orderInfo.order.priceDetailDTO.discountPrice &&
orderInfo.order.priceDetailDTO.discountPrice > 0
"
>
<span class="label">优惠金额</span> <span class="label">优惠金额</span>
<span class="txt"> {{ orderInfo.order.priceDetailDTO.discountPrice | unitPrice('¥') }} </span> <span class="txt">
{{ orderInfo.order.priceDetailDTO.discountPrice | unitPrice("¥") }}
</span>
</li> </li>
<li v-if="orderInfo.order.priceDetailDTO.couponPrice && orderInfo.order.priceDetailDTO.couponPrice > 0"> <li
v-if="
orderInfo.order.priceDetailDTO.couponPrice &&
orderInfo.order.priceDetailDTO.couponPrice > 0
"
>
<span class="label">优惠券金额</span> <span class="label">优惠券金额</span>
<span class="txt"> {{ orderInfo.order.priceDetailDTO.couponPrice | unitPrice('¥') }} </span> <span class="txt">
{{ orderInfo.order.priceDetailDTO.couponPrice | unitPrice("¥") }}
</span>
</li> </li>
<li> <li>
<span class="label">运费</span> <span class="label">运费</span>
<span class="txt">{{ orderInfo.order.freightPrice | unitPrice('¥') }}</span> <span class="txt">{{
orderInfo.order.freightPrice | unitPrice("¥")
}}</span>
</li> </li>
<li v-if="orderInfo.order.priceDetailDTO.updatePrice"> <li v-if="orderInfo.order.priceDetailDTO.updatePrice">
<span class="label">修改金额</span> <span class="label">修改金额</span>
<span class="txt theme_color">¥{{ orderInfo.order.priceDetailDTO.updatePrice | unitPrice }}</span> <span class="txt theme_color"
>¥{{ orderInfo.order.priceDetailDTO.updatePrice | unitPrice }}</span
>
</li> </li>
<li v-if="orderInfo.order.priceDetailDTO.payPoint != 0"> <li v-if="orderInfo.order.priceDetailDTO.payPoint != 0">
<span class="label">使用积分</span> <span class="label">使用积分</span>
<span class="txt flowPrice">{{ orderInfo.order.priceDetailDTO.payPoint }}</span> <span class="txt flowPrice">{{
orderInfo.order.priceDetailDTO.payPoint
}}</span>
</li> </li>
<li> <li>
<span class="label">应付金额</span> <span class="label">应付金额</span>
<span class="txt flowPrice">¥{{ orderInfo.order.priceDetailDTO.flowPrice | unitPrice }}</span> <span class="txt flowPrice"
>¥{{ orderInfo.order.priceDetailDTO.flowPrice | unitPrice }}</span
>
</li> </li>
</ul> </ul>
</div> </div>
@ -215,10 +308,20 @@
<span>修改金额</span> <span>修改金额</span>
</p> </p>
<div> <div>
<Form ref="modifyPriceForm" :model="modifyPriceForm" label-position="left" :label-width="70" <Form
:rules="modifyPriceValidate"> ref="modifyPriceForm"
:model="modifyPriceForm"
label-position="left"
:label-width="70"
:rules="modifyPriceValidate"
>
<FormItem label="订单金额" prop="price"> <FormItem label="订单金额" prop="price">
<InputNumber style="width:100px;" v-model="modifyPriceForm.price" :min="0" :max="999999"></InputNumber> <InputNumber
style="width: 100px"
v-model="modifyPriceForm.price"
:min="0"
:max="999999"
></InputNumber>
<span class="ml_10"></span> <span class="ml_10"></span>
</FormItem> </FormItem>
</Form> </Form>
@ -235,11 +338,20 @@
<span>订单取消</span> <span>订单取消</span>
</p> </p>
<div> <div>
<Form ref="orderCancelForm" :model="orderCancelForm" label-position="left" :label-width="100" <Form
:rules="orderCancelValidate"> ref="orderCancelForm"
:model="orderCancelForm"
label-position="left"
:label-width="100"
:rules="orderCancelValidate"
>
<FormItem label="取消原因" prop="reason"> <FormItem label="取消原因" prop="reason">
<Input v-model="orderCancelForm.reason" type="textarea" :autosize="{ minRows: 2, maxRows: 5 }" <Input
placeholder="请输入取消原因"></Input> v-model="orderCancelForm.reason"
type="textarea"
:autosize="{ minRows: 2, maxRows: 5 }"
placeholder="请输入取消原因"
></Input>
</FormItem> </FormItem>
</Form> </Form>
</div> </div>
@ -255,22 +367,55 @@
<span>修改收件信息</span> <span>修改收件信息</span>
</p> </p>
<div> <div>
<Form ref="addressForm" :model="addressForm" label-position="left" :label-width="100" :rules="addressRule"> <Form
ref="addressForm"
:model="addressForm"
label-position="left"
:label-width="100"
:rules="addressRule"
>
<FormItem label="收件人" prop="consigneeName"> <FormItem label="收件人" prop="consigneeName">
<Input v-model="addressForm.consigneeName" size="large" maxlength="20"></Input> <Input
v-model="addressForm.consigneeName"
size="large"
maxlength="20"
></Input>
</FormItem> </FormItem>
<FormItem label="联系方式" prop="consigneeMobile"> <FormItem label="联系方式" prop="consigneeMobile">
<Input v-model="addressForm.consigneeMobile" size="large" maxlength="11"></Input> <Input
v-model="addressForm.consigneeMobile"
size="large"
maxlength="11"
></Input>
</FormItem> </FormItem>
<FormItem label="地址信息" prop="consigneeAddressPath"> <FormItem label="地址信息" prop="consigneeAddressPath">
<Input v-model="addr" disabled style="width: 305px" v-if="showRegion == false" /> <Input
<Button v-if="showRegion == false" @click="regionClick" :loading="submitLoading" type="primary" v-model="addr"
icon="ios-create-outline" style="margin-left: 8px">修改 disabled
style="width: 305px"
v-if="showRegion == false"
/>
<Button
v-if="showRegion == false"
@click="regionClick"
:loading="submitLoading"
type="primary"
icon="ios-create-outline"
style="margin-left: 8px"
>修改
</Button> </Button>
<region style="width: 400px" @selected="selectedRegion" v-if="showRegion == true" /> <region
style="width: 400px"
@selected="selectedRegion"
v-if="showRegion == true"
/>
</FormItem> </FormItem>
<FormItem label="详细地址" prop="consigneeDetail"> <FormItem label="详细地址" prop="consigneeDetail">
<Input v-model="addressForm.consigneeDetail" size="large" maxlength="50"></Input> <Input
v-model="addressForm.consigneeDetail"
size="large"
maxlength="50"
></Input>
</FormItem> </FormItem>
</Form> </Form>
</div> </div>
@ -285,8 +430,14 @@
<span>订单日志</span> <span>订单日志</span>
</p> </p>
<div class="order-log-div"> <div class="order-log-div">
<Table :loading="loading" border :columns="orderLogColumns" :data="orderInfo.orderLogs" ref="table" <Table
sortable="custom"></Table> :loading="loading"
border
:columns="orderLogColumns"
:data="orderInfo.orderLogs"
ref="table"
sortable="custom"
></Table>
</div> </div>
<div slot="footer" style="text-align: right"> <div slot="footer" style="text-align: right">
@ -359,9 +510,7 @@ export default {
// //
orderCancelValidate: { orderCancelValidate: {
reason: [ reason: [{ required: true, message: "取消原因不能为空", trigger: "blur" }],
{ required: true, message: "取消原因不能为空", trigger: "blur" },
],
}, },
addressModal: false, // addressModal: false, //
// //
@ -373,12 +522,8 @@ export default {
consigneeAddressIdPath: "", consigneeAddressIdPath: "",
}, },
orderDeliverFormValidate: { orderDeliverFormValidate: {
logisticsNo: [ logisticsNo: [{ required: true, message: "发货单号不能为空", trigger: "change" }],
{ required: true, message: "发货单号不能为空", trigger: "change" }, logisticsId: [{ required: true, message: "请选择物流公司", trigger: "blur" }],
],
logisticsId: [
{ required: true, message: "请选择物流公司", trigger: "blur" },
],
}, },
addressRule: { addressRule: {
consigneeName: [ consigneeName: [
@ -442,10 +587,7 @@ export default {
if (!params.row.goodsPrice) { if (!params.row.goodsPrice) {
return h("div", this.$options.filters.unitPrice(0, "¥")); return h("div", this.$options.filters.unitPrice(0, "¥"));
} }
return h( return h("div", this.$options.filters.unitPrice(params.row.goodsPrice, "¥"));
"div",
this.$options.filters.unitPrice(params.row.goodsPrice, "¥")
);
}, },
}, },
@ -459,10 +601,7 @@ export default {
key: "flowPrice", key: "flowPrice",
minWidth: 100, minWidth: 100,
render: (h, params) => { render: (h, params) => {
return h( return h("div", this.$options.filters.unitPrice(params.row.flowPrice, "¥"));
"div",
this.$options.filters.unitPrice(params.row.flowPrice, "¥")
);
}, },
}, },
], ],
@ -542,15 +681,13 @@ export default {
modifyPriceSubmit() { modifyPriceSubmit() {
this.$refs.modifyPriceForm.validate((valid) => { this.$refs.modifyPriceForm.validate((valid) => {
if (valid) { if (valid) {
API_Order.updateOrderPrice(this.sn, this.modifyPriceForm).then( API_Order.updateOrderPrice(this.sn, this.modifyPriceForm).then((res) => {
(res) => {
if (res.success) { if (res.success) {
this.$Message.success("修改订单金额成功"); this.$Message.success("修改订单金额成功");
this.modal = false; this.modal = false;
this.getDataList(); this.getDataList();
} }
} });
);
} }
}); });
}, },
@ -594,10 +731,8 @@ export default {
this.addressForm.consigneeName = this.orderInfo.order.consigneeName; this.addressForm.consigneeName = this.orderInfo.order.consigneeName;
this.addressForm.consigneeMobile = this.orderInfo.order.consigneeMobile; this.addressForm.consigneeMobile = this.orderInfo.order.consigneeMobile;
this.addressForm.consigneeDetail = this.orderInfo.order.consigneeDetail; this.addressForm.consigneeDetail = this.orderInfo.order.consigneeDetail;
this.addressForm.consigneeAddressPath = this.addressForm.consigneeAddressPath = this.orderInfo.order.consigneeAddressPath;
this.orderInfo.order.consigneeAddressPath; this.addressForm.consigneeAddressIdPath = this.orderInfo.order.consigneeAddressIdPath;
this.addressForm.consigneeAddressIdPath =
this.orderInfo.order.consigneeAddressIdPath;
}, },
// //
editAddressSubmit() { editAddressSubmit() {
@ -609,15 +744,13 @@ export default {
this.addressForm.consigneeAddressIdPath = this.regionId; this.addressForm.consigneeAddressIdPath = this.regionId;
this.$refs.addressForm.validate((valid) => { this.$refs.addressForm.validate((valid) => {
if (valid) { if (valid) {
API_Order.editOrderConsignee(this.sn, this.addressForm).then( API_Order.editOrderConsignee(this.sn, this.addressForm).then((res) => {
(res) => {
if (res.success) { if (res.success) {
this.$Message.success("收货地址修改成功"); this.$Message.success("收货地址修改成功");
this.addressModal = false; this.addressModal = false;
this.getDataList(); this.getDataList();
} }
} });
);
} }
}); });
}, },
@ -657,7 +790,6 @@ export default {
margin-bottom: 2vh; margin-bottom: 2vh;
} }
.select-clear { .select-clear {
margin-left: 10px; margin-left: 10px;
} }

View File

@ -121,8 +121,7 @@ export default {
// //
formValidate: { formValidate: {
articleCategoryName:[ articleCategoryName:[
regular.REQUIRED, regular.REQUIRED
regular.VARCHAR20,
], ],
sort:[ sort:[
regular.REQUIRED, regular.REQUIRED,

View File

@ -42,12 +42,7 @@
/> />
</template> </template>
<template slot-scope="{ row, index }" slot="action"> <template slot-scope="{ row, index }" slot="action">
<Button <Button type="error" size="small" @click="delGoods(index, row)">删除 </Button>
type="error"
size="small"
@click="delGoods(index,row)"
>删除
</Button>
</template> </template>
</Table> </Table>
<Row type="flex" justify="end" class="mt_10"> <Row type="flex" justify="end" class="mt_10">
@ -72,7 +67,7 @@
seckillGoodsList, seckillGoodsList,
seckillDetail, seckillDetail,
auditApplySeckill, auditApplySeckill,
delSeckillGoods delSeckillGoods,
} from "@/api/promotion.js"; } from "@/api/promotion.js";
export default { export default {
@ -86,13 +81,14 @@
searchForm: { searchForm: {
// //
pageNumber: 0, // pageNumber: 0, //
pageSize: 100, // pageSize: 10, //
}, },
total: 0, // total: 0, //
selectList: [], // selectList: [], //
selectCount: 0, // selectCount: 0, //
data: [], // data: [], //
columns: [ // columns: [
//
{ {
title: "活动名称", title: "活动名称",
key: "promotionName", key: "promotionName",
@ -156,12 +152,13 @@
}, },
}, },
], ],
goodsColumns: [ // goodsColumns: [
//
{ {
title: "商品名称", title: "商品名称",
key: "goodsName", key: "goodsName",
minWidth: 120, minWidth: 120,
tooltip: true tooltip: true,
}, },
{ {
title: "商品价格", title: "商品价格",
@ -172,7 +169,7 @@
title: "库存", title: "库存",
slot: "quantity", slot: "quantity",
minWidth: 30, minWidth: 30,
width: 90 width: 90,
}, },
{ {
title: "活动价格", title: "活动价格",
@ -183,8 +180,7 @@
title: "商家名称", title: "商家名称",
key: "storeName", key: "storeName",
minWidth: 100, minWidth: 100,
tooltip: true tooltip: true,
}, },
{ {
title: "活动场次", title: "活动场次",
@ -204,13 +200,15 @@
}, },
], ],
goodsList: [], // goodsList: [], //
params: { // params: {
//
seckillId: this.$route.query.id, seckillId: this.$route.query.id,
applyStatus: "PASS", applyStatus: "PASS",
failReason: "", failReason: "",
ids: "", ids: "",
}, },
rules: { // rules: {
//
failReason: [{ required: true, message: "请输入拒绝原因" }], failReason: [{ required: true, message: "请输入拒绝原因" }],
}, },
}; };
@ -269,14 +267,14 @@
onOk: () => { onOk: () => {
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.splice(index, 1); this.goodsList.splice(index, 1);
this.$Message.success("删除成功!"); this.$Message.success("删除成功!");
} }
}) });
}, },
}); });
}, },
@ -291,7 +289,7 @@
hourArr[i] += ":00"; hourArr[i] += ":00";
} }
return hourArr; return hourArr;
} },
}, },
mounted() { mounted() {
this.init(); this.init();

View File

@ -1,8 +1,13 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Form
ref="searchForm"
:model="searchForm"
inline
:label-width="70"
class="search-form"
>
<Form-item label="搜索日志" prop="searchKey"> <Form-item label="搜索日志" prop="searchKey">
<Input <Input
type="text" type="text"
@ -32,20 +37,21 @@
style="width: 200px" style="width: 200px"
></DatePicker> ></DatePicker>
</Form-item> </Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button> <Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn"
>搜索</Button
>
</Form> </Form>
<Row class="operation padding-row"> <Row class="operation padding-row">
<Button @click="getLogList" icon="md-refresh">刷新</Button> <Button @click="getLogList" icon="md-refresh">刷新</Button>
<Button type="dashed" @click="openTip=!openTip">{{openTip ? "" : ""}}</Button> <Button type="dashed" @click="openTip = !openTip">{{
openTip ? "关闭提示" : "开启提示"
}}</Button>
</Row> </Row>
<Row v-show="openTip"> <Row v-show="openTip">
<Alert show-icon> <Alert show-icon>
<span>展示详细内容</span> <span>展示详细内容</span>
<Icon type="ios-bulb-outline" slot="icon"></Icon> <Icon type="ios-bulb-outline" slot="icon"></Icon>
<i-switch <i-switch size="large" v-model="showDev">
size="large"
v-model="showDev"
>
<span slot="open">开发</span> <span slot="open">开发</span>
<span slot="close">普通</span> <span slot="close">普通</span>
</i-switch> </i-switch>
@ -83,7 +89,6 @@
:page-size-opts="[10, 20, 50]" :page-size-opts="[10, 20, 50]"
size="small" size="small"
show-totalzx show-totalzx
show-elevator show-elevator
show-sizer show-sizer
></Page> ></Page>
@ -103,25 +108,27 @@
loading: true, // loading: true, //
selectDate: null, // selectDate: null, //
showDev: false, // showDev: false, //
searchForm: { // searchForm: {
//
type: 1, type: 1,
key: '', key: "",
operatorName: '', operatorName: "",
pageNumber: 1, pageNumber: 1,
pageSize: 10, pageSize: 10,
startDate: "", startDate: "",
endDate: "", endDate: "",
sort: "createTime", sort: "createTime",
order: "desc" order: "desc",
}, },
columns: [ // columns: [
//
{ {
title: "操作名称", title: "操作名称",
key: "name", key: "name",
width: 150, width: 150,
fixed: "left", fixed: "left",
ellipsis: false, ellipsis: false,
tooltip: true tooltip: true,
}, },
{ {
title: "日志内容", title: "日志内容",
@ -129,21 +136,21 @@
minWidth: 200, minWidth: 200,
fixed: "left", fixed: "left",
ellipsis: false, ellipsis: false,
tooltip: true tooltip: true,
}, },
{ {
title: "操作用户", title: "操作用户",
minWidth: 115, minWidth: 115,
key: "username", key: "username",
width: 120, width: 120,
tooltip: true tooltip: true,
}, },
{ {
title: "操作时间", title: "操作时间",
key: "createTime", key: "createTime",
align: "center", align: "center",
width: 170 width: 170,
} },
], ],
columns_dev: [ columns_dev: [
{ {
@ -152,7 +159,7 @@
minWidth: 100, minWidth: 100,
fixed: "left", fixed: "left",
ellipsis: false, ellipsis: false,
tooltip: true tooltip: true,
}, },
{ {
title: "日志内容", title: "日志内容",
@ -170,7 +177,7 @@
{ {
title: "IP", title: "IP",
key: "ip", key: "ip",
width: 150 width: 150,
}, },
{ {
title: "IP信息", title: "IP信息",
@ -184,7 +191,7 @@
width: 150, width: 150,
ellipsis: false, ellipsis: false,
tooltip: true, tooltip: true,
key: "requestUrl" key: "requestUrl",
}, },
{ {
title: "请求类型", title: "请求类型",
@ -194,20 +201,20 @@
filters: [ filters: [
{ {
label: "GET", label: "GET",
value: "GET" value: "GET",
}, },
{ {
label: "POST", label: "POST",
value: "POST" value: "POST",
}, },
{ {
label: "PUT", label: "PUT",
value: "PUT" value: "PUT",
}, },
{ {
label: "DELETE", label: "DELETE",
value: "DELETE" value: "DELETE",
} },
], ],
filterMultiple: false, filterMultiple: false,
filterMethod(value, row) { filterMethod(value, row) {
@ -220,14 +227,14 @@
} else if (value == "DELETE") { } else if (value == "DELETE") {
return row.requestType == "DELETE"; return row.requestType == "DELETE";
} }
} },
}, },
{ {
title: "请求参数", title: "请求参数",
minWidth: 100, minWidth: 100,
key: "requestParam", key: "requestParam",
ellipsis: false, ellipsis: false,
tooltip: true tooltip: true,
}, },
{ {
title: "耗时-毫秒", title: "耗时-毫秒",
@ -237,16 +244,16 @@
filters: [ filters: [
{ {
label: "≤300毫秒", label: "≤300毫秒",
value: 0 value: 0,
}, },
{ {
label: "300毫秒<x<1000毫秒", label: "300毫秒<x<1000毫秒",
value: 0.3 value: 0.3,
}, },
{ {
label: ">1000毫秒", label: ">1000毫秒",
value: 1 value: 1,
} },
], ],
filterMultiple: false, filterMultiple: false,
filterMethod(value, row) { filterMethod(value, row) {
@ -257,18 +264,18 @@
} else { } else {
return row.costTime > 1000; return row.costTime > 1000;
} }
} },
}, },
{ {
title: "操作时间", title: "操作时间",
key: "createTime", key: "createTime",
align: "center", align: "center",
width: 170, width: 170,
sortType: "desc" sortType: "desc",
} },
], ],
data: [], // data: [], //
total: 0 // total: 0, //
}; };
}, },
methods: { methods: {
@ -302,17 +309,17 @@
// //
getLogList() { getLogList() {
this.loading = true; this.loading = true;
getLogListData(this.searchForm).then(res => { getLogListData(this.searchForm).then((res) => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
this.data = res.result.records; this.data = res.result.records;
this.total = res.result.total; this.total = res.result.total;
} }
}); });
} },
}, },
mounted() { mounted() {
this.init(); this.init();
} },
}; };
</script> </script>

View File

@ -47,7 +47,7 @@
<div> <div>
<Upload <Upload
style="display:inline-block;" style="display:inline-block;"
:action="commonUrl + '/common/upload/file'" :action="commonUrl + '/common/common/upload/file'"
:headers="accessToken" :headers="accessToken"
:on-success="handleSuccess" :on-success="handleSuccess"
:on-error="handleError" :on-error="handleError"

View File

@ -1,6 +1,12 @@
<template> <template>
<div class="layout"> <div class="layout">
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate"> <Form
ref="formValidate"
:label-width="150"
label-position="right"
:model="formValidate"
:rules="ruleValidate"
>
<FormItem label="appId" prop="appId"> <FormItem label="appId" prop="appId">
<Input class="w200" v-model="formValidate.appId" /> <Input class="w200" v-model="formValidate.appId" />
<p style="color: red">*APP应用 AppID 非必填</p> <p style="color: red">*APP应用 AppID 非必填</p>
@ -34,7 +40,6 @@
</FormItem> </FormItem>
<div class="label-btns"> <div class="label-btns">
<Button type="primary" @click="submit('formValidate')"></Button> <Button type="primary" @click="submit('formValidate')"></Button>
</div> </div>
</Form> </Form>
</div> </div>
@ -48,7 +53,6 @@ export default {
return { return {
ruleValidate: {}, // ruleValidate: {}, //
formValidate: {}, // formValidate: {}, //
}; };
}, },
props: ["res", "type"], props: ["res", "type"],
@ -79,7 +83,6 @@ export default {
this.$set(this, "formValidate", { ...this.res }); this.$set(this, "formValidate", { ...this.res });
Object.keys(this.formValidate).forEach((item) => { Object.keys(this.formValidate).forEach((item) => {
if (item.indexOf("pId") < 0) { if (item.indexOf("pId") < 0) {
this.ruleValidate[item] = [ this.ruleValidate[item] = [
{ {
required: true, required: true,
@ -87,7 +90,6 @@ export default {
trigger: "blur", trigger: "blur",
}, },
]; ];
} }
}); });
}, },

View File

@ -1,10 +1,17 @@
<template> <template>
<div class="layout"> <div class="layout">
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate"> <Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
<FormItem label="积分比率" prop="money"> <FormItem label="消费1元赠送积分" prop="money">
<Input type="number" v-model="formValidate.money"> <Input type="number" v-model="formValidate.money">
<span slot="prepend">1积分=</span> <span slot="append">积分</span>
<span slot="append">人民币</span> <!-- <span slot="append">人民币</span>-->
</Input>
</FormItem>
<FormItem label="积分抵扣付款" prop="money">
<Input type="number" v-model="formValidate.money">
<span slot="prepend">积分</span>
<span slot="append"> = 1 人民币</span>
</Input> </Input>
</FormItem> </FormItem>
@ -35,7 +42,8 @@
</FormItem> </FormItem>
<FormItem class="label-item" v-for="(point,index) in formValidate.pointSettingItems" :key="index" :label="'签到设置'+(index+1)"> <FormItem class="label-item" v-for="(point,index) in formValidate.pointSettingItems" :key="index"
:label="'签到设置'+(index+1)">
<div class="label-item"> <div class="label-item">
<InputNumber :min="1" v-model="point.day"></InputNumber> <InputNumber :min="1" v-model="point.day"></InputNumber>
@ -43,7 +51,8 @@
<InputNumber :min="0" v-model="point.point"></InputNumber> <InputNumber :min="0" v-model="point.point"></InputNumber>
<Button ghost type="error" @click="delSign(point,index)"></Button> <Button ghost type="error" @click="delSign(point,index)"></Button>
<span class="ml_10">签到<span class="theme_color">{{point.day}}</span>赠送<span class="theme_color">{{point.point}}</span>积分</span> <span class="ml_10">签到<span class="theme_color">{{ point.day }}</span>赠送<span
class="theme_color">{{ point.point }}</span>积分</span>
</div> </div>
</FormItem> </FormItem>
@ -60,6 +69,7 @@
<script> <script>
import {setSetting} from "@/api/index"; import {setSetting} from "@/api/index";
import {handleSubmit} from "./validate"; import {handleSubmit} from "./validate";
export default { export default {
data() { data() {
return { return {
@ -150,22 +160,27 @@ export default {
width: 100px; width: 100px;
margin-right: 5px; margin-right: 5px;
} }
> .ivu-input-number:nth-last-of-type(1) { > .ivu-input-number:nth-last-of-type(1) {
width: 150px; width: 150px;
margin-right: 5px; margin-right: 5px;
} }
> .ivu-input { > .ivu-input {
width: 100px; width: 100px;
margin: 0 10px; margin: 0 10px;
} }
} }
/deep/ .ivu-input { /deep/ .ivu-input {
width: 70px !important; width: 70px !important;
} }
.ivu-input-wrapper { .ivu-input-wrapper {
width: 70px; width: 70px;
margin-right: 10px; margin-right: 10px;
} }
.label-btns { .label-btns {
/deep/ .ivu-btn { /deep/ .ivu-btn {
margin-right: 10px; margin-right: 10px;

View File

@ -1 +1 @@
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/seller-ui:4.2.2.1 . docker build -t registry.cn-beijing.aliyuncs.com/lili-images/seller-ui:4.3.0.1 .

View File

@ -3,10 +3,10 @@ var BASE = {
* @description api请求基础路径 * @description api请求基础路径
*/ */
API_DEV: { API_DEV: {
common: "https://common-api.pickmall.cn", seller: "http://127.0.0.1:8889",
buyer: "https://buyer-api.pickmall.cn", manager: "http://127.0.0.1:8887",
seller: "https://store-api.pickmall.cn", buyer: "http://127.0.0.1:8888",
manager: "https://admin-api.pickmall.cn" common: "http://127.0.0.1:8890",
}, },
API_PROD: { API_PROD: {
common: "https://common-api.pickmall.cn", common: "https://common-api.pickmall.cn",

View File

@ -2,10 +2,10 @@ import {commonUrl, getRequest} from '@/libs/axios';
// 通过id获取子地区 // 通过id获取子地区
export const getChildRegion = (id) => { export const getChildRegion = (id) => {
return getRequest(`${commonUrl}/common/region/item/${id}`); return getRequest(`${commonUrl}/common/common/region/item/${id}`);
}; };
// 点地图获取地址信息 // 点地图获取地址信息
export const getRegion = (params) => { export const getRegion = (params) => {
return getRequest(`${commonUrl}/common/region/region`, params); return getRequest(`${commonUrl}/common/common/region/region`, params);
}; };

View File

@ -5,17 +5,17 @@ import {getRequest, postRequest, putRequest, deleteRequest, importRequest, getRe
//获取分销商品列表 //获取分销商品列表
export const getDistributionGoods = (params) => { export const getDistributionGoods = (params) => {
return getRequest('/distributionGoods', params) return getRequest('/distribution/goods', params)
} }
// 取消分销商品 // 取消分销商品
export const distributionGoodsCancel = (id) => { export const distributionGoodsCancel = (id) => {
return deleteRequest(`/distributionGoods/cancel/${id}`) return deleteRequest(`/distribution/goods/cancel/${id}`)
} }
// 选择分销商品 // 选择分销商品
export const distributionGoodsCheck = (id,param) => { export const distributionGoodsCheck = (id,param) => {
return putRequest(`/distributionGoods/checked/${id}`,param) return putRequest(`/distribution/goods/checked/${id}`,param)
} }
@ -51,7 +51,7 @@ export const getDistributionSetting = (id, params) => {
//获取分销订单列表 //获取分销订单列表
export const getDistributionOrder = (params) => { export const getDistributionOrder = (params) => {
return getRequest('/distributionOrder', params) return getRequest('/distribution/order', params)
} }

View File

@ -35,12 +35,12 @@ export const delCategdelShopGoodsLabel = id => {
// 根据goodsId分页获取商品列表 // 根据goodsId分页获取商品列表
export const getQueryGoodsIdGoodsList = goodsId => { export const getQueryGoodsIdGoodsList = goodsId => {
return getRequest(`/goods/sku/${goodsId}/list`); return getRequest(`/goods/goods/sku/${goodsId}/list`);
}; };
// 获取商品分页列表 // 获取商品分页列表
export const getGoodsSkuListDataSeller = params => { export const getGoodsSkuListDataSeller = params => {
return getRequest("/goods/sku/list", params); return getRequest("/goods/goods/sku/list", params);
}; };
// 获取商品品牌分页列表 // 获取商品品牌分页列表
@ -69,7 +69,7 @@ export const saveCategoryBrand = (category_id, params) => {
}; };
//保存获取关联规格 //保存获取关联规格
export const saveCategorySpec = (category_id, params) => { export const saveCategorySpec = (category_id, params) => {
return postRequest(`/goods/category/spec/${category_id}`, params); return postRequest(`/goods/categorySpec/${category_id}`, params);
}; };
//获取所有可用品牌 //获取所有可用品牌
@ -117,7 +117,7 @@ export const insertOrUpdateSpec = params => {
}; };
//根据分类id获取关联规格 //根据分类id获取关联规格
export const getCategorySpecListData = (category_id, params) => { export const getCategorySpecListData = (category_id, params) => {
return getRequest(`/goods/category/spec/${category_id}`, params); return getRequest(`/goods/categorySpec/${category_id}`, params);
}; };
//删除gUI个 //删除gUI个
export const delSpec = (id, params) => { export const delSpec = (id, params) => {
@ -139,12 +139,12 @@ export const getGoodsCategory = parent_id => {
// 获取商品sku分页列表 // 获取商品sku分页列表
export const getGoodsSkuData = params => { export const getGoodsSkuData = params => {
return getRequest("/goods/sku/list", params); return getRequest("/goods/goods/sku/list", params);
}; };
// 获取商品分页列表 // 获取商品分页列表
export const getGoodsListData = params => { export const getGoodsListData = params => {
return getRequest("/goods/list", params); return getRequest("/goods/goods/list", params);
}; };
// 获取待审核商品分页列表 // 获取待审核商品分页列表
export const getAuthGoodsListData = params => { export const getAuthGoodsListData = params => {
@ -178,7 +178,7 @@ export const getShopGoodsLabelListSeller = () => {
//查询分类绑定参数信息 //查询分类绑定参数信息
export const getCategoryParamsListData = (id, params) => { export const getCategoryParamsListData = (id, params) => {
return getRequest(`/goods/category/parameters/${id}`, params); return getRequest(`/goods/categoryParameters/${id}`, params);
}; };
//查询商品绑定参数信息 //查询商品绑定参数信息
export const getCategoryParamsByGoodsId = (goodsId, categoryId) => { export const getCategoryParamsByGoodsId = (goodsId, categoryId) => {
@ -194,11 +194,11 @@ export const deleteParams = (id, params) => {
}; };
//更新或者保存参数组 //更新或者保存参数组
export const insertOrUpdateParamsGroup = params => { export const insertOrUpdateParamsGroup = params => {
return postRequest("/goods/category/parameters/save", params); return postRequest("/goods/categoryParameters/save", params);
}; };
//删除参数组 //删除参数组
export const deleteParamsGroup = (id, params) => { export const deleteParamsGroup = (id, params) => {
return deleteRequest(`/goods/category/parameters/${id}`, params); return deleteRequest(`/goods/categoryParameters/${id}`, params);
}; };
//获取sku列表 //获取sku列表
@ -226,38 +226,38 @@ export const insertSpecSeller = params => {
// 更新商品库存 // 更新商品库存
export const updateGoodsSkuStocks = params => { export const updateGoodsSkuStocks = params => {
return putRequest("/goods/update/stocks", params, { return putRequest("/goods/goods/update/stocks", params, {
"Content-Type": "application/json" "Content-Type": "application/json"
}); });
}; };
// 获取商品分页列表 // 获取商品分页列表
export const getGoodsListDataSeller = params => { export const getGoodsListDataSeller = params => {
return getRequest("/goods/list", params); return getRequest("/goods/goods/list", params);
}; };
// 获取商品告警分页列表 // 获取商品告警分页列表
export const getGoodsListDataByStockSeller = params => { export const getGoodsListDataByStockSeller = params => {
return getRequest("/goods/list/stock", params); return getRequest("/goods/goods/list/stock", params);
}; };
// 获取商品详情 // 获取商品详情
export const getGoods = id => { export const getGoods = id => {
return getRequest(`/goods/get/${id}`); return getRequest(`/goods/goods/get/${id}`);
}; };
// 上架商品 // 上架商品
export const upGoods = params => { export const upGoods = params => {
return putRequest(`/goods/up`, params); return putRequest(`/goods/goods/up`, params);
}; };
// 删除商品 // 删除商品
export const deleteGoods = params => { export const deleteGoods = params => {
return putRequest(`/goods/delete`, params); return putRequest(`/goods/goods/delete`, params);
}; };
// 下架商品 // 下架商品
export const lowGoods = params => { export const lowGoods = params => {
return putRequest(`/goods/under`, params); return putRequest(`/goods/goods/under`, params);
}; };
// 获取商品单位列表 // 获取商品单位列表
export const getGoodsUnitList = () => { export const getGoodsUnitList = () => {
return getRequest(`/goods/unit`); return getRequest(`/goods/goodsUnit`);
}; };
//根据分类id获取关联品牌 //根据分类id获取关联品牌
export const getCategoryBrandListDataSeller = (category_id, params) => { export const getCategoryBrandListDataSeller = (category_id, params) => {
@ -265,42 +265,42 @@ export const getCategoryBrandListDataSeller = (category_id, params) => {
}; };
export function createGoods(params) { export function createGoods(params) {
return postRequest("/goods/create", params, { return postRequest("/goods/goods/create", params, {
"Content-Type": "application/json" "Content-Type": "application/json"
}); });
} }
export function editGoods(goodsId, params) { export function editGoods(goodsId, params) {
return putRequest(`/goods/update/${goodsId}`, params, { return putRequest(`/goods/goods/update/${goodsId}`, params, {
"Content-Type": "application/json" "Content-Type": "application/json"
}); });
} }
// 获取草稿商品分页列表 // 获取草稿商品分页列表
export const getDraftGoodsListData = params => { export const getDraftGoodsListData = params => {
return getRequest("/draft/goods/page", params); return getRequest("/goods/draftGoods/page", params);
}; };
// 获取草稿商品详情 // 获取草稿商品详情
export const getDraftGoodsDetail = id => { export const getDraftGoodsDetail = id => {
return getRequest(`/draft/goods/${id}`); return getRequest(`/goods/draftGoods/${id}`);
}; };
// 保存草稿商品 // 保存草稿商品
export function saveDraftGoods(params) { export function saveDraftGoods(params) {
return postRequest("/draft/goods/save", params, { return postRequest("/goods/draftGoods/save", params, {
"Content-Type": "application/json" "Content-Type": "application/json"
}); });
} }
// 删除草稿商品 // 删除草稿商品
export const deleteDraftGoods = id => { export const deleteDraftGoods = id => {
return deleteRequest(`/draft/goods/${id}`); return deleteRequest(`/goods/draftGoods/${id}`);
}; };
//查询分类绑定参数信息 //查询分类绑定参数信息
export const getCategoryParamsListDataSeller = (id, params) => { export const getCategoryParamsListDataSeller = (id, params) => {
return getRequest(`/goods/category/parameters/${id}`, params); return getRequest(`/goods/categoryParameters/${id}`, params);
}; };
//保存获取关联规格 //保存获取关联规格
@ -310,7 +310,7 @@ export const getGoodsSpecInfoSeller = (category_id) => {
//批量设置运费模板 //批量设置运费模板
export const batchShipTemplate = params => { export const batchShipTemplate = params => {
return putRequest(`/goods/freight`, params); return putRequest(`/goods/goods/freight`, params);
}; };

View File

@ -11,12 +11,12 @@ import {
//获取所有city //获取所有city
export const getAllCity = (params) => { export const getAllCity = (params) => {
return getRequest(commonUrl+'/common/region/allCity', params) return getRequest(commonUrl+'/common/common/region/allCity', params)
} }
// 登陆 // 登陆
export const getHomeNotice = params => { export const getHomeNotice = params => {
return getRequest("/article/getByPage?type=STORE_ARTICLE&pageSize=15"); return getRequest("/other/article/getByPage?type=STORE_ARTICLE&pageSize=15");
}; };
@ -29,12 +29,12 @@ export const getSellerHomeData = params => {
// 登陆 // 登陆
export const login = params => { export const login = params => {
return postRequestWithNoTokenData("/login/userLogin", params); return postRequestWithNoTokenData("/passport/login/userLogin", params);
}; };
// 登出 // 登出
export const logout = () => { export const logout = () => {
return postRequest("/login/logout"); return postRequest("/passport/login/logout");
}; };
// 获取用户登录信息 // 获取用户登录信息
@ -43,7 +43,7 @@ export const userInfo = params => {
}; };
// 获取登录信息 // 获取登录信息
export const userMsg = params => { export const userMsg = params => {
return getRequest('/settings', params) return getRequest('/settings/storeSettings', params)
} }
// 注册 // 注册
export const regist = params => { export const regist = params => {
@ -171,47 +171,47 @@ export const getLogListData = params => {
}; };
// 分页获取消息数据 // 分页获取消息数据
export const getMessageData = params => { export const getMessageData = params => {
return getRequest("/message/getByCondition", params); return getRequest("/message/storeMessage/getByCondition", params);
}; };
// 获取单个消息详情 // 获取单个消息详情
export const getMessageDataById = (id, params) => { export const getMessageDataById = (id, params) => {
return getRequest(`/message/get/${id}`, params); return getRequest(`/message/storeMessage/get/${id}`, params);
}; };
// 添加消息 // 添加消息
export const addMessage = params => { export const addMessage = params => {
return postRequest("/message/add", params); return postRequest("/message/storeMessage/add", params);
}; };
// 编辑消息 // 编辑消息
export const editMessage = params => { export const editMessage = params => {
return postRequest("/message/edit", params); return postRequest("/message/storeMessage/edit", params);
}; };
// 回收站还原消息 // 回收站还原消息
export const reductionMessage = (ids, params) => { export const reductionMessage = (ids, params) => {
return putRequest(`/message/${ids}/reduction`, params); return putRequest(`/message/storeMessage/${ids}/reduction`, params);
}; };
// 彻底删除消息 // 彻底删除消息
export const clearMessage = (ids, params) => { export const clearMessage = (ids, params) => {
return deleteRequest(`/message/${ids}`, params); return deleteRequest(`/message/storeMessage/${ids}`, params);
}; };
// 已读消息放入回收站 // 已读消息放入回收站
export const deleteMessage = (ids, params) => { export const deleteMessage = (ids, params) => {
return deleteRequest(`/message/${ids}/delete`, params); return deleteRequest(`/message/storeMessage/${ids}/delete`, params);
}; };
// 分页获取消息推送数据 // 分页获取消息推送数据
export const getMessageSendData = params => { export const getMessageSendData = params => {
return getRequest("/message", params); return getRequest("/message/storeMessage", params);
}; };
// 进入消息中心首次加载全部数据 // 进入消息中心首次加载全部数据
export const getAllMessage = params => { export const getAllMessage = params => {
return getRequest("/message/all", params); return getRequest("/message/storeMessage/all", params);
}; };
// 已读消息 // 已读消息
export const read = (id) => { export const read = (id) => {
return putRequest(`/message/${id}/read`); return putRequest(`/message/storeMessage/${id}/read`);
}; };
// 删除发送消息 // 删除发送消息
export const deleteMessageSend = (ids, params) => { export const deleteMessageSend = (ids, params) => {
return deleteRequest(`/messageSend/delByIds/${ids}`, params); return deleteRequest(`/message/storeMessageSend/delByIds/${ids}`, params);
}; };
// 分页获取文件数据 // 分页获取文件数据
@ -240,7 +240,7 @@ export const aliDownloadFile = (fKey, params) => {
// base64上传 // base64上传
export const base64Upload = params => { export const base64Upload = params => {
return postRequest("/upload/file", params); return postRequest("/common/common/upload/file", params);
}; };

View File

@ -12,23 +12,23 @@ import {
// 分页获取物流公司 // 分页获取物流公司
export const getLogisticsPage = params => { export const getLogisticsPage = params => {
return getRequest(`/logistics/getByPage`, params); return getRequest(`/other/logistics/getByPage`, params);
}; };
// 删除 // 删除
export const delLogistics = id => { export const delLogistics = id => {
return deleteRequest(`/logistics/delete/${id}`); return deleteRequest(`/other/logistics/delete/${id}`);
}; };
// 添加 // 添加
export const addLogistics = params => { export const addLogistics = params => {
return postRequest(`/logistics/save`,params); return postRequest(`/other/logistics/save`,params);
}; };
// 通过id查询详情 // 通过id查询详情
export const getLogisticsDetail = id => { export const getLogisticsDetail = id => {
return getRequest(`/logistics/get/${id}`); return getRequest(`/other/logistics/get/${id}`);
}; };
// 编辑 // 编辑
export const updateLogistics = (id,params) => { export const updateLogistics = (id,params) => {
return putRequest(`/logistics/${id}`,params); return putRequest(`/other/logistics/${id}`,params);
}; };

View File

@ -3,17 +3,17 @@ import {getRequest, putRequest, postRequest} from "@/libs/axios";
// 分页获取会员评价 // 分页获取会员评价
export const getMemberReview = params => { export const getMemberReview = params => {
return getRequest("/memberEvaluation", params); return getRequest("/member/evaluation", params);
}; };
// 根据id获取评价详情 // 根据id获取评价详情
export const getMemberInfoReview = id => { export const getMemberInfoReview = id => {
return getRequest(`/memberEvaluation/get/${id}`); return getRequest(`/member/evaluation/get/${id}`);
}; };
//回复评价信息 //回复评价信息
export const replyMemberReview = (id, params) => { export const replyMemberReview = (id, params) => {
return putRequest(`/memberEvaluation/reply/${id}`, params); return putRequest(`/member/evaluation/reply/${id}`, params);
}; };
// 获取会员注册统计列表 // 获取会员注册统计列表
@ -72,7 +72,7 @@ export const deleteMemberListData = ids => {
}; };
// 获取充值记录列表数据 // 获取充值记录列表数据
export const getUserRecharge = params => { export const getUserRecharge = params => {
return getRequest("/recharge", params); return getRequest("/wallet/recharge", params);
}; };
// 获取预存款明细列表数据 // 获取预存款明细列表数据

View File

@ -5,66 +5,66 @@ import { baseUrl } from "@/libs/axios.js";
// 下载待发货的订单列表 // 下载待发货的订单列表
export const verificationCode = verificationCode => { export const verificationCode = verificationCode => {
return getRequest(`/orders/getOrderByVerificationCode/${verificationCode}`); return getRequest(`/order/order/getOrderByVerificationCode/${verificationCode}`);
}; };
// 下载待发货的订单列表 // 下载待发货的订单列表
export const downLoadDeliverExcel = params => { export const downLoadDeliverExcel = params => {
return getRequest(`/orders/downLoadDeliverExcel`, params, 'blob'); return getRequest(`/order/order/downLoadDeliverExcel`, params, 'blob');
}; };
// 导出待发货订单 // 导出待发货订单
export const queryExportOrder = params => { export const queryExportOrder = params => {
return getRequest(`/orders/queryExportOrder`, params); return getRequest(`/order/order/queryExportOrder`, params);
}; };
// 上传待发货的订单列表 // 上传待发货的订单列表
export const uploadDeliverExcel = params => { export const uploadDeliverExcel = params => {
return postRequestWithNoForm(`/orders/batchDeliver`, params ); return postRequestWithNoForm(`/order/order/batchDeliver`, params );
}; };
// 获取普通订单列表 // 获取普通订单列表
export const getOrderList = params => { export const getOrderList = params => {
return getRequest(`/orders`, params); return getRequest(`/order/order`, params);
}; };
// 获取普通订单详细信息 // 获取普通订单详细信息
export const getOrderDetail = sn => { export const getOrderDetail = sn => {
return getRequest(`/orders/${sn}`); return getRequest(`/order/order/${sn}`);
}; };
// 调整订单金额 // 调整订单金额
export const modifyOrderPrice = (sn, params) => { export const modifyOrderPrice = (sn, params) => {
return putRequest(`/orders/update/${sn}/price`, params); return putRequest(`/order/order/update/${sn}/price`, params);
}; };
// 取消订单 // 取消订单
export const cancelOrder = (sn, params) => { export const cancelOrder = (sn, params) => {
return postRequest(`/orders/${sn}/cancel`, params); return postRequest(`/order/order/${sn}/cancel`, params);
}; };
// 修改收货地址 // 修改收货地址
export const editOrderConsignee = (sn, params) => { export const editOrderConsignee = (sn, params) => {
return postRequest(`/orders/update/${sn}/consignee`, params); return postRequest(`/order/order/update/${sn}/consignee`, params);
}; };
//获取投诉列表 //获取投诉列表
export const getComplainPage = params => { export const getComplainPage = params => {
return getRequest(`/complain`, params); return getRequest(`/order/complain`, params);
}; };
//获取投诉详情 //获取投诉详情
export const getComplainDetail = id => { export const getComplainDetail = id => {
return getRequest(`/complain/${id}`); return getRequest(`/order/complain/${id}`);
}; };
//添加交易投诉对话 //添加交易投诉对话
export const addOrderComplaint = params => { export const addOrderComplaint = params => {
return postRequest(`/complain/communication/`, params); return postRequest(`/order/complain/communication/`, params);
}; };
//添加交易投诉对话 //添加交易投诉对话
export const appeal = params => { export const appeal = params => {
return putRequest(`/complain/appeal`, params); return putRequest(`/order/complain/appeal`, params);
}; };
//获取订单日志 //获取订单日志
@ -74,61 +74,61 @@ export const getOrderLog = (sn, params) => {
// 订单发货 // 订单发货
export const orderDelivery = (sn, params) => { export const orderDelivery = (sn, params) => {
return postRequest(`/orders/${sn}/delivery`, params); return postRequest(`/order/order/${sn}/delivery`, params);
}; };
// 获取商家选中的物流公司 // 获取商家选中的物流公司
export const getLogisticsChecked = () => { export const getLogisticsChecked = () => {
return getRequest(`/logistics/getChecked`); return getRequest(`/other/logistics/getChecked`);
}; };
// 订单核验 // 订单核验
export const orderTake = (sn, verificationCode) => { export const orderTake = (sn, verificationCode) => {
return putRequest(`/orders/take/${sn}/${verificationCode}`); return putRequest(`/order/order/take/${sn}/${verificationCode}`);
}; };
// 售后服务单 // 售后服务单
export const afterSaleOrderPage = params => { export const afterSaleOrderPage = params => {
return getRequest(`/afterSale/page`, params); return getRequest(`/order/afterSale/page`, params);
}; };
// 售后服务单详情 // 售后服务单详情
export const afterSaleOrderDetail = sn => { export const afterSaleOrderDetail = sn => {
return getRequest(`/afterSale/${sn}`); return getRequest(`/order/afterSale/${sn}`);
}; };
// 商家审核 // 商家审核
export const afterSaleSellerReview = (sn, params) => { export const afterSaleSellerReview = (sn, params) => {
return putRequest(`/afterSale/review/${sn}`, params); return putRequest(`/order/afterSale/review/${sn}`, params);
}; };
// 商家确认收货 // 商家确认收货
export const afterSaleSellerConfirm = (sn, params) => { export const afterSaleSellerConfirm = (sn, params) => {
return putRequest(`/afterSale/confirm/${sn}`, params); return putRequest(`/order/afterSale/confirm/${sn}`, params);
}; };
// 商家换货业务发货 // 商家换货业务发货
export const afterSaleSellerDelivery = (sn, params) => { export const afterSaleSellerDelivery = (sn, params) => {
return postRequest(`/afterSale/${sn}/delivery`, params); return postRequest(`/order/afterSale/${sn}/delivery`, params);
}; };
//查询物流 //查询物流
export const getTraces = (sn, params) => { export const getTraces = (sn, params) => {
return getRequest(`/orders/getTraces/${sn}`, params); return getRequest(`/order/order/getTraces/${sn}`, params);
}; };
//售后单查询物流 //售后单查询物流
export const getSellerDeliveryTraces = (sn, params) => { export const getSellerDeliveryTraces = (sn, params) => {
return getRequest(`/afterSale/getSellerDeliveryTraces/${sn}`, params); return getRequest(`/order/afterSale/getSellerDeliveryTraces/${sn}`, params);
}; };
//售后单查询物流 //售后单查询物流
export const getAfterSaleTraces = (sn, params) => { export const getAfterSaleTraces = (sn, params) => {
return getRequest(`/afterSale/getDeliveryTraces/${sn}`, params); return getRequest(`/order/afterSale/getDeliveryTraces/${sn}`, params);
}; };
//获取发票列表 //获取发票列表
export const getReceiptPage = params => { export const getReceiptPage = params => {
return getRequest(`/receipt`, params); return getRequest(`/trade/receipt`, params);
}; };
//获取发票列表 //获取发票列表
export const invoicing = id => { export const invoicing = id => {
return postRequest(`receipt/${id}/invoicing`); return postRequest(`/trade/receipt/${id}/invoicing`);
}; };

View File

@ -16,7 +16,7 @@ import {
*/ */
export const setHomeSetup = params => { export const setHomeSetup = params => {
return postRequest("/pageData/add", params); return postRequest("/other/pageData/add", params);
}; };
/** /**
@ -25,7 +25,7 @@ export const setHomeSetup = params => {
*/ */
export const getHomeData = params => { export const getHomeData = params => {
return getRequest(`/pageData/${params}`); return getRequest(`/other/pageData/${params}`);
}; };

View File

@ -80,19 +80,19 @@ export const updateArticleCategory = (params, id) => {
} }
//文章添加 //文章添加
export const saveArticle = (params) => { export const saveArticle = (params) => {
return postRequest('/article', params) return postRequest('/other/article', params)
} }
//文章修改 //文章修改
export const updateArticle = (params) => { export const updateArticle = (params) => {
return putRequest(`/article/update/${params.id}`, params) return putRequest(`/other/article/update/${params.id}`, params)
} }
//查看文章 //查看文章
export const seeArticle = (id) => { export const seeArticle = (id) => {
return getRequest(`/article/${id}`) return getRequest(`/other/article/${id}`)
} }
//获取文章列表数据 //获取文章列表数据
export const getArticle = (params) => { export const getArticle = (params) => {
return getRequest('/article/getByPage', params) return getRequest('/other/article/getByPage', params)
} }
@ -100,7 +100,7 @@ export const getArticle = (params) => {
//删除文章数据 //删除文章数据
export const delArticle = (ids) => { export const delArticle = (ids) => {
return deleteRequest(`/article/delByIds/${ids}`) return deleteRequest(`/other/article/delByIds/${ids}`)
} }

View File

@ -14,107 +14,107 @@ export const getShopListData = (params) => {
} }
// 获取结算单分页 // 获取结算单分页
export const getBillPage = (params) => { export const getBillPage = (params) => {
return getRequest(`/bill/getByPage`, params) return getRequest(`/order/bill/getByPage`, params)
} }
// 获取商家结算单流水分页 // 获取商家结算单流水分页
export const getSellerFlow = (id, params) => { export const getSellerFlow = (id, params) => {
return getRequest(`/bill/${id}/getStoreFlow`, params) return getRequest(`/order/bill/${id}/getStoreFlow`, params)
} }
// 商家核对结算单 // 商家核对结算单
export const reconciliation = (id, params) => { export const reconciliation = (id, params) => {
return putRequest(`/bill/check/${id}/`, params) return putRequest(`/order/bill/check/${id}/`, params)
} }
// 获取商家分销订单流水分页 // 获取商家分销订单流水分页
export const getDistributionFlow = (id, params) => { export const getDistributionFlow = (id, params) => {
return getRequest(`/bill/${id}/getDistributionFlow`, params) return getRequest(`/order/bill/${id}/getDistributionFlow`, params)
} }
// 获取商家结算单详细 // 获取商家结算单详细
export const getBillDetail = (id, params) => { export const getBillDetail = (id, params) => {
return getRequest(`/bill/get/${id}`, params) return getRequest(`/order/bill/get/${id}`, params)
} }
// 获取所有物流公司 // 获取所有物流公司
export const getLogistics = (id, params) => { export const getLogistics = (id, params) => {
return getRequest(`/logistics`, params) return getRequest(`/other/logistics`, params)
} }
// 开启物流公司 // 开启物流公司
export const logisticsChecked = (id, params) => { export const logisticsChecked = (id, params) => {
return postRequest(`/logistics/${id}`, params) return postRequest(`/other/logistics/${id}`, params)
} }
// 关闭开启物流公司 // 关闭开启物流公司
export const logisticsUnChecked = (id, params) => { export const logisticsUnChecked = (id, params) => {
return deleteRequest(`/logistics/${id}`, params) return deleteRequest(`/other/logistics/${id}`, params)
} }
// 获取商家自提点 // 获取商家自提点
export const getShopAddress = (id, params) => { export const getShopAddress = (id, params) => {
return getRequest(`/storeAddress/`, params) return getRequest(`/member/storeAddress/`, params)
} }
// 修改商家自提点 // 修改商家自提点
export const editShopAddress = (id, params) => { export const editShopAddress = (id, params) => {
return putRequest(`/storeAddress/${id}`, params) return putRequest(`/member/storeAddress/${id}`, params)
} }
// 添加商品自提点 // 添加商品自提点
export const addShopAddress = (params) => { export const addShopAddress = (params) => {
return postRequest(`/storeAddress/`, params) return postRequest(`/member/storeAddress/`, params)
} }
// 添加商品自提点 // 添加商品自提点
export const deleteShopAddress = (id) => { export const deleteShopAddress = (id) => {
return deleteRequest(`/storeAddress/${id}`) return deleteRequest(`/member/storeAddress/${id}`)
} }
// 获取商家详细信息 // 获取商家详细信息
export const getShopInfo = () => { export const getShopInfo = () => {
return getRequest(`/settings`) return getRequest(`/settings/storeSettings`)
} }
// 保存商家详细信息 // 保存商家详细信息
export const saveShopInfo = (params) => { export const saveShopInfo = (params) => {
return putRequest(`/settings`, params) return putRequest(`/settings/storeSettings`, params)
} }
//获取商家退货地址 //获取商家退货地址
export const getRefundGoodsAddress = () => { export const getRefundGoodsAddress = () => {
return getRequest(`/settings/storeAfterSaleAddress`) return getRequest(`/settings/storeSettings/storeAfterSaleAddress`)
} }
//修改商家退货地址 //修改商家退货地址
export const saveRefundGoodsAddress = (params) => { export const saveRefundGoodsAddress = (params) => {
return putRequest(`/settings/storeAfterSaleAddress`, params) return putRequest(`/settings/storeSettings/storeAfterSaleAddress`, params)
} }
//修改im商户id //修改im商户id
export const updatEmerchantId = (params) => { export const updatEmerchantId = (params) => {
return putRequest(`/settings/merchantEuid`, params) return putRequest(`/settings/storeSettings/merchantEuid`, params)
} }
//修改保存库存预警数 //修改保存库存预警数
export const updateStockWarning = (params) => { export const updateStockWarning = (params) => {
return putRequest(`/settings/updateStockWarning`, params) return putRequest(`/settings/storeSettings/updateStockWarning`, params)
} }
//查询运费模板 //查询运费模板
export const getShipTemplate = () => { export const getShipTemplate = () => {
return getRequest(`/freightTemplate`) return getRequest(`/setting/freightTemplate`)
} }
//删除运费模板 //删除运费模板
export const deleteShipTemplate = (id) => { export const deleteShipTemplate = (id) => {
return deleteRequest(`/freightTemplate/${id}`) return deleteRequest(`/setting/freightTemplate/${id}`)
} }
//新增运费模板 //新增运费模板
export const addShipTemplate = (params, headers) => { export const addShipTemplate = (params, headers) => {
return postRequest(`/freightTemplate`, params, headers) return postRequest(`/setting/freightTemplate`, params, headers)
} }
//新增运费模板 //新增运费模板
export const editShipTemplate = (id, params, headers) => { export const editShipTemplate = (id, params, headers) => {
return putRequest(`/freightTemplate/${id}`, params, headers) return putRequest(`/setting/freightTemplate/${id}`, params, headers)
} }

View File

@ -2,6 +2,6 @@ module.exports = {
title: "lilishop", //配置显示在浏览器标签的title title: "lilishop", //配置显示在浏览器标签的title
aMapKey: "b440952723253aa9fe483e698057bf7d", //高德web端申请的api key aMapKey: "b440952723253aa9fe483e698057bf7d", //高德web端申请的api key
website: "https://www.pickmall.cn", //官网地址 website: "https://www.pickmall.cn", //官网地址
enableCDN: true, //生产环境 是否启用cdn加载 vue等js enableCDN: false, //生产环境 是否启用cdn加载 vue等js
port: 10002, //端口 port: 10002, //端口
}; };

View File

@ -16,7 +16,7 @@ export const commonUrl =
? BASE.API_DEV.common ? BASE.API_DEV.common
: BASE.API_PROD.common; : BASE.API_PROD.common;
// 文件上传接口 // 文件上传接口
export const uploadFile = commonUrl + "/common/upload/file"; export const uploadFile = commonUrl + "/common/common/upload/file";
var isRefreshToken = 0; var isRefreshToken = 0;
const refreshToken = getTokenDebounce(); const refreshToken = getTokenDebounce();
const service = axios.create({ const service = axios.create({

View File

@ -2,24 +2,52 @@
<div class="search"> <div class="search">
<Card> <Card>
<Row @keydown.enter.native="handleSearch"> <Row @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form"> <Form
ref="searchForm"
:model="searchForm"
inline
:label-width="70"
class="search-form"
>
<Form-item label="商品名称" prop="goodsName"> <Form-item label="商品名称" prop="goodsName">
<Input type="text" v-model="searchForm.goodsName" placeholder="请输入商品名称" clearable style="width: 200px" /> <Input
type="text"
v-model="searchForm.goodsName"
placeholder="请输入商品名称"
clearable
style="width: 200px"
/>
</Form-item> </Form-item>
<Form-item label="状态" prop="status"> <Form-item label="状态" prop="status">
<Select v-model="searchForm.marketEnable" placeholder="请选择" clearable style="width: 200px"> <Select
v-model="searchForm.marketEnable"
placeholder="请选择"
clearable
style="width: 200px"
>
<Option value="DOWN">下架</Option> <Option value="DOWN">下架</Option>
<Option value="UPPER">上架</Option> <Option value="UPPER">上架</Option>
</Select> </Select>
</Form-item> </Form-item>
<Form-item label="商品类型" prop="status"> <Form-item label="商品类型" prop="status">
<Select v-model="searchForm.goodsType" placeholder="请选择" clearable style="width: 200px"> <Select
v-model="searchForm.goodsType"
placeholder="请选择"
clearable
style="width: 200px"
>
<Option value="PHYSICAL_GOODS">实物商品</Option> <Option value="PHYSICAL_GOODS">实物商品</Option>
<Option value="VIRTUAL_GOODS">虚拟商品</Option> <Option value="VIRTUAL_GOODS">虚拟商品</Option>
</Select> </Select>
</Form-item> </Form-item>
<Form-item label="商品编号" prop="sn"> <Form-item label="商品编号" prop="sn">
<Input type="text" v-model="searchForm.id" placeholder="商品编号" clearable style="width: 200px" /> <Input
type="text"
v-model="searchForm.id"
placeholder="商品编号"
clearable
style="width: 200px"
/>
</Form-item> </Form-item>
<Button @click="handleSearch" type="primary" class="search-btn">搜索</Button> <Button @click="handleSearch" type="primary" class="search-btn">搜索</Button>
<Button @click="handleReset" class="search-btn">重置</Button> <Button @click="handleReset" class="search-btn">重置</Button>
@ -41,40 +69,82 @@
</Dropdown> </Dropdown>
</Row> </Row>
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table" @on-selection-change="changeSelect"> <Table
class="mt_10"
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
@on-selection-change="changeSelect"
>
<!-- 商品栏目格式化 --> <!-- 商品栏目格式化 -->
<template slot="goodsSlot" slot-scope="{ row }"> <template slot="goodsSlot" slot-scope="{ row }">
<div style="margin-top: 5px;height: 90px; display: flex;"> <div style="margin-top: 5px; height: 90px; display: flex">
<div style=""> <div style="">
<img :src="row.original" style="height: 80px;margin-top: 3px;width: 70px"> <img
:src="row.original"
style="height: 80px; margin-top: 3px; width: 70px"
/>
</div> </div>
<div style="margin-left: 13px;"> <div style="margin-left: 13px">
<div class="div-zoom"> <div class="div-zoom">
<a @click="linkTo(row.id, row.skuId)">{{ row.goodsName }}</a> <a @click="linkTo(row.id, row.skuId)">{{ row.goodsName }}</a>
</div> </div>
<Poptip trigger="hover" title="扫码在手机中查看" transfer> <Poptip trigger="hover" title="扫码在手机中查看" transfer>
<div slot="content"> <div slot="content">
<!-- <vueQr>123</vueQr> --> <!-- <vueQr>123</vueQr> -->
<vue-qr :text="wapLinkTo(row.id,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr> <vue-qr
:text="wapLinkTo(row.id, row.skuId)"
:margin="0"
colorDark="#000"
colorLight="#fff"
:size="150"
></vue-qr>
</div> </div>
<img src="../../../assets/qrcode.svg" class="hover-pointer" width="20" height="20" alt=""> <img
src="../../../assets/qrcode.svg"
class="hover-pointer"
width="20"
height="20"
alt=""
/>
</Poptip> </Poptip>
</div> </div>
</div> </div>
</template> </template>
</Table> </Table>
<Row type="flex" justify="end" class="mt_10"> <Row type="flex" justify="end" class="mt_10">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small" <Page
show-total show-elevator show-sizer></Page> :current="searchForm.pageNumber"
:total="total"
:page-size="searchForm.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
show-elevator
show-sizer
></Page>
</Row> </Row>
</Card> </Card>
<Modal title="更新库存" v-model="updateStockModalVisible" :mask-closable="false" :width="500"> <Modal
title="更新库存"
v-model="updateStockModalVisible"
:mask-closable="false"
:width="500"
>
<Tabs value="updateStock"> <Tabs value="updateStock">
<TabPane label="手动规格更新" name="updateStock"> <TabPane label="手动规格更新" name="updateStock">
<Table class="mt_10" :columns="updateStockColumns" :data="stockList" border ></Table> <Table
class="mt_10"
:columns="updateStockColumns"
:data="stockList"
border
></Table>
</TabPane> </TabPane>
<TabPane label="批量规格更新" name="stockAll"> <TabPane label="批量规格更新" name="stockAll">
<Input type="number" v-model="stockAllUpdate" placeholder="统一规格修改" /> <Input type="number" v-model="stockAllUpdate" placeholder="统一规格修改" />
@ -88,11 +158,17 @@
</Modal> </Modal>
<!-- 批量设置物流模板 --> <!-- 批量设置物流模板 -->
<Modal title="批量设置物流模板" v-model="shipTemplateModal" :mask-closable="false" :width="500"> <Modal
title="批量设置物流模板"
v-model="shipTemplateModal"
:mask-closable="false"
:width="500"
>
<Form ref="shipTemplateForm" :model="shipTemplateForm" :label-width="120"> <Form ref="shipTemplateForm" :model="shipTemplateForm" :label-width="120">
<FormItem class="form-item-view-el" label="物流模板" prop="templateId"> <FormItem class="form-item-view-el" label="物流模板" prop="templateId">
<Select v-model="shipTemplateForm.templateId" style="width: 200px"> <Select v-model="shipTemplateForm.templateId" style="width: 200px">
<Option v-for="item in logisticsTemplate" :value="item.id" :key="item.id">{{ item.name }} <Option v-for="item in logisticsTemplate" :value="item.id" :key="item.id"
>{{ item.name }}
</Option> </Option>
</Select> </Select>
</FormItem> </FormItem>
@ -113,12 +189,11 @@ import {
upGoods, upGoods,
lowGoods, lowGoods,
deleteGoods, deleteGoods,
batchShipTemplate batchShipTemplate,
} from "@/api/goods"; } from "@/api/goods";
import * as API_Shop from "@/api/shops"; import * as API_Shop from "@/api/shops";
export default { export default {
name: "goods", name: "goods",
data() { data() {
return { return {
@ -160,11 +235,11 @@ export default {
width: 130, width: 130,
render: (h, params) => { render: (h, params) => {
if (params.row.authFlag == "TOBEAUDITED") { if (params.row.authFlag == "TOBEAUDITED") {
return h("Tag", {props: {color: "blue",},},"待审核"); return h("Tag", { props: { color: "blue" } }, "待审核");
} else if (params.row.authFlag == "PASS") { } else if (params.row.authFlag == "PASS") {
return h("Tag", {props: {color: "green",},},"通过"); return h("Tag", { props: { color: "green" } }, "通过");
} else if (params.row.authFlag == "REFUSE") { } else if (params.row.authFlag == "REFUSE") {
return h("Tag", {props: {color: "red",},},"审核拒绝"); return h("Tag", { props: { color: "red" } }, "审核拒绝");
} }
}, },
}, },
@ -216,9 +291,9 @@ export default {
key: "goodsType", key: "goodsType",
width: 130, width: 130,
render: (h, params) => { render: (h, params) => {
if (params.row.goodsType === 'PHYSICAL_GOODS') { if (params.row.goodsType === "PHYSICAL_GOODS") {
return h("Tag", { props: { color: "geekblue" } }, "实物商品"); return h("Tag", { props: { color: "geekblue" } }, "实物商品");
} else if (params.row.goodsType === 'VIRTUAL_GOODS') { } else if (params.row.goodsType === "VIRTUAL_GOODS") {
return h("Tag", { props: { color: "purple" } }, "虚拟商品"); return h("Tag", { props: { color: "purple" } }, "虚拟商品");
} else { } else {
return h("Tag", { props: { color: "cyan" } }, "电子卡券"); return h("Tag", { props: { color: "cyan" } }, "电子卡券");
@ -230,10 +305,7 @@ export default {
key: "price", key: "price",
width: 130, width: 130,
render: (h, params) => { render: (h, params) => {
return h( return h("div", this.$options.filters.unitPrice(params.row.price, "¥"));
"div",
this.$options.filters.unitPrice(params.row.price, "¥")
);
}, },
}, },
{ {
@ -371,7 +443,8 @@ export default {
}; };
}, },
methods: { methods: {
init() { // init() {
//
this.getDataList(); this.getDataList();
}, },
// //
@ -425,6 +498,7 @@ export default {
if (res.success) { if (res.success) {
this.updateStockModalVisible = false; this.updateStockModalVisible = false;
this.$Message.success("更新库存成功"); this.$Message.success("更新库存成功");
this.getDataList();
} }
}); });
}, },
@ -466,8 +540,7 @@ export default {
saveShipTemplate() { saveShipTemplate() {
this.$Modal.confirm({ this.$Modal.confirm({
title: "确认设置物流模板", title: "确认设置物流模板",
content: content: "您确认要设置所选的 " + this.selectCount + " 个商品的物流模板?",
"您确认要设置所选的 " + this.selectCount + " 个商品的物流模板?",
loading: true, loading: true,
onOk: () => { onOk: () => {
let ids = []; let ids = [];
@ -493,7 +566,7 @@ export default {
this.$Message.warning("您还未选择要设置物流模板的商品"); this.$Message.warning("您还未选择要设置物流模板的商品");
return; return;
} }
this.getShipTempList() this.getShipTempList();
let data = []; let data = [];
this.selectList.forEach(function (e) { this.selectList.forEach(function (e) {
data.push(e.id); data.push(e.id);
@ -519,7 +592,7 @@ export default {
if (res.success) { if (res.success) {
this.logisticsTemplate = res.result; this.logisticsTemplate = res.result;
} }
}) });
}, },
// //
lower(v) { lower(v) {

View File

@ -3,8 +3,13 @@
<!-- 选择商品类型 --> <!-- 选择商品类型 -->
<Modal v-model="selectGoodsType" width="550" :closable="false"> <Modal v-model="selectGoodsType" width="550" :closable="false">
<div class="goods-type-list" v-if="!showGoodsTemplates"> <div class="goods-type-list" v-if="!showGoodsTemplates">
<div class="goods-type-item" :class="{'active-goods-type':item.check}" @click="handleClickGoodsType(item)" <div
v-for="(item,index) in goodsTypeWay" :key="index"> class="goods-type-item"
:class="{ 'active-goods-type': item.check }"
@click="handleClickGoodsType(item)"
v-for="(item, index) in goodsTypeWay"
:key="index"
>
<img :src="item.img" /> <img :src="item.img" />
<div> <div>
<h2>{{ item.title }}</h2> <h2>{{ item.title }}</h2>
@ -14,12 +19,16 @@
</div> </div>
<div v-else class="goods-type-list"> <div v-else class="goods-type-list">
<h2 @click="showGoodsTemplates = !showGoodsTemplates">返回</h2> <h2 @click="showGoodsTemplates = !showGoodsTemplates">返回</h2>
<div class="goods-type-item template-item" @click="handleClickGoodsTemplate(item)" <div
v-for="(item,tempIndex) in goodsTemplates" :key="tempIndex"> class="goods-type-item template-item"
@click="handleClickGoodsTemplate(item)"
v-for="(item, tempIndex) in goodsTemplates"
:key="tempIndex"
>
<img :src="item.thumbnail" /> <img :src="item.thumbnail" />
<div> <div>
<h2>{{ item.goodsName }}</h2> <h2>{{ item.goodsName }}</h2>
<p>{{ item.sellingPoint || '' }}</p> <p>{{ item.sellingPoint || "" }}</p>
</div> </div>
</div> </div>
</div> </div>
@ -28,22 +37,34 @@
<div class="content-goods-publish"> <div class="content-goods-publish">
<div class="goods-category"> <div class="goods-category">
<ul v-if="categoryListLevel1.length > 0"> <ul v-if="categoryListLevel1.length > 0">
<li v-for="(item, index) in categoryListLevel1" :class="{ activeClass: category[0].name === item.name }" <li
@click="handleSelectCategory(item, index, 1)" :key="index"> v-for="(item, index) in categoryListLevel1"
:class="{ activeClass: category[0].name === item.name }"
@click="handleSelectCategory(item, index, 1)"
:key="index"
>
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
<span>&gt;</span> <span>&gt;</span>
</li> </li>
</ul> </ul>
<ul v-if="categoryListLevel2.length > 0"> <ul v-if="categoryListLevel2.length > 0">
<li v-for="(item, index) in categoryListLevel2" :class="{ activeClass: category[1].name === item.name }" <li
@click="handleSelectCategory(item, index, 2)" :key="index"> v-for="(item, index) in categoryListLevel2"
:class="{ activeClass: category[1].name === item.name }"
@click="handleSelectCategory(item, index, 2)"
:key="index"
>
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
<span>&gt;</span> <span>&gt;</span>
</li> </li>
</ul> </ul>
<ul v-if="categoryListLevel3.length > 0"> <ul v-if="categoryListLevel3.length > 0">
<li v-for="(item, index) in categoryListLevel3" :class="{ activeClass: category[2].name === item.name }" <li
@click="handleSelectCategory(item, index, 3)" :key="index"> v-for="(item, index) in categoryListLevel3"
:class="{ activeClass: category[2].name === item.name }"
@click="handleSelectCategory(item, index, 3)"
:key="index"
>
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
</li> </li>
</ul> </ul>
@ -100,19 +121,19 @@ export default {
], ],
// //
category: [ category: [
{name: '', id: ''}, { name: "", id: "" },
{name: '', id: ''}, { name: "", id: "" },
{name: '', id: ''} { name: "", id: "" },
], ],
// //
goodsType: '', goodsType: "",
/** 1级分类列表*/ /** 1级分类列表*/
categoryListLevel1: [], categoryListLevel1: [],
/** 2级分类列表*/ /** 2级分类列表*/
categoryListLevel2: [], categoryListLevel2: [],
/** 3级分类列表*/ /** 3级分类列表*/
categoryListLevel3: [], categoryListLevel3: [],
} };
}, },
methods: { methods: {
// //
@ -123,26 +144,25 @@ export default {
val.check = !val.check; val.check = !val.check;
if (!val.type) { if (!val.type) {
this.GET_GoodsTemplate() this.GET_GoodsTemplate();
this.showGoodsTemplates = true; this.showGoodsTemplates = true;
} else { } else {
this.goodsType = val.type; this.goodsType = val.type;
this.selectedTemplate = {} this.selectedTemplate = {};
} }
}, },
// //
handleClickGoodsTemplate(val) { handleClickGoodsTemplate(val) {
console.log(val);
this.selectedTemplate = val; this.selectedTemplate = val;
this.selectGoodsType = false; this.selectGoodsType = false;
this.$emit('change', {tempId: val.id}) this.$emit("change", { tempId: val.id });
}, },
// //
GET_GoodsTemplate() { GET_GoodsTemplate() {
let searchParams = { let searchParams = {
saveType: "TEMPLATE", saveType: "TEMPLATE",
sort: "create_time", sort: "create_time",
order: "desc" order: "desc",
}; };
API_GOODS.getDraftGoodsListData(searchParams).then((res) => { API_GOODS.getDraftGoodsListData(searchParams).then((res) => {
if (res.success) { if (res.success) {
@ -153,10 +173,9 @@ export default {
/** 选择商城商品分类 */ /** 选择商城商品分类 */
handleSelectCategory(row, index, level) { handleSelectCategory(row, index, level) {
if (level === 1) { if (level === 1) {
this.category.forEach(cate => { this.category.forEach((cate) => {
cate.name = '', (cate.name = ""), (cate.id = "");
cate.id = '' });
})
this.category[0].name = row.name; this.category[0].name = row.name;
this.category[0].id = row.id; this.category[0].id = row.id;
this.categoryListLevel2 = this.categoryListLevel1[index].children; this.categoryListLevel2 = this.categoryListLevel1[index].children;
@ -164,12 +183,12 @@ export default {
} else if (level === 2) { } else if (level === 2) {
this.category[1].name = row.name; this.category[1].name = row.name;
this.category[1].id = row.id; this.category[1].id = row.id;
this.category[2].name = ''; this.category[2].name = "";
this.category[2].id = ''; this.category[2].id = "";
this.categoryListLevel3 = this.categoryListLevel2[index].children; this.categoryListLevel3 = this.categoryListLevel2[index].children;
} else { } else {
this.category[2].name = row.name this.category[2].name = row.name;
this.category[2].id = row.id this.category[2].id = row.id;
} }
}, },
/** 查询下一级 商城商品分类*/ /** 查询下一级 商城商品分类*/
@ -185,8 +204,8 @@ export default {
next() { next() {
window.scrollTo(0, 0); window.scrollTo(0, 0);
if (!this.goodsType && !this.selectedTemplate.goodsName) { if (!this.goodsType && !this.selectedTemplate.goodsName) {
this.$Message.error('请选择商品类型') this.$Message.error("请选择商品类型");
return return;
} }
if (!this.category[0].name) { if (!this.category[0].name) {
this.$Message.error("请选择商品分类"); this.$Message.error("请选择商品分类");
@ -196,18 +215,17 @@ export default {
return; return;
} else if (this.category[2].name) { } else if (this.category[2].name) {
if (this.selectedTemplate.id) { if (this.selectedTemplate.id) {
this.$emit('change',{tempId: this.selectedTemplate.id}) this.$emit("change", { tempId: this.selectedTemplate.id });
} else { } else {
this.$emit('change',{category: this.category,goodsType:this.goodsType}) this.$emit("change", { category: this.category, goodsType: this.goodsType });
} }
} }
}, },
}, },
mounted() { mounted() {
this.GET_NextLevelCategory() this.GET_NextLevelCategory();
},
} };
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "./addGoods.scss"; @import "./addGoods.scss";

View File

@ -45,7 +45,11 @@
/> />
</FormItem> </FormItem>
<FormItem label="商品品牌" prop="brandId"> <FormItem label="商品品牌" prop="brandId">
<Select v-model="baseInfoForm.brandId" filterable style="width: 200px"> <Select
v-model="baseInfoForm.brandId"
filterable
style="width: 200px"
>
<Option <Option
v-for="item in brandList" v-for="item in brandList"
:value="item.id" :value="item.id"
@ -57,14 +61,25 @@
</div> </div>
<h4>商品交易信息</h4> <h4>商品交易信息</h4>
<div class="form-item-view"> <div class="form-item-view">
<FormItem class="form-item-view-el" label="计量单位" prop="goodsUnit"> <FormItem
class="form-item-view-el"
label="计量单位"
prop="goodsUnit"
>
<Select v-model="baseInfoForm.goodsUnit" style="width: 100px"> <Select v-model="baseInfoForm.goodsUnit" style="width: 100px">
<Option v-for="(unit, i) in goodsUnitList" :key="i" :value="unit" <Option
v-for="(unit, i) in goodsUnitList"
:key="i"
:value="unit"
>{{ unit }} >{{ unit }}
</Option> </Option>
</Select> </Select>
</FormItem> </FormItem>
<FormItem class="form-item-view-el" label="销售模式" prop="salesModel"> <FormItem
class="form-item-view-el"
label="销售模式"
prop="salesModel"
>
<RadioGroup <RadioGroup
type="button" type="button"
v-if="baseInfoForm.goodsType != 'VIRTUAL_GOODS'" v-if="baseInfoForm.goodsType != 'VIRTUAL_GOODS'"
@ -94,7 +109,10 @@
prop="goodsGalleryFiles" prop="goodsGalleryFiles"
> >
<div style="display: flex; flex-wrap: flex-start"> <div style="display: flex; flex-wrap: flex-start">
<vuedraggable :list="baseInfoForm.goodsGalleryFiles" :animation="200"> <vuedraggable
:list="baseInfoForm.goodsGalleryFiles"
:animation="200"
>
<div <div
class="demo-upload-list" class="demo-upload-list"
v-for="(item, __index) in baseInfoForm.goodsGalleryFiles" v-for="(item, __index) in baseInfoForm.goodsGalleryFiles"
@ -163,12 +181,15 @@
<Button <Button
type="primary" type="primary"
slot="extra" slot="extra"
@click="handleCloseSkuItem($index)" @click="handleCloseSkuItem(item, $index)"
> >
删除规格 删除规格
</Button> </Button>
<div> <Form :model="item" class="flex">
<FormItem label="规格名" class="sku-item-content-val flex"> <FormItem
label="规格名"
class="sku-item-content-val flex"
>
<AutoComplete <AutoComplete
style="width: 150px" style="width: 150px"
v-model="item.name" v-model="item.name"
@ -176,11 +197,11 @@
placeholder="请输入规格项名称" placeholder="请输入规格项名称"
:filter-method="filterMethod" :filter-method="filterMethod"
:data="skuData" :data="skuData"
@on-change="editSkuItem" @on-change="handleSkuTitle($event, $index)"
> >
</AutoComplete> </AutoComplete>
</FormItem> </FormItem>
</div> </Form>
<div class="flex sku-val"> <div class="flex sku-val">
<Form :model="item" class="flex"> <Form :model="item" class="flex">
<!--规格值文本列表--> <!--规格值文本列表-->
@ -200,7 +221,14 @@
:filter-method="filterMethod" :filter-method="filterMethod"
:data="skuVal" :data="skuVal"
@on-focus="changeSkuVals(item.name)" @on-focus="changeSkuVals(item.name)"
@on-change="skuValueChange(val.value, $index, item)" @on-change="
handleSkuValue(
val.value,
$index,
val,
index
)
"
> >
</AutoComplete> </AutoComplete>
<Button <Button
@ -215,7 +243,9 @@
</Form> </Form>
</div> </div>
<div> <div>
<Button @click="addSpec($index, item)">添加规格值</Button> <Button @click="addSpec($index, item)"
>添加规格值</Button
>
</div> </div>
</Card> </Card>
</div> </div>
@ -233,9 +263,97 @@
规格详细 规格详细
<div slot="content"> <div slot="content">
<div slot="content"> <div slot="content">
<ul class="flex sku-ul">
<li
v-for="(item, index) in skuTableColumn"
:key="index"
>
{{ item.title }}
</li>
</ul>
<div
class="mt_10 flex sku-editor"
v-for="(item, index) in skuTableData"
:key="index"
>
<div
v-for="(spec, specIndex) in skuTableColumn.filter(
(val) => {
return val.key;
}
)"
:key="specIndex"
>
{{
skuTableData[index][
spec.title || spec.key || spec.___key
]
}}
</div>
<div
v-if="
skuTableColumn.find((val) => {
return val.slot == 'weight';
})
"
>
<Input
clearable
:min="0"
v-model="item.weight"
placeholder="请输入重量"
@on-change="updateSkuTable(item, 'weight', index)"
/>
</div>
<div>
<Input
clearable
v-model="item.sn"
placeholder="请输入货号"
@on-change="updateSkuTable(item, 'sn', index)"
/>
</div>
<div>
<InputNumber
clearable
class="input-number"
:min="0"
v-model="item.quantity"
placeholder="请输入库存"
@on-change="updateSkuTable(item, 'quantity', index)"
/>
</div>
<div>
<InputNumber
clearable
class="input-number"
:min="0"
v-model="item.cost"
placeholder="请输入成本价"
@on-change="updateSkuTable(item, 'cost', index)"
/>
</div>
<div>
<InputNumber
class="input-number"
clearable
:min="0"
v-model="item.price"
placeholder="请输入价格"
@on-change="updateSkuTable(item, 'price', index)"
/>
</div>
<div>
<Button @click="editSkuPicture(item)"
>编辑图片</Button
>
</div>
</div>
<!-- #TODO 此处有待优化 --> <!-- #TODO 此处有待优化 -->
<Table <!-- <Table
class="mt_10"
:columns="skuTableColumn" :columns="skuTableColumn"
:data="skuTableData" :data="skuTableData"
style=" style="
@ -291,6 +409,15 @@
</template> </template>
<template slot-scope="{ row }" slot="images"> <template slot-scope="{ row }" slot="images">
<Button @click="editSkuPicture(row)"></Button> <Button @click="editSkuPicture(row)"></Button>
</template>
</Table> -->
</div>
</div>
</Panel>
</Collapse>
</div>
<Modal <Modal
v-model="showSkuPicture" v-model="showSkuPicture"
:styles="{ top: '30px' }" :styles="{ top: '30px' }"
@ -349,18 +476,15 @@
</div> </div>
</Upload> </Upload>
</Modal> </Modal>
</template>
</Table>
</div>
</div>
</Panel>
</Collapse>
</div>
</div> </div>
<h4>商品详情描述</h4> <h4>商品详情描述</h4>
<div class="form-item-view"> <div class="form-item-view">
<div class="tree-bar"> <div class="tree-bar">
<FormItem class="form-item-view-el" label="店内分类" prop="shopCategory"> <FormItem
class="form-item-view-el"
label="店内分类"
prop="shopCategory"
>
<Tree <Tree
ref="tree" ref="tree"
style="text-align: left" style="text-align: left"
@ -375,14 +499,25 @@
<FormItem class="form-item-view-el" label="商品描述" prop="intro"> <FormItem class="form-item-view-el" label="商品描述" prop="intro">
<editor eid="intro" v-model="baseInfoForm.intro"></editor> <editor eid="intro" v-model="baseInfoForm.intro"></editor>
</FormItem> </FormItem>
<FormItem class="form-item-view-el" label="移动端描述" prop="skuList"> <FormItem
<editor eid="mobileIntro" v-model="baseInfoForm.mobileIntro"></editor> class="form-item-view-el"
label="移动端描述"
prop="skuList"
>
<editor
eid="mobileIntro"
v-model="baseInfoForm.mobileIntro"
></editor>
</FormItem> </FormItem>
</div> </div>
<div v-if="baseInfoForm.goodsType != 'VIRTUAL_GOODS'"> <div v-if="baseInfoForm.goodsType != 'VIRTUAL_GOODS'">
<h4>商品物流信息</h4> <h4>商品物流信息</h4>
<div class="form-item-view"> <div class="form-item-view">
<FormItem class="form-item-view-el" label="物流模板" prop="templateId"> <FormItem
class="form-item-view-el"
label="物流模板"
prop="templateId"
>
<Select v-model="baseInfoForm.templateId" style="width: 200px"> <Select v-model="baseInfoForm.templateId" style="width: 200px">
<Option <Option
v-for="item in logisticsTemplate" v-for="item in logisticsTemplate"
@ -395,7 +530,11 @@
</div> </div>
<h4>其他信息</h4> <h4>其他信息</h4>
<div class="form-item-view"> <div class="form-item-view">
<FormItem class="form-item-view-el" label="商品发布" prop="release"> <FormItem
class="form-item-view-el"
label="商品发布"
prop="release"
>
<RadioGroup <RadioGroup
type="button" type="button"
button-style="solid" button-style="solid"
@ -409,7 +548,11 @@
</Radio> </Radio>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
<FormItem class="form-item-view-el" label="商品推荐" prop="skuList"> <FormItem
class="form-item-view-el"
label="商品推荐"
prop="skuList"
>
<RadioGroup <RadioGroup
type="button" type="button"
button-style="solid" button-style="solid"
@ -656,6 +799,7 @@ export default {
], ],
}; };
}, },
methods: { methods: {
/** /**
* 选择参数 * 选择参数
@ -674,14 +818,15 @@ export default {
}; };
} }
//id //id
this.baseInfoForm.goodsParamsDTOList[groupIndex].groupId = paramsGroup.groupId; this.baseInfoForm.goodsParamsDTOList[groupIndex].groupId =
this.baseInfoForm.goodsParamsDTOList[groupIndex].groupName = paramsGroup.groupName; paramsGroup.groupId;
this.baseInfoForm.goodsParamsDTOList[groupIndex].groupName =
paramsGroup.groupName;
// //
if ( if (
!this.baseInfoForm.goodsParamsDTOList[groupIndex].goodsParamsItemDTOList[ !this.baseInfoForm.goodsParamsDTOList[groupIndex]
paramsIndex .goodsParamsItemDTOList[paramsIndex]
]
) { ) {
this.baseInfoForm.goodsParamsDTOList[groupIndex].goodsParamsItemDTOList[ this.baseInfoForm.goodsParamsDTOList[groupIndex].goodsParamsItemDTOList[
paramsIndex paramsIndex
@ -707,7 +852,8 @@ export default {
}, },
// sku // sku
editSkuPicture(row) { editSkuPicture(row) {
if (row.images && row.images.length > 0) { console.log(row);
if (row.images && row.images.length) {
this.previewPicture = row.images[0].url; this.previewPicture = row.images[0].url;
} }
this.selectedSku = row; this.selectedSku = row;
@ -724,7 +870,9 @@ export default {
}, },
// //
handleRemove(item, index) { handleRemove(item, index) {
this.selectedSku.images = this.selectedSku.images.filter((i) => i.url !== item.url); this.selectedSku.images = this.selectedSku.images.filter(
(i) => i.url !== item.url
);
if (this.selectedSku.images.length > 0 && index === 0) { if (this.selectedSku.images.length > 0 && index === 0) {
this.previewPicture = this.selectedSku.images[0].url; this.previewPicture = this.selectedSku.images[0].url;
} else if (this.selectedSku.images.length < 0) { } else if (this.selectedSku.images.length < 0) {
@ -738,9 +886,8 @@ export default {
}, },
// //
handleRemoveGoodsPicture(file) { handleRemoveGoodsPicture(file) {
this.baseInfoForm.goodsGalleryFiles = this.baseInfoForm.goodsGalleryFiles.filter( this.baseInfoForm.goodsGalleryFiles =
(i) => i.url !== file.url this.baseInfoForm.goodsGalleryFiles.filter((i) => i.url !== file.url);
);
}, },
// sku // sku
updateSkuPicture() { updateSkuPicture() {
@ -762,7 +909,6 @@ export default {
}, },
// //
handleSuccessGoodsPicture(res, file) { handleSuccessGoodsPicture(res, file) {
console.log(res);
if (file.response) { if (file.response) {
file.url = file.response.result; file.url = file.response.result;
this.baseInfoForm.goodsGalleryFiles.push(file); this.baseInfoForm.goodsGalleryFiles.push(file);
@ -795,7 +941,8 @@ export default {
// sku // sku
handleBeforeUpload(file) { handleBeforeUpload(file) {
const check = const check =
this.selectedSku.images !== undefined && this.selectedSku.images.length > 5; this.selectedSku.images !== undefined &&
this.selectedSku.images.length > 5;
if (check) { if (check) {
this.$Notice.warning({ title: "图片数量不能大于五张" }); this.$Notice.warning({ title: "图片数量不能大于五张" });
return false; return false;
@ -804,9 +951,11 @@ export default {
/** 查询商品品牌列表 */ /** 查询商品品牌列表 */
getGoodsBrandList() { getGoodsBrandList() {
API_GOODS.getCategoryBrandListDataSeller(this.categoryId).then((response) => { API_GOODS.getCategoryBrandListDataSeller(this.categoryId).then(
(response) => {
this.brandList = response; this.brandList = response;
}); }
);
}, },
// //
GET_GoodsUnit() { GET_GoodsUnit() {
@ -860,12 +1009,11 @@ export default {
response.result.goodsGalleryList && response.result.goodsGalleryList &&
response.result.goodsGalleryList.length > 0 response.result.goodsGalleryList.length > 0
) { ) {
this.baseInfoForm.goodsGalleryFiles = response.result.goodsGalleryList.map( this.baseInfoForm.goodsGalleryFiles =
(i) => { response.result.goodsGalleryList.map((i) => {
let files = { url: i }; let files = { url: i };
return files; return files;
} });
);
} }
this.Get_SkuInfoByCategory(this.categoryId); this.Get_SkuInfoByCategory(this.categoryId);
@ -892,12 +1040,18 @@ export default {
cost: e.cost, cost: e.cost,
quantity: e.quantity, quantity: e.quantity,
weight: e.weight, weight: e.weight,
// ___keys: [],
}; };
e.specList.forEach((u) => { e.specList.forEach((u) => {
if (u.specName === "images") { if (u.specName === "images") {
sku.images = u.specImage; sku.images = u.specImage;
} else { } else {
sku[u.specName] = u.specValue; sku[u.specName] = u.specValue;
// keys
// sku.___keys.push({
// key: u.specName,
// value: u.specValue,
// });
if ( if (
!skusInfo.some((s) => s.name === u.specName) && !skusInfo.some((s) => s.name === u.specName) &&
!this.ignoreColumn.includes(u.specName) !this.ignoreColumn.includes(u.specName)
@ -910,6 +1064,7 @@ export default {
id: u.specValueId, id: u.specValueId,
name: u.specName, name: u.specName,
value: u.specValue || "", value: u.specValue || "",
___key: u.specValue || "",
}, },
], ],
}); });
@ -923,6 +1078,7 @@ export default {
id: u.specValueId, id: u.specValueId,
name: u.specName, name: u.specName,
value: u.specValue || "", value: u.specValue || "",
___key: u.specValue || "",
}); });
} }
if (!sk.spec_id && u.specName === "specId") { if (!sk.spec_id && u.specName === "specId") {
@ -937,12 +1093,14 @@ export default {
}); });
this.skuInfo = skusInfo; this.skuInfo = skusInfo;
this.renderTableData(); this.renderTableData();
this.skuTableData = skus; this.skuTableData = skus;
}, },
/** 根据当前分类id查询商品应包含的参数 */ /** 根据当前分类id查询商品应包含的参数 */
GET_GoodsParams() { GET_GoodsParams() {
API_GOODS.getCategoryParamsListDataSeller(this.categoryId).then((response) => { API_GOODS.getCategoryParamsListDataSeller(this.categoryId).then(
(response) => {
if (!response || response.length <= 0) { if (!response || response.length <= 0) {
return; return;
} }
@ -974,7 +1132,8 @@ export default {
} else { } else {
this.baseInfoForm.goodsParamsDTOList = []; this.baseInfoForm.goodsParamsDTOList = [];
} }
}); }
);
}, },
/** 添加规格项 */ /** 添加规格项 */
addSkuItem() { addSkuItem() {
@ -985,18 +1144,11 @@ export default {
// //
this.$set(this.skuInfo, this.skuInfo.length, { this.$set(this.skuInfo, this.skuInfo.length, {
spec_values: [], spec_values: [],
name: "规格名", name: "规格名" + (this.skuInfo.length + 1),
}); });
this.renderTableData(); // this.renderTableData();
},
//
editSkuItem() {
this.renderTableData();
},
//
async skuValueChange(val, index, item) {
this.renderTableData();
}, },
// //
changeSkuVals(name) { changeSkuVals(name) {
if (name) { if (name) {
@ -1009,14 +1161,7 @@ export default {
}); });
} }
}, },
/** 移除当前规格项 进行数据变化*/
handleCloseSkuItem($index) {
this.skuInfo.splice($index, 1);
/**
* 渲染规格详细表格
*/
this.renderTableData();
},
// //
validateEmpty(params) { validateEmpty(params) {
let flag = true; let flag = true;
@ -1042,6 +1187,7 @@ export default {
this.$set(item.spec_values, item.spec_values.length, { this.$set(item.spec_values, item.spec_values.length, {
name: item.name, name: item.name,
value: "", value: "",
___key: "",
}); });
this.baseInfoForm.regeneratorSkuFlag = true; this.baseInfoForm.regeneratorSkuFlag = true;
/** /**
@ -1051,27 +1197,99 @@ export default {
} }
}, },
/** 移除当前规格值 */ /** 移除当前规格项 进行数据变化*/
handleCloseSkuValue(item, index) { handleCloseSkuItem(item, $index) {
item.spec_values.splice(index, 1); console.log(item);
let oldsSkuTableData = cloneObj(this.skuTableData);
oldsSkuTableData.forEach((sku, i) => {
if (sku[item.name]) {
delete sku[item.name];
}
});
this.skuTableData = oldsSkuTableData;
this.skuTableColumn.forEach((column, i) => {
if (column.key == item.name) {
this.skuTableColumn.splice(i, 1);
}
});
this.skuInfo.splice($index, 1);
},
this.baseInfoForm.regeneratorSkuFlag = true;
/** /**
* 渲染规格详细表格 * 移除当前规格值
* 找到一样规格的值进行移出
*/ */
this.renderTableData(); handleCloseSkuValue(item, index) {
let oldsSkuTableData = cloneObj(this.skuTableData);
console.log("oldsSkuTableData", oldsSkuTableData);
this.skuTableData = oldsSkuTableData.filter((sku, i) => {
if (
sku[item.spec_values[index].name] != item.spec_values[index].value
) {
return sku;
}
});
item.spec_values.splice(index, 1);
this.baseInfoForm.regeneratorSkuFlag = true;
},
/**
* 编辑规格值
* 根据当前___keys的索引指定需修改的值
* @param {*} change 返回input更改的值
* @param {*} index 修改规格名的索引
* @param {*} item 当前规格值
*/
async handleSkuValue(change, index, item) {
this.skuTableData.map((sku, i) => {
// key
if (sku[item.name] == item.___key) {
sku[item.name] = change;
console.log(1);
} else if (!item.___key && !sku[item.name]) {
//
sku[item.name] = change;
console.log("赋值", sku);
}
});
item.___key = change;
},
/**
* 编辑规格名
* 根据修改的规格名将skuTableData的key(规格名)进行修改
* @param {*} change 返回input更改的值
* @param {*} index 修改规格名的索引
*/
handleSkuTitle(change, index) {
let oldSkuTableColumn = cloneObj(this.skuTableColumn);
this.skuTableData.forEach((sku, i) => {
Object.keys(sku).forEach((key) => {
if (oldSkuTableColumn[index].key == key) {
// sku
sku = {
[change]: sku[key],
...sku,
};
delete sku[key];
this.skuTableData[i] = sku;
}
});
});
this.skuTableColumn[index].key = change;
this.skuTableColumn[index].title = change;
}, },
/** /**
* 渲染table所需要的column data * 渲染table所需要的column data
*/ */
renderTableData() { renderTableData() {
this.skuTableColumn = [];
this.skuTableData = [];
let pushData = []; let pushData = [];
// //
this.skuInfo.forEach((sku) => { this.skuInfo.forEach((sku) => {
// !sku.name ? (sku.name = "") : "";
// //
let columnName = sku.name; let columnName = sku.name;
pushData.push({ pushData.push({
@ -1112,14 +1330,20 @@ export default {
this.skuTableColumn = pushData; this.skuTableColumn = pushData;
// //
let cloneTemp = cloneObj(this.skuInfo); let cloneTemp = cloneObj(this.skuInfo);
if (cloneTemp.length) {
cloneTemp.map((temp) => {
return {
[temp.name]: temp.value,
images: this.baseInfoForm.goodsGalleryFiles || [],
};
});
}
//
this.$set(this, "skuTableData", []);
// //
if (cloneTemp[0]) { if (cloneTemp[0]) {
// //
let result = []; let result = [];
// sku //
cloneTemp[0].spec_values.forEach((specItem) => { cloneTemp[0].spec_values.forEach((specItem) => {
result.push({ result.push({
[cloneTemp[0].name]: specItem.value, [cloneTemp[0].name]: specItem.value,
@ -1128,8 +1352,14 @@ export default {
}); });
cloneTemp.splice(0, 1); cloneTemp.splice(0, 1);
result = this.specIterator(result, cloneTemp); result = this.specIterator(result, cloneTemp);
// skuTable
let oldData = cloneObj(this.skuTableData);
this.skuTableData = result; this.skuTableData = result;
console.log(this.skuTableData); // skuTable
this.skuTableData = Object.assign(this.skuTableData, oldData);
console.log(result, this.skuTableData);
} }
}, },
/** /**
@ -1141,16 +1371,25 @@ export default {
// //
if (cloneTemp.length > 0) { if (cloneTemp.length > 0) {
let table = []; let table = [];
result.forEach((resItem) => { let newVal = []; //
result.forEach((resItem, i) => {
cloneTemp[0].spec_values.forEach((valItem) => { cloneTemp[0].spec_values.forEach((valItem) => {
let obj = cloneObj(resItem); let obj = cloneObj(resItem);
obj[cloneTemp[0].name] = valItem.value; obj[cloneTemp[0].name] = valItem.value;
if (valItem.value) {
table.push(obj); table.push(obj);
} else {
newVal.push(obj);
}
}); });
}); });
result = []; result = [];
table.push(...newVal);
table.forEach((t) => { table.forEach((t) => {
console.log("t", t);
result.push(t); result.push(t);
}); });
// //
@ -1160,6 +1399,7 @@ export default {
} }
return this.specIterator(result, cloneTemp); return this.specIterator(result, cloneTemp);
}, },
/** 根据分类id获取系统设置规格信息*/ /** 根据分类id获取系统设置规格信息*/
Get_SkuInfoByCategory(categoryId) { Get_SkuInfoByCategory(categoryId) {
if (categoryId) { if (categoryId) {
@ -1179,8 +1419,7 @@ export default {
return option.toUpperCase().indexOf(value.toUpperCase()) !== -1; return option.toUpperCase().indexOf(value.toUpperCase()) !== -1;
}, },
/** 数据改变之后 抛出数据 */ /** 数据改变之后 抛出数据 */
updateSkuTable(row, item, type = "deafult") { updateSkuTable(row, item, index) {
let index = row._index;
this.baseInfoForm.regeneratorSkuFlag = true; this.baseInfoForm.regeneratorSkuFlag = true;
/** 进行自定义校验 判断是否是数字(小数也能通过)重量 */ /** 进行自定义校验 判断是否是数字(小数也能通过)重量 */
if (item === "weight") { if (item === "weight") {
@ -1218,6 +1457,7 @@ export default {
} }
} }
this.$nextTick(() => { this.$nextTick(() => {
console.log(index, item);
this.skuTableData[index][item] = row[item]; this.skuTableData[index][item] = row[item];
}); });
// this.$set(this.skuTableData,[index][item],row[item]) // this.$set(this.skuTableData,[index][item],row[item])
@ -1257,7 +1497,10 @@ export default {
this.$refs["baseInfoForm"].validate((valid) => { this.$refs["baseInfoForm"].validate((valid) => {
if (valid) { if (valid) {
let submit = JSON.parse(JSON.stringify(this.baseInfoForm)); let submit = JSON.parse(JSON.stringify(this.baseInfoForm));
if (submit.goodsGalleryFiles && submit.goodsGalleryFiles.length <= 0) { if (
submit.goodsGalleryFiles &&
submit.goodsGalleryFiles.length <= 0
) {
this.submitLoading = false; this.submitLoading = false;
this.$Message.error("请上传商品图片"); this.$Message.error("请上传商品图片");
return; return;
@ -1279,15 +1522,22 @@ export default {
delete sku.specValueId; delete sku.specValueId;
return sku; return sku;
}); });
if (this.firstData.tempId) {
delete submit.id;
}
if (submit.goodsGalleryFiles.length > 0) { if (submit.goodsGalleryFiles.length > 0) {
submit.goodsGalleryList = submit.goodsGalleryFiles.map((i) => i.url); submit.goodsGalleryList = submit.goodsGalleryFiles.map(
(i) => i.url
);
} }
/** 参数校验 **/ /** 参数校验 **/
/* Object.keys(submit.goodsParamsList).forEach((item) => { /* Object.keys(submit.goodsParamsList).forEach((item) => {
});*/ });*/
submit.release ? (submit.release = true) : (submit.release = false); submit.release ? (submit.release = true) : (submit.release = false);
submit.recommend ? (submit.recommend = true) : (submit.recommend = false); submit.recommend
? (submit.recommend = true)
: (submit.recommend = false);
if (this.goodsId) { if (this.goodsId) {
API_GOODS.editGoods(this.goodsId, submit).then((res) => { API_GOODS.editGoods(this.goodsId, submit).then((res) => {
@ -1320,9 +1570,8 @@ export default {
saveToDraft() { saveToDraft() {
this.baseInfoForm.skuList = this.skuTableData; this.baseInfoForm.skuList = this.skuTableData;
if (this.baseInfoForm.goodsGalleryFiles.length > 0) { if (this.baseInfoForm.goodsGalleryFiles.length > 0) {
this.baseInfoForm.goodsGalleryList = this.baseInfoForm.goodsGalleryFiles.map( this.baseInfoForm.goodsGalleryList =
(i) => i.url this.baseInfoForm.goodsGalleryFiles.map((i) => i.url);
);
} }
this.baseInfoForm.categoryName = []; this.baseInfoForm.categoryName = [];
this.baseInfoForm.saveType = "TEMPLATE"; this.baseInfoForm.saveType = "TEMPLATE";
@ -1412,4 +1661,30 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "./addGoods.scss"; @import "./addGoods.scss";
.sku-ul {
align-items: center;
padding: 10px 0;
border-radius: 0.4em;
background: #f3f5f7;
> li {
flex: 1;
text-align: center;
font-weight: bold;
padding: 10px;
}
}
.sku-editor {
> div {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
padding: 10px;
}
}
.input-number {
width: 100%;
}
</style> </style>

View File

@ -4,10 +4,10 @@ import {commonUrl, getRequestWithNoToken, postRequestWithNoToken} from '@/libs/a
// 获取拼图验证 // 获取拼图验证
export const getVerifyImg = (verificationEnums) => { export const getVerifyImg = (verificationEnums) => {
return getRequestWithNoToken(`${commonUrl}/common/slider/${verificationEnums}`); return getRequestWithNoToken(`${commonUrl}/common/common/slider/${verificationEnums}`);
}; };
// 拼图验证 // 拼图验证
export const postVerifyImg = (params) => { export const postVerifyImg = (params) => {
return postRequestWithNoToken(`${commonUrl}/common/slider/${params.verificationEnums}`, params); return postRequestWithNoToken(`${commonUrl}/common/common/slider/${params.verificationEnums}`, params);
}; };

View File

@ -52,7 +52,7 @@ export default {
data() { data() {
return { return {
file: "", file: "",
action: baseUrl + "/orders/batchDeliver", // action: baseUrl + "/order/order/batchDeliver", //
accessToken: {}, // token accessToken: {}, // token
// //
stepList: [ stepList: [

View File

@ -78,7 +78,7 @@
> >
<Button <Button
type="success" type="success"
v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'" v-if="row.promotionStatus === 'CLOSE'"
style="margin-left: 5px" style="margin-left: 5px"
size="small" size="small"
@click="openOrClose(row)" @click="openOrClose(row)"

View File

@ -1,9 +1,8 @@
<template> <template>
<div> <div>
<Card style="position:relative;"> <Card style="position: relative">
<Spin size="large" fix v-if="spinShow"></Spin> <Spin size="large" fix v-if="spinShow"></Spin>
<Alert type="warning"> <Alert type="warning">
<template slot="desc"> <template slot="desc">
为了方便在创建直播间时从选择商品请尽量提前提审直播商品 为了方便在创建直播间时从选择商品请尽量提前提审直播商品
</template> </template>
@ -11,64 +10,128 @@
<Form :model="liveForm" ref="liveForm" :rules="liveRulesForm" :label-width="120"> <Form :model="liveForm" ref="liveForm" :rules="liveRulesForm" :label-width="120">
<FormItem label="直播标题" prop="name"> <FormItem label="直播标题" prop="name">
<Input :disabled="liveStatus!='NEW'" v-model="liveForm.name" style="width:460px"></Input> <Input
<div class="tips">直播间名字最短3个汉字最长17个汉字1个汉字相当于2个字符</div> :disabled="liveStatus != 'NEW'"
v-model="liveForm.name"
style="width: 460px"
></Input>
<div class="tips">
直播间名字最短3个汉字最长17个汉字1个汉字相当于2个字符
</div>
</FormItem> </FormItem>
<FormItem label="主播昵称" prop="anchorName"> <FormItem label="主播昵称" prop="anchorName">
<Input :disabled="liveStatus!='NEW'" v-model="liveForm.anchorName" style="width:360px"></Input> <Input
<div class="tips">主播昵称最短2个汉字最长15个汉字1个汉字相当于2个字符</div> :disabled="liveStatus != 'NEW'"
v-model="liveForm.anchorName"
style="width: 360px"
></Input>
<div class="tips">
主播昵称最短2个汉字最长15个汉字1个汉字相当于2个字符
</div>
</FormItem> </FormItem>
<FormItem label="直播时间" prop="startTime"> <FormItem label="直播时间" prop="startTime">
<DatePicker
<DatePicker :disabled="liveStatus!='NEW'" format="yyyy-MM-dd HH:mm" type="datetimerange" v-model="times" @on-change="handleChangeTime" :options="optionsTime" placeholder="直播计划开始时间-直播计划结束时间" :disabled="liveStatus != 'NEW'"
style="width: 300px"> format="yyyy-MM-dd HH:mm"
type="datetimerange"
v-model="times"
@on-change="handleChangeTime"
:options="optionsTime"
placeholder="直播计划开始时间-直播计划结束时间"
style="width: 300px"
>
</DatePicker> </DatePicker>
<div class="tips">直播开播时间需要在当前时间的10分钟后并且,开始时间不能在6个月后,直播计划结束时间开播时间和结束时间间隔不得短于30分钟不得超过24小时</div> <div class="tips">
直播开播时间需要在当前时间的10分钟后并且,开始时间不能在6个月后,直播计划结束时间开播时间和结束时间间隔不得短于30分钟不得超过24小时
</div>
</FormItem> </FormItem>
<FormItem label="主播微信号" prop="anchorWechat"> <FormItem label="主播微信号" prop="anchorWechat">
<Input :disabled="liveStatus!='NEW'" v-model="liveForm.anchorWechat" style="width:360px" placeholder="主播微信号"></Input> <Input
<div class="tips">主播微信号如果未实名认证需要先前往小程序直播小程序进行<a target="_black" href="https://res.wx.qq.com/op_res/9rSix1dhHfK4rR049JL0PHJ7TpOvkuZ3mE0z7Ou_Etvjf-w1J_jVX0rZqeStLfwh">实名验证</a></div> :disabled="liveStatus != 'NEW'"
v-model="liveForm.anchorWechat"
style="width: 360px"
placeholder="主播微信号"
></Input>
<div class="tips">
主播微信号如果未实名认证需要先前往小程序直播小程序进行<a
target="_black"
href="https://res.wx.qq.com/op_res/9rSix1dhHfK4rR049JL0PHJ7TpOvkuZ3mE0z7Ou_Etvjf-w1J_jVX0rZqeStLfwh"
>实名验证</a
>
</div>
</FormItem> </FormItem>
<!-- 分享卡片 --> <!-- 分享卡片 -->
<FormItem label="分享卡片封面" prop="feedsImg"> <FormItem label="分享卡片封面" prop="feedsImg">
<div class="upload-list" v-if="liveForm.feedsImg"> <div class="upload-list" v-if="liveForm.feedsImg">
<template> <template>
<img :src="liveForm.feedsImg"> <img :src="liveForm.feedsImg" />
<div class="upload-list-cover"> <div class="upload-list-cover">
<Icon type="ios-eye-outline" @click.native="handleView(liveForm.feedsImg)"></Icon> <Icon
<Icon type="ios-trash-outline" @click.native="handleRemove('feedsImg')"></Icon> type="ios-eye-outline"
@click.native="handleView(liveForm.feedsImg)"
></Icon>
<Icon
type="ios-trash-outline"
@click.native="handleRemove('feedsImg')"
></Icon>
</div> </div>
</template> </template>
</div> </div>
<Upload v-if="liveForm.feedsImg.length ==0" ref="upload" :show-upload-list="false" :on-success="handleFeedsImgSuccess" :format="['jpg','jpeg','png']" :on-format-error="handleFormatError" <Upload
:max-size="1024" :on-exceeded-size="handleMaxSize" type="drag" :action="action" :headers="accessToken" style="display: inline-block;width:58px;"> v-if="liveForm.feedsImg.length == 0"
<div style="width: 58px;height:58px;line-height: 58px;"> ref="upload"
:show-upload-list="false"
:on-success="handleFeedsImgSuccess"
:format="['jpg', 'jpeg', 'png']"
:on-format-error="handleFormatError"
:max-size="1024"
:on-exceeded-size="handleMaxSize"
type="drag"
:action="action"
:headers="accessToken"
style="display: inline-block; width: 58px"
>
<div style="width: 58px; height: 58px; line-height: 58px">
<Icon type="ios-camera" size="20"></Icon> <Icon type="ios-camera" size="20"></Icon>
</div> </div>
</Upload> </Upload>
<div class="tips"> <div class="tips">直播间分享图图片规则建议像素800*640大小不超过1M</div>
直播间分享图图片规则建议像素800*640大小不超过1M
</div>
</FormItem> </FormItem>
<!-- 直播间背景墙 --> <!-- 直播间背景墙 -->
<FormItem label="直播间背景墙" prop="coverImg"> <FormItem label="直播间背景墙" prop="coverImg">
<div class="upload-list" v-if="liveForm.coverImg"> <div class="upload-list" v-if="liveForm.coverImg">
<template> <template>
<img :src="liveForm.coverImg"> <img :src="liveForm.coverImg" />
<div class="upload-list-cover"> <div class="upload-list-cover">
<Icon type="ios-eye-outline" @click.native="handleView(liveForm.coverImg)"></Icon> <Icon
<Icon type="ios-trash-outline" @click.native="handleRemove('coverImg')"></Icon> type="ios-eye-outline"
@click.native="handleView(liveForm.coverImg)"
></Icon>
<Icon
type="ios-trash-outline"
@click.native="handleRemove('coverImg')"
></Icon>
</div> </div>
</template> </template>
</div> </div>
<Upload v-if="liveForm.coverImg.length ==0" ref="upload" :show-upload-list="false" :on-success="handleCoverImgSuccess" :format="['jpg','jpeg','png']" :on-format-error="handleFormatError" <Upload
:max-size="1024" :on-exceeded-size="handleMaxSize" type="drag" :action="action" :headers="accessToken" style="display: inline-block;width:58px;"> v-if="liveForm.coverImg.length == 0"
<div style="width: 58px;height:58px;line-height: 58px;"> ref="upload"
:show-upload-list="false"
:on-success="handleCoverImgSuccess"
:format="['jpg', 'jpeg', 'png']"
:on-format-error="handleFormatError"
:max-size="1024"
:on-exceeded-size="handleMaxSize"
type="drag"
:action="action"
:headers="accessToken"
style="display: inline-block; width: 58px"
>
<div style="width: 58px; height: 58px; line-height: 58px">
<Icon type="ios-camera" size="20"></Icon> <Icon type="ios-camera" size="20"></Icon>
</div> </div>
</Upload> </Upload>
@ -77,19 +140,36 @@
<!-- 直播间背景墙 --> <!-- 直播间背景墙 -->
<FormItem label="直播间分享图" prop="shareImg"> <FormItem label="直播间分享图" prop="shareImg">
<div class="upload-list" v-if="liveForm.shareImg"> <div class="upload-list" v-if="liveForm.shareImg">
<template> <template>
<img :src="liveForm.shareImg"> <img :src="liveForm.shareImg" />
<div class="upload-list-cover"> <div class="upload-list-cover">
<Icon type="ios-eye-outline" @click.native="handleView(liveForm.shareImg)"></Icon> <Icon
<Icon type="ios-trash-outline" @click.native="handleRemove('shareImg')"></Icon> type="ios-eye-outline"
@click.native="handleView(liveForm.shareImg)"
></Icon>
<Icon
type="ios-trash-outline"
@click.native="handleRemove('shareImg')"
></Icon>
</div> </div>
</template> </template>
</div> </div>
<Upload v-if="liveForm.shareImg.length ==0" ref="upload" :show-upload-list="false" :on-success="handleShareImgSuccess" :format="['jpg','jpeg','png']" :on-format-error="handleFormatError" <Upload
:max-size="1024" :on-exceeded-size="handleMaxSize" type="drag" :action="action" :headers="accessToken" style="display: inline-block;width:58px;"> v-if="liveForm.shareImg.length == 0"
<div style="width: 58px;height:58px;line-height: 58px;"> ref="upload"
:show-upload-list="false"
:on-success="handleShareImgSuccess"
:format="['jpg', 'jpeg', 'png']"
:on-format-error="handleFormatError"
:max-size="1024"
:on-exceeded-size="handleMaxSize"
type="drag"
:action="action"
:headers="accessToken"
style="display: inline-block; width: 58px"
>
<div style="width: 58px; height: 58px; line-height: 58px">
<Icon type="ios-camera" size="20"></Icon> <Icon type="ios-camera" size="20"></Icon>
</div> </div>
</Upload> </Upload>
@ -97,20 +177,32 @@
</FormItem> </FormItem>
<FormItem label="商品" v-if="$route.query.id"> <FormItem label="商品" v-if="$route.query.id">
<Button type="primary" ghost @click="liveGoodsVisible=true" :disabled="liveStatus!='NEW'" icon="md-add">添加商品</Button> <Button
type="primary"
ghost
@click="liveGoodsVisible = true"
:disabled="liveStatus != 'NEW'"
icon="md-add"
>添加商品</Button
>
<Table class="goods-table" :columns="liveColumns" :data="liveData"> <Table class="goods-table" :columns="liveColumns" :data="liveData">
<template slot-scope="{ row, index }" slot="goodsName"> <template slot-scope="{ row, index }" slot="goodsName">
<div class="flex-goods"> <div class="flex-goods">
<Badge v-if="index == 0 || index == 1" color="volcano"></Badge> <Badge v-if="index == 0 || index == 1" color="volcano"></Badge>
<img class="thumbnail" :src="row.thumbnail || row.goodsImage"> <img class="thumbnail" :src="row.thumbnail || row.goodsImage" />
{{ row.goodsName || row.name }} {{ row.goodsName || row.name }}
</div> </div>
</template> </template>
<template slot-scope="{ row }" class="price" slot="price"> <template slot-scope="{ row }" class="price" slot="price">
<div> <div>
<div v-if="row.priceType == 1">{{row.price | unitPrice('')}}</div> <div v-if="row.priceType == 1">{{ row.price | unitPrice("") }}</div>
<div v-if="row.priceType == 2">{{row.price | unitPrice('')}}{{row.price2 | unitPrice('')}}</div> <div v-if="row.priceType == 2">
<div v-if="row.priceType == 3">{{row.price | unitPrice('¥')}}<span class="original-price">{{row.price2 | unitPrice('')}}</span></div> {{ row.price | unitPrice("¥") }}{{ row.price2 | unitPrice("¥") }}
</div>
<div v-if="row.priceType == 3">
{{ row.price | unitPrice("¥")
}}<span class="original-price">{{ row.price2 | unitPrice("¥") }}</span>
</div>
</div> </div>
</template> </template>
<template slot-scope="{ row }" slot="quantity"> <template slot-scope="{ row }" slot="quantity">
@ -118,9 +210,29 @@
</template> </template>
<template slot-scope="{ row, index }" slot="action"> <template slot-scope="{ row, index }" slot="action">
<div class="action"> <div class="action">
<Button size="small" type="primary" :disabled="liveStatus!='NEW'" @click="deleteGoods(row,index)"></Button> <Button
<Button size="small" ghost type="primary" :disabled="liveStatus!='NEW'" @click="onMove(row.id,1)"></Button> size="small"
<Button size="small" ghost type="primary" :disabled="liveStatus!='NEW'" @click="onMove(row.id,0)"></Button> type="primary"
:disabled="liveStatus != 'NEW'"
@click="deleteGoods(row, index)"
>删除</Button
>
<Button
size="small"
ghost
type="primary"
:disabled="liveStatus != 'NEW'"
@click="onMove(row.id, 1)"
>上移</Button
>
<Button
size="small"
ghost
type="primary"
:disabled="liveStatus != 'NEW'"
@click="onMove(row.id, 0)"
>下移</Button
>
</div> </div>
</template> </template>
</Table> </Table>
@ -130,13 +242,15 @@
</FormItem> </FormItem>
<FormItem> <FormItem>
<Button type="primary" v-if="liveStatus=='NEW'" @click="createLives()"></Button> <Button type="primary" v-if="liveStatus == 'NEW'" @click="createLives()"
>保存</Button
>
</FormItem> </FormItem>
</Form> </Form>
</Card> </Card>
<!-- 浏览图片 --> <!-- 浏览图片 -->
<Modal title="查看图片" v-model="imageVisible"> <Modal title="查看图片" v-model="imageVisible">
<img :src="imageSrc" v-if="imageVisible" style="width: 100%"> <img :src="imageSrc" v-if="imageVisible" style="width: 100%" />
</Modal> </Modal>
<Modal width="800" v-model="liveGoodsVisible" footer-hide> <Modal width="800" v-model="liveGoodsVisible" footer-hide>
@ -184,24 +298,16 @@ export default {
{ required: true, message: "请输入主播昵称", trigger: "blur" }, { required: true, message: "请输入主播昵称", trigger: "blur" },
{ max: 15, min: 2, message: "主播昵称最短2个汉字最长15个汉字" }, { max: 15, min: 2, message: "主播昵称最短2个汉字最长15个汉字" },
], ],
anchorWechat: [ anchorWechat: [{ required: true, message: "请输入主播微信号", trigger: "blur" }],
{ required: true, message: "请输入主播微信号", trigger: "blur" },
],
startTime: [ startTime: [
{ {
required: true, required: true,
message: "请正确输入开始时间以及结束时间", message: "请正确输入开始时间以及结束时间",
}, },
], ],
feedsImg: [ feedsImg: [{ required: true, message: "分享卡片封面不能为空", trigger: "blur" }],
{ required: true, message: "分享卡片封面不能为空", trigger: "blur" }, coverImg: [{ required: true, message: "直播间背景墙不能为空", trigger: "blur" }],
], shareImg: [{ required: true, message: "直播间分享图不能为空", trigger: "blur" }],
coverImg: [
{ required: true, message: "直播间背景墙不能为空", trigger: "blur" },
],
shareImg: [
{ required: true, message: "直播间分享图不能为空", trigger: "blur" },
],
}, },
liveForm: { liveForm: {
name: "", // name: "", //
@ -438,16 +544,8 @@ export default {
this.times[1] = daterange[1]; this.times[1] = daterange[1];
// this.times = daterange; // this.times = daterange;
this.$set( this.$set(this.liveForm, "startTime", new Date(daterange[0]).getTime() / 1000);
this.liveForm, this.$set(this.liveForm, "endTime", new Date(daterange[1]).getTime() / 1000);
"startTime",
new Date(daterange[0]).getTime() / 1000
);
this.$set(
this.liveForm,
"endTime",
new Date(daterange[1]).getTime() / 1000
);
} }
}, },
@ -493,9 +591,7 @@ export default {
// //
if (this.$route.query.id) { if (this.$route.query.id) {
this.spinShow = true; this.spinShow = true;
this.liveForm.commodityList = JSON.stringify( this.liveForm.commodityList = JSON.stringify(this.liveForm.commodityList);
this.liveForm.commodityList
);
delete this.liveForm.updateTime; delete this.liveForm.updateTime;
// //
editLive(this.liveForm).then((res) => { editLive(this.liveForm).then((res) => {

View File

@ -1,78 +1,177 @@
<template> <template>
<div class="search"> <div class="search">
<Card style="margin-left: 10px"> <Card style="margin-left: 10px">
<Tabs v-model="type" @on-click="handleClickType"> <Tabs v-model="type" @on-click="handleClickType">
<TabPane label="基本信息" name="INFO"> <TabPane label="基本信息" name="INFO">
<Form ref="form" :model="form" :label-width="100" :rules="formValidate"> <Form
ref="form"
:model="form"
:label-width="100"
:rules="formValidate"
>
<FormItem label="店铺名称"> <FormItem label="店铺名称">
<Input v-model="storeName" disabled clearable style="width: 20%"/> <Input
v-model="storeName"
disabled
clearable
style="width: 20%"
/>
</FormItem> </FormItem>
<FormItem label="店铺地址" prop="address"> <FormItem label="店铺地址" prop="address">
<Input v-model="form.address" @on-focus="$refs.liliMap.showMap = true" clearable style="width: 20%"/> <Input
v-model="form.address"
@on-focus="$refs.liliMap.showMap = true"
clearable
style="width: 20%"
/>
</FormItem> </FormItem>
<FormItem label="详细地址" prop="shopAddressDetail"> <FormItem label="详细地址" prop="shopAddressDetail">
<Input v-model="form.storeAddressDetail" clearable style="width: 20%" maxlength="50"/> <Input
v-model="form.storeAddressDetail"
clearable
style="width: 20%"
maxlength="50"
/>
</FormItem> </FormItem>
<FormItem label="店铺LOGO"> <FormItem label="店铺LOGO">
<upload-pic-thumb v-model="form.storeLogo" :multiple="false"></upload-pic-thumb> <upload-pic-thumb
v-model="form.storeLogo"
:multiple="false"
></upload-pic-thumb>
</FormItem> </FormItem>
<FormItem label="店铺简介" prop="content" class="wangEditor"> <FormItem label="店铺简介" prop="content" class="wangEditor">
<Input type="textarea" :rows="8" v-model="form.storeDesc" style="width: 30%"></Input> <Input
type="textarea"
:rows="8"
v-model="form.storeDesc"
style="width: 30%"
></Input>
</FormItem> </FormItem>
<Form-item> <Form-item>
<Button @click="handleSubmit" :loading="submitLoading" type="primary" style="margin-right:5px">修改 <Button
@click="handleSubmit"
:loading="submitLoading"
type="primary"
style="margin-right: 5px"
>修改
</Button> </Button>
</Form-item> </Form-item>
</Form> </Form>
</TabPane> </TabPane>
<TabPane label="退货地址" name="REFUND_GOODS_ADDRESS"> <TabPane label="退货地址" name="REFUND_GOODS_ADDRESS">
<Form ref="addressForm" :model="addressForm" :label-width="100" :rules="afterFormValidate"> <Form
ref="addressForm"
:model="addressForm"
:label-width="100"
:rules="afterFormValidate"
>
<FormItem label="收货人" prop="salesConsigneeName"> <FormItem label="收货人" prop="salesConsigneeName">
<Input v-model="addressForm.salesConsigneeName" maxlength="11" clearable style="width: 20%"/> <Input
v-model="addressForm.salesConsigneeName"
maxlength="11"
clearable
style="width: 20%"
/>
</FormItem> </FormItem>
<FormItem label="收货人电话" prop="salesConsigneeMobile"> <FormItem label="收货人电话" prop="salesConsigneeMobile">
<Input v-model="addressForm.salesConsigneeMobile" maxlength="11" style="width: 20%"/> <Input
v-model="addressForm.salesConsigneeMobile"
maxlength="11"
style="width: 20%"
/>
</FormItem> </FormItem>
<FormItem label="售后地址"> <FormItem label="售后地址">
<Input v-model="region" disabled style="width: 20%" v-if="showRegion == false"/> <Input
<Button v-if="showRegion == false" @click="regionClick" :loading="submitLoading" type="primary" v-model="region"
style="margin-left:8px">修改 disabled
style="width: 20%"
v-if="showRegion == false"
/>
<Button
v-if="showRegion == false"
@click="regionClick"
:loading="submitLoading"
type="primary"
style="margin-left: 8px"
>修改
</Button> </Button>
<regionMap style="width: 20%" @selected="selectedRegion" v-if="showRegion == true"/> <regionMap
style="width: 20%"
@selected="selectedRegion"
v-if="showRegion == true"
/>
</FormItem> </FormItem>
<FormItem label="详细地址" prop="salesConsigneeDetail"> <FormItem label="详细地址" prop="salesConsigneeDetail">
<Input v-model="addressForm.salesConsigneeDetail" clearable style="width: 20%" maxlength="50"/> <Input
v-model="addressForm.salesConsigneeDetail"
clearable
style="width: 20%"
maxlength="50"
/>
</FormItem> </FormItem>
<Form-item> <Form-item>
<Button @click="afterHandleSubmit" :loading="submitLoading" type="primary" style="margin-right:5px">修改 <Button
@click="afterHandleSubmit"
:loading="submitLoading"
type="primary"
style="margin-right: 5px"
>修改
</Button> </Button>
</Form-item> </Form-item>
</Form> </Form>
</TabPane> </TabPane>
<TabPane label="库存预警" name="STOCK_WARNING"> <TabPane label="库存预警" name="STOCK_WARNING">
<Form
<Form ref="stockWarningForm" :model="stockWarningForm" :label-width="100" :rules="stockWarningFormValidate"> ref="stockWarningForm"
:model="stockWarningForm"
:label-width="100"
:rules="stockWarningFormValidate"
>
<FormItem label="预警数" prop="stockWarning"> <FormItem label="预警数" prop="stockWarning">
<Input v-model="stockWarningForm.stockWarning" type="number" maxlength="6" clearable style="width: 20%"/> <InputNumber
:min="0"
:max="99999"
v-model="stockWarningForm.stockWarning"
type="number"
maxlength="6"
clearable
style="width: 20%"
/>
</FormItem> </FormItem>
<Form-item> <Form-item>
<Button @click="stockWarningHandleSubmit" :loading="submitLoading" type="primary" <Button
style="margin-right:5px">修改 @click="stockWarningHandleSubmit"
:loading="submitLoading"
type="primary"
style="margin-right: 5px"
>修改
</Button> </Button>
</Form-item> </Form-item>
</Form> </Form>
</TabPane> </TabPane>
<TabPane label="客服设置" name="UDESK"> <TabPane label="客服设置" name="UDESK">
<Form
<Form ref="udeskForm" :model="udeskForm" :label-width="100" :rules="udeskFormValidate"> ref="udeskForm"
:model="udeskForm"
:label-width="100"
:rules="udeskFormValidate"
>
<FormItem label="坐席id" prop="merchantEuid"> <FormItem label="坐席id" prop="merchantEuid">
<Input v-model="udeskForm.merchantEuid" maxlength="30" clearable style="width: 20%"/> <Input
v-model="udeskForm.merchantEuid"
maxlength="30"
clearable
style="width: 20%"
/>
</FormItem> </FormItem>
<Form-item> <Form-item>
<Button @click="merchantSubmit" :loading="submitLoading" type="primary" <Button
style="margin-right:5px">修改 @click="merchantSubmit"
:loading="submitLoading"
type="primary"
style="margin-right: 5px"
>修改
</Button> </Button>
</Form-item> </Form-item>
</Form> </Form>
@ -121,7 +220,7 @@ export default {
}, },
//im form //im form
udeskForm: { udeskForm: {
merchantEuid: "" merchantEuid: "",
}, },
stockWarningFormValidate: { stockWarningFormValidate: {
stockWarning: [ stockWarning: [
@ -272,7 +371,6 @@ export default {
}); });
}, },
merchantSubmit() { merchantSubmit() {
this.$refs.udeskForm.validate((valid) => { this.$refs.udeskForm.validate((valid) => {
if (valid) { if (valid) {
this.submitLoading = true; this.submitLoading = true;
@ -339,7 +437,7 @@ export default {
this.$set(this.form, "address", item.addr); this.$set(this.form, "address", item.addr);
this.form.storeAddressPath = item.addr; this.form.storeAddressPath = item.addr;
this.form.storeAddressIdPath = item.addrId; this.form.storeAddressIdPath = item.addrId;
this.form.storeCenter = item.position.lng + "," + item.position.lat this.form.storeCenter = item.position.lng + "," + item.position.lat;
}, },
}, },
mounted() { mounted() {