From 9c7c21e8eacda173feb418bdfe739f7f97358233 Mon Sep 17 00:00:00 2001
From: liuwh <hugeinfo123>
Date: Sun, 29 Mar 2020 17:28:46 +0800
Subject: [PATCH] bug修复

---
 SunshineLnsMinApp/pages/xsuojbInfo/xsuojbInfo.js |   44 ++++++++++++++++++++++----------------------
 1 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/SunshineLnsMinApp/pages/xsuojbInfo/xsuojbInfo.js b/SunshineLnsMinApp/pages/xsuojbInfo/xsuojbInfo.js
index 4ce6725..46ba921 100644
--- a/SunshineLnsMinApp/pages/xsuojbInfo/xsuojbInfo.js
+++ b/SunshineLnsMinApp/pages/xsuojbInfo/xsuojbInfo.js
@@ -37,7 +37,7 @@
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad: function (options) {
+  onLoad: function(options) {
     const id = options.id || 'new';
     let that = this;
     var userinfo = wx.getStorageSync("user");
@@ -48,7 +48,7 @@
       data: {
         id,
       },
-      success: function (res) {
+      success: function(res) {
         console.log('res', res);
         var dataSet = res.data;
         var evalList1000 = dataSet.attachments || [];
@@ -111,32 +111,32 @@
 
   onSubmit() {
     console.log(this.data.thisData)
-    if(!this.data.thisData.tipoffObject){
+    if (!this.data.thisData.tipoffObject) {
       return app.showModal("请填写举报对象!");
     }
-    if(!this.data.thisData.tipoffAction){
+    if (!this.data.thisData.tipoffAction) {
       return app.showModal("请选择举报行为!");
     }
-    if(!this.data.thisData.tipoffAddress){
+    if (!this.data.thisData.tipoffAddress) {
       return app.showModal("请填写发生地!");
     }
-    if(!this.data.thisData.tipoffContent){
+    if (!this.data.thisData.tipoffContent) {
       return app.showModal("请填写具体事项!");
     }
-    if(!this.data.evalList){
+    if (!this.data.evalList) {
       return app.showModal("请上传证明材料!");
     }
-    if(!this.data.thisData.tipoffType){
+    if (!this.data.thisData.tipoffType) {
       return app.showModal("请选择方式!");
     }
-    if(this.data.thisData.tipoffType=='2'){
-      if(!this.data.thisData.createrName){
+    if (this.data.thisData.tipoffType == '2') {
+      if (!this.data.thisData.createrName) {
         return app.showModal("请填写姓名!");
       }
-      if(!this.data.thisData.createrMobile){
+      if (!this.data.thisData.createrMobile) {
         return app.showModal("请填写手机号码!");
       }
-      if(!this.data.thisData.createrAddress){
+      if (!this.data.thisData.createrAddress) {
         return app.showModal("请填写联系方式!");
       }
     }
@@ -147,15 +147,15 @@
       header: {
         "Content-Type": "application/json"
       },
-      success: function (res) {
+      success: function(res) {
         if (res.data.code == 0) {
           wx.showToast({
             title: '提交成功!',
             icon: 'success',
             duration: 2000
           })
-          wx.navigateTo({
-            url: '../zhwj/zhwj',
+          wx.navigateBack({
+            delta: 2
           })
         }
       }
@@ -163,10 +163,10 @@
   },
 
   // 选择地理位置
-  chooseLocation: function (e) {
+  chooseLocation: function(e) {
     const that = this;
     wx.chooseLocation({
-      success: function (res) {
+      success: function(res) {
         console.log('res', res);
         that.setData({
           thisData: {
@@ -179,7 +179,7 @@
   },
 
   //添加图片
-  joinPicture: function (e) {
+  joinPicture: function(e) {
     console.log(e)
     var that = this;
     console.log(that)
@@ -187,13 +187,13 @@
   },
 
   // 删除图片
-  clearImg: function (e) {
+  clearImg: function(e) {
     var that = this;
     app.clearImg(e, that);
   },
 
   //预览图片
-  previewImage: function (e) {
+  previewImage: function(e) {
     app.previewImage(e);
   },
 
@@ -206,13 +206,13 @@
       this.setData({
         [key]: e.detail.value,
         [`display${key}`]: e.detail.label,
-        showInfo:true,
+        showInfo: true,
         thisData: {
           ...this.data.thisData,
           [key]: e.detail.value,
         }
       });
-    }else{
+    } else {
       this.setData({
         [key]: e.detail.value,
         [`display${key}`]: e.detail.label,

--
Gitblit v1.8.0