Xiao_123 6 kuukautta sitten
vanhempi
commit
bc285a84df
2 muutettua tiedostoa jossa 36 lisäystä ja 38 poistoa
  1. 6 3
      components/Advertisement/index.vue
  2. 30 35
      pages/index/position.vue

+ 6 - 3
components/Advertisement/index.vue

@@ -4,7 +4,7 @@
 			<view class="popup-content" >
 					<swiper class="swiper-box" @change="swiperChange">
 						<swiper-item v-for="(item ,index) in swiperList" :key="index" class="f-straight">
-							<image class="img-item" :src="item.url" @click="skipLink()" mode="widthFix"></image>
+							<image class="img-item" :src="item.url" @click="skipLink" mode="widthFix"></image>
 							<view @click="closeAdd" class="f-horizon-center">
 								<uni-icons style="display: flex;justify-content: flex-end;" type="closeempty"	size="40"	color="#fff"/>
 							</view>
@@ -17,7 +17,6 @@
 
 <script setup>
 import { ref, onMounted } from 'vue'
-const emit = defineEmits(['login'])
 
 const current = ref(0)
 const inputDialog = ref()
@@ -35,7 +34,11 @@ const openDialog = () => {
 
 const skipLink = () => {
 	closeAdd()
-	if (currentPage !== 'pages/login/index') emit('login')
+	if (!uni.getStorageSync('token') && currentPage !== 'pages/login/index') {
+		uni.switchTab({
+      url: '/pages/index/my'
+    })
+	}
 }
 
 const swiperChange = (e) => {

+ 30 - 35
pages/index/position.vue

@@ -1,23 +1,22 @@
 <template>
   <view>
     <Navbar></Navbar>
-    <layout-page>
-      <view class="box defaultBgc">
-        <scroll-view class="scrollBox" scroll-y="true" @scrolltolower="loadingMore" style="position:relative;">
-          <view>
-            <SwiperAd :list="swiperAdList"></SwiperAd>
-            <!-- 五宫格菜单 -->
-            <view class="white-bgc ss-p-t-10">
-              <uni-grid :column="5" @change="handleGrid" :showBorder="false">
-                <uni-grid-item v-for="(val, index) in gridList" :index="index" :key="index">
-                  <view class="d-flex align-center flex-column justify-center" style="width: 100%; height: 100%; border: none;">
-                    <image :src="val.icon" style="width: 35px; height: 35px;"></image>
-                    <text class="text color-666 font-size-14 ss-m-t-15">{{ val.label }}</text>
-                  </view>
-                </uni-grid-item>
-              </uni-grid>
-            </view>
-            <!-- 搜索条 -->
+    <view class="box defaultBgc">
+      <scroll-view class="scrollBox" scroll-y="true" @scrolltolower="loadingMore" style="position:relative;">
+        <view>
+          <SwiperAd :list="swiperAdList"></SwiperAd>
+          <!-- 五宫格菜单 -->
+          <view class="white-bgc ss-p-t-10">
+            <uni-grid :column="5" @change="handleGrid" :showBorder="false">
+              <uni-grid-item v-for="(val, index) in gridList" :index="index" :key="index">
+                <view class="d-flex align-center flex-column justify-center" style="width: 100%; height: 100%; border: none;">
+                  <image :src="val.icon" style="width: 35px; height: 35px;"></image>
+                  <text class="text color-666 font-size-14 ss-m-t-15">{{ val.label }}</text>
+                </view>
+              </uni-grid-item>
+            </uni-grid>
+          </view>
+          <!-- 搜索条 -->
             <view class="white-bgc stick ss-p-t-10">
               <view style="position: relative;">
                 <uni-search-bar
@@ -31,25 +30,23 @@
                 >
                 </uni-search-bar>
                 <button class="search-btn" @tap.stop="onSearch">搜索</button>
-              </view>
             </view>
-            <view class="white-bgc px-10 stickFilter">
-              <FilterList :list="filterList" idValue="label" @change="handleSearch"></FilterList>
             </view>
-            <PositionList :list="positionListData" :noMore="false"></PositionList>
-            <uni-load-more :status="more" />
-          </view>
-        </scroll-view>
-        <AdvertisePop @login="showAuthModal()"></AdvertisePop>
-
-        <uni-popup ref="inputDialog" type="dialog">
-          <view class="shareQrCodePopupContent">
-            <view class="ss-m-b-10">请前往网页版门墩儿查看</view>
-            <uni-link href="https://www.menduner.com" text="点击复制网页地址" color="#00897B" fontSize="16" copyTips="已复制,请在电脑端打开"></uni-link>
+            <view class="white-bgc px-10 stickFilter">
+            <FilterList :list="filterList" idValue="label" @change="handleSearch"></FilterList>
           </view>
-        </uni-popup>
-      </view>
-    </layout-page>
+          <PositionList :list="positionListData" :noMore="false"></PositionList>
+          <uni-load-more :status="more" />
+        </view>
+      </scroll-view>
+      <AdvertisePop></AdvertisePop>
+      <uni-popup ref="inputDialog" type="dialog">
+        <view class="shareQrCodePopupContent">
+          <view class="ss-m-b-10">请前往网页版门墩儿查看</view>
+          <uni-link href="https://www.menduner.com" text="点击复制网页地址" color="#00897B" fontSize="16" copyTips="已复制,请在电脑端打开"></uni-link>
+        </view>
+      </uni-popup>
+    </view>
   </view>
 </template>
 
@@ -61,9 +58,7 @@ import PositionList from '@/components/PositionList'
 import AdvertisePop from '@/components/Advertisement'
 import { dealDictObjData } from '@/utils/position'
 import { getJobAdvertisedSearch } from '@/api/position'
-import { showAuthModal } from '@/hooks/useModal'
 import { onShow, onLoad, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
-import layoutPage from '@/layout'
 import Navbar from '@/components/Navbar'
 import { getRewardEventList } from '@/utils/eventList'