Pārlūkot izejas kodu

调整全局搜索

陈龙 1 gadu atpakaļ
vecāks
revīzija
f6fbf359d4
18 mainītis faili ar 192 papildinājumiem un 116 dzēšanām
  1. 2 0
      .gitignore
  2. 8 0
      doc/游服务器.txt
  3. 1 0
      src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Befri.Goldhoo.Mobile.MvcUI.csproj
  4. 3 3
      src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Content/themes/Client/login/js/login.js
  5. 3 3
      src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Content/themes/Client/version1/replenishOrder/replenishOrder.saveDetails.js
  6. 65 20
      src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Content/themes/Client/version1/search/search.index.js
  7. 2 2
      src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Content/themes/SUI/README.md
  8. 11 0
      src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Content/themes/SUI/UpdateLog.md
  9. 15 3
      src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Content/themes/SUI/extend/gallery/sui.checkGallery.js
  10. 6 2
      src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Content/themes/SUI/extend/gallery/sui.gallery.js
  11. 26 53
      src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Content/themes/SUI/src/sleep.js
  12. 0 0
      src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Content/themes/SUI/src/sui.main-min.js
  13. 4 4
      src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Content/themes/SUI/src/sui.main.js
  14. 13 13
      src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Controllers/AccountController.cs
  15. 1 1
      src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Views/Account/Login.cshtml
  16. 27 7
      src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Views/Search/Index.cshtml
  17. 3 3
      src/Befri.Goldhoo/Befri.Goldhoo.MvcUI/Web.config
  18. 2 2
      src/Befri.Goldhoo/Befri.Goldhoo.WebApi/Web.config

+ 2 - 0
.gitignore

@@ -108,3 +108,5 @@ _UpgradeReport_Files/
 Backup*/
 UpgradeLog*.XML
 
+/src/Befri.Goldhoo/.vs
+/src/Befri.Goldhoo/.vs

+ 8 - 0
doc/游服务器.txt

@@ -0,0 +1,8 @@
+171.220.242.38
+
+sa
+
+5tgb*UHB
+
+Administrator
+YSJ83823806..

+ 1 - 0
src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Befri.Goldhoo.Mobile.MvcUI.csproj

@@ -1205,6 +1205,7 @@
     <Content Include="fonts\glyphicons-halflings-regular.eot" />
     <Content Include="Content\themes\Client\version1\src\checkbox.md" />
     <Content Include="Content\themes\Client\version1\replenishOrder\replenishOrder.list.css" />
+    <Content Include="Content\themes\SUI\LICENSE" />
     <None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
     <Content Include="Scripts\bootstrap.js" />
     <Content Include="Scripts\bootstrap.min.js" />

+ 3 - 3
src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Content/themes/Client/login/js/login.js

@@ -2,8 +2,8 @@
  * Login
  * 登陆 程序
  * 基于 jQuery 和 SUI 库开发的程序,适用于 Web 应用程序
- * 当前版本:1.2.4
- * 更新日期:2022/06/17
+ * 当前版本:1.2.5
+ * 更新日期:2024/07/31
  * 依赖:
  *   jQuery
  *   SUI
