user.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. package entity
  2. import (
  3. "encoding/json"
  4. "fmt"
  5. "log"
  6. "strconv"
  7. "strings"
  8. "sync"
  9. "time"
  10. "github.com/zeromicro/go-zero/core/logx"
  11. MC "app.yhyue.com/moapp/jybase/common"
  12. "app.yhyue.com/moapp/jybase/redis"
  13. )
  14. const (
  15. RedisCode = "newother"
  16. RedisMenuKey = "jy_workdesktopmenu_%s_%s_%s"
  17. UserPowerRedisKey = "jy_userpowerredis_%s_%d_%s"
  18. UserRegisterTime = "jy_userregistertime_%s"
  19. UserPowerEndTime = "jy_user_power_end_time_%s"
  20. )
  21. type UserInfo struct {
  22. Capitals map[string]int
  23. Permissions map[string]int
  24. Lock *sync.Mutex
  25. }
  26. var (
  27. CapitalRetention = "capital_retention"
  28. OverallLock = &sync.Mutex{}
  29. UserInfoMap = map[int64]*UserInfo{}
  30. UserRolePowers = map[string][]string{}
  31. )
  32. /*
  33. *待调整 调整为存redis
  34. *测试用例放的地方不对 待调整
  35. */
  36. // AutoUserPowerInfo 用户权限 初始化
  37. func (m *WorkDesktopMenu) AutoUserPowerInfo() map[string]int {
  38. /*
  39. * 商机管理--》新版商机管理vs老版商机管理
  40. * 大会员--》bigmember_service
  41. * 超级订阅--》新版超级订阅vs老版超级订阅
  42. * 免费用户--》新免费用户
  43. */
  44. /*
  45. * P278 用户身份切换
  46. * 用户权益 通过 权益中台rpc获取
  47. * 用户资源 通过 资源中台rpc获取
  48. */
  49. var UserPowerMap = map[string]int{}
  50. //redis newother 查询是否存在用户功能信息
  51. userPowerRedisKey := fmt.Sprintf(UserPowerRedisKey, m.AppId, time.Now().Day(), m.UserId)
  52. bytes, err := redis.GetBytes(RedisCode, userPowerRedisKey)
  53. if err == nil && len(*bytes) > 0 {
  54. if err = json.Unmarshal(*bytes, &UserPowerMap); err == nil {
  55. return UserPowerMap
  56. }
  57. }
  58. //数据库查询 、资源中台获取、权益中台获取 查询用户信息
  59. var (
  60. registerTime int64
  61. powerEndTime int64
  62. )
  63. //以上获取不到的信息 再自主查库
  64. userInfoRpc := UserInfoRpc{
  65. AppId: m.AppId,
  66. UserId: m.UserId,
  67. BaseUserId: m.NewUserId,
  68. EntId: m.EntId,
  69. EntUserId: m.EntUserId,
  70. AccountId: m.AccountId,
  71. EntAccountId: m.EntAccountId,
  72. PositionType: m.PositionType,
  73. PositionId: m.PositionId,
  74. MgoUserId: m.MgoUserId,
  75. }
  76. logx.Info(m.MgoUserId, m.PositionId, "------------------userInfoRpc-------------------------:", userInfoRpc)
  77. //权益中台获取权益
  78. userPowers := userInfoRpc.GetUserPowers()
  79. if userPowers != nil {
  80. logx.Info(userInfoRpc.MgoUserId, "------------userPowers:", userPowers)
  81. //注册时间
  82. registerTime = userPowers.Free.Registedate
  83. //大会员
  84. member := userPowers.Member
  85. //超级订阅
  86. vip := userPowers.Vip
  87. //企业信息
  88. entInfo := userPowers.Ent
  89. //商机管理
  90. entNiche := userPowers.Entniche
  91. //免费用户
  92. free := userPowers.Free
  93. if member.Status > 0 || ConfigJson.BigMemberOff {
  94. if member.Status > 0 {
  95. UserPowerMap["0"] = int(member.Status)
  96. UserPowerMap[strconv.Itoa(50+int(member.Status))] = 1
  97. //此处 如果 member.Status >7,和 下面58 会有冲突
  98. //人员行为统计菜单-1、购买大会员且创建了企业的管理员;2、新版商机管理管理员;3、商机管理服务管理员
  99. UserPowerMap["50"] = 1 //
  100. if entInfo.EntRoleId == 1 {
  101. UserPowerMap["58"] = 1 //企业管理员
  102. } else if entInfo.EntRoleId == 2 {
  103. UserPowerMap["59"] = 1 // 部门管理员
  104. }
  105. powerEndTime = member.EndTime
  106. }
  107. //大会员用户购买的服务 也有可能是非大会员用户 购买这些服务
  108. if member.MemberPowerList != nil && len(member.MemberPowerList) > 0 {
  109. for _, mp := range member.MemberPowerList {
  110. UserPowerMap[strconv.FormatInt(mp, 10)] = MC.If(member.Status > 0, int(member.Status), 1).(int)
  111. }
  112. }
  113. }
  114. if vip.Status > 0 {
  115. //
  116. if powerEndTime < vip.EndTime {
  117. powerEndTime = vip.EndTime
  118. }
  119. UserPowerMap["200"] = int(vip.Status)
  120. UserPowerMap["201"] = int(vip.Upgrade)
  121. //
  122. if vip.Upgrade > 0 && member.Status < 1 {
  123. UserPowerMap["202"] = int(vip.Status)
  124. }
  125. if entInfo.EntRoleId == 1 {
  126. UserPowerMap["203"] = 1 //企业管理员
  127. } else if entInfo.EntRoleId == 2 {
  128. UserPowerMap["204"] = 1 //部门管理员
  129. }
  130. }
  131. //企业信息
  132. if m.EntId > 0 {
  133. UserPowerMap["702"] = 1
  134. //机构中心 由企业 且 是企业版
  135. //m.PositionType 肯定大于 0; 702 和 901 是同样的权限。
  136. if m.PositionType > 0 {
  137. UserPowerMap["901"] = 1
  138. }
  139. //P386
  140. switch entInfo.EntRoleId {
  141. case 1: //企业管理员
  142. UserPowerMap["902"] = 1
  143. case 2: //部门管理员
  144. UserPowerMap["903"] = 1
  145. }
  146. }
  147. if entNiche.Status > 0 && entNiche.IsEntPower > 0 {
  148. //entInfo.EntRoleId 1:企业管理员 2:部门管理员
  149. //管理员 entInfo.EntRoleId>0 并不一定 entNiche.IsEntPower==1,entNiche.IsEntPower==0 也有权限(已废除)
  150. //管理员he员工被分配后 entNiche.IsEntPower==1否则没有权限
  151. //if entNiche.IsEntPower > 0 || entInfo.EntRoleId > 0{//(已废除)
  152. //商机管理服务 P259需求
  153. //有商机管理服务 不会再有商机管理订阅菜单
  154. //商机管理服务,上次陈老师说叫“企业管理服务”,不然和商机管理产品容易混淆-- 杨蘭 2022/12/14
  155. switch entNiche.PowerSource {
  156. case 0:
  157. switch entNiche.IsNew {
  158. case 1: //新版商机管理
  159. UserPowerMap["110"] = 1
  160. switch entInfo.EntRoleId {
  161. case 2: //部门管理员
  162. UserPowerMap["111"] = 1
  163. case 1: //企业管理员
  164. UserPowerMap["112"] = 1
  165. }
  166. case 0: //老版商机管理
  167. UserPowerMap["100"] = 1
  168. switch entInfo.EntRoleId {
  169. case 2: //部门管理员
  170. UserPowerMap["101"] = 1
  171. case 1: //企业管理员
  172. UserPowerMap["102"] = 1
  173. }
  174. //老版商机管理: model:1-统一订阅,2-个人订阅
  175. if entNiche.Model == 1 {
  176. UserPowerMap["103"] = 1
  177. } else if entNiche.Model == 2 {
  178. UserPowerMap["104"] = 1
  179. }
  180. }
  181. case 1:
  182. //客户管理服务(商机管理服务) [前提:大会员、超级订阅、医械通用户]---免费用户也可以用 (需求调整来自刘苗:产品已确认)
  183. UserPowerMap["600"] = 1
  184. switch entInfo.EntRoleId {
  185. case 2: //部门管理员
  186. UserPowerMap["602"] = 1
  187. case 1: //企业管理员
  188. UserPowerMap["601"] = 1
  189. }
  190. //}
  191. }
  192. }
  193. if free.IsFree {
  194. UserPowerMap["300"] = 1
  195. if free.IsUpgrade {
  196. //新免费用户
  197. UserPowerMap["301"] = MC.If(free.IsUpgrade, 1, 0).(int)
  198. }
  199. //P386
  200. switch entInfo.EntRoleId {
  201. case 1: //企业管理员
  202. UserPowerMap["302"] = 1
  203. case 2: //部门管理员
  204. UserPowerMap["303"] = 1
  205. }
  206. }
  207. //----------其他-----------
  208. //广东移动DICT
  209. if entInfo.PrivateGD {
  210. UserPowerMap["400"] = 1
  211. }
  212. //人员行为统计菜单-1、购买大会员且创建了企业的管理员;2、新版商机管理管理员;3、商机管理服务管理员
  213. //必须是企业管理员-&-购买了企业级应用服务
  214. //企业级服务 权限管理(只有企业管理员有权限)
  215. entService := entInfo.BuyMember > 0 || entInfo.BuyVip > 0 || entInfo.Services //P386: 只要购买了企业级产品 且是企业管理员 就有>> 权限管理
  216. if entService {
  217. if entInfo.EntRoleId == 1 {
  218. UserPowerMap["700"] = 1
  219. } else if entInfo.EntRoleId == 2 {
  220. //企业级服务 部门管理员
  221. UserPowerMap["703"] = 1
  222. }
  223. }
  224. //企业级服务 企业订阅--
  225. //1、存在未到期的购买主体为“企业”切购买产品为大会员或者超级订阅的部门管理员或企业管理员;c > 0
  226. //2、存在未到期的老版或者新版商机管理的企业管理员或部门管理员(非商机管理服务)。entnicheIsNew > -1 && powerSource == 0
  227. if entInfo.EntSubscribe > 0 {
  228. UserPowerMap["701"] = 1
  229. }
  230. //领域化产品权限
  231. //第一版:必须是大会员或者超级订阅用户 且留资 留资表:capital_retention;source = 'medical_domain',未留资提示留资信息
  232. //第二版:调资源中台rpc获取用户是否有使用领域化产品的权限 无权限则去购买
  233. //需求调整:
  234. //1:是否是大会员或者超级订阅用户 否:提示购买到超级订阅购买页; 是>-2
  235. //2:判断用户是否留资 否:提示用去留资;是:>-3
  236. //3:资源中台获取用户权限码判断是否有权限 否:提示用户去联系客服
  237. userRegisterTimeKey := fmt.Sprintf(UserRegisterTime, m.UserId)
  238. redis.Put(RedisCode, userRegisterTimeKey, strconv.Itoa(int(registerTime)), int(registerTime))
  239. if member.Status > 0 || vip.Status > 0 {
  240. userPowerEndTimeKey := fmt.Sprintf(UserPowerEndTime, m.UserId)
  241. redis.Put(RedisCode, userPowerEndTimeKey, strconv.Itoa(int(powerEndTime)), int(powerEndTime))
  242. UserPowerMap["500"] = 1
  243. }
  244. }
  245. //资源中台获取权限
  246. powerList := userInfoRpc.GetUserResources()
  247. if len(powerList) > 0 {
  248. for _, plv := range powerList {
  249. UserPowerMap[plv] = 1
  250. }
  251. }
  252. //其他权益数据库查询
  253. func(mgoUserId string) {
  254. //伙伴计划是否加入(移动端我的伙伴计划菜单)
  255. if count := Mysql.CountBySql(`select count(*) from dis_partner where uid=? and type=2`, mgoUserId); count > 0 {
  256. UserPowerMap["801"] = 1
  257. } else {
  258. UserPowerMap["800"] = 1
  259. }
  260. }(m.MgoUserId)
  261. //缓存
  262. if UserPowerMap != nil {
  263. bytes, err := json.Marshal(UserPowerMap)
  264. if err == nil && len(bytes) > 0 {
  265. redis.PutBytes(RedisCode, userPowerRedisKey, &bytes, ConfigJson.InternalTime)
  266. }
  267. }
  268. return UserPowerMap
  269. }
  270. // ClearUserPowerFunc clear One userId>positionId 职位id
  271. func ClearUserPowerFunc(positionId, appId string) bool {
  272. if positionId == "" {
  273. return false
  274. }
  275. for _, v := range strings.Split(positionId, ",") {
  276. for _, vv := range []string{"PC", "APP", "WX"} {
  277. //用户菜单缓存
  278. redis.Del(RedisCode, fmt.Sprintf(RedisMenuKey, appId, vv, v))
  279. }
  280. //用户权限缓存
  281. redis.Del(RedisCode, fmt.Sprintf(UserPowerRedisKey, appId, time.Now().Day(), v))
  282. }
  283. return true
  284. }
  285. // UserRolePowerInit 用户角色权限初始化
  286. func UserRolePowerInit(strs []string) {
  287. if len(strs) > 0 {
  288. jyUserRoleData := BaseMysql.SelectBySql(`SELECT id,name FROM jyfunction WHERE status = 1`)
  289. if jyUserRoleData != nil && len(*jyUserRoleData) > 0 {
  290. for _, jv := range *jyUserRoleData {
  291. for _, v := range strs {
  292. if strings.Contains(MC.ObjToString(jv["name"]), v) {
  293. UserRolePowers[v] = append(UserRolePowers[v], strconv.Itoa(MC.IntAll(jv["id"])))
  294. }
  295. }
  296. }
  297. }
  298. }
  299. }
  300. /*
  301. 菜单弹窗逻辑
  302. 如果需要留资
  303. 默认:
  304. 1、先判断是否已留资
  305. 2、再判断是否有权限
  306. 医械通:
  307. 1、不符合可以留资申请开通权限的用户
  308. 1、免费用户
  309. 2、超级订阅用户、大会员用户到期时间是否超过3个月
  310. (1、2:弹窗-医械通上线啦)
  311. 2、符合可以留资申请开通的用户
  312. 1、未留资
  313. (1:弹窗-完善基本信息)
  314. 2、已留资未开通
  315. 3、已留资且开通
  316. (2、3:弹窗-恭喜留资成功)
  317. */
  318. /*
  319. 1、判断是否满足超级订阅用户或大会员用户 且到期时间超过90天(配置);
  320. 1.1、否:权限=0;提示上线啦
  321. 1.2、是:是否留资
  322. 1.2.1、否:权限=0;提示留资
  323. 1.2.2、是:是否开通权限
  324. 1.2.2.1、否:权限=0;提示恭喜留资成功,客服联系
  325. 1.2.2.2、是:权限=1
  326. */
  327. /*存在超级订阅 或 大会员到期 而医械通未到期的情况*/
  328. // CheckCapitalResources 是否需要留资 且权限验证--弹窗处理
  329. // b 一级权限(超级订阅、大会员等)
  330. // p 二级权限(请求资源中台:医械通等)
  331. func (m *WorkDesktopMenu) CheckCapitalResources(menu *JYMenu, b, p bool, pUrl string) (title, content, confirmUrl, confirmText, appType, openType string, isShowCancel, usable bool) {
  332. var defaultPopupFunc = func(powerIds ...string) {
  333. dpKey := m.Platform
  334. if len(powerIds) > 0 {
  335. dpKey = powerIds[0]
  336. }
  337. title = ConfigJson.DefaultPopup[dpKey].Title
  338. content = ConfigJson.DefaultPopup[dpKey].Content
  339. confirmUrlArr := strings.Split(ConfigJson.DefaultPopup[dpKey].ConfirmUrl, "__")
  340. if len(confirmUrlArr) > 1 {
  341. confirmUrl = MC.InterfaceToStr(MC.If(m.Platform == "PC", confirmUrlArr[1], confirmUrlArr[0]))
  342. }
  343. confirmText = ConfigJson.DefaultPopup[dpKey].ConfirmText
  344. isShowCancel = ConfigJson.DefaultPopup[dpKey].IsShowCancel
  345. appType = ConfigJson.DefaultPopup[dpKey].AppType
  346. openType = ConfigJson.DefaultPopup[dpKey].OpenType
  347. }
  348. OverallLock.Lock()
  349. userInfo := UserInfoMap[m.NewUserId]
  350. if userInfo == nil {
  351. userInfo = &UserInfo{}
  352. userInfo.Lock = &sync.Mutex{}
  353. userInfo.Capitals = map[string]int{}
  354. userInfo.Permissions = map[string]int{}
  355. UserInfoMap[m.NewUserId] = userInfo
  356. }
  357. OverallLock.Unlock()
  358. userInfo.Lock.Lock()
  359. defer userInfo.Lock.Unlock()
  360. var (
  361. defaultPopup = false //默认弹窗
  362. capitalBool = func() bool {
  363. //用户是否需要留资
  364. if menu.CapitalCode != "" {
  365. capitalBool := false
  366. for _, cv := range strings.Split(menu.CapitalCode, ",") {
  367. if userInfo.Capitals[cv] <= 0 {
  368. if c := BaseMysql.CountBySql(`SELECT COUNT(id) FROM `+CapitalRetention+` WHERE source = ? AND position_id = ? AND appid = ?`, cv, m.PositionId, m.AppId); c > 0 {
  369. userInfo.Capitals[cv] = 1
  370. } else {
  371. userInfo.Capitals[cv] = -1
  372. }
  373. }
  374. if userInfo.Capitals[cv] > 0 {
  375. capitalBool = true
  376. break
  377. }
  378. }
  379. return capitalBool
  380. }
  381. return true
  382. }()
  383. )
  384. usable = func() bool {
  385. switch menu.Authority {
  386. case 0:
  387. return b && p && capitalBool
  388. case 1:
  389. return b || p || capitalBool
  390. case 2:
  391. return b || p && capitalBool
  392. case 3:
  393. return b && p || capitalBool
  394. case 4:
  395. return b && capitalBool || p
  396. default:
  397. return false
  398. }
  399. }()
  400. //P630人脉管理
  401. //用户 有权限 不再判断 弹窗提示信息
  402. if usable {
  403. //企业信息验证
  404. if menu.CheckEnt > 0 {
  405. var GetCheckEntInfo = func(menuId, entId int64) (menuEntInfo MenuEntInfo) {
  406. checkEntKey := fmt.Sprintf("check_ent_key_%d_%d", menuId, entId)
  407. cb, ce := redis.GetBytes(RedisCode, checkEntKey)
  408. if ce == nil && len(*cb) > 0 {
  409. ce = json.Unmarshal(*cb, &menuEntInfo)
  410. }
  411. if ce != nil || len(*cb) == 0 {
  412. menuEnt := BaseMysql.FindOne("base_service.work_menu_ent", map[string]interface{}{
  413. "menu_id": menuId,
  414. "ent_id": entId,
  415. }, "", "create_date DESC ")
  416. if menuEnt != nil && (*menuEnt) != nil {
  417. mb, err := json.Marshal(*menuEnt)
  418. if err == nil && len(mb) > 0 {
  419. err = json.Unmarshal(mb, &menuEntInfo)
  420. if err == nil {
  421. err = redis.PutBytes(RedisCode, checkEntKey, &mb, 4*60*60)
  422. }
  423. }
  424. if err != nil {
  425. log.Println("获取 work_menu_ent 信息 异常:", entId, menuId, m.Phone)
  426. }
  427. }
  428. }
  429. return
  430. }
  431. mei := GetCheckEntInfo(int64(menu.Id), m.EntId)
  432. if mei.EntId > 0 {
  433. usable = false
  434. switch mei.Target {
  435. case 1:
  436. deptId := strconv.FormatInt(m.EntDeptId, 10)
  437. if strings.Contains(mei.DeptId, deptId) {
  438. goto env
  439. }
  440. default:
  441. goto env
  442. }
  443. env:
  444. switch mei.Mold {
  445. case 0:
  446. usable = true
  447. default:
  448. log.Println("工作菜单企业关联信息表 是否显示菜单:", mei.Mold, mei.EntId)
  449. }
  450. }
  451. }
  452. //菜单在当前平台没有权限
  453. if menu.Url == "" && pUrl == "" {
  454. usable = false
  455. defaultPopupFunc()
  456. }
  457. return
  458. }
  459. // 需要特殊处理的菜单 弹窗提示信息
  460. /*
  461. 菜单弹窗逻辑
  462. 如果需要留资
  463. 默认:
  464. 1、先判断是否已留资
  465. 2、再判断是否有权限
  466. 医械通:
  467. 1、不符合可以留资申请开通权限的用户
  468. 1、免费用户
  469. 2、超级订阅用户、大会员用户到期时间是否超过3个月
  470. (1、2:弹窗-医械通上线啦)
  471. 2、符合可以留资申请开通的用户
  472. 1、未留资
  473. (1:弹窗-完善基本信息)
  474. 2、已留资未开通
  475. 3、已留资且开通
  476. (2、3:弹窗-恭喜留资成功)
  477. */
  478. if PopupIdMap[menu.Id] || PopupIdMap[menu.ParentId] {
  479. // 超级订阅 or 大会员
  480. if b {
  481. userPowerEndTimeKey := fmt.Sprintf(UserPowerEndTime, m.UserId)
  482. powerEndTime, _ := strconv.ParseInt(redis.GetStr(RedisCode, userPowerEndTimeKey), 10, 64)
  483. //超级订阅 大会员到期时间 是否 大于 90天
  484. if powerEndTime == 0 || powerEndTime-time.Now().Unix() < ConfigJson.MedicalFieldTimespan {
  485. //即使是超级订阅或大会员 也没有权限
  486. defaultPopup = true
  487. }
  488. }
  489. // 免费用户 或者 不满足条件的超级订阅or大会员用户
  490. if (!b || defaultPopup) && ConfigJson.DefaultPopup[menu.PowerIds].Title != "" {
  491. defaultPopupFunc(menu.PowerIds)
  492. } else if !capitalBool { //未留资的用户
  493. //留资弹窗信息
  494. title = menu.CapitalInfo.Title
  495. content = menu.CapitalInfo.Content
  496. confirmUrl = menu.CapitalInfo.ConfirmUrl
  497. confirmText = menu.CapitalInfo.ConfirmText
  498. isShowCancel = menu.CapitalInfo.IsShowCancel
  499. appType = menu.CapitalInfo.AppType
  500. openType = menu.CapitalInfo.OpenType
  501. } else {
  502. title = menu.AdditionalInfo[m.Platform].Title
  503. content = menu.AdditionalInfo[m.Platform].Content
  504. confirmUrl = menu.AdditionalInfo[m.Platform].ConfirmUrl
  505. confirmText = menu.AdditionalInfo[m.Platform].ConfirmText
  506. isShowCancel = menu.AdditionalInfo[m.Platform].IsShowCancel
  507. appType = menu.AdditionalInfo[m.Platform].AppType
  508. openType = menu.AdditionalInfo[m.Platform].OpenType
  509. }
  510. } else { //默认
  511. // 留资
  512. if !capitalBool {
  513. //留资弹窗信息
  514. title = menu.CapitalInfo.Title
  515. content = menu.CapitalInfo.Content
  516. confirmUrl = menu.CapitalInfo.ConfirmUrl
  517. confirmText = menu.CapitalInfo.ConfirmText
  518. isShowCancel = menu.CapitalInfo.IsShowCancel
  519. appType = menu.CapitalInfo.AppType
  520. openType = menu.CapitalInfo.OpenType
  521. } else {
  522. title = menu.AdditionalInfo[m.Platform].Title
  523. content = menu.AdditionalInfo[m.Platform].Content
  524. confirmUrl = menu.AdditionalInfo[m.Platform].ConfirmUrl
  525. confirmText = menu.AdditionalInfo[m.Platform].ConfirmText
  526. isShowCancel = menu.AdditionalInfo[m.Platform].IsShowCancel
  527. appType = menu.AdditionalInfo[m.Platform].AppType
  528. openType = menu.AdditionalInfo[m.Platform].OpenType
  529. }
  530. }
  531. return
  532. }