1.对接团油接口

yj-dev
杨杰 4 years ago
parent f6fc4710a0
commit d88bbdedc7
  1. 1
      App.vue
  2. 6
      Utils/Api.js
  3. 16
      pages copy.json
  4. 2
      pages/goods/goods-list/goods-list.vue
  5. 4
      pages/goods/goods.vue
  6. 6
      pages/goods/ratings/ratings.vue
  7. 174
      pages/goods/refuel-confirm/refuel-confirm.vue
  8. 130
      pages/goods/refuel-details/refuel-details.vue
  9. 57
      pages/goods/refuel-succes/refuel-succes.vue
  10. 295
      pages/goods/refuel/refuel.vue
  11. 12
      pages/order/confirmation.vue
  12. 6
      pages/pay/payment/payment.vue
  13. 10
      pages/tabBar/cart/cart.vue
  14. 61
      pages/tabBar/category/category.vue
  15. 74
      pages/tabBar/home/home.vue
  16. 37
      pages/tabBar/user/user.vue
  17. 8
      pages/user/Charge/Charge.vue
  18. 4
      pages/user/address/address.vue
  19. 6
      pages/user/address/edit/edit.vue
  20. 4
      pages/user/business/business.vue
  21. 4
      pages/user/coupon/coupon.vue
  22. 10
      pages/user/deposit/deposit.vue
  23. 6
      pages/user/keep/keep.vue
  24. 4
      pages/user/mineCoupons/mineCoupons.vue
  25. 4
      pages/user/minePromotion/minePromotion.vue
  26. 2
      pages/user/myQR/myQR.vue
  27. 28
      pages/user/order_details/order_details.vue
  28. 46
      pages/user/order_list/order_list.vue
  29. 56
      pages/user/positioning/positioning.vue
  30. 4
      static/css/login.scss
  31. BIN
      static/img/jt.png
  32. 16
      uni.scss

@ -20,6 +20,7 @@
token: '',
brestToken:'',
cityId: '',
cityName:'',
longitude : '',
latitude : ''
},

@ -140,6 +140,12 @@ export const getGasDetailByStoreKey = params => {
return POST('GET', `${base}/highGas/getGasDetailByStoreKey`, params).then(res => res.data);
}
//获取已开通的省份
export const getDredgeProvince = params => {
return POST('GET', `${base}/common/getDredgeProvince`, params).then(res => res.data);
}
/**
* H5 获取用户信息
*/

