zhaoxiaoqiang
2022-08-05 2526592bcec6d5c31056c260fb96f60a9b3ae2fa
node
2 files added
18 files modified
22611 ■■■■■ changed files
README.md 2 ●●● patch | view | raw | blame | history
package-lock.json 13665 ●●●●● patch | view | raw | blame | history
package.json 6 ●●●●● patch | view | raw | blame | history
public/index.html 2 ●●● patch | view | raw | blame | history
src/api/config.js 2 ●●● patch | view | raw | blame | history
src/router/index.js 8 ●●●●● patch | view | raw | blame | history
src/router/routes.js 2 ●●● patch | view | raw | blame | history
src/store/index.js 20 ●●●●● patch | view | raw | blame | history
src/views/bankCard/index.vue 2 ●●● patch | view | raw | blame | history
src/views/homeIndex/home-index.vue 4 ●●●● patch | view | raw | blame | history
src/views/order-handling/order-handling.vue 6 ●●●● patch | view | raw | blame | history
src/views/order/settlementEarly.vue 2 ●●● patch | view | raw | blame | history
src/views/personal/personal-center.vue 10 ●●●● patch | view | raw | blame | history
src/views/user/front-login.vue 10 ●●●● patch | view | raw | blame | history
src/views/user/login.vue 37 ●●●●● patch | view | raw | blame | history
static/ys.pdf patch | view | raw | blame | history
static/zc.pdf patch | view | raw | blame | history
webpack.common.js 2 ●●● patch | view | raw | blame | history
webpack.dev.js 4 ●●●● patch | view | raw | blame | history
yarn.lock 8827 ●●●●● patch | view | raw | blame | history
README.md
@@ -1,4 +1,4 @@
## axx_ins_client
## edu_ins_client
教育分期平台用户端
package-lock.json
New file
Diff too large
package.json
@@ -1,7 +1,7 @@
{
  "name": "scene_staging",
  "version": "1.0.0",
  "description": "爱享学",
  "description": "智享收银台项目重构",
  "main": "webpack.common.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
@@ -37,7 +37,7 @@
    "uglifyjs-webpack-plugin": "^2.1.2",
    "url-loader": "^1.1.2",
    "vue-loader": "^15.7.0",
    "vue-template-compiler": "^2.6.14",
    "vue-template-compiler": "^2.6.10",
    "vux-loader": "^1.2.9",
    "webpack": "^4.29.6",
    "webpack-cli": "^3.2.3",
@@ -45,12 +45,10 @@
    "webpack-merge": "^4.2.1"
  },
  "dependencies": {
    "@vue/cli": "^5.0.8",
    "axios": "^0.18.0",
    "blueimp-md5": "^2.11.1",
    "element-ui": "^2.13.0",
    "exif-js": "^2.3.0",
    "g": "^2.0.1",
    "html2canvas": "^1.0.0-rc.3",
    "qrcode": "^1.4.1",
    "vant": "^2.8.7",
public/index.html
@@ -2,7 +2,7 @@
 * @Author: 小明丶
 * @Date: 2019-08-13 18:10:18
 * @LastEditors: zxq
 * @LastEditTime: 2022-08-03 17:51:15
 * @LastEditTime: 2022-08-05 09:41:20
 * @Description:
 -->
<!DOCTYPE html>
src/api/config.js
@@ -3,7 +3,7 @@
 * @Author: TM丶
 * @LastEditors: zxq
 * @Date: 2019-03-30 09:07:29
 * @LastEditTime: 2022-08-02 17:23:10
 * @LastEditTime: 2022-08-05 09:41:51
 */
import axios from 'axios';
import md5 from 'blueimp-md5';
src/router/index.js
@@ -1,8 +1,8 @@
/*
 * @Author: 小明丶
 * @Date: 2019-08-19 15:23:17
 * @LastEditors: zxq
 * @LastEditTime: 2022-08-02 17:27:35
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-10-28 17:34:08
 * @Description:
 */
import Vue from "vue";
@@ -25,14 +25,16 @@
// 全局前置守卫:页面跳转前拦截
router.beforeEach((to, from, next) => {
    if(to.meta.isLogin){
        next()
    }else{
        // 需要登录的页面
        if(Store.state.sessionId){
            next()
        }else{
            
            next('/login')
            next('/')
        }
    }
})
src/router/routes.js
@@ -2,7 +2,7 @@
 * @Author: 小明丶
 * @Date: 2019-08-13 18:10:18
 * @LastEditors: zxq
 * @LastEditTime: 2022-08-04 10:47:20
 * @LastEditTime: 2022-06-16 16:42:54
 * @Description:
 */
export default [
src/store/index.js
@@ -1,8 +1,8 @@
/*
 * @Author: 小明丶
 * @Date: 2019-08-19 15:23:17
 * @LastEditors: zxq
 * @LastEditTime: 2022-08-04 10:57:36
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-11-01 11:01:36
 * @Description:
 */
import Vue from 'vue';
@@ -71,19 +71,21 @@
            let passwordLogin = {
                mblNo: mblNo,
                verCode: verCode,
                // openId:openId
                openId:openId
            };
            //dispatch('getWechatUserInfo',{vm,openId,next})
            Vue.prototype.$api.login(passwordLogin).then(({body}) => {
            Vue.prototype.$api.login(passwordLogin).then(res => {
                // sessionStorage.jumpUrl = res.body.clientAccessDomain;
                let { sessionId } = body;
                let {
                    sessionId,
                    mblNo
                } = res.body;
                let userInfo = {}
                userInfo.mblNo = body.account;//手机号修改成账号
                userInfo.hasBankCard = body.hasBankCard;//1标识有我的银行卡0未绑定银行卡
                userInfo.mblNo = res.body.account;//手机号修改成账号
                userInfo.hasBankCard = res.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')//跳转到指定页面
            });
        },
src/views/bankCard/index.vue
@@ -1,7 +1,7 @@
<!--
 * @Author: your name
 * @Date: 2021-10-28 17:26:45
 * @LastEditTime: 2022-08-04 10:33:33
 * @LastEditTime: 2022-08-05 09:46:39
 * @LastEditors: zxq
 * @Description: In User Settings Edit
 * @FilePath: \axx_ins_client\src\views\bankCard\index.vue
src/views/homeIndex/home-index.vue
@@ -2,7 +2,7 @@
 * @Author: 小明丶
 * @Date: 2020-05-20 20:29:47
 * @LastEditors: zxq
 * @LastEditTime: 2022-08-04 14:55:01
 * @LastEditTime: 2022-08-04 10:50:05
 * @Description:
-->
<template>
@@ -153,12 +153,12 @@
        if (window.android && window.android.fetchQrCode) {
          window.android.fetchQrCode();
        } else {
          console.log(wx)
          wx.scanQRCode({
            needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
            scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有
            success: function(res) {
              var result = res.resultStr; // 当needResult 为 1 时,扫码返回的结果
              console.log(result);
              _this.str = res.resultStr;
              _this.$router.push({
                path: "/order-handling",
src/views/order-handling/order-handling.vue
@@ -2,7 +2,7 @@
 * @Author: 小明丶
 * @Date: 2020-05-21 19:43:21
 * @LastEditors: zxq
 * @LastEditTime: 2022-08-04 15:14:13
 * @LastEditTime: 2022-02-28 17:28:09
 * @Description: 扫码办单订单信息页面
--> 
<template>
@@ -51,8 +51,8 @@
    };
  },
  created() {
    this.$api.createTrial({ orderUrl: this.$route.query.url}).then(({body}) => {
        this.mation = body;
    this.$api.createTrial({ orderUrl: this.$route.query.url}).then(res => {
        this.mation = res.body;
        localStorage.setItem('projId',res.body.projId);
    });
  },
src/views/order/settlementEarly.vue
@@ -4,7 +4,7 @@
 * @LastEditors: zxq
 * @LastEditTime: 2022-06-16 10:06:39
 * @Description: Description
 * @FilePath: \axx_ins_client\src\views\order\settlementEarly.vue
 * @FilePath: \edu_ins_client\src\views\order\settlementEarly.vue
-->
<template>
  <div class="settlement_early">
src/views/personal/personal-center.vue
@@ -2,17 +2,17 @@
 * @Author: 小明丶
 * @Date: 2020-05-21 16:03:42
 * @LastEditors: zxq
 * @LastEditTime: 2022-08-03 17:47:21
 * @LastEditTime: 2022-06-15 09:41:41
 * @Description: 
--> 
<template>
  <div class="personal-center-page">
    <div class="top-box">
      <div class="top-img-box">
        <img src="../../../static/img/touxiang.png" alt="头像" />
        <img :src="mation.headimgurl" alt="头像" />
      </div>
      <div class="top-info-box">
        <!-- <p>{{mation.nickname}}</p> -->
        <p>{{mation.nickname}}</p>
        <p>{{userinfo.mblNo}}</p>
      </div>
      <div :class="{'fn-box':true,'fn_box1':!userinfo.hasBankCard,'fn_box':userinfo.hasBankCard}">
@@ -54,8 +54,8 @@
  computed:{
    ...mapState(['userinfo']),
    mation(){
      if(localStorage.axx_ins_client_userMation){
        return JSON.parse(localStorage.axx_ins_client_userMation)
      if(localStorage.edu_ins_client_userMation){
        return JSON.parse(localStorage.edu_ins_client_userMation)
      }
    }
  },
src/views/user/front-login.vue
@@ -2,7 +2,7 @@
 * @Author: 小明丶
 * @Date: 2020-06-04 09:55:50
 * @LastEditors: zxq
 * @LastEditTime: 2022-08-04 10:36:30
 * @LastEditTime: 2022-08-05 09:43:56
 * @Description:
-->
<template>
@@ -13,7 +13,7 @@
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);
@@ -27,17 +27,17 @@
  created() {
    var _this = this;
    // 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"}'
    // localStorage.edu_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.axx_ins_client_openId && localStorage.axx_ins_client_openId != undefined) {
      //this.$router.push("/login");
        this.openIdLogin({
      this.openIdLogin({
          vm: _this,
          openId: localStorage.axx_ins_client_openId
        });
    } else {
      this.$router.push("/login");
     this.$router.push("/login");
    }
  },
  methods: {
src/views/user/login.vue
@@ -2,7 +2,7 @@
 * @Author: 小明丶
 * @Date: 2019-08-15 10:20:56
 * @LastEditors: zxq
 * @LastEditTime: 2022-08-04 10:42:08
 * @LastEditTime: 2022-08-05 09:42:48
 * @Description: 登录页面
 -->
<template>
@@ -48,6 +48,9 @@
    <div class="btn-box">
      <button @click="loginBut">登录</button>
    </div>
    <!-- <div class="idcard-box">
      <upLoadIdCard :cardBack="idCardMation.idBackUrl" :cardFont="idCardMation.idFrontUrl"></upLoadIdCard>
    </div> -->
  </div>
</template>
@@ -105,9 +108,30 @@
    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.axx_ins_client_openId = res.body.openid;
          localStorage.edu_ins_client_userMation = JSON.stringify(res.body);
      });
    }
  },
  methods: {
    ...mapActions(["login", "getVercode"]),
    ...mapActions(["login", "getVercode", "openIdLogin"]),
    //截取code值
    getUrlCode(name) {
      return (
        decodeURIComponent(
          (new RegExp("[?|&]" + name + "=" + "([^&;]+?)(&|#|;|$)").exec(
            location.href
          ) || [, ""])[1].replace(/\+/g, "%20")
        ) || null
      );
    },
    //登录验证
    loginBut() {
      let v = this.$tool;
@@ -131,7 +155,7 @@
        vm: this,
        mblNo: this.mblNo,
        verCode: this.verCode,
        // openId: localStorage.axx_ins_client_openId
        openId: localStorage.axx_ins_client_openId
      });
    },
    sendCode() {
@@ -151,6 +175,12 @@
        sessionStorage.beforeDate = new Date().getTime()
        this.getSecond(60);
      })
      // this.$store.dispatch("getVercode", {
      //   vm: this,
      //   mblNo: this.mblNo,
      //   verCodeType: 1
      // });
    },
    //发送验证码计时函数
    getSecond(wait) {
@@ -199,6 +229,7 @@
  
  beforeRouteLeave (to, from, next) {
    // ...
    clearTimeout(this.timer)
    next()
  }
static/ys.pdf
Binary files differ
static/zc.pdf
Binary files differ
webpack.common.js
@@ -2,7 +2,7 @@
 * @Author: 小明丶
 * @Date: 2019-08-19 15:23:18
 * @LastEditors: zxq
 * @LastEditTime: 2022-08-02 17:22:31
 * @LastEditTime: 2022-07-20 09:55:45
 * @Description:
 */
//  webpack通用配置
webpack.dev.js
@@ -1,8 +1,8 @@
/*
 * @Author: 小明丶
 * @Date: 2019-08-19 15:23:18
 * @LastEditors: zxq
 * @LastEditTime: 2022-08-03 17:17:40
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-11-11 12:21:29
 * @Description:
 */
//  webpack开发环境配置
yarn.lock
New file
Diff too large