第一次提交

This commit is contained in:
gxwebsoft
2023-08-04 13:14:48 +08:00
commit 1b923e5cff
1030 changed files with 128016 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/unpackage
/node_modules

20
.hbuilderx/launch.json Normal file
View 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" : "local"
},
"h5" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}

12
.idea/meihelove-uniapp.iml generated Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

8
.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/meihelove-uniapp.iml" filepath="$PROJECT_DIR$/.idea/meihelove-uniapp.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

121
App.vue Executable file
View File

@@ -0,0 +1,121 @@
<script>
import store from '@/store'
import storage from '@/utils/storage'
import {
ACCESS_TOKEN,
USER_ID,
USER_INFO
} from '@/store/mutation-types'
import {
getSceneData
} from './core/app'
import {
apiUrl,
tenantId,
appId,
appSecret,
fileUrl,
accessKey,
userId
} from '@/config.js';
import * as RedisApi from '@/api/redis-util.js'
import http from './api'
export default {
/**
* 全局变量
*/
globalData: {
},
/**
* 初始化完成时触发
*/
async onLaunch({
path,
query,
scene
}) {
await this.init(path, query)
},
onShow() {},
methods: {
// 程序初始化
async init(path, query) {
console.log("程序初始化:>>>> ");
const app = this
// 1. 登录获取token
const token = storage.get(ACCESS_TOKEN)
// 2. 连接聊天服务器
if (token) {
store.dispatch('GetUserInfo')
store.dispatch('ConnectSocket', {
userId: store.getters.userId,
token
})
}
// 3. 获取配置信息
RedisApi.getConfig().then(res => {
console.log("res: ",res);
})
console.log("初始化结束:>>>> ");
},
// app启动参数
onStartupQuery(query) {
console.log("query=========: ",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)
},
// 小程序主动更新
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">
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */
@import "@/uni_modules/uview-ui/index.scss";
/* iconfont图标库 */
@import "/utils/iconfont.scss";
/* 项目基础样式 */
@import "./app.scss";
</style>

14
androidPrivacy.json Executable file
View 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" : "退出应用"
}
}

24
api/apps-bc-agent.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询余额明细
export const pageAgentUser = (params) => http.get('/open/bc-agent/page', {params})
// 分页查询余额明细
export const listAgentUser = (params) => http.get('/open/bc-agent', {params})
// 查询余额明细
export const getAgentUser = (AgentUserId) => http.get('/open/bc-agent/' + AgentUserId)
// 添加余额明细
export const addAgentUser = (data) => http.post('/open/bc-agent', data)
// 删除余额明细
export const removeAgentUser = (id) => http.get('/open/user-balance-log/remove/' + id)
export default {
pageAgentUser,
listAgentUser,
getAgentUser,
addAgentUser,
removeAgentUser
}

24
api/apps-bc-plan.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询发布菜品
export const pageBCPlan = (params) => http.get('/apps/bc-plan/page', {params})
// 查询全部发布菜品
export const listBCPlan = (params) => http.get('/apps/bc-plan', {params})
// 查询单天发布菜品
export const getBCPlan = (orderId) => http.get('/apps/bc-plan/' + orderId)
// 发布菜品
export const addBCPlan = (data) => http.post('/apps/bc-plan', data)
// 删除发布菜品
export const removeBCPlan = (id) => http.get('/apps/bc-plan/remove/' + id)
export default {
pageBCPlan,
listBCPlan,
getBCPlan,
addBCPlan,
removeBCPlan
}

31
api/apps-bc-temporary.js Normal file
View File

@@ -0,0 +1,31 @@
import http from './index.js';
// 分页查询临时报餐
export const pageTemporary = (params) => http.get('/apps/bc-temporary/page', {params})
// 分页查询临时报餐
export const pageTemporaryUser = (params) => http.get('/open/bc-temporary/page', {params})
// 分页查询临时报餐
export const listTemporaryUser = (params) => http.get('/open/bc-temporary', {params})
// 查询临时报餐
export const getTemporaryUser = (TemporaryUserId) => http.get('/open/bc-temporary/' + TemporaryUserId)
// 修改
export const updateTemporary = (data) => http.put('/apps/bc-temporary', data)
export const removeTemporary = (id) => http.delete('/apps/bc-temporary/' + id)
// 申请临时报餐
export const applyTemporary = (data) => http.post('/apps/bc-temporary/apply', data)
export default {
updateTemporary,
pageTemporary,
pageTemporaryUser,
listTemporaryUser,
getTemporaryUser,
applyTemporary,
removeTemporary
}

29
api/article-comment.js Normal file
View File

@@ -0,0 +1,29 @@
import http from './index.js';
// 分页查询文章评论
export const pageArticleComment = (params) => http.get('/cms/article-comment/page', {params})
// 查询文章评论
export const getArticleComment = (ArticleCommentId) => http.get('/cms/article-comment/' + ArticleCommentId)
// 查询全部评论
export const listArticleComment = (params) => http.get('/cms/article-comment', {params})
// 添加文章评论
export const addArticleComment = (data) => http.post('/cms/article-comment', data)
// 删除文章评论
export const removeArticleComment = (id) => http.delete('/cms/article-comment/' + id)
// 未读评论数
export const getArticleCommentUnreadCount = () => http.get('/cms/article-comment/unread')
export default {
pageArticleComment,
listArticleComment,
getArticleComment,
addArticleComment,
removeArticleComment,
getArticleCommentUnreadCount
}

