diff --git a/app.json b/app.json index 1a2cebf..76012b8 100644 --- a/app.json +++ b/app.json @@ -1,5 +1,7 @@ { "pages": [ + "pages/config/config", + "pages/welcome/index", "pages/company/index", "pages/company/search/search", @@ -8,6 +10,9 @@ "pages/login/login", "pages/card/index", "pages/user/index", + "pages/user/companyMine/myActives/myActives", + "pages/user/companyMine/focusedProject/focusedProject", + "pages/user/companyMine/companyOrder", "pages/user/user_coupon/user_coupon", "pages/user/user_coupon_data/user_coupon_data", "pages/mall/index", @@ -49,8 +54,7 @@ "pages/home/activeSuccess/activeSuccess" ], "tabBar": { - "list": [ - { + "list": [{ "pagePath": "pages/shortVideo/index", "text": "视频", "iconPath": "/static/tabbar/tabbar_icon_00.png", @@ -84,7 +88,13 @@ "navigationBarBackgroundColor": "#fff", "navigationBarTitleText": "", "navigationBarTextStyle": "black" - }, - "style": "v2", - "sitemapLocation": "sitemap.json" + }, + "plugins": { + "live-player-plugin": { + "version": "1.2.5", + "provider": "wx2b03c6e691cd7370" + } + }, + "style": "v2", + "sitemapLocation": "sitemap.json" } \ No newline at end of file diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js index fb5dfeb..49bf6f2 100644 --- a/custom-tab-bar/index.js +++ b/custom-tab-bar/index.js @@ -5,7 +5,7 @@ * 碌碌无为枉半生,一朝惊醒万事空。 */ -import { mall, video, ticket, user} from "../lib/tabBarData" +import { tabBar } from "../lib/storeConfig" Component({ /** @@ -15,21 +15,23 @@ Component({ selected : 0, color : "#4e4f51", selectedColor: "#0b0041", - list : [video, mall, ticket, user] + list : [] }, /** * 生命周期函数 */ - lifetimes:{ - // attached: ()=>{ - // //获取模版信息 - // wx.$api.publics.storeConfig({ - // company_id: "17" - // }).then(res=>{ - // console.log(res) - // }) - // } + attached(){ + if(this.data.list.length <= 0 && tabBar.length > 0){ + this.setData({ + list: tabBar + }) + }else{ + wx.showToast({ + title: "获取店铺模块信息失败", + icon : "none" + }) + } }, /** diff --git a/lib/storeConfig.js b/lib/storeConfig.js new file mode 100644 index 0000000..1a7db34 --- /dev/null +++ b/lib/storeConfig.js @@ -0,0 +1,13 @@ + +/** + * Web唐明明 + * 匆匆数载恍如梦,岁月迢迢华发增。 + * 碌碌无为枉半生,一朝惊醒万事空。 + */ + +// 企业tabBar配置 +const tabBar = [] + +export { + tabBar +} \ No newline at end of file diff --git a/lib/tabBarData.js b/lib/tabBarData.js index 750f2ce..59d23fb 100644 --- a/lib/tabBarData.js +++ b/lib/tabBarData.js @@ -7,7 +7,7 @@ // 商城 const mall = { - "pagePath": "pages/mall/index", + "pagePath": "/pages/mall/index", "text": "商城", "iconPath": "/static/tabbar/tabbar_icon_01.png", "selectedIconPath": "/static/tabbar/tabbar_icon_show_01.png" @@ -15,7 +15,7 @@ const mall = { // 短视频 const video = { - "pagePath": "pages/shortVideo/index", + "pagePath": "/pages/shortVideo/index", "text": "首页", "iconPath": "/static/tabbar/tabbar_icon_00.png", "selectedIconPath": "/static/tabbar/tabbar_icon_show_00.png" @@ -23,7 +23,7 @@ const video = { // 优惠券 const ticket = { - "pagePath": "pages/ticket/index", + "pagePath": "/pages/ticket/index", "text": "优惠", "iconPath": "/static/tabbar/tabbar_icon_02.png", "selectedIconPath": "/static/tabbar/tabbar_icon_show_02.png" @@ -31,7 +31,7 @@ const ticket = { // 我的 const user = { - "pagePath": "pages/user/index", + "pagePath": "/pages/user/index", "text": "我的", "iconPath": "/static/tabbar/tabbar_icon_03.png", "selectedIconPath": "/static/tabbar/tabbar_icon_show_03.png" @@ -43,4 +43,3 @@ export { ticket, user } - diff --git a/pages/config/config.js b/pages/config/config.js new file mode 100644 index 0000000..a589427 --- /dev/null +++ b/pages/config/config.js @@ -0,0 +1,47 @@ +/** + * Web唐明明 + * 匆匆数载恍如梦,岁月迢迢华发增。 + * 碌碌无为枉半生,一朝惊醒万事空。 + */ + +import { tabBar } from "../../lib/storeConfig" +import { mall, video, ticket, user } from "../../lib/tabBarData" + +Page({ + /** + * 生命周期函数--监听页面加载 + */ + onLoad(e) { + if (e.companyoid && e.companyoid == "") { + wx.showToast({ + title: "参数错误,缺少companyoId" + }) + return + } + + wx.$api.publics.storeConfig({ + company_id: e.companyoid + }).then(res => { + let tabBarVal = res.concat({}) + tabBarVal.forEach(res => { + switch (res.slug) { + case "video": + tabBar.push(video) + break; + case "mall": + tabBar.push(mall) + break; + case "ticket": + tabBar.push(ticket) + break; + default : + tabBar.push(user) + break; + } + }) + wx.switchTab({ + url: tabBar[0].pagePath + }) + }) + } +}) \ No newline at end of file diff --git a/pages/config/config.json b/pages/config/config.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/config/config.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/config/config.wxml b/pages/config/config.wxml new file mode 100644 index 0000000..ceaa87e --- /dev/null +++ b/pages/config/config.wxml @@ -0,0 +1,5 @@ + + + + 加载企业信息 + diff --git a/pages/config/config.wxss b/pages/config/config.wxss new file mode 100644 index 0000000..93bf0aa --- /dev/null +++ b/pages/config/config.wxss @@ -0,0 +1 @@ +/* pages/config/config.wxss */ \ No newline at end of file diff --git a/pages/live/index.wxml b/pages/live/index.wxml index d8c755a..8b13789 100644 --- a/pages/live/index.wxml +++ b/pages/live/index.wxml @@ -1,2 +1 @@ - -pages/live/index.wxml + diff --git a/pages/mall/mall_details/mall_details.js b/pages/mall/mall_details/mall_details.js index 64d9690..c2897a8 100644 --- a/pages/mall/mall_details/mall_details.js +++ b/pages/mall/mall_details/mall_details.js @@ -285,8 +285,17 @@ Page({ * 用户点击右上角分享 */ onShareAppMessage() { + console.log(this.data.storyData.cover) this.setData({ shareShow: false }) + return({ + title : "#" + this.data.storyData.title, + path : '/pages/mall/mall_details/mall_details?id=' + this.data.storyData.id + '&nameList=share', + imageUrl: this.data.storyData.cover + }) + + // + '&share_user_id=' + app.globalData.userInfo.user_id || 0 }, + }) \ No newline at end of file diff --git a/pages/mall/mall_details/mall_details.wxml b/pages/mall/mall_details/mall_details.wxml index 0da9738..9194875 100644 --- a/pages/mall/mall_details/mall_details.wxml +++ b/pages/mall/mall_details/mall_details.wxml @@ -27,7 +27,9 @@ {{storyData.title}} {{storyData.description}} - + + + - + + @@ -135,10 +138,10 @@ 客服 - + 购物车 - 1 + @@ -270,12 +273,12 @@ 微信好友 -