123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>意见反馈-爽客邦</title>
- <meta name="keywords" content="意见反馈-爽客邦">
- <meta name="description" content="意见反馈-爽客邦">
- <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
- <meta content="telephone=no" name="format-detection">
- <meta content="email=no" name="format-detection">
- <meta name="apple-mobile-web-app-title" content="意见反馈-爽客邦">
- <meta http-equiv="Cache-Control" content="no-siteapp">
- <link rel="stylesheet" href="./static/css/main.css">
- </head>
- <body class="bgc-back">
- <div id="app">
- <van-nav-bar class="user_rank_explan_title user_title_normal" left-arrow title="我要反馈" v-if="toptitleisshow" @click-left="goback">
- <template #left> <img src="./static/images/left.png" alt=""></template>
- </van-nav-bar>
- <div class="bt8f7f7f7 bb8f7f7f7 tc" v-cloak>
- <van-field v-model="message" rows="5" autosize type="textarea" maxlength="50" placeholder="请输入您的问题或者建议(字数不多余50个汉字)" show-word-limit @input="checkValue"></van-field>
- </div>
- <van-cell-group class="feedback" :border="false" v-cloak>
- <van-cell class="bb8f7f7f7" title="是否需要电话回复" value="">
- <template #right-icon>
- <van-checkbox v-model="needCall" icon-size=".426667rem" checked-color="#FF5A32"></van-checkbox>
- </template>
- </van-cell>
- <van-cell title="反馈类型:" :border="false">
- <template #label>
- <div class="pt16">
- <van-button class="border" v-for="item,index in typeTags" plain hairline size="small" @click="chooseTag(item)" :class="item.Id == curTag ? 'feedbackclickbtn' : ''">{{item.Name}}</van-button>
- </div>
- </template>
- </van-cell>
- </van-cell-group>
- <div class="pt16 pl16 pr16">
- <van-button class="border_radius8" type="primary" block :disabled="canSubmit ? false : true" color="#FF502A" @click="submitfeedback">提交</van-button>
- </div>
- </div>
- <script src="./static/js/klm-vv.min.js"></script>
- <script src="./static/js/klm-axios-config.js"></script>
- <script>
- // 通过 CDN 引入时不会自动注册 Lazyload 组件
- // 可以通过下面的方式手动注册
- Vue.use(vant.Lazyload);
-
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- toptitleisshow:false,
- active: 0,
- canSubmit: false,
- message: '',
- needCall: true,
- curTag: 0,
- typeTags: [
- ],
- };
- },
- created() {
- this.toptitleisshow = toptitleisshow;
- this.getfeedtype();
- },
- watch:{
- message:function(){
- this.checkValue();
- }
- },
- methods: {
- chooseTag(item){
- this.curTag = item.Id;
- },
- checkValue(){
- this.canSubmit = (this.message !== '' ) ? true : false;
- },
- //- 获取反馈类型
- async getfeedtype(){
- const res = await getRequest('/api/v1/userbackkind/list',JSON.stringify({value:'',PageNum:1,PageSize:10}));
- if(res.status === '1') {
- if(res.data.length !== 0){
- this.typeTags = res.data;
- }else{
- this.typeTags = [{Id:1,Name:'基础类型'}];
- };
- this.curTag = this.typeTags[0].Id;
- }
- },
- //- async submitfeedback(){
- //- const Id = PublicLib.getCookieInfo('userId');
- //- this.needCall = this.needCall? 1:0;
- //- const res = await postRequest('/api/v1/userback/add',JSON.stringify({UserId:Id,Content:this.message,IsPhoneCallBack:this.needCall,BackKind:this.curTag}));
- //- if(res.status === 1) tips('提交反馈成功!')
- //- },
- submitfeedback:undebounce(async function(){
- if(this.message === '') return tips('请填写反馈内容');
- const Id = PublicLib.getCookieInfo('userId');
- this.needCall = this.needCall? 1:0;
- const res = await postRequest('/api/v1/userback/add',JSON.stringify({UserId:Id,Content:this.message,IsPhoneCallBack:this.needCall,BackKind:this.curTag}));
- if(res.status !== '1') return tips(res.info);
- tips('提交反馈成功!');
- this.message = '';
- }),
- goback(){
- PublicLib.GoBack({Level:1});
- }
- }
- });
- </script>
- </body>
- </html>
|