Commit 8da300ea2aea3aacba861fac6e22591cfa38ae94

Authored by zhiyangdu
1 parent 6e263026

校验登录

src/pages/healthMall/healthMall.vue
@@ -165,25 +165,21 @@ export default { @@ -165,25 +165,21 @@ export default {
165 */ 165 */
166 toDetail (item) { 166 toDetail (item) {
167 if (this.isCNLive.value) { 167 if (this.isCNLive.value) {
168 - // this.$router.push({  
169 - // path: "/goodDetails",  
170 - // query: {  
171 - // goodsId: item.id,  
172 - // uid: this.getStore("uid")  
173 - // }  
174 - // })  
175 - // 通用跳转跳转到商品详情页新打开webview  
176 - if (typeof this.$parent.gotoDetail === 'function') { 168 + // 校验登录
  169 + if (this.$parent.checkLogin()) {
  170 + // 通用跳转跳转到商品详情页新打开webview
  171 + if (typeof this.$parent.gotoDetail === 'function') {
177 172
178 - // 设置跳转参数  
179 - let params = {  
180 - type: '5',  
181 - to: window.location.origin + '/html/select_good/1/#/healthGoodDetails?goodsId=' + item.id,  
182 - shop_type: ''  
183 - }; 173 + // 设置跳转参数
  174 + let params = {
  175 + type: '5',
  176 + to: window.location.origin + '/html/select_good/1/#/healthGoodDetails?goodsId=' + item.id,
  177 + shop_type: ''
  178 + };
184 179
185 - // 页面跳转  
186 - this.$parent.gotoDetail(params); 180 + // 页面跳转
  181 + this.$parent.gotoDetail(params);
  182 + }
187 } 183 }
188 } 184 }
189 }, 185 },
src/pages/pointsMall/pointsMall.vue
@@ -189,13 +189,16 @@ export default { @@ -189,13 +189,16 @@ export default {
189 */ 189 */
190 toExchangeRecord () { 190 toExchangeRecord () {
191 if (this.isCNLive.value) { 191 if (this.isCNLive.value) {
192 - this.$router.push({  
193 - path: '/pointsExchangeRecords',  
194 - query: {  
195 - uid: this.getStore("uid"),  
196 - type: 3 // 1亲子嘉年华 2 康疫健步 3 积分商城 4 脐橙 7 健康商城  
197 - }  
198 - }) 192 + // 校验登录
  193 + if (this.$parent.checkLogin()) {
  194 + this.$router.push({
  195 + path: '/pointsExchangeRecords',
  196 + query: {
  197 + uid: this.getStore("uid"),
  198 + type: 3 // 1亲子嘉年华 2 康疫健步 3 积分商城 4 脐橙 7 健康商城
  199 + }
  200 + })
  201 + }
199 } else { 202 } else {
200 this.$parent.callApp(); 203 this.$parent.callApp();
201 } 204 }
@@ -207,14 +210,17 @@ export default { @@ -207,14 +210,17 @@ export default {
207 jumpClientIntegralList () { 210 jumpClientIntegralList () {
208 // 判断APP内 211 // 判断APP内
209 if (this.isCNLive.value) { 212 if (this.isCNLive.value) {
210 - // (判断app内是否有该方法)  
211 - if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.jumpClientIntegralList) {  
212 - // 跳转到原生的任务列表  
213 - window.webkit.messageHandlers.jumpClientIntegralList.postMessage({ body: {} });  
214 - } else if (window.obj && window.obj.jumpClientIntegralList) {  
215 - // 跳转到原生的任务列表  
216 - window.obj.jumpClientIntegralList();  
217 - } 213 + // 校验登录
  214 + if (this.$parent.checkLogin()) {
  215 + // (判断app内是否有该方法)
  216 + if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.jumpClientIntegralList) {
  217 + // 跳转到原生的任务列表
  218 + window.webkit.messageHandlers.jumpClientIntegralList.postMessage({ body: {} });
  219 + } else if (window.obj && window.obj.jumpClientIntegralList) {
  220 + // 跳转到原生的任务列表
  221 + window.obj.jumpClientIntegralList();
  222 + }
  223 + }
218 } else { 224 } else {
219 this.$parent.callApp(); 225 this.$parent.callApp();
220 } 226 }
@@ -225,26 +231,22 @@ export default { @@ -225,26 +231,22 @@ export default {
225 */ 231 */
226 toDetail (item) { 232 toDetail (item) {
227 if (this.isCNLive.value) { 233 if (this.isCNLive.value) {
228 - // this.$router.push({  
229 - // path: "/goodDetails",  
230 - // query: {  
231 - // goodsId: item.id,  
232 - // uid: this.getStore("uid")  
233 - // }  
234 - // })  
235 - // 通用跳转跳转到商品详情页新打开webview  
236 - if (typeof this.$parent.gotoDetail === 'function') {  
237 -  
238 - // 设置跳转参数  
239 - let params = {  
240 - type: '5',  
241 - to: window.location.origin + '/html/select_good/1/#/goodDetails?goodsId=' + item.id,  
242 - shop_type: ''  
243 - };  
244 -  
245 - // 页面跳转  
246 - this.$parent.gotoDetail(params);  
247 - } 234 + // 校验登录
  235 + if (this.$parent.checkLogin()) {
  236 + // 通用跳转跳转到商品详情页新打开webview
  237 + if (typeof this.$parent.gotoDetail === 'function') {
  238 +
  239 + // 设置跳转参数
  240 + let params = {
  241 + type: '5',
  242 + to: window.location.origin + '/html/select_good/1/#/goodDetails?goodsId=' + item.id,
  243 + shop_type: ''
  244 + };
  245 +
  246 + // 页面跳转
  247 + this.$parent.gotoDetail(params);
  248 + }
  249 + }
248 } else { 250 } else {
249 this.$parent.callApp(); 251 this.$parent.callApp();
250 } 252 }