24
api/article-like.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询文章点赞
export const pageArticleLike = (params) => http.get('/cms/article-like/page', {params})
// 查询文章点赞
export const getArticleLike = (ArticleLikeId) => http.get('/cms/article-like/' + ArticleLikeId)
// 查询全部文字
export const listArticleLike = (params) => http.get('/cms/article-like', {params})
// 添加文章点赞
export const addArticleLike = (data) => http.post('/cms/article-like', data)
// 删除文章点赞
export const removeArticleLike = (id) => http.delete('/cms/article-like/' + id)
export default {
pageArticleLike,
listArticleLike,
getArticleLike,
addArticleLike,
removeArticleLike
}

25
api/article.js Normal file
View File

@@ -0,0 +1,25 @@
import http from './index.js';
// 分页查询文章
export const pageArticle = (params) => http.get('/cms/article/page', {params})
// 查询文章
export const getArticle = (articleId) => http.get('/cms/article/' + articleId)
// 查询全部文字
export const listArticle = (params) => http.get('/cms/article', {params})
// 添加文章
export const addArticle = (data) => http.post('/cms/article', data)
// 删除文章
export const removeArticle = (id) => http.delete('/cms/article/' + id)
export default {
pageArticle,
listArticle,
getArticle,
addArticle,
removeArticle
}

24
api/balance-log.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询余额明细
export const pageBalanceLog = (params) => http.get('/shop/user-balance-log/page', {params})
// 分页查询余额明细
export const listBalanceLog = (params) => http.get('/shop/user-balance-log', {params})
// 查询余额明细
export const getBalanceLog = (balanceLogId) => http.get('/shop/user-balance-log/' + balanceLogId)
// 添加余额明细
export const addBalanceLog = (data) => http.post('/shop/user-balance-log', data)
// 删除余额明细
export const removeBalanceLog = (id) => http.get('/open/user-balance-log/remove/' + id)
export default {
pageBalanceLog,
listBalanceLog,
getBalanceLog,
addBalanceLog,
removeBalanceLog
}

23
api/cart.js Normal file
View File

@@ -0,0 +1,23 @@
import http from './index.js';
// 查询购物车商品
export const showCart = (data) => http.post('/apps/bc-cart/showCart',data)
// 添加购物车
export const addCart = (data) => http.post('/apps/bc-cart/addCart', data)
export const addCartPro = (data) => http.post('/apps/bc-cart/addCart',data)
// 清空购物车
export const clearCart = () => http.get('/apps/bc-cart/clearCart')
// 生成订单
export const createOrder = (data) => http.post('/apps/bc-cart/createOrder', data)
// 清空购物车
export const removeCart = () => http.get('/apps/bc-cart/removeCart')
export default {
showCart,
addCart,
addCartPro,
createOrder,
removeCart
}

21
api/categoty.js Normal file
View File

@@ -0,0 +1,21 @@
import http from './index.js';
// 分页查询商品分类
export const pageCategory = (params) => http.get('/open/category/page', {params})
// 分页查询全部商品分类
export const listCategory = (params) => http.get('/open/category', {params})
// 查询商品分类
export const getCategory = (categoryId) => http.get('/open/category/' + categoryId)
// 添加商品分类
export const addCategory = (data) => http.post('/open/category', data)
export default {
pageCategory,
listCategory,
getCategory,
addCategory
}

19
api/chat.js Normal file
View File

@@ -0,0 +1,19 @@
import http from './index.js';
export const getConversationList = () => http.get('/love/chat-conversation/app')
export const sendMessage = (data) => http.post('/love/chat-message/app/send', data)
export const getFriemdMessages = (friendId) => http.get('/love/chat-message/app/list/' + friendId)
export const postMarkRead = (data) => http.post('/love/chat-conversation/app/read', data)
export const removeConversation = (id) => http.delete('/love/chat-conversation/' + id)
export default {
getConversationList,
sendMessage,
getFriemdMessages,
postMarkRead,
removeConversation
}

10
api/chatgpt.js Normal file
View File

@@ -0,0 +1,10 @@
import http from './index.js';
// 提交问题
export const chat = (data) => http.post('https://chatgpt.websoft.top/api/open/chat/chat', data)
// export const chat = (data) => http.post('/open/chat/chat', data)
export default {
chat
}

16
api/demo.js Normal file
View File

@@ -0,0 +1,16 @@
import http from './index.js';
// 添加购物车
export const ServerTime = () => http.post('http://127.0.0.1:9090/hxz/v1/ServerTime')
export const QRCodeTransaction = (data) => http.post('http://127.0.0.1:9090/hxz/v1/QRCodeTransaction',data)
export const QRCodeTransaction2 = (data) => http.post('https://server.gxwebsoft.com/hxz/v1/QRCodeTransaction',data)
export const TransactionInquiry = (data) => http.post('http://127.0.0.1:9090/hxz/v1/TransactionInquiry',data)
export default {
ServerTime,
QRCodeTransaction,
QRCodeTransaction2,
TransactionInquiry
}

12
api/dict.js Normal file
View File

@@ -0,0 +1,12 @@
import http from './index.js';
// 读取字典数据
export const getDictionaryOptions = (params) => http.get('/system/dict-data', {params})
export const listDictionary = (params) => http.get('/system/dict/tree', {params})
export default {
getDictionaryOptions,
listDictionary
}

20
api/equipment-goods.js Normal file
View File

