lianbingjie před 4 roky
rodič
revize
5156b19141

+ 1 - 0
README.md

@@ -5,3 +5,4 @@ web用xweb框架
 
 v3.4
 大会员自定义版本
+

+ 6 - 0
src/jfw/modules/bidfileinter/src/service/action/info.go

@@ -126,6 +126,12 @@ func (i *Info) Belong() {
 	id, _ := i.GetInteger("id")
 	r := func() Result {
 		userid, _ := i.GetSession("userId").(string)
+		//该用户已经上传过该文件
+		if Mysql.CountBySql(`select count(1) from bidfile_history 
+		where user_id =? and is_delete =0 
+		and project_md5 =(select project_md5 from bidfile_history where id =?)`, userid, id) > 0 {
+			return Result{Data: M{"status": true}, Error_msg: ""}
+		}
 		bl := Mysql.Update(table, map[string]interface{}{
 			"id": id,
 		}, map[string]interface{}{

+ 4 - 4
src/web/staticres/bid-fileinter/js/bidfile_createorder.js

@@ -10,7 +10,7 @@ if(sessionobj){
     buynum.value = sessionobj.num
     con_pay.text('¥'+ sessionobj.num*15)
     should_num.text('¥'+ sessionobj.num*15)
-    origin_num.text('¥'+ sessionobj.num*20)
+    origin_num.text('¥'+ sessionobj.num*40)
     $('.agren_ipt').prop('checked', sessionobj.ischecked)
 }
 
@@ -30,7 +30,7 @@ $('.btnadd').on('click',function () {
     $('.btndown').attr('disabled',false)
     con_pay.text('¥'+ buynum.value*15)
     should_num.text('¥'+ buynum.value*15)
-    origin_num.text('¥'+ buynum.value*20)
+    origin_num.text('¥'+ buynum.value*40)
 })
 
 // 点击减号
@@ -42,7 +42,7 @@ $('.btndown').on('click',function () {
         buynum.value = parseInt(buynum.value)-1
         con_pay.text('¥'+ buynum.value*15)
         should_num.text('¥'+ buynum.value*15)
-        origin_num.text('¥'+ buynum.value*20)
+        origin_num.text('¥'+ buynum.value*40)
     }
 })
 
@@ -59,7 +59,7 @@ $('.buynum').on('keyup',function () {
     }
     con_pay.text('¥'+ buynum.value*15)
     should_num.text('¥'+ buynum.value*15)
-    origin_num.text('¥'+ buynum.value*20)
+    origin_num.text('¥'+ buynum.value*40)
 })
 
 var paramObj = {

+ 1 - 1
src/web/staticres/bid-fileinter/js/common.js

@@ -26,7 +26,7 @@ f.on('change',function(){
     }
     console.log(file)
     var subname = file.name.substring(0,file.name.lastIndexOf("."))
-    $('#m-modal.m-modal .progressbar_text').text(subname)
+    $('#m-modal.m-modal .progressbar_text,.m-modal2 .progressbar_text').text(subname)
     // 判断文件格式
     // 截取
     var fix = file.name.substr(file.name.lastIndexOf('.'));

+ 1 - 1
src/web/templates/bid-fileinter/page_bidfile_createorder.html

@@ -106,7 +106,7 @@ a{
                 <div class="main_footer">
                     <div class="should_pay">
                         <div class="original_price">
-                            原价:<span class="origin_num">¥20</span>
+                            原价:<span class="origin_num">¥40</span>
                         </div>
                         <div class="should_price">
                             应付总额:

+ 4 - 2
src/web/templates/bid-fileinter/page_bidfile_landpage.html

@@ -258,13 +258,15 @@ a{
     </div>
   </div>
 </div>
+<script>
+    // 如果不是在列表页,删除本地存入的isfilelist
+    sessionStorage.removeItem('isfilelist')
+</script>
 <script src="{{Msg "seo" "cdn"}}/js/jquery.cookie.js"></script>
 <script src='//cdn.jsdelivr.net/npm/viewerjs@1.9.0/dist/viewer.min.js'></script>
 <script src='{{Msg "seo" "cdn"}}/bid-fileinter/js/my-modal.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
 <script src='{{Msg "seo" "cdn"}}/bid-fileinter/js/common.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
 <script>
-  // 如果不是在列表页,删除本地存入的isfilelist
-  sessionStorage.removeItem('isfilelist')
 
 	//元素
 	var oFileSpan = $("#fileSpan");					//选择文件框

+ 10 - 8
src/web/templates/bid-fileinter/page_bidfile_list.html

@@ -207,13 +207,16 @@ a{
       console.log(e)
     }
 </script>
+<script>
+   // 如果是在列表页,本地存入isfilelist
+   sessionStorage.setItem('isfilelist','1')
+</script>
 <script src="{{Msg "seo" "cdn"}}/js/jquery.cookie.js"></script>
 <script src='{{Msg "seo" "cdn"}}/bid-fileinter/js/my-modal.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
 <script src='{{Msg "seo" "cdn"}}/bid-fileinter/js/common.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
 <script src='{{Msg "seo" "cdn"}}/bid-fileinter/js/z-pager.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
 <script>
-    // 如果是在列表页,本地存入isfilelist
-    sessionStorage.setItem('isfilelist','1')
+   
 
     // 分页
     // 连接z-pager.js
@@ -559,12 +562,6 @@ a{
     var myDialog = createDialog('.m-dialog')
     function directFile(url, md5, name, that, num) {
 
-      if (Number($('.suffix_span').text() || 0) <= 0) {
-        $('.m-modal2').find('.progressbar_text').text(name)
-        m2.show()
-        return
-      }
-
       documentParams.fileurl = url
       documentParams.md5 = md5
 
@@ -573,6 +570,11 @@ a{
       if (isLookText === '查看') {
         location.href = '/bid/pc/page/content?m=' + md5
       } else {
+        if (Number($('.suffix_span').text() || 0) <= 0) {
+          $('.m-modal2').find('.progressbar_text').text(name)
+          m2.show()
+          return
+        }
         var onlyId = isLi ? $(that).attr('data-id') : $(that).parents('li.content_li').attr('data-id')
 
         var data = {

+ 1 - 1
src/web/templates/weixin/commonPay/bidfile/bidfiledetail.html

@@ -292,7 +292,7 @@
                 }, 1000)
                 $(".invoice").hide();//隐藏开发票
                 $(".j-footer").show().html("<button class='j-button-confirm' style='width: 100%!important;' >去支付</button>").on("click", function () {
-                    window.location.href = "/weixin/pay/checkout_member?orderCode=" + orderCode;
+                    window.location.href = "/weixin/pay/checkout_bidfile?orderCode=" + orderCode;
                 })
             }
             if (r.data.order_status == -2 || r.data.order_status == -3) {