|
@@ -77,7 +77,7 @@
|
|
|
/>
|
|
|
<view>无录音(录音时长超过三分钟自动结束)</view>
|
|
|
|
|
|
- <view class="black-btn" style="margin-top:100rpx">转移问题</view>
|
|
|
+ <view class="black-btn" style="margin-top:100rpx" @click.stop="showRemoveQ=true">转移问题</view>
|
|
|
<view class="black-btn" style="margin-top:50rpx" @click.stop="stopQuestion.show=true">终止问答</view>
|
|
|
</view>
|
|
|
<!-- <view class="record-time" v-else>{{ audioTime }}</view> -->
|
|
@@ -273,20 +273,24 @@
|
|
|
></textarea>
|
|
|
</view>
|
|
|
</van-dialog>
|
|
|
+ <!-- 转移问答弹窗 -->
|
|
|
+ <removeQuestionDig :show="showRemoveQ" :qid="qid" @close="showRemoveQ=false" ></removeQuestionDig>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import mixin from "../mixin/questionMixin";
|
|
|
-import { apiReplayAsk, apiGetQuestion, apiSetRead,apiCountAudioClick } from "@/api/question";
|
|
|
+import { apiReplayAsk, apiGetQuestion, apiSetRead,apiCountAudioClick,apiQuestionStop } from "@/api/question";
|
|
|
import { apiApplyPermission} from '@/api/user';
|
|
|
import {apiGetSceneToParams} from "../api/common.js"
|
|
|
import { uploadAudioToServer } from "@/utils/upload";
|
|
|
import audioBox from '@/components/audioBox/audioBox.vue'
|
|
|
+import removeQuestionDig from './components/removeQuestionDig.vue'
|
|
|
export default {
|
|
|
mixins: [mixin],
|
|
|
components:{
|
|
|
- audioBox
|
|
|
+ audioBox,
|
|
|
+ removeQuestionDig
|
|
|
},
|
|
|
computed:{
|
|
|
showAudioPop(){//是否显示音频弹窗
|
|
@@ -311,6 +315,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ qid:0,
|
|
|
questionItem: null /* {
|
|
|
recordStatus: 1, //1:未录音;2:正在录音;3:已暂停;4:完成录音
|
|
|
permission_info:{
|
|
@@ -351,7 +356,7 @@ export default {
|
|
|
show:false,
|
|
|
reason:'',
|
|
|
},//终止问答
|
|
|
-
|
|
|
+ showRemoveQ:false,//展示转移问题弹窗
|
|
|
};
|
|
|
},
|
|
|
async onLoad(options) {
|
|
@@ -364,6 +369,7 @@ export default {
|
|
|
obj=JSON.parse(res.data)
|
|
|
}
|
|
|
}
|
|
|
+ this.qid=obj.id || options.id
|
|
|
this.getQuestionItem(obj.id || options.id);
|
|
|
},
|
|
|
onShow(){
|
|
@@ -844,8 +850,35 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 终止问答
|
|
|
- handleConfirmStopQuestion(){
|
|
|
+ async handleConfirmStopQuestion(){
|
|
|
console.log('stop question');
|
|
|
+ if(!this.stopQuestion.reason){
|
|
|
+ uni.showToast({
|
|
|
+ title:"请填写终止理由",
|
|
|
+ icon:"none"
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const res=await apiQuestionStop({
|
|
|
+ community_question_id:this.questionItem.community_question_id,
|
|
|
+ reason:this.stopQuestion.reason
|
|
|
+ })
|
|
|
+ if(res.code===200){
|
|
|
+ uni.showToast({
|
|
|
+ title:"成功终止",
|
|
|
+ icon:"success"
|
|
|
+ })
|
|
|
+ setTimeout(() => {
|
|
|
+ uni.navigateBack({
|
|
|
+ delta:1,
|
|
|
+ fail(){
|
|
|
+ uni.switchTab({
|
|
|
+ url: '/pages/question/question'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }, 1500);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
};
|