@ -58,8 +58,8 @@
"style": {
"enablePullDownRefresh": true,
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#f06c7a",
"backgroundColorTop": "#f06c7a",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": {
"titleNView": false, //
@ -109,7 +109,7 @@
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "登录",
"navigationBarBackgroundColor": "#f06c7a",
"navigationBarBackgroundColor": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": {
"bounce": "none", //
@ -121,7 +121,7 @@
"path": "pages/login/register",
"style": {
"navigationBarTitleText": "手机号登录",
"navigationBarBackgroundColor": "#f06c7a",
"navigationBarBackgroundColor": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": {
"bounce": "none", //
@ -133,7 +133,7 @@
"path": "pages/login/resetpasswd",
"style": {
"navigationBarTitleText": "重置密码",
"navigationBarBackgroundColor": "#f06c7a",
"navigationBarBackgroundColor": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": {
"bounce": "none", //
@ -174,7 +174,7 @@
"path": "pages/user/coupon/coupon",
"style": {
"navigationBarTitleText": "优惠券",
"navigationBarBackgroundColor": "#f06c7a",
"navigationBarBackgroundColor": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": {
"bounce": "none"
@ -184,7 +184,7 @@
"path": "pages/user/keep/keep",
"style": {
"navigationBarTitleText": "我的收藏",
"navigationBarBackgroundColor": "#f06c7a",
"navigationBarBackgroundColor": "#0083f5",
"navigationBarTextStyle": "white",
"app-plus": {
"bounce": "none"
@ -268,7 +268,7 @@
},
"tabBar": {
"color": "#333333",
"selectedColor": "#f06c7a",
"selectedColor": "#0083f5",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{

@ -174,7 +174,7 @@
color: #aaa;
&.on{
color: #555;
border-bottom: 4upx solid #f06c7a;
border-bottom: 4upx solid #0083f5;
font-weight: 600;
font-size: 30upx;
}

@ -102,9 +102,7 @@
</image>
</view>
</view>
<!-- #ifdef H5 -->
<authorize></authorize>
<!-- #endif -->
</view>
</template>
@ -981,7 +979,7 @@
}
.buy {
background-color: #f06c7a;
background-color: #0083f5;
}
}
}

@ -211,8 +211,8 @@
background-color: #f9f9f9;
margin: 10upx 20upx 10upx 0;
&.on{
border:solid 1upx #f06c7a;
color: #f06c7a;
border:solid 1upx #0083f5;
color: #0083f5;
}
}
}
@ -297,7 +297,7 @@
.date{
width: 100%;
height: 40upx;
border-left: 10upx solid #f06c7a;
border-left: 10upx solid #0083f5;
padding-left: 10upx;
align-items: center;
font-size: 32upx;

@ -2,12 +2,12 @@
<view>
<!-- 头部 -->
<view class="width100 height120 backcorfff">
<image src="../../../static/img/noorder.png" class="flleft conImg mart10 margle10"></image>
<image :src="orderList.goodsImg" class="flleft conImg mart10 margle10"></image>
<view class="conCont paddtop15">
<view class="font20 fontwig6 fcor333 text1 paddtright10">乌江能源加油站(大一型国企)</view>
<view class="font14 fcor999 text2 paddtop5 paddtright10">贵州省贵阳市什么什么大道65号</view>
<view class="font20 fontwig6 fcoreb5 paddtop5">6.40
<text class="margle10 slogan font14">6.38</text>
<view class="font20 fontwig6 fcor333 text1 paddtright10">{{orderList.goodsName}}</view>
<view class="font14 fcor999 text2 paddtop5 paddtright10">{{refulAdress}}</view>
<view class="font20 fontwig6 fcoreb5 paddtop5">{{orderList.gasPriceVip}}
<text class="margle10 slogan font14">{{orderList.gasPriceGun}}</text>
</view>
</view>
</view>
@ -19,7 +19,7 @@
油号\油枪
</view>
<view class="flright width40 fotct">
92#/2
{{orderList.gasOilNo}}#/{{orderList.gasGunNo}}
</view>
</view>
<view class="line1"></view>
@ -28,31 +28,170 @@
加油金额
</view>
<view class="flright width40 fotct">
500
{{orderList.totalPrice}}
</view>
</view>
<view class="width100 mart15 fcor333 font16 fontwig6 paddleft10">重要说明</view>
<view class="width95 paddleft10 font14 fcor999 mart5">1.<text class="fcor089 fontwig6">请先加油后下单</text>,即您到站后,与工作人员确认油号,抢号后再付款</view>
<view class="width95 paddleft10 font14 fcor999 mart5">2.请勿先付款后加油,若您已下单付款请于24小时内到加油站完成加油;若您48小时内未完成加油,请及时发起退单;逾期退单可能会退单失败</view>
<view class="width95 paddleft10 font14 fcor999 mart5">1.<text
class="fcor089 fontwig6">请先加油后下单</text>,即您到站后,与工作人员确认油号,抢号后再付款</view>
<view class="width95 paddleft10 font14 fcor999 mart5">
2.请勿先付款后加油,若您已下单付款请于24小时内到加油站完成加油;若您48小时内未完成加油,请及时发起退单;逾期退单可能会退单失败</view>
<!-- 底部按钮 -->
<view class="footer">
<view class="width50 flleft fcoreb5 padleft15 font15">
合计: <text class="font24">0.00</text>
合计: <text class="font24">{{payprice}}</text>
</view>
<button class="reBtn flright">去支付</button>
<button class="reBtn flright" @click="orderToPay">去支付</button>
</view>
</view>
</template>
<script>
import {
getOrderById,
orderToPay
} from '../../../Utils/Api.js';
let app = getApp();
// #ifdef H5
var jweixin = require('jweixin-module');
// #endif
export default {
data() {
return {
orderNo: '',
couponId: '',
payprice: '',
orderList: '',
refulAdress: ''
}
},
onLoad(e) {
this.payprice = e.payprice;
this.orderNo = e.orderId;
this.couponId = e.couponId;
this.refulAdress = e.adres;
this.getOrderById();
},
methods: {
getOrderById() {
uni.showLoading({
title: '加载中...'
})
let params = {
orderId: this.orderNo,
}
getOrderById(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.orderList = res.return_data.highChildOrderList[0];
}
})
},
//
orderToPay() {
let that = this;
let params = {
"orderId": that.orderNo,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER"
}
orderToPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
uni.showLoading({
title: '支付中...'
})
uni.requestPayment({
"appId": res.return_data.appId,
"nonceStr": res.return_data.nonceStr,
"package": res.return_data.package,
"paySign": res.return_data.sign,
"signType": "MD5",
"timeStamp": res.return_data.timeStamp,
success: function(res) {
uni.hideLoading();
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '/pages/goods/refuel-succes/refuel-succes?id=' + that
.orderNo
});
},
fail: function(err) {
uni.hideLoading();
},
});
// #endif
//
// #ifdef H5
//
that.payRequest(res);
// #endif
} else {
uni.showToast({
title: res.return_msg,
icon: 'none'
})
}
})
},
payRequest: function(self) {
uni.showLoading({
title: '支付中...'
})
jweixin.config({
// debug: true, // ,apialertpclogpc
appId: self.return_data.appId, //
timestamp: self.return_data.timeStamp, //
nonceStr: self.return_data.nonceStr, //
signature: self.return_data.sign, // 1
jsApiList: ['chooseWXPay'] // 使JSJS2
});
uni.hideLoading();
jweixin.ready(function() {
jweixin.checkJsApi({
jsApiList: ['chooseWXPay'], // JSJS2,
success: function(res) {},
fail: function(res) {}
});
jweixin.chooseWXPay({
appId: self.return_data.appId,
timestamp: self.return_data
.timeStamp, // jssdk使timestamp使timeStampS
nonceStr: self.return_data.nonceStr, // 32
package: self.return_data
.package, // prepay_idprepay_id=***
signType: 'MD5', // 'SHA1'使'MD5'
paySign: self.return_data.sign, //
success: function(res) {
//
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '/pages/goods/refuel-succes/refuel-succes?id=' + that
.orderNo
});
},
cancel: function(r) {},
fail: function(res) {}
});
});
jweixin.error(function(res) {
uni.showToast({
icon: 'none',
title: '支付失败了',
duration: 4000
});
// configerrorconfigdebugresSPA
/*alert("config信息验证失败");*/
});
},
}
}
@ -62,18 +201,22 @@
page {
background-color: #f7f7f7;
}
.conImg{
.conImg {
width: 100px;
height: 100px;
border-radius: 8px;
}
.conCont{
.conCont {
margin-left: 115px;
}
.slogan {
color: #807c87;
text-decoration: line-through;
}
.footer {
position: fixed;
bottom: 0upx;
@ -86,7 +229,8 @@
display: flex;
justify-content: space-between;
align-items: center;
.reBtn{
.reBtn {
width: 110px;
background-color: #089bf5;
color: #FFFFFF;

@ -7,7 +7,7 @@
<view class="width100 text1 font18 fontwig6 fcor333">{{storeList.gasName}}</view>
<view class="width100 font14 fcor666 mart5">{{storeList.gasAddress}}</view>
</view>
<view class="flright reimg fotct width20">
<view class="flright reimg fotct width20" @click="seeloaction">
<image mode="widthFix" src="../../../static/img/dhl.png"></image>
<view class="fcor089">{{storeList.distance}}km</view>
</view>
@ -65,15 +65,16 @@
<view class="width90 mart15 font16 fcor666">加油金额</view>
<view class="width90 height40 mart10" style="border: 1px solid #f2f2f2;">
<view class="width8 flleft"></view>
<input type="number" class="font16 width70 flleft height40" placeholder="请输入金额" v-model="inputPhone" />
<view class="width20 height40 flright font14 fcor999 fotct"
<input type="number" class="font16 width60 flleft height40" placeholder="请输入金额" v-model="inputMoney"
@blur="Listeningfocus" maxlength="5" />
<view class="width30 height40 flright font14 fcor999 fotct"
style="border-left: 1px solid #f2f2f2;line-height: 40px;">
0.01L
{{litre}}L
</view>
</view>
<view class="list width90">
<view class="box" v-for="(amount,index) in amountList" :key="index" @click="select(amount)"
:class="{'on':amount.id == inputAmount}">
:class="{'on':amount.price == inputMoney}">
<view class="heTitle fcor333" :class="{'fcor089':amount.id == inputAmount}">{{amount.price}}</view>
</view>
</view>
@ -81,9 +82,19 @@
<!-- 底部按钮 -->
<view class="footer">
<view class="width50 flleft fcor666 padleft15 font15">
合计: <text class="font24">0.00</text>
合计: <text class="font24">{{totalPrice}}</text>
</view>
<button class="reBtn flright">去支付</button>
<!-- #ifdef MP -->
<button class="reBtn flright" open-type="getPhoneNumber" v-if="user.phone == null"
@getphonenumber="getPhoneNumber">去支付</button>
<button class="reBtn flright" v-else @click="toPay">去支付</button>
<!-- #endif -->
<!-- #ifdef H5 -->
<button class="reBtn flright" v-if="user.phone == null" @click="jumpH5Bding">去支付</button>
<button class="reBtn flright" v-else @click="toPay">去支付</button>
<!-- #endif -->
</view>
<!-- 底部弹窗 -->
<wybPopup ref="popup" type="bottom" height="600" width="500" radius="6" :showCloseIcon="true">
@ -110,7 +121,8 @@
<script>
import {
getGasDetailByStoreKey
getGasDetailByStoreKey,
addOrder
} from '../../../Utils/Api.js';
import wybPopup from '../../../components/wyb-popup/wyb-popup.vue';
let app = getApp();
@ -122,6 +134,7 @@
return {
detailList: [],
gunnumber: [],
user: '',
amountList: [{
id: '1',
price: '200'
@ -147,18 +160,36 @@
priceOfficial: '',
priceGun: '',
gunNo: '',
typeId: ''
typeId: '',
counId: '',
inputMoney: '',
gasOilNo: '',
litre: '',
totalPrice: '0.00'
}
},
onLoad(options) {
this.store_key = options.id;
this.counId = options.desId;
this.getGasDetailByStoreKey();
},
onShow() {
this.user = app.globalData.userInfo;
},
methods: {
//
seeloaction() {
uni.openLocation({
latitude: Number(this.storeList.gasAddressLatitude), //
longitude: Number(this.storeList.gasAddressLongitude), //
name: this.storeList.gasName,
address: this.storeList.gasAddress
})
},
//
showPopup(item) {
this.$refs.popup.show();
this.typeId = item;
this.$refs.popup.show();
},
//
getGasDetailByStoreKey() {
@ -182,7 +213,8 @@
this.gunnumber = res.return_data.gasGunList;
for (var i = 0; i < res.return_data.gasGunList.length; i++) {
if (this.oilNo == res.return_data.gasGunList[i].oilNoName) {
this.gunNo = res.return_data.gasGunList[i].gunNo
this.gunNo = res.return_data.gasGunList[i].gunNo;
this.gasOilNo = res.return_data.gasGunList[i].oilNo;
}
}
@ -193,6 +225,7 @@
//
changeValue(item) {
this.oilNo = item.oilNoName;
this.gasOilNo = item.oilNo;
this.priceVip = item.priceVip;
this.priceOfficial = item.priceOfficial;
this.priceGun = item.priceGun;
@ -204,7 +237,80 @@
this.$refs.popup.hide();
},
select(amount) {
this.inputAmount = amount.id;
this.inputMoney = amount.price;
this.litre = parseFloat(amount.price / this.priceGun).toFixed(2);
this.totalPrice = parseFloat(amount.price / this.priceGun * this.priceVip).toFixed(2);
},
//
getPhoneNumber(PhoneNumber) {
let params = {
openId: app.globalData.openId,
iv: PhoneNumber.detail.iv,
encryptedData: PhoneNumber.detail.encryptedData
}
GetPhoneNumber(params).then(res => {
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data
.object
.highUser;
uni.setStorage({
key: "user",
data: res.return_data
.object
.highUser
})
let that = this;
that.toPay();
}
});
},
// H5
jumpH5Bding() {
uni.navigateTo({
url: '/pages/login/register?id=2'
})
},
//
Listeningfocus() {
this.litre = parseFloat(this.inputMoney / this.priceGun).toFixed(2);
this.totalPrice = parseFloat(this.inputMoney / this.priceGun * this.priceVip).toFixed(2);
},
toPay() {
if (this.inputMoney == '' || this.inputMoney < 1) {
uni.showToast({
title: '请输入正确金额',
icon: "none"
});
return false;
}
uni.showLoading({
title: '提交订单中...'
})
let goods = {
"highChildOrderList": [{
"goodsType": 3,
"goodsId": this.counId,
"saleCount": 1,
"goodsPrice": this.inputMoney,
"gasGunNo": this.gunNo,
"gasOilNo": this.gasOilNo
}]
}
addOrder(goods).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
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
})
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
});
}
})
},
}
}

