1. 修改H5 代码

yj-dev
杨杰 3 years ago
parent e7481ee8d2
commit 037292eaf3
  1. 16
      App.vue
  2. 2
      manifest.json
  3. 35
      pages/tabBar/category/category.vue
  4. 48
      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" : "",

@ -60,10 +60,13 @@
{{item.merchantName}}
</view>
</view>
</wybPopup> -->
<button open-type="contact">
<image :src="imagewxUrl+imgadres5" mode="widthFix" class="xfimg"></image>
</button>
</wybPopup> -->
<!-- #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>
@ -81,7 +84,7 @@
data() {
return {
showCategoryIndex: '',
showCategoryIndexId: '',
showCategoryIndexId: '',
headerPosition: "fixed",
imagewxUrl: app.globalData.imageWxImg,
imgadres: 'jt.png',
@ -98,7 +101,7 @@
pageNum: 1,
pageSize: 10,
isNoMoreData: false
// loadingText: ''
// loadingText: ''
}
},
onPageScroll(e) {
@ -185,7 +188,7 @@
}
getMerchantList(params).then(res => {
if (res.return_code == '000000' && res.return_data != '') {
this.MerchantList = res.return_data;
this.MerchantList = res.return_data;
this.showCategoryIndex = res.return_data[0].merchantName;
this.showCategoryIndexId = res.return_data[0].id;
this.getStoreListByMerchant();
@ -241,7 +244,7 @@
},
//
showCategory(e) {
showCategory(e) {
this.showCategoryIndex = this.MerchantList[e.target.value].merchantName;
this.showCategoryIndexId = this.MerchantList[e.target.value].id;
this.pageNum = 1;
@ -273,6 +276,13 @@
background-color: #f1f3f5;
}
.H5xfimg {
width: 80rpx;
bottom: 140rpx;
position: fixed;
right: 40rpx;
}
.xfimg {
width: 80rpx;
bottom: 60rpx;
@ -338,10 +348,11 @@
font-size: 14px;
margin-top: 10px;
color: #333333;
}
.stuimg {
width: 10px;
vertical-align: middle;
}
.stuimg {
width: 10px;
vertical-align: middle;
}
.loading-text {

@ -85,8 +85,13 @@
<wybPopup ref="popup" type="center" height="850" width="600" bgColor="" radius="6" :showCloseIcon="true">
<image class="popImg" :src="imageUrl+imgadres3" @click="jumpWeb"></image>
</wybPopup>
<button open-type="contact">
<image :src="imagewxUrl+imgadres4" mode="widthFix" class="xfimg"></image>
<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, '');
app.globalData.cityId = res.result.ad_info.adcode;
vm.getCouponListArea();
vm.getCouponListgold();
uni.hideLoading()
// 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;
// app.globalData.cityId = '500100';
that.getCouponListArea();
that.getCouponListgold();
that.getCmsContent();
that.getCmsAactibity();
that.getCmsContentcmshome();
that.getCmsContentcmsContent();
})
.catch(err => {
uni.hideLoading()
@ -738,6 +759,13 @@
.popImg {
width: 300px;
height: 440px;
}
.H5xfimg{
width: 80rpx;
bottom: 140rpx;
position: fixed;
right: 40rpx;
}
.xfimg {

Loading…
Cancel
Save