作者 王晓刚
1 个管道 的构建 通过 耗费 1 秒

商户申请

... ... @@ -37,8 +37,8 @@
<file leaf-file-name="enter_view.html" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/application/home/view/merchant/enter_view.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="68">
<caret line="159" column="52" selection-start-line="159" selection-start-column="52" selection-end-line="159" selection-end-column="52" />
<state relative-caret-position="425">
<caret line="219" column="77" lean-forward="true" selection-start-line="219" selection-start-column="77" selection-end-line="219" selection-end-column="77" />
</state>
</provider>
</entry>
... ... @@ -363,21 +363,7 @@
<workItem from="1573174620844" duration="32581000" />
<workItem from="1573259331081" duration="30435000" />
<workItem from="1573432217070" duration="2199000" />
<workItem from="1573519427130" duration="10957000" />
</task>
<task id="LOCAL-00532" summary=" 商户申请">
<created>1573292578903</created>
<option name="number" value="00532" />
<option name="presentableId" value="LOCAL-00532" />
<option name="project" value="LOCAL" />
<updated>1573292578903</updated>
</task>
<task id="LOCAL-00533" summary=" 商户申请">
<created>1573292669147</created>
<option name="number" value="00533" />
<option name="presentableId" value="LOCAL-00533" />
<option name="project" value="LOCAL" />
<updated>1573292669147</updated>
<workItem from="1573519427130" duration="11827000" />
</task>
<task id="LOCAL-00534" summary=" 商户申请">
<created>1573292730768</created>
... ... @@ -708,11 +694,25 @@
<option name="project" value="LOCAL" />
<updated>1573542164527</updated>
</task>
<option name="localTasksCounter" value="581" />
<task id="LOCAL-00581" summary=" 商户申请">
<created>1573542341131</created>
<option name="number" value="00581" />
<option name="presentableId" value="LOCAL-00581" />
<option name="project" value="LOCAL" />
<updated>1573542341131</updated>
</task>
<task id="LOCAL-00582" summary=" 商户申请">
<created>1573542575057</created>
<option name="number" value="00582" />
<option name="presentableId" value="LOCAL-00582" />
<option name="project" value="LOCAL" />
<updated>1573542575057</updated>
</task>
<option name="localTasksCounter" value="583" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="417264000" />
<option name="totallyTimeSpent" value="418134000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
... ... @@ -1103,8 +1103,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/application/home/view/merchant/enter_view.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="68">
<caret line="159" column="52" selection-start-line="159" selection-start-column="52" selection-end-line="159" selection-end-column="52" />
<state relative-caret-position="425">
<caret line="219" column="77" lean-forward="true" selection-start-line="219" selection-start-column="77" selection-end-line="219" selection-end-column="77" />
</state>
</provider>
</entry>
... ...
... ... @@ -157,18 +157,34 @@
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (res) {
alert(JSON.stringify(res))
$(res.localIds).each(function (key, localId) {
uploadImages(localId,2);
console.log('44444444444444444444444444');
alert(JSON.stringify(res));
// let successUp = 0; //成功个数
// let failUp = 0; //失败个数
let i = 0; //第几个
let tempFilePaths = res.localIds; //总文件
let length = res.localIds.length; //总共个数
wx.showLoading({
title: '上传中'
});
// t.uploadAllfile(tempFilePaths, successUp, failUp, i, length,2);
uploadImages(tempFilePaths,length,i,2);
// $(res.localIds).each(function (key, localId) {
// uploadImages(localId,2);
// console.log('44444444444444444444444444');
// });
}
});
});
function uploadImages(localId,type) {
function uploadImages(localId,length,i,type) {
console.log('555555555555555555')
wx.uploadImage({
localId: localId,
localId: localId[i],
isShowProgressTips: 1,
success: function (res) {
var serverId = res.serverId; // 返回图片的服务器端ID
... ... @@ -198,6 +214,11 @@
" </div>";
$('#dom2').prepend(html);
}
i++;
if(i < length) {
// 还有图片
uploadImages(localId,length,i,2);
}
}
},
error:function(res){
... ... @@ -211,6 +232,9 @@
});
};
$('body').on('click', '.images_one', function () {
var thisUrl = host+$(this).attr('src');
var allUrlLength = $('.images_one').length;
... ...