@ -4,7 +4,7 @@
<image class="imageIcon mart15" src="../../../static/img/succes.png"></image>
<view class="fcorfff font15 mart10">已支付</view>
<view class="fcor333 font24 width90 height55 backcorfff mart20 fotct fontwig6">
<text class="font15"></text>499.27
<text class="font15"></text>{{orderInfo.payPrice}}
</view>
<view class="width90 height25">
<image class="width100 height25" style="height: 17px;" src="../../../static/img/suline1.png"></image>
@ -20,7 +20,7 @@
<text class="paddleft10">交易单号</text>
</view>
<view class="width70 flright text1 fotrt">
<text class="paddtright10">342342342433</text>
<text class="paddtright10">{{orderInfo.orderNo}}</text>
</view>
</view>
@ -29,7 +29,7 @@
<text class="paddleft10">油站名称</text>
</view>
<view class="width70 flright text1 fotrt">
<text class="paddtright10">发生发生范德萨发</text>
<text class="paddtright10">{{orderInfo.highChildOrderList[0].goodsName}}</text>
</view>
</view>
@ -38,7 +38,7 @@
<text class="paddleft10">下单时间</text>
</view>
<view class="width70 flright text1 fotrt">
<text class="paddtright10">2021-02-23 12:23:34</text>
<text class="paddtright10">{{orderInfo.createTime | formatDate('-')}}</text>
</view>
</view>
@ -47,7 +47,7 @@
<text class="paddleft10">支付时间</text>
</view>
<view class="width70 flright text1 fotrt">
<text class="paddtright10">2021-02-23 12:23:34</text>
<text class="paddtright10">{{orderInfo.payTime | formatDate('-')}}</text>
</view>
</view>
@ -56,7 +56,7 @@
<text class="paddleft10">加油金额</text>
</view>
<view class="width70 flright text1 fotrt">
<text class="paddtright10">500.00</text>
<text class="paddtright10">{{orderInfo.totalPrice}}</text>
</view>
</view>
@ -65,7 +65,7 @@
<text class="paddleft10">立即优惠</text>
</view>
<view class="width70 flright text1 fotrt">
<text class="paddtright10">0.73</text>
<text class="paddtright10">{{orderInfo.deductionPrice}}</text>
</view>
</view>
<view class="width90 font13 fcor999 mart10">
@ -75,14 +75,53 @@
</template>
<script>
import {
getOrderById
} from '../../../Utils/Api.js';
export default {
data() {
return {
orderInfo: '',
orderNo : ''
}
},
filters: {
//
formatDate: function(value, spe = '/') {
let data = new Date(value);
let year = data.getFullYear();
let month = data.getMonth() + 1;
let day = data.getDate();
let h = data.getHours();
let mm = data.getMinutes();
let s = data.getSeconds();
month = month >= 10 ? month : "0" + month;
day = day >= 10 ? day : "0" + day;
h = h >= 10 ? h : "0" + h;
mm = mm >= 10 ? mm : "0" + mm;
s = s >= 10 ? s : "0" + s;
return `${year}${spe}${month}${spe}${day} ${h}:${mm}:${s}`;
}
},
onLoad(options) {
this.orderNo = options.id;
this.getOrderById();
},
methods: {
getOrderById() {
uni.showLoading({
title: '加载中...'
})
let params = {
orderId: this.orderNo
}
getOrderById(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.orderInfo = res.return_data;
}
})
},
}
}
</script>

