limingtao 11 months ago
parent da1344605a
commit cbe8166381
  1. 4
      common/globalJs/globalJs.js
  2. 4
      components/bottom-button/three2.vue
  3. 6
      manifest.json
  4. 1654
      pages/index/detail.vue
  5. 105
      pages/knowledge/index.vue

@ -2,8 +2,8 @@
// #ifdef APP-PLUS || MP
// const baseUrl = "http://116.62.210.143:9002";
// const baseUrl = "http://118.89.79.160:8800/HiatmpPro";
const baseUrl = "http://49.235.207.167:8800/HiatmpPro";
// const baseUrl = "http://219.147.31.25:30001/tht-app-api/HiatmpPro";
// const baseUrl = "http://49.235.207.167:8800/HiatmpPro";
const baseUrl = "http://219.147.31.25:30001/tht-app-api/HiatmpPro";
const chatUrl = "http://219.147.31.25:30001/hitap";
// #endif
// #ifdef H5

@ -119,7 +119,7 @@ export default {
box-sizing: border-box;
text-align: center;
border-radius: 10rpx;
line-height: 60rpx;
line-height: 75rpx;
.font {
position: absolute;
top: 0;
@ -128,7 +128,7 @@ export default {
width: 100%;
height: 100%;
text-align: center;
line-height: 60rpx;
line-height: 75rpx;
}
// cover-image {
// width: 100%;

@ -1,6 +1,6 @@
{
"name" : "隐患排查",
"appid" : "__UNI__79F6C5E",
"appid" : "__UNI__68B38F3",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
@ -135,8 +135,8 @@
"https" : false,
"proxy" : {
"/HiatmpPro" : {
"target" : "http://49.235.207.167:8800",
// "target" : "http://219.147.31.25:30001/tht-app-api",
// "target" : "http://49.235.207.167:8800",
"target" : "http://219.147.31.25:30001/tht-app-api",
"changeOrigin" : true,
"secure" : false,
"pathRewrite" : {

File diff suppressed because it is too large Load Diff

@ -1,9 +1,10 @@
<template>
<view class="detail">
<scroll-view @scroll="handleScroll" scroll-y="true" :scroll-top="scrollTop" :style="{
<view class="detail" @touchmove="handleTouchMove">
<scroll-view scroll-y="true" :scroll-top="scrollTop" :style="{
height: isExpanded ? 'calc(100% - 1rpx)' : 'calc(100% - 1rpx)',
}" class="chatlist" :class="{ 'chatlist-wrapper-expanded': isExpanded }" id="scrollView" ref="scrollView"
@click="clickContent">
@click="clickContent"
>
<view v-if="!msgList.length" class="helloContent">
<image :src="$.imgSrc + '/left_user.png'" class="imgLeft" />
<view class="titleBox">
@ -26,7 +27,8 @@
</view>
</view>
</view>
<view :class="['bar', item.answerId == '0' ? 'currAnswer' : '']" v-for="item in msgList" :key="item.id">
<view :class="['bar', item.answerId == '0' ? 'currAnswer' : '']" v-for="(item,index) in msgList"
:key="item.id">
<!--<image :src="item.answerId == '0' ? $.imgSrc + '/self.png' : $.imgSrc + '/left_user.png'" class="img" />-->
<image :src="
item.answerId == '0'
@ -38,15 +40,13 @@
<!-- <ua-markdown :source="mdvalue" /> -->
<view class="icon" v-show="item.answerId != '0' && item.isOver && item.isSuccess">
<uni-icons
:type="iconsType == '' ? 'hand-up' : (iconsType == 'handUp' ? 'hand-up-filled' : 'hand-up')"
:color="iconsType == 'handUp' ? '#FFD131' : ''"
size="22"
@click="clickIcon('handUp', item.qaId)">
:type="item.iconsType == '' ? 'hand-up' : (item.iconsType == 'handUp' ? 'hand-up-filled' : 'hand-up')"
:color="item.iconsType == 'handUp' ? '#FFD131' : ''" size="22"
@click="clickIcon('handUp', item.qaId,index)">
</uni-icons>
<uni-icons
:type="iconsType == '' ? 'hand-down' : (iconsType == 'handDown' ? 'hand-down-filled' : 'hand-down')"
size="22"
@click="clickIcon('handDown', item.qaId)">
:type="item.iconsType == '' ? 'hand-down' : (item.iconsType == 'handDown' ? 'hand-down-filled' : 'hand-down')"
size="22" @click="clickIcon('handDown', item.qaId,index)">
</uni-icons>
</view>
</view>
@ -139,6 +139,7 @@
lastScrollTop: 0, //
temp: 0,
iconsType: '',
isUserScrolling: false,
};
},
onLoad() {
@ -166,27 +167,32 @@
}
},
methods: {
async clickIcon(type, qaId) {
if(this.iconsType == '') {
async clickIcon(type, qaId, index) {
if (this.iconsType == '') {
this.iconsType = type
this.$set(this.msgList[index], 'iconsType', type)
} else {
if(this.iconsType == 'handUp') {
if(type == 'handUp') {
if (this.iconsType == 'handUp') {
if (type == 'handUp') {
this.iconsType = ''
this.$set(this.msgList[index], 'iconsType', '')
} else {
this.iconsType = 'handDown'
this.$set(this.msgList[index], 'iconsType', 'handDown')
}
} else {
if(type == 'handUp') {
if (type == 'handUp') {
this.$set(this.msgList[index], 'iconsType', 'handUp')
this.iconsType = 'handUp'
} else {
this.iconsType = ''
this.$set(this.msgList[index], 'iconsType', '')
}
}
}
const params = {
qaId,
feedbackStatus : this.iconsType == '' ? 0 : (this.iconsType == 'handUp' ? 1 : 2),
feedbackStatus: this.iconsType == '' ? 0 : (this.iconsType == 'handUp' ? 1 : 2),
feedbackInfo: ''
}
// this.$request.globalRequest('/hitap/feadBack', params, 'POST').then(res => {
@ -203,57 +209,46 @@
})
uni.showToast({
title: res.data.result,
// icon: 'success',
duration: 2000
title: res.data.result,
// icon: 'success',
duration: 2000
});
},
handleTouchStart(e) {
// this.isUserScrolling = true;
//
this.startX = e.touches[0].clientX;
this.startY = e.touches[0].clientY;
// this.isScrolling = false; //
// this.startX = e.touches[0].clientX;
// this.startY = e.touches[0].clientY;
// // this.isScrolling = false; //
},
handleTouchMove(e) {
//
let moveX = e.touches[0].clientX;
let moveY = e.touches[0].clientY;
//
let deltaX = moveX - this.startX;
let deltaY = moveY - this.startY;
// 5px
if (Math.abs(deltaX) > 5 || Math.abs(deltaY) > 5) {
// this.isScrolling = true; //
this.isHandleScroll = false
// deltaY
if (deltaY > 0) {
console.log('用户正在向下滑动');
} else if (deltaY < 0) {
console.log('用户正在向上滑动');
}
// startXstartYmoveXmoveY
//
}
// startXstartY
console.log(e)
// this.isUserScrolling = true
this.isHandleScroll = false
//
// this.startX = e.touches[0].clientX;
// this.startY = e.touches[0].clientY;
// // this.isScrolling = false; //
},
handleTouchEnd(e) {
// this.isUserScrolling = true;
// setTimeout(() => {
// this.isUserScrolling = false;
// }, 300); //
//
// startXstartY
//
},
handleScroll(event) {
console.log(event)
// event.detail
const scrollTop = event.detail.scrollTop;
if (scrollTop > this.lastScrollTop) {
console.log('向下滑动');
// this.temp=0
} else {
this.temp++
if (this.temp == 2) {
if (this.temp == 2&&this.isUserScrolling) {
this.isHandleScroll = false
}
@ -341,6 +336,7 @@
}
this.temp = 0
this.isHandleScroll = true
this.isUserScrolling = false
this.changeMsgList("0", this.inputValue || text);
this.queryChat(this.inputValue || text);
this.inputValue = "";
@ -817,6 +813,8 @@
.titleTwo {
margin: 15rpx 0;
font-size: 28rpx;
font-size: 28rpx;
line-height: 42rpx;
}
.tipItem {
@ -831,12 +829,13 @@
.text {
font-size: 28rpx;
// line-height:50rpx;
}
}
}
.text {
font-size: 32rpx;
font-size: 28rpx;
}
}
@ -1098,11 +1097,13 @@
color: #999999 !important;
}
}
.icon{
.icon {
display: flex;
justify-content: flex-end;
margin: 0 15rpx 15rpx 12rpx;
.uni-icons{
.uni-icons {
margin-left: 15rpx;
}
}

Loading…
Cancel
Save