Browse Source

开发ing

zhoujump 3 hours ago
parent
commit
ed1232bb48

+ 1 - 0
.env.development

@@ -1,6 +1,7 @@
 # just a flag
 ENV = 'development'
 VUE_APP_NAME = 'development'
+VUE_APP_PAY_CENTER_URL = 'http://localhost:9522'
 # base api
 VUE_APP_BASE_API = 'https://exporeg-test-api.matchexpo.cn'
 

+ 58 - 2
src/api/expo.js

@@ -66,9 +66,11 @@ export function getExpoInfo(key) {
  * @param {string} seo_title
  * @param {string} seo_description
  * @param {string} seo_keywords
+ * @param {number} invitation_price 邀请价格
+ * @param {array} invitation_template_ids 邀请模板ID
  * @returns {*}
  */
-export function saveExpo(id,expo_name,start_date,end_date,location,organizer,contact_phone,contact_email,content,logo,images,social_links,form_template_id,page_template_id,urla,show_official_footer,seo_title,seo_description,seo_keywords) {
+export function saveExpo(id,expo_name,start_date,end_date,location,organizer,contact_phone,contact_email,content,logo,images,social_links,form_template_id,page_template_id,urla,show_official_footer,seo_title,seo_description,seo_keywords,invitation_price,invitation_template_ids) {
   return request({
     url: '/api/expo/info',
     method: 'post',
@@ -91,7 +93,9 @@ export function saveExpo(id,expo_name,start_date,end_date,location,organizer,con
       show_official_footer,
       seo_title,
       seo_description,
-      seo_keywords
+      seo_keywords,
+      invitation_price,
+      invitation_template_ids
     }
   })
 }
@@ -205,3 +209,55 @@ export function deleteUtm(id) {
     }
   })
 }
+/**
+ * 获取已预约展会列表接口
+ * @param {number} page 页码
+ * @param {number} page_size 每页数量
+ * @param {string} keyword 关键词
+ * @returns {*}
+ */
+export function getSubmittedExpo(page, page_size, keyword) {
+  return request({
+    url: '/api/form/my-submit-list',
+    method: 'get',
+    params: {
+      page,
+      page_size,
+      keyword
+    }
+  })
+}
+/**
+ * 获取已预约展会详情接口
+ * @param form_id 预约ID
+ * @returns {*}
+ */
+export function applyInvitation(form_id){
+  return request({
+    url: '/api/form/apply-invitation',
+    method: 'post',
+    data:{
+      form_id
+    }
+  })
+}
+/**
+ * 审核预约接口
+ * @param apply_invitation_id 预约ID
+ * @param status 状态
+ * @param price 价格
+ * @param invitation_template_id 模板id
+ * @returns {*}
+ */
+export function auditInvitation(apply_invitation_id, status, price, invitation_template_id){
+  return request({
+    url: '/api/form/audit-invitation',
+    method: 'post',
+    params:{
+      apply_invitation_id,
+      status,
+      price,
+      invitation_template_id
+    }
+  })
+}

+ 12 - 2
src/api/form.js

@@ -150,7 +150,7 @@ export function  getJobList(page, page_size){
  * @param expo_id
  * @returns {*}
  */
-export function getAudienceList(page, page_size,keyword,is_export,expo_id){
+export function getAudienceList(page, page_size,keyword,is_export,expo_id,apply_audit_status){
   return request({
     url: '/api/form/list',
     method: 'get',
@@ -159,7 +159,8 @@ export function getAudienceList(page, page_size,keyword,is_export,expo_id){
       page,
       page_size,
       is_export,
-      expo_id
+      expo_id,
+      apply_audit_status
     }
   })
 }
@@ -228,3 +229,12 @@ export function importAudience(file,expo_id) {
     }
   })
 }
+export function invitationOrder(form_invitation_id) {
+  return request({
+    url: '/api/trade/invitation-order',
+    method: 'post',
+    data: {
+      form_invitation_id
+    }
+  })
+}

+ 5 - 1
src/api/system.js

