|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<a-modal
|
|
|
- title="添加应用"
|
|
|
+ title="编辑应用"
|
|
|
:visible="application"
|
|
|
@ok="handleOk"
|
|
|
:confirmLoading="confirmLoading"
|
|
@@ -42,7 +42,7 @@
|
|
|
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
:wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
|
|
|
>
|
|
|
- <a-radio-group v-model="platform">
|
|
|
+ <a-radio-group v-model="platform" disabled>
|
|
|
<a-radio value="1">应用下载</a-radio>
|
|
|
<a-radio value="2">网页游戏</a-radio>
|
|
|
</a-radio-group>
|
|
@@ -94,7 +94,7 @@
|
|
|
:wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
|
|
|
>
|
|
|
<a-input
|
|
|
- placeholder="请填写应用链接"
|
|
|
+ placeholder="请填写应用下载链接"
|
|
|
v-decorator="[
|
|
|
'url',
|
|
|
{
|
|
@@ -106,7 +106,7 @@
|
|
|
|
|
|
<a-form-item
|
|
|
label="应用包名"
|
|
|
- v-if="uploadType == '2'"
|
|
|
+ v-if="uploadType == '2' && appType == 'android'"
|
|
|
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
:wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
|
|
|
>
|
|
@@ -153,9 +153,7 @@
|
|
|
@overUpload="overUpload"
|
|
|
:size="100"
|
|
|
></uploadFile>
|
|
|
- <p class="upload-txt-rules">
|
|
|
- 文件格式:支持上传png/jpg/jpeg图片,尺寸450*450,小于100kb
|
|
|
- </p>
|
|
|
+ <p class="upload-txt-rules">文件格式:支持上传png/jpg/jpeg图片,尺寸450*450,小于100kb</p>
|
|
|
</a-form-item>
|
|
|
|
|
|
<a-form-item
|
|
@@ -181,29 +179,27 @@
|
|
|
</a-form-item>
|
|
|
</a-form-item> -->
|
|
|
<a-form-item
|
|
|
- label="隐私政策是否接入"
|
|
|
- :labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
- :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
|
|
|
- v-if="uploadType == '2'"
|
|
|
+ label=""
|
|
|
+ :labelCol="{ span: 5 }"
|
|
|
+ :wrapperCol="{ xs: { span: 24 }, sm: { span: 16 }, offset: 5 }"
|
|
|
+ v-if="uploadType == '2' && appType == 'android'"
|
|
|
>
|
|
|
- <a-radio-group
|
|
|
+ <a-checkbox-group
|
|
|
v-decorator="[
|
|
|
'useSdk',
|
|
|
{
|
|
|
- rules: [{ required: true }],
|
|
|
- initialValue: 0,
|
|
|
+ rules: [{ required: true, message: '安卓应用已接入快手广告监测SDK必选' }],
|
|
|
},
|
|
|
]"
|
|
|
>
|
|
|
- <a-radio :value="0">未接入</a-radio>
|
|
|
- <a-radio :value="1">已接入</a-radio>
|
|
|
- </a-radio-group>
|
|
|
+ <a-checkbox :value="0"> 该应用已接入快手广告监测SDK </a-checkbox>
|
|
|
+ </a-checkbox-group>
|
|
|
</a-form-item>
|
|
|
<a-form-item
|
|
|
label="隐私政策链接"
|
|
|
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
:wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
|
|
|
- v-if="uploadType == '2'"
|
|
|
+ v-if="uploadType == '2' && appType == 'android'"
|
|
|
>
|
|
|
<a-input
|
|
|
v-decorator="[
|
|
@@ -212,7 +208,7 @@
|
|
|
rules: [{ required: true, message: '请填写隐私政策链接' }, { validator: handleConfirmValue }],
|
|
|
},
|
|
|
]"
|
|
|
- placeholder="请填写监测链接"
|
|
|
+ placeholder="请填写隐私政策链接"
|
|
|
/>
|
|
|
</a-form-item>
|
|
|
|
|
@@ -220,7 +216,7 @@
|
|
|
label="监测链接"
|
|
|
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
|
|
|
:wrapperCol="{ xs: { span: 24 }, sm: { span: 16 } }"
|
|
|
- v-if="uploadType == '2'"
|
|
|
+ v-if="uploadType == '2' && appType == 'android'"
|
|
|
>
|
|
|
<a-input
|
|
|
v-decorator="[
|
|
@@ -506,24 +502,33 @@ export default {
|
|
|
getAction('/kuaishouAppPackage/queryById', { id: val.id }).then((res) => {
|
|
|
// 'appIconUrl',
|
|
|
if (res.success) {
|
|
|
- res.result.platform = res.result.platform > 2 ? res.result.platform - 2 + '' : res.result.platform + ''
|
|
|
this.fileUrl = res.result.appIconUrl
|
|
|
this.appType = res.result.platform > 2 ? 'ios' : 'android'
|
|
|
+ res.result.platform = res.result.platform > 2 ? res.result.platform - 2 + '' : res.result.platform + ''
|
|
|
+ res.result.useSdk = res.result.useSdk ? (res.result.useSdk == 0 ? [] : [0]) : null
|
|
|
this.projectId = res.result.projectId
|
|
|
- this.form.setFieldsValue(
|
|
|
- pick(
|
|
|
- res.result,
|
|
|
- 'url',
|
|
|
- 'appVersion',
|
|
|
- 'packageName',
|
|
|
- 'platform',
|
|
|
- 'appPrivacyUrl',
|
|
|
- 'useSdk',
|
|
|
- 'trackUrl',
|
|
|
- 'appName',
|
|
|
- 'projectName'
|
|
|
- )
|
|
|
- )
|
|
|
+ if (this.appType == 'android') {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.form.setFieldsValue(
|
|
|
+ pick(
|
|
|
+ res.result,
|
|
|
+ 'url',
|
|
|
+ 'appVersion',
|
|
|
+ 'packageName',
|
|
|
+ 'platform',
|
|
|
+ 'appPrivacyUrl',
|
|
|
+ 'useSdk',
|
|
|
+ 'trackUrl',
|
|
|
+ 'appName',
|
|
|
+ 'projectName'
|
|
|
+ )
|
|
|
+ )
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.form.setFieldsValue(pick(res.result, 'url', 'appVersion', 'platform', 'appName', 'projectName'))
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -594,6 +599,7 @@ export default {
|
|
|
} else {
|
|
|
this.url.insertTemplateUrl = '/kuaishouAppPackage/fillInLink'
|
|
|
params = { ...values }
|
|
|
+ params.useSdk = params.useSdk.length > 0 ? 1 : 0
|
|
|
params.id = this.appId
|
|
|
params.projectId = this.projectId
|
|
|
params.appIconUrl = this.fileUrl
|