7.17(优化

This commit is contained in:
Hong
2024-07-17 20:11:19 +08:00
parent 5ae3b4196c
commit 91aa089e74
20 changed files with 184 additions and 110 deletions

View File

@@ -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(

View File

@@ -334,3 +334,13 @@ export function categoryReportList() {
})
}
/**
* 获取未参加任务
*/
export function getJoinNum() {
return request({
'url': '/api/front/task/join/num',
'method': 'get'
})
}

View File

@@ -121,9 +121,6 @@ export const tabsList8 = [{
}, {
name: '限时优惠',
value: 2
}, {
name: '助力抢券',
value: 3
}]
export const storeInfoTabs = [{

View File

@@ -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"

View File

@@ -4,7 +4,11 @@
"path" : "pages/tab/tab",
"style" :
{
"navigationBarTitleText" : ""
"navigationBarTitleText" : "",
"navigationStyle": "custom",
"app-plus": {
"bounce": "none"
}
}
},
{

View File

@@ -58,6 +58,7 @@
<view class="function-list flex justify-around flex-wrap">
<view class="function-list-cont" v-for="(item,index) in functionList" :key="index"
@click="navigatorFn(item)">
<text v-if="index==5&&subscriptNum>0" class="subscript">{{subscriptNum}}</text>
<image style="width: 68rpx;height: 68rpx;" :src="item.imgae" mode=""></image>
<view class="f-24 c333">{{item.title}}</view>
</view>
@@ -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]
@@ -306,7 +316,8 @@
this.mobileType = uni.getStorageSync('appDetail')
},
onShow() {
//角标
this.getJoinNumFn()
}
}
</script>
@@ -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;
}
}
}

View File

@@ -52,12 +52,15 @@
</view>
</view>
<view class="mt-4 mb-4" v-if="detail.isJoin">
<u-button shape="circle" color="linear-gradient(90deg, #0BCBC2 0%, #0090FA 100%)"
<u-button v-if="(templateData.helpNum - detail.userHelpNum)>0" shape="circle" color="linear-gradient(90deg, #0BCBC2 0%, #0090FA 100%)"
@click="sureBtn(1)">继续邀请 &nbsp;{{' '}}
<text v-if="helpGenre==2"> {{detail.subhead}}</text>
<text v-else-if="helpGenre==0"> {{detail.name}}</text>
<text v-else>{{detail.title}}</text>
</u-button>
<u-button v-else @click="navActivity" shape="circle"
color="linear-gradient(90deg, #0BCBC2 0%, #0090FA 100%)">助力完成
</u-button>
</view>
</view>
@@ -139,11 +142,15 @@
</u-popup>
<view style="height:180rpx" v-if="!detail.isJoin" />
<view class="btn-bottom fixed-bottom bg-white" v-if="!detail.isJoin">
<u-button @click="sureBtn(0)" shape="circle"
<u-button v-if="!buttFlag" @click="sureBtn(0)" shape="circle"
color="linear-gradient(90deg, #0BCBC2 0%, #0090FA 100%)">参与并邀请好友 &nbsp;{{' '}}
<text v-if="helpGenre==2"> {{detail.subhead}}</text>
<text v-else-if="helpGenre==0"> {{detail.name}}</text>
<text v-else>{{detail.title}}</text></u-button>
<text v-else>{{detail.title}}</text>
</u-button>
<u-button v-else @click="sureBtn(0)" disabled shape="circle"
color="linear-gradient(90deg, #0BCBC2 0%, #0090FA 100%)">活动结束
</u-button>
</view>
</view>
</template>
@@ -164,6 +171,8 @@
export default {
data() {
return {
//助力按钮
buttFlag: false,
//邀请人头像
avatar: '',
//邀请人名称
@@ -210,7 +219,9 @@
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('分享成功');
})
},
@@ -251,7 +262,8 @@
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,6 +293,7 @@
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);
})
@@ -290,7 +302,6 @@
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,6 +324,7 @@
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);
})
@@ -323,9 +335,22 @@
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) {
@@ -343,7 +368,8 @@
}
this.init()
//获取活动详情
this.getHelpDetailFn()
this.getHelpDetailFn(option.activityId)
console.log(option.activityId, option.id);
}
}
</script>

View File

