Browse Source

update way of uploading image in admin back for destination

fengchang_fight 1 year ago
parent
commit
a6d38e894f

+ 5 - 6
hichina-admin-front/src/components/DestinationCreateDialog.vue

@@ -61,12 +61,14 @@
         <q-card-section>
           <div style="width: 100vw" class="row justify-center">
             <div class="col-8">
-              <q-input
+              <!-- <q-input
                 outlined
                 class="col-8"
                 label="头图URL"
                 v-model="destinationProfileImage"
-              />
+              /> -->
+              <q-btn label="头图URL" color="primary" @click="insertImg()" />
+              头图URL: {{ destinationProfileImage }}
             </div>
             <div class="col-8">
               <img
@@ -384,10 +386,7 @@ export default {
         .then((response) => {
           this.showNotifyMessageSucceed("成功插入图片");
           this.imageUploadBox = false;
-          this.$refs.destinationDialogEditor.runCmd(
-            "insertImage",
-            response.data.data
-          );
+          this.destinationProfileImage = response.data.data;
           return { imageId: "somefake", imageUrl: response.data.data };
         })
         .catch((e) => {

+ 1 - 1
hichina-main-back/src/main/resources/application-dev.properties

@@ -2,7 +2,7 @@ server.port=9052
 
 spring.datasource.url=jdbc:mysql://localhost:3306/unified_hichina?zeroDateTimeBehavior=convertToNull&useUnicode=true&allowMultiQueries=true
 spring.datasource.username=root
-spring.datasource.password=root
+spring.datasource.password=Passw0rd
 spring.datasource.tomcat.max-wait=20000
 spring.datasource.tomcat.max-active=50
 spring.datasource.tomcat.max-idle=20