@@ -105,7 +105,7 @@ $(function () {
      * @param {any} err
      */
     App.OnError = function (err) {
-        btn.html('&emsp;&emsp;录');
+        btn.html('&emsp;&emsp;录');
         err.Message = err.Message.replace('LoginName', '账号');
         err.Message = err.Message.replace('Password', '密码');
         err.Message = err.Message.replace('ValidateCode', '验证码');

+ 3 - 3
src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Content/themes/Client/version1/replenishOrder/replenishOrder.saveDetails.js

@@ -178,13 +178,13 @@ var App = new Application();
             dom += '<div class="image-name">' + name + '</div>';
             dom += '<div class="image-box"></div>';
             dom += '<div class="image-toolbar">';
-            dom += '<p><button class="sui-button button-primary" onclick="App.UploadResource(\'' + id + '\')"><i class="fa fa-upload"></i>上传</button></p>';
-            dom += '<p><button class="sui-button button-danger" onclick="App.RemoveCusReplenishResource(\'' + id + '\')"><i class="fa fa-remove"></i>移出</button></p>';
+            dom += '<p><button class="sui-button button-primary" onclick="App.UploadResource(\'' + id + '\')"><i class="fa fa-upload" style="margin-right: 5px;"></i>上传</button></p>';
+            dom += '<p><button class="sui-button button-danger" onclick="App.RemoveCusReplenishResource(\'' + id + '\')"><i class="fas fa-times" style="margin-right: 5px;"></i>删除</button></p>';
             dom += '</div></div>';
         }
         dom += '<div class="replenish-image-item image-new" id="image-new">';
         dom += '<div class="image-new-box" onclick="App.UploadResource(\'image-new\')">';
-        dom += '<div class="image-new-icon fa fa-plus-square-o"></div>';
+        dom += '<div class="image-new-icon fas fa-plus"></div>';
         dom += '<div class="image-new-text">新增</div>';
         dom += '</div></div>';
         images.html(dom);

+ 65 - 20
src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Content/themes/Client/version1/search/search.index.js

@@ -1,6 +1,7 @@
 /**
  * 搜索·主页
- * 2024/5/19
+ * 2024/7/31
+ * version: 1.0.1
  */
 
 !(() => {
@@ -375,7 +376,7 @@
 
             // 按钮
             dom += '<div class="checkGallery-item-block checkGallery-button">';
-            dom += '<div class="checkGallery-content"><button class="sui-button button-warning" onclick="App.CreateOrder(\'' + data.ItemId + '\')"><i class="fa fa-list-alt"></i>生成订单</button></div></div>';
+            dom += '<div class="checkGallery-content"><button class="sui-button button-warning" onclick="$.page.replenishCreateOrder(\'' + data.ItemId + '\')"><i class="fa fa-list-alt"></i>生成订单</button></div></div>';
 
             // 备注
             if (!String.IsNullOrWhiteSpace(data.Description)) {
@@ -449,20 +450,20 @@
             if (String.IsNullOrWhiteSpace(inventoryId)) {
                 return;
             }
-            if (App.IsBusy) {
+            if (isAddToCart) {
                 return Sys.ShowBusy();
             }
             if (String.IsNullOrWhiteSpace(Sys.Config.CreateReplenishOrderUrl)) {
                 return Sys.Warning('CreateReplenishOrderUrl 未配置。');
             }
             Sys.Loading('正在处理');
-            App.IsBusy = true;
+            isAddToCart = true;
             SUI.Ajax({
                 url: Sys.Config.CreateReplenishOrderUrl,
                 type: 'post',
                 data: Object.ToDonetParameter({ InventoryId: inventoryId }),
                 success: function (result) {
-                    App.IsBusy = false;
+                    isAddToCart = false;
                     // Sys.Loading('./Close');
                     // var dom = '<p style="font-size: 18px;"><i class="fa fa-check-circle" style="font-size: 24px; color: #b9e563; padding-right: 6px;"></i>生成补件订单成功!</p><p style="margin-top:20px; text-align: center"><a class="sui-button button-primary" href="';
                     // dom += Sys.Config.ReplenishOrderDetailsUrl + '?replenishOrderId=';
@@ -473,7 +474,7 @@
                     window.location.href = Sys.Config.ReplenishOrderDetailsUrl + '?replenishOrderId=' + result.ReplenishOrderId;
                 },
                 error: function (result) {
-                    App.IsBusy = false;
+                    isAddToCart = false;
                     Sys.Loading('./Close');
                     Sys.Danger(result.Message);
                 }
@@ -489,6 +490,25 @@
             return this.onCreateProdoctItems(data);
         }
 
+        /**
+        * 获取清仓区·产品组件标签dom
+        * @param {object} data 数据
+        */
+        this.getClearanLabelDom = function (data) {
+            var dom = '<div style="position: absolute;; top:0; right:0">';
+            if (data.IsHot) {
+                dom += '<div class="label label-certificate-warning">热销</div>';
+            }
+            if (data.IsNew) {
+                dom += '<div class="label label-certificate-danger">新品</div>';
+            }
+            if (data.IsRecommend) {
+                dom += '<div class="label label-certificate-roya">推荐</div>';
+            }
+            dom += '</div>';
+            return dom;
+        }
+
         /**
          * 获取清仓区·产品内容dom
          * @param {object} data 数据
@@ -501,13 +521,14 @@
             data.ItemName = String.IsNullOrWhiteSpace(data.ItemName) ? '' : data.ItemName;
             data.ItemNumber = String.IsNullOrWhiteSpace(data.ItemNumber) ? '' : data.ItemNumber;
             data.ItemId = parseInt(data.ItemId);
-            isNaN(data.ItemId) ? data.ItemId = 0 : true;
+            isNaN(data.ItemId) ? data.ItemId = -1 : true;
             data.CombtItemId = parseInt(data.CombtItemId);
             isNaN(data.CombtItemId) ? data.CombtItemId = 0 : true;
             data.Href = String.IsNullOrWhiteSpace(data.Href) ? '' : data.Href;
             data.Spec = String.IsNullOrWhiteSpace(data.Spec) ? '' : data.Spec;
             data.Description = String.IsNullOrWhiteSpace(data.Description) ? '' : data.Description;
             typeof data.IsCustomizable === 'boolean' ? true : data.SalesPrice = false;
+            data.InventoryAcc = Number.IsNullOrEmpty(data.InventoryAcc) ? '-' : data.InventoryAcc;
             data.DeliveryCycle = parseInt(data.DeliveryCycle);
             data.DeliveryCycle = isNaN(data.DeliveryCycle) ? '' : data.DeliveryCycle;
             data.DeliveryCycleStr = String.IsNullOrWhiteSpace(data.DeliveryCycleStr) ? '' : data.DeliveryCycleStr;
@@ -516,9 +537,10 @@
             dom += '<div class="checkGallery-item-block checkGallery-title">';
 
             // 品名
-            dom += '<div class="checkGallery-content">';
+            dom += '<div class="checkGallery-content checkGallery-content-title">';
             if (this.Options.ATarget === '_child') {
-                dom += '<a href="javascript:;">';
+                dom += '<a href="javascript:void(0)"';
+                dom += ' onclick="CheckGallery.CreateChild(\'' + data.Href + '\')">';
                 dom += data.ItemName + '</a>';
             }
             else {
@@ -532,12 +554,6 @@
             dom += '<div class="checkGallery-content data-itemId" value="' + data.ItemId + '">';
             dom += '料号:' + data.ItemNumber + '</div>';
 
-            // 内容块结束
-            dom += '</div>';
-
-            // 价格
-            dom += '<div class="checkGallery-item-block checkGallery-property">';
-
             // 规格
             dom += '<div class="checkGallery-content data-combtItemId" value="' + data.CombtItemId;
             dom += '">规格:' + data.Spec + '</div>';
@@ -546,23 +562,52 @@
             dom += '<div class="checkGallery-content">生产属性:';
             dom += (data.ProductionPropertyText || '') + '</div>';
 
+            // 内容块结束
             dom += '</div>';
 
-            // 按钮
+            // 价格
+            dom += '<div class="checkGallery-item-block checkGallery-property">';
+            dom += '<div class="checkGallery-content">价格:¥ ';
+            dom += '<span class="data-price" value="' + data.SalesPrice + '">';
+            dom += String.AmountFormat(data.SalesPrice, 2) + '</div>';
+
+            // 折扣
+            var coef = parseInt(data.DiscountCoef);
+            if (!isNaN(coef)) {
+                dom += '<div class="checkGallery-content">折扣:';
+                dom += coef + '%</div>';
+            };
+
+            // 运费
+            dom += '<div class="checkGallery-content">运费:¥ ';
+            dom += '<span class="data-freight" value="' + data.Freight + '">';
+            dom += String.AmountFormat(data.Freight, 2) + '</span></div>';
+
+            // 小计
+            dom += '<div class="checkGallery-content">小计:¥ <span class="data-total">';
+            dom += String.AmountFormat(data.SalesPrice, 2) + '</span></div></div>';
+
+            // 数量
             dom += '<div class="checkGallery-item-block checkGallery-button">';
-            dom += '<div class="checkGallery-content"><button class="sui-button button-warning" onclick="App.CreateOrder(\'' + data.ItemId + '\')"><i class="fa fa-list-alt"></i>生成订单</button></div></div>';
+            dom += '<div class="checkGallery-content">发货周期:' + data.DeliveryCycleStr + '</div>';
+            dom += '<div class="checkGallery-content">数量:';
+            dom += '<button class="sui-button" onclick="CheckGallery.PlusQuantity(-1, this)">-</button>';
+            dom += '<input class="sui-input data-quantity" style="width:36px;text-align:center;" value="1" readonly>';
+            dom += '<button class="sui-button" onclick="CheckGallery.PlusQuantity(1, this)">+</button></div>';
+            dom += '<div class="checkGallery-content">库存:' + data.InventoryAcc + '</div>';
+            dom += '<div class="checkGallery-content"><button class="sui-button button-danger" onclick="CheckGallery.AddToCart(this)"><i class="fas fa-shopping-cart"></i>加入购物车</button></div></div>';
 
             // 备注
             if (!String.IsNullOrWhiteSpace(data.Description)) {
-                dom += '<div class="checkGallery-item-block checkGallery-item-all">';
+                dom += '<div class="checkGallery-item-block data-isSpecial" value="true">';
                 dom += '<span class="checkGallery-content" style="display:inline-block; color: #8b0000;">备注:' + data.Description + '</span>';
                 dom += '</div>';
             };
 
             // 特殊规格
             if (data.IsCustomizable) {
-                dom += '<div class="checkGallery-item-block checkGallery-item-all data-isSpecial" value="' + (data.IsCustomizable ? 'true' : 'false') + '">';
-                dom += '<div class="checkGallery-content"><span style="display:inline-block;">特殊规格:</span>';
+                dom += '<div class="checkGallery-item-block data-isSpecial" value="true" style="width:100%">';
+                dom += '<div class="checkGallery-content"><span style="display:inline-block; width:15%">特殊规格:</span>';
                 dom += '<input class="sui-input data-specialSpec" style="width:85%;">';
                 dom += '</div></div>';
             };

+ 2 - 2
src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Content/themes/SUI/README.md

@@ -1,8 +1,8 @@
 # SUI 说明文档
 
-**当前版本:** 1.2.6
+**当前版本:** 1.2.8
 
-**更新日期:** 2024/5/19
+**更新日期:** 2024/7/31
 
 SUI 全称为 Simple User Interface,由**成都能友科技有限责任公司**开发,使用JavaScript、HTML、CSS语言编写,基于前端流行框架jQuery开发的UI组件库。
 

+ 11 - 0
src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Content/themes/SUI/UpdateLog.md

@@ -1,5 +1,16 @@
 # SUI 更新日志
 
+## 版本:1.2.8
+
+**更新时间:2024/7/31**
+
+1. 优化 sui.checkGallery.js 和 sui.gallery.js。
+
+## 版本:1.2.7
+
+**更新时间:2024/6/1**
+
+1. Sleep 方法实用化
 
 ## 版本:1.2.6
 

+ 15 - 3
src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Content/themes/SUI/extend/gallery/sui.checkGallery.js

@@ -2,8 +2,8 @@
     * SUI CheckGallery
     * 画廊 程序
     * 基于 SUI 库开发的组件,适用于 Web 应用程序
-    * 当前版本:1.3.3
-    * 最后更新日期:2024/5/19
+    * 当前版本:1.4.0
+    * 最后更新日期:2024/7/31
     *
     * 贡献:陈龙
     *
@@ -47,7 +47,7 @@
     *   GetItemContentDom: function,获取产品内容dom,不定义时将使用默认方法。
     *   GetCombtItemContentDom: function,获取组合产品内容dom,不定义时将使用默认方法。
     *   GetLabelDom: function,获取产品标签 DOM,不定义时将使用默认方法。
-    *   IsLoadMore: boolean,是否加载更多,默认 false
+    *   IsLoadMore: boolean,是否加载更多,默认 true
     * 方法:
 */
 
@@ -141,6 +141,18 @@ var CheckGallery = new Application('.sui-checkGallery', 'CheckGallery');
             component.GetCombtItemContentDom = CheckGallery.GetCombtItemContentDom;
         }
 
+        if (typeof component.Options.GetLabelDom === 'function') {
+            component.GetLabelDom = component.Options.GetLabelDom;
+        }
+
+        if (typeof component.Options.GetItemContentDom === 'function') {
+            component.GetItemContentDom = component.Options.GetItemContentDom;
+        }
+
+        if (typeof component.Options.GetCombtItemContentDom === 'function') {
+            component.GetCombtItemContentDom = component.Options.GetCombtItemContentDom;
+        }
+
         component.GetItemFlagDom = CheckGallery.GetItemFlagDom; // 获取产品标记 DOM
         component.Data = new Array(); //保存的数据
         component.NewData = new Array(); //新获取的数据

+ 6 - 2
src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Content/themes/SUI/extend/gallery/sui.gallery.js

@@ -2,8 +2,8 @@
 	* SUI Gallery
 	* 画廊 程序
 	* 基于 SUI 库开发的组件,适用于 Web 应用程序
-	* 当前版本:1.1.3
-	* 最后更新日期:2024/5/19
+	* 当前版本:1.2.0
+	* 最后更新日期:2024/7/31
 	*
 	* 贡献:陈龙
 	*
@@ -204,6 +204,10 @@ var Gallery = new Application('.sui-gallery', 'Gallery');
 		// 获取标签 DOM
 		component.GetLabelDom = Gallery.GetLabelDom;
 
+		if (typeof component.Options.GetLabelDom === 'function') {
+			component.GetLabelDom = component.Options.GetLabelDom;
+		}
+
         // 是否加载更多
         component.Options.IsLoadMore = typeof component.Options.IsLoadMore === 'boolean' ? component.Options.IsLoadMore : true;
 

+ 26 - 53
src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Content/themes/SUI/src/sleep.js

@@ -1,57 +1,30 @@
 
-/*Javascript中暂停功能的实现
-Javascript本身没有暂停功能(sleep不能使用)同时 vbscript也不能使用doEvents,故编写此函数实现此功能。
-javascript作为弱对象语言,一个函数也可以作为一个对象使用。
-比如:
- 
-[code]
-function Test(){
- alert("hellow");
- this.NextStep=function(){
- alert("NextStep");
- }
-}
-我们可以这样调用 var myTest=new Test();myTest.NextStep();
-我们做暂停的时候可以吧一个函数分为两部分,暂停操作前的不变,把要在暂停后执行的代码放在this.NextStep中。
-为了控制暂停和继续,我们需要编写两个函数来分别实现暂停和继续功能。
-暂停函数如下:
-*/
-function Pause(obj, iMinSecond) {
-    if (window.eventList == null) window.eventList = new Array();
-    var ind = -1;
-    for (var i = 0; i < window.eventList.length; i++) {
-        if (window.eventList[i] == null) {
-            window.eventList[i] = obj;
-            ind = i;
-            break;
-        }
-    }
-
-    if (ind == -1) {
-        ind = window.eventList.length;
-        window.eventList[ind] = obj;
-    }
-    setTimeout("GoOn(" + ind + ")", 1000);
-}
-/*
-该函数把要暂停的函数放到数组window.eventList里,同时通过setTimeout来调用继续函数。
-继续函数如下:
-*/
+/**
+ * 睡眠
+ * 用法:
+ *  // 睡眠3秒
+ *  await Sleep(3000);
+ *  // 执行后续代码
+ * 
+ *  // 睡眠5秒
+ *  Sleep(3000).then(()=>{
+ *      // 执行后续代码
+ *  });
+ */
 
-function GoOn(ind) {
-    var obj = window.eventList[ind];
-    window.eventList[ind] = null;
-    if (obj.NextStep) obj.NextStep();
-    else obj();
-}
-/*
-该函数调用被暂停的函数的NextStep方法,如果没有这个方法则重新调用该函数。
-函数编写完毕,我们可以作如下册是:
-*/
-function Test() {
-    alert("hellow");
-    Pause(this, 1000);//调用暂停函数
-    this.NextStep = function () {
-        alert("NextStep");
+/**
+ * 睡眠
+ * @param {number} delay 等待的时间,单位是毫秒
+ * @returns 
+ */
+function Sleep(delay) {
+    if (typeof delay !== 'number' || isNaN(delay) || delay <= 0) {
+        delay = 0;
     }
+    return new Promise((resolve, reject) => {
+        let timer = setTimeout(() => {
+            resolve();
+            clearTimeout(timer);
+        }, delay);
+    });
 }

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Content/themes/SUI/src/sui.main-min.js


+ 4 - 4
src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Content/themes/SUI/src/sui.main.js

@@ -1,8 +1,8 @@
 /*
  * SUI Web
  * 基于 jQuery 的 UI 库,适用于 Web 应用程序
- * 当前版本:1.2.5
- * 最后更新日期:2024/5/19
+ * 当前版本:1.2.8
+ * 最后更新日期:2024/7/31
  * 依赖:
  *	jQuery
  * 贡献:陈龙
@@ -988,10 +988,10 @@ window.DoGetCaretPosition = function (oField) {
  */
 var SUI = new function () {
     // SUI 版本号
-    this.Version = '1.2.6';
+    this.Version = '1.2.8';
 
     // SUI 更新时间
-    this.UpdateDate = Date.DateFormat('2024/5/19');
+    this.UpdateDate = Date.DateFormat('2024/7/31');
 
     // SUI 文件路径
     this.Path = '';

+ 13 - 13
src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Controllers/AccountController.cs

@@ -90,19 +90,19 @@ namespace Befri.Goldhoo.Mobile.MvcUI.Controllers
 
                 Client client = new Client();
 
-                var regex = new Regex("/ /g");
-                var checkIP = regex.Replace(user.CheckIP, "");
-                foreach (var ip in client.IPs)
-                {
-                    if (ip == "127.0.0.1")
-                    {
-                        break;
-                    }
-                    if (String.IsNullOrWhiteSpace(checkIP) || ip != checkIP)
-                    {
-                        throw new ApplicationException(String.Format("当前IP地址({0})与许可IP地址不一致,请联系管理员。", ip));
-                    }
-                }
+                //var regex = new Regex("/ /g");
+                //var checkIP = regex.Replace(user.CheckIP, "");
+                //foreach (var ip in client.IPs)
+                //{
+                //    if (ip == "127.0.0.1")
+                //    {
+                //        break;
+                //    }
+                //    if (String.IsNullOrWhiteSpace(checkIP) || ip != checkIP)
+                //    {
+                //        throw new ApplicationException(String.Format("当前IP地址({0})与许可IP地址不一致,请联系管理员。", ip));
+                //    }
+                //}
 
                 if (user.RemainCount < 1)
                 {

+ 1 - 1
src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Views/Account/Login.cshtml

@@ -7,7 +7,7 @@
     <link href="@Url.Content("~/Content/themes/Client/login/themes/" + Befri.Goldhoo.Mobile.MvcUI.WebConstants.THEMES + "/style.css")?v=0.0.1" rel="stylesheet" />
     <script src="@Url.Content("~/Content/themes/SUI/extend/checkbox/checkbox.js")?v=1.2.0"></script>
     <script src="@Url.Content("~/Content/themes/Client/login/js/system.js")?v=1"></script>
-    <script src="@Url.Content("~/Content/themes/Client/login/js/login.js")?v=1.2.4"></script>
+    <script src="@Url.Content("~/Content/themes/Client/login/js/login.js")?v=1.2.5"></script>
     <script src="@Url.Content("~/Content/themes/SUI/extend/loginHelper/sui.loginHelper.js")?v=0.3.1"></script>
 }
 

+ 27 - 7
src/Befri.Goldhoo/Befri.Goldhoo.Mobile.MvcUI/Views/Search/Index.cshtml

@@ -18,12 +18,12 @@
     <!-- 补件中心·商品列表 -->
     <div class="search-title">补件中心</div>
     <!-- 产品列表 sui/extend/gallery/sui.checkGallery.js -->
-    <div class="sui-checkGallery" data-sui-options="PageSize: 20, Url: '@Url.Content("~/Replenish/List")', Theme: 'gallery-theme-Gray', OnBeforeLoad: $.page.onBeforeLoad, GetItemContentDom: $.page.getReplenishItemContentDom, GetCombtItemContentDom: $.page.getReplenishCombtItemContentDom, OnClickAddToCart: $.page.replenishCreateOrder, ATarget: '_child', MaxWidth: 1920, ImageWidth: 130, ScaleX: 8, ScaleY: 5, IsLoadMore: false"></div>
+    <div id="ReplenishCheckGallery" class="sui-checkGallery" data-sui-options="PageSize: 20, Url: '@Url.Content("~/Replenish/List")', Theme: 'gallery-theme-Gray', OnBeforeLoad: $.page.onBeforeLoad, GetItemContentDom: $.page.getReplenishItemContentDom, GetCombtItemContentDom: $.page.getReplenishCombtItemContentDom, OnClickAddToCart: $.page.replenishCreateOrder, ATarget: '_child', MaxWidth: 1920, ImageWidth: 130, ScaleX: 8, ScaleY: 5, IsLoadMore: false"></div>
 
     <!-- 清仓区·商品列表 -->
     <div class="search-title">清仓区</div>
     <!-- 产品列表 sui/extend/gallery/sui.checkGallery.js -->
-    <div class="sui-checkGallery" data-sui-options="PageSize: 20, Url: '@Url.Content("~/Clearance/List")', Theme: 'gallery-theme-Gray', OnBeforeLoad: $.page.onBeforeLoad, GetItemContentDom: $.page.getClearanItemContentDom, GetCombtItemContentDom: $.page.getClearanCombtItemContentDom, OnClickAddToCart: $.page.productAddToCart, ATarget: '_child', MaxWidth: 1920, IsLoadMore: false"></div>
+    <div class="sui-checkGallery" data-sui-options="PageSize: 20, Url: '@Url.Content("~/Clearance/List")', Theme: 'gallery-theme-Gray', OnBeforeLoad: $.page.onBeforeLoad, GetLabelDom: $.page.getClearanLabelDom, GetItemContentDom: $.page.getClearanItemContentDom, GetCombtItemContentDom: $.page.getClearanCombtItemContentDom, OnClickAddToCart: $.page.productAddToCart, ATarget: '_child', MaxWidth: 1920, IsLoadMore: false"></div>
 
     <!-- 折扣区·商品列表 -->
     <div class="search-title">折扣区</div>
@@ -31,11 +31,31 @@
     <div class="sui-checkGallery" data-sui-options="PageSize: 20, Url: '@Url.Content("~/Discount/List")', Theme: 'gallery-theme-Gray', OnBeforeLoad: $.page.onBeforeLoad, GetItemContentDom: $.page.getDiscountItemContentDom, GetCombtItemContentDom: $.page.getDiscountCombtItemContentDom, OnClickAddToCart: $.page.productAddToCart, ATarget: '_child', MaxWidth: 1920, IsLoadMore: false"></div>
 </div>
 
-<link href="@Url.Content("~/Content/themes/SUI/extend/gallery/themes/sui.checkGallery.css")?v=1.3.3" rel="stylesheet" />
-<script src="@Url.Content("~/Content/themes/SUI/extend/gallery/sui.checkGallery.js")?v=1.3.3"></script>
-<link href="@Url.Content("~/Content/themes/SUI/extend/gallery/themes/sui.gallery.css")?v=1.1.3" rel="stylesheet" />
-<script src="@Url.Content("~/Content/themes/SUI/extend/gallery/sui.gallery.js")?v=1.1.3"></script>
-<script src="@Url.Content("~/Content/themes/Client/version1/search/search.index.js")"></script>
+<link href="@Url.Content("~/Content/themes/SUI/extend/gallery/themes/sui.checkGallery.css")?v=1.4.0" rel="stylesheet" />
+<script src="@Url.Content("~/Content/themes/SUI/extend/gallery/sui.checkGallery.js")?v=1.4.0"></script>
+<link href="@Url.Content("~/Content/themes/SUI/extend/gallery/themes/sui.gallery.css")?v=1.2.0" rel="stylesheet" />
+<script src="@Url.Content("~/Content/themes/SUI/extend/gallery/sui.gallery.js")?v=1.2.0"></script>
+<script src="@Url.Content("~/Content/themes/Client/version1/search/search.index.js")?v=1.0.1"></script>
+<style>
+    .checkGallery-item-block.data-isSpecial {
+        position: relative;
+        width: 100%;
+        padding-left: 14%;
+    }
+
+    .checkGallery-member .data-isSpecial {
+        padding-left: 0 !important;
+    }
+</style>
 <script>
     $.search.setSearchText('@Model.SearchText');
+
+    // 加入购物车地址
+    Sys.Config.Add('AddToCartUrl', '@Url.Content("~/ShoppingCart/AddToCart")');
+
+    // 补件加入购物车地址
+    Sys.Config.Add('CreateReplenishOrderUrl', '@Url.Content("~/ReplenishOrder/Create")');
+
+    // 补件订单明细页
+    Sys.Config.Add('ReplenishOrderDetailsUrl', '@Url.Content("~/ReplenishOrder/Details")');
 </script>

+ 3 - 3
src/Befri.Goldhoo/Befri.Goldhoo.MvcUI/Web.config

@@ -14,11 +14,11 @@
       <add name="sqlProvider" type="Befri.Web.Mvc.Security.SqlUserPrivilegeProvider, Befri.Web.Mvc" defaultDatabase="localhost" userModPrivilegesProcName="[Admin].[p_GetUserPrivilegesByLoginName]"></add>
     </providers>
   </userPrivilegeProvider>
-  <dataConfiguration defaultDatabase="localhost" />
+  <dataConfiguration defaultDatabase="Test_Goldhoo" />
   <connectionStrings>
     <add name="befri_Goldhoo" connectionString="data source=106.15.35.130;packet size=4096;user id=sa;Password=jinhu2016!;persist security info=False;initial catalog=befri_Goldhoo;" providerName="System.Data.SqlClient" />
-    <add name="Test_Goldhoo" connectionString="data source=39.106.194.30\SQL2012,11433;packet size=4096;user id=sa;Password=Befri.2018;persist security info=False;initial catalog=befri_Goldhoo;" providerName="System.Data.SqlClient" />
-    <add name="localhost" connectionString="data source=localhost;packet size=4096;user id=sa;Password=123456;persist security info=False;initial catalog=befri_Goldhoo;" providerName="System.Data.SqlClient" />
+	<add name="Test_Goldhoo" connectionString="data source=171.220.242.38;packet size=4096;user id=sa;Password=5tgb*UHB;persist security info=False;initial catalog=befri_Goldhoo;" providerName="System.Data.SqlClient" />
+	<add name="localhost" connectionString="data source=localhost;packet size=4096;user id=sa;Password=123456;persist security info=False;initial catalog=befri_Goldhoo;" providerName="System.Data.SqlClient" />
   </connectionStrings>
   <exceptionHandling>
     <exceptionPolicies>

+ 2 - 2
src/Befri.Goldhoo/Befri.Goldhoo.WebApi/Web.config

@@ -15,9 +15,9 @@
       <add name="sqlProvider" type="Befri.Web.Mvc.Security.SqlUserPrivilegeProvider, Befri.Web.Mvc" defaultDatabase="localhost"></add>
     </providers>
   </userPrivilegeProvider>
-  <dataConfiguration defaultDatabase="localhost" />
+  <dataConfiguration defaultDatabase="Test_Goldhoo" />
   <connectionStrings>
-    <add name="Test_Goldhoo" connectionString="data source=39.106.194.30\SQL2012,11433;packet size=4096;user id=sa;Password=Befri.2018;persist security info=False;initial catalog=befri_Goldhoo;" providerName="System.Data.SqlClient" />
+	<add name="Test_Goldhoo" connectionString="data source=171.220.242.38;packet size=4096;user id=sa;Password=5tgb*UHB;persist security info=False;initial catalog=befri_Goldhoo;" providerName="System.Data.SqlClient" />
     <add name="localhost" connectionString="data source=localhost;packet size=4096;user id=sa;Password=123456;persist security info=False;initial catalog=befri_Goldhoo;" providerName="System.Data.SqlClient" />
   </connectionStrings>
   <exceptionHandling>

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels