You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
2.2 KiB
81 lines
2.2 KiB
<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="小程序验证TOKEN"> |
|
<el-input v-model="form.wechat_ma_token" style="width: 370px;" /> |
|
</el-form-item> |
|
<el-form-item label="小程序EncodingAESKey"> |
|
<el-input v-model="form.wechat_ma_encodingaeskey" style="width: 370px;" /> |
|
</el-form-item> |
|
<el-form-item label="微信服务器地址"> |
|
<el-input v-model="form.wxapi" :disabled="true" style="width: 370px;" /> |
|
</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/crud' |
|
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: '', |
|
wechat_ma_token: '', |
|
wechat_ma_encodingaeskey: '', |
|
wxapi: 'http://你的H5api端域名/api/wxapp/serve', |
|
}, |
|
rules: { |
|
} |
|
} |
|
}, |
|
created() { |
|
get().then(rese => { |
|
const that = this |
|
rese.content.map(function(key, value) { |
|
const keyName = key.menuName |
|
const newValue = key.value |
|
if(keyName in that.form){ |
|
that.form[keyName] = newValue |
|
} |
|
}) |
|
}) |
|
}, |
|
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>
|
|
|