|
|
@ -52,9 +52,10 @@ |
|
|
|
<!-- 5. 价格 --> |
|
|
|
<uv-form-item label="价格" prop="price" required> |
|
|
|
<view class="price-container"> |
|
|
|
<uv-input v-model="form.price" type="text" placeholder="请描述价格,如:面议、1000元/年等" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;flex:1;"></uv-input> |
|
|
|
<uv-input v-model="form.price" type="digit" placeholder="请输入价格" customStyle="border-radius: 5px;margin-top:5px;background-color: #f5f5f5;padding:5px 10px;flex:1;"></uv-input> |
|
|
|
<text class="price-unit">元</text> |
|
|
|
</view> |
|
|
|
<view class="input-tip">开放式填写,可填写具体价格或"面议"等</view> |
|
|
|
<view class="input-tip">请输入数字,支持小数点后两位</view> |
|
|
|
</uv-form-item> |
|
|
|
|
|
|
|
<!-- 6. 资源介绍 --> |
|
|
@ -89,7 +90,10 @@ |
|
|
|
本人同意授权我平台发布信息、代理销售等。本人承诺所提供的信息真实有效,并同意平台进行相关推广和销售代理。 |
|
|
|
</text> |
|
|
|
</view> |
|
|
|
<uv-checkbox v-model="form.agreeProtocol" shape="circle" activeColor="#1EC77A"> |
|
|
|
<uv-checkbox v-model="form.agreeProtocol" |
|
|
|
name="1" |
|
|
|
shape="circle" activeColor="#1EC77A" |
|
|
|
@change="onAgreementChange"> |
|
|
|
<text class="agreement-label">我已阅读并同意代理协议</text> |
|
|
|
</uv-checkbox> |
|
|
|
</view> |
|
|
@ -144,7 +148,8 @@ |
|
|
|
{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: ['blur', 'change'] } |
|
|
|
], |
|
|
|
price: [ |
|
|
|
{ required: true, message: '请输入价格信息', trigger: ['blur', 'change'] } |
|
|
|
{ required: true, message: '请输入价格', trigger: ['blur', 'change'] }, |
|
|
|
{ pattern: /^\d+(\.\d{1,2})?$/, message: '请输入正确的价格格式', trigger: ['blur', 'change'] } |
|
|
|
], |
|
|
|
description: [ |
|
|
|
{ required: true, message: '请输入资源介绍', trigger: ['blur', 'change'] }, |
|
|
@ -248,6 +253,12 @@ |
|
|
|
this.$refs.picker.open(); |
|
|
|
}, |
|
|
|
|
|
|
|
// 代理协议状态变化 |
|
|
|
onAgreementChange(e) { |
|
|
|
console.log('代理协议状态变化:', e); |
|
|
|
this.form.agreeProtocol = e; |
|
|
|
}, |
|
|
|
|
|
|
|
confirm(e) { |
|
|
|
let that = this |
|
|
|
let {indexs,value,values} = e |
|
|
@ -257,6 +268,7 @@ |
|
|
|
|
|
|
|
// 提交表单 |
|
|
|
submit() { |
|
|
|
console.log(this.form.agreeProtocol); |
|
|
|
// 检查是否同意代理协议 |
|
|
|
if (!this.form.agreeProtocol) { |
|
|
|
uni.showToast({ |
|
|
@ -437,6 +449,13 @@ |
|
|
|
gap: 10rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.price-unit { |
|
|
|
font-size: 26rpx; |
|
|
|
color: #1EC77A; |
|
|
|
font-weight: bold; |
|
|
|
margin-left: 10rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.char-count { |
|
|
|
font-size: 22rpx; |
|
|
|
color: #999; |
|
|
@ -476,4 +495,4 @@ |
|
|
|
color: #333; |
|
|
|
margin-left: 10rpx; |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |