xiaohaizhao преди 8 месеца
родител
ревизия
2bece2dfe8
променени са 7 файла, в които са добавени 48 реда и са изтрити 182 реда
  1. 2 26
      App.vue
  2. 43 155
      pages/index/home.vue
  3. 3 1
      pages/index/index.vue
  4. BIN
      static/image/jxz.png
  5. 0 0
      static/image/qt.png
  6. 0 0
      static/image/wx.png
  7. BIN
      static/image/ywj.png

+ 2 - 26
App.vue

@@ -1,34 +1,10 @@
 <script>
-import { ref, getCurrentInstance } from 'vue'
 export default {
 	onLaunch: function () {
-		const { $Http } = getCurrentInstance().proxy;
-		if (uni.getStorageSync('userMsg').token) {
-			$Http.basic({
-				"classname": "webmanage.site.site",
-				"method": "querySite_Parameter", //查询站点数据
-				content: {
-					nocache: true
-				}
-			}).then(res => {
-				if (res.code == 1) {
-					uni.removeStorageSync('siteP');
-					uni.setStorageSync("siteP", res.data)
-					let currentPages = getCurrentPages().pop();
-					if (currentPages.route == 'pages/login/login' || currentPages.$page.fullPath == "/pages/login/login") uni.redirectTo({
-						url: '/pages/index/index',
-					});
-				}
-			})
-		}
+	
 	},
 	onShow: function () {
-		try {
-			const { $Http } = getCurrentInstance().proxy;
-			$Http.uploadNumber && $Http.uploadNumber();
-		} catch (error) {
-
-		}
+	
 	},
 	onHide: function () {
 	}

+ 43 - 155
pages/index/home.vue

@@ -1,31 +1,35 @@
 <template>
-	<up-swiper height='115' :list="banner" indicator keyName="imageUrl" :autoplay="false" circular radius="0"
-		@click="onClickSwiper" />
-	<view class="main">
-		<view class="serve">
-			{{ enterprisename }}
-		</view>
-		<view class="name">
-			{{ welcomeText }}
-		</view>
-
-		<view class="list">
-			<navigator :url="item.path" class="item" v-for="item in itemList" :key="item.label">
-				<view class="icon">
-					<image class="image" :src="item.icon" />
-				</view>
-				<view class="label">
-					{{ item.label }}
+	<view style="min-height: 100vh;width: 100vw;background-color: #fff;">
+		<view class="image-box">
+			<image style="width: 100vw;" src="/static/image/banner.png" mode="widthFix" />
+			<view class="main">
+				<view class="item" hover-class="navigator-hover">
+					<view class="icon">
+						<image class="image" src="/static/image/wx.png" />
+					</view>
+					<view class="label">
+						预约服务
+					</view>
+					<view class="text">
+						故障维修排除
+					</view>
 				</view>
-				<view class="text">
-					{{ item.text }}
+				<view class="item" hover-class="navigator-hover">
+					<view class="icon">
+						<image class="image" src="/static/image/qt.png" />
+					</view>
+					<view class="label">
+						服务查询
+					</view>
+					<view class="text">
+						其他问题服务
+					</view>
 				</view>
-				<view class="badge" v-if="item.badge">
-					<up-badge type="error" max="999" :value="item.badge"></up-badge>
-				</view>
-			</navigator>
+			</view>
 		</view>
+
 	</view>
+
 </template>
 
 <script setup>
@@ -33,152 +37,41 @@ import { ref, getCurrentInstance, computed } from 'vue'
 import { onLoad, onShow } from '@dcloudio/uni-app';
 const { $Http } = getCurrentInstance().proxy;
 const banner = ref([]);
-const enterprisename = ref('');
-const welcomeText = computed(() => {
-	return getTimeGreeting() + ',' + (uni.getStorageSync('userMsg').name);
-});
 
 onShow(() => {
-	uploadNumber()
 })
 
-function getTimeGreeting() {
-	const hour = new Date().getHours();
-
-	if (hour >= 5 && hour < 12) {
-		return '早上好';
-	} else if (hour >= 12 && hour < 14) {
-		return '中午好';
-	} else if (hour >= 14 && hour < 18) {
-		return '下午好';
-	} else {
-		return '晚上好';
-	}
-}
-
 onLoad(() => {
-	$Http.basic({
-		"classname": "common.adspace.adspace",
-		"method": "query_adspacelist", //查询轮播图
-		content: {
-			nocache: true
-		}
-	}).then(res => {
-		if (res.code !== 0 && res.data.length) {
-			uni.removeStorageSync('banner')
-			uni.setStorageSync('banner', res.data);
-			banner.value = res.data.find(v => v.location == "index_top").ads.map(v => {
-				v.imageUrl = v.attinfos[0].url;
-				return v
-			}) || [];
-		} else {
-			const list = uni.getStorageSync('banner') || [];
-			if (list.length) banner.value = list.find(v => v.location == "index_top").ads.map(v => {
-				v.imageUrl = v.attinfos[0].url;
-				return v
-			}) || [];
-		}
-	})
-	$Http.basic({
-		id: "2025073015312903",
-		content: {}
-	}).then(res => {
-		if (res.code == 1) {
-			enterprisename.value = res.data.enterprisename;
-		}
-	})
-
-	$Http.uploadNumber = uploadNumber;
 });
-
-function uploadNumber() {
-	itemList.value.forEach((item) => {
-		$Http.basic({ "id": "20230208140203", "content": { "pageNumber": 1, "pageSize": 0, "where": { "status": item.label, "condition": "" } } }).then(res => {
-			if (res.code !== 0) {
-				item.badge = res.total;
-			} else {
-				item.badge = 0;
-			}
-		})
-	});
-	welcomeText.getter()
-}
-function onClickSwiper(e) {
-	let item = banner.value[e]
-	if (item.hyperlink) {
-		uni.navigateTo({
-			url: item.hyperlink,
-			success: (result) => { },
-			fail: () => {
-				uni.previewImage({
-					current: e,
-					urls: banner.value.map(v => v.imageUrl)
-				})
-			},
-		})
-	} else {
-		uni.previewImage({
-			current: e,
-			urls: banner.value.map(v => v.imageUrl)
-		})
-	}
-}
-const itemList = ref([{
-	label: '待接单',
-	icon: '/static/image/djd.png',
-	text: "故障维修排除",
-	path: "/pages/workOrder/index?type=待接单",
-}, {
-	label: '进行中',
-	icon: '/static/image/jxz.png',
-	text: "专业上门安装",
-	path: "/pages/workOrder/index?type=进行中",
-}, {
-	label: '已完结',
-	icon: '/static/image/ywj.png',
-	text: "精心维护保养",
-	path: "/pages/workOrder/index?type=已完结",
-}]);
 </script>
 
 <style lang="scss" scoped>
-.main {
-	padding: 40rpx 30rpx;
-	box-sizing: border-box;
-
-	.serve {
-		line-height: 32rpx;
-		font-family: Microsoft YaHei, Microsoft YaHei;
-		font-size: 24rpx;
-		color: #999999;
-	}
+.image-box {
+	position: relative;
 
-	.name {
-		line-height: 48rpx;
-		font-family: Microsoft YaHei, Microsoft YaHei;
-		font-weight: bold;
-		font-size: 36rpx;
-		color: #333333;
-		margin-top: 10rpx;
-	}
-
-	.list {
+	.main {
 		display: flex;
 		justify-content: space-between;
 		flex-wrap: wrap;
-		margin-top: 40rpx;
+		margin-top: 20rpx;
+		position: absolute;
+		width: 100%;
+		height: 300rpx;
+		top: 63%;
+		z-index: 1;
+		padding: 0 30rpx;
+		box-sizing: border-box;
 
 		.item {
-			position: relative;
 			width: 334rpx;
 			height: 260rpx;
-			background: #FFFFFF;
-			box-shadow: 0rpx 4rpx 16rpx 2rpx rgba(150, 157, 165, 0.16);
+			background: rgba(255, 255, 255, 0.95);
+			box-shadow: 0rpx 10rpx 16rpx 2rpx rgba(0, 0, 0, 0.25);
 			border-radius: 20rpx;
-			margin-bottom: 20rpx;
 			box-sizing: border-box;
 			padding: 40rpx;
 
+
 			.image {
 				height: 70rpx;
 				width: 70rpx;
@@ -201,14 +94,9 @@ const itemList = ref([{
 				margin-top: 10rpx;
 			}
 
-			.badge {
-				position: absolute;
-				top: 20rpx;
-				right: 20rpx;
-				transform: scale(1.3);
-			}
 		}
-
 	}
+
+
 }
 </style>

+ 3 - 1
pages/index/index.vue

@@ -1,5 +1,8 @@
 <template>
 	<home v-show="showPage != 'my'" />
+	<view v-show="showPage != 'home'">
+		12
+	</view>
 	<up-tabbar :fixed="true" :value="showPage" @change="change1">
 		<up-tabbar-item text="服务" name="home">
 			<template #active-icon>
@@ -27,7 +30,6 @@ const { $Http } = getCurrentInstance().proxy;
 
 const showPage = ref('home');
 function change1(value) {
-	if (value == 'home') $Http.uploadNumber && $Http.uploadNumber();
 	showPage.value = value;
 }
 

BIN
static/image/jxz.png


+ 0 - 0
static/image/其他.png → static/image/qt.png


+ 0 - 0
static/image/djd.png → static/image/wx.png


BIN
static/image/ywj.png