Merge branch 'hyg-dev' into dev

# Conflicts:
#	sunPackIndex/scenic/scenicdetial/scenicdetial.vue
dev
Tuzki 2 years ago
commit e0ceb442db
  1. 1
      node_modules/amap-wx/amap-wx.js
  2. 24
      node_modules/amap-wx/package.json
  3. 68
      package-lock.json
  4. 2
      package.json
  5. 122
      pages/index/index.vue
  6. 67
      pages/traffic/outTraffic.vue
  7. 1976
      sunPackIndex/scenic/scenicdetial/scenicdetial.vue

1
node_modules/amap-wx/amap-wx.js generated vendored

File diff suppressed because one or more lines are too long

24
node_modules/amap-wx/package.json generated vendored

@ -0,0 +1,24 @@
{
"name": "amap-wx",
"version": "0.0.2",
"description": "高德地图微信小程序SDK",
"main": "amap-wx.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": ""
},
"keywords": [
"amap",
"wx",
"mpvue",
"weixin",
"高德地图",
"微信",
"小程序"
],
"author": "",
"license": "ISC"
}

68
package-lock.json generated

@ -0,0 +1,68 @@
{
"name": "phone_uni_xiongan",
"version": "1.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "phone_uni_xiongan",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"amap-wx": "^0.0.2",
"crypto-js": "^4.1.1",
"jsencrypt": "^3.2.1",
"jweixin-module": "^1.4.1",
"moment": "^2.24.0"
},
"devDependencies": {}
},
"node_modules/amap-wx": {
"version": "0.0.2",
"resolved": "https://registry.npmmirror.com/amap-wx/-/amap-wx-0.0.2.tgz",
"integrity": "sha512-VFXTobb+pRlWY2VCkQR/m05Ud0+ZYMAU7iw8sUOuivrUqVBf+vR3q4Tm8njsvjfS8OWNtWMir7OCqLcCk7k24w=="
},
"node_modules/crypto-js": {
"version": "4.1.1",
"resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.1.1.tgz",
"integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==",
"license": "MIT"
},
"node_modules/jsencrypt": {
"version": "3.2.1",
"license": "MIT"
},
"node_modules/jweixin-module": {
"version": "1.4.1",
"license": "ISC"
},
"node_modules/moment": {
"version": "2.24.0",
"license": "MIT",
"engines": {
"node": "*"
}
}
},
"dependencies": {
"amap-wx": {
"version": "0.0.2",
"resolved": "https://registry.npmmirror.com/amap-wx/-/amap-wx-0.0.2.tgz",
"integrity": "sha512-VFXTobb+pRlWY2VCkQR/m05Ud0+ZYMAU7iw8sUOuivrUqVBf+vR3q4Tm8njsvjfS8OWNtWMir7OCqLcCk7k24w=="
},
"crypto-js": {
"version": "4.1.1",
"resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.1.1.tgz",
"integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw=="
},
"jsencrypt": {
"version": "3.2.1"
},
"jweixin-module": {
"version": "1.4.1"
},
"moment": {
"version": "2.24.0"
}
}
}

@ -4,12 +4,12 @@
"description": "",
"main": "main.js",
"dependencies": {
"amap-wx": "^0.0.2",
"crypto-js": "^4.1.1",
"jsencrypt": "^3.2.1",
"jweixin-module": "^1.4.1",
"moment": "^2.24.0"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},

@ -69,6 +69,11 @@
</view>
</view>
</view>
<view class="weather-box" v-if="showWeather">
<view class="we-item">{{ city }}</view>
<view class="we-item">{{ time|formatDate('yyyy年MM月dd日') }}</view>
<view class="we-item">{{ weather }}</view>
</view>
<view class="amt_30">
<view class="an_box an_sch">
@ -188,6 +193,8 @@
<script>
import aes from '@/common/aes.js';
import { format } from 'crypto-js';
import amap from 'amap-wx'
export default {
data() {
return {
@ -233,7 +240,11 @@ export default {
cla: 'swp_1_img dhua',
cla2: 'swp_1_img dhua2',
clas: ['swp_1_img dhua', 'swp_1_img dhua2'],
netType: true
netType: true,
city: '',
time: '',
weather: '',
showWeather:false,
};
},
onLoad(option) {
@ -263,6 +274,7 @@ export default {
}
this.getRedisData();
this.getZiXunList();
this.getWeather();
let video = uni.createVideoContext('myVideo');
this.video = video;
setInterval(
@ -297,8 +309,90 @@ export default {
that
);
},
filters: {
formatDate: function (value, args) {
var dt = new Date(value);
if (args == 'yyyy-M-d') {
// yyyy-M-d
let year = dt.getFullYear();
let month = dt.getMonth() + 1;
let date = dt.getDate();
return `${year}-${month}-${date}`;
} else if (args == 'yyyy-M-d H:m:s') {
// yyyy-M-d H:m:s
let year = dt.getFullYear();
let month = dt.getMonth() + 1;
let date = dt.getDate();
let hour = dt.getHours();
let minute = dt.getMinutes();
let second = dt.getSeconds();
return `${year}-${month}-${date} ${hour}:${minute}:${second}`;
} else if (args == 'yyyy-MM-dd') {
// yyyy-MM-dd
let year = dt.getFullYear();
let month = (dt.getMonth() + 1).toString().padStart(2, '0');
let date = dt.getDate().toString().padStart(2, '0');
return `${year}-${month}-${date}`;
} else if (args == 'yyyy年MM月dd日') {
// yyyy-MM-dd
let year = dt.getFullYear();
let month = (dt.getMonth() + 1).toString().padStart(2, '0');
let date = dt.getDate().toString().padStart(2, '0');
return `${year}${month}${date}`;
} else {
// yyyy-MM-dd HH:mm:ss
let year = dt.getFullYear();
let month = (dt.getMonth() + 1).toString().padStart(2, '0');
let date = dt.getDate().toString().padStart(2, '0');
let hour = dt.getHours().toString().padStart(2, '0');
let minute = dt.getMinutes().toString().padStart(2, '0');
let second = dt.getSeconds().toString().padStart(2, '0');
return `${year}-${month}-${date} ${hour}:${minute}:${second}`;
}
}
},
methods: {
//
getWeather: function (region) {
let this_ = this
var myAmapFun = new amap.AMapWX({ key: 'e2ee6a41e07306db2214f0edfa86f73a' });
myAmapFun.getWeather({
success: function (data) {
//
console.log(data, 'success')
this_.city = data.city.data,
this_.time = data.liveData.reporttime,
this_.weather = data.weather.data + ' ' + data.temperature.data + '°C' + ' ' + data.winddirection.data + ' ' + data.windpower.data,
this_.showWeather = true
},
fail: function (info) {
//
this_.showWeather = false
console.log(info, 'fail');
}
});
// var data = {
// region: region
// };
// this.$Request.post(this.$config.getWeather, data).then((res) => {
// this.weather = res.data;
// if (this.weather.cond_txt_d.indexOf('') != -1) {
// this.weatherImgUrl = '../../../static/images/whe_lei.png';
// } else if (this.weather.cond_txt_d.indexOf('') != -1) {
// this.weatherImgUrl = '../../../static/images/whe_yu.png';
// } else if (this.weather.cond_txt_d.indexOf('') != -1) {
// this.weatherImgUrl = '../../../static/images/whe_wu.png';
// } else if (this.weather.cond_txt_d.indexOf('') != -1) {
// this.weatherImgUrl = '../../../static/images/whe_yin.png';
// } else if (this.weather.cond_txt_d.indexOf('') != -1) {
// this.weatherImgUrl = '../../../static/images/whe_xu.png';
// } else if (this.weather.cond_txt_d.indexOf('') != -1) {
// this.weatherImgUrl = '../../../static/images/whe_sun.png';
// } else {
// this.weatherImgUrl = '../../../static/images/whe_cloudy.png';
// }
// });
},
changeSwiper(e) {
this.swiperCurrent = e.detail.current;
},
@ -631,18 +725,18 @@ export default {
}
});
} else if (type == 'yuyue') {
if (!uni.getStorageSync('unionid')||uni.getStorageSync('unionid')==''||uni.getStorageSync('unionid')==null) {
if (!uni.getStorageSync('unionid') || uni.getStorageSync('unionid') == '' || uni.getStorageSync('unionid') == null) {
uni.showToast({
title: '请先到个人中心进行授权',
icon: 'none',
duration: 2000,
success: () => {
setTimeout(() => {
uni.switchTab({
url: '/pages/personcenter/personcenter'
});
}, 2000);
}
setTimeout(() => {
uni.switchTab({
url: '/pages/personcenter/personcenter'
});
}, 2000);
}
});
return;
} else {
@ -672,4 +766,14 @@ export default {
}
};
</script>
<style></style>
<style scoped lang="scss">
.weather-box{
display: flex;
justify-content: space-evenly;
align-items: center;
padding: 15rpx 20rpx;
background-color: #fff;
}
</style>

@ -1,6 +1,9 @@
<template>
<view class="v-traffic-box">
<image src="https://www.lbgjtoa.com/appImg/v-address_01.jpg" class="v-traffic-img" mode="widthFix"></image>
<view class="dh-box">
<image src="https://www.lbgjtoa.com/appImg/v-address_01.jpg" class="v-traffic-img" mode="widthFix"></image>
<view class="dh-btn" @click="daohang">导航</view>
</view>
<image @click="goToPages()" src="https://www.lbgjtoa.com/appImg/v-address_02.jpg" class="v-traffic-img" mode="widthFix"></image>
<image src="https://www.lbgjtoa.com/appImg/v-address_03.jpg" class="v-traffic-img" mode="widthFix"></image>
<image src="https://www.lbgjtoa.com/appImg/v-address_04.jpg" class="v-traffic-img" mode="widthFix"></image>
@ -10,20 +13,58 @@
</template>
<script>
export default {
methods: {
goToPages: function() {
uni.switchTab({
url: '/pages/daolan/daolan'
});
}
}
export default {
methods: {
goToPages: function () {
uni.switchTab({
url: '/pages/daolan/daolan'
});
},
daohang() {
// if (this.$wechat.isWechat()) {
// var mapParam = {
// latitude: this.info.lat,
// longitude: this.info.lng,
// scale: 18,
// name: this.info.sname,
// address: this.info.saddress
// };
// this.$util.openLocation(mapParam);
// return;
// }
wx.openLocation({
latitude: Number("37.826323"),
longitude: Number("115.712658"),
scale: 16,
name: '衡水老白干',
address: '',
success(data) {
console.log(data);
},
fail(err) {
console.log(err);
}
});
},
}
};
</script>
<style>
.v-traffic-img {
width: 100%;
margin-bottom: -10rpx;
}
.v-traffic-img {
width: 100%;
margin-bottom: -10rpx;
}
.dh-box {
position: relative;
}
.dh-btn {
position: absolute;
right: 50rpx;
bottom: -1rpx;
border: solid 1px #c50101;
font-size: 22rpx;
padding: 5rpx 10rpx;
color: #c30000;
}
</style>

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save