11
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
<view v-if="releaseType!=0" class="uploadBox">
|
||||
<u-grid :col="3" :border="false" hover-class="none">
|
||||
<template v-if="tempFilePaths.length>0">
|
||||
<u-grid-item v-for="(item,index) in tempFilePaths" :index="index" :custom-style="girdItemCustomStyle">
|
||||
<u-grid-item v-for="(item,index) in tempFilePaths" :key="index" :index="index" :custom-style="girdItemCustomStyle">
|
||||
<view @click="delTempFile(index)"
|
||||
style="width: 200rpx; display: flex; flex-direction: row;align-items: flex-start;justify-content: flex-end;position: relative;left: 32rpx;top:32rpx; z-index: 999;">
|
||||
<u-icon name="close-circle" size="32" color="#fa3534"></u-icon>
|
||||
@@ -39,7 +39,7 @@
|
||||
</u-grid-item>
|
||||
</template>
|
||||
<template v-if="(tempFilePaths.length<9&&releaseType==1)||(tempFilePaths.length<1&&releaseType==2)">
|
||||
<u-grid-item @click="chooseFile()" :custom-style="girdItemCustomStyle2">
|
||||
<u-grid-item @click="chooseFile()" :custom-style="girdItemCustomStyle2">
|
||||
<view class="slot-btn" hover-class="slot-btn__hover">
|
||||
<u-icon name="plus" size="80" :color="$u.color['lightColor']"></u-icon>
|
||||
</view>
|
||||
@@ -391,18 +391,19 @@
|
||||
let size= that.tempFilePaths.length;
|
||||
if(index==size){
|
||||
console.log("文件全部上传完成",files);
|
||||
params.fileList=JSON.stringify(files);
|
||||
params.files=JSON.stringify(files);
|
||||
that.submitPublish(params);
|
||||
uni.hideLoading();
|
||||
return;
|
||||
}
|
||||
let filePath=that.tempFilePaths[index];
|
||||
let obj = {
|
||||
filePath:filePath,
|
||||
savePath: "friendCircle" //文件存放目录
|
||||
savePath: "circle" //文件存放目录
|
||||
}
|
||||
|
||||
upload(filePath).then(res1=>{
|
||||
//批量上传
|
||||
|
||||
//单个上传
|
||||
upload(filePath,obj).then(res1=>{
|
||||
if(res1.code === 0 ){
|
||||
console.log("第"+(index+1)+"个文件上传完成",res1);
|
||||
let fileUrl= res1.data[0].file_name;
|
||||
@@ -419,7 +420,7 @@
|
||||
|
||||
submitPublish(param){
|
||||
let that=this;
|
||||
console.error('submitPublish');
|
||||
console.error('submitPublish');
|
||||
uni.$u.http.post('/friendcircle/create',param).then(res => {
|
||||
let newCircle=res;
|
||||
if(newCircle.address!=null&&newCircle.address.length>0){
|
||||
@@ -445,7 +446,7 @@
|
||||
}
|
||||
let circleDataList=[...this.circleData];
|
||||
circleDataList.unshift(newCircle);
|
||||
that.$u.vuex('circleData', circleDataList);
|
||||
that.$store.commit('circle/SET_LIST',circleDataList);
|
||||
that.btnLoading = false;
|
||||
uni.hideLoading();
|
||||
uni.navigateBack();
|
||||
@@ -492,9 +493,9 @@
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: rgb(244, 245, 246);
|
||||
border-radius: 10rpx;
|
||||
border:1rpx solid $u-border-color
|
||||
//background: rgb(244, 245, 246);
|
||||
//border-radius: 10rpx;
|
||||
//border:1rpx solid $u-border-color
|
||||
}
|
||||
|
||||
.slot-btn__hover {
|
||||
|
||||
Reference in New Issue
Block a user