@@ -0,0 +1,20 @@
import http from './index.js';
// 分页查询设备列表
export const pageEquipmentGoods = (params) => http.get('/apps/equipment-goods/page', {params})
// 查询设备
export const getEquipmentGoods = (goodsId) => http.get('/apps/equipment-goods/' + goodsId)
// 绑定设备
export const bindEquipment = (data) => http.post('/open/equipment/bind', data)
// 绑定设备
export const changeEquipment = (data) => http.post('/open/equipment/change', data)
export default {
pageEquipmentGoods,
getEquipmentGoods,
bindEquipment,
changeEquipment
}

20
api/equipment.js Normal file
View File

@@ -0,0 +1,20 @@
import http from './index.js';
// 分页查询设备列表
export const pageEquipment = (params) => http.get('/apps/equipment/page', {params})
// 查询设备
export const getEquipment = (equipmentId) => http.get('/apps/equipment/' + equipmentId)
// 绑定设备
export const bindEquipment = (data) => http.post('/open/equipment/bind', data)
// 绑定设备
export const changeEquipment = (data) => http.post('/open/equipment/change', data)
export default {
pageEquipment,
getEquipment,
bindEquipment,
changeEquipment
}

28
api/goods.js Normal file
View File

@@ -0,0 +1,28 @@
import http from './index.js';
// 分页查询商品
export const pageGoods = (params) => http.get('/open/goods/page', {params})
// 分页查询全部商品
export const listGoods = (params) => http.get('/open/goods', {params})
// 查询商品
export const getGoods = (GoodsId) => http.get('/open/Goods/' + GoodsId)
// 添加商品
export const addGoods = (data) => http.post('/shop/Goods', data)
// 查询菜品列表
export const getFoodList = (params) => http.get('/apps/bc-food/getFoodList', {params})
// 查询一周菜谱
export const getWeekFood = (params) => http.get('/apps/bc-food/getWeekFood', {params})
export default {
pageGoods,
listGoods,
getGoods,
addGoods,
getFoodList,
getWeekFood
}

28
api/house-info.js Normal file
View File

@@ -0,0 +1,28 @@
import http from './index.js';
// 分页查询房源信息
export const pageHouseInfo = (params) => http.get('/house/info/page', {params})
// 查询全部房源信息
export const listHouseInfo = (params) => http.get('/house/info', {params})
// 查询房源信息(当期登录用户)
export const getHouseInfo = (userId) => http.get('/house/info/' + userId)
// 查询会员资料
export const getUserDetail = (userId) => http.get('/house/info/detail/' + userId)
// 新增房源信息
export const addHouseInfo = (data) => http.post('/house/info', data)
// 删除房源信息
export const removeHouseInfo = (id) => http.get('/house/info/remove/' + id)
export default {
pageHouseInfo,
listHouseInfo,
getHouseInfo,
getUserDetail,
removeHouseInfo,
addHouseInfo
}

24
api/house-reservation.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询房源信息
export const pageHouseReservation = (params) => http.get('/house/reservation/page', {params})
// 查询全部房源信息
export const listHouseReservation = (params) => http.get('/house/reservation', {params})
// 查询房源信息(当期登录用户)
export const getHouseReservation = (userId) => http.get('/house/reservation/' + userId)
// 新增房源信息
export const addHouseReservation = (data) => http.post('/house/reservation', data)
// 删除房源信息
export const removeHouseReservation = (id) => http.get('/house/reservation/remove/' + id)
export default {
pageHouseReservation,
listHouseReservation,
getHouseReservation,
removeHouseReservation,
addHouseReservation
}

85
api/index.js Normal file
View File

@@ -0,0 +1,85 @@
import Request from 'luch-request'
import storage from '@/utils/storage'
import {
apiUrl,
tenantId,
appId,
appSecret
} from '@/config.js';
import {
getSign
} from '@/utils/util.js'
import {
ACCESS_TOKEN
} from '@/store/mutation-types'
const http = new Request();
/**
* @description 修改全局默认配置
* @param {Function}
*/
http.setConfig((config) => {
/* config 为默认全局配置*/
config.baseURL = apiUrl; /* 根域名 */
return config
})
// 拦截器(请求之前拦截)
http.interceptors.request.use((config) => { // 可使用async await 做异步操作
const token = storage.get(ACCESS_TOKEN)
config.header = {
...config.header,
tenantId
}
if(token){
config.header.Authorization = token
config.header.appId = appId
}
if (config.data) {
config.data.tenantId = tenantId
}
if (!token) {
// 如果token不存在需要加签
config.params.tenantId = tenantId
config.params.sign = getSign(config.params,appSecret);
}else {
}
/**
/* 演示
if (!token) { // 如果token不存在return Promise.reject(config) 会取消本次请求
return Promise.reject(config)
}
**/
return config
}, config => { // 可使用async await 做异步操作
return Promise.reject(config)
})
// 拦截器(请求之后拦截)
http.interceptors.response.use((response) => {
/* 对响应成功做点什么 可使用async await 做异步操作*/
// if (response.data.code !== 200) { // 服务端返回的状态码不等于200则reject()
// return Promise.reject(response) // return Promise.reject 可使promise状态进入catch
// if (response.config.custom.verification) { // 演示自定义参数的作用
// return response.data
// }
// token过期
if (response.data.code == 401) {
}
if (response.data.code == 1) {
return Promise.reject(response.data)
}
return response.data
}, (response) => {
/* 对响应错误做点什么 statusCode !== 200*/
console.log(response)
return Promise.reject(response)
})
export default http