File diff suppressed because one or more lines are too long

@ -107,7 +107,7 @@
是否使用优惠券
</view>
<view class="content">
<switch color="#f06c7a" @change="switch2Change" checked="true" />
<switch color="#0083f5" @change="switch2Change" checked="true" />
</view>
</view>
@ -117,7 +117,7 @@
<view class="row" v-for="(item, index) in UserNormalDiscountList" :key="item.value">
<!-- 商品 -->
<view class="carrier">
<radio color="#f06c7a" :value="item.highDiscount.id" :checked="index === current" />
<radio color="#0083f5" :value="item.highDiscount.id" :checked="index === current" />
<!-- 商品信息 -->
<view class="goods-info">
<view class="img">
@ -481,7 +481,7 @@
height: 40upx;
.price {
color: #f06c7a;
color: #0083f5;
width: 30%;
}
@ -553,7 +553,7 @@
justify-content: flex-end;
.money {
color: #f06c7a;
color: #0083f5;
font-weight: 600;
}
}
@ -561,7 +561,7 @@
.btn {
padding: 0 30upx;
height: 60upx;
background-color: #f06c7a;
background-color: #0083f5;
color: #fff;
display: flex;
justify-content: center;
@ -591,7 +591,7 @@
.content {
font-size: 26upx;
color: #f06c7a;
color: #0083f5;
}
}
}

@ -32,7 +32,7 @@
金币支付
</view>
<view class="right">
<radio :checked="paytype=='jinbi'" color="#f06c7a" />
<radio :checked="paytype=='jinbi'" color="#0083f5" />
</view>
</view>
<view class="row" @tap="paytype='wxpay'" v-if="pryType == 1 || pryType==3 ">
@ -43,7 +43,7 @@
微信支付
</view>
<view class="right">
<radio :checked="paytype=='wxpay'" color="#f06c7a" />
<radio :checked="paytype=='wxpay'" color="#0083f5" />
</view>
</view>
</view>
@ -350,7 +350,7 @@
justify-content: center;
align-items: center;
color: #fff;
background-color: #f06c7a;
background-color: #0083f5;
box-shadow: 0upx 5upx 10upx rgba(0, 0, 0, 0.2);
}

