Browse Source

yshop1.8发布,新增素材管理等,详细查看readme或登录网站后台查看

master
hupeng 5 years ago
parent
commit
0fade96648
  1. 39
      src/api/tools/material.js
  2. 39
      src/api/tools/materialgroup.js
  3. 66
      src/components/file-upload/index.vue
  4. 457
      src/components/material/index.vue
  5. 1
      src/store/getters.js
  6. 2
      src/store/modules/api.js
  7. 29
      src/views/activity/bargain/form.vue
  8. 2
      src/views/activity/bargain/index.vue
  9. 23
      src/views/activity/combination/form.vue
  10. 4
      src/views/activity/combination/index.vue
  11. 23
      src/views/activity/seckill/form.vue
  12. 2
      src/views/activity/seckill/index.vue
  13. 10
      src/views/components/Editor.vue
  14. 171
      src/views/dashboard/YshopInfo.vue
  15. 20
      src/views/home.vue
  16. 4
      src/views/monitor/log/mlog.vue
  17. 16
      src/views/shop/cate/index.vue
  18. 42
      src/views/shop/goods/form.vue
  19. 8
      src/views/shop/goods/index.vue
  20. 2
      src/views/shop/goods/index2.vue
  21. 2
      src/views/shop/goods/index3.vue
  22. 2
      src/views/shop/order/index.vue
  23. 3
      src/views/shop/set/act.vue
  24. 12
      src/views/shop/set/actform.vue
  25. 14
      src/views/shop/set/form.vue
  26. 3
      src/views/shop/set/index.vue
  27. 3
      src/views/shop/set/menu.vue
  28. 14
      src/views/shop/set/menuform.vue
  29. 7
      src/views/shop/set/usermenu.vue
  30. 14
      src/views/shop/set/usermenuform.vue
  31. 2
      src/views/shop/user/index.vue
  32. 27
      src/views/shop/userlevel/form.vue
  33. 2
      src/views/shop/userlevel/index.vue
  34. 13
      src/views/wechat/article/form.vue
  35. 1
      src/views/wechat/article/index.vue
  36. 14
      src/views/wechat/config/index.vue
  37. 9
      src/views/wechat/config/pay.vue

39
src/api/tools/material.js

@ -0,0 +1,39 @@
import request from '@/utils/request'
export function getPage(query) {
return request({
url: 'api/material/page',
method: 'get',
params: query
})
}
export function addObj(obj) {
return request({
url: 'api/material',
method: 'post',
data: obj
})
}
export function getObj(id) {
return request({
url: 'api/material/' + id,
method: 'get'
})
}
export function delObj(id) {
return request({
url: 'api/material/' + id,
method: 'delete'
})
}
export function putObj(obj) {
return request({
url: 'api/material',
method: 'put',
data: obj
})
}

39
src/api/tools/materialgroup.js

@ -0,0 +1,39 @@
import request from '@/utils/request'
export function getPage(query) {
return request({
url: 'api/materialgroup/page',
method: 'get',
params: query
})
}
export function addObj(obj) {
return request({
url: 'api/materialgroup',
method: 'post',
data: obj
})
}
export function getObj(id) {
return request({
url: 'api/materialgroup/' + id,
method: 'get'
})
}
export function delObj(id) {
return request({
url: 'api/materialgroup/' + id,
method: 'delete'
})
}
export function putObj(obj) {
return request({
url: 'api/materialgroup',
method: 'put',
data: obj
})
}

66
src/components/file-upload/index.vue

@ -0,0 +1,66 @@
<template>
<div>
<el-upload
:action="uploadApi"
:headers="headers"
:on-remove="handleRemove"
:on-success="handleUploadSuccess"
:before-remove="beforeRemove"
:file-list="fileList"
multiple
:limit="1"
>
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</div>
</template>
<script>
import { getToken } from '@/utils/auth'
import { mapGetters } from 'vuex'
export default {
data () {
return {
resourcesUrl: '',
headers: {
'Authorization': getToken()
}
}
},
props: {
value: {
default: '',
type: String
}
},
computed: {
...mapGetters([
'uploadApi'
]),
fileList () {
let res = []
if (this.value) {
res.push({name: this.value, url: this.resourcesUrl + this.value, response: this.value})
}
this.$emit('input', this.value)
console.log("res"+res)
return res
}
},
methods: {
//
handleUploadSuccess (response, file, fileList) {
this.$emit('input', file.response.link)
},
handleRemove (file, fileList) {
this.$emit('change', file)
},
beforeRemove (file, fileList) {
return this.$confirm(`确定移除 ${file.name}`)
}
}
}
</script>
<style lang="scss">
</style>

457
src/components/material/index.vue

