Commit 1f8fe63e authored by 刘文虎's avatar 刘文虎

增加隐私协议确认

parent 01078be8
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
}, },
"plugins" : { "plugins" : {
"contactPlugin" : { "contactPlugin" : {
"version" : "1.4.4", "version" : "1.4.5",
"provider" : "wx104a1a20c3f81ec2" "provider" : "wx104a1a20c3f81ec2"
} }
} }
......
<template> <template>
<TabBarPage title="扳手会" :fixed="true" @click="goTop"> <TabBarPage title="扳手会" :fixed="true" @click="goTop">
<view class="content-view"> <view class="content-view">
<scroll-view <scroll-view style="height: 100%;" scroll-y @scrolltolower="reachBottom" :scroll-top="scrollTop"
style="height: 100%;" @scroll="scroll" scroll-anchoring refresher-enabled="true" :refresher-triggered="triggered"
scroll-y :refresher-threshold="100" refresher-background="#F4F5F7" @refresherrefresh="onRefresh"
@scrolltolower="reachBottom" @refresherrestore="onRestore" enable-back-to-top>
:scroll-top="scrollTop"
@scroll="scroll"
scroll-anchoring
refresher-enabled="true"
:refresher-triggered="triggered"
:refresher-threshold="100"
refresher-background="#F4F5F7"
@refresherrefresh="onRefresh"
@refresherrestore="onRestore"
enable-back-to-top
>
<image class="banner-image" :src="bannerImage" @click="handleClickBanner"></image> <image class="banner-image" :src="bannerImage" @click="handleClickBanner"></image>
<view class="msg-view"> <view class="msg-view">
<view class="msg-title">最新消息</view> <view class="msg-title">最新消息</view>
<view class="msg-list-view"> <view class="msg-list-view">
<view class="msg-content" v-for="(item, index) in messageList" :key="index" @click="toNewsDetail(item)"> <view class="msg-content" v-for="(item, index) in messageList" :key="index"
@click="toNewsDetail(item)">
<view class="msg-content-view"> <view class="msg-content-view">
<view class="left-view"> <view class="left-view">
<image class="msg-icon" :src="msgStyleImage[item.is_top]"></image> <image class="msg-icon" :src="msgStyleImage[item.is_top]"></image>
...@@ -41,16 +31,21 @@ ...@@ -41,16 +31,21 @@
<view v-if="needSettled" class="tip-view"> <view v-if="needSettled" class="tip-view">
<image :src="weiruzhuImage" class="tip-view-image"></image> <image :src="weiruzhuImage" class="tip-view-image"></image>
<view class="tip-other">入驻后平台将向您分配或推荐订单</view> <view class="tip-other">入驻后平台将向您分配或推荐订单</view>
<u-button class="settle-button" type="primary" shape="circle" @click="immediatelyIn" :custom-style="buttonStyle">立即入驻</u-button> <u-button class="settle-button" type="primary" shape="circle" @click="immediatelyIn"
:custom-style="buttonStyle">立即入驻</u-button>
</view> </view>
<template v-else> <template v-else>
<!-- 入驻成功之后无推荐订单 --> <!-- 入驻成功之后无推荐订单 -->
<view v-if="orderList.length <= 0 && loadedOrder" class="no-order-view"><NoOrder /></view> <view v-if="orderList.length <= 0 && loadedOrder" class="no-order-view">
<NoOrder />
</view>
<view v-else-if="orderList.length > 0" class="order-item-view"> <view v-else-if="orderList.length > 0" class="order-item-view">
<view v-for="(item, index) in orderList" :key="index"> <view v-for="(item, index) in orderList" :key="index">
<OrderCell :orderData="item" type="waitAccept" :location="location" @click="handleClick" @action="handleClick"></OrderCell> <OrderCell :orderData="item" type="waitAccept" :location="location"
@click="handleClick" @action="handleClick"></OrderCell>
</view> </view>
<view class="load-more-view" v-show="(search.pageNumber == 1 && loadedOrder) || search.pageNumber > 1"> <view class="load-more-view"
v-show="(search.pageNumber == 1 && loadedOrder) || search.pageNumber > 1">
<u-loadmore :status="currentLoadStatus" bgColor="#F4F5F7"></u-loadmore> <u-loadmore :status="currentLoadStatus" bgColor="#F4F5F7"></u-loadmore>
</view> </view>
</view> </view>
...@@ -72,14 +67,14 @@ ...@@ -72,14 +67,14 @@
</template> </template>
<script> <script>
import TabBarPage from '@/components/tabBarList/index.vue'; import TabBarPage from '@/components/tabBarList/index.vue';
import NoOrder from '@/components/order/noOrder.vue'; import NoOrder from '@/components/order/noOrder.vue';
import MaskTip from '@/components/mask-tip/index.vue'; import MaskTip from '@/components/mask-tip/index.vue';
const app = getApp(); const app = getApp();
import OrderCell from '@/components/order/index.vue'; import OrderCell from '@/components/order/index.vue';
// import EusingList from '@/components/order/eusingList.vue' // import EusingList from '@/components/order/eusingList.vue'
export default { export default {
components: { components: {
OrderCell, OrderCell,
TabBarPage, TabBarPage,
...@@ -170,7 +165,11 @@ export default { ...@@ -170,7 +165,11 @@ export default {
}, },
methods: { methods: {
getData() { getData() {
if (this.vuex_token) {
this.getOrderCount(); this.getOrderCount();
} else {
this.waitInit = true;
}
this.initSettleInfo(); this.initSettleInfo();
}, },
handleClick(item, type, showCountTime) { handleClick(item, type, showCountTime) {
...@@ -178,7 +177,8 @@ export default { ...@@ -178,7 +177,8 @@ export default {
// type类型 // type类型
// 'waitAccept': 待接单、待抢单;'waitAppointment': 待预约;'waitCheckIn': 待签到;'waitFinish': 待完工;'audit': 审核中;'exception': 异常单;'finish': 已完工;'other': 工单结算信息 // 'waitAccept': 待接单、待抢单;'waitAppointment': 待预约;'waitCheckIn': 待签到;'waitFinish': 待完工;'audit': 审核中;'exception': 异常单;'finish': 已完工;'other': 工单结算信息
uni.navigateTo({ uni.navigateTo({
url: 'pages/order/detail?id=' + item.orderId + '&type=' + type + '&showCountTime=' + showCountTime url: 'pages/order/detail?id=' + item.orderId + '&type=' + type + '&showCountTime=' +
showCountTime
}); });
}, },
async initSettleInfo() { async initSettleInfo() {
...@@ -249,7 +249,8 @@ export default { ...@@ -249,7 +249,8 @@ export default {
} }
} }
self.currentLoadStatus = res.data.total > self.orderList.length && (res.data.list || []).length == self.search.pageSize ? 'loadmore' : 'nomore'; self.currentLoadStatus = res.data.total > self.orderList.length && (res.data.list ||
[]).length == self.search.pageSize ? 'loadmore' : 'nomore';
} else { } else {
console.log(res.message, '初始化订单列表异常'); console.log(res.message, '初始化订单列表异常');
} }
...@@ -314,7 +315,8 @@ export default { ...@@ -314,7 +315,8 @@ export default {
} }
uni.navigateTo({ uni.navigateTo({
url: this.status > 0 ? '/pages/settle/prompt?pageIndex=' + pageIndex : '/pages/settle/index' url: this.status > 0 ? '/pages/settle/prompt?pageIndex=' + pageIndex :
'/pages/settle/index'
}); });
} else { } else {
// 用户未登录 // 用户未登录
...@@ -399,21 +401,22 @@ export default { ...@@ -399,21 +401,22 @@ export default {
this.showMask = true; this.showMask = true;
} }
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.banner-image { .banner-image {
width: 730rpx; width: 730rpx;
height: 280rpx; height: 280rpx;
margin-left: -16rpx; margin-left: -16rpx;
} }
.content-view {
.content-view {
height: 100%; height: 100%;
overflow: auto; overflow: auto;
} }
.msg-view { .msg-view {
.msg-title { .msg-title {
color: #333333; color: #333333;
font-size: 32rpx; font-size: 32rpx;
...@@ -468,34 +471,34 @@ export default { ...@@ -468,34 +471,34 @@ export default {
background-color: #f4f5f7; background-color: #f4f5f7;
} }
} }
} }
.logo { .logo {
height: 200 rpx; height: 200 rpx;
width: 100%; width: 100%;
margin: 0 rpx auto 50 rpx auto; margin: 0 rpx auto 50 rpx auto;
} }
.text-area { .text-area {
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
.title { .title {
font-size: 36 rpx; font-size: 36 rpx;
color: #8f8f94; color: #8f8f94;
} }
// .sticky-view { // .sticky-view {
// position: sticky; // position: sticky;
// position: -webkit-sticky; // position: -webkit-sticky;
// top: 0rpx; // top: 0rpx;
// width: 100%; // width: 100%;
// height: 200rpx; // height: 200rpx;
// background-color: black; // background-color: black;
// } // }
.sticky { .sticky {
background-color: #f4f5f7; background-color: #f4f5f7;
color: #fff; color: #fff;
padding: 24 rpx; padding: 24 rpx;
...@@ -504,9 +507,9 @@ export default { ...@@ -504,9 +507,9 @@ export default {
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
padding: 46rpx 0 28rpx 0; padding: 46rpx 0 28rpx 0;
} }
.order-view { .order-view {
text-align: center; text-align: center;
.order-list-view { .order-list-view {
...@@ -528,22 +531,22 @@ export default { ...@@ -528,22 +531,22 @@ export default {
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.settle-button { .settle-button {}
}
} }
.order-item-view { .order-item-view {
background-color: #f4f5f7; background-color: #f4f5f7;
border-radius: 12rpx; border-radius: 12rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
.load-more-view { .load-more-view {
padding-bottom: 44rpx; padding-bottom: 44rpx;
} }
} }
} }
} }
.bottom-view { .bottom-view {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
...@@ -559,10 +562,11 @@ export default { ...@@ -559,10 +562,11 @@ export default {
color: #999999; color: #999999;
font-size: 24rpx; font-size: 24rpx;
} }
} }
.fixed-button {
.fixed-button {
position: fixed; position: fixed;
right: 10rpx; right: 10rpx;
bottom: 64rpx; bottom: 64rpx;
} }
</style> </style>
\ No newline at end of file
...@@ -258,7 +258,7 @@ export default { ...@@ -258,7 +258,7 @@ export default {
}, },
onShow() { onShow() {
// 更新是否需要入住 // 更新是否需要入住
if (!this.needSettled) return; if (!this.vuex_token||!this.needSettled) return;
this.$u.api.getSettleBaseInfo().then(res => { this.$u.api.getSettleBaseInfo().then(res => {
this.needSettled = res.data.needSettled; this.needSettled = res.data.needSettled;
}); });
......
...@@ -22,6 +22,15 @@ ...@@ -22,6 +22,15 @@
<view class="button-text">立即绑定</view> <view class="button-text">立即绑定</view>
</u-button> </u-button>
</view> </view>
<view class="quick-title" @click="handleClickAgree">
<view class="icon-view" :class="{ 'icon-agree': agree }"><u-icon name="checkmark-circle-fill" v-if="agree" size="44" color="#2979ff"></u-icon></view>
<view class="agree-text-view">
我已阅读并同意
<text class="name-text" @tap.stop.prevent="toProtocol('protocol')">《用户服务协议》</text>
<text class="name-text" @tap.stop.prevent="toProtocol('policy')">《隐私政策》</text>
</view>
</view>
</view> </view>
</template> </template>
...@@ -31,8 +40,9 @@ ...@@ -31,8 +40,9 @@
export default { export default {
data() { data() {
return { return {
phone: '13423831191', agree:false,
code: '174253', phone: '',
code: '',
timer: null, timer: null,
canGetCode: true, canGetCode: true,
seconds: 60, seconds: 60,
...@@ -70,7 +80,36 @@ ...@@ -70,7 +80,36 @@
} }
}, },
methods: { methods: {
toProtocol(type) {
if(type==='protocol'){
uni.navigateTo({
url: '/pages/mine/about/user-agreement/user-agreement'
});
}else{
uni.navigateTo({
url: '/pages/mine/about/privacy-agreement/privacy-agreement'
});
}
},
handleClickAgree() {
this.agree = !this.agree;
},
checkAgree() {
if (!this.agree) {
uni.showToast({
title: '请阅读并同意《用户服务协议》和《隐私政策》',
icon: 'none',
duration: 2000
});
return false;
}
return true;
},
handleClick() { handleClick() {
if (!this.checkAgree()) {
return;
}
if (this.phone == '') { if (this.phone == '') {
uni.showToast({ uni.showToast({
title: '请输入手机号', title: '请输入手机号',
...@@ -126,6 +165,9 @@ ...@@ -126,6 +165,9 @@
} }
}, },
handleClickSave() { handleClickSave() {
if (!this.checkAgree()) {
return;
}
this.signup(); this.signup();
}, },
signup() { signup() {
...@@ -346,5 +388,53 @@ ...@@ -346,5 +388,53 @@
font-size: 32rpx; font-size: 32rpx;
} }
} }
.quick-title {
z-index: 10;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
position: fixed;
left: 0;
bottom: 5%;
text-align: center;
line-height: 28upx;
font-size: 24upx;
color: #8d8d8d;
font-weight: 500;
&-weight {
font-weight: bold;
color: #333333;
}
&-icon {
width: 28upx;
height: 28upx;
border-radius: 50%;
margin-right: 16upx;
border: 2upx solid #333333;
display: inline-block;
}
.icon-view {
width: 36rpx;
height: 36rpx;
font-size: 18rpx;
border-radius: 50%;
border: 2rpx solid #333333;
display: flex;
justify-content: center;
align-items: center;
background-color: #ffffff;
margin-right: 12rpx;
}
.icon-agree {
// background-color: #3383fe;
// color: #ffffff;
border: 0rpx;
}
.name-text {
color: #3383fe;
}
}
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment