Browse Source

1.3.3新增 后台微信图文发送功能,小程序配置,增加小程序授权等,修复一些bug等

master
hupeng 5 years ago
parent
commit
17aa0f4676
  1. 17
      README.md
  2. 15
      src/api/visits.js
  3. 2
      src/api/yxSystemConfig.js
  4. 42
      src/views/dashboard/BarChart.vue
  5. 112
      src/views/dashboard/BarChartT.vue
  6. 45
      src/views/dashboard/PanelGroup.vue
  7. 133
      src/views/dashboard/PanelGroupT.vue
  8. 26
      src/views/home.vue
  9. 55
      src/views/wechat/config/index.vue
  10. 73
      src/views/wechat/config/pay.vue
  11. 69
      src/views/wechat/config/wxapp.vue
  12. 11
      src/views/wechat/reply/index.vue

17
README.md

@ -11,7 +11,7 @@ yshop基于当前流行技术组合: SpringBoot2+Jpa+MybatisPlus+SpringSecurit
| | 后台系统 | 前端(公众号) | | | 后台系统 | 前端(公众号) |
|--- |--- | --- | |--- |--- | --- |
| | https://yshop.dayouqiantu.cn |g公众号:YshopMall | | | https://yshop.dayouqiantu.cn |H5:https://h5.dayouqiantu.cn 测试号:hupeng/123456,也可以自行注册 |
| | 后台体验账号/密码:admin/123456 | 公众号:![输入图片说明](https://images.gitee.com/uploads/images/2019/1116/060936_fd73496c_477893.jpeg "qrcode_for_gh_95df5a2881cc_258.jpg") | | | 后台体验账号/密码:admin/123456 | 公众号:![输入图片说明](https://images.gitee.com/uploads/images/2019/1116/060936_fd73496c_477893.jpeg "qrcode_for_gh_95df5a2881cc_258.jpg") |
@ -24,7 +24,6 @@ yshop基于当前流行技术组合: SpringBoot2+Jpa+MybatisPlus+SpringSecurit
#### 开源版本与VIP版本说明 #### 开源版本与VIP版本说明
### 开源版 ### 开源版
1.包括整个商城系统后台、数据库、api(只是简单的配置好模块); 1.包括整个商城系统后台、数据库、api(只是简单的配置好模块);
@ -41,7 +40,6 @@ yshop基于当前流行技术组合: SpringBoot2+Jpa+MybatisPlus+SpringSecurit
4、VIP为终身,【[详情请查看](https://gitee.com/guchengwuyue/yshopmall/wikis/pages?sort_id=1715823&doc_id=441578)】 4、VIP为终身,【[详情请查看](https://gitee.com/guchengwuyue/yshopmall/wikis/pages?sort_id=1715823&doc_id=441578)】
## 商城功能 ## 商城功能
* 一:商品模块:商品添加、规格设置,商品上下架等 * 一:商品模块:商品添加、规格设置,商品上下架等
@ -57,7 +55,6 @@ yshop基于当前流行技术组合: SpringBoot2+Jpa+MybatisPlus+SpringSecurit
- 可以具体查看演示地址查看当前版本已经完成的功能,不再絮叨啦 - 可以具体查看演示地址查看当前版本已经完成的功能,不再絮叨啦
#### 项目结构 #### 项目结构
项目采用分模块开发方式 项目采用分模块开发方式
- yshop-api 公众号(H5)API模块 - yshop-api 公众号(H5)API模块
@ -84,7 +81,7 @@ yshop基于当前流行技术组合: SpringBoot2+Jpa+MybatisPlus+SpringSecurit
</tr> </tr>
<tr> <tr>
<td><img src="https://images.gitee.com/uploads/images/2019/1121/230424_f01fca77_477893.png"/></td> <td><img src="https://images.gitee.com/uploads/images/2019/1121/230424_f01fca77_477893.png"/></td>
<td></td> <td><img src="https://images.gitee.com/uploads/images/2019/1127/211402_4103f8e0_477893.png"/></td>
</tr> </tr>
</table> </table>
<table> <table>
@ -104,11 +101,11 @@ yshop基于当前流行技术组合: SpringBoot2+Jpa+MybatisPlus+SpringSecurit
## 技术选型 ## 技术选型
* 1 后端使用技术 * 1 后端使用技术
* 1.1 SpringBoot * 1.1 SpringBoot2
* 1.2 mybatis、MyBatis-Plus * 1.2 mybatis、MyBatis-Plus
* 1.3 SpringSecurity * 1.3 SpringSecurity
* 1.4 JAP * 1.4 JPA
* 1.5 Druid1 * 1.5 Druid
* 1.6 Slf4j * 1.6 Slf4j
* 1.7 Fastjson * 1.7 Fastjson
* 1.8 JWT * 1.8 JWT
@ -120,6 +117,7 @@ yshop基于当前流行技术组合: SpringBoot2+Jpa+MybatisPlus+SpringSecurit
* 1.14 Lombok * 1.14 Lombok
* 1.15 Hutool * 1.15 Hutool
* 1.16 Mapstruct * 1.16 Mapstruct
* 1.17 Redisson
* 前端使用技术 * 前端使用技术
* 2.1 Vue 全家桶 * 2.1 Vue 全家桶
@ -133,7 +131,8 @@ yshop基于当前流行技术组合: SpringBoot2+Jpa+MybatisPlus+SpringSecurit
- 1.2版本分销功能已经发布 - 1.2版本分销功能已经发布
- 1.2.1增加了未付款订单取消功能库存销量退出、优惠券、积分功能,个人中心增加了积分流水 - 1.2.1增加了未付款订单取消功能库存销量退出、优惠券、积分功能,个人中心增加了积分流水
- 1.3版本新增拼团功能,已经发布 - 1.3版本新增拼团功能,已经发布
- 1.4版本规划:补充公众号功能、新增redisson队列、发布mpvue小程序 - 1.3.1版本手机端新增商户管理、后台新增统计
- 1.4版本规划:补充公众号功能、发布mpvue小程序
#### 反馈交流 #### 反馈交流

15
src/api/visits.js

@ -20,3 +20,18 @@ export function getChartData() {
method: 'get' method: 'get'
}) })
} }
export function gett() {
return request({
url: 'api/data/count',
method: 'get'
})
}
export function chart() {
return request({
url: 'api/data/chart',
method: 'get'
})
}

2
src/api/yxSystemConfig.js

@ -25,7 +25,7 @@ export function edit(data) {
export function get() { export function get() {
return request({ return request({
url: 'api/yxSystemConfig', url: 'api/yxSystemConfig?size=50',
method: 'get', method: 'get',
}) })
} }

42
src/views/dashboard/BarChart.vue

@ -6,6 +6,7 @@
import echarts from 'echarts' import echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme require('echarts/theme/macarons') // echarts theme
import { debounce } from '@/utils' import { debounce } from '@/utils'
import { chart } from '@/api/visits'
const animationDuration = 6000 const animationDuration = 6000
@ -26,7 +27,8 @@ export default {
}, },
data() { data() {
return { return {
chart: null chart: null,
day: [],num: []
} }
}, },
mounted() { mounted() {
@ -50,6 +52,17 @@ export default {
initChart() { initChart() {
this.chart = echarts.init(this.$el, 'macarons') this.chart = echarts.init(this.$el, 'macarons')
chart().then(res => {
var _info = res.chart,
day = [],
num = [];
_info.forEach(function(item) {
day.push(item.time);
num.push(item.num);
});
console.log(day,num)
this.chart.setOption({ this.chart.setOption({
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
@ -66,7 +79,7 @@ export default {
}, },
xAxis: [{ xAxis: [{
type: 'category', type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], data: day,
axisTick: { axisTick: {
alignWithLabel: true alignWithLabel: true
} }
@ -79,27 +92,20 @@ export default {
}], }],
series: [{ series: [{
name: 'pageA', name: 'pageA',
type: 'bar', type: 'line',
stack: 'vistors',
barWidth: '60%',
data: [79, 52, 200, 334, 390, 330, 220],
animationDuration
}, {
name: 'pageB',
type: 'bar',
stack: 'vistors',
barWidth: '60%',
data: [80, 52, 200, 334, 390, 330, 220],
animationDuration
}, {
name: 'pageC',
type: 'bar',
stack: 'vistors', stack: 'vistors',
barWidth: '60%', barWidth: '60%',
data: [30, 52, 200, 334, 390, 330, 220], data: num,
animationDuration animationDuration
}] }]
}) })
})
console.log('day:'+this.day)
} }
} }
} }

112
src/views/dashboard/BarChartT.vue

