【修复】修复拼团失败退款失效的问题。

This commit is contained in:
大灰灰
2022-10-17 02:00:50 +08:00
parent d8d564e5dd
commit 2fc5aef172
9 changed files with 140 additions and 205 deletions

View File

@@ -385,6 +385,11 @@ namespace CoreCms.Net.Configuration
/// </summary> /// </summary>
public const string AfterSalesReviewForPoint = "AfterSalesReviewForPoint"; public const string AfterSalesReviewForPoint = "AfterSalesReviewForPoint";
/// <summary>
/// 订单退款处理
/// </summary>
public const string RefundSubscribeQueue = "RefundSubscribeQueue";
/// <summary> /// <summary>
/// 日志队列 /// 日志队列

View File

@@ -29,6 +29,7 @@ namespace CoreCms.Net.Core.Config
//对应的订阅者类需要new一个实例对象当然你也可以传参比如日志对象 //对应的订阅者类需要new一个实例对象当然你也可以传参比如日志对象
m.ListSubscribe = new List<Type>() { m.ListSubscribe = new List<Type>() {
typeof(MessagePushSubscribe), typeof(MessagePushSubscribe),
typeof(RefundSubscribe),
typeof(OrderAgentOrDistributionSubscribe), typeof(OrderAgentOrDistributionSubscribe),
typeof(OrderAutomaticDeliverySubscribe), typeof(OrderAutomaticDeliverySubscribe),
typeof(OrderFinishCommandSubscribe), typeof(OrderFinishCommandSubscribe),

View File

@@ -0,0 +1,89 @@
/***********************************************************************
* Project: CoreCms
* ProjectName: 核心内容管理系统
* Web: https://www.corecms.net
* Author: 大灰灰
* Email: jianweie@163.com
* CreateTime: 2021/7/10 22:41:46
* Description: 暂无
***********************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CoreCms.Net.Configuration;
using CoreCms.Net.IServices;
using CoreCms.Net.Loging;
using CoreCms.Net.Model.Entities;
using InitQ.Abstractions;
using InitQ.Attributes;
using Newtonsoft.Json;
namespace CoreCms.Net.RedisMQ
{
/// <summary>
/// 订单退款处理
/// </summary>
public class RefundSubscribe : IRedisSubscribe
{
private readonly ICoreCmsOrderServices _orderServices;
private readonly ICoreCmsBillRefundServices _billRefundServices;
private readonly ISysTaskLogServices _taskLogServices;
public RefundSubscribe(ICoreCmsOrderServices orderServices, ICoreCmsBillRefundServices billRefundServices, ISysTaskLogServices taskLogServices)
{
_orderServices = orderServices;
_billRefundServices = billRefundServices;
_taskLogServices = taskLogServices;
}
/// <summary>
/// 订单退款处理
/// </summary>
/// <param name="msg"></param>
/// <returns></returns>
[Subscribe(RedisMessageQueueKey.RefundSubscribeQueue)]
private async Task RefundSubscribeQueue(string msg)
{
try
{
var refundInfo = JsonConvert.DeserializeObject<CoreCmsBillRefund>(msg);
//去退款
var toRefundResult = await _billRefundServices.ToRefund(refundInfo.refundId, (int)GlobalEnumVars.BillRefundStatus.STATUS_REFUND);
//插入退款日志
var log = new SysTaskLog
{
createTime = DateTime.Now,
isSuccess = toRefundResult.status,
name = "定时任务取消拼团订单退款日志",
parameters = JsonConvert.SerializeObject(toRefundResult)
};
await _taskLogServices.InsertAsync(log);
//更新订单状态为已退款已完成
await _orderServices.UpdateAsync(p => new CoreCmsOrder()
{
payStatus = (int)GlobalEnumVars.OrderPayStatus.Refunded,
status = (int)GlobalEnumVars.OrderStatus.Complete
}, p => p.orderId == refundInfo.sourceId);
NLogUtil.WriteAll(NLog.LogLevel.Info, LogType.RedisMessageQueue, "订单退款处理-成功", msg);
}
catch (Exception ex)
{
NLogUtil.WriteAll(NLog.LogLevel.Error, LogType.RedisMessageQueue, "订单退款处理-异常", msg, ex);
throw;
}
await Task.CompletedTask;
}
}
}

View File

@@ -828,6 +828,7 @@ namespace CoreCms.Net.Services
} }
userId = orderInfo.userId; userId = orderInfo.userId;
type = orderInfo.orderType;
} }
//::todo 校验支付方式是否存在 //::todo 校验支付方式是否存在

View File

@@ -129,8 +129,6 @@ namespace CoreCms.Net.Services
if (status == (int)GlobalEnumVars.BillRefundStatus.STATUS_REFUND) if (status == (int)GlobalEnumVars.BillRefundStatus.STATUS_REFUND)
{ {
//退款完成后的钩子
jm.msg = "退款单退款成功";
//如果前端传过来的退款方式和退款单上的退款方式一样的话,就说明是原路返回,试着调用支付方式的退款方法,如果不一样的话,就直接做退款单的退款状态为已退款就可以了 //如果前端传过来的退款方式和退款单上的退款方式一样的话,就说明是原路返回,试着调用支付方式的退款方法,如果不一样的话,就直接做退款单的退款状态为已退款就可以了
if (paymentCodeStr == info.paymentCode && paymentCodeStr != "offline") if (paymentCodeStr == info.paymentCode && paymentCodeStr != "offline")
@@ -152,7 +150,13 @@ namespace CoreCms.Net.Services
//退款同意,先发退款消息和钩子,下面原路返回可能失败,但是在业务上相当于退款已经退过了,只是实际的款项可能还没到账 //退款同意,先发退款消息和钩子,下面原路返回可能失败,但是在业务上相当于退款已经退过了,只是实际的款项可能还没到账
//发送退款消息 //发送退款消息
await _messageCenterServices.SendMessage(info.userId, GlobalEnumVars.PlatformMessageTypes.RefundSuccess.ToString(), JObject.FromObject(info)); if (jm.status)
{
await _messageCenterServices.SendMessage(info.userId, GlobalEnumVars.PlatformMessageTypes.RefundSuccess.ToString(), JObject.FromObject(info));
//退款完成后的钩子
jm.msg = "退款单退款成功";
}
return jm; return jm;
} }

View File

@@ -251,7 +251,7 @@ namespace CoreCms.Net.Services
else else
{ {
jm.status = false; jm.status = false;
jm.msg = "退款失败"; jm.msg = "退款失败" + response.ErrCodeDes;
jm.data = response; jm.data = response;
} }

View File

@@ -13,6 +13,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Linq.Expressions; using System.Linq.Expressions;
using System.Threading.Tasks; using System.Threading.Tasks;
using CoreCms.Net.Caching.AutoMate.RedisCache;
using CoreCms.Net.Configuration; using CoreCms.Net.Configuration;
using CoreCms.Net.IRepository; using CoreCms.Net.IRepository;
using CoreCms.Net.IRepository.UnitOfWork; using CoreCms.Net.IRepository.UnitOfWork;
@@ -44,12 +45,13 @@ namespace CoreCms.Net.Services
private readonly IUnitOfWork _unitOfWork; private readonly IUnitOfWork _unitOfWork;
private readonly IServiceProvider _serviceProvider; private readonly IServiceProvider _serviceProvider;
private readonly ISysTaskLogServices _taskLogServices; private readonly ISysTaskLogServices _taskLogServices;
private readonly IRedisOperationRepository _redisOperationRepository;
public CoreCmsPinTuanRecordServices(IUnitOfWork unitOfWork public CoreCmsPinTuanRecordServices(IUnitOfWork unitOfWork
, ICoreCmsPinTuanRecordRepository dal , ICoreCmsPinTuanRecordRepository dal
, ICoreCmsPinTuanRuleRepository pinTuanRuleRepository , ICoreCmsPinTuanRuleRepository pinTuanRuleRepository
, ICoreCmsUserRepository userRepository, IServiceProvider serviceProvider, ISysTaskLogServices taskLogServices) , ICoreCmsUserRepository userRepository, IServiceProvider serviceProvider, ISysTaskLogServices taskLogServices, IRedisOperationRepository redisOperationRepository)
{ {
this._dal = dal; this._dal = dal;
base.BaseDal = dal; base.BaseDal = dal;
@@ -58,6 +60,7 @@ namespace CoreCms.Net.Services
_userRepository = userRepository; _userRepository = userRepository;
_serviceProvider = serviceProvider; _serviceProvider = serviceProvider;
_taskLogServices = taskLogServices; _taskLogServices = taskLogServices;
_redisOperationRepository = redisOperationRepository;
} }
@@ -260,6 +263,7 @@ namespace CoreCms.Net.Services
var orderServices = container.ServiceProvider.GetService<ICoreCmsOrderServices>(); var orderServices = container.ServiceProvider.GetService<ICoreCmsOrderServices>();
var billRefundServices = container.ServiceProvider.GetService<ICoreCmsBillRefundServices>(); var billRefundServices = container.ServiceProvider.GetService<ICoreCmsBillRefundServices>();
var billLadingServices = container.ServiceProvider.GetService<ICoreCmsBillLadingServices>();
var jm = new WebApiCallBack(); var jm = new WebApiCallBack();
@@ -273,9 +277,7 @@ namespace CoreCms.Net.Services
//获取开团数据 //获取开团数据
var teamList = await _dal.QueryListByClauseAsync(p => p.teamId == item.id); var teamList = await _dal.QueryListByClauseAsync(p => p.teamId == item.id);
//更新开团失败数据 //更新开团失败数据
await _dal.UpdateAsync( await _dal.UpdateAsync(p => new CoreCmsPinTuanRecord() { status = (int)GlobalEnumVars.PinTuanRecordStatus.Defeated }, p => p.teamId == item.id);
p => new CoreCmsPinTuanRecord() { status = (int)GlobalEnumVars.PinTuanRecordStatus.Defeated },
p => p.teamId == item.id);
if (teamList == null || !teamList.Any()) continue; if (teamList == null || !teamList.Any()) continue;
{ {
@@ -298,7 +300,15 @@ namespace CoreCms.Net.Services
if (orderInfo.shipStatus == (int)GlobalEnumVars.OrderShipStatus.Yes) if (orderInfo.shipStatus == (int)GlobalEnumVars.OrderShipStatus.Yes)
{ {
//如果已经发货了,就不管了,手动退款吧 //如果已经发货了,就不管了,手动退款吧
continue; if (orderInfo.receiptType == (int)GlobalEnumVars.OrderReceiptType.SelfDelivery)
{
//清理掉未使用的提货单。
await billLadingServices.DeleteAsync(p => p.orderId == orderInfo.orderId);
}
else
{
continue;
}
} }
if (orderInfo.payStatus == (int)GlobalEnumVars.OrderPayStatus.No) if (orderInfo.payStatus == (int)GlobalEnumVars.OrderPayStatus.No)
@@ -310,40 +320,19 @@ namespace CoreCms.Net.Services
else else
{ {
//已支付,生成退款单,并直接退款,之后,更改订单状态 //已支付,生成退款单,并直接退款,之后,更改订单状态
var res = await billRefundServices.ToAdd(orderInfo.userId, orderInfo.orderId, 1, var res = await billRefundServices.ToAdd(orderInfo.userId, orderInfo.orderId, (int)GlobalEnumVars.OrderType.PinTuan, orderInfo.payedAmount, "");
orderInfo.payedAmount, "");
if (res.status == false) if (res.status == false)
{ {
continue; continue;
} }
var refundInfo = await billRefundServices.QueryByClauseAsync(p => var refundInfo = await billRefundServices.QueryByClauseAsync(p => p.sourceId == orderInfo.orderId && p.status == (int)GlobalEnumVars.BillRefundType.Order && p.type == (int)GlobalEnumVars.OrderType.PinTuan);
p.sourceId == orderInfo.orderId &&
p.status == (int)GlobalEnumVars.BillRefundType.Order && p.type == 1);
if (refundInfo == null) if (refundInfo == null)
{ {
//没有找到退款单 //没有找到退款单
continue; continue;
} }
//去退款 //走队列
var toRefundResult = await billRefundServices.ToRefund(refundInfo.refundId, (int)GlobalEnumVars.BillRefundStatus.STATUS_REFUND); await _redisOperationRepository.ListLeftPushAsync(RedisMessageQueueKey.RefundSubscribeQueue, JsonConvert.SerializeObject(refundInfo));
//插入退款日志
var log = new SysTaskLog
{
createTime = DateTime.Now,
isSuccess = toRefundResult.status,
name = "定时任务取消拼团订单退款日志",
parameters = JsonConvert.SerializeObject(toRefundResult)
};
await _taskLogServices.InsertAsync(log);
//更新订单状态为已退款已完成
await orderServices.UpdateAsync(p => new CoreCmsOrder()
{
payStatus = (int)GlobalEnumVars.OrderPayStatus.Refunded,
status = (int)GlobalEnumVars.OrderStatus.Complete
}, p => p.orderId == orderInfo.orderId);
} }
} }
} }

View File

@@ -632,6 +632,21 @@
this.$store.commit('hasLogin', val); this.$store.commit('hasLogin', val);
} }
}, },
userInfo: {
get() {
return this.$store.state.userInfo;
},
set(val) {
this.$store.commit('userInfo', val);
}
},
pointSwitch() { return this.$store.state.config.pointSwitch },
pointShowExchangePrice() { return this.$store.state.config.pointShowExchangePrice },
pointDiscountedProportion() { return this.$store.state.config.pointDiscountedProportion },
pointExchangeModel() { return this.$store.state.config.pointExchangeModel },
pointShowName() { return this.$store.state.config.pointShowName },
pointGetModel() { return this.$store.state.config.pointGetModel },
pointShowPoint() { return this.$store.state.config.pointShowPoint },
shopName() { shopName() {
return this.$store.state.config.shopName; return this.$store.state.config.shopName;
}, },

View File

@@ -1,171 +1,2 @@
; /** layuiAdmin.pro-v1.7.0 LPPL License */
layui.define(["laytpl", "layer"], function (e) { ;layui.define(["laytpl","layer"],function(e){var t=layui.jquery,a=layui.laytpl,n=layui.layer,r=layui.setter,o=(layui.device(),layui.hint()),i=function(e){return new d(e)},s="LAY_app_body",d=function(e){this.id=e,this.container=t("#"+(e||s))};i.loading=function(e){e.append(this.elemLoad=t('<i class="layui-anim layui-anim-rotate layui-anim-loop layui-icon layui-icon-loading layadmin-loading"></i>'))},i.removeLoad=function(){this.elemLoad&&this.elemLoad.remove()},i.exit=function(){layui.data(r.tableName,{key:r.request.tokenName,remove:!0}),location.hash="/user/login"},i.req=function(e){var a=e.success,n=e.error,o=r.request,s=r.response,d=function(){return r.debug?"<br><cite>URL</cite>"+e.url:""};if(e.data=e.data||{},e.headers=e.headers||{},o.tokenName){var l="string"==typeof e.data?JSON.parse(e.data):e.data;e.data[o.tokenName]=o.tokenName in l?e.data[o.tokenName]:layui.data(r.tableName)[o.tokenName]||"",e.headers[o.tokenName]=o.tokenName in e.headers?e.headers[o.tokenName]:layui.data(r.tableName)[o.tokenName]||""}return delete e.success,delete e.error,t.ajax(t.extend({type:"get",dataType:"json",success:function(t){var n=s.statusCode;if(t[s.statusName]==n.ok)"function"==typeof e.done&&e.done(t);else if(t[s.statusName]==n.logout)i.exit();else{var r=["<cite>Error</cite> "+(t[s.msgName]||"返回状态码异常"),d()].join("");i.error(r)}"function"==typeof a&&a(t)},error:function(e,t){var a=["请求异常,请重试<br><cite>错误信息:</cite>"+t,d()].join("");i.error(a),"function"==typeof n&&n.apply(this,arguments)}},e))},i.popup=function(e){var a=e.success,r=e.skin;return delete e.success,delete e.skin,n.open(t.extend({type:1,title:"提示",content:"",id:"LAY-system-view-popup",skin:"layui-layer-admin"+(r?" "+r:""),shadeClose:!0,closeBtn:!1,success:function(e,r){var o=t('<i class="layui-icon" close>&#x1006;</i>');e.append(o),o.on("click",function(){n.close(r)}),"function"==typeof a&&a.apply(this,arguments)}},e))},i.error=function(e,a){return i.popup(t.extend({content:e,maxWidth:500,offset:"auto",anim:6,id:"LAY_adminError"},a))},d.prototype.render=function(e,a){var n=this;layui.router();return e=r.views+e+r.engine,t("#"+s).children(".layadmin-loading").remove(),i.loading(n.container),t.ajax({url:e,type:"get",dataType:"html",data:{v:layui.cache.version},success:function(e){e="<div>"+e+"</div>";var r=t(e).find("title"),o=r.text()||(e.match(/\<title\>([\s\S]*)\<\/title>/)||[])[1],s={title:o,body:e};r.remove(),n.params=a||{},n.then&&(n.then(s),delete n.then),n.parse(e),i.removeLoad(),n.done&&(n.done(s),delete n.done)},error:function(e){return i.removeLoad(),n.render.isError?i.error("请求视图文件异常,状态:"+e.status):(404===e.status?n.render("template/tips/404"):n.render("template/tips/error"),void(n.render.isError=!0))}}),n},d.prototype.parse=function(e,n,r){var s=this,d="object"==typeof e,l=d?e:t(e),u=d?e:l.find("*[template]"),c=function(e){var n=a(e.dataElem.html()),o=t.extend({params:y.params},e.res);e.dataElem.after(n.render(o)),"function"==typeof r&&r();try{e.done&&new Function("d",e.done)(o)}catch(i){console.error(e.dataElem[0],"\n存在错误回调脚本\n\n",i)}},y=layui.router();l.find("title").remove(),s.container[n?"after":"html"](l.children()),y.params=s.params||{};for(var p=u.length;p>0;p--)!function(){var e=u.eq(p-1),t=e.attr("lay-done")||e.attr("lay-then"),n=a(e.attr("lay-url")||"").render(y),r=a(e.attr("lay-data")||"").render(y),s=a(e.attr("lay-headers")||"").render(y);try{r=new Function("return "+r+";")()}catch(d){o.error("lay-data: "+d.message),r={}}try{s=new Function("return "+s+";")()}catch(d){o.error("lay-headers: "+d.message),s=s||{}}n?i.req({type:e.attr("lay-type")||"get",url:n,data:r,dataType:"json",headers:s,success:function(a){c({dataElem:e,res:a,done:t})}}):c({dataElem:e,done:t})}();return s},d.prototype.send=function(e,t){var n=a(e||this.container.html()).render(t||{});return this.container.html(n),this},d.prototype.refresh=function(e){var t=this,a=t.container.next(),n=a.attr("lay-templateid");return t.id!=n?t:(t.parse(t.container,"refresh",function(){t.container.siblings('[lay-templateid="'+t.id+'"]:last').remove(),"function"==typeof e&&e()}),t)},d.prototype.then=function(e){return this.then=e,this},d.prototype.done=function(e){return this.done=e,this},e("view",i)});
var t = layui.jquery,
a = layui.laytpl,
n = layui.layer,
r = layui.setter,
o = (layui.device(), layui.hint()),
i = function (e) {
return new d(e)
}, s = "LAY_app_body",
d = function (e) {
this.id = e, this.container = t("#" + (e || s))
};
i.loading = function (e) {
e.append(this.elemLoad = t('<i class="layui-anim layui-anim-rotate layui-anim-loop layui-icon layui-icon-loading layadmin-loading"></i>'))
}, i.removeLoad = function () {
this.elemLoad && this.elemLoad.remove()
}, i.exit = function () {
layui.data(r.tableName, {
key: r.request.tokenName,
remove: !0
}), location.hash = "/user/login"
}, i.req = function (e) {
var a = e.success,
n = e.error,
o = r.request,
s = r.response,
d = function () {
return r.debug ? "<br><cite>URL</cite>" + e.url : ""
};
if (e.data = e.data || {}, e.headers = e.headers || {}, o.tokenName) {
var l = "string" == typeof e.data ? JSON.parse(e.data) : e.data;
e.data[o.tokenName] = o.tokenName in l ? e.data[o.tokenName] : layui.data(r.tableName)[o.tokenName] || "", e.headers[o.tokenName] = o.tokenName in e.headers ? e.headers[o.tokenName] : layui.data(r.tableName)[o.tokenName] || ""
}
return delete e.success, delete e.error, t.ajax(t.extend({
type: "get",
dataType: "json",
success: function (t) {
var n = s.statusCode;
if (t[s.statusName] == n.ok) "function" == typeof e.done && e.done(t);
else if (t[s.statusName] == n.logout) i.exit();
else {
var r = ["<cite>Error</cite> " + (t[s.msgName] || "返回状态码异常"), d()].join("<br>");
i.error(r)
}
"function" == typeof a && a(t)
},
error: function (e, t) {
var a = ["请求异常,请重试<br><cite>错误信息:</cite>" + t, d()].join("");
i.error(a), "function" == typeof n && n.apply(this, arguments)
}
}, e))
}, i.popup = function (e) {
var a = e.success,
r = e.skin;
return delete e.success, delete e.skin, n.open(t.extend({
type: 0,
title: "提示",
content: "",
id: "LAY-system-view-popup",
skin: "layui-layer-admin" + (r ? " " + r : ""),
shadeClose: !0,
closeBtn: !1,
success: function (e, r) {
var o = t('<i class="layui-icon" close>&#x1006;</i>');
e.append(o), o.on("click", function () {
n.close(r)
}), "function" == typeof a && a.apply(this, arguments)
}
}, e))
}, i.error = function (e, a) {
return i.popup(t.extend({
content: e,
maxWidth: 500,
offset: "auto",
anim: 6,
id: "LAY_adminError"
}, a))
}, d.prototype.render = function (e, a) {
var n = this;
layui.router();
return e = r.views + e + r.engine, t("#" + s).children(".layadmin-loading").remove(), i.loading(n.container), t.ajax({
url: e,
type: "get",
dataType: "html",
data: {
v: layui.cache.version
},
success: function (e) {
e = "<div>" + e + "</div>";
var r = t(e).find("title"),
o = r.text() || (e.match(/\<title\>([\s\S]*)\<\/title>/) || [])[1],
s = {
title: o,
body: e
};
r.remove(), n.params = a || {}, n.then && (n.then(s), delete n.then), n.parse(e), i.removeLoad(), n.done && (n.done(s), delete n.done)
},
error: function (e) {
return i.removeLoad(), n.render.isError ? i.error("请求视图文件异常,状态:" + e.status) : (404 === e.status ? n.render("template/tips/404") : n.render("template/tips/error"), void (n.render.isError = !0))
}
}), n
}, d.prototype.parse = function (e, n, r) {
var s = this,
d = "object" == typeof e,
l = d ? e : t(e),
u = d ? e : l.find("*[template]"),
c = function (e) {
var n = a(e.dataElem.html()),
o = t.extend({
params: y.params
}, e.res);
e.dataElem.after(n.render(o)), "function" == typeof r && r();
try {
e.done && new Function("d", e.done)(o)
} catch (i) {
console.error(e.dataElem[0], "\n存在错误回调脚本\n\n", i)
}
}, y = layui.router();
l.find("title").remove(), s.container[n ? "after" : "html"](l.children()), y.params = s.params || {};
for (var p = u.length; p > 0; p--)! function () {
var e = u.eq(p - 1),
t = e.attr("lay-done") || e.attr("lay-then"),
n = a(e.attr("lay-url") || "").render(y),
r = a(e.attr("lay-data") || "").render(y),
s = a(e.attr("lay-headers") || "").render(y);
try {
r = new Function("return " + r + ";")()
} catch (d) {
o.error("lay-data: " + d.message), r = {}
}
try {
s = new Function("return " + s + ";")()
} catch (d) {
o.error("lay-headers: " + d.message), s = s || {}
}
n ? i.req({
type: e.attr("lay-type") || "get",
url: n,
data: r,
dataType: "json",
headers: s,
success: function (a) {
c({
dataElem: e,
res: a,
done: t
})
}
}) : c({
dataElem: e,
done: t
})
}();
return s
}, d.prototype.send = function (e, t) {
var n = a(e || this.container.html()).render(t || {});
return this.container.html(n), this
}, d.prototype.refresh = function (e) {
var t = this,
a = t.container.next(),
n = a.attr("lay-templateid");
return t.id != n ? t : (t.parse(t.container, "refresh", function () {
t.container.siblings('[lay-templateid="' + t.id + '"]:last').remove(), "function" == typeof e && e()
}), t)
}, d.prototype.then = function (e) {
return this.then = e, this
}, d.prototype.done = function (e) {
return this.done = e, this
}, e("view", i)
});