Commit 7d3bb57e by xinla

新增应用接口修改

1 parent bb6fd7ec
...@@ -7,7 +7,7 @@ const service = window.CONFIG.services.wecom + '/weapp' ...@@ -7,7 +7,7 @@ const service = window.CONFIG.services.wecom + '/weapp'
*/ */
export function getList() { export function getList() {
return request({ return request({
url: service + '/list', url: service + '/list'
}) })
} }
...@@ -30,6 +30,15 @@ export function update(data) { ...@@ -30,6 +30,15 @@ export function update(data) {
return request({ return request({
url: service + '/updateWeApp', url: service + '/updateWeApp',
method: 'put', method: 'put',
data, data
})
}
// 添加
export function add(data) {
return request({
url: service + '/addWeApp',
method: 'post',
data
}) })
} }
<script> <script>
import { getList, update } from '@/api/appTool/selfApp' import { getList, update, add } from '@/api/appTool/selfApp'
// import clipboard from "clipboard"; // import clipboard from "clipboard";
export default { export default {
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
submit() { submit() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
update(this.form) ;(this.form.id ? update : add)(this.form)
.then(() => { .then(() => {
this.msgSuccess('操作成功') this.msgSuccess('操作成功')
this.dialogVisible = false this.dialogVisible = false
...@@ -262,6 +262,8 @@ export default { ...@@ -262,6 +262,8 @@ export default {
display: flex; display: flex;
border: 1px solid #eee; border: 1px solid #eee;
margin: 0 20px 20px 0; margin: 0 20px 20px 0;
background: #fff;
border-radius: 6px;
.el-image { .el-image {
margin-right: 10px; margin-right: 10px;
width: 50px; width: 50px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!