From 15a066225ba57bee6928f43b52dec97d08c03b47 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Sat, 22 Jun 2024 17:40:02 +0800
Subject: [PATCH] 代码优化

---
 components/myIssue/myIssue.vue |   10 ++++++----
 pages/home/index.vue           |    2 +-
 subPackage/grid/comment.vue    |    1 +
 subPackage/grid/tenement.vue   |    7 ++++---
 4 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/components/myIssue/myIssue.vue b/components/myIssue/myIssue.vue
index 79f61b1..a2d9520 100644
--- a/components/myIssue/myIssue.vue
+++ b/components/myIssue/myIssue.vue
@@ -6,13 +6,15 @@
 			<text v-if="headTitleShow" class="issue-head-title">{{headTitleValue.slice(0,5)}}</text>
 
 			<view class="issue-head-star-box" v-if="starsShow">
-				<image v-for="(item,index) in starsMax" :key="index" :src="(index+1)>formatScore?starDefault:starActive"
-					mode="" @click="setScore(index+1)"></image>
+				<u-number-box :min="0" :max="5" :step="0.5" v-model="infoReceive.score"
+					@change="valChange"></u-number-box>
+				<!-- <image v-for="(item,index) in starsMax" :key="index" :src="(index+1)>formatScore?starDefault:starActive"
+					mode="" @click="setScore(index+1)"></image> -->
 			</view>
 		</view>
-		<textarea v-if="textareaShow" @blur="blur" v-model="infoReceive.content" :placeholder="textareaPlaceholder" />
+		<!-- <textarea v-if="textareaShow" @blur="blur" v-model="infoReceive.content" :placeholder="textareaPlaceholder" /> -->
 		<view class="issue-btn-box" v-if="submitShow">
-			<button class="submit-btn bgc-main c-ff" :disabled="infoReceive.content && infoReceive.score?false:true"
+			<button class="submit-btn bgc-main c-ff" :disabled="infoReceive.score?false:true"
 				@click="doSubmit">{{submitText}}</button>
 			<slot name="submit"></slot>
 		</view>
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 3f340a0..7d0e93c 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -1382,7 +1382,7 @@
 					} else if (path == '/subPackage/workbench/views/cscj') {
 						this.$u.func.globalNavigator(path, "navTo")
 					} else {
-						this.$u.func.globalNavigator(`${path}?houseCode=${this.curHouseCode}`, "navTo")
+						this.$u.func.globalNavigator(`${path}&houseCode=${this.curHouseCode}`, "navTo")
 					}
 				} else {
 					uni.showToast({
diff --git a/subPackage/grid/comment.vue b/subPackage/grid/comment.vue
index d48d60d..5c9dfe4 100644
--- a/subPackage/grid/comment.vue
+++ b/subPackage/grid/comment.vue
@@ -45,6 +45,7 @@
 		methods: {
 			submitInfo(val) {
 				let data = val;
+				data.score = data.score
 				data.propertyCompanyId = this.id;
 				data.createUser = uni.getStorageSync("userInfo").user_id;
 				if (this.isEdit) {
diff --git a/subPackage/grid/tenement.vue b/subPackage/grid/tenement.vue
index f4722c7..b4259e5 100644
--- a/subPackage/grid/tenement.vue
+++ b/subPackage/grid/tenement.vue
@@ -43,13 +43,13 @@
 				<text style="font-size: 30rpx; font-weight: bold; line-height: 40px; margin-left: 10rpx;">评分:</text>
 				<!-- <caption-row title="评分" /> -->
 				<div style="line-height: 40px;">
-					{{scoreInfo.score}} 分
+					{{scoreInfo.score?scoreInfo.score:"暂无评"}} 分
 				</div>
 			</div>
 			<!-- <my-issue :score="scoreInfo.score" :textareaShow="false" :submitShow="false" :headTitleValue="title" /> -->
 		</view>
 
-		<view class="comment" v-if="commentList.length">
+		<!-- <view class="comment" v-if="commentList.length">
 			<caption-row title="留言" />
 			<view class="comment-list bgc-ff mt-20">
 				<view class="comment-item flex " v-for="(item,index) in commentList" :key="index" v-if="item.content">
@@ -65,7 +65,7 @@
 					</view>
 				</view>
 			</view>
-		</view>
+		</view> -->
 
 		<view class="footer" v-if="!scoreInfo.id">
 			<u-search searchIcon='edit-pen' :animation="true" placeholder="写留言" disabled
@@ -104,6 +104,7 @@
 
 		onLoad(option) {
 			this.id = option.id;
+			console.log(option.id)
 			this.getDetailInfo(option.id)
 
 			uni.$on("refreshComment", () => {

--
Gitblit v1.9.3