mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 16:00:24 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			283 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			283 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package models
 | 
						|
 | 
						|
import "encoding/json"
 | 
						|
 | 
						|
func (this *NodeRegion) DecodePriceMap() map[int64]float64 {
 | 
						|
	var m = map[int64]float64{}
 | 
						|
	if len(this.Prices) == 0 {
 | 
						|
		return m
 | 
						|
	}
 | 
						|
 | 
						|
	err := json.Unmarshal([]byte(this.Prices), &m)
 | 
						|
	if err != nil {
 | 
						|
		// 忽略错误
 | 
						|
		return m
 | 
						|
	}
 | 
						|
 | 
						|
	return m
 | 
						|
}
 |