1微信用户采集店铺商品功能 2查询达人带货商品并联系达人功能
This commit is contained in:
1 parent
e1ee91dd03
commit
2759ff0f6d
33 files changed
+2464
-626
No files matched your search
@@ -551,7 +551,8 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
});
|
||||
}
|
||||
|
||||
if (BaseClass.UserAuthority.ParseToString().Contains("微信回采") && currentUrl.StartsWith("https://store.weixin.qq.com/shop/goods/list"))
|
||||
if ((BaseClass.UserAuthority.ParseToString().Contains("微信回采") || BaseClass.UserAuthority.ParseToString().Contains("商品采集")) &&
|
||||
currentUrl.StartsWith("https://store.weixin.qq.com/shop/goods/list"))
|
||||
{
|
||||
//Task.Run(() => {
|
||||
string sAddInputJs = @"
|
||||
@@ -583,15 +584,28 @@ namespace TemuKJD.WXForms.ShopForms
|
||||
for ( i= 0; i < productLst.length; i++) {
|
||||
var addBtnItem = productLst[i]; //.parentElement.parentElement.parentElement;
|
||||
var pos = addBtnItem.innerHTML.indexOf('ID:')
|
||||
if (addBtnItem.innerHTML.indexOf('回采') < 0 && pos >= 0) {
|
||||
if (addBtnItem.innerHTML.indexOf('回采') < 0 && addBtnItem.innerHTML.indexOf('采集') < 0 && pos >= 0) {
|
||||
var sSpuId = addBtnItem.innerHTML.substring(pos + 3);
|
||||
sSpuId = sSpuId.substring(0, sSpuId.indexOf('<span')).trim();
|
||||
//addBtnItem.innerHTML += ""<input type=\""button\"" style=\""display:inline; width:60px; margin-left:10px; margin-top:0px; cursor:pointer; border:1px solid\"" value =\""回采商品\"" onclick=\""shopObj.getProduct('"" + sSpuId + ""','" + this.shop.ShopId + @"')\"">""
|
||||
//addBtnItem.innerHTML += ""<input type=\""button\"" style=\""display:inline; width:60px; margin-left:10px; margin-top:0px; cursor:pointer; border:1px solid\"" value =\""回采商品\"" onclick=\""alert('"" + sSpuId + ""')\"">""
|
||||
//addBtnItem.innerHTML = addBtnItem.innerHTML.replace(""分享 </a></div>"", ""分享 </a></div><input type=\""button\"" style=\""display:inline; width:60px; margin-left:10px; margin-top:0px; cursor:pointer; border:1px solid\"" value =\""回采商品\"" onclick=\""shopObj.getProduct('"" + sSpuId + ""','" + this.shop.ShopId + @"')\"">"");
|
||||
var newDiv = document.createElement(""div"");
|
||||
newDiv.innerHTML = ""<a style=\""display:inline; padding:2px 5px; cursor:pointer; border:1px solid\"" onclick=\""shopObj.getProduct('"" + sSpuId + ""','" + this.shop.ShopId + @"')\"">回采<\a>"";
|
||||
addBtnItem.lastChild.appendChild(newDiv);
|
||||
newDiv.innerHTML=""<div style=\""padding:5px 0px\"">";
|
||||
|
||||
int margin = 0;
|
||||
if (BaseClass.UserAuthority.ParseToString().Contains("商品采集"))
|
||||
{
|
||||
sAddInputJs += @"<a style=\""display:inline; margin-left:" + margin + @"px; margin-top:10px; padding:2px 5px; cursor:pointer; border:1px solid\"" onclick=\""shopObj.getProduct('"" + sSpuId + ""','" + this.shop.ShopId + @"', false, true)\"">采集入库<\a>";
|
||||
margin = 5;
|
||||
}
|
||||
else if (BaseClass.UserAuthority.ParseToString().Contains("微信回采"))
|
||||
{
|
||||
sAddInputJs += @"<a style=\""display:inline; margin-left:" + margin + @"px; margin-top:10px; padding:2px 5px; cursor:pointer; border:1px solid\"" onclick=\""shopObj.getProduct('"" + sSpuId + ""','" + this.shop.ShopId + @"')\"">回采<\a>";
|
||||
margin = 5;
|
||||
}
|
||||
sAddInputJs += @"</div>"";";
|
||||
sAddInputJs += @"addBtnItem.lastChild.appendChild(newDiv);
|
||||
}
|
||||
}
|
||||
}";
|
||||
|
||||
Reference in new issue
Block a user