Blame view

ceres-uniapp-master/pages_category_page1/customer/chatBox.vue 3.06 KB
3f535f30   杨鑫   '初始'
1
2
3
4
5
  
  <template>
  	<view class="uni-padding-wrap">
  		<view class="" style="position:fixed;bottom: 0rpx;left: 0;width: 100%;">
  			<form @submit="commitComments">
ad7d1a78   杨鑫   '最新'
6
  				<view style="display: flex;justify-content: space-between;;padding: 10px;">
3f535f30   杨鑫   '初始'
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
  					<input class="contentTextArea" name="commentContent" v-model="commentContent" placeholder="请输入"></input>
  					<button class="commitButton" formType="submit">发送</button>
  				</view>
  			</form>
  		</view>
  				
  		<view class="uni-comment">
  			<view class="uni-comment-list" v-for="(commentsList,index) in commentsList" :key="index">
  				<view class="uni-comment-face">
  					<image src="../../components/canvasShow/static/images/product/kefu.png" mode="widthFix"></image>
  				</view>
  				<view class="uni-comment-body">
  					<view class="uni-comment-top">
  						<text>{{commentsList.nickname==''||commentsList.nickname==null?'匿名':commentsList.nickname}}</text>
  						<text class="uni-comment-date">{{commentsList.created_at}}</text>
  					</view>				
  					<text class="uni-comment-content">{{commentsList.content}}</text>
  				</view>
  			</view>
  		</view>
  	</view>
  </template>
  <script>
  	export default {
  	data(){
  		return{
  			commentsList:[
  				{created_at:'2024-8-13 14:43:20',content:'wode',nickname:'娃娃店铺'},
  				{created_at:'2024-8-13 14:43:20',content:'wode',nickname:'小羊'}
  				
  			],
  			index:'',
  			nickname:'',
  			created_user_id:'',
  			commentContent:'',
  		}
  	},
  	mounted() {
  	},
ad7d1a78   杨鑫   '最新'
46
47
48
  	onLoad(option) {
  	  console.log(option.shopId)	
  	},
3f535f30   杨鑫   '初始'
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
  	methods:{
  		
  	}
  }
  </script>
      <style lang="scss" scoped>  
   .uni-padding-wrap{
  	 height: calc(100vh - 100px);
  	 position: relative;
   }
  	view {
  		font-size: 28upx;
  	}
   
  	.uni-comment {
  		padding: 30upx;
  		display: flex;
  		flex-grow: 1;
  		flex-direction: column;
  	}
   
  	.uni-comment-list {
  		flex-wrap: nowrap;
  		padding: 10rpx 0;
  		margin: 10rpx 0;
  		width: 100%;
  		display: flex;
  	}
   
  	.uni-comment-face {
  		width: 70upx;
  		height: 70upx;
  		border-radius: 100%;
  		margin-right: 20upx;
  		flex-shrink: 0;
  		overflow: hidden;
  	}
   
  	.uni-comment-face image {
  		width: 100%;
  		border-radius: 100%;
  	}
   
  	.uni-comment-body {
  		margin-top: 10rpx;
  		width: 100%;
  	}
   
  	.uni-comment-top {
  		display: flex;
  		justify-content: flex-start;
  		line-height: 1.5em;
  		
  	}
   
  	.uni-comment-top text {
ad7d1a78   杨鑫   '最新'
105
  		color: #3F9B6A;
3f535f30   杨鑫   '初始'
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
  		margin-right: 20rpx;
  		font-size: 24upx;
  	}
   
  	.uni-comment-top{
  		.uni-comment-date {
  				color: #666666	
  		}
  	}
   
  	.uni-comment-content {
  		line-height: 1.6em;
  		font-size: 28upx;
  		padding: 8rpx 0;
  	}
   
  	.uni-comment-replay-btn {
  		background: #FFF;
  		font-size: 24upx;
  		line-height: 28upx;
  		padding: 5rpx 20upx;
  		border-radius: 30upx;
  		color: #333 !important;
  		margin: 0 10upx;
  	}
  	.commitButton{
  		height: 64rpx;
ad7d1a78   杨鑫   '最新'
133
  		color: #fff;
3f535f30   杨鑫   '初始'
134
135
136
  		width: 20%;
  		margin: 0rpx auto;
  		font-size: 27rpx;
ad7d1a78   杨鑫   '最新'
137
138
139
  		border-radius: 10px;
  		line-height: 64rpx;
  		background-color: #3F9B6A;
3f535f30   杨鑫   '初始'
140
141
  	}
  	.contentTextArea{
ad7d1a78   杨鑫   '最新'
142
  		
3f535f30   杨鑫   '初始'
143
144
145
146
  		font-size: 30rpx;
  		background-color: #fff;
  		border:1rpx solid #e9e7ef;
  		border-right: 0px solid transparent;
ad7d1a78   杨鑫   '最新'
147
  		width: 72%;
3f535f30   杨鑫   '初始'
148
149
150
  		height: 40rpx;
  		margin: 0rpx auto;
  		padding: 10rpx 0 10rpx 20rpx;
ad7d1a78   杨鑫   '最新'
151
  		border-radius: 10px;
3f535f30   杨鑫   '初始'
152
153
  	}
  </style>