diff --git a/apis/interfaces/public.js b/apis/interfaces/public.js index 2a2691a..4e6193e 100644 --- a/apis/interfaces/public.js +++ b/apis/interfaces/public.js @@ -6,8 +6,10 @@ import {req} from "../request" const richText = (key) => req({url: "single/" + key, data: {key: "string"}}) //富文本 const getStatus = (key) => req({url: "ajax/status/" + key}) //状态查询 +const storeConfig = (data) => req({url: "wechat/mini/myComponents", data: data}) //企业工具模块配置 export default({ richText, - getStatus + getStatus, + storeConfig }) diff --git a/app.js b/app.js index ab685c2..f50a7b2 100644 --- a/app.js +++ b/app.js @@ -18,6 +18,13 @@ App({ //挂载api方法 wx.$api = apis + + //获取模版信息 + apis.publics.storeConfig({ + company_id: "17" + }).then(res=>{ + console.log(res) + }) }, globalData: { navAppInfo : { @@ -25,6 +32,25 @@ App({ envVersion : "trial", goodUrl : "/pages/goods/show?goodsId=", cardUrl : "/pages/card/index?cardid=" + }, + storeModule: { + selected : 0, + color : "#4e4f51", + selectedColor: "#0b0041", + list : [ + { + "pagePath": "/pages/mall/index", + "text": "商城", + "iconPath": "/static/tabbar/tabbar_icon_01.png", + "selectedIconPath": "/static/tabbar/tabbar_icon_show_01.png" + }, + { + "pagePath": "/pages/user/index", + "text": "我的", + "iconPath": "/static/tabbar/tabbar_icon_03.png", + "selectedIconPath": "/static/tabbar/tabbar_icon_show_03.png" + } + ] } } }) diff --git a/app.json b/app.json index 1fec665..3e2a3e9 100644 --- a/app.json +++ b/app.json @@ -25,6 +25,7 @@ "pages/mall/mall_pay/mall_pay", "pages/mall/mall_search/mall_search", "pages/mall/mall_video/mall_video", + "pages/mall/mall_refund/mall_refund", "pages/live/index", "pages/ticket/index", "pages/ticket/goods/goods", @@ -37,8 +38,7 @@ "pages/home/beSureOrder/beSureOrder", "pages/home/companyMore/companyMore", "pages/home/projectSuccess/projectSuccess", - "pages/home/activeSuccess/activeSuccess", - "pages/mall/mall_refund/mall_refund" + "pages/home/activeSuccess/activeSuccess" ], "window": { "backgroundTextStyle": "light", diff --git a/components/company/enterprise/enterprise.js b/components/company/enterprise/enterprise.js index 9011b38..9bdc664 100644 --- a/components/company/enterprise/enterprise.js +++ b/components/company/enterprise/enterprise.js @@ -4,8 +4,8 @@ Component({ * 组件的属性列表 */ properties: { - info:{ - type:Object + info: { + type: Object } }, @@ -73,9 +73,12 @@ Component({ break; } }, - - - - + // 跳转到员工名片详情 + goCard(e) { + console.log(e.currentTarget.dataset.cardid); + wx.navigateTo({ + url: '/pages/card/index?cardid='+e.currentTarget.dataset.cardid, + }) + } } }) \ No newline at end of file diff --git a/components/company/enterprise/enterprise.wxml b/components/company/enterprise/enterprise.wxml index 4f7cde5..0cc6af8 100644 --- a/components/company/enterprise/enterprise.wxml +++ b/components/company/enterprise/enterprise.wxml @@ -35,7 +35,7 @@ - + {{item.name}} {{item.job}} diff --git a/components/company/fengcaiInfo/fengcaiInfo.wxss b/components/company/fengcaiInfo/fengcaiInfo.wxss index 54547c2..38bd9ab 100644 --- a/components/company/fengcaiInfo/fengcaiInfo.wxss +++ b/components/company/fengcaiInfo/fengcaiInfo.wxss @@ -7,7 +7,7 @@ background-color: #fff; box-shadow: 0 0 14rpx rgba(0, 0, 0, 0.3); margin-top: 20rpx; - padding:30rpx 30rpx 20rpx 30rpx; + padding:30rpx 20rpx 20rpx 20rpx; } .enterprise_content .content{ diff --git a/components/company/personalInfo/personalInfo.js b/components/company/personalInfo/personalInfo.js index 14714a5..8cb8f8d 100644 --- a/components/company/personalInfo/personalInfo.js +++ b/components/company/personalInfo/personalInfo.js @@ -17,7 +17,12 @@ Component({ * 组件的方法列表 */ methods: { - // 获取员工列表 - + // 跳转到员工名片详情 + goCard(e) { + console.log(e.currentTarget.dataset.cardid); + wx.navigateTo({ + url: '/pages/card/index?cardid='+e.currentTarget.dataset.cardid, + }) + } } }) diff --git a/components/company/personalInfo/personalInfo.wxml b/components/company/personalInfo/personalInfo.wxml index 381f6d1..bf6e5d5 100644 --- a/components/company/personalInfo/personalInfo.wxml +++ b/components/company/personalInfo/personalInfo.wxml @@ -1,4 +1,4 @@ - + {{info.name}}({{info.job}}) diff --git a/components/company/videoInfo/videoInfo.wxss b/components/company/videoInfo/videoInfo.wxss index 54547c2..c416eb0 100644 --- a/components/company/videoInfo/videoInfo.wxss +++ b/components/company/videoInfo/videoInfo.wxss @@ -1,16 +1,21 @@ /* 企业视频*/ -.enterprise_content{ - font-size:29rpx ; +.enterprise_content { + font-size: 29rpx; color: #333; margin: 0 30rpx; border-radius: 12rpx; background-color: #fff; box-shadow: 0 0 14rpx rgba(0, 0, 0, 0.3); margin-top: 20rpx; - padding:30rpx 30rpx 20rpx 30rpx; + padding: 30rpx 20rpx 20rpx 20rpx; } -.enterprise_content .content{ + +.enterprise_content video { + width: 100%; +} + +.enterprise_content .content { position: relative; text-overflow: -o-ellipsis-lastline; overflow: hidden; @@ -23,7 +28,7 @@ } /* 播放 */ -.content .play{ +.content .play { background-color: rgba(0, 0, 0, 0.3); width: 100%; height: calc(100% - 10rpx); @@ -36,7 +41,8 @@ align-items: center; box-sizing: border-box; } -.content .play image{ + +.content .play image { width: 102rpx; height: 102rpx; } \ No newline at end of file diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js new file mode 100644 index 0000000..0ebe6e5 --- /dev/null +++ b/custom-tab-bar/index.js @@ -0,0 +1,43 @@ + +/** + * Web唐明明 + * 匆匆数载恍如梦,岁月迢迢华发增。 + * 碌碌无为枉半生,一朝惊醒万事空。 + */ + +Component({ + /** + * 组件的初始数据 + */ + data: { + selected : getApp().globalData.storeModule.selected, + color : getApp().globalData.storeModule.color, + selectedColor: getApp().globalData.storeModule.selectedColor, + list : getApp().globalData.storeModule.list + }, + + /** + * 生命周期函数 + */ + pageLifetimes: { + show(){ + console.log("获取配置信息") + } + }, + + /** + * 组件的方法列表 + */ + methods: { + switchTab(e) { + const data = e.currentTarget.dataset + const url = data.path + wx.switchTab({ + url + }) + this.setData({ + selected: data.index + }) + } + } +}) \ No newline at end of file diff --git a/custom-tab-bar/index.json b/custom-tab-bar/index.json new file mode 100644 index 0000000..fba482a --- /dev/null +++ b/custom-tab-bar/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/custom-tab-bar/index.wxml b/custom-tab-bar/index.wxml new file mode 100644 index 0000000..e54d25a --- /dev/null +++ b/custom-tab-bar/index.wxml @@ -0,0 +1,9 @@ + + + + + + {{item.text}} + + diff --git a/custom-tab-bar/index.wxss b/custom-tab-bar/index.wxss new file mode 100644 index 0000000..fe6d9b7 --- /dev/null +++ b/custom-tab-bar/index.wxss @@ -0,0 +1,44 @@ + +/** + * Web唐明明 + * 匆匆数载恍如梦,岁月迢迢华发增。 + * 碌碌无为枉半生,一朝惊醒万事空。 + */ + +.tab-bar { + position: fixed; + bottom: 0; + left: 0; + right: 0; + height: 48px; + background: white; + display: flex; + padding-bottom: env(safe-area-inset-bottom); +} + +.tab-bar-border { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 1px; + transform: scaleY(0.5); +} + +.tab-bar-item { + flex: 1; + text-align: center; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.tab-bar-item cover-image { + width: 24px; + height: 24px; +} + +.tab-bar-item cover-view { + font-size: 10px; +} diff --git a/pages/home/beSureOrder/beSureOrder.js b/pages/home/beSureOrder/beSureOrder.js index 71f062c..6fcac25 100644 --- a/pages/home/beSureOrder/beSureOrder.js +++ b/pages/home/beSureOrder/beSureOrder.js @@ -4,16 +4,19 @@ Page({ addressList: [], info: '', remark: '', - crowdfund_id: '' + crowdfund_id: '', + addressDel: {}, }, + onLoad(e) { wx.$api.companyModule.crowdfundsCreat(e.crowdfund_item_id).then(res => { - console.log(res); if (res.address.length > 0) { this.setData({ - address_id: res.address[0].address_id, addressList: res.address, + addressDel: res.address[0] }) + console.log(res); + console.log(this.data.addressDel) } this.setData({ crowdfund_item_id: e.crowdfund_item_id, @@ -25,6 +28,9 @@ Page({ wx.navigateBack({}) }) }, + onShow() { + console.log(this.data.addressDel) + }, input(e) { this.setData({ remark: e.detail.value @@ -35,7 +41,7 @@ Page({ title: '创建中...', mask: 'true' }) - wx.$api.companyModule.crowdfundsCreatOrder(this.data.crowdfund_item_id, this.data.address_id, this.data.remark).then(res => { + wx.$api.companyModule.crowdfundsCreatOrder(this.data.crowdfund_item_id, this.data.addressDel.address_id, this.data.remark).then(res => { var data = {}; if (res.trade_no) { wx.login({ @@ -76,6 +82,12 @@ Page({ }).catch(res => { wx.navigateBack({}) }) + }, + // 跳转到地址列表和新增地址页面 + goAddress(){ + wx.navigateTo({ + url: '/pages/mall/mall_address/mall_address?type=selectAddress', + }) } }) \ No newline at end of file diff --git a/pages/home/beSureOrder/beSureOrder.wxml b/pages/home/beSureOrder/beSureOrder.wxml index 4576274..32fcdf9 100644 --- a/pages/home/beSureOrder/beSureOrder.wxml +++ b/pages/home/beSureOrder/beSureOrder.wxml @@ -1,10 +1,17 @@ - + - 张冬雪 14745798066 学校 默认 - 黑龙江省哈尔滨市南岗区汉水路451号省科学院研究所7楼 + {{addressDel.name}} {{addressDel.mobile}} 学校 + 默认 + {{addressDel.address}} + + + + 添加收货地址 + + diff --git a/pages/home/beSureOrder/beSureOrder.wxss b/pages/home/beSureOrder/beSureOrder.wxss index 69f6422..8ee74ee 100644 --- a/pages/home/beSureOrder/beSureOrder.wxss +++ b/pages/home/beSureOrder/beSureOrder.wxss @@ -17,9 +17,10 @@ height: 120rpx; } -.besure_bottom .left{ +.besure_bottom .left { width: 160rpx; } + .besure_now_act .left span { font-size: 28rpx; color: #333; @@ -58,7 +59,8 @@ border-top: solid 1rpx #f7f7f7; } -.besure_bottom input , .besure_bottom>span { +.besure_bottom input, +.besure_bottom>span { flex: 1; /* margin-left: 30rpx; */ padding-top: 4rpx; @@ -138,6 +140,7 @@ justify-content: space-between; align-items: center; box-sizing: border-box; + position: relative; } .besure_address .userinfo { @@ -179,4 +182,47 @@ .besure_address .des { font-size: 24rpx; padding-top: 10rpx; +} + +.arrows-right { + position: absolute; + bottom: 0; + left: 0; + width: 100%; +} + +.order-add-address { + text-align: center; + padding: 30rpx 0; + position: relative; +} + +.order-add-address navigator { + display: inline-block; + background: #e92344; + color: white; + line-height: 60rpx; + padding: 0 30rpx; + margin-right: 20rpx; +} + +.arrows-add { + text-align: center; + width: 100%; +} + +.arrows-add-img { + width: 30rpx; + vertical-align: middle; + margin: -8rpx 6rpx 0 0; +} + +.arrows-add { + width: 100%; + background-color: red; + height: 90rpx; +} + +.jc_start { + justify-content: start; } \ No newline at end of file diff --git a/pages/home/index.js b/pages/home/index.js index 3b18f41..818cf6b 100644 --- a/pages/home/index.js +++ b/pages/home/index.js @@ -7,17 +7,12 @@ Page({ selectMenuId: 0, //默认是企业信息0 视频1 活动2 项目筹集3 company_id: wx.getStorageSync('company_id'), //企业Id, info: '', //企业信息 + loaded:false }, onLoad(e) { - console.log(e) - if(e.id){ - this.company(e.id) - wx.setStorageSync('company_id', e.id) - }else{ - this.company(this.company_id) - } }, onShow() { + this.company(wx.getStorageSync('company_id')) }, onUnload: function () { wx.removeStorageSync('company_id') @@ -65,7 +60,8 @@ Page({ wx.$api.companyModule.company(this.data.company_id, this.data.page).then(res => { console.log(res) this.setData({ - info: res + info: res, + loaded:true, }) }) }, @@ -77,5 +73,14 @@ Page({ wx.makePhoneCall({ phoneNumber: this.data.info.certification.phone, }) + }, + /** + * 进入商城 + */ + goMall(e){ + console.log('1111') + wx.navigateTo({ + url: '/pages/mall/index', + }) } }) \ No newline at end of file diff --git a/pages/home/index.wxml b/pages/home/index.wxml index 5972307..41180f3 100644 --- a/pages/home/index.wxml +++ b/pages/home/index.wxml @@ -1,45 +1,50 @@ - - - {{info.base.name}} - - - - - - - - 注册资本:{{info.base.registered_capital||'未完善' }}元 + + + + {{info.base.name}} + - - - 成立时间:{{info.base.setup_at||'未完善' }} - - - - 企业法人:{{info.certification.name||'未完善' }} - - - - 拨打电话 + + + + + 注册资本:{{info.base.registered_capital||'未完善' }}元 - - 进入商城 + + + 成立时间:{{info.base.setup_at||'未完善' }} - - 关注企业 + + + 企业法人:{{info.certification.name||'未完善' }} + + + + 拨打电话 + + + 进入商城 + + + 关注企业 + - + - 企业信息 + 企业信息 - 企业动态 - 企业活动 - 项目筹集 + 企业动态 + 企业活动 + 项目筹集 diff --git a/pages/home/projectDetail/projectDetail.wxss b/pages/home/projectDetail/projectDetail.wxss index d22cd1a..768ed9d 100644 --- a/pages/home/projectDetail/projectDetail.wxss +++ b/pages/home/projectDetail/projectDetail.wxss @@ -223,7 +223,8 @@ swiper { height: 100%; } -.project_now_act span , .project_now_act button { +.project_now_act span, +.project_now_act button { margin-left: 60rpx; flex: 1; display: inline-block; @@ -231,10 +232,11 @@ swiper { color: #fff; font-size: 30rpx !important; border-radius: 10rpx !important; - padding: 20rpx 100rpx ; + padding: 20rpx 100rpx; text-align: center; font-weight: 600; } + .project_now_act button { padding: 10rpx 0 !important; } @@ -378,6 +380,7 @@ swiper { color: #333; font-weight: 600; margin-left: 30rpx; + width: calc(100% - 180rpx); } /* 项目回报列表 */ @@ -447,7 +450,7 @@ swiper { color: #999; } -.project_list .seeAll span { +.project_list .seeAll span { background-color: #378fff; color: #fff; padding: 8rpx 20rpx; @@ -472,7 +475,7 @@ swiper { border-radius: 50rpx; background-color: #378fff; color: #fff; - margin:30rpx 20rpx; + margin: 30rpx 20rpx; font-size: 26rpx; text-align: center; width: 50%; diff --git a/pages/home/projectSuccess/projectSuccess.js b/pages/home/projectSuccess/projectSuccess.js index ccaa772..e8c2a9d 100644 --- a/pages/home/projectSuccess/projectSuccess.js +++ b/pages/home/projectSuccess/projectSuccess.js @@ -1,11 +1,10 @@ - Page({ /** * 页面的初始数据 */ data: { - info:{},//产品基本信息 + info: {}, //产品基本信息 }, /** @@ -30,6 +29,9 @@ Page({ title: '您的好友邀请你一起', path: '/pages/companyModule/projectDetail/projectDetail?id=6', imageUrl: this.data.info.pictures[0] - } - } + } + }, + /** + * 跳转到个人 + */ }) \ No newline at end of file diff --git a/pages/shortVideo/index.js b/pages/shortVideo/index.js index 36e2cae..663caa9 100644 --- a/pages/shortVideo/index.js +++ b/pages/shortVideo/index.js @@ -78,7 +78,8 @@ Page({ */ goCompany(e) { wx.navigateTo({ - url: '/pages/home/index?id=' + e.currentTarget.dataset.id, + url: '/pages/home/index' , }) + wx.setStorageSync('company_id', e.currentTarget.dataset.id) } }) \ No newline at end of file diff --git a/pages/user/companyMine/companyOrder.js b/pages/user/companyMine/companyOrder.js new file mode 100644 index 0000000..015fe61 --- /dev/null +++ b/pages/user/companyMine/companyOrder.js @@ -0,0 +1,29 @@ +// pages/companyOrder/companyOrder.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + type: 0, //全部0 待付款1 待发货2 待收货3 退款/售后4 + }, + + onLoad() { + + }, + + /** + * 点击按钮触发事件 + */ + menuSelect: function (e) { + console.log(e.currentTarget.dataset.id); + if (this.data.type != e.currentTarget.dataset.id) { + this.setData({ + type: e.currentTarget.dataset.id + }) + if (e.currentTarget.dataset.id == 3) { + this.selectComponent('#categoryTypeList').crowdfundcategory(this.data.company_id); + } + } + }, +}) \ No newline at end of file diff --git a/pages/user/companyMine/companyOrder.json b/pages/user/companyMine/companyOrder.json new file mode 100644 index 0000000..2769eec --- /dev/null +++ b/pages/user/companyMine/companyOrder.json @@ -0,0 +1,6 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "项目预购", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#378fff" +} \ No newline at end of file diff --git a/pages/user/companyMine/companyOrder.wxml b/pages/user/companyMine/companyOrder.wxml new file mode 100644 index 0000000..42ed3e9 --- /dev/null +++ b/pages/user/companyMine/companyOrder.wxml @@ -0,0 +1,16 @@ + + + + 全部 + 待付款 + 待发货 + 待收货 + 退款/售后 + + + diff --git a/pages/user/companyMine/companyOrder.wxss b/pages/user/companyMine/companyOrder.wxss new file mode 100644 index 0000000..ac6ccf0 --- /dev/null +++ b/pages/user/companyMine/companyOrder.wxss @@ -0,0 +1,33 @@ +/* 滚动菜单 */ +.scroll_menu { + background-color: #fff; + box-shadow: 0 0rpx 10px rgba(0, 0, 0, 0.1); + font-size: 28rpx; +} + +.scroll-view_H { + white-space: nowrap; + color: #000; +} + +.scroll-view-item { + height: 90rpx; + line-height: 90rpx; +} + +.scroll-view-item_H { + display: inline-block; + width: 22%; + height: 90rpx; + line-height: 90rpx; + text-align: center; + border-bottom: solid 4rpx #fff; +} + +.scroll_view_select { + border-bottom: solid 4rpx #378fff; + color: #378fff; + font-weight: 600; +} + +/* 列表 */ \ No newline at end of file diff --git a/pages/user/companyMine/myActives/activeDetail/activeDetail.js b/pages/user/companyMine/myActives/activeDetail/activeDetail.js new file mode 100644 index 0000000..a8edb50 --- /dev/null +++ b/pages/user/companyMine/myActives/activeDetail/activeDetail.js @@ -0,0 +1,109 @@ +// pages/companyModule/companyMoreVideo/companyMoreVideo.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + acted: false, //已经报名true + showBeSureActed: false, //显示确认弹窗 + indicatorDots: true, + vertical: false, + autoplay: false, + interval: 2000, + duration: 500, + active_id: '', //活动id + info: '', //详情信息 + loaded:false, + }, + onLoad(e) { + this.setData({ + active_id: e.id + }) + }, + onShow() { + this.activesDetail(this.data.active_id); + }, + + /** + * 现在报名 + */ + nowActed: function (e) { + console.log() + if (!e.currentTarget.dataset.acted) { + this.setData({ + showBeSureActed: true, + }) + } else { + wx.showToast({ + icon: 'none', + title: '已报名,等待活动开始', + }) + } + }, + /** + * 关闭弹窗 + */ + close() { + this.setData({ + showBeSureActed: false + }) + }, + /** + * 确认报名 + */ + beSure() { + wx.login({ + success:res=>{ + wx.$api.companyModule.activesEnroll(res.code,this.data.active_id).then(res => { + if(Number(this.data.info.price)>0){ + var resss=JSON.parse(res); + console.log('可支付') + wx.requestPayment({ + timeStamp: resss.timeStamp, + nonceStr: resss.nonceStr, + package: resss.package, + signType: 'MD5', + paySign: resss.paySign, + success:res=>{ + this.close(); + wx.navigateTo({ + url: '/pages/companyModule/activeSuccess/activeSuccess?cover='+this.data.info.pictures[0], + }) + }, + fail(res) { + wx.showToast({ + title: '支付失败', + }) + } + }) + + }else{ + console.log('不用支付') + this.close(); + wx.navigateTo({ + url: '/pages/companyModule/activeSuccess/activeSuccess?cover='+this.data.info.pictures[0], + }) + } + }) + } + }) + }, + /** + * 获取详情 + */ + activesDetail() { + wx.$api.companyModule.activesDetail(this.data.active_id).then(res => { + var nodes = res.content.replace(' + + + + + + + + + + + + + + + {{info.title}} + {{info.description}} + + + {{info.price > 0? '¥' + info.price:'免费'}} + 报名上限:{{info.limits}}人 + + + + + 截止时间:{{info.deadlined_at}} + 活动时间:{{info.started_at}}至{{info.ended_at}} + 活动地点:{{info.address}} + + + + 联系人电话:{{info.contact}} + + + + 活动详情 + + + + + + {{info.price> 0 ? '¥' + info.price:'免费'}} + {{!info.canEnroll?'无法报名':'立即报名'}} + + + + + + + + + 是否对该活动进行报名 + 活动名称:{{info.title}} + 确认报名 + 我再想想 + + \ No newline at end of file diff --git a/pages/user/companyMine/myActives/activeDetail/activeDetail.wxss b/pages/user/companyMine/myActives/activeDetail/activeDetail.wxss new file mode 100644 index 0000000..27ec146 --- /dev/null +++ b/pages/user/companyMine/myActives/activeDetail/activeDetail.wxss @@ -0,0 +1,245 @@ +.active_content { + background-color: #fff; + box-sizing: border-box; + padding-bottom: 10rpx; +} + +.active_cover { + width: 100%; + height: 300rpx; + position: relative; + overflow: hidden; + padding-bottom: 0; +} + +.active_cover_bg { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 0; +} + +.active_type_icon { + position: absolute; + top: 0; + left: 0; + background-color: #ffcc00; + color: #4a1900; + padding: 4rpx 20rpx; + border-radius: 10rpx 0 20rpx 0; + font-size: 24rpx; + z-index: 1; +} + +.active_title { + margin-top: 30rpx; + padding: 0 30rpx; + color: #333; + font-weight: 600; + font-size: 32rpx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; +} + +.active_des { + margin-top: 14rpx; + padding: 0 30rpx; + color: #666; + font-size: 24rpx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +.active_time { + margin-top: 14rpx; + /* padding: 0 10rpx; */ + color: #666; + font-size: 26rpx; + /* overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; */ +} + +.active_time image { + width: 30rpx; + position: relative; + bottom: -6rpx; + right: 0; + margin-left: 30rpx; + margin-right: 4rpx; +} + +.active_line { + margin: 20rpx 20rpx 0 20rpx; + border-bottom: solid 1rpx #f7f7f7; +} + +.active_bottom { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + font-size: 40rpx; + font-weight: 600; + color: #333; + padding: 0 30rpx; + margin-top: 20rpx; +} + +.active_bottom span { + color: #999; + font-size: 24rpx; + padding-left: 10rpx; + font-weight: normal; +} + + +.active_detail { + padding: 20rpx; + background-color: #fff; + margin-top: 20rpx; +} + +.active_detail_html { + padding: 20rpx; + background-color: #fff; + margin-top: 20rpx; + width: 100%; + box-sizing: border-box; + overflow: hidden; + padding-bottom: 150rpx; +} + +.active_detail_html img{ + width: 100%; +} + +.active_nav { + color: #333; + font-weight: 600; + font-size: 32rpx; + padding-bottom: 30rpx; +} + +/* 立即报名 */ +.active_now_act { + margin-top: 20rpx; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + font-size: 34rpx; + font-weight: 600; + color: #333; + background-color: #fff; + padding: 20rpx 30rpx; + position: fixed; + bottom: 0; + width: 100%; + height: 120rpx; +} + +.active_now_act span { + margin-left: 60rpx; + flex: 1; + display: inline-block; + background-color: #378fff; + color: #fff; + font-size: 30rpx; + border-radius: 50rpx; + padding: 20rpx 100rpx; + text-align: center; + font-weight: 600; +} + +.acted span { + background-color: #999; +} + +.active_be_sure { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + box-sizing: border-box; + z-index: 1; +} + +.active_be_sure .bg { + background-color: rgba(0, 0, 0, 0.6); + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 2; +} + +.active_be_sure .content { + width: 600rpx; + background-color: #fff; + position: relative; + z-index: 3; + border-radius: 20rpx; + text-align: center; + padding-bottom: 30rpx; +} + +.active_be_sure .content .active_cover { + width: 100%; + height: 360rpx; + border-radius: 20rpx 20rpx 0 0; +} + +.active_be_sure .content .txt1 { + font-size: 36rpx; + font-weight: 600; + color: #333; + padding-top: 40rpx; +} + +.active_be_sure .content .txt2 { + padding-top: 20rpx; + font-size: 24rpx; + color: #999; +} + +.active_be_sure .content .txt3 { + font-size: 32rpx; + color: #fff; + background-color: #378fff; + font-weight: 600; + width: 70%; + margin-left:15%; + box-sizing: border-box; + padding: 20rpx 30rpx; + border-radius: 50rpx; + margin-top: 30rpx; +} + +.active_be_sure .content .txt4 { + font-size: 26rpx; + color: #999; + padding:20rpx 30rpx; +} + +img{ + max-width: 100%; +} \ No newline at end of file diff --git a/pages/user/companyMine/myActives/myActives.js b/pages/user/companyMine/myActives/myActives.js new file mode 100644 index 0000000..1be6ea1 --- /dev/null +++ b/pages/user/companyMine/myActives/myActives.js @@ -0,0 +1,75 @@ +// pages/companyOrder/companyOrder.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + state: 'unstart', //未开始 unstart 进行中start 已结束end + lists: [], + page: 1, + has_more: true, + }, + + onLoad() { + this.userActives(); + }, + + /** + * 点击按钮触发事件 + */ + menuSelect: function (e) { + if (this.data.state != e.currentTarget.dataset.state) { + wx.showLoading({ + title: '请求中...', + mask: true + }) + this.setData({ + state: e.currentTarget.dataset.state, + page: 1, + lists: [], + has_more: true + }) + } + this.userActives(); + }, + // 获取活动列表 + userActives() { + wx.$api.companyModule.userActives(this.data.state, this.data.page).then(res => { + setTimeout(() => { + wx.hideLoading({}) + }, 1000); + var lists = this.data.lists.concat(res.data) + if (res.page.has_more) { + this.setData({ + has_more: res.page.has_more, + page: page + 1, + lists: lists + }) + } else { + this.setData({ + has_more: res.page.has_more, + lists: lists + }) + } + }) + }, + // 触底加载更多 + onReachBottom() { + console.log('触底') + if (this.data.has_more) { + this.userActives(); + } else { + wx.showToast({ + icon: 'none', + title: '没有更多', + }) + } + }, + //跳转到详情页 + goUrl(e) { + wx.navigateTo({ + url: '/pages/companyModule/activeDetail/activeDetail?id=' + e.currentTarget.dataset.id, + }) + } +}) \ No newline at end of file diff --git a/pages/user/companyMine/myActives/myActives.json b/pages/user/companyMine/myActives/myActives.json new file mode 100644 index 0000000..8398201 --- /dev/null +++ b/pages/user/companyMine/myActives/myActives.json @@ -0,0 +1,6 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "活动参与", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#378fff" +} \ No newline at end of file diff --git a/pages/user/companyMine/myActives/myActives.wxml b/pages/user/companyMine/myActives/myActives.wxml new file mode 100644 index 0000000..6e7d77b --- /dev/null +++ b/pages/user/companyMine/myActives/myActives.wxml @@ -0,0 +1,31 @@ + + + + + 未开始 + + 进行中 + + 已结束 + + + + + 最新 + + + {{item.active.title}} + {{item.active.price> 0 ? '¥' + item.active.price:'免费'}} {{item.active.started_at}} + + 查看活动 + + + + + + + {{has_more?'~ 上拉加载更多 ~':'~ 暂无更多数据 ~'}} + \ No newline at end of file diff --git a/pages/user/companyMine/myActives/myActives.wxss b/pages/user/companyMine/myActives/myActives.wxss new file mode 100644 index 0000000..018f67d --- /dev/null +++ b/pages/user/companyMine/myActives/myActives.wxss @@ -0,0 +1,133 @@ +/* 滚动菜单 */ +.scroll_menu { + background-color: #fff; + box-shadow: 0 0rpx 10px rgba(0, 0, 0, 0.1); + font-size: 28rpx; +} + +.scroll-view_H { + white-space: nowrap; + color: #000; +} + +.scroll-view-item { + height: 90rpx; + line-height: 90rpx; +} + +.scroll-view-item_H { + display: inline-block; + width: 22%; + height: 90rpx; + line-height: 90rpx; + text-align: center; + border-bottom: solid 4rpx #fff; +} + +.scroll_view_select { + border-bottom: solid 4rpx #378fff; + color: #378fff; + font-weight: 600; +} + +/* 列表 */ + +.list_content { + margin: 20rpx; + border-radius: 10rpx; + display: flex; + flex-direction: row; + align-items: center; + box-sizing: border-box; + justify-content: center; + padding: 20rpx; + background-color: #Fff; + box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.2); + position: relative; +} + +.list_content .left { + width: 160rpx; + height: 160rpx; + border-radius: 3rpx; +} + +.list_content .right { + width: calc(100% - 160rpx); + padding: 0 0 20rpx 20rpx; + display: flex; + flex-direction: column; + align-items: flex-start; + justify-content: space-between; + box-sizing: border-box; +} + +.list_content .right .title { + margin-top: 10rpx; + width: 100%; + font-size: 30rpx; + color: #333; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.list_content .right .money { + margin-top: 30rpx; + width: 100%; + font-size: 34rpx; + color: #000; + font-weight: 600; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + vertical-align: middle; +} + +.list_content .right .money span { + color: #666; + font-weight: normal; + font-size: 24rpx; + margin-left: 10rpx; +} + +.list_content .right .check { + margin-top: 10rpx; + font-size: 22rpx; + color: #fff; + background-color: #378fff; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: inline-block; + padding: 4rpx 20rpx; + border-radius: 30rpx; +} + +.has_more { + color: #999; + font-size: 26rpx; + text-align: center; + padding: 30rpx; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + box-sizing: border-box; + padding-top: 30rpx; +} + +.has_more image { + margin-bottom: 30rpx; +} + +.fixed { + position: absolute; + top: 36rpx; + left: 20rpx; + background-color: #ffcc00; + color: #4a1900; + border-radius: 0 20rpx 20rpx 0; + font-size: 20rpx; + padding: 2rpx 12rpx; +} \ No newline at end of file diff --git a/pages/user/index.wxml b/pages/user/index.wxml index 9d67915..6351ba4 100644 --- a/pages/user/index.wxml +++ b/pages/user/index.wxml @@ -59,12 +59,12 @@ 更多服务 - + 活动参与 - + diff --git a/static/tabbar/tabbar_icon_00.png b/static/tabbar/tabbar_icon_00.png new file mode 100644 index 0000000..fc32af0 Binary files /dev/null and b/static/tabbar/tabbar_icon_00.png differ diff --git a/static/tabbar/tabbar_icon_01.png b/static/tabbar/tabbar_icon_01.png new file mode 100644 index 0000000..416bb50 Binary files /dev/null and b/static/tabbar/tabbar_icon_01.png differ diff --git a/static/tabbar/tabbar_icon_02.png b/static/tabbar/tabbar_icon_02.png new file mode 100644 index 0000000..89d01a3 Binary files /dev/null and b/static/tabbar/tabbar_icon_02.png differ diff --git a/static/tabbar/tabbar_icon_03.png b/static/tabbar/tabbar_icon_03.png new file mode 100644 index 0000000..840eb03 Binary files /dev/null and b/static/tabbar/tabbar_icon_03.png differ diff --git a/static/tabbar/tabbar_icon_show_00.png b/static/tabbar/tabbar_icon_show_00.png new file mode 100644 index 0000000..64cdf86 Binary files /dev/null and b/static/tabbar/tabbar_icon_show_00.png differ diff --git a/static/tabbar/tabbar_icon_show_01.png b/static/tabbar/tabbar_icon_show_01.png new file mode 100644 index 0000000..1869c20 Binary files /dev/null and b/static/tabbar/tabbar_icon_show_01.png differ diff --git a/static/tabbar/tabbar_icon_show_02.png b/static/tabbar/tabbar_icon_show_02.png new file mode 100644 index 0000000..8479352 Binary files /dev/null and b/static/tabbar/tabbar_icon_show_02.png differ diff --git a/static/tabbar/tabbar_icon_show_03.png b/static/tabbar/tabbar_icon_show_03.png new file mode 100644 index 0000000..1fe9b5e Binary files /dev/null and b/static/tabbar/tabbar_icon_show_03.png differ