1.修改充值话费话语

2.新增积分充值
3.银联支付修改为积分支付
master
杨杰 3 years ago
parent 8866ea3313
commit 7cef51200c
  1. 484
      high-unionPay/components/QS-tabs/QS-tabs.vue
  2. 2
      high-unionPay/pages/goods/externalCoupon/externalCoupon.vue
  3. 2
      high-unionPay/pages/goods/goods.vue
  4. 53
      high-unionPay/pages/order/confirmation.vue
  5. 7
      high-unionPay/pages/tabBar/home/home.vue
  6. 43
      high-unionPay/pages/tabBar/user/user.vue
  7. 118
      high-unionPay/pages/unionPay/recharge-centre/recharge-centre.vue
  8. 158
      high-unionPay/pages/user/deposit/deposit.vue
  9. 18
      high-unionPay/pages/user/mineCouponsDestails/mineCouponsDestails.vue
  10. BIN
      high-unionPay/static/img/unionimg/upay3.jpg
  11. 5
      high-unionPay/uni.scss

@ -0,0 +1,484 @@
<template>
<view class="QS-tabs" :style="{
'z-index': zIndex,
'font-size': getFontSize + 'rpx',
'background-color': getBgColor,
'transition-duration': getDuration + 's'
}">
<scroll-view scroll-x class="QS-tabs-scroll" :scroll-left="left" scroll-with-animation :style="{
'z-index': (Number(zIndex) + 1)
}">
<view class="QS-tabs-scroll-box">
<!-- 循环tabs -->
<view class="QS-tabs-scroll-item" :style="{
'height':'100rpx',
'line-height': getHeight + 'rpx',
'min-width': getWidth + 'rpx',
'padding': '0 ' + space + 'rpx',
'color': index===getCurrent?getActiveColor:getDefaultColor,
'font-weight': activeBold&&index===getCurrent?'bold':'',
'transition-duration': getDuration + 's',
'z-index': (Number(zIndex) + 2)
}"
v-for="(item, index) in getTabs" :key="index" @tap="emit(index)" :id="preId + index">
<!-- line1 -->
<view v-if="animationMode==='line1'" class="boxStyle" :style="getDurationStyle +( index===getCurrent?getActiveStyle:getDefaultStyle)"></view>
{{item.name || item}}
</view>
<!-- itemBackground -->
<view v-if="hasItemBackground" class="itemBackgroundBox" :style="{
'height': getHeight + 'rpx',
'width': (isLine3&&tabsInfo[animationFinishCurrent]?tabsInfo[animationFinishCurrent].width:tabsInfo[getCurrent].width) + 'px',
'z-index': Number(zIndex) + 1,
'transition-duration': getDuration + 's',
'left': (tabsInfo[getCurrent]?tabsInfo[getCurrent].left:0) + 'px'
}">
<view class="itemBackground" :style="'transition-duration:' + getDuration + 's;' +
'background-color:' + getItemBackgroundColor + ';' +
'box-shadow: 0 0 5rpx 5rpx ' + getItemBackgroundColor + ';' +
itemBackgroundStyle + ';'" />
</view>
<!-- line2 -->
<view v-if="animationMode==='line2'" class="boxStyle2" :style="getLinezIndex + getDurationStyle +
'width:' + lW + 'px;' +
'background-color:' + (lineColor||getActiveColor) + ';' +
line2Style + ';' +
'left:' + line2Dx + 'px;'" />
<view v-if="animationMode==='line3'" class="boxStyle2" :style="getLinezIndex +
'width:' + lW + 'px;' +
'background-color:' + (lineColor||getActiveColor) + ';' +
line2Style + ';' +
'left:' + getLine3Dx + 'px'" />
</view>
</scroll-view>
</view>
</template>
<script>
const {
windowWidth
} = uni.getSystemInfoSync();
const preId = 'QSTabsID_';
export default {
props: {
tabs: { //
type: Array,
default () {
return [];
}
},
current: { // index
type: Number,
default: 0
},
height: { //QS-tabs
type: [String, Number],
default: 80
},
minWidth: { //tab //v1.4
type: [String, Number],
default: 250
},
fontSize: { //
type: [String, Number],
default: 30
},
duration: { //, s
type: [String, Number],
default: .5
},
activeColor: { //
type: String,
default: '#33cc33'
},
defaultColor: { //
type: String,
default: '#888'
},
animationLineWidth: { //线
type: [String, Number],
default: 20
},
line2Style: { //line2线
type: String,
default: 'height: 8rpx;border-radius: 4rpx;'
},
animationMode: { //
type: String,
default: 'line1'
},
autoCenter: { //
type: Boolean,
default: true
},
autoCenterMode: { //
type: String,
default: 'component'
},
activeStyle: { //line1
type: String,
default: 'bottom:0;left:50%;transform: translate(-50%,-100%);height: 8rpx;border-radius:4rpx;'
},
defaultStyle: { //line1
type: String,
default: 'bottom:0;left:50%;transform: translate(-50%,-100%);height: 8rpx;border-radius:4rpx;'
},
backgroundColor: { //
type: String,
default: 'rgba(255,255,255,0)'
},
hasItemBackground: { //
type: Boolean,
default: false
},
itemBackgroundColor: { //
type: String,
default: 'rgba(255,255,255,0)'
},
itemBackgroundStyle: { //
type: String,
default: ''
},
zIndex: { //cssz-index
type: [String, Number],
default: 99
},
swiperWidth: { //line3, swiper, rpx
type: [String, Number],
default: 750
},
space: { //tab
type: [String, Number],
default: '0'
},
activeBold: { //tab
type: Boolean,
default: true
},
lineColor: { //line
type: String,
default: ''
}
},
computed: {
isLine3() {
return this.animationMode === 'line3';
},
getCurrent() {
const current = Number(this.current);
if (current > (this.getTabs.length - 1)) {
return (this.getTabs.length - 1)
}
return current;
},
getTabs() {
return this.tabs;
},
getHeight() {
return Number(this.height);
},
getWidth() {
return Number(this.minWidth);
},
getFontSize() {
return this.fontSize;
},
getDuration() {
return Number(this.duration);
},
getBgColor() {
const defaultColor = this.backgroundColor || 'rgba(255,255,255,0)';
if (this.getTabs[this.getCurrent] instanceof Object) {
return this.getTabs[this.getCurrent].backgroundColor || defaultColor;
} else {
return defaultColor;
}
},
getItemBackgroundColor() {
const defaultColor = this.itemBackgroundColor || 'rgba(255,255,255,0)';
if (this.getTabs[this.getCurrent] instanceof Object) {
return this.getTabs[this.getCurrent].itemBackgroundColor || defaultColor;
} else {
return defaultColor;
}
},
getDurationStyle() {
return `transition-duration: ${this.getDuration}s;`
},
getActiveColor() {
let activeColor;
if (this.getTabs[this.getCurrent] instanceof Object) {
if (this.getTabs[this.getCurrent].activeColor) {
activeColor = this.getTabs[this.getCurrent].activeColor;
} else {
activeColor = this.activeColor;
}
} else {
activeColor = this.activeColor;
}
return activeColor;
},
getDefaultColor() {
let defaultColor;
if (this.getTabs[this.getCurrent] instanceof Object) {
if (this.getTabs[this.getCurrent].defaultColor) {
defaultColor = this.getTabs[this.getCurrent].defaultColor;
} else {
defaultColor = this.defaultColor;
}
} else {
defaultColor = this.defaultColor;
}
return defaultColor;
},
getActiveStyle() {
return `width:${this.animationLineWidth}%;background-color:${this.getActiveColor};${this.activeStyle};`;
},
getDefaultStyle() {
return `width:0;background-color:${this.getActiveColor};${this.defaultStyle};`;
},
getLinezIndexNum() {
return Number(this.zIndex) + 2;
},
getLinezIndex() {
return `z-index: ${this.getLinezIndexNum};`;
},
getLine3Dx() {
return Number(this.line3Dx) + Number(this.line3AddDx);
}
},
watch: {
current(n, o) {
this.change(n);
},
tabs() {
this.init();
}
},
data() {
return {
left: 0,
tabsInfo: [],
line2Width: Number(this.animationLineWidth),
setTimeoutFc: null,
componentsWidth: 0,
animationFinishCurrent: this.current,
pxWidth: 0,
lW: 0,
sW: 0,
preId,
line3Dx: 0,
line3AddDx: 0,
line2Dx: 0
}
},
// #ifndef H5
onReady() {
this.init();
},
// #endif
// #ifdef H5
mounted() {
this.init();
},
// #endif
methods: {
init() {
this.countPx();
let view = uni.createSelectorQuery().in(this);
for (let i = 0; i < this.tabs.length; i++) {
view.select('#' + preId + i).boundingClientRect();
}
view.exec((res) => {
const arr = [];
for (let i = 0; i < res.length; i++) {
arr.push(res[i]);
}
this.tabsInfo = arr;
this.countLine2Dx();
this.countLine3Dx();
let _this = this;
_this.getQuery(() => {
_this.countScrollX();
});
})
},
countLine2Dx() {
if (this.animationMode === 'line2') {
const tab = this.tabsInfo[this.getCurrent];
if(tab) this.line2Dx = tab.left + tab.width / 2 - this.lW / 2;
}
},
countLine3Dx() {
if (this.animationMode === 'line3') {
const tab = this.tabsInfo[this.animationFinishCurrent];
if(tab) this.line3Dx = tab.left + tab.width / 2 - this.lW / 2;
}
},
countPx() {
const w = uni.upx2px(this.getWidth);
this.pxWidth = w;
this.lW = (w * (Number(this.animationLineWidth) / 100))+72.5;
this.sW = uni.upx2px(Number(this.swiperWidth));
},
emit(index) {
this.$emit('change', index);
},
change() {
this.countScrollX();
if (this.animationMode === 'line2') {
this.line2Width = 2;
if (this.setTimeoutFc) clearTimeout(this.setTimeoutFc);
this.setTimeoutFc = setTimeout(() => {
this.line2Width = this.animationLineWidth;
}, this.getDuration * 1000 * 3 / 5);
this.countLine2Dx();
}
},
getQuery(cb) {
try {
let view = uni.createSelectorQuery().in(this).select('.QS-tabs');
view.fields({
size: true
}, data => {
if (data) {
this.componentsWidth = data.width;
if (cb && typeof cb === 'function') cb(data);
} else {
this.retryGetQuery(cb);
}
}).exec();
} catch (e) {
//TODO handle the exception
this.componentsWidth = windowWidth;
}
},
retryGetQuery(cb) {
try {
let view = uni.createSelectorQuery().select('.QS-tabs');
view.fields({
size: true
}, data => {
if (data) {
this.componentsWidth = data.width;
} else {
this.componentsWidth = windowWidth;
}
if (cb && typeof cb === 'function') cb(data);
}).exec();
} catch (e) {
//TODO handle the exception
this.componentsWidth = windowWidth;
}
},
countScrollX() {
if (this.autoCenter) {
let tab;
if(this.isLine3) {
tab = this.tabsInfo[this.animationFinishCurrent];
}else{
tab = this.tabsInfo[this.getCurrent];
}
if(tab) {
let tabCenter = tab.left + tab.width/2;
let fatherWidth;
if (this.autoCenterMode === 'window') {
fatherWidth = windowWidth;
} else {
fatherWidth = this.componentsWidth;
}
this.left = tabCenter - fatherWidth / 2;
}
}
},
setDx(dx) {
const tab = this.tabsInfo[dx>0?(this.animationFinishCurrent + 1):(this.animationFinishCurrent - 1)];
this.line3AddDx = dx / this.sW * (tab?tab.width:this.pxWidth);
},
setFinishCurrent(current) {
this.line3AddDx = 0;
this.animationFinishCurrent = current;
this.countLine3Dx();
}
}
}
</script>
<style scoped>
view,
scroll-view {
box-sizing: border-box;
}
.QS-tabs {
width: 100%;
transition-property: background-color, color;
}
.QS-tabs::-webkit-scrollbar {
display: none;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
}
.QS-tabs-scroll {
width: 100%;
white-space: nowrap;
position: relative;
}
.QS-tabs-scroll-box {
position: relative;
display: flex;
white-space: nowrap !important;
display: block !important;
}
.QS-tabs-scroll-item {
position: relative;
display: inline-block;
text-align: center;
transition-property: background-color, color, font-weight;
}
.content {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.boxStyle {
pointer-events: none;
position: absolute;
transition-property: all;
}
.boxStyle2 {
pointer-events: none;
position: absolute;
bottom: 0;
transition-property: all;
transform: translateY(-100%);
}
.itemBackgroundBox {
pointer-events: none;
position: absolute;
top: 0;
transition-property: left, background-color;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.itemBackground {
height: 100%;
width: 100%;
transition-property: all;
}
</style>

@ -299,7 +299,7 @@
toGoods(e) { toGoods(e) {
if (app.globalData.userInfo) { if (app.globalData.userInfo) {
uni.navigateTo({ uni.navigateTo({
url: '../../order/confirmation?id=' + e url: '../../order/confirmation?id=' + e +'&typeid=2'
}) })
} else { } else {
uni.showToast({ uni.showToast({

@ -319,7 +319,7 @@
duration: 2000, duration: 2000,
success() { success() {
uni.navigateTo({ uni.navigateTo({
url: '../order/confirmation?id=' + that.goodsData[0].id url: '../order/confirmation?id=' + that.goodsData[0].id+'&typeid=1'
}) })
} }
}) })

@ -90,12 +90,12 @@
<view class="width94 comorder mart10"> <view class="width94 comorder mart10">
<view class="height50 width100 backcorfff"> <view class="height50 width100 backcorfff">
<view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;"> <view class="width100 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
支付方式 支付方式<text class="jfrecharge" @click="jumpdeposits" v-if="typeId == 1">积分充值</text>
</view> </view>
</view> </view>
<view class="width94 line1 mart5 marb5"></view> <view class="width94 line1 mart5 marb5" v-if="typeId == 1"></view>
<!-- <view class="height50 width100 backcorfff" @tap="paytype='jinbi'"> <view class="height50 width100 backcorfff" @tap="paytype='jinbi'" v-if="typeId == 1">
<view class="width70 flleft fcor333 fontwig6 font16 text1" style="padding-left: 4%;"> <view class="width70 flleft fcor333 fontwig6 font16 text1" style="padding-left: 4%;">
积分支付<text class="font14 fcor666 margle">可用积分: {{user.gold}}</text> 积分支付<text class="font14 fcor666 margle">可用积分: {{user.gold}}</text>
</view> </view>
@ -104,8 +104,8 @@
<radio :checked="paytype=='jinbi'" color="#0083f5" /> <radio :checked="paytype=='jinbi'" color="#0083f5" />
</view> </view>
</view> </view>
<view class="width94 line1 mart5 marb5"></view> --> <view class="width94 line1 mart5 marb5" v-if="typeId == 2"></view>
<view class="height50 width100 backcorfff" @tap="paytype='unionPay'"> <view class="height50 width100 backcorfff" @tap="paytype='unionPay'" v-if="typeId == 2">
<view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;"> <view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
银联支付 银联支付
</view> </view>
@ -215,12 +215,14 @@
tongCardPrice: 0, tongCardPrice: 0,
storeId: '', storeId: '',
isDiscont: false, isDiscont: false,
coupondiscountid:'' coupondiscountid: '',
typeId:''
}; };
}, },
onLoad(option) { onLoad(option) {
this.couponId = option.id; this.couponId = option.id;
this.typeId = option.typeid;
this.getCouponById(); this.getCouponById();
}, },
onShow() { onShow() {
@ -431,6 +433,21 @@
orderToPay(item) { orderToPay(item) {
let that = this; let that = this;
if (that.paytype == 'jinbi') { if (that.paytype == 'jinbi') {
if (that.user.gold < that.paytheprice * 100) {
uni.showToast({
icon: 'none',
title: '积分不足',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url: '../user/deposit/deposit'
})
}, 1000)
}
});
return;
}
if (!that.user.isSetPayPwd) { if (!that.user.isSetPayPwd) {
uni.navigateTo({ uni.navigateTo({
url: '../login/updatePas/updatePas' url: '../login/updatePas/updatePas'
@ -530,6 +547,12 @@
icon: 'none' icon: 'none'
}) })
}) })
},
//
jumpdeposits() {
uni.navigateTo({
url: '../user/deposit/deposit'
})
} }
} }
} }
@ -551,6 +574,18 @@
margin-top: 30rpx; margin-top: 30rpx;
} }
.jfrecharge {
background-color: #0083f5;
padding: 5px 20rpx;
color: #fff;
margin-left: 50%;
justify-content: center;
align-items: center;
font-size: 30rpx;
border-radius: 40rpx;
}
.goodsimg { .goodsimg {
align-items: center; align-items: center;
display: flex; display: flex;
@ -715,7 +750,7 @@
align-items: center; align-items: center;
.sum { .sum {
width: 50%; width: 68%;
font-size: 18px; font-size: 18px;
margin-right: 10upx; margin-right: 10upx;
display: flex; display: flex;
@ -728,7 +763,7 @@
} }
.btn { .btn {
padding: 0 50rpx; padding: 0 45rpx;
height: 80rpx; height: 80rpx;
background-color: #0083f5; background-color: #0083f5;
color: #fff; color: #fff;

@ -37,7 +37,8 @@
<image class="img" :src="imageUrl+pro.couponImg" mode="aspectFit"> <image class="img" :src="imageUrl+pro.couponImg" mode="aspectFit">
</image> </image>
<view class="fotlt fcor333 font14 text1 mart10">{{pro.couponName}}</view> <view class="fotlt fcor333 font14 text1 mart10">{{pro.couponName}}</view>
<view class="subject fotct mart5">{{pro.discountPrice}}</view> <view class="subject fotct mart5"><image style="width: 15px;height: 15px;vertical-align: sub;" src="../../../static/img/jfx.png">
</image>{{pro.discountPrice *100}}</view>
</view> </view>
</swiper-item> </swiper-item>
</swiper> </swiper>
@ -117,7 +118,7 @@
'title': '话费充值', 'title': '话费充值',
'imgData': 'phonePay1.png' 'imgData': 'phonePay1.png'
}, { }, {
'title': '石化码商', 'title': '积分专区',
'imgData': 'petCoder.png' 'imgData': 'petCoder.png'
}, },
], ],
@ -431,7 +432,7 @@
}) })
return; return;
} }
if (item.title == '石化码商') { if (item.title == '积分专区') {
uni.navigateTo({ uni.navigateTo({
url: '/pages/goods/goods-list/goods-list?id=3' url: '/pages/goods/goods-list/goods-list?id=3'
}) })

@ -14,27 +14,27 @@
<view class="right"> <view class="right">
<view class="username" v-if="!user.name" @click="jumplogin">请授权登录</view> <view class="username" v-if="!user.name" @click="jumplogin">请授权登录</view>
<view class="username" v-else>{{user.name}}</view> <view class="username" v-else>{{user.name}}</view>
<!-- <view class="font14 fcorfff" v-if="!user.gold">积分: 0</view> --> <view class="font14 fcorfff" v-if="!user.gold">积分: 0</view>
<!-- <view class="font14 fcorfff" v-else>积分: {{user.gold}} </view> --> <view class="font14 fcorfff" v-else>积分: {{user.gold}} </view>
<!-- <view class="signature" @tap="toSetting">{{user.signature}}</view> --> <!-- <view class="signature" @tap="toSetting">{{user.signature}}</view> -->
</view> </view>
<!-- 二维码按钮 --> <!-- 二维码按钮 -->
<!-- #ifdef MP --> <!-- #ifdef MP -->
<button class="erweima fotct aliitem font14" v-if="user.phone == null" open-type="getPhoneNumber" <button class="erweima fotct aliitem font14" v-if="user.phone == null" open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber"> @getphonenumber="getPhoneNumber">
<image src="../../../static/img/jingbi.png"></image> 充值金额 <image src="../../../static/img/jingbi.png"></image> 充值积分
</button> </button>
<button class="erweima fotct aliitem font14" v-else @click="toDeposit"> <button class="erweima fotct aliitem font14" v-else @click="toDeposit">
<image src="../../../static/img/jingbi.png"></image> 充值金额 <image src="../../../static/img/jingbi.png"></image> 充值积分
</button> </button>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
<!-- <button class="erweima fotct aliitem font14" v-if="user.phone == null" @click="jumpH5Bding"> <button class="erweima fotct aliitem font14" v-if="user.phone == null" @click="jumplogin">
<image src="../../../static/img/jingbi.png"></image> 充值金额 <image src="../../../static/img/jingbi.png"></image> 充值积分
</button> </button>
<button class="erweima fotct aliitem font14" v-else @click="toDeposit"> <button class="erweima fotct aliitem font14" v-else @click="toDeposit">
<image src="../../../static/img/jingbi.png"></image> 充值金额 <image src="../../../static/img/jingbi.png"></image> 充值积分
</button> --> </button>
<!-- #endif --> <!-- #endif -->
</view> </view>
<!-- 订单-余额 --> <!-- 订单-余额 -->
@ -75,9 +75,9 @@
<uni-badge text="1" type="error" /> <uni-badge text="1" type="error" />
</view> --> </view> -->
<uni-badge style="width: 20px;position: absolute; right: 76%;" v-if="row.text == '我的卡券' && textnum " <uni-badge style="width: 20px;position: absolute; right: 30%;" v-if="row.text == '我的卡券' && textnum "
:text="textnum" type="error" size="normal"></uni-badge> :text="textnum" type="error" size="normal"></uni-badge>
<uni-badge style="width: 20px;position: absolute; right: 53%;" <uni-badge style="width: 20px;position: absolute; right: 7%;"
v-if="row.text == '我的优惠券' && textSend " :text="textSend" type="error" size="normal"></uni-badge> v-if="row.text == '我的优惠券' && textSend " :text="textSend" type="error" size="normal"></uni-badge>
<view class="img"> <view class="img">
<image :src="imagewxUrl+row.img"></image> <image :src="imagewxUrl+row.img"></image>
@ -122,7 +122,6 @@
</view> </view>
<!-- 占位 --> <!-- 占位 -->
<view class="place-bottom"></view> <view class="place-bottom"></view>
<!-- <authorize></authorize> -->
</view> </view>
</template> </template>
<script> <script>
@ -130,12 +129,10 @@
GetPhoneNumber, GetPhoneNumber,
findUser findUser
} from "../../../Utils/Api.js"; } from "../../../Utils/Api.js";
// import authorize from '../../../components/Authorize';
import uniBadge from "../../../components/uni-badge/components/uni-badge/uni-badge.vue"; import uniBadge from "../../../components/uni-badge/components/uni-badge/uni-badge.vue";
let app = getApp() let app = getApp()
export default { export default {
components: { components: {
// authorize,
uniBadge uniBadge
}, },
data() { data() {
@ -193,16 +190,16 @@
], ],
// //
mytoolbarList: [ mytoolbarList: [
// { {
// url: '/pages/goods/recording/recording?id=1', url: '/pages/goods/recording/recording?id=1',
// text: '', text: '充值记录',
// img: 'user/mingxi.png' img: 'user/mingxi.png'
// }, },
// { {
// url: '/pages/goods/recording/recording?id=2', url: '/pages/goods/recording/recording?id=2',
// text: '', text: '消费记录',
// img: 'user/quan.png' img: 'user/quan.png'
// }, },
{ {
url: '/pages/user/mineCoupons/mineCoupons', url: '/pages/user/mineCoupons/mineCoupons',
text: '我的卡券', text: '我的卡券',

@ -8,42 +8,54 @@
<view class="line1 width100 backcorfff"></view> <view class="line1 width100 backcorfff"></view>
</view> </view>
</view> </view>
<view class="width90 font16 fcor333 fontwig6 mart40"> <view class="mart5">
<QSTabs ref="tabs" :tabs="tabs" animationMode="line2" :current="current" @change="change"
activeColor="#089bf5" lineColor="#089bf5" minWidth="374">
</QSTabs>
</view>
<view class="width90 font16 fcor333 fontwig6 mart20">
选择金额 选择金额
</view> </view>
<view class="list"> <view class="list">
<view class="box" :class="{'on':item.realPrice == inputAmount}" v-for="(item,index) in amountList" :key="index" <view class="box" :class="{'on':item.realPrice == inputAmount}" v-for="(item,index) in amountList"
@click="select(item)"> :key="index" @click="select(item)">
<view class="heTitle">{{item.price}}</view> <view class="heTitle">{{item.price}}</view>
<view class="font13 fcor999" v-if="item.status == 2">已售空</view> <view class="font13 fcor999" v-if="item.status == 2">已售空</view>
</view> </view>
</view> </view>
<view class="mart5 width90 font18 fcor333 fontwig6"> <view class="mart5 width90 font18 fcor333 fontwig6">
话费充值温馨提示 充值说明
</view> </view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;"> <view v-if="current == 0">
<view class="mart5 width80 font14 fcoreb5 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">1:</view> <view style="width: 5%;" class="flleft">1:</view>
<view style="margin-left: 5%;">慢充话费与营业厅充值一样只是到账时间稍长充值过程中可能出现分批到账的情况但是总金额不会少请耐心等待</view> <view style="margin-left: 5%;">此业务为话费慢充日常72小时内到账如遇月初月末运营商高峰期或系统更新到账时间会有一定延迟敬请谅解充值失败后系统会自动为您退款至原账户急单请选择6小时到账充值端口感谢您的支持
</view>
</view> </view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;"> <view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">2:</view> <view style="width: 5%;" class="flleft">2:</view>
<view style="margin-left: 5%;">此业务为话费慢充日常72小时内到账如遇月初月末高峰期或系统更新到账时间会有一定延迟敬请谅解急单勿拍</view> <view style="margin-left: 5%;">慢充话费与营业厅充值一样只是到账时间稍长充值过程中可能出现分批到账的情况但是总金额不会少请耐心等待</view>
</view> </view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;"> <view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">3:</view> <view style="width: 5%;" class="flleft">3:</view>
<view style="margin-left: 5%;">目前仅支持(移动联通电信三网号段) 运营商黑名单号码(长期欠费或非实名制认证)携号转网空号虚拟卡如165.167.170.171.162等等虚拟号段副卡号码或做过某些特殊套餐绑定的卡暂不支持充值请勿下单</view> <view style="margin-left: 5%;">
目前仅支持(移动联通电信三网号段)运营商黑名单号码(长期欠费或非实名制认证)携号转网空号虚拟卡(如165167170171162等等虚拟号段)副卡号码或做过某些特殊套餐绑定的卡暂不支持充值请勿下单
</view>
</view> </view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;"> <view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">4:</view> <view style="width: 5%;" class="flleft">4:</view>
<view style="margin-left: 5%;">停机号码需要额外补缴欠费后慢充话费才能到账<text class="fcoreb5">此服务为虚拟充值类服务无特殊情况不支持退款下单前请确认充值的号码无误</text></view> <view style="margin-left: 5%;">停机号码需要额外补缴欠费后慢充话费才能到账<text
class="fcoreb5">此服务为虚拟充值类服务无特殊情况不支持退款下单前请确认充值的号码无误</text></view>
</view> </view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;"> <view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">5:</view> <view style="width: 5%;" class="flleft">5:</view>
<view style="margin-left: 5%;">空号错号充值后不支持退款请您务必核对确认号码无误后再进行充值非空号欠费可充欠费1个月导致空号的不能充值损失自负无法退款</view> <view style="margin-left: 5%;">空号错号充值后不支持退款请您务必核对确认号码无误后再进行充值非空号欠费可充欠费1个月导致空号的不能充值损失自负无法退款
</view>
</view> </view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;"> <view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">6:</view> <view style="width: 5%;" class="flleft">6:</view>
<view style="margin-left: 5%;"><text class="fcoreb5">本充值业务不提供发票</text>如需发票请在运营商手机客户端储开取电子发票也可以凭身份证到运营商实体营业厅打印发票</view> <view style="margin-left: 5%;"><text
class="fcoreb5">本充值业务不提供发票</text>如需发票请在运营商手机客户端储开取电子发票也可以凭身份证到运营商实体营业厅打印发票</view>
</view> </view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;"> <view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">7:</view> <view style="width: 5%;" class="flleft">7:</view>
@ -51,7 +63,43 @@
</view> </view>
<view class="mart5 width80 font14 fcor999 fontwig6 marb40" style="list-style-type: decimal;"> <view class="mart5 width80 font14 fcor999 fontwig6 marb40" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">8:</view> <view style="width: 5%;" class="flleft">8:</view>
<view style="margin-left: 5%;">请登录所属运营商app手机营业厅查看充值号码的到账情况如金额有出入或未到账请截图充值记录明细反馈给客服</view> <view style="margin-left: 5%;">请登录所属运营商app手机营业厅查看充值号码的到账情况如金额有出入或未到账请截图充值记录明细反馈给客服录明细反馈给客服</view>
</view>
</view>
<view v-if="current == 1">
<view class="mart5 width80 font14 fcoreb5 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">1:</view>
<view style="margin-left: 5%;">充值后6小时内到账请耐心等待如遇月初月末运营商充值压力大充值失败后系统会为您自动再提交一次如二次充值仍然失败系统将会自动为您退款至原账户请悉知
</view>
</view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">2:</view>
<view style="margin-left: 5%;">
目前仅支持(移动联通电信三网号段)运营商黑名单号码(长期欠费或非实名制认证)携号转网空号虚拟卡(如165167170171162等等虚拟号段)副卡号码或做过某些特殊套餐绑定的卡暂不支持充值请勿下单
</view>
</view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">3:</view>
<view style="margin-left: 5%;">停机号码需要额外补缴欠费后慢充话费才能到账此服务为虚拟充值类服务无特殊情况不支持退款下单前请确认充值的号码无误</view>
</view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">4:</view>
<view style="margin-left: 5%;">空号错号充值后不支持退款请您务必核对确认号码无误后再进行充值非空号欠费可充欠费1个月导致空号的不能充值损失自负无法退款</view>
</view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">5:</view>
<view style="margin-left: 5%;"><text
class="fcoreb5">本充值业务不提供发票</text>如需发票请在运营商手机客户端储开取电子发票也可以凭身份证到运营商实体营业厅打印发票</view>
</view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">6:</view>
<view style="margin-left: 5%;">如遇系统维护充值失败将72小时后原路退款到付款账户
</view>
</view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">7:</view>
<view style="margin-left: 5%;">请登录所属运营商app(手机营业厅)查看充值号码的到账情况如金额有出入或未到账请截图充值记录明细反馈给客服录明细反馈给客服</view>
</view>
</view> </view>
<view class="height100p"></view> <view class="height100p"></view>
<view class="bombtn width94 font16"> <view class="bombtn width94 font16">
@ -68,18 +116,25 @@
addOrderPay, addOrderPay,
orderToUnionPayphone orderToUnionPayphone
} from '../../../Utils/Api.js'; } from '../../../Utils/Api.js';
import QSTabs from '../../../components/QS-tabs/QS-tabs.vue';
export default { export default {
components: {
QSTabs
},
data() { data() {
return { return {
typeId: '', typeId: '',
inputAmountId: '', inputAmountId: '',
inputAmount: '', inputAmount: '',
orderPrice:'', orderPrice: '',
inputPhone: '', inputPhone: '',
amoutType: '', amoutType: '',
codesVlues: '', codesVlues: '',
amountList: [], amountList: [],
amoutstatus:'' amoutstatus: '',
tabs: ["72小时到账", "6小时到账"], //
current: 0, //
swiperCurrent: 2
} }
}, },
onLoad(options) { onLoad(options) {
@ -118,7 +173,20 @@
this.inputAmountId = amoutinfos.id; this.inputAmountId = amoutinfos.id;
this.amoutstatus = amoutinfos.status; this.amoutstatus = amoutinfos.status;
}, },
//
change(index) {
this.$refs.tabs.setFinishCurrent(index);
this.current = index;
this.inputAmount = '';
this.amoutstatus = '';
if (index == 0) {
this.swiperCurrent = 2;
this.getListOutRechargePrice(this.amoutType);
} else {
this.swiperCurrent = 1;
this.getListOutRechargePrice(this.amoutType);
}
},
/** /**
* 查询价格 * 查询价格
*/ */
@ -129,12 +197,15 @@
let params = { let params = {
type: item, type: item,
regionId: app.globalData.cityId, regionId: app.globalData.cityId,
showType: 3 showType: 3,
rechargeType: this.swiperCurrent
} }
getListOutRechargePrice(params).then(res => { getListOutRechargePrice(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.return_code == '000000') { if (res.return_code == '000000' && res.return_data) {
this.amountList = res.return_data; this.amountList = res.return_data;
} else {
this.amountList = [];
} }
}) })
}, },
@ -143,10 +214,10 @@
* 提交订单 * 提交订单
*/ */
addOrderPay() { addOrderPay() {
if(this.amoutstatus == 2){ if (this.amoutstatus == 2) {
uni.showToast({ uni.showToast({
title: '当前面值已售空', title: '当前面值已售空',
duration:2000, duration: 2000,
icon: "none" icon: "none"
}); });
return; return;
@ -158,6 +229,13 @@
}); });
return; return;
} }
if (this.inputPhone.length != 11) {
uni.showToast({
title: '请输入正确充值号码',
icon: "none"
});
return;
}
if (this.inputAmount == '') { if (this.inputAmount == '') {
uni.showToast({ uni.showToast({
title: '请选择价格', title: '请选择价格',
@ -192,7 +270,7 @@
// //
orderToUnionPayphone(item) { orderToUnionPayphone(item) {
let params = { let params = {
"orderId" : item "orderId": item
} }
orderToUnionPayphone(params).then(res => { orderToUnionPayphone(params).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {

@ -36,23 +36,13 @@
</view> </view>
<view class="content"> <view class="content">
<view class="pay-list"> <view class="pay-list">
<!-- <view class="row" @tap="paytype='alipay'">
<view class="left">
<image src="/static/img/alipay.png"></image>
</view>
<view class="center">
支付宝支付
</view>
<view class="right">
<radio :checked="paytype=='alipay'" color="#0083f5" />
</view>
</view> -->
<view class="row" @tap="paytype='wxpay'"> <view class="row" @tap="paytype='wxpay'">
<view class="left"> <view class="left">
<image :src="imagewxUrl+imgadres"></image> <image mode="widthFix" style="border-radius: 50%;" src="../../../static/img/unionpay.png">
</image>
</view> </view>
<view class="center"> <view class="center">
微信支付 银联支付
</view> </view>
<view class="right"> <view class="right">
<radio :checked="paytype=='wxpay'" color="#0083f5" /> <radio :checked="paytype=='wxpay'" color="#0083f5" />
@ -76,7 +66,8 @@
let app = getApp() let app = getApp()
import { import {
addOrder, addOrder,
orderToPay orderToPay,
unionPay
} from "../../../Utils/Api.js"; } from "../../../Utils/Api.js";
// #ifdef H5 // #ifdef H5
var jweixin = require('jweixin-module'); var jweixin = require('jweixin-module');
@ -85,11 +76,11 @@
data() { data() {
return { return {
inputAmount: '', // inputAmount: '', //
amountList: [10, 50, 100], //3 amountList: [100, 200, 300, 500, 800, 1000], //3
paytype: 'wxpay', // paytype: 'wxpay', //
user: "", user: "",
imagewxUrl: app.globalData.imageWxImg, imagewxUrl: app.globalData.imageWxImg,
imgadres:'wxpay.png' imgadres: 'wxpay.png'
}; };
}, },
onLoad() { onLoad() {
@ -126,7 +117,7 @@
title: '正在提交订单...' title: '正在提交订单...'
}) })
let goods = { let goods = {
"identificationCode":app.globalData.identificationCode, "identificationCode": app.globalData.identificationCode,
"highChildOrderList": [{ "highChildOrderList": [{
"goodsType": 2, "goodsType": 2,
"goodsId": app.globalData.userInfo.id, "goodsId": app.globalData.userInfo.id,
@ -138,110 +129,54 @@
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
/// ///
let params = { this.unionPay(res.return_data.id);
"orderId": res.return_data.id,
"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: '支付成功'
})
setTimeout(() => {
uni.navigateBack({})
}, 100)
},
fail: function(err) {
uni.hideLoading();
console.log('fail:' + JSON.stringify(err));
}
});
// #endif
//
// #ifdef H5
//
this.payRequest(res);
// #endif
} else { } else {
uni.showToast({ uni.showToast({
title: '支付失败' title: res.return_msg
}) });
} }
}) })
},
//
unionPay(item) {
let goods = {
"orderId": item
}
unionPay(goods).then(res => {
if (res.return_code == '000000') {
this.uniontopay(res.return_data.prepayid);
} else { } else {
uni.showToast({ uni.showToast({
title: res.return_msg title: res.return_msg,
icon: 'none',
duration: 2000
}); });
} }
}) })
}, },
payRequest: function(self) { //
uni.showLoading({ uniontopay(item) {
title: '支付中...' let that = this;
}) upsdk.pluginReady(function() {
jweixin.config({ upsdk.pay({
// debug: true, // ,apialertpclogpc tn: item,
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) { success: function(res) {
//
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}) })
uni.reLaunch({ uni.navigateBack({})
url: '../success/success?id=' + that.couponId
});
}, },
cancel: function(r) {}, fail: function(err) {
fail: function(res) {}
});
});
jweixin.error(function(res) {
uni.showToast({ uni.showToast({
title: err.msg,
icon: 'none', icon: 'none',
title: '支付失败了', duration: 2000
duration: 4000 })
// , err.msg , TN,
}
}); });
}); });
}, }
}, },
} }
@ -271,19 +206,22 @@
width: 100%; width: 100%;
.list { .list {
display: flex; display: flow-root;
justify-content: space-between; justify-content: space-between;
padding: 20upx 0; padding: 20upx 0;
.box { .box {
width: 30%; width: 30%;
height: 120upx; height: 120rpx;
float: left;
margin-left: 3.333%;
margin-top: 20px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
border-radius: 10upx; border-radius: 10rpx;
box-shadow: 0upx 5upx 20upx rgba(0, 0, 0, 0.05); box-shadow: 0rpx 5rpx 20rpx rgba(0, 0, 0, 0.05);
font-size: 36upx; font-size: 36rpx;
background-color: #f1f1f1; background-color: #f1f1f1;
color: 333; color: 333;
@ -295,14 +233,14 @@
} }
.num { .num {
margin-top: 10upx; margin-top: 20upx;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
.text { .text {
padding-right: 10upx; padding-right: 10upx;
font-size: 30upx; font-size: 40upx;
} }
.input { .input {
@ -315,7 +253,7 @@
input { input {
margin: 0 20upx; margin: 0 20upx;
height: 60upx; height: 60upx;
font-size: 30upx; font-size: 40upx;
color: #0083f5; color: #0083f5;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;

@ -43,13 +43,17 @@
</view> </view>
</view> </view>
</view> </view>
<view class="width90 mart40 fcor666" v-if="videourl != ''">视频教程</view> <!-- <view class="width90 mart40 fcor666" v-if="videourl != ''">视频教程</view>
<view class="btnplay" @click="playvideo" v-if="videourl != ''">播放视频教学</view> <view class="btnplay" @click="playvideo" v-if="videourl != ''">播放视频教学</view>
<view class="width80 mart20 marb30" v-if="isplayvideo"> <view class="width80 mart20 marb30" v-if="isplayvideo">
<yy-video-player :auto-play="false" :url="imageUrl+imagedess1" :poster="poster" :show-back-btn="true"> <yy-video-player :auto-play="false" :url="imageUrl+imagedess1" :poster="poster" :show-back-btn="true">
</yy-video-player> </yy-video-player>
</view> </view> -->
<view class="width90 mart40 fcor666" v-if="videourl != ''">临时通知</view>
<view class="alijus mart20 marb30" v-if="videourl != ''">
<image mode="widthFix" :src="imageUrl+imagedess2"></image>
</view>
</view> </view>
</template> </template>
@ -72,13 +76,14 @@
imagewxUrl: app.globalData.imageWxImg, imagewxUrl: app.globalData.imageWxImg,
imgadres: 'noorder.png', imgadres: 'noorder.png',
imagedess1: '/CMS/html/11641540903873.mp4', imagedess1: '/CMS/html/11641540903873.mp4',
imagedess2: '/CMS/html/notice1.png',
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
isNoMoreData: false, isNoMoreData: false,
couponsDetails: '', couponsDetails: '',
salesEndTime: '', salesEndTime: '',
couponId: '', couponId: '',
videourl: '' ,// videourl: '', //
isplayvideo: false // isplayvideo: false //
} }
}, },
@ -145,14 +150,14 @@
// //
toGoods(e) { toGoods(e) {
uni.navigateTo({ uni.navigateTo({
url: '../../order/confirmation?id=' + e url: '../../order/confirmation?id=' + e + '&typeid=2'
}) })
// uni.navigateTo({ // uni.navigateTo({
// url: '../../goods/goods?id='+e // url: '../../goods/goods?id='+e
// }); // });
}, },
// //
playvideo(){ playvideo() {
this.isplayvideo = true; this.isplayvideo = true;
} }
} }
@ -227,7 +232,8 @@
color: #FFFFFF; color: #FFFFFF;
border-radius: 0px; border-radius: 0px;
} }
.btnplay{
.btnplay {
width: 120px; width: 120px;
text-align: center; text-align: center;
height: 40px; height: 40px;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 405 KiB

After

Width:  |  Height:  |  Size: 153 KiB

@ -662,3 +662,8 @@ $uni-font-size-paragraph:30upx;
.font12{ .font12{
font-size: 12px; font-size: 12px;
} }
.alijus{
justify-content: center;
align-items: center;
display: flex;
}
Loading…
Cancel
Save