chengjie 6 months ago
parent
commit
20367a5035
2 changed files with 68 additions and 0 deletions
  1. 34 0
      src/api/phonics/phonicsController.js
  2. 34 0
      src/api/pinyin/pinyinController.js

+ 34 - 0
src/api/phonics/phonicsController.js

@@ -95,6 +95,40 @@ export async function PhonicsLogin(ctx) {
95 95
         delete userList[0].OpenID;
96 96
         delete userList[0].UnionID;
97 97
 
98
+        //产品支付是否显示
99
+        if (param.ProgramVersion) {
100
+            let param2 = {
101
+                ProgramID: 99,
102
+                Version: param.ProgramVersion,
103
+            };
104
+            let result3 = await dataUpdateStatus.GetProductVersionList(param2);
105
+            if (result3) {
106
+                if ((param2.Version == result3[0].Version && result3[0].IsShowPay <= 0)
107
+                    || param2.Version > result3[0].Version) {
108
+                    userList[0].IsShow = result3[0].IsShowPay;
109
+                }
110
+                else {
111
+                    userList[0].IsShow = 1;
112
+                }
113
+
114
+                //针对iphone测试用户,永远是无支付状态
115
+                if (userList[0].Brand == 'iPhone' && userList[0].WXLanguage == 'en-US'
116
+                    && userList[0].UserSource == '1001' && userList[0].IsPay == 0) {
117
+                    userList[0].IsShow = 0;
118
+                }
119
+
120
+                //针对微信测试用户,永远是无支付状态
121
+                if ((userList[0].UserSource=='1001' && userList[0].System=="iOS 10.0.1")
122
+                    || (!userList[0].UserSource && (!userList[0].LastUserSource || userList[0].LastUserSource>10000))
123
+                    || userList[0].NickName.indexOf("dgztest")>=0){
124
+                    userList[0].IsShow=-1;
125
+                }
126
+
127
+                if (userList[0].IsMember===1)
128
+                    userList[0].IsShow=1;
129
+            }
130
+        }
131
+
98 132
         result = {errcode: 10000, result: userList[0]};
99 133
     }
100 134
 

+ 34 - 0
src/api/pinyin/pinyinController.js

@@ -94,6 +94,40 @@ export async function PinyinLogin(ctx) {
94 94
         delete userList[0].OpenID;
95 95
         delete userList[0].UnionID;
96 96
 
97
+        //产品支付是否显示
98
+        if (param.ProgramVersion) {
99
+            let param2 = {
100
+                ProgramID: 98,
101
+                Version: param.ProgramVersion,
102
+            };
103
+            let result3 = await dataUpdateStatus.GetProductVersionList(param2);
104
+            if (result3) {
105
+                if ((param2.Version == result3[0].Version && result3[0].IsShowPay <= 0)
106
+                    || param2.Version > result3[0].Version) {
107
+                    userList[0].IsShow = result3[0].IsShowPay;
108
+                }
109
+                else {
110
+                    userList[0].IsShow = 1;
111
+                }
112
+
113
+                //针对iphone测试用户,永远是无支付状态
114
+                if (userList[0].Brand == 'iPhone' && userList[0].WXLanguage == 'en-US'
115
+                    && userList[0].UserSource == '1001' && userList[0].IsPay == 0) {
116
+                    userList[0].IsShow = 0;
117
+                }
118
+
119
+                //针对微信测试用户,永远是无支付状态
120
+                if ((userList[0].UserSource=='1001' && userList[0].System=="iOS 10.0.1")
121
+                    || (!userList[0].UserSource && (!userList[0].LastUserSource || userList[0].LastUserSource>10000))
122
+                    || userList[0].NickName.indexOf("dgztest")>=0){
123
+                    userList[0].IsShow=-1;
124
+                }
125
+
126
+                if (userList[0].IsMember===1)
127
+                    userList[0].IsShow=1;
128
+            }
129
+        }
130
+
97 131
         result = {errcode: 10000, result: userList[0]};
98 132
     }
99 133