ソースを参照

更新

master
huangjiajun 11ヶ月前
コミット
06af6e35b6
2個のファイルの変更18行の追加4行の削除
  1. +2
    -2
      chain_transfer/svc/svc_turnchain.go
  2. +16
    -2
      chain_transfer/turn_chain.go

+ 2
- 2
chain_transfer/svc/svc_turnchain.go ファイルの表示

@@ -511,7 +511,7 @@ func CommGetGoods(eg *xorm.Engine, officialEg *xorm.Engine, tmp map[string]strin
}
if pvd != md.PVD_TB && pvd != md.PVD_TM && countUrl != "" && tklWord == "" {
if urls.ShortenURL == "" {
tcPrase.Count = strings.ReplaceAll(reqCount, countUrl, "["+countUrl+"]")
tcPrase.Count = strings.ReplaceAll(reqCount, countUrl, "")
tcPrase.Count = strings.ReplaceAll(tcPrase.Count, "[[", "[")
tcPrase.Count = strings.ReplaceAll(tcPrase.Count, "]]", "]")
} else {
@@ -521,7 +521,7 @@ func CommGetGoods(eg *xorm.Engine, officialEg *xorm.Engine, tmp map[string]strin
isNull := ""
if pvd != md.PVD_TB && pvd != md.PVD_TM && oldCountUrl != "" && countUrl == "" && tklWord == "" {
isNull = "1"
tcPrase.Count = strings.ReplaceAll(reqCount, oldCountUrl, "["+oldCountUrl+"]")
tcPrase.Count = strings.ReplaceAll(reqCount, oldCountUrl, "")
tcPrase.Count = strings.ReplaceAll(tcPrase.Count, "[[", "[")
tcPrase.Count = strings.ReplaceAll(tcPrase.Count, "]]", "]")
}


+ 16
- 2
chain_transfer/turn_chain.go ファイルの表示

@@ -242,12 +242,26 @@ func TurnChain(eg *xorm.Engine, officialEg *xorm.Engine, args map[string]string)
newV = strings.ReplaceAll(newV, zhios_third_party_utils.IntToStr(i), "")
}
if strings.Contains(v, "¥") == false && strings.Contains(v, "http") == false {
var numArr = []string{"、", "-", "~", ".", "。", "!", "/", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}
var numArr = []string{" ", "(", "(", "、", "-", "~", ".", "。", "!", "/", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}
for _, v1 := range numArr {
newV = strings.ReplaceAll(newV, v1, "")
}
}
if goodsId == "" && zhios_third_party_utils.IsAllChinese(newV) == false && (PlatType == "taobao" || PlatType == "") {
split := regexp.MustCompile("[a-zA-Z0-9]{9,14}").FindAllString(v, -1)
//split_letter := regexp.MustCompile("[a-zA-Z]{8,15}").FindAllString(reqCount, -1)
if split != nil && ((zhios_third_party_utils.IsChineseChar(v) && strings.Contains(v, "http")) || strings.Contains(v, "http") == false) {
var is_tkl = 0
for k1, v1 := range split {
if k1 == 0 {
is_tkl = 1
tklWord = v1
}
}
if is_tkl == 1 {
PlatType = "tkl"
}
}
if goodsId == "" && (zhios_third_party_utils.IsAllChinese(newV) == false && (PlatType == "taobao" || PlatType == "") || PlatType == "tkl") {

pvd, goodsId, word, _ := svc.FindTaobaoWord(eg, officialEg, args, v, user)
if goodsId == "" && pvd == "" {


読み込み中…
キャンセル
保存