diff --git a/miniprogram/tcb-demo-mpToWxStore/miniprogram/app.js b/miniprogram/tcb-demo-mpToWxStore/miniprogram/app.js index 0d530f2..8737f62 100644 --- a/miniprogram/tcb-demo-mpToWxStore/miniprogram/app.js +++ b/miniprogram/tcb-demo-mpToWxStore/miniprogram/app.js @@ -5,7 +5,7 @@ App({ console.error('请使用 2.2.3 或以上的基础库以使用云能力'); } else { wx.cloud.init({ - // env 参数说明: + // env 参数说明: // env 参数决定接下来小程序发起的云开发调用(wx.cloud.xxx)会默认请求到哪个云环境的资源 // 此处请填入环境 ID, 环境 ID 可打开云控制台查看 // 如不填则使用默认环境(第一个创建的环境) diff --git a/miniprogram/tcb-demo-mpToWxStore/miniprogram/pages/index/index.js b/miniprogram/tcb-demo-mpToWxStore/miniprogram/pages/index/index.js index 261cbe4..6a84039 100644 --- a/miniprogram/tcb-demo-mpToWxStore/miniprogram/pages/index/index.js +++ b/miniprogram/tcb-demo-mpToWxStore/miniprogram/pages/index/index.js @@ -2,7 +2,6 @@ const { init } = require('@cloudbase/wx-cloud-client-sdk') const client = init(wx.cloud) const models = client.models Page({ - // wx391dea168d3accf2 10000151295117 data: { menuPosition: wx.getMenuButtonBoundingClientRect(), menuItems: [ @@ -28,6 +27,9 @@ Page({ }, async onLoad(){ try{ + wx.showLoading({ + title: '', + }) // 查询店铺首页了列表 const {data:{records:storeList,total:storeTotal}} = await models.store_home_3bzb1t4.list({ filter: { @@ -46,20 +48,20 @@ Page({ pageNumber: 1, // 第几页 getCount: true, // 开启用来获取总数 }); + wx.hideLoading() this.setData({ storeList, storeTotal, productList, productTotal, - tipShow:true, isPreview:false, title:"使用云模板管理微信小店", desc:"您已成功配置后台数据,可以打开下方地址对微信小店及商品进行增删改查等数据管理,配置后的数据将同步到该模板", url:"https://tcb.cloud.tencent.com/cloud-admin#/management/content-mgr/index" }) }catch(e){ + wx.hideLoading() this.setData({ - tipShow:true, isPreview:true, title:"使用云模板快速接入微信小店", desc:"当前为体验数据,切换为真实数据请复制下方链接并在浏览器中打开,帮您快速接入微信小店,管理小店及商品数据", diff --git a/miniprogram/tcb-demo-mpToWxStore/miniprogram/pages/index/index.wxml b/miniprogram/tcb-demo-mpToWxStore/miniprogram/pages/index/index.wxml index d8e2831..b80f4fa 100644 --- a/miniprogram/tcb-demo-mpToWxStore/miniprogram/pages/index/index.wxml +++ b/miniprogram/tcb-demo-mpToWxStore/miniprogram/pages/index/index.wxml @@ -16,6 +16,9 @@ + + 暂无小店信息,可前往云后台内容管理进行配置 + @@ -26,9 +29,12 @@ 商品展示(预览数据) - - - + + 暂无商品信息,可前往云后台内容管理进行配置 + + + + diff --git a/miniprogram/tcb-demo-mpToWxStore/miniprogram/pages/index/index.wxss b/miniprogram/tcb-demo-mpToWxStore/miniprogram/pages/index/index.wxss index 51b55e6..de7cda9 100644 --- a/miniprogram/tcb-demo-mpToWxStore/miniprogram/pages/index/index.wxss +++ b/miniprogram/tcb-demo-mpToWxStore/miniprogram/pages/index/index.wxss @@ -31,4 +31,9 @@ } .tabs-body{ padding-top: 16px; +} +.empty-tip{ + text-align: center; + font-size: 14px; + font-weight: 300; } \ No newline at end of file diff --git a/miniprogram/tcb-demo-mpToWxStore/project.config.json b/miniprogram/tcb-demo-mpToWxStore/project.config.json index 8574182..e1d95a2 100644 --- a/miniprogram/tcb-demo-mpToWxStore/project.config.json +++ b/miniprogram/tcb-demo-mpToWxStore/project.config.json @@ -36,7 +36,7 @@ "packNpmRelationList": [], "minifyWXSS": true }, - "appid": "wxc35ad965824811ef", + "appid": "", "projectname": "quickstart-wx-cloud", "libVersion": "latest", "cloudfunctionTemplateRoot": "cloudfunctionTemplate/",