74
api/login.js Normal file
View File

@@ -0,0 +1,74 @@
import http from './index.js';
import {
apiUrl,
fileUrl,
accessKey,
userId
} from '@/config.js';
import {
ACCESS_TOKEN,
USER_ID,
USER_INFO
} from '@/store/mutation-types'
import store from '@/store'
import storage from '@/utils/storage'
// 免密登录
export const getToken = () => http.get(apiUrl + '/token/' + userId + '/' + accessKey + '/').then(result => {
console.log("免密登录: ", result);
const {
access_token,
user
} = result.data
// 过期时间30天
const expiryTime = 30 * 86400
// 保存tokne和userId到缓存
storage.set(USER_ID, user.userId, expiryTime)
storage.set(USER_INFO, user, expiryTime)
storage.set(ACCESS_TOKEN, access_token, expiryTime)
store.dispatch('setToken', access_token)
store.dispatch('setUserId', user.userId)
})
// 获取图形验证码
export const getCaptcha = (params) => http.get('/captcha', {
params
})
// 发送短信验证码
export const sendSmsCaptcha = (params) => http.post('/open/sendSmsCaptcha', {
params
})
// 获取微信openId
export const getWxOpenId = (data) => http.post('/wx-login/getWxOpenId', data)
// 支付宝授权码换取userId
export const getAuthCode = (data) => http.post('/open/login-alipay/getAuthCode', data)
// 微信手机号码登录
export const loginMpWxMobile = (data) => http.post('/wx-login/loginByMpWxPhone', data)
// 获取支付宝手机号码
export const getPhoneNumber = (data, config) => http.post('/shop/payment/getPhoneNumber', data, config)
// 支付宝登录
export const alipayLogin = (data) => http.post('/login-alipay/login', data)
// 支付宝用户注册
export const register = (data) => http.post('/login-alipay/register', data)
// 游客登录
export const login = (data) => http.post('/login', data)
export default {
getToken,
getWxOpenId,
getCaptcha,
sendSmsCaptcha,
getAuthCode,
getPhoneNumber,
alipayLogin,
login
}

24
api/love-certificate.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询会员证件
export const pageCertificate = (params) => http.get('/love/certificate/page', {params})
// 查询全部会员证件
export const listCertificate = (params) => http.get('/love/certificate', {params})
// 上传会员证件
export const addCertificate = (data) => http.post('/love/certificate', data)
// 修改会员证件
export const updateCertificate = (data) => http.put('/love/certificate', data)
// 删除会员证件
export const removeCertificate = (id) => http.delete('/love/certificate/' + id)
export default {
pageCertificate,
listCertificate,
addCertificate,
updateCertificate,
removeCertificate
}

24
api/love-profit.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询收益明细
export const pageProfit = (params) => http.get('/love/profit/page', {params})
// 分页查询收益明细
export const listProfit = (params) => http.get('/love/profit', {params})
// 查询收益明细
export const getProfit = (balanceLogId) => http.get('/love/profit/' + balanceLogId)
// 添加收益明细
export const addProfit = (data) => http.post('/love/profit', data)
// 删除收益明细
export const removeProfit = (id) => http.get('/love/profit/remove/' + id)
export default {
pageProfit,
listProfit,
getProfit,
addProfit,
removeProfit
}

View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询会员权益
export const pageUserPlanEquity = (params) => http.get('/love/user-plan-equity/page', {params})
// 查询全部会员权益
export const listUserPlanEquity = (params) => http.get('/love/user-plan-equity', {params})
// 修改会员权益
export const addUserPlanEquity = (data) => http.post('/love/user-plan-equity', data)
// 删除会员权益
export const removeUserPlanEquity = (id) => http.delete('/love/user-plan-equity/' + id)
// 创建会员订单记录
export const getPlanByPriceId = (priceId) => http.get('/love/user-plan-equity/getPlanByPriceId/' + priceId)
export default {
pageUserPlanEquity,
listUserPlanEquity,
addUserPlanEquity,
removeUserPlanEquity,
getPlanByPriceId
}

24
api/love-user-plan-log.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询购买记录
export const pageUserPlanLog = (params) => http.get('/love/user-plan-log/page', {params})
// 查询全部购买记录
export const listUserPlanLog = (params) => http.get('/love/user-plan-log', {params})
// 修改购买记录
export const addUserPlanLog = (data) => http.post('/love/user-plan-log', data)
// 删除购买记录
export const removeUserPlanLog = (id) => http.delete('/love/user-plan-log/' + id)
// 创建会员订单记录
export const getPlanByPriceId = (priceId) => http.get('/love/user-plan-log/getPlanByPriceId/' + priceId)
export default {
pageUserPlanLog,
listUserPlanLog,
addUserPlanLog,
removeUserPlanLog,
getPlanByPriceId
}

24
api/love-user-plan.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询会员套餐
export const pageUserPlan = (params) => http.get('/love/user-plan/page', {params})
// 查询全部会员套餐
export const listUserPlan = (params) => http.get('/love/user-plan', {params})
// 查询会员套餐信息
export const getUserPlan = (id) => http.get('/love/user-plan/' + id)
// 修改会员套餐
export const addUserPlan = (data) => http.post('/love/user-plan', data)
// 删除会员套餐
export const removeUserPlan = (id) => http.delete('/love/user-plan/' + id)
export default {
pageUserPlan,
listUserPlan,
getUserPlan,
addUserPlan,
removeUserPlan
}

