1.对接接口

yj-dev
杨杰 3 years ago
parent a0f8b254a2
commit cafe402af3
  1. 15
      App.vue
  2. 2
      pages/goods/HM-search/HM-search.vue
  3. 11
      pages/goods/refuel-details/refuel-details.vue
  4. 2
      pages/goods/refuel/refuel.vue
  5. 2
      pages/tabBar/category/category.vue
  6. 29
      pages/tabBar/home/home.vue
  7. 2
      pages/user/order_details/order_details.vue
  8. 5
      pages/user/order_list/order_list.vue
  9. 2
      pages/user/positioning/positioning.vue

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

@ -122,7 +122,7 @@
// //
loadDefaultKeyword() { loadDefaultKeyword() {
//ajax, //ajax,
this.defaultKeyword = "搜索卡券"; this.defaultKeyword = "搜索门店";
}, },
//,Storage //,Storage
loadOldKeyword() { loadOldKeyword() {

@ -235,8 +235,7 @@
duration: 2000, duration: 2000,
success() { success() {
setTimeout(() => { setTimeout(() => {
uni.navigateBack({ uni.navigateBack({})
})
}, 2000) }, 2000)
} }
}); });
@ -271,8 +270,10 @@
this.inputMoney = amount.price; this.inputMoney = amount.price;
this.litre = parseFloat(amount.price / this.priceGun).toFixed(2); this.litre = parseFloat(amount.price / this.priceGun).toFixed(2);
this.totalPrice = parseFloat(amount.price / this.priceGun * this.priceVip).toFixed(2); this.totalPrice = parseFloat(amount.price / this.priceGun * this.priceVip).toFixed(2);
if(this.priceVip != this.priceGun){
let gbprice = parseFloat(this.litre * this.priceOfficial).toFixed(2); let gbprice = parseFloat(this.litre * this.priceOfficial).toFixed(2);
this.discountPrice = parseFloat(gbprice - this.inputMoney).toFixed(2); this.discountPrice = parseFloat(gbprice - this.inputMoney).toFixed(2);
}
}, },
// //
getPhoneNumber(PhoneNumber) { getPhoneNumber(PhoneNumber) {
@ -307,8 +308,10 @@
Listeningfocus() { Listeningfocus() {
this.litre = parseFloat(this.inputMoney / this.priceGun).toFixed(2); this.litre = parseFloat(this.inputMoney / this.priceGun).toFixed(2);
this.totalPrice = parseFloat(this.inputMoney / this.priceGun * this.priceVip).toFixed(2); this.totalPrice = parseFloat(this.inputMoney / this.priceGun * this.priceVip).toFixed(2);
if (this.priceVip != this.priceGun) {
let gbprice = parseFloat(this.litre * this.priceOfficial).toFixed(2); let gbprice = parseFloat(this.litre * this.priceOfficial).toFixed(2);
this.discountPrice = parseFloat(gbprice - this.inputMoney).toFixed(2); this.discountPrice = parseFloat(gbprice - this.inputMoney).toFixed(2);
}
}, },
toPay() { toPay() {
if (this.inputMoney == '' || this.inputMoney < 1) { if (this.inputMoney == '' || this.inputMoney < 1) {
@ -336,7 +339,9 @@
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.redirectTo({ uni.redirectTo({
url: '/pages/goods/refuel-confirm/refuel-confirm?payprice=' + res.return_data.payPrice + '&orderId=' + res.return_data.id + '&couponId=' + this.counId+'&adres='+this.storeList.gasAddress url: '/pages/goods/refuel-confirm/refuel-confirm?payprice=' + res.return_data
.payPrice + '&orderId=' + res.return_data.id + '&couponId=' + this.counId +
'&adres=' + this.storeList.gasAddress
}) })
} else { } else {
uni.showToast({ uni.showToast({

@ -332,7 +332,7 @@
] ]
} }
], ],
onilName: '90#', onilName: '92#',
latitudeful:'', latitudeful:'',
longitudeful:'' longitudeful:''
} }

@ -8,7 +8,7 @@
{{city}}<image mode="widthFix" style="width: 15px;" :src="imagewxUrl+imgadres"></image> {{city}}<image mode="widthFix" style="width: 15px;" :src="imagewxUrl+imgadres"></image>
</view> </view>
<view class="input-box"> <view class="input-box">
<input placeholder="搜索卡券" placeholder-style="color:#c0c0c0;" @tap="toSearch()" /> <input placeholder="搜索门店" placeholder-style="color:#c0c0c0;" @tap="toSearch()" />
<view class="icon search"></view> <view class="icon search"></view>
</view> </view>
<!-- <view class="icon-btn"> --> <!-- <view class="icon-btn"> -->

@ -14,7 +14,7 @@
</view> </view>
<!-- 搜索框 --> <!-- 搜索框 -->
<view class="input-box"> <view class="input-box">
<input placeholder="搜索卡券" placeholder-style="color:#c0c0c0;" @tap="toSearch()" /> <input placeholder="搜索门店" placeholder-style="color:#c0c0c0;" @tap="toSearch()" />
<view class="icon search"></view> <view class="icon search"></view>
</view> </view>
<!-- 右侧图标按钮 --> <!-- 右侧图标按钮 -->
@ -54,12 +54,14 @@
<view class="text">{{ row.name }}</view> <view class="text">{{ row.name }}</view>
</view> </view>
</view> </view>
<image v-if='productList.length == 0' mode="widthFix" style="margin-top: 30px;width: 90%;margin-left: 5%;" @click="jumpTyou" :src="imagewxUrl+imgadres4"></image> <image mode="widthFix" style="margin-top: 30px;width: 90%;margin-left: 5%;"
@click="jumpTyou" :src="imagewxUrl+imgadres4"></image>
<!-- 赠券 --> <!-- 赠券 -->
<view style="width: 91%;margin-left: 5%;" v-if='productList.length != 0' @click="goGoodsList(1)"> <view style="width: 91%;margin-left: 5%;" v-if='productList.length != 0' @click="goGoodsList(1)">
<image class="mart30 width100" mode="widthFix" :src="imagewxUrl+imgadres"></image> <image class="mart30 width100" mode="widthFix" :src="imagewxUrl+imgadres"></image>
</view> </view>
<swiper class="orange-content" style="border: 2px solid #ff5836;" v-if='productList.length != 0' :display-multiple-items="productListleg"> <swiper class="orange-content" style="border: 2px solid #ff5836;" v-if='productList.length != 0'
:display-multiple-items="productListleg">
<swiper-item class="swiper-hed" v-for="pro in productList" :key="pro.id" @click="toGoods(pro.id)"> <swiper-item class="swiper-hed" v-for="pro in productList" :key="pro.id" @click="toGoods(pro.id)">
<view class="swiper-item" :data-id="pro.id"> <view class="swiper-item" :data-id="pro.id">
<image class="img" :src="imageUrl+pro.couponImg" mode="aspectFit"> <image class="img" :src="imageUrl+pro.couponImg" mode="aspectFit">
@ -70,13 +72,15 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
<image v-if='goldproductList.length == 0' mode="widthFix" style="margin-top: 30px;width: 90%;margin-left: 5%;" @click="jumphuafei" :src="imagewxUrl+imgadres5"></image> <image mode="widthFix" style="margin-top: 30px;width: 90%;margin-left: 5%;"
@click="jumphuafei" :src="imagewxUrl+imgadres5"></image>
<!-- 金币 --> <!-- 金币 -->
<view style="width: 90%;margin-left: 5%;" v-if='goldproductList.length != 0' @click="goGoodsList(2)"> <view style="width: 90%;margin-left: 5%;" v-if='goldproductList.length != 0' @click="goGoodsList(2)">
<image class="mart30 width100" mode="widthFix" :src="imagewxUrl+imgadres1"></image> <image class="mart30 width100" mode="widthFix" :src="imagewxUrl+imgadres1"></image>
</view> </view>
<!-- v-if="goldproductList&&goldproductList.length>0" --> <!-- v-if="goldproductList&&goldproductList.length>0" -->
<swiper class="orange-content" :display-multiple-items="goldproductListleg" v-if='goldproductList.length != 0' next-margin="50rpx"> <swiper class="orange-content" :display-multiple-items="goldproductListleg" v-if='goldproductList.length != 0'
next-margin="50rpx">
<swiper-item class="swiper-hed" v-for="(item,index) in goldproductList" :key="index" <swiper-item class="swiper-hed" v-for="(item,index) in goldproductList" :key="index"
@click="toGoods(item.id)"> @click="toGoods(item.id)">
<view class="swiper-item" :data-id="item.id"> <view class="swiper-item" :data-id="item.id">
@ -180,8 +184,7 @@
<view class='bottom flex'> <view class='bottom flex'>
<view class='item' @click='close'>随便逛逛</view> <view class='item' @click='close'>随便逛逛</view>
<!-- #ifdef MP --> <!-- #ifdef MP -->
<button class='item grant' open-type="getPhoneNumber" <button class='item grant' open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">去授权</button>
@getphonenumber="getPhoneNumber">去授权</button>
<!-- #endif --> <!-- #endif -->
</view> </view>
</view> </view>
@ -297,6 +300,8 @@
this.city = app.globalData.cityName; this.city = app.globalData.cityName;
this.getCouponListArea(); this.getCouponListArea();
this.getCouponListgold(); this.getCouponListgold();
this.getCmsContent();
this.getCmsAactibity();
} }
}, },
onLoad() { onLoad() {
@ -438,17 +443,17 @@
',' + res.longitude + '&key=7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB', ',' + res.longitude + '&key=7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB',
data: {}, data: {},
success: function(res) { success: function(res) {
that.city = res.data.result.address_component.city.replace(/市/g, // that.city = res.data.result.address_component.city.replace(//g,
''); // '');
app.globalData.cityName = res.data.result.address_component.city that.city = res.data.result.address_component.province;
.replace(/市/g, ''); app.globalData.cityName = res.data.result.address_component.province;
app.globalData.cityId = res.data.result.ad_info.adcode; app.globalData.cityId = res.data.result.ad_info.adcode;
// app.globalData.cityId = '500100'; // app.globalData.cityId = '500100';
that.getCouponListArea(); that.getCouponListArea();
that.getCouponListgold(); that.getCouponListgold();
uni.hideLoading(); uni.hideLoading();
that.getCmsContent(); that.getCmsContent();
that.getCmsAactibity() that.getCmsAactibity();
}, },
fail() { fail() {
uni.hideLoading() uni.hideLoading()

@ -309,7 +309,7 @@
}, },
methods: { methods: {
toGoods(e, item) { toGoods(e, item) {
if (item != 2 && item != 4 && item != 5) { if (item != 2 && item != 4 && item != 5 && item != 6) {
uni.navigateTo({ uni.navigateTo({
url: '../../goods/goods?id=' + e url: '../../goods/goods?id=' + e
}); });

@ -18,7 +18,9 @@
<view class="left"> <view class="left">
<image v-if="row.highChildOrderList[0].goodsType == 1" <image v-if="row.highChildOrderList[0].goodsType == 1"
:src="imageUrl+row.highChildOrderList[0].goodsImg"></image> :src="imageUrl+row.highChildOrderList[0].goodsImg"></image>
<image v-else :src="row.highChildOrderList[0].goodsImg"></image> <image v-if="row.highChildOrderList[0].goodsType == 6"
:src="imagewxUrl+imgadres1"></image>
<image v-if="row.highChildOrderList[0].goodsType != 1 && row.highChildOrderList[0].goodsType != 6" :src="row.highChildOrderList[0].goodsImg"></image>
</view> </view>
<view class="right"> <view class="right">
<view class="name"> <view class="name">
@ -96,6 +98,7 @@
headerPosition: "fixed", headerPosition: "fixed",
imagewxUrl: app.globalData.imageWxImg, imagewxUrl: app.globalData.imageWxImg,
imgadres:'noorder.png', imgadres:'noorder.png',
imgadres1:'dhf.png',
headerTop: "0px", headerTop: "0px",
typeText: { typeText: {
1: '等待付款', 1: '等待付款',

@ -52,7 +52,7 @@
this.posId = item.regionId; this.posId = item.regionId;
this.posName = item.regionName; this.posName = item.regionName;
app.globalData.cityId = item.regionId; app.globalData.cityId = item.regionId;
app.globalData.cityName = item.regionName.replace(/市/g,''); app.globalData.cityName = item.regionName;
uni.navigateBack({ uni.navigateBack({
}) })
} }

Loading…
Cancel
Save