[新增]企业店铺模块配置
This commit is contained in:
7
app.json
7
app.json
@@ -1,15 +1,18 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/user/index",
|
||||
"pages/user/companyMine/myActives/myActives",
|
||||
"pages/config/config",
|
||||
|
||||
"pages/welcome/index",
|
||||
"pages/company/index",
|
||||
"pages/company/search/search",
|
||||
"pages/user/index",
|
||||
"pages/user/companyMine/myActives/myActives",
|
||||
"pages/shortVideo/index",
|
||||
"pages/richText/richText",
|
||||
"pages/login/login",
|
||||
"pages/card/index",
|
||||
"pages/mall/index",
|
||||
"pages/mall/mall_details/mall_details",
|
||||
"pages/live/index",
|
||||
"pages/ticket/index",
|
||||
"pages/home/index",
|
||||
|
||||
@@ -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"
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
13
lib/storeConfig.js
Normal file
13
lib/storeConfig.js
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
/**
|
||||
* Web唐明明
|
||||
* 匆匆数载恍如梦,岁月迢迢华发增。
|
||||
* 碌碌无为枉半生,一朝惊醒万事空。
|
||||
*/
|
||||
|
||||
// 企业tabBar配置
|
||||
const tabBar = []
|
||||
|
||||
export {
|
||||
tabBar
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
47
pages/config/config.js
Normal file
47
pages/config/config.js
Normal file
@@ -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
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
3
pages/config/config.json
Normal file
3
pages/config/config.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
5
pages/config/config.wxml
Normal file
5
pages/config/config.wxml
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
<view class="pack-center pages-loding">
|
||||
<image src="/static/icons/loding.gif" mode="widthFix"></image>
|
||||
<view>加载企业信息</view>
|
||||
</view>
|
||||
1
pages/config/config.wxss
Normal file
1
pages/config/config.wxss
Normal file
@@ -0,0 +1 @@
|
||||
/* pages/config/config.wxss */
|
||||
@@ -1,3 +1,6 @@
|
||||
|
||||
短视频
|
||||
|
||||
<view class="videos-content">
|
||||
<swiperViode
|
||||
wx:if="{{videoList.length > 0}}"
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
.videos-content{
|
||||
position: relative;
|
||||
height: 100vh;
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 视频信息 */
|
||||
|
||||
@@ -1,90 +1,97 @@
|
||||
{
|
||||
"description": "项目配置文件",
|
||||
"packOptions": {
|
||||
"ignore": []
|
||||
},
|
||||
"setting": {
|
||||
"urlCheck": true,
|
||||
"es6": true,
|
||||
"enhance": false,
|
||||
"postcss": true,
|
||||
"preloadBackgroundData": false,
|
||||
"minified": true,
|
||||
"newFeature": false,
|
||||
"coverView": true,
|
||||
"nodeModules": true,
|
||||
"autoAudits": false,
|
||||
"showShadowRootInWxmlPanel": true,
|
||||
"scopeDataCheck": false,
|
||||
"uglifyFileName": false,
|
||||
"checkInvalidKey": true,
|
||||
"checkSiteMap": true,
|
||||
"uploadWithSourceMap": true,
|
||||
"compileHotReLoad": false,
|
||||
"useMultiFrameRuntime": false,
|
||||
"useApiHook": true,
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
"description": "项目配置文件",
|
||||
"packOptions": {
|
||||
"ignore": []
|
||||
},
|
||||
"enableEngineNative": false,
|
||||
"bundle": false,
|
||||
"useIsolateContext": true,
|
||||
"useCompilerModule": true,
|
||||
"userConfirmedUseCompilerModuleSwitch": false,
|
||||
"userConfirmedBundleSwitch": false,
|
||||
"packNpmManually": false,
|
||||
"packNpmRelationList": [],
|
||||
"minifyWXSS": true
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "2.14.0",
|
||||
"appid": "wxd931d03dfe955254",
|
||||
"projectname": "%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E5%B0%8F%E7%A8%8B%E5%BA%8F",
|
||||
"debugOptions": {
|
||||
"hidedInDevtools": []
|
||||
},
|
||||
"scripts": {},
|
||||
"isGameTourist": false,
|
||||
"simulatorType": "wechat",
|
||||
"simulatorPluginLibVersion": {},
|
||||
"condition": {
|
||||
"plugin": {
|
||||
"list": []
|
||||
},
|
||||
"game": {
|
||||
"list": []
|
||||
},
|
||||
"gamePlugin": {
|
||||
"list": []
|
||||
},
|
||||
"miniprogram": {
|
||||
"list": [
|
||||
{
|
||||
"name": "登录",
|
||||
"pathName": "pages/login/login",
|
||||
"query": "",
|
||||
"scene": null
|
||||
"setting": {
|
||||
"urlCheck": true,
|
||||
"es6": true,
|
||||
"enhance": false,
|
||||
"postcss": true,
|
||||
"preloadBackgroundData": false,
|
||||
"minified": true,
|
||||
"newFeature": false,
|
||||
"coverView": true,
|
||||
"nodeModules": true,
|
||||
"autoAudits": false,
|
||||
"showShadowRootInWxmlPanel": true,
|
||||
"scopeDataCheck": false,
|
||||
"uglifyFileName": false,
|
||||
"checkInvalidKey": true,
|
||||
"checkSiteMap": true,
|
||||
"uploadWithSourceMap": true,
|
||||
"compileHotReLoad": false,
|
||||
"useMultiFrameRuntime": false,
|
||||
"useApiHook": true,
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
},
|
||||
{
|
||||
"name": "搜索",
|
||||
"pathName": "pages/company/search/search",
|
||||
"query": "",
|
||||
"scene": null
|
||||
"enableEngineNative": false,
|
||||
"bundle": false,
|
||||
"useIsolateContext": true,
|
||||
"useCompilerModule": true,
|
||||
"userConfirmedUseCompilerModuleSwitch": false,
|
||||
"userConfirmedBundleSwitch": false,
|
||||
"packNpmManually": false,
|
||||
"packNpmRelationList": [],
|
||||
"minifyWXSS": true
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "2.14.0",
|
||||
"appid": "wxd931d03dfe955254",
|
||||
"projectname": "%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E5%B0%8F%E7%A8%8B%E5%BA%8F",
|
||||
"debugOptions": {
|
||||
"hidedInDevtools": []
|
||||
},
|
||||
"scripts": {},
|
||||
"isGameTourist": false,
|
||||
"simulatorType": "wechat",
|
||||
"simulatorPluginLibVersion": {},
|
||||
"condition": {
|
||||
"plugin": {
|
||||
"list": []
|
||||
},
|
||||
{
|
||||
"name": "商城",
|
||||
"pathName": "pages/mall/index",
|
||||
"query": "",
|
||||
"scene": null
|
||||
"game": {
|
||||
"list": []
|
||||
},
|
||||
{
|
||||
"name": "pages/home/beSureOrder/beSureOrder",
|
||||
"pathName": "pages/home/beSureOrder/beSureOrder",
|
||||
"scene": null
|
||||
"gamePlugin": {
|
||||
"list": []
|
||||
},
|
||||
"miniprogram": {
|
||||
"list": [
|
||||
{
|
||||
"name": "登录",
|
||||
"pathName": "pages/login/login",
|
||||
"query": "",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "搜索",
|
||||
"pathName": "pages/company/search/search",
|
||||
"query": "",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "商城",
|
||||
"pathName": "pages/mall/index",
|
||||
"query": "",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "企业广场",
|
||||
"pathName": "pages/company/index",
|
||||
"query": "",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "读取企业配置",
|
||||
"pathName": "pages/config/config",
|
||||
"query": "companyoid=17",
|
||||
"scene": null
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
static/tabbar.zip
Normal file
BIN
static/tabbar.zip
Normal file
Binary file not shown.
Reference in New Issue
Block a user