diff --git a/.env.development b/.env.development index cf41b70..d764f67 100644 --- a/.env.development +++ b/.env.development @@ -9,3 +9,5 @@ VUE_APP_CDN = OFF VUE_APP_DEBUG_TOOL = # 高德地图key VUE_APP_MAP_KEY = f2200337d0d08538e78729572749882d +# 微信功能开关 开启设置 ON,关闭设置 OFF +VUE_APP_WX = ON diff --git a/.env.production b/.env.production index 3741072..c414eda 100644 --- a/.env.production +++ b/.env.production @@ -9,3 +9,5 @@ VUE_APP_CDN = OFF VUE_APP_DEBUG_TOOL = # 高德地图key VUE_APP_MAP_KEY = f2200337d0d08538e78729572749882d +# 微信功能开关 开启设置 ON,关闭设置 OFF +VUE_APP_WX = ON diff --git a/.eslintignore b/.eslintignore index e09f782..14ae794 100644 --- a/.eslintignore +++ b/.eslintignore @@ -7,4 +7,4 @@ src/components/echarts/china.js src/components/render/ src/components/verifition/ src/components/tinymce/ -src/views/form/RightPanel.vue +src/views/form/editor/RightPanel.vue diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js index 13739d1..ba1ca5b 100644 --- a/plop-templates/component/prompt.js +++ b/plop-templates/component/prompt.js @@ -47,7 +47,7 @@ module.exports = { actions: data => { let path = '' if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' + path = 'src/components/{{properCase name}}/oldIndex.vue' } else { path = `${data.path}/components/{{properCase name}}/index.vue` } diff --git a/src/api/index.js b/src/api/index.js index cb35d32..b3390d7 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,6 +1,6 @@ import axios from 'axios' // import qs from 'qs' -import {MessageBox, Message} from 'element-ui' +import {Message, MessageBox} from 'element-ui' import Verification from '@/components/verifition/verification.js' import router from '@/router/index' import store from '@/store/index' @@ -39,7 +39,11 @@ api.interceptors.request.use( } ) -function signRequest(request) { +/** + * 签名请求 + * @param request + */ +const signRequest = request => { // 签名验证 if (request.params == undefined) { request.params = {} @@ -51,7 +55,8 @@ function signRequest(request) { } api.interceptors.response.use( - response => { + async response => { + console.log(response) /** * 全局拦截请求发送后返回的数据,如果数据有报错则在这做全局的错误提示 * 假设返回数据格式为:{"code":500,"msg":"邮箱地址不正确","data":null} @@ -60,16 +65,11 @@ api.interceptors.response.use( * 请求出错时 msg 会返回错误信息 * 则代码如下 */ - console.log(response) let errCodes = [500, 405, 403] const res = response.data - // eslint-disable-next-line no-debugger - debugger if (res.code === 200) { return Promise.resolve(res) } else if (errCodes.includes(res.code)) { - // eslint-disable-next-line no-debugger - debugger // 这里做错误提示,如果使用了 element ui 则可以使用 Message 进行提示 Message({ message: res.msg || 'Error', @@ -99,18 +99,17 @@ api.interceptors.response.use( } return Promise.reject(res) } else if (res.code === 416) { - console.log('validate') - Verification().then(value => { - console.log(value) - setTimeout(function() { - response.config.params.slideCode = value - delete response.config.params.sign + // 需要滑动验证 + let result = {} + await Verification().then(async value => { + response.config.params.slideCode = value + delete response.config.params.sign + if (response.config.data) { response.config.data = JSON.parse(response.config.data) - signRequest(response.config) - return axios(response.config) - }, 1000) + } + result = await api.request(response.config) }) - return Promise.reject(res) + return Promise.resolve(result) } return Promise.resolve(res) }, diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index b662055..d4f82f6 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -72,7 +72,7 @@ div:focus { margin-right: 10px; } .ml-20 { - margin-left: 20px; + margin-left: 20px !important; } .ml-10 { margin-left: 10px; @@ -99,6 +99,11 @@ div:focus { flex-direction: column; box-sizing: border-box; } +.flex-center { + display: flex; + justify-content: center; + align-content: center; +} .desc-text { color: rgba(155, 155, 155, 100); font-size: 14px; @@ -107,6 +112,9 @@ div:focus { .width-full { width: 100% !important; } +.width50 { + width: 50% !important; +} .width80 { width: 80% !important; margin: 0 auto; diff --git a/src/assets/styles/resources/element-variables.scss b/src/assets/styles/resources/element-variables.scss index e114288..a123c0d 100644 --- a/src/assets/styles/resources/element-variables.scss +++ b/src/assets/styles/resources/element-variables.scss @@ -19,6 +19,8 @@ $--border-color-lighter: #e6ebf5; $--table-border: 1px solid #dfe6ec; +$--box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); + /* icon font path, required */ $--font-path: "~element-ui/lib/theme-chalk/fonts"; @import "../../../../node_modules/element-ui/packages/theme-chalk/src/index"; diff --git a/src/assets/styles/resources/variables.scss b/src/assets/styles/resources/variables.scss index eff6f98..decb04a 100644 --- a/src/assets/styles/resources/variables.scss +++ b/src/assets/styles/resources/variables.scss @@ -1,23 +1,23 @@ // base color -$blue:#324157; -$light-blue:#3a71a8; -$red:#c03639; +$blue: #324157; +$light-blue: #3a71a8; +$red: #c03639; $pink: #e65d6e; $green: #30b08f; $tiffany: #4ab7bd; -$yellow:#fec171; +$yellow: #fec171; $panGreen: #30b08f; - +$backgroundColor: rgba(247, 247, 247, 90); // sidebar -$menuText:#bfcbd9; -$menuActiveText:#409eff; -$subMenuActiveText:#f4f4f5; // https://github.com/ElemeFE/element/issues/12951 +$menuText: #bfcbd9; +$menuActiveText: #409eff; +$subMenuActiveText: #f4f4f5; // https://github.com/ElemeFE/element/issues/12951 -$menuBg:#304156; -$menuHover:#263445; +$menuBg: #304156; +$menuHover: #263445; -$subMenuBg:#1f2d3d; -$subMenuHover:#001528; +$subMenuBg: #1f2d3d; +$subMenuHover: #001528; $sideBarWidth: 210px; diff --git a/src/components/form/SignPad/index.vue b/src/components/form/SignPad/index.vue index 1c39ce2..b4ccf97 100644 --- a/src/components/form/SignPad/index.vue +++ b/src/components/form/SignPad/index.vue @@ -2,7 +2,7 @@
请在上面区域完成签名 然后点击确"确认"按钮
{item.label}
提交设置
-提交后
显示提示图片
@@ -87,8 +86,21 @@ />公开反馈结果
+回收设置
@@ -572,6 +584,7 @@ export default { submitPromptText: '提交成功 !', submitJumpUrl: '', wxWrite: false, + publicResult: false, timedNotEnabledPromptText: '填写尚未启用', timedDeactivatePromptText: '填写尚已经停用', timedQuantitativeQuantity: null, diff --git a/src/views/form/statistics.vue b/src/views/form/statistics/index.vue similarity index 90% rename from src/views/form/statistics.vue rename to src/views/form/statistics/index.vue index 7c1df23..6730d28 100644 --- a/src/views/form/statistics.vue +++ b/src/views/form/statistics/index.vue @@ -65,6 +65,7 @@{{ template.name }} @@ -68,7 +61,7 @@