|
@@ -3,19 +3,19 @@
|
|
|
<div style="padding: 0 24rpx; background: white">
|
|
|
<div class="searchTop">
|
|
|
<image :src="locationIcon" class="locationIcon"></image>
|
|
|
- <picker @change="bindPickerChange" :value="index" :range="array">
|
|
|
- <input v-model="searchArea" class="searchArea" disabled />
|
|
|
+ <picker @change="bindPickerChange" :value="index" :range="array" range-key="groupName">
|
|
|
+ <input v-model="selectGroup.groupName" class="searchArea" disabled />
|
|
|
</picker>
|
|
|
<image :src="dhIcon" class="dhIcon" @tap="toMap"></image>
|
|
|
<image :src="vector" class="vector"></image>
|
|
|
</div>
|
|
|
<div class="parkBgBox">
|
|
|
- <swiper :indicator-dots="false" circular style="height: 360rpx" @change="changeImg" autoplay>
|
|
|
+ <swiper :indicator-dots="false" circular style="height: 320rpx;position: relative" @change="changeImg" autoplay>
|
|
|
<swiper-item v-for="item in envList">
|
|
|
<img :src="item.url" class="swiperImg"/>
|
|
|
+ <div class="parkNameBox">{{item.activityName}}</div>
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
|
- <div class="parkNameBox">这里是园区名称</div>
|
|
|
</div>
|
|
|
<div class="map2">
|
|
|
<div
|
|
@@ -100,7 +100,7 @@
|
|
|
import vanRate from "../../../wxcomponents/weapp/dist/rate/index";
|
|
|
import dynamic from "./dynamic.vue";
|
|
|
import Activity from "./activity.vue";
|
|
|
-import { getUserPower, getUserLocalStorageInfo, newNotice,getUserMainHouseKeeper } from "@/js_sdk/http";
|
|
|
+import { getUserPower, getUserLocalStorageInfo, newNotice,getUserMainHouseKeeper, activityList, ParkInfoControllerListAll} from "@/js_sdk/http";
|
|
|
export default {
|
|
|
components: {
|
|
|
Activity,
|
|
@@ -110,6 +110,7 @@ export default {
|
|
|
name: "enterpriseSide",
|
|
|
data() {
|
|
|
return {
|
|
|
+ selectGroup:{},
|
|
|
noticeList:[],
|
|
|
faMsg:'home',
|
|
|
locationIcon:
|
|
@@ -124,11 +125,11 @@ export default {
|
|
|
value: "5",
|
|
|
searchArea: "当前园区名称",
|
|
|
index: 0,
|
|
|
- array: ["中国", "美国", "巴西", "日本"],
|
|
|
+ array: [],
|
|
|
// parkBg: "https://www.idea-co-sf.com/gardenProduct/image/parkBg.png",
|
|
|
envList:[
|
|
|
- {url:"https://www.idea-co-sf.com/gardenProduct/image/parkBg.png"},
|
|
|
- {url:"https://www.idea-co-sf.com/gardenProduct/image/parkBg.png"}
|
|
|
+ // {url:"https://www.idea-co-sf.com/gardenProduct/image/parkBg.png"},
|
|
|
+ // {url:"https://www.idea-co-sf.com/gardenProduct/image/parkBg.png"}
|
|
|
],
|
|
|
tabList: [
|
|
|
{ name: "活动" },
|
|
@@ -137,6 +138,11 @@ export default {
|
|
|
{ name: "动态" },
|
|
|
],
|
|
|
selectTab: "活动",
|
|
|
+ pages:{
|
|
|
+ pageSize:10000,
|
|
|
+ pageNum:1,
|
|
|
+ statusStr:'1,2'
|
|
|
+ },
|
|
|
mapList: [
|
|
|
{
|
|
|
label: "待办提醒",
|
|
@@ -203,12 +209,35 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getNotice()
|
|
|
+ this.getActiveList()
|
|
|
+ this.getParkList()
|
|
|
// this.getHouseKeeper()
|
|
|
},
|
|
|
methods: {
|
|
|
changeImg(index){
|
|
|
// this.current = index.detail.current+1
|
|
|
},
|
|
|
+ getParkList(){
|
|
|
+ ParkInfoControllerListAll().then(res=>{
|
|
|
+ this.array = res
|
|
|
+ if (uni.getStorageSync('selectGroup')){
|
|
|
+ this.selectGroup = JSON.parse(uni.getStorageSync('selectGroup'))
|
|
|
+ }else{
|
|
|
+ this.selectGroup = res[0]
|
|
|
+ wx.setStorageSync("selectGroup", JSON.stringify(res[0]));
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getActiveList(){
|
|
|
+ activityList(this.pages).then(res=>{
|
|
|
+ if (res.data.total > 0){
|
|
|
+ res.data.rows.forEach(item=>{
|
|
|
+ this.envList.push({...item,imgUrl:JSON.parse(item.annex)[0].url})
|
|
|
+ })
|
|
|
+ }
|
|
|
+ console.log('this.envList',this.envList)
|
|
|
+ })
|
|
|
+ },
|
|
|
//获取管家
|
|
|
getHouseKeeper(){
|
|
|
let reqData = {
|
|
@@ -216,9 +245,9 @@ export default {
|
|
|
}
|
|
|
getUserMainHouseKeeper(reqData).then((res) => {
|
|
|
if (res.key == '200') {
|
|
|
- console.log('res.data:开始')
|
|
|
- console.log(res.data)
|
|
|
- console.log('res.data:结束')
|
|
|
+ // console.log('res.data:开始')
|
|
|
+ // console.log(res.data)
|
|
|
+ // console.log('res.data:结束')
|
|
|
if (res.data != null) {
|
|
|
this.houseKeeper = res.data
|
|
|
}
|
|
@@ -226,17 +255,18 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
toMap(){
|
|
|
- uni.chooseLocation({
|
|
|
+ uni.getLocation({
|
|
|
+ type: 'gcj02', //返回可以用于uni.openLocation的经纬度
|
|
|
success: function (res) {
|
|
|
- console.log('选择的位置:', res.name);
|
|
|
- console.log('纬度:' + res.latitude + ',经度:' + res.longitude);
|
|
|
- // 其他业务逻辑
|
|
|
- },
|
|
|
- fail: function (error) {
|
|
|
- console.error('Choose location failed: ' + JSON.stringify(error));
|
|
|
- },
|
|
|
- complete: function () {
|
|
|
- console.log('chooseLocation operation is complete');
|
|
|
+ const latitude = res.latitude;
|
|
|
+ const longitude = res.longitude;
|
|
|
+ uni.openLocation({
|
|
|
+ latitude: this.selectGroup.latitude,
|
|
|
+ longitude: this.selectGroup.longitude,
|
|
|
+ success: function () {
|
|
|
+ console.log('success');
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -310,8 +340,8 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
bindPickerChange(e) {
|
|
|
- console.log(e);
|
|
|
- this.searchArea = this.array[e.detail.value];
|
|
|
+ this.selectGroup = this.array[e.detail.value];
|
|
|
+ wx.setStorageSync("selectGroup", JSON.stringify(this.array[e.detail.value]));
|
|
|
},
|
|
|
jumpPage(path, isMustCompany) {
|
|
|
console.log(path);
|
|
@@ -416,6 +446,7 @@ export default {
|
|
|
color: white;
|
|
|
font-size: 28rpx;
|
|
|
border-radius: 0 0 16rpx 16rpx;
|
|
|
+ z-index: 1000;
|
|
|
}
|
|
|
}
|
|
|
.map2 {
|