@ -0,0 +1,112 @@
<template>
<div :class="className" :style="{height:height,width:width}"/>
</template>
<script>
import echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme
import { debounce } from '@/utils'
import { chart } from '@/api/visits'
const animationDuration = 6000
export default {
props: {
className: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
height: {
type: String,
default: '300px'
}
},
data() {
return {
chart: null,
day: [],num: []
}
},
mounted() {
this.initChart()
this.__resizeHandler = debounce(() => {
if (this.chart) {
this.chart.resize()
}
}, 100)
window.addEventListener('resize', this.__resizeHandler)
},
beforeDestroy() {
if (!this.chart) {
return
}
window.removeEventListener('resize', this.__resizeHandler)
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(this.$el, 'macarons')
chart().then(res => {
var _info = res.chartT,
day = [],
num = [];
_info.forEach(function(item) {
day.push(item.time);
num.push(item.num);
});
console.log(day,num)
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: { //
type: 'shadow' // 线'line' | 'shadow'
}
},
grid: {
top: 10,
left: '2%',
right: '2%',
bottom: '3%',
containLabel: true
},
xAxis: [{
type: 'category',
data: day,
axisTick: {
alignWithLabel: true
}
}],
yAxis: [{
type: 'value',
axisTick: {
show: false
}
}],
series: [{
name: 'pageA',
type: 'line',
stack: 'vistors',
barWidth: '60%',
data: num,
animationDuration
}]
})
})
console.log('day:'+this.day)
}
}
}
</script>

45
src/views/dashboard/PanelGroup.vue

@ -3,68 +3,73 @@
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel"> <div class="card-panel">
<div class="card-panel-icon-wrapper icon-people"> <div class="card-panel-icon-wrapper icon-people">
<svg-icon icon-class="visits" class-name="card-panel-icon" /> <i class="el-icon-price-tag card-panel-icon"></i>
</div> </div>
<div class="card-panel-description"> <div class="card-panel-description">
<div class="card-panel-text">日流量</div> <div class="card-panel-text">今日成交额</div>
<count-to :start-val="0" :end-val="count.newVisits" :duration="2600" class="card-panel-num"/> <count-to :start-val="0" :end-val="count.todayPrice" :duration="2600" class="card-panel-num"/>
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel"> <div class="card-panel">
<div class="card-panel-icon-wrapper icon-message"> <div class="card-panel-icon-wrapper icon-message">
<svg-icon icon-class="ipvisits" class-name="card-panel-icon" /> <i class="el-icon-money card-panel-icon"></i>
</div> </div>
<div class="card-panel-description"> <div class="card-panel-description">
<div class="card-panel-text">日IP量</div> <div class="card-panel-text">昨日成交额</div>
<count-to :start-val="0" :end-val="count.newIp" :duration="3000" class="card-panel-num"/> <count-to :start-val="0" :end-val="count.proPrice" :duration="3000" class="card-panel-num"/>
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel"> <div class="card-panel">
<div class="card-panel-icon-wrapper icon-money"> <div class="card-panel-icon-wrapper icon-money">
<svg-icon icon-class="visits" class-name="card-panel-icon" /> <i class="el-icon-price-tag card-panel-icon"></i>
</div> </div>
<div class="card-panel-description"> <div class="card-panel-description">
<div class="card-panel-text">周流量</div> <div class="card-panel-text">上周成交额</div>
<count-to :start-val="0" :end-val="count.recentVisits" :duration="3200" class="card-panel-num"/> <count-to :start-val="0" :end-val="count.lastWeekPrice" :duration="3200" class="card-panel-num"/>
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel"> <div class="card-panel">
<div class="card-panel-icon-wrapper icon-shopping"> <div class="card-panel-icon-wrapper icon-shopping">
<svg-icon icon-class="ipvisits" class-name="card-panel-icon" /> <i class="el-icon-money card-panel-icon"></i>
</div> </div>
<div class="card-panel-description"> <div class="card-panel-description">
<div class="card-panel-text">周IP量</div> <div class="card-panel-text">本月成交额</div>
<count-to :start-val="0" :end-val="count.recentIp" :duration="3600" class="card-panel-num"/> <count-to :start-val="0" :end-val="count.monthPrice" :duration="3600" class="card-panel-num"/>
</div> </div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
<script> <script>
import CountTo from 'vue-count-to' import CountTo from 'vue-count-to'
import { get } from '@/api/visits' import { get,gett } from '@/api/visits'
export default { export default {
components: { components: {
CountTo CountTo
}, },
data() { data() {
return { return {
count: { newIp: 0, newVisits: 0, recentIp: 0, recentVisits: 0 } count: { todayPrice: 0, todayCount: 0, proPrice: 0, proCount: 0,
monthPrice: 0, monthCount: 0, lastWeekCount: 0, lastWeekPrice: 0 }
} }
}, },
mounted() { mounted() {
get().then(res => { gett().then(res => {
this.count.newIp = res.newIp this.count.todayPrice = res.todayPrice
this.count.newVisits = res.newVisits this.count.todayCount = res.todayCount
this.count.recentIp = res.recentIp this.count.proCount = res.proCount
this.count.recentVisits = res.recentVisits this.count.proPrice = res.proPrice
this.count.monthPrice = res.monthPrice
this.count.monthCount = res.monthCount
this.count.lastWeekCount = res.lastWeekCount
this.count.lastWeekPrice = res.lastWeekPrice
}) })
} }
} }

133
src/views/dashboard/PanelGroupT.vue

@ -0,0 +1,133 @@
<template>
<el-row :gutter="40" class="panel-group">
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel">
<div class="card-panel-icon-wrapper icon-people">
<i class="el-icon-s-order card-panel-icon"></i>
</div>
<div class="card-panel-description">
<div class="card-panel-text">今日订单数</div>
<count-to :start-val="0" :end-val="count.todayCount" :duration="2600" class="card-panel-num"/>
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel">
<div class="card-panel-icon-wrapper icon-message">
<i class="el-icon-s-order card-panel-icon"></i>
</div>
<div class="card-panel-description">
<div class="card-panel-text">昨日订单数</div>
<count-to :start-val="0" :end-val="count.proCount" :duration="3000" class="card-panel-num"/>
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel">
<div class="card-panel-icon-wrapper icon-money">
<i class="el-icon-s-order card-panel-icon"></i>
</div>
<div class="card-panel-description">
<div class="card-panel-text">上周订单数</div>
<count-to :start-val="0" :end-val="count.lastWeekCount" :duration="3200" class="card-panel-num"/>
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel">
<div class="card-panel-icon-wrapper icon-shopping">
<i class="el-icon-s-order card-panel-icon"></i>
</div>
<div class="card-panel-description">
<div class="card-panel-text">本月订单数</div>
<count-to :start-val="0" :end-val="count.monthCount" :duration="3600" class="card-panel-num"/>
</div>
</div>
</el-col>
</el-row>
</template>
<script>
import CountTo from 'vue-count-to'
import { get,gett } from '@/api/visits'
export default {
components: {
CountTo
},
data() {
return {
count: { todayPrice: 0, todayCount: 0, proPrice: 0, proCount: 0,
monthPrice: 0, monthCount: 0, lastWeekCount: 0, lastWeekPrice: 0 }
}
},
mounted() {
gett().then(res => {
this.count.todayPrice = res.todayPrice
this.count.todayCount = res.todayCount
this.count.proCount = res.proCount
this.count.proPrice = res.proPrice
this.count.monthPrice = res.monthPrice
this.count.monthCount = res.monthCount
this.count.lastWeekCount = res.lastWeekCount
this.count.lastWeekPrice = res.lastWeekPrice
})
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.panel-group {
margin-top: 18px;
.card-panel-col{
margin-bottom: 32px;
}
.card-panel {
height: 108px;
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>

26
src/views/home.vue

@ -2,28 +2,24 @@
<div class="dashboard-container"> <div class="dashboard-container">
<div class="dashboard-editor-container"> <div class="dashboard-editor-container">
<panel-group/> <panel-group/>
<panel-group-t/>
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
<line-chart/>
</el-row>
<el-row :gutter="32"> <el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="8"> <el-col :xs="24" :sm="24" :lg="12">
<div class="chart-wrapper"> <div class="chart-wrapper">
<raddar-chart/> <p>本月成交额</p>
<bar-chart/>
</div> </div>
</el-col> </el-col>
<el-col :xs="24" :sm="24" :lg="8"> <el-col :xs="24" :sm="24" :lg="12">
<div class="chart-wrapper"> <div class="chart-wrapper">
<p>本月订单数</p>
<pie-chart/> <pie-chart/>
</div> </div>
</el-col> </el-col>
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<bar-chart/>
</div>
</el-col>
</el-row> </el-row>
</div> </div>
</div> </div>
</template> </template>
@ -31,9 +27,9 @@
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import PanelGroup from './dashboard/PanelGroup' import PanelGroup from './dashboard/PanelGroup'
import PanelGroupT from './dashboard/PanelGroupT'
import LineChart from './dashboard/LineChart' import LineChart from './dashboard/LineChart'
import RaddarChart from './dashboard/RaddarChart' import PieChart from './dashboard/BarChartT'
import PieChart from './dashboard/PieChart'
import BarChart from './dashboard/BarChart' import BarChart from './dashboard/BarChart'
import { count } from '@/api/visits' import { count } from '@/api/visits'
@ -46,8 +42,8 @@ export default {
name: 'Dashboard', name: 'Dashboard',
components: { components: {
PanelGroup, PanelGroup,
PanelGroupT,
LineChart, LineChart,
RaddarChart,
PieChart, PieChart,
BarChart }, BarChart },
computed: { computed: {

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

@ -1,38 +1,23 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="150px"> <el-form ref="form" :model="form" :rules="rules" size="small" label-width="150px">
<!--<el-form-item label="公众号名称" >--> <el-form-item label="AppID" >
<!--<el-input v-model="form.wechat_name" style="width: 370px;"/>--> <el-input v-model="form.wechat_appid" style="width: 370px;"/>
<!--</el-form-item>--> </el-form-item>
<!--<el-form-item label="微信号" >--> <el-form-item label="AppSecret" >
<!--<el-input v-model="form.wechat_id" style="width: 370px;"/>--> <el-input v-model="form.wechat_appsecret" style="width: 370px;" type="password" />
<!--</el-form-item>-->
<!--<el-form-item label="公众号原始id" >-->
<!--<el-input v-model="form.wechat_sourceid" style="width: 370px;"/>-->
<!--</el-form-item>-->
<!--<el-form-item label="AppID" >-->
<!--<el-input v-model="form.wechat_appid" style="width: 370px;"/>-->
<!--</el-form-item>-->
<!--<el-form-item label="AppSecret" >-->
<!--<el-input v-model="form.wechat_appsecret" style="width: 370px;"/>-->
<!--</el-form-item>-->
<!--<el-form-item label="微信验证TOKEN" >-->
<!--<el-input v-model="form.wechat_token" style="width: 370px;"/>-->
<!--</el-form-item>-->
<!--<el-form-item label="消息加解密方式" >-->
<!--<el-input v-model="form.wechat_encode" style="width: 370px;"/>-->
<!--</el-form-item>-->
<!--<el-form-item label="EncodingAESKey" >-->
<!--<el-input v-model="form.wechat_encodingaeskey" style="width: 370px;"/>-->
<!--</el-form-item>-->
<el-form-item label="微信分享图片" >
<pic-upload v-model="form.wechat_share_img" style="width: 370px;"/>
</el-form-item> </el-form-item>
<el-form-item label="公众号二维码" > <el-form-item label="微信验证TOKEN" >
<pic-upload v-model="form.wechat_qrcode" style="width: 370px;"/> <el-input v-model="form.wechat_token" style="width: 370px;"/>
</el-form-item> </el-form-item>
<el-form-item label="公众号类型" > <el-form-item label="EncodingAESKey" >
<el-input v-model="form.wechat_type" style="width: 370px;"/> <el-input v-model="form.wechat_encodingaeskey" style="width: 370px;"/>
</el-form-item>
<el-form-item label="微信服务器地址" >
<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;"/>
</el-form-item> </el-form-item>
<el-form-item label="微信分享标题" > <el-form-item label="微信分享标题" >
<el-input v-model="form.wechat_share_title" style="width: 370px;"/> <el-input v-model="form.wechat_share_title" style="width: 370px;"/>
@ -40,14 +25,8 @@
<el-form-item label="微信分享简介" > <el-form-item label="微信分享简介" >
<el-input v-model="form.wechat_share_synopsis" style="width: 370px;" rows="5" type="textarea"/> <el-input v-model="form.wechat_share_synopsis" style="width: 370px;" rows="5" type="textarea"/>
</el-form-item> </el-form-item>
<el-form-item label="接口地址" >
<el-input v-model="form.api" style="width: 370px;"/>
</el-form-item>
<el-form-item label="公众号logo" >
<pic-upload v-model="form.wechat_avatar" style="width: 370px;"/>
</el-form-item>
<el-form-item label="" > <el-form-item label="" >
<el-button :loading="loading" type="primary" @click="doSubmit">提交</el-button> <el-button type="primary" @click="doSubmit">提交</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -83,7 +62,7 @@ export default {
wechat_type: '', wechat_type: '',
wechat_share_title: '', wechat_share_title: '',
wechat_share_synopsis: '', wechat_share_synopsis: '',
api: '', api: 'http://你的H5端域名/api/wechat/serve',
wechat_avatar: '' wechat_avatar: ''
}, },
rules: { rules: {

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

@ -0,0 +1,73 @@
<template>
<div class="app-container">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="150px">
<el-form-item label="AppID" >
<el-input v-model="form.wxpay_appId" style="width: 370px;"/>
</el-form-item>
<el-form-item label="商户id" >
<el-input v-model="form.wxpay_mchId" style="width: 370px;" type="password" />
</el-form-item>
<el-form-item label="商户密钥" >
<el-input v-model="form.wxpay_mchKey" style="width: 370px;" type="password" />
</el-form-item>
<el-form-item label="" >
<el-button type="primary" @click="doSubmit">提交</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import checkPermission from '@/utils/permission'
import initData from '@/mixins/initData'
import { del, add, get } from '@/api/yxSystemConfig'
import eForm from './form'
import picUpload from '@/components/pic-upload'
import { Message } from 'element-ui'
export default {
components: { eForm, picUpload },
mixins: [initData],
data() {
return {
delLoading: false,
form: {
wxpay_appId: '',
wxpay_mchId: '',
wxpay_mchKey: ''
},
rules: {
}
}
},
created() {
get().then(rese=>{
let newObj = {}
rese.content.map(function (key,value) {
let keyName = key.menuName;
newObj[keyName] = key.value
})
this.form = newObj
})
},
methods: {
checkPermission,
doSubmit() {
add(this.form).then(res => {
Message({message: '设置成功',type: 'success'})
}).catch(err => {
//this.loading = false
console.log(err.response.data.message)
})
},
}
}
</script>
<style scoped>
</style>

69
src/views/wechat/config/wxapp.vue

@ -0,0 +1,69 @@
<template>
<div class="app-container">
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="150px">
<el-form-item label="AppID" >
<el-input v-model="form.wxapp_appId" style="width: 370px;"/>
</el-form-item>
<el-form-item label="小程序密钥" >
<el-input v-model="form.wxapp_secret" style="width: 370px;" type="password" />
</el-form-item>
<el-form-item label="" >
<el-button type="primary" @click="doSubmit">提交</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import checkPermission from '@/utils/permission'
import initData from '@/mixins/initData'
import { del, add, get } from '@/api/yxSystemConfig'
import eForm from './form'
import picUpload from '@/components/pic-upload'
import { Message } from 'element-ui'
export default {
components: { eForm, picUpload },
mixins: [initData],
data() {
return {
delLoading: false,
form: {
wxapp_appId: '',
wxapp_secret: ''
},
rules: {
}
}
},
created() {
get().then(rese=>{
let newObj = {}
rese.content.map(function (key,value) {
let keyName = key.menuName;
newObj[keyName] = key.value
})
this.form = newObj
})
},
methods: {
checkPermission,
doSubmit() {
add(this.form).then(res => {
Message({message: '设置成功',type: 'success'})
}).catch(err => {
//this.loading = false
console.log(err.response.data.message)
})
},
}
}
</script>
<style scoped>
</style>

11
src/views/wechat/reply/index.vue

@ -85,7 +85,6 @@
<div class="col-sm-10 group-item"> <div class="col-sm-10 group-item">
<select class="form-control m-b" v-model="type" name="account"> <select class="form-control m-b" v-model="type" name="account">
<option value="text">文字消息</option> <option value="text">文字消息</option>
<option value="image">图片消息</option>
</select> </select>
</div> </div>
</el-col> </el-col>
@ -212,7 +211,7 @@ export default {
add({key:this.key,status:this.status,data:this.dataGroup[this.type],type:this.type}).then(function (res) { add({key:this.key,status:this.status,data:this.dataGroup[this.type],type:this.type}).then(function (res) {
Message({message: '设置成功',type: 'success'}) Message({message: '设置成功',type: 'success'})
}).catch(function(err){ }).catch(function(err){
Message({message: err,type: 'error'}) //Message({message: err,type: 'error'})
}) })
}, },
check: function(){ check: function(){
@ -226,14 +225,6 @@ export default {
if(dataGroup.image.src == '') if(dataGroup.image.src == '')
return this.returnError('请上传图片'); return this.returnError('请上传图片');
break; break;
case 'news':
if(dataGroup.news.length < 1)
return this.returnError('请选择图文消息');
break;
case 'voice':
if(dataGroup.voice.src == '')
return this.returnError('请上传声音');
break;
} }
return true; return true;
}, },

Loading…
Cancel
Save