@ -312,7 +312,7 @@
width: 35upx;
height: 35upx;
border-radius: 100%;
border: solid 2upx #f06c7a;
border: solid 2upx #0083f5;
display: flex;
justify-content: center;
align-items: center;
@ -320,7 +320,7 @@
width: 25upx;
height: 25upx;
border-radius: 100%;
background-color: #f06c7a;
background-color: #0083f5;
}
}
.text{
@ -542,8 +542,8 @@
bottom: 0upx;
z-index: 5;
.delBtn{
border: solid 1upx #f06c7a;
color: #f06c7a;
border: solid 1upx #0083f5;
color: #0083f5;
padding: 0 30upx;
height: 50upx;
border-radius: 30upx;
@ -569,7 +569,7 @@
.btn{
padding: 0 30upx;
height: 50upx;
background-color: #f06c7a;
background-color: #0083f5;
color: #fff;
display: flex;
justify-content: center;

@ -3,8 +3,9 @@
<!-- 状态栏 -->
<view class="status" :style="{position:headerPosition}"></view>
<view class="header" :style="{position:headerPosition}">
<view class="addr">
<view class="icon location"></view>{{city}}
<view class="addr" @click="goPostion">
<!-- <view class="icon location"></view> -->
{{city}}<image mode="widthFix" style="width: 15px;" src="../../../static/img/jt.png"></image>
</view>
<view class="input-box">
<input placeholder="搜索卡券" placeholder-style="color:#c0c0c0;" @tap="toSearch()" />
@ -91,15 +92,20 @@
}
},
onLoad() {
this.postionIng();
},
onShow() {
this.categoryList = [];
this.MerchantList = [];
if (app.globalData.cityName != '') {
this.city = app.globalData.cityName;
this.getMerchantList();
}else{
this.postionIng();
}
},
methods: {
postionIng() {
uni.showLoading({
title: '加载中'
})
let that = this;
uni.getLocation({
type: 'wgs84',
@ -120,7 +126,6 @@
app.globalData.cityId = res.data.result.ad_info.adcode;
// app.globalData.cityId = '500100';
that.getMerchantList();
uni.hideLoading()
}
})
// #endif
@ -142,31 +147,28 @@
'');
app.globalData.cityId = res.result.ad_info.adcode;
vm.getMerchantList();
uni.hideLoading()
})
.catch(err => {
uni.hideLoading()
console.log(err);
});
},
//
getMerchantList() {
uni.showLoading({
title: '加载中...'
})
let params = {
regionId: app.globalData.cityId
}
getMerchantList(params).then(res => {
if (res.return_code == '000000') {
if (res.return_code == '000000' && res.return_data !='') {
this.MerchantList = res.return_data;
this.getStoreListByMerchant(res.return_data[0].id);
setTimeout(function() {
uni.hideLoading();
}, 2000);
} else {
uni.hideLoading()
this.MerchantList = [];
uni.showToast({
title: '暂无数据',
icon: 'none',
duration: 2000
})
}
})
},
@ -189,6 +191,12 @@
});
},
//
goPostion() {
uni.navigateTo({
url: '/pages/user/positioning/positioning'
})
},
//
getStoreListByMerchant(item) {
uni.showLoading({
@ -201,14 +209,11 @@
latitude: app.globalData.latitude
}
getStoreListByMerchant(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.categoryList = res.return_data
setTimeout(function() {
uni.hideLoading();
}, 2000);
} else {
this.categoryList = [];
uni.hideLoading()
}
})
@ -272,7 +277,7 @@
position: fixed;
top: 0;
z-index: 10;
background-color: #fff;
background-color: #0083f5;
/* #ifdef APP-PLUS */
top: var(--status-bar-height);
/* #endif */
@ -281,10 +286,10 @@
width: 120upx;
height: 60upx;
flex-shrink: 0;
color: #FFFFFF;
display: flex;
align-items: center;
font-size: 28upx;
.icon {
height: 60upx;
margin-right: 5upx;
@ -297,9 +302,9 @@
.input-box {
width: 100%;
height: 60upx;
height: 70rpx;
background-color: #f5f5f5;
border-radius: 30upx;
border-radius: 10rpx;
position: relative;
display: flex;
align-items: center;
@ -406,7 +411,7 @@
width: 10upx;
height: 80%;
top: 10%;
background-color: #f06c7a;
background-color: #0083f5;
}
}
}

