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

完善下载逻辑

parent 20742af6
Pipeline #3335 canceled with stages
......@@ -4,7 +4,7 @@
"configurations": [{
"app-plus" :
{
"launchtype" : "local"
"launchtype" : "remote"
},
"default" :
{
......
This diff is collapsed.
......@@ -115,8 +115,8 @@ export default {
});
try {
await this.$store.dispatch('App_get_provider');
let code=await wxLogin()
let res = await this.$store.dispatch('Auto_login', {code});
// let code=await wxLogin()
let res = await this.$store.dispatch('Auto_login', {});
this.showToast('登录成功', true);
setTimeout(() => {
if (this.returnUrl) {
......@@ -233,7 +233,7 @@ export default {
position: relative;
width: 100%;
height: 104upx;
border-radius: 52upx;
border-radius: 16upx;
line-height: 104upx;
color: #ffffff;
font-size: 32upx;
......@@ -255,10 +255,11 @@ export default {
}
}
.apple {
background: #458eff;
box-shadow: 0px 12upx 24upx 0px rgba(69, 142, 255, 0.32);
border-radius: 16upx;
background: $default-color;
box-shadow: 0px 12upx 24upx 0px rgba(2, 160, 116, 0.32);
&:active {
background: #83afff;
background: rgb(2, 175, 126);
}
}
}
......
<template>
<view class="file-list">
<view class="file-list-title" v-if="list.length">
全部文件
</view>
<view class="file" v-for="(item, index) in list" :key="item.createTime" @click="previewFile(item)">
<view class="file-info">
<view class="file-name">{{ fileName }}</view>
......@@ -104,16 +107,20 @@ export default {
<style lang="scss" scoped>
.file-list {
margin-top: 32rpx;
&-title{
line-height: 64rpx;
font-size: 24rpx;
color: #8d8d8d;
}
.file {
margin-bottom: 24rpx;
background-color: #fff;
border-radius: 16rpx;
display: flex;
align-items: center;
height: 88rpx;
width: 100%;
font-size: 24rpx;
padding: 0 24rpx;
padding: 24rpx;
&-info {
flex: 1;
height: 100%;
......@@ -124,7 +131,7 @@ export default {
&-name {
}
&-time {
margin-top: 10rpx;
margin-top: 4rpx;
color: #8d8d8d;
}
&-delete {
......
<template>
<view class="download">
<view class="download-icon" @click="downloadFile"><image :src="downloadImg" /></view>
<view class="download-content" v-if="platform==='4'">
<view class="download-content" v-if="platform === '4'">
<view class="download-content-item">1. 点击图标,下载模板文件;</view>
<view class="download-content-item" v-if="isIOS">2. 文件右上角,选择存储到"文件";</view>
<view class="download-content-item" v-else>2. 打开文件进行编辑;</view>
......@@ -17,7 +17,7 @@
<script>
import { mineBaseUrl } from '@/utils/config.js';
import { downLoadFile, saveFile, appDowloadFile } from '@/utils/download.js';
import { downLoadFile, saveFile, appDownloadFile, clickDownload } from '@/utils/download.js';
import { mapGetters } from 'vuex';
export default {
data() {
......@@ -27,14 +27,15 @@ export default {
};
},
computed: {
...mapGetters(['platform','isIOS'])
...mapGetters(['platform', 'isIOS'])
},
methods: {
async downloadFile() {
try {
let res = null;
if (this.platform === '4') {
appDowloadFile({
// appDownloadFile();
clickDownload({
url: this.filePath,
filename: 'zhangdan'
});
......@@ -69,11 +70,11 @@ export default {
}
});
},
copy(){
copy() {
uni.setClipboardData({
data: this.filePath,
success: ()=> {
this.showToast("已复制到剪贴板")
success: () => {
this.showToast('已复制到剪贴板');
}
});
}
......@@ -99,7 +100,7 @@ export default {
&-item {
margin-bottom: 24rpx;
}
.undeline{
.undeline {
text-decoration: underline;
}
}
......
......@@ -167,6 +167,9 @@ const actions = {
}
try {
let code=""
if(params&&!params.account){
code=await wxLogin()
}
let info = {
...loginInfo,
authType: authType,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "uni-id",
"version": "3.3.28",
"description": "uni-id for uniCloud",
"main": "index.js",
"homepage": "https://uniapp.dcloud.io/uniCloud/uni-id",
"repository": {
"type": "git",
"url": "git+https://gitee.com/dcloud/uni-id.git"
},
"author": "",
"license": "Apache-2.0",
"dependencies": {
"uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
}
}
\ No newline at end of file
This diff is collapsed.
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