wangmingchuan321@qq.com 5 months ago
parent a9c41e3bf4
commit 6ad0dbbec4
  1. 53
      components/service-list-item.vue
  2. 95
      pages/service.vue
  3. 35
      unpackage/dist/dev/app-plus/app-service.js
  4. 36
      unpackage/dist/dev/app-plus/app-view.js

@ -27,16 +27,17 @@
</view> </view>
</view> </view>
<view class="text-delete" v-if="info.init_price">{{ info.init_price }}</view> <view class="text-delete" v-if="info.init_price">{{ info.init_price }}</view>
<view class="servefc ml-md"> <view class="servefc ml-md">
<i class="iconfont icon-shijian" :style="{ color: primaryColor }"></i> <i class="iconfont icon-shijian" :style="{ color: primaryColor }"></i>
<span class="f-caption c-title ml-sm">{{ info.time_long }}分钟</span> <span class="f-caption c-title ml-sm">{{ info.time_long }}分钟</span>
</view> </view>
</view> </view>
<auth @tap.stop.prevent :needAuth="userInfo && (!userInfo.phone || !userInfo.nickName)" :must="true" <auth @tap.stop.prevent :needAuth="userInfo && (!userInfo.phone || !userInfo.nickName)" :must="true"
:type="!userInfo.phone ? 'phone' : 'userInfo'" @go="toChoose" style="width:190rpx"> :type="!userInfo.phone ? 'phone' : 'userInfo'" @go="toChoose" style="width:190rpx">
<view class="flex-between"> <view class="flex-between">
<view></view> <view></view>
<view class="item-btn flex-center f-caption c-base" :style="{background: `linear-gradient(68deg, ${primaryColor}, ${subColor})`}"> <view class="item-btn flex-center f-caption c-base"
:style="{background: `linear-gradient(68deg, ${primaryColor}, ${subColor})`}">
{{ from == 'technician-info' ? `立即预约` : `选择${$t('action.attendantName')}`}} {{ from == 'technician-info' ? `立即预约` : `选择${$t('action.attendantName')}`}}
</view> </view>
</view> </view>
@ -44,7 +45,11 @@
</view> </view>
</view> </view>
</view> </view>
<uni-popup ref="perpopup" type="top" :mask-click='false' :zIndex="999">
<view class="permissions_box">
为了获取您附近的服务人员更好的为您服务,我们需要申请位置信息权限请您确认授权否则无法使用该功能
</view>
</uni-popup>
</view> </view>
</template> </template>
@ -53,6 +58,7 @@
mapState, mapState,
mapMutations mapMutations
} from "vuex" } from "vuex"
import permision from '@/utils/permission.js'
export default { export default {
components: {}, components: {},
props: { props: {
@ -112,6 +118,31 @@
}, },
// - // -
toChoose() { toChoose() {
let that = this
const appAuthorizeSetting = uni.getAppAuthorizeSetting()
console.log(9987, appAuthorizeSetting);
if (appAuthorizeSetting.locationAuthorized != 'authorized') {
that.$refs.perpopup.open('top')
uni.showModal({
title: '温馨提示',
content: '为了获取您附近的服务人员,更好的为您服务,我们需要申请位置信息权限,请您确认授权,否则无法使用该功能~',
cancelText: '关闭',
confirmText: '去授权',
success(res) {
if (res.confirm) {
that.$refs.perpopup.close();
permision.gotoAppPermissionSetting()
} else {
that.$refs.perpopup.close();
}
}
})
return
}
let { let {
from from
} = this } = this
@ -160,6 +191,15 @@
font-size: 18rpx; font-size: 18rpx;
} }
.permissions_box {
padding: 200rpx 30rpx;
padding-top: 200rpx;
padding-bottom: 50rpx;
font-size: 30rpx;
line-height: 50rpx;
background-color: #fff;
}
.text-delete { .text-delete {
font-size: 24rpx; font-size: 24rpx;
color: #B9B9B9; color: #B9B9B9;
@ -173,8 +213,9 @@
} }
} }
} }
.servefc{
.servefc {
display: flex; display: flex;
align-items: center; align-items: center;
} }
</style> </style>

