diff --git a/app.js b/app.js index bd95e92..def4385 100644 --- a/app.js +++ b/app.js @@ -144,6 +144,7 @@ App({ }) }, globalData: { + typeLsit: {},//初始哈样式 scene: "", // token token: null, diff --git a/app.wxss b/app.wxss index a46838f..23a3618 100644 --- a/app.wxss +++ b/app.wxss @@ -1,5 +1,4 @@ /* @import "weui.wxss"; */ - @font-face { font-family: "iconfont"; /* project id 777313 */ src: url("//at.alicdn.com/t/font_777313_jq7td4d3uab.eot"); diff --git a/components/navbar/navbar.wxss b/components/navbar/navbar.wxss index cc998dc..d1aea47 100644 --- a/components/navbar/navbar.wxss +++ b/components/navbar/navbar.wxss @@ -1,10 +1,10 @@ .navbar { width: 100vw; background-color: #F4F5F9; - position: fixed; + /* position: fixed; */ left: 0; top: 0; - z-index: 400000000; + /* z-index: 400000000; */ } .title-container { diff --git a/config/config.js b/config/config.js index 2b2c016..a80a552 100755 --- a/config/config.js +++ b/config/config.js @@ -3,17 +3,17 @@ let weappId = extConfig.weappId; let configUrls = extConfig.attr.configUrl; let sockUrls = extConfig.attr.socketUrl; var config = { - url: configUrls, + url: configUrls, wsurl: sockUrls, api: { /* - *记录微信订阅 - */ - wxMsg:'/user/updateMsg', + *记录微信订阅 + */ + wxMsg: '/user/updateMsg', /** * 微信消息推送获取模板id */ - templateId:"/wxMsg/templateList", + templateId: "/wxMsg/templateList", /** * 接口用途:login */ @@ -39,17 +39,20 @@ var config = { /** * 商户优惠信息 */ - listByMerchant: "/wxCouponChannel/listByMerchant", + listByMerchant: "/wxCouponChannel/listByMerchant", /** * 优惠券详情 */ couponDetail: "/wxCoupon/detail", - /** + /** * 优惠券图文混排详情 */ couponHtmlDetail: "/wxCoupon/html", couponHtmlDetailForPkg: "/couponOrder/html", - + /** + * 获取样式 + */ + setType: '/wxMiniappTheme/getOne', /** * 业态查询 * filter @@ -62,8 +65,8 @@ var config = { */ couponChannelList: "/wxCouponChannel/list", /** - * 换一换change - */ + * 换一换change + */ change: "/wxCouponChannel/change", /** * 下订单 @@ -175,15 +178,15 @@ var config = { * title * 描述 */ - getWeapNote:'/mall/getWeapNote', + getWeapNote: '/mall/getWeapNote', /** - * 商场信息(小程序分享) - */ + * 商场信息(小程序分享) + */ getMallInfo: '/mall/mallInfo', /** * 小程序获取游戏路径 */ - getGame:'/game/getOne', + getGame: '/game/getOne', /** * 小程序获取广告路径 */ @@ -199,20 +202,20 @@ var config = { /** * 查询问卷 */ - getQuestion:"/wxQuestion/getQuestion", + getQuestion: "/wxQuestion/getQuestion", /** * 提交问卷 */ - answerQuestion:"/wxQuestion/answerQuestion", + answerQuestion: "/wxQuestion/answerQuestion", /** * 获取打折商户列表 */ - discountMerchantList:"/mall/discountMerchantList", + discountMerchantList: "/mall/discountMerchantList", /** * 卡包分页列表接口 */ - cardorderList:"/couponOrder/cardList", + cardorderList: "/couponOrder/cardList", /** * 卡券详情接口 */ @@ -220,63 +223,63 @@ var config = { /** * C端扫B端储值卡支付订单 */ - cardPayOrder:"/cardPay/order_create", + cardPayOrder: "/cardPay/order_create", /** * 兑换历史列表 */ - scoreHistory:"/scoreHistory/list", + scoreHistory: "/scoreHistory/list", /** * 获取用户折扣率 */ - getDiscountInfo:"/user/getDiscountInfo", + getDiscountInfo: "/user/getDiscountInfo", /** * C端扫B端储值卡交易流水列表接口 */ - cardpayList:"/cardPay/list", + cardpayList: "/cardPay/list", /** * 根据code查询接口 */ - findByCode:"/merchant/findByCode", - /** + findByCode: "/merchant/findByCode", + /** * 参与砍价 */ - pressOrderJoin:"/press/pressOrderJoin", + pressOrderJoin: "/press/pressOrderJoin", /** * 我的砍价列表 */ - pressOrderList:"/order/pressOrderList", + pressOrderList: "/order/pressOrderList", /** * 砍价订单详情 */ - pressOrderDetail:"/order/pressOrderDetail", + pressOrderDetail: "/order/pressOrderDetail", /** * */ - getPressOrderStatus:"/press/getPressOrderStatus", + getPressOrderStatus: "/press/getPressOrderStatus", /** * 查询转赠卡状态 */ - queryCardStatus:"/couponOrder/queryCardStatus", + queryCardStatus: "/couponOrder/queryCardStatus", /** * 领取转赠卡 */ - cardAccept:'/couponOrder/cardAccept', + cardAccept: '/couponOrder/cardAccept', /** * 获取我的拼团列表 */ - getMySepllList:'/orderGroup/queryOrderGroup', + getMySepllList: '/orderGroup/queryOrderGroup', /** *查询差1个的团购信息 */ - queryRemainOne:'/orderGroup/queryRemainOne', + queryRemainOne: '/orderGroup/queryRemainOne', /** * *分页列表接口 */ - merchantList:"/merchant/list", + merchantList: "/merchant/list", /* * 查询拼团状态 */ - queryOrderGroupStatus:'/orderGroup/queryOrderGroupStatus', + queryOrderGroupStatus: '/orderGroup/queryOrderGroupStatus', /** * 去拼团 */ @@ -284,58 +287,58 @@ var config = { /** * 查询是否已参团 */ - queryAttendStatus:'/orderGroup/queryAttendStatus', + queryAttendStatus: '/orderGroup/queryAttendStatus', /** * 专题 */ - topicShow:"/topic/show", + topicShow: "/topic/show", /** * 专题详情 */ - topicFindById:"/topic/findById", + topicFindById: "/topic/findById", /** * 积分券详情 */ - integralDetail:'/wxCoupon/findById', + integralDetail: '/wxCoupon/findById', /** * 会员积分记录 */ - integralList:'/credit/list', + integralList: '/credit/list', /** * 用户更新位置信息 */ - updateLBS:"/user/updateLBS", + updateLBS: "/user/updateLBS", /** * 用户更新信息 */ - updateUserInfo:"/user/updateUserInfo", + updateUserInfo: "/user/updateUserInfo", /** * 用户更新scene */ - updateScene:"/user/updateScene", + updateScene: "/user/updateScene", /** * 富文本详情 */ - printHtmlById:"/wxCampaign/printHtmlById", - acfindById:"/wxActivity/findById", - acPrintHtmlById:"/wxActivity/printHtmlById", + printHtmlById: "/wxCampaign/printHtmlById", + acfindById: "/wxActivity/findById", + acPrintHtmlById: "/wxActivity/printHtmlById", //参与活动 - activityJoin:"/wxActivityJoin/join", + activityJoin: "/wxActivityJoin/join", //签到 - activitySign:"/wxActivityJoin/sign", + activitySign: "/wxActivityJoin/sign", activityList: "/wxActivityJoin/list", //获取未支付的订单 getUnPaidOrder: "/order/getUnPaidOrder", - getCouponOrderByPassword:'/couponPassword/getCouponOrderByPassword', - getbuildingfloorlist:'/wxMallBuilding/getbuildingfloorlist', + getCouponOrderByPassword: '/couponPassword/getCouponOrderByPassword', + getbuildingfloorlist: '/wxMallBuilding/getbuildingfloorlist', //商场信息接口 getMallInfo: "/mall/mallInfo", // 获取楼层楼座数据 - getbuildingfloorlist:"/wxMallBuilding/getbuildingfloorlist", + getbuildingfloorlist: "/wxMallBuilding/getbuildingfloorlist", // 获取所有直播间和商品信息 - getReplayList:"/live/replayList", + getReplayList: "/live/replayList", // 获取直播房间回放数据和商品信息 - getRoomList: "/live/roomList" + getRoomList: "/live/roomList" }, weapp: { AppId: weappId diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js index fe0901d..38e7bc2 100644 --- a/custom-tab-bar/index.js +++ b/custom-tab-bar/index.js @@ -34,6 +34,7 @@ Component({ ] }, attached() { + this.getType() if (ifStoreApp == 1) { this.setData({ list: [{ @@ -78,14 +79,61 @@ Component({ switchTab(e) { const data = e.currentTarget.dataset; const url = data.path; - if(data.index==0||data.index==3){ + if (data.index == 0 || data.index == 3) { this.getTemplateId() } - wx.switchTab({url}); + wx.switchTab({ + url + }); this.setData({ selected: data.index }) }, + /** + * 获取全局样式 + */ + getType() { + Http.get({ + url: config.api.setType, + data: {} + }).then(res => { + const { + code, + data + } = res + if (code == 200) { + this.setData({ + list: [{ + "pagePath": "/index/index", + "iconPath": `${data.t_in.icon}`, + "selectedIconPath": `${data.t_in_std.icon}`, + "text": "首页" + }, + { + "pagePath": "/index/searchbar", + "iconPath": `${data.t_md.icon}`, + "selectedIconPath": `${data.t_md_std.icon}`, + "text": "门店" + }, + { + "pagePath": "/index/passCar", + "iconPath": `${data.t_tc.icon}`, + "selectedIconPath": `${data.t_tc_std.icon}`, + "text": "停车" + }, + { + "pagePath": "/index/user", + "iconPath": `${data.t_uc.icon}`, + "selectedIconPath": `${data.t_uc_std.icon}`, + "text": "我的" + } + ], + selectedColor: `${data.t_uc_std.styleClass}`, + }) + } + + }) + }, getTemplateId() { Http.get({ url: config.api.templateId, @@ -118,8 +166,8 @@ Component({ tmplIds: tmplIds, success(res) { let _statue = null - tmplIds.map((item,index)=>{//判读用户是否点击了确定 - if(res[item]=="accept"){ + tmplIds.map((item, index) => { //判读用户是否点击了确定 + if (res[item] == "accept") { _statue = 'ok' } }) diff --git a/ext.json b/ext.json index 02eff8c..d947234 100644 --- a/ext.json +++ b/ext.json @@ -16,14 +16,14 @@ } ], "configUrl": "https://ctest.malls.iformall.com/C/api", - "etcpAppId": "wx219a81b9c87aa4f7", + "etcpAppId": "wx192b7d2e8dcbefd0", "etcpVersion": "release", "etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback", "ifHaveWebSocket": "0", "ifHaveCarModular": "1" }, - "name": "富茂光谷测试版", - "weappId": "wx219a81b9c87aa4f7", + "name": "金泸商务", + "weappId": "wx649b3be73c1afe47", "appVersion": "C.test.5.2.0" }, "debug": false, @@ -69,7 +69,7 @@ "provider": "wx2b03c6e691cd7370" } }, - "extAppid": "wx219a81b9c87aa4f7", + "extAppid": "wx649b3be73c1afe47", "extEnable": true, "permission": { "scope.userLocation": { diff --git a/index/index.js b/index/index.js index 293b2ed..862c81f 100644 --- a/index/index.js +++ b/index/index.js @@ -1,6 +1,6 @@ const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} let ifStoreApp = extConfig.attr.ifStoreApp; -const navigationBarHeight = (getApp().statusBarHeight + 60) + 'px' +const navigationBarHeight = (getApp().statusBarHeight + 60) + 'rpx' const Http = require("../utils/HttpBasics"); const imgurl = require("../utils/imgurl"); const config = require("../config/config"); @@ -10,6 +10,7 @@ const bgColor = require("../utils/bgColor.js") let app = getApp(); Page({ data: { + typeLsit:{}, showLocationIf: true, ifStoreApp: ifStoreApp, navigationBarTitle: '首页', @@ -84,6 +85,7 @@ Page({ liveFlag: 0, //直播按钮显隐标志位 squareName: "", //当前广场 isShowSqare: false, + }, //获取当前广场名 @@ -225,12 +227,28 @@ Page({ }) } }, - - + /** + * 获取全局样式 + */ + getType() { + Http.get({ + url: config.api.setType, + data:{} + }).then(res=>{ + const{code ,data}=res + if(code==200){ + this.setData({ + typeLsit: data + }) + } + console.log(this.data.typeLsit,"???") + }) + }, /** * 生命周期函数--监听页面初次渲染完成 */ onLoad: function(options) { + this.getType() this.getLocation(); let that = this; let optionss; @@ -411,7 +429,7 @@ Page({ getWeapNote: function(couponChannelId, couponId, orderId) { var that = this; - if (app.globalData.token){ + if (app.globalData.token) { // 登录 console.log(app.globalData.token) that.getmemberId(app.globalData.token); @@ -430,11 +448,11 @@ Page({ app.businessListCallback(app.globalData.token); } Http.get({ - url: config.api.getWeapNote, - data: { - appId: config.weapp.AppId, - } - }) + url: config.api.getWeapNote, + data: { + appId: config.weapp.AppId, + } + }) .then(res => { console.log(33333333333) console.log(app.globalData.token) @@ -460,7 +478,7 @@ Page({ }); }); - }else{ + } else { app.tokenCallback = token => { // 登录 console.log(app.globalData.token) @@ -480,11 +498,11 @@ Page({ app.businessListCallback(app.globalData.token); } Http.get({ - url: config.api.getWeapNote, - data: { - appId: config.weapp.AppId, - } - }) + url: config.api.getWeapNote, + data: { + appId: config.weapp.AppId, + } + }) .then(res => { console.log(33333333333) console.log(app.globalData.token) @@ -511,7 +529,7 @@ Page({ }); } } - + }, getStaticGame(token) { diff --git a/index/index.wxml b/index/index.wxml index 7ae2fb6..2f2a678 100644 --- a/index/index.wxml +++ b/index/index.wxml @@ -1,55 +1,56 @@ - - + + - + - {{squareName}} ↓ + {{squareName}} ↓ - + + - - + + - - - + + + {{levelName}} - - 还需{{upgradeScore}}成长值可升级 + + 还需{{upgradeScore}}成长值可升级 - + - - + + - + - + 砍价 - - + + 拼团 - + 直播厅 - + 消费卡 - + 积分商城 - + 砍价 - + 拼团 @@ -76,8 +77,13 @@ 限时抢购 - - + - - - - 限时专区 - 限时惊爆价 轻松拎回家 - - - - - - {{xslist[index].title}} - + + + + 限时专区 + 限时惊爆价 轻松拎回家 + + + + + + {{xslist[index].title}} - - - - 更多... - + + + + + 更多... - - - - - - - - - - - - - + + + + + + + + + + + + + - \ No newline at end of file diff --git a/index/index.wxss b/index/index.wxss index 0db7380..b5a7ff2 100644 --- a/index/index.wxss +++ b/index/index.wxss @@ -2,6 +2,11 @@ page{ background: #F4F5F9; } +.color_box{ +/* padding-top: 20rpx; */ + /* background-image: linear-gradient(#DC143C, #F4F5F9); */ +background-color: #F4F5F9; +} .underlingImg{ width: 30rpx; diff --git a/index/user.wxml b/index/user.wxml index 4528b0a..7502e75 100644 --- a/index/user.wxml +++ b/index/user.wxml @@ -1,5 +1,5 @@ - + 版本号:{{appVersion}} diff --git a/project.config.json b/project.config.json index 353b36f..2d66bb6 100644 --- a/project.config.json +++ b/project.config.json @@ -4,7 +4,7 @@ "ignore": [] }, "setting": { - "urlCheck": true, + "urlCheck": false, "es6": true, "enhance": false, "postcss": true, @@ -95,6 +95,13 @@ "pathName": "pages/index/index", "query": "type=cd&couponChannelId=420885883373359104", "scene": null + }, + { + "id": -1, + "name": "pages/main/index", + "pathName": "pages/main/index", + "query": "type=cd&couponChannelId=489599575725629440", + "scene": null } ] } diff --git a/utils/imgurl.js b/utils/imgurl.js index c351b5f..9bdb4b6 100644 --- a/utils/imgurl.js +++ b/utils/imgurl.js @@ -549,7 +549,7 @@ module.exports = { 'url': baseUrl + 'leftarrows.png', 'name': '左箭头' }, - 'barcode': { + 'barcode': {//换肤 'url': baseUrl + 'lqcbarcode.png', 'name': '二维码' },