|
@@ -1,11 +1,11 @@
|
|
|
package jyutil
|
|
|
|
|
|
import (
|
|
|
+ util "app.yhyue.com/moapp/jybase/common"
|
|
|
+ "app.yhyue.com/moapp/jybase/redis"
|
|
|
"fmt"
|
|
|
. "jy/src/jfw/modules/app/src/jfw/config"
|
|
|
"log"
|
|
|
- util "app.yhyue.com/moapp/jybase/common"
|
|
|
- "app.yhyue.com/moapp/jybase/redis"
|
|
|
"strconv"
|
|
|
"strings"
|
|
|
)
|
|
@@ -93,7 +93,7 @@ func (c *clientUpdate) ApkUrl(code, download string) string {
|
|
|
// }
|
|
|
}
|
|
|
|
|
|
-//比较版本号
|
|
|
+// 比较版本号
|
|
|
func (c *clientUpdate) compareVersion(newVersion, oldVersion string) bool {
|
|
|
log.Println("--------", newVersion, oldVersion)
|
|
|
newArray := strings.Split(newVersion, ".")
|
|
@@ -120,6 +120,8 @@ func (c *clientUpdate) compareVersion(newVersion, oldVersion string) bool {
|
|
|
}
|
|
|
if new_v > old_v {
|
|
|
return true
|
|
|
+ } else if new_v < old_v {
|
|
|
+ return false
|
|
|
}
|
|
|
}
|
|
|
return false
|