| 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 {
|
| xqd
@@ -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(); //获取所有页面栈实例列表
|
| xqd
@@ -72,6 +84,7 @@
|
|
|
},
|
|
|
PickerChange(e) {
|
|
|
this.value1 = e.detail.value
|
|
|
+ this.city_name = ""
|
|
|
this.pageindex = 1
|
|
|
this.mechanismList = []
|
|
|
this.getMechanismList()
|
| xqd
@@ -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) {
|