Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
admin-yweb
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yfront
admin-yweb
Commits
20471e6c
Commit
20471e6c
authored
Aug 28, 2018
by
YoMon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改menu
parent
64f698e7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
273 deletions
+57
-273
assets/js/requestApi.js
+2
-144
assets/js/validate.js
+31
-0
layouts/default.vue
+19
-80
nuxt.config-dev.js
+1
-2
pages/about.vue
+0
-46
store/index.js
+4
-1
No files found.
assets/js/requestApi.js
View file @
20471e6c
...
...
@@ -85,150 +85,8 @@ export default {
}
return
true
},
// 获取搜索页头部列表
searchGoods
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/goods/search'
,
obj
,
param
)
},
// 获取订单列表
getOrderList
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/order/searchList.json'
,
obj
,
param
)
},
// 获取所有订单页面,广州二次支付订单导入按钮是否显示
orderPageBtnShow
(
obj
)
{
return
this
.
wRequest
(
'/xhr/order/orderPageStatus.json'
,
obj
)
},
// 获取未支付订单列表
getUnpaylist
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/order/unpaidOrderList.json'
,
obj
,
param
)
},
// 获取选中未支付订单,应支付金额明细
getUnpayAmount
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/order/neddedFees.json'
,
obj
,
param
)
},
// 获取需要编辑的订单的地址信息
editOrderAddress
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/order/getOrderAddress.json'
,
obj
,
param
)
},
// 保存编辑的订单的地址信息
saveOrderAddr
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/order/orderAddressUpdate.json'
,
obj
,
param
)
},
// 获取购物车列表
getCartlist
(
obj
,
param
)
{
return
this
.
postByJson
(
'/xhr/cart/list.json'
,
obj
,
param
)
},
// 更改购物车数量
changeNumInCart
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/cart/updateById.json'
,
obj
,
param
)
},
// 添加到购物车
addGoodToCart
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/cart/addCartByCode.json'
,
obj
,
param
)
},
// 获取购物车数量
cartGoodNum
(
obj
)
{
return
this
.
wRequest
(
'/xhr/cart/getCount.json'
,
obj
)
},
// 删除购物车商品
delCartGoods
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/cart/deleteById.json'
,
obj
,
param
)
},
// 获取头部类目列表
getClassify
(
obj
)
{
return
this
.
wRequest
(
'/xhr/category/all.json'
,
obj
)
},
// 获取商品详情
getGoodsDetail
(
obj
,
goodCode
)
{
return
this
.
wRequest
(
'/xhr/goods/'
+
goodCode
+
'.json'
,
obj
)
},
// 商品详情推荐商品
detailHotGoods
(
obj
)
{
return
this
.
wRequest
(
'/xhr/goods/recommend.json'
,
obj
)
},
// 获取首页内容
getIndexGoods
(
obj
)
{
return
this
.
wRequest
(
'/xhr/goods/indexGoods'
,
obj
)
},
getAddressById
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/area/child.json'
,
obj
,
param
)
},
// 获取平台分销列表
getPlatformList
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/financial/orderPackageList/queryByPage.json'
,
obj
,
param
)
},
// 获取采购财务列表
getPurchaseList
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/report/purchaseFinancial.json'
,
obj
,
param
)
},
// 获取供货财务列表
getSupplyList
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/report/supplyFinancial.json'
,
obj
,
param
)
},
// 取消订单
cancelOrder
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/order/orderCancel'
,
obj
,
param
)
},
// 删除订单
deleteOrder
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/order/orderDelete.json'
,
obj
,
param
)
},
// 订单详情获取商品和订单编号等
orderDetailInfo
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/order/detail.json'
,
obj
,
param
)
},
// 订单详情-获取海关状态
orderCustomSts
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/order/packageCustomsLog.json'
,
obj
,
param
)
},
// 修改身份证号
changePaper
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/order/changePaper.json'
,
obj
,
param
)
},
// 获取确认订单页面商品信息
getConfirmOrder
(
obj
)
{
return
this
.
wRequest
(
'/xhr/order/confirmOrder'
,
obj
)
},
// 获取用户地址列表
addressListGet
(
obj
)
{
return
this
.
wRequest
(
'/xhr/userAddress/list.json'
,
obj
)
},
// 设置为用户默认地址
setAddrDefault
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/userAddress/setDefault.json'
,
obj
,
param
)
},
// 删除用户地址
delUserAddr
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/userAddress/delete.json'
,
obj
,
param
)
},
// 根据地址id获取单个地址详细信息
getAddrFullById
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/userAddress/getById.json'
,
obj
,
param
)
},
// 添加或者修改地址
updateAddrById
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/userAddress/upsert.json'
,
obj
,
param
)
},
// 地址-添加身份证
addIdentityNumber
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/userAddress/addIdentityNumber.json'
,
obj
,
param
)
},
// 提交订单
submitOrder
(
obj
,
param
)
{
return
this
.
postByJson
(
'/xhr/order/submitOrder2.json'
,
obj
,
param
)
},
// 去支付页面获取可使用支付方式和收款方信息
goPayInfo
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/pay/payWay.json'
,
obj
,
param
)
},
// 支付(包含单个订单直接付款和未支付订单页面整体提交)
ordersPay
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/pay/payment.json'
,
obj
,
param
)
},
// 获取账户明细列表
getFinanceDetail
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/financial/accountDetail/queryByPage.json'
,
obj
,
param
)
},
// 获取余额提现列表
getwithdrawList
(
obj
)
{
return
this
.
wRequest
(
'/xhr/finance/withdrawList'
,
obj
)
},
// 获取自有货源列表
getSourceList
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/goods/supplierSearch.json'
,
obj
,
param
)
},
// 获取库存变动列表
getInventoryList
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/goods/inventoryLogSum.json'
,
obj
,
param
)
},
// 获取库存变动详情
getInventoryDetail
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/goods/inventoryLog.json'
,
obj
,
param
)
},
// 库存变动详情导出
InventoryExport
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/goods/exportInventoryLog'
,
obj
,
param
)
},
// 登录页面相关
usrLogin
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/login/submit.json'
,
obj
,
param
)
},
// 退出登录
usrLogout
(
obj
)
{
return
this
.
wRequest
(
'/xhr/login/logout.json'
,
obj
)
},
placeOrderInfo
(
obj
,
param
)
{
return
this
.
postByJson
(
'/xhr/order/initOrder2.json'
,
obj
,
param
)
},
// 获取包裹状态
getPackageType
(
obj
)
{
return
this
.
wRequest
(
'/xhr/order/packageStatus.json'
,
obj
)
},
// 获取海关状态
getCustomType
(
obj
)
{
return
this
.
wRequest
(
'/xhr/order/customsStatus.json'
,
obj
)
},
// 快递接口
getExpress
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/order/getPackageExpInfo.json'
,
obj
,
param
)
},
// 手机验证码(注册用)
getMobileCode
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/login/mobileCode'
,
obj
,
param
)
},
// 注册
register
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/login/register'
,
obj
,
param
)
},
// 获取用户信息
getUserInfo
(
obj
)
{
return
this
.
wRequest
(
'/xhr/web/user/getInfo'
,
obj
)
},
// 手机验证码(修改手机号、修改密码用)
getChangeMobileCode
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/findPassword/getMobileCode.json'
,
obj
,
param
)
},
// 确认输入的验证码是否正确(修改手机号、修改密码用)
confirmMobileCode
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/findPassword/verifyMobileCode.json'
,
obj
,
param
)
},
// 更新手机号码接口
updateMobile
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/web/user/updateMobile.json'
,
obj
,
param
)
},
// 更新用户名
updateName
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/web/user/updateName.json'
,
obj
,
param
)
},
// 修改用户密码
changePassword
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/login/changePassword'
,
obj
,
param
)
},
// 上传头像信息
saveHeadr
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/web/user/updateAvatar.json'
,
obj
,
param
)
},
// 找回密码(第一步):账号验证
verifyAccount
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/findPassword/verifyAccount.json'
,
obj
,
param
)
},
// 找回密码(第三步):手机验证码修改密码
retrievePassword
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/findPassword/retrievePw.json'
,
obj
,
param
)
},
// 找回密码(第二步):发送邮件
sendEmail
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/findPassword/sendEmail.json'
,
obj
,
param
)
},
// 找回密码(第三步):邮件验证
verifyEmail
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/findPassword/verifyEmail.json'
,
obj
,
param
)
},
// 仓库列表
depotList
(
obj
)
{
return
this
.
wRequest
(
'/xhr/depot/list.json'
,
obj
)
},
// 供应商自有货源导出
sourceExport
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/goods/selfGoodsDerive.json'
,
obj
,
param
)
},
// 批量提货即批量添加购物车
addCartBatch
(
obj
,
param
)
{
return
this
.
postByJson
(
'/xhr/cart/addCartBatch'
,
obj
,
param
)
},
// 用户余额信息
moneyInfo
(
obj
)
{
return
this
.
wRequest
(
'/xhr/financial/moneyInfo.json'
,
obj
)
},
// 余额充值
recharge
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/order/recharge.json'
,
obj
,
param
)
},
// 售后申请页面初始化数据
afterSaleInit
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/order/afterSale/applyDetail.json'
,
obj
,
param
)
},
// 售后申请提交
afterSaleSubmit
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/order/afterSale/applySubmit.json'
,
obj
,
param
)
},
// 售后详情
afterSaleDetail
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/order/afterSale/detail.json'
,
obj
,
param
)
},
// 提交售后发货信息
afterSaleSubmitLogis
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/order/afterSale/deliverySubmit.json'
,
obj
,
param
)
},
// 售后申请取消
afterSalecancel
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/order/afterSale/applyCancel.json'
,
obj
,
param
)
},
// 提现页面-提现提交
withdrawCash
(
obj
,
param
)
{
return
this
.
wRequest
(
'/cashWithdraw/confirm.json'
,
obj
,
param
)
},
// 获取订单数量
getSearchCount
(
obj
,
param
)
{
return
this
.
wRequest
(
'/xhr/order/searchCount.json'
,
obj
,
param
)
},
// 获取支付信息
getPayInfo
(
obj
)
{
return
this
.
wRequest
(
'/mock/47/api/shop/profile/pay/list'
,
obj
)
},
// 获取角色权限列表
roleAuthList
(
obj
)
{
return
this
.
wRequest
(
'/xhr/getMenus'
,
obj
)
},
server_getConfig
(
key
)
{
if
(
process
.
env
.
WD_ENV
===
'production'
)
{
var
configp
=
require
(
'../config/config-prod.json'
)
...
...
assets/js/validate.js
0 → 100644
View file @
20471e6c
/**
* 邮箱
* @param {*} s
*/
export
function
isEmail
(
s
)
{
return
/^
([
a-zA-Z0-9_-
])
+@
([
a-zA-Z0-9_-
])
+
((
.
[
a-zA-Z0-9_-
]{2,3}){1,2})
$/
.
test
(
s
)
}
/**
* 手机号码
* @param {*} s
*/
export
function
isMobile
(
s
)
{
return
/^1
[
0-9
]{10}
$/
.
test
(
s
)
}
/**
* 电话号码
* @param {*} s
*/
export
function
isPhone
(
s
)
{
return
/^
([
0-9
]{3,4}
-
)?[
0-9
]{7,8}
$/
.
test
(
s
)
}
/**
* URL地址
* @param {*} s
*/
export
function
isURL
(
s
)
{
return
/^http
[
s
]?
:
\/\/
.*/
.
test
(
s
)
}
layouts/default.vue
View file @
20471e6c
...
...
@@ -35,6 +35,7 @@
<
script
>
import
YCookie
from
'../assets/js/yCookie.js'
// import requestApi from '../assets/js/requestApi.js'
export
default
{
data
()
{
return
{
...
...
@@ -48,16 +49,16 @@ export default {
},
computed
:
{
visitedViews
()
{
return
this
.
$store
.
state
.
systemTags
.
sVisitedViews
//
if (this.tabNow === 0) {
//
return this.$store.state.systemTags.sVisitedViews
//
} else if (this.tabNow === 1) {
//
return this.$store.state.goodsTags.gVisitedViews
//
} else if (this.tabNow === 2) {
//
return this.$store.state.orderTags.oVisitedViews
//
} else {
//
return this.$store.state.financalTags.fVisitedViews
//
}
//
return this.$store.state.systemTags.sVisitedViews
if
(
this
.
tabNow
===
0
)
{
return
this
.
$store
.
state
.
systemTags
.
sVisitedViews
}
else
if
(
this
.
tabNow
===
1
)
{
return
this
.
$store
.
state
.
goodsTags
.
gVisitedViews
}
else
if
(
this
.
tabNow
===
2
)
{
return
this
.
$store
.
state
.
orderTags
.
oVisitedViews
}
else
{
return
this
.
$store
.
state
.
financalTags
.
fVisitedViews
}
}
},
watch
:
{
...
...
@@ -77,82 +78,20 @@ export default {
if
(
!
route
)
{
return
false
}
this
.
$store
.
dispatch
(
'sAddVisitedViews'
,
route
)
// if (this.tabNow === 0) {
// this.$store.dispatch('sAddVisitedViews', route)
// } else if (this.tabNow === 1) {
// this.$store.dispatch('gAddVisitedViews', route)
// } else if (this.tabNow === 2) {
// this.$store.dispatch('oAddVisitedViews', route)
// } else {
// this.$store.dispatch('fAddVisitedViews', route)
// }
},
// 获取列表数据
getOrderCtg
()
{
let
order
=
[]
let
orderPath
=
[]
let
orderId
=
[]
let
laps
=
[]
let
lapPath
=
[]
let
lapId
=
[]
let
finance
=
[]
let
accountPath
=
[]
let
accountId
=
[]
// this.$store.dispatch('sAddVisitedViews', route)
if
(
this
.
tabNow
===
0
)
{
order
=
[
'所有订单'
]
orderPath
=
[
'/y-order/order'
]
orderId
=
[
'0'
]
laps
=
[]
lapPath
=
[]
lapId
=
[]
finance
=
[
'账户安全'
,
'账户信息'
]
accountPath
=
[
'/account/security'
,
'/account/message'
]
accountId
=
[
'0'
,
'1'
]
this
.
$store
.
dispatch
(
'sAddVisitedViews'
,
route
)
}
else
if
(
this
.
tabNow
===
1
)
{
order
=
[
'所有订单'
,
'导入订单'
,
'未支付订单'
]
orderPath
=
[
'/y-order/order'
,
'/y-order/order-import'
,
'/y-order/order-unpaid'
]
orderId
=
[
'0'
,
'1'
,
'2'
]
laps
=
[
'账户明细'
,
'采购财务'
]
lapPath
=
[
'/finance/finance-detail'
,
'/finance/purchase'
]
lapId
=
[
'0'
,
'2'
]
finance
=
[
'账户安全'
,
'账户信息'
]
accountPath
=
[
'/account/security'
,
'/account/message'
]
accountId
=
[
'0'
,
'1'
]
this
.
$store
.
dispatch
(
'gAddVisitedViews'
,
route
)
}
else
if
(
this
.
tabNow
===
2
)
{
order
=
[
'所有订单'
,
'导入订单'
,
'未支付订单'
]
orderPath
=
[
'/y-order/order'
,
'/y-order/order-import'
,
'/y-order/order-unpaid'
]
orderId
=
[
'0'
,
'1'
,
'2'
]
laps
=
[
'账户明细'
,
'采购财务'
,
'供货财物'
,
'平台分销'
]
lapPath
=
[
'/finance/finance-detail'
,
'/finance/purchase'
,
'/finance/supply'
,
'/finance/platform'
]
lapId
=
[
'0'
,
'2'
,
'3'
,
'4'
]
finance
=
[
'账户安全'
,
'账户信息'
]
accountPath
=
[
'/account/security'
,
'/account/message'
]
accountId
=
[
'0'
,
'1'
]
this
.
$store
.
dispatch
(
'oAddVisitedViews'
,
route
)
}
else
{
order
=
[
'所有订单'
,
'未支付订单'
]
orderPath
=
[
'/y-order/order'
,
'/y-order/order-unpaid'
]
orderId
=
[
'0'
,
'2'
]
laps
=
[
'账户明细'
,
'采购财务'
,
'供货财物'
,
'平台分销'
]
lapPath
=
[
'/finance/finance-detail'
,
'/finance/purchase'
,
'/finance/supply'
,
'/finance/platform'
]
lapId
=
[
'0'
,
'2'
,
'3'
,
'4'
]
finance
=
[
'账户安全'
,
'账户信息'
]
accountPath
=
[
'/account/security'
,
'/account/message'
]
accountId
=
[
'0'
,
'1'
]
}
for
(
let
i
=
0
;
i
<
order
.
length
;
i
++
)
{
let
itemOrder
=
{
name
:
order
[
i
],
id
:
orderId
[
i
],
pagePath
:
orderPath
[
i
]}
this
.
orderList
.
push
(
itemOrder
)
}
for
(
let
i
=
0
;
i
<
laps
.
length
;
i
++
)
{
let
itemLaps
=
{
name
:
laps
[
i
],
id
:
lapId
[
i
],
pagePath
:
lapPath
[
i
]}
this
.
lapsList
.
push
(
itemLaps
)
}
for
(
let
i
=
0
;
i
<
finance
.
length
;
i
++
)
{
let
itemFinance
=
{
name
:
finance
[
i
],
id
:
accountId
[
i
],
pagePath
:
accountPath
[
i
]}
this
.
financeList
.
push
(
itemFinance
)
this
.
$store
.
dispatch
(
'fAddVisitedViews'
,
route
)
}
},
// 获取列表数据
getOrderCtg
:
async
function
()
{
},
switchTab
(
e
)
{
this
.
tabNow
=
e
YCookie
.
setLocalCookie
(
'tabNow'
,
this
.
tabNow
)
...
...
nuxt.config-dev.js
View file @
20471e6c
...
...
@@ -2,7 +2,6 @@ var merge = require('webpack-merge')
var
baseConfig
=
require
(
'./nuxt.config.js'
)
module
.
exports
=
merge
(
baseConfig
,
{
proxy
:
{
'/xhr/'
:
'http://www.yang800.com/backend'
,
'/order'
:
'http://www.yang800.com/backend'
'/xhr/'
:
'http://yapi.yang800.cn/mock/31'
}
})
pages/about.vue
deleted
100644 → 0
View file @
64f698e7
<
template
>
<section
class=
"container"
>
<img
src=
"../assets/img/logo.png"
alt=
"Nuxt.js Logo"
class=
"logo"
/>
<h1
class=
"title"
>
This page is loaded from the
{{
name
}}
</h1>
<h2
class=
"info"
v-if=
"name === 'client'"
>
Please refresh the page
</h2>
<nuxt-link
class=
"button"
to=
"/"
>
Home page
</nuxt-link>
</section>
</
template
>
<
script
>
export
default
{
asyncData
({
req
})
{
return
{
name
:
req
?
'server'
:
'client'
}
},
head
()
{
return
{
title
:
`About Page (
${
this
.
name
}
-side)`
}
}
}
</
script
>
<
style
scoped
>
.title
{
margin-top
:
50px
;
}
.info
{
font-weight
:
300
;
color
:
#9aabb1
;
margin
:
0
;
margin-top
:
10px
;
}
.button
{
margin-top
:
50px
;
}
</
style
>
store/index.js
View file @
20471e6c
...
...
@@ -14,7 +14,10 @@ const store = () => {
return
new
Vuex
.
Store
({
modules
:
{
usrAuth
,
systemTags
systemTags
,
goodsTags
,
orderTags
,
financalTags
},
getters
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment