合并
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<select class="form-control m-b" name="KId" id="KId">
|
||||
@foreach (var m in ViewBag.ListKinds)
|
||||
{
|
||||
<option value="@m.Id">@m.KindName</option>
|
||||
<option value="@m.Id" @(ViewBag.lastkid == m.Id?"selected":"")>@m.KindName</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MailKit" Version="2.1.0.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.6" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.6" />
|
||||
<PackageReference Include="MailKit" Version="2.1.0.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.0" />
|
||||
<PackageReference Include="MimeKit" Version="2.1.0" />
|
||||
<PackageReference Include="MySql.Data" Version="8.0.13" />
|
||||
<PackageReference Include="NewLife.XCode" Version="9.9.6881.41312" />
|
||||
<PackageReference Include="NewLife.XCode" Version="9.9.6911.41890" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
|
||||
<PackageReference Include="Senparc.Weixin" Version="6.2.1" />
|
||||
<PackageReference Include="Senparc.Weixin.MP" Version="16.5.1" />
|
||||
<PackageReference Include="Senparc.Weixin.MP" Version="16.5.2.1" />
|
||||
<PackageReference Include="Senparc.Weixin.TenPay" Version="1.0.2" />
|
||||
<PackageReference Include="Senparc.Weixin.WxOpen" Version="3.2.1" />
|
||||
<PackageReference Include="System.Data.SqlClient" Version="4.5.1" />
|
||||
<PackageReference Include="Senparc.Weixin.WxOpen" Version="3.2.2.1" />
|
||||
<PackageReference Include="System.Data.SqlClient" Version="4.6.0" />
|
||||
<PackageReference Include="ZKWeb.System.Drawing" Version="4.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ using XCode;
|
||||
using System.Web;
|
||||
using COMCMS.Web.Filter;
|
||||
using NewLife.Log;
|
||||
using static COMCMS.Web.Models.APIModels;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Senparc.Weixin.WxOpen;
|
||||
|
||||
@@ -11,7 +11,6 @@ using XCode;
|
||||
using System.Web;
|
||||
using COMCMS.Web.Filter;
|
||||
using NewLife.Log;
|
||||
using static COMCMS.Web.Models.APIModels;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Senparc.Weixin.WxOpen;
|
||||
|
||||
@@ -11,10 +11,10 @@ using XCode;
|
||||
using System.Web;
|
||||
using COMCMS.Web.Filter;
|
||||
using NewLife.Log;
|
||||
using static COMCMS.Web.Models.APIModels;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Senparc.Weixin.WxOpen;
|
||||
using COMCMS.Web.Models;
|
||||
|
||||
namespace COMCMS.Web.Controllers.api
|
||||
{
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace COMCMS.Web.Filter
|
||||
string timeStamp = pars["timeStamp"];
|
||||
//判断时间有效性
|
||||
DateTime postTime = Utils.StampToDateTime(timeStamp);
|
||||
if (postTime < DateTime.Now.AddSeconds(-120))//30秒有效期
|
||||
if (postTime < DateTime.UtcNow.AddSeconds(-120))//30秒有效期
|
||||
{
|
||||
return new ReJson(40004, "signature 错误!", 1);
|
||||
}
|
||||
|
||||
@@ -5,57 +5,104 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace COMCMS.Web.Models
|
||||
{
|
||||
public class APIModels
|
||||
#region 修改我的个人资料Model
|
||||
public class APIModMyInfo
|
||||
{
|
||||
#region 修改我的个人资料Model
|
||||
public class APIModMyInfo
|
||||
{
|
||||
public string RealName { get; set; }
|
||||
public string Tel { get; set; }
|
||||
public string Weixin { get; set; }
|
||||
public string Alipay { get; set; }
|
||||
public string BankCardNO { get; set; }
|
||||
public string Bank { get; set; }
|
||||
public string SessionKey { get; set; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 小程序获得用户信息
|
||||
/// <summary>
|
||||
/// 小程序获得用户信息
|
||||
/// </summary>
|
||||
public class WXAppUserInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户名
|
||||
/// </summary>
|
||||
public string nickName { get; set; }
|
||||
/// <summary>
|
||||
/// 性别 0 未知,1 男,2女
|
||||
/// </summary>
|
||||
public int gender { get; set; }
|
||||
/// <summary>
|
||||
/// 语言
|
||||
/// </summary>
|
||||
public string language { get; set; }
|
||||
/// <summary>
|
||||
/// 城市
|
||||
/// </summary>
|
||||
public string city { get; set; }
|
||||
/// <summary>
|
||||
/// 省份
|
||||
/// </summary>
|
||||
public string province { get; set; }
|
||||
/// <summary>
|
||||
/// 国家
|
||||
/// </summary>
|
||||
public string country { get; set; }
|
||||
/// <summary>
|
||||
/// 用户头像
|
||||
/// </summary>
|
||||
public string avatarUrl { get; set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
public string RealName { get; set; }
|
||||
public string Tel { get; set; }
|
||||
public string Weixin { get; set; }
|
||||
public string Alipay { get; set; }
|
||||
public string BankCardNO { get; set; }
|
||||
public string Bank { get; set; }
|
||||
public string SessionKey { get; set; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 小程序获得用户信息
|
||||
/// <summary>
|
||||
/// 小程序获得用户信息
|
||||
/// </summary>
|
||||
public class WXAppUserInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户名
|
||||
/// </summary>
|
||||
public string nickName { get; set; }
|
||||
/// <summary>
|
||||
/// 性别 0 未知,1 男,2女
|
||||
/// </summary>
|
||||
public int gender { get; set; }
|
||||
/// <summary>
|
||||
/// 语言
|
||||
/// </summary>
|
||||
public string language { get; set; }
|
||||
/// <summary>
|
||||
/// 城市
|
||||
/// </summary>
|
||||
public string city { get; set; }
|
||||
/// <summary>
|
||||
/// 省份
|
||||
/// </summary>
|
||||
public string province { get; set; }
|
||||
/// <summary>
|
||||
/// 国家
|
||||
/// </summary>
|
||||
public string country { get; set; }
|
||||
/// <summary>
|
||||
/// 用户头像
|
||||
/// </summary>
|
||||
public string avatarUrl { get; set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 通用返回信息
|
||||
public class ReJson
|
||||
{
|
||||
public ReJson(string message)
|
||||
{
|
||||
this.message = message;
|
||||
code = 0;
|
||||
}
|
||||
|
||||
public ReJson(int code, string message)
|
||||
{
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public ReJson(int code, string message, int isReload)
|
||||
{
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.isReload = isReload;
|
||||
}
|
||||
|
||||
public ReJson(int code, string message, object detail)
|
||||
{
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.detail = detail;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回代码 0 为正确
|
||||
/// </summary>
|
||||
public int code { get; set; } = 40000;
|
||||
|
||||
/// <summary>
|
||||
/// 提示语
|
||||
/// </summary>
|
||||
public string message { get; set; }
|
||||
/// <summary>
|
||||
/// 是否重新加载
|
||||
/// </summary>
|
||||
public int isReload { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 数据详情 object
|
||||
/// </summary>
|
||||
public object detail { get; set; }
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace COMCMS.Web
|
||||
//部分系统配置
|
||||
services.Configure<SystemSetting>(Configuration.GetSection("SystemSetting"));
|
||||
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); ;
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); ;
|
||||
//防止汉字被自动编码
|
||||
services.Configure<WebEncoderOptions>(options =>
|
||||
{
|
||||
|
||||
+195
-180
@@ -6,7 +6,6 @@
|
||||
ViewBag.description = cfg.Description;
|
||||
|
||||
Article about = ViewBag.about;
|
||||
|
||||
IList<Link> listLinks = Link.FindAll(Link._.KId == 1, Link._.Sequence.Asc(), null, 0, 0);
|
||||
|
||||
//处理bannr广告
|
||||
@@ -18,11 +17,16 @@
|
||||
<div class="banner normal">
|
||||
<div class="swiper-container">
|
||||
<div class="swiper-wrapper">
|
||||
@foreach (var img in bannerPC??new List<ImgAds>())
|
||||
{
|
||||
<div class="swiper-slide">
|
||||
<a href="@img.link" title="@(img.alt)" style="background: url('@img.img') center top no-repeat; background-size:cover"></a>
|
||||
</div>
|
||||
@{
|
||||
if(bannerPC != null && bannerPC.Any())
|
||||
{
|
||||
foreach (var img in bannerPC)
|
||||
{
|
||||
<div class="swiper-slide">
|
||||
<a href="@img.link" title="@(img.alt)" style="background: url('@img.img') center top no-repeat; background-size:cover"></a>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div class="cont">
|
||||
@@ -35,12 +39,17 @@
|
||||
<div class="banner mobile">
|
||||
<div class="swiper-container">
|
||||
<div class="swiper-wrapper">
|
||||
@foreach (var img in bannerPC ?? new List<ImgAds>())
|
||||
{
|
||||
<div class="swiper-slide">
|
||||
<a href="@img.link" title="@(img.alt)" style="background: url('@img.img') center top no-repeat; background-size: 100%;"></a>
|
||||
</div>
|
||||
}
|
||||
@{
|
||||
if(bannerPC != null && bannerPC.Any())
|
||||
{
|
||||
foreach (var img in bannerPC)
|
||||
{
|
||||
<div class="swiper-slide">
|
||||
<a href="@img.link" title="@(img.alt)" style="background: url('@img.img') center top no-repeat; background-size: 100%;"></a>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -192,60 +201,65 @@
|
||||
<small>product display</small>
|
||||
</p>
|
||||
</div>
|
||||
@{
|
||||
//获取前5个商品
|
||||
IList<Product> listPorducts = Product.FindAll(null, null, null, 0, 5);
|
||||
}
|
||||
<div class="i-pro-cont" id="div1">
|
||||
<ul class="i-pro-list">
|
||||
@foreach(var p in listPorducts)
|
||||
{
|
||||
<li>
|
||||
<a asp-controller="Product" asp-action="Detail" asp-route-id="@(p.Id)" title="@(p.Title)">
|
||||
<div class="i-pro-top">
|
||||
<div class="i-pro-pic">
|
||||
<div class="pic-box">
|
||||
<img src="@p.Pic" alt="@(p.Title)">
|
||||
@{
|
||||
//获取前5个商品
|
||||
IList<Product> listPorducts = Product.FindAll(null, null, null, 0, 5);
|
||||
}
|
||||
<div class="i-pro-cont" id="div1">
|
||||
<ul class="i-pro-list">
|
||||
@foreach(var p in listPorducts)
|
||||
{
|
||||
<li>
|
||||
<a asp-controller="Product" asp-action="Detail" asp-route-id="@(p.Id)" title="@(p.Title)">
|
||||
<div class="i-pro-top">
|
||||
<div class="i-pro-pic">
|
||||
<div class="pic-box">
|
||||
<img src="@p.Pic" alt="@(p.Title)">
|
||||
</div>
|
||||
</div>
|
||||
<div class="i-pro-hover">
|
||||
<i></i>
|
||||
<span>@(p.Title)</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="i-pro-hover">
|
||||
<i></i>
|
||||
<div class="i-pro-text mobile">
|
||||
<span>@(p.Title)</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="i-pro-text mobile">
|
||||
<span>@(p.Title)</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function proShow() {
|
||||
mr = parseFloat($('.i-pro-list li').css('margin-right'));
|
||||
var odiv = document.getElementById('div1');
|
||||
var oul = odiv.getElementsByTagName('ul')[0];
|
||||
var ali = oul.getElementsByTagName('li');
|
||||
var spa = -2;
|
||||
oul.innerHTML = oul.innerHTML + oul.innerHTML;
|
||||
oul.style.width = (ali[0].offsetWidth + mr) * ali.length + 3 + 'px';
|
||||
function move() {
|
||||
if (oul.offsetLeft < -oul.offsetWidth / 2) {
|
||||
oul.style.left = 0;
|
||||
}
|
||||
oul.style.left = oul.offsetLeft + spa + 'px';
|
||||
}
|
||||
var timer = setInterval(move, 30);
|
||||
|
||||
odiv.onmousemove = function () { clearInterval(timer); }
|
||||
odiv.onmouseout = function () { timer = setInterval(move, 30) };
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
</script>
|
||||
|
||||
<a asp-controller="Product" asp-action="Index" asp-route-id="1" title="查看更多" class="read-d">查看更多<i></i></a>
|
||||
</ul>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function proShow() {
|
||||
mr = parseFloat($('.i-pro-list li').css('margin-right'));
|
||||
var odiv = document.getElementById('div1');
|
||||
var oul = odiv.getElementsByTagName('ul')[0];
|
||||
var ali = oul.getElementsByTagName('li');
|
||||
var spa = -2;
|
||||
oul.innerHTML = oul.innerHTML + oul.innerHTML;
|
||||
oul.style.width = (ali[0].offsetWidth + mr) * ali.length + 3 + 'px';
|
||||
|
||||
function move() {
|
||||
if (oul.offsetLeft < -oul.offsetWidth / 2) {
|
||||
oul.style.left = 0;
|
||||
}
|
||||
oul.style.left = oul.offsetLeft + spa + 'px';
|
||||
}
|
||||
var timer = setInterval(move, 30);
|
||||
|
||||
odiv.onmousemove = function () {
|
||||
clearInterval(timer);
|
||||
}
|
||||
odiv.onmouseout = function () {
|
||||
timer = setInterval(move, 30)
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<a asp-controller="Product" asp-action="Index" asp-route-id="1" title="查看更多" class="read-d">查看更多<i></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -266,13 +280,14 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="i-news-main">
|
||||
@{
|
||||
IList<Article> listNews1 = Article.FindAll(Article._.KId == 6, Article._.Sequence.Asc(), null, 0, 4);
|
||||
}
|
||||
<div class="i-news-box">
|
||||
<!-- 左边 -->
|
||||
@if (listNews1.Count > 0)
|
||||
{
|
||||
@{
|
||||
IList<Article> listNews1 = Article.FindAll(Article._.KId == 6, Article._.Sequence.Asc(), null, 0,
|
||||
4);
|
||||
}
|
||||
<div class="i-news-box">
|
||||
<!-- 左边 -->
|
||||
@if (listNews1.Count > 0)
|
||||
{
|
||||
<div class="i-news-left">
|
||||
<a href="/article/detail/@listNews1[0].Id" title="@listNews1[0].Title">
|
||||
<div class="i-news-pic">
|
||||
@@ -290,111 +305,110 @@
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
<!-- 右边 -->
|
||||
}
|
||||
<!-- 右边 -->
|
||||
<div class="i-news-right">
|
||||
@if (listNews1.Count > 1)
|
||||
{
|
||||
<ul class="i-news-list">
|
||||
@for(int i=1; i < listNews1.Count; i++) { <li>
|
||||
<a href="/article/detail/@listNews1[i].Id" title="@listNews1[i].Title">
|
||||
<div class="i-news-time">
|
||||
<div class="pic-box">
|
||||
<p>
|
||||
<span>@listNews1[i].AddTime.ToString("dd")</span>
|
||||
<small>@listNews1[i].AddTime.ToString("yyyy-MM")</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="i-news-text2">
|
||||
<span>@listNews1[i].Title</span>
|
||||
<p>@Utils.CutString(Utils.NoHTML(listNews1[i].Content), 100)</p>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
</ul>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="i-news-box">
|
||||
<!-- 左边 -->
|
||||
@{
|
||||
IList<Article> listNews2 = Article.FindAll(Article._.KId == 7, Article._.Sequence.Asc(),
|
||||
null, 0, 4);
|
||||
}
|
||||
@if (listNews2.Count > 0)
|
||||
{
|
||||
<div class="i-news-left">
|
||||
<a href="/article/detail/@listNews2[0].Id" title="@listNews2[0].Title">
|
||||
<div class="i-news-pic">
|
||||
<div class="pic-box">
|
||||
<img src="@listNews2[0].Pic" alt="@listNews2[0].Title">
|
||||
</div>
|
||||
</div>
|
||||
<div class="i-news-text">
|
||||
<p class="i-news-title">
|
||||
<span>@listNews2[0].Title</span>
|
||||
<small>@listNews2[0].AddTime.ToString("yyyy-MM-dd")</small>
|
||||
</p>
|
||||
<p class="i-news-t"><span>@Utils.CutString(Utils.NoHTML(listNews2[0].Content),
|
||||
200)</span></p>
|
||||
<b class="normal read-d">查看详情</b>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
<!-- 右边 -->
|
||||
<div class="i-news-right">
|
||||
@if (listNews2.Count > 1)
|
||||
{
|
||||
<ul class="i-news-list">
|
||||
@for(int i=1; i < listNews1.Count; i++)
|
||||
{
|
||||
<li>
|
||||
<a href="/article/detail/@listNews1[i].Id" title="@listNews1[i].Title">
|
||||
@for (int i = 1; i < listNews2.Count; i++) { <li>
|
||||
<a href="/article/detail/@listNews2[i].Id" title="@listNews2[i].Title">
|
||||
<div class="i-news-time">
|
||||
<div class="pic-box">
|
||||
<p>
|
||||
<span>@listNews1[i].AddTime.ToString("dd")</span>
|
||||
<small>@listNews1[i].AddTime.ToString("yyyy-MM")</small>
|
||||
<span>@listNews2[i].AddTime.ToString("dd")</span>
|
||||
<small>@listNews2[i].AddTime.ToString("yyyy-MM")</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="i-news-text2">
|
||||
<span>@listNews1[i].Title</span>
|
||||
<p>@Utils.CutString(Utils.NoHTML(listNews1[i].Content), 100)</p>
|
||||
<span>@listNews2[i].Title</span>
|
||||
<p>@Utils.CutString(Utils.NoHTML(listNews2[i].Content), 100)</p>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
</ul>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="i-news-box">
|
||||
<!-- 左边 -->
|
||||
@{
|
||||
IList<Article> listNews2 = Article.FindAll(Article._.KId == 7, Article._.Sequence.Asc(), null, 0, 4);
|
||||
}
|
||||
@if (listNews2.Count > 0)
|
||||
{
|
||||
<div class="i-news-left">
|
||||
<a href="/article/detail/@listNews2[0].Id" title="@listNews2[0].Title">
|
||||
<div class="i-news-pic">
|
||||
<div class="pic-box">
|
||||
<img src="@listNews2[0].Pic" alt="@listNews2[0].Title">
|
||||
</div>
|
||||
</div>
|
||||
<div class="i-news-text">
|
||||
<p class="i-news-title">
|
||||
<span>@listNews2[0].Title</span>
|
||||
<small>@listNews2[0].AddTime.ToString("yyyy-MM-dd")</small>
|
||||
</p>
|
||||
<p class="i-news-t"><span>@Utils.CutString(Utils.NoHTML(listNews2[0].Content), 200)</span></p>
|
||||
<b class="normal read-d">查看详情</b>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
<!-- 右边 -->
|
||||
<div class="i-news-right">
|
||||
@if (listNews2.Count > 1)
|
||||
{
|
||||
<ul class="i-news-list">
|
||||
@for (int i = 1; i < listNews2.Count; i++)
|
||||
{
|
||||
<li>
|
||||
<a href="/article/detail/@listNews2[i].Id" title="@listNews2[i].Title">
|
||||
<div class="i-news-time">
|
||||
<div class="pic-box">
|
||||
<p>
|
||||
<span>@listNews2[i].AddTime.ToString("dd")</span>
|
||||
<small>@listNews2[i].AddTime.ToString("yyyy-MM")</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="i-news-text2">
|
||||
<span>@listNews2[i].Title</span>
|
||||
<p>@Utils.CutString(Utils.NoHTML(listNews2[i].Content), 100)</p>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
iNews();
|
||||
function iNews() {
|
||||
var index = $('.i-news-on').index();
|
||||
$('.i-news-box').eq(index).show();
|
||||
var num = $('.i-btn-list li').length;
|
||||
iNews();
|
||||
|
||||
$('.i-btn-list').on('click', 'li', function () {
|
||||
index = $(this).index();
|
||||
for (var i = 0; i < num; i++) {
|
||||
$('.i-btn-list li').eq(i).removeClass('i-news-on');
|
||||
$('.i-news-box').eq(i).hide();
|
||||
}
|
||||
$(this).addClass('i-news-on');
|
||||
$('.i-news-box').eq(index).show();
|
||||
});
|
||||
function iNews() {
|
||||
var index = $('.i-news-on').index();
|
||||
$('.i-news-box').eq(index).show();
|
||||
var num = $('.i-btn-list li').length;
|
||||
|
||||
$('.i-btn-list').on('click', 'li', function () {
|
||||
index = $(this).index();
|
||||
for (var i = 0; i < num; i++) {
|
||||
$('.i-btn-list li').eq(i).removeClass('i-news-on');
|
||||
$('.i-news-box').eq(i).hide();
|
||||
}
|
||||
$(this).addClass('i-news-on');
|
||||
$('.i-news-box').eq(index).show();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -431,17 +445,17 @@
|
||||
<div class="swiper-wrapper">
|
||||
@foreach (var l in listLinks)
|
||||
{
|
||||
<div class="swiper-slide">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="@l.LinkURL" class="pic-box" title="@l.Title" target="_blank">
|
||||
<img src="@l.Logo" alt="@l.Title">
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="swiper-slide">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="@l.LinkURL" class="pic-box" title="@l.Title" target="_blank">
|
||||
<img src="@l.Logo" alt="@l.Title">
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -451,26 +465,27 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var mySwiper2;
|
||||
var mySwiper3;
|
||||
function coopSwiper() {
|
||||
if ($('#main').attr('class') === 'pc') {
|
||||
mySwiper3 = new Swiper('.i-coop-cont .normal', {
|
||||
loop: true,
|
||||
autoplay: 3000,
|
||||
slidesPerView: 5,
|
||||
nextButton: '.coop-next',
|
||||
prevButton: '.coop-prev',
|
||||
});
|
||||
} else if ($('#main').attr('class') === 'mb') {
|
||||
mySwiper4 = new Swiper('.i-coop-cont .mobile', {
|
||||
loop: true,
|
||||
autoplay: 3000,
|
||||
slidesPerView: 2,
|
||||
nextButton: '.coop-next',
|
||||
prevButton: '.coop-prev',
|
||||
});
|
||||
}
|
||||
var mySwiper2;
|
||||
var mySwiper3;
|
||||
|
||||
function coopSwiper() {
|
||||
if ($('#main').attr('class') === 'pc') {
|
||||
mySwiper3 = new Swiper('.i-coop-cont .normal', {
|
||||
loop: true,
|
||||
autoplay: 3000,
|
||||
slidesPerView: 5,
|
||||
nextButton: '.coop-next',
|
||||
prevButton: '.coop-prev',
|
||||
});
|
||||
} else if ($('#main').attr('class') === 'mb') {
|
||||
mySwiper4 = new Swiper('.i-coop-cont .mobile', {
|
||||
loop: true,
|
||||
autoplay: 3000,
|
||||
slidesPerView: 2,
|
||||
nextButton: '.coop-next',
|
||||
prevButton: '.coop-prev',
|
||||
});
|
||||
}
|
||||
}
|
||||
var mySwiper = new Swiper('.banner .swiper-container', {
|
||||
loop: true,
|
||||
|
||||
Reference in New Issue
Block a user