1. 修改H5 代码

yj-dev
杨杰 3 years ago
parent e7481ee8d2
commit 037292eaf3
  1. 16
      App.vue
  2. 2
      manifest.json
  3. 17
      pages/tabBar/category/category.vue
  4. 42
      pages/tabBar/home/home.vue

@ -5,15 +5,15 @@
// brestUrl: 'http://192.168.3.4:9302/brest',
// imgUrl: 'https://192.168.3.4:9301/filesystem/',
//
url: 'https://hsg.dctpay.com/crest',
imgUrl: 'https://hsg.dctpay.com/filesystem/',
brestUrl : 'https://hsg.dctpay.com/brest',
imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/',
// url: 'https://hsg.dctpay.com/crest',
// imgUrl: 'https://hsg.dctpay.com/filesystem/',
// brestUrl : 'https://hsg.dctpay.com/brest',
// imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/',
//
// url: 'https://hsgcs.dctpay.com/crest',
// brestUrl : 'https://hsgcs.dctpay.com/brest',
// imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
// imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/',
url: 'https://hsgcs.dctpay.com/crest',
brestUrl : 'https://hsgcs.dctpay.com/brest',
imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/',
userInfo: "",
brestUserInfo : '',
openId: '',

@ -83,7 +83,7 @@
"title" : "嗨加油",
"router" : {
"mode" : "hash",
"base" : "/H5"
"base" : "/hsg-h5"
},
"devServer" : {
"port" : "",

@ -61,9 +61,12 @@
</view>
</view>
</wybPopup> -->
<button open-type="contact">
<image :src="imagewxUrl+imgadres5" mode="widthFix" class="xfimg"></image>
</button>
<!-- #ifdef H5 -->
<image :src="imagewxUrl+imgadres5" mode="widthFix" class="H5xfimg"></image>
<!-- #endif -->
<!-- #ifdef MP-->
<image :src="imagewxUrl+imgadres5" mode="widthFix" class="xfimg"></image>
<!-- #endif -->
</view>
</template>
<script>
@ -273,6 +276,13 @@
background-color: #f1f3f5;
}
.H5xfimg {
width: 80rpx;
bottom: 140rpx;
position: fixed;
right: 40rpx;
}
.xfimg {
width: 80rpx;
bottom: 60rpx;
@ -339,6 +349,7 @@
margin-top: 10px;
color: #333333;
}
.stuimg {
width: 10px;
vertical-align: middle;

@ -86,7 +86,12 @@
<image class="popImg" :src="imageUrl+imgadres3" @click="jumpWeb"></image>
</wybPopup>
<button open-type="contact">
<!-- #ifdef H5 -->
<image :src="imagewxUrl+imgadres4" mode="widthFix" class="H5xfimg"></image>
<!-- #endif -->
<!-- #ifdef MP-->
<image :src="imagewxUrl+imgadres4" mode="widthFix" class="xfimg"></image>
<!-- #endif -->
</button>
<view class="height40"></view>
<!-- <official-account bindload="bindload" binderror="binderror"></official-account> -->
@ -349,6 +354,9 @@
app.globalData.latitude = res.latitude;
app.globalData.longitude = res.longitude;
// that.findByLatAndLng(res.longitude, res.latitude);
// #ifdef H5
that.getUserLocation(res.longitude, res.latitude);
//#endif
// #ifdef MP
uni.request({
url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=' + res.latitude +
@ -464,9 +472,9 @@
}
});
},
//
//H5
getUserLocation(long, lat) {
let vm = this;
let that = this;
let url =
'https://apis.map.qq.com/ws/geocoder/v1?coord_type=5&get_poi=1&output=jsonp&poi_options=page_size=1;page_index=1';
let locationObj = lat + ',' + long;
@ -475,12 +483,25 @@
location: locationObj
})
.then(res => {
vm.city = res.result.address_component.city.replace(/市/g, '');
app.globalData.cityName = res.result.address_component.city.replace(/市/g, '');
// vm.city = res.result.address_component.city.replace(//g, '');
// app.globalData.cityName = res.result.address_component.city.replace(//g, '');
// app.globalData.cityId = res.result.ad_info.adcode;
// vm.getCouponListArea();
// vm.getCouponListgold();
// uni.hideLoading()
uni.hideLoading();
that.city = res.result.address_component.city;
app.globalData.cityName = res.result.address_component
.city;
app.globalData.cityId = res.result.ad_info.adcode;
vm.getCouponListArea();
vm.getCouponListgold();
uni.hideLoading()
// app.globalData.cityId = '500100';
that.getCouponListArea();
that.getCouponListgold();
that.getCmsContent();
that.getCmsAactibity();
that.getCmsContentcmshome();
that.getCmsContentcmsContent();
})
.catch(err => {
uni.hideLoading()
@ -740,6 +761,13 @@
height: 440px;
}
.H5xfimg{
width: 80rpx;
bottom: 140rpx;
position: fixed;
right: 40rpx;
}
.xfimg {
width: 80rpx;
bottom: 60rpx;

Loading…
Cancel
Save