28
api/love-user-profile.js Normal file
View File

@@ -0,0 +1,28 @@
import http from './index.js';
// 分页查询用户资料
export const pageUserProfile = (params) => http.get('/love/user-profile/page', {params})
// 查询全部用户资料
export const listUserProfile = (params) => http.get('/love/user-profile', {params})
// 查询用户资料(当期登录用户)
export const getUserProfile = (userId) => http.get('/love/user-profile/' + userId)
// 查询会员资料
export const getUserDetail = (userId) => http.get('/love/user-profile/detail/' + userId)
// 新增用户资料
export const updateUserProfile = (data) => http.put('/love/user-profile', data)
// 删除用户资料
export const removeUserProfile = (id) => http.get('/love/user-profile/remove/' + id)
export default {
pageUserProfile,
listUserProfile,
getUserProfile,
getUserDetail,
updateUserProfile,
removeUserProfile
}

24
api/merchant-withdraw.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询提现明细
export const pageMerchantWithdraw = (params) => http.get('/shop/merchant-withdraw/page', {params})
// 查询全部提现明细
export const listMerchantWithdraw = (params) => http.get('/shop/merchant-withdraw', {params})
// 获取提现明细
export const getMerchantWithdraw = (id) => http.get('/shop/merchant-withdraw/page', {id})
// 添加提现明细
export const addMerchantWithdraw = (data) => http.post('/shop/merchant-withdraw', data)
// 修改提现明细
export const updateMerchantWithdraw = (data) => http.put('/shop/merchant-withdraw/', data)
export default {
pageMerchantWithdraw,
listMerchantWithdraw,
getMerchantWithdraw,
addMerchantWithdraw,
updateMerchantWithdraw
}

28
api/merchant.js Normal file
View File

@@ -0,0 +1,28 @@
import http from './index.js';
// 分页查询商户列表
export const pageMerchant = (params) => http.get('/shop/merchant/page', {params})
// 查询全部商户
export const listMerchant = (params) => http.get('/shop/merchant', {params})
// 获取商户详情
export const getMerchant = (merchantId) => http.get('/shop/merchant/page', {merchantId})
// 添加商户
export const addMerchant = (data) => http.post('/shop/merchant', data)
// 修改商户
export const updateMerchant = (data) => http.put('/shop/merchant/', data)
// 提现申请
export const addWithdraw = (data) => http.post('/shop/merchant/addWithdraw', data)
export default {
pageMerchant,
listMerchant,
getMerchant,
addMerchant,
updateMerchant,
addWithdraw
}

28
api/order-goods.js Normal file
View File

@@ -0,0 +1,28 @@
import http from './index.js';
// 分页查询订单
export const pageOrder = (params) => http.get('/shop/order-goods/page', {params})
// 分页查询订单
export const listOrder = (params) => http.get('/shop/order-goods', {params})
// 查询订单
export const getOrder = (orderId) => http.get('/shop/order-goods/' + orderId)
// 添加订单
export const addOrder = (data) => http.post('/shop/order-goods', data)
// 删除订单
export const removeOrder = (id) => http.get('/open/order-goods/remove/' + id)
// 单个取消菜品
export const cancelfood = (data) => http.post('/open/order-goods/cancel',data)
export default {
pageOrder,
listOrder,
getOrder,
addOrder,
removeOrder,
cancelfood
}

66
api/order.js Normal file
View File

@@ -0,0 +1,66 @@
import http from './index.js';
// 分页查询订单
export const pageOrder = (params) => http.get('/shop/order/page', {params})
// 查询订单列表
export const listOrder = (params) => http.get('/shop/order', {params})
// 查询订单列表
export const listByIds = (data) => http.post('/shop/order/listByIds', data)
// 查询订单
export const getOrder = (orderId) => http.get('/shop/order/' + orderId)
// 添加订单
export const addOrder = (data) => http.post('/shop/order', data)
// 添加订单
export const receiptOrder = (data) => http.post('/open/equipment/receipt', data)
// 删除订单
export const removeOrder = (id) => http.get('/open/order/remove/' + id)
export const setPayStatus = (data) => http.post('/shop/order/setPayStatus', data)
// 查询订单
export const getMyOrder = (params) => http.get('/open/order/getMyOrder', { params })
// 查询核销订单
export const getReceiptOrder = (params) => http.get('/open/order/getReceiptOrder', { params })
// 订单核销
export const updateOrder = (data) => http.post('/shop/order', data)
// 生成二维码
export const generateQrCode = (params) => http.get('/shop/order/generateQrCode', { params })
// 核销二维码码
export const verificationQrCode = (data) => http.put('/open/order/verification',data)
// 取消报餐
export const cancelOrder = (data) => http.post('/open/order/cancel', data)
// 查询代取餐人员的报餐信息
export const getOthersOrder = (params) => http.get('/apps/bc-food/getOthersFood', {params})
// 查询临时报餐订单
export const getTemporaryOrder = (params) => http.get('/apps/bc-food/getTemporaryOrder',{params})
export default {
pageOrder,
listOrder,
listByIds,
getOrder,
addOrder,
receiptOrder,
removeOrder,
setPayStatus,
getMyOrder,
verificationQrCode,
cancelOrder,
updateOrder,
getOthersOrder,
getReceiptOrder,
getTemporaryOrder
}

