Browse Source

微信详情页 附件提示

wangshan 3 năm trước cách đây
mục cha
commit
a5d28148fa

+ 1 - 1
src/jfw/modules/app/src/web/templates/weixin/wxinfocontent.html

@@ -1304,7 +1304,7 @@
                         // 是大会员自定义版本没有下载权限 或 非超级订阅的商机管理用户 (弹框提醒联系客服)
                         if (window.isNoMember == true || (window.vipStatus <=0 && window.entniche)) {
                           vant.Dialog.alert({
-                            message: '对不起,暂无权限,请联系客服',
+                            message: '您未购买此服务,如需使用请联系您的客户经理或客服升级套餐,谢谢!',
                             className: 'custom-dialog',
                             confirmButtonText: '我知道了',
                             confirmButtonColor: '#2ABDD1',

+ 2 - 1
src/jfw/modules/bigmember/src/service/use/use.go

@@ -622,7 +622,8 @@ func (u *Use) IsAdd() {
 		d["freeEntPort"], d["freeBuyerPort"], d["freeFile"] = jy.FreeExperience(userid)
 		d["isUpgrade"] = bigPower.IsUpgrade //是否是升级后的免费用户  默认false
 		//超级用户附件下载本月可用次数
-		uk := qu.If(bigPower.VipStatus > 0, "v", "f").(string)
+		uk := qu.If(bigPower.VipStatus > 0 && bigPower.Vip_BuySet.Upgrade == 1, "v", "f").(string)
+		// log.Println(uk, "-----", config.Config.FileUploadNum[uk])
 		d["fileNum"] = config.Config.FileUploadNum[uk] - redis.GetInt(jy.PowerCacheDb, fmt.Sprintf(jy.VipFileUploadNumKey, userid, fmt.Sprint(time.Now().Month())))
 		//新用户->新订阅设置页面
 		if config.Config.NewFreeUser < bigPower.Registedate {

+ 37 - 5
src/web/templates/weixin/wxinfocontent_rec.html

@@ -1201,8 +1201,6 @@ var buyer_ = {{.T.obj.buyer}};
 var buyerperson_ = {{.T.obj.buyerperson}};
 var buyertel_ = {{.T.obj.buyertel}};
 var isbid =false; //是否是中标,需要显示所有
-var isFree = false;//是否是免费用户
-var fileNum = 0;//免费用户附件体验次数
 //拟建项目广告
 var nj_adv=["批量导出拟建项目"]
 //招标公告广告
@@ -1535,11 +1533,15 @@ function isOpening() {
 					//console.log(res)
           bigstatus = res.data.memberStatus
           powerArr = res.data.power
-          isFree = res.data.isFree
-          fileNum = res.data.fileNum
   				if (bigstatus > 0 && powerArr.indexOf(3) > -1) {
   					window.isMemberAndPower = true
   				}
+          window.isFree = res.data.isFree // 是否是免费用户
+          window.freeFile = res.data.freeFile // 免费用户 是否体验过 0:未体验过 -1:体验过
+          window.vipStatus = res.data.vipStatus // 是否是超级订阅用户
+          window.viper = res.data.viper // 是否是超级订阅老用户 false:老用户 true: 新用户
+          window.entniche = res.data.entniche // 商机管理用户
+          window.fileNum = res.data.fileNum // 超级订阅用户可下载附件次数
 					// 不是大会员
 					if (bigstatus <= 0) {
 							getDrainInfo()
@@ -1621,10 +1623,40 @@ function andownload() {
                 $('.download-list>ul').append(html)
                 $('.downs').on('click', function(){
                   //  留资判断
-                  if (isFree&&fileNum==0) {
+                  if (window.isFree&&window.freeFile==0) {
                       location.href = '/weixin/frontPage/bigmember/free/perfect_info?source=article_attach_freeuser'
                       return
                   }
+                  //超级订阅
+                  if (window.vipStatus&&window.viper&&window.fileNum<=0){
+                    // 次数用完提醒联系客服
+                    vant.Dialog.confirm({
+                      message: '您本月查看机会已经消耗完毕,如需要更多服务,请前往联系客服。',
+                      showCancelButton: true,
+                      confirmButtonText: '联系客服',
+                      confirmButtonColor: '#2ABDD1',
+                      className: 'custom-dialog',
+                      width: 303
+
+                    }).then(() => {
+                      location.href = '/big/wx/page/customer'
+                    })
+                    .catch(() => {})
+                    return
+                  }
+                  //付费用户 无大会员此功能权限
+                  if (!window.isMemberAndPower&&!isFree){
+                    vant.Dialog.alert({
+                      message: '您未购买此服务,如需使用请联系您的客户经理或客服升级套餐,谢谢!',
+                      className: 'custom-dialog',
+                      confirmButtonText: '我知道了',
+                      confirmButtonColor: '#2ABDD1',
+                      closeOnClickOverlay: true,
+                      width: 303,
+                    }).then(() => {})
+                    return
+                  }
+                  //
                   gotoFilePage($(this).find('a').text())
                 })
                 //if (window.isNoMember) {