@@ -40,11 +40,15 @@ export function upload(file,title,alt,url,filename,size,ext,pic,resolution,mine_
 
 /**
  * 获取邮件设置
+ * @param type 1=发件设置,2=收件设置
  * @returns {*}
  */
-export function getMailSettings() {
+export function getMailSettings(type) {
   return request({
     url: '/api/user/mail-setting',
+    params: {
+      type
+    },
     method: 'get'
   })
 }

+ 4 - 2
src/api/template.js

@@ -7,9 +7,10 @@ import request from '@/utils/request'
  * @param description
  * @param content
  * @param pic
+ * @param price
  * @returns {*}
  */
-export function saveTemplate(id,name,description,content,pic){
+export function saveTemplate(id,name,description,content,pic,price){
   return request({
     url: '/api/invitation/temp-save',
     method: 'post',
@@ -18,7 +19,8 @@ export function saveTemplate(id,name,description,content,pic){
       name,
       description,
       content,
-      pic
+      pic,
+      price
     }
   })
 }

File diff suppressed because it is too large
+ 1 - 1
src/permission.js


+ 123 - 64
src/views/audienceManage/index.vue

@@ -1,16 +1,8 @@
 <script>
 import Vue from 'vue'
-import hugerte from 'hugerte'
-import 'hugerte/models/dom'
-import 'hugerte/icons/default'
-import 'hugerte/themes/silver'
-import 'hugerte/skins/ui/oxide/skin.js'
-import 'hugerte/skins/ui/oxide/content.js'
-import 'hugerte/skins/content/default/content.js'
-
 import XLSX from 'xlsx'
-import { getAudienceList, sentInvitation, getFormList, getFormInfo, importAudience } from '@/api/form'
-import { getExpoList, getMyExpoInfo } from '@/api/expo'
+import { getAudienceList, getFormList, getFormInfo, importAudience } from '@/api/form'
+import { getExpoList, getMyExpoInfo, auditInvitation } from '@/api/expo'
 import { getTemplateList } from '@/api/template'
 import expoPopover from '@/views/components/expoPopover.vue'
 export default Vue.extend({
@@ -21,7 +13,10 @@ export default Vue.extend({
       expoList: [],
       userList: [],
       invitation_data: {
+        apply_id: 0,
+        template_id: 0,
         code: '',
+        price: '0',
         tempIndex: 0,
         data: [],
         exhibitorSetting: {},
@@ -87,11 +82,11 @@ export default Vue.extend({
               this.import_data.xlsx = workBook
               this.loading = false
             }).catch(err => {
-            this.$notify({
-              title: '提示',
-              message: '获取表单列表失败:'+err,
-              type: 'error'
-            })
+              this.$notify({
+                title: '提示',
+                message: '获取表单列表失败:' + err,
+                type: 'error'
+              })
               this.loading = false
             })
         } else {
@@ -121,7 +116,7 @@ export default Vue.extend({
           }).catch(err => {
             this.$notify({
               title: '提示',
-              message: '获取展会信息失败'+err,
+              message: '获取展会信息失败' + err,
               type: 'error'
             })
             this.loading = false
@@ -152,7 +147,7 @@ export default Vue.extend({
         }).catch(err => {
           this.$notify({
             title: '提示',
-            message: '导入观众失败'+err,
+            message: '导入观众失败' + err,
             type: 'error'
           })
           this.loading = false
@@ -210,7 +205,7 @@ export default Vue.extend({
       }).catch(err => {
         this.$notify({
           title: '提示',
-          message: '获取邀请函列表失败'+err,
+          message: '获取邀请函列表失败' + err,
           type: 'error'
         })
       })
@@ -221,7 +216,7 @@ export default Vue.extend({
       }).catch(err => {
         this.$notify({
           title: '提示',
-          message: '获取展会列表失败'+err,
+          message: '获取展会列表失败' + err,
           type: 'error'
         })
       })
@@ -239,8 +234,12 @@ export default Vue.extend({
       if (this.loading) {
         return
       }
+      let isReview = void 0
+      if (this.$route.name === 'invitationSend') {
+        isReview = 1
+      }
       this.loading = true
-      getAudienceList(this.current_page, this.page_size, this.searchWord, this.is_export, this.expo_id).then(res => {
+      getAudienceList(this.current_page, this.page_size, this.searchWord, this.is_export, this.expo_id, isReview).then(res => {
         this.current_page = res.data.current_page
         this.last_page = res.data.last_page
         this.total = res.data.total
@@ -249,7 +248,7 @@ export default Vue.extend({
       }).catch(err => {
         this.$notify({
           title: '提示',
-          message: '获取观众列表失败'+err,
+          message: '获取观众列表失败' + err,
           type: 'error'
         })
         this.loading = false
@@ -258,38 +257,22 @@ export default Vue.extend({
     openDialog(row) {
       this.invitation_data.show = true
       this.invitation_data.userSetting = row
+      this.invitation_data.apply_id = row.apply_invitation_id
+      this.invitation_data.template_id = this.invitation_data.data[0].id
       getMyExpoInfo(row.expo_id).then(res => {
         this.invitation_data.exhibitorSetting = res.data
         this.changeTemp(0)
       }).catch(err => {
         this.$notify({
           title: '提示',
-          message: '获取展会信息失败'+err,
+          message: '获取展会信息失败' + err,
           type: 'error'
         })
       })
     },
     changeTemp(index) {
-      hugerte.init({
-        selector: '#editor',
-        skin_url: 'default',
-        content_css: 'default',
-        statusbar: false,
-        toolbar: false,
-        menubar: false,
-        height: '100%',
-        width: '100%',
-        setup: editor => {
-          editor.on('drop', event => {
-            event.preventDefault()
-            const html = event.dataTransfer.getData('text/html')
-            editor.insertContent(html)
-          })
-        }
-      }).then(editor => {
-        this.invitation_data.tempIndex = index
-        this.parseCode(this.invitation_data.data[index].content)
-      })
+      this.invitation_data.template_id = this.invitation_data.data[index].id
+      this.parseCode(this.invitation_data.data[index].content)
     },
     dragStart(event, text) {
       console.log(text)
@@ -310,27 +293,49 @@ export default Vue.extend({
         }
       })
       this.invitation_data.code = tempDiv.innerHTML
-      hugerte.activeEditor.setContent(tempDiv.innerHTML)
     },
     closeDialog() {
       this.invitation_data.show = false
-      hugerte.remove('#editor')
     },
     sendInvitation() {
       this.invitation_data.is_sending = true
-      const content = hugerte.activeEditor.getContent()
-      sentInvitation([this.invitation_data.userSetting.id], content).then(res => {
+      console.log(this.invitation_data.template_id)
+      auditInvitation(this.invitation_data.apply_id, 2, this.invitation_data.price, this.invitation_data.template_id).then(res => {
         this.closeDialog()
         this.$message.success('发送成功')
         this.invitation_data.is_sending = false
+        this.getAudience()
       }).catch(err => {
         this.$notify({
           title: '提示',
-          message: '邀请函发送失败'+err,
+          message: '邀请函发送失败' + err,
           type: 'error'
         })
       })
     },
+    disagreeInvitation(row) {
+      if (this.loading) { return }
+      this.$confirm('是否拒绝该邀请函申请?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(res => {
+        auditInvitation(row.apply_invitation_id, 3, 0, '').then(res => {
+          this.getAudience()
+          this.$notify({
+            title: '提示',
+            message: '拒绝成功',
+            type: 'success'
+          })
+        }).catch(err => {
+          this.$notify({
+            title: '提示',
+            message: '审核接口错误:' + err,
+            type: 'error'
+          })
+        })
+      })
+    },
     copy(text) {
       navigator.clipboard.writeText(text).then(() => {
         this.$message.success('复制成功')
@@ -395,11 +400,24 @@ export default Vue.extend({
           prop="mobile"
         />
         <el-table-column
+          label="申请状态"
+        >
+          <template slot-scope="scope">
+            <div v-if="scope.row.apply_audit_status == '0'" class="status">未申请</div>
+            <div v-if="scope.row.apply_audit_status == '1'" class="status wait">待审核</div>
+            <div v-if="scope.row.apply_audit_status == '2'" class="status agre">已审批</div>
+            <div v-if="scope.row.apply_audit_status == '3'" class="status dis">已拒绝</div>
+          </template>
+        </el-table-column>
+        <el-table-column
           label="操作"
           fixed="right"
         >
           <template slot-scope="scope">
-            <span class="button" @click="openDialog(scope.row)">发送邀请函</span>
+            <span v-if="scope.row.apply_audit_status == '1'" class="button" @click="openDialog(scope.row)">发送邀请函</span>
+            <span v-if="scope.row.apply_audit_status == '1'" class="button del" @click="disagreeInvitation(scope.row)">拒绝</span>
+            <span v-if="scope.row.apply_audit_status == '2'" class="button dis">无需操作</span>
+            <span v-if="scope.row.apply_audit_status == '3'" class="button dis">无需操作</span>
           </template>
         </el-table-column>
       </el-table>
@@ -479,13 +497,13 @@ export default Vue.extend({
       :append-to-body="true"
       title="发送邀请函"
       :visible.sync="invitation_data.show"
-      width="90%"
+      width="80%"
       @close="closeDialog()"
     >
       <div class="dialog-body">
         <div class="title">模板列表</div>
-        <div class="title">邮件编辑器</div>
-        <div class="title">观众信息(按住复制按钮可拖拽)</div>
+        <div class="title">预览邮件</div>
+        <!--        <div class="title">观众信息(按住复制按钮可拖拽)</div>-->
         <div class="temp-list">
           <div
             v-for="(temp,index) in invitation_data.data"
@@ -502,21 +520,24 @@ export default Vue.extend({
           </div>
         </div>
         <div class="view">
-          <div id="editor" />
-        </div>
-        <div class="var-list-cont">
-          <div class="var-list">
-            <div v-for="(item,key) in invitation_data.userSetting" class="var-item">
-              <div class="title">{{ getLabelName(key) }}</div>
-              <div>{{ item || '暂无数据' }}</div>
-              <el-button-group class="button-list">
-                <el-button draggable="true" @dragstart.native="dragStart($event,item)" type="primary" size="mini" icon="el-icon-document-copy" @click="copy(item)"></el-button>
-              </el-button-group>
-            </div>
-          </div>
+          <div class="view-inner" v-html="invitation_data.code" />
         </div>
+        <!--        <div class="var-list-cont">-->
+        <!--          <div class="var-list">-->
+        <!--            <div v-for="(item,key) in invitation_data.userSetting" class="var-item">-->
+        <!--              <div class="title">{{ getLabelName(key) }}</div>-->
+        <!--              <div>{{ item || '暂无数据' }}</div>-->
+        <!--              <el-button-group class="button-list">-->
+        <!--                <el-button draggable="true" type="primary" size="mini" icon="el-icon-document-copy" @dragstart.native="dragStart($event,item)" @click="copy(item)" />-->
+        <!--              </el-button-group>-->
+        <!--            </div>-->
+        <!--          </div>-->
+        <!--        </div>-->
       </div>
       <span slot="footer" class="dialog-footer">
+        <el-input v-model="invitation_data.price" placeholder="请输入价格" class="input">
+          <template slot="prepend">申请者付款¥</template>
+        </el-input>
         <el-button @click="closeDialog()">取 消</el-button>
         <el-button v-permission="'audience.sendInvite'" :disabled="invitation_data.is_sending" type="primary" @click="sendInvitation()">
           发 送
@@ -554,6 +575,23 @@ export default Vue.extend({
         position: absolute;
         top: 0;
         left: 0;
+        .status{
+          border-radius: 6px;
+          background-color: #8f8f8f;
+          color: white;
+          display: inline-block;
+          padding: 0 6px;
+          font-size: 12px;
+          &.wait{
+            background-color: #409EFF;
+          }
+          &.agre{
+            background-color: #5bae32;
+          }
+          &.dis{
+            background-color: #ff6f6f;
+          }
+        }
         .button{
           cursor: pointer;
           padding: 0 5px;
@@ -561,6 +599,9 @@ export default Vue.extend({
           &.del{
             color: #DC2626;
           }
+          &.dis{
+            color: grey;
+          }
         }
         .expand-form{
           display: grid;
@@ -615,16 +656,34 @@ export default Vue.extend({
   }
 }
 .invitation-dialog{
+  .dialog-footer{
+    .input{
+      margin-right: 24px;
+      width: 240px;
+    }
+  }
   .dialog-body{
     overflow: hidden;
     height: 68vh;
     display: grid;
-    grid-template-columns: 240px 1fr 240px;
+    grid-template-columns: 240px 1fr;
     grid-template-rows: auto 1fr;
     grid-gap: 4px 12px;
     .view{
       width: 100%;
       height: 100%;
+      position: relative;
+      border: 2px solid #eee;
+      border-radius: 10px;
+      .view-inner{
+        position: absolute;
+        top: 0;
+        left: 0;
+        width: 100%;
+        height: 100%;
+        overflow: hidden;
+        overflow-y: auto;
+      }
     }
     .var-list-cont{
       border: 2px solid #eee;

+ 22 - 3
src/views/exhibitorManage/exhibitorSetting.vue

@@ -11,7 +11,8 @@ import 'hugerte/skins/content/default/content.js'
 import 'hugerte/plugins/autoresize'
 
 import { saveExpo, getMyExpoInfo } from '@/api/expo'
-import { getFormList } from '@/api/form'
+import { getFormList} from '@/api/form'
+import { getTemplateList } from '@/api/template'
 import { upload } from '@/api/system'
 export default Vue.extend({
   name: 'ExhibitorSetting',
@@ -37,10 +38,13 @@ export default Vue.extend({
         seo_title: '',
         seo_description: '',
         seo_keywords: '',
+        invitation_price: 0,
+        invitation_template_ids: [],
         show_official_footer: 1
       },
       isShowMore: false,
       formList: [],
+      templateList: [],
       loading: false,
       ossUrl: process.env.VUE_APP_OSS_DOMAIN
     }
@@ -59,10 +63,13 @@ export default Vue.extend({
           this.exhibitorSetting.social_links = JSON.parse(this.exhibitorSetting.social_links)
           this.initEditor()
           this.loading = false
+          return getTemplateList(1,100)
+        }).then(res2 => {
+          this.templateList = res2.data.data
         }).catch(err => {
           this.$notify({
             title: '提示',
-            message: '获取被复制展会数据失败:' + err,
+            message: '获取被展会数据失败:' + err,
             type: 'error'
           })
           this.loading = false
@@ -206,7 +213,9 @@ export default Vue.extend({
         this.exhibitorSetting.show_official_footer,
         this.exhibitorSetting.seo_title,
         this.exhibitorSetting.seo_description,
-        this.exhibitorSetting.seo_keywords
+        this.exhibitorSetting.seo_keywords,
+        this.exhibitorSetting.invitation_price,
+        this.exhibitorSetting.invitation_template_ids
       ).then(res => {
         this.$notify({
           title: '提示',
@@ -336,6 +345,16 @@ export default Vue.extend({
             <el-option v-for="item in formList" :key="item.id" :value="item.id" :label="item.template_name" />
           </el-select>
         </div>
+        <div class="form-item">
+          <div class="label">邀请函模板</div>
+          <el-select v-model="exhibitorSetting.invitation_template_ids" multiple >
+            <el-option v-for="item in templateList" :key="item.id" :value="item.id" :label="item.name" />
+          </el-select>
+        </div>
+        <div class="form-item">
+          <div class="label">邀请函费用</div>
+          <el-input v-model="exhibitorSetting.invitation_price" placeholder="请输入邀请函费用" />
+        </div>
         <div v-permission="'exhibitor.copyright'" class="form-item required">
           <div class="label">表单底部显示系统信息</div>
           <el-switch v-model="exhibitorSetting.show_official_footer" :active-value="1" :inactive-value="0" class="input" />

+ 32 - 6
src/views/invitationManage/edit.vue

@@ -9,7 +9,7 @@ import 'hugerte/skins/ui/oxide/skin.js'
 import 'hugerte/skins/ui/oxide/content.js'
 import 'hugerte/skins/content/default/content.js'
 import { upload } from '@/api/system'
-import { saveTemplate } from '@/api/template'
+import { saveTemplate, deleteTemplate } from '@/api/template'
 import { getExpoList, getMyExpoInfo, getExpoInfo } from '@/api/expo'
 export default Vue.extend({
   name: 'Index',
@@ -299,7 +299,8 @@ export default Vue.extend({
         id: '',
         name: '未命名表单',
         description: '',
-        pic: ''
+        pic: '',
+        price: 0
       },
       expoData: [],
       currentExpo: {},
@@ -571,12 +572,12 @@ export default Vue.extend({
             }
             const picFile = new File([u8arr], 'invitation.png', { type: mime })
             upload(picFile).then(res => {
-              saveTemplate(this.templateInfo.id, this.templateInfo.name, this.templateInfo.description, this.code, res.data.file)
+              saveTemplate(this.templateInfo.id, this.templateInfo.name, this.templateInfo.description, this.code, res.data.file, this.templateInfo.price)
                 .then(res => {
                   if (quit) {
                     this.$router.push('/invitation/list')
                   }
-                  // this.templateInfo.id = res.data.id
+                  this.templateInfo.id = res.data.id
                   this.loading = false
                 }).catch(err => {
                   this.$notify({
@@ -596,6 +597,24 @@ export default Vue.extend({
             })
           })
       }, 500)
+    },
+    delTemp(id) {
+      this.$confirm('是否删除模板', '提示').then(() => {
+        deleteTemplate(id).then(res => {
+          this.$notify({
+            title: '提示',
+            message: '删除成功',
+            type: 'success'
+          })
+          this.$router.push('/invitation/list')
+        }).catch(err => {
+          this.$notify({
+            title: '提示',
+            message: '删除失败:' + err,
+            type: 'error'
+          })
+        })
+      })
     }
   }
 })
@@ -607,7 +626,7 @@ export default Vue.extend({
       <div class="head-left">
         <el-input v-model="templateInfo.name" v-permission="'invitation.rename'" class="name" />
       </div>
-
+      <el-button v-permission="'invitation.delete'" icon="el-icon-delete" type="danger" @click="delTemp(templateInfo.id)">删除模板</el-button>
       <el-popover
         v-model="showSavePopover"
         popper-class="invitation-popover"
@@ -618,6 +637,12 @@ export default Vue.extend({
         <div class="body">
           <span class="label">模板名称</span>
           <el-input v-model="templateInfo.name" v-permission="'invitation.rename'" placeholder="请输入模板名称" />
+          <span class="label">邀请函价格</span>
+          <el-input v-model="templateInfo.price" v-permission="'invitation.price'" placeholder="请输入邀请函价格">
+            <template slot="prepend">
+              ¥
+            </template>
+          </el-input>
           <span class="label">模板描述</span>
           <el-input v-model="templateInfo.description" v-permission="'invitation.desc'" type="textarea" rows="6" placeholder="请输入模板描述" />
           <div>
@@ -777,8 +802,9 @@ export default Vue.extend({
   }
   .head{
     display: flex;
-    justify-content: space-between;
+    gap: 16px;
     .head-left{
+      margin-right: auto;
       width: 50%;
       display: flex;
       gap: 8px;

+ 1 - 1
src/views/inviteRebate/index.vue

@@ -23,7 +23,7 @@ export default Vue.extend({
     </div>
     <div class="describe">
       <div class="title">邀请返利</div>
-      <div class="desc">当您邀请朋友注册后,TA的每次消费,您都能获得TA消费金额一定比例的现金奖励。</div>
+      <div class="desc">当您邀请朋友注册后,TA的每次消费,您都能获得TA消费金额一定比例的现金奖励。绑定取款账户后,即可提现至您的收款账户。</div>
     </div>
     <div class="amount-count">
       <div class="background">Rebate</div>

+ 1 - 1
src/views/preRegManage/edit.vue

@@ -740,7 +740,7 @@ export default Vue.extend({
       }
     },
     startAskAi() {
-      const url = `https://chat.baidu.com/search?word=匹配${this.askAi}的js正则表达式,不要输出前后斜杠`
+      const url = `https://chat.baidu.com/search?word=匹配${this.askAi}的正则表达式,不要输出前后斜杠`
       window.open(url, '_blank')
     },
     cloneToMe(currentData) {

+ 18 - 17
src/views/setting/systemSetting.vue

@@ -11,6 +11,7 @@ export default Vue.extend({
         auth_code: '',
         smtp_server: '',
         smtp_port: '',
+        recipient_email: '',
         is_ssl: 0
       },
       loading: false
@@ -96,23 +97,23 @@ export default Vue.extend({
           </div>
         </div>
       </div>
-      <!--      <div class="setting-box">-->
-      <!--        <div class="title">-->
-      <!--          邮件设置-->
-      <!--        </div>-->
-      <!--        <div class="setting-list">-->
-      <!--          <div class="setting-item">-->
-      <!--            <div class="label">-->
-      <!--              接收通知邮箱-->
-      <!--            </div>-->
-      <!--            <el-input placeholder="请输入通知邮箱" />-->
-      <!--          </div>-->
-      <!--          <div class="setting-item" />-->
-      <!--          <div class="setting-item">-->
-      <!--            <el-button type="primary">发送测试邮件</el-button>-->
-      <!--          </div>-->
-      <!--        </div>-->
-      <!--      </div>-->
+      <div class="setting-box">
+        <div class="title">
+          收信邮箱设置
+        </div>
+        <div class="setting-list">
+          <div class="setting-item">
+            <div class="label">
+              接收通知邮箱
+            </div>
+            <el-input placeholder="请输入通知邮箱" />
+          </div>
+          <div class="setting-item" />
+          <div class="setting-item">
+            <el-button type="primary">发送测试邮件</el-button>
+          </div>
+        </div>
+      </div>
     </div>
   </div>
 </template>

+ 3 - 0
src/views/user/form.vue

@@ -155,6 +155,9 @@ export default Vue.extend({
           submitForm(this.expo_id, form_data).then(res => {
             this.isOk = true
             this.loading = false
+            this.$router.push({
+              name: 'userHome'
+            })
           }).catch(err => {
             this.$notify({
               title: '提示',

+ 87 - 47
src/views/user/home.vue

@@ -1,24 +1,72 @@
 <script lang="ts">
 import Vue from 'vue'
-
+import { getSubmittedExpo, applyInvitation } from '@/api/expo'
+import { invitationOrder, downloadInvitation } from '@/api/form'
 export default Vue.extend({
-  name: "home",
+  name: 'Home',
   data() {
     return {
-      keywords: ''
+      keywords: '',
+      page: 1,
+      last_page: 2,
+      page_size: 10,
+      expoList: [],
+      payCenterUrl: '',
+      loading: false,
+      baseURL: process.env.VUE_APP_BASE_API
     }
   },
   computed: {
     user() { return this.$store.state.user.user }
   },
   mounted() {
-    // this.autoFocus()
+    this.payCenterUrl = process.env.VUE_APP_PAY_CENTER_URL
+    this.getExpoList()
   },
   methods: {
-    autoFocus() {
-      this.$nextTick(() => {
-        document.getElementById('search').focus()
+    timeNow() {
+      return new Date().getTime()
+    },
+    applyInvitation(expo) {
+      if (window.confirm('要申请' + expo.expo_name + '的邀请函吗?')) {
+        applyInvitation(expo.id).then(res => {
+          expo.apply_audit_status = '1'
+          window.alert('申请成功')
+        }).catch(err => {
+          window.alert(err)
+        })
+      }
+    },
+    getExpoList() {
+      if (this.loading || this.page >= this.last_page) { return }
+      this.loading = true
+      getSubmittedExpo(this.page, this.page_size, this.keywords).then(res => {
+        this.expoList = this.expoList.concat(res.data.data)
+        this.page = res.data.current_page
+        this.last_page = res.data.last_page
+        this.page += 1
+        this.loading = false
+      }).catch(err => {
+        console.log(err)
+        this.loading = false
+      })
+    },
+    createOrder(id) {
+      invitationOrder(id).then(res => {
+        const urlObj = new URL(res.data.pay_url)
+        const url = this.payCenterUrl + '/third-part-login?token=' + encodeURIComponent(this.user.sysApiToken) + '&redirect=' + urlObj.pathname + urlObj.search
+        window.open(url, '_blank')
+        this.getExpoList()
+      }).catch(err => {
+        window.alert(err)
       })
+    },
+    downloadInvitation(id) {
+      const url = this.baseURL + '/api/form/download-invitation?api_token=' + this.$store.getters.token + '&form_id=' + id
+      const a = document.createElement('a')
+      a.href = url
+      a.download = '邀请函.pdf'
+      a.click()
     }
   }
 })
@@ -28,53 +76,41 @@ export default Vue.extend({
   <div class="user-body">
     <div class="view">
       <div class="head-bar">
-        <input id="search" class="search" placeholder="搜索我报名的展会" v-model="keywords"></input>
-        <img @click="$router.push({name:'userMe'})" class="avatar" :src="this.user.avatar?this.user.avatar:'/static/image/avatar.webp'">
+        <input id="search" v-model="keywords" class="search" placeholder="搜索我报名的展会"></input>
+        <img class="avatar" :src="this.user.avatar?this.user.avatar:'/static/image/avatar.webp'" @click="$router.push({name:'userMe'})">
       </div>
       <div class="expo-list-out">
         <div class="expo-list">
-          <div class="expo-item">
-            <img class="head-image" src="/static/image/cover.webp"/>
+          <div v-for="expo in expoList" :key="expo.id" class="expo-item">
+            <img class="head-image" src="/static/image/cover.webp">
             <div class="text-cont">
               <div class="expo-title">
-                展会展会111
-              </div>
-              <div class="expo-date">2025年12月12日</div>
-              <div class="expo-desc">
-                展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会
+                {{ expo.expo_name }}
               </div>
+              <div v-if="timeNow() < new Date(expo.start_date).getTime()" class="expo-date">将于{{ expo.start_date }}开始</div>
+              <div v-if="timeNow() > new Date(expo.start_date).getTime() && timeNow() < new Date(expo.end_date).getTime()" class="expo-date">将于{{ expo.end_date }}结束</div>
+              <div v-if="timeNow() > new Date(expo.end_date).getTime()" class="expo-date">已于{{ expo.end_date }}结束</div>
+              <div class="expo-desc" />
               <div class="button-list">
-                <div class="button">申请邀请函</div>
-              </div>
-            </div>
-          </div>
-          <div class="expo-item">
-            <img class="head-image" src="/static/image/cover.webp"/>
-            <div class="text-cont">
-              <div class="expo-title">
-                展会展会111
-              </div>
-              <div class="expo-date">2025年12月12日</div>
-              <div class="expo-desc">
-                展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会
-              </div>
-              <div class="button-list">
-                <div class="button line">申请审核中</div>
-              </div>
-            </div>
-          </div>
-          <div class="expo-item">
-            <img class="head-image" src="/static/image/cover.webp"/>
-            <div class="text-cont">
-              <div class="expo-title">
-                展会展会111
-              </div>
-              <div class="expo-date">2025年12月12日</div>
-              <div class="expo-desc">
-                展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会介绍展会
-              </div>
-              <div class="button-list">
-                <div class="button">待付款</div>
+                <div v-if="expo.apply_audit_status == 0 " class="button" @click="applyInvitation(expo)">申请邀请函</div>
+                <div v-if="expo.apply_audit_status == 1 " class="button space">申请审核中</div>
+                <template v-if="expo.apply_audit_status == 2 ">
+                  <template v-if="(expo.apply_price - 0) > 0">
+                    <template v-if="expo.order_status == 0">
+                      <div class="button" @click="createOrder(expo.apply_invitation_id)">去付款 ¥{{ expo.apply_price }}</div>
+                      <div class="button space">申请已通过,待付款</div>
+                    </template>
+                    <template v-if="expo.order_status == 3">
+                      <div class="button" @click="downloadInvitation(expo.id)">下载邀请函</div>
+                      <div class="button space">付款成功!</div>
+                    </template>
+                  </template>
+                  <template v-else>
+                    <div class="button" @click="downloadInvitation(expo.id)">下载邀请函</div>
+                    <div class="button space">申请已通过!</div>
+                  </template>
+                </template>
+                <div v-if="expo.apply_audit_status == 3 " class="button space">申请被拒绝</div>
               </div>
             </div>
           </div>
@@ -149,10 +185,14 @@ export default Vue.extend({
               justify-content: flex-end;
               gap: 12px;
               .button{
+                cursor: pointer;
                 padding: 10px 24px;
                 border-radius: 24px;
                 color: #4a3777;
                 background-color: #C8B3FD;
+                &.space{
+                  background: unset;
+                }
                 &.line{
                   outline: 1px solid #4a3777;
                   background-color: unset;

+ 11 - 6
src/views/user/me.vue

@@ -13,14 +13,18 @@ export default Vue.extend({
   },
   methods: {
     gotoAdmin() {
-      this.$router.push({ name: 'Dashboard' })
+      if (window.confirm('确定要切换至主办方身份吗?')) {
+        this.$router.push({ name: 'Dashboard' })
+      }
     },
     logout() {
-      this.$store.dispatch('logout').then(() => {
-        this.$router.push({
-          name: 'userRegister'
+      if (window.confirm('确定要退出登录吗?')) {
+        this.$store.dispatch('logout').then(() => {
+          this.$router.push({
+            name: 'userRegister'
+          })
         })
-      })
+      }
     }
   }
 })
@@ -30,7 +34,7 @@ export default Vue.extend({
   <div class="user-body">
     <div class="view">
       <div class="head-bar">
-        <div @click="$router.push({name:'userHome'})" class="search">搜索我报名的展会</div>
+        <div class="search" @click="$router.push({name:'userHome'})">搜索我报名的展会</div>
       </div>
       <div class="user-info">
         <div class="avatar-text">
@@ -92,6 +96,7 @@ export default Vue.extend({
           justify-content: flex-end;
           gap: 12px;
           .button{
+            cursor: pointer;
             padding: 10px 24px;
             border-radius: 24px;
             color: #4a3777;