第一次提交
This commit is contained in:
2
.env.development
Normal file
2
.env.development
Normal file
@@ -0,0 +1,2 @@
|
||||
VITE_APP_NAME=云芯威BMS
|
||||
apiUrl=http://127.0.0.1:8081/api
|
||||
2
.env.production
Normal file
2
.env.production
Normal file
@@ -0,0 +1,2 @@
|
||||
VITE_APP_NAME=云芯威BMS
|
||||
VITE_API_URL=https://open.gxwebsoft.com/api
|
||||
2
.gitignore
vendored
Executable file
2
.gitignore
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
/unpackage
|
||||
/utils/request-1.js
|
||||
20
.hbuilderx/launch.json
Executable file
20
.hbuilderx/launch.json
Executable file
@@ -0,0 +1,20 @@
|
||||
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
|
||||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
||||
"version": "0.0",
|
||||
"configurations": [{
|
||||
"default" :
|
||||
{
|
||||
"launchtype" : "remote"
|
||||
},
|
||||
"mp-alipay" :
|
||||
{
|
||||
"launchtype" : "remote"
|
||||
},
|
||||
"mp-weixin" :
|
||||
{
|
||||
"launchtype" : "remote"
|
||||
},
|
||||
"type" : "uniCloud"
|
||||
}
|
||||
]
|
||||
}
|
||||
241
App.vue
Executable file
241
App.vue
Executable file
@@ -0,0 +1,241 @@
|
||||
<script>
|
||||
import store from '@/store'
|
||||
import storage from '@/utils/storage'
|
||||
import {
|
||||
ACCESS_TOKEN,
|
||||
USER_ID
|
||||
} from '@/store/mutation-types'
|
||||
import SettingModel from '@/common/model/Setting'
|
||||
import {
|
||||
getSceneData
|
||||
} from './core/app'
|
||||
import {
|
||||
getCaptcha,
|
||||
getAuthCode,
|
||||
login,
|
||||
getPhoneNumber,
|
||||
register,
|
||||
alipayLogin
|
||||
} from '@/websoft/api/login.js'
|
||||
import {
|
||||
tenantId,
|
||||
roleId,
|
||||
userId,
|
||||
username,
|
||||
password
|
||||
} from '@/config.js';
|
||||
import {
|
||||
getUser
|
||||
} from './websoft/api/user'
|
||||
import http from './websoft/api'
|
||||
|
||||
export default {
|
||||
|
||||
/**
|
||||
* 全局变量
|
||||
*/
|
||||
globalData: {},
|
||||
|
||||
/**
|
||||
* 初始化完成时触发
|
||||
*/
|
||||
async onLaunch({
|
||||
path,
|
||||
query,
|
||||
scene
|
||||
}) {
|
||||
// 程序初始化
|
||||
// await this.init(path,query)
|
||||
// 获取头像昵称
|
||||
// await this.getAuthCode()
|
||||
// 小程序主动更新
|
||||
// this.updateManager()
|
||||
// app启动参数
|
||||
// this.onStartupQuery(query)
|
||||
// 设置全局自定义主题
|
||||
// this.setAppTheme()
|
||||
},
|
||||
onShow() {},
|
||||
methods: {
|
||||
// 程序初始化
|
||||
async init(path,query) {
|
||||
console.log("程序初始化:>>>> ");
|
||||
const app = this
|
||||
// 1. 登录获取token
|
||||
const token = storage.get(ACCESS_TOKEN)
|
||||
if(!token){
|
||||
app.doAlipayLogin()
|
||||
// await app.getAuthCode()
|
||||
}
|
||||
if(query && query.equipmentId){
|
||||
this.$navTo(path,query)
|
||||
}
|
||||
console.log("初始化结束:>>>> ");
|
||||
},
|
||||
// 执行支付宝无感登录
|
||||
doAlipayLogin() {
|
||||
const app = this
|
||||
// 游客身份登录获取token
|
||||
login({username, password}).then(res => {
|
||||
// 登录成功
|
||||
store.dispatch('setUserId', res.data.user.userId)
|
||||
store.dispatch('setToken', res.data.access_token)
|
||||
const expiryTime = 30 * 86400 // 过期时间30天
|
||||
storage.set(ACCESS_TOKEN, res.data.access_token, expiryTime)
|
||||
storage.set(USER_ID, res.data.user.userId, expiryTime)
|
||||
// 配置请求头
|
||||
// http.setConfig((config) => {
|
||||
// config.header = {
|
||||
// Authorization: res.data.access_token
|
||||
// }
|
||||
// return config
|
||||
// })
|
||||
})
|
||||
},
|
||||
|
||||
// 获取头像昵称用户名
|
||||
getAuthCode(){
|
||||
const app = this
|
||||
my.getAuthCode({
|
||||
scopes: 'auth_user',
|
||||
success: ({ authCode }) => {
|
||||
console.log("获取支付宝授权码: ",authCode);
|
||||
// 跟进授权码获取支付宝用户ID
|
||||
getAuthCode({ authCode })
|
||||
.then(res => {
|
||||
console.log("userId: ",res.data);
|
||||
// 拿到userId后执行登录事件
|
||||
app.onAuthSuccess(res.data)
|
||||
})
|
||||
.catch(e => {
|
||||
app.$error(e.message)
|
||||
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
// 执行登录事件
|
||||
onAuthSuccess(userId) {
|
||||
const app = this
|
||||
// 提交到后端
|
||||
alipayLogin({
|
||||
username: userId,
|
||||
password: userId
|
||||
})
|
||||
.then(res => {
|
||||
console.log("老用户登录成功: ", res);
|
||||
// 老用户登录成功
|
||||
store.dispatch('setUserInfo',res.data.user)
|
||||
store.dispatch('setUserId',res.data.user.userId)
|
||||
store.dispatch('setToken',res.data.access_token)
|
||||
const expiryTime = 30 * 86400 // 过期时间30天
|
||||
storage.set(ACCESS_TOKEN, res.data.access_token, expiryTime)
|
||||
storage.set(USER_ID, res.data.user.userId, expiryTime)
|
||||
// 配置请求头
|
||||
http.setConfig((config) => {
|
||||
config.header = {
|
||||
Authorization: res.data.access_token
|
||||
}
|
||||
return config
|
||||
})
|
||||
// 显示登录成功
|
||||
app.$toast(res.message)
|
||||
// 跳转回原页面
|
||||
setTimeout(() => {
|
||||
app.onNavigateBack(1)
|
||||
}, 2000)
|
||||
})
|
||||
.catch(err => {
|
||||
console.log("err: ",err);
|
||||
// 新用户自动注册(默认角色roleId为注册用户81)
|
||||
register({
|
||||
username: userId,
|
||||
roleId
|
||||
}).then(res => {
|
||||
console.log("新用户登录成功: ", res);
|
||||
store.dispatch('setUserInfo',res.data.user)
|
||||
store.dispatch('setUserId',res.data.user.userId)
|
||||
store.dispatch('setToken',res.data.access_token)
|
||||
// 过期时间30天
|
||||
const expiryTime = 30 * 86400
|
||||
storage.set(ACCESS_TOKEN, res.data.access_token, expiryTime)
|
||||
storage.set(USER_ID, res.data.user.userId, expiryTime)
|
||||
// 配置请求头
|
||||
http.setConfig((config) => {
|
||||
config.header = {
|
||||
Authorization: res.data.access_token
|
||||
}
|
||||
return config
|
||||
})
|
||||
// 显示登录成功
|
||||
app.$toast(res.message)
|
||||
// 跳转回原页面
|
||||
setTimeout(() => {
|
||||
app.onNavigateBack(1)
|
||||
}, 2000)
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// app启动参数
|
||||
onStartupQuery(query) {
|
||||
// 获取二维码场景值
|
||||
const scene = getSceneData(query)
|
||||
// 记录推荐人ID
|
||||
const refereeId = query.refereeId ? query.refereeId : scene.uid
|
||||
refereeId > 0 && (this.saveRefereeId(refereeId))
|
||||
},
|
||||
|
||||
// 记录推荐人ID
|
||||
saveRefereeId(refereeId) {
|
||||
store.dispatch('SaveRefereeId', refereeId)
|
||||
},
|
||||
|
||||
// 设置全局自定义主题
|
||||
setAppTheme() {
|
||||
SettingModel.setAppTheme()
|
||||
},
|
||||
|
||||
// 小程序主动更新
|
||||
updateManager() {
|
||||
const updateManager = uni.getUpdateManager()
|
||||
updateManager.onCheckForUpdate(res => {
|
||||
// 请求完新版本信息的回调
|
||||
// console.log(res.hasUpdate)
|
||||
})
|
||||
updateManager.onUpdateReady(() => {
|
||||
uni.showModal({
|
||||
title: '更新提示',
|
||||
content: '新版本已经准备好,即将重启应用',
|
||||
showCancel: false,
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||
updateManager.applyUpdate()
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
updateManager.onUpdateFailed(() => {
|
||||
// 新的版本下载失败
|
||||
uni.showModal({
|
||||
title: '更新提示',
|
||||
content: '新版本下载失败',
|
||||
showCancel: false
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/* uView库样式 */
|
||||
@import "uview-ui/index.scss";
|
||||
/* 项目基础样式 */
|
||||
@import "./app.scss";
|
||||
/* iconfont图标库 */
|
||||
@import "/utils/iconfont.scss";
|
||||
</style>
|
||||
14
androidPrivacy.json
Executable file
14
androidPrivacy.json
Executable file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"version" : "1",
|
||||
"prompt" : "template",
|
||||
"title" : "服务协议和隐私政策",
|
||||
"message" : " 请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=\"static/protocol.html\">《服务协议》</a>和<a href=\"static/privacy.html\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
|
||||
"buttonAccept" : "同意并接受",
|
||||
"buttonRefuse" : "暂不同意",
|
||||
"second" : {
|
||||
"title" : "确认提示",
|
||||
"message" : " 进入应用前,你需先同意<a href=\"static/protocol.html\">《服务协议》</a>和<a href=\"static/privacy.html\">《隐私政策》</a>,否则将退出应用。",
|
||||
"buttonAccept" : "同意并继续",
|
||||
"buttonRefuse" : "退出应用"
|
||||
}
|
||||
}
|
||||
47
api/address.js
Executable file
47
api/address.js
Executable file
@@ -0,0 +1,47 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'address/list',
|
||||
defaultId: 'address/defaultId',
|
||||
detail: 'address/detail',
|
||||
add: 'address/add',
|
||||
edit: 'address/edit',
|
||||
setDefault: 'address/setDefault',
|
||||
remove: 'address/remove'
|
||||
}
|
||||
|
||||
// 收货地址列表
|
||||
export const list = (param) => {
|
||||
return request.get(api.list, param)
|
||||
}
|
||||
|
||||
// 默认收货地址ID
|
||||
export const defaultId = (param) => {
|
||||
return request.get(api.defaultId, param)
|
||||
}
|
||||
|
||||
// 收货地址详情
|
||||
export const detail = (addressId) => {
|
||||
return request.get(api.detail, { addressId })
|
||||
}
|
||||
|
||||
// 新增收货地址
|
||||
export const add = (data) => {
|
||||
return request.post(api.add, { form: data })
|
||||
}
|
||||
|
||||
// 编辑收货地址
|
||||
export const edit = (addressId, data) => {
|
||||
return request.post(api.edit, { addressId, form: data })
|
||||
}
|
||||
|
||||
// 设置默认收货地址
|
||||
export const setDefault = (addressId) => {
|
||||
return request.post(api.setDefault, { addressId })
|
||||
}
|
||||
|
||||
// 删除收货地址
|
||||
export const remove = (addressId) => {
|
||||
return request.post(api.remove, { addressId })
|
||||
}
|
||||
11
api/article/category.js
Executable file
11
api/article/category.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'article.category/list'
|
||||
}
|
||||
|
||||
// 页面数据
|
||||
export function list() {
|
||||
return request.get(api.list)
|
||||
}
|
||||
17
api/article/index.js
Executable file
17
api/article/index.js
Executable file
@@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'article/list',
|
||||
detail: 'article/detail'
|
||||
}
|
||||
|
||||
// 文章列表
|
||||
export function list(param, option) {
|
||||
return request.get(api.list, param, option)
|
||||
}
|
||||
|
||||
// 文章详情
|
||||
export function detail(articleId) {
|
||||
return request.get(api.detail, { articleId })
|
||||
}
|
||||
11
api/balance.js
Executable file
11
api/balance.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'balance.log/list'
|
||||
}
|
||||
|
||||
// 余额账单明细列表
|
||||
export const list = (param) => {
|
||||
return request.get(api.list, param)
|
||||
}
|
||||
11
api/balance/log.js
Executable file
11
api/balance/log.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'balance.log/list'
|
||||
}
|
||||
|
||||
// 余额账单明细
|
||||
export const list = (param) => {
|
||||
return request.get(api.list, param)
|
||||
}
|
||||
23
api/bargain/active.js
Executable file
23
api/bargain/active.js
Executable file
@@ -0,0 +1,23 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'bargain.active/list',
|
||||
detail: 'bargain.active/detail',
|
||||
poster: 'bargain.active/poster'
|
||||
}
|
||||
|
||||
// 砍价活动会场列表
|
||||
export const list = (param) => {
|
||||
return request.get(api.list, param)
|
||||
}
|
||||
|
||||
// 砍价活动详情
|
||||
export const detail = (activeId, param) => {
|
||||
return request.get(api.detail, { activeId, ...param })
|
||||
}
|
||||
|
||||
// 生成商品海报
|
||||
export const poster = param => {
|
||||
return request.get(api.poster, param)
|
||||
}
|
||||
17
api/bargain/checkout.js
Executable file
17
api/bargain/checkout.js
Executable file
@@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
order: 'bargain.checkout/order',
|
||||
submit: 'bargain.checkout/submit'
|
||||
}
|
||||
|
||||
// 结算台订单信息
|
||||
export const order = (mode, param) => {
|
||||
return request.get(api.order, { mode, ...param })
|
||||
}
|
||||
|
||||
// 结算台订单提交
|
||||
export const submit = (mode, data) => {
|
||||
return request.post(api.submit, { mode, ...data }, { isPrompt: false })
|
||||
}
|
||||
35
api/bargain/task.js
Executable file
35
api/bargain/task.js
Executable file
@@ -0,0 +1,35 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'bargain.task/list',
|
||||
partake: 'bargain.task/partake',
|
||||
detail: 'bargain.task/detail',
|
||||
helpList: 'bargain.task/helpList',
|
||||
helpCut: 'bargain.task/helpCut'
|
||||
}
|
||||
|
||||
// 我的砍价列表
|
||||
export const list = (param) => {
|
||||
return request.get(api.list, param)
|
||||
}
|
||||
|
||||
// 创建砍价任务
|
||||
export const partake = (data) => {
|
||||
return request.post(api.partake, data)
|
||||
}
|
||||
|
||||
// 获取砍价任务详情
|
||||
export const detail = (taskId, param) => {
|
||||
return request.get(api.detail, { taskId, ...param })
|
||||
}
|
||||
|
||||
// 获取砍价任务好友助力榜
|
||||
export const helpList = (taskId, param) => {
|
||||
return request.get(api.helpList, { taskId, ...param })
|
||||
}
|
||||
|
||||
// 帮砍一刀
|
||||
export const helpCut = (taskId, data) => {
|
||||
return request.post(api.helpCut, { taskId, ...data })
|
||||
}
|
||||
17
api/captcha.js
Executable file
17
api/captcha.js
Executable file
@@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
image: 'captcha/image',
|
||||
sendSmsCaptcha: 'captcha/sendSmsCaptcha'
|
||||
}
|
||||
|
||||
// 图形验证码
|
||||
export function image() {
|
||||
return request.get(api.image, {}, { load: false })
|
||||
}
|
||||
|
||||
// 发送短信验证码
|
||||
export function sendSmsCaptcha(data) {
|
||||
return request.post(api.sendSmsCaptcha, data, { load: false })
|
||||
}
|
||||
35
api/cart.js
Executable file
35
api/cart.js
Executable file
@@ -0,0 +1,35 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'cart/list',
|
||||
total: 'cart/total',
|
||||
add: 'cart/add',
|
||||
update: 'cart/update',
|
||||
clear: 'cart/clear'
|
||||
}
|
||||
|
||||
// 购物车列表
|
||||
export const list = () => {
|
||||
return request.get(api.list, {}, { load: false })
|
||||
}
|
||||
|
||||
// 购物车商品总数量
|
||||
export const total = () => {
|
||||
return request.get(api.total, {}, { load: false })
|
||||
}
|
||||
|
||||
// 加入购物车
|
||||
export const add = (goodsId, goodsSkuId, goodsNum) => {
|
||||
return request.post(api.add, { goodsId, goodsSkuId, goodsNum })
|
||||
}
|
||||
|
||||
// 更新购物车商品数量
|
||||
export const update = (goodsId, goodsSkuId, goodsNum) => {
|
||||
return request.post(api.update, { goodsId, goodsSkuId, goodsNum }, { isPrompt: false })
|
||||
}
|
||||
|
||||
// 删除购物车中指定记录
|
||||
export const clear = (cartIds = []) => {
|
||||
return request.post(api.clear, { cartIds })
|
||||
}
|
||||
35
api/cashier/index.js
Executable file
35
api/cashier/index.js
Executable file
@@ -0,0 +1,35 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
orderInfo: 'cashier/orderInfo',
|
||||
orderPay: 'cashier/orderPay',
|
||||
tradeQuery: 'cashier/tradeQuery',
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取支付订单的信息
|
||||
* @param {Number} orderId
|
||||
* @param {Object} param
|
||||
*/
|
||||
export function orderInfo(orderId, param) {
|
||||
return request.get(api.orderInfo, { orderId, ...param })
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认支付
|
||||
* @param {Number} orderId
|
||||
* @param {Object} data
|
||||
*/
|
||||
export function orderPay(orderId, data) {
|
||||
return request.post(api.orderPay, { orderId, ...data })
|
||||
}
|
||||
|
||||
/**
|
||||
* 交易查询
|
||||
* 查询第三方支付订单是否付款成功
|
||||
* @param {Object} param
|
||||
*/
|
||||
export function tradeQuery(param) {
|
||||
return request.get(api.tradeQuery, param)
|
||||
}
|
||||
11
api/category/index.js
Executable file
11
api/category/index.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'category/list'
|
||||
}
|
||||
|
||||
// 页面数据
|
||||
export function list() {
|
||||
return request.get(api.list)
|
||||
}
|
||||
19
api/checkout.js
Executable file
19
api/checkout.js
Executable file
@@ -0,0 +1,19 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
order: 'checkout/order',
|
||||
submit: 'checkout/submit',
|
||||
}
|
||||
|
||||
// mode: 结算模式 (buyNow立即购买 cart购物车)
|
||||
|
||||
// 结算台订单信息
|
||||
export const order = (mode, param) => {
|
||||
return request.get(api.order, { mode, ...param })
|
||||
}
|
||||
|
||||
// 结算台订单提交
|
||||
export const submit = (mode, data) => {
|
||||
return request.post(api.submit, { mode, ...data }, { isPrompt: false })
|
||||
}
|
||||
23
api/comment.js
Executable file
23
api/comment.js
Executable file
@@ -0,0 +1,23 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'comment/list',
|
||||
listRows: 'comment/listRows',
|
||||
total: 'comment/total'
|
||||
}
|
||||
|
||||
// 商品评价列表
|
||||
export const list = (goodsId, param, option) => {
|
||||
return request.get(api.list, { ...param, goodsId }, option)
|
||||
}
|
||||
|
||||
// 商品评价列表 (限制数量, 用于商品详情页展示)
|
||||
export const listRows = (goodsId, limit = 5) => {
|
||||
return request.get(api.listRows, { goodsId, limit })
|
||||
}
|
||||
|
||||
// 商品评分总数
|
||||
export const total = (goodsId) => {
|
||||
return request.get(api.total, { goodsId })
|
||||
}
|
||||
16
api/coupon.js
Executable file
16
api/coupon.js
Executable file
@@ -0,0 +1,16 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'coupon/list'
|
||||
}
|
||||
|
||||
// 优惠券列表
|
||||
export const list = (param, option) => {
|
||||
const options = {
|
||||
isPrompt: true, //(默认 true 说明:本接口抛出的错误是否提示)
|
||||
load: true, //(默认 true 说明:本接口是否提示加载动画)
|
||||
...option
|
||||
}
|
||||
return request.get(api.list, param, options)
|
||||
}
|
||||
17
api/dealer/apply.js
Executable file
17
api/dealer/apply.js
Executable file
@@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
status: 'dealer.apply/status',
|
||||
submit: 'dealer.apply/submit'
|
||||
}
|
||||
|
||||
// 分销商申请状态
|
||||
export const status = (param) => {
|
||||
return request.get(api.status, param)
|
||||
}
|
||||
|
||||
// 提交分销商申请
|
||||
export const submit = (data) => {
|
||||
return request.post(api.submit, data)
|
||||
}
|
||||
17
api/dealer/index.js
Executable file
17
api/dealer/index.js
Executable file
@@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
user: 'dealer/user',
|
||||
center: 'dealer/center'
|
||||
}
|
||||
|
||||
// 分销商用户详情
|
||||
export const user = (param) => {
|
||||
return request.get(api.user, param)
|
||||
}
|
||||
|
||||
// 分销商提现明细
|
||||
export const center = (param) => {
|
||||
return request.get(api.center, param)
|
||||
}
|
||||
11
api/dealer/order.js
Executable file
11
api/dealer/order.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'dealer.order/list'
|
||||
}
|
||||
|
||||
// 分销商订单列表
|
||||
export const list = (param) => {
|
||||
return request.get(api.list, param)
|
||||
}
|
||||
11
api/dealer/poster.js
Executable file
11
api/dealer/poster.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
qrcode: 'dealer.poster/qrcode'
|
||||
}
|
||||
|
||||
// 获取推广二维码
|
||||
export const qrcode = (param) => {
|
||||
return request.get(api.qrcode, param)
|
||||
}
|
||||
11
api/dealer/setting.js
Executable file
11
api/dealer/setting.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
data: 'dealer.setting/data'
|
||||
}
|
||||
|
||||
// 获取分销设置 (全部)
|
||||
export const data = () => {
|
||||
return request.get(api.data)
|
||||
}
|
||||
11
api/dealer/team.js
Executable file
11
api/dealer/team.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'dealer.team/list'
|
||||
}
|
||||
|
||||
// 我的团队列表
|
||||
export const list = (param) => {
|
||||
return request.get(api.list, param)
|
||||
}
|
||||
17
api/dealer/withdraw.js
Executable file
17
api/dealer/withdraw.js
Executable file
@@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'dealer.withdraw/list',
|
||||
submit: 'dealer.withdraw/submit'
|
||||
}
|
||||
|
||||
// 分销商提现明细
|
||||
export const list = (param) => {
|
||||
return request.get(api.list, param)
|
||||
}
|
||||
|
||||
// 提交提现申请
|
||||
export const submit = (data) => {
|
||||
return request.post(api.submit, data)
|
||||
}
|
||||
11
api/express.js
Executable file
11
api/express.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'express/list'
|
||||
}
|
||||
|
||||
// 物流公司列表
|
||||
export const list = (param) => {
|
||||
return request.get(api.list, param)
|
||||
}
|
||||
49
api/goods/index.js
Executable file
49
api/goods/index.js
Executable file
@@ -0,0 +1,49 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'goods/list',
|
||||
detail: 'goods/detail',
|
||||
basic: 'goods/basic',
|
||||
specData: 'goods/specData',
|
||||
skuInfo: 'goods/skuInfo',
|
||||
recommended: 'goods/recommended',
|
||||
poster: 'goods/poster'
|
||||
}
|
||||
|
||||
// 商品列表
|
||||
export const list = (param, option) => {
|
||||
return request.get(api.list, param, option)
|
||||
}
|
||||
|
||||
// 商品详情(详细数据)
|
||||
export const detail = (goodsId, verifyStatus, param) => {
|
||||
verifyStatus = Number(verifyStatus)
|
||||
return request.get(api.detail, { goodsId, verifyStatus, ...param })
|
||||
}
|
||||
|
||||
// 商品详情(基本数据)
|
||||
export const basic = (goodsId, verifyStatus, param) => {
|
||||
verifyStatus = Number(verifyStatus)
|
||||
return request.get(api.basic, { goodsId, verifyStatus, ...param })
|
||||
}
|
||||
|
||||
// 获取商品规格数据
|
||||
export const specData = (goodsId) => {
|
||||
return request.get(api.specData, { goodsId })
|
||||
}
|
||||
|
||||
// 获取推荐的商品列表
|
||||
export const recommended = () => {
|
||||
return request.get(api.recommended)
|
||||
}
|
||||
|
||||
// 获取商品的指定SKU信息
|
||||
export const skuInfo = (goodsId, goodsSkuId, param) => {
|
||||
return request.get(api.skuInfo, { goodsId, goodsSkuId, ...param })
|
||||
}
|
||||
|
||||
// 生成商品海报
|
||||
export const poster = param => {
|
||||
return request.get(api.poster, param)
|
||||
}
|
||||
11
api/goods/service.js
Executable file
11
api/goods/service.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'goods.service/list'
|
||||
}
|
||||
|
||||
// 商品评价列表
|
||||
export function list(goodsId) {
|
||||
return request.get(api.list, { goodsId })
|
||||
}
|
||||
17
api/groupon/checkout.js
Executable file
17
api/groupon/checkout.js
Executable file
@@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
order: 'groupon.checkout/order',
|
||||
submit: 'groupon.checkout/submit'
|
||||
}
|
||||
|
||||
// 结算台订单信息
|
||||
export const order = (mode, param) => {
|
||||
return request.get(api.order, { mode, ...param })
|
||||
}
|
||||
|
||||
// 结算台订单提交
|
||||
export const submit = (mode, data) => {
|
||||
return request.post(api.submit, { mode, ...data }, { isPrompt: false })
|
||||
}
|
||||
23
api/groupon/goods.js
Executable file
23
api/groupon/goods.js
Executable file
@@ -0,0 +1,23 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'groupon.goods/list',
|
||||
detail: 'groupon.goods/detail',
|
||||
poster: 'groupon.goods/poster'
|
||||
}
|
||||
|
||||
// 拼团商品列表
|
||||
export const list = (param) => {
|
||||
return request.get(api.list, param)
|
||||
}
|
||||
|
||||
// 拼团商品详情
|
||||
export const detail = (grouponGoodsId, param) => {
|
||||
return request.get(api.detail, { grouponGoodsId, ...param })
|
||||
}
|
||||
|
||||
// 生成商品海报
|
||||
export const poster = param => {
|
||||
return request.get(api.poster, param)
|
||||
}
|
||||
11
api/groupon/setting.js
Executable file
11
api/groupon/setting.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
data: 'groupon.setting/data'
|
||||
}
|
||||
|
||||
// 获取拼团设置
|
||||
export const data = () => {
|
||||
return request.get(api.data)
|
||||
}
|
||||
23
api/groupon/task.js
Executable file
23
api/groupon/task.js
Executable file
@@ -0,0 +1,23 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
myList: 'groupon.task/myList',
|
||||
listByGoods: 'groupon.task/listByGoods',
|
||||
detail: 'groupon.task/detail'
|
||||
}
|
||||
|
||||
// 我的拼团列表
|
||||
export const myList = param => {
|
||||
return request.get(api.myList, param)
|
||||
}
|
||||
|
||||
// 获取拼单任务详情
|
||||
export const detail = (taskId, param) => {
|
||||
return request.get(api.detail, { taskId, ...param })
|
||||
}
|
||||
|
||||
// 我的拼团列表
|
||||
export const listByGoods = (grouponGoodsId, param) => {
|
||||
return request.get(api.listByGoods, { grouponGoodsId, ...param })
|
||||
}
|
||||
11
api/help.js
Executable file
11
api/help.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'help/list'
|
||||
}
|
||||
|
||||
// 帮助中心列表
|
||||
export const list = (param) => {
|
||||
return request.get(api.list, param)
|
||||
}
|
||||
11
api/live/room.js
Executable file
11
api/live/room.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'live.room/list'
|
||||
}
|
||||
|
||||
// 获取直播间列表
|
||||
export const list = (param) => {
|
||||
return request.get(api.list, param)
|
||||
}
|
||||
36
api/login/index.js
Executable file
36
api/login/index.js
Executable file
@@ -0,0 +1,36 @@
|
||||
import request from '@/utils/request'
|
||||
import exp from 'constants'
|
||||
import http from '@/websoft/api/index.js';
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
login: 'passport/login',
|
||||
loginMpWx: 'passport/loginMpWx',
|
||||
loginWxOfficial: 'passport/loginWxOfficial',
|
||||
loginMpWxMobile: 'passport/loginMpWxMobile',
|
||||
}
|
||||
|
||||
// 用户登录 (手机号+验证码)
|
||||
export function login(data) {
|
||||
return request.post(api.login, data)
|
||||
}
|
||||
|
||||
// 微信小程序快捷登录 (获取微信用户基本信息)
|
||||
export function loginMpWx(data, option) {
|
||||
return request.post(api.loginMpWx, data, option)
|
||||
}
|
||||
|
||||
// 微信公众号一键授权登录 (获取微信用户基本信息)
|
||||
export function loginWxOfficial(data, option) {
|
||||
return request.post(api.loginWxOfficial, data, option)
|
||||
}
|
||||
|
||||
// 微信小程序快捷登录 (授权手机号)
|
||||
export function loginMpWxMobile(data, option) {
|
||||
return request.post(api.loginMpWxMobile, data, option)
|
||||
}
|
||||
|
||||
// 支付宝小程序快捷登录
|
||||
export function LoginMpAlipay(data, option) {
|
||||
return http.post('/login-alipay/login', data, option)
|
||||
}
|
||||
22
api/myCoupon.js
Executable file
22
api/myCoupon.js
Executable file
@@ -0,0 +1,22 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'myCoupon/list',
|
||||
receive: 'myCoupon/receive'
|
||||
}
|
||||
|
||||
// 我的优惠券列表
|
||||
export const list = (param, option) => {
|
||||
const options = {
|
||||
isPrompt: true, //(默认 true 说明:本接口抛出的错误是否提示)
|
||||
load: true, //(默认 true 说明:本接口是否提示加载动画)
|
||||
...option
|
||||
}
|
||||
return request.get(api.list, param, options)
|
||||
}
|
||||
|
||||
// 领取优惠券
|
||||
export const receive = (couponId, data, option) => {
|
||||
return request.post(api.receive, { couponId, ...data }, option)
|
||||
}
|
||||
48
api/order.js
Executable file
48
api/order.js
Executable file
@@ -0,0 +1,48 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
todoCounts: 'order/todoCounts',
|
||||
list: 'order/list',
|
||||
detail: 'order/detail',
|
||||
express: 'order/express',
|
||||
cancel: 'order/cancel',
|
||||
extractQrcode: 'order/extractQrcode',
|
||||
receipt: 'order/receipt',
|
||||
pay: 'order/pay'
|
||||
}
|
||||
|
||||
// 当前用户待处理的订单数量
|
||||
export function todoCounts(param, option) {
|
||||
return request.get(api.todoCounts, param, option)
|
||||
}
|
||||
|
||||
// 我的订单列表
|
||||
export function list(param, option) {
|
||||
return request.get(api.list, param, option)
|
||||
}
|
||||
|
||||
// 订单详情
|
||||
export function detail(orderId, param) {
|
||||
return request.get(api.detail, { orderId, ...param })
|
||||
}
|
||||
|
||||
// 获取物流信息
|
||||
export function express(orderId, param) {
|
||||
return request.get(api.express, { orderId, ...param })
|
||||
}
|
||||
|
||||
// 取消订单
|
||||
export function cancel(orderId, data) {
|
||||
return request.post(api.cancel, { orderId, ...data })
|
||||
}
|
||||
|
||||
// 确认收货
|
||||
export function receipt(orderId, data) {
|
||||
return request.post(api.receipt, { orderId, ...data })
|
||||
}
|
||||
|
||||
// 核销二维码
|
||||
export function extractQrcode(orderId, param) {
|
||||
return request.get(api.extractQrcode, { orderId, ...param })
|
||||
}
|
||||
17
api/order/comment.js
Executable file
17
api/order/comment.js
Executable file
@@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'order.comment/list',
|
||||
submit: 'order.comment/submit'
|
||||
}
|
||||
|
||||
// 待评价订单商品列表
|
||||
export const list = (orderId, param) => {
|
||||
return request.get(api.list, { orderId, ...param })
|
||||
}
|
||||
|
||||
// 创建商品评价
|
||||
export const submit = (orderId, data) => {
|
||||
return request.post(api.submit, { orderId, form: data })
|
||||
}
|
||||
13
api/page.js
Executable file
13
api/page.js
Executable file
@@ -0,0 +1,13 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const apiUri = {
|
||||
detail: 'page/detail'
|
||||
}
|
||||
|
||||
// 页面数据
|
||||
export function detail(pageId) {
|
||||
return request.get(apiUri.detail, {
|
||||
pageId
|
||||
})
|
||||
}
|
||||
11
api/points/log.js
Executable file
11
api/points/log.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'points.log/list'
|
||||
}
|
||||
|
||||
// 积分明细列表
|
||||
export const list = (param) => {
|
||||
return request.get(api.list, param)
|
||||
}
|
||||
27
api/recharge.js
Executable file
27
api/recharge.js
Executable file
@@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
center: 'recharge/center',
|
||||
submit: 'recharge/submit',
|
||||
tradeQuery: 'recharge/tradeQuery'
|
||||
}
|
||||
|
||||
// 充值中心页面数据
|
||||
export const center = (param) => {
|
||||
return request.get(api.center, param)
|
||||
}
|
||||
|
||||
// 确认充值订单
|
||||
export const submit = (data) => {
|
||||
return request.post(api.submit, { form: data })
|
||||
}
|
||||
|
||||
/**
|
||||
* 交易查询
|
||||
* 查询第三方支付订单是否付款成功
|
||||
* @param {Object} param
|
||||
*/
|
||||
export function tradeQuery(param) {
|
||||
return request.get(api.tradeQuery, param)
|
||||
}
|
||||
11
api/recharge/order.js
Executable file
11
api/recharge/order.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'recharge.order/list'
|
||||
}
|
||||
|
||||
// 我的充值记录列表
|
||||
export const list = (param) => {
|
||||
return request.get(api.list, param)
|
||||
}
|
||||
11
api/recharge/plan.js
Executable file
11
api/recharge/plan.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'recharge.plan/list'
|
||||
}
|
||||
|
||||
// 充值套餐列表
|
||||
export const list = (param) => {
|
||||
return request.get(api.list, param)
|
||||
}
|
||||
35
api/refund.js
Executable file
35
api/refund.js
Executable file
@@ -0,0 +1,35 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'refund/list',
|
||||
goods: 'refund/goods',
|
||||
apply: 'refund/apply',
|
||||
detail: 'refund/detail',
|
||||
delivery: 'refund/delivery'
|
||||
}
|
||||
|
||||
// 售后单列表
|
||||
export const list = (param, option) => {
|
||||
return request.get(api.list, param, option)
|
||||
}
|
||||
|
||||
// 订单商品详情
|
||||
export const goods = (orderGoodsId, param) => {
|
||||
return request.get(api.goods, { orderGoodsId, ...param })
|
||||
}
|
||||
|
||||
// 申请售后
|
||||
export const apply = (orderGoodsId, data) => {
|
||||
return request.post(api.apply, { orderGoodsId, form: data })
|
||||
}
|
||||
|
||||
// 售后单详情
|
||||
export const detail = (orderRefundId, param) => {
|
||||
return request.get(api.detail, { orderRefundId, ...param })
|
||||
}
|
||||
|
||||
// 用户发货
|
||||
export const delivery = (orderRefundId, data) => {
|
||||
return request.post(api.delivery, { orderRefundId, form: data })
|
||||
}
|
||||
17
api/region.js
Executable file
17
api/region.js
Executable file
@@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
all: 'region/all',
|
||||
tree: 'region/tree'
|
||||
}
|
||||
|
||||
// 获取所有地区
|
||||
export const all = (param) => {
|
||||
return request.get(api.all, param)
|
||||
}
|
||||
|
||||
// 获取所有地区(树状)
|
||||
export const tree = (param) => {
|
||||
return request.get(api.tree, param)
|
||||
}
|
||||
11
api/setting.js
Executable file
11
api/setting.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
data: 'setting/data'
|
||||
}
|
||||
|
||||
// 设置项详情
|
||||
export function data() {
|
||||
return request.get(api.data)
|
||||
}
|
||||
17
api/sharp/checkout.js
Executable file
17
api/sharp/checkout.js
Executable file
@@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
order: 'sharp.checkout/order',
|
||||
submit: 'sharp.checkout/submit'
|
||||
}
|
||||
|
||||
// 结算台订单信息
|
||||
export const order = (mode, param) => {
|
||||
return request.get(api.order, { mode, ...param })
|
||||
}
|
||||
|
||||
// 结算台订单提交
|
||||
export const submit = (mode, data) => {
|
||||
return request.post(api.submit, { mode, ...data }, { isPrompt: false })
|
||||
}
|
||||
23
api/sharp/goods.js
Executable file
23
api/sharp/goods.js
Executable file
@@ -0,0 +1,23 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'sharp.goods/list',
|
||||
detail: 'sharp.goods/detail',
|
||||
poster: 'sharp.goods/poster'
|
||||
}
|
||||
|
||||
// 秒杀活动商品列表
|
||||
export const list = (activeTimeId, param, option) => {
|
||||
return request.get(api.list, { activeTimeId, ...param }, option)
|
||||
}
|
||||
|
||||
// 获取活动商品详情
|
||||
export const detail = (activeTimeId, sharpGoodsId, param) => {
|
||||
return request.get(api.detail, { activeTimeId, sharpGoodsId, ...param })
|
||||
}
|
||||
|
||||
// 生成商品海报
|
||||
export const poster = param => {
|
||||
return request.get(api.poster, param)
|
||||
}
|
||||
11
api/sharp/home.js
Executable file
11
api/sharp/home.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
data: 'sharp.home/data'
|
||||
}
|
||||
|
||||
// 秒杀活动首页
|
||||
export const data = (param) => {
|
||||
return request.get(api.data, param)
|
||||
}
|
||||
17
api/shop.js
Executable file
17
api/shop.js
Executable file
@@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
list: 'shop/list',
|
||||
detail: 'shop/detail'
|
||||
}
|
||||
|
||||
// 自提门店列表
|
||||
export const list = (param) => {
|
||||
return request.get(api.list, param)
|
||||
}
|
||||
|
||||
// 门店详情
|
||||
export const detail = (shopId) => {
|
||||
return request.get(api.detail, { shopId })
|
||||
}
|
||||
17
api/shop/order.js
Executable file
17
api/shop/order.js
Executable file
@@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
detail: 'shop.order/detail',
|
||||
extract: 'shop.order/extract'
|
||||
}
|
||||
|
||||
// 核销订单详情 [只有店员才能查看]
|
||||
export function detail(orderId, param) {
|
||||
return request.get(api.detail, { orderId, ...param })
|
||||
}
|
||||
|
||||
// 确认核销 [已取货]
|
||||
export function extract(orderId, param) {
|
||||
return request.post(api.extract, { orderId, ...param })
|
||||
}
|
||||
18
api/upload.js
Executable file
18
api/upload.js
Executable file
@@ -0,0 +1,18 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
image: 'upload/image'
|
||||
}
|
||||
|
||||
// 图片上传
|
||||
export const image = files => {
|
||||
// 文件上传大小, 2M
|
||||
const maxSize = 1024 * 1024 * 2
|
||||
// 执行上传
|
||||
return new Promise((resolve, reject) => {
|
||||
request.urlFileUpload({ files, maxSize })
|
||||
.then(result => resolve(result.map(item => item.data.fileInfo.file_id), result))
|
||||
.catch(reject)
|
||||
})
|
||||
}
|
||||
34
api/user.js
Executable file
34
api/user.js
Executable file
@@ -0,0 +1,34 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
userInfo: 'user/info',
|
||||
assets: 'user/assets',
|
||||
bindMobile: 'user/bindMobile',
|
||||
personal: 'user/personal'
|
||||
}
|
||||
|
||||
// 当前登录的用户信息
|
||||
export const info = (param, option) => {
|
||||
const options = {
|
||||
isPrompt: true, //(默认 true 说明:本接口抛出的错误是否提示)
|
||||
load: true, //(默认 true 说明:本接口是否提示加载动画)
|
||||
...option
|
||||
}
|
||||
return request.get(api.userInfo, param, options)
|
||||
}
|
||||
|
||||
// 账户资产
|
||||
export const assets = (param, option) => {
|
||||
return request.get(api.assets, param, option)
|
||||
}
|
||||
|
||||
// 绑定手机号
|
||||
export const bindMobile = (data, option) => {
|
||||
return request.post(api.bindMobile, data, option)
|
||||
}
|
||||
|
||||
// 修改个人信息(头像昵称)
|
||||
export const personal = (data, option) => {
|
||||
return request.post(api.personal, data, option)
|
||||
}
|
||||
11
api/user/coupon.js
Executable file
11
api/user/coupon.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
receive: 'user.coupon/receive'
|
||||
}
|
||||
|
||||
// 优惠券列表
|
||||
export const receive = (data) => {
|
||||
return request.post(api.receive, data)
|
||||
}
|
||||
17
api/wxofficial.js
Executable file
17
api/wxofficial.js
Executable file
@@ -0,0 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// api地址
|
||||
const api = {
|
||||
oauthUrl: 'wxofficial/oauthUrl',
|
||||
oauthUserInfo: 'wxofficial/oauthUserInfo'
|
||||
}
|
||||
|
||||
// 获取授权登录地址
|
||||
export const oauthUrl = callbackUrl => {
|
||||
return request.get(api.oauthUrl, { callbackUrl })
|
||||
}
|
||||
|
||||
// 获取微信用户信息
|
||||
export const oauthUserInfo = code => {
|
||||
return request.get(api.oauthUserInfo, { code })
|
||||
}
|
||||
43
app.scss
Executable file
43
app.scss
Executable file
@@ -0,0 +1,43 @@
|
||||
/* utils.scss */
|
||||
@import "/utils/utils.scss";
|
||||
|
||||
page {
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
@keyframes rotate {
|
||||
0% {
|
||||
transform: rotate(0deg) scale(1);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg) scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* #ifdef H5*/
|
||||
|
||||
uni-page {
|
||||
box-shadow: 0 1rpx 44rpx rgba(169, 169, 169, .3);
|
||||
}
|
||||
|
||||
.uni-app--showlayout+uni-tabbar.uni-tabbar-bottom,
|
||||
.uni-app--showlayout+uni-tabbar.uni-tabbar-bottom .uni-tabbar,
|
||||
.uni-app--showlayout+uni-tabbar.uni-tabbar-top,
|
||||
.uni-app--showlayout+uni-tabbar.uni-tabbar-top .uni-tabbar {
|
||||
left: var(--window-left);
|
||||
right: var(--window-right);
|
||||
}
|
||||
|
||||
.footer-fixed {
|
||||
left: var(--window-left) !important;
|
||||
right: var(--window-right) !important;
|
||||
}
|
||||
|
||||
.u-mask,.u-drawer {
|
||||
left: var(--window-left) !important;
|
||||
right: var(--window-right) !important;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
|
||||
3
common/constant/index.js
Executable file
3
common/constant/index.js
Executable file
@@ -0,0 +1,3 @@
|
||||
import paginate from './paginate'
|
||||
|
||||
export { paginate }
|
||||
7
common/constant/paginate.js
Executable file
7
common/constant/paginate.js
Executable file
@@ -0,0 +1,7 @@
|
||||
export default {
|
||||
data: [], // 列表数据
|
||||
current_page: 1, // 当前页码
|
||||
last_page: 1, // 最大页码
|
||||
per_page: 15, // 每页记录数
|
||||
total: 0, // 总记录数
|
||||
}
|
||||
12
common/enum/Client.js
Executable file
12
common/enum/Client.js
Executable file
@@ -0,0 +1,12 @@
|
||||
import Enum from './enum'
|
||||
|
||||
/**
|
||||
* 枚举类:客户端类型
|
||||
* ClientEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'APP', name: 'APP端', value: 'APP' },
|
||||
{ key: 'H5', name: 'H5端', value: 'H5' },
|
||||
{ key: 'H5_WEIXIN', name: '微信公众号端', value: 'H5-WEIXIN' },
|
||||
{ key: 'MP_WEIXIN', name: '微信小程序端', value: 'MP-WEIXIN' },
|
||||
])
|
||||
10
common/enum/coupon/ApplyRange.js
Executable file
10
common/enum/coupon/ApplyRange.js
Executable file
@@ -0,0 +1,10 @@
|
||||
import Enum from '../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:优惠券适用范围
|
||||
* ApplyRangeEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'ALL', name: '全部商品', value: 10 },
|
||||
{ key: 'SOME_GOODS', name: '指定商品', value: 20 }
|
||||
])
|
||||
10
common/enum/coupon/CouponType.js
Executable file
10
common/enum/coupon/CouponType.js
Executable file
@@ -0,0 +1,10 @@
|
||||
import Enum from '../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:优惠券类型
|
||||
* CouponTypeEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'FULL_DISCOUNT', name: '满减券', value: 10 },
|
||||
{ key: 'DISCOUNT', name: '折扣券', value: 20 }
|
||||
])
|
||||
10
common/enum/coupon/ExpireType.js
Executable file
10
common/enum/coupon/ExpireType.js
Executable file
@@ -0,0 +1,10 @@
|
||||
import Enum from '../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:优惠券到期类型
|
||||
* ExpireTypeEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'RECEIVE', name: '领取后', value: 10 },
|
||||
{ key: 'FIXED_TIME', name: '固定时间', value: 20 }
|
||||
])
|
||||
5
common/enum/coupon/index.js
Executable file
5
common/enum/coupon/index.js
Executable file
@@ -0,0 +1,5 @@
|
||||
import ApplyRangeEnum from './ApplyRange'
|
||||
import ExpireTypeEnum from './ExpireType'
|
||||
import CouponTypeEnum from './CouponType'
|
||||
|
||||
export { ApplyRangeEnum, CouponTypeEnum, ExpireTypeEnum }
|
||||
11
common/enum/dealer/apply/ApplyStatus.js
Executable file
11
common/enum/dealer/apply/ApplyStatus.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import Enum from '../../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:分销商审核状态
|
||||
* ApplyStatusEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'WAIT', name: '待审核', value: 10 },
|
||||
{ key: 'PASSED', name: '审核通过', value: 20 },
|
||||
{ key: 'REJECT', name: '驳回', value: 30 }
|
||||
])
|
||||
10
common/enum/dealer/apply/ApplyType.js
Executable file
10
common/enum/dealer/apply/ApplyType.js
Executable file
@@ -0,0 +1,10 @@
|
||||
import Enum from '../../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:分销商申请方式
|
||||
* ApplyTypeEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'AUDIT', name: '需后台审核', value: 10 },
|
||||
{ key: 'PASS', name: '无需审核', value: 20 }
|
||||
])
|
||||
4
common/enum/dealer/apply/index.js
Executable file
4
common/enum/dealer/apply/index.js
Executable file
@@ -0,0 +1,4 @@
|
||||
import ApplyStatusEnum from './ApplyStatus'
|
||||
import ApplyTypeEnum from './ApplyType'
|
||||
|
||||
export { ApplyStatusEnum, ApplyTypeEnum }
|
||||
12
common/enum/dealer/withdraw/ApplyStatus.js
Executable file
12
common/enum/dealer/withdraw/ApplyStatus.js
Executable file
@@ -0,0 +1,12 @@
|
||||
import Enum from '../../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:分销商提现申请状态
|
||||
* ApplyStatusEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'WAIT', name: '待审核', value: 10 },
|
||||
{ key: 'PASSED', name: '审核通过', value: 20 },
|
||||
{ key: 'REJECT', name: '驳回', value: 30 },
|
||||
{ key: 'PAYMENT', name: '已打款', value: 40 }
|
||||
])
|
||||
11
common/enum/dealer/withdraw/PayType.js
Executable file
11
common/enum/dealer/withdraw/PayType.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import Enum from '../../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:分销商体现打款方式
|
||||
* PayTypeEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'WECHAT', name: '微信零钱', value: 10 },
|
||||
{ key: 'ALIPAY', name: '支付宝', value: 20 },
|
||||
{ key: 'BANK_CARD', name: '银行卡', value: 30 }
|
||||
])
|
||||
4
common/enum/dealer/withdraw/index.js
Executable file
4
common/enum/dealer/withdraw/index.js
Executable file
@@ -0,0 +1,4 @@
|
||||
import PayTypeEnum from './PayType'
|
||||
import ApplyStatusEnum from './ApplyStatus'
|
||||
|
||||
export { PayTypeEnum, ApplyStatusEnum }
|
||||
85
common/enum/enum.js
Executable file
85
common/enum/enum.js
Executable file
@@ -0,0 +1,85 @@
|
||||
/**
|
||||
* 枚举类
|
||||
* Enum.IMAGE.name => "图片"
|
||||
* Enum.getNameByKey('IMAGE') => "图片"
|
||||
* Enum.getValueByKey('IMAGE') => 10
|
||||
* Enum.getNameByValue(10) => "图片"
|
||||
* Enum.getData() => [{key: "IMAGE", name: "图片", value: 10}]
|
||||
*/
|
||||
class Enum {
|
||||
constructor (param) {
|
||||
const keyArr = []
|
||||
const valueArr = []
|
||||
|
||||
if (!Array.isArray(param)) {
|
||||
throw new Error('param is not an array!')
|
||||
}
|
||||
|
||||
param.map(element => {
|
||||
if (!element.key || !element.name) {
|
||||
return
|
||||
}
|
||||
// 保存key值组成的数组,方便A.getName(name)类型的调用
|
||||
keyArr.push(element.key)
|
||||
valueArr.push(element.value)
|
||||
// 根据key生成不同属性值,以便A.B.name类型的调用
|
||||
this[element.key] = element
|
||||
if (element.key !== element.value) {
|
||||
this[element.value] = element
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// 保存源数组
|
||||
this.data = param
|
||||
this.keyArr = keyArr
|
||||
this.valueArr = valueArr
|
||||
|
||||
// 防止被修改
|
||||
// Object.freeze(this)
|
||||
}
|
||||
|
||||
// 根据key得到对象
|
||||
keyOf (key) {
|
||||
return this.data[this.keyArr.indexOf(key)]
|
||||
}
|
||||
|
||||
// 根据key得到对象
|
||||
valueOf (key) {
|
||||
return this.data[this.valueArr.indexOf(key)]
|
||||
}
|
||||
|
||||
// 根据key获取name值
|
||||
getNameByKey (key) {
|
||||
const prop = this.keyOf(key)
|
||||
if (!prop) {
|
||||
throw new Error('No enum constant' + key)
|
||||
}
|
||||
return prop.name
|
||||
}
|
||||
|
||||
// 根据value获取name值
|
||||
getNameByValue (value) {
|
||||
const prop = this.valueOf(value)
|
||||
if (!prop) {
|
||||
throw new Error('No enum constant' + value)
|
||||
}
|
||||
return prop.name
|
||||
}
|
||||
|
||||
// 根据key获取value值
|
||||
getValueByKey (key) {
|
||||
const prop = this.keyOf(key)
|
||||
if (!prop) {
|
||||
throw new Error('No enum constant' + key)
|
||||
}
|
||||
return prop.key
|
||||
}
|
||||
|
||||
// 返回源数组
|
||||
getData () {
|
||||
return this.data
|
||||
}
|
||||
}
|
||||
|
||||
export default Enum
|
||||
10
common/enum/goods/GoodsType.js
Executable file
10
common/enum/goods/GoodsType.js
Executable file
@@ -0,0 +1,10 @@
|
||||
import Enum from '../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:商品类型
|
||||
* GoodsTypeEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'PHYSICAL', name: '实物商品', value: 10 },
|
||||
{ key: 'VIRTUAL', name: '虚拟商品', value: 20 }
|
||||
])
|
||||
10
common/enum/goods/SpecType.js
Executable file
10
common/enum/goods/SpecType.js
Executable file
@@ -0,0 +1,10 @@
|
||||
import Enum from '../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:商品规格类型
|
||||
* SpecTypeEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'SINGLE', name: '单规格', value: 10 },
|
||||
{ key: 'MULTI', name: '多规格', value: 20 }
|
||||
])
|
||||
4
common/enum/goods/index.js
Executable file
4
common/enum/goods/index.js
Executable file
@@ -0,0 +1,4 @@
|
||||
import GoodsTypeEnum from './GoodsType'
|
||||
import SpecTypeEnum from './SpecType'
|
||||
|
||||
export { GoodsTypeEnum, SpecTypeEnum }
|
||||
11
common/enum/groupon/ActiveStatus.js
Executable file
11
common/enum/groupon/ActiveStatus.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import Enum from '../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:拼团活动状态
|
||||
* GoodsStatusEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'STATE_BEGIN', name: '已开始', value: 10 },
|
||||
{ key: 'STATE_SOON', name: '未开始', value: 20 },
|
||||
{ key: 'STATE_END', name: '已结束', value: 30 }
|
||||
])
|
||||
11
common/enum/groupon/ActiveType.js
Executable file
11
common/enum/groupon/ActiveType.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import Enum from '../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:拼团类型
|
||||
* ActiveTypeEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'NORMAL', name: '普通拼团', value: 10, name2: '多人拼团' },
|
||||
{ key: 'PULL_NEW', name: '老带新拼团', value: 20, name2: '新人团' },
|
||||
{ key: 'STEPS', name: '阶梯拼团', value: 30, name2: '阶梯团' }
|
||||
])
|
||||
10
common/enum/groupon/GoodsStatus.js
Executable file
10
common/enum/groupon/GoodsStatus.js
Executable file
@@ -0,0 +1,10 @@
|
||||
import Enum from '../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:拼团商品状态
|
||||
* GoodsStatusEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'NORMAL', name: '进行中', value: 10 },
|
||||
{ key: 'FINISH', name: '已结束', value: 20 }
|
||||
])
|
||||
11
common/enum/groupon/TaskStatus.js
Executable file
11
common/enum/groupon/TaskStatus.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import Enum from '../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:拼单状态
|
||||
* TaskStatusEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'NORMAL', name: '进行中', value: 10 },
|
||||
{ key: 'SUCCESS', name: '拼单成功', value: 20 },
|
||||
{ key: 'FAIL', name: '拼单失败', value: 30 }
|
||||
])
|
||||
6
common/enum/groupon/index.js
Executable file
6
common/enum/groupon/index.js
Executable file
@@ -0,0 +1,6 @@
|
||||
import GoodsStatusEnum from './GoodsStatus'
|
||||
import TaskStatusEnum from './TaskStatus'
|
||||
import ActiveTypeEnum from './ActiveType'
|
||||
import ActiveStatusEnum from './ActiveStatus'
|
||||
|
||||
export { GoodsStatusEnum, TaskStatusEnum, ActiveTypeEnum, ActiveStatusEnum }
|
||||
15
common/enum/live/LiveStatus.js
Executable file
15
common/enum/live/LiveStatus.js
Executable file
@@ -0,0 +1,15 @@
|
||||
import Enum from '../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:微信小程序直播间状态
|
||||
* LiveStatusEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 101, name: '直播中', value: 101 },
|
||||
{ key: 102, name: '未开始', value: 102 },
|
||||
{ key: 103, name: '已结束', value: 103 },
|
||||
{ key: 104, name: '禁播', value: 104 },
|
||||
{ key: 105, name: '暂停中', value: 105 },
|
||||
{ key: 106, name: '异常', value: 106 },
|
||||
{ key: 107, name: '已过期', value: 107 }
|
||||
])
|
||||
3
common/enum/live/index.js
Executable file
3
common/enum/live/index.js
Executable file
@@ -0,0 +1,3 @@
|
||||
import LiveStatusEnum from './LiveStatus'
|
||||
|
||||
export { LiveStatusEnum }
|
||||
10
common/enum/order/DeliveryStatus.js
Executable file
10
common/enum/order/DeliveryStatus.js
Executable file
@@ -0,0 +1,10 @@
|
||||
import Enum from '../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:订单发货状态
|
||||
* DeliveryStatusEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'NOT_DELIVERED', name: '未发货', value: 10 },
|
||||
{ key: 'DELIVERED', name: '已发货', value: 20 }
|
||||
])
|
||||
11
common/enum/order/DeliveryType.js
Executable file
11
common/enum/order/DeliveryType.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import Enum from '../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:配送方式
|
||||
* DeliveryTypeEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'EXPRESS', name: '快递配送', value: 10 },
|
||||
{ key: 'EXTRACT', name: '上门自提', value: 20 },
|
||||
{ key: 'NOTHING', name: '无需配送', value: 30 }
|
||||
])
|
||||
11
common/enum/order/OrderSource.js
Executable file
11
common/enum/order/OrderSource.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import Enum from '../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:订单来源
|
||||
* OrderSourceEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'MASTER', name: '普通订单', value: 10 },
|
||||
{ key: 'BARGAIN', name: '砍价订单', value: 20 },
|
||||
{ key: 'SHARP', name: '秒杀订单', value: 30 }
|
||||
])
|
||||
12
common/enum/order/OrderStatus.js
Executable file
12
common/enum/order/OrderStatus.js
Executable file
@@ -0,0 +1,12 @@
|
||||
import Enum from '../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:订单状态
|
||||
* OrderStatusEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'NORMAL', name: '进行中', value: 10 },
|
||||
{ key: 'CANCELLED', name: '已取消', value: 20 },
|
||||
{ key: 'APPLY_CANCEL', name: '待取消', value: 21 },
|
||||
{ key: 'COMPLETED', name: '已完成', value: 30 }
|
||||
])
|
||||
10
common/enum/order/OrderType.js
Executable file
10
common/enum/order/OrderType.js
Executable file
@@ -0,0 +1,10 @@
|
||||
import Enum from '../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:订单类型
|
||||
* OrderTypeEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'PHYSICAL', name: '实物订单', value: 10 },
|
||||
{ key: 'VIRTUAL', name: '虚拟订单', value: 20 }
|
||||
])
|
||||
10
common/enum/order/PayStatus.js
Executable file
10
common/enum/order/PayStatus.js
Executable file
@@ -0,0 +1,10 @@
|
||||
import Enum from '../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:订单支付状态
|
||||
* PayStatusEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'PENDING', name: '待支付', value: 10 },
|
||||
{ key: 'SUCCESS', name: '已支付', value: 20 }
|
||||
])
|
||||
10
common/enum/order/PayType.js
Executable file
10
common/enum/order/PayType.js
Executable file
@@ -0,0 +1,10 @@
|
||||
import Enum from '../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:订单支付方式
|
||||
* PayTypeEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'BALANCE', name: '余额支付', value: 10 },
|
||||
{ key: 'WECHAT', name: '微信支付', value: 20 }
|
||||
])
|
||||
10
common/enum/order/ReceiptStatus.js
Executable file
10
common/enum/order/ReceiptStatus.js
Executable file
@@ -0,0 +1,10 @@
|
||||
import Enum from '../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:订单收货状态
|
||||
* ReceiptStatusEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'NOT_RECEIVED', name: '未收货', value: 10 },
|
||||
{ key: 'RECEIVED', name: '已收货', value: 20 }
|
||||
])
|
||||
11
common/enum/order/delivery/DeliveryMethod.js
Executable file
11
common/enum/order/delivery/DeliveryMethod.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import Enum from '../../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:发货方式
|
||||
* DeliveryMethodEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'MANUAL', name: '手动发货', value: 10 },
|
||||
{ key: 'UNWANTED', name: '无需物流', value: 20 },
|
||||
{ key: 'EORDER', name: '电子面单', value: 30 }
|
||||
])
|
||||
3
common/enum/order/delivery/index.js
Executable file
3
common/enum/order/delivery/index.js
Executable file
@@ -0,0 +1,3 @@
|
||||
import DeliveryMethodEnum from './DeliveryMethod'
|
||||
|
||||
export { DeliveryMethodEnum }
|
||||
17
common/enum/order/index.js
Executable file
17
common/enum/order/index.js
Executable file
@@ -0,0 +1,17 @@
|
||||
import DeliveryStatusEnum from './DeliveryStatus'
|
||||
import DeliveryTypeEnum from './DeliveryType'
|
||||
import OrderSourceEnum from './OrderSource'
|
||||
import OrderStatusEnum from './OrderStatus'
|
||||
import PayStatusEnum from './PayStatus'
|
||||
import ReceiptStatusEnum from './ReceiptStatus'
|
||||
import OrderTypeEnum from './OrderType'
|
||||
|
||||
export {
|
||||
DeliveryStatusEnum,
|
||||
DeliveryTypeEnum,
|
||||
OrderSourceEnum,
|
||||
OrderStatusEnum,
|
||||
PayStatusEnum,
|
||||
ReceiptStatusEnum,
|
||||
OrderTypeEnum
|
||||
}
|
||||
11
common/enum/order/refund/AuditStatus.js
Executable file
11
common/enum/order/refund/AuditStatus.js
Executable file
@@ -0,0 +1,11 @@
|
||||
import Enum from '../../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:商家审核状态
|
||||
* AuditStatusEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'WAIT', name: '待审核', value: 0 },
|
||||
{ key: 'REVIEWED', name: '已同意', value: 10 },
|
||||
{ key: 'REJECTED', name: '已拒绝', value: 20 }
|
||||
])
|
||||
12
common/enum/order/refund/RefundStatus.js
Executable file
12
common/enum/order/refund/RefundStatus.js
Executable file
@@ -0,0 +1,12 @@
|
||||
import Enum from '../../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:售后单状态
|
||||
* RefundStatusEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'NORMAL', name: '进行中', value: 0 },
|
||||
{ key: 'REJECTED', name: '已拒绝', value: 10 },
|
||||
{ key: 'COMPLETED', name: '已完成', value: 20 },
|
||||
{ key: 'CANCELLED', name: '已取消', value: 30 }
|
||||
])
|
||||
10
common/enum/order/refund/RefundType.js
Executable file
10
common/enum/order/refund/RefundType.js
Executable file
@@ -0,0 +1,10 @@
|
||||
import Enum from '../../enum'
|
||||
|
||||
/**
|
||||
* 枚举类:售后类型
|
||||
* RefundTypeEnum
|
||||
*/
|
||||
export default new Enum([
|
||||
{ key: 'RETURN', name: '退货退款', value: 10 },
|
||||
{ key: 'EXCHANGE', name: '换货', value: 20 }
|
||||
])
|
||||
9
common/enum/order/refund/index.js
Executable file
9
common/enum/order/refund/index.js
Executable file
@@ -0,0 +1,9 @@
|
||||
import AuditStatusEnum from './AuditStatus'
|
||||
import RefundStatusEnum from './RefundStatus'
|
||||
import RefundTypeEnum from './RefundType'
|
||||
|
||||
export {
|
||||
AuditStatusEnum,
|
||||
RefundStatusEnum,
|
||||
RefundTypeEnum
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user