Commit a2cf3ed0 authored by 刘文虎's avatar 刘文虎

导出错误

parent cb0fbbd4
Pipeline #2938 canceled with stages
......@@ -46,6 +46,7 @@ export async function repairExport(data) {
url: `/rest/repair/export`,
method: 'POST',
data,
responseType:'ArrayBuffer',
noLoading: true
})
}
......
......@@ -133,6 +133,9 @@ export default {
handleClose() {
this.changeVisibleValue(false)
},
stopLoading(){
this.loading = false
}
},
}
</script>
......
......@@ -56,7 +56,8 @@
"style" :
{
"navigationBarTitleText": "快速登录",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}
......
......@@ -17,7 +17,7 @@
</view>
</view>
<u-toast ref="uToast" />
<PopExport :visible.sync="visible" @confirm="handleClickConfirm" />
<PopExport ref='pop-export-bill' :visible.sync="visible" @confirm="handleClickConfirm" />
<mid-popup ref="midPopup" @afterSave="afterSave"></mid-popup>
<u-tabbar :list="tabbar" :mid-button="true" :mid-button-size="80" :before-switch="beforeSwitch"></u-tabbar>
</view>
......@@ -138,8 +138,8 @@ export default {
let startTime = null;
let endTime = null;
if (range) {
startTime = range[0];
endTime = range[1];
startTime = range[0]+' 00:00:00';
endTime = range[1]+' 23:59:59';
}
this.downloadExcel({ startTime, endTime });
// 导出
......@@ -164,16 +164,21 @@ export default {
this.saveFile(res);
} catch (e) {
this.showToast('下载错误');
this.$refs['pop-export-bill'].stopLoading()
console.log('downloadExcel_error', e);
//TODO handle the exception
}
uni.hideLoading()
},
async saveFile(file) {
console.log('saveFile');
try {
let res = await downLoad(file);
this.$refs['pop-export-bill'].stopLoading()
this.visible=false
} catch (e) {
uni.hideLoading();
this.$refs['pop-export-bill'].stopLoading()
console.log('saveFile_error', e);
//TODO handle the exception
}
......
......@@ -4,8 +4,8 @@
<view class="quick-color-cancel" :style="{ 'padding-top': platform == '3' ? 0 : statusBarHeight + 'px' }"><u-icon name="close" @click="toIndex"></u-icon></view>
</view>
<view class="quick-background">
<image src="/static/images/login/startup/denglulogo@3x.png" mode="" class="quick-background-logo"></image>
<image src="/static/images/login/startup/shiyongbanshou@3x.png" mode="" class="quick-background-slogn"></image>
<image src="/static/image/login/startup/denglulogo@3x.png" mode="" class="quick-background-logo"></image>
<image src="/static/image/index/shiyongbanshou@3x.png" mode="" class="quick-background-slogn"></image>
</view>
<view class="quick-mark">
<view class="quick-center" v-if="isIOS && platform === '4'">
......@@ -16,7 +16,7 @@
<view class="quick-center" v-else>
<view class="submit-button-box">
<view class="submit-button" @click.stop="submit" :loading="loading">
<image src="/static/images/login/startup/weixin@3x.png" mode="" class="submit-button-icon" v-if="!(platform == '2' || platform == '3')"></image>
<image src="/static/image/index/weixin@3x.png" mode="" class="submit-button-icon" v-if="!(platform == '2' || platform == '3')"></image>
<text>{{ platform == '2' || platform == '3' ? '授权登录' : '微信登录' }}</text>
</view>
</view>
......@@ -180,7 +180,7 @@ export default {
&-color {
width: 100%;
height: 30%;
background: linear-gradient(180deg, #e9f3ff 0%, #ffffff 100%);
background: linear-gradient(180deg, #F4FFFC 0%, #ffffff 100%);
overflow: hidden;
&-cancel {
width: 60upx;
......
This diff is collapsed.
<template>
<view class="login-index">
<view class="main">
<view class="m-top flex flex-column flex-yc">
<view class="t-logo">
<image class="t-logo" src="/static/images/logo_quick_search.png" />
</view>
<text class="t-title">扳手快查</text>
</view>
<view class="m-mid">
<block v-if="needAuth">
<view class="auth-tip">我们需要取得您的手机号,以关联您的扳手快查账号</view>
<view class="flex flex-between">
<button class="login-refuse" @tap="refuseAuth">拒绝</button>
<button class="login-accept" open-type="getPhoneNumber" lang="zh_CN" @getphonenumber="signup">立即登录</button>
</view>
</block>
<block v-else>
<view class="auth-tip">授权成功,立即登录</view>
<button class="login-now" open-type="getPhoneNumber" @getphonenumber="signup">立即登录</button>
</block>
</view>
<view class="m-btm">
<view class="b-list">
<view class="b-item flex flex-yc" v-for="(item, index) in list" :key="index">
<view class="i-img">
<image class="i-img" :src="item.img" />
</view>
<view class="i-right flex flex-column flex-between">
<text class="r-top">{{ item.title }}</text>
<text class="r-btm">{{ item.intro }}</text>
</view>
</view>
<view class="quick">
<view class="quick-color">
<view class="quick-color-cancel" :style="{ 'padding-top': platform == '3' ? 0 : statusBarHeight + 'px' }"><u-icon name="close" @click="toIndex"></u-icon></view>
</view>
<view class="quick-background">
<image src="/static/images/login/startup/denglulogo@3x.png" mode="" class="quick-background-logo"></image>
<image src="/static/images/login/startup/shiyongbanshou@3x.png" mode="" class="quick-background-slogn"></image>
</view>
<view class="quick-mark">
<view class="quick-center">
<view class="auth-tip">我们需要取得您的手机号,以关联您的扳手快查账号</view>
<view class="quick-center-buttons">
<button class="login-refuse" @tap="refuseAuth">拒绝</button>
<button class="login-refuse login-accept" open-type="getPhoneNumber" lang="zh_CN" @getphonenumber="signup">立即登录</button>
</view>
</view>
</view>
</view>
</template>
<script>
import log from '@/utils/log.js'
import {showToast} from "@/utils/common.js"
import log from '@/utils/log.js';
import { showToast } from '@/utils/common.js';
import { mapGetters } from 'vuex';
export default {
components: {},
......@@ -70,7 +51,8 @@ export default {
],
canIUseGetUserProfile: false,
agree: false,
params: {}
params: {},
statusBarHeight: 20
};
},
computed: {
......@@ -88,8 +70,15 @@ export default {
this.canIUseGetUserProfile = true;
break;
}
let { statusBarHeight } = this.systemInfo;
this.statusBarHeight = statusBarHeight;
},
methods: {
toIndex(){
uni.navigateBack({
delta:1
})
},
// setLoginStatus() {
// // 授权用户信息不为空,说明已经授权过无需重新授权
// if (app.globalData.tmp && app.globalData.tmp.wxUserInfo) {
......@@ -125,7 +114,7 @@ export default {
if (this.needAuth) {
uni.getUserProfile({
desc: '用于授权登录',
success: res=> {
success: res => {
console.log('授权成功', res);
const userInfo = res.userInfo || {
nickName: '',
......@@ -264,32 +253,38 @@ export default {
} else {
console.log('用户同意', e.detail);
const detail = e.detail || {};
let params={
let params = {
encryptedData: detail.encryptedData,
iv: detail.iv,
iv: detail.iv
// code: detail.code,
}
this.$store.dispatch('Auto_login',params).then((res)=>{
console.log("登录成功",res)
this.$store.dispatch('Get_UserInfo').then(()=>{
showToast('登录成功');
setTimeout(()=>{
uni.switchTab({
url:"/pages/index/index"
};
this.$store
.dispatch('Auto_login', params)
.then(res => {
console.log('登录成功', res);
this.$store
.dispatch('Get_UserInfo')
.then(() => {
showToast('登录成功');
setTimeout(() => {
uni.switchTab({
url: '/pages/index/index'
});
}, 1000);
})
},1000)
}).catch(()=>{
showToast('获取用户信息失败');
.catch(() => {
showToast('获取用户信息失败');
});
})
}).catch((err)=>{
showToast('登录失败');
console.log("登录失败",err)
})
.catch(err => {
showToast('登录失败');
console.log('登录失败', err);
});
// let userInfo = (app.globalData.tmp && app.globalData.tmp.wxUserInfo) || {
// nickName: '',
// avatarUrl: ''
// };
return false
return false;
login
.wxLogin()
.then(res => {
......@@ -305,7 +300,7 @@ export default {
})
.then(res => {
console.log('绑定手机之后接口登录结果:', res, 'token:', api.getToken());
if (res) {
if ((res.status && res.data) || api.getToken()) {
self.goBackPage();
......@@ -419,116 +414,123 @@ export default {
};
</script>
<style lang="scss" scoped>
.login-index .main {
font-size: 24rpx;
}
.login-index .main .m-top {
margin-top: 30rpx;
display: flex;
flex-direction: column;
justify-content: center;
}
.login-index .main .m-top .t-logo {
margin-bottom: 15rpx;
width: 138rpx;
height: 138rpx;
.quick {
width: 100%;
height: 100vh;
background: #ffffff;
border-radius: 50%;
}
.login-index .main .m-top .t-title {
font-size: 40rpx;
font-weight: bold;
color: #333333;
line-height: 1;
}
.login-index .main .m-mid {
padding: 0 40rpx;
margin-bottom: 24rpx;
}
.login-index .main .m-mid .auth-tip {
margin-top: 80rpx;
margin-bottom: 40rpx;
text-align: center;
font-size: 24rpx;
color: #8d8d8d;
line-height: 1;
}
.login-index .main .m-mid button {
padding: 0;
margin: 0;
}
.login-index .main .m-mid button.login-now {
/* margin-top: 138rpx; */
width: 670rpx;
height: 98rpx;
background: #07c160;
border-radius: 49rpx;
color: #ffffff;
font-weight: bold;
box-shadow: 6rpx 6rpx 40rpx rgba(7, 193, 96, 0.5);
}
.login-index .main .m-mid button.login-refuse,
.login-index .main .m-mid .login-accept {
width: 318rpx;
height: 86rpx;
line-height: 86rpx;
border-radius: 49rpx;
color: #ffffff;
font-weight: bold;
}
.login-index .main .m-mid button.login-refuse {
color: #333333;
background: #ededed;
}
.login-index .main .m-mid button.login-accept {
background: #07c160;
box-shadow: 6rpx 6rpx 40rpx rgba(7, 193, 96, 0.5);
}
.login-index .main .m-btm .b-list {
padding: 80rpx 40rpx 0 40rpx;
}
.login-index .main .m-btm .b-list .b-item {
margin-bottom: 55rpx;
}
.login-index .main .m-btm .b-list .b-item .i-img {
margin-right: 36rpx;
width: 60rpx;
height: 60rpx;
flex-shrink: 0;
}
.login-index .main .m-btm .b-list .b-item .i-right .r-top {
margin-bottom: 21rpx;
font-size: 28rpx;
position: relative;
color: #333333;
}
.login-index .main .m-btm .b-list .b-item .i-right .r-btm {
font-size: 24rpx;
color: #888888;
}
.agree-view {
font-size: 28rpx;
color: #8d8d8d;
display: flex;
justify-content: center;
align-items: center;
}
&-color {
width: 100%;
height: 30%;
background: linear-gradient(180deg, #F4FFFC 0%, #ffffff 100%);
overflow: hidden;
&-cancel {
width: 60upx;
height: 60upx;
text-align: left;
margin-top: 20upx;
margin-left: 32upx;
font-size: 32upx;
}
}
&-background {
position: absolute;
overflow: hidden;
top: 20%;
text-align: center;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
&-logo {
width: 144upx;
height: 144upx;
}
&-slogn {
width: 362upx;
height: 38upx;
margin-top: 46upx;
}
}
&-mark {
// overflow: hidden;
width: 100%;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
&-center {
position: relative;
width: 100%;
.submit-button-box {
width: 100%;
padding: 0 80upx;
margin-bottom: 54upx;
.submit-button {
position: relative;
width: 100%;
height: 104upx;
border-radius: 52upx;
line-height: 104upx;
color: #ffffff;
font-size: 32upx;
font-weight: bold;
text-align: center;
background: #00c802;
box-shadow: 0px 12upx 24upx 0px rgba(0, 200, 2, 0.32);
font-weight: 500;
display: flex;
align-items: center;
justify-content: center;
&:active {
background: #41c845;
}
.submit-button-icon {
width: 38upx;
height: 32upx;
margin-right: 16upx;
}
}
}
.auth-tip {
margin-top: 80rpx;
margin-bottom: 40rpx;
text-align: center;
font-size: 24rpx;
color: #8d8d8d;
line-height: 1;
}
&-buttons {
display: flex;
align-items: center;
justify-content: space-between;
}
.login-refuse {
width: 292rpx;
height: 104rpx;
border-radius: 16rpx;
border: 2rpx solid #cccccc;
line-height: 104rpx;
font-size: 32rpx;
color: #8d8d8d;
font-weight: bold;
background: #ffffff;
}
.login-accept {
color: #ffffff;
background: $default-color;
box-shadow: 0px 12rpx 24rpx 0px rgba(2, 160, 116, 0.2);
border: none;
}
.check-circle-view {
border-radius: 50%;
border: 2rpx solid #3383fe;
width: 36rpx;
height: 36rpx;
}
.icon-view {
width: 56rpx;
height: 56rpx;
display: flex;
justify-content: center;
align-items: center;
}
.agree-text-view {
}
.name-text {
color: #3383fe;
.cancel-button {
text-align: center;
font-size: 32upx;
color: #8d8d8d;
}
}
}
</style>
......@@ -293,8 +293,8 @@ export default {
}
if (range) {
param = {
end: range[0] + ' 00:00:00',
start: range[1] + ' 00:00:00',
end: range[1] + ' 23:59:59',
start: range[0] + ' 00:00:00',
}
}
// 导出
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment