Sfoglia il codice sorgente

Merge branch 'release' into dev4.6.1.5

luwenna 3 anni fa
parent
commit
c5c47ebeef
41 ha cambiato i file con 374 aggiunte e 134 eliminazioni
  1. 8 0
      src/jfw/modules/app/src/web/staticres/jyapp/css/myorder/order_detail.css
  2. 8 0
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_order_detail.css
  3. 7 1
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_order_detail.js
  4. 1 1
      src/jfw/modules/app/src/web/templates/commonPay/dataPack/orderDetail.html
  5. 2 2
      src/jfw/modules/app/src/web/templates/commonPay/myOrder.html
  6. 5 1
      src/jfw/modules/app/src/web/templates/commonPay/paySuccess.html
  7. 1 1
      src/jfw/modules/app/src/web/templates/dataPack/index.html
  8. 10 6
      src/jfw/modules/app/src/web/templates/dataPack/recharge.html
  9. 4 3
      src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info.html
  10. 2 1
      src/jfw/modules/subscribepay/src/config.json
  11. 1 0
      src/jfw/modules/subscribepay/src/config/config.go
  12. 7 1
      src/jfw/modules/subscribepay/src/coupon.json
  13. 4 1
      src/jfw/modules/subscribepay/src/entity/dataExportPackApi.go
  14. 12 4
      src/jfw/modules/subscribepay/src/entity/dataExportPackStruct.go
  15. 2 1
      src/jfw/modules/subscribepay/src/entity/subscribeVip.go
  16. 112 8
      src/jfw/modules/subscribepay/src/service/dataexportPack.go
  17. 8 2
      src/jfw/modules/subscribepay/src/service/vipSubscribePay.go
  18. 3 1
      src/jfw/modules/subscribepay/src/util/coupon.go
  19. 2 1
      src/web/staticres/common-module/data-pack/js/index.js
  20. 21 4
      src/web/staticres/common-module/data-pack/js/recharge.js
  21. 8 0
      src/web/staticres/common-module/order-list/css/order-detail.css
  22. 11 0
      src/web/staticres/common-module/order-list/css/order-list.css
  23. 14 4
      src/web/staticres/common-module/order-list/js/order-detail.js
  24. 5 48
      src/web/staticres/common-module/order-list/js/order-list-config.js
  25. 21 5
      src/web/staticres/common-module/order-list/js/order-list.js
  26. 8 0
      src/web/staticres/course/css/order_list.css
  27. 1 1
      src/web/staticres/electronic_invoice/js/invoice.js
  28. 8 1
      src/web/staticres/vipsubscribe/css/vip_order_detail.css
  29. 3 2
      src/web/templates/frontRouter/wx/bigmember/free/perfect_info.html
  30. 2 2
      src/web/templates/order/pc/paySuccess.html
  31. 35 7
      src/web/templates/pc/dataPack/createOrderForDataPackage.html
  32. 1 1
      src/web/templates/pc/dataPack/index.html
  33. 5 5
      src/web/templates/pc/dataPack/packDetail.html
  34. 5 4
      src/web/templates/pc/myOrder.html
  35. 1 3
      src/web/templates/pc/vip_orderDetail.html
  36. 1 1
      src/web/templates/weixin/commonPay/dataPack/orderDetail.html
  37. 2 2
      src/web/templates/weixin/commonPay/myOrder.html
  38. 5 1
      src/web/templates/weixin/commonPay/paySuccess.html
  39. 1 1
      src/web/templates/weixin/dataPack/index.html
  40. 10 6
      src/web/templates/weixin/dataPack/recharge.html
  41. 7 1
      src/web/templates/weixin/vipsubscribe/vip_order_detail.html

File diff suppressed because it is too large
+ 8 - 0
src/jfw/modules/app/src/web/staticres/jyapp/css/myorder/order_detail.css


File diff suppressed because it is too large
+ 8 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/vip_order_detail.css


+ 7 - 1
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_order_detail.js

@@ -29,7 +29,9 @@ $(function () {
                 if (r.data.order.billingMode!=0){
                     $(".productType").text("超级订阅(试用)");
                 }
-                $(".discountPrice").parent().hide();
+            }
+            if (r.data.order.discount_price==undefined) {
+            		$(".discountPrice").parent().hide();
             }
             //价格
             $(".price").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100));
