This commit is contained in:
可达鸭 2025-06-28 10:58:44 +08:00
parent f3450ec6d2
commit ca6735fb2c
4 changed files with 12 additions and 4 deletions

View File

@ -30,6 +30,9 @@ export class Main extends Template {
} }
} }
) )
if (typeof cart == 'string') {
eval(`cart=${cart}`)
}
if (!this.haskey(cart, 'resultData.cartInfo.vendors')) { if (!this.haskey(cart, 'resultData.cartInfo.vendors')) {
p.err("没有获取到购物车数据") p.err("没有获取到购物车数据")
return return

View File

@ -1,5 +1,4 @@
import {Template} from '../../template.js' import {Template} from '../../template.js'
// import jsonic from 'jsonic'
export class Main extends Template { export class Main extends Template {
constructor() { constructor() {
@ -40,9 +39,9 @@ export class Main extends Template {
} }
} }
) )
// if (typeof list == 'string') { if (typeof list == 'string') {
// list = jsonic.parse(list) eval(`list=${list}`)
// } }
let rm = [] let rm = []
let reg = new RegExp(context.blackList) let reg = new RegExp(context.blackList)
let status = 0 let status = 0

View File

@ -34,6 +34,9 @@ export class Main extends Template {
} }
} }
) )
if (typeof s == 'string') {
eval(`s=${s}`)
}
if (this.haskey(s, 'followProductList')) { if (this.haskey(s, 'followProductList')) {
p.log("当前商品收藏数:", s.totalNum) p.log("当前商品收藏数:", s.totalNum)
if (s.totalNum>0) { if (s.totalNum>0) {

View File

@ -36,6 +36,9 @@ export class Main extends Template {
} }
} }
) )
if (typeof s == 'string') {
eval(`s=${s}`)
}
if (this.haskey(s, 'result.showShopList')) { if (this.haskey(s, 'result.showShopList')) {
s = s.result s = s.result
p.log("当前店铺收藏数:", s.totalCount) p.log("当前店铺收藏数:", s.totalCount)