Browse Source

修改url

old
jiangyy 4 years ago
parent
commit
3c894c5c1b
  1. 16
      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/statistics/item.vue
  21. 6
      src/views/form/theme/index.vue
  22. 14
      src/views/form/write/index.vue
  23. 20
      src/views/home/index.vue
  24. 6
      src/views/project/my/index.vue
  25. 6
      src/views/project/recycle/index.vue
  26. 6
      src/views/project/template/index.vue
  27. 2
      src/views/project/template/preview.vue
  28. 4
      src/views/redirect.vue

16
src/components/parser/Parser.vue

@ -260,11 +260,11 @@ function setValueLabel(event, config, scheme) {
if (event instanceof Array) {
//
let labelArr = new Array()
if(!event.includes(0)){
// other
this.$set(this[this.formConf.labelFormModel], `${scheme.__vModel__}other`, '')
//
document.querySelector('.'+config.tag).querySelector(".item-other-input").value = ""
if (!event.includes(0)) {
// other
this.$set(this[this.formConf.labelFormModel], `${scheme.__vModel__}other`, '')
//
document.querySelector('.' + config.tag).querySelector('.item-other-input').value = ''
}
event.forEach(item => {
//
@ -279,14 +279,14 @@ function setValueLabel(event, config, scheme) {
// labelfieldfieldother
let item = _.find(_.get(scheme, tagOptionKey), {'value': event})
this.$set(this[this.formConf.labelFormModel], scheme.__vModel__, item.label)
this.$set(this[this.formConf.labelFormModel], `${scheme.__vModel__}other`,this[this.formConf.labelFormModel][`${scheme.__vModel__}other`])
this.$set(this[this.formConf.labelFormModel], `${scheme.__vModel__}other`, this[this.formConf.labelFormModel][`${scheme.__vModel__}other`])
} else {
let item = _.find(_.get(scheme, tagOptionKey), {'value': event})
this.$set(this[this.formConf.labelFormModel], scheme.__vModel__, item.label)
// 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') {

11
src/router/index.js

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

3
src/utils/constants.js

@ -6,5 +6,6 @@ export default {
passwordRegDesc: '密码最少为6位字符',
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) {
this.emailValidateCodeBtn = true
this.$api.request({
url: '/retrieve/password/phone/code',
url: `${process.env.VUE_APP_API_ROOT_TDUCK}/retrieve/password/phone/code`,
method: 'get',
params: { phoneNumber: phoneNumber }
}).then(() => {
@ -210,7 +210,7 @@ export default {
phoneRetrievePassWordHandle() {
this.$refs['phoneForm'].validate(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) {
this.msgSuccess('验证成功')
this.resetPwdForm.code = res.data
@ -224,7 +224,7 @@ export default {
resetPasswordHandle() {
this.$refs['resetPwdForm'].validate(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) {
this.msgSuccess('密码重置成功,快去登录吧')
setTimeout(() => {
@ -246,7 +246,7 @@ export default {
this.$refs['emailForm'].validate(valid => {
if (valid) {
this.$api.request({
url: '/retrieve/password/email',
url: `${process.env.VUE_APP_API_ROOT_TDUCK}/retrieve/password/email`,
method: 'get',
params: { email: this.retrieveAccountForm.email }
}).then(() => {

3
src/views/account/login.vue

@ -375,7 +375,7 @@ export default {
this.$refs['phoneRegForm'].validateField('phoneNumber', err => {
if (!err) {
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.phoneValidateCodeBtn = true
let count = 60
@ -442,6 +442,7 @@ export default {
})
},
loginHandle() {
localStorage.setItem('loginSource', 'loginPage')
this.$api.request({
url: `${process.env.VUE_APP_API_ROOT_TDUCK}/login/account`,

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

@ -154,7 +154,7 @@ export default {
//
getLoginWxQrCode() {
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.wxLoginId = res.data.loginId
})
@ -166,7 +166,7 @@ export default {
// qq
getQQLoginAuthorizeUrl() {
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
})
},
@ -174,7 +174,7 @@ export default {
location.href = url
},
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) {
this.loginSuccessHandle(res.data)
}
@ -205,6 +205,7 @@ export default {
this.loginType = 'account'
},
loginHandle() {
localStorage.setItem('loginSource', 'loginPage')
this.$refs['accountLoginForm'].validate(valid => {
if (valid) {
this.$api.request({

18
src/views/account/member.vue

@ -299,7 +299,7 @@ export default {
},
methods: {
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) {
this.userInfo = res.data
this.$store.dispatch('user/update', this.userInfo).then(() => {
@ -317,14 +317,14 @@ export default {
return `${process.env.VUE_APP_API_ROOT}/user/file/upload`
},
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
})
},
updateUserPwdHandle() {
this.$refs['updatePassWordForm'].validate(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) {
this.msgSuccess('修改成功')
this.queryUserInfo()
@ -339,7 +339,7 @@ export default {
sendUpdateEmail() {
this.$refs['updateEmailForm'].validateField('email', 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) {
this.msgSuccess('发送成功,请去您的邮箱查看')
this.emailDialogVisible = false
@ -351,7 +351,7 @@ export default {
sendUpdatePhoneNumber() {
this.$refs['updatePhoneForm'].validateField('phoneNumber', 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分钟内有效')
let count = 60
let timer = setInterval(() => {
@ -367,7 +367,7 @@ export default {
})
},
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) {
this.msgSuccess('保存成功')
this.queryUserInfo()
@ -378,7 +378,7 @@ export default {
// qq
getQQLoginAuthorizeUrl() {
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
})
},
@ -388,7 +388,7 @@ export default {
updateUserPhoneHandle() {
this.$refs['updatePhoneForm'].validateField(['phoneNumber', 'code'], 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.queryUserInfo()
})
@ -398,7 +398,7 @@ export default {
bindWxHandle() {
this.bindWxDialogVisible = true
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) {
let {wxName} = res.data
if (wxName) {

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

@ -134,7 +134,7 @@ export default {
this.$refs['emailRegForm'].validateField('email', err => {
if (!err) {
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.emailValidateCodeBtn = true
let count = 60
@ -155,7 +155,7 @@ export default {
this.$refs['phoneRegForm'].validateField('phoneNumber', err => {
if (!err) {
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.phoneValidateCodeBtn = true
let count = 60
@ -175,7 +175,7 @@ export default {
phoneRegHandle() {
this.$refs['phoneRegForm'].validate(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()
})
} else {
@ -186,7 +186,7 @@ export default {
emailRegHandle() {
this.$refs['emailRegForm'].validate(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()
})
} else {

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

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

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

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

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

@ -222,18 +222,18 @@ export default {
//
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.description = res.data.describe
})
// 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
})
},
methods: {
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,
'name': this.formConf.title,
'describe': this.formConf.description
@ -243,13 +243,13 @@ export default {
}),
updateProjectItemInfo(val) {
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) {
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 params = formItemConvertData(item, this.projectKey)
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
isSuccess = true
})
@ -280,7 +280,7 @@ export default {
})
},
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.updatePaginationList()
@ -315,7 +315,7 @@ export default {
}
params.formItemId = this.drawingList[obj.newIndex].__config__.formId
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
})
}

2
src/views/form/index.vue

@ -100,7 +100,7 @@ export default {
this.previewDialogVisible = true
},
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('保存成功')
})
},

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

@ -207,7 +207,7 @@ export default {
removeConditionHandle(logicItem, logicIndex, index) {
logicItem.conditionList.splice(index, 1)
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)
})
}
@ -247,17 +247,17 @@ export default {
return []
},
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
})
},
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
})
},
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) {
let index = _.findIndex(this.logicList, {formItemId: data.formItemId})
this.logicList[index].id = res.data.id

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

@ -55,6 +55,7 @@ export default {
},
props: {
projectConfig: {
type: String,
projectKey: '',
showBtns: true,
// 1 2
@ -131,9 +132,9 @@ export default {
this.formConf.size = window.innerWidth < 480 ? 'medium' : 'small'
},
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) {
url = `/project/template/details/${this.formConf.projectKey}`
url = `${process.env.VUE_APP_API_ROOT_TDUCK}/project/template/details/${this.formConf.projectKey}`
}
let logicItemList = []
//
@ -253,7 +254,7 @@ export default {
// axios
queryLogicItemList() {
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 => {
resolve(res)
}).catch(err => {

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

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

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

@ -96,7 +96,7 @@ export default {
this.getProjectStatus()
}, methods: {
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) {
this.publishStatus = true
} else {
@ -105,13 +105,13 @@ export default {
})
},
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.msgSuccess('发布成功')
})
},
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) {
this.msgSuccess('停止成功')
this.getProjectStatus()

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

@ -683,7 +683,7 @@ export default {
},
queryUserProjectSetting() {
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) {
this.userProjectSettingData = res.data
let {
@ -712,7 +712,7 @@ export default {
},
saveUserProjectSetting() {
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)
},
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: {
key: this.projectKey,
openIdStr: openIdStr
@ -741,7 +741,7 @@ export default {
})
},
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
})
},
@ -749,7 +749,7 @@ export default {
if (this.subNotifyWxUserList) {
let openId = this.subNotifyWxUserList[i].openId
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.userProjectSettingData.newWriteNotifyWx = this.subNotifyWxUserList.map(item => item.openId).join(';')
this.saveUserProjectSetting()

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

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

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

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

6
src/views/form/statistics/item.vue

@ -60,9 +60,9 @@ export default {
return this.resultData ? this.resultData['processData'] : {}
},
getItemValue() {
if(this.processData[`field${this.fieldItemId}other`]){
// lable+
return this.processData[`field${this.fieldItemId}`] + ':'+this.processData[`field${this.fieldItemId}other`]
if (this.processData[`field${this.fieldItemId}other`]) {
// lable+
return this.processData[`field${this.fieldItemId}`] + ':' + this.processData[`field${this.fieldItemId}other`]
}
return this.processData[`field${this.fieldItemId}`] ? this.processData[`field${this.fieldItemId}`] : ''
}

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

@ -329,12 +329,12 @@ export default {
saveUserTheme() {
this.userProjectTheme.projectKey = this.projectKey
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()
})
},
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) {
return
}
@ -372,7 +372,7 @@ export default {
this.queryProjectTheme()
},
queryProjectTheme() {
this.$api.get('/project/theme/list', {
this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/project/theme/list`, {
params: {
'color': this.activeColor,
'style': this.activeStyle

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

@ -97,7 +97,7 @@ export default {
this.queryProjectSetting()
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.setWxConfig()
})
@ -109,13 +109,13 @@ export default {
}, methods: {
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() {
//
this.$api.get('/user/project/setting-status', {
this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/setting-status`, {
params: {
projectKey: this.projectConfig.projectKey,
wxOpenId: this.wxUserInfo ? this.wxUserInfo.openid : ''
@ -130,7 +130,7 @@ export default {
getWxAuthorizationUserInfo() {
let wxAuthorizationCode = this.wxAuthorizationCode
// 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: {
code: wxAuthorizationCode
}
@ -143,7 +143,7 @@ export default {
},
getWxAuthorizationUrl() {
// 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) {
this.wxAuthorizationUrl = res.data
}
@ -230,7 +230,7 @@ export default {
})
},
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) {
this.userProjectSetting = res.data
//
@ -263,7 +263,7 @@ export default {
submitForm(data) {
//
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,
'projectKey': this.projectConfig.projectKey,
'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}})
},
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) {
this.msgSuccess('刪除成功')
this.queryProjectPage()
@ -291,7 +291,7 @@ export default {
})
},
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) {
this.msgSuccess('停止成功')
this.queryProjectPage()
@ -299,7 +299,7 @@ export default {
})
},
queryProjectPage() {
this.$api.get('/user/project/page', {
this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/page`, {
params: this.queryParams
}).then(res => {
let {records, total, size} = res.data

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

@ -93,7 +93,7 @@ export default {
},
methods: {
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) {
this.msgSuccess('恢复成功')
this.queryRecycleProjectPage()
@ -101,7 +101,7 @@ export default {
})
},
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) {
this.msgSuccess('刪除成功')
this.queryRecycleProjectPage()
@ -109,7 +109,7 @@ export default {
})
},
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
}).then(res => {
let {records, total, size} = res.data

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

@ -112,7 +112,7 @@ export default {
},
methods: {
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
})
},
@ -120,7 +120,7 @@ export default {
this.$router.push({path: '/project/template/preview', query: {key: key}})
},
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
this.templateList = records
this.total = total
@ -129,7 +129,7 @@ export default {
})
},
createBlankTemplate() {
this.$api.post('/user/project/create', {
this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/project/create`, {
'describe': formConf.description,
'name': formConf.title
}).then(res => {

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

@ -52,7 +52,7 @@ export default {
methods: {
createProjectByTemplate() {
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
if (res.data) {
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')
if (code && state) {
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) {
this.msgSuccess('绑定成功')
window.close()
@ -41,7 +41,7 @@ export default {
let state = getQueryString('state')
if (code && state) {
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) {
this.msgSuccess('登录成功')
this.$store.dispatch('user/login', res.data).then(() => {

Loading…
Cancel
Save