1.修改样式

2.修改团油支付方式
master
杨杰 3 years ago
parent 92f206495f
commit 0d7b762949
  1. 16
      high-unionPay/App.vue
  2. 5
      high-unionPay/Utils/Api.js
  3. 34
      high-unionPay/pages.json
  4. 4
      high-unionPay/pages/goods/goods-list/goods-list.vue
  5. 88
      high-unionPay/pages/goods/refuel-confirm/refuel-confirm.vue
  6. 2
      high-unionPay/pages/goods/refuel-details/refuel-details.vue
  7. 25
      high-unionPay/pages/goods/refuel/refuel.vue
  8. 62
      high-unionPay/pages/pay/payment/payment.vue
  9. 40
      high-unionPay/pages/tabBar/user/user.vue
  10. 61
      high-unionPay/pages/unionPay/unionPay-entrance/unionPay-entrance.vue
  11. 396
      high-unionPay/subPages/unionPay-orderList/unionPay-orderList.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: '',

@ -326,3 +326,8 @@ export const getAgentSalesPriceCount = params => {
export const sendUserPass = params => {
return POSTBREST('POST', `${brestBase}/secUser/sendUserPass`, params).then(res => res.data);
}
//话费列表
export const getUserOrderListhuafei = params => {
return POST('GET', `${base}/outRechargeOrder/getUserOrderList`, params).then(res => res.data);
}

@ -1,6 +1,17 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path" : "pages/unionPay/unionPay-entrance/unionPay-entrance",
"style" :
{
"navigationBarTitleText": "嗨加油",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"enablePullDownRefresh": false
}
},{
"path" : "pages/unionPay/unionPay",
"style" :
{
@ -486,18 +497,7 @@
}
}
,{
"path" : "pages/unionPay/unionPay-entrance/unionPay-entrance",
"style" :
{
"navigationBarTitleText": "嗨加油",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/unionPay/recharge-centre/recharge-centre",
"style" :
@ -510,6 +510,7 @@
}
}
],
"subpackages": [{
"root": "subPages",
@ -524,6 +525,17 @@
"navigationBarTextStyle": "white"
}
},{
"path": "unionPay-orderList/unionPay-orderList",
"style": {
"enablePullDownRefresh": false,
"navigationBarTitleText": "话费订单",
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white"
}
}]
}],
"globalStyle": {

@ -110,7 +110,7 @@
//
getCmsContent() {
let params = {
regionId: '500000',
regionId: app.globalData.cityId,
categoryCode: 'CMS_WX_APPLETS_GOODS_LIST'
}
getCmsContent(params).then(res => {
@ -134,7 +134,7 @@
}
let pagenum = this.pageNum;
let params = {
regionId: '500000',
regionId: app.globalData.cityId,
pageNum: pagenum,
pageSize: this.pageSize,
displayArea: this.typeId,

@ -36,20 +36,10 @@
<view class="mart10 heightl60 paddleft10 fcor333 fontwig6 font18 width100 backcorfff">支付方式</view>
<view class="line1"></view>
<view class="width100 backcorfff">
<!-- <view class="height50 width100 backcorfff" @tap="paytype='weixin'">
<view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
微信支付
</view>
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;">
<radio :checked="paytype=='weixin'" color="#0083f5" />
</view>
</view>
<view class="width94 line1 mart5 marb5"></view> -->
<view class="line1"></view>
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" @tap="paytype='weixin'">
<view class="width60 flleft fontwig6">
微信支付
银联支付
</view>
<view class="flright width30 fotct">
<radio :checked="paytype=='weixin'" color="#0083f5" />
@ -59,7 +49,7 @@
<view class="line1"></view>
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" @tap="paytype='gonghuika'">
<view class="width60 flleft fontwig6">
汇联通工会卡<text class="font14 fcor666 margle">余额: {{tongCardPrice}}</text>
积分<text class="font14 fcor666 margle">(积分:{{user.gold}})</text>
</view>
<view class="flright width30 fotct">
<radio :checked="paytype=='gonghuika'" @click="changeRiado()" color="#0083f5" />
@ -89,14 +79,10 @@
import {
getOrderById,
orderToPay,
getHuiLianTongCardBalance,
hltUnionCardPay
} from '../../../Utils/Api.js';
import ssPaymentPassword from '../../../components/sanshui-payment-password/index.vue';
let app = getApp();
// #ifdef H5
var jweixin = require('jweixin-module');
// #endif
export default {
components: {
ssPaymentPassword
@ -125,7 +111,6 @@
let that = this;
that.paytype = '';
that.user = app.globalData.userInfo;
that.getHuiLianTongCardBalance();
},
methods: {
//
@ -204,18 +189,7 @@
}
})
},
//
getHuiLianTongCardBalance() {
let params = {
cardNo: this.user.hltCardNo.cardNo
}
getHuiLianTongCardBalance(params).then(res => {
if (res.return_code == '000000') {
this.tongCardPrice = res.return_data.balance;
}
});
},
//
orderToPay() {
let that = this;
@ -300,65 +274,7 @@
}
that.$refs.paymentPassword.modalFun('show');
}
},
payRequest: function(self) {
let that = this;
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) {},
complete: function(res) {
}
});
});
jweixin.error(function(res) {
uni.showToast({
icon: 'none',
title: '支付失败了',
duration: 4000
});
// configerrorconfigdebugresSPA
/*alert("config信息验证失败");*/
});
},
}
}
</script>

@ -207,6 +207,8 @@
})
let params = {
storeKey: this.store_key,
// latitude: '30.83876',
// longitude: '106.129505',
latitude: app.globalData.latitude,
longitude: app.globalData.longitude
}

@ -7,7 +7,6 @@
<!-- <slFilter :independence="true" :color="titleColor" :themeColor="themeColor" :menuList.sync="menuList"
@result="result"></slFilter> -->
<view class="width100 height40 backcorfff">
<view class="width90">
<view class="stuMenu flleft fotct" @click="showPopup(1)">{{distance}}
<image mode="widthFix" class="stuimg margle" :src="imagewxUrl+imgadres2"></image>
</view>
@ -18,7 +17,6 @@
<image mode="widthFix" class="stuimg margle" :src="imagewxUrl+imgadres2"></image>
</view>
</view>
</view>
<view v-if="refuelList == '' " class="mart60 fotct font14 fcor666">
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres3"></image>
@ -304,21 +302,11 @@
]
}
],
onilName: '92#',
latitudeful:'',
longitudeful:''
onilName: '92#'
}
},
onLoad() {
let that = this;
uni.getLocation({
type: 'wgs84',
success: function(res) {
that.latitudeful = res.latitude;
that.longitudeful = res.longitude;
that.getGasStoreList();
}
})
this.getGasStoreList();
},
onReachBottom() {
this.getGasStoreList();
@ -391,10 +379,13 @@
let params = {
storeName: this.searname,
distance: this.distanceNum,
regionId: '500000',
regionId: app.globalData.cityId,
// regionId: '510000',
oilNoName: this.onilName,
latitude: this.latitudeful,
longitude: this.longitudeful,
latitude: app.globalData.latitude,
longitude: app.globalData.longitude,
// latitude: '30.83876',
// longitude: '106.129505',
pageNum: pagenum,
pageSize: this.pageSize
}

@ -76,9 +76,6 @@
} from '../../../Utils/Api.js'
import ssPaymentPassword from '../../../components/sanshui-payment-password'
let app = getApp();
// #ifdef H5
var jweixin = require('jweixin-module');
// #endif
export default {
components: {
ssPaymentPassword
@ -249,66 +246,7 @@
icon: 'none'
})
})
},
payRequest: function(self) {
uni.showLoading({
title: '支付中...'
})
jweixin.config({
// debug: false, // ,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: '支付成功'
})
if (that.jumpType == 4) {
uni.reLaunch({
url: '/pages/tabBar/user/user'
});
return;
}
uni.reLaunch({
url: '../success/success?id=' + that.couponId
});
},
cancel: function(r) {},
fail: function(res) {}
});
});
jweixin.error(function(res) {
uni.showToast({
icon: 'none',
title: '支付失败了',
duration: 4000
});
// configerrorconfigdebugresSPA
/*alert("config信息验证失败");*/
});
},
}
}
</script>

@ -54,6 +54,20 @@
</view>
</view>
</view>
<!-- 话费充值 -->
<view class="order">
<!-- 订单类型 -->
<view class="title">话费充值</view>
<view class="list">
<view class="box" v-for="(row,index) in huafeiList" :key="index" @tap="toOrdehuafeirList(index)">
<view class="img">
<view class="icon" :class="row.icon"></view>
</view>
<view class="text">{{row.text}}</view>
</view>
</view>
</view>
<!-- 工具栏 -->
<view class="toolbar">
<view class="title">卡券中心</view>
@ -163,6 +177,26 @@
icon: "pingjia"
}
],
huafeiList:[
{
text: '待支付',
icon: "fukuan"
},
{
text: '已支付',
icon: "fahuo"
},
{
text: '已完成',
icon: "shouhuo"
}, {
text: '已取消',
icon: "pingjia"
}, {
text: '已退款',
icon: "tuihuo"
}
],
//
mytoolbarList: [
// {
@ -339,6 +373,12 @@
});
},
//
toOrdehuafeirList(index) {
uni.navigateTo({
url: '../../../subPages/unionPay-orderList/unionPay-orderList?tbIndex=' + index
})
},
//
toMsg() {
uni.showToast({

@ -12,18 +12,75 @@
</template>
<script>
let app = getApp();
export default {
data() {
return {
return {}
},
onLoad() {
uni.getStorage({
key: "user",
success(e) {
app.globalData.userInfo = e.data //token
uni.getStorage({
key: 'token',
success(e) {
app.globalData.token = e.data;
}
})
},
fail: res => {}
})
},
methods: {
//
jumprecharge(item) {
if (app.globalData.latitude) {
this.hqaddress(item);
return;
}
this.jumpsValue(item);
},
//
//
hqaddress(item) {
let that = this;
upsdk.pluginReady(function() {
upsdk.getLocationCity({
success: function(cityCd) {
app.globalData.cityId = cityCd;
},
fail: function(err) {}
});
upsdk.getLocationGps({
success: function(res) {
switch (uni.getSystemInfoSync().platform) {
case 'android':
let zuob = JSON.parse(res);
app.globalData.latitude = zuob.latitude;
app.globalData.longitude = zuob.longitude;
that.jumpsValue(item);
break;
case 'ios':
app.globalData.latitude = res.latitude;
app.globalData.longitude = res.longitude;
that.jumpsValue(item);
break;
}
},
fail: function() {}
});
});
},
//
jumpsValue(item) {
if (item == 1) {
uni.navigateTo({
url: '../../goods/goods-list/goods-list?id=2'
url: '../../goods/goods-list/goods-list?id=3'
})
return;
}

@ -0,0 +1,396 @@
<template>
<view>
<!-- 顶部导航 -->
<view class="topTabBar" :style="{position:headerPosition,top:headerTop}">
<view class="grid" v-for="(grid,tbIndex) in orderType" :key="tbIndex" @tap="showType(tbIndex)">
<view class="text" :class="[tbIndex==tabbarIndex?'on':'']">{{grid}}</view>
</view>
</view>
<!-- 考虑非APP端长列表和复杂的DOM使用scroll-view会卡顿所以漂浮顶部选项卡使用page本身的滑动 -->
<view class="order-list">
<view class="list">
<view class="onorder" v-if="orderList.length==0">
<image :src="imagewxUrl+imgadres"></image>
</view>
<view class="row" v-for="(row,index) in orderList" :key="index">
<view class="width96 height40">
<view class="width50 flleft aliitem fotlt font16">
<image src="../../static/img/order1.png" style="width: 50rpx;height: 50rpx;"></image>
话费充值
</view>
<view class="width50 flright fotrt fcor666 font15">
{{row.createTimed | formatDate('-')}}
</view>
</view>
<view class="width96 line1 mart10"></view>
<view class="width96 height60 mart10" @click="jumpDetails(row.id)">
<view class="width70 flleft fotlt ">
<view class="font16 fontwig6 text1 fcor333">
{{row.remarks}}
</view>
<view class="font15 text1 fcor999 mart5">
数量 : 1
</view>
</view>
<view class="width30 flright fotrt fcor666 font15 fotrt">
<view class="font16 fontwig6 text1 fcor333" v-if="row.payType == 1 || row.payType == 3">
{{row.payPrice}}
</view>
<view class="font16 fontwig6 text1 fcor333 aliitem" style="justify-content: flex-end;" v-else>
<image style="width: 15px;height: 15px;"
src="../../static/img/jfx.png">
</image>{{row.payPrice*100}}
</view>
<view class="fotrt font15 text1 fcor999 mart5">{{typeText[row.status]}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
getUserOrderListhuafei
} from '../../Utils/Api.js';
let app = getApp()
export default {
data() {
return {
headerPosition: "fixed",
imagewxUrl: app.globalData.imageWxImg,
imgadres: 'noorder.png',
imgadres1: 'dhf.png',
headerTop: "0px",
typeText: {
1: '等待付款',
2: '订单已支付',
3: '订单已完成',
5: '订单已取消',
4: '订单已退款'
},
// 退
orderType: ['全部', '待支付', '已支付', '已完成', '已取消', '已退款'],
//
orderList: [],
list: [],
tabbarIndex: 0,
pageNum: 1,
pageSize: 10,
isNoMoreData: false,
loadingText: '',
typeId: '',
imageUrl: app.globalData.imgUrl,
reFresh: ""
}
},
onLoad(option) {
// #ifdef H5
this.headerTop = '44px';
// #endif
let tbIndex = parseInt(option.tbIndex) + 1;
this.list = this.orderList[tbIndex];
this.tabbarIndex = tbIndex;
this.typeId = tbIndex;
this.getUserOrderListhuafei();
},
onPageScroll(e) {
return;
//iOS
this.headerPosition = e.scrollTop >= 0 ? "fixed" : "absolute";
},
onReachBottom() {
this.getUserOrderListhuafei();
},
filters: {
toFixed: function(x) {
return parseFloat(x).toFixed(2);
},
//
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}`;
}
},
methods: {
//
getUserOrderListhuafei() {
uni.showLoading({
title: '加载中...'
})
if (this.isNoMoreData) {
uni.hideLoading()
return false;
}
let statusId = this.typeId;
let pagenum = this.pageNum;
let params = {
status: statusId,
pageNum: this.pageNum,
pageSize: this.pageSize
}
getUserOrderListhuafei(params).then(res => {
if (res.return_code == '000000' && res.return_data.list != '') {
uni.hideLoading();
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true;
if (res.return_data.total == (this.pageNum * this.pageSize)) {
this.isNoMoreData = true;
}
this.orderList = this.orderList.concat(res.return_data.list);
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
} else {
this.orderList = [];
uni.hideLoading()
}
})
},
showType(tbIndex) {
this.tabbarIndex = tbIndex;
this.pageNum = 1;
this.orderList = []
this.isNoMoreData = false;
if (tbIndex == 0) {
this.typeId = '';
} else {
this.typeId = tbIndex;
}
this.getUserOrderListhuafei();
},
}
}
</script>
<style lang="scss">
page {
background-color: #f3f3f3;
}
.zspec {
font-size: 22rpx;
background-color: #0083f5;
color: #FFFFFF;
height: 40rpx;
display: -webkit-box;
display: -webkit-flex;
display: flex;
width: 44px;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
padding: 0 15rpx;
border-radius: 4px;
margin-bottom: 10px;
margin-left: 5px;
}
.loading-text {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
height: 60upx;
color: #979797;
font-size: 24upx;
}
.topTabBar {
width: 100%;
position: fixed;
top: 0;
z-index: 10;
background-color: #f8f8f8;
height: 80upx;
display: flex;
justify-content: space-around;
.grid {
width: 20%;
height: 80upx;
display: flex;
justify-content: center;
align-items: center;
color: #444;
font-size: 28upx;
.text {
height: 76upx;
display: flex;
align-items: center;
&.on {
color: #0083f5;
border-bottom: solid 4upx #0083f5;
}
}
}
}
.order-list {
margin-top: 80upx;
padding-top: 20upx;
width: 100%;
.list {
width: 94%;
margin: 0 auto;
.onorder {
width: 100%;
height: 50vw;
display: flex;
justify-content: center;
align-content: center;
flex-wrap: wrap;
image {
width: 70vw;
margin-top: 150px;
}
.text {
width: 100%;
height: 60upx;
font-size: 28upx;
color: #444;
display: flex;
justify-content: center;
align-items: center;
}
}
.row {
width: calc(100% - 40upx);
padding: 10upx 20upx;
border-radius: 10upx;
background-color: #fff;
margin-bottom: 20upx;
.type {
font-size: 26upx;
color: #0083f5;
height: 50upx;
display: flex;
align-items: center;
}
.order-info {
width: 100%;
display: flex;
.left {
flex-shrink: 0;
width: 25vw;
height: 25vw;
image {
width: 25vw;
height: 25vw;
border-radius: 10upx;
}
}
.right {
width: 100%;
margin-left: 10upx;
position: relative;
.name {
width: 100%;
font-size: 18px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.spec {
color: #a7a7a7;
font-size: 14px;
}
.price-number {
width: 100%;
font-size: 15px;
display: flex;
.price {
font-size: 14px;
margin-right: 5upx;
}
}
}
}
.detail {
display: flex;
justify-content: flex-end;
align-items: flex-end;
height: 60upx;
font-size: 26upx;
.sum {
padding: 0 8upx;
display: flex;
align-items: flex-end;
.price {
font-size: 30upx;
}
}
}
.btns {
height: 80upx;
display: flex;
align-items: center;
justify-content: flex-end;
view {
min-width: 120upx;
height: 70rpx;
padding: 0 20upx;
border-radius: 50upx;
display: flex;
justify-content: center;
align-items: center;
font-size: 28upx;
margin-left: 20upx;
}
.default {
border: solid 1upx #ccc;
color: #666;
}
.pay {
background-color: #0083f5;
color: #FFFFFF;
}
}
}
}
}
</style>
Loading…
Cancel
Save