Browse Source

修改url

old
jiangyy 4 years ago
parent
commit
3c894c5c1b
  1. 4
      src/components/parser/Parser.vue
  2. 11
      src/router/index.js
  3. 3
      src/utils/constants.js
  4. 8
      src/views/account/ForgetPwd.vue
  5. 3
      src/views/account/login.vue
  6. 7
      src/views/account/login/index.vue
  7. 18
      src/views/account/member.vue
  8. 8
      src/views/account/register/index.vue
  9. 3
      src/views/form/editor/DraggableItem.vue
  10. 2
      src/views/form/editor/IconsDialog.vue
  11. 16
      src/views/form/editor/index.vue
  12. 2
      src/views/form/index.vue
  13. 8
      src/views/form/logic/index.vue
  14. 7
      src/views/form/preview/ProjectForm.vue
  15. 10
      src/views/form/preview/index.vue
  16. 6
      src/views/form/publish/index.vue
  17. 10
      src/views/form/setting/index.vue
  18. 8
      src/views/form/statistics/analysis.vue
  19. 2
      src/views/form/statistics/index.vue
  20. 6
      src/views/form/theme/index.vue
  21. 14
      src/views/form/write/index.vue
  22. 20
      src/views/home/index.vue
  23. 6
      src/views/project/my/index.vue
  24. 6
      src/views/project/recycle/index.vue
  25. 6
      src/views/project/template/index.vue
  26. 2
      src/views/project/template/preview.vue
  27. 4
      src/views/redirect.vue

4
src/components/parser/Parser.vue