@ -8,8 +8,8 @@
:style="{ position: headerPosition,top:headerTop,opacity: afterHeaderOpacity }">
<!-- 定位城市 -->
<view class="addr" @click="goPostion">
<view class="icon location"></view>
{{ city }}
<!-- <view class="icon location"></view> -->
{{ city }} <image mode="widthFix" style="width: 15px;" src="../../../static/img/jt.png"></image>
</view>
<!-- 搜索框 -->
<view class="input-box">
@ -58,8 +58,8 @@
<image class="mart30 width100" mode="widthFix" src="../../../static/img/headzq.png"></image>
</view>
<swiper class="orange-content" style="border: 2px solid #ff5836;" :display-multiple-items="productListleg">
<swiper-item class="swiper-hed" v-for="pro in productList" :key="product.id">
<view class="swiper-item" @tap="tapList" :data-id="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">
<image class="img" :src="imageUrl+pro.couponImg" mode="aspectFit">
</image>
<view class="fotct fcor333 font14 text1 mart10">{{pro.couponName}}</view>
@ -74,8 +74,8 @@
</view>
<!-- v-if="goldproductList&&goldproductList.length>0" -->
<swiper class="orange-content" :display-multiple-items="goldproductListleg" next-margin="50rpx">
<swiper-item class="swiper-hed" v-for="(item,index) in goldproductList" :key="index">
<view class="swiper-item" @tap="tapList" :data-id="item.id">
<swiper-item class="swiper-hed" v-for="(item,index) in goldproductList" :key="index" @click="toGoods(item.id)">
<view class="swiper-item" :data-id="item.id">
<image class="img" :src="imageUrl+item.couponImg" mode="aspectFit"></image>
<view class="fotct fcor333 font14 text1 mart10">{{item.couponName}}</view>
<view class="subject fotct mart5">{{ item.discountPrice}}</view>
@ -84,7 +84,7 @@
</swiper>
<!-- 分期 -->
<view style="width: 90%;margin-left: 5%;">
<!-- <view style="width: 90%;margin-left: 5%;">
<image class="mart30 width100" mode="widthFix" src="../../../static/img/fqhed.png"></image>
</view>
<swiper class="orange-content" :display-multiple-items="productListleg">
@ -97,13 +97,13 @@
</view>
</swiper-item>
</swiper>
-->
<!-- 广告图 -->
<!-- <view class="banner" @click="tao">
<image src="/static/img/banner.jpg"></image>
</view> -->
<!-- 商品列表 -->
<view class="goods-list">
<!-- <view class="goods-list">
<view :class="[cpStuats == 1?'active_tie':'title']" @click="eheckStu(1)">
猜你喜欢
</view>
@ -130,7 +130,7 @@
</view>
</view>
</view>
</view>
</view> -->
<!-- <view class="goods-list">
<view class="title">
@ -163,7 +163,7 @@
</view>
</view>
</view> -->
<view class="height60"></view>
</view>
</template>
@ -212,23 +212,23 @@
categoryList: [{
id: 1,
name: '团油',
img: '/static/img/wxpay.png',
img: '/static/img/user/momey.png',
src: '/pages/goods/refuel/refuel'
},
{
id: 2,
name: '电',
img: '/static/img/wxpay.png'
name: '电影票',
img: '/static/img/user/momey.png'
},
{
id: 3,
name: '服饰',
img: '/static/img/wxpay.png'
name: '肯德基',
img: '/static/img/user/momey.png'
},
{
id: 4,
name: '日用',
img: '/static/img/wxpay.png'
name: '话费充值',
img: '/static/img/user/momey.png'
}
],
//
@ -248,6 +248,11 @@
this.getH5AccessToken(arr2[1]);
}
// #endif
if (app.globalData.cityName != '') {
this.city = app.globalData.cityName;
this.getCouponListArea();
this.getCouponListgold();
}
},
onLoad() {
// 1.wxcode
@ -317,6 +322,8 @@
success: function(res) {
that.city = res.data.result.address_component.city.replace(/市/g,
'');
app.globalData.cityName = res.data.result.address_component.city
.replace(/市/g, '');
app.globalData.cityId = res.data.result.ad_info.adcode;
// app.globalData.cityId = '500100';
that.getCouponListArea();
@ -395,8 +402,8 @@
location: locationObj
})
.then(res => {
vm.city = 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();
@ -414,11 +421,17 @@
})
},
//
goPostion(){
goPostion() {
uni.navigateTo({
url:'/pages/user/positioning/positioning'
url: '/pages/user/positioning/positioning'
})
},
//
toGoods(e) {
uni.navigateTo({
url: '../../goods/goods?id='+e
});
},
//
toScan() {
uni.scanCode({
@ -503,10 +516,17 @@
},
//
toCategory(item) {
if(item.name == '团油'){
uni.navigateTo({
url: item.src
})
}else{
uni.showToast({
title: '暂未开通',
icon: 'none',
duration: 2000
})
}
}
}
};
@ -591,9 +611,9 @@
.input-box {
width: 100%;
height: 60upx;
height: 70rpx;
background-color: #f5f5f5;
border-radius: 30upx;
border-radius: 10rpx;
position: relative;
display: flex;
align-items: center;
@ -761,7 +781,7 @@
view {
height: 30upx;
background-color: #f06c7a;
background-color: #0083f5;
display: flex;
justify-content: center;
align-items: center;
@ -964,7 +984,7 @@
}
.orange-content {
height: 160px;
height: 170px;
width: 90%;
margin-left: 5%;
border-radius: 0 0 10px 10px;

@ -53,7 +53,7 @@
<view class="title">我的订单</view>
<view class="list">
<view class="box" v-for="(row,index) in orderList" :key="index" @tap="toOrderList(index)">
<uni-badge style="width: 20px;position: absolute; left: 20%;" v-if="row.text == '待支付' && therrNum "
<uni-badge style="width: 20px;position: absolute; left: 15%;" v-if="row.text == '待支付' && therrNum "
:text="therrNum" type="error" size="normal"></uni-badge>
<view class="img">
<view class="icon" :class="row.icon"></view>
@ -149,15 +149,13 @@
{
text: '已完成',
icon: "shouhuo"
},
// {
// text: '退',
// icon: "pingjia"
// },
{
},{
text: '已退款',
icon: "tuihuo"
},{
text: '已取消',
icon: "pingjia"
},
}
],
//
mytoolbarList: [{
@ -196,12 +194,13 @@
url: '../../login/login?id=2',
text: '我的推广',
img: '/static/img/user/renw.png'
},
{
url: '/pages/user/Charge/Charge',
text: '充话费',
img: '/static/img/user/bank.png'
}
// ,
// {
// url: '/pages/user/Charge/Charge',
// text: '',
// img: '/static/img/user/bank.png'
// }
]
}
},
@ -371,7 +370,7 @@
height: 0;
position: fixed;
z-index: 10;
background-color: #f06c7a;
background-color: #0083f5;
top: 0;
/* #ifdef APP-PLUS */
height: var(--status-bar-height);//
@ -389,7 +388,7 @@
position: fixed;
top: 0;
z-index: 10;
background-color: #f06c7a;
background-color: #0083f5;
/* #ifdef APP-PLUS */
top: var(--status-bar-height);
/* #endif */
@ -419,7 +418,7 @@
height: 0;
position: fixed;
z-index: 10;
background-color: #f06c7a;
background-color: #0083f5;
top: 0;
/* #ifdef APP-PLUS */
height: var(--status-bar-height); //
@ -437,7 +436,7 @@
position: fixed;
top: 0;
z-index: 10;
background-color: #f06c7a;
background-color: #0083f5;
/* #ifdef APP-PLUS */
top: var(--status-bar-height);
@ -461,7 +460,7 @@
}
.place {
background-color: #f06c7a;
background-color: #0083f5;
padding-left: 20px;
padding-right: 20px;
text-align: right;
@ -486,7 +485,7 @@
display: flex;
align-items: center;
// position: relative;
background-color: #f06c7a;
background-color: #0083f5;
padding-bottom: 40rpx;
.left {

@ -125,9 +125,9 @@
box-shadow: 0upx 5upx 20upx rgba(0,0,0,0.05);
font-size: 36upx;
background-color: #f1f1f1;
color: #f06c7a;
color: #0083f5;
&.on{
background-color: #f06c7a;
background-color: #0083f5;
color: #ffffff;
}
}
@ -161,7 +161,7 @@
margin: 0 20upx;
height: 60upx;
font-size: 30upx;
color: #f06c7a;
color: #0083f5;
justify-content: flex-end;
align-items: center;
}
@ -214,7 +214,7 @@
justify-content: center;
align-items: center;
color: #fff;
background-color: #f06c7a;
background-color: #0083f5;
box-shadow: 0upx 5upx 10upx rgba(0,0,0,0.2);
}
.tis{

@ -154,7 +154,7 @@ view{
width: 70%;
height: 80upx;
border-radius: 80upx;
background-color: #f06c7a;
background-color: #0083f5;
color: #fff;
justify-content: center;
align-items: center;
@ -206,7 +206,7 @@ view{
font-size: 22upx;
background-color: #f06c7a;
background-color: #0083f5;
color: #fff;
padding: 0 18upx;
border-radius: 24upx;

@ -39,7 +39,7 @@
设置默认地址
</view>
<view class="input switch">
<switch color="#f06c7a" :checked="isDefault" @change=isDefaultChange />
<switch color="#0083f5" :checked="isDefault" @change=isDefaultChange />
</view>
</view>
<view class="row" v-if="editType=='edit'" @tap="del">
@ -200,7 +200,7 @@
width: 70%;
height: 80upx;
border-radius: 80upx;
background-color: #f06c7a;
background-color: #0083f5;
color: #fff;
justify-content: center;
align-items: center;
@ -251,7 +251,7 @@
justify-content: center;
align-items: center;
font-size: 36upx;
color: #f06c7a;
color: #0083f5;
background-color: rgba(255,0,0,0.05);
border-bottom: solid 1upx #eee;
}

@ -90,8 +90,8 @@
align-items: center;
&.on {
color: #f06c7a;
border-bottom: solid 4upx #f06c7a;
color: #0083f5;
border-bottom: solid 4upx #0083f5;
}
}

@ -350,12 +350,12 @@
}
.on {
color: #f06c7a;
color: #0083f5;
}
.border {
height: 4upx;
background-color: #f06c7a;
background-color: #0083f5;
transition: all .3s ease-out;
&.invalid {

@ -44,7 +44,7 @@
支付宝支付
</view>
<view class="right">
<radio :checked="paytype=='alipay'" color="#f06c7a" />
<radio :checked="paytype=='alipay'" color="#0083f5" />
</view>
</view> -->
<view class="row" @tap="paytype='wxpay'">
@ -55,7 +55,7 @@
微信支付
</view>
<view class="right">
<radio :checked="paytype=='wxpay'" color="#f06c7a" />
<radio :checked="paytype=='wxpay'" color="#0083f5" />
</view>
</view>
</view>
@ -285,7 +285,7 @@
color: 333;
&.on {
background-color: #f06c7a;
background-color: #0083f5;
color: #fff;
}
}
@ -313,7 +313,7 @@
margin: 0 20upx;
height: 60upx;
font-size: 30upx;
color: #f06c7a;
color: #0083f5;
justify-content: flex-end;
align-items: center;
}
@ -374,7 +374,7 @@
justify-content: center;
align-items: center;
color: #fff;
background-color: #f06c7a;
background-color: #0083f5;
box-shadow: 0upx 5upx 10upx rgba(0, 0, 0, 0.2);
}

