diff --git a/src/api/lottery.js b/src/api/lottery.js new file mode 100644 index 0000000..13b6d20 --- /dev/null +++ b/src/api/lottery.js @@ -0,0 +1,102 @@ +import request from '@/utils/request' + +/** + * @description 九宫格抽奖 -- 列表 + */ +export function lotteryListApi(data) { + return request({ + url: 'marketing/lottery/list', + method: 'get', + params: data, + }); +} + +/** + * @description 九宫格抽奖 -- 详情 + * @param id 抽奖活动id + */ +export function lotteryDetailApi(id) { + return request({ + url: `marketing/lottery/detail/${id}`, + method: 'get', + }); +} + +/** + * @description 九宫格抽奖 -- 新版详情 + * @param id 抽奖活动id + */ +export function lotteryNewDetailApi(type) { + return request({ + url: `marketing/lottery/factor_info/${type}`, + method: 'get', + }); +} + +/** + * @description 九宫格抽奖 -- 创建 + */ +export function lotteryCreateApi(data) { + return request({ + url: `marketing/lottery/add`, + method: 'post', + data, + }); +} +/** + ** + * @description 九宫格抽奖 -- 修改/编辑 + */ +export function lotteryEditApi(id, data) { + return request({ + url: `marketing/lottery/edit/${id}`, + method: 'put', + data, + }); +} + +/** + ** + * @description 九宫格抽奖 -- 删除 + */ +export function lotteryDelApi(id) { + return request({ + url: `marketing/lottery/del/${id}`, + method: 'delete', + }); +} + +/** + ** + * @description 九宫格抽奖 -- 显示状态 + */ +export function lotteryStatusApi(data) { + return request({ + url: `marketing/lottery/set_status/${data.id}/${data.status}`, + method: 'post', + }); +} + +/** + ** + * @description 九宫格抽奖 -- 中奖记录 + */ +export function lotteryRecordList(data) { + return request({ + url: `marketing/lottery/record/list`, + method: 'get', + params: data, + }); +} + +/** + ** + * @description 九宫格抽奖 -- 中奖发货/备注处理 + */ +export function lotteryRecordDeliver(data) { + return request({ + url: `marketing/lottery/record/deliver`, + method: 'post', + data, + }); +} diff --git a/src/api/marketing.js b/src/api/marketing.js index 98979aa..720874a 100644 --- a/src/api/marketing.js +++ b/src/api/marketing.js @@ -2,6 +2,35 @@ import request from '@/utils/request' + +/** + * 抽奖规则 列表 + * @param pram + */ +export function marketingGameListApi(params) { + return request({ + url: '/admin/game/list', + method: 'get', + params + }) +} + +/** + * 抽奖详情 列表 + * @param pram + */ +export function marketingGameInfoListApi(params) { + return request({ + url: '/admin/game/info', + method: 'get', + params + }) +} + + + + + /** * 优惠券 列表 * @param pram diff --git a/src/api/product.js b/src/api/product.js new file mode 100644 index 0000000..2c2663b --- /dev/null +++ b/src/api/product.js @@ -0,0 +1,420 @@ + +import request from '@/utils/request' + +/* + * 获取商品表单头数量; + * */ +export function getGoodHeade(data) { + return request({ + url: 'product/product/type_header', + method: 'get', + params: data, + }); +} + +/* + * 获取商品表单头数量; + * */ +export function getGoodsCategory(data) { + return request({ + url: '/goods/goods_category', + method: 'get', + params: data, + }); +} + +/** + * @description 商品管理-- 列表 + */ +export function getGoods(params) { + return request({ + url: 'product/product', + method: 'get', + params, + }); +} + +/** + * @description 商品管理-- 临时保存 + */ +export function productCache() { + return request({ + url: 'product/cache', + method: 'get', + }); +} + +/** + * @description 商品管理-- 取消临时保存 + */ +export function cacheDelete() { + return request({ + url: 'product/cache', + method: 'delete', + }); +} + +/** + * @description 商品管理-- 上下架 + */ +export function PostgoodsIsShow(id, isShow) { + return request({ + url: `product/product/set_show/${id}/${isShow}`, + method: 'put', + }); +} + +/** + * @description 商品属性 -- 批量上下架 + * @param {Object} param data {Object} 传值对象 + */ +export function productShowApi(data) { + return request({ + url: `product/product/product_show`, + method: 'put', + data, + }); +} + +/** + * 添加虚拟评论 + * @param {*} data + * @returns + */ +export function saveFictitiousReply(data) { + return request({ + url: 'product/reply/save_fictitious_reply', + method: 'post', + data, + }); +} + +/** + * @description 商品属性 -- 批量下架 + * @param {Object} param data {Object} 传值对象 + */ +export function productUnshowApi(data) { + return request({ + url: `product/product/product_unshow`, + method: 'put', + data, + }); +} + +/** + * @description 商品管理-- 分类 + */ +export function treeListApi(type) { + return request({ + url: `product/category/tree/${type}`, + method: 'get', + }); +} + +/** + * @description 商品管理-- 分类 new + */ +export function cascaderListApi(type) { + return request({ + url: `product/category/cascader/${type}`, + method: 'get', + }); +} + +/** + * @description 商品管理-- 详情 + */ +export function productInfoApi(id) { + return request({ + url: `product/product/${id}`, + method: 'get', + }); +} + +/** + * @description 商品管理-- 提交 + */ +export function productAddApi(data) { + return request({ + url: `product/product/${data.id}`, + method: 'POST', + data, + }); +} + +/** + * @description 商品分类 -- 列表 + * @param {Object} param params {Object} 传值参数 + */ +export function productListApi(params) { + return request({ + url: 'product/category', + method: 'get', + params, + }); +} + +/** + * @description 商品分类 -- 添加表单 + * @param {Object} param params {Object} 传值参数 + */ +export function productCreateApi() { + return request({ + url: 'product/category/create', + method: 'get', + }); +} + +/** + * @description 商品分类 -- 编辑表单 + * @param {Object} param params {Object} 传值参数 + */ +export function productEditApi(id) { + return request({ + url: `product/category/${id}`, + method: 'get', + }); +} + +/** + * @description 商品分类 -- 修改状态 + * @param {Object} param params {Object} 传值参数 + */ +export function setShowApi(data) { + return request({ + url: `product/category/set_show/${data.id}/${data.is_show}`, + method: 'PUT', + }); +} + +/** + * @description 选择商品 -- 列表 + */ +export function changeListApi(params) { + return request({ + url: `product/product/list`, + method: 'GET', + params, + }); +} + +/** + * @description 商品评论 -- 列表 + * @param {Object} param params {Object} 传值参数 + */ +export function replyListApi(params) { + return request({ + url: `product/reply`, + method: 'get', + params, + }); +} + +/** + * @description 商品评论 -- 回复 + * @param {Object} param data {Object} 传值参数 + */ +export function setReplyApi(data, id) { + return request({ + url: `product/reply/set_reply/${id}`, + method: 'PUT', + data, + }); +} + +/** + * @description 获取复制商品配置 + */ +export function copyConfigApi() { + return request({ + url: `product/copy_config`, + method: 'get', + }); +} + +/** + * @description 商品管理 -- 获取京东、淘宝商品数据 + * @param {Object} param data {Object} 传值参数 + */ +export function crawlFromApi(data) { + return request({ + url: `product/copy`, + method: 'POST', + data, + }); +} + +/** + * @description 商品管理 -- 京东、淘宝商品数据提交 + * @param {Object} param data {Object} 传值参数 + */ +export function crawlSaveApi(data) { + return request({ + url: `product/crawl/save`, + method: 'POST', + data, + }); +} + +/** + * @description 商品管理 -- 生成属性 + * @param {Object} param data {Object} 传值参数 + */ +export function generateAttrApi(data, id, type) { + return request({ + url: `product/generate_attr/${id}/${type}`, + method: 'POST', + data, + }); +} + +/** + * @description 商品属性 -- 列表 + * @param {Object} param params {Object} 传值参数 + */ +export function ruleListApi(params) { + return request({ + url: `product/product/rule`, + method: 'GET', + params, + }); +} + +/** + * @description 商品属性 -- 添加 + * @param {Number} param id {Number} 属性id + * @param {Object} param data {Object} 传值参数 + */ +export function ruleAddApi(data, id) { + return request({ + url: `product/product/rule/${id}`, + method: 'POST', + data, + }); +} + +/** + * @description 商品属性 -- 详情 + * @param {Number} param id {Number} 属性id + */ +export function ruleInfoApi(id) { + return request({ + url: `product/product/rule/${id}`, + method: 'get', + }); +} + +/** + * @description 商品评价 -- 虚拟评价 + * @id--产品id; + */ +export function fictitiousReply(id) { + return request({ + url: `product/reply/fictitious_reply/${id}`, + method: 'get', + }); +} + +/** + * @description 商品属性 -- 获取规则属性模板 + */ +export function productGetRuleApi() { + return request({ + url: `product/product/get_rule`, + method: 'get', + }); +} + +/** + * @description 商品 -- 获取运费模板 + */ +export function productGetTemplateApi() { + return request({ + url: `product/product/get_template`, + method: 'get', + }); +} + +/** + * @description 获取上传参数 + */ +export function productGetTempKeysApi(data) { + return request({ + url: `product/product/get_temp_keys`, + method: 'get', + params: data, + }); +} + +/** + * @description 商铺产品 -- 导出 + */ +export function storeProductApi(data) { + return request({ + url: `export/storeProduct`, + method: 'get', + params: data, + }); +} + +/** + * @description 添加商品 -- 检测活动存在 + */ +export function checkActivityApi(id) { + return request({ + url: `product/product/check_activity/${id}`, + method: 'get', + }); +} + +/** + * @description 商品添加编辑-- 用户标签 + */ +export function labelListApi() { + return request({ + url: 'user/user_label', + method: 'get', + }); +} +/** + * @description 组件获取用户标签 + */ +export function productUserLabel() { + return request({ + url: 'user/user_tree_label', + method: 'get', + }); +} +/** + * @description 上传类型 + */ +export function uploadType() { + return request({ + url: 'file/upload_type', + method: 'get', + }); +} + +/** + * @description 导入卡密 + */ +export function importCard(data) { + return request({ + url: 'product/product/import_card', + method: 'get', + params: data, + }); +} + +/** + * @description 商品批量设置 + * @param {Number} param id {Number} 属性id + * @param {Object} param data {Object} 传值参数 + */ +export function batchSetting(data) { + return request({ + url: `product/batch/setting`, + method: 'POST', + data, + }); +} diff --git a/src/router/modules/marketing.js b/src/router/modules/marketing.js index 08986dd..c3f401f 100644 --- a/src/router/modules/marketing.js +++ b/src/router/modules/marketing.js @@ -157,6 +157,21 @@ const marketingRouter = { } ] }, + { + path: 'lottery', + component: () => import('@/views/marketing/lottery/config/index'), + name: 'lottery', + meta: { title: '抽奖管理', icon: '' }, + children: [ + { + path: 'config', + component: () => import('@/views/marketing/lottery/config/index'), + name: 'config', + meta: { title: '抽奖配置', icon: '' } + }, + + ] + }, ] } diff --git a/src/views/marketing/lottery/config/index.vue b/src/views/marketing/lottery/config/index.vue new file mode 100644 index 0000000..773971a --- /dev/null +++ b/src/views/marketing/lottery/config/index.vue @@ -0,0 +1,130 @@ + + + + + diff --git a/src/views/marketing/lottery/index.vue b/src/views/marketing/lottery/index.vue new file mode 100644 index 0000000..4f747fe --- /dev/null +++ b/src/views/marketing/lottery/index.vue @@ -0,0 +1,320 @@ + + + + + diff --git a/src/views/store/creatStore/index.vue b/src/views/store/creatStore/index.vue index cb1922c..4616860 100644 --- a/src/views/store/creatStore/index.vue +++ b/src/views/store/creatStore/index.vue @@ -342,6 +342,13 @@ + + +
+ 11//TODO +
+
+
@@ -1206,8 +1213,8 @@ let list = response.list; let arr = [],arr1 = []; const listArr = [{ name: '是否热卖', value: 'isGood' }]; - let typeLists = [ - { name: '', value: 'isHot',type:'2' }, //热门榜单 + let typeLists = [ + { name: '', value: 'isHot',type:'2' }, //热门榜单 { name: '', value: 'isBenefit' ,type:'4'}, //促销单品 { name: '', value: 'isBest',type:'1' }, //精品推荐 { name: '', value: 'isNew',type:'3' }]; //首发新品