Browse Source

no message

yanjie 4 years ago
parent
commit
770c75aa2f

+ 1 - 1
pages/childcare/child_care.vue

xqd
@@ -263,7 +263,7 @@
 			},
 			xuanzefuwu() {
 				uni.navigateTo({
-					url: "../vaccines/mechanism"
+					url: "../vaccines/mechanism?type=" + 3
 				})
 			},
 			vaccinesList() {

+ 1 - 1
pages/childcare/child_careList.vue

xqd
@@ -6,7 +6,7 @@
 			<u-dropdown-item @change="recomtype" v-model="recommend" :title="options2[recommend].label" :options="options2"></u-dropdown-item>
 		</u-dropdown>
 		<view class="padding-lr-sm">
-			<u-search :clearabled="false" shape="round" :show-action="false" placeholder="搜索疫苗名称" v-model="keyword"></u-search>
+			<u-search :clearabled="false" shape="round" :show-action="false" placeholder="搜索儿保项目名称" v-model="keyword"></u-search>
 		</view>
 		<view class="margin-sm">
 			<u-checkbox-group @change="checkboxGroupChange">

+ 20 - 5
pages/vaccines/mechanism.vue

xqd xqd xqd xqd
@@ -35,16 +35,19 @@
 </template>
 
 <script>
+	import {
+		getLocation
+	} from "../../common/authorize.js"
 	export default {
-		onLoad() {
-
+		onLoad(op) {
+			this.type = op.type
 		},
 		onShow() {
 
 		},
 		mounted() {
-			this.getMechanismList()
 			this.getareaList()
+			this.GetCurrentAddress()
 		},
 		data() {
 			return {
@@ -53,13 +56,22 @@
 				mechanismList: [],
 				options1: [],
 				pageindex: 1,
-				show: false
+				show: false,
+				type: "",
+				city_name: ""
 			}
 		},
 		onReachBottom() {
 			this.getMechanismList()
 		},
 		methods: {
+			GetCurrentAddress() {
+				getLocation().then(res => {
+					console.log(res)
+					this.city_name = res.address.address_component.city
+					this.getMechanismList()
+				}).catch(res => {})
+			},
 			xuanzephone(item) {
 				this.value = item.id
 				let pages = getCurrentPages(); //获取所有页面栈实例列表
@@ -72,6 +84,7 @@
 			},
 			PickerChange(e) {
 				this.value1 = e.detail.value
+				this.city_name = ""
 				this.pageindex = 1
 				this.mechanismList = []
 				this.getMechanismList()
@@ -85,7 +98,9 @@
 					page: this.pageindex,
 					city_id: area,
 					latitude: uni.getStorageSync('latitude'),
-					longitude: uni.getStorageSync('longitude')
+					longitude: uni.getStorageSync('longitude'),
+					schedule_type: this.type,
+					city_name: this.city_name
 				})
 				console.log(res)
 				if (res.status == 0) {

+ 3 - 4
pages/vaccines/vaccines_info.vue

xqd xqd xqd xqd
@@ -103,7 +103,7 @@
 			this.$util.getAgreement().then(res => {
 				this.vaccine_notice = res.data.vaccine_notice
 			}).catch(err => {
-			
+
 			})
 		},
 		components: {
@@ -139,7 +139,7 @@
 				time: "",
 				dateshow: false,
 				is_Scheduling: true,
-				vaccine_notice:""
+				vaccine_notice: ""
 			}
 		},
 		methods: {
@@ -250,7 +250,6 @@
 						// 	}
 						// }
 					})
-					console.log(times)
 					this.multiSelector.push(times)
 					let arr = this.multiSelector[1][0]
 					arr.forEach(item => {
@@ -276,7 +275,7 @@
 			},
 			xuanzefuwu() {
 				uni.navigateTo({
-					url: "mechanism"
+					url: "mechanism?type=" + 2
 				})
 			},
 			vaccinesList() {