Commit b0d2ed7bf060376eb717dec34091fe139edeed78

Authored by yvan.ni
1 parent 9578af1a

上传图片再选择后就上传

pages/user/add_comment/add_comment.js
@@ -166,12 +166,12 @@ Page({ @@ -166,12 +166,12 @@ Page({
166 // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片 166 // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
167 var tempFilePaths = res.tempFilePaths; 167 var tempFilePaths = res.tempFilePaths;
168 168
169 - e.uploadFile("/api/weshop/comment/uploadCommentImg", { 169 + getApp().request.uploadFile("/api/weshop/comment/uploadCommentImg", {
170 filePath: tempFilePaths[0], 170 filePath: tempFilePaths[0],
171 name: "file", 171 name: "file",
172 success: function (e) { 172 success: function (e) {
173 if(e.data.code==0) { 173 if(e.data.code==0) {
174 - s.data.uploadPath.push(e.data.data); 174 + that.data.uploadPath.push(e.data.data);
175 imgs.push(tempFilePaths[0]); 175 imgs.push(tempFilePaths[0]);
176 that.setData({ 176 that.setData({
177 imgs: imgs 177 imgs: imgs
pages/user/add_comment/add_comment.wxml
@@ -97,7 +97,6 @@ @@ -97,7 +97,6 @@
97 97
98 </view> 98 </view>
99 </view> 99 </view>
100 -  
101 <!-- 是否匿名评价 --> 100 <!-- 是否匿名评价 -->
102 <view class=" Whether "> 101 <view class=" Whether ">
103 <!-- 选择是否匿名 --> 102 <!-- 选择是否匿名 -->
pages/user/add_comment/add_comment.wxss
1 page{ 1 page{
2 overflow-x: hidden; 2 overflow-x: hidden;
3 - overflow-y: hidden;  
4 } 3 }
5 /* 商品详情和评价 */ 4 /* 商品详情和评价 */
6 .commoditymax{ 5 .commoditymax{
7 - overflow: hidden; 6 + overflow-x: hidden;
8 } 7 }
9 .commodity { 8 .commodity {
10 height: 715rpx; 9 height: 715rpx;