提交修改
This commit is contained in:
parent
65e2f1f8b3
commit
98f8ef7c9a
@ -63,9 +63,9 @@ const webpackConfig = merge(baseWebpackConfig, {
|
||||
// see https://github.com/ampedandwired/html-webpack-plugin
|
||||
new HtmlWebpackPlugin({
|
||||
filename: process.env.NODE_ENV === 'testing'
|
||||
? 'own.vue.html'
|
||||
? 'index.html'
|
||||
: config.build.index,
|
||||
template: 'own.vue.html',
|
||||
template: 'index.html',
|
||||
inject: true,
|
||||
minify: {
|
||||
removeComments: true,
|
||||
|
||||
@ -3,18 +3,19 @@
|
||||
<div>
|
||||
<div>
|
||||
<div
|
||||
v-loading='hasSendCode'>
|
||||
<h2 class="brand-info__text">{{dataForm.verify}}</h2>
|
||||
v-loading='hasSendCode'>
|
||||
<h2 class="brand-info__text">{{ dataForm.verify }}</h2>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { apiDingtalkLuck } from '@/api/api_staff'
|
||||
import {apiDingtalkLuck} from '@/api/api_staff'
|
||||
import * as dd from 'dingtalk-jsapi'
|
||||
|
||||
var dingCode = null
|
||||
export default {
|
||||
data () {
|
||||
@ -37,8 +38,7 @@ export default {
|
||||
// this.handleGetImgCaptcha()
|
||||
},
|
||||
mounted () {
|
||||
if(this.isDingtalk()){
|
||||
|
||||
if (this.isDingtalk()) {
|
||||
console.log('走钉钉免登流程')
|
||||
this.dingtalkLogin()
|
||||
this.checkDingTalkLogin()
|
||||
@ -47,9 +47,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
checkDingTalkLogin () {
|
||||
if(dingCode === null){
|
||||
setTimeout(() =>{
|
||||
checkDingTalkLogin () {
|
||||
if (dingCode === null) {
|
||||
setTimeout(() => {
|
||||
this.checkDingTalkLogin()
|
||||
}, 300)
|
||||
} else {
|
||||
@ -66,14 +66,11 @@ export default {
|
||||
dingtalkLogin () {
|
||||
dd.runtime.permission.requestAuthCode({
|
||||
corpId: 'ding267474e759bbca1c35c2f4657eb6378f',
|
||||
onSuccess(result){
|
||||
|
||||
onSuccess (result) {
|
||||
dingCode = result
|
||||
console.log(dingCode)
|
||||
|
||||
},
|
||||
onFail(err) {
|
||||
|
||||
onFail (err) {
|
||||
console.log(err)
|
||||
dingCode = err
|
||||
}
|
||||
@ -81,22 +78,22 @@ export default {
|
||||
},
|
||||
loginWtihCode (result) {
|
||||
console.log('免登流程')
|
||||
console.log(result)
|
||||
apiDingtalkLuck(result).then(res => {
|
||||
console.log('获取登录结果')
|
||||
console.log(res)
|
||||
this.hasSendCode = false
|
||||
if (res && res.code === 0) {
|
||||
console.log('获取token')
|
||||
|
||||
this.dataForm.verify='已经登记,祝您好运!七夕下午5点20分员工新天地现场开奖'
|
||||
|
||||
console.log('跳转')
|
||||
} else {
|
||||
this.dataForm.verify='无法登记。' + res.msg
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
console.log(result)
|
||||
apiDingtalkLuck(result).then(res => {
|
||||
console.log('获取登录结果')
|
||||
console.log(res)
|
||||
this.hasSendCode = false
|
||||
if (res && res.code === 0) {
|
||||
console.log('获取token')
|
||||
|
||||
this.dataForm.verify = '已经登记,祝您好运!七夕下午5点20分员工新天地现场开奖'
|
||||
|
||||
console.log('跳转')
|
||||
} else {
|
||||
this.dataForm.verify = '无法登记。' + res.msg
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,52 +1,51 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<el-row>
|
||||
<div>
|
||||
<el-dropdown
|
||||
placement="bottom"
|
||||
trigger="click"
|
||||
@command="batchOperate"
|
||||
class="div_width div_height">
|
||||
<el-button
|
||||
type="primary"
|
||||
class="div_width div_height">
|
||||
资产回收
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="staff">人员</el-dropdown-item>
|
||||
<el-dropdown-item command="depat">使用地/部门/库存</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row>
|
||||
<el-button type="warning" class="div_height div_width" @click="goto(1)">开始盘点</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<el-row>
|
||||
<div>
|
||||
<el-dropdown
|
||||
placement="bottom"
|
||||
trigger="click"
|
||||
@command="batchOperate"
|
||||
class="div_width div_height">
|
||||
<el-button
|
||||
type="primary"
|
||||
class="div_width div_height">
|
||||
资产回收
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="staff">人员</el-dropdown-item>
|
||||
<el-dropdown-item command="depat">使用地/部门/库存</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row>
|
||||
<el-button type="warning" class="div_height div_width" @click="goto(1)">开始盘点</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>>
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return{
|
||||
return {
|
||||
value: ''
|
||||
}
|
||||
},
|
||||
mounted () {},
|
||||
mounted () {
|
||||
},
|
||||
methods: {
|
||||
batchOperate(command) {
|
||||
batchOperate (command) {
|
||||
switch (command) {
|
||||
case 'staff':
|
||||
//去搜索人员
|
||||
this.$router.push({name: 'devicestaffdepat', query: {type: 3}})
|
||||
break;
|
||||
case "depat":
|
||||
//去搜索人员
|
||||
break
|
||||
case 'depat':
|
||||
this.$router.push({name: 'devicestaffdepat', query: {type: 4}})
|
||||
break;
|
||||
break
|
||||
}
|
||||
},
|
||||
goto (type) {
|
||||
@ -57,41 +56,51 @@ export default {
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.el-row {
|
||||
margin-bottom: 20px;
|
||||
|
||||
}
|
||||
.el-col {
|
||||
border-radius: 10px;
|
||||
}
|
||||
.bg-purple-dark {
|
||||
background: #99a9bf;
|
||||
}
|
||||
.bg-purple {
|
||||
background: #d3dce6;
|
||||
}
|
||||
.bg-purple-light {
|
||||
background: #e5f2f1;
|
||||
}
|
||||
.grid-content {
|
||||
border-radius: 4px;
|
||||
min-height: 36px;
|
||||
}
|
||||
.row-bg {
|
||||
padding: 10px 0;
|
||||
background-color: #f9fafc;
|
||||
}
|
||||
.div_height{
|
||||
height: 60px;
|
||||
}
|
||||
.div_width{
|
||||
width: 100%;
|
||||
}
|
||||
.zero_size{
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
}
|
||||
.select_local{
|
||||
top: 600px;
|
||||
}
|
||||
</style>
|
||||
.el-row {
|
||||
margin-bottom: 20px;
|
||||
|
||||
}
|
||||
|
||||
.el-col {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.bg-purple-dark {
|
||||
background: #99a9bf;
|
||||
}
|
||||
|
||||
.bg-purple {
|
||||
background: #d3dce6;
|
||||
}
|
||||
|
||||
.bg-purple-light {
|
||||
background: #e5f2f1;
|
||||
}
|
||||
|
||||
.grid-content {
|
||||
border-radius: 4px;
|
||||
min-height: 36px;
|
||||
}
|
||||
|
||||
.row-bg {
|
||||
padding: 10px 0;
|
||||
background-color: #f9fafc;
|
||||
}
|
||||
|
||||
.div_height {
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.div_width {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.zero_size {
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
}
|
||||
|
||||
.select_local {
|
||||
top: 600px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user