@@ -43,6 +43,11 @@
<u-button color="#13AFA8" shape="circle"
:customStyle="{width: '160rpx', height: '56rpx', lineHeight: '56rpx',fontSize: '24rpx'}">提交订单</u-button>
</view>
<!-- v-if="item.status==1&&!item.isCreateOrder&&item.paid" -->
<view v-if="item.status==1&&!item.isCreateOrder&&item.paid" @click.stop="topOrderFn(item)">
<u-button color="#13AFA8" shape="circle"
:customStyle="{width: '160rpx', height: '56rpx', lineHeight: '56rpx',fontSize: '24rpx'}">查看订单</u-button>
</view>
</view>
</view>
</view>
@@ -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) {

View File

@@ -20,9 +20,8 @@
<view class="list-cont" v-for="(item,index) in dataList" :key="index" @click="navParticularFn(item)">
<view class="user-data f-jcsb f-a-i">
<view class="f-a-i">
<view class="user-data-image">
<image :src="item.avatar" mode=""></image>
</view>
<image class="user-data-image" :src="item.avatar" mode=""></image>
<view class="user-data-name">{{item.carDealerName}}</view>
</view>
<view class="user-data-state">

View File

@@ -386,6 +386,8 @@
this.typeOne = 2
}else if(this.tabOnecurrent==0){
this.typeOne = 1
}else if(this.tabOnecurrent==2){
this.typeOne = 3
}
},
methods: {

View File

@@ -13,7 +13,7 @@
@clear='clearBtn'></u-search>
</view>
<!-- Tabs 标签 -->
<view class="tabs_view flex justify-between">
<view class="tabs_view flex justify-around">
<view class="tabs_list" v-for="(item,index) in tabsList8" :key="index" @click="clickTabs(item)">
<view :class="['inactive-style',actType==item.value?'active-tab':'']">{{item.name}}</view>
<view v-if="actType==item.value" class="active-style"></view>
@@ -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) {

View File

@@ -33,13 +33,13 @@
<swiper class="swiper" circular previousMargin='0rpx' nextMargin="0rpx" :indicator-dots="false"
:autoplay="false" interval="4000" duration="500" @change="actTrimChengFn">
<swiper-item v-for="(item,index) in couponList3" :key="index">
<view id="showimage1" class="swiper-item flex">
<view id="showimage1" class="swiper-item flex" @click="toHotPages('help', item)">
<image class="swiper-item-image" :src="item.cover" mode="aspectFill"></image>
<view class="swiper-item-cont flex flex-column justify-between">
<view class="swiper-item-cont-name">{{item.name}}</view>
<view class="swiper-item-cont-num flex justify-between align-center">
<view>已助力<text class="cont-num">{{item.helpNum}}</text></view>
<view>仅差<text class="cont-num">{{item.joinNum - item.helpNum}}</text></view>
<view>仅差<text class="cont-num">{{(item.joinNum - item.helpNum)<0?0:(item.joinNum - item.helpNum)}}</text></view>
</view>
<view class="swiper-item-cont-schedule">
<view class="schedule-num" :style="{width:item.widthNum+'rpx' }"></view>
@@ -47,12 +47,9 @@
<view class="swiper-item-cont-down flex justify-center align-center">
<count-down :type="1" :stopTime="item.stopTime"></count-down>
</view>
<!-- <u-count-down :time="item.stopTime" format="DD:HH:mm:ss" autoStart millisecond
@change="onChange">
</u-count-down> -->
<view class="flex align-center justify-center" @click="toHotPages('help', item)">
<view class="swiper-item-cont-butt">立即助力</view>
<view class="flex align-center justify-center" >
<view v-if="(item.joinNum - item.helpNum)>0" @click.stop="toHotPages('help', item)" class="swiper-item-cont-butt">立即助力</view>
<view v-else @click.stop="navActivity" class="swiper-item-cont-butt">助力完成</view>
</view>
</view>
</view>
@@ -118,7 +115,7 @@
mode="aspectFill"></image>
</view>
<view class="integral-list-butt " @click="navParticularsFn(item)">
<text class="f-20 fff">{{parseInt(item.price)}}</text>
<text class="f-20 fff">{{item.price*1}}</text>
<text class="f-24 fff ml-2">{{item.integralNum}}积分</text>
</view>
<view class="integral-list-name c666 f-28"> {{item.name}}</view>
@@ -167,6 +164,9 @@
</template>
<script>
import {
userCenterPersonalInfo
} from "@/api/system/user.js"
import CountDown from "@/components/count-down.vue"
import {
brannerList
@@ -223,7 +223,7 @@
couponList3: [],
couponHotList: [],
//消息未读 数量
unreadNum: 0,
// unreadNum: 0,
//积分商品列表
integralList: [],
//话题列表
@@ -235,11 +235,11 @@
onShow() {
this.city = uni.getStorageSync('current_city');
this.getBranner()
let userInfo = uni.getStorageSync('userInfo')
this.unreadNum = userInfo.unreadNum
userCenterPersonalInfo().then(res => {
uni.setStorageSync('userInfo', res.data)
})
},
onLoad() {
// uni.hideTabBar();
},
methods: {
//监听选择
@@ -378,6 +378,12 @@
url: `/pages/driver/message/message`
})
},
//我的活动
navActivity(){
uni.navigateTo({
url:'/pages/driver/mine/my_activity/my_activity'
})
},
// 点击轮播图
brannerClick(e) {
console.log(this.branner[e]);

View File

@@ -34,7 +34,7 @@
<!-- 轮播图 -->
<view v-if="showType < 4" style="height: 146rpx;" />
<view class="swiper-box" v-if="showType == 1">
<u-swiper circular imgMode="widthFix" bgColor="transparent" height="604rpx"
<u-swiper circular imgMode="aspectFit" bgColor="transparent" height="604rpx"
indicatorActiveColor="#13AFA8" keyName="image" @change="actTrimChengFn" :list="branner" indicator
:indicatorStyle="{bottom:'0rpx'}">
</u-swiper>

View File

@@ -124,7 +124,7 @@
})
} else {
uni.switchTab({
url: '/pages/driver/home/home'
url: '/pages/driver/index/index'
})
}
}
@@ -216,6 +216,7 @@
.image {
width: 112rpx;
height: 112rpx;
border-radius: 50%;
}
.item-content {
@@ -250,6 +251,7 @@
image {
width: 28rpx;
height: 28rpx;
border-radius: 50%;
}
}

View File

@@ -1,15 +1,7 @@
<template>
<z-paging
ref="paging"
:auto="false"
created-reload
:auto-clean-list-when-reload="false"
:pagingStyle="{background:'#F5F5F5'}">
<!-- 内容 -->
<template>
</template>
</z-paging>
<view>
<image class="spread-its-tail" src="@/static/spread_its_tail.png" mode="aspectFill"></image>
</view>
</template>
<script>
@@ -56,5 +48,8 @@
</script>
<style>
.spread-its-tail{
width: 750rpx;
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 446 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 679 KiB