feat 初始化
This commit is contained in:
37
template/sms/lianlu.go
Normal file
37
template/sms/lianlu.go
Normal file
@@ -0,0 +1,37 @@
|
||||
package sms
|
||||
|
||||
//
|
||||
//import "git.hlsq.asia/alex/proto/topic"
|
||||
//
|
||||
//type CountryCode string
|
||||
//
|
||||
//const (
|
||||
// CountryCodeChina CountryCode = "+86" // 中国
|
||||
// CountryCodeHongKong CountryCode = "+852" // 中国香港
|
||||
// CountryCodeMacau CountryCode = "+853" // 中国澳门
|
||||
// CountryCodeTaiwan CountryCode = "+886" // 中国台湾
|
||||
// CountryCodeJapan CountryCode = "+81" // 日本
|
||||
// CountryCodeSouthKorea CountryCode = "+82" // 韩国
|
||||
//)
|
||||
//
|
||||
//const (
|
||||
// TemplateCodeVerificationCodeChinese topic.SmsTemplateCode = "70630138" // 验证码(中文)
|
||||
// TemplateCodeVerificationCodeEnglish topic.SmsTemplateCode = "54236" // 验证码(英文)
|
||||
// TemplateCodeVerificationCodeJapanese topic.SmsTemplateCode = "54270" // 验证码(日文)
|
||||
// TemplateCodeVerificationCodeKorean topic.SmsTemplateCode = "54271" // 验证码(韩文)
|
||||
// TemplateCodeVerificationCodeChineseTraditional topic.SmsTemplateCode = "54272" // 验证码(繁体中文)
|
||||
//)
|
||||
//
|
||||
//func GetTemplateCodeVerificationCodeByCountryCode(countryCode CountryCode) topic.SmsTemplateCode {
|
||||
// switch countryCode {
|
||||
// case CountryCodeChina:
|
||||
// return TemplateCodeVerificationCodeChinese
|
||||
// case CountryCodeHongKong, CountryCodeMacau, CountryCodeTaiwan:
|
||||
// return TemplateCodeVerificationCodeChineseTraditional
|
||||
// case CountryCodeJapan:
|
||||
// return TemplateCodeVerificationCodeJapanese
|
||||
// case CountryCodeSouthKorea:
|
||||
// return TemplateCodeVerificationCodeKorean
|
||||
// }
|
||||
// return TemplateCodeVerificationCodeEnglish
|
||||
//}
|
||||
36
template/sms/zhongtian.go
Normal file
36
template/sms/zhongtian.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package sms
|
||||
|
||||
import "git.hlsq.asia/alex/proto/topic"
|
||||
|
||||
type CountryCode string
|
||||
|
||||
const (
|
||||
CountryCodeChina CountryCode = "+86" // 中国
|
||||
CountryCodeHongKong CountryCode = "+852" // 中国香港
|
||||
CountryCodeMacau CountryCode = "+853" // 中国澳门
|
||||
CountryCodeTaiwan CountryCode = "+886" // 中国台湾
|
||||
CountryCodeJapan CountryCode = "+81" // 日本
|
||||
CountryCodeSouthKorea CountryCode = "+82" // 韩国
|
||||
)
|
||||
|
||||
const (
|
||||
TemplateCodeVerificationCodeChinese topic.SmsTemplateCode = "【巢云互动】您的验证码是:%v,该验证码5分钟内有效,请勿泄漏于他人!" // 验证码(中文)
|
||||
TemplateCodeVerificationCodeEnglish topic.SmsTemplateCode = "[NEXQUB] Your verification code is %v. It is valid for 5 minutes. Please do not share it with anyone." // 验证码(英文)
|
||||
TemplateCodeVerificationCodeJapanese topic.SmsTemplateCode = "[NEXQUB] 認証コード:%v 有効期限5分。このコードを他人に教えないでください。" // 验证码(日文)
|
||||
TemplateCodeVerificationCodeKorean topic.SmsTemplateCode = "[NEXQUB] 인증번호 %v 유효시간 5분. 타인과 공유하지 마세요." // 验证码(韩文)
|
||||
TemplateCodeVerificationCodeChineseTraditional topic.SmsTemplateCode = "[NEXQUB] 您的驗證碼是:%v,5分鐘內有效,請勿向他人提供。" // 验证码(繁体中文)
|
||||
)
|
||||
|
||||
func GetTemplateCodeVerificationCodeByCountryCode(countryCode CountryCode) topic.SmsTemplateCode {
|
||||
switch countryCode {
|
||||
case CountryCodeChina:
|
||||
return TemplateCodeVerificationCodeChinese
|
||||
case CountryCodeHongKong, CountryCodeMacau, CountryCodeTaiwan:
|
||||
return TemplateCodeVerificationCodeChineseTraditional
|
||||
case CountryCodeJapan:
|
||||
return TemplateCodeVerificationCodeJapanese
|
||||
case CountryCodeSouthKorea:
|
||||
return TemplateCodeVerificationCodeKorean
|
||||
}
|
||||
return TemplateCodeVerificationCodeEnglish
|
||||
}
|
||||
Reference in New Issue
Block a user