guhongwei 2 rokov pred
rodič
commit
c4a3a1bd18

+ 5 - 4
commpents/editor/index.js

@@ -47,8 +47,9 @@ Component({
                 that.editorCtx = res.context;
                 let { content } = that.data;
                 let html = content;
-                if (html) that.editorCtx.setContents({ html })
-            }).exec()
+                if (html) that.editorCtx.setContents({ html });
+            }).exec();
+
         },
         // 编辑器值改变时触发
         bindInput: function (e) {
@@ -79,14 +80,14 @@ Component({
         _uploadImage: function (tempFilePath) {
             let that = this;
             wx.uploadFile({
-                url: `${app.globalData.serverUrl}/files/court/elimg/upload`,
+                url: `${app.globalData.fileUrl}/files/court/elimg/upload`,
                 filePath: tempFilePath,
                 name: 'file',
                 formData: {},
                 success: (res) => {
                     let arr = JSON.parse(res.data);
                     if (arr.errcode == '0') {
-                        that.editorCtx.insertImage({ src: app.globalData.serverUrl + arr.uri });
+                        that.editorCtx.insertImage({ src: app.globalData.fileUrl + arr.uri });
                     } else {
                         wx.showToast({ title: `${arr.errmsg}`, icon: 'fail', duration: 2000 })
                     }

+ 2 - 0
pagesMatch/matchAdmin/match/add.js

@@ -97,6 +97,7 @@ Page({
      * 生命周期函数--监听页面加载
      */
     onLoad: async function (options) {
+        wx.showLoading({ title: '加载中', mask: true })
         const that = this;
         that.setData({ id: options && options.id || '' })
         //验证规则函数
@@ -105,6 +106,7 @@ Page({
         await that.searchOther();
         // 监听用户是否登录
         await that.watchLogin();
+        wx.hideLoading()
     },
     searchOther: async function () {
         const that = this;