35
api/payment.js Normal file
View File

@@ -0,0 +1,35 @@
import http from './index.js';
// 分页查询支付方式
export const pagePayment = (params) => http.get('/shop/payment/page', {params})
// 查询支付方式
export const getPayment = (paymentId) => http.get('/shop/payment/' + paymentId)
// 余额支付
export const balance = (orderId) => http.get('/shop/payment/balance/' + orderId)
// 余额支付批量
export const balanceBatch = (data) => http.post('/shop/payment/balanceBatch', data)
// 支付宝支付
export const alipay = (orderId) => http.get('/shop/payment/mp-alipay/' + orderId)
export const alipayReLet = (data) => http.post('/shop/payment/mp-alipay-relet/', data)
export const test = (data) => http.post('/shop/payment/mp-alipay/test', data)
export const payQuery = (orderId) => http.get('/shop/payment/mp-alipay/query/' + orderId)
export const payQueryByRelet = (orderId) => http.get('/shop/payment/mp-alipay/query-relet/' + orderId)
export default {
pagePayment,
getPayment,
alipay,
alipayReLet,
payQuery,
payQueryByRelet,
balance,
test
}

17
api/redis-util.js Normal file
View File

@@ -0,0 +1,17 @@
import http from './index.js';
/**
* 缓存工具包
* @author 科技小王子
* @since 2023-06-23 11:34:03
*/
// 获取配置信息
export const getConfig = () => http.get('/system/cache/config')
// 添加关注
export const addFocus = (data) => http.post('/shop/user-follow', data)
export default {
getConfig,
addFocus
}

8
api/setting.js Normal file
View File

@@ -0,0 +1,8 @@
import http from './index.js';
// 获取商户详情
export const getSetting = (settingKey) => http.get('/open/system/setting/' + settingKey)
export default {
getSetting
}

16
api/statistics.js Normal file
View File

@@ -0,0 +1,16 @@
import http from './index.js';
// 菜品预定统计
export const getBaocanUsers = (params) => http.get('/apps/bc-statistics/baoCanUsers', {params})
export const baoCanFoodCount = (params) => http.get('/apps/bc-statistics/baoCanFoodCount',{params})
export const baoCanUserCount = (params) => http.get('/apps/bc-statistics/baoCanUserCount',{params})
export const baoCanUserCount2 = (params) => http.get('/shop/order-goods',{params})
export default {
getBaocanUsers,
baoCanFoodCount,
baoCanUserCount,
baoCanUserCount2
}

16
api/test.js Normal file
View File

@@ -0,0 +1,16 @@
import http from './index.js';
// 分页查询订单
export const pageTest = (params) => http.get('/shop/order/page', {params})
// 查询订单
export const getTest = (orderId) => http.get('/shop/order/' + orderId)
// 添加订单
export const testIndex = (params) => http.get('/shop/test', params)
export default {
pageTest,
getTest,
testIndex
}

56
api/upload.js Normal file
View File

@@ -0,0 +1,56 @@
import http from './index.js';
import {
fileUrl
} from '@/config.js';
import storage from '@/utils/storage'
import dayjs from "dayjs"
import appConfig from '@/config.js'
// 文件服务器
// export const uploadFile = (file) => http.upload(fileUrl + '/api/file/upload', file)
// 阿里云OSS
export const uploadFile = (file) => http.upload('/oss/upload', file)
// export const uploadFile = async ({filePath}) => {
// // 获取临时凭证
// let sts = storage.get('sts');
// if(!sts){
// const stsRes = await http.get('/oss/getPostForm')
// sts = stsRes.data
// storage.set('sts', sts, 60)
// }
// const {polocyBase64,signature} = sts;
// var suffix = filePath.substring(filePath.lastIndexOf(".")); //.txt
// const fileName = dayjs().format('YYYYMMDD') + '/'+ uni.$u.guid() + suffix;
// return new Promise((reso, rej) => {
// uni.uploadFile({
// url: appConfig.fileUrl, // 开发者服务器的URL。
// filePath: filePath,
// name: 'file', // 必须填file。
// formData: {
// key: fileName,
// 'policy': polocyBase64,
// 'OSSAccessKeyId': 'LTAI5t8UTh8CTXEi2dYxobhj',
// 'success_action_status': '200', //让服务端返回200,不然默认会返回204
// 'signature': signature,
// // 'x-oss-security-token': this.stsToken,
// },
// success: (res) => {
// const webUrl = appConfig.fileUrl + '/' + fileName;
// reso({data: {url: webUrl,thumb: webUrl}})
// },
// fail: err => {
// rej(err)
// }
// });
// })
// }
export const getTempOssToken = () => http.get('/oss/getTempToken')
export default {
uploadFile,
getTempOssToken
}

20
api/user-comment.js Normal file
View File

@@ -0,0 +1,20 @@
import http from './index.js';
// 分页查询评论
export const pageComment = (params) => http.get('/shop/user-comment/page', {params})
// 查询全部评论
export const listComment = (params) => http.get('/shop/user-comment', {params})
// 修改评论
export const addComment = (data) => http.post('/shop/user-comment', data)
// 删除评论
export const removeComment = (id) => http.delete('/shop/user-comment/' + id)
export default {
pageComment,
listComment,
addComment,
removeComment
}

20
api/user-feedback.js Normal file
View File

