|
@@ -21,7 +21,7 @@
|
|
|
v-for="(item, index) in uploadList"
|
|
v-for="(item, index) in uploadList"
|
|
|
:key="index"
|
|
:key="index"
|
|
|
>
|
|
>
|
|
|
- <image:src="item"mode="aspectFit" style="width: 100%; height: 100%" @click="showLarge(item)"/>
|
|
|
|
|
|
|
+ <image :src="item" mode="aspectFit" style="width: 100%; height: 100%" @click="showLarge(item)"/>
|
|
|
<image src="/static/del.png" class="del-icon"mode="aspectFit"
|
|
<image src="/static/del.png" class="del-icon"mode="aspectFit"
|
|
|
style="width: 30rpx; height: 30rpx" @click="delPhoto(index)"></image>
|
|
style="width: 30rpx; height: 30rpx" @click="delPhoto(index)"></image>
|
|
|
</view>
|
|
</view>
|
|
@@ -85,12 +85,12 @@ export default {
|
|
|
"&sign=" +
|
|
"&sign=" +
|
|
|
md5Sign;
|
|
md5Sign;
|
|
|
let postData = {
|
|
let postData = {
|
|
|
- openid : "asfsfsffa",
|
|
|
|
|
|
|
+ openid :getApp().globalData.open_id,
|
|
|
activity_id : 1 , //这里固定是1
|
|
activity_id : 1 , //这里固定是1
|
|
|
content : this.supplyInfo.msg,
|
|
content : this.supplyInfo.msg,
|
|
|
department :this.supplyInfo.title,
|
|
department :this.supplyInfo.title,
|
|
|
user_name : this.supplyInfo.name,
|
|
user_name : this.supplyInfo.name,
|
|
|
- attach_ids : '' // 3,34,5,5,6
|
|
|
|
|
|
|
+ attach_ids :this.imgIdList.join(), // 3,34,5,5,6
|
|
|
};
|
|
};
|
|
|
uni.request({
|
|
uni.request({
|
|
|
url: url,
|
|
url: url,
|
|
@@ -144,6 +144,7 @@ export default {
|
|
|
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
|
|
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
|
|
|
success: (res) => {
|
|
success: (res) => {
|
|
|
for (let i = 0; i < res.tempFilePaths.length; i++) {
|
|
for (let i = 0; i < res.tempFilePaths.length; i++) {
|
|
|
|
|
+ console.log(res.tempFilePaths[i])
|
|
|
that.uploadList.push(res.tempFilePaths[i]);
|
|
that.uploadList.push(res.tempFilePaths[i]);
|
|
|
that.uploadFileRequest(res.tempFilePaths[i]);
|
|
that.uploadFileRequest(res.tempFilePaths[i]);
|
|
|
}
|
|
}
|
|
@@ -157,13 +158,16 @@ export default {
|
|
|
});
|
|
});
|
|
|
let that = this;
|
|
let that = this;
|
|
|
let md5Sign = md5(
|
|
let md5Sign = md5(
|
|
|
- "method=" +"upload" + "×tamp=" +
|
|
|
|
|
|
|
+ "method=" +
|
|
|
|
|
+ "upload" +
|
|
|
|
|
+ "×tamp=" +
|
|
|
getApp().globalData.globalTimestamp +
|
|
getApp().globalData.globalTimestamp +
|
|
|
- "&secret=" + getApp().globalData.secret
|
|
|
|
|
|
|
+ "&secret=" +
|
|
|
|
|
+ getApp().globalData.secret
|
|
|
);
|
|
);
|
|
|
let url =
|
|
let url =
|
|
|
getApp().globalData.shareUrl +
|
|
getApp().globalData.shareUrl +
|
|
|
- "api/upload.php" +
|
|
|
|
|
|
|
+ "api/api.php" +
|
|
|
"?method=upload&source=activity&id=1×tamp=" +
|
|
"?method=upload&source=activity&id=1×tamp=" +
|
|
|
getApp().globalData.globalTimestamp +
|
|
getApp().globalData.globalTimestamp +
|
|
|
"&sign=" +
|
|
"&sign=" +
|