diff --git a/App.vue b/App.vue index 0f2c7dd..60672dd 100644 --- a/App.vue +++ b/App.vue @@ -19,6 +19,8 @@ // 初始化应用配置 this.initConfig() this.getSys() + + // this.$tab.switchTab('/pages/tab/tab') // if (uni.getStorageSync('userType') == 'driver') this.$tab.switchTab('/pages/driver/home/home') // if (uni.getStorageSync('userType') == 'repair') this.$tab.switchTab('/pages/repair/tabbar/repair') // if (uni.getStorageSync('userType') == 'carDealers') this.$tab.switchTab( diff --git a/api/system/config.js b/api/system/config.js index ef17995..e5ffdea 100644 --- a/api/system/config.js +++ b/api/system/config.js @@ -333,4 +333,14 @@ export function categoryReportList() { 'method': 'get', }) +} + +/** + * 获取未参加任务 + */ +export function getJoinNum() { + return request({ + 'url': '/api/front/task/join/num', + 'method': 'get' + }) } \ No newline at end of file diff --git a/data/tabsData.js b/data/tabsData.js index d34b87f..358fa0e 100644 --- a/data/tabsData.js +++ b/data/tabsData.js @@ -121,9 +121,6 @@ export const tabsList8 = [{ }, { name: '限时优惠', value: 2 -}, { - name: '助力抢券', - value: 3 }] export const storeInfoTabs = [{ diff --git a/manifest.json b/manifest.json index e9940c2..c2a355a 100644 --- a/manifest.json +++ b/manifest.json @@ -2,15 +2,15 @@ "name" : "滴友之家", "appid" : "__UNI__F2BE74F", "description" : "", - "versionName" : "1.5.6", - "versionCode" : 156, + "versionName" : "1.5.8", + "versionCode" : 158, "transformPx" : false, "app-plus" : { "usingComponents" : true, "nvueCompiler" : "uni-app", "splashscreen" : { "alwaysShowBeforeRender" : true, - "waiting" : true, + "waiting" : false, "autoclose" : true, "delay" : 0 }, @@ -126,9 +126,9 @@ "useOriginalMsgbox" : true, "iosStyle" : "common", "android" : { - "hdpi" : "static/9png/drawable-hdpi/download.9.png", - "xhdpi" : "static/9png/drawable-xhdpi/download.9.png", - "xxhdpi" : "static/9png/drawable-xxhdpi/download.9.png" + "hdpi" : "static/9png/drawable-hdpi/2x_2.9.png", + "xhdpi" : "static/9png/drawable-xhdpi/2x_2.9.png", + "xxhdpi" : "static/9png/drawable-xxhdpi/2x_2.9.png" }, "ios" : { "storyboard" : "static/CustomStoryboard.zip" diff --git a/pages.json b/pages.json index f8798b3..ce69b19 100644 --- a/pages.json +++ b/pages.json @@ -4,7 +4,11 @@ "path" : "pages/tab/tab", "style" : { - "navigationBarTitleText" : "" + "navigationBarTitleText" : "", + "navigationStyle": "custom", + "app-plus": { + "bounce": "none" + } } }, { diff --git a/pages/driver/home/home.vue b/pages/driver/home/home.vue index 7688dad..34d4ba5 100644 --- a/pages/driver/home/home.vue +++ b/pages/driver/home/home.vue @@ -58,6 +58,7 @@ + {{subscriptNum}} {{item.title}} @@ -142,7 +143,8 @@ mapGetters } from 'vuex' import { - brannerList + brannerList, + getJoinNum } from '@/api/system/config' import { getLocationFn @@ -166,7 +168,9 @@ name: '玩转滴友', type: 2 }], - mobileType: {} + mobileType: {}, + //角标数 + subscriptNum: 0 }; }, methods: { @@ -194,7 +198,6 @@ }, //nav navigatorFn(item) { - console.log(item); if (item.type == 1) { uni.switchTab({ url: item.url @@ -245,6 +248,13 @@ this.brannerList = res.data.list }) }, + //获取未参加任务 + getJoinNumFn() { + getJoinNum().then(res => { + this.subscriptNum = res.data + console.log(res); + }) + }, // 点击轮播图 brannerClick(e) { if (this.brannerList[e].linkType == 0 || this.brannerList[e].linkType == 2 || this.brannerList[e] @@ -289,8 +299,8 @@ }, }, mounted() { - let deviceBrand=uni.getSystemInfoSync().deviceBrand - if(deviceBrand!='huawei'){ + let deviceBrand = uni.getSystemInfoSync().deviceBrand + if (deviceBrand != 'huawei') { this.getAddressFn() } }, @@ -306,7 +316,8 @@ this.mobileType = uni.getStorageSync('appDetail') }, onShow() { - + //角标 + this.getJoinNumFn() } } @@ -405,6 +416,21 @@ .function-list-cont { width: 170rpx; margin-bottom: 34rpx; + position: relative; + + .subscript { + min-width: 32rpx; + height: 32rpx; + line-height: 32rpx; + position: absolute; + top: -16rpx; + right: 32rpx; + padding: 4rpx; + background-color: red; + border-radius: 15px; + color: #ffffff; + z-index: 999; + } } } diff --git a/pages/driver/mine/my_activity/detail.vue b/pages/driver/mine/my_activity/detail.vue index 8eb07c8..ffc59d7 100644 --- a/pages/driver/mine/my_activity/detail.vue +++ b/pages/driver/mine/my_activity/detail.vue @@ -41,7 +41,7 @@ 活动时间截止: - {{ detail.stopTime }} + {{ detail.stopTime }} @@ -52,12 +52,15 @@ - 继续邀请  {{' '}} - {{detail.subhead}} - {{detail.name}} - {{detail.title}} - + 继续邀请  {{' '}} + {{detail.subhead}} + {{detail.name}} + {{detail.title}} + + 助力完成 + @@ -139,11 +142,15 @@ - 参与并邀请好友  {{' '}} - {{detail.subhead}} - {{detail.name}} - {{detail.title}} + {{detail.subhead}} + {{detail.name}} + {{detail.title}} + + 活动结束 + @@ -164,10 +171,12 @@ export default { data() { return { + //助力按钮 + buttFlag: false, //邀请人头像 - avatar:'', + avatar: '', //邀请人名称 - nickname:'', + nickname: '', fromUid: 0, helpType: 0, // 0:未助力;1:邀请人助力;2:以为别人助力;3:助力成功 id: 0, @@ -182,7 +191,7 @@ labels: [], helpGenre: 0, activityId: 0, - isMould:false, + isMould: false, parseStyle: { img: 'width:750rpx;' }, @@ -192,17 +201,17 @@ //邀请微信好友 weixinShareFn() { let fromUid = uni.getStorageSync('userInfo').id - let cover='' - let name='' - if(this.helpGenre==2){ - cover=this.detail.mainImage - name=this.detail.subhead - }else if(this.helpGenre==0){ - cover=this.detail.cover - name=this.detail.name - }else{ - cover=this.detail.image - name=this.detail.title + let cover = '' + let name = '' + if (this.helpGenre == 2) { + cover = this.detail.mainImage + name = this.detail.subhead + } else if (this.helpGenre == 0) { + cover = this.detail.cover + name = this.detail.name + } else { + cover = this.detail.image + name = this.detail.title } let shareData = { imageUrl: cover ? cover : @@ -210,20 +219,22 @@ content: name } this.shareShow = false - shareApi('WXSceneSession', shareData,`pages/mine/my_activity/detail?type=help&id=${this.detail.id}&helpGenre=${this.helpGenre}&fromUid=${fromUid}&activityId=${this.activityId}&isMould=${this.isMould}`).then(res => { + shareApi('WXSceneSession', shareData, + `pages/mine/my_activity/detail?type=help&id=${this.detail.id}&helpGenre=${this.helpGenre}&fromUid=${fromUid}&activityId=${this.activityId}&isMould=${this.isMould}` + ).then(res => { console.log('分享成功'); }) }, - getHelptatus(cardProductId, shareUid,activityId) { + getHelptatus(cardProductId, shareUid, activityId) { helptatus({ cardProductId, shareUid, activityId }).then(res => { - console.log('活动状态',res); - this.avatar=res.data.avatar - this.nickname=res.data.nickname + console.log('活动状态', res); + this.avatar = res.data.avatar + this.nickname = res.data.nickname this.helpType = res.data.status this.helpShow = true }) @@ -246,12 +257,13 @@ // 助力 helpBtn() { // mainUid => 发起人uid cardProductId => 卡券商品id - let obj={ + let obj = { mainUid: this.fromUid, cardProductId: this.detail.id, activityId: this.detail.activityId } - if(this.helpType!=1){ + console.log('助力状态', this.helpType); + if (this.helpType == 0) { orderHelpAPI(obj).then(res => { this.helpType = 3 this.helpShow = true @@ -273,7 +285,6 @@ getInfo() { if (this.helpGenre == 0) { getCardProductInfoAPI(this.id).then(res => { - console.log( res.data); if (res.data.helpList) { let avatarArr = [] res.data.helpList.forEach(item => { @@ -282,15 +293,15 @@ res.data.avatarArr = avatarArr } this.detail = res.data + this.isExpired(this.detail.stopTime) this.brannerList = res.data.image.split(',') this.labels = JSON.parse(res.data.labels); }) } else if (this.helpGenre == 1) { getInformationHelpAPI({ - id:this.id, - isMould:this.isMould + id: this.id, + isMould: this.isMould }).then(res => { - console.log( res.data); if (res.data.helpList) { let avatarArr = [] res.data.helpList.forEach(item => { @@ -299,12 +310,12 @@ res.data.avatarArr = avatarArr } this.detail = res.data + this.isExpired(this.detail.stopTime) this.brannerList = res.data.image.split(',') this.labels = JSON.parse(res.data.labels); }) } else { getProductHelpAPI(this.id).then(res => { - console.log( res.data); if (res.data.helpList) { let avatarArr = [] res.data.helpList.forEach(item => { @@ -313,37 +324,52 @@ res.data.avatarArr = avatarArr } this.detail = res.data + this.isExpired(this.detail.stopTime) this.brannerList = res.data.image.split(',') this.labels = JSON.parse(res.data.labels); }) } }, //获取活动详情 - getHelpDetailFn(){ - getHelpDetail(this.activityId).then(res=>{ - console.log('活动详情',res.data); - this.templateData=res.data + getHelpDetailFn() { + getHelpDetail(this.activityId).then(res => { + console.log('活动详情', res.data); + this.templateData = res.data + // this.content=res.data.content // this.joinNum=res.data.joinNum }) + }, + //我的活动 + navActivity() { + uni.navigateTo({ + url: '/pages/driver/mine/my_activity/my_activity' + }) + }, + //处理活动是否结束 + isExpired(targetDateTime) { + const currentDate = new Date(); // 获取当前时间 + const targetDate = new Date(targetDateTime); // 将目标时间字符串转换为Date对象 + this.buttFlag = currentDate > targetDate; // 比较当前时间和目标时间 } }, onLoad(option) { this.helpGenre = option.helpGenre this.activityId = option.activityId this.id = option.id - this.isMould=option.isMould + this.isMould = option.isMould if (option.type == 'help') { this.type = option.type this.uid = option.uid this.fromUid = option.fromUid if (option.uid != option.fromUid) { - this.getHelptatus(option.id, option.fromUid,option.activityId) + this.getHelptatus(option.id, option.fromUid, option.activityId) } } this.init() //获取活动详情 - this.getHelpDetailFn() + this.getHelpDetailFn(option.activityId) + console.log(option.activityId, option.id); } } @@ -353,14 +379,14 @@ background: #ffffff; padding-top: 24rpx; } - + .store-list img { display: block; margin: 0 auto; max-width: 100%; height: auto; } - + .back-box { position: fixed; top: 88rpx; diff --git a/pages/driver/mine/my_activity/my_activity.vue b/pages/driver/mine/my_activity/my_activity.vue index ff9a5da..fecff86 100644 --- a/pages/driver/mine/my_activity/my_activity.vue +++ b/pages/driver/mine/my_activity/my_activity.vue @@ -43,6 +43,11 @@ 提交订单 + + + 查看订单 + @@ -307,6 +312,21 @@ topUpTypeClose() { this.topUpTypeShow = false }, + topOrderFn(item){ + if (item.helpGenre == 0) { + uni.navigateTo({ + url:`/pages/driver/mine/my_order/serveOrder/serve_order?tabOnecurrent=2` + }) + } else if (item.helpGenre == 1) { + uni.navigateTo({ + url:`/pages/driver/mine/my_order/rentCars/rent_order` + }) + } else { + uni.navigateTo({ + url:`/pages/driver/mine/my_order/buyCars/buy_cars_order` + }) + } + }, topUpFn(item) { this.helpGenre = item.helpGenre if (item.helpGenre == 0) { diff --git a/pages/driver/mine/my_order/rentCars/rent_order.vue b/pages/driver/mine/my_order/rentCars/rent_order.vue index 7740b83..34aa996 100644 --- a/pages/driver/mine/my_order/rentCars/rent_order.vue +++ b/pages/driver/mine/my_order/rentCars/rent_order.vue @@ -20,9 +20,8 @@ - - - + + {{item.carDealerName}} diff --git a/pages/driver/mine/my_order/serveOrder/serve_order.vue b/pages/driver/mine/my_order/serveOrder/serve_order.vue index 5c4d4cf..a76abaf 100644 --- a/pages/driver/mine/my_order/serveOrder/serve_order.vue +++ b/pages/driver/mine/my_order/serveOrder/serve_order.vue @@ -3,7 +3,7 @@ - @@ -386,6 +386,8 @@ this.typeOne = 2 }else if(this.tabOnecurrent==0){ this.typeOne = 1 + }else if(this.tabOnecurrent==2){ + this.typeOne = 3 } }, methods: { diff --git a/pages/driver/serve/coupons/coupons.vue b/pages/driver/serve/coupons/coupons.vue index 3b1c77d..d31cf91 100644 --- a/pages/driver/serve/coupons/coupons.vue +++ b/pages/driver/serve/coupons/coupons.vue @@ -13,7 +13,7 @@ @clear='clearBtn'> - + {{item.name}} @@ -74,6 +74,7 @@ this.current = query.num if (query.num == 1) { this.cardType = 2 + this.actType = 2 } }, onShow() { @@ -105,19 +106,6 @@ }, // 卡券商品 queryList(pageNo, pageSize) { - // 助力 - // if(this.cardType==3){ - // getActivityListAPI({ - // limit:pageSize, - // page:pageNo - // }).then(res=>{ - // this.$refs.paging.complete(res.data.list) - // }).catch(err=>{ - // this.$refs.paging.complete(false) - // }) - // }else { - // 卡券 全部和秒杀 - // console.log(this.cardType,'卡券类型'); // type => 1普通2秒杀3助力 let obj = { limit: pageSize, @@ -134,9 +122,6 @@ }).catch(err => { this.$refs.paging.complete(false) }) - // } - - }, // 详情页 toDetailPages(item) { @@ -152,7 +137,7 @@ } }, clickTabs(item) { - console.log(item, 'tabs点击'); + console.log( 'tabs点击',item,); this.actType = item.value // item.name => 名字 item.value => 1,2,3 item.index => 0,1,2 if (item.value == 1) { diff --git a/pages/driver/serve/index.vue b/pages/driver/serve/index.vue index d00abbb..d0ad895 100644 --- a/pages/driver/serve/index.vue +++ b/pages/driver/serve/index.vue @@ -33,13 +33,13 @@ - + {{item.name}} 已助力{{item.helpNum}}人 - 仅差{{item.joinNum - item.helpNum}}人 + 仅差{{(item.joinNum - item.helpNum)<0?0:(item.joinNum - item.helpNum)}}人 @@ -47,12 +47,9 @@ - - - 立即助力 + + 立即助力 + 助力完成 @@ -118,7 +115,7 @@ mode="aspectFill"> - ¥{{parseInt(item.price)}} + ¥{{item.price*1}} {{item.integralNum}}积分 {{item.name}} @@ -167,6 +164,9 @@ diff --git a/static/9png/drawable-hdpi/download.9.png b/static/9png/drawable-hdpi/download.9.png deleted file mode 100644 index d030ca9..0000000 Binary files a/static/9png/drawable-hdpi/download.9.png and /dev/null differ diff --git a/static/9png/drawable-mdpi/download.9.png b/static/9png/drawable-mdpi/download.9.png deleted file mode 100644 index 76afb79..0000000 Binary files a/static/9png/drawable-mdpi/download.9.png and /dev/null differ diff --git a/static/9png/drawable-xhdpi/download.9.png b/static/9png/drawable-xhdpi/download.9.png deleted file mode 100644 index 70bb0fd..0000000 Binary files a/static/9png/drawable-xhdpi/download.9.png and /dev/null differ diff --git a/static/9png/drawable-xxhdpi/download.9.png b/static/9png/drawable-xxhdpi/download.9.png deleted file mode 100644 index 81fc11f..0000000 Binary files a/static/9png/drawable-xxhdpi/download.9.png and /dev/null differ diff --git a/static/9png/drawable-xxxhdpi/download.9.png b/static/9png/drawable-xxxhdpi/download.9.png deleted file mode 100644 index da6d734..0000000 Binary files a/static/9png/drawable-xxxhdpi/download.9.png and /dev/null differ