This commit is contained in:
suyl
2021-07-15 13:44:41 +08:00
parent b3901e6a7c
commit 25fea4d861
3 changed files with 16 additions and 9 deletions

View File

@@ -503,10 +503,17 @@ func GetStoreList4User(ctx *jxcontext.Context, mobileNum, userID string) (storeL
return storeList, err
}
func GetMyStoreListNew(ctx *jxcontext.Context) (storesInfo interface{}, errCode string, err error) {
func GetMyStoreListNew(ctx *jxcontext.Context, version string) (storesInfo interface{}, errCode string, err error) {
if !auth2.IsV2Token(ctx.GetToken()) {
return nil, model.ErrCodeTokenIsInvalid, model.ErrTokenIsInvalid
}
if ctx.GetLoginType() == weixin.AuthTypeWxApp {
if configs, _ := dao.QueryConfigs(dao.GetDB(), "checkversion", model.ConfigTypeSys, ""); len(configs) > 0 {
if version == "" || configs[0].Value != version {
return nil, "", fmt.Errorf("当前APP版本过旧数据显示有错误请到'京西菜市'公众号下载最新版本APP")
}
}
}
mobile, userID := ctx.GetMobileAndUserID()
if mobile == "" {
return nil, "", fmt.Errorf("不能得到用户手机号")