Browse Source

前端-智能简历

armg 10 months ago
parent
commit
4d87e0afa1

+ 5 - 10
ruoyi-ui/src/App.vue

@@ -8,7 +8,7 @@
 <script>
 import ThemePicker from "@/components/ThemePicker";
 
-import { authToken, authTokenThree, authLogin } from "@/api/login";
+import { authToken, authTokenThree, authLogin,cropLogin } from "@/api/login";
 import { initDingH5RemoteDebug } from "dingtalk-h5-remote-debug";
 import { openAuth } from "dingtalk-design-libs/biz/openAuth";
 import { setToken } from "@/utils/auth";
@@ -45,15 +45,10 @@ export default {
           type: 0, // 0 标识授权个人信息;1 标识授权组织信息
         }).then((res) => {
           // 处理返回数据
-          // console.log("免登res=", res);
-          // authToken(res.result.authCode).then((res) => {
-          //   let userInfo = res.sysUser;
-          //   setToken(res.token);
-          //   that.$store.commit("SET_TOKEN", res.token);
-          //   console.log("----钉钉环境----");
-          //   that.toTargetPage();
-          // });
-          authLogin({ code: res.code, corpId: corpId }).then((res) => {
+           console.log("统一授权套件SDK==res=", res);
+           //cropLogin
+           //authLogin
+          authLogin({ code: res.result.authCode, corpId: corpId }).then((res) => {
             // console.log("===authLogin_res=", res);
             // let userInfo = res.sysUser;
             setToken(res.msg);

+ 8 - 0
ruoyi-ui/src/api/login.js

@@ -93,3 +93,11 @@ export function authLogin(data) {
   })
 }
 
+export function cropLogin(data) {
+  return request({
+    url: '/auth/ding/cropLogin',
+    method: 'post',
+    data: data
+  })
+}
+

+ 1 - 1
ruoyi-ui/src/views/mobile/crm/index.vue

@@ -52,7 +52,7 @@
         <div>没有相关数据</div>
         <div>您可以尝试以下操作</div>
         <van-button type="info" round v-preventReClick @click="onClickRight"
-          >新建重点客户</van-button
+          >新增简历</van-button
         >
       </div>
     </div>

+ 1 - 1
ruoyi-ui/src/views/mobile/resume/index.vue

@@ -58,7 +58,7 @@
         <div>没有相关数据</div>
         <div>您可以尝试以下操作</div>
         <van-button type="info" round v-preventReClick @click="onClickRight"
-          >新建重点客户</van-button
+          >新增简历</van-button
         >
       </div>
     </div>

+ 6 - 1
ruoyi-ui/src/views/system/resume/add.vue

@@ -19,6 +19,7 @@
             :action="FileAction"
             :file-list="fileList"
             :on-success="handleFileSuccess"
+            :headers="headers"
             :limit="1"
           >
             <el-button size="small" type="primary">选择文件</el-button>
@@ -449,17 +450,21 @@
   </div>
 </template>
 <script>
+import { getToken } from "@/utils/auth";
 import { addResume, getResume, updateResume } from "@/api/system/resume";
 export default {
   dicts: ["sys_user_sex"],
   name: "systemResumeAdd",
-  data() {  
+  data() {
     return {
       title: "新增简历",
       fileList: [],
       FileAction:
         process.env.VUE_APP_BASE_API + "/system/resume/uploadResumeSimilarity",
       // 表单参数
+      headers: {
+        Authorization: "Bearer " + getToken(),
+      },
       form: {
         userName: "",
         mobile: "",