@@ -49,6 +51,10 @@ $(function () {
             //订单条件
             if (r.data.order.filter) {
                 var filterObj = JSON.parse(r.data.order.filter);
+                // 活动角标
+                if (filterObj.badge) {
+                    $(".order-img").addClass('badge-' + filterObj.badge)
+                }
                 var newbuyset = filterObj.newBuyset;
                 var give_type = filterObj.give_type;//时间类型:1/天、2/月
                 var marketing=false;

+ 1 - 1
src/jfw/modules/app/src/web/templates/commonPay/dataPack/orderDetail.html

@@ -35,7 +35,7 @@
                         </div>
                         <div class="card-list">
                             <div class="j-card report-p">
-                                <span class="rp-left">
+                                <span class="rp-left" :class="'badge-' + (orderInfoFilter.badge || '')">
                                     <img class="card-l-pic" :src="orderInfo.headerImg">
                                 </span>
                                 <span class="rp-right">

+ 2 - 2
src/jfw/modules/app/src/web/templates/commonPay/myOrder.html

@@ -55,8 +55,8 @@
                                         </div>
                                     </div>
                                     <div class="order-item-content click-active" @click="toOrderDetail(item)">
-                                        <div class="img-container">
-                                            <img :src="item.contentImgUrl" />
+                                        <div class="img-container" :class="item|formatItemBadge">
+                                            <img :src="item.contentImgUrl + '?v=' + version" />
                                         </div>
                                         <div class="content-list" v-if="item.contentList">
                                             <div

+ 5 - 1
src/jfw/modules/app/src/web/templates/commonPay/paySuccess.html

@@ -131,7 +131,11 @@
             orderFilter = JSON.parse(orderFilter)
             // 数据包展示
             if (productType === 'dataPack') {
-                $('.info-box .info-item').text('数据流量包:+' + orderFilter.pNum)
+                var allTotal = orderFilter.pNum
+                if (orderFilter.give_cycle > 0) {
+                    allTotal = Number(allTotal) + Number(orderFilter.give_cycle)
+                }
+                $('.info-box .info-item').text('数据流量包:+' + allTotal)
             }
         }
 

+ 1 - 1
src/jfw/modules/app/src/web/templates/dataPack/index.html

@@ -89,7 +89,7 @@
                             </div>
                             <div class="l-left r-right">
                                 <p>{item.resourceType}</p>
-                                <p>{changeNum(item.number)}条</p>
+                                <p>{changeNum(item.number)}条<span style="color: #2abed1;" v-if="item.giveNumber"> 赠{changeNum(item.giveNumber)}条</span></p>
                                 <!-- <p>{item.validYear == -1 ? '-' : item.validYear + '年'}</p> -->
                                 <p>{changeDate(item.endTime)}</p>
                                 <p>{changeDate(item.createTime)}</p>

+ 10 - 6
src/jfw/modules/app/src/web/templates/dataPack/recharge.html

@@ -19,7 +19,11 @@
       <div class="j-container">
         <div class="j-main">
             <van-cell-group>
-              <van-cell center title="充值条数" is-link :value="charge.count + '条'" @click="chargeCount.pickerShow = true"></van-cell>
+              <van-cell center title="充值条数" is-link :value="charge.count + '条'" @click="chargeCount.pickerShow = true">
+                <template>
+                  <span>${charge.count}条<span style="color: #2abed1;" v-if="getNowPopSelectValue"> 赠${getNowPopSelectValue}条</span></span>
+                </template>
+              </van-cell>
               <van-cell center title="有效期" :value="charge.duration + '年'"></van-cell>
             </van-cell-group>
             <div class="spec-list-container">
@@ -32,11 +36,11 @@
                   @click="clickSpec(item)"
                   :key="index">
                   <span class="preferential-tag">限时4.5折</span>
-                  <div class="spec-i-label">${ item.label }</div>                    
+                  <div class="spec-i-label">${ item.label }</div>
                   <div class="spec-i-sub">
                     <div class="spec-i-text del">${ item.before }元/条</div>
                     <div class="spec-i-text">${ item.price }元/条</div>
-                  </div>                    
+                  </div>
                 </div>
               </div>
               <div class="spec-question">
@@ -74,15 +78,15 @@
                 <div class="select-item"
                   v-for="(item, index) in chargeCount.infoList"
                   :key="index"
-                  @click="chargeCount.value = item.value"
+                  @click="selectPop(item)"
                   :class="{ active: chargeCount.value === item.value }">
-                  <span class="item-label">${ item.label }</span>
+                  <span class="item-label">${ item.label }<span v-if="(specActive == 1 ? item.senior_num : item.normal_num) > 0"> 赠${specActive == 1 ? item.senior_num : item.normal_num}条</span></span>
                   <span class="j-icon base-icon icon-tick"></span>
                 </div>
               </div>
             </div>
             <div class="j-button-group">
-              <button class="j-button-confirm" @click="charge.count = chargeCount.value;chargeCount.pickerShow = false">确定</button>
+              <button class="j-button-confirm" @click="submitCountPopup">确定</button>
             </div>
           </div>
         </van-popup>

+ 4 - 3
src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info.html

@@ -543,7 +543,8 @@
         company_size: false,
         workScope: true,
         partnerNeeds: true,
-        agree: true
+        agree: true,
+        branch: true
       },
       jobJson: [
         '总裁', 
@@ -613,7 +614,7 @@
         }
 
         if (source == 'bid_document_Introduction_page') {
-          var hideType = ['email', 'class', 'companyType', 'workScope', 'partnerNeeds', 'agree', 'position']
+          var hideType = ['email', 'class', 'companyType', 'workScope', 'partnerNeeds', 'agree']
           for (var k in this.moduleShow) {
             if (hideType.indexOf(k) !== -1)
               this.moduleShow[k] = false
@@ -714,7 +715,7 @@
         }
         var zc = this.infoMap.position.indexOf('总裁') > -1
         var zjl = this.infoMap.position.indexOf('总经理') > -1
-        return !(zc || zjl) && this.infoMap.position
+        return Boolean(!(zc || zjl) && this.infoMap.position && this.moduleShow['position'])
       }
     },
     methods: {

+ 2 - 1
src/jfw/modules/subscribepay/src/config.json

@@ -80,5 +80,6 @@
   "profitDescript": "您的好友已通过您的分享购买%s成功!您已获得%s元佣金!",
   "termValidity": 60,
   "accountMergeOnline":"2021-04-07 12:00:00",
-  "optimalTime":"2021-08-03 12:00:00"
+  "optimalTime":"2021-08-03 12:00:00",
+  "activityName":"1111"
 }

+ 1 - 0
src/jfw/modules/subscribepay/src/config/config.go

@@ -58,6 +58,7 @@ type config struct {
 	ProfitDescript     string
 	AccountMergeOnline string
 	OptimalTime        string
+	ActivityName       string
 }
 type mgoConf struct {
 	Address           string

+ 7 - 1
src/jfw/modules/subscribepay/src/coupon.json

@@ -11,7 +11,13 @@
     "超级订阅1个月":"1012",
     "超级订阅3个月":"1013",
     "超级订阅12个月":"1014",
-    "数据流量包": "1121"
+    "数据流量包": "112",
+    "senior_1000":"1122",
+    "senior_3000":"1123",
+    "senior_5000":"1124",
+    "normal_1000":"1125",
+    "normal_3000":"1126",
+    "normal_5000":"1127"
   },
   "giveinfo":"http://127.0.0.1:8888/giveInfo"
 }

+ 4 - 1
src/jfw/modules/subscribepay/src/entity/dataExportPackApi.go