@@ -0,0 +1,20 @@
import http from './index.js';
// 分页查询意见反馈
export const pageFeedback = (params) => http.get('/shop/user-feedback/page', {params})
// 查询全部意见反馈
export const listFeedback = (params) => http.get('/shop/user-feedback', {params})
// 修改意见反馈
export const addFeedback = (data) => http.post('/shop/user-feedback', data)
// 删除意见反馈
export const removeFeedback = (id) => http.delete('/shop/user-feedback/' + id)
export default {
pageFeedback,
listFeedback,
addFeedback,
removeFeedback
}

20
api/user-follow.js Normal file
View File

@@ -0,0 +1,20 @@
import http from './index.js';
// 分页查询关注记录
export const pageFollow = (params) => http.get('/shop/user-follow/page', {params})
// 查询全部关注记录
export const listFollow = (params) => http.get('/shop/user-follow', {params})
// 修改关注记录
export const addFollow = (data) => http.post('/shop/user-follow', data)
// 删除关注记录
export const removeFollow = (id) => http.delete('/shop/user-follow/' + id)
export default {
pageFollow,
listFollow,
addFollow,
removeFollow
}

20
api/user-grade.js Normal file
View File

@@ -0,0 +1,20 @@
import http from './index.js';
// 分页查询会员等级
export const pageUsereGrade = (params) => http.get('/shop/user-grade/page', {params})
// 查询全部会员等级
export const listUsereGrade = (params) => http.get('/shop/user-grade', {params})
// 修改会员等级
export const addUsereGrade = (data) => http.post('/shop/user-grade', data)
// 删除会员等级
export const removeUsereGrade = (id) => http.delete('/shop/user-grade/' + id)
export default {
pageUsereGrade,
listUsereGrade,
addUsereGrade,
removeUsereGrade
}

24
api/user-like.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询点赞
export const pageLike = (params) => http.get('/shop/user-like/page', {params})
// 查询全部点赞
export const listLike = (params) => http.get('/shop/user-like', {params})
// 添加点赞
export const addLike = (data) => http.post('/shop/user-like', data)
// 修改点赞
export const updateLike = (data) => http.put('/shop/user-like', data)
// 删除点赞
export const removeLike = (id) => http.delete('/shop/user-like/' + id)
export default {
pageLike,
listLike,
addLike,
removeLike,
updateLike
}

24
api/user-look.js Normal file
View File

@@ -0,0 +1,24 @@
import http from './index.js';
// 分页查询访客记录
export const pageLook = (params) => http.get('/shop/user-look/page', {params})
// 查询全部访客记录
export const listLook = (params) => http.get('/shop/user-look', {params})
// 添加访客记录
export const addLook = (data) => http.post('/shop/user-look', data)
// 修改访客记录
export const updateLook = (data) => http.put('/shop/user-look', data)
// 删除访客记录
export const removeLook = (id) => http.delete('/shop/user-look/' + id)
export default {
pageLook,
listLook,
addLook,
removeLook,
updateLook
}

20
api/user-referee.js Normal file
View File

@@ -0,0 +1,20 @@
import http from './index.js';
// 分页查询推荐关系
export const pageUserReferee = (params) => http.get('/shop/user-referee/page', {params})
// 查询全部推荐关系
export const listUserReferee = (params) => http.get('/shop/user-referee', {params})
// 修改推荐关系
export const addUserReferee = (data) => http.post('/shop/user-referee', data)
// 删除推荐关系
export const removeUserReferee = (id) => http.delete('/shop/user-referee/' + id)
export default {
pageUserReferee,
listUserReferee,
addUserReferee,
removeUserReferee
}

20
api/user.js Normal file
View File

@@ -0,0 +1,20 @@
import http from './index.js';
// 获取用户资料
export const getUser = (params) => http.get('/auth/user', {params})
// 修改用户资料
export const updateUser = (data) => http.put('/system/user', data)
export const getMyQrCode = (data) => http.post('/open/user/myQrCode',data)
// 获取用户资料
export const getAgentUser = (id) => http.get('/open/user/agentUser/' + id)
export const updatePassword = (data) => http.put('/auth/password',data)
export default {
getUser,
updateUser,
getMyQrCode,
getAgentUser,
updatePassword
}

8
api/ww-login.js Normal file
View File

@@ -0,0 +1,8 @@
import http from './index.js';
// 企业微信登录
export const wwLogin = (data) => http.post('/open/wx-work/accessToken', data)
export default {
wwLogin
}

12
api/wx-login.js Executable file
View File

@@ -0,0 +1,12 @@
import http from './index.js';
import { fileUrl } from '@/config.js';
// 获取微信openId
export const getWxQrCode = () => http.get('/wx-login/getQRCode')
export const getWxQrCodeFile = () => http.get('/file-preview/getQRCode')
export default {
getWxQrCode,
getWxQrCodeFile
}

8
api/wxofficial.js Executable file
View File

@@ -0,0 +1,8 @@
import http from './index.js';
// 查询订单列表
export const oauthUserInfo = (data) => http.post('/wxofficial/oauthUserInfo', data)
export default {
oauthUserInfo
}

43
app.scss Executable file
View File

@@ -0,0 +1,43 @@
/* utils.scss */
@import "/utils/utils.scss";
page {
background: #f3f3f3;
}
@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
View File

@@ -0,0 +1,3 @@
import paginate from './paginate'
export { paginate }

7
common/constant/paginate.js Executable file
View 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
View 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' },
])

View 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 }
])

View 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 }
])

