Merge branch 'master' of https://gitea.lihaink.cn/mkm/new_shop_mer
This commit is contained in:
commit
d3df8a1321
@ -2,3 +2,5 @@ build/*.js
|
||||
src/assets
|
||||
public
|
||||
dist
|
||||
views/
|
||||
views
|
||||
|
@ -22,7 +22,7 @@ module.exports = {
|
||||
}
|
||||
}],
|
||||
"vue/singleline-html-element-content-newline": "off",
|
||||
"vue/multiline-html-element-content-newline":"off",
|
||||
"vue/multiline-html-element-content-newline": "off",
|
||||
"vue/name-property-casing": ["error", "PascalCase"],
|
||||
"vue/no-v-html": "off",
|
||||
'accessor-pairs': 2,
|
||||
@ -37,7 +37,8 @@ module.exports = {
|
||||
'camelcase': [0, {
|
||||
'properties': 'always'
|
||||
}],
|
||||
'comma-dangle': [2, 'never'],
|
||||
// 'comma-dangle': [2, 'never'],
|
||||
'comma-dangle': "off",
|
||||
'comma-spacing': [2, {
|
||||
'before': false,
|
||||
'after': true
|
||||
@ -47,7 +48,7 @@ module.exports = {
|
||||
'curly': [2, 'multi-line'],
|
||||
'dot-location': [2, 'property'],
|
||||
'eol-last': 2,
|
||||
'eqeqeq': ["error", "always", {"null": "ignore"}],
|
||||
'eqeqeq': ["error", "always", { "null": "ignore" }],
|
||||
'generator-star-spacing': [2, {
|
||||
'before': true,
|
||||
'after': true
|
||||
|
@ -53,6 +53,7 @@
|
||||
"file-saver": "2.0.1",
|
||||
"fuse.js": "3.4.4",
|
||||
"html2canvas": "^1.1.0",
|
||||
"jquery": "^3.7.1",
|
||||
"js-cookie": "2.2.0",
|
||||
"jsonlint": "1.6.3",
|
||||
"jszip": "3.2.1",
|
||||
@ -69,8 +70,8 @@
|
||||
"screenfull": "4.2.0",
|
||||
"showdown": "1.9.0",
|
||||
"sortablejs": "^1.15.0",
|
||||
"view-design": "^4.3.2",
|
||||
"v-viewer": "^1.5.1",
|
||||
"view-design": "^4.3.2",
|
||||
"vue": "2.6.10",
|
||||
"vue-awesome-swiper": "^3.1.3",
|
||||
"vue-count-to": "1.0.13",
|
||||
|
@ -142,6 +142,35 @@ export function categorySelectApi() {
|
||||
return request.get(`store/category/select`)
|
||||
}
|
||||
|
||||
|
||||
/**mer/store/category/topList
|
||||
* @description 商品列表 -- 新商户分类
|
||||
*/
|
||||
export function newCategorySelectApi() {
|
||||
return request.get(`store/category/topList`)
|
||||
}
|
||||
|
||||
/**mer/store/category/topList
|
||||
* @description 商品导入到云商城
|
||||
*/
|
||||
export function importApi(data) {
|
||||
return request.post(`store/product/import`, data)
|
||||
}
|
||||
|
||||
/**mer/store/category/topList
|
||||
* @description 删除云商品
|
||||
*/
|
||||
export function deleteProductCloudApi(data) {
|
||||
return request.post(`store/product/delCloudProduct`, data)
|
||||
}
|
||||
|
||||
/**mer/store/category/topList
|
||||
* @description 云商城列表
|
||||
*/
|
||||
export function cloudProductListApi(data) {
|
||||
return request.get(`store/product/cloudProductList`, data)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 商品列表 -- 平台分类
|
||||
*/
|
||||
@ -528,11 +557,11 @@ export function batchesTempApi(data) {
|
||||
}
|
||||
/** 参数模板 -- 添加 */
|
||||
export function productSpecs(data) {
|
||||
return request.post(`store/params/temp/create`,data)
|
||||
return request.post(`store/params/temp/create`, data)
|
||||
}
|
||||
/** 参数模板 -- 编辑 */
|
||||
export function specsUpdate(id, data) {
|
||||
return request.post(`store/params/temp/update/${id}`,data)
|
||||
return request.post(`store/params/temp/update/${id}`, data)
|
||||
}
|
||||
/** 参数模板 -- 详情 */
|
||||
export function productSpecsInfo(id) {
|
||||
@ -552,7 +581,7 @@ export function specsDetailApi(id) {
|
||||
}
|
||||
/** 添加商品 -- 参数筛选 */
|
||||
export function specsSelectedApi(data) {
|
||||
return request.get(`store/params/temp/select`,data)
|
||||
return request.get(`store/params/temp/select`, data)
|
||||
}
|
||||
/** 添加商品 -- 参数筛选详情 */
|
||||
export function productSpecsDetailApi(data) {
|
||||
@ -567,7 +596,7 @@ export function productBathSvipApi(data) {
|
||||
return request.post(`store/product/batch_svip`, data)
|
||||
}
|
||||
/** 商品列表 -- 立即生成规格 */
|
||||
export function generateAttrApi(id,data) {
|
||||
export function generateAttrApi(id, data) {
|
||||
return request.post(`store/product/get_attr_value/${id}`, data)
|
||||
}
|
||||
/** 商品列表 -- 系统表单下拉 */
|
||||
@ -580,11 +609,11 @@ export function associatedFormInfo(id) {
|
||||
}
|
||||
/** 商品列表 -- 批量设置 */
|
||||
export function batchSetProduct(data) {
|
||||
return request.post(`store/product/batch_process`,data)
|
||||
return request.post(`store/product/batch_process`, data)
|
||||
}
|
||||
/** 商品列表 -- 商品操作记录 */
|
||||
export function operateRecordList(id,data) {
|
||||
return request.get(`store/product/get_operate_list/${id}`,data)
|
||||
export function operateRecordList(id, data) {
|
||||
return request.get(`store/product/get_operate_list/${id}`, data)
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -54,6 +54,7 @@ import * as filters from "./filters"; // global filters modalTemplates
|
||||
import notice from "@/libs/notice"; // global filters
|
||||
import guidancePop from "@/components/guidancePop";
|
||||
import { getToken } from "./utils/auth";
|
||||
|
||||
Vue.prototype.bus = new Vue();
|
||||
Vue.use(uploadPicture);
|
||||
Vue.use(FormCreate);
|
||||
@ -102,7 +103,7 @@ Object.keys(filters).forEach(key => {
|
||||
});
|
||||
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
(function () {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "https://cdn.oss.9gt.net/js/es.js?version=merchantv2.0";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
|
@ -10,99 +10,108 @@
|
||||
import Layout from '@/layout'
|
||||
import { roterPre } from '@/settings'
|
||||
const productRouter =
|
||||
{
|
||||
path: `${roterPre}/product`,
|
||||
name: 'product',
|
||||
component: Layout,
|
||||
meta: {
|
||||
icon: 'dashboard',
|
||||
title: '商品管理'
|
||||
{
|
||||
path: `${roterPre}/product`,
|
||||
name: 'product',
|
||||
component: Layout,
|
||||
meta: {
|
||||
icon: 'dashboard',
|
||||
title: '商品管理'
|
||||
},
|
||||
alwaysShow: true,
|
||||
redirect: 'noRedirect',
|
||||
children: [
|
||||
{
|
||||
path: 'classify',
|
||||
name: 'ProductClassify',
|
||||
meta: {
|
||||
title: '商品分类',
|
||||
noCache: true
|
||||
},
|
||||
component: () => import('@/views/product/productClassify')
|
||||
},
|
||||
alwaysShow: true,
|
||||
redirect: 'noRedirect',
|
||||
children: [
|
||||
{
|
||||
path: 'classify',
|
||||
name: 'ProductClassify',
|
||||
meta: {
|
||||
title: '商品分类',
|
||||
noCache: true
|
||||
},
|
||||
component: () => import('@/views/product/productClassify')
|
||||
{
|
||||
path: 'attr',
|
||||
name: `ProductAttr`,
|
||||
meta: {
|
||||
title: '商品规格',
|
||||
noCache: true
|
||||
},
|
||||
{
|
||||
path: 'attr',
|
||||
name: `ProductAttr`,
|
||||
meta: {
|
||||
title: '商品规格',
|
||||
noCache: true
|
||||
},
|
||||
component: () => import('@/views/product/productAttr')
|
||||
component: () => import('@/views/product/productAttr')
|
||||
},
|
||||
{
|
||||
path: 'label',
|
||||
name: `ProductLabel`,
|
||||
meta: {
|
||||
title: '商品标签',
|
||||
noCache: true
|
||||
},
|
||||
{
|
||||
path: 'label',
|
||||
name: `ProductLabel`,
|
||||
meta: {
|
||||
title: '商品标签',
|
||||
noCache: true
|
||||
},
|
||||
component: () => import('@/views/product/productLabel')
|
||||
component: () => import('@/views/product/productLabel')
|
||||
},
|
||||
{
|
||||
path: 'list',
|
||||
name: `ProductList`,
|
||||
meta: {
|
||||
title: '商品列表',
|
||||
noCache: true
|
||||
},
|
||||
{
|
||||
path: 'list',
|
||||
name: `ProductList`,
|
||||
meta: {
|
||||
title: '商品列表',
|
||||
noCache: true
|
||||
},
|
||||
component: () => import('@/views/product/productList')
|
||||
component: () => import('@/views/product/productList')
|
||||
},
|
||||
{
|
||||
path: 'list/addProduct/:id?/:edit?',
|
||||
component: () => import('@/views/product/addProduct/index'),
|
||||
name: 'AddProduct',
|
||||
meta: { title: '商品添加', noCache: true, activeMenu: `${roterPre}/product/list` },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'reviews',
|
||||
name: 'ProductReviews',
|
||||
meta: {
|
||||
title: '商品评论', noCache: true, activeMenu: `${roterPre}/product/reviews`
|
||||
},
|
||||
{
|
||||
path: 'list/addProduct/:id?/:edit?',
|
||||
component: () => import('@/views/product/addProduct/index'),
|
||||
name: 'AddProduct',
|
||||
meta: { title: '商品添加', noCache: true, activeMenu: `${roterPre}/product/list` },
|
||||
hidden: true
|
||||
component: () => import('@/views/product/Reviews/index')
|
||||
},
|
||||
{
|
||||
path: 'specs',
|
||||
name: 'ProductSpecs',
|
||||
meta: {
|
||||
title: '商品参数',
|
||||
noCache: true,
|
||||
|
||||
},
|
||||
{
|
||||
path: 'reviews',
|
||||
name: 'ProductReviews',
|
||||
meta: {
|
||||
title: '商品评论', noCache: true, activeMenu: `${roterPre}/product/reviews`
|
||||
},
|
||||
component: () => import('@/views/product/Reviews/index')
|
||||
component: () => import('@/views/product/specs/list.vue')
|
||||
},
|
||||
{
|
||||
path: 'cloud',
|
||||
name: 'productCloud',
|
||||
meta: {
|
||||
title: '云商品列表',
|
||||
noCache: true,
|
||||
},
|
||||
{
|
||||
path: 'specs',
|
||||
name: 'ProductSpecs',
|
||||
meta: {
|
||||
title: '商品参数',
|
||||
noCache: true,
|
||||
|
||||
},
|
||||
component: () => import('@/views/product/specs/list.vue')
|
||||
component: () => import('@/views/product/cloud/index.vue')
|
||||
},
|
||||
{
|
||||
path: 'specs/create/:id?',
|
||||
name: 'ProductSpecsCreate',
|
||||
meta: {
|
||||
title: '添加参数模板',
|
||||
noCache: true,
|
||||
activeMenu: `${roterPre}/product/specs`
|
||||
},
|
||||
{
|
||||
path: 'specs/create/:id?',
|
||||
name: 'ProductSpecsCreate',
|
||||
meta: {
|
||||
title: '添加参数模板',
|
||||
noCache: true,
|
||||
activeMenu: `${roterPre}/product/specs`
|
||||
},
|
||||
component: () => import('@/views/product/specs/create.vue')
|
||||
component: () => import('@/views/product/specs/create.vue')
|
||||
},
|
||||
{
|
||||
path: 'unit',
|
||||
name: `ProductUnit`,
|
||||
meta: {
|
||||
title: '商品单位',
|
||||
noCache: true,
|
||||
activeMenu: `${roterPre}/product/unit`
|
||||
},
|
||||
{
|
||||
path: 'unit',
|
||||
name: `ProductUnit`,
|
||||
meta: {
|
||||
title: '商品单位',
|
||||
noCache: true,
|
||||
activeMenu: `${roterPre}/product/unit`
|
||||
},
|
||||
component: () => import('@/views/product/productUnit')
|
||||
},
|
||||
]
|
||||
}
|
||||
component: () => import('@/views/product/productUnit')
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
export default productRouter
|
||||
|
@ -1,16 +1,9 @@
|
||||
<template>
|
||||
<div class="divBox">
|
||||
<el-card class="box-card">
|
||||
<form-create
|
||||
v-if="FormData"
|
||||
ref="fc"
|
||||
v-loading="loading"
|
||||
:option="option"
|
||||
:rule="FormData.rule"
|
||||
class="formBox"
|
||||
handle-icon="false"
|
||||
@submit="onSubmit"
|
||||
/>
|
||||
<form-create v-model:api="fapi" v-if="FormData" ref="fc" v-loading="loading" :option="option"
|
||||
:rule="FormData.rule" class="formBox" handle-icon="false" @submit="onSubmit">
|
||||
</form-create>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
@ -28,17 +21,23 @@
|
||||
import formCreate from '@form-create/element-ui'
|
||||
import { paymentTypeApi } from '@/api/accounts'
|
||||
import request from '@/api/request'
|
||||
import { roterPre } from '@/settings'
|
||||
import { roterPre } from '@/settings';
|
||||
|
||||
export default {
|
||||
name: 'payType',
|
||||
data() {
|
||||
return {
|
||||
fapi: {},
|
||||
option: {
|
||||
form: {
|
||||
labelWidth: '150px'
|
||||
},
|
||||
global: {
|
||||
'*': {
|
||||
props: {
|
||||
disabled: false
|
||||
}
|
||||
},
|
||||
upload: {
|
||||
props: {
|
||||
onSuccess(rep, file) {
|
||||
@ -48,7 +47,10 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
submitBtn: {
|
||||
show: true,
|
||||
},
|
||||
},
|
||||
FormData: null,
|
||||
loading: false,
|
||||
@ -58,9 +60,9 @@ export default {
|
||||
components: {
|
||||
formCreate: formCreate.$form()
|
||||
},
|
||||
watch:{
|
||||
'$route.path': {
|
||||
handler: function() {
|
||||
watch: {
|
||||
'$route.path': {
|
||||
handler: function () {
|
||||
this.getFrom();
|
||||
},
|
||||
immediate: false,
|
||||
@ -70,13 +72,32 @@ export default {
|
||||
mounted() {
|
||||
this.getFrom();
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
console.log(this.$refs.fc)
|
||||
}, 2000);
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 为了隐藏提交按钮
|
||||
getDomInfo() {
|
||||
var labels = document.getElementsByTagName("label");
|
||||
for (let i = 0; i < labels.length; i++) {
|
||||
let label = labels[i];
|
||||
if (label.innerText == '审核通过' && label.className.indexOf("is-checked") > -1) {
|
||||
this.option.submitBtn.show = false;
|
||||
} else if (label.innerText != '审核通过' && label.className.indexOf("is-checked") > -1) {
|
||||
this.option.submitBtn.show = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
setTagsViewTitle() {
|
||||
this.deepTraversal(this.menuList, "children");
|
||||
const route = Object.assign({}, this.tempRoute, { title: this.titles });
|
||||
this.$store.dispatch("tagsView/updateVisitedView", route);
|
||||
},
|
||||
|
||||
deepTraversal(arr, child) {
|
||||
const that = this;
|
||||
function traversal(a) {
|
||||
@ -96,11 +117,25 @@ export default {
|
||||
|
||||
traversal(arr);
|
||||
},
|
||||
|
||||
changes() {
|
||||
this.getDomInfo();
|
||||
},
|
||||
|
||||
getFrom() {
|
||||
this.loading = true
|
||||
paymentTypeApi().then(async res => {
|
||||
this.FormData = res.data
|
||||
this.loading = false
|
||||
this.FormData = res.data;
|
||||
this.FormData.rule[0] = {
|
||||
...this.FormData.rule[0],
|
||||
on: {
|
||||
change: this.changes
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.$nextTick(() => {
|
||||
this.getDomInfo();
|
||||
})
|
||||
}).catch(res => {
|
||||
this.$message.error(res.message)
|
||||
this.loading = false
|
||||
@ -109,7 +144,7 @@ export default {
|
||||
onSubmit(formData) {
|
||||
request[this.FormData.method.toLowerCase()](this.FormData.api, formData).then((res) => {
|
||||
this.$message.success(res.message || '提交成功')
|
||||
// this.$router.push({ path: `${roterPre}/marketing/coupon/list` })
|
||||
// this.$router.push({ path: `${roterPre}/marketing/coupon/list` })
|
||||
}).catch(err => {
|
||||
this.$message.error(err.message || '提交失败')
|
||||
})
|
||||
@ -118,6 +153,10 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
<style lang="scss">
|
||||
.divBox {
|
||||
.el-select--medium {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
File diff suppressed because it is too large
Load Diff
1080
src/views/product/cloud/index.vue
Normal file
1080
src/views/product/cloud/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -28,7 +28,8 @@ module.exports = {
|
||||
outputDir: 'dist',
|
||||
assetsDir: 'mer',
|
||||
indexPath: process.env.NODE_ENV === 'development' ? 'index.html' : 'mer.html',
|
||||
lintOnSave: process.env.NODE_ENV === 'development',
|
||||
lintOnSave: false,
|
||||
// lintOnSave: process.env.NODE_ENV === 'development',
|
||||
productionSourceMap: false,
|
||||
devServer: {
|
||||
port: port,
|
||||
@ -94,7 +95,7 @@ module.exports = {
|
||||
.plugin('ScriptExtHtmlWebpackPlugin')
|
||||
.after('html')
|
||||
.use('script-ext-html-webpack-plugin', [{
|
||||
// `runtime` must same as runtimeChunk name. default is `runtime`
|
||||
// `runtime` must same as runtimeChunk name. default is `runtime`
|
||||
inline: /runtime\..*\.js$/
|
||||
}])
|
||||
.end()
|
||||
|
Loading…
x
Reference in New Issue
Block a user