@ -228,11 +228,11 @@
color: #999;
}
.on{
color: #f06c7a;
color: #0083f5;
}
.border{
height: 4upx;
background-color: #f06c7a;
background-color: #0083f5;
transition: all .3s ease-out;
&.shop{
transform: translate3d(100%,0,0);
@ -383,7 +383,7 @@
}
.price{
font-size: 30upx;
color: #f06c7a;
color: #0083f5;
}
}
}

@ -167,8 +167,8 @@
align-items: center;
&.on {
color: #f06c7a;
border-bottom: solid 4upx #f06c7a;
color: #0083f5;
border-bottom: solid 4upx #0083f5;
}
}
}

@ -160,7 +160,7 @@
width: 15px;
height: 2px;
margin-top: 8px;
background-color: #f06c7a;
background-color: #0083f5;
transform: rotate(100deg);
}
@ -173,7 +173,7 @@
width: 10px;
margin-top: 8px;
height: 2px;
background-color: #f06c7a;
background-color: #0083f5;
transform: rotate(100deg);
}

@ -72,7 +72,7 @@
<style lang="scss">
page{
background-color: #f06c7a;
background-color: #0083f5;
}
.block{
width: 100%;

@ -5,6 +5,8 @@
<view class="width100 font18 fcorfff fotct height40 backcorf06" v-if="recinfo.orderStatus == 3">已完成</view>
<view class="width100 font18 fcorfff fotct height40 backcorf06" v-if="recinfo.orderStatus == 4">已退款</view>
<view class="width100 font18 fcorfff fotct height40 backcorf06" v-if="recinfo.orderStatus == 5">已取消</view>
<view class="width100 font18 fcorfff fotct height40 backcorf06" v-if="recinfo.orderStatus == 6">退款中</view>
<view class="width100 font18 fcorfff fotct height40 backcorf06" v-if="recinfo.orderStatus == 7">退款失败</view>
<!-- 购买商品列表 -->
<view class="buy-list" v-for="rec in recinfo.highChildOrderList" :key="rec.id"
@click="toGoods(rec.goodsId,rec.goodsType)">
@ -12,7 +14,7 @@
<view class="row">
<view class="goods-info">
<view class="img">
<image :src="imageUrl+rec.goodsImg" v-if="rec.goodsType != 2 "></image>
<image :src="imageUrl+rec.goodsImg" v-if="rec.goodsType == 1 "></image>
<image :src="rec.goodsImg" v-else></image>
</view>
<view class="info">
@ -41,6 +43,14 @@
{{recinfo.orderNo}}
</view>
</view>
<view class="row" v-if="recinfo.highChildOrderList[0].gasOrderNo !=null">
<view class="left">
加油单号 :
</view>
<view class="right">
{{recinfo.highChildOrderList[0].gasOrderNo}}
</view>
</view>
<view class="row" v-if="recinfo.paySerialNo">
<view class="left">
支付流水号 :
@ -106,7 +116,7 @@
</view>
<view class="row" v-if="recinfo.deductionPrice">
<view class="left">
优惠券抵扣 :
优惠金额 :
</view>
<view class="right" v-if="recinfo.payType != 3">
{{recinfo.deductionPrice}}
@ -141,6 +151,14 @@
{{recinfo.cancelTime | formatDate('-')}}
</view>
</view>
<view class="row" v-if="recinfo.refusalRefundContent != null">
<view class="left">
退款失败原因 :
</view>
<view class="right">
{{recinfo.refusalRefundContent}}
</view>
</view>
<view class="row" v-if="recinfo.finishTime">
<view class="left">
完成时间 :
@ -527,7 +545,7 @@
height: 40upx;
.price {
color: #f06c7a;
color: #0083f5;
}
.number {
@ -612,7 +630,7 @@
height: 60upx;
width: 20%;
margin-left: 10px;
background-color: #f06c7a;
background-color: #0083f5;
color: #fff;
display: flex;
justify-content: center;
@ -642,7 +660,7 @@
.content {
font-size: 26upx;
color: #f06c7a;
color: #0083f5;
}
}
}

