Functions.Execute("加载单个表","微信礼品卡货架")
Dim url As String = "https://api.weixin.qq.com/card/giftcard/page/add?access_token={0}"
Dim jo As New JObject
Dim hc As New HttpClient(CExp(url,Functions.Execute("GetAccessToken")))
jo("page") = New JObject
jo("page")("page_title") = "礼品卡标题"
jo("page")("support_multi") = True
jo("page")("support_buy_for_self") = True
jo("page")("banner_pic_url") = "http://mmbiz.qpic.cn/mmbiz_jpg/ahyj0ppmibfrTLNaiaZmqK71SDT5pDPzeCfxdWJL5MibJiahDOmIdytzZicotiaSjm0n0Y9LyuhnIos62KR3GO7rKzpw/0?wx_fmt=jpeg"
jo("page")("support_multi") = True
Dim ar As New JArray
Dim i As Integer = 0
For Each r1 As DataRow In DataTables("微信礼品卡货架").Select("主题分类名称 = \'分类一\'")
Dim ao As New JObject
ao("theme_pic_url") = r1("主题封面链接").Tostring
ao("title") = r1("主题名称").Tostring
ao("title_color") = r1("主题名称颜色").Tostring
ar.add(ao)
jo("page")("theme_list") = ar
Dim ar2 As New JArray
For Each r2 As DataRow In DataTables("微信礼品卡货架").Select("主题名称 = \'" & r1("主题名称") & "\'")
Dim ao2 As New JObject
ao2("card_id") = r2("卡券ID").tostring
ao2("title") = r2("商品名称").tostring
ao2("pic_url") = r2("商品缩略图链接").tostring
ao2("desc") = r2("商品简介").tostring
ar2.add(ao2)
Next
ao("item_list") = ar2
ao("category_index")= i
i += 1
Next
Dim ar4 As New JArray
Dim ao4 As New JObject
ao4("title") = "分类一"
ar4.add(ao4)
jo("page")("category_list") = ar4
jo("page")("address") = "泉州中山路专卖店"
jo("page")("service_phone") = "13559053751"
jo("page")("biz_description") = "退款指引"
jo("page")("cell_1") = New JObject
jo("page")("cell_1")("title") = "申请发票"
jo("page")("cell_1")("url") = "http://baidu.com"
jo("page")("cell_2") = New JObject
jo("page")("cell_2")("title") = "申请退款"
jo("page")("cell_2")("url") = "http://baidu.com"
hc.Content = jo.ToString()
\'jo = JObject.Parse(hc.GetData)
hc.GetData
output.show(jo.Tostring)