更名、修复测试部署时的报错和bug

soul2/encrypt
soul2 1 year ago
parent 1f2700486d
commit 20087753cc
  1. 2
      .env.development
  2. 3
      .env.production
  3. 44
      src/layout/components/Navbar.vue
  4. 1
      src/router/index.js
  5. 2
      src/settings.js
  6. 2
      src/views/dashboard/index.vue
  7. 2
      src/views/qr/edit.vue
  8. 1
      src/views/qr/index.vue
  9. 23
      src/views/subject/edit.vue
  10. 4
      vue.config.js

@ -2,6 +2,6 @@
ENV = 'development' ENV = 'development'
# base api # base api
VUE_APP_BASE_API = 'http://localhost:7600' VUE_APP_BASE_API = 'http://localhost:7600/thli/jyjc/api'
port = 6100 port = 6100

@ -2,5 +2,6 @@
ENV = 'production' ENV = 'production'
# base api # base api
VUE_APP_BASE_API = '/prod-api' VUE_APP_BASE_API = 'api'
#VUE_APP_BASE_API = 'test.soul2.cn/thli/jyjc/api'

@ -5,28 +5,28 @@
<breadcrumb class="breadcrumb-container"/> <breadcrumb class="breadcrumb-container"/>
<div class="right-menu"> <div class="right-menu">
<el-dropdown class="avatar-container" trigger="click"> <!-- <el-dropdown class="avatar-container" trigger="click">-->
<div class="avatar-wrapper"> <!-- <div class="avatar-wrapper">-->
<img :src="avatar+'?imageView2/1/w/80/h/80'" class="user-avatar"> <!-- <img :src="avatar+'?imageView2/1/w/80/h/80'" class="user-avatar">-->
<i class="el-icon-caret-bottom"/> <!-- <i class="el-icon-caret-bottom"/>-->
</div> <!-- </div>-->
<el-dropdown-menu slot="dropdown" class="user-dropdown"> <!-- <el-dropdown-menu slot="dropdown" class="user-dropdown">-->
<router-link to="/"> <!-- <router-link to="/">-->
<el-dropdown-item> <!-- <el-dropdown-item>-->
Home <!-- Home-->
</el-dropdown-item> <!-- </el-dropdown-item>-->
</router-link> <!-- </router-link>-->
<a target="_blank" href="https://github.com/PanJiaChen/vue-admin-template/"> <!-- <a target="_blank" href="https://github.com/PanJiaChen/vue-admin-template/">-->
<el-dropdown-item>Github</el-dropdown-item> <!-- <el-dropdown-item>Github</el-dropdown-item>-->
</a> <!-- </a>-->
<a target="_blank" href="https://panjiachen.github.io/vue-element-admin-site/#/"> <!-- <a target="_blank" href="https://panjiachen.github.io/vue-element-admin-site/#/">-->
<el-dropdown-item>Docs</el-dropdown-item> <!-- <el-dropdown-item>Docs</el-dropdown-item>-->
</a> <!-- </a>-->
<el-dropdown-item divided @click.native="logout"> <!-- <el-dropdown-item divided @click.native="logout">-->
<span style="display:block;">Log Out</span> <!-- <span style="display:block;">Log Out</span>-->
</el-dropdown-item> <!-- </el-dropdown-item>-->
</el-dropdown-menu> <!-- </el-dropdown-menu>-->
</el-dropdown> <!-- </el-dropdown>-->
</div> </div>
</div> </div>
</template> </template>

@ -112,6 +112,7 @@ export const constantRoutes = [
const createRouter = () => new Router({ const createRouter = () => new Router({
mode: 'history', // require service support mode: 'history', // require service support
base: '/thli/jyjc/',
scrollBehavior: () => ({ y: 0 }), scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes routes: constantRoutes
}) })

@ -1,6 +1,6 @@
module.exports = { module.exports = {
title: 'Vue Demo For Soul2', title: 'jyjc-admin',
/** /**
* @type {boolean} true | false * @type {boolean} true | false

@ -1,6 +1,6 @@
<template> <template>
<div class="dashboard-container"> <div class="dashboard-container">
<div class="dashboard-text">name: {{ name }}</div> <div class="dashboard-text">欢迎使用</div>
</div> </div>
</template> </template>

@ -74,7 +74,7 @@ export default {
// //
}, },
beforeSave() { beforeSave() {
if (this.row.qrUrl != null && this.row.qrUrl !== this.edit.qrUrl) { if (this.row && this.row.qrUrl != null && this.row.qrUrl !== this.edit.qrUrl) {
this.$confirm('你更改了二维码Url,这可能带来一些意外的结果, 是否继续?', '警告', { this.$confirm('你更改了二维码Url,这可能带来一些意外的结果, 是否继续?', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消(维持原值)', cancelButtonText: '取消(维持原值)',

@ -191,6 +191,7 @@ export default {
.catch(() => { .catch(() => {
loading.close() loading.close()
}) })
}).catch(r => {
}) })
}, },
/* Base */ /* Base */

@ -123,11 +123,11 @@ export default {
if (this.row !== null) { if (this.row !== null) {
this.edit = JSON.parse(JSON.stringify(this.row)) this.edit = JSON.parse(JSON.stringify(this.row))
// console.log(this.edit) // console.log(this.edit)
items({ id: this.row.id }).then(r => {
this.edit.items = r.data.items
// console.log('edit.items -> ', this.edit.items)
})
} }
items({ id: this.row.id }).then(r => {
this.edit.items = r.data.items
console.log('edit.items -> ', this.edit.items)
})
}, },
methods: { methods: {
handleRemoveItem(i) { handleRemoveItem(i) {
@ -147,13 +147,14 @@ export default {
background: this.$elementGlobal.loadingBackground background: this.$elementGlobal.loadingBackground
}) })
// //
this.edit.items = this.edit.items.filter(e => { if (this.edit.items != null) {
let empty = true this.edit.items = this.edit.items.filter(e => {
for (let key in e) { return e.content != null || e.points != null || e.weights != null
if (key !== 'isRight' && e[key] != null) empty = false })
} } else {
return empty this.edit.items = []
}) }
// console.log('edit -> ', this.edit)
saveOrUpdate(this.edit) saveOrUpdate(this.edit)
.then(r => { .then(r => {
loading.close() loading.close()

@ -24,7 +24,7 @@ module.exports = {
* In most cases please use '/' !!! * In most cases please use '/' !!!
* Detail: https://cli.vuejs.org/config/#publicpath * Detail: https://cli.vuejs.org/config/#publicpath
*/ */
publicPath: '/', publicPath: '/thli/jyjc/',
outputDir: 'dist', outputDir: 'dist',
assetsDir: 'static', assetsDir: 'static',
lintOnSave: process.env.NODE_ENV === 'development', lintOnSave: process.env.NODE_ENV === 'development',
@ -36,7 +36,7 @@ module.exports = {
warnings: false, warnings: false,
errors: true errors: true
}, },
before: require('./mock/mock-server.js') // before: require('./mock/mock-server.js')
}, },
configureWebpack: { configureWebpack: {
// provide the app's title in webpack's name field, so that // provide the app's title in webpack's name field, so that

Loading…
Cancel
Save