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 // #ifdef APP-PLUS || MP
// const baseUrl = "http://116.62.210.143:9002"; // const baseUrl = "http://116.62.210.143:9002";
// const baseUrl = "http://118.89.79.160:8800/HiatmpPro"; // const baseUrl = "http://118.89.79.160:8800/HiatmpPro";
const baseUrl = "http://49.235.207.167: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://219.147.31.25:30001/tht-app-api/HiatmpPro";
const chatUrl = "http://219.147.31.25:30001/hitap"; const chatUrl = "http://219.147.31.25:30001/hitap";
// #endif // #endif
// #ifdef H5 // #ifdef H5

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

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

File diff suppressed because it is too large Load Diff

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

Loading…
Cancel
Save