|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
- <u-form :model="form">
|
|
|
+ <u-form :model="form" ref="uForm">
|
|
|
<u-card :border="false" padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)" border-radius="20" :show-foot="false">
|
|
|
<view slot="head">
|
|
|
<view class="u-flex">
|
|
@@ -51,12 +51,9 @@
|
|
|
已选合作品牌
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view slot="body">
|
|
|
- <view class="u-flex u-flex-wrap u-row-around">
|
|
|
- <u-image width="40%" height="100rpx" src="../../static/sailun/anyu.png" style="margin:10rpx;"></u-image>
|
|
|
- <u-image width="40%" height="100rpx" src="../../static/sailun/anyu.png" style="margin:10rpx;"></u-image>
|
|
|
- <u-image width="40%" height="100rpx" src="../../static/sailun/anyu.png" style="margin:10rpx;"></u-image>
|
|
|
- <u-image width="40%" height="100rpx" src="../../static/sailun/anyu.png" style="margin:10rpx;"></u-image>
|
|
|
+ <view slot="body" style="display:flex;width:100%;flex-flow: wrap;justify-content: space-around;">
|
|
|
+ <view v-for="(item,index) in querybrandList" :key="index" style="width: 250rpx;">
|
|
|
+ <u-image width="250rpx" :src="item.logUrl" mode="widthFix"></u-image>
|
|
|
</view>
|
|
|
</view>
|
|
|
</u-card>
|
|
@@ -77,7 +74,7 @@
|
|
|
{{item.name}}
|
|
|
</view>
|
|
|
</u-form-item>
|
|
|
- <u-form-item prop="tasklist">
|
|
|
+ <u-form-item prop="taskNum">
|
|
|
<view style="margin-right: 10rpx;">
|
|
|
<u-icon name="order" size="36"></u-icon>
|
|
|
</view>
|
|
@@ -90,11 +87,10 @@
|
|
|
</view>
|
|
|
|
|
|
</u-card>
|
|
|
-
|
|
|
- <u-form-item prop="protocol" :border-bottom="false">
|
|
|
+ <u-form-item :border-bottom="false">
|
|
|
<view style="margin:0 30rpx;">
|
|
|
<u-checkbox-group>
|
|
|
- <u-checkbox v-model="form.protocol">同意《用户协议》及《隐私政策》</u-checkbox>
|
|
|
+ <u-checkbox v-model="protocol">同意《用户协议》及《隐私政策》</u-checkbox>
|
|
|
</u-checkbox-group>
|
|
|
</view>
|
|
|
</u-form-item>
|
|
@@ -118,7 +114,6 @@
|
|
|
loading: false,
|
|
|
form: {
|
|
|
cooperation: '',
|
|
|
- protocol: false,
|
|
|
},
|
|
|
formData: '',
|
|
|
dataUrl: '',
|
|
@@ -126,17 +121,25 @@
|
|
|
checkedAgentlist: [],
|
|
|
taskList: [],
|
|
|
tasknameList: [],
|
|
|
- brandAgentLvQueryList: []
|
|
|
+ brandAgentLvQueryList: [],
|
|
|
+ rules: {
|
|
|
+ cooperation: [{
|
|
|
+ required: true,
|
|
|
+ message: '请选择品牌',
|
|
|
+ trigger: 'blur,change'
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ protocol: false,
|
|
|
+ querybrandList:[]
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
uni.$on('formData', (data) => {
|
|
|
- this.formData =data.formData
|
|
|
- this.dataUrl=data.dataUrl
|
|
|
+ this.formData = data.formData
|
|
|
+ this.dataUrl = data.dataUrl
|
|
|
})
|
|
|
- },
|
|
|
- mounted() {
|
|
|
this.getAgentArea()
|
|
|
+ this.getQuerybrand()
|
|
|
this.getTasknum()
|
|
|
},
|
|
|
methods: {
|
|
@@ -148,6 +151,9 @@
|
|
|
"area": this.formData.district,
|
|
|
"city": this.formData.city,
|
|
|
"province": this.formData.province,
|
|
|
+ // "area": "市北区",
|
|
|
+ // "city": "青岛市",
|
|
|
+ // "province": "山东省",
|
|
|
"spart": "10",
|
|
|
"vkorg": "8100",
|
|
|
"vtweg": "10"
|
|
@@ -182,6 +188,24 @@
|
|
|
|
|
|
})
|
|
|
},
|
|
|
+ getQuerybrand(){
|
|
|
+ request({
|
|
|
+ url: '/sailun/appStoreBasicInfo/queryBrand',
|
|
|
+ method: 'get',
|
|
|
+ data: {},
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 0) {
|
|
|
+ this.querybrandList=res.data.data
|
|
|
+ }
|
|
|
+ if (res.data.code == 500) {
|
|
|
+ this.$u.toast(res.data.msg);
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.log(err)
|
|
|
+ }).finally(() => {
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
getTasknum() {
|
|
|
request({
|
|
|
url: '/sailun/appStoreBasicInfo/enum',
|
|
@@ -224,6 +248,14 @@
|
|
|
this.form.tasklist = e[0].label;
|
|
|
},
|
|
|
submit() {
|
|
|
+ this.$refs.uForm.validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ if(!this.protocol)return this.$u.toast('请勾选协议');
|
|
|
+ console.log('验证通过');
|
|
|
+ } else {
|
|
|
+ console.log('验证失败');
|
|
|
+ }
|
|
|
+ });
|
|
|
this.brandAgentLvQueryList = this.checkedAgentlist.reduce((res, item) => {
|
|
|
res.push({
|
|
|
agent_id: item.agent_id,
|
|
@@ -279,6 +311,9 @@
|
|
|
this.loading = false
|
|
|
})
|
|
|
},
|
|
|
+ },
|
|
|
+ onReady() {
|
|
|
+ this.$refs.uForm.setRules(this.rules);
|
|
|
}
|
|
|
}
|
|
|
</script>
|