@@ -121,7 +121,6 @@ func perPackRecharge(userId string, pageNum, pageSize int) (int, []map[string]in
 		if itemData == nil || len(*itemData) == 0 {
 			continue
 		}
-
 		parsMap := map[string]interface{}{
 			"resourceType": (*itemData)["resourceType"],
 			"number":       (*itemData)["number"],
@@ -139,6 +138,10 @@ func perPackRecharge(userId string, pageNum, pageSize int) (int, []map[string]in
 			} else if createtimeParseErr == nil {
 				parsMap["endTime"] = createTime.AddDate(orderDetail.ValidYear, 0, 0).Unix()
 			}
+			if orderDetail.GiveCycle > 0 && orderDetail.DisCountId > 0 { //满赠
+				parsMap["number"] = orderDetail.PackNum - orderDetail.GiveCycle
+				parsMap["giveNumber"] = orderDetail.GiveCycle
+			}
 		}
 
 		returnMapArr = append(returnMapArr, parsMap)

+ 12 - 4
src/jfw/modules/subscribepay/src/entity/dataExportPackStruct.go

@@ -25,10 +25,14 @@ type dataExportPackStruct struct{}
 var JyDataExportPack dataExportPackStruct
 
 type PackDetail struct {
-	PackType  int `json:"pType"`     //数据包类型 1标准,2高级
-	PackNum   int `json:"pNum"`      //数据包数量
-	ValidYear int `json:"validYear"` //有效年份 「账户合并过来的资源为-1」
-	Price     int `json:"price"`     //数据包价格 「账户合并过来的资源为-1」
+	PackType      int    `json:"pType"`                    //数据包类型 1标准,2高级
+	PackNum       int    `json:"pNum"`                     //数据包数量
+	ValidYear     int    `json:"validYear"`                //有效年份 「账户合并过来的资源为-1」
+	Price         int    `json:"price"`                    //数据包价格 「账户合并过来的资源为-1」
+	GiveCycle     int    `json:"give_cycle,omitempty"`     //赠送条数
+	OriginalPrice int    `json:"original_price,omitempty"` //双十一活动原价价格
+	DisCountId    int    `json:"discountId,omitempty"`     //赠送的id
+	Badge         string `json:"badge,omitempty"`          //活动标识
 }
 type PackDetailReturn struct { //因账户合并,中台返回的字段会有差异
 	*PackDetail
@@ -81,6 +85,9 @@ func (this *dataExportPackStruct) PayCallBack(param *CallBackParam) bool {
 					log.Printf("获取用户%s已购买数据包内容异常:%v", userId, err)
 					return false
 				}
+				if packDetail.GiveCycle > 0 { //赠品
+					packDetail.PackNum += packDetail.GiveCycle
+				}
 				//卡卷使用
 				userLotteryId := qutil.ObjToString((*orderData)["d_relation_id"])
 				if userLotteryId != "" {
@@ -136,6 +143,7 @@ func (this *dataExportPackStruct) GetPackPriceList() (interface{}, error) {
 // GetPackDetailById 中台交互-获取单个数据流量包价格
 func (this *dataExportPackStruct) GetPackDetailById(packId string) (*PackDetail, error) {
 	packDetail, ok := packPriceMap[packId]
+	log.Println(packPriceMap)
 	if !ok {
 		return nil, fmt.Errorf("未知规格数据包")
 	}

+ 2 - 1
src/jfw/modules/subscribepay/src/entity/subscribeVip.go

@@ -89,6 +89,7 @@ type VipSimpleMsg struct {
 	OriginalPrice    int                      `json:"original_price,omitempty"` //双十一活动原价价格
 	GiveType         int                      `json:"give_type,omitempty"`      //赠送周期 类型 1天 2月
 	DisCountId       int                      `json:"discountId,omitempty"`     //赠送的id
+	Badge            string                   `json:"badge,omitempty"`          //活动标识
 }
 
 //购买内容
@@ -540,7 +541,7 @@ func (this *vipSubscribeStruct) GetSubVipPriceByBuySet(buySet *SubvipBuySet, cou
 		pCount := buySet.AreaCount            //省份数量
 		industryNum := buySet.BuyerclassCount //行业数量
 		newCityArr := []int{}                 //选择城市数量 防止操作cityCountArr 影响原数据
-		if buySet.Upgrade != 1 { //未升级超级订阅计价规则
+		if buySet.Upgrade != 1 {              //未升级超级订阅计价规则
 			//城市选择过多时,转为省份
 			for _, cityCount := range buySet.NewCitys {
 				if cityCount > SubVipPrice.Old.CityMaxCount {

+ 112 - 8
src/jfw/modules/subscribepay/src/service/dataexportPack.go

@@ -6,13 +6,17 @@ import (
 	"encoding/json"
 	"entity"
 	"fmt"
+	"io/ioutil"
 	"log"
 	"math"
+	"net/http"
 	"pay"
 	qutil "qfw/util"
 	"qfw/util/dataexport"
 	"qfw/util/jy"
 	"qfw/util/redis"
+	"strconv"
+	"strings"
 	"time"
 	"util"
 
@@ -36,6 +40,50 @@ type DataExportPack struct {
 // PackGoodsList 数据包规格及价格列表
 func (this *DataExportPack) PackGoodsList() {
 	packList, _ := entity.JyDataExportPack.GetPackPriceList()
+	userId, _ := this.GetSession("userId").(string)
+	if userId != "" {
+		getUrl := fmt.Sprintf("%s?useProduct=%s&appId=%s&useProductType=%v&userId=%s", config.CouponConfig.Giveinfo, config.CouponConfig.Products["数据流量包"], config.CouponConfig.AppId, 0, userId)
+		log.Println(getUrl)
+		res, err := http.Get(getUrl)
+		if err != nil {
+			log.Println(err.Error())
+		}
+		defer res.Body.Close()
+		bs, _ := ioutil.ReadAll(res.Body)
+		log.Println("res:", string(bs))
+		resMap := map[string]interface{}{}
+		err = json.Unmarshal([]byte(bs), &resMap)
+		if err != nil {
+			log.Println("json.unmarshal err", resMap)
+		} else {
+			proDuctM := map[string]string{} //产品码对应关系
+			for k, v := range config.CouponConfig.Products {
+				proDuctM[v] = k
+			}
+			pl, _ := packList.(map[string]interface{})
+			marr := []map[string]interface{}{}
+			if qutil.IntAll(resMap["Code"]) == 1 {
+				for _, vv := range config.ExConf.Packs_showList {
+					m := map[string]interface{}{
+						"packNum":         vv.PackNum,
+						"normal_discount": vv.Normal_discount,
+						"senior_discount": vv.Senior_discount,
+					}
+					if resMap["Data"] != nil {
+						for _, v := range qutil.ObjArrToMapArr(resMap["Data"].([]interface{})) {
+							product := strconv.Itoa(qutil.IntAll(v["ProductCode"]))
+							if strings.Contains(proDuctM[product], strconv.Itoa(vv.PackNum)) {
+								m[fmt.Sprintf("%v_num", strings.Split(proDuctM[product], "_")[0])] = v["Time"]
+							}
+						}
+					}
+					marr = append(marr, m)
+				}
+				pl["packs_showList"] = marr
+				packList = pl
+			}
+		}
+	}
 	this.ServeJson(packList)
 }
 
@@ -46,11 +94,10 @@ func (this *DataExportPack) PackGoodsList() {
 func (this *DataExportPack) CreateOrder() {
 	userId, _ := this.GetSession("userId").(string)
 	rData, errMsg := func() (interface{}, error) {
-		packId := this.GetString("packId")   //
+		packId := this.GetString("packId") //
 		// 获取用户分销口令
 		disWordStr := ""
 		// 查询用户携带的分销口令
-		log.Println(userId,"userId")
 		userfilter, ok := util.MQFW.FindById("user", userId, "")
 		if ok && userfilter != nil {
 			startTime := qutil.Int64All((*userfilter)["startTime"])
@@ -62,10 +109,11 @@ func (this *DataExportPack) CreateOrder() {
 				}
 			}
 		}
-		log.Printf("user====",userfilter)
 
 		//根据id查询流量包价格
 		packDetail, err := entity.JyDataExportPack.GetPackDetailById(packId)
+		packDetail.GiveCycle = 0
+		packDetail.DisCountId = 0
 		if err != nil {
 			return nil, err
 		}
@@ -73,9 +121,15 @@ func (this *DataExportPack) CreateOrder() {
 		orderMoney, discountPrice := packDetail.Price, 0 //订单金额,卡券折扣金额
 		var userLotteryId string                         //用户卡券id
 		var discount float64
+		useProduct, _ := this.GetInteger("useProduct")
+		discountId, _ := this.GetInteger("discountId") //赠品相关
 		if lotteryId := this.GetString("lotteryId"); lotteryId != "" {
+			products := config.CouponConfig.Products["数据流量包"]
+			if useProduct > 0 {
+				products = strconv.Itoa(useProduct)
+			}
 			var fullPrice, reducePrice int
-			fullPrice, reducePrice, discount, userLotteryId = util.GetCouponInfo(userId, lotteryId, config.CouponConfig.Products["数据流量包"])
+			fullPrice, reducePrice, discount, userLotteryId = util.GetCouponInfo(userId, lotteryId, products)
 			if discount == 100 {
 				if fullPrice <= orderMoney {
 					orderMoney = orderMoney - reducePrice
@@ -89,6 +143,18 @@ func (this *DataExportPack) CreateOrder() {
 			}
 			log.Printf("用户%s 购买数据流量包 使用卡券:%s 折扣金额:%d", userId, userLotteryId, discountPrice)
 		}
+		//赠品相关
+		useProduct, _ = strconv.Atoi(config.CouponConfig.Products[packId])
+		giveArr := GiveInfo(userId, useProduct, 0, 0) //获取满赠时长
+		if giveArr != nil && len(giveArr) > 0 {
+			packDetail.GiveCycle = qutil.IntAll(giveArr[0]["Time"])
+			packDetail.DisCountId = qutil.IntAll(giveArr[0]["DiscountId"])
+			discountId = qutil.IntAll(giveArr[0]["DiscountId"])
+			if strings.Contains(qutil.ObjToString(giveArr[0]["ActivityName"]), config.Config.ActivityName) {
+				packDetail.Badge = "202111" //双十一角标展示
+			}
+		}
+		//
 		orderCode := pay.GetOrderCode()
 		nickname, _ := this.GetSession("s_nickname").(string)
 		openId, _ := this.GetSession("s_m_openid").(string)
@@ -97,6 +163,7 @@ func (this *DataExportPack) CreateOrder() {
 		if err != nil {
 			return nil, fmt.Errorf("数据异常")
 		}
+		log.Println("---?>", string(filter))
 		orderid := util.Mysql.Insert("dataexport_order", map[string]interface{}{
 			"order_money":    orderMoney,
 			"order_status":   0,
@@ -118,13 +185,18 @@ func (this *DataExportPack) CreateOrder() {
 			return nil, fmt.Errorf("创建订单异常")
 		}
 		//绑定核销卡券
-		if userLotteryId != "" && this.GetString("lotteryId") != "" {
-			go func(userId, userLotteryId, orderCode string) {
+		if (userLotteryId != "" && this.GetString("lotteryId") != "") || (discountId > 0) {
+			go func(userId, userLotteryId, orderCode, discountIdStr string) {
 				phone, nickname := util.GetMyPhoneAndName(userId)
-				if !util.UpdateCouponState(userId, userLotteryId, nickname, phone, orderCode, "数据流量包", "", 3, 0) {
+				if !util.UpdateCouponState(userId, userLotteryId, nickname, phone, orderCode, "数据流量包", discountIdStr, 3, 0) {
 					log.Println(fmt.Sprintf("单号%s-绑定失败-卡卷%s", orderCode, userLotteryId))
 				}
-			}(userId, userLotteryId, orderCode)
+				if discountId > 0 {
+					if ulid := util.FindUserLotteryId(userId, orderid, discountId); ulid != 0 {
+						userLotteryId = strconv.Itoa(ulid)
+					}
+				}
+			}(userId, userLotteryId, orderCode, strconv.Itoa(discountId))
 		}
 		return map[string]interface{}{
 			"orderCode": orderCode,
@@ -395,3 +467,35 @@ func (this *DataExportPack) SendExportMail() {
 	}
 	this.ServeJson(NewResult(rData, errMsg))
 }
+
+/*
+	useProduct :产品类型
+	useProductType:商品类型 0普通的 1线上课程
+	discountId:活动赠品对应标识
+return:
+	timeNum:赠送数量
+	查看赠品
+*/
+func GiveInfo(userid string, useProduct, useProductType, discountId int) []map[string]interface{} {
+	getUrl := fmt.Sprintf("%s?useProduct=%s&appId=%s&useProductType=%v&userId=%s", config.CouponConfig.Giveinfo, strconv.Itoa(useProduct), config.CouponConfig.AppId, useProductType, userid)
+	log.Println(getUrl)
+	res, err := http.Get(getUrl)
+	if err != nil {
+		log.Println(err.Error())
+	}
+	defer res.Body.Close()
+	bs, _ := ioutil.ReadAll(res.Body)
+	log.Println("res:", string(bs))
+	resMap := map[string]interface{}{}
+	err = json.Unmarshal([]byte(bs), &resMap)
+	if err != nil {
+		log.Println("json.unmarshal err", resMap)
+	} else {
+		if qutil.IntAll(resMap["Code"]) == 1 {
+			if data, _ := resMap["Data"].([]interface{}); len(data) > 0 && data != nil {
+				return qutil.ObjArrToMapArr(data)
+			}
+		}
+	}
+	return nil
+}

+ 8 - 2
src/jfw/modules/subscribepay/src/service/vipSubscribePay.go

@@ -193,10 +193,13 @@ func (this *SubVipPayOrder) CreateOrder() {
 		discountId, _ := this.GetInteger("discountId")
 		if discountId > 0 {
 			isgive = true
-			timeNum, timeType := util.GiveInfo(userId, useProduct, 0, discountId) //获取满赠时长
+			timeNum, timeType, activityName := util.GiveInfo(userId, useProduct, 0, discountId) //获取满赠时长
 			filter.GiveCycle = timeNum
 			filter.GiveType = timeType
 			filter.DisCountId = discountId
+			if strings.Contains(activityName, config.Config.ActivityName) {
+				filter.Badge = "202111" //双十一角标展示
+			}
 		}
 		filterStr, _ := json.Marshal(filter)
 		insertMap := map[string]interface{}{
@@ -351,10 +354,13 @@ func (this *SubVipPayOrder) Renew() {
 		discountId, _ := this.GetInteger("discountId")
 		useProduct, _ := this.GetInteger("useProduct")
 		if discountId > 0 && useProduct > 0 {
-			timeNum, timeType := util.GiveInfo(userId, useProduct, 0, discountId) //获取满赠时长
+			timeNum, timeType, activityName := util.GiveInfo(userId, useProduct, 0, discountId) //获取满赠时长
 			filter.GiveCycle = timeNum
 			filter.GiveType = timeType
 			filter.DisCountId = discountId
+			if strings.Contains(activityName, config.Config.ActivityName) {
+				filter.Badge = "202111" //双十一角标展示
+			}
 		}
 		mog_id := entity.JyVipSubStruct.SaveSelectLog(userId, openId, &filter)
 		if mog_id == "" {

+ 3 - 1
src/jfw/modules/subscribepay/src/util/coupon.go

@@ -129,9 +129,10 @@ func UpdateCouponState(userId, userLotteryId, nickName, phone, orderCode, usePro
 return:
 	timeNum:赠送数量
 	timeType:时间类型:1/天、2/月
+	activityName:活动名称
 	查看赠品天数接口
 */
-func GiveInfo(userid string, useProduct, useProductType, discountId int) (timeNum, timeType int) {
+func GiveInfo(userid string, useProduct, useProductType, discountId int) (timeNum, timeType int, activityName string) {
 	getUrl := fmt.Sprintf("%s?useProduct=%s&appId=%s&useProductType=%v&userId=%s", config.CouponConfig.Giveinfo, strconv.Itoa(useProduct), config.CouponConfig.AppId, useProductType, userid)
 	log.Println(getUrl)
 	res, err := http.Get(getUrl)
@@ -153,6 +154,7 @@ func GiveInfo(userid string, useProduct, useProductType, discountId int) (timeNu
 					if qutil.IntAll(v["DiscountId"]) == discountId {
 						timeNum = qutil.IntAll(v["Time"])
 						timeType = qutil.IntAll(v["TimeType"])
+						activityName = qutil.ObjToString(v["ActivityName"])
 					}
 				}
 			}

+ 2 - 1
src/web/staticres/common-module/data-pack/js/index.js

@@ -68,7 +68,8 @@ var vm = new Vue({
               number: v.number,
               validYear: v.validYear,
               endTime: v.endTime,
-              createTime: v.createTime
+              createTime: v.createTime,
+              giveNumber: v.giveNumber
             }
           }))
         } else {

+ 21 - 4
src/web/staticres/common-module/data-pack/js/recharge.js

@@ -42,6 +42,7 @@ var vm = new Vue({
         }
       ],
       chargeCount: {
+        cache: {},
         value: 1000, // 选择器暂存数据
         pickerShow: false,
         infoList: [
@@ -68,6 +69,7 @@ var vm = new Vue({
       dialog: {
         question: false
       },
+      cachePopSelect: {},
       bottomConf: {
         type: 'dataPack',
         initPrice: 0,
@@ -89,6 +91,9 @@ var vm = new Vue({
     }
   },
   computed: {
+    getNowPopSelectValue: function () {
+      return (this.specActive == 1 ? this.cachePopSelect.senior_num : this.cachePopSelect.normal_num)
+    },
     // 手机号校验是否通过
     validatorPhonePass: function () {
       var phone = this.userInfo.phone
@@ -185,7 +190,7 @@ var vm = new Vue({
 
       // 有效时间
       this.charge.duration = info.packs_validityYear
-      
+
       var list = []
       if (Array.isArray(info.packs_showList)) {
         info.packs_showList.forEach(function (item) {
@@ -193,18 +198,21 @@ var vm = new Vue({
             label: item.packNum + '条',
             value: item.packNum,
             normal_discount: item.normal_discount,
-            senior_discount: item.senior_discount
+            senior_discount: item.senior_discount,
+            normal_num: item.normal_num || 0,
+            senior_num: item.senior_num || 0,
           })
         })
         this.chargeCount.infoList = list
         this.chargeCount.value = this.chargeCount.infoList[0].value
+        this.cachePopSelect = this.chargeCount.infoList[0]
         this.charge.count = this.chargeCount.value
       }
     },
     // 计算卡片展示金额
     sortPrice: function () {
       var info = this.priceInfo
-      
+
       // 获取被选中的条数info
       var countItem = this.getCountItem()
 
@@ -264,11 +272,20 @@ var vm = new Vue({
       })
       return t
     },
+    selectPop: function (item) {
+      this.chargeCount.cache = item
+      this.chargeCount.value = item.value
+    },
     chargeCountPopupClosed: function () {
       this.chargeCount.value = this.charge.count
       this.sortPrice()
       this.calcPrice()
     },
+    submitCountPopup: function () {
+      this.cachePopSelect = this.chargeCount.cache
+      this.charge.count = this.chargeCount.value;
+      this.chargeCount.pickerShow = false
+    },
     clickSpec: function (item) {
       this.specActive = item.id
       this.sortPrice()
@@ -395,4 +412,4 @@ var vm = new Vue({
       this.$refs.couponRef.saveSelectedCoupon()
     }
   }
-})
+})

File diff suppressed because it is too large
+ 8 - 0
src/web/staticres/common-module/order-list/css/order-detail.css


File diff suppressed because it is too large
+ 11 - 0
src/web/staticres/common-module/order-list/css/order-list.css


+ 14 - 4
src/web/staticres/common-module/order-list/js/order-detail.js

@@ -85,6 +85,7 @@ var vm = new Vue({
         wx_pc: '微信支付',
         ali_pc: '支付宝支付'
       },
+      orderInfoFilter: {},
       // 页面内容展示数组
       orderInfo: {
         // 订单状态: 0:待支付 1:已完成 -2:已取消 -3:已退款
@@ -225,10 +226,15 @@ var vm = new Vue({
       }
 
       // 如果是可再次购买的产品,则显示再次购买
-      if (this.prodConf.canBuyAgain.indexOf(this.orderInfo.productType)) {
+      if (this.prodConf.canBuyAgain.indexOf(this.orderInfo.productType) && order.pay_money > 0) {
         this.orderStateMap[1].bottomButtonShow.buyAgain = true
       }
 
+      // 开发票按钮展示逻辑
+      if (order.pay_money <= 0) {
+        this.orderStateMap[1].bottomButtonShow.invoke = false
+      }
+
       this.orderInfo.productInfoList = this.getProductInfoList(info)
       this.orderInfo.orderInfoList = this.getOrderInfoListList(info)
     },
@@ -322,7 +328,7 @@ var vm = new Vue({
         {
           label: '实付金额',
           split: ':',
-          text: order.pay_money ? '¥' + this.moneyFormat(order.pay_money) : ''
+          text: (order.pay_money==0) ? '¥' + this.moneyFormat(order.pay_money) : ''
         }
       ]
 
@@ -440,16 +446,20 @@ var vm = new Vue({
     },
     getDataPackInfo: function (order) {
       var filterInfo = JSON.parse(order.filter)
+      this.orderInfoFilter = filterInfo
       var specMap = {
         1: '标准字段包',
         2: '高级字段包'
       }
-
+	  var payNum = filterInfo.pNum + '条'
+	  if(filterInfo.give_cycle){
+		payNum += '<span class="highlight-text">&nbsp赠' +	filterInfo.give_cycle + '条</span>'
+	  }
       return [
         {
           label: '充值条数',
           split: ':',
-          text: filterInfo.pNum + '条'
+          text: payNum
         },
         {
           label: '有效期',

+ 5 - 48
src/web/staticres/common-module/order-list/js/order-list-config.js

@@ -1,6 +1,7 @@
 // 订单列表和订单详情共用的文件
 
 var assetsConf = {
+  version: pageInfo.version,
   platform: pageInfo.platform,
   // 产品集合
   productionTypeList: [
@@ -39,22 +40,9 @@ var assetsConf = {
     '剑鱼币',
     '数据流量包',
   ],
-  // 静态资源链接Key的集合
-  // 页面初始化时,会对该集合中的imgMap字段添加版本号
-  assetsKeys: [
-    'invokeLink',
-    'dataExportLink',
-    'vipSubLink',
-    'courseLink',
-    'dataReportLink',
-    'entnicheLink',
-    'bigMemberLink',
-    'bigMemberSupplyPackLink',
-    'bigMemberSubAccountLink',
-    'zbFileAnalysisLink',
-    'jianyuCoinLink',
-    'dataPackLink'
-  ],
+  init: function () {
+    // this.getPlatform()
+  },
   getPlatform: function () {
     var platform = 'app'
     try {
@@ -63,36 +51,6 @@ var assetsConf = {
     this.platform = platform
     console.log('platform: ' + this.platform)
   },
-  // 根据assetsKeys动态增加静态资源(图片)版本号
-  addVersion: function () {
-    var _this = this
-    var version = ''
-    var host = ''
-    if (pageInfo && pageInfo.version) {
-      version = pageInfo.version
-    }
-
-    if (!version) return
-
-    // 循环添加版本号
-    this.assetsKeys.forEach(function (keys) {
-      if (_this[keys] && _this[keys].imgMap) {
-        // 保证imgMap不为空
-        var imgMap = _this[keys].imgMap
-        if (imgMap) {
-          // 循环imgMap
-          for (var key in imgMap) {
-            if (!imgMap[key]) continue
-            // console.log(imgMap[key])
-            for (var p in imgMap[key]) {
-              if (!imgMap[key][p]) continue
-              imgMap[key][p] = host + imgMap[key][p] + '?v=' + version
-            }
-          }
-        }
-      }
-    })
-  },
   // 开发票
   invokeLink: {
     invoke: { // 开发票
@@ -356,5 +314,4 @@ var assetsConf = {
   }
 }
 
-// assetsConf.getPlatform() 
-assetsConf.addVersion() 
+assetsConf.init() 

+ 21 - 5
src/web/staticres/common-module/order-list/js/order-list.js

@@ -2,6 +2,7 @@ var vm = new Vue({
   delimiters: ['${', '}'],
   el: '#app',
   data: {
+    version: assetsConf.version,
     platform: assetsConf.platform,
     sessStorageKey: '$data-order_list',
     tabActiveName: 'payOrderAll',
@@ -143,6 +144,16 @@ var vm = new Vue({
     this.reStoreState()
     utils.iosBackRefresh()
   },
+  filters: {
+    formatItemBadge: function (value) {
+      var tempV = 'badge-'
+      try {
+        var tempN = JSON.parse(value.filter)
+        tempV += (tempN.badge || '')
+      } catch (e) {}
+      return tempV
+    }
+  },
   methods: {
     // 设置页面url参数
     setUrlQuery: function () {
@@ -751,7 +762,7 @@ var vm = new Vue({
       } else if (orderStatus === 1) {
         // 已完成订单
         // 再次购买判断
-        if (canBuyAgain.indexOf(productType) !== -1) {
+        if (canBuyAgain.indexOf(productType) !== -1 && order.pay_money > 0) {
           state.bugAgainShow = true
           state.bugAgainText = '再次购买'
         }
@@ -769,7 +780,7 @@ var vm = new Vue({
       } else if (orderStatus === -2 || orderStatus === -3) {
         // 已取消或者已删除订单
         // 再次购买判断
-        if (canBuyAgain.indexOf(productType) !== -1) {
+        if (canBuyAgain.indexOf(productType) !== -1 && order.pay_money > 0) {
           state.bugAgainShow = true
         }
       }
@@ -1328,6 +1339,7 @@ var vm = new Vue({
         }
         giveHTML = `&nbsp;+&nbsp;<span class="highlight-text">赠送${give}</span>`
       }
+    	console.log(info)
       // 计算有效日期
       var dateText = ''
       if (order.order_status === 1) {
@@ -1614,7 +1626,7 @@ var vm = new Vue({
             effectiveduration_vip = month + "个月";
           }
           //试用用户生成订单 周期
-          if (effectiveduration_vip === "") {
+          //if (effectiveduration_vip === "") {
             if (cycleunit_vip === 1) {
               effectiveduration_vip = cyclecount_vip + "年";
             } else if (cycleunit_vip === 2) {
@@ -1624,7 +1636,7 @@ var vm = new Vue({
             } else if (cycleunit_vip === 4) {
               effectiveduration_vip = cyclecount_vip + "季";
             }
-          }
+          //}
         } else {
           if (cycleunit_vip === 1) {
             effectiveduration_vip = cyclecount_vip + "年";
@@ -1964,6 +1976,10 @@ var vm = new Vue({
     // 数据包订单卡片信息整理
     getDataPackInfo: function (order) {
       var filterInfo = JSON.parse(order.filter)
+    	  var payNum = filterInfo.pNum + '条'
+	  if(filterInfo.give_cycle){
+		payNum += '<span class="highlight-text">&nbsp赠' +	filterInfo.give_cycle + '条</span>'
+	  }
       var prodType = {
         label: '产品类型',
         split: ':',
@@ -1972,7 +1988,7 @@ var vm = new Vue({
       var buyCount = {
         label: '充值条数',
         split: ':',
-        text: filterInfo.pNum + '条'
+        text: payNum
       }
       var date = {
         label: '使用有效日期',

File diff suppressed because it is too large
+ 8 - 0
src/web/staticres/course/css/order_list.css


+ 1 - 1
src/web/staticres/electronic_invoice/js/invoice.js

@@ -177,7 +177,7 @@ $(function () {
             success: function (data) {
             }
         });
-		window.location.replace("/front/order/check_invoice/"+order_code);s
+		window.location.replace("/front/order/check_invoice/"+order_code);
     })
     // 取消
     $('.cancel_btn').click(function(){

File diff suppressed because it is too large
+ 8 - 1
src/web/staticres/vipsubscribe/css/vip_order_detail.css


+ 3 - 2
src/web/templates/frontRouter/wx/bigmember/free/perfect_info.html

@@ -555,6 +555,7 @@
         workScope: true,
         partnerNeeds: true,
         agree: true,
+        branch: true
       },
       jobJson: [
         '总裁', 
@@ -645,7 +646,7 @@
           document.title = '完善信息'
         }
         if (source == 'bid_document_Introduction_page') {
-          var hideType = ['email', 'class', 'companyType', 'workScope', 'partnerNeeds', 'agree', 'position']
+          var hideType = ['email', 'class', 'companyType', 'workScope', 'partnerNeeds', 'agree']
           for (var k in this.moduleShow) {
             if (hideType.indexOf(k) !== -1)
               this.moduleShow[k] = false
@@ -743,7 +744,7 @@
         }
         var zc = this.infoMap.position.indexOf('总裁') > -1
         var zjl = this.infoMap.position.indexOf('总经理') > -1
-        return !(zc || zjl) && this.infoMap.position
+        return Boolean(!(zc || zjl) && this.infoMap.position && this.moduleShow['position'])
       }
     },
     methods: {

+ 2 - 2
src/web/templates/order/pc/paySuccess.html

@@ -43,8 +43,8 @@
                 <p id="point"><img src ="/order/image/jianyuIcon.png" alt="" style="width:24px !important;height:24px !important"><div class="point"></div></p>
             {{else if eq .T.orderType "datapackage"}}
                 <p style="margin-top: 6px;"> 充值成功!</p>
-                <p class="datapackage-money-tip-group">¥<span>-</span></p>
-                <p class="datapackage-tip-group">数据流量包+<span>-</span>条</p>
+                <p class="datapackage-money-tip-group">¥<span></span></p>
+                <p class="datapackage-tip-group">数据流量包+<span></span>条</p>
             {{else}}
                 <p>支付成功!</p>
             {{end}}

+ 35 - 7
src/web/templates/pc/dataPack/createOrderForDataPackage.html

@@ -71,7 +71,7 @@
             <div class="title">充值条数</div>
             <div class="inner clearfix switch-dataType" id="total-list">
                 <div class="gr no-select" id="total-item-template" style="display: none;" data-total="1000">
-                    <p>1000条</p>
+                    <p><span name="count">1000</span><span style="color:#FF3A20;display: none;"> 赠<span name="give">/</span>条</span></p>
                 </div>
             </div>
         </div>
@@ -291,7 +291,13 @@
                     tempDom.attr('data-total', v.packNum)
                     tempDom.attr('data-senior', v.senior_discount)
                     tempDom.attr('data-normal', v.normal_discount)
-                    tempDom.find('p').text(v.packNum + '条')
+                    tempDom.attr('data-senior-num', v.senior_num || 0)
+                    tempDom.attr('data-normal-num', v.normal_num || 0)
+                    var tempNum =  v.senior_num || v.normal_num || 0
+                    tempDom.find('p span[name="count"]').text(v.packNum)
+                    if (tempNum > 0) {
+                        tempDom.find('p span[name="give"]').text(tempNum).parent().show()
+                    }
                     tempDom.css('display', 'initial')
                     tempDom.removeAttr('id')
                     parentDom.append(tempDom)
@@ -346,7 +352,9 @@
                 success: function (res) {
                     if (res.error_msg === "") {
                         history.replaceState({}, '', '/front/dataPack/packDetail?order_code=' + res.data.orderCode);
-                        window.location.href = "/front/datapackage/orderPay/" + res.data.orderCode + "?total=" + getNowSelect().total;
+                        var nowSelect = getNowSelect()
+                        var allTotal = Number(nowSelect.total) + Number(nowSelect.level === 1 ? nowSelect.normal_num : nowSelect.senior_num)
+                        window.location.href = "/front/datapackage/orderPay/" + res.data.orderCode + "?total=" + allTotal;
                     } else {
                         canpay = true;
                         $.confirm({
@@ -387,11 +395,14 @@
                 ChangePayMoney()
             }
         })
-        function getNowSelect () {
+        function getNowSelect (el) {
+            var tempNode = el || $('.no-select.active[data-total]')
             return {
-                total: $('.no-select.active[data-total]').attr('data-total'),
-                senior: $('.no-select.active[data-total]').attr('data-senior'),
-                normal: $('.no-select.active[data-total]').attr('data-normal'),
+                total: tempNode.attr('data-total'),
+                senior: tempNode.attr('data-senior'),
+                normal: tempNode.attr('data-normal'),
+                normal_num: tempNode.attr('data-normal-num') || 0,
+                senior_num: tempNode.attr('data-senior-num') || 0,
                 year: $('.no-select.active[data-year]').attr('data-year'),
                 level: Number($('.no-select.active[data-level]').attr('data-level')),
             }
@@ -425,12 +436,29 @@
             return parseInt(Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m).toString() * 100) / Math.pow(10, 2);
         }
 
+        function changeGiveNum () {
+            $("#total-list .no-select").each(function () {
+                var getNowValue = getNowSelect($(this))
+                var dataType = Number(getNowValue.level)
+                var giveNum = Number(dataType === 1 ? getNowValue.normal_num : getNowValue.senior_num)
+                var giveNode = $(this).find('span[name="give"]')
+                if (giveNum > 0) {
+                    giveNode.text(giveNum).parent().show()
+                } else {
+                    giveNode.parent().hide()
+                }
+
+            })
+        }
+
         function ChangePayMoney() {
+            changeGiveNum()
             var shouldPay = 0;
             var beforePay = 0;
             var getNowValue = getNowSelect()
             var dataType = Number(getNowValue.level)
             var msgCount = Number(getNowValue.total)
+
             if (dataType === 1) {
                 beforePay = accMul(unitPrice_normal, msgCount)
                 shouldPay = accMul(beforePay, discount) * getNowValue.normal

+ 1 - 1
src/web/templates/pc/dataPack/index.html

@@ -97,7 +97,7 @@
                                     <el-table-column prop="resourceType" label="数据规格" align="center"></el-table-column>
                                     <el-table-column  label="充值条数(条)" align="center">
                                         <template slot-scope="scope">
-                                            <span>{changeNum(scope.row.number)}</span>
+                                            <span>{changeNum(scope.row.number)}</span><span v-if="scope.row.giveNumber" style="color: rgb(44, 183, 202)"> 赠{changeNum(scope.row.giveNumber)}条</span>
                                         </template>
                                     </el-table-column>
                                     <!-- <el-table-column label="使用有效期" align="center">

+ 5 - 5
src/web/templates/pc/dataPack/packDetail.html

@@ -82,7 +82,7 @@
                 <div class="clearfix list_tbody">
                     <div class="filter_data">
                         <p><span class="dq_text">产品类型</span>:<span class="dq">数据流量包</span></p>
-                        <p><span class="hy_text">充值条数</span>:<span class="hysl"></span>条</p>
+                        <p><span class="hy_text">充值条数</span>:<span class="hysl"></span>条<span class="give_num"  style="color:#2CB7CA"></span></p>
                         <p><span class="zq_text">使用有效期</span>:<span class="dyzq"></span>年</p>
                         <p><span class="zq_text">数据规格</span>:<span class="level"></span>字段包</p>
                     </div>
@@ -190,7 +190,7 @@
                         if (r.data.order.original_price == 0) {
                             $(".pay_time_p").css("display", "none");
                             $(".vip_type").text("(试用)");
-                        } else {
+                        } else if (r.data.order.pay_money > 0){
                             $(".pay_num_p").css("display", "");
                             if (r.data.transaction_id) $(".pay_num").text(r.data.transaction_id);
                             //发票
@@ -212,14 +212,14 @@
                         $("#bg").addClass("redBg").removeClass("greenBg");
                         $(".payOrder").show();
                     }
-
                     // 展示字段
                     $('.filter_data .level').text(filterObj.pType == '1' ? '标准' : '高级')
                     $('.filter_data .dyzq').text(filterObj.validYear)
                     $('.filter_data .hysl').text(filterObj.pNum)
-
+                    $('.filter_data .give_num').text((filterObj.give_cycle > 0 ? ' 赠'+filterObj.give_cycle + '条' : ''))
                     $(".payOrder").on("click", function () {
-                        location.href = "/front/datapackage/orderPay/" + orderCode + "?total=" + filterObj.pNum;
+                        var tempTotal = Number(filterObj.pNum) + Number(filterObj.give_cycle > 0 ? filterObj.give_cycle : 0)
+                        location.href = "/front/datapackage/orderPay/" + orderCode + "?total=" + tempTotal;
                     })
 
                     //计价清单

+ 5 - 4
src/web/templates/pc/myOrder.html

@@ -239,7 +239,7 @@
                         </div>
                         <div class="clearfix o_l_middle">
                             <div class="fl m_info grayColor fix-el">
-                                <div class="fl shop_img">
+                                <div class="fl shop_img" :class="'badge-' + (item.filter.badge || '')">
                                     <img :src="item.icon" :alt="item.product_type">
                                 </div>
 
@@ -251,7 +251,7 @@
                                 </div>
                                 <div class="fl shop_main" v-if="item.product_type === '数据流量包'">
                                     <p>产品类型:数据流量包</p>
-                                    <p>充值条数:@#item.filter.pNum#@条</p>
+                                    <p>充值条数:@#item.filter.pNum#@条<span style="color: #2cb7ca;"> @#item.filter.give_cycle >0 ? '赠' + item.filter.give_cycle +'条': ''#@</span></p>
                                     <p>使用有效期:@#item.filter.validYear#@年</p>
                                     <p>数据规格:@#item.filter.pType == '1' ? '标准' : '高级'#@字段包</p>
                                 </div>
@@ -419,7 +419,7 @@
                                     <!--历史数据 再次购买-->
                                     <p v-if="item.product_type === '历史数据'"><a href="/front/dataExport/toSieve">再次购买</a></p>
                                     <!--超级订阅 试用-->
-                                    <p v-if="item.product_type === 'VIP订阅' && item.order_status === 1 && item.filter.cycleunit === 3">-</p>
+                                    <p v-if="item.product_type === 'VIP订阅' && item.order_status === 1 && item.filter.cycleunit === 3 && (item.filter.source || '') === ''" >-</p>
                                 </div>
                             </div>
                         </div>
@@ -1284,7 +1284,8 @@
               break
             }
             case '数据流量包': {
-                href = '/front/datapackage/orderPay/' + item.order_code + "?total=" + item.filter.pNum
+                var tempTotal = Number(item.filter.pNum) + Number(item.filter.give_cycle > 0 ? item.filter.give_cycle : 0)
+                href = '/front/datapackage/orderPay/' + item.order_code + "?total=" + tempTotal
                 break
             }
           }

+ 1 - 3
src/web/templates/pc/vip_orderDetail.html

@@ -156,10 +156,8 @@
                         $(".price").text("¥ " + formatMoney(prodMoney / 100) + "元");
                         // 已取消和已退款订单不显示优惠信息
                         if (r.data.order.order_status != -2 && r.data.order.order_status != -3) {
-                            if (getPayMoney) {
-                                insetDom.after('<p>实付金额:¥' + formatMoney(getPayMoney) +'元</p>')
-                            }
                             if (getCouponMoney) {
+                                insetDom.after('<p>实付金额:¥' + formatMoney(getPayMoney) +'元</p>')
                                 insetDom.after('<p>优惠金额:-¥' + formatMoney(getCouponMoney) +'元</p>')
                             }
                         }

+ 1 - 1
src/web/templates/weixin/commonPay/dataPack/orderDetail.html

@@ -38,7 +38,7 @@
                         </div>
                         <div class="card-list">
                             <div class="j-card report-p">
-                                <span class="rp-left">
+                                <span class="rp-left" :class="'badge-' + (orderInfoFilter.badge || '')">
                                     <img class="card-l-pic" :src="orderInfo.headerImg">
                                 </span>
                                 <span class="rp-right">

+ 2 - 2
src/web/templates/weixin/commonPay/myOrder.html

@@ -64,8 +64,8 @@
                                 </div>
                             </div>
                             <div class="order-item-content click-active" @click="toOrderDetail(item)">
-                                <div class="img-container">
-                                    <img :src="item.contentImgUrl" />
+                                <div class="img-container" :class="item|formatItemBadge">
+                                    <img :src="item.contentImgUrl + '?v=' + version" />
                                 </div>
                                 <div class="content-list" v-if="item.contentList">
                                     <div

+ 5 - 1
src/web/templates/weixin/commonPay/paySuccess.html

@@ -104,7 +104,11 @@
             orderFilter = JSON.parse(orderFilter)
             // 数据包展示
             if (productType === 'dataPack') {
-                $('.info-box .info-item').text('数据流量包:+' + orderFilter.pNum)
+                var allTotal = orderFilter.pNum
+                if (orderFilter.give_cycle > 0) {
+                    allTotal = Number(allTotal) + Number(orderFilter.give_cycle)
+                }
+                $('.info-box .info-item').text('数据流量包:+' + allTotal)
             }
         }
 

+ 1 - 1
src/web/templates/weixin/dataPack/index.html

@@ -100,7 +100,7 @@
                                 </div>
                                 <div class="l-left r-right">
                                     <p>{item.resourceType}</p>
-                                    <p>{changeNum(item.number)}条</p>
+                                    <p>{changeNum(item.number)}条<span style="color: #2abed1;" v-if="item.giveNumber"> 赠{changeNum(item.giveNumber)}条</span></p>
                                     <!-- <p>{item.validYear == -1 ? '-' : item.validYear + '年'}</p> -->
                                     <p>{changeDate(item.endTime)}</p>
                                     <p>{changeDate(item.createTime)}</p>

+ 10 - 6
src/web/templates/weixin/dataPack/recharge.html

@@ -30,7 +30,11 @@
       <div class="j-container">
         <div class="j-main">
             <van-cell-group>
-              <van-cell center title="充值条数" is-link :value="charge.count + '条'" @click="chargeCount.pickerShow = true"></van-cell>
+              <van-cell center title="充值条数" is-link :value="charge.count + '条'" @click="chargeCount.pickerShow = true">
+                <template>
+                  <span>${charge.count}条<span style="color: #2abed1;" v-if="getNowPopSelectValue"> 赠${getNowPopSelectValue}条</span></span>
+                </template>
+              </van-cell>
               <van-cell center title="有效期" :value="charge.duration + '年'"></van-cell>
             </van-cell-group>
             <div class="spec-list-container">
@@ -43,11 +47,11 @@
                   @click="clickSpec(item)"
                   :key="index">
                   <span class="preferential-tag">限时4.5折</span>
-                  <div class="spec-i-label">${ item.label }</div>                    
+                  <div class="spec-i-label">${ item.label }</div>
                   <div class="spec-i-sub">
                     <div class="spec-i-text del">${ item.before }元/条</div>
                     <div class="spec-i-text">${ item.price }元/条</div>
-                  </div>                    
+                  </div>
                 </div>
               </div>
               <div class="spec-question">
@@ -85,15 +89,15 @@
                 <div class="select-item"
                   v-for="(item, index) in chargeCount.infoList"
                   :key="index"
-                  @click="chargeCount.value = item.value"
+                  @click="selectPop(item)"
                   :class="{ active: chargeCount.value === item.value }">
-                  <span class="item-label">${ item.label }</span>
+                  <span class="item-label">${ item.label }<span v-if="(specActive == 1 ? item.senior_num : item.normal_num) > 0"> 赠${specActive == 1 ? item.senior_num : item.normal_num}条</span></span>
                   <span class="j-icon base-icon icon-tick"></span>
                 </div>
               </div>
             </div>
             <div class="j-button-group">
-              <button class="j-button-confirm" @click="charge.count = chargeCount.value;chargeCount.pickerShow = false">确定</button>
+              <button class="j-button-confirm" @click="submitCountPopup">确定</button>
             </div>
           </div>
         </van-popup>

+ 7 - 1
src/web/templates/weixin/vipsubscribe/vip_order_detail.html

@@ -226,7 +226,9 @@
                     if (r.data.order.billingMode!=0){
                         $(".productType").text("超级订阅(试用)");
                     }
-                    $(".discountPrice").parent().hide();
+                }
+                if (r.data.order.discount_price==undefined) {
+            		    $(".discountPrice").parent().hide();
                 }
                 //价格
                 $(".price").text("¥ " + formatMoney(parseFloat(r.data.order.order_money) / 100));
@@ -240,6 +242,10 @@
                 //订单条件
                 if (r.data.order.filter) {
                     var filterObj = JSON.parse(r.data.order.filter);
+                    // 活动角标
+                    if (filterObj.badge) {
+                        $(".order-img").addClass('badge-' + filterObj.badge)
+                    }
                     var areaText = "";
                     // 双11活动判断
                     var can1111 = filterObj && filterObj.original_price

Some files were not shown because too many files changed in this diff