linwe
2024-06-22 15a066225ba57bee6928f43b52dec97d08c03b47
代码优化
4 files modified
20 ■■■■■ changed files
components/myIssue/myIssue.vue 10 ●●●●● patch | view | raw | blame | history
pages/home/index.vue 2 ●●● patch | view | raw | blame | history
subPackage/grid/comment.vue 1 ●●●● patch | view | raw | blame | history
subPackage/grid/tenement.vue 7 ●●●●● patch | view | raw | blame | history
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>
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({
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) {
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", () => {