@ -264,7 +264,7 @@ function setValueLabel(event, config, scheme) {
// other // other
this.$set(this[this.formConf.labelFormModel], `${scheme.__vModel__}other`, '') this.$set(this[this.formConf.labelFormModel], `${scheme.__vModel__}other`, '')
// //
document.querySelector('.'+config.tag).querySelector(".item-other-input").value = "" document.querySelector('.' + config.tag).querySelector('.item-other-input').value = ''
} }
event.forEach(item => { event.forEach(item => {
// //
@ -286,7 +286,7 @@ function setValueLabel(event, config, scheme) {
// other // other
this.$set(this[this.formConf.labelFormModel], `${scheme.__vModel__}other`, '') this.$set(this[this.formConf.labelFormModel], `${scheme.__vModel__}other`, '')
// //
document.querySelector('.'+config.tag).querySelector(".item-other-input").value = "" document.querySelector('.' + config.tag).querySelector('.item-other-input').value = '""'
} }
} }
} else if (config.tag === 'el-upload') { } else if (config.tag === 'el-upload') {

11
src/router/index.js

@ -46,16 +46,19 @@ Router.prototype.replace = function replace(location) {
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start() NProgress.start()
if (to.meta.requireLogin) { if (to.meta.requireLogin) {
if (store.getters['user/isLogin']) { if (to.query.token) {
next()
NProgress.done()
} else if (to.query.token) {
console.log('ro.query', to.query) console.log('ro.query', to.query)
localStorage.setItem('loginSource', 'epmet')
store.dispatch('user/getUserInfo', to.query.token) store.dispatch('user/getUserInfo', to.query.token)
store.dispatch('user/setTokens', to.query.token) store.dispatch('user/setTokens', to.query.token)
next() next()
NProgress.done() NProgress.done()
} else if (store.getters['user/isLogin']) {
next()
NProgress.done()
} else { } else {
next({ next({
path: '/login', path: '/login',

3
src/utils/constants.js

@ -6,5 +6,6 @@ export default {
passwordRegDesc: '密码最少为6位字符', passwordRegDesc: '密码最少为6位字符',
userUploadUrl: `${process.env.VUE_APP_API_ROOT}/user/file/upload`, userUploadUrl: `${process.env.VUE_APP_API_ROOT}/user/file/upload`,
// 启用微信功能 // 启用微信功能
enableWx: process.env.VUE_APP_WX == 'OFF' // enableWx: process.env.VUE_APP_WX == 'OFF'
enableWx: false
} }

8
src/views/account/ForgetPwd.vue

@ -187,7 +187,7 @@ export default {
if (!err) { if (!err) {
this.emailValidateCodeBtn = true this.emailValidateCodeBtn = true
this.$api.request({ this.$api.request({
url: '/retrieve/password/phone/code', url: `${process.env.VUE_APP_API_ROOT_TDUCK}/retrieve/password/phone/code`,
method: 'get', method: 'get',
params: { phoneNumber: phoneNumber } params: { phoneNumber: phoneNumber }
}).then(() => { }).then(() => {
@ -210,7 +210,7 @@ export default {
phoneRetrievePassWordHandle() { phoneRetrievePassWordHandle() {
this.$refs['phoneForm'].validate(valid => { this.$refs['phoneForm'].validate(valid => {
if (valid) { if (valid) {
this.$api.post('/retrieve/password/check/phone-code', this.retrieveAccountForm).then(res => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/retrieve/password/check/phone-code`, this.retrieveAccountForm).then(res => {
if (res.data) { if (res.data) {
this.msgSuccess('验证成功') this.msgSuccess('验证成功')
this.resetPwdForm.code = res.data this.resetPwdForm.code = res.data
@ -224,7 +224,7 @@ export default {
resetPasswordHandle() { resetPasswordHandle() {
this.$refs['resetPwdForm'].validate(valid => { this.$refs['resetPwdForm'].validate(valid => {
if (valid) { if (valid) {
this.$api.post('/retrieve/password/reset', this.resetPwdForm).then(res => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/retrieve/password/reset`, this.resetPwdForm).then(res => {
if (res.data) { if (res.data) {
this.msgSuccess('密码重置成功,快去登录吧') this.msgSuccess('密码重置成功,快去登录吧')
setTimeout(() => { setTimeout(() => {
@ -246,7 +246,7 @@ export default {
this.$refs['emailForm'].validate(valid => { this.$refs['emailForm'].validate(valid => {
if (valid) { if (valid) {
this.$api.request({ this.$api.request({
url: '/retrieve/password/email', url: `${process.env.VUE_APP_API_ROOT_TDUCK}/retrieve/password/email`,
method: 'get', method: 'get',
params: { email: this.retrieveAccountForm.email } params: { email: this.retrieveAccountForm.email }
}).then(() => { }).then(() => {

3
src/views/account/login.vue

@ -375,7 +375,7 @@ export default {
this.$refs['phoneRegForm'].validateField('phoneNumber', err => { this.$refs['phoneRegForm'].validateField('phoneNumber', err => {
if (!err) { if (!err) {
this.phoneValidateCodeBtn = true this.phoneValidateCodeBtn = true
this.$api.get(`/register/phone/code?phoneNumber=${this.accountForm.phoneNumber}`).then(() => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/register/phone/code?phoneNumber=${this.accountForm.phoneNumber}`).then(() => {
this.msgSuccess('验证码发送成功,5分钟内有效') this.msgSuccess('验证码发送成功,5分钟内有效')
this.phoneValidateCodeBtn = true this.phoneValidateCodeBtn = true
let count = 60 let count = 60
@ -442,6 +442,7 @@ export default {
}) })
}, },
loginHandle() { loginHandle() {
localStorage.setItem('loginSource', 'loginPage')
this.$api.request({ this.$api.request({
url: `${process.env.VUE_APP_API_ROOT_TDUCK}/login/account`, url: `${process.env.VUE_APP_API_ROOT_TDUCK}/login/account`,

7
src/views/account/login/index.vue

@ -154,7 +154,7 @@ export default {
// //
getLoginWxQrCode() { getLoginWxQrCode() {
this.wxQrCodeLoading = true this.wxQrCodeLoading = true
this.$api.get('/login/wx/qrcode').then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/login/wx/qrcode`).then(res => {
this.wxLoginQrCode = res.data.qrCodeUrl this.wxLoginQrCode = res.data.qrCodeUrl
this.wxLoginId = res.data.loginId this.wxLoginId = res.data.loginId
}) })
@ -166,7 +166,7 @@ export default {
// qq // qq
getQQLoginAuthorizeUrl() { getQQLoginAuthorizeUrl() {
let reUrl = getCurrentDomain() + '/redirect/qqlogin' let reUrl = getCurrentDomain() + '/redirect/qqlogin'
this.$api.get('/login/qq/authorize/url', {params: {redirectUri: reUrl}}).then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/login/qq/authorize/url`, {params: {redirectUri: reUrl}}).then(res => {
this.qqLoginAuthorizeUrl = res.data this.qqLoginAuthorizeUrl = res.data
}) })
}, },
@ -174,7 +174,7 @@ export default {
location.href = url location.href = url
}, },
getLoginWxQrCodeResult() { getLoginWxQrCodeResult() {
this.$api.get('/login/wx/qrcode/result', {params: {loginId: this.wxLoginId}}).then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/login/wx/qrcode/result`, {params: {loginId: this.wxLoginId}}).then(res => {
if (res.data) { if (res.data) {
this.loginSuccessHandle(res.data) this.loginSuccessHandle(res.data)
} }
@ -205,6 +205,7 @@ export default {
this.loginType = 'account' this.loginType = 'account'
}, },
loginHandle() { loginHandle() {
localStorage.setItem('loginSource', 'loginPage')
this.$refs['accountLoginForm'].validate(valid => { this.$refs['accountLoginForm'].validate(valid => {
if (valid) { if (valid) {
this.$api.request({ this.$api.request({

18
src/views/account/member.vue

@ -299,7 +299,7 @@ export default {
}, },
methods: { methods: {
queryUserInfo() { queryUserInfo() {
this.$api.get('/user/current/detail').then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/current/detail`).then(res => {
if (res.data) { if (res.data) {
this.userInfo = res.data this.userInfo = res.data
this.$store.dispatch('user/update', this.userInfo).then(() => { this.$store.dispatch('user/update', this.userInfo).then(() => {
@ -317,14 +317,14 @@ export default {
return `${process.env.VUE_APP_API_ROOT}/user/file/upload` return `${process.env.VUE_APP_API_ROOT}/user/file/upload`
}, },
getBindWxQrCode() { getBindWxQrCode() {
this.$api.get('/user/bind/wx/qrcode').then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/bind/wx/qrcode`).then(res => {
this.bindWxQrcode = res.data this.bindWxQrcode = res.data
}) })
}, },
updateUserPwdHandle() { updateUserPwdHandle() {
this.$refs['updatePassWordForm'].validate(valid => { this.$refs['updatePassWordForm'].validate(valid => {
if (valid) { if (valid) {
this.$api.post('/user/update/password', this.userPwdForm).then(res => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/update/password`, this.userPwdForm).then(res => {
if (res.data) { if (res.data) {
this.msgSuccess('修改成功') this.msgSuccess('修改成功')
this.queryUserInfo() this.queryUserInfo()
@ -339,7 +339,7 @@ export default {
sendUpdateEmail() { sendUpdateEmail() {
this.$refs['updateEmailForm'].validateField('email', err => { this.$refs['updateEmailForm'].validateField('email', err => {
if (!err) { if (!err) {
this.$api.get('/user/update-email/msg', {params: {email: this.userInfoForm.email}}).then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/update-email/msg`, {params: {email: this.userInfoForm.email}}).then(res => {
if (res.data) { if (res.data) {
this.msgSuccess('发送成功,请去您的邮箱查看') this.msgSuccess('发送成功,请去您的邮箱查看')
this.emailDialogVisible = false this.emailDialogVisible = false
@ -351,7 +351,7 @@ export default {
sendUpdatePhoneNumber() { sendUpdatePhoneNumber() {
this.$refs['updatePhoneForm'].validateField('phoneNumber', err => { this.$refs['updatePhoneForm'].validateField('phoneNumber', err => {
if (!err) { if (!err) {
this.$api.get(`/user/update-phone/code?phoneNumber=${this.userInfoForm.phoneNumber}`).then(() => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/update-phone/code?phoneNumber=${this.userInfoForm.phoneNumber}`).then(() => {
this.msgSuccess('验证码发送成功,5分钟内有效') this.msgSuccess('验证码发送成功,5分钟内有效')
let count = 60 let count = 60
let timer = setInterval(() => { let timer = setInterval(() => {
@ -367,7 +367,7 @@ export default {
}) })
}, },
updateUserHandle() { updateUserHandle() {
this.$api.post('/user/update', this.userInfoForm).then(res => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/update`, this.userInfoForm).then(res => {
if (res.data) { if (res.data) {
this.msgSuccess('保存成功') this.msgSuccess('保存成功')
this.queryUserInfo() this.queryUserInfo()
@ -378,7 +378,7 @@ export default {
// qq // qq
getQQLoginAuthorizeUrl() { getQQLoginAuthorizeUrl() {
let reUrl = getCurrentDomain() + '/redirect/bindqq' let reUrl = getCurrentDomain() + '/redirect/bindqq'
this.$api.get('/login/qq/authorize/url', {params: {redirectUri: reUrl}}).then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/login/qq/authorize/url`, {params: {redirectUri: reUrl}}).then(res => {
this.qqLoginAuthorizeUrl = res.data this.qqLoginAuthorizeUrl = res.data
}) })
}, },
@ -388,7 +388,7 @@ export default {
updateUserPhoneHandle() { updateUserPhoneHandle() {
this.$refs['updatePhoneForm'].validateField(['phoneNumber', 'code'], err => { this.$refs['updatePhoneForm'].validateField(['phoneNumber', 'code'], err => {
if (!err) { if (!err) {
this.$api.post('/user/update/phone-number', this.userInfoForm).then(() => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/update/phone-number`, this.userInfoForm).then(() => {
this.msgSuccess('修改成功') this.msgSuccess('修改成功')
this.queryUserInfo() this.queryUserInfo()
}) })
@ -398,7 +398,7 @@ export default {
bindWxHandle() { bindWxHandle() {
this.bindWxDialogVisible = true this.bindWxDialogVisible = true
this.bindWxTimer = setInterval(() => { this.bindWxTimer = setInterval(() => {
this.$api.get('/user/current/detail').then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/current/detail`).then(res => {
if (res.data) { if (res.data) {
let {wxName} = res.data let {wxName} = res.data
if (wxName) { if (wxName) {

8
src/views/account/register/index.vue

@ -134,7 +134,7 @@ export default {
this.$refs['emailRegForm'].validateField('email', err => { this.$refs['emailRegForm'].validateField('email', err => {
if (!err) { if (!err) {
this.emailValidateCodeBtn = true this.emailValidateCodeBtn = true
this.$api.get(`/register/email/code?email=${this.accountForm.email}`).then(() => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/register/email/code?email=${this.accountForm.email}`).then(() => {
this.msgSuccess('验证码发送成功,5分钟内有效') this.msgSuccess('验证码发送成功,5分钟内有效')
this.emailValidateCodeBtn = true this.emailValidateCodeBtn = true
let count = 60 let count = 60
@ -155,7 +155,7 @@ export default {
this.$refs['phoneRegForm'].validateField('phoneNumber', err => { this.$refs['phoneRegForm'].validateField('phoneNumber', err => {
if (!err) { if (!err) {
this.phoneValidateCodeBtn = true this.phoneValidateCodeBtn = true
this.$api.get(`/register/phone/code?phoneNumber=${this.accountForm.phoneNumber}`).then(() => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/register/phone/code?phoneNumber=${this.accountForm.phoneNumber}`).then(() => {
this.msgSuccess('验证码发送成功,5分钟内有效') this.msgSuccess('验证码发送成功,5分钟内有效')
this.phoneValidateCodeBtn = true this.phoneValidateCodeBtn = true
let count = 60 let count = 60
@ -175,7 +175,7 @@ export default {
phoneRegHandle() { phoneRegHandle() {
this.$refs['phoneRegForm'].validate(valid => { this.$refs['phoneRegForm'].validate(valid => {
if (valid) { if (valid) {
this.$api.post('/register/phone', this.accountForm).then(() => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/register/phone`, this.accountForm).then(() => {
this.registerSuccessHandle() this.registerSuccessHandle()
}) })
} else { } else {
@ -186,7 +186,7 @@ export default {
emailRegHandle() { emailRegHandle() {
this.$refs['emailRegForm'].validate(valid => { this.$refs['emailRegForm'].validate(valid => {
if (valid) { if (valid) {
this.$api.post('/register/email', this.accountForm).then(() => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/register/email`, this.accountForm).then(() => {
this.registerSuccessHandle() this.registerSuccessHandle()
}) })
} else { } else {

3
src/views/form/editor/DraggableItem.vue

@ -1,4 +1,6 @@
<script> <script>
/* eslint-disable */
import draggable from 'vuedraggable' import draggable from 'vuedraggable'
import render from '@/components/render/render' import render from '@/components/render/render'
@ -114,6 +116,7 @@ export default {
render, render,
draggable draggable
}, },
props: [ props: [
'currentItem', 'currentItem',
'index', 'index',

2
src/views/form/editor/IconsDialog.vue

@ -1,3 +1,4 @@
<template> <template>
<div class="icon-dialog"> <div class="icon-dialog">
<el-dialog <el-dialog
@ -34,6 +35,7 @@
</div> </div>
</template> </template>
<script> <script>
/* eslint-disable */
import iconList from '@/utils/icon.json' import iconList from '@/utils/icon.json'
const originList = iconList.map(name => `el-icon-${name}`) const originList = iconList.map(name => `el-icon-${name}`)

16
src/views/form/editor/index.vue

@ -222,18 +222,18 @@ export default {
// //
this.queryProjectItems() this.queryProjectItems()
// //
this.$api.get(`/user/project/${this.projectKey}`).then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/${this.projectKey}`).then(res => {
this.formConf.title = res.data.name this.formConf.title = res.data.name
this.formConf.description = res.data.describe this.formConf.description = res.data.describe
}) })
// Id // Id
this.$api.get('/user/project/item/max-form-id', {params: {key: this.projectKey}}).then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/item/max-form-id`, {params: {key: this.projectKey}}).then(res => {
this.idGlobal = res.data ? res.data : 100 this.idGlobal = res.data ? res.data : 100
}) })
}, },
methods: { methods: {
saveProjectInfo: debounce(430, true, function() { saveProjectInfo: debounce(430, true, function() {
this.$api.post('/user/project/update', { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/update`, {
'key': this.projectKey, 'key': this.projectKey,
'name': this.formConf.title, 'name': this.formConf.title,
'describe': this.formConf.description 'describe': this.formConf.description
@ -243,13 +243,13 @@ export default {
}), }),
updateProjectItemInfo(val) { updateProjectItemInfo(val) {
let data = formItemConvertData(val, this.projectKey) let data = formItemConvertData(val, this.projectKey)
this.$api.post('/user/project/item/update', data).then(() => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/item/update`, data).then(() => {
}) })
}, },
deleteProjectItemInfo(val) { deleteProjectItemInfo(val) {
let data = formItemConvertData(val, this.projectKey) let data = formItemConvertData(val, this.projectKey)
this.$api.post('/user/project/item/delete', data).then(() => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/item/delete`, data).then(() => {
}) })
}, },
@ -257,7 +257,7 @@ export default {
let isSuccess = false let isSuccess = false
let params = formItemConvertData(item, this.projectKey) let params = formItemConvertData(item, this.projectKey)
let pItem = item let pItem = item
await this.$api.post('/user/project/item/create', params).then(res => { await this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/item/create`, params).then(res => {
pItem.sort = res.data.sort pItem.sort = res.data.sort
isSuccess = true isSuccess = true
}) })
@ -280,7 +280,7 @@ export default {
}) })
}, },
queryProjectItems() { queryProjectItems() {
this.$api.get('/user/project/item/list', {params: {key: this.projectKey}}).then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/item/list`, {params: {key: this.projectKey}}).then(res => {
this.drawingList = res.data.map(item => dbDataConvertForItemJson(item)) this.drawingList = res.data.map(item => dbDataConvertForItemJson(item))
// //
this.updatePaginationList() this.updatePaginationList()
@ -315,7 +315,7 @@ export default {
} }
params.formItemId = this.drawingList[obj.newIndex].__config__.formId params.formItemId = this.drawingList[obj.newIndex].__config__.formId
if (params.beforePosition || params.afterPosition) { if (params.beforePosition || params.afterPosition) {
this.$api.post('/user/project/item/sort', params).then(res => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/item/sort`, params).then(res => {
this.drawingList[obj.newIndex].sort = res.data.sort this.drawingList[obj.newIndex].sort = res.data.sort
}) })
} }

2
src/views/form/index.vue

@ -100,7 +100,7 @@ export default {
this.previewDialogVisible = true this.previewDialogVisible = true
}, },
saveProjectAsTemplateHandle() { saveProjectAsTemplateHandle() {
this.$api.post('/user/project/template/save', {key: this.projectKey}).then(() => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/template/save`, {key: this.projectKey}).then(() => {
this.msgSuccess('保存成功') this.msgSuccess('保存成功')
}) })
}, },

8
src/views/form/logic/index.vue

@ -207,7 +207,7 @@ export default {
removeConditionHandle(logicItem, logicIndex, index) { removeConditionHandle(logicItem, logicIndex, index) {
logicItem.conditionList.splice(index, 1) logicItem.conditionList.splice(index, 1)
if (logicItem.conditionList.length == 0) { if (logicItem.conditionList.length == 0) {
this.$api.post('/user/project/logic/delete', logicItem).then(() => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/logic/delete`, logicItem).then(() => {
this.logicList.splice(logicIndex, 1) this.logicList.splice(logicIndex, 1)
}) })
} }
@ -247,17 +247,17 @@ export default {
return [] return []
}, },
queryProjectLogics() { queryProjectLogics() {
this.$api.get('/user/project/logic/list', {params: {projectKey: this.projectKey}}).then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/logic/list`, {params: {projectKey: this.projectKey}}).then(res => {
this.logicList = res.data this.logicList = res.data
}) })
}, },
queryProjectItems() { queryProjectItems() {
this.$api.get('/user/project/item/list', {params: {key: this.projectKey}}).then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/item/list`, {params: {key: this.projectKey}}).then(res => {
this.allProjectItemList = res.data this.allProjectItemList = res.data
}) })
}, },
saveProjectLogic(data) { saveProjectLogic(data) {
this.$api.post('/user/project/logic/save', data).then(res => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/logic/save`, data).then(res => {
if (!data.id) { if (!data.id) {
let index = _.findIndex(this.logicList, {formItemId: data.formItemId}) let index = _.findIndex(this.logicList, {formItemId: data.formItemId})
this.logicList[index].id = res.data.id this.logicList[index].id = res.data.id

7
src/views/form/preview/ProjectForm.vue

@ -55,6 +55,7 @@ export default {
}, },
props: { props: {
projectConfig: { projectConfig: {
type: String,
projectKey: '', projectKey: '',
showBtns: true, showBtns: true,
// 1 2 // 1 2
@ -131,9 +132,9 @@ export default {
this.formConf.size = window.innerWidth < 480 ? 'medium' : 'small' this.formConf.size = window.innerWidth < 480 ? 'medium' : 'small'
}, },
async mounted() { async mounted() {
let url = `/user/project/details/${this.formConf.projectKey}` let url = `${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/details/${this.formConf.projectKey}`
if (this.formConf.projectKind == 2) { if (this.formConf.projectKind == 2) {
url = `/project/template/details/${this.formConf.projectKey}` url = `${process.env.VUE_APP_API_ROOT_TDUCK}/project/template/details/${this.formConf.projectKey}`
} }
let logicItemList = [] let logicItemList = []
// //
@ -253,7 +254,7 @@ export default {
// axios // axios
queryLogicItemList() { queryLogicItemList() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.$api.get('/user/project/logic/list', {params: {projectKey: this.formConf.projectKey}}) this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/logic/list`, {params: {projectKey: this.formConf.projectKey}})
.then(res => { .then(res => {
resolve(res) resolve(res)
}).catch(err => { }).catch(err => {

10
src/views/form/preview/index.vue

@ -16,12 +16,12 @@
/> />
</div> </div>
</div> </div>
<div v-if="mobilePreviewUrl&&previewQrcode" class="qrcode-view"> <!-- <div v-if="mobilePreviewUrl&&previewQrcode" class="qrcode-view">
<p>手机扫码查看效果</p> <p>手机扫码查看效果</p>
<vue-qr <vue-qr
v-if="mobilePreviewUrl&&previewQrcode" :size="194" :text="mobilePreviewUrl" v-if="mobilePreviewUrl&&previewQrcode" :size="194" :text="mobilePreviewUrl"
/> />
</div> </div> -->
</el-tab-pane> </el-tab-pane>
<el-tab-pane> <el-tab-pane>
<span slot="label"><i class="el-icon-monitor" /> <span slot="label"><i class="el-icon-monitor" />
@ -40,13 +40,13 @@
<script> <script>
import ProjectForm from './ProjectForm' import ProjectForm from './ProjectForm'
import VueQr from 'vue-qr' // import VueQr from 'vue-qr'
export default { export default {
name: 'PreView', name: 'PreView',
components: { components: {
ProjectForm, ProjectForm
VueQr // VueQr
}, },
props: { props: {
previewQrcode: null previewQrcode: null

6
src/views/form/publish/index.vue

@ -96,7 +96,7 @@ export default {
this.getProjectStatus() this.getProjectStatus()
}, methods: { }, methods: {
getProjectStatus() { getProjectStatus() {
this.$api.get(`/user/project/${this.projectKey}`).then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/${this.projectKey}`).then(res => {
if (res.data.status == 2) { if (res.data.status == 2) {
this.publishStatus = true this.publishStatus = true
} else { } else {
@ -105,13 +105,13 @@ export default {
}) })
}, },
publishProject() { publishProject() {
this.$api.post('/user/project/publish', {key: this.projectKey}).then(() => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/publish`, {key: this.projectKey}).then(() => {
this.publishStatus = true this.publishStatus = true
this.msgSuccess('发布成功') this.msgSuccess('发布成功')
}) })
}, },
stopPublishProject() { stopPublishProject() {
this.$api.post('/user/project/stop', {'key': this.projectKey}).then(res => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/stop`, {'key': this.projectKey}).then(res => {
if (res.data) { if (res.data) {
this.msgSuccess('停止成功') this.msgSuccess('停止成功')
this.getProjectStatus() this.getProjectStatus()

10
src/views/form/setting/index.vue

@ -683,7 +683,7 @@ export default {
}, },
queryUserProjectSetting() { queryUserProjectSetting() {
this.userProjectSettingData.projectKey = this.projectKey this.userProjectSettingData.projectKey = this.projectKey
this.$api.get(`/user/project/setting/${this.projectKey}`).then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/setting/${this.projectKey}`).then(res => {
if (res.data) { if (res.data) {
this.userProjectSettingData = res.data this.userProjectSettingData = res.data
let { let {
@ -712,7 +712,7 @@ export default {
}, },
saveUserProjectSetting() { saveUserProjectSetting() {
this.userProjectSettingData.projectKey = this.projectKey this.userProjectSettingData.projectKey = this.projectKey
this.$api.post('/user/project/setting/save', this.userProjectSettingData).then(() => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/setting/save`, this.userProjectSettingData).then(() => {
}) })
}, },
@ -724,7 +724,7 @@ export default {
}, 5 * 1000) }, 5 * 1000)
}, },
querySubNotifyWxUser(openIdStr) { querySubNotifyWxUser(openIdStr) {
this.$api.get('/user/project/wx/notify-user', { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/wx/notify-user`, {
params: { params: {
key: this.projectKey, key: this.projectKey,
openIdStr: openIdStr openIdStr: openIdStr
@ -741,7 +741,7 @@ export default {
}) })
}, },
getSubNotifyWxQrCode() { getSubNotifyWxQrCode() {
this.$api.get('user/project/wx/notify-qrcode', {params: {key: this.projectKey}}).then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}user/project/wx/notify-qrcode`, {params: {key: this.projectKey}}).then(res => {
this.subNotifyWxQrCode = res.data this.subNotifyWxQrCode = res.data
}) })
}, },
@ -749,7 +749,7 @@ export default {
if (this.subNotifyWxUserList) { if (this.subNotifyWxUserList) {
let openId = this.subNotifyWxUserList[i].openId let openId = this.subNotifyWxUserList[i].openId
let key = this.projectKey let key = this.projectKey
this.$api.post(`/user/project/wx/delete/notify-user?key=${key}&openId=${openId}`).then(() => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/wx/delete/notify-user?key=${key}&openId=${openId}`).then(() => {
this.subNotifyWxUserList.splice(i) this.subNotifyWxUserList.splice(i)
this.userProjectSettingData.newWriteNotifyWx = this.subNotifyWxUserList.map(item => item.openId).join(';') this.userProjectSettingData.newWriteNotifyWx = this.subNotifyWxUserList.map(item => item.openId).join(';')
this.saveUserProjectSetting() this.saveUserProjectSetting()

8
src/views/form/statistics/analysis.vue

@ -10,10 +10,10 @@
<span>图表类型</span> <span>图表类型</span>
<el-select v-model="item.chartType" placeholder="请选择"> <el-select v-model="item.chartType" placeholder="请选择">
<el-option <el-option
v-for="item in options" v-for="subItem in options"
:key="item.value" :key="subItem.value"
:label="item.label" :label="subItem.label"
:value="item.value" :value="subItem.value"
/> />
</el-select> </el-select>
</div> </div>

2
src/views/form/statistics/index.vue

@ -41,7 +41,7 @@ export default {
<style scoped> <style scoped>
.statistics-tabs { .statistics-tabs {
padding: 20px; padding: 20px;
//width: 99%;
height: 100%; height: 100%;
} }

6
src/views/form/theme/index.vue

@ -329,12 +329,12 @@ export default {
saveUserTheme() { saveUserTheme() {
this.userProjectTheme.projectKey = this.projectKey this.userProjectTheme.projectKey = this.projectKey
this.userProjectTheme.themeId = this.activeTheme ? this.activeTheme.id : '' this.userProjectTheme.themeId = this.activeTheme ? this.activeTheme.id : ''
this.$api.post('/user/project/theme/save', this.userProjectTheme).then(() => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/theme/save`, this.userProjectTheme).then(() => {
this.projectFormKey = +new Date() this.projectFormKey = +new Date()
}) })
}, },
queryUserProjectTheme() { queryUserProjectTheme() {
this.$api.get(`/user/project/theme/${this.projectKey}`).then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/theme/${this.projectKey}`).then(res => {
if (!res.data) { if (!res.data) {
return return
} }
@ -372,7 +372,7 @@ export default {
this.queryProjectTheme() this.queryProjectTheme()
}, },
queryProjectTheme() { queryProjectTheme() {
this.$api.get('/project/theme/list', { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/project/theme/list`, {
params: { params: {
'color': this.activeColor, 'color': this.activeColor,
'style': this.activeStyle 'style': this.activeStyle

14
src/views/form/write/index.vue

@ -97,7 +97,7 @@ export default {
this.queryProjectSetting() this.queryProjectSetting()
if (constants.enableWx) { if (constants.enableWx) {
// //
this.$api.get('/wx/jsapi/signature', {params: {url: window.location.href}}).then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/wx/jsapi/signature`, {params: {url: window.location.href}}).then(res => {
this.wxSignature = res.data this.wxSignature = res.data
this.setWxConfig() this.setWxConfig()
}) })
@ -109,13 +109,13 @@ export default {
}, methods: { }, methods: {
viewProjectHandle() { viewProjectHandle() {
// //
this.$api.post(`/user/project/result/view/${this.projectConfig.projectKey}`, {params: {projectKey: this.projectConfig.projectKey}}).then(() => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/result/view/${this.projectConfig.projectKey}`, {params: {projectKey: this.projectConfig.projectKey}}).then(() => {
}) })
}, },
queryProjectSettingStatus() { queryProjectSettingStatus() {
// //
this.$api.get('/user/project/setting-status', { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/setting-status`, {
params: { params: {
projectKey: this.projectConfig.projectKey, projectKey: this.projectConfig.projectKey,
wxOpenId: this.wxUserInfo ? this.wxUserInfo.openid : '' wxOpenId: this.wxUserInfo ? this.wxUserInfo.openid : ''
@ -130,7 +130,7 @@ export default {
getWxAuthorizationUserInfo() { getWxAuthorizationUserInfo() {
let wxAuthorizationCode = this.wxAuthorizationCode let wxAuthorizationCode = this.wxAuthorizationCode
// code // code
this.$api.get('/wx/jsapi/authorization/user/info', { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/wx/jsapi/authorization/user/info`, {
params: { params: {
code: wxAuthorizationCode code: wxAuthorizationCode
} }
@ -143,7 +143,7 @@ export default {
}, },
getWxAuthorizationUrl() { getWxAuthorizationUrl() {
// url // url
this.$api.get('/wx/jsapi/authorization/url', {params: {url: window.location.href}}).then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/wx/jsapi/authorization/url`, {params: {url: window.location.href}}).then(res => {
if (res.data) { if (res.data) {
this.wxAuthorizationUrl = res.data this.wxAuthorizationUrl = res.data
} }
@ -230,7 +230,7 @@ export default {
}) })
}, },
queryProjectSetting() { queryProjectSetting() {
this.$api.get(`/user/project/setting/${this.projectConfig.projectKey}`).then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/setting/${this.projectConfig.projectKey}`).then(res => {
if (res.data) { if (res.data) {
this.userProjectSetting = res.data this.userProjectSetting = res.data
// //
@ -263,7 +263,7 @@ export default {
submitForm(data) { submitForm(data) {
// //
let inActiveTime = document.getElementById('inActiveTime').innerText let inActiveTime = document.getElementById('inActiveTime').innerText
this.$api.post('/user/project/result/create', { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/result/create`, {
'completeTime': inActiveTime, 'completeTime': inActiveTime,
'projectKey': this.projectConfig.projectKey, 'projectKey': this.projectConfig.projectKey,
'submitOs': ua.os.name, 'submitOs': ua.os.name,

20
src/views/home/index.vue

File diff suppressed because one or more lines are too long

6
src/views/project/my/index.vue

@ -283,7 +283,7 @@ export default {
this.$router.push({path: `/project/form/${type}`, query: {key: key, active: type}}) this.$router.push({path: `/project/form/${type}`, query: {key: key, active: type}})
}, },
deleteProject(key) { deleteProject(key) {
this.$api.post('/user/project/delete', {'key': key}).then(res => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/delete`, {'key': key}).then(res => {
if (res.data) { if (res.data) {
this.msgSuccess('刪除成功') this.msgSuccess('刪除成功')
this.queryProjectPage() this.queryProjectPage()
@ -291,7 +291,7 @@ export default {
}) })
}, },
stopProject(key) { stopProject(key) {
this.$api.post('/user/project/stop', {'key': key}).then(res => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/stop`, {'key': key}).then(res => {
if (res.data) { if (res.data) {
this.msgSuccess('停止成功') this.msgSuccess('停止成功')
this.queryProjectPage() this.queryProjectPage()
@ -299,7 +299,7 @@ export default {
}) })
}, },
queryProjectPage() { queryProjectPage() {
this.$api.get('/user/project/page', { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/page`, {
params: this.queryParams params: this.queryParams
}).then(res => { }).then(res => {
let {records, total, size} = res.data let {records, total, size} = res.data

6
src/views/project/recycle/index.vue

@ -93,7 +93,7 @@ export default {
}, },
methods: { methods: {
restoreProject(key) { restoreProject(key) {
this.$api.post('/user/project/recycle/restore', {'key': key}).then(res => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/recycle/restore`, {'key': key}).then(res => {
if (res.data) { if (res.data) {
this.msgSuccess('恢复成功') this.msgSuccess('恢复成功')
this.queryRecycleProjectPage() this.queryRecycleProjectPage()
@ -101,7 +101,7 @@ export default {
}) })
}, },
deleteProject(key) { deleteProject(key) {
this.$api.post('/user/project/recycle/delete', {'key': key}).then(res => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/recycle/delete`, {'key': key}).then(res => {
if (res.data) { if (res.data) {
this.msgSuccess('刪除成功') this.msgSuccess('刪除成功')
this.queryRecycleProjectPage() this.queryRecycleProjectPage()
@ -109,7 +109,7 @@ export default {
}) })
}, },
queryRecycleProjectPage() { queryRecycleProjectPage() {
this.$api.get('/user/project/recycle/page', { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/recycle/page`, {
params: this.queryParams params: this.queryParams
}).then(res => { }).then(res => {
let {records, total, size} = res.data let {records, total, size} = res.data

6
src/views/project/template/index.vue

@ -112,7 +112,7 @@ export default {
}, },
methods: { methods: {
queryTemplateType() { queryTemplateType() {
this.$api.get('/project/template/type/list').then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/project/template/type/list`).then(res => {
this.templateTypeList = res.data this.templateTypeList = res.data
}) })
}, },
@ -120,7 +120,7 @@ export default {
this.$router.push({path: '/project/template/preview', query: {key: key}}) this.$router.push({path: '/project/template/preview', query: {key: key}})
}, },
queryTemplatePage() { queryTemplatePage() {
this.$api.get('/project/template/page', {params: this.queryParams}).then(res => { this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/project/template/page`, {params: this.queryParams}).then(res => {
let {records, total, size} = res.data let {records, total, size} = res.data
this.templateList = records this.templateList = records
this.total = total this.total = total
@ -129,7 +129,7 @@ export default {
}) })
}, },
createBlankTemplate() { createBlankTemplate() {
this.$api.post('/user/project/create', { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/create`, {
'describe': formConf.description, 'describe': formConf.description,
'name': formConf.title 'name': formConf.title
}).then(res => { }).then(res => {

2
src/views/project/template/preview.vue

@ -52,7 +52,7 @@ export default {
methods: { methods: {
createProjectByTemplate() { createProjectByTemplate() {
this.createProjectLoading = true this.createProjectLoading = true
this.$api.post('/user/project/use-template/create', {'key': this.projectConfig.projectKey}).then(res => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/use-template/create`, {'key': this.projectConfig.projectKey}).then(res => {
this.createProjectLoading = false this.createProjectLoading = false
if (res.data) { if (res.data) {
this.$router.push({path: '/project/form', query: {key: res.data, active: 1}}) this.$router.push({path: '/project/form', query: {key: res.data, active: 1}})

4
src/views/redirect.vue

@ -25,7 +25,7 @@ export default {
let state = getQueryString('state') let state = getQueryString('state')
if (code && state) { if (code && state) {
let reUrl = getCurrentDomain() + '/redirect/bindqq' let reUrl = getCurrentDomain() + '/redirect/bindqq'
this.$api.post('/user/bind/qq', {authorizeCode: code, redirectUri: reUrl}).then(res => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/bind/qq`, {authorizeCode: code, redirectUri: reUrl}).then(res => {
if (res.data) { if (res.data) {
this.msgSuccess('绑定成功') this.msgSuccess('绑定成功')
window.close() window.close()
@ -41,7 +41,7 @@ export default {
let state = getQueryString('state') let state = getQueryString('state')
if (code && state) { if (code && state) {
let reUrl = getCurrentDomain() + '/redirect/qqlogin' let reUrl = getCurrentDomain() + '/redirect/qqlogin'
this.$api.post('/login/qq', {authorizeCode: code, redirectUri: reUrl}).then(res => { this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/login/qq`, {authorizeCode: code, redirectUri: reUrl}).then(res => {
if (res.data) { if (res.data) {
this.msgSuccess('登录成功') this.msgSuccess('登录成功')
this.$store.dispatch('user/login', res.data).then(() => { this.$store.dispatch('user/login', res.data).then(() => {

Loading…
Cancel
Save