@ -0,0 +1,457 @@
<template>
<div v-if="type == 'image'">
<ul class="el-upload-list el-upload-list--picture-card" v-for="(item,index) in value" :key="index">
<li tabindex="0" class="el-upload-list__item is-ready" :style="'width: '+width+'px;height: '+height+'px'">
<div>
<img :src="item" alt="" class="el-upload-list__item-thumbnail">
<span class="el-upload-list__item-actions">
<span class="el-upload-list__item-preview" v-if="index != 0" @click="moveMaterial(index,'up')">
<i class="el-icon-back"></i>
</span>
<span class="el-upload-list__item-preview" @click="zoomMaterial(index)">
<i class="el-icon-view"></i>
</span>
<span class="el-upload-list__item-delete" @click="deleteMaterial(index)">
<i class="el-icon-delete"></i>
</span>
<span class="el-upload-list__item-preview" v-if="index != value.length-1" @click="moveMaterial(index,'down')">
<i class="el-icon-right"></i>
</span>
</span>
</div>
</li>
</ul>
<div tabindex="0" class="el-upload el-upload--picture-card" v-if="num > value.length" @click="toSeleteMaterial" :style="'width: '+width+'px;height: '+height+'px;'+'line-height:'+height+'px;'">
<i class="el-icon-plus"></i>
</div>
<el-dialog
append-to-body
:visible.sync="dialogVisible"
width="35%">
<img :src="url" alt="" style="width: 100%">
</el-dialog>
<el-dialog
title="图片素材库"
append-to-body
:visible.sync="listDialogVisible"
width="70%">
<el-container>
<el-aside width="unset">
<div style="margin-bottom: 10px">
<el-button
class="el-icon-plus"
size="small"
@click="materialgroupAdd()">
添加分组
</el-button>
</div>
<el-tabs tab-position="left" v-model="materialgroupObjId" v-loading="materialgroupLoading" @tab-click="tabClick">
<el-tab-pane v-for="(item,index) in materialgroupList"
:key="index"
:name="item.id">
<span slot="label"> {{item.name}}</span>
</el-tab-pane>
</el-tabs>
</el-aside>
<el-main>
<el-card>
<div slot="header">
<el-row>
<el-col :span="12">
<span>{{materialgroupObj.name}}</span>
<span v-if="materialgroupObj.id != '-1'">
<el-button size="small" type="text" class="el-icon-edit" style="margin-left: 10px;" @click="materialgroupEdit(materialgroupObj)">重命名</el-button>
<el-button size="small" type="text" class="el-icon-delete" style="margin-left: 10px;color: red" @click="materialgroupDelete(materialgroupObj)">删除</el-button>
</span>
</el-col>
<el-col :span="12" style="text-align: right;">
<el-upload
:action="uploadApi"
:headers="headers"
:file-list="[]"
:on-progress="handleProgress"
:before-upload="beforeUpload"
:on-success="handleSuccess">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-col>
</el-row>
</div>
<div v-loading="tableLoading">
<el-alert
v-if="tableData.length <= 0"
title="暂无数据"
type="info"
:closable="false"
center
show-icon>
</el-alert>
<el-row :gutter="5">
<el-checkbox-group v-model="urls" :max="num - value.length">
<el-col :span="4" v-for="(item,index) in tableData" :key="index">
<el-card :body-style="{ padding: '5px' }">
<el-image
style="width: 100%;height: 100px"
:src="item.url"
fit="contain"
:preview-src-list="[item.url]"></el-image>
<div>
<el-checkbox class="material-name" :label="item.url">
选择
</el-checkbox>
<el-row>
<el-col :span="24" class="col-do">
<el-button type="text" size="medium" @click="materialDel(item)">删除</el-button>
</el-col>
</el-row>
</div>
</el-card>
</el-col>
</el-checkbox-group>
</el-row>
<el-pagination
@size-change="sizeChange"
:current-page.sync="page.currentPage"
:page-sizes="[12, 24]"
:page-size="page.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="page.total"
class="pagination">
</el-pagination>
</div>
</el-card>
</el-main>
</el-container>
<span slot="footer" class="dialog-footer">
<el-button @click="listDialogVisible = false"> </el-button>
<el-button type="primary" @click="sureUrls"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { getPage as materialgroupPage, addObj as materialgroupAdd, delObj as materialgroupDel, putObj as materialgroupEdit} from '@/api/tools/materialgroup'
import { getPage , addObj, delObj, putObj} from '@/api/tools/material'
import { getToken } from '@/utils/auth'
import { mapGetters } from 'vuex'
export default {
name: "materialList",
props: {
//
value:{
type: Array,
default() {
return []
},
},
//
type:{
type: String,
},
//5
num:{
type: Number,
default() {
return 5
},
},
//
width: {
type: Number,
default() {
return 150
}
},
//
height: {
type: Number,
default() {
return 150
}
}
},
data() {
return {
headers:{
Authorization: getToken()
},
dialogVisible: false,
url: '',
listDialogVisible: false,
materialgroupList: [],
materialgroupObjId: '',
materialgroupObj: {},
materialgroupLoading: false,
tableData: [],
page: {
total: 0, //
currentPage: 1, //
pageSize: 12, //
ascs: [],//
descs: 'create_time'//
},
tableLoading: false,
groupId: null,
urls: []
}
},
computed: {
...mapGetters([
'uploadApi'
])
},
methods:{
moveMaterial(index,type){
if(type == 'up'){
let tempOption = this.value[index - 1]
this.$set(this.value, index - 1, this.value[index])
this.$set(this.value, index, tempOption)
}
if(type == 'down'){
let tempOption = this.value[index + 1]
this.$set(this.value, index + 1, this.value[index])
this.$set(this.value, index, tempOption)
}
},
zoomMaterial(index){
this.dialogVisible = true
this.url = this.value[index]
},
deleteMaterial(index){
let that = this
this.$confirm('是否确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
that.value.splice(index,1)
that.urls = []
})
},
toSeleteMaterial(){
this.listDialogVisible = true
if(this.tableData.length <= 0){
this.materialgroupPage()
}
},
materialgroupPage(){
this.materialgroupLoading = true
materialgroupPage({
total: 0, //
currentPage: 1, //
pageSize: 100, //
ascs: [],//
descs: 'create_time'//
}).then(response => {
this.materialgroupLoading = false
let materialgroupList = response.content
materialgroupList.unshift({
id: '-1',
name: '全部分组'
})
this.materialgroupList = materialgroupList
this.tabClick({
index: 0
})
})
},
materialgroupDelete(materialgroupObj){
let that = this
this.$confirm('是否确认删除该分组?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
materialgroupDel(materialgroupObj.id)
.then(function() {
that.$delete(that.materialgroupList, materialgroupObj.index)
})
})
},
materialgroupEdit(materialgroupObj){
let that = this
this.$prompt('请输入分组名', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputValue: materialgroupObj.name,
}).then(({ value }) => {
materialgroupEdit({
id: materialgroupObj.id,
name: value
}).then(function() {
materialgroupObj.name = value
that.$set(that.materialgroupList, materialgroupObj.index, materialgroupObj)
})
}).catch(() => {
})
},
materialgroupAdd(){
let that = this
this.$prompt('请输入分组名', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
materialgroupAdd({
name: value
}).then(function() {
that.materialgroupPage()
})
}).catch(() => {
})
},
tabClick(tab,event){
this.urls = []
let index = Number(tab.index)
let materialgroupObj = this.materialgroupList[index]
materialgroupObj.index = index
this.materialgroupObj = materialgroupObj
this.materialgroupObjId = materialgroupObj.id
this.page.currentPage = 1
this.page.total = 0
if(materialgroupObj.id != '-1'){
this.groupId = materialgroupObj.id
}else{
this.groupId = null
}
this.getPage(this.page)
},
getPage(page, params) {
this.tableLoading = true
getPage(Object.assign({
current: page.currentPage,
size: page.pageSize,
descs: this.page.descs,
ascs: this.page.ascs,
}, {
groupId: this.groupId
})).then(response => {
let tableData = response.content
this.page.total = response.totalElements
this.page.currentPage = page.currentPage
this.page.pageSize = page.pageSize
this.tableData = tableData
this.tableLoading = false
}).catch(() => {
this.tableLoading=false
})
},
sizeChange(val) {
this.page.currentPage = 1
this.page.pageSize = val
this.getPage(this.page)
},
materialRename(item){
let that = this
this.$prompt('请输入素材名', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputValue: item.name,
}).then(({ value }) => {
putObj({
id: item.id,
name: value
}).then(function() {
that.getPage(that.page)
})
}).catch(() => {
})
},
materialUrl(item){
let that = this
this.$prompt('素材链接', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputValue: item.url,
}).then(({ value }) => {
}).catch(() => {
})
},
materialDel(item){
let that = this
this.$confirm('是否确认删除该素材?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
delObj(item.id)
.then(function() {
that.getPage(that.page)
})
})
},
handleCommand(command) {
let that = this
let s = command.split('-')
putObj({
id: s[0],
groupId: s[1]
}).then(function() {
that.getPage(that.page)
})
},
handleProgress(event, file, fileList){
// let uploadProgress = file.percentage.toFixed(0)
// this.uploadProgress = uploadProgress
},
handleSuccess(response, file, fileList){
let that = this
this.uploadProgress = 0
addObj({
type: '1',
groupId: this.groupId != '-1' ? this.groupId : null,
name: file.name,
url: response.link
}).then(function() {
that.getPage(that.page)
})
},
beforeUpload(file){
const isPic =
file.type === "image/jpeg" ||
file.type === "image/png" ||
file.type === "image/gif" ||
file.type === "image/jpg"
const isLt2M = file.size / 1024 / 1024 < 2
if (!isPic) {
this.$message.error("上传图片只能是 JPG、JPEG、PNG、GIF 格式!")
return false
}
if (!isLt2M) {
this.$message.error('上传头像图片大小不能超过 2MB!')
}
return isPic && isLt2M
},
sureUrls(){
this.urls.forEach(item => {
this.$set(this.value,this.value.length, item)
})
this.listDialogVisible=false
}
}
};
</script>
<style lang="scss" scoped>
.material-name{
padding: 8px 0px;
}
.col-do{
text-align: center;
}
.button-do{
padding: unset!important;
font-size: 12px;
}
</style>