@ -14,8 +14,8 @@
:class="[{'mt-md':banner.length ==0},{'abs':banner.length>0}]" :style="{ color: primaryColor }"> :class="[{'mt-md':banner.length ==0},{'abs':banner.length>0}]" :style="{ color: primaryColor }">
<view style="width: 100%;"> <view style="width: 100%;">
<view class="servetip pl-lg pr-lg pt-sm pb-sm"> <view class="servetip pl-lg pr-lg pt-sm pb-sm">
<view @tap.stop="toJump('servefc', index)" v-for="(item, index) in servefc" <view @tap.stop="toJump('servefc', index)" v-for="(item, index) in servefc" :key="index"
:key="index" class="servefc"> class="servefc">
<i class="iconfont" :class="item.icon"></i> <i class="iconfont" :class="item.icon"></i>
<span class="ml-sm">{{ item.text }}</span> <span class="ml-sm">{{ item.text }}</span>
</view> </view>
@ -55,15 +55,16 @@
<image mode="aspectFill" lazy-load class="cover radius-16" :src="item.work_img"></image> <image mode="aspectFill" lazy-load class="cover radius-16" :src="item.work_img"></image>
<!-- #endif --> <!-- #endif -->
<view class="flex-center f-desc c-title text-bold mt-md"> <view class="flex-center f-desc c-title text-bold mt-md">
<view class="ellipsis">{{item.coach_name}}</view> <view class="ellipsis">{{item.coach_name}}</view>
</view> </view>
<view class="flex-center"> <view class="flex-center">
<view class="new-technician flex-center f-icontext radius" <view class="new-technician flex-center f-icontext radius"
:style="{height:`33rpx`,width:`80rpx`,color:primaryColor,border:`1rpx solid ${primaryColor}`}" v-if="item.is_new">新人 :style="{height:`33rpx`,width:`80rpx`,color:primaryColor,border:`1rpx solid ${primaryColor}`}"
</view> v-if="item.is_new">新人
</view>
<view class="f-icontext c-caption" v-else>30天接单{{item.order_count||0}} <view class="f-icontext c-caption" v-else>30天接单{{item.order_count||0}}
</view> </view>
</view> </view>
</view> </view>
<view @tap.stop="toTechnician(index)" class="recommend-item type-2 pd-md" <view @tap.stop="toTechnician(index)" class="recommend-item type-2 pd-md"
v-if="recommend_style == 2"> v-if="recommend_style == 2">
@ -88,7 +89,8 @@
</view> </view>
<view class="flex-center"> <view class="flex-center">
<view class="new-technician flex-center f-icontext radius" <view class="new-technician flex-center f-icontext radius"
:style="{height:`33rpx`,width:`80rpx`,color:primaryColor,border:`1rpx solid ${primaryColor}`}" v-if="item.is_new">新人 :style="{height:`33rpx`,width:`80rpx`,color:primaryColor,border:`1rpx solid ${primaryColor}`}"
v-if="item.is_new">新人
</view> </view>
<view class="f-icontext c-caption" v-else>30天接单{{item.order_count||0}} <view class="f-icontext c-caption" v-else>30天接单{{item.order_count||0}}
</view> </view>
@ -97,22 +99,22 @@
</block> </block>
</scroll-view> </scroll-view>
</view> </view>
<view class="fill-base pl-lg pr-lg"> <view class="fill-base pl-lg pr-lg">
<view class="fill-base flex-between"> <view class="fill-base flex-between">
<view class="f-st-title text-bold flex-between"> <view class="f-st-title text-bold flex-between">
<view class="mr-md" style="width: 15px;height: 17px;"> <view class="mr-md" style="width: 15px;height: 17px;">
<image src="/static/img/icon_project.png" class="van-img" style="object-fit: cover;"></image> <image src="/static/img/icon_project.png" class="van-img" style="object-fit: cover;"></image>
</view> </view>
<text @click="tuichu">展示项目</text> <text @click="tuichu">展示项目</text>
</view> </view>
</view> </view>
</view> </view>
<view class="fill-base pd-lg b-1px-b" v-for="(item,index) in list.data" :key="index"> <view class="fill-base pd-lg b-1px-b" v-for="(item,index) in list.data" :key="index">
<service-list-item :info="item"></service-list-item> <service-list-item :info="item"></service-list-item>
</view> </view>
<load-more :noMore="list.current_page >= list.last_page && list.data.length > 0" :loading="loading" <load-more :noMore="list.current_page >= list.last_page && list.data.length > 0" :loading="loading"
v-if="loading"> v-if="loading">
</load-more> </load-more>
@ -179,6 +181,14 @@
<!-- #ifdef APP-PLUS --> <!-- #ifdef APP-PLUS -->
<login-info></login-info> <login-info></login-info>
<!-- #endif --> <!-- #endif -->
<uni-popup ref="perpopup" type="top" :mask-click='false' :zIndex="999">
<view class="permissions_box">
为了获取您附近的服务人员更好的为您服务,我们需要申请位置信息权限请您确认授权否则无法使用该功能
</view>
</uni-popup>
</view> </view>
</template> </template>
@ -188,6 +198,7 @@
mapActions, mapActions,
mapMutations mapMutations
} from "vuex" } from "vuex"
import permision from '@/utils/permission.js'
import siteInfo from '@/siteinfo.js'; import siteInfo from '@/siteinfo.js';
import serviceListItem from "@/components/service-list-item.vue" import serviceListItem from "@/components/service-list-item.vue"
import tabbar from "@/components/tabbar.vue" import tabbar from "@/components/tabbar.vue"
@ -215,7 +226,7 @@
}, { }, {
icon: 'icon-kzz', icon: 'icon-kzz',
text: '资质证书' text: '资质证书'
}], }],
} }
}, },
computed: mapState({ computed: mapState({
@ -297,9 +308,9 @@
} }
}, },
methods: { methods: {
tuichu(){ tuichu() {
uni.navigateTo({ uni.navigateTo({
url:'/pages/login' url: '/pages/login'
}) })
}, },
...mapActions(['getConfigInfo', 'getUserInfo', 'updateCommonOptions', 'getServiceIndex', 'getServiceList']), ...mapActions(['getConfigInfo', 'getUserInfo', 'updateCommonOptions', 'getServiceIndex', 'getServiceList']),
@ -410,7 +421,7 @@
siteroot siteroot
} = siteInfo } = siteInfo
let url = siteroot.split('/index.php')[0] let url = siteroot.split('/index.php')[0]
console.log(123,url); console.log(123, url);
let href = `${url}/h5/#/pages/service?pid=${pid}` let href = `${url}/h5/#/pages/service?pid=${pid}`
let imageUrl = '' let imageUrl = ''
this.$jweixin.wxReady(() => { this.$jweixin.wxReady(() => {
@ -442,6 +453,30 @@
} }
}, },
goCate(e) { goCate(e) {
if (e.title == '师傅入驻') {
let that = this
const appAuthorizeSetting = uni.getAppAuthorizeSetting()
console.log(9987, appAuthorizeSetting);
if (appAuthorizeSetting.locationAuthorized != 'authorized') {
that.$refs.perpopup.open('top')
uni.showModal({
title: '温馨提示',
content: '为了获取您附近的服务人员,更好的为您服务,我们需要申请位置信息权限,请您确认授权,否则无法使用该功能~',
cancelText: '关闭',
confirmText: '去授权',
success(res) {
if (res.confirm) {
that.$refs.perpopup.close();
permision.gotoAppPermissionSetting()
} else {
that.$refs.perpopup.close();
}
}
})
}
return
}
let { let {
id, id,
title, title,
@ -561,6 +596,7 @@
.recommend-technician { .recommend-technician {
white-space: nowrap; white-space: nowrap;
width: 690rpx; width: 690rpx;
.recommend-item { .recommend-item {
display: inline-block; display: inline-block;
} }
@ -655,8 +691,8 @@
.radius-top { .radius-top {
border-radius: 30rpx 30rpx 0 0; border-radius: 30rpx 30rpx 0 0;
} }
.coupon-popup { .coupon-popup {
width: 658rpx; width: 658rpx;
height: 865rpx; height: 865rpx;
@ -770,7 +806,7 @@
} }
} }
} }
.servetip { .servetip {
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
@ -780,11 +816,11 @@
margin: 22rpx 0; margin: 22rpx 0;
} }
.servefc{ .servefc {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.van-image { .van-image {
position: relative; position: relative;
display: inline-block; display: inline-block;
@ -794,8 +830,17 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.margin-20 { .margin-20 {
margin: 0.53333rem; margin: 0.53333rem;
} }
</style> .permissions_box {
padding: 200rpx 30rpx;
padding-top: 200rpx;
padding-bottom: 50rpx;
font-size: 30rpx;
line-height: 50rpx;
background-color: #fff;
}
</style>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save