File diff suppressed because one or more lines are too long

@ -1,44 +1,60 @@
<template>
<view>
<view class="width100 backcorfff">
<uSearchBar @confirm="search" @input="input"></uSearchBar>
<view class="line1 mart10"></view>
<!-- <uSearchBar @confirm="search" @input="input"></uSearchBar>
<view class="line1 mart10"></view> -->
<view class="width90 mart20 font15 fcor333">当前定位</view>
<view class="posacname actives width90 mart20">南充</view>
<view class="posacname actives width90 mart20">{{posName}}</view>
<view class="width90 mart20 font14 fcor333">其他地区</view>
<view class="posacname mart20 flleft font14" :class="{'actives':posId===item.name}" v-for="(item,index) in posList" @click="change(item)">
{{item.name}}</view>
<view class="posacname mart20 flleft font14" :class="{'actives':posId===item.regionId}"
v-for="(item,index) in posList" @click="change(item)">
{{item.regionName}}
</view>
</view>
</view>
</template>
<script>
import uSearchBar from '../../../components/uni-search-bar/components/uni-search-bar/uni-search-bar.vue';
import {
getDredgeProvince
} from '../../../Utils/Api.js';
let app = getApp();
export default {
components: {
uSearchBar
},
data() {
return {
posList: [{
name: '南充'
},
{
name: '高坪'
posList: [],
posId: '',
posName: ''
}
},
{
name: '嘉陵'
onLoad() {
this.getDredgeProvince();
this.posName = app.globalData.cityName;
},
{
name: '南部'
}
],
posId: ''
methods: {
getDredgeProvince() {
uni.showLoading({
title: '加载中'
})
getDredgeProvince().then(res => {
uni.hideLoading()
if (res.return_code == '000000') {
this.posList = res.return_data;
}
});
},
methods: {
change(item) {
this.posId = item.name;
this.posId = item.regionId;
this.posName = item.regionName;
app.globalData.cityId = item.regionId;
app.globalData.cityName = item.regionName.replace(/市/g,'');
uni.navigateBack({
})
}
}
}
@ -56,7 +72,7 @@
border-radius: 5px;
}
.actives{
.actives {
color: #089bf5;
background-color: #f4faff;
border: 1px solid #089bf5;

@ -1,5 +1,5 @@
page {
background: linear-gradient(to bottom, #f06c7a 0%, #f06c7a 100%);
background: linear-gradient(to bottom, #0083f5 0%, #0083f5 100%);
height: 100%;
}
.icon {
@ -45,7 +45,7 @@ page {
}
.btn {
color: #f06c7a;
color: #0083f5;
width: 100%;
margin-top: 50rpx;
height: 90rpx;

Binary file not shown.

After

Width:  |  Height:  |  Size: 716 B

@ -232,7 +232,7 @@ $uni-font-size-paragraph:30upx;
}
.backcorf06{
background-color: #f06c7a;
background-color: #0083f5;
}
.backcor008{
@ -258,6 +258,12 @@ $uni-font-size-paragraph:30upx;
margin-left: 5%;
}
.width96 {
width: 96%;
margin-left: 2%;
}
.width80 {
width: 80%;
margin-left: 10%;
@ -287,8 +293,7 @@ $uni-font-size-paragraph:30upx;
}
.width60 {
width: 65%;
margin-left: 5%;
width: 60%
}
.width60w {
@ -406,6 +411,9 @@ $uni-font-size-paragraph:30upx;
/* 向上下外间距 */
.margle10{
margin-left: 10px;
}
.mart90 {
margin-top: 90px;
}
@ -552,7 +560,7 @@ $uni-font-size-paragraph:30upx;
color: white;
text-align: center;
margin-top: 40px;
background-color: #f06c7a;
background-color: #0083f5;
border-radius: 6px;
}

Loading…
Cancel
Save