1
src/store/getters.js

@ -16,6 +16,7 @@ const getters = {
imagesUploadApi: state => state.api.imagesUploadApi,
baseApi: state => state.api.baseApi,
fileUploadApi: state => state.api.fileUploadApi,
uploadApi: state => state.api.uploadApi,
updateAvatarApi: state => state.api.updateAvatarApi,
qiNiuUploadApi: state => state.api.qiNiuUploadApi,
sqlApi: state => state.api.sqlApi,

2
src/store/modules/api.js

@ -13,6 +13,8 @@ const api = {
updateAvatarApi: baseUrl + '/api/users/updateAvatar',
// 上传文件到七牛云
qiNiuUploadApi: baseUrl + '/api/qiNiuContent',
uploadApi: baseUrl + '/api/upload',
// Sql 监控
sqlApi: baseUrl + '/druid',
// swagger

29
src/views/activity/bargain/form.vue

@ -30,10 +30,10 @@
</template>
</el-form-item>
<el-form-item label="砍价产品主图片">
<pic-upload v-model="form.image" style="width: 500px;" />
<MaterialList v-model="form.imageArr" style="width: 500px" type="image" :num=1 :width=150 :height=150></MaterialList>
</el-form-item>
<el-form-item label="砍价产品轮播图">
<mulpic-upload v-model="form.images" style="width: 500px;" />
<MaterialList v-model="form.sliderImageArr" style="width: 500px" type="image" :num=4 :width=150 :height=150></MaterialList>
</el-form-item>
<el-form-item label="库存">
<el-input-number v-model="form.stock" />
@ -41,10 +41,6 @@
<el-form-item label="销量">
<el-input-number v-model="form.sales" />
</el-form-item>
<!-- <el-form-item label="砍价产品名称" >-->
<!-- <el-input v-model="form.storeName" />-->
<!-- </el-form-item>-->
<el-form-item label="砍价金额">
<el-input-number v-model="form.price" />
</el-form-item>
@ -106,8 +102,9 @@ import picUpload from '@/components/pic-upload'
import mulpicUpload from '@/components/mul-pic-upload'
import { add, edit } from '@/api/yxStoreBargain'
import editor from '../../components/Editor'
import MaterialList from '@/components/material'
export default {
components: { editor, picUpload, mulpicUpload },
components: { editor, picUpload, mulpicUpload, MaterialList },
props: {
isAdd: {
type: Boolean,
@ -126,6 +123,8 @@ export default {
stock: '',
sales: '',
images: '',
imageArr: [],
sliderImageArr: [],
startTime: '',
stopTime: '',
storeName: '',
@ -156,6 +155,20 @@ export default {
}
}
},
watch:{
'form.imageArr': function(val) {
if(val){
this.form.image = val.join(",");
}
},
'form.sliderImageArr': function(val) {
if(val){
this.form.sliderImage = val.join(",");
}
}
},
methods: {
cancel() {
this.resetForm()
@ -208,6 +221,8 @@ export default {
stock: '',
sales: '',
images: '',
imageArr: [],
sliderImageArr: [],
startTime: '',
stopTime: '',
storeName: '',

2
src/views/activity/bargain/index.vue

@ -136,6 +136,8 @@ export default {
stock: data.stock,
sales: data.sales,
images: data.images,
imageArr: data.image.split(','),
sliderImageArr: data.images.split(','),
startTime: data.startTime,
stopTime: data.stopTime,
storeName: data.storeName,

23
src/views/activity/combination/form.vue

@ -29,10 +29,10 @@
</template>
</el-form-item>
<el-form-item label="产品主图片">
<pic-upload v-model="form.image" style="width: 500px;" />
<MaterialList v-model="form.imageArr" style="width: 500px" type="image" :num=1 :width=150 :height=150></MaterialList>
</el-form-item>
<el-form-item label="产品轮播图">
<mulpic-upload v-model="form.images" style="width: 500px;" />
<MaterialList v-model="form.sliderImageArr" style="width: 500px" type="image" :num=4 :width=150 :height=150></MaterialList>
</el-form-item>
<el-form-item label="拼团时效(单位小时)">
<el-input v-model="form.effectiveTime" style="width: 500px;" />
@ -83,8 +83,9 @@ import { add, edit } from '@/api/yxStoreCombination'
import editor from '../../components/Editor'
import picUpload from '@/components/pic-upload'
import mulpicUpload from '@/components/mul-pic-upload'
import MaterialList from '@/components/material'
export default {
components: { editor, picUpload, mulpicUpload },
components: { editor, picUpload, mulpicUpload, MaterialList },
props: {
isAdd: {
type: Boolean,
@ -100,6 +101,8 @@ export default {
merId: '',
image: '',
images: '',
imageArr: [],
sliderImageArr: [],
title: '',
attr: '',
people: '',
@ -131,6 +134,18 @@ export default {
}
}
},
watch:{
'form.imageArr': function(val) {
if(val){
this.form.image = val.join(",");
}
},
'form.sliderImageArr': function(val) {
if(val){
this.form.sliderImage = val.join(",");
}
}
},
methods: {
cancel() {
this.resetForm()
@ -180,6 +195,8 @@ export default {
merId: '',
image: '',
images: '',
imageArr: [],
sliderImageArr: [],
title: '',
attr: '',
people: 0,

4
src/views/activity/combination/index.vue

@ -43,7 +43,7 @@
<span>{{ formatTimeTwo(scope.row.stopTime) }}</span>
</template>
</el-table-column>
<el-table-column v-if="checkPermission(['admin','YXSTORECOMBINATION_ALL','YXSTORECOMBINATION_EDIT','YXSTORECOMBINATION_DELETE'])" label="操作" width="150px" align="center">
<el-table-column v-if="checkPermission(['admin','YXSTORECOMBINATION_ALL','YXSTORECOMBINATION_EDIT','YXSTORECOMBINATION_DELETE'])" label="操作" width="150px" align="center" fixed="right">
<template slot-scope="scope">
<el-button v-permission="['admin','YXSTORECOMBINATION_ALL','YXSTORECOMBINATION_EDIT']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)" />
<el-popover
@ -161,6 +161,8 @@ export default {
merId: data.merId,
image: data.image,
images: data.images,
imageArr: data.image.split(','),
sliderImageArr: data.images.split(','),
title: data.title,
attr: data.attr,
people: data.people,

23
src/views/activity/seckill/form.vue

@ -29,10 +29,10 @@
</template>
</el-form-item>
<el-form-item label="产品主图片">
<pic-upload v-model="form.image" style="width: 500px;" />
<MaterialList v-model="form.imageArr" style="width: 500px" type="image" :num=1 :width=150 :height=150></MaterialList>
</el-form-item>
<el-form-item label="产品轮播图">
<mulpic-upload v-model="form.images" style="width: 500px;" />
<MaterialList v-model="form.sliderImageArr" style="width: 500px" type="image" :num=4 :width=150 :height=150></MaterialList>
</el-form-item>
<el-form-item label="秒杀价">
<el-input-number v-model="form.price" />
@ -82,8 +82,9 @@ import { add, edit } from '@/api/yxStoreSeckill'
import editor from '../../components/Editor'
import picUpload from '@/components/pic-upload'
import mulpicUpload from '@/components/mul-pic-upload'
import MaterialList from '@/components/material'
export default {
components: { editor, picUpload, mulpicUpload },
components: { editor, picUpload, mulpicUpload, MaterialList },
props: {
isAdd: {
type: Boolean,
@ -98,6 +99,8 @@ export default {
productId: '',
image: '',
images: '',
imageArr: [],
sliderImageArr: [],
title: '',
info: '',
price: '',
@ -126,6 +129,18 @@ export default {
}
}
},
watch:{
'form.imageArr': function(val) {
if(val){
this.form.image = val.join(",");
}
},
'form.sliderImageArr': function(val) {
if(val){
this.form.sliderImage = val.join(",");
}
}
},
methods: {
cancel() {
this.resetForm()
@ -174,6 +189,8 @@ export default {
productId: '',
image: '',
images: '',
imageArr: [],
sliderImageArr: [],
title: '',
info: '',
price: '',

2
src/views/activity/seckill/index.vue

@ -134,6 +134,8 @@ export default {
productId: data.productId,
image: data.image,
images: data.images,
imageArr: data.image.split(','),
sliderImageArr: data.images.split(','),
title: data.title,
info: data.info,
price: data.price,

10
src/views/components/Editor.vue

@ -31,7 +31,7 @@ export default {
},
computed: {
...mapGetters([
'qiNiuUploadApi'
'uploadApi'
])
},
watch: {
@ -49,7 +49,13 @@ export default {
this.editor.customConfig.uploadImgHeaders = this.headers
//
this.editor.customConfig.uploadFileName = 'file'
this.editor.customConfig.uploadImgServer = this.qiNiuUploadApi //
this.editor.customConfig.uploadImgServer = this.uploadApi //
this.editor.customConfig.uploadImgHooks = {
customInsert: function (insertImg, result, editor) {
var url = result.link
insertImg(url)
}
}
this.editor.customConfig.onchange = (html) => {
this.info = html
this.$emit('change', this.info)

171
src/views/dashboard/YshopInfo.vue

@ -0,0 +1,171 @@
<template>
<el-row :gutter="10" class="panel-group">
<el-col :xs="16" :sm="16" :lg="8" class="card-panel-col">
<div class="card-panel">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span style="font-weight: bolder">项目信息</span>
</div>
<div class="text item">
<span style="font-weight: bolder">yshop基于当前流行技术组合的前后端分离商城系统</span>
SpringBoot2+Jpa+MybatisPlus+SpringSecurity
的前后端分离的商城系统
包含商城拼团砍价商户管理 秒杀优惠券积分分销会员等功能
</div>
<div class="text item">
<span style="font-weight: bolder">技术选型</span>
SpringBoot2mybatisMyBatis-Plus
SpringSecurityJPA Druid Slf4j Fastjson
JWT Redis Quartz Mysql swagger WxJava
Lombok Hutool
Mapstruct Redisson Rocketmq
</div>
<div class="text item">
<span style="font-weight: bolder">QQ群</span>964166879
</div>
<div class="text item">
<span style="font-weight: bolder">gitee</span><a target="_blank" href="https://gitee.com/guchengwuyue/yshopmall">访问码云</a>
</div>
<div class="text item">
<span style="font-weight: bolder">github</span><a target="_blank" href="https://github.com/guchengwuyue/yshopmall">访问github</a>
</div>
<div class="text item">
<span style="font-weight: bolder">公众号演示</span><img width="100" height="100" src="https://image.dayouqiantu.cn/qrcode_for_gh_95df5a2881cc_258.jpg">
</div>
<div class="text item">
<span style="font-weight: bolder">H5演示</span><a target="_blank" href="https://h5.dayouqiantu.cn">https://h5.dayouqiantu.cn</a> <br />
<span style="font-weight: bolder">H5测试号</span>hupeng/123456,也可以自行注册
</div>
</el-card>
</div>
</el-col>
<el-col :xs="16" :sm="16" :lg="8" class="card-panel-col">
<div class="card-panel">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span style="font-weight: bolder">开源+VIP说明</span>
</div>
<div class="text item">
<span style="font-weight: bolder">开源版</span>是整个商城的管理后台后台已经封装好了图片素材库编辑器配置等等组件
它可以用于所有的Web应用程序如网站商城管理后台网站会员中心CMSCRMOA等等
当然您也可以对它进行深度定制以做出更强系统
</div>
<div class="text item">
<span style="font-weight: bolder">VIP版</span>包括了开源版还包括了移动端(H5+公众号)小程序(mpvue)即将发布移动端API
</div>
<div class="text item">
1VIP为终身制拥有全部源代码及其后续的代码免费升级及其技术支持目前商城优惠券会员秒杀分销砍价等都已经完成<br />
2价格vip会员价218元当然当前价格是整个价格后续的系统升级vip价格会有相应的调整的所以早上车更优惠哦<br />
3VIP购买淘宝地址https://item.taobao.com/item.htm?id=607532386325<br />
4加入vip群931426444,请输入你的淘宝订单编号即可入群<br />
5群里面获取私服git<br />
</div>
</el-card>
</div>
</el-col>
<el-col :xs="16" :sm="16" :lg="8" class="card-panel-col">
<div class="card-panel">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span style="font-weight: bolder">更新日志</span>
</div>
<div class="text item">
<span style="font-weight: bolder">2020-01-10yshop1.8版本 发布更新如下</span>
</div>
<div class="text item">
1.新增小程序支付与登录,后台新增小程序跳转页面,
</div>
<div class="text item">
2.后台新增图片素材管理
</div>
<div class="text item">
3.本地上传与七牛云上传合并修改一个yml即可两者随意切换
</div>
<div class="text item">
4.升级swagger-bootstrap,swaager统一配置迁移到common(防止注解冲突)
</div>
<div class="text item">
5.后台优化操作显示
</div>
</el-card>
</div>
</el-col>
</el-row>
</template>
<script>
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.text {
font-size: 12px;
}
.item {
margin-bottom: 10px;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
}
.clearfix:after {
clear: both
}
.panel-group {
margin-top: 18px;
.card-panel-col{
margin-bottom: 32px;
}
.card-panel {
height: auto;
font-size: 12px;
position: relative;
overflow: hidden;
color: #666;
background: #fff;
box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
border-color: rgba(0, 0, 0, .05);
.icon-people {
color: #40c9c6;
}
.icon-message {
color: #36a3f7;
}
.icon-money {
color: #f4516c;
}
.icon-shopping {
color: #34bfa3
}
.card-panel-icon-wrapper {
float: left;
margin: 14px 0 0 14px;
padding: 16px;
transition: all 0.38s ease-out;
border-radius: 6px;
}
.card-panel-icon {
float: left;
font-size: 48px;
}
.card-panel-description {
float: right;
font-weight: bold;
margin: 26px;
margin-left: 0px;
.card-panel-text {
line-height: 18px;
color: rgba(0, 0, 0, 0.45);
font-size: 16px;
margin-bottom: 12px;
}
.card-panel-num {
font-size: 20px;
}
}
}
}
</style>

20
src/views/home.vue

@ -1,6 +1,7 @@
<template>
<div class="dashboard-container">
<div class="dashboard-editor-container">
<yshop-info />
<panel-group />
<panel-group-t />
@ -32,6 +33,7 @@ import LineChart from './dashboard/LineChart'
import PieChart from './dashboard/BarChartT'
import BarChart from './dashboard/BarChart'
import { count } from '@/api/visits'
import YshopInfo from './dashboard/YshopInfo'
/**
* 记录访问只有页面刷新或者第一次加载才会记录
@ -46,27 +48,13 @@ export default {
PanelGroupT,
LineChart,
PieChart,
BarChart
BarChart,
YshopInfo
},
computed: {
...mapGetters([
'roles'
])
},
created() {
this.open()
},
methods: {
open() {
this.$notify({
title: '公众号演示',
dangerouslyUseHTMLString: true,
message: '<img src="https://image.dayouqiantu.cn/qrcode_for_gh_95df5a2881cc_258.jpg">',
duration: 0
});
}
}
}
</script>

4
src/views/monitor/log/mlog.vue

@ -1,6 +1,5 @@
<template>
<div class="app-container">
<Search :query="query"/>
<!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
<el-table-column prop="nickname" label="用户名"/>
@ -27,10 +26,8 @@
<script>
import initData from '@/mixins/crud'
import { parseTime } from '@/utils/index'
import Search from './search'
export default {
name: 'Log',
components: { Search },
mixins: [initData],
created() {
this.$nextTick(() => {
@ -41,7 +38,6 @@ export default {
parseTime,
beforeInit() {
this.url = 'api/logs/mlogs'
const sort = 'id,desc'
const query = this.query
const value = query.value
this.params = { page: this.page, size: this.size }

16
src/views/shop/cate/index.vue

@ -16,7 +16,7 @@
<el-input v-model="form.cateName" style="width: 370px;" />
</el-form-item>
<el-form-item label="分类图片">
<pic-upload v-model="form.pic" style="width: 500px;" />
<MaterialList v-model="picArr" type="image" :num=1 :width=150 :height=150></MaterialList>
</el-form-item>
<el-form-item label="状态">
<el-radio-group v-model="form.isShow" style="width: 178px">
@ -69,16 +69,18 @@ import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import picUpload from '@/components/pic-upload'
import MaterialList from '@/components/material'
// crudpresenter
const defaultCrud = CRUD({ title: '分类', url: 'api/yxStoreCategory', crudMethod: { ...crudDept }})
const defaultForm = { id: null, cateName: null, pid: 0, isShow: 1 }
export default {
name: 'Dept',
components: { Treeselect, crudOperation, rrOperation, udOperation, picUpload },
components: { Treeselect, crudOperation, rrOperation, udOperation, picUpload, MaterialList },
mixins: [presenter(defaultCrud), header(), form(defaultForm), crud()],
data() {
return {
picArr: [],
depts: [],
rules: {
cateName: [
@ -96,9 +98,19 @@ export default {
]
}
},
watch:{
picArr: function(val) {
this.form.pic = val.join(",");
}
},
methods: {
//
[CRUD.HOOK.afterToCU](crud, form) {
console.log(form)
if(form.pic){
this.picArr = form.pic.split(',')
}
//
crudDept.getCates({ isShow: true }).then(res => {
this.depts = []

42
src/views/shop/goods/form.vue

@ -17,10 +17,10 @@
<el-input v-model="form.barCode" style="width: 320px;" />
</el-form-item>
<el-form-item label="商品图片">
<pic-upload v-model="form.image" style="width: 500px;" />
<MaterialList v-model="form.imageArr" style="width: 500px" type="image" :num=1 :width=150 :height=150></MaterialList>
</el-form-item>
<el-form-item label="轮播图">
<mulpic-upload v-model="form.sliderImage" style="width: 500px;" />
<MaterialList v-model="form.sliderImageArr" style="width: 500px" type="image" :num=4 :width=150 :height=150></MaterialList>
</el-form-item>
<el-form-item label="商品简介">
<el-input v-model="form.storeInfo" style="width: 500px;" rows="5" type="textarea" />
@ -31,9 +31,6 @@
<el-form-item label="商品价格">
<el-input v-model="form.price" />
</el-form-item>
<!--<el-form-item label="会员价格" >-->
<!--<el-input v-model="form.vipPrice"/>-->
<!--</el-form-item>-->
<el-form-item label="市场价">
<el-input v-model="form.otPrice" />
</el-form-item>
@ -98,8 +95,9 @@ import picUpload from '@/components/pic-upload'
import mulpicUpload from '@/components/mul-pic-upload'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import MaterialList from '@/components/material'
export default {
components: { editor, picUpload, mulpicUpload, Treeselect },
components: { editor, picUpload, mulpicUpload, Treeselect, MaterialList },
props: {
isAdd: {
type: Boolean,
@ -114,6 +112,8 @@ export default {
merId: 0,
image: '',
sliderImage: '',
imageArr: [],
sliderImageArr: [],
storeName: '',
storeInfo: '',
keyword: '',
@ -151,6 +151,18 @@ export default {
}
}
},
watch:{
'form.imageArr': function(val) {
if(val){
this.form.image = val.join(",");
}
},
'form.sliderImageArr': function(val) {
if(val){
this.form.sliderImage = val.join(",");
}
}
},
methods: {
cancel() {
this.resetForm()
@ -199,6 +211,8 @@ export default {
merId: '',
image: '',
sliderImage: '',
imageArr: [],
sliderImageArr: [],
storeName: '',
storeInfo: '',
keyword: '',
@ -210,16 +224,16 @@ export default {
postage: '',
unitName: '',
sort: '',
sales: '',
stock: '',
isShow: '',
isHot: '',
isBenefit: '',
isBest: '',
isNew: '',
sales: 0,
stock: 0,
isShow: 1,
isHot: 1,
isBenefit: 1,
isBest: 1,
isNew: 1,
description: '',
addTime: '',
isPostage: '',
isPostage: 1,
isDel: '',
merUse: '',
giveIntegral: '',

8
src/views/shop/goods/index.vue

@ -203,6 +203,8 @@ export default {
merId: data.merId,
image: data.image,
sliderImage: data.sliderImage,
imageArr: data.image.split(','),
sliderImageArr: data.sliderImage.split(','),
storeName: data.storeName,
storeInfo: data.storeInfo,
keyword: data.keyword,
@ -246,6 +248,8 @@ export default {
merId: data.merId,
image: data.image,
images: data.sliderImage,
imageArr: data.image.split(','),
sliderImageArr: data.sliderImage.split(','),
title: data.storeName,
info: data.storeInfo,
postage: data.postage,
@ -275,6 +279,8 @@ export default {
merId: data.merId,
image: data.image,
images: data.sliderImage,
imageArr: data.image.split(','),
sliderImageArr: data.sliderImage.split(','),
title: data.storeName,
info: data.storeInfo,
postage: data.postage,
@ -307,6 +313,8 @@ export default {
merId: data.merId,
image: data.image,
images: data.sliderImage,
imageArr: data.image.split(','),
sliderImageArr: data.sliderImage.split(','),
title: data.storeName,
info: data.storeInfo,
postage: data.postage,

2
src/views/shop/goods/index2.vue

@ -160,6 +160,8 @@ export default {
merId: data.merId,
image: data.image,
sliderImage: data.sliderImage,
imageArr: data.image.split(','),
sliderImageArr: data.sliderImage.split(','),
storeName: data.storeName,
storeInfo: data.storeInfo,
keyword: data.keyword,

2
src/views/shop/goods/index3.vue

@ -152,6 +152,8 @@ export default {
merId: data.merId,
image: data.image,
sliderImage: data.sliderImage,
imageArr: data.image.split(','),
sliderImageArr: data.sliderImage.split(','),
storeName: data.storeName,
storeInfo: data.storeInfo,
keyword: data.keyword,

2
src/views/shop/order/index.vue

@ -64,7 +64,7 @@
<span>{{ formatTime(scope.row.addTime) }}</span>
</template>
</el-table-column>
<el-table-column v-if="checkPermission(['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT','YXSTOREORDER_DELETE'])" label="操作" width="200" align="center">
<el-table-column v-if="checkPermission(['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT','YXSTOREORDER_DELETE'])" label="操作" width="200" align="center" fixed="right">
<template slot-scope="scope">
<el-button v-permission="['admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT']" size="mini" type="primary"
@click="detail(scope.row)">

3
src/views/shop/set/act.vue

@ -115,7 +115,8 @@ export default {
title: data.map.title,
info: data.map.info,
url: data.map.url,
pic: data.map.pic
pic: data.map.pic,
imageArr: data.map.pic.split(','),
}
_this.dialog = true
}

12
src/views/shop/set/actform.vue

@ -12,6 +12,7 @@
</el-form-item>
<el-form-item label="图片(260*260/416*214)">
<pic-upload v-model="form.pic" style="width: 500px;" />
<MaterialList v-model="form.imageArr" style="width: 500px" type="image" :num=1 :width=150 :height=150></MaterialList>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -25,8 +26,9 @@
<script>
import { add, edit } from '@/api/yxSystemGroupData'
import picUpload from '@/components/pic-upload'
import MaterialList from '@/components/material'
export default {
components: { picUpload },
components: { picUpload, MaterialList },
props: {
isAdd: {
type: Boolean,
@ -43,6 +45,7 @@ export default {
info: '',
url: '',
pic: '',
imageArr: [],
sort: '',
status: ''
},
@ -50,6 +53,13 @@ export default {
}
}
},
watch:{
'form.imageArr': function(val) {
if(val){
this.form.pic = val.join(",");
}
}
},
methods: {
cancel() {
this.resetForm()

14
src/views/shop/set/form.vue

@ -11,7 +11,7 @@
<el-input v-model="form.wxapp_url" style="width: 300px;" />
</el-form-item>
<el-form-item label="图片(750*375)">
<pic-upload v-model="form.pic" />
<MaterialList v-model="form.imageArr" style="width: 300px" type="image" :num=1 :width=150 :height=150></MaterialList>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -25,8 +25,9 @@
<script>
import { add, edit } from '@/api/yxSystemGroupData'
import picUpload from '@/components/pic-upload'
import MaterialList from '@/components/material'
export default {
components: { picUpload },
components: { picUpload, MaterialList },
props: {
isAdd: {
type: Boolean,
@ -43,6 +44,7 @@ export default {
url: '',
wxapp_url: '',
pic: '',
imageArr: [],
sort: '',
status: ''
},
@ -50,6 +52,13 @@ export default {
}
}
},
watch:{
'form.imageArr': function(val) {
if(val){
this.form.pic = val.join(",");
}
}
},
methods: {
cancel() {
this.resetForm()
@ -96,6 +105,7 @@ export default {
this.form = {
id: '',
groupName: 'routine_home_banner',
imageArr: [],
value: '',
addTime: '',
sort: '',

3
src/views/shop/set/index.vue

@ -115,7 +115,8 @@ export default {
name: data.map.name,
url: data.map.url,
wxapp_url: data.map.wxapp_url,
pic: data.map.pic
pic: data.map.pic,
imageArr: data.map.pic ? data.map.pic.split(',') : []
}
_this.dialog = true
}

3
src/views/shop/set/menu.vue

@ -115,7 +115,8 @@ export default {
name: data.map.name,
url: data.map.url,
wxapp_url: data.map.wxapp_url,
pic: data.map.pic
pic: data.map.pic,
imageArr: data.map.pic ? data.map.pic.split(',') : []
}
_this.dialog = true
}

14
src/views/shop/set/menuform.vue

@ -11,7 +11,7 @@
<el-input v-model="form.wxapp_url" style="width: 300px;" />
</el-form-item>
<el-form-item label="分类图标(90*90)">
<pic-upload v-model="form.pic" />
<MaterialList v-model="form.imageArr" style="width: 300px" type="image" :num=1 :width=150 :height=150></MaterialList>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -25,8 +25,9 @@
<script>
import { add, edit } from '@/api/yxSystemGroupData'
import picUpload from '@/components/pic-upload'
import MaterialList from '@/components/material'
export default {
components: { picUpload },
components: { picUpload, MaterialList },
props: {
isAdd: {
type: Boolean,
@ -43,6 +44,7 @@ export default {
url: '',
wxapp_url: '',
pic: '',
imageArr: [],
sort: '',
status: ''
},
@ -50,6 +52,13 @@ export default {
}
}
},
watch:{
'form.imageArr': function(val) {
if(val){
this.form.pic = val.join(",");
}
}
},
methods: {
cancel() {
this.resetForm()
@ -96,6 +105,7 @@ export default {
this.form = {
id: '',
groupName: 'routine_home_menus',
imageArr: [],
value: '',
addTime: '',
sort: '',

7
src/views/shop/set/usermenu.vue

@ -24,7 +24,9 @@
<el-table-column prop="map.wxapp_url" label="小程序跳转page" />
<el-table-column ref="table" label="图标">
<template slot-scope="scope">
<a :href="scope.row.map.pic" style="color: #42b983" target="_blank"><img :src="scope.row.map.pic" alt="点击打开" class="el-avatar"></a>
<a :href="scope.row.map.pic" style="color: #42b983" target="_blank">
<img :src="scope.row.map.pic" alt="点击打开" class="el-avatar">
</a>
</template>
</el-table-column>
<el-table-column v-if="checkPermission(['admin','YXSYSTEMGROUPDATA_ALL','YXSYSTEMGROUPDATA_EDIT','YXSYSTEMGROUPDATA_DELETE'])" label="操作" width="150px" align="center">
@ -115,7 +117,8 @@ export default {
name: data.map.name,
url: data.map.url,
wxapp_url: data.map.wxapp_url,
pic: data.map.pic
pic: data.map.pic,
imageArr: data.map.pic ? data.map.pic.split(',') : []
}
_this.dialog = true
}

14
src/views/shop/set/usermenuform.vue

@ -11,7 +11,7 @@
<el-input v-model="form.wxapp_url" style="width: 300px;" />
</el-form-item>
<el-form-item label="图标(52*52)">
<pic-upload v-model="form.pic" style="width: 500px;" />
<MaterialList v-model="form.imageArr" style="width: 300px" type="image" :num=1 :width=150 :height=150></MaterialList>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -25,8 +25,9 @@
<script>
import { add, edit } from '@/api/yxSystemGroupData'
import picUpload from '@/components/pic-upload'
import MaterialList from '@/components/material'
export default {
components: { picUpload },
components: { picUpload, MaterialList },
props: {
isAdd: {
type: Boolean,
@ -43,6 +44,7 @@ export default {
url: '',
wxapp_url: '',
pic: '',
imageArr: [],
sort: '',
status: ''
},
@ -50,6 +52,13 @@ export default {
}
}
},
watch:{
'form.imageArr': function(val) {
if(val){
this.form.pic = val.join(",");
}
}
},
methods: {
cancel() {
this.resetForm()
@ -96,6 +105,7 @@ export default {
this.form = {
id: '',
groupName: 'routine_my_menus',
imageArr: [],
value: '',
addTime: '',
sort: '',

2
src/views/shop/user/index.vue

@ -41,7 +41,7 @@
</el-table-column>
<el-table-column prop="spreadUid" label="推荐人" />
<el-table-column prop="payCount" label="购买次数" />
<el-table-column v-if="checkPermission(['admin','YXUSER_ALL','YXUSER_EDIT','YXUSER_DELETE'])" label="操作" width="185" align="center">
<el-table-column v-if="checkPermission(['admin','YXUSER_ALL','YXUSER_EDIT','YXUSER_DELETE'])" label="操作" width="185" align="center" fixed="right">
<template slot-scope="scope">
<el-button
v-permission="['admin','YXUSER_ALL','YXUSER_EDIT']"

27
src/views/shop/userlevel/form.vue

@ -18,10 +18,10 @@
<el-input v-model="form.discount" style="width: 370px;" />
</el-form-item>
<el-form-item label="会员背景">
<pic-upload v-model="form.image" />
<MaterialList v-model="form.imageArr" style="width: 300px" type="image" :num=1 :width=150 :height=150></MaterialList>
</el-form-item>
<el-form-item label="会员图标">
<pic-upload v-model="form.icon" />
<MaterialList v-model="form.iconArr" style="width: 300px" type="image" :num=1 :width=150 :height=150></MaterialList>
</el-form-item>
<el-form-item label="是否显示">
<el-radio v-model="form.isShow" :label="1"></el-radio>
@ -41,8 +41,9 @@
<script>
import { add, edit } from '@/api/yxSystemUserLevel'
import picUpload from '@/components/pic-upload'
import MaterialList from '@/components/material'
export default {
components: { picUpload },
components: { picUpload, MaterialList },
props: {
isAdd: {
type: Boolean,
@ -58,13 +59,15 @@ export default {
name: '',
money: '',
validDate: '',
isForever: '',
isForever: 1,
isPay: '',
isShow: '',
isShow: 1,
grade: '',
discount: '',
image: '',
icon: '',
imageArr: [],
iconArr: [],
explain: '',
addTime: '',
isDel: ''
@ -73,6 +76,18 @@ export default {
}
}
},
watch:{
'form.imageArr': function(val) {
if(val){
this.form.image = val.join(",");
}
},
'form.iconArr': function(val) {
if(val){
this.form.icon = val.join(",");
}
}
},
methods: {
cancel() {
this.resetForm()
@ -131,6 +146,8 @@ export default {
icon: '',
explain: '',
addTime: '',
imageArr: [],
iconArr: [],
isDel: ''
}
}

2
src/views/shop/userlevel/index.vue

@ -135,6 +135,8 @@ export default {
discount: data.discount,
image: data.image,
icon: data.icon,
imageArr: data.image ? data.image.split(',') : [],
iconArr: data.icon ? data.icon.split(',') : [],
explain: data.explain,
addTime: data.addTime,
isDel: data.isDel

13
src/views/wechat/article/form.vue

@ -8,7 +8,7 @@
<el-input v-model="form.author" style="width: 370px;" />
</el-form-item>
<el-form-item label="封面">
<pic-upload v-model="form.imageInput" style="width: 370px;" />
<MaterialList v-model="form.imageArr" style="width: 370px" type="image" :num=1 :width=150 :height=150></MaterialList>
</el-form-item>
<el-form-item label="简介">
<el-input v-model="form.synopsis" style="width: 370px;" rows="5" type="textarea" />
@ -29,8 +29,9 @@ import { add, edit } from '@/api/yxArticle'
import picUpload from '@/components/pic-upload'
import editor from '../../components/Editor'
import yamedit from '@/components/YamlEdit'
import MaterialList from '@/components/material'
export default {
components: { editor, picUpload, yamedit },
components: { editor, picUpload, yamedit, MaterialList },
props: {
isAdd: {
type: Boolean,
@ -46,6 +47,7 @@ export default {
title: '',
author: '',
imageInput: '',
imageArr: [],
synopsis: '',
content: '',
shareTitle: '',
@ -65,6 +67,13 @@ export default {
}
}
},
watch:{
'form.imageArr': function(val) {
if(val){
this.form.imageInput = val.join(",");
}
}
},
methods: {
cancel() {
this.resetForm()

1
src/views/wechat/article/index.vue

@ -152,6 +152,7 @@ export default {
title: data.title,
author: data.author,
imageInput: data.imageInput,
imageArr: data.imageInput.split(','),
synopsis: data.synopsis,
content: data.content,
shareTitle: data.shareTitle,

14
src/views/wechat/config/index.vue

@ -17,7 +17,7 @@
<el-input v-model="form.api" :disabled="true" style="width: 370px;" />
</el-form-item>
<el-form-item label="微信分享图片">
<pic-upload v-model="form.wechat_share_img" style="width: 370px;" />
<MaterialList v-model="form.imageArr" style="width: 370px" type="image" :num=1 :width=150 :height=150></MaterialList>
</el-form-item>
<el-form-item label="微信分享标题">
<el-input v-model="form.wechat_share_title" style="width: 370px;" />
@ -41,8 +41,9 @@ import { del, add, get } from '@/api/yxSystemConfig'
import eForm from './form'
import picUpload from '@/components/pic-upload'
import { Message } from 'element-ui'
import MaterialList from '@/components/material'
export default {
components: { eForm, picUpload },
components: { eForm, picUpload, MaterialList },
mixins: [initData],
data() {
return {
@ -57,6 +58,7 @@ export default {
wechat_encode: '',
wechat_encodingaeskey: '',
wechat_share_img: '',
imageArr: [],
wechat_qrcode: '',
wechat_type: '',
wechat_share_title: '',
@ -68,6 +70,13 @@ export default {
}
}
},
watch:{
'form.imageArr': function(val) {
if(val){
this.form.wechat_share_img = val.join(",");
}
}
},
created() {
get().then(rese => {
const newObj = {}
@ -77,6 +86,7 @@ export default {
})
this.form = newObj
this.form.imageArr =this.form.wechat_share_img.split(',')
})
},
methods: {

9
src/views/wechat/config/pay.vue

@ -10,6 +10,9 @@
<el-form-item label="商户密钥">
<el-input v-model="form.wxpay_mchKey" style="width: 370px;" type="password" />
</el-form-item>
<el-form-item label="微信证书" >
<file-upload v-model="form.wxpay_keyPath" style="width: 500px;"/>
</el-form-item>
<el-form-item label="">
<el-button type="primary" @click="doSubmit">提交</el-button>
</el-form-item>
@ -26,8 +29,9 @@ import { del, add, get } from '@/api/yxSystemConfig'
import eForm from './form'
import picUpload from '@/components/pic-upload'
import { Message } from 'element-ui'
import fileUpload from '@/components/file-upload'
export default {
components: { eForm, picUpload },
components: { eForm, picUpload, fileUpload },
mixins: [initData],
data() {
return {
@ -35,7 +39,8 @@ export default {
form: {
wxpay_appId: '',
wxpay_mchId: '',
wxpay_mchKey: ''
wxpay_mchKey: '',
wxpay_keyPath: ''
},
rules: {
}

Loading…
Cancel
Save