View 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
View File

@@ -0,0 +1,5 @@
import ApplyRangeEnum from './ApplyRange'
import ExpireTypeEnum from './ExpireType'
import CouponTypeEnum from './CouponType'
export { ApplyRangeEnum, CouponTypeEnum, ExpireTypeEnum }

View 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 }
])

View File

@@ -0,0 +1,10 @@
import Enum from '../../enum'
/**
* 枚举类:分销商申请方式
* ApplyTypeEnum
*/
export default new Enum([
{ key: 'AUDIT', name: '需后台审核', value: 10 },
{ key: 'PASS', name: '无需审核', value: 20 }
])

View File

@@ -0,0 +1,4 @@
import ApplyStatusEnum from './ApplyStatus'
import ApplyTypeEnum from './ApplyType'
export { ApplyStatusEnum, ApplyTypeEnum }

View 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 }
])

View 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 }
])

View File

@@ -0,0 +1,4 @@
import PayTypeEnum from './PayType'
import ApplyStatusEnum from './ApplyStatus'
export { PayTypeEnum, ApplyStatusEnum }

85
common/enum/enum.js Executable file
View 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
View 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
View 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
View File

@@ -0,0 +1,4 @@
import GoodsTypeEnum from './GoodsType'
import SpecTypeEnum from './SpecType'
export { GoodsTypeEnum, SpecTypeEnum }

View 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 }
])

View 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: '阶梯团' }
])

View File

@@ -0,0 +1,10 @@
import Enum from '../enum'
/**
* 枚举类:拼团商品状态
* GoodsStatusEnum
*/
export default new Enum([
{ key: 'NORMAL', name: '进行中', value: 10 },
{ key: 'FINISH', name: '已结束', value: 20 }
])

View 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
View 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
View 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
View File

@@ -0,0 +1,3 @@
import LiveStatusEnum from './LiveStatus'
export { LiveStatusEnum }

View 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 }
])

View 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 }
])

View 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 }
])

View 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
View 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
View 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
View File

@@ -0,0 +1,10 @@
import Enum from '../enum'
/**
* 枚举类:订单支付方式
* PayTypeEnum
*/
export default new Enum([
{ key: 'BALANCE', name: '余额支付', value: 10 },
{ key: 'WECHAT', name: '微信支付', value: 20 }
])

View 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 }
])

View 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 }
])

View File

@@ -0,0 +1,3 @@
import DeliveryMethodEnum from './DeliveryMethod'
export { DeliveryMethodEnum }

17
common/enum/order/index.js Executable file
View 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
}

View 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 }
])

View 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 }
])

View File

@@ -0,0 +1,10 @@
import Enum from '../../enum'
/**
* 枚举类:售后类型
* RefundTypeEnum
*/
export default new Enum([
{ key: 'RETURN', name: '退货退款', value: 10 },
{ key: 'EXCHANGE', name: '换货', value: 20 }
])

View File

@@ -0,0 +1,9 @@
import AuditStatusEnum from './AuditStatus'
import RefundStatusEnum from './RefundStatus'
import RefundTypeEnum from './RefundType'
export {
AuditStatusEnum,
RefundStatusEnum,
RefundTypeEnum
}

11
common/enum/payment/Method.js Executable file
View File

@@ -0,0 +1,11 @@
import Enum from '../enum'
/**
* 枚举类:支付方式类型
* PayMethodEnum
*/
export default new Enum([
{ key: 'WECHAT', name: '微信支付', value: 'wechat' },
{ key: 'ALIPAY', name: '支付宝支付', value: 'alipay' },
{ key: 'BALANCE', name: '余额支付', value: 'balance' }
])

3
common/enum/payment/index.js Executable file
View File

@@ -0,0 +1,3 @@
import PayMethodEnum from './Method'
export { PayMethodEnum }

42
common/enum/setting/Key.js Executable file
View File

@@ -0,0 +1,42 @@
import Enum from '../enum'
/**
* 枚举类:设置项索引
* SettingKeyEnum
*/
export default new Enum([{
key: 'REGISTER',
name: '账户注册设置',
value: 'register'
},
{
key: 'APP_THEME',
name: '店铺页面风格',
value: 'app_theme'
},
{
key: 'PAGE_CATEGORY_TEMPLATE',
name: '分类页模板',
value: 'page_category_template'
},
{
key: 'POINTS',
name: '积分设置',
value: 'points'
},
{
key: 'RECHARGE',
name: '充值设置',
value: 'recharge'
},
{
key: 'RECOMMENDED',
name: '商品推荐设置',
value: 'recommended'
},
{
key: 'CUSTOMER',
name: '商城客服设置',
value: 'customer'
}
])

View File

@@ -0,0 +1,11 @@
import Enum from '../enum'
/**
* 枚举类:整点秒杀-活动会场状态
* ActiveStatusEnum
*/
export default new Enum([
{ key: 'STATE_BEGIN', name: '已开始', value: 10 },
{ key: 'STATE_SOON', name: '即将开始', value: 20 },
{ key: 'STATE_NOTICE', name: '预告', value: 30 }
])

View 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 }
])

4
common/enum/sharp/index.js Executable file
View File

@@ -0,0 +1,4 @@
import ActiveStatusEnum from './ActiveStatus'
import GoodsStatusEnum from './GoodsStatus'
export { ActiveStatusEnum, GoodsStatusEnum }

Some files were not shown because too many files have changed in this diff Show More