-
+
export default {
name: "MobileToolbar",
+ mounted() {
+ this.$nextTick(function() {
+ this.contain_toolbartop();
+ });
+ },
methods: {
hide_toolbar:function (){
document.getElementById('mobilebarroot').style.visibility="collapse";
}
+ },
+ contain_toolbartop:function (){
+ window.onscroll = function(){
+ if(window.scrollY==0){
+ document.getElementById("weptoplogo")
+ .style.backgroundColor='rgba(0, 0, 0, 0)';
+ }
+ else{
+ document.getElementById("weptoplogo")
+ .style.backgroundColor="black";
+ }
+ }
}
}
@@ -124,6 +141,9 @@ export default {
padding-left: 32px;
padding-top: 24px;
padding-right: 32px;
+ position: fixed;
+ top:0px;
+ z-index: 20;
}
#image_1 {
@@ -139,7 +159,7 @@ export default {
}
#barlist{
- margin-top: 44px;
+ margin-top: 87px;
width: 100%;
}
diff --git a/src/components/Wanted.vue b/src/components/Wanted.vue
index 37c4fea..9a91702 100644
--- a/src/components/Wanted.vue
+++ b/src/components/Wanted.vue
@@ -34,7 +34,7 @@ const { breakpoint } = useBootstrapBreakpoint();
请发送简历+作品集至:kdhr@kdesign.top
-
@@ -57,12 +57,10 @@ export default {
fetchjobinfos:function (){
this.isLoading=true;
this.error=null;
- axios.get('/api/wanteds') // 替换成你的实际 API 地址
+ axios.get('/api/wanteds')
.then(response =>{
const resp = response.data;
- // 检查 resp.data 是否存在且为数组
if (resp && Array.isArray(resp.data)) {
- // 直接将后端返回对象的 data 数组赋值给 itemsArray
this.jobinfos = resp.data;
console.log('jobinfos:', this.jobinfos)
if(this.jobinfos.length==0){
@@ -90,9 +88,6 @@ export default {