|
@@ -22,14 +22,14 @@
|
|
|
<el-form-item label="商户平台地址" prop="serviceAddress" required>
|
|
|
<el-input v-model="form.serviceAddress" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="是否三方应用" required>
|
|
|
- <el-radio-group v-model="isThirdApp">
|
|
|
+ <el-form-item label="是否三方应用" prop="thirdAuth" required>
|
|
|
+ <el-radio-group v-model="form.thirdAuth">
|
|
|
<el-radio :label="false">否</el-radio>
|
|
|
<el-radio :label="true">是</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="isThirdApp" label="三方授权appId" prop="thirdAuthAppId" required>
|
|
|
- <el-input v-model="form.thirdAuthAppId" />
|
|
|
+ <el-form-item v-if="form.thirdAuth" label="三方授权token" prop="appAuthToken" required>
|
|
|
+ <el-input v-model="form.appAuthToken" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -49,14 +49,14 @@ import { add } from '@/api/merchant'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- isThirdApp: false,
|
|
|
form: {
|
|
|
id: null,
|
|
|
machineAppId: null,
|
|
|
name: null,
|
|
|
serviceAddress: null,
|
|
|
serviceAppId: null,
|
|
|
- thirdAuthAppId: null
|
|
|
+ thirdAuth: false,
|
|
|
+ appAuthToken: null
|
|
|
},
|
|
|
rules: {
|
|
|
machineAppId: [
|
|
@@ -71,7 +71,7 @@ export default {
|
|
|
serviceAppId: [
|
|
|
{ required: true, whitespace: true, message: '不能为空!', trigger: ['change', 'blur'] }
|
|
|
],
|
|
|
- thirdAuthAppId: [
|
|
|
+ appAuthToken: [
|
|
|
{ required: true, whitespace: true, message: '不能为空!', trigger: ['change', 'blur'] }
|
|
|
]
|
|
|
},
|
|
@@ -89,10 +89,8 @@ export default {
|
|
|
if (obj && Object.keys(obj).length > 0) {
|
|
|
this.form = obj
|
|
|
this.isEdit = true
|
|
|
- this.isThirdApp = !!this.form.thirdAuthAppId
|
|
|
} else {
|
|
|
this.isEdit = false
|
|
|
- this.isThirdApp = false
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -107,8 +105,8 @@ export default {
|
|
|
}
|
|
|
this.submitLoading = true
|
|
|
try {
|
|
|
- if (!this.isThirdApp) {
|
|
|
- this.form.thirdAuthAppId = null
|
|
|
+ if (!this.form.thirdAuth) {
|
|
|
+ this.form.appAuthToken = null
|
|
|
}
|
|
|
await add(this.form)
|
|
|
this.visible = false
|