|
@@ -87,6 +87,17 @@
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
+ <a-form-item
|
|
|
+ label="检测链接"
|
|
|
+ :labelCol="{ lg: { span: 2 }, sm: { span: 2 } }"
|
|
|
+ :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
|
|
|
+ >
|
|
|
+ <a-input
|
|
|
+ v-decorator="['click_track_url', { rules: [{ required: true, message: '请输入第三方检测链接' },{ validator: handleConfirmValue }] }]"
|
|
|
+ placeholder="请输入第三方检测链接"
|
|
|
+ >
|
|
|
+ </a-input>
|
|
|
+ </a-form-item>
|
|
|
</a-form>
|
|
|
</a-tab-pane>
|
|
|
</a-tabs>
|
|
@@ -124,6 +135,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleConfirmValue(rule, value, callback) {
|
|
|
+ if (/(http|https):\/\/([\w.]+\/?)\S*/.test(value) && value.length < 10000) {
|
|
|
+ callback()
|
|
|
+ } else {
|
|
|
+ callback('链接不能为空且开头为http://或https://,并且长度小于10000')
|
|
|
+ }
|
|
|
+ },
|
|
|
showData(item, type) {
|
|
|
this.list[item.key].imageList = []
|
|
|
if (type == 'video') {
|
|
@@ -164,16 +182,23 @@ export default {
|
|
|
// e.preventDefault()
|
|
|
// this.nextStep()
|
|
|
|
|
|
- var dataJson = this.list.map(item => {
|
|
|
- return {
|
|
|
- description: item.description,
|
|
|
- imageList: item.imageList.map((ele, index) => {
|
|
|
- return { image: ele.imageToken, name: index + 1 + '-' + item.name }
|
|
|
- }),
|
|
|
- videoList: item.videoList.photoId
|
|
|
+ e.preventDefault()
|
|
|
+ this.form.validateFields((err, values) => {
|
|
|
+ if (!err) {
|
|
|
+ var dataJson = this.list.map(item => {
|
|
|
+ return {
|
|
|
+ description: item.description,
|
|
|
+ image_tokens: item.imageList.map((ele, index) => {
|
|
|
+ return { image: ele.imageToken, name: index + 1 + '-' + item.name }
|
|
|
+ }),
|
|
|
+ photo_id: item.videoList.photoId
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ var params = { ...dataJson, ...values }
|
|
|
+ console.log(params)
|
|
|
}
|
|
|
})
|
|
|
- console.log(dataJson)
|
|
|
},
|
|
|
nextStep() {
|
|
|
var that = this
|