Browse Source

修改用户端首页,和联系客服

master
前端-胡立永 8 months ago
parent
commit
8eec0e2d2e
3 changed files with 239 additions and 162 deletions
  1. +5
    -0
      service-uniapp-client/pages/index/center.vue
  2. +141
    -107
      service-uniapp-client/pages/index/index.vue
  3. +93
    -55
      service-uniapp-technician/pages/index/center.vue

+ 5
- 0
service-uniapp-client/pages/index/center.vue View File

@ -197,6 +197,11 @@
//
clickService() {
if (this.phone.includes('http')) {
window.open(this.phone, true)
return
}
uni.makePhoneCall({
phoneNumber: this.phone,
success: () => {},


+ 141
- 107
service-uniapp-client/pages/index/index.vue View File

@ -1,8 +1,8 @@
<template>
<view class="home">
<view class="home-top">
<view class="search">
<!-- <view class="home-top"> -->
<!-- <view class="search">
<view @click="showSelectArea" class="left-area">
<image src="@/static/home/address-icon.png"></image>
@ -22,17 +22,47 @@
</view>
</view>
</view>
</view> -->
<!-- </view> -->
<view class="banner b-relative">
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
<van-swipe-item v-for="item in bannerList" :key="item.id">
<image class="banner-image" :src="item.image" mode="widthFix"></image>
</van-swipe-item>
</van-swipe>
</view>
<view class="home-content">
<view class="banner b-relative">
<!-- <view class="banner b-relative">
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
<van-swipe-item v-for="item in bannerList" :key="item.id">
<image class="banner-image" :src="item.image" mode="widthFix"></image>
</van-swipe-item>
</van-swipe>
</view> -->
<view class="search">
<view @click="showSelectArea" class="left-area">
<image src="@/static/home/address-icon.png"></image>
<view class="area">{{ area }}</view>
<image src="../../static/home/arrow-icon.png" mode="aspectFit"></image>
<view class="parting-line">|</view>
</view>
<view class="center-area">
<image src="@/static/home/search-icon.png"></image>
<van-field @click="searchAddress" v-model="queryParams.title" center placeholder="请选择地区" />
</view>
<view class="right-area">
<view @click="searchAddress" class="search-button">
搜索
</view>
</view>
</view>
<view v-if="projectList.length > 0" class="server-list">
@ -253,128 +283,132 @@
margin: 0 auto;
.home-top {
height: 350rpx;
height: 400rpx;
// height: 350rpx;
background: linear-gradient(38deg, #4899A6, #60BDA2);
padding-top: 60rpx;
.search {
height: 82rpx;
width: 710rpx;
background: #FFFFFF;
margin: 0px auto;
border-radius: 41rpx;
box-sizing: border-box;
padding: 0 15rpx;
}
.search {
height: 82rpx;
width: 710rpx;
background: #FFFFFF;
margin: 20rpx auto;
border-radius: 41rpx;
box-sizing: border-box;
padding: 0 15rpx;
display: flex;
align-items: center;
justify-content: space-between;
.left-area,
.center-area {
display: flex;
align-items: center;
justify-content: space-between;
.left-area,
.center-area {
display: flex;
align-items: center;
}
.left-area {
max-width: 160rpx;
image {
flex-shrink: 0;
width: 26rpx;
height: 26rpx;
}
.left-area {
max-width: 160rpx;
image {
flex-shrink: 0;
width: 26rpx;
height: 26rpx;
}
.area {
font-size: 24rpx;
display: -webkit-box;
-webkit-line-clamp: 2;
/* 限制显示两行 */
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
color: #292929;
}
.parting-line {
flex-shrink: 0;
font-size: 26rpx;
color: #ccc;
margin: 0rpx 5rpx;
}
.area {
font-size: 24rpx;
display: -webkit-box;
-webkit-line-clamp: 2;
/* 限制显示两行 */
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
color: #292929;
}
.center-area {
display: flex;
flex-wrap: nowrap;
align-items: center;
width: calc(100% - 290rpx);
image {
width: 26rpx;
height: 26rpx;
}
.van-field {
background-color: transparent;
box-sizing: border-box;
.parting-line {
flex-shrink: 0;
font-size: 26rpx;
color: #ccc;
margin: 0rpx 5rpx;
}
}
.center-area {
display: flex;
flex-wrap: nowrap;
align-items: center;
width: calc(100% - 290rpx);
image {
width: 26rpx;
height: 26rpx;
}
.van-field {
background-color: transparent;
box-sizing: border-box;
height: 82rpx;
line-height: 82rpx;
width: calc(100% - 30rpx);
padding: 0rpx 10rpx 0rpx 0rpx;
input {
height: 82rpx;
line-height: 82rpx;
width: calc(100% - 30rpx);
padding: 0rpx 10rpx 0rpx 0rpx;
input {
height: 82rpx;
font-size: 60rpx;
}
font-size: 60rpx;
}
}
.right-area {
.search-button {
background: #60BDA2;
height: 60rpx;
width: 130rpx;
font-size: 26rpx;
border-radius: 35rpx;
color: white;
display: flex;
align-items: center;
justify-content: center;
}
}
.right-area {
.search-button {
background: #60BDA2;
height: 60rpx;
width: 130rpx;
font-size: 26rpx;
border-radius: 35rpx;
color: white;
display: flex;
align-items: center;
justify-content: center;
}
}
}
.home-content {
width: calc(100% - 40rpx);
margin: -240rpx 20rpx 0rpx 20rpx;
.banner {
box-sizing: border-box;
.my-swipe {
.banner {
box-sizing: border-box;
.my-swipe {
width: 100%;
margin: 0px auto;
// border-radius: 20rpx;
// height: 334rpx;
overflow: hidden;
.van-swipe-item {
width: 100%;
margin: 0px auto;
border-radius: 20rpx;
height: 334rpx;
overflow: hidden;
.van-swipe-item {
.banner-image {
width: 100%;
.banner-image {
image {
width: 100%;
image {
width: 100%;
}
}
}
}
}
}
.home-content {
width: calc(100% - 40rpx);
margin: 20rpx 20rpx 0rpx 20rpx;
// margin: -440rpx 20rpx 0rpx 20rpx;
// margin: -240rpx 20rpx 0rpx 20rpx;
.server-list {
padding-bottom: 80rpx;


+ 93
- 55
service-uniapp-technician/pages/index/center.vue View File

@ -1,6 +1,6 @@
<template>
<view class="content">
<view class="banner">
<view class="head-div flex">
<view style="width: 118rpx;height: 118rpx;overflow: hidden;border-radius: 50%;">
@ -28,16 +28,16 @@
<view class="button-cz" @click="clickWallet">立即提现</view>
</view>
</view>
<view class="two-card">
<view class="flex">
<view style="width: 10rpx;height: 30rpx;background: #4a9ca6;border-radius: 6rpx;"/>
<view style="width: 10rpx;height: 30rpx;background: #4a9ca6;border-radius: 6rpx;" />
<view class="head-title">常用功能</view>
</view>
<view style="background-color: #fff;border-radius: 16rpx;">
<view class="flex icons">
<view class="menuItem" @click="clickUpload">
<image class="icon" src="/static/icons/photo-album.png"/>
<image class="icon" src="/static/icons/photo-album.png" />
<view class="title">我的相册</view>
</view>
<view class="menuItem" @click="clickSettled">
@ -53,8 +53,7 @@
<view class="title">实名认证</view>
</view>
</view>
<view class="flex icons"
style="margin-top: 0;">
<view class="flex icons" style="margin-top: 0;">
<view class="menuItem" @click="clickServerTime">
<image class="icon" src="/static/icons/m1.png" />
<view class="title">服务时间</view>
@ -66,30 +65,26 @@
</view>
</view>
</view>
<configPopup
:keyValue="keyValue"
:show="configPopupShow"
:list="config"
@close="configPopupShow = false"/>
<configPopup :keyValue="keyValue" :show="configPopupShow" :list="config" @close="configPopupShow = false" />
</view>
</template>
<script>
import configPopup from '@/components/configPopup'
export default {
components : {
components: {
configPopup
},
data() {
return {
userInfo : {},
belece : {},
configPopupShow : false,
keyValue : 'phone',
config : [],
phone : '',
userInfo: {},
belece: {},
configPopupShow: false,
keyValue: 'phone',
config: [],
phone: '',
}
},
onShow() {
@ -114,18 +109,22 @@
},
getConfig() {
// this.vid = uni.getStorageSync("ivcode");
this.$api('getConfig', {} ,res => {
if(res.code == 200){
this.$api('getConfig', {}, res => {
if (res.code == 200) {
res.result.forEach(n => {
if(n.keyValue == 'phone'){
this.phone = n.name
if (n.keyValue == 'phone') {
this.phone = this.deleteTag(item.content);
}
})
this.config = res.result
}
})
},
logout(){
//html
deleteTag(html){
return html.replace(/<[^>]*>/g, '');
},
logout() {
uni.removeStorageSync('token')
uni.removeStorageSync('userInfo')
uni.showToast({
@ -136,34 +135,66 @@
url: '/pages/login/mobile'
})
},
clickUpload(){ uni.navigateTo({ url: '/pages/mine/upload' }) },
clickSettled(){ uni.navigateTo({ url: '/pages/mine/settled' }) },
clickWallet(){ uni.navigateTo({ url: '/pages/mine/wallet'}) },
clickServerTime(){ uni.navigateTo({ url: `/pages/mine/serverTime?uid=${this.userInfo.id}` }) },
clickAuthentication(){ uni.navigateTo({ url: '/pages/mine/authentication'}) },
clickService(){ uni.makePhoneCall({ phoneNumber: this.phone, success:() => {}, fail: () => {} });},
clickUpload() {
uni.navigateTo({
url: '/pages/mine/upload'
})
},
clickSettled() {
uni.navigateTo({
url: '/pages/mine/settled'
})
},
clickWallet() {
uni.navigateTo({
url: '/pages/mine/wallet'
})
},
clickServerTime() {
uni.navigateTo({
url: `/pages/mine/serverTime?uid=${this.userInfo.id}`
})
},
clickAuthentication() {
uni.navigateTo({
url: '/pages/mine/authentication'
})
},
clickService() {
if (this.phone.includes('http')) {
window.open(this.phone, true)
return
}
uni.makePhoneCall({
phoneNumber: this.phone,
success: () => {},
fail: () => {}
});
},
}
}
</script>
<style scoped>
body{
body {
background-color: #f5f5f5;
}
.banner {
width: 100%;
height: calc(392rpx - 60rpx);
background: #fff;
}
.head-div{
.head-div {
width: calc(100vw - 72rpx);
height: 268rpx;
padding: 72rpx 36rpx 0;
margin: 0 auto;
}
.nickname{
.nickname {
font-size: 36rpx;
font-family: PingFang SC, PingFang SC-Bold;
font-weight: 700;
@ -171,7 +202,8 @@
color: #323232;
line-height: 42rpx;
}
.days{
.days {
font-size: 28rpx;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: 400;
@ -179,23 +211,24 @@
color: #ababab;
line-height: 40rpx;
}
.one-card{
.one-card {
width: 678rpx;
height: 116rpx;
border-radius: 16rpx;
margin: -30rpx auto 0;
}
.two-card{
.two-card {
width: calc(675rpx);
height: 228rpx;
border-radius: 16rpx;
margin: 20rpx auto;
padding: 40rpx 0;
}
.title{
.title {
height: 40rpx;
line-height: 40rpx;
font-size: 28rpx;
@ -205,19 +238,22 @@
color: #2f2e2e;
margin-top: 15rpx;
}
.icons{
.icons {
width: 100%;
box-sizing: border-box;
margin-top: 30rpx;
padding: 20rpx 0rpx;
}
.icon{
.icon {
margin: 0 32rpx;
width: 48rpx;
height: 48rpx;
border-radius: 50%;
}
.head-title{
.head-title {
font-size: 30rpx;
font-family: PingFang SC, PingFang SC-Bold;
color: #2f2e2e;
@ -227,13 +263,13 @@
}
.font-4{
.font-4 {
font-size: 28rpx;
font-family: PingFang SC, PingFang SC-Bold;
font-weight: 700;
text-align: left;
color: #ffffff;
text-shadow: 0 4rpx 6rpx 0 rgba(40,170,133,0.81);
text-shadow: 0 4rpx 6rpx 0 rgba(40, 170, 133, 0.81);
line-height: 44rpx;
position: absolute;
@ -241,22 +277,24 @@
left: 52rpx;
z-index: 1;
}
.font-5{
.font-5 {
font-size: 42rpx;
font-family: PingFang SC, PingFang SC-Bold;
font-weight: bolder;
text-align: left;
color: #ffffff;
line-height: 72rpx;
text-shadow: 0 4rpx 6rpx 0 rgba(0,0,0,0.16);
text-shadow: 0 4rpx 6rpx 0 rgba(0, 0, 0, 0.16);
}
.button-cz{
.button-cz {
width: 200rpx;
height: 58rpx;
line-height: 58rpx;
background: linear-gradient(182deg,#ffffff 2%, #a6fce3 88%);
background: linear-gradient(182deg, #ffffff 2%, #a6fce3 88%);
border-radius: 30rpx;
box-shadow: 0 6rpx 12rpx 0 rgba(129,209,186,0.66);
box-shadow: 0 6rpx 12rpx 0 rgba(129, 209, 186, 0.66);
font-size: 28rpx;
font-family: PingFang SC, PingFang SC-Bold;
@ -269,11 +307,11 @@
right: 52rpx;
z-index: 1;
}
.menuItem{
.menuItem {
width: 25%;
display: flex;
flex-direction: column;
align-items: center;
}
</style>
</style>

Loading…
Cancel
Save