Browse Source

个人中心服务评价,问兽医

master
ZhaoYang 1 month ago
parent
commit
4eb97edb88
  1. 21
      pages/home/home.js
  2. 2
      pages/home/home.wxml
  3. 11
      pages/personal/personal.js
  4. 1
      pages/personal/personal.wxml
  5. 2
      pagesA/pages/expertChat/expertChat.js
  6. 4
      utils/baseUrl.js

21
pages/home/home.js

@ -279,27 +279,12 @@ Page({
// 通知点击
onNoticeTap(e) {
console.log(111,e);
const id = e.currentTarget.dataset.id;
console.log('通知点击:', id);
// 显示当前点击的通知内容
const notice = this.data.noticeList.find(item => item.id === id);
if (notice) {
wx.showModal({
title: notice.warningLevel || '通知详情',
content: notice.title,
showCancel: true,
cancelText: '关闭',
confirmText: '查看详情',
success: (res) => {
if (res.confirm) {
wx.navigateTo({
url: '/pagesB/pages/noticeDetail/noticeDetail?id=' + id
});
}
}
});
}
url: '/pagesA/pages/noticeListDetails/noticeListDetails?id=' + id,
})
},
onReady() {

2
pages/home/home.wxml

@ -100,7 +100,7 @@
<swiper class="notice-swiper" vertical="{{true}}" autoplay="{{true}}" interval="4000" duration="800" circular="{{true}}" style="height: 160rpx;" bindchange="onNoticeSwiperChange">
<block wx:for="{{noticeList}}" wx:key="id">
<swiper-item>
<view class="notice-item {{index === currentNotice ? 'highlight' : ''}}" data-id="{{item.id}}" catchtap="onNoticeTap">
<view class="notice-item {{index === currentNotice ? 'highlight' : ''}}" data-id="{{item.id}}" bind:tap="onNoticeTap">
<view class="notice-item-header">
<view class="notice-type-container">
<text class="notice-type {{tool.type(item.warningLevel)}}">{{item.warningLevel}}</text>

11
pages/personal/personal.js

@ -195,18 +195,11 @@ Page({
if (result && result.fileName) {
// 获取上传后的文件路径
const uploadedFilePath = result.fileName
console.log(uploadedFilePath);
this.setData({
avatarUrl: uploadedFilePath,
})
// 更新缓存中的用户信息
const cachedUserInfo = wx.getStorageSync('userInfo') || {}
if (!cachedUserInfo.user) {
cachedUserInfo.user = {}
}
cachedUserInfo.user.avatar = uploadedFilePath
wx.setStorageSync('userInfo', cachedUserInfo)
// 更新头像的API
http.revise({
data: {
@ -410,7 +403,7 @@ Page({
http.feedback({
data: {
content: content,
feedbackType: this.data.currentFeedbackType // 添加反馈类型字段
type: this.data.currentFeedbackType // 添加反馈类型字段
},
success: res => {
if (res.code == 200) {

1
pages/personal/personal.wxml

@ -114,7 +114,6 @@
</view>
<view class="modal-body">
<!-- 修复iOS输入框问题:添加focus控制并增加条件渲染 -->
<textarea
class="feedback-input"
placeholder="请输入您的反馈或建议..."

2
pagesA/pages/expertChat/expertChat.js

@ -538,7 +538,7 @@ Page({
}
// WebSocket连接URL
const basurl = '192.168.101.111:8081'; // 从配置文件获取
const basurl = '192.168.101.109:8080'; // 从配置文件获取
const wsUrl = `ws://${basurl}/ws/mini/chat?userId=${userId}`;
console.log('开始连接WebSocket:', wsUrl);

4
utils/baseUrl.js

@ -1,5 +1,5 @@
// var baseUrl = 'https://wx.chenhaitech.com/ymtx-prod-api'
// var baseUrl = 'http://192.168.101.109:8080'
var baseUrl = 'http://192.168.101.109:8080'
// var baseUrl = 'http://192.168.101.105:8082'
var baseUrl = 'http://192.168.101.111:8081'
// var baseUrl = 'http://192.168.101.111:8081'
module.exports = baseUrl
Loading…
Cancel
Save