From 705909e14fe4e9f2fc261ee4eb40a8b41fa2f6d4 Mon Sep 17 00:00:00 2001 From: wzp <2880584989@qq.com> Date: 星期二, 12 七月 2022 17:37:26 +0800 Subject: [PATCH] 增加免密登陆的token --- web/web/GwProduct.ashx | 86 +++++++++++++++++++++++++------------------ 1 files changed, 50 insertions(+), 36 deletions(-) diff --git a/web/web/GwProduct.ashx b/web/web/GwProduct.ashx index 829c88d..c6048c6 100644 --- a/web/web/GwProduct.ashx +++ b/web/web/GwProduct.ashx @@ -265,6 +265,26 @@ int ctGroupid = 0; int price = 0; int givingNum = 0; + + string parentId = context.GetString("parentId", ""); + string path = ""; + if (string.IsNullOrEmpty(parentId) ) + { + path = "0"; + } + else + { + GwProduct newProduct = _Dao.Get(parentId); + if(newProduct!=null) + { + path = newProduct.Path=="" ? "0" : newProduct.Path + "," + newProduct.Id ; + } + else + { + path = "0"; + } + + } string info = "" ; if (classes == -1) { @@ -278,6 +298,11 @@ if (string.IsNullOrEmpty(name)) { throw new ArgumentException(info + "鍚嶇О涓嶈兘涓虹┖锛�"); + } + + if (string.IsNullOrEmpty(parentId)) + { + throw new ArgumentException("鎵�灞炰骇鍝佺被鍒笉鑳戒负绌猴紒"); } } @@ -326,25 +351,7 @@ } } - string parentId = context.GetString("parentId", "0"); - string path = ""; - if (parentId.Equals("0")) - { - path = "0"; - } - else - { - GwProduct newProduct = _Dao.Get(parentId); - if(newProduct!=null) - { - path = newProduct.Path=="" ? "0" : newProduct.Path + "," + newProduct.Id ; - } - else - { - path = "0"; - } - } int isEnable = context.GetInt("isEnable", 0); //int price = context.GetInt("price", 0); @@ -446,6 +453,26 @@ int ctGroupid = 0; int price = 0; int givingNum = 0; + + string parentId = context.GetString("parentId", ""); + string path = ""; + if (string.IsNullOrEmpty(parentId) ) + { + path = "0"; + } + else + { + GwProduct newProduct = _Dao.Get(parentId); + if(newProduct!=null) + { + path = newProduct.Path=="" ? "0" : newProduct.Path + "," + newProduct.Id ; + } + else + { + path = "0"; + } + + } string info = "" ; if (classes == -1) { @@ -459,6 +486,11 @@ if (string.IsNullOrEmpty(name)) { throw new ArgumentException(info + "鍚嶇О涓嶈兘涓虹┖锛�"); + } + + if (string.IsNullOrEmpty(parentId)) + { + throw new ArgumentException("鎵�灞炰骇鍝佺被鍒笉鑳戒负绌猴紒"); } } @@ -508,25 +540,7 @@ } } - string parentId = context.GetString("parentId", "0"); - string path = ""; - if (parentId.Equals("0")) - { - path = "0"; - } - else - { - GwProduct newProduct = _Dao.Get(parentId); - if(newProduct!=null) - { - path = newProduct.Path=="" ? "0" : newProduct.Path + "," + newProduct.Id ; - } - else - { - path = "0"; - } - } int isEnable = context.GetInt("isEnable", 0); string remark = context.GetString("remark", ""); -- Gitblit v1.9.1