1.解决登录禁用问题

yj-dev
杨杰 3 years ago
parent 3e4e4f78b7
commit 3957378e53
  1. 16
      App.vue
  2. 4
      Utils/Api.js
  3. 2
      pages/goods/goods.vue
  4. 70
      pages/goods/refuel-confirm/refuel-confirm.vue
  5. 8
      pages/order/confirmation.vue
  6. 49
      pages/tabBar/home/home.vue
  7. 167
      pages/userLogin/userLogin.vue
  8. 88
      subPages/recharge-centre/recharge-centre.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: '',

@ -238,6 +238,10 @@ export const hltUnionCardPay = params => {
export const bindHuiLianTongCard = params => {
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 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">
<image mode="widthFix" :src="imageUrl+swiper" @click="perImage(swiper)"></image>
</swiper-item>

@ -36,17 +36,18 @@
<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="height50 width100 backcorfff" @tap="paytype='jifen'">
<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" />
<radio :checked="paytype=='jifen'" color="#0083f5" />
</view>
</view>
<view class="width94 line1 mart5 marb5"></view> -->
<view class="line1"></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">
微信支付
@ -64,7 +65,7 @@
<view class="flright width30 fotct">
<radio :checked="paytype=='gonghuika'" @click="changeRiado()" color="#0083f5" />
</view>
</view>
</view> -->
</view>
<view class="width100 mart15 fcor333 font16 fontwig6 paddleft10">重要说明</view>
@ -81,7 +82,7 @@
<button class="reBtn flright" @click="orderToPay">去支付</button>
</view>
<ssPaymentPassword ref="paymentPassword" :mode="1" @submit="submitHandle"/>
<ssPaymentPassword ref="paymentPassword" :mode="1" @submit="submitHandle" />
</view>
</template>
@ -90,7 +91,8 @@
getOrderById,
orderToPay,
getHuiLianTongCardBalance,
hltUnionCardPay
hltUnionCardPay,
orderToGoldPay
} from '../../../Utils/Api.js';
import ssPaymentPassword from '../../../components/sanshui-payment-password/index.vue';
let app = getApp();
@ -131,7 +133,7 @@
//
submitHandle(e) {
this.PaymentPassword = e.value;
if(this.PaymentPassword == ''){
if (this.PaymentPassword == '') {
uni.showToast({
title: '请勿手动关闭弹窗',
icon: 'none',
@ -142,6 +144,36 @@
uni.showLoading({
title: '支付中...'
})
if (this.paytype == 'jifen') {
let params = {
"orderId": this.orderNo,
"password": this.PaymentPassword
}
orderToGoldPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '/pages/goods/refuel-succes/refuel-succes?id=' + this.orderNo
});
return;
}
if (res.return_code == '102130') {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
}
uni.showToast({
title: res.return_msg,
icon: 'none'
})
})
return;
}
let params = {
"orderId": this.orderNo,
"cardNo": this.user.hltCardNo.cardNo,
@ -154,7 +186,7 @@
title: '支付成功'
})
uni.reLaunch({
url: '/pages/goods/refuel-succes/refuel-succes?id=' +this.orderNo
url: '/pages/goods/refuel-succes/refuel-succes?id=' + this.orderNo
});
return;
}
@ -252,7 +284,8 @@
title: '支付成功'
})
uni.reLaunch({
url: '/pages/goods/refuel-succes/refuel-succes?id=' +that.orderNo
url: '/pages/goods/refuel-succes/refuel-succes?id=' +
that.orderNo
});
},
fail: function(err) {
@ -276,7 +309,7 @@
})
return;
}
if(that.paytype == 'gonghuika'){
if (that.paytype == 'gonghuika') {
if (!that.user.isSetPayPwd) {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
@ -300,9 +333,20 @@
}
that.$refs.paymentPassword.modalFun('show');
}
if (that.paytype == 'jifen') {
if (!that.user.isSetPayPwd) {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
}
that.$refs.paymentPassword.modalFun('show');
}
},
payRequest: function(self) {
let that = this;
let that = this;
uni.showLoading({
title: '支付中...'
})

@ -168,10 +168,10 @@
<image mode="widthFix" class="flleft" :src="imageUrl+items.highDiscount.discountImg"></image>
<view class="tcrig">
<view class="yhprice">
<radio :checked="items.highDiscount.id == memDiscountId" color="#0083f5" />
<radio :checked="items.id == memDiscountId" color="#0083f5" />
</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>
@ -309,7 +309,7 @@
this.$refs.popup.show();
},
radioChanges(item) {
if (this.memDiscountId == item.highDiscount.id) { //
if (this.memDiscountId == item.id) { //
this.memDiscountId = '';
this.coupondiscountid = '';
this.paytheprice = this.couponList.discountPrice;
@ -317,7 +317,7 @@
this.isDiscont = false;
} else { //
this.isDiscont = true;
this.memDiscountId = item.highDiscount.id;
this.memDiscountId = item.id;
this.coupondiscountid = item.id;
if (item.highDiscount.discountType == 1) {
//

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

@ -1,21 +1,44 @@
<template>
<view>
<image mode="widthFix" class="width90 mart20" v-if="user && user.infoCompleteStatus == 1"
:src="imagewxUrl+imgadres"></image>
<image mode="widthFix" class="width90 mart20" v-if="!user" :src="imagewxUrl+imgadres1"></image>
<!-- #ifdef MP -->
<view class="mart30 width90 height50 fcorfff backcor008 fotct btns font16 fontlet"
v-if="user && user.infoCompleteStatus == 1" @click="getuserinfo">
授权并登录</view>
<button class="mart30 width90 height50 fcorfff backcor008 fotct btns font16 fontlet" v-if="!user"
open-type="getPhoneNumber" @getphonenumber="loginByPhone">授权手机号</button>
<!-- <button class="mart30 width90 height50 fcorfff backcor008 fotct btns font16" v-if="user.phone && user"
<view v-if="type == 1">
<image mode="widthFix" class="width90 mart20" v-if="user && user.infoCompleteStatus == 1"
:src="imagewxUrl+imgadres"></image>
<image mode="widthFix" class="width90 mart20" v-if="!user" :src="imagewxUrl+imgadres1"></image>
<!-- #ifdef MP -->
<view class="mart30 width90 height50 fcorfff backcor008 fotct btns font16 fontlet"
v-if="user && user.infoCompleteStatus == 1" @click="getuserinfo">
授权并登录</view>
<button class="mart30 width90 height50 fcorfff backcor008 fotct btns font16 fontlet" v-if="!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> -->
<!-- #endif -->
<!-- #ifdef H5 -->
<button class="mart30 width90 height50 fcorfff backcor008 fotct btns font16"
@click="getH5userinfo">授权并登录</button>
<!-- #endif -->
<!-- #endif -->
<!-- #ifdef H5 -->
<button class="mart30 width90 height50 fcorfff backcor008 fotct btns font16"
@click="getH5userinfo">授权并登录</button>
<!-- #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>
</template>
@ -24,7 +47,9 @@
import {
getUserInfo,
loginByPhone,
HandleCode
HandleCode,
loginByTel,
sendSmsCode
} from "../../Utils/Api.js"
export default {
data() {
@ -33,6 +58,11 @@
imagewxUrl: app.globalData.imageWxImg,
imgadres: 'login.png',
imgadres1: 'loginphone.png',
phoneNumber: "",
code: '',
getCodeText: '获取验证码',
getCodeisWaiting: false,
type: 1 //
}
},
onLoad() {
@ -160,11 +190,116 @@
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>
<style lang="scss">
@import "../../static/css/login.scss";
.btns {
border-radius: 6px;
}

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

Loading…
Cancel
Save