Pārlūkot izejas kodu

意见反馈优化

kk.shi 3 gadi atpakaļ
vecāks
revīzija
9ecf911c4f

+ 9 - 1
pages/welfareMall/feedback/feedback.js

@@ -28,7 +28,7 @@ Page({
    /** 图片选择 */
    bindViewTap: function(){
     var that = this;
-    if(this.data.avatarUrl.length < 4){
+    if(this.data.avatarUrlShow.length < 4){
        wx.chooseImage({
         // 设置最多可以选择的图片张数,默认9,如果我们设置了多张,那么接收时//就不在是单个变量了,
          count: 1, 
@@ -142,6 +142,14 @@ Page({
     * 提交
     */
    toSubmit: function() {
+     if(this.data.content == null || this.data.content == '' || this.data.content == undefined){
+      wx.showToast({
+        title: '意见内容必填',
+        icon: 'none',
+        duration: 1500
+      })
+      return
+     }
     WelfareMall.feedBackAdd({
       mobile: getMobileCache(),
       photoList: this.data.avatarUrl,

+ 3 - 2
pages/welfareMall/feedback/feedback.wxss

@@ -71,14 +71,15 @@ textarea{
 }
 
 .explain-img{
-  width: 659rpx;
+  width: 662rpx;
   height: 180rpx;
-  justify-content: space-between;
+  justify-content: flex-start;
 }
 
 .explain-img-style{
   width: 160rpx;
   height: 180rpx;
+  margin-right: 8rpx;
 }
 
 .explain-img-preview{