This commit is contained in:
Vinjor 2025-04-15 11:50:40 +08:00
parent 9ddbff0b71
commit f5eeaac4cd
8 changed files with 375 additions and 4 deletions

View File

@ -0,0 +1,141 @@
<template>
<view class="box-border">
<view class="u-tag clearfixed">
<block v-for="(item,index) in selectlist" :key='index'>
<view class="tag-label" @click="del(index)">
{{item.title}}
</view>
</block>
</view>
<view>
<input class="input-tag" v-model="inputzy" type="text" :placeholder="placeholder" @confirm="confirm">
</view>
</view>
</template>
<script>
export default {
data() {
return {
inputzy: ""
}
},
props: {
selectlist: {
type: Array,
default: function() {
return []
}
},
placeholder: {
type: String,
default: ''
}
},
watch: {
inputzy(news, olds) {
var key = news.trim();
var title = key;
if (news[0] == ' ' || news[0] == ',' || news[0] == '') {
var title = news.split(news[0])[1];
this.inputzy = title;
return;
}
if (news.length != '1' && news[news.length - 1] == ' ' || news[news.length - 1] == ',' || news[news
.length - 1] ==
'') {
title = key.split(news[news.length - 1])[0];
title = title.trim();
var obj = this.selectlist.find(item => item.title == title);
if (obj) {
this.inputzy = '';
return;
}
this.selectlist.push({
title
});
this.inputzy = '';
this.change();
}
}
},
methods: {
confirm(e) {
this.changeVal(e.mp.detail.value);
},
changeVal(news) {
var key = news.trim();
if (key == '') {
this.inputzy = '';
return;
}
var title = key;
var obj = this.selectlist.find(item => item.title == title);
if (obj) {
this.inputzy = '';
return;
}
this.selectlist.push({
title
});
this.inputzy = '';
this.change();
},
del(index) {
this.selectlist.splice(index, 1);
this.change();
},
change() {
this.$emit('change', this.selectlist);
}
},
}
</script>
<style scoped lang="scss">
.clearfixed::after {
content: '';
display: block;
clear: both;
}
.box-border {
padding: 20upx 32upx;
border-radius: 8upx;
box-sizing: border-box;
}
/*
* u-tag
*/
.u-tag {
.tag-label {
border: 1rpx solid #CCCCCC;
position: relative;
float: left;
font-size: 28upx;
padding-top: 6rpx;
padding-bottom: 6rpx;
padding-left: 18rpx;
padding-right: 50upx;
border-radius: 15rpx;
background: white;
color: #363636;
margin-right: 20upx;
margin-bottom: 30upx;
&::after {
position: absolute;
content: '×';
margin-top: -2upx;
right: 20upx;
}
}
}
.input-tag {
line-height: 50upx;
font-size: 28upx;
}
</style>

View File

@ -1,6 +1,6 @@
// 应用全局配置
module.exports = {
baseUrl: 'http://192.168.1.17:8080',
baseUrl: 'http://192.168.1.4:8081',
// baseUrl: 'http://localhost:8080',
// 应用信息
appInfo: {

View File

@ -185,6 +185,11 @@
"style": {
"navigationBarTitleText": ""
}
}, {
"path": "set/evaluate",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "auth/auth-choose",

View File

@ -13,6 +13,7 @@
<view class="opt-item" v-if="item.approvalStatus=='2'">重启</view>
<view class="opt-item" @click="goDetail(item.id)">查看详情</view>
<view class="opt-item">发类似</view>
<view class="opt-item" @click="goEvaluate()">评价(demo)</view>
</view>
</view>
</template>
@ -85,6 +86,9 @@
*/
goDetail(id) {
this.$emit("goDetail", id)
},
goEvaluate() {
this.$emit("goEvaluate")
}
}
}

View File

@ -14,8 +14,8 @@
<view class="dl-item-box">
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="onReachBottomCus" refresher-enabled
@refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<my-notice-item-tg v-if="dataList.length>0" :dataList="dataList"
@goDetail="goDetail()"></my-notice-item-tg>
<my-notice-item-tg v-if="dataList.length>0" :dataList="dataList" @goDetail="goDetail()"
@goEvaluate="goEvaluate()"></my-notice-item-tg>
<view style="text-align: center" v-if="dataList.length==0">
<image class="" src="@/static/images/nothing.png"></image>
</view>
@ -87,6 +87,10 @@
*/
goDetail(id) {
this.$tab.navigateTo('/pages/notice/detail?viewMy=true&id=' + id)
},
goEvaluate() {
this.$tab.navigateTo('/pages/mine/set/evaluate')
}
}
}

216
pages/mine/set/evaluate.vue Normal file
View File

@ -0,0 +1,216 @@
<template>
<view class="suggest-content">
<navigation-bar-vue title="评价" style="width: 100%;" background-color="#ffffff"
title-color="#000000"></navigation-bar-vue>
<view class="card-detail">
<view class="item-field">
<view class="item-lable is-required">
你觉得参与本次通告体验如何<text>(1-10)</text>
</view>
<view class="item-value">
<uni-rate :max="10" :value="dataObj.rate" />
</view>
</view>
<view class="item-field">
<view class="item-lable is-required">
分享你的参与感受帮助更多小伙伴~
</view>
<view class="item-value">
<biner-input-tags @change="change" :selectlist='selectlist' :disabled='disabled'
:placeholder='placeholder'></biner-input-tags>
<view class="item-dom-box">
<view class="item-dom" v-for="(item,index) in tips" @click="chooseObj(item)">{{item}}</view>
</view>
</view>
</view>
<view class="line-row-bottom">
<uni-data-checkbox @change="chooseBoxFun($event,'isRead')" multiple :localdata="readBookList" />
<text class="text-red">你的头像和昵称将在评价中隐藏</text>
</view>
<view class="item-field" style="align-items: center;">
<view class="submit-box" @click="submitForm">提交</view>
</view>
</view>
</view>
</template>
<script>
import navigationBarVue from '@/components/navigation/navigationBar.vue';
// biner-input-tags
import binerInputTags from '@/components/biner-input-tags/biner-input-tags'
export default {
components: {
navigationBarVue,
binerInputTags
},
data() {
return {
disabled: false, //
//
selectlist: [{
title: '专业'
}],
//
placeholder: '请输入评价',
dataObj: {
rate: 0,
},
tips: ["定人快", "审稿快", "提现快"],
readBookList: [{
text: '匿名评价',
value: true
}],
}
},
methods: {
//
change(arr) {
this.selectlist = arr
},
/**提交*/
submitForm() {},
/**
* 去我的建议列表
*/
goMySuggest() {
this.$tab.navigateTo('/pages/mine/set/my-suggest')
},
chooseObj(item) {
this.selectlist.push({
title: item
})
}
}
}
</script>
<style lang="scss">
.suggest-content {
padding-top: calc(90rpx + var(--status-bar-height));
background-color: white;
width: 100%;
color: #363636;
font-size: 32rpx;
height: 100%;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: center;
position: relative;
.card-detail {
border-top: 1rpx solid #F2F2F2;
width: 100%;
padding: 20rpx 30rpx;
background-color: white;
border-radius: 20rpx;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: center;
position: relative;
.line-row-bottom {
width: 100%;
margin-top: 20rpx;
font-size: 30rpx;
display: flex;
align-items: center;
justify-content: center;
.text-red {
font-size: 24rpx;
color: #929292;
}
}
.item-field {
width: 100%;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: center;
.item-lable {
padding: 15rpx 0;
display: flex;
align-items: center;
justify-content: center;
text {
color: #929292;
font-size: 22rpx;
}
}
.item-value {
width: 100%;
input {
padding-left: 20rpx;
line-height: 1;
height: 70rpx;
border: 1rpx solid #dcdfe6;
border-radius: 8rpx;
}
.choose-add {
color: #686868;
padding: 10rpx 0 10rpx 20rpx;
display: flex;
align-items: center;
justify-content: flex-start;
border: 1rpx solid #dcdfe6;
border-radius: 8rpx;
}
textarea {
width: 100%;
height: 150rpx;
color: #686868;
padding: 10rpx 0 10rpx 20rpx;
border: 1rpx solid #dcdfe6;
border-radius: 8rpx;
}
.item-dom-box {
width: 100%;
.item-dom {
font-size: 28rpx;
border: 1rpx solid #CCCCCC;
border-radius: 15rpx;
float: left;
padding: 6rpx 18rpx;
margin: 0 0 20rpx 30rpx;
}
}
}
.submit-box {
padding: 15rpx 0;
background-color: #FC1F3E;
color: white;
width: 70%;
border-radius: 10rpx;
margin-top: 15rpx;
text-align: center;
}
.my-suggest-dom {
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
margin-top: 20rpx;
}
}
}
}
.checklist-box {
margin-right: 10rpx !important;
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<view class="suggest-content">
<navigation-bar-vue title="意见反馈" style="width: 100%;" background-color="#ffffff"
<navigation-bar-vue title="评价" style="width: 100%;" background-color="#ffffff"
title-color="#000000"></navigation-bar-vue>
<view class="card-detail">
<view class="item-field">

View File

@ -4,6 +4,7 @@
<view class="file-picker__box-content" :style="borderStyle">
<image class="file-image" :src="item.url" mode="aspectFill" @click.stop="prviewImage(item,index)">
</image>
<text>{{item.url}}</text>
<view v-if="delIcon && !readonly" class="icon-del-box" @click.stop="delFile(index)">
<view class="icon-del"></view>
<view class="icon-del rotate"></view>