1 files added
10 files modified
| | |
| | | ## edu_ins_client |
| | | ## axx_ins_client |
| | | |
| | | 教育分期平台用户端 |
| | | |
| | |
| | | * @Author: 小明丶 |
| | | * @Date: 2019-08-13 18:10:18 |
| | | * @LastEditors: zxq |
| | | * @LastEditTime: 2022-08-02 17:27:11 |
| | | * @LastEditTime: 2022-08-04 10:47:20 |
| | | * @Description: |
| | | */ |
| | | export default [ |
| | | // { |
| | | // path:"/", |
| | | // name:'front-login', |
| | | // component:()=>import("@/views/user/front-login.vue"), |
| | | // meta:{ |
| | | // isLogin:true |
| | | // } |
| | | // }, |
| | | { |
| | | path:"/", |
| | | name:'front-login', |
| | | component:()=>import("@/views/user/front-login.vue"), |
| | | meta:{ |
| | | isLogin:true |
| | | } |
| | | }, |
| | | { |
| | | path:"/login", |
| | | name:'login', |
| | |
| | | // component:()=>import("@/views/user/agreement2.vue"), |
| | | // }, |
| | | { |
| | | path:"/", |
| | | path:"/home", |
| | | name:'home', |
| | | component:()=>import("@/views/home.vue"), |
| | | children:[ |
| | |
| | | /* |
| | | * @Author: 小明丶 |
| | | * @Date: 2019-08-19 15:23:17 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2021-11-01 11:01:36 |
| | | * @LastEditors: zxq |
| | | * @LastEditTime: 2022-08-04 10:46:21 |
| | | * @Description: |
| | | */ |
| | | import Vue from 'vue'; |
| | |
| | | openId:openId |
| | | }; |
| | | //dispatch('getWechatUserInfo',{vm,openId,next}) |
| | | Vue.prototype.$api.login(passwordLogin).then(res => { |
| | | Vue.prototype.$api.login(passwordLogin).then({body} => { |
| | | // sessionStorage.jumpUrl = res.body.clientAccessDomain; |
| | | let { |
| | | sessionId, |
| | | mblNo |
| | | } = res.body; |
| | | let {sessionId,mblNo} = body; |
| | | let userInfo = {} |
| | | userInfo.mblNo = res.body.account;//手机号修改成账号 |
| | | userInfo.hasBankCard = res.body.hasBankCard;//1标识有我的银行卡0未绑定银行卡 |
| | | userInfo.mblNo = body.account;//手机号修改成账号 |
| | | userInfo.hasBankCard =body.hasBankCard;//1标识有我的银行卡0未绑定银行卡 |
| | | commit(SET_SESSION_ID, sessionId);//存储sessionId用于判断是否登录 |
| | | localStorage.axx_ins_client_openId = body.openid; |
| | | commit(SET_USER_INFO,userInfo) |
| | | dispatch('setUserMenu',{ vm, next }) |
| | | dispatch('setUserMenu',{ vm, next }); |
| | | vm.$router.push('/home/index')//跳转到指定页面 |
| | | }); |
| | | }, |
| | |
| | | // var url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect` |
| | | |
| | | // // 判断用户是否已经授权 |
| | | // if(window.localStorage.edu_ins_client_openId == 'undefined' || !localStorage.edu_ins_client_openId){ |
| | | // if(window.localStorage.axx_ins_client_openId == 'undefined' || !localStorage.axx_ins_client_openId){ |
| | | // window.location.href = url |
| | | // // 在回调页面去获取到授权返回的code,并且传递给后端 |
| | | // } |
| | |
| | | // 拼接微信授权页面链接 |
| | | var url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${this.appid}&redirect_uri=${this.redirect_uri}&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect` |
| | | // 判断用户是否已经授权 |
| | | if(window.localStorage.edu_ins_client_openId == 'undefined' || !localStorage.edu_ins_client_openId){ |
| | | if(window.localStorage.axx_ins_client_openId == 'undefined' || !localStorage.axx_ins_client_openId){ |
| | | window.location.href = url |
| | | // 在回调页面去获取到授权返回的code,并且传递给后端 |
| | | } |
| | |
| | | <!-- |
| | | * @Author: your name |
| | | * @Date: 2021-10-28 17:26:45 |
| | | * @LastEditTime: 2021-11-12 11:20:06 |
| | | * @LastEditors: Please set LastEditors |
| | | * @LastEditTime: 2022-08-04 10:33:33 |
| | | * @LastEditors: zxq |
| | | * @Description: In User Settings Edit |
| | | * @FilePath: \edu_ins_client\src\views\bankCard\index.vue |
| | | * @FilePath: \axx_ins_client\src\views\bankCard\index.vue |
| | | --> |
| | | <template> |
| | | <div class="bankCard_page"> |
| | |
| | | * @Author: 小明丶 |
| | | * @Date: 2020-05-20 20:29:47 |
| | | * @LastEditors: zxq |
| | | * @LastEditTime: 2022-08-03 18:00:10 |
| | | * @LastEditTime: 2022-08-04 09:52:23 |
| | | * @Description: |
| | | --> |
| | | <template> |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | console.log(window) |
| | | // this.getWXToken(); |
| | | // 判断微信接口是否支持 |
| | | wx.checkJsApi({ |
| | |
| | | * @LastEditors: zxq |
| | | * @LastEditTime: 2022-06-16 10:06:39 |
| | | * @Description: Description |
| | | * @FilePath: \edu_ins_client\src\views\order\settlementEarly.vue |
| | | * @FilePath: \axx_ins_client\src\views\order\settlementEarly.vue |
| | | --> |
| | | <template> |
| | | <div class="settlement_early"> |
| | |
| | | computed:{ |
| | | ...mapState(['userinfo']), |
| | | mation(){ |
| | | if(localStorage.edu_ins_client_userMation){ |
| | | return JSON.parse(localStorage.edu_ins_client_userMation) |
| | | if(localStorage.axx_ins_client_userMation){ |
| | | return JSON.parse(localStorage.axx_ins_client_userMation) |
| | | } |
| | | } |
| | | }, |
| | |
| | | * @Author: 小明丶 |
| | | * @Date: 2020-06-04 09:55:50 |
| | | * @LastEditors: zxq |
| | | * @LastEditTime: 2022-07-12 11:01:46 |
| | | * @LastEditTime: 2022-08-04 10:36:30 |
| | | * @Description: |
| | | --> |
| | | <template> |
| | |
| | | import Vue from "vue"; |
| | | import { RadioGroup, Radio } from "vant"; |
| | | import { Checkbox, CheckboxGroup } from "vant"; |
| | | import { GoWeChat } from "../../utils/wechat"; |
| | | // import { GoWeChat } from "../../utils/wechat"; |
| | | |
| | | Vue.use(Checkbox); |
| | | Vue.use(CheckboxGroup); |
| | |
| | | }, |
| | | created() { |
| | | var _this = this; |
| | | // localStorage.edu_ins_client_openId = 'oJbj21YwUatdNaYf3iEPwwGtWuUg' |
| | | // localStorage.edu_ins_client_userMation = '{"openid":"oGGPLs2yZ5tiBnB9iYcZrV60DoqM","nickname":"乌卡拉卡","sex":"1","province":"四川","city":"成都","country":"中国","headimgurl":"http://thirdwx.qlogo.cn/mmopen/vi_32/sYsBGsncFia9ql7K5stRibY61BSjDkPkNQFiasqdHiczTwbnX7JeZhcrp49RZD9icFTDLd2JqUjIrHHVw0f52kE4Uibw/132"}' |
| | | // localStorage.axx_ins_client_openId = 'oJbj21YwUatdNaYf3iEPwwGtWuUg' |
| | | // localStorage.axx_ins_client_userMation = '{"openid":"oGGPLs2yZ5tiBnB9iYcZrV60DoqM","nickname":"乌卡拉卡","sex":"1","province":"四川","city":"成都","country":"中国","headimgurl":"http://thirdwx.qlogo.cn/mmopen/vi_32/sYsBGsncFia9ql7K5stRibY61BSjDkPkNQFiasqdHiczTwbnX7JeZhcrp49RZD9icFTDLd2JqUjIrHHVw0f52kE4Uibw/132"}' |
| | | // this.$router.push("/login"); |
| | | //本地是否存储有openId,有就调用openId登录 |
| | | if (localStorage.edu_ins_client_openId && localStorage.edu_ins_client_openId != undefined) { |
| | | if (localStorage.axx_ins_client_openId && localStorage.axx_ins_client_openId != undefined) { |
| | | //this.$router.push("/login"); |
| | | this.openIdLogin({ |
| | | this.openIdLogin({ |
| | | vm: _this, |
| | | openId: localStorage.edu_ins_client_openId |
| | | openId: localStorage.axx_ins_client_openId |
| | | }); |
| | | } else { |
| | | this.loginBut(); |
| | | this.$router.push("/login"); |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | //登录验证 |
| | | loginBut() { |
| | | // 无openId跳转授权,有就执行openId登录 |
| | | //if (!localStorage.edu_ins_client_openId || localStorage.edu_ins_client_openId == undefined) { |
| | | //if (!localStorage.axx_ins_client_openId || localStorage.axx_ins_client_openId == undefined) { |
| | | let url = location.host |
| | | //console.log(location.href) |
| | | //console.log("准备跳转"); wx594ab33e0466eccf |
| | |
| | | * @Author: 小明丶 |
| | | * @Date: 2019-08-15 10:20:56 |
| | | * @LastEditors: zxq |
| | | * @LastEditTime: 2022-06-16 11:34:10 |
| | | * @LastEditTime: 2022-08-04 10:42:08 |
| | | * @Description: 登录页面 |
| | | --> |
| | | <template> |
| | |
| | | if(sessionStorage.verCode){ |
| | | this.verCode = sessionStorage.verCode |
| | | } |
| | | |
| | | this.code = this.getUrlCode("code"); |
| | | console.log('this.code:',this.code) |
| | | console.log('this.$route.query.whichPage:',this.$route.query.whichPage) |
| | | if (this.code && !this.$route.query.whichPage) { |
| | | this.$api.wechatUserInfo({ code: this.code}).then(res => { |
| | | console.log('res.body.openid:',res.body.openid) |
| | | localStorage.edu_ins_client_openId = res.body.openid; |
| | | localStorage.edu_ins_client_userMation = JSON.stringify(res.body); |
| | | }); |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions(["login", "getVercode", "openIdLogin"]), |
| | | //截取code值 |
| | | getUrlCode(name) { |
| | | return ( |
| | | decodeURIComponent( |
| | | (new RegExp("[?|&]" + name + "=" + "([^&;]+?)(&|#|;|$)").exec( |
| | | location.href |
| | | ) || [, ""])[1].replace(/\+/g, "%20") |
| | | ) || null |
| | | ); |
| | | }, |
| | | ...mapActions(["login", "getVercode"]), |
| | | //登录验证 |
| | | loginBut() { |
| | | let v = this.$tool; |
| | |
| | | vm: this, |
| | | mblNo: this.mblNo, |
| | | verCode: this.verCode, |
| | | openId: localStorage.edu_ins_client_openId |
| | | // openId: localStorage.axx_ins_client_openId |
| | | }); |
| | | }, |
| | | sendCode() { |
| | |
| | | sessionStorage.beforeDate = new Date().getTime() |
| | | this.getSecond(60); |
| | | }) |
| | | // this.$store.dispatch("getVercode", { |
| | | // vm: this, |
| | | // mblNo: this.mblNo, |
| | | // verCodeType: 1 |
| | | // }); |
| | | |
| | | }, |
| | | //发送验证码计时函数 |
| | | getSecond(wait) { |
| | |
| | | |
| | | beforeRouteLeave (to, from, next) { |
| | | // ... |
| | | |
| | | clearTimeout(this.timer) |
| | | next() |
| | | } |