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,497 +67,506 @@ ...@@ -72,497 +67,506 @@
</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,
NoOrder, NoOrder,
MaskTip MaskTip
// EusingList, // EusingList,
},
data() {
return {
status: 0, // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',6=>'已签约',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
location: [], // 经纬度
// title: false,
// title: 'Hello',
loaded: false,
loadedOrder: false,
needSettled: false,
count: 0, // 推荐订单数量
messageList: [],
currentLoadStatus: 'loading',
orderList: [],
search: {
token: '',
pageNumber: 0,
pageSize: 15
},
waitInit: false, // 当token为空时,等待自动登录结束
triggered: true,
scrollTop: 0,
old: {
scrollTop: 0
},
showMask: false
};
},
watch: {
vuex_token(val, oldVal) {
// 监听token变化,如果更新则重新加载页面数据
val && this.waitInit && this.getData();
}
},
computed: {
buttonStyle() {
return {
width: '300rpx',
height: '80rpx',
'font-size': '32rpx',
'font-weight': 'bold'
};
},
countKeys() {
return ['toAppointmentCount', 'toCheckinCount', 'toFinishCount', 'reviewingCount', 'exceptionCount'];
}, },
msgStyleImage() { data() {
return { return {
'1': process.uniEnv.qn_base_url + 'zhiding.png', // 置顶 status: 0, // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',6=>'已签约',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
'0': process.uniEnv.qn_base_url + 'tongzhi.png' // 通知 location: [], // 经纬度
// '3': process.uniEnv.qn_base_url + "xiaoxi.png", // 消息 // title: false,
// title: 'Hello',
loaded: false,
loadedOrder: false,
needSettled: false,
count: 0, // 推荐订单数量
messageList: [],
currentLoadStatus: 'loading',
orderList: [],
search: {
token: '',
pageNumber: 0,
pageSize: 15
},
waitInit: false, // 当token为空时,等待自动登录结束
triggered: true,
scrollTop: 0,
old: {
scrollTop: 0
},
showMask: false
}; };
}, },
bannerImage() { watch: {
return process.uniEnv.qn_base_url + 'banner-1.png'; vuex_token(val, oldVal) {
}, // 监听token变化,如果更新则重新加载页面数据
shouyeyouImage() { val && this.waitInit && this.getData();
return process.uniEnv.qn_base_url + 'shouyeyou.png'; }
},
weiruzhuImage() {
return process.uniEnv.qn_base_url + 'weiruzhu.png';
},
imageStyle() {
return 'width:628rpx; margin-top:816rpx; margin-left:122rpx';
}
},
onLoad(e) {
app.trackPage('自营平台首页');
this.freshing = false;
if (this.vuex_token) {
this.getOrderCount();
} else {
this.waitInit = true;
}
this.showMaskTip();
},
onShow() {
// 每次进入页面都刷新入驻状态
this.pageNumber = 0;
this.initSettleInfo();
},
methods: {
getData() {
this.getOrderCount();
this.initSettleInfo();
}, },
handleClick(item, type, showCountTime) { computed: {
// 跳转工单详情页面 showCountTime:是否显示倒计时 buttonStyle() {
// type类型 return {
// 'waitAccept': 待接单、待抢单;'waitAppointment': 待预约;'waitCheckIn': 待签到;'waitFinish': 待完工;'audit': 审核中;'exception': 异常单;'finish': 已完工;'other': 工单结算信息 width: '300rpx',
uni.navigateTo({ height: '80rpx',
url: 'pages/order/detail?id=' + item.orderId + '&type=' + type + '&showCountTime=' + showCountTime 'font-size': '32rpx',
}); 'font-weight': 'bold'
};
},
countKeys() {
return ['toAppointmentCount', 'toCheckinCount', 'toFinishCount', 'reviewingCount', 'exceptionCount'];
},
msgStyleImage() {
return {
'1': process.uniEnv.qn_base_url + 'zhiding.png', // 置顶
'0': process.uniEnv.qn_base_url + 'tongzhi.png' // 通知
// '3': process.uniEnv.qn_base_url + "xiaoxi.png", // 消息
};
},
bannerImage() {
return process.uniEnv.qn_base_url + 'banner-1.png';
},
shouyeyouImage() {
return process.uniEnv.qn_base_url + 'shouyeyou.png';
},
weiruzhuImage() {
return process.uniEnv.qn_base_url + 'weiruzhu.png';
},
imageStyle() {
return 'width:628rpx; margin-top:816rpx; margin-left:122rpx';
}
}, },
async initSettleInfo() { onLoad(e) {
let self = this; app.trackPage('自营平台首页');
// 加载消息列表 this.freshing = false;
this.loadMessageList();
if (this.vuex_token) { if (this.vuex_token) {
const callBack = (vm, result) => { this.getOrderCount();
// 后台自动判断入驻流程是否完成,前台通过status确定状态
if (result && result.record) {
// 不返回该字段或返回true代表需要入驻
vm.needSettled = result.needSettled == undefined ? true : result.needSettled;
vm.status = Number(result.record.status || '0');
// vm.status = 8
}
};
self.search.pageNumber = 0;
self.loadedOrder = false;
await app.getBaseInfo(self, callBack);
if (this.status == 7) {
this.getLocation();
self.loadOrderList();
}
this.loaded = true;
} else { } else {
this.loaded = true; this.waitInit = true;
if (this.freshing) {
this.triggered = false;
this.freshing = false;
}
} }
this.showMaskTip();
}, },
loadMessageList() { onShow() {
let self = this; // 每次进入页面都刷新入驻状态
self.$u.api.listByNotice().then(res => { this.pageNumber = 0;
uni.stopPullDownRefresh(); // 结束下拉刷新
if (res.code == 200) { this.initSettleInfo();
if (res.data && res.data.length > 2) { },
self.messageList = res.data.slice(0, 2); methods: {
} else { getData() {
self.messageList = res.data || []; if (this.vuex_token) {
} this.getOrderCount();
} else { } else {
console.log(res.message, '初始化消息列表异常'); this.waitInit = true;
} }
}); this.initSettleInfo();
}, },
async loadOrderList() { handleClick(item, type, showCountTime) {
this.search.pageNumber += 1; // 跳转工单详情页面 showCountTime:是否显示倒计时
let self = this; // type类型
// 加载订单列表 // 'waitAccept': 待接单、待抢单;'waitAppointment': 待预约;'waitCheckIn': 待签到;'waitFinish': 待完工;'audit': 审核中;'exception': 异常单;'finish': 已完工;'other': 工单结算信息
self.search.token = self.vuex_token; uni.navigateTo({
self.$u.api.listByRecommendOrder(self.search).then(res => { url: 'pages/order/detail?id=' + item.orderId + '&type=' + type + '&showCountTime=' +
self.loadedOrder = true; showCountTime
});
if (res.code == 200 && res.data) { },
if (self.search.pageNumber == 1) { async initSettleInfo() {
self.orderList = []; let self = this;
} // 加载消息列表
if (res.data.list) { this.loadMessageList();
// self.orderList.push(...res.data.list) if (this.vuex_token) {
const callBack = (vm, result) => {
// 更新每一条时间戳,防止后台返回的数据和原先一样,不触发ordercell的时间计算 // 后台自动判断入驻流程是否完成,前台通过status确定状态
var time = new Date().getTime(); if (result && result.record) {
for (var item of res.data.list) { // 不返回该字段或返回true代表需要入驻
item.currentCellTime = time; vm.needSettled = result.needSettled == undefined ? true : result.needSettled;
self.orderList.push(item); vm.status = Number(result.record.status || '0');
// vm.status = 8
} }
};
self.search.pageNumber = 0;
self.loadedOrder = false;
await app.getBaseInfo(self, callBack);
if (this.status == 7) {
this.getLocation();
self.loadOrderList();
} }
this.loaded = true;
self.currentLoadStatus = res.data.total > self.orderList.length && (res.data.list || []).length == self.search.pageSize ? 'loadmore' : 'nomore';
} else { } else {
console.log(res.message, '初始化订单列表异常'); this.loaded = true;
if (this.freshing) {
this.triggered = false;
this.freshing = false;
}
} }
self.$nextTick(() => { },
if (self.freshing) { loadMessageList() {
self.triggered = false; let self = this;
self.freshing = false; self.$u.api.listByNotice().then(res => {
uni.stopPullDownRefresh(); // 结束下拉刷新
if (res.code == 200) {
if (res.data && res.data.length > 2) {
self.messageList = res.data.slice(0, 2);
} else {
self.messageList = res.data || [];
}
} else {
console.log(res.message, '初始化消息列表异常');
} }
}); });
}); },
}, async loadOrderList() {
reachBottom() { this.search.pageNumber += 1;
if (this.vuex_token) { let self = this;
if (this.currentLoadStatus != 'loadmore') return; // 加载订单列表
this.currentLoadStatus == 'loading'; self.search.token = self.vuex_token;
this.loadOrderList(); self.$u.api.listByRecommendOrder(self.search).then(res => {
} self.loadedOrder = true;
},
onRefresh() { if (res.code == 200 && res.data) {
if (this.freshing) return; if (self.search.pageNumber == 1) {
this.freshing = true; self.orderList = [];
this.initSettleInfo(); }
}, if (res.data.list) {
onRestore() { // self.orderList.push(...res.data.list)
this.triggered = 'restore'; // 需要重置
}, // 更新每一条时间戳,防止后台返回的数据和原先一样,不触发ordercell的时间计算
scroll(e) { var time = new Date().getTime();
this.old.scrollTop = e.detail.scrollTop; for (var item of res.data.list) {
}, item.currentCellTime = time;
goTop(e) { self.orderList.push(item);
this.scrollTop = this.old.scrollTop; }
this.$nextTick(function() { }
this.scrollTop = 0;
});
},
/* 立即入驻 */
immediatelyIn() {
if (this.vuex_token) {
// 用户已登录
var pageIndex = 1;
// 0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
switch (this.status) {
case 1:
case 2:
case 3:
case 4:
pageIndex = 2;
break;
case 8:
pageIndex = 3;
break;
case 5:
case 6:
pageIndex = 4;
break;
case 7:
pageIndex = 5;
break;
default:
pageIndex = 1;
break;
}
uni.navigateTo({ self.currentLoadStatus = res.data.total > self.orderList.length && (res.data.list ||
url: this.status > 0 ? '/pages/settle/prompt?pageIndex=' + pageIndex : '/pages/settle/index' []).length == self.search.pageSize ? 'loadmore' : 'nomore';
} else {
console.log(res.message, '初始化订单列表异常');
}
self.$nextTick(() => {
if (self.freshing) {
self.triggered = false;
self.freshing = false;
}
});
}); });
} else { },
// 用户未登录 reachBottom() {
uni.navigateTo({ if (this.vuex_token) {
url: 'pages/login/index' if (this.currentLoadStatus != 'loadmore') return;
this.currentLoadStatus == 'loading';
this.loadOrderList();
}
},
onRefresh() {
if (this.freshing) return;
this.freshing = true;
this.initSettleInfo();
},
onRestore() {
this.triggered = 'restore'; // 需要重置
},
scroll(e) {
this.old.scrollTop = e.detail.scrollTop;
},
goTop(e) {
this.scrollTop = this.old.scrollTop;
this.$nextTick(function() {
this.scrollTop = 0;
}); });
} },
}, /* 立即入驻 */
// 获取订单数量 immediatelyIn() {
getOrderCount() { if (this.vuex_token) {
var self = this; // 加载订单列表 // 用户已登录
self.$u.api.listOrderCount().then(res => { var pageIndex = 1;
if (res.code == 200) { // 0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
if (res.data) { switch (this.status) {
var count = 0; case 1:
for (var item of this.countKeys) { case 2:
count += res.data[item] || 0; case 3:
} case 4:
// 修改tab总数 pageIndex = 2;
if (count > 0) { break;
uni.setTabBarBadge({ case 8:
index: 1, pageIndex = 3;
text: String(count) break;
}); case 5:
} else { case 6:
uni.removeTabBarBadge({ pageIndex = 4;
index: 1 break;
}); case 7:
} pageIndex = 5;
break;
default:
pageIndex = 1;
break;
} }
uni.navigateTo({
url: this.status > 0 ? '/pages/settle/prompt?pageIndex=' + pageIndex :
'/pages/settle/index'
});
} else { } else {
console.log(res.message, '获取订单数量失败!'); // 用户未登录
uni.navigateTo({
url: 'pages/login/index'
});
} }
}); },
}, // 获取订单数量
/** getOrderCount() {
* 获取当前位置的经纬度 var self = this; // 加载订单列表
*/ self.$u.api.listOrderCount().then(res => {
getLocation() { if (res.code == 200) {
let self = this; if (res.data) {
uni.getLocation({ var count = 0;
type: 'gcj02', for (var item of this.countKeys) {
success: function(res) { count += res.data[item] || 0;
self.location = [res.latitude, res.longitude]; }
}, // 修改tab总数
complete: function(res) { if (count > 0) {
if (res.errMsg.indexOf('auth') != -1) { uni.setTabBarBadge({
uni.showModal({ index: 1,
title: '提示', text: String(count)
content: '获取权限失败,请到设置页面开启权限', });
confirmText: '好的', } else {
success(res) { uni.removeTabBarBadge({
if (res.confirm) { index: 1
uni.openSetting({ });
success(res) {
console.log(res.authSetting);
}
});
}
} }
}); }
} else {
console.log(res.message, '获取订单数量失败!');
} }
}, });
fail: function(err) {} },
}); /**
}, * 获取当前位置的经纬度
toNewsDetail(item) { */
wx.navigateTo({ getLocation() {
url: '/pages/learn/news-details', let self = this;
success: function(res) { uni.getLocation({
res.eventChannel.emit('acceptDataFromLearn', item); type: 'gcj02',
} success: function(res) {
}); self.location = [res.latitude, res.longitude];
}, },
handleClickBanner() { complete: function(res) {
uni.navigateTo({ if (res.errMsg.indexOf('auth') != -1) {
url: '/pages/mine/customer/index' + '?type=exclusive' uni.showModal({
}); title: '提示',
}, content: '获取权限失败,请到设置页面开启权限',
// 显示提示蒙版 confirmText: '好的',
showMaskTip() { success(res) {
this.showMask = true; if (res.confirm) {
uni.openSetting({
success(res) {
console.log(res.authSetting);
}
});
}
}
});
}
},
fail: function(err) {}
});
},
toNewsDetail(item) {
wx.navigateTo({
url: '/pages/learn/news-details',
success: function(res) {
res.eventChannel.emit('acceptDataFromLearn', item);
}
});
},
handleClickBanner() {
uni.navigateTo({
url: '/pages/mine/customer/index' + '?type=exclusive'
});
},
// 显示提示蒙版
showMaskTip() {
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 {
height: 100%;
overflow: auto;
}
.msg-view {
.msg-title {
color: #333333;
font-size: 32rpx;
font-weight: bold;
padding: 1rpx 0rpx 30rpx 0rpx;
} }
.msg-list-view { .content-view {
border-radius: 12rpx; height: 100%;
background-color: #ffffff; overflow: auto;
padding: 12rpx 30rpx;
height: 174rpx;
} }
.msg-content { .msg-view {
color: #333333; .msg-title {
font-size: 26rpx; color: #333333;
font-size: 32rpx;
font-weight: bold;
padding: 1rpx 0rpx 30rpx 0rpx;
}
.msg-list-view {
border-radius: 12rpx;
background-color: #ffffff;
padding: 12rpx 30rpx;
height: 174rpx;
}
.msg-content-view { .msg-content {
display: flex; color: #333333;
align-items: center; font-size: 26rpx;
justify-content: space-between;
margin-top: 20rpx;
margin-bottom: 20rpx;
.left-view { .msg-content-view {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between;
margin-top: 20rpx;
margin-bottom: 20rpx;
.left-view {
display: flex;
align-items: center;
.msg-icon {
width: 80rpx;
height: 36rpx;
margin-right: 20rpx;
}
.msg-icon { .msg-text {
width: 80rpx; text-overflow: ellipsis;
height: 36rpx; overflow: hidden;
margin-right: 20rpx; white-space: nowrap;
width: 448rpx;
}
} }
.msg-text { .right-icon {
text-overflow: ellipsis; width: 14rpx;
overflow: hidden; height: 24rpx;
white-space: nowrap;
width: 448rpx;
} }
} }
.right-icon { .line-view {
width: 14rpx; height: 2rpx;
height: 24rpx; background-color: #f4f5f7;
} }
} }
}
.line-view { .logo {
height: 2rpx; height: 200 rpx;
background-color: #f4f5f7; width: 100%;
} margin: 0 rpx auto 50 rpx auto;
} }
}
.logo {
height: 200 rpx;
width: 100%;
margin: 0 rpx auto 50 rpx auto;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36 rpx;
color: #8f8f94;
}
// .sticky-view {
// position: sticky;
// position: -webkit-sticky;
// top: 0rpx;
// width: 100%;
// height: 200rpx;
// background-color: black;
// }
.sticky {
background-color: #f4f5f7;
color: #fff;
padding: 24 rpx;
text-align: left;
font-size: 32rpx;
font-weight: bold;
color: #333333;
padding: 46rpx 0 28rpx 0;
}
.order-view {
text-align: center;
.order-list-view {
.tip-view {
padding: 30rpx;
background-color: #ffffff;
border-radius: 12rpx;
min-height: 460rpx;
.tip-view-image { .text-area {
width: 328rpx; display: flex;
height: 200rpx; justify-content: center;
margin-top: 30rpx; }
}
.tip-other { .title {
font-size: 28rpx; font-size: 36 rpx;
color: #666666; color: #8f8f94;
margin-bottom: 30rpx; }
}
.settle-button { // .sticky-view {
// position: sticky;
// position: -webkit-sticky;
// top: 0rpx;
// width: 100%;
// height: 200rpx;
// background-color: black;
// }
.sticky {
background-color: #f4f5f7;
color: #fff;
padding: 24 rpx;
text-align: left;
font-size: 32rpx;
font-weight: bold;
color: #333333;
padding: 46rpx 0 28rpx 0;
}
.order-view {
text-align: center;
.order-list-view {
.tip-view {
padding: 30rpx;
background-color: #ffffff;
border-radius: 12rpx;
min-height: 460rpx;
.tip-view-image {
width: 328rpx;
height: 200rpx;
margin-top: 30rpx;
}
.tip-other {
font-size: 28rpx;
color: #666666;
margin-bottom: 30rpx;
}
.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 {
padding-bottom: 44rpx; .load-more-view {
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; padding: 50rpx 40rpx 50rpx 40rpx;
padding: 50rpx 40rpx 50rpx 40rpx;
.bottom-line-view {
.bottom-line-view { background-color: #d5d5d5;
background-color: #d5d5d5; height: 2rpx;
height: 2rpx; width: 30%;
width: 30%; }
.bottom-text {
color: #999999;
font-size: 24rpx;
}
} }
.bottom-text { .fixed-button {
color: #999999; position: fixed;
font-size: 24rpx; right: 10rpx;
bottom: 64rpx;
} }
} </style>
.fixed-button { \ No newline at end of file
position: fixed;
right: 10rpx;
bottom: 64rpx;
}
</style>
...@@ -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