Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
exhibition_page
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
龙菲
exhibition_page
Commits
5088d967
提交
5088d967
authored
10月 28, 2022
作者:
龙菲
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改多个接口返回错误信息提示为仅提示一次
上级
d7b9b70d
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
85 行增加
和
57 行删除
+85
-57
main.js
src/main.js
+3
-0
request.js
src/utils/request.js
+33
-22
resetMessage.js
src/utils/resetMessage.js
+24
-0
SMGZ.vue
src/views/boutique/components/SMGZ.vue
+3
-13
Detail.vue
src/views/ccProduct/Detail.vue
+2
-2
index.vue
src/views/ccProduct/index.vue
+5
-5
index.vue
src/views/culturalRelic/index.vue
+1
-1
index.vue
src/views/display/index.vue
+6
-6
Detail.vue
src/views/museum/Detail.vue
+2
-2
index.vue
src/views/museum/index.vue
+5
-5
vue.config.js
vue.config.js
+1
-1
没有找到文件。
src/main.js
浏览文件 @
5088d967
...
...
@@ -28,7 +28,10 @@ Vue.use(ElementUI);
// 全局注册动画效果
Vue
.
use
(
animated
);
// 全局注册修改图片链接方法
Vue
.
prototype
.
$getFullUrl
=
getFullUrl
new
Vue
({
router
,
store
,
...
...
src/utils/request.js
浏览文件 @
5088d967
...
...
@@ -4,14 +4,15 @@ import {
Message
}
from
'element-ui'
import
store
from
'@/store'
import
messageup
from
'./resetMessage'
import
{
getToken
}
from
'@/utils/auth'
console
.
log
(
'process.env'
,
process
.
env
);
console
.
log
(
'process.env'
,
process
.
env
);
// create an axios instance
const
service
=
axios
.
create
({
baseURL
:
process
.
env
.
VUE_APP_BASE_API
,
timeout
:
1000
*
10
,
timeout
:
1000
*
10
,
})
// request interceptor
service
.
interceptors
.
request
.
use
(
...
...
@@ -39,37 +40,47 @@ service.interceptors.response.use(
// debugger
// if the custom code is not 20000, it is judged as an error.
if
(
res
.
code
!==
0
)
{
Message
({
message
:
res
.
msg
||
'Error'
,
// Message({
// message: res.msg || 'Error',
// type: 'error',
// duration: 5 * 1000
// })
// 401001l令牌过期;
messageup
({
type
:
'error'
,
duration
:
5
*
1000
showClose
:
true
,
message
:
res
.
msg
||
'Error'
})
// 401001l令牌过期;
if
(
res
.
code
===
401001
)
{
// MessageBox.confirm('登录令牌已过期,请重新登录', '确认退出', {
// confirmButtonText: '重新登录',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// if (res.code === 401001) {
// // MessageBox.confirm('登录令牌已过期,请重新登录', '确认退出', {
// // confirmButtonText: '重新登录',
// // cancelButtonText: '取消',
// // type: 'warning'
// // }).then(() => {
// // store.dispatch('user/resetToken').then(() => {
// // location.reload()
// // })
// // })
// store.dispatch('user/resetToken').then(() => {
// location.reload()
// })
// // window.location.reload()
// })
store
.
dispatch
(
'user/resetToken'
).
then
(()
=>
{
// window.location.reload()
})
}
// }
return
Promise
.
reject
(
new
Error
(
res
.
msg
||
'Error'
))
}
else
{
return
res
}
},
error
=>
{
console
.
log
(
'err'
+
error
)
// for debug
Message
({
message
:
error
.
msg
||
'网络连接错误,请稍后重试'
,
// console.log('err' + error) // for debug
// Message({
// message: error.msg || '网络连接错误,请稍后重试',
// type: 'error',
// duration: 5 * 1000
// })
messageup
({
type
:
'error'
,
duration
:
5
*
1000
showClose
:
true
,
message
:
error
.
msg
||
'网络连接错误,请稍后重试'
})
return
Promise
.
reject
(
error
)
}
...
...
src/utils/resetMessage.js
0 → 100644
浏览文件 @
5088d967
/**重置message,防止重复点击重复弹出message弹框 */
import
{
Message
}
from
'element-ui'
;
let
messageInstance
=
null
;
const
resetMessage
=
(
options
)
=>
{
if
(
messageInstance
)
{
messageInstance
.
close
()
}
messageInstance
=
Message
(
options
)
};
[
'error'
,
'success'
,
'info'
,
'warning'
].
forEach
(
type
=>
{
resetMessage
[
type
]
=
options
=>
{
if
(
typeof
options
===
'string'
)
{
options
=
{
message
:
options
}
}
options
.
type
=
type
return
resetMessage
(
options
)
}
})
let
messageup
export
default
messageup
=
resetMessage
\ No newline at end of file
src/views/boutique/components/SMGZ.vue
浏览文件 @
5088d967
...
...
@@ -434,23 +434,13 @@ export default {
return
crPics
;
},
},
watch
:
{
curentUnitPicIndex
(
value
)
{
console
.
log
(
this
.
unitPics
[
value
]);
console
.
log
(
`@/assets/imgs/boutique/smgz/3_hall/hall_pics/
${
this
.
curentUnitPicIndex
+
1
}
-
${
1
}
.png`
);
},
},
// mounted() {
// },
methods
:
{
handleChangeUnit
(
item
)
{
this
.
curentUnitPicIndex
=
item
.
index
;
this
.
$refs
.
mySwiper
.
swiper
.
activeIndex
=
0
;
this
.
$refs
.
mySwiper
.
swiper
.
realIndex
=
0
;
console
.
log
(
'this.$refs.mySwiper.'
,
this
.
$refs
.
mySwiper
.
swiper
);
// this.$refs.mySwiper.swiper.slideTo(0)
},
handleChangeCr
(
item
)
{
this
.
curentUnitCrIndex
=
item
.
index
;
...
...
src/views/ccProduct/Detail.vue
浏览文件 @
5088d967
<
template
>
<div
class=
"ccproduct-detail"
>
<div
class=
"back"
@
click=
"handleBack"
>
<
!--
<
div
class=
"back"
@
click=
"handleBack"
>
<svg-icon
icon-class=
"mz-fh"
></svg-icon>
返回上页
</div>
返回上页
</div>
-->
<div
class=
"wrapper"
>
<div
class=
"header"
>
<div
class=
"dc-left wow animate__animated animate__fadeInLeft"
>
...
...
src/views/ccProduct/index.vue
浏览文件 @
5088d967
...
...
@@ -230,11 +230,11 @@ export default {
handleClick
(
item
)
{
const
{
bccpId
}
=
item
;
//
const newPage = this.$router.resolve({
//
path: "ccProduct/" + bccpId,
//
});
//
window.open(newPage.href, "_blank");
this
.
$router
.
push
(
`ccProduct/
${
bccpId
}
`
);
const
newPage
=
this
.
$router
.
resolve
({
path
:
"ccProduct/"
+
bccpId
,
});
window
.
open
(
newPage
.
href
,
"_blank"
);
//
this.$router.push(`ccProduct/${bccpId}`);
},
handleClickThreeD
()
{
this
.
onlyShow3d
=
!
this
.
onlyShow3d
;
...
...
src/views/culturalRelic/index.vue
浏览文件 @
5088d967
<
template
>
<div
class=
"cultural-relic"
>
<ListBanner
title=
"
精选文物
"
/>
<ListBanner
title=
"
文物展
"
/>
<div
class=
"content-wrapper"
>
<div
class=
"content"
>
<div
class=
"search wow animate__animated animate__fadeIn"
>
...
...
src/views/display/index.vue
浏览文件 @
5088d967
<
template
>
<div
class=
"display"
>
<!--
<NavBar
/>
-->
<ListBanner
title=
"
精选展览
"
/>
<ListBanner
title=
"
展览展示
"
/>
<div
class=
"content-wrapper"
>
<div
class=
"content"
>
<div
class=
"search wow animate__animated animate__fadeIn"
>
...
...
@@ -243,11 +243,11 @@ export default {
handleClick
(
item
)
{
const
{
themeType
,
exhibitionId
}
=
item
;
//
const newPage = this.$router.resolve({
//
path: `display/${themeType}/${exhibitionId}`,
//
});
//
window.open(newPage.href, "_blank");
this
.
$router
.
push
(
`display/
${
themeType
}
/
${
exhibitionId
}
`
);
const
newPage
=
this
.
$router
.
resolve
({
path
:
`display/
${
themeType
}
/
${
exhibitionId
}
`
,
});
window
.
open
(
newPage
.
href
,
"_blank"
);
//
this.$router.push(`display/${themeType}/${exhibitionId}`);
},
defImg
(
e
)
{
e
.
target
.
src
=
require
(
"@/assets/404_images/no-pic.png"
);
...
...
src/views/museum/Detail.vue
浏览文件 @
5088d967
...
...
@@ -2,10 +2,10 @@
<
template
>
<div
class=
"museum-detail"
>
<div
class=
"wrapper"
>
<div
class=
"back"
@
click=
"handleBack"
>
<
!--
<
div
class=
"back"
@
click=
"handleBack"
>
<svg-icon
icon-class=
"mz-fh"
></svg-icon>
<span>
返回上页
</span>
</div>
</div>
-->
<el-row
class=
"detail-container"
:gutter=
"10"
>
<el-col
class=
"cr-images"
:span=
"24"
>
<el-image
...
...
src/views/museum/index.vue
浏览文件 @
5088d967
...
...
@@ -207,13 +207,13 @@ export default {
},
handleClick
(
item
)
{
const
{
id
}
=
item
;
// const newPage = this.$router.resolve({
// path: `museum/${id}`,
// });
// window.open(newPage.href, "_blank");
this
.
$router
.
push
({
const
newPage
=
this
.
$router
.
resolve
({
path
:
`museum/
${
id
}
`
,
});
window
.
open
(
newPage
.
href
,
"_blank"
);
// this.$router.push({
// path: `museum/${id}`,
// });
},
handleTypeChange
(
value
)
{
...
...
vue.config.js
浏览文件 @
5088d967
...
...
@@ -49,7 +49,7 @@ module.exports = defineConfig({
proxy
:
{
'/api'
:
{
// target: 'http://192.168.1.230:9562/api',
target
:
'http://222.85.214.245:9602
/api
'
,
target
:
'http://222.85.214.245:9602'
,
// target:'http://192.168.1.230:9562/api',
changeOrigin
:
true
,
pathRewrite
:
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论