mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-11-01 07:20:56 +00:00
【模版目录】更新管理端页面源码
This commit is contained in:
parent
063980fa5e
commit
61a14862d1
23
template/admin/package-lock.json
generated
23
template/admin/package-lock.json
generated
@ -17577,9 +17577,9 @@
|
||||
}
|
||||
},
|
||||
"sortablejs": {
|
||||
"version": "1.10.2",
|
||||
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.10.2.tgz",
|
||||
"integrity": "sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A=="
|
||||
"version": "1.15.0",
|
||||
"resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.15.0.tgz",
|
||||
"integrity": "sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w=="
|
||||
},
|
||||
"source-list-map": {
|
||||
"version": "2.0.1",
|
||||
@ -20448,6 +20448,11 @@
|
||||
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
|
||||
"dev": true
|
||||
},
|
||||
"vue-tree-list": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/vue-tree-list/-/vue-tree-list-1.5.0.tgz",
|
||||
"integrity": "sha512-qHRJtPMmjCYA9I9kpHgIT6F1H7leR1ZxcNETrP2r97otSHYdHdK42qt12t4glf2mNvI+wBpY2fLClUGcaQJnpg=="
|
||||
},
|
||||
"vue-waterfall-easy": {
|
||||
"version": "2.4.4",
|
||||
"resolved": "https://registry.npmjs.org/vue-waterfall-easy/-/vue-waterfall-easy-2.4.4.tgz",
|
||||
@ -20487,9 +20492,9 @@
|
||||
}
|
||||
},
|
||||
"vxe-table": {
|
||||
"version": "3.4.15",
|
||||
"resolved": "https://registry.npmjs.org/vxe-table/-/vxe-table-3.4.15.tgz",
|
||||
"integrity": "sha512-F1ioMlpGWsW8gRXFk5R0JH3iDaOZgJY4SCfRU18Dp8hTT8I++h7TdqmbZ0yibmxUs3rOCf2xdJGA7EGIjZMtEA=="
|
||||
"version": "3.6.6",
|
||||
"resolved": "https://registry.npmmirror.com/vxe-table/-/vxe-table-3.6.6.tgz",
|
||||
"integrity": "sha512-DKifb0ekFYCu0UkTE0r1BmkRhabnCnS1+ilnTwciuTyC/DzGfwi8s+8LjX7YMV+Jp+hr4CJubIzHPcP41M+JTg=="
|
||||
},
|
||||
"w3c-hr-time": {
|
||||
"version": "1.0.2",
|
||||
@ -21545,9 +21550,9 @@
|
||||
}
|
||||
},
|
||||
"xe-utils": {
|
||||
"version": "3.5.4",
|
||||
"resolved": "https://registry.npmjs.org/xe-utils/-/xe-utils-3.5.4.tgz",
|
||||
"integrity": "sha512-oH7VOgvHv34pn198dhKPVKnuEHV22Q06YpCTVnAS3JuutylmZj/rtJGvn0BxxWQ37w2LgCknoebLA4uIGXwFtw=="
|
||||
"version": "3.5.7",
|
||||
"resolved": "https://registry.npmmirror.com/xe-utils/-/xe-utils-3.5.7.tgz",
|
||||
"integrity": "sha512-3H+fDBKBR2wLJgyA7k9C/w1Xljx6Maml5ukV0WDY06HjYyGs2FEz6XhcwRCLIDXX4pBP3Gu0nX9DbCeuuRA2Ew=="
|
||||
},
|
||||
"xlsx": {
|
||||
"version": "0.13.5",
|
||||
|
||||
@ -46,6 +46,7 @@
|
||||
"qs": "^6.6.0",
|
||||
"quill": "^1.3.6",
|
||||
"screenfull": "^5.0.2",
|
||||
"sortablejs": "^1.15.0",
|
||||
"stylus": "^0.54.7",
|
||||
"swiper": "^5.4.5",
|
||||
"tree-table-vue": "^1.1.0",
|
||||
@ -61,6 +62,7 @@
|
||||
"vue-pickers": "^2.5.3",
|
||||
"vue-puzzle-vcode": "^1.1.9",
|
||||
"vue-router": "^3.0.1",
|
||||
"vue-tree-list": "^1.5.0",
|
||||
"vue-ydui": "^1.2.6",
|
||||
"vuedraggable": "^2.16.0",
|
||||
"vuescroll": "^4.16.1",
|
||||
|
||||
@ -41,7 +41,7 @@ export function outSaveApi(data) {
|
||||
return request({
|
||||
url: `setting/system_out_account/save`,
|
||||
method: 'post',
|
||||
data
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
@ -54,19 +54,19 @@ export function outSavesApi(data) {
|
||||
return request({
|
||||
url: `setting/system_out_account/update/${data.id}`,
|
||||
method: 'post',
|
||||
data
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 对外账号设置推送
|
||||
* @param {*} id
|
||||
* @returns
|
||||
* @param {*} id
|
||||
* @returns
|
||||
*/
|
||||
export function outSetUp(id) {
|
||||
return request({
|
||||
url: `setting/system_out_account/set_up/${id}`,
|
||||
method: 'get'
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
@ -76,6 +76,78 @@ export function outSetUp(id) {
|
||||
export function interfaceList() {
|
||||
return request({
|
||||
url: `setting/system_out_interface/list`,
|
||||
method: 'get'
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置推送信息
|
||||
* @param {*} data
|
||||
* @returns
|
||||
*/
|
||||
export function setUpPush(data) {
|
||||
return request({
|
||||
url: `setting/system_out_account/set_up/${data.id}`,
|
||||
method: 'put',
|
||||
data,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 添加/编辑接口
|
||||
* @param {*} data
|
||||
* @returns
|
||||
*/
|
||||
export function interfaceSave(data) {
|
||||
return request({
|
||||
url: `setting/system_out_interface/save/${data.id}`,
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 接口信息详情
|
||||
* @param {*} data
|
||||
* @returns
|
||||
*/
|
||||
export function interfaceDet(id) {
|
||||
return request({
|
||||
url: `setting/system_out_interface/info/${id}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 修改名称
|
||||
* @param {Object} data data {Object} 传值
|
||||
*/
|
||||
export function interfaceEditName(data) {
|
||||
return request({
|
||||
url: `setting/system_out_interface/edit_name`,
|
||||
method: 'PUT',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 删除
|
||||
*/
|
||||
export function interfaceDel(id) {
|
||||
return request({
|
||||
url: 'setting/system_out_interface/del/' + id,
|
||||
method: 'delete',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 接口信息详情
|
||||
* @param {*} data
|
||||
* @returns
|
||||
*/
|
||||
export function textOutUrl(data) {
|
||||
return request({
|
||||
url: `setting/system_out_account/text_out_url`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<a :href="item.href" target="_blank" v-for="(item, index) in links" :key="index">{{ item.title }}</a>
|
||||
</div>
|
||||
<div class="ivu-global-footer-copyright" v-if="copyright">{{ copyright }}</div>
|
||||
<div class="ivu-global-footer-copyright">
|
||||
<div class="ivu-global-footer-copyright" v-else>
|
||||
Copyright © 2014-2022
|
||||
<a href="https://www.crmeb.com" target="_blank">{{ version }}</a>
|
||||
</div>
|
||||
|
||||
@ -47,6 +47,10 @@
|
||||
:columns="columns4"
|
||||
:data="tableList2"
|
||||
>
|
||||
<template slot-scope="{ row, index }" slot="nickname">
|
||||
<div>{{ row.nickname }}</div>
|
||||
<div style="color: red">{{ row.is_del ? '用户已注销' : '' }}</div>
|
||||
</template>
|
||||
<template slot-scope="{ row, index }" slot="headimgurl">
|
||||
<div class="tabBox_img" v-viewer>
|
||||
<img v-lazy="row.headimgurl" />
|
||||
@ -123,6 +127,7 @@ export default {
|
||||
h('Radio', {
|
||||
props: {
|
||||
value: flag,
|
||||
disabled: !!params.row.is_del,
|
||||
},
|
||||
on: {
|
||||
'on-change': () => {
|
||||
@ -159,7 +164,7 @@ export default {
|
||||
},
|
||||
{
|
||||
title: '微信用户名称',
|
||||
key: 'nickname',
|
||||
slot: 'nickname',
|
||||
minWidth: 180,
|
||||
},
|
||||
{
|
||||
|
||||
@ -18,9 +18,10 @@
|
||||
><Icon style="float: right" v-if="!hideTitle" type="ios-arrow-forward" :size="16"
|
||||
/></a>
|
||||
<DropdownMenu ref="dropdown" slot="list">
|
||||
<template v-for="child in children">
|
||||
<div v-for="child in children">
|
||||
<template v-if="child.auth === undefined">
|
||||
<collapsed-menu
|
||||
class="child-menu"
|
||||
v-if="showChildren(child)"
|
||||
:icon-size="iconSize"
|
||||
:parent-item="child"
|
||||
@ -32,7 +33,7 @@
|
||||
}}</span></DropdownItem
|
||||
>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
</template>
|
||||
@ -76,3 +77,16 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="stylus" scoped>
|
||||
>>> .menu-title {
|
||||
// width: 100px !important;
|
||||
}
|
||||
.collased-menu-dropdown{
|
||||
width 100%
|
||||
}
|
||||
.child-menu{
|
||||
display flex
|
||||
justify-content space-between
|
||||
width 100%
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -5,12 +5,15 @@
|
||||
|
||||
.ivu-dropdown {
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
.ivu-dropdown-rel a {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.ivu-tooltip {
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.ivu-tooltip-rel {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
<div id="content" :style="{ top: contentTop + 'px' || '', width: contentWidth }" ref="content">
|
||||
<vue-waterfall-easy
|
||||
:imgsArr="imgsArr"
|
||||
:maxCols="cols"
|
||||
:maxCols="maxCol"
|
||||
:width="screenWidth"
|
||||
@click="clickFn"
|
||||
@scrollReachBottom="getData"
|
||||
@ -159,14 +159,19 @@ export default {
|
||||
limit: 10,
|
||||
},
|
||||
screenWidth: document.body.clientWidth - 200,
|
||||
maxCol: 1,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
if (this.maxCols === 5) {
|
||||
this.$set(this, 'maxCol', this.screenWidth / 240);
|
||||
} else {
|
||||
this.maxCol = this.maxCols;
|
||||
}
|
||||
console.log(this.maxCol);
|
||||
this.getData();
|
||||
},
|
||||
mounted() {
|
||||
this.$set(this, 'cols', this.screenWidth / 240);
|
||||
},
|
||||
mounted() {},
|
||||
computed: {},
|
||||
methods: {
|
||||
// 发送图文消息
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -13,7 +13,7 @@ export default {
|
||||
/**
|
||||
* @description 配置显示在浏览器标签的title
|
||||
*/
|
||||
title: localStorage.getItem('ADMIN_TITLE') || 'CRMEB',
|
||||
title: localStorage.getItem('ADMIN_TITLE') || '',
|
||||
/**
|
||||
* @description token在Cookie中存储的天数,默认1天
|
||||
*/
|
||||
|
||||
@ -65,9 +65,12 @@ import dialog from '@/libs/dialog';
|
||||
import timeOptions from '@/libs/timeOptions';
|
||||
import scroll from '@/libs/loading';
|
||||
import * as tools from '@/libs/tools';
|
||||
import VueTreeList from 'vue-tree-list';
|
||||
|
||||
Vue.use(VueTreeList);
|
||||
// 版本升级
|
||||
import upgrade from '@/components/upGrade/index.vue';
|
||||
Vue.component('upgrade', upgrade)
|
||||
Vue.component('upgrade', upgrade);
|
||||
//日期
|
||||
import moment from 'moment';
|
||||
Vue.prototype.$moment = moment;
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
size="large"
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem prop="code">
|
||||
<!-- <FormItem prop="code">
|
||||
<div class="code">
|
||||
<Input
|
||||
type="text"
|
||||
@ -43,7 +43,7 @@
|
||||
/>
|
||||
<img :src="imgcode" class="pictrue" @click="captchas" />
|
||||
</div>
|
||||
</FormItem>
|
||||
</FormItem> -->
|
||||
<FormItem>
|
||||
<Button type="primary" long :loading="loading" size="large" @click="handleSubmit('formInline')" class="btn"
|
||||
>登录</Button
|
||||
@ -61,7 +61,9 @@
|
||||
></Verify>
|
||||
<div class="footer">
|
||||
<div class="pull-right" v-if="copyright">{{ copyright }}</div>
|
||||
<div class="pull-right" v-else>Copyright © 2014-2022 <a href="https://www.crmeb.com" target="_blank">{{version}}</a></div>
|
||||
<div class="pull-right" v-else>
|
||||
Copyright © 2014-2022 <a href="https://www.crmeb.com" target="_blank">{{ version }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -91,14 +93,12 @@ export default {
|
||||
formInline: {
|
||||
username: '',
|
||||
password: '',
|
||||
code: '',
|
||||
},
|
||||
ruleInline: {
|
||||
username: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
|
||||
password: [{ required: true, message: '请输入密码', trigger: 'blur' }],
|
||||
code: [{ required: true, message: '请输入验证码', trigger: 'blur' }],
|
||||
},
|
||||
errorNum: 0,
|
||||
login_captcha: 0,
|
||||
// jigsaw: null,
|
||||
login_logo: '',
|
||||
swiperList: [],
|
||||
@ -135,9 +135,7 @@ export default {
|
||||
}, 400);
|
||||
}
|
||||
},
|
||||
$route(n) {
|
||||
this.captchas();
|
||||
},
|
||||
$route(n) {},
|
||||
},
|
||||
mounted: function () {
|
||||
this.$nextTick(() => {
|
||||
@ -159,7 +157,6 @@ export default {
|
||||
}
|
||||
this.swiperData();
|
||||
});
|
||||
this.captchas();
|
||||
},
|
||||
methods: {
|
||||
swiperData() {
|
||||
@ -172,6 +169,7 @@ export default {
|
||||
this.key = data.key;
|
||||
this.copyright = data.copyright;
|
||||
this.version = data.version;
|
||||
this.login_captcha = data.login_captcha;
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$Message.error(err);
|
||||
@ -193,7 +191,6 @@ export default {
|
||||
AccountLogin({
|
||||
account: this.formInline.username,
|
||||
pwd: this.formInline.password,
|
||||
imgcode: this.formInline.code,
|
||||
key: this.key,
|
||||
captchaType: 'blockPuzzle',
|
||||
captchaVerification: params ? params.captchaVerification : '',
|
||||
@ -221,6 +218,7 @@ export default {
|
||||
this.$store.commit('userInfo/logoSmall', data.logo_square);
|
||||
this.$store.commit('userInfo/version', data.version);
|
||||
this.$store.commit('userInfo/newOrderAudioLink', data.newOrderAudioLink);
|
||||
this.login_captcha = 0;
|
||||
|
||||
// if (this.jigsaw) this.jigsaw.reset();
|
||||
|
||||
@ -247,12 +245,9 @@ export default {
|
||||
})
|
||||
.catch((res) => {
|
||||
msg();
|
||||
this.formInline.code = '';
|
||||
let data = res === undefined ? {} : res;
|
||||
this.errorNum++;
|
||||
this.captchas();
|
||||
this.login_captcha = res.data.login_captcha;
|
||||
this.$Message.error(data.msg || '登录失败');
|
||||
// if (this.jigsaw) this.jigsaw.reset();
|
||||
});
|
||||
setTimeout((e) => {
|
||||
this.loading = false;
|
||||
@ -306,13 +301,10 @@ export default {
|
||||
document.getElementsByTagName('canvas')[0].className = 'index_bg';
|
||||
}
|
||||
},
|
||||
captchas: function () {
|
||||
this.imgcode = Setting.apiBaseURL + '/captcha_pro?' + Date.parse(new Date());
|
||||
},
|
||||
handleSubmit(name) {
|
||||
this.$refs[name].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.errorNum > 2) {
|
||||
if (this.login_captcha == 1) {
|
||||
this.$refs.verify.show();
|
||||
} else {
|
||||
this.closeModel();
|
||||
@ -391,7 +383,7 @@ export default {
|
||||
}
|
||||
|
||||
.index_from {
|
||||
padding: 0 40px 32px 40px;
|
||||
padding: 32px 40px 32px 40px;
|
||||
height: 400px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@ -1,18 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="i-layout-page-header header_top">
|
||||
<div class="i-layout-page-header fl_header">
|
||||
<router-link :to="{ path: '/admin/app/wechat/reply/keyword' }"
|
||||
><Button icon="ios-arrow-back" size="small" type="text" v-show="$route.params.id">返回</Button></router-link
|
||||
>
|
||||
<Divider type="vertical" />
|
||||
<span
|
||||
class="ivu-page-header-title mr20"
|
||||
style="padding: 0"
|
||||
v-text="$route.params.key || $route.params.id !== '0' ? '关键字编辑' : '关键字添加'"
|
||||
v-if="$route.params.id"
|
||||
></span>
|
||||
<span class="ivu-page-header-title mr20" style="padding: 0" v-text="$route.meta.title" v-else></span>
|
||||
<div class="i-layout-page-header">
|
||||
<div class="i-layout-page-header">
|
||||
<span class="ivu-page-header-title">{{ $route.meta.title }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<Card :bordered="false" dis-hover class="ivu-mt">
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
<div class="msg-wrapper">
|
||||
<!-- 文档 -->
|
||||
<template v-if="item.msn_type <= 2">
|
||||
<div class="txt-wrapper pad16" v-html="item.msn"></div>
|
||||
<div class="txt-wrapper pad16">{{item.msn}}</div>
|
||||
</template>
|
||||
<!-- 图片 -->
|
||||
<template v-if="item.msn_type == 3">
|
||||
@ -134,9 +134,8 @@
|
||||
v-model="chatCon"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
@keydown.native="listen($event)"
|
||||
@on-keydown="listen($event)"
|
||||
placeholder="请输入文字内容"
|
||||
@on-enter="bindEnter"
|
||||
style="font-size: 14px"
|
||||
/>
|
||||
<div class="send-btn">
|
||||
@ -381,13 +380,7 @@ export default {
|
||||
handleFormatError(file) {
|
||||
this.$Message.error('上传图片只能是 jpg、jpg、jpeg、gif 格式!');
|
||||
},
|
||||
bindEnter(e) {
|
||||
if (e.target.value == '') {
|
||||
return this.$Message.error('请输入消息');
|
||||
}
|
||||
this.sendMsg(e.target.value, 1);
|
||||
this.chatCon = '';
|
||||
},
|
||||
bindEnter(e) {},
|
||||
//微信截图上传图片时触发
|
||||
handleParse(e) {
|
||||
let file = null;
|
||||
@ -446,9 +439,14 @@ export default {
|
||||
},
|
||||
// 阻止浏览器默认换行操作
|
||||
listen(e) {
|
||||
if (e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
if (e.shiftKey && e.keyCode == 13) {
|
||||
console.log('换行');
|
||||
} else if (e.keyCode == 13) {
|
||||
if (e.target.value == '') {
|
||||
return this.$Message.error('请输入消息');
|
||||
}
|
||||
this.sendMsg(e.target.value, 1);
|
||||
this.chatCon = '';
|
||||
}
|
||||
},
|
||||
// 输入框选择表情
|
||||
@ -701,6 +699,7 @@ textarea.ivu-input {
|
||||
|
||||
.txt-wrapper {
|
||||
word-break: break-all;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.pad16 {
|
||||
@ -946,4 +945,3 @@ textarea.ivu-input {
|
||||
width: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
<Divider type="vertical" />
|
||||
<a @click="del(row, '删除二维码', index)">删除</a>
|
||||
<Divider type="vertical" />
|
||||
<Dropdown @on-click="changeMenu(row, $event)">
|
||||
<Dropdown @on-click="changeMenu(row, $event)" transfer="true">
|
||||
<a href="javascript:void(0)"
|
||||
>更多
|
||||
<Icon type="ios-arrow-down"></Icon>
|
||||
|
||||
@ -16,12 +16,6 @@
|
||||
<Card :bordered="false" dis-hover class="ivu-mt">
|
||||
<Tabs v-model="currentTab" @on-click="onhangeTab">
|
||||
<TabPane v-for="(item, index) in headTab" :key="index" :label="item.tit" :name="item.name"></TabPane>
|
||||
<!-- <TabPane label="基础信息" name="1"></TabPane>
|
||||
<TabPane label="规格库存" name="2"></TabPane>
|
||||
<TabPane label="商品详情" name="3"></TabPane>
|
||||
<TabPane v-show="formValidate.is_virtual ==0" label="物流设置" name="4"></TabPane>
|
||||
<TabPane label="营销设置" name="5"></TabPane>
|
||||
<TabPane label="其他设置" name="6"></TabPane> -->
|
||||
</Tabs>
|
||||
<Form
|
||||
class="formValidate mt20"
|
||||
@ -50,29 +44,6 @@
|
||||
</div>
|
||||
</FormItem>
|
||||
</Col>
|
||||
<!-- <Col span="24">
|
||||
<FormItem label="商品类型:" props="is_virtual">
|
||||
<RadioGroup
|
||||
v-model="formValidate.is_virtual"
|
||||
@on-change="changeSpec"
|
||||
>
|
||||
<Radio :label="0" class="radio">普通商品</Radio>
|
||||
<Radio :label="1">虚拟商品</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
</Col> -->
|
||||
<!-- <Col span="24" v-if="formValidate.virtual_type == 1">
|
||||
<FormItem label="虚拟类型:" props="is_virtual">
|
||||
<RadioGroup
|
||||
v-model="formValidate.virtual_type"
|
||||
@on-change="changeSpec"
|
||||
>
|
||||
<Radio :label="1">卡密</Radio>
|
||||
<Radio :label="2">优惠券</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
</Col> -->
|
||||
|
||||
<Col span="24">
|
||||
<FormItem label="商品分类:" prop="cate_id">
|
||||
<Select v-model="formValidate.cate_id" placeholder="请选择商品分类" multiple class="perW20">
|
||||
@ -94,33 +65,6 @@
|
||||
<Input class="perW20" v-model="formValidate.unit_name" placeholder="请输入单位" />
|
||||
</FormItem>
|
||||
</Col>
|
||||
|
||||
<!--<Col v-bind="grid2">-->
|
||||
<!--<FormItem label="邮费:">-->
|
||||
<!--<InputNumber v-width="'100%'" v-model="formValidate.postage" placeholder="请输入邮费" />-->
|
||||
<!--</FormItem>-->
|
||||
<!--</Col>-->
|
||||
<!-- <Col span="24">
|
||||
<FormItem label="商品封面图:" prop="image">
|
||||
<div class="pictrueBox" @click="modalPicTap('dan', 'danFrom')">
|
||||
<div class="pictrue" v-if="formValidate.image">
|
||||
<img v-lazy="formValidate.image" />
|
||||
<Input
|
||||
v-model="formValidate.image"
|
||||
style="display: none"
|
||||
></Input>
|
||||
</div>
|
||||
<div class="upLoad acea-row row-center-wrapper" v-else>
|
||||
<Input
|
||||
v-model="formValidate.image"
|
||||
style="display: none"
|
||||
></Input>
|
||||
<Icon type="ios-camera-outline" size="26" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="tips">(345*345)</div>
|
||||
</FormItem>
|
||||
</Col> -->
|
||||
<Col span="24">
|
||||
<FormItem label="商品轮播图:" prop="slider_image">
|
||||
<div class="acea-row">
|
||||
@ -660,129 +604,6 @@
|
||||
</FormItem>
|
||||
</Col>
|
||||
</div>
|
||||
|
||||
<!-- <Col
|
||||
:xl="23"
|
||||
:lg="24"
|
||||
:md="24"
|
||||
:sm="24"
|
||||
:xs="24"
|
||||
v-if="formValidate.spec_type === 0"
|
||||
>
|
||||
<FormItem>
|
||||
<Table
|
||||
:data="oneFormValidate"
|
||||
:columns="
|
||||
formValidate.is_virtual ? columns3.slice(0, 7) : columns
|
||||
"
|
||||
border
|
||||
>
|
||||
<template slot-scope="{ row, index }" slot="pic">
|
||||
<div
|
||||
class="acea-row row-middle row-center-wrapper"
|
||||
@click="modalPicTap('dan', 'danTable', index)"
|
||||
>
|
||||
<div
|
||||
class="pictrue pictrueTab"
|
||||
v-if="oneFormValidate[0].pic"
|
||||
>
|
||||
<img v-lazy="oneFormValidate[0].pic" />
|
||||
</div>
|
||||
<div
|
||||
class="upLoad pictrueTab acea-row row-center-wrapper"
|
||||
v-else
|
||||
>
|
||||
<Icon type="ios-camera-outline" size="21" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template slot-scope="{ row, index }" slot="price">
|
||||
<InputNumber
|
||||
v-model="oneFormValidate[0].price"
|
||||
:min="0"
|
||||
:max="99999999"
|
||||
class="priceBox"
|
||||
></InputNumber>
|
||||
</template>
|
||||
<template slot-scope="{ row, index }" slot="cost">
|
||||
<InputNumber
|
||||
v-model="oneFormValidate[0].cost"
|
||||
:min="0"
|
||||
:max="99999999"
|
||||
class="priceBox"
|
||||
></InputNumber>
|
||||
</template>
|
||||
<template slot-scope="{ row, index }" slot="ot_price">
|
||||
<InputNumber
|
||||
v-model="oneFormValidate[0].ot_price"
|
||||
:min="0"
|
||||
:max="99999999"
|
||||
class="priceBox"
|
||||
></InputNumber>
|
||||
</template>
|
||||
<template slot-scope="{ row, index }" slot="stock">
|
||||
<InputNumber
|
||||
v-model="oneFormValidate[0].stock"
|
||||
:min="0"
|
||||
:max="99999999"
|
||||
:disabled="
|
||||
formValidate.is_virtual == 1 &&
|
||||
formValidate.virtual_type == 1
|
||||
"
|
||||
:precision="0"
|
||||
class="priceBox"
|
||||
></InputNumber>
|
||||
</template>
|
||||
<template slot-scope="{ row, index }" slot="bar_code">
|
||||
<Input v-model="oneFormValidate[0].bar_code"></Input>
|
||||
</template>
|
||||
<template slot-scope="{ row, index }" slot="weight">
|
||||
<InputNumber
|
||||
v-model="oneFormValidate[0].weight"
|
||||
:min="0"
|
||||
:max="99999999"
|
||||
class="priceBox"
|
||||
></InputNumber>
|
||||
</template>
|
||||
<template slot-scope="{ row, index }" slot="fictitious">
|
||||
<Button
|
||||
v-if="!row.coupon_id && formValidate.virtual_type == 2"
|
||||
@click="addGoodsCoupon(index, 'oneFormValidate')"
|
||||
>添加优惠券</Button
|
||||
>
|
||||
<span
|
||||
class="see"
|
||||
v-else-if="row.coupon_id && formValidate.virtual_type == 2"
|
||||
@click="see(row, 'oneFormValidate', index)"
|
||||
>{{ row.coupon_name }}</span
|
||||
>
|
||||
<Button
|
||||
v-if="
|
||||
!row.virtual_list.length && formValidate.virtual_type == 1
|
||||
"
|
||||
@click="addVirtual(index, 'oneFormValidate')"
|
||||
>添加卡密</Button
|
||||
>
|
||||
<span
|
||||
class="see"
|
||||
v-else-if="
|
||||
row.virtual_list.length && formValidate.virtual_type == 1
|
||||
"
|
||||
@click="see(row, 'oneFormValidate', index)"
|
||||
>已设置</span
|
||||
>
|
||||
</template>
|
||||
<template slot-scope="{ row, index }" slot="volume">
|
||||
<InputNumber
|
||||
v-model="oneFormValidate[0].volume"
|
||||
:min="0"
|
||||
:max="99999999"
|
||||
class="priceBox"
|
||||
></InputNumber>
|
||||
</template>
|
||||
</Table>
|
||||
</FormItem>
|
||||
</Col> -->
|
||||
</Row>
|
||||
<!-- 商品详情-->
|
||||
<Row v-show="currentTab === '3'">
|
||||
@ -853,12 +674,12 @@
|
||||
</Col>
|
||||
|
||||
<Col span="24">
|
||||
<FormItem label="赠送积分:" prop="give_integral">
|
||||
<FormItem label="购买送积分:" prop="give_integral">
|
||||
<InputNumber v-model="formValidate.give_integral" :min="0" :max="999999" placeholder="请输入积分" />
|
||||
</FormItem>
|
||||
</Col>
|
||||
<Col v-bind="grid3">
|
||||
<FormItem label="赠送优惠券:">
|
||||
<FormItem label="购买送优惠券:">
|
||||
<div v-if="couponName.length" class="mb20">
|
||||
<Tag closable v-for="(item, index) in couponName" :key="index" @on-close="handleClose(item)">{{
|
||||
item.title
|
||||
@ -869,20 +690,6 @@
|
||||
</Col>
|
||||
<Col span="24">
|
||||
<FormItem label="关联用户标签:" prop="label_id">
|
||||
<!-- <Select
|
||||
v-model="formValidate.label_id"
|
||||
placeholder="请选择关联用户标签"
|
||||
multiple
|
||||
class="perW20"
|
||||
>
|
||||
<Option
|
||||
v-for="item in dataLabel"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
>{{ item.label_name }}</Option
|
||||
>
|
||||
</Select>
|
||||
<span class="addfont" @click="addLabel">新增标签</span> -->
|
||||
<div style="display: flex">
|
||||
<div class="labelInput acea-row row-between-wrapper" @click="openLabel">
|
||||
<div style="width: 90%">
|
||||
@ -1180,7 +987,7 @@
|
||||
|
||||
<Col span="24">
|
||||
<FormItem label="商品推荐:">
|
||||
<CheckboxGroup v-model="formValidate.recommend" @on-change="recommendBtn">
|
||||
<CheckboxGroup v-model="formValidate.recommend">
|
||||
<Checkbox label="is_hot">热卖单品</Checkbox>
|
||||
<Checkbox label="is_benefit">促销单品</Checkbox>
|
||||
<Checkbox label="is_best">精品推荐</Checkbox>
|
||||
@ -1455,7 +1262,6 @@
|
||||
class="ml10"
|
||||
:action="cardUrl"
|
||||
:data="uploadData"
|
||||
:before-upload="beforeUpload"
|
||||
:headers="header"
|
||||
:on-success="upFile"
|
||||
>
|
||||
@ -1516,8 +1322,6 @@
|
||||
|
||||
<script>
|
||||
import userLabel from '@/components/labelList';
|
||||
|
||||
// import COS from 'cos-js-sdk-v5'
|
||||
import { mapState } from 'vuex';
|
||||
import vuedraggable from 'vuedraggable';
|
||||
import uploadPictures from '@/components/uploadPictures';
|
||||
@ -1528,7 +1332,6 @@ import goodsList from '@/components/goodsList/index';
|
||||
import taoBao from './taoBao';
|
||||
import WangEditor from '@/components/wangEditor/index.vue';
|
||||
import { userLabelAddApi } from '@/api/user';
|
||||
|
||||
import {
|
||||
productInfoApi,
|
||||
treeListApi,
|
||||
@ -1538,7 +1341,6 @@ import {
|
||||
productGetTemplateApi,
|
||||
productGetTempKeysApi,
|
||||
checkActivityApi,
|
||||
labelListApi,
|
||||
productCache,
|
||||
cacheDelete,
|
||||
uploadType,
|
||||
@ -1547,7 +1349,6 @@ import {
|
||||
} from '@/api/product';
|
||||
import Setting from '@/setting';
|
||||
import { getCookies } from '@/libs/util';
|
||||
import Editor from 'wangeditor';
|
||||
import { uploadByPieces } from '@/utils/upload'; //引入uploadByPieces方法
|
||||
|
||||
export default {
|
||||
@ -1568,7 +1369,6 @@ export default {
|
||||
return {
|
||||
labelShow: false,
|
||||
dataLabel: [],
|
||||
// dataLabel:[{"id":4,"value":4,"label_cate":0,"label_name":"啊啊啊","label":"啊啊啊","store_id":0,"type":1,"children":[{"id":10,"store_id":0,"label_cate":4,"label_name":"标签1","type":1,"label":"标签1","value":10},{"id":11,"store_id":0,"label_cate":4,"label_name":"标签2","type":1,"label":"标签2","value":11},{"id":12,"store_id":0,"label_cate":4,"label_name":"标签3","type":1,"label":"标签3","value":12}]},{"id":6,"value":6,"label_cate":0,"label_name":"0000","label":"0000","store_id":0,"type":1,"children":[{"id":13,"store_id":0,"label_cate":6,"label_name":"1111111","type":1,"label":"1111111","value":13},{"id":14,"store_id":0,"label_cate":6,"label_name":"2222222","type":1,"label":"2222222","value":14}]},{"id":5,"value":5,"label_cate":0,"label_name":"kk","label":"kk","store_id":0,"type":1,"children":[]}],
|
||||
headTab: [
|
||||
{ tit: '基础信息', name: '1' },
|
||||
{ tit: '规格库存', name: '2' },
|
||||
@ -1752,22 +1552,6 @@ export default {
|
||||
},
|
||||
],
|
||||
columns: [],
|
||||
// columnsInsta8: [
|
||||
// {
|
||||
// title: '会员价',
|
||||
// slot: 'vip_price',
|
||||
// align: 'center',
|
||||
// minWidth: 140
|
||||
// }
|
||||
// ],
|
||||
// columnsInsta9: [
|
||||
// {
|
||||
// title: '会员价',
|
||||
// slot: 'vip_price',
|
||||
// align: 'center',
|
||||
// minWidth: 140
|
||||
// }
|
||||
// ],
|
||||
columnsInstall: [],
|
||||
columnsInstal2: [],
|
||||
gridPic: {
|
||||
@ -2074,7 +1858,6 @@ export default {
|
||||
// this.couponName = data.coupons;
|
||||
// that.couponName = names;
|
||||
this.dataLabel = data.label_id;
|
||||
|
||||
this.formValidate.coupon_ids = ids;
|
||||
this.updateIds = ids;
|
||||
this.updateName = data.coupons;
|
||||
@ -2134,22 +1917,7 @@ export default {
|
||||
this.uploadType();
|
||||
},
|
||||
methods: {
|
||||
activeData(dataLabel) {
|
||||
this.labelShow = false;
|
||||
this.dataLabel = dataLabel;
|
||||
},
|
||||
// 标签弹窗关闭
|
||||
labelClose() {
|
||||
this.labelShow = false;
|
||||
},
|
||||
closeLabel(label) {
|
||||
let index = this.dataLabel.indexOf(this.dataLabel.filter((d) => d.id == label.id)[0]);
|
||||
this.dataLabel.splice(index, 1);
|
||||
},
|
||||
openLabel(row) {
|
||||
this.labelShow = true;
|
||||
this.$refs.userLabel.userLabel(JSON.parse(JSON.stringify(this.dataLabel)));
|
||||
},
|
||||
// 分片上传
|
||||
videoSaveToUrl(file) {
|
||||
uploadByPieces({
|
||||
file: file, // 视频实体
|
||||
@ -2169,7 +1937,7 @@ export default {
|
||||
});
|
||||
return false;
|
||||
},
|
||||
processButtonClick() {},
|
||||
// 类型选择/填入内容判断
|
||||
virtualbtn(index, type) {
|
||||
if (type != 1) {
|
||||
this.formValidate.is_sub = [];
|
||||
@ -2245,20 +2013,25 @@ export default {
|
||||
];
|
||||
}
|
||||
},
|
||||
// 新增分类
|
||||
addCate() {
|
||||
this.$modalForm(productCreateApi()).then(() => this.goodsCategory());
|
||||
},
|
||||
// 物流方式选择
|
||||
logisticsBtn(e) {
|
||||
this.formValidate.logistics = e;
|
||||
},
|
||||
// 新增标签
|
||||
addLabel() {
|
||||
this.$modalForm(userLabelAddApi(0)).then(() => this.userLabel());
|
||||
},
|
||||
// 自定义留言 开启关闭
|
||||
customMessBtn(e) {
|
||||
if (!e) {
|
||||
this.formValidate.custom_form = [];
|
||||
}
|
||||
},
|
||||
// 自定义留言 新增表单
|
||||
addcustom() {
|
||||
if (this.formValidate.custom_form.length > 9) {
|
||||
this.$Message.warning('最多添加10条');
|
||||
@ -2271,6 +2044,7 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
// 删除
|
||||
delcustom(index) {
|
||||
this.formValidate.custom_form.splice(index, 1);
|
||||
},
|
||||
@ -2278,7 +2052,7 @@ export default {
|
||||
onchangeTime(e) {
|
||||
this.formValidate.presale_time = e;
|
||||
},
|
||||
recommendBtn(e) {},
|
||||
// 商品详情
|
||||
getEditorContent(data) {
|
||||
this.content = data;
|
||||
},
|
||||
@ -2289,16 +2063,7 @@ export default {
|
||||
getToken() {
|
||||
this.header['Authori-zation'] = 'Bearer ' + getCookies('token');
|
||||
},
|
||||
beforeUpload(e) {
|
||||
this.video = e.raw;
|
||||
// this.uploadData = {};
|
||||
// let promise = new Promise((resolve) => {
|
||||
// this.$nextTick(function () {
|
||||
// resolve(true);
|
||||
// });
|
||||
// });
|
||||
// return promise;
|
||||
},
|
||||
// 导入卡密
|
||||
upFile(res) {
|
||||
importCard({ file: res.data.src }).then((res) => {
|
||||
this.virtualList = this.virtualList.concat(res.data);
|
||||
@ -2310,6 +2075,7 @@ export default {
|
||||
this.upload_type = res.data.upload_type;
|
||||
});
|
||||
},
|
||||
// 初始化数据展示
|
||||
infoData(data) {
|
||||
let cate_id = data.cate_id.map(Number);
|
||||
let label_id = data.label_id.map(Number);
|
||||
@ -2333,7 +2099,6 @@ export default {
|
||||
this.customBtn = true;
|
||||
}
|
||||
this.formValidate.cate_id = cate_id;
|
||||
// this.formValidate.label_id = label_id;
|
||||
if (data.attr) {
|
||||
this.oneFormValidate = [data.attr];
|
||||
}
|
||||
@ -2343,7 +2108,6 @@ export default {
|
||||
this.$set(this, 'manyFormValidate', data.attrs);
|
||||
this.spec_type = data.spec_type;
|
||||
this.formValidate.is_virtual = data.is_virtual;
|
||||
this.virtual[data.is_virtual].id = data.is_virtual;
|
||||
if (data.spec_type === 0) {
|
||||
this.manyFormValidate = [];
|
||||
} else {
|
||||
@ -2379,6 +2143,7 @@ export default {
|
||||
end() {
|
||||
this.moveIndex = '';
|
||||
},
|
||||
// 单独设置会员设置
|
||||
checkAllGroupChange(data) {
|
||||
this.checkAllGroup(data);
|
||||
},
|
||||
@ -2412,6 +2177,7 @@ export default {
|
||||
this.$refs.couponTemplates.isTemplate = true;
|
||||
this.$refs.couponTemplates.tableList();
|
||||
},
|
||||
// 规格中优惠券查看
|
||||
see(data, name, index) {
|
||||
this.tabName = name;
|
||||
this.tabIndex = index;
|
||||
@ -2431,6 +2197,7 @@ export default {
|
||||
this.$refs.goodsCoupon.tableList(3);
|
||||
}
|
||||
},
|
||||
// 添加优惠券
|
||||
addGoodsCoupon(index, name) {
|
||||
this.tabIndex = index;
|
||||
this.tabName = name;
|
||||
@ -2442,6 +2209,7 @@ export default {
|
||||
this.tabName = name;
|
||||
this.addVirtualModel = true;
|
||||
},
|
||||
// 提交卡密信息
|
||||
upVirtual() {
|
||||
if (this.disk_type == 2) {
|
||||
for (let i = 0; i < this.virtualList.length; i++) {
|
||||
@ -2475,6 +2243,7 @@ export default {
|
||||
this.addVirtualModel = false;
|
||||
this.closeVirtual();
|
||||
},
|
||||
// 初始化卡密数据信息
|
||||
closeVirtual() {
|
||||
this.addVirtualModel = false;
|
||||
this.virtualList = [
|
||||
@ -2491,10 +2260,12 @@ export default {
|
||||
const res = new Map();
|
||||
return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1));
|
||||
},
|
||||
// 获取优惠券id数据
|
||||
nameId(id, names) {
|
||||
this.formValidate.coupon_ids = id;
|
||||
this.couponName = this.unique(names);
|
||||
},
|
||||
// 获取优惠券信息
|
||||
goodsCouponId(data) {
|
||||
// this[this.tabName][this.tabIndex].coupon_id = data.id;
|
||||
// this[this.tabName][this.tabIndex].coupon_name = data.title;
|
||||
@ -2533,6 +2304,7 @@ export default {
|
||||
this.$refs.refid.click();
|
||||
}
|
||||
},
|
||||
// 上传视频
|
||||
zh_uploadFile_change(evfile) {
|
||||
let that = this;
|
||||
let suffix = evfile.target.files[0].name.substr(evfile.target.files[0].name.indexOf('.'));
|
||||
@ -2541,7 +2313,7 @@ export default {
|
||||
}
|
||||
productGetTempKeysApi()
|
||||
.then((res) => {
|
||||
console.log(res,'??')
|
||||
console.log(res, '??');
|
||||
that.$videoCloud
|
||||
.videoUpload({
|
||||
type: res.data.type,
|
||||
@ -2605,15 +2377,6 @@ export default {
|
||||
this.$set(val, 'brokerage_two', that.manyBrokerageTwo);
|
||||
this.$set(val, 'vip_price', that.manyVipPrice);
|
||||
}
|
||||
// let that = this;
|
||||
// if (that.manyBrokerage <= 0 || that.manyBrokerageTwo <= 0) {
|
||||
// return that.$Message.error('请填写返佣金额在进行批量添加');
|
||||
// } else {
|
||||
// for (let val of that.manyFormValidate) {
|
||||
// this.$set(val, 'brokerage', that.manyBrokerage);
|
||||
// this.$set(val, 'brokerage_two', that.manyBrokerageTwo);
|
||||
// }
|
||||
// }
|
||||
},
|
||||
// 批量设置会员价
|
||||
vipPriceSetUp() {
|
||||
@ -2626,12 +2389,14 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
// 新增卡密
|
||||
handleAdd() {
|
||||
this.virtualList.push({
|
||||
key: '',
|
||||
value: '',
|
||||
});
|
||||
},
|
||||
// 初始化卡密信息
|
||||
initVirtualData(status) {
|
||||
if (!status) {
|
||||
this.virtualList = [
|
||||
@ -2645,6 +2410,7 @@ export default {
|
||||
removeVirtual(index) {
|
||||
this.virtualList.splice(index, 1);
|
||||
},
|
||||
// 清空批量规格信息
|
||||
batchDel() {
|
||||
this.oneFormBatch = [
|
||||
{
|
||||
@ -2701,11 +2467,6 @@ export default {
|
||||
},
|
||||
// 批量添加
|
||||
batchAdd() {
|
||||
// if (!this.oneFormBatch[0].pic || !this.oneFormBatch[0].price || !this.oneFormBatch[0].cost || !this.oneFormBatch[0].ot_price ||
|
||||
// !this.oneFormBatch[0].stock || !this.oneFormBatch[0].bar_code) return this.$Message.warning('请填写完整的批量设置内容!');
|
||||
// if (!this.oneFormBatch[0].pic) {
|
||||
// return this.$Message.warning('请选择有效图片');
|
||||
// }
|
||||
for (let val of this.manyFormValidate) {
|
||||
if (this.oneFormBatch[0].pic) {
|
||||
this.$set(val, 'pic', this.oneFormBatch[0].pic);
|
||||
@ -2731,13 +2492,6 @@ export default {
|
||||
if (this.oneFormBatch[0].volume > 0) {
|
||||
this.$set(val, 'volume', this.oneFormBatch[0].volume);
|
||||
}
|
||||
// this.$set(val, 'price', this.oneFormBatch[0].price);
|
||||
// this.$set(val, 'cost', this.oneFormBatch[0].cost);
|
||||
// this.$set(val, 'ot_price', this.oneFormBatch[0].ot_price);
|
||||
// this.$set(val, 'stock', this.oneFormBatch[0].stock);
|
||||
// this.$set(val, 'bar_code', this.oneFormBatch[0].bar_code);
|
||||
// this.$set(val, 'weight', this.oneFormBatch[0].weight);
|
||||
// this.$set(val, 'volume', this.oneFormBatch[0].volume);
|
||||
}
|
||||
},
|
||||
// 添加按钮
|
||||
@ -2765,12 +2519,6 @@ export default {
|
||||
}
|
||||
let header = info.header;
|
||||
if ([1, 2].includes(this.formValidate.virtual_type)) {
|
||||
// let aaa = header.splice(7, 2, {
|
||||
// title: "虚拟商品",
|
||||
// slot: "fictitious",
|
||||
// align: "center",
|
||||
// minWidth: 95,
|
||||
// });
|
||||
this.columnsInstalM = header;
|
||||
this.formValidate.header = header;
|
||||
} else {
|
||||
@ -2885,45 +2633,6 @@ export default {
|
||||
.then(async (res) => {
|
||||
let data = res.data.productInfo;
|
||||
this.infoData(data);
|
||||
// let cate_id = data.cate_id.map(Number);
|
||||
// let label_id = data.label_id.map(Number);
|
||||
// this.attrs = data.items || [];
|
||||
// let ids = [];
|
||||
// data.coupons.map((item) => {
|
||||
// ids.push(item.id);
|
||||
// });
|
||||
// that.formValidate = data;
|
||||
// that.couponName = data.coupons;
|
||||
// that.formValidate.coupon_ids = ids;
|
||||
// that.updateIds = ids;
|
||||
// that.updateName = data.coupons;
|
||||
// that.formValidate.cate_id = cate_id;
|
||||
// that.formValidate.label_id = label_id;
|
||||
// that.oneFormValidate = [data.attr];
|
||||
// that.formValidate.header = [];
|
||||
// that.manyFormValidate = data.attrs;
|
||||
// that.generate(0);
|
||||
// that.spec_type = data.spec_type;
|
||||
// if (data.spec_type === 0) {
|
||||
// that.manyFormValidate = [];
|
||||
// } else {
|
||||
// that.createBnt = true;
|
||||
// that.oneFormValidate = [
|
||||
// {
|
||||
// pic: data.image,
|
||||
// price: 0,
|
||||
// cost: 0,
|
||||
// ot_price: 0,
|
||||
// stock: 0,
|
||||
// bar_code: "",
|
||||
// weight: 0,
|
||||
// volume: 0,
|
||||
// brokerage: 0,
|
||||
// brokerage_two: 0,
|
||||
// vip_price: 0,
|
||||
// },
|
||||
// ];
|
||||
// }
|
||||
this.spinShow = false;
|
||||
})
|
||||
.catch((res) => {
|
||||
@ -3080,11 +2789,6 @@ export default {
|
||||
} else if (!this.formValidate.temp_id && this.formValidate.freight == 3) {
|
||||
return this.$Message.warning('商品信息-运费模板不能为空');
|
||||
}
|
||||
// if(!this.formValidate.store_name || !this.formValidate.cate_id || !this.formValidate.keyword
|
||||
// || !this.formValidate.unit_name || !this.formValidate.store_info
|
||||
// || !this.formValidate.image || !this.formValidate.slider_image){
|
||||
// this.$Message.warning("请填写完整商品信息!");
|
||||
// }
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -3118,6 +2822,7 @@ export default {
|
||||
newItems.splice(dst, 0, ...newItems.splice(src, 1));
|
||||
this.formValidate.slider_image = newItems;
|
||||
},
|
||||
// 过滤详情内容
|
||||
formatRichText(html) {
|
||||
let newContent = html.replace(/<img[^>]*>/gi, function (match, capture) {
|
||||
match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
|
||||
@ -3142,11 +2847,31 @@ export default {
|
||||
let arr = this.formValidate.recommend_list.concat(row);
|
||||
this.formValidate.recommend_list = this.uniques(arr);
|
||||
},
|
||||
// 选择推荐商品
|
||||
changeGoods() {
|
||||
this.goods_modals = true;
|
||||
this.$refs.goodslist.getList();
|
||||
this.$refs.goodslist.goodsCategory();
|
||||
},
|
||||
// 选择用户标签
|
||||
activeData(dataLabel) {
|
||||
this.labelShow = false;
|
||||
this.dataLabel = dataLabel;
|
||||
},
|
||||
// 标签弹窗关闭
|
||||
labelClose() {
|
||||
this.labelShow = false;
|
||||
},
|
||||
// 删除用户标签
|
||||
closeLabel(label) {
|
||||
let index = this.dataLabel.indexOf(this.dataLabel.filter((d) => d.id == label.id)[0]);
|
||||
this.dataLabel.splice(index, 1);
|
||||
},
|
||||
// 打开选择用户标签
|
||||
openLabel(row) {
|
||||
this.labelShow = true;
|
||||
this.$refs.userLabel.userLabel(JSON.parse(JSON.stringify(this.dataLabel)));
|
||||
},
|
||||
uniques(songs) {
|
||||
let result = {};
|
||||
let finalResult = [];
|
||||
|
||||
@ -47,16 +47,16 @@
|
||||
<Button v-auth="['product-crawl-save']" type="success" class="bnt mr15" @click="onCopy">商品采集</Button>
|
||||
<Dropdown class="bnt mr15" @on-click="batchSelect" :transfer="true">
|
||||
<Button type="info">
|
||||
批量操作
|
||||
批量修改
|
||||
<Icon type="ios-arrow-down"></Icon>
|
||||
</Button>
|
||||
<DropdownMenu slot="list">
|
||||
<DropdownItem :name="1">分类设置</DropdownItem>
|
||||
<DropdownItem :name="1">商品分类</DropdownItem>
|
||||
<DropdownItem :name="2">物流设置</DropdownItem>
|
||||
<DropdownItem :name="3">赠送积分</DropdownItem>
|
||||
<DropdownItem :name="4">赠送优惠券</DropdownItem>
|
||||
<DropdownItem :name="5">用户标签</DropdownItem>
|
||||
<DropdownItem :name="6">商品推荐</DropdownItem>
|
||||
<DropdownItem :name="3">购买送积分</DropdownItem>
|
||||
<DropdownItem :name="4">购买送优惠券</DropdownItem>
|
||||
<DropdownItem :name="5">关联用户标签</DropdownItem>
|
||||
<DropdownItem :name="6">活动推荐</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
<Button
|
||||
@ -287,6 +287,7 @@ import {
|
||||
productUnshowApi,
|
||||
storeProductApi,
|
||||
batchSetting,
|
||||
productGetTemplateApi,
|
||||
} from '@/api/product';
|
||||
import userLabel from '@/components/labelList';
|
||||
|
||||
@ -489,7 +490,8 @@ export default {
|
||||
},
|
||||
// 批量设置商品
|
||||
batchSelect(type) {
|
||||
if (this.ids.length === 0) {
|
||||
console.log(type);
|
||||
if (!this.ids.length) {
|
||||
this.$Message.warning('请选择要设置的商品');
|
||||
} else {
|
||||
this.batchType = type;
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
<template>
|
||||
<div class="message">
|
||||
<div class="i-layout-page-header">
|
||||
<span class="ivu-page-header-title">{{ $route.meta.title }}</span>
|
||||
<div>
|
||||
<Tabs v-model="currentTab" @on-click="changeTab">
|
||||
<div class="i-layout-page-header">
|
||||
<span class="ivu-page-header-title">{{ $route.meta.title }}</span>
|
||||
<div>
|
||||
<Tabs v-model="currentTab" @on-click="changeTab">
|
||||
<TabPane :label="item.label" :name="item.value.toString()" v-for="(item, index) in headerList" :key="index" />
|
||||
</Tabs>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-box">
|
||||
@ -30,24 +32,10 @@
|
||||
>
|
||||
</Col>
|
||||
</Row>
|
||||
<Alert v-if="industry && currentTab == 1">
|
||||
<Alert v-if="currentTab == 1">
|
||||
<template slot="desc">
|
||||
<div>
|
||||
主营行业:{{
|
||||
industry.primary_industry.first_class
|
||||
? industry.primary_industry.first_class + '||'
|
||||
: industry.primary_industry
|
||||
}}
|
||||
{{ industry.primary_industry.second_class ? industry.primary_industry.second_class : '' }}
|
||||
</div>
|
||||
<div>
|
||||
副营行业:{{
|
||||
industry.secondary_industry.first_class
|
||||
? industry.secondary_industry.first_class + '||'
|
||||
: industry.secondary_industry
|
||||
}}
|
||||
{{ industry.secondary_industry.second_class ? industry.secondary_industry.second_class : '' }}
|
||||
</div>
|
||||
登录微信公众号后台,选择模版消息,将模版消息的所在行业修改副行业为《其他/其他》<br />登录微信小程序后台,基本设置,服务类目增加《生活服务
|
||||
> 百货/超市/便利店》
|
||||
</template>
|
||||
</Alert>
|
||||
<Table
|
||||
@ -212,7 +200,6 @@ export default {
|
||||
currentTab: '1',
|
||||
loading: false,
|
||||
formData: {},
|
||||
industry: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -230,8 +217,7 @@ export default {
|
||||
},
|
||||
changeTab(data) {
|
||||
getNotificationList(data).then((res) => {
|
||||
this.levelLists = res.data.list;
|
||||
this.industry = res.data.industry;
|
||||
this.levelLists = res.data;
|
||||
});
|
||||
},
|
||||
// 同步订阅消息
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<div class="i-layout-page-header">
|
||||
<div class="i-layout-page-header">
|
||||
<span class="ivu-page-header-title">{{ title }}</span>
|
||||
<div>
|
||||
<div v-if="headerList.length">
|
||||
<Tabs v-model="currentTab" @on-click="changeTab">
|
||||
<TabPane
|
||||
:icon="item.icon"
|
||||
|
||||
@ -137,12 +137,100 @@
|
||||
<Button @click="cancel">取消</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
<Modal v-model="settingModals" scrollable title="设置推送" :mask-closable="false" width="900" :closable="false">
|
||||
<Form
|
||||
class="setting-style"
|
||||
ref="settingData"
|
||||
:model="settingData"
|
||||
:rules="type == 0 ? ruleValidate : editValidate"
|
||||
:label-width="140"
|
||||
label-position="right"
|
||||
>
|
||||
<FormItem label="推送开关" prop="switch">
|
||||
<Switch v-model="settingData.push_open" :true-value="1" :false-value="0" />
|
||||
</FormItem>
|
||||
<FormItem label="推送账号" prop="push_account">
|
||||
<div class="form-content">
|
||||
<Input type="text" v-model="settingData.push_account" placeholder="请输入推送账号"></Input>
|
||||
<span class="trip">接受推送方获取token的账号</span>
|
||||
</div>
|
||||
</FormItem>
|
||||
<FormItem label="推送密码" prop="push_password">
|
||||
<div class="form-content">
|
||||
<Input type="text" v-model="settingData.push_password" placeholder="请输入推送密码"></Input>
|
||||
<span class="trip">接受推送方获取token的密码</span>
|
||||
</div>
|
||||
</FormItem>
|
||||
<FormItem label="获取TOKEN接口" prop="push_token_url">
|
||||
<div class="form-content">
|
||||
<div class="input-button">
|
||||
<Input type="text" v-model="settingData.push_token_url" placeholder="请输入获取TOKEN接口"></Input>
|
||||
<Button class="ml10" type="primary" @click="textOutUrl(settingData.id)">测试链接</Button>
|
||||
</div>
|
||||
<span class="trip"
|
||||
>接受推送方获取token的URL地址,POST方法,传入push_account和push_password,返回token和有效时间time(秒)</span
|
||||
>
|
||||
</div>
|
||||
</FormItem>
|
||||
<FormItem label="用户数据修改推送接口" prop="user_update_push">
|
||||
<div class="form-content">
|
||||
<Input type="text" v-model="settingData.user_update_push" placeholder="请输入用户数据修改推送接口"></Input>
|
||||
<span class="trip">用户修改积分,余额,经验等将用户信息推送至该地址,POST方法</span>
|
||||
</div>
|
||||
</FormItem>
|
||||
<FormItem label="订单创建推送接口" prop="order_create_push">
|
||||
<div class="form-content">
|
||||
<Input type="text" v-model="settingData.order_create_push" placeholder="请输入订单创建推送接口"></Input>
|
||||
<span class="trip">订单创建时推送订单信息至该地址,POST方法</span>
|
||||
</div>
|
||||
</FormItem>
|
||||
<FormItem label="订单支付推送接口" prop="order_pay_push">
|
||||
<div class="form-content">
|
||||
<Input type="text" v-model="settingData.order_pay_push" placeholder="请输入订单支付推送接口"></Input>
|
||||
<span class="trip">订单完成支付时推送订单已支付信息至该地址,POST方法</span>
|
||||
</div>
|
||||
</FormItem>
|
||||
<FormItem label="售后订单创建推送接口" prop="refund_create_push">
|
||||
<div class="form-content">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="settingData.refund_create_push"
|
||||
placeholder="请输入售后订单创建推送接口"
|
||||
></Input>
|
||||
<span class="trip">售后订单生成时推送售后单信息至该地址,POST方法</span>
|
||||
</div>
|
||||
</FormItem>
|
||||
<FormItem label="售后订单取消推送接口" prop="refund_cancel_push">
|
||||
<div class="form-content">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="settingData.refund_cancel_push"
|
||||
placeholder="请输入售后订单取消推送接口"
|
||||
></Input>
|
||||
<span class="trip">售后订单取消时推送售后单取消信息至该地址,POST方法</span>
|
||||
</div>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<div slot="footer">
|
||||
<Button type="primary" @click="submit('settingData')">确定</Button>
|
||||
<Button @click="settingModals = false">取消</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex';
|
||||
import { accountListApi, outSaveApi, outSavesApi, setShowApi, outSetUp, interfaceList } from '@/api/systemOutAccount';
|
||||
import {
|
||||
accountListApi,
|
||||
outSaveApi,
|
||||
outSavesApi,
|
||||
setShowApi,
|
||||
outSetUp,
|
||||
interfaceList,
|
||||
setUpPush,
|
||||
textOutUrl,
|
||||
} from '@/api/systemOutAccount';
|
||||
export default {
|
||||
name: 'systemOut',
|
||||
data() {
|
||||
@ -236,6 +324,11 @@ export default {
|
||||
title: '',
|
||||
rules: [],
|
||||
},
|
||||
settingModals: false,
|
||||
settingData: {
|
||||
switch: 1,
|
||||
name: '',
|
||||
},
|
||||
ruleValidate: {
|
||||
appid: [{ required: true, message: '请输入正确的账号 (4到30位之间)', trigger: 'blur', min: 4, max: 30 }],
|
||||
appsecret: [{ required: true, message: '请输入正确的密码 (6到32位之间)', trigger: 'blur', min: 6, max: 32 }],
|
||||
@ -390,7 +483,8 @@ export default {
|
||||
},
|
||||
// 编辑
|
||||
setUp(row) {
|
||||
this.$modalForm(outSetUp(row.id)).then(() => this.getList());
|
||||
this.settingModals = true;
|
||||
this.settingData = row;
|
||||
},
|
||||
// 搜索
|
||||
userSearchs() {
|
||||
@ -399,6 +493,22 @@ export default {
|
||||
this.list = [];
|
||||
this.getList();
|
||||
},
|
||||
submit(name) {
|
||||
setUpPush(this.settingData).then((res) => {
|
||||
this.$Message.success(res.msg);
|
||||
this.settingModals = false;
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
textOutUrl() {
|
||||
textOutUrl(this.settingData)
|
||||
.then((res) => {
|
||||
this.$Message.success(res.msg);
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$Message.error(err.msg);
|
||||
});
|
||||
},
|
||||
ok(name) {
|
||||
console.log(this.$refs.tree.getCheckedAndIndeterminateNodes());
|
||||
let fuc = this.modalsid ? outSavesApi : outSaveApi;
|
||||
@ -456,4 +566,18 @@ export default {
|
||||
.reset {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.form-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.input-button {
|
||||
display: flex;
|
||||
}
|
||||
w .trip {
|
||||
color: #aaa;
|
||||
line-height: 20px;
|
||||
}
|
||||
.setting-style /deep/ .ivu-form-item {
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
</style>
|
||||
|
||||
1084
template/admin/src/pages/setting/systemOutInterface/index.vue
Normal file
1084
template/admin/src/pages/setting/systemOutInterface/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,16 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="i-layout-page-header">
|
||||
<div class="i-layout-page-header">
|
||||
<span class="ivu-page-header-title">{{ $route.meta.title }}</span>
|
||||
<div class="i-layout-page-header header_top">
|
||||
<div class="i-layout-page-header fl_header">
|
||||
<router-link :to="{ path: '/admin/system/config/system_config_tab/index' }"
|
||||
><Button icon="ios-arrow-back" size="small" type="text">返回</Button></router-link
|
||||
>
|
||||
<Divider type="vertical" />
|
||||
<span
|
||||
class="ivu-page-header-title mr20"
|
||||
style="padding: 0"
|
||||
v-text="$route.meta.title"
|
||||
></span>
|
||||
</div>
|
||||
</div>
|
||||
<Card :bordered="false" dis-hover class="ivu-mt">
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="i-layout-page-header">
|
||||
<div class="i-layout-page-header">
|
||||
<Button
|
||||
icon="ios-arrow-back"
|
||||
size="small"
|
||||
@click="back"
|
||||
class="mr20"
|
||||
v-if="$route.meta.auth[0] === 'system-config-system_config-list'"
|
||||
>返回</Button
|
||||
<div class="i-layout-page-header header_top">
|
||||
<div class="i-layout-page-header fl_header">
|
||||
<router-link :to="{ path: '/admin/system/config/system_group/index' }"
|
||||
><Button icon="ios-arrow-back" size="small" type="text">返回</Button></router-link
|
||||
>
|
||||
<span class="ivu-page-header-title mr20" v-text="$route.meta.title"></span>
|
||||
<Divider type="vertical" />
|
||||
<span
|
||||
class="ivu-page-header-title mr20"
|
||||
style="padding: 0"
|
||||
v-text="$route.meta.title"
|
||||
></span>
|
||||
</div>
|
||||
</div>
|
||||
<Card :bordered="false" dis-hover class="ivu-mt">
|
||||
|
||||
@ -16,8 +16,8 @@
|
||||
<Input type="text" v-model="formInline.account" prefix="ios-contact-outline" placeholder="请输入手机号" />
|
||||
</FormItem> -->
|
||||
<FormItem prop="sms_token" class="maxInpt">
|
||||
<Input type="password" v-model="formInline.password" prefix="ios-lock-outline" placeholder="请输入密码" />
|
||||
<span class="trip">提示:config/filesystem.php中手动配置password后使用,不能为空</span>
|
||||
<Input type="password" size="large" v-model="formInline.password" prefix="ios-lock-outline" placeholder="请输入密码" />
|
||||
<div class="trip">提示:config/filesystem.php中手动配置password后使用,不能为空</div>
|
||||
</FormItem>
|
||||
<FormItem class="maxInpt">
|
||||
<Button type="primary" long size="large" @click="handleSubmit('formInline')" class="btn">登录</Button>
|
||||
@ -104,23 +104,35 @@ export default {
|
||||
margin-left auto
|
||||
margin-right auto
|
||||
}
|
||||
.index_from{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.trip{
|
||||
width 400px
|
||||
text-align: left;
|
||||
color #aaa
|
||||
}
|
||||
.page-account-container{
|
||||
text-align center
|
||||
padding 50px 0
|
||||
padding 200px 0
|
||||
}
|
||||
.page-account-top{
|
||||
margin-bottom 20px
|
||||
margin-bottom 50px
|
||||
}
|
||||
.page-account-top-tit
|
||||
font-size 21px
|
||||
font-size 30px
|
||||
color #1890FF
|
||||
font-weight 500
|
||||
.page-account-other
|
||||
text-align center
|
||||
color #1890FF
|
||||
font-size 12px
|
||||
span
|
||||
cursor pointer
|
||||
>>> .btn{
|
||||
font-size: 15px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
</div>
|
||||
<Card :bordered="false" dis-hover class="ivu-mt">
|
||||
<div v-if="isShowList" class="backs" @click="goBack(false)">
|
||||
<Icon type="ios-folder-outline" class="mr5" /><span>返回上级</span>
|
||||
<Icon type="ios-folder-outline" class="mr5 icon" /><span>返回上级</span>
|
||||
</div>
|
||||
<Table
|
||||
v-if="isShowList"
|
||||
@ -582,6 +582,7 @@ export default {
|
||||
initEditor() {
|
||||
let that = this;
|
||||
that.$nextTick(() => {
|
||||
console.log(monaco);
|
||||
// 初始化编辑器,确保dom已经渲染
|
||||
that.editor = monaco.editor.create(document.getElementById('container_' + that.indexEditor), {
|
||||
value: that.code, //编辑器初始显示文字
|
||||
@ -861,6 +862,8 @@ export default {
|
||||
.backs
|
||||
cursor pointer;
|
||||
display inline-block;
|
||||
.icon
|
||||
margin-bottom 3px
|
||||
>>>.CodeMirror
|
||||
height: 70vh !important;
|
||||
|
||||
@ -910,7 +913,6 @@ export default {
|
||||
.diy-button
|
||||
// float: left;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
padding: 0 15px;
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
@ -975,7 +977,6 @@ export default {
|
||||
.diy-button
|
||||
width: 50%;
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
.diy-button-list
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@ -393,5 +393,14 @@ export default {
|
||||
},
|
||||
component: () => import('@/pages/marketing/sign/index'),
|
||||
},
|
||||
{
|
||||
path: `member/system_config/:type?/:tab_id?`,
|
||||
name: `${pre}member`,
|
||||
meta: {
|
||||
auth: ['marketing-member-system_config'],
|
||||
title: '会员配置',
|
||||
},
|
||||
component: () => import('@/pages/setting/setSystem/index'),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@ -620,6 +620,15 @@ export default {
|
||||
},
|
||||
component: () => import('@/pages/setting/systemOutAccount/index'),
|
||||
},
|
||||
{
|
||||
path: 'system_out_interface/index',
|
||||
name: `${pre}systemOutAccount`,
|
||||
meta: {
|
||||
auth: ['setting-system-out-interface-index'],
|
||||
title: '接口文档',
|
||||
},
|
||||
component: () => import('@/pages/setting/systemOutInterface/index'),
|
||||
},
|
||||
{
|
||||
path: 'lang/list',
|
||||
name: `${pre}langList`,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user