12345678910111213141516171819202122232425262728293031 |
- package Handle
- import (
- "Yunlot/models/Device"
- "Yunlot/models/Product"
- "encoding/json"
- "fmt"
- "strings"
- )
- func Relay(Device_r Device.Device, ProductType_r Product.ProductType, JointTab string, ArticleSlide map[string]interface{}) {
- ProductRelay_r := Product.ProductRelay{T_ProductID: Device_r.T_ProductID,T_rtab: JointTab}
- if ProductRelay_r.Read() {
- datajson, _ := json.Marshal(ArticleSlide)
- fmt.Println(string(datajson))
- // 替换发布号变量
- ProductRelay_r.T_pub = strings.Replace(ProductRelay_r.T_pub, "{sn}", Device_r.T_sn, -1)
- if len(ProductRelay_r.T_pub) == 0 {
- println("订阅号错误!")
- return
- }
- switch ProductRelay_r.T_mode {
- case 0:
- break
- }
- }
- }
|