123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <template>
- <view class="container ask-container-message">
- <view class="advice-ipt-cont">
- <u-input v-model="advice_content" type="textarea" maxlength="100" :clearable="false" :placeholder="titlePlaceholder" height="300" class="ipt" />
- <text class="num-tag">{{ advice_content.length }}/100</text>
- </view>
- <view class="btn-cont" @click="submitHandle"> 提交 </view>
- <freeCharge class="free-charge" :isShowFreeBtn="isShowFree" />
- <Loading />
- </view>
- </template>
- <script>
- import { Reports } from "@/config/api.js";
- import freeCharge from "@/components/freeCharge";
- export default {
- data() {
- return {
- advice_content: "",
- id: "",
- type: "",
- };
- },
- components: {
- freeCharge,
- },
- computed: {
- titlePlaceholder() {
- return "请描述您的专题需求";
- },
- },
- methods: {
- async submitHandle() {
- if (!this.advice_content)
- return uni.showToast({
- title: "内容不能为空",
- icon: "none",
- duration: 2000,
- });
- const res = await Reports.collectionApplyAdd({
- Content: this.advice_content,
- });
- if (res.Ret === 200) {
- this.$util.toast("提交成功");
- this.advice_content = "";
- setTimeout(() => {
- uni.navigateBack();
- }, 500);
- }
- },
- },
- onLoad(option) {},
- };
- </script>
- <style scoped lang="scss">
- .ask-container-message {
- background-color: #fff;
- padding: 30rpx 34rpx;
- .advice-ipt-cont {
- height: 420rpx;
- border: 1rpx solid #d0cfd5;
- border-radius: 8rpx;
- padding: 30rpx;
- position: relative;
- font-size: 28rpx;
- color: #d0cfd5;
- .num-tag {
- position: absolute;
- bottom: 30rpx;
- right: 30rpx;
- }
- }
- .btn-cont {
- width: 500rpx;
- height: 52rpx;
- background: $uni-color-new;
- color: #fff;
- font-size: 24rpx;
- font-weight: 600;
- border-radius: 8rpx;
- margin: 80rpx auto;
- text-align: center;
- line-height: 52rpx;
- }
- }
- </style>
|