1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <template>
- <view class="survey-box">
- <!-- <textarea :value="surveyText" placeholder="请详述您的调研需求" placeholder-style="color:#999999"
- :maxlength="100" /> -->
- <view class="survey-textArea">
- <van-field :value="surveyText" type="textarea" :maxlength="100" placeholder="请详述您的调研需求"
- :border="false" :show-word-limit="true" :autosize="{minHeight: 100}" @change="inputChange($event)"></van-field>
- </view>
- <view @click="submit" class="submit">提交</view>
- </view>
- </template>
- <script>
- import {leafletUrl} from '@/config/config'
- import {purchaserApi} from "@/config/modules/purchaser.js"
- export default {
- data() {
- return {
- surveyText:''
- }
- },
- methods: {
- inputChange(e){
- this.surveyText=e.detail
- },
- submit(){
- // console.log(this.surveyText);
- if(!this.surveyText){
- uni.showToast({
- title:'调研需求不能为空',
- icon:'none'
- })
- return
- }
- purchaserApi.purchaserSurveySubmit({Content:this.surveyText}).then(res=>{
- if (res.Ret === 200) {
- uni.showToast({
- title:'提交成功,请等待销售与您联系',
- duration:2000,
- icon:'none'
- })
- setTimeout(()=>{
- uni.navigateBack()
- },2000)
- }
- })
- }
- },
- onLoad(option) {
- let id = option.Id || 0
- this.url=`${leafletUrl}?Id=${id}#wechat_redirect`
- console.log(this.url);
- }
- }
- </script>
- <style lang="scss" scoped>
- .survey-box{
- padding: 30rpx 20rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- .survey-textArea{
- width: 100%;
- border: solid 2rpx #999999;
- border-radius: 16rpx;
- padding: 6rpx;
- box-sizing: border-box;
- margin-bottom: 40rpx;
- }
- .submit{
- width: 240rpx;
- height: 60rpx;
- background: linear-gradient(90deg, #0151ff 0%, #01b9ff 100%);
- color: white;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- }
- </style>
|