1.解决登录禁用问题

yj-dev
杨杰 3 years ago
parent 3e4e4f78b7
commit 3957378e53
  1. 16
      App.vue
  2. 6
      Utils/Api.js
  3. 2
      pages/goods/goods.vue
  4. 868
      pages/goods/refuel-confirm/refuel-confirm.vue
  5. 8
      pages/order/confirmation.vue
  6. 51
      pages/tabBar/home/home.vue
  7. 171
      pages/userLogin/userLogin.vue
  8. 114
      subPages/recharge-centre/recharge-centre.vue

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

@ -237,7 +237,11 @@ export const hltUnionCardPay = params => {
} }
export const bindHuiLianTongCard = params => { export const bindHuiLianTongCard = params => {
return POST('POST', `${base}/highUserCard/bindHuiLianTongCard`, params).then(res => res.data); return POST('POST', `${base}/highUserCard/bindHuiLianTongCard`, params).then(res => res.data);
} }
//手机短信登录
export const loginByTel = params => {
return POST('POST', `${base}/wechat/loginByTel`, params).then(res => res.data);
}
/** /**
* 工会卡 * 工会卡
*/ */

@ -22,7 +22,7 @@
</view> </view>
<!-- 商品主图轮播 --> <!-- 商品主图轮播 -->
<view class="swiper-box"> <view class="swiper-box">
<swiper circular="true" autoplay="true" @change="swiperChange"> <swiper circular="true" autoplay="true" style="height: 188px;" @change="swiperChange">
<swiper-item v-for="(swiper,index) in swiperList" :key="index"> <swiper-item v-for="(swiper,index) in swiperList" :key="index">
<image mode="widthFix" :src="imageUrl+swiper" @click="perImage(swiper)"></image> <image mode="widthFix" :src="imageUrl+swiper" @click="perImage(swiper)"></image>
</swiper-item> </swiper-item>

@ -1,413 +1,457 @@
<template> <template>
<view> <view>
<!-- 头部 --> <!-- 头部 -->
<view class="width100 height120 backcorfff"> <view class="width100 height120 backcorfff">
<image :src="orderList.goodsImg" class="flleft conImg mart10 margle10"></image> <image :src="orderList.goodsImg" class="flleft conImg mart10 margle10"></image>
<view class="conCont paddtop15"> <view class="conCont paddtop15">
<view class="font20 fontwig6 fcor333 text1 paddtright10">{{orderList.goodsName}}</view> <view class="font20 fontwig6 fcor333 text1 paddtright10">{{orderList.goodsName}}</view>
<view class="font14 fcor999 text2 paddtop5 paddtright10">{{refulAdress}}</view> <view class="font14 fcor999 text2 paddtop5 paddtright10">{{refulAdress}}</view>
<view class="font20 fontwig6 fcoreb5 paddtop5">{{orderList.gasPriceVip}} <view class="font20 fontwig6 fcoreb5 paddtop5">{{orderList.gasPriceVip}}
<text class="margle10 slogan font14">{{orderList.gasPriceGun}}</text> <text class="margle10 slogan font14">{{orderList.gasPriceGun}}</text>
</view> </view>
</view> </view>
</view> </view>
<!-- // --> <!-- // -->
<view class="mart10 heightl60 paddleft10 fcor333 fontwig6 font18 width100 backcorfff">订单详情</view> <view class="mart10 heightl60 paddleft10 fcor333 fontwig6 font18 width100 backcorfff">订单详情</view>
<view class="line1"></view> <view class="line1"></view>
<view class="heightl60 paddleft10 fcor666 font16 width100 backcorfff"> <view class="heightl60 paddleft10 fcor666 font16 width100 backcorfff">
<view class="flleft width50"> <view class="flleft width50">
油号\油枪 油号\油枪
</view> </view>
<view class="flright width40 fotct"> <view class="flright width40 fotct">
{{orderList.gasOilNo}}#/{{orderList.gasGunNo}} {{orderList.gasOilNo}}#/{{orderList.gasGunNo}}
</view> </view>
</view> </view>
<view class="line1"></view> <view class="line1"></view>
<view class="heightl60 paddleft10 fcor666 font16 width100 backcorfff"> <view class="heightl60 paddleft10 fcor666 font16 width100 backcorfff">
<view class="flleft width50"> <view class="flleft width50">
加油金额 加油金额
</view> </view>
<view class="flright width40 fotct"> <view class="flright width40 fotct">
{{orderList.totalPrice}} {{orderList.totalPrice}}
</view> </view>
</view> </view>
<!-- // --> <!-- // -->
<view class="mart10 heightl60 paddleft10 fcor333 fontwig6 font18 width100 backcorfff">支付方式</view> <view class="mart10 heightl60 paddleft10 fcor333 fontwig6 font18 width100 backcorfff">支付方式</view>
<view class="line1"></view> <view class="line1"></view>
<view class="width100 backcorfff"> <view class="width100 backcorfff">
<!-- <view class="height50 width100 backcorfff" @tap="paytype='weixin'"> <view class="height50 width100 backcorfff" @tap="paytype='jifen'">
<view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;"> <view class="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
微信支付 积分支付
</view> </view>
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun" <view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;"> style="align-items: center;">
<radio :checked="paytype=='weixin'" color="#0083f5" /> <radio :checked="paytype=='jifen'" color="#0083f5" />
</view> </view>
</view> </view>
<view class="width94 line1 mart5 marb5"></view> --> <view class="width94 line1 mart5 marb5"></view>
<view class="line1"></view>
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" @tap="paytype='weixin'"> <!-- <view class="line1"></view>
<view class="width60 flleft fontwig6"> <view class="heightl60 paddleft10 fcor666 width100 backcorfff" @tap="paytype='weixin'">
微信支付 <view class="width60 flleft fontwig6">
</view> 微信支付
<view class="flright width30 fotct"> </view>
<radio :checked="paytype=='weixin'" color="#0083f5" /> <view class="flright width30 fotct">
</view> <radio :checked="paytype=='weixin'" color="#0083f5" />
</view> </view>
</view>
<view class="line1"></view>
<view class="heightl60 paddleft10 fcor666 width100 backcorfff" @tap="paytype='gonghuika'"> <view class="line1"></view>
<view class="width60 flleft fontwig6"> <view class="heightl60 paddleft10 fcor666 width100 backcorfff" @tap="paytype='gonghuika'">
汇联通工会卡<text class="font14 fcor666 margle">余额: {{tongCardPrice}}</text> <view class="width60 flleft fontwig6">
</view> 汇联通工会卡<text class="font14 fcor666 margle">余额: {{tongCardPrice}}</text>
<view class="flright width30 fotct"> </view>
<radio :checked="paytype=='gonghuika'" @click="changeRiado()" color="#0083f5" /> <view class="flright width30 fotct">
</view> <radio :checked="paytype=='gonghuika'" @click="changeRiado()" color="#0083f5" />
</view> </view>
</view> </view> -->
</view>
<view class="width100 mart15 fcor333 font16 fontwig6 paddleft10">重要说明</view>
<view class="width95 paddleft10 font14 fcor999 mart5">1.<text <view class="width100 mart15 fcor333 font16 fontwig6 paddleft10">重要说明</view>
class="fcor089 fontwig6">请先加油后下单</text>,即您到站后,与工作人员确认油号,抢号后再付款</view> <view class="width95 paddleft10 font14 fcor999 mart5">1.<text
<view class="width95 paddleft10 font14 fcor999 mart5"> class="fcor089 fontwig6">请先加油后下单</text>,即您到站后,与工作人员确认油号,抢号后再付款</view>
2.请勿先付款后加油,若您已下单付款请于24小时内到加油站完成加油;若您48小时内未完成加油,请及时发起退单;逾期退单可能会退单失败</view> <view class="width95 paddleft10 font14 fcor999 mart5">
<view class="height80 width100"></view> 2.请勿先付款后加油,若您已下单付款请于24小时内到加油站完成加油;若您48小时内未完成加油,请及时发起退单;逾期退单可能会退单失败</view>
<!-- 底部按钮 --> <view class="height80 width100"></view>
<view class="footer"> <!-- 底部按钮 -->
<view class="width50 flleft fcoreb5 padleft15 font15"> <view class="footer">
合计: <text class="font24">{{payprice}}</text> <view class="width50 flleft fcoreb5 padleft15 font15">
</view> 合计: <text class="font24">{{payprice}}</text>
<button class="reBtn flright" @click="orderToPay">去支付</button> </view>
</view> <button class="reBtn flright" @click="orderToPay">去支付</button>
</view>
<ssPaymentPassword ref="paymentPassword" :mode="1" @submit="submitHandle"/>
</view> <ssPaymentPassword ref="paymentPassword" :mode="1" @submit="submitHandle" />
</template> </view>
</template>
<script>
import { <script>
getOrderById, import {
orderToPay, getOrderById,
getHuiLianTongCardBalance, orderToPay,
hltUnionCardPay getHuiLianTongCardBalance,
} from '../../../Utils/Api.js'; hltUnionCardPay,
import ssPaymentPassword from '../../../components/sanshui-payment-password/index.vue'; orderToGoldPay
let app = getApp(); } from '../../../Utils/Api.js';
// #ifdef H5 import ssPaymentPassword from '../../../components/sanshui-payment-password/index.vue';
var jweixin = require('jweixin-module'); let app = getApp();
// #endif // #ifdef H5
export default { var jweixin = require('jweixin-module');
components: { // #endif
ssPaymentPassword export default {
}, components: {
data() { ssPaymentPassword
return { },
orderNo: '', data() {
couponId: '', return {
payprice: '', orderNo: '',
orderList: '', couponId: '',
refulAdress: '', payprice: '',
tongCardPrice: 0, orderList: '',
user: '', refulAdress: '',
paytype: '', tongCardPrice: 0,
PaymentPassword: '', user: '',
} paytype: '',
}, PaymentPassword: '',
onLoad(e) { }
this.payprice = e.payprice; },
this.orderNo = e.orderId; onLoad(e) {
this.couponId = e.couponId; this.payprice = e.payprice;
this.refulAdress = e.adres; this.orderNo = e.orderId;
this.getOrderById(); this.couponId = e.couponId;
}, this.refulAdress = e.adres;
onShow() { this.getOrderById();
let that = this; },
that.paytype = ''; onShow() {
that.user = app.globalData.userInfo; let that = this;
that.getHuiLianTongCardBalance(); that.paytype = '';
}, that.user = app.globalData.userInfo;
methods: { that.getHuiLianTongCardBalance();
// },
submitHandle(e) { methods: {
this.PaymentPassword = e.value; //
if(this.PaymentPassword == ''){ submitHandle(e) {
uni.showToast({ this.PaymentPassword = e.value;
title: '请勿手动关闭弹窗', if (this.PaymentPassword == '') {
icon: 'none', uni.showToast({
duration: 2000 title: '请勿手动关闭弹窗',
}) icon: 'none',
return; duration: 2000
} })
uni.showLoading({ return;
title: '支付中...' }
}) uni.showLoading({
let params = { title: '支付中...'
"orderId": this.orderNo, })
"cardNo": this.user.hltCardNo.cardNo, if (this.paytype == 'jifen') {
"password": this.PaymentPassword let params = {
} "orderId": this.orderNo,
hltUnionCardPay(params).then(res => { "password": this.PaymentPassword
uni.hideLoading(); }
if (res.return_code == '000000') { orderToGoldPay(params).then(res => {
uni.showToast({ uni.hideLoading();
title: '支付成功' if (res.return_code == '000000') {
}) uni.showToast({
uni.reLaunch({ title: '支付成功'
url: '/pages/goods/refuel-succes/refuel-succes?id=' +this.orderNo })
}); uni.reLaunch({
return; url: '/pages/goods/refuel-succes/refuel-succes?id=' + this.orderNo
} });
if (res.return_code == '102130') { return;
uni.navigateTo({ }
url: '../../login/updatePas/updatePas' if (res.return_code == '102130') {
}) uni.navigateTo({
return; url: '../../login/updatePas/updatePas'
} })
uni.showToast({ return;
title: res.return_msg, }
icon: 'none' uni.showToast({
}) title: res.return_msg,
}) icon: 'none'
})
})
}, return;
// }
changeRiado() {
if (!this.user.isSetHltCard) { let params = {
uni.showToast({ "orderId": this.orderNo,
icon: 'none', "cardNo": this.user.hltCardNo.cardNo,
title: '当前账号还未绑定,前往绑定', "password": this.PaymentPassword
duration: 2000, }
success() { hltUnionCardPay(params).then(res => {
setTimeout(() => { uni.hideLoading();
uni.navigateTo({ if (res.return_code == '000000') {
url: '../../user/bindingCard/bindingCard' uni.showToast({
}) title: '支付成功'
}, 1000) })
} uni.reLaunch({
}); url: '/pages/goods/refuel-succes/refuel-succes?id=' + this.orderNo
return; });
} return;
}, }
getOrderById() { if (res.return_code == '102130') {
uni.showLoading({ uni.navigateTo({
title: '加载中...' url: '../../login/updatePas/updatePas'
}) })
let params = { return;
orderId: this.orderNo, }
} uni.showToast({
getOrderById(params).then(res => { title: res.return_msg,
uni.hideLoading(); icon: 'none'
if (res.return_code == '000000') { })
this.orderList = res.return_data.highChildOrderList[0]; })
}
})
}, },
// //
getHuiLianTongCardBalance() { changeRiado() {
let params = { if (!this.user.isSetHltCard) {
cardNo: this.user.hltCardNo.cardNo uni.showToast({
} icon: 'none',
getHuiLianTongCardBalance(params).then(res => { title: '当前账号还未绑定,前往绑定',
if (res.return_code == '000000') { duration: 2000,
this.tongCardPrice = res.return_data.balance; success() {
} setTimeout(() => {
uni.navigateTo({
}); url: '../../user/bindingCard/bindingCard'
}, })
// }, 1000)
orderToPay() { }
let that = this; });
if (that.paytype == '') { return;
uni.showToast({ }
title: '请选择支付方式', },
icon: 'none', getOrderById() {
duration: 2000 uni.showLoading({
}) title: '加载中...'
return; })
} let params = {
if (that.paytype == 'weixin') { orderId: this.orderNo,
let params = { }
"orderId": that.orderNo, getOrderById(params).then(res => {
"openId": app.globalData.openId, uni.hideLoading();
"orderScene": "GOODS_ORDER" if (res.return_code == '000000') {
} this.orderList = res.return_data.highChildOrderList[0];
orderToPay(params).then(res => { }
if (res.return_code == '000000') { })
// #ifdef MP },
uni.showLoading({ //
title: '支付中...' getHuiLianTongCardBalance() {
}) let params = {
uni.requestPayment({ cardNo: this.user.hltCardNo.cardNo
"appId": res.return_data.appId, }
"nonceStr": res.return_data.nonceStr, getHuiLianTongCardBalance(params).then(res => {
"package": res.return_data.package, if (res.return_code == '000000') {
"paySign": res.return_data.sign, this.tongCardPrice = res.return_data.balance;
"signType": "MD5", }
"timeStamp": res.return_data.timeStamp,
success: function(res) { });
uni.hideLoading(); },
uni.showToast({ //
title: '支付成功' orderToPay() {
}) let that = this;
uni.reLaunch({ if (that.paytype == '') {
url: '/pages/goods/refuel-succes/refuel-succes?id=' +that.orderNo uni.showToast({
}); title: '请选择支付方式',
}, icon: 'none',
fail: function(err) { duration: 2000
uni.hideLoading(); })
}, return;
}); }
// #endif if (that.paytype == 'weixin') {
let params = {
// "orderId": that.orderNo,
// #ifdef H5 "openId": app.globalData.openId,
// "orderScene": "GOODS_ORDER"
that.payRequest(res); }
// #endif orderToPay(params).then(res => {
if (res.return_code == '000000') {
} else { // #ifdef MP
uni.showToast({ uni.showLoading({
title: res.return_msg, title: '支付中...'
icon: 'none' })
}) uni.requestPayment({
} "appId": res.return_data.appId,
}) "nonceStr": res.return_data.nonceStr,
return; "package": res.return_data.package,
} "paySign": res.return_data.sign,
if(that.paytype == 'gonghuika'){ "signType": "MD5",
if (!that.user.isSetPayPwd) { "timeStamp": res.return_data.timeStamp,
uni.navigateTo({ success: function(res) {
url: '../../login/updatePas/updatePas' uni.hideLoading();
}) uni.showToast({
return; title: '支付成功'
} })
if (!that.user.isSetHltCard) { uni.reLaunch({
uni.showToast({ url: '/pages/goods/refuel-succes/refuel-succes?id=' +
icon: 'none', that.orderNo
title: '当前账号还未绑定,前往绑定', });
duration: 2000, },
success() { fail: function(err) {
setTimeout(() => { uni.hideLoading();
uni.navigateTo({ },
url: '../../user/bindingCard/bindingCard' });
}) // #endif
}, 1000)
} //
}); // #ifdef H5
return; //
} that.payRequest(res);
that.$refs.paymentPassword.modalFun('show'); // #endif
}
}, } else {
payRequest: function(self) { uni.showToast({
let that = this; title: res.return_msg,
uni.showLoading({ icon: 'none'
title: '支付中...' })
}) }
jweixin.config({ })
// debug: true, // ,apialertpclogpc return;
appId: self.return_data.appId, // }
timestamp: self.return_data.timeStamp, // if (that.paytype == 'gonghuika') {
nonceStr: self.return_data.nonceStr, // if (!that.user.isSetPayPwd) {
signature: self.return_data.sign, // 1 uni.navigateTo({
jsApiList: ['chooseWXPay'] // 使JSJS2 url: '../../login/updatePas/updatePas'
}); })
uni.hideLoading(); return;
jweixin.ready(function() { }
jweixin.checkJsApi({ if (!that.user.isSetHltCard) {
jsApiList: ['chooseWXPay'], // JSJS2, uni.showToast({
success: function(res) {}, icon: 'none',
fail: function(res) {} title: '当前账号还未绑定,前往绑定',
}); duration: 2000,
jweixin.chooseWXPay({ success() {
appId: self.return_data.appId, setTimeout(() => {
timestamp: self.return_data uni.navigateTo({
.timeStamp, // jssdk使timestamp使timeStampS url: '../../user/bindingCard/bindingCard'
nonceStr: self.return_data.nonceStr, // 32 })
package: self.return_data }, 1000)
.package, // prepay_idprepay_id=*** }
signType: 'MD5', // 'SHA1'使'MD5' });
paySign: self.return_data.sign, // return;
success: function(res) { }
// that.$refs.paymentPassword.modalFun('show');
uni.showToast({ }
title: '支付成功'
}) if (that.paytype == 'jifen') {
uni.reLaunch({ if (!that.user.isSetPayPwd) {
url: '/pages/goods/refuel-succes/refuel-succes?id=' + uni.navigateTo({
that.orderNo url: '../../login/updatePas/updatePas'
}); })
}, return;
cancel: function(r) {}, }
fail: function(res) {}, that.$refs.paymentPassword.modalFun('show');
complete: function(res) { }
} },
}); payRequest: function(self) {
}); let that = this;
uni.showLoading({
jweixin.error(function(res) { title: '支付中...'
uni.showToast({ })
icon: 'none', jweixin.config({
title: '支付失败了', // debug: true, // ,apialertpclogpc
duration: 4000 appId: self.return_data.appId, //
}); timestamp: self.return_data.timeStamp, //
// configerrorconfigdebugresSPA nonceStr: self.return_data.nonceStr, //
/*alert("config信息验证失败");*/ signature: self.return_data.sign, // 1
}); jsApiList: ['chooseWXPay'] // 使JSJS2
}, });
uni.hideLoading();
} jweixin.ready(function() {
} jweixin.checkJsApi({
</script> jsApiList: ['chooseWXPay'], // JSJS2,
success: function(res) {},
<style lang="less"> fail: function(res) {}
page { });
background-color: #f7f7f7; jweixin.chooseWXPay({
} appId: self.return_data.appId,
timestamp: self.return_data
.conImg { .timeStamp, // jssdk使timestamp使timeStampS
width: 100px; nonceStr: self.return_data.nonceStr, // 32
height: 100px; package: self.return_data
border-radius: 8px; .package, // prepay_idprepay_id=***
} signType: 'MD5', // 'SHA1'使'MD5'
paySign: self.return_data.sign, //
.conCont { success: function(res) {
margin-left: 115px; //
} uni.showToast({
title: '支付成功'
.slogan { })
color: #807c87; uni.reLaunch({
text-decoration: line-through; url: '/pages/goods/refuel-succes/refuel-succes?id=' +
} that.orderNo
});
.footer { },
position: fixed; cancel: function(r) {},
bottom: 0upx; fail: function(res) {},
width: 100%; complete: function(res) {
height: 100rpx;
color: #FFFFFF; }
border-top: solid 1upx #eee; });
background-color: #FFFFFF; });
z-index: 2;
display: flex; jweixin.error(function(res) {
justify-content: space-between; uni.showToast({
align-items: center; icon: 'none',
title: '支付失败了',
.reBtn { duration: 4000
width: 120px; });
background-color: #089bf5; // configerrorconfigdebugresSPA
color: #FFFFFF; /*alert("config信息验证失败");*/
text-align: center; });
padding: 0; },
font-size: 16px;
border-radius: 0px; }
height: 50px; }
line-height: 50px; </script>
position: absolute;
right: 0px; <style lang="less">
} page {
} background-color: #f7f7f7;
}
.conImg {
width: 100px;
height: 100px;
border-radius: 8px;
}
.conCont {
margin-left: 115px;
}
.slogan {
color: #807c87;
text-decoration: line-through;
}
.footer {
position: fixed;
bottom: 0upx;
width: 100%;
height: 100rpx;
color: #FFFFFF;
border-top: solid 1upx #eee;
background-color: #FFFFFF;
z-index: 2;
display: flex;
justify-content: space-between;
align-items: center;
.reBtn {
width: 120px;
background-color: #089bf5;
color: #FFFFFF;
text-align: center;
padding: 0;
font-size: 16px;
border-radius: 0px;
height: 50px;
line-height: 50px;
position: absolute;
right: 0px;
}
}
</style> </style>

@ -168,10 +168,10 @@
<image mode="widthFix" class="flleft" :src="imageUrl+items.highDiscount.discountImg"></image> <image mode="widthFix" class="flleft" :src="imageUrl+items.highDiscount.discountImg"></image>
<view class="tcrig"> <view class="tcrig">
<view class="yhprice"> <view class="yhprice">
<radio :checked="items.highDiscount.id == memDiscountId" color="#0083f5" /> <radio :checked="items.id == memDiscountId" color="#0083f5" />
</view> </view>
<view class="font16 fontwig6 fcor333 text1">{{items.highDiscount.discountName}}</view> <view class="font16 fontwig6 fcor333 text1">{{items.highDiscount.discountName}}</view>
<view class="font13 fcor999 mart5">有效期至{{items.highDiscount.salesEndTime | formatDate('-')}}</view> <view class="font13 fcor999 mart5">有效期至{{items.useEndTime | formatDate('-')}}</view>
</view> </view>
</view> </view>
@ -309,7 +309,7 @@
this.$refs.popup.show(); this.$refs.popup.show();
}, },
radioChanges(item) { radioChanges(item) {
if (this.memDiscountId == item.highDiscount.id) { // if (this.memDiscountId == item.id) { //
this.memDiscountId = ''; this.memDiscountId = '';
this.coupondiscountid = ''; this.coupondiscountid = '';
this.paytheprice = this.couponList.discountPrice; this.paytheprice = this.couponList.discountPrice;
@ -317,7 +317,7 @@
this.isDiscont = false; this.isDiscont = false;
} else { // } else { //
this.isDiscont = true; this.isDiscont = true;
this.memDiscountId = item.highDiscount.id; this.memDiscountId = item.id;
this.coupondiscountid = item.id; this.coupondiscountid = item.id;
if (item.highDiscount.discountType == 1) { if (item.highDiscount.discountType == 1) {
// //

@ -581,18 +581,18 @@
// //
toCategory(item) { toCategory(item) {
if (!app.globalData.userInfo.phone) { // if (!app.globalData.userInfo.phone) {
uni.navigateTo({ // uni.navigateTo({
url: '../../userLogin/userLogin' // url: '../../userLogin/userLogin'
}) // })
return; // return;
} // }
if (!app.globalData.userInfo) { // if (!app.globalData.userInfo) {
uni.navigateTo({ // uni.navigateTo({
url: '../../userLogin/userLogin' // url: '../../userLogin/userLogin'
}) // })
return; // return;
} // }
if (item.title == '在线加油') { if (item.title == '在线加油') {
uni.navigateTo({ uni.navigateTo({
url: item.ext1 url: item.ext1
@ -628,18 +628,18 @@
}, },
// //
jumphuafei(item) { jumphuafei(item) {
if (!app.globalData.userInfo) { // if (!app.globalData.userInfo) {
uni.navigateTo({ // uni.navigateTo({
url: '../../userLogin/userLogin' // url: '../../userLogin/userLogin'
}) // })
return; // return;
} // }
if (!app.globalData.userInfo.phone) { // if (!app.globalData.userInfo.phone) {
uni.navigateTo({ // uni.navigateTo({
url: '../../userLogin/userLogin' // url: '../../userLogin/userLogin'
}) // })
return; // return;
} // }
if (item.title == '汇联通') { if (item.title == '汇联通') {
uni.navigateTo({ uni.navigateTo({
url: '/pages/goods/goods-list/goods-list?id=2' url: '/pages/goods/goods-list/goods-list?id=2'
@ -1181,7 +1181,8 @@
.orange-content .swiper-item { .orange-content .swiper-item {
height: 180rpx; height: 180rpx;
margin-left: 14rpx; margin-left: 14rpx;
margin-top: 14rpx; margin-top: 14rpx;
float: left;
} }
.orange-content .swiper-item .img { .orange-content .swiper-item .img {

@ -1,21 +1,44 @@
<template> <template>
<view> <view>
<image mode="widthFix" class="width90 mart20" v-if="user && user.infoCompleteStatus == 1" <view v-if="type == 1">
:src="imagewxUrl+imgadres"></image> <image mode="widthFix" class="width90 mart20" v-if="user && user.infoCompleteStatus == 1"
<image mode="widthFix" class="width90 mart20" v-if="!user" :src="imagewxUrl+imgadres1"></image> :src="imagewxUrl+imgadres"></image>
<!-- #ifdef MP --> <image mode="widthFix" class="width90 mart20" v-if="!user" :src="imagewxUrl+imgadres1"></image>
<view class="mart30 width90 height50 fcorfff backcor008 fotct btns font16 fontlet" <!-- #ifdef MP -->
v-if="user && user.infoCompleteStatus == 1" @click="getuserinfo"> <view class="mart30 width90 height50 fcorfff backcor008 fotct btns font16 fontlet"
授权并登录</view> v-if="user && user.infoCompleteStatus == 1" @click="getuserinfo">
<button class="mart30 width90 height50 fcorfff backcor008 fotct btns font16 fontlet" v-if="!user" 授权并登录</view>
open-type="getPhoneNumber" @getphonenumber="loginByPhone">授权手机号</button> <button class="mart30 width90 height50 fcorfff backcor008 fotct btns font16 fontlet" v-if="!user"
<!-- <button class="mart30 width90 height50 fcorfff backcor008 fotct btns font16" v-if="user.phone && user" open-type="getPhoneNumber" @getphonenumber="loginByPhone">授权手机号</button>
<view class="mart20 width90 font15 fcor666 fotct" @click="updateStu(2)">手机短信登录</view>
<!-- <button class="mart30 width90 height50 fcorfff backcor008 fotct btns font16" v-if="user.phone && user"
@click="reqmessage">授权获取消息通知</button> --> @click="reqmessage">授权获取消息通知</button> -->
<!-- #endif --> <!-- #endif -->
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
<button class="mart30 width90 height50 fcorfff backcor008 fotct btns font16" <button class="mart30 width90 height50 fcorfff backcor008 fotct btns font16"
@click="getH5userinfo">授权并登录</button> @click="getH5userinfo">授权并登录</button>
<!-- #endif --> <!-- #endif -->
</view>
<view v-if="type == 2">
<view class="logo">
<view class="img">
<image mode="widthFix"
src="">
</image>
</view>
</view>
<view class="form re" style="top:200rpx;">
<view class="username">
<view class="get-code" style="color: #676767;" @click.stop="getCode()">{{getCodeText}}</view>
<input placeholder="请输入手机号" v-model="phoneNumber" placeholder-style="color: #676767;" />
</view>
<view class="code">
<input placeholder="请输入验证码" v-model="code" placeholder-style="color: #676767;" />
</view>
<view class="btn mart50" @tap="doReg">立即登录</view>
<view class="width90 marb20 font15 fcor666 fotct" @click="updateStu(1)">微信授权登录</view>
</view>
</view>
</view> </view>
</template> </template>
@ -23,8 +46,10 @@
const app = getApp(); const app = getApp();
import { import {
getUserInfo, getUserInfo,
loginByPhone, loginByPhone,
HandleCode HandleCode,
loginByTel,
sendSmsCode
} from "../../Utils/Api.js" } from "../../Utils/Api.js"
export default { export default {
data() { data() {
@ -32,7 +57,12 @@
user: '', user: '',
imagewxUrl: app.globalData.imageWxImg, imagewxUrl: app.globalData.imageWxImg,
imgadres: 'login.png', imgadres: 'login.png',
imgadres1: 'loginphone.png', imgadres1: 'loginphone.png',
phoneNumber: "",
code: '',
getCodeText: '获取验证码',
getCodeisWaiting: false,
type: 1 //
} }
}, },
onLoad() { onLoad() {
@ -160,11 +190,116 @@
url: '/pages/login/register' url: '/pages/login/register'
}) })
}, },
//
updateStu(item) {
this.type = item;
},
//
getCode() {
uni.hideKeyboard()
if (this.getCodeisWaiting) {
return;
}
if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phoneNumber))) {
uni.showToast({
title: '请填写正确手机号码',
icon: "none"
});
return false;
}
uni.showLoading({
title: '发送中...'
})
let params = {
phone: this.phoneNumber
}
sendSmsCode(params).then(res => {
if (res.return_code == '000000') {
this.getCodeisWaiting = true;
uni.showToast({
title: '验证码已发送',
icon: "none"
});
this.setTimer();
} else {
uni.hideLoading()
}
})
},
setTimer() {
let holdTime = 60;
this.getCodeText = "重新获取(60)"
this.Timer = setInterval(() => {
if (holdTime <= 0) {
this.getCodeisWaiting = false;
this.getCodeBtnColor = "#ffffff";
this.getCodeText = "获取验证码"
clearInterval(this.Timer);
return;
}
this.getCodeText = "重新获取(" + holdTime + ")"
holdTime--;
}, 1000)
},
//
doReg() {
uni.hideKeyboard()
//
if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.phoneNumber))) {
uni.showToast({
title: '请填写正确手机号码',
icon: "none"
});
return false;
}
if (!this.code) {
uni.showToast({
title: '请填写验证码',
icon: "none"
});
return false;
}
uni.showLoading({
title: '提交中...'
})
let params = {
phone: this.phoneNumber,
smsCode: this.code
}
loginByTel(params).then(res => {
uni.hideLoading()
if (res.return_code == '000000') {
app.globalData.token = res.return_data.uniqueCode;
app.globalData.userInfo = res.return_data
.object
.highUser;
uni.setStorage({
key: "user",
data: res.return_data
.object
.highUser
})
uni.setStorage({
key: "token",
data: res.return_data.uniqueCode
})
uni.navigateBack({})
} else {
uni.showToast({
title: res.return_msg,
icon: "none"
});
}
})
},
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
@import "../../static/css/login.scss";
.btns { .btns {
border-radius: 6px; border-radius: 6px;
} }

@ -3,8 +3,8 @@
<view class="width100 height100p backcorf06"> <view class="width100 height100p backcorf06">
<view class="block"> <view class="block">
<view class="content height60"> <view class="content height60">
<input type="number" class="my flleft font18 fcorfff" maxlength="11" placeholder-style="color:#ffffff;" <input type="number" class="my flleft font18 fcorfff" maxlength="11"
placeholder="请输入充值号码" v-model="inputPhone" /> placeholder-style="color:#ffffff;" placeholder="请输入充值号码" v-model="inputPhone" />
</view> </view>
<view class="line1 width100 backcorfff"></view> <view class="line1 width100 backcorfff"></view>
</view> </view>
@ -21,6 +21,7 @@
<view class="box" :class="{'on':item.id == inputAmountId}" v-for="(item,index) in amountList" :key="index" <view class="box" :class="{'on':item.id == inputAmountId}" v-for="(item,index) in amountList" :key="index"
@click="select(item)"> @click="select(item)">
<view class="heTitle">{{item.price}}</view> <view class="heTitle">{{item.price}}</view>
<view class="font13 fcor999" v-if="item.status != 2 && item.discount != 100">{{item.discount}} </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>
@ -30,7 +31,8 @@
<view v-if="current == 0"> <view v-if="current == 0">
<view class="mart5 width80 font14 fcoreb5 fontwig6" style="list-style-type: decimal;"> <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%;">此业务为话费慢充日常72小时内到账如遇月初月末运营商高峰期或系统更新到账时间会有一定延迟敬请谅解充值失败后系统会自动为您退款至原账户急单请选择6小时到账充值端口感谢您的支持 <view style="margin-left: 5%;">
此业务为话费慢充日常72小时内到账如遇月初月末运营商高峰期或系统更新到账时间会有一定延迟敬请谅解充值失败后系统会自动为您退款至原账户急单请选择6小时到账充值端口感谢您的支持
</view> </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;">
@ -70,7 +72,8 @@
<view v-if="current == 1"> <view v-if="current == 1">
<view class="mart5 width80 font14 fcoreb5 fontwig6" style="list-style-type: decimal;"> <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%;">充值后6小时内到账请耐心等待如遇月初月末运营商充值压力大充值失败后系统会为您自动再提交一次如二次充值仍然失败系统将会自动为您退款至原账户请悉知 <view style="margin-left: 5%;">
充值后6小时内到账请耐心等待如遇月初月末运营商充值压力大充值失败后系统会为您自动再提交一次如二次充值仍然失败系统将会自动为您退款至原账户请悉知
</view> </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;">
@ -143,31 +146,62 @@
}, },
onLoad(options) { onLoad(options) {
this.typeId = options.id; this.typeId = options.id;
if (this.typeId == 1) { if (!app.globalData.userInfo) {
uni.setNavigationBarTitle({ if (this.typeId == 1) {
title: '中国移动' uni.setNavigationBarTitle({
}) title: '中国移动'
this.amoutType = 2; })
this.getListOutRechargePrice(2); this.amoutType = 2;
return; this.getListOutRechargePrice(2);
} return;
if (this.typeId == 2) { }
uni.setNavigationBarTitle({ if (this.typeId == 2) {
title: '中国电信' uni.setNavigationBarTitle({
}) title: '中国电信'
this.amoutType = 1; })
this.getListOutRechargePrice(1); this.amoutType = 1;
return; this.getListOutRechargePrice(1);
return;
}
if (this.typeId == 3) {
uni.setNavigationBarTitle({
title: '中国联通'
})
this.amoutType = 3;
this.getListOutRechargePrice(3);
return;
}
} }
if (this.typeId == 3) { },
uni.setNavigationBarTitle({ onShow() {
title: '中国联通' this.amountList = [];
}) if (app.globalData.userInfo) {
this.amoutType = 3; if (this.typeId == 1) {
this.getListOutRechargePrice(3); uni.setNavigationBarTitle({
return; title: '中国移动'
})
this.amoutType = 2;
this.getListOutRechargePrice(2);
return;
}
if (this.typeId == 2) {
uni.setNavigationBarTitle({
title: '中国电信'
})
this.amoutType = 1;
this.getListOutRechargePrice(1);
return;
}
if (this.typeId == 3) {
uni.setNavigationBarTitle({
title: '中国联通'
})
this.amoutType = 3;
this.getListOutRechargePrice(3);
return;
}
} }
}, },
methods: { methods: {
select(amoutinfos) { select(amoutinfos) {
this.inputAmount = amoutinfos.realPrice; this.inputAmount = amoutinfos.realPrice;
@ -178,10 +212,10 @@
// //
change(index) { change(index) {
this.$refs.tabs.setFinishCurrent(index); this.$refs.tabs.setFinishCurrent(index);
this.current = index; this.current = index;
this.inputAmount = ''; this.inputAmount = '';
this.inputAmountId = ''; this.inputAmountId = '';
this.amoutstatus = ''; this.amoutstatus = '';
if (index == 0) { if (index == 0) {
this.swiperCurrent = 2; this.swiperCurrent = 2;
this.getListOutRechargePrice(this.amoutType); this.getListOutRechargePrice(this.amoutType);
@ -240,14 +274,14 @@
icon: "none" icon: "none"
}); });
return; return;
} }
if (that.inputPhone.length != 11) { if (that.inputPhone.length != 11) {
uni.showToast({ uni.showToast({
title: '请输入正确充值号码', title: '请输入正确充值号码',
duration: 2000, duration: 2000,
icon: "none" icon: "none"
}); });
return; return;
} }
if (that.inputAmount == '') { if (that.inputAmount == '') {
uni.showToast({ uni.showToast({
@ -274,7 +308,7 @@
url: '../unionComfirmation/unionComfirmation?orderPrice=' + that.price + url: '../unionComfirmation/unionComfirmation?orderPrice=' + that.price +
'&payPrice=' + that.inputAmount + '&rechargeContent=' + that.inputPhone + '&payPrice=' + that.inputAmount + '&rechargeContent=' + that.inputPhone +
'&rechargeModel=' + that.amoutType + '&agentKey=' + that.codesVlues + '&rechargeModel=' + that.amoutType + '&agentKey=' + that.codesVlues +
'&objectId=' + that.inputAmountId+'&rechargeType='+that.swiperCurrent '&objectId=' + that.inputAmountId + '&rechargeType=' + that.swiperCurrent
}) })
} }
}) })

Loading…
Cancel
Save