Commit d39ffb32 authored by 和慭琛's avatar 和慭琛

下单成功页 页面搭建 100%

parent a4b37f52
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<text class="selectItemTitle">服务需求:</text> <text class="selectItemTitle">服务需求:</text>
</view> </view>
<view class="textAreaView"> <view class="textAreaView">
<textarea class="textArea" value="" placeholder="请输入服务需求" /> <textarea class="textArea" v-model="demandContent" value="" placeholder="请输入服务需求" />
</view> </view>
</view> </view>
<view class="agreeView"> <view class="agreeView">
...@@ -87,11 +87,16 @@ ...@@ -87,11 +87,16 @@
//,{title:'安装'},{title:'清洗包养'},{title:'维修'} //,{title:'安装'},{title:'清洗包养'},{title:'维修'}
], ],
activeService:'', activeService:'',
isAgree:false demandContent:'',
isAgree:false,
isClean:false,
} }
}, },
onLoad() { onLoad() {
},
onShow() {
this.checkClean()
}, },
methods: { methods: {
locationClick:function(){ locationClick:function(){
...@@ -143,7 +148,29 @@ ...@@ -143,7 +148,29 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/success' url: '/pages/index/success'
}) })
}, },
checkClean: function (){
let pages = getCurrentPages();
let currPage = pages[pages.length-1];
console.log('是否清除:')
console.log(currPage.data.isClean)
if (currPage.data.isClean == true){//这就是传递的参数
this.name = '',
this.phone = '',
this.location = '',
this.address = '',
this.activeProduct = '',
this.activeService = '',
this.demandContent= '',
this.isAgree = false,
this.isClean = false
}
}
} }
......
<template> <template>
<view class=""> <view class="">
下单成功页 <view class="textBackView u-m-t-50">
<text class="productTypeText">【{{productType}}】 订单正在撮合</text>
</view>
<view class="textBackView u-m-t-80 u-row">
<text class="productTypeText">已发给</text>
<text class="countText">{{count}}位</text>
<text class="productTypeText">师傅</text>
</view>
<view class="textBackView u-m-t-50">
<text class="productTypeText">师傅接单后会联系你!请保持电话畅通</text>
</view>
<view class="textBackView u-m-t-50 u-row">
<text class="productTypeText">如有疑问!请致电客服:</text>
<text class="phoneText">{{phone}}</text>
</view>
<view class="noticeView" @click="noticeClick()">
<text class="noticeText">及时了解订单动态,请订阅公众号通知</text>
</view>
<view class="bottomView">
<view class="bottomLeftView" @click="recordClick()">
<text class="bottomTitle">下单记录</text>
</view>
<view class="bottomRightView" @click="oneMoreClick()">
<text class="bottomTitle">再下一单</text>
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
export default {
data() {
return {
productType:'家电安装',
count:'3',
phone:'400-8834-123'
}
},
onLoad(e) {
},
methods: {
noticeClick: function () {
console.log('订阅公众号')
},
recordClick: function () {
console.log('下单记录')
uni.navigateTo({
url: '/pages/index/record'
})
},
oneMoreClick: function () {
let pages = getCurrentPages();
let prevPage = pages[pages.length - 2]; //上一个页面
prevPage.$vm.isClean = true;
uni.navigateBack({
})
},
}
}
</script> </script>
<style> <style>
.textBackView{
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.productTypeText{
font-size: 32rpx;
}
.countText{
font-size: 60rpx;
font-weight: bold;
}
.phoneText{
font-size: 32rpx;
text-decoration:underline;
}
.noticeView{
width: 100%;
margin-top: 500rpx;
display: flex;
align-items: center;
justify-content: center;
}
.noticeText{
color: #007AFF;
font-size: 24rpx;
}
.bottomView{
background-color: #FFFFFF;
width: 100%;
height: 110rpx;
display: flex;
flex-direction: row;
align-items: center;
border-top: 2rpx solid #999999;
position: fixed;
bottom: 0;
}
.bottomLeftView{
background-color: #FFFFFF;
width: 30%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
border-right: 2rpx solid #999999;
}
.bottomRightView{
background-color: #FFFFFF;
width: 70%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.bottomTitle{
font-size: 32rpx;
}
</style> </style>
...@@ -11,5 +11,6 @@ ...@@ -11,5 +11,6 @@
"navigationBarBackgroundColor": "#F8F8F8", "navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8" "backgroundColor": "#F8F8F8"
}, },
"usingComponents": {} "usingComponents": {},
"sitemapLocation": "sitemap0.json"
} }
\ No newline at end of file
...@@ -7896,7 +7896,9 @@ module.exports = g; ...@@ -7896,7 +7896,9 @@ module.exports = g;
/* 7 */, /* 7 */,
/* 8 */, /* 8 */,
/* 9 */, /* 9 */,
/* 10 */ /* 10 */,
/* 11 */,
/* 12 */
/*!**********************************************************************************************************!*\ /*!**********************************************************************************************************!*\
!*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***! !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
\**********************************************************************************************************/ \**********************************************************************************************************/
......
<view><view class="topView"><text class="topTitle">扳手会全国百万师傅为你服务</text></view><view class="itemView"><text class="itemTitle">联系人:</text><input class="itemInput" type value="{{name}}" placeholder="请输入联系人姓名" data-event-opts="{{[['input',[['__set_model',['','name','$event',[]]]]]]}}" bindinput="__e"/></view><view class="itemView"><text class="itemTitle">联系电话:</text><input class="itemInput" type value="{{phone}}" placeholder="请输入联系电话" data-event-opts="{{[['input',[['__set_model',['','phone','$event',[]]]]]]}}" bindinput="__e"/></view><view data-event-opts="{{[['tap',[['locationClick']]]]}}" class="itemView" bindtap="__e"><text class="itemTitle">定位位置:</text><view class="locationView"><image class="locationIcon" src mode></image><text class="locationText">{{location}}</text></view></view><view class="itemView"><text class="itemTitle">详细地址:</text><input class="itemInput" type value="{{address}}" placeholder="请输入详细地址" data-event-opts="{{[['input',[['__set_model',['','address','$event',[]]]]]]}}" bindinput="__e"/></view><view class="selectItemView"><view class="selectItemTitleView"><text class="selectItemTitle">产品类型:</text></view><view class="selectBackView"><block wx:for="{{productTypeList}}" wx:for-item="item" wx:for-index="ikey" wx:key="ikey"><view class="selectView"><view data-event-opts="{{[['tap',[['productTypeClick',['$0'],[[['productTypeList','',ikey]]]]]]]}}" class="{{[activeProduct==item.title?'innerView activeColor':'innerView']}}" bindtap="__e"><text class="innerText">{{item.title}}</text></view></view></block></view></view><view class="selectItemView"><view class="selectItemTitleView"><text class="selectItemTitle">服务类型:</text></view><view class="selectBackView"><block wx:for="{{serviceTypleList}}" wx:for-item="item" wx:for-index="ikey" wx:key="ikey"><view class="selectView"><view data-event-opts="{{[['tap',[['serviceTypeClick',['$0'],[[['serviceTypleList','',ikey]]]]]]]}}" class="{{[activeService==item.title?'innerView activeColor':'innerView']}}" bindtap="__e"><text class="innerText">{{item.title}}</text></view></view></block></view></view><view class="textAreaItemView"><view class="selectItemTitleView"><text class="selectItemTitle">服务需求:</text></view><view class="textAreaView"><textarea class="textArea" value="" placeholder="请输入服务需求"></textarea></view></view><view class="agreeView"><image class="agreeIcon" src mode data-event-opts="{{[['tap',[['agreeClick',['$0'],['isAgree']]]]]}}" bindtap="__e"></image><text class="agreeTitle">我已阅读并同意</text><text data-event-opts="{{[['tap',[['protocolClick']]]]}}" class="agreeProtocol" bindtap="__e">《服务协议》</text></view><view class="bottomView"><view data-event-opts="{{[['tap',[['recordClick']]]]}}" class="bottomLeftView" bindtap="__e"><text class="bottomTitle">下单记录</text></view><view data-event-opts="{{[['tap',[['confirmClick']]]]}}" class="bottomRightView" bindtap="__e"><text class="bottomTitle">立即下单</text></view></view></view> <view><view class="topView"><text class="topTitle">扳手会全国百万师傅为你服务</text></view><view class="itemView"><text class="itemTitle">联系人:</text><input class="itemInput" type value="{{name}}" placeholder="请输入联系人姓名" data-event-opts="{{[['input',[['__set_model',['','name','$event',[]]]]]]}}" bindinput="__e"/></view><view class="itemView"><text class="itemTitle">联系电话:</text><input class="itemInput" type value="{{phone}}" placeholder="请输入联系电话" data-event-opts="{{[['input',[['__set_model',['','phone','$event',[]]]]]]}}" bindinput="__e"/></view><view data-event-opts="{{[['tap',[['locationClick']]]]}}" class="itemView" bindtap="__e"><text class="itemTitle">定位位置:</text><view class="locationView"><image class="locationIcon" src mode></image><text class="locationText">{{location}}</text></view></view><view class="itemView"><text class="itemTitle">详细地址:</text><input class="itemInput" type value="{{address}}" placeholder="请输入详细地址" data-event-opts="{{[['input',[['__set_model',['','address','$event',[]]]]]]}}" bindinput="__e"/></view><view class="selectItemView"><view class="selectItemTitleView"><text class="selectItemTitle">产品类型:</text></view><view class="selectBackView"><block wx:for="{{productTypeList}}" wx:for-item="item" wx:for-index="ikey" wx:key="ikey"><view class="selectView"><view data-event-opts="{{[['tap',[['productTypeClick',['$0'],[[['productTypeList','',ikey]]]]]]]}}" class="{{[activeProduct==item.title?'innerView activeColor':'innerView']}}" bindtap="__e"><text class="innerText">{{item.title}}</text></view></view></block></view></view><view class="selectItemView"><view class="selectItemTitleView"><text class="selectItemTitle">服务类型:</text></view><view class="selectBackView"><block wx:for="{{serviceTypleList}}" wx:for-item="item" wx:for-index="ikey" wx:key="ikey"><view class="selectView"><view data-event-opts="{{[['tap',[['serviceTypeClick',['$0'],[[['serviceTypleList','',ikey]]]]]]]}}" class="{{[activeService==item.title?'innerView activeColor':'innerView']}}" bindtap="__e"><text class="innerText">{{item.title}}</text></view></view></block></view></view><view class="textAreaItemView"><view class="selectItemTitleView"><text class="selectItemTitle">服务需求:</text></view><view class="textAreaView"><textarea class="textArea" value="{{demandContent}}" placeholder="请输入服务需求" data-event-opts="{{[['input',[['__set_model',['','demandContent','$event',[]]]]]]}}" bindinput="__e"></textarea></view></view><view class="agreeView"><image class="agreeIcon" src mode data-event-opts="{{[['tap',[['agreeClick',['$0'],['isAgree']]]]]}}" bindtap="__e"></image><text class="agreeTitle">我已阅读并同意</text><text data-event-opts="{{[['tap',[['protocolClick']]]]}}" class="agreeProtocol" bindtap="__e">《服务协议》</text></view><view class="bottomView"><view data-event-opts="{{[['tap',[['recordClick']]]]}}" class="bottomLeftView" bindtap="__e"><text class="bottomTitle">下单记录</text></view><view data-event-opts="{{[['tap',[['confirmClick']]]]}}" class="bottomRightView" bindtap="__e"><text class="bottomTitle">立即下单</text></view></view></view>
\ No newline at end of file \ No newline at end of file
/* pages/index/record.wxss */
\ No newline at end of file
<view>下单成功页</view> <view><view class="textBackView u-m-t-50"><text class="productTypeText">{{"【"+productType+"】 订单正在撮合"}}</text></view><view class="textBackView u-m-t-80 u-row"><text class="productTypeText">已发给</text><text class="countText">{{count+"位"}}</text><text class="productTypeText">师傅</text></view><view class="textBackView u-m-t-50"><text class="productTypeText">师傅接单后会联系你!请保持电话畅通</text></view><view class="textBackView u-m-t-50 u-row"><text class="productTypeText">如有疑问!请致电客服:</text><text class="phoneText">{{phone}}</text></view><view data-event-opts="{{[['tap',[['noticeClick']]]]}}" class="noticeView" bindtap="__e"><text class="noticeText">及时了解订单动态,请订阅公众号通知</text></view><view class="bottomView"><view data-event-opts="{{[['tap',[['recordClick']]]]}}" class="bottomLeftView" bindtap="__e"><text class="bottomTitle">下单记录</text></view><view data-event-opts="{{[['tap',[['oneMoreClick']]]]}}" class="bottomRightView" bindtap="__e"><text class="bottomTitle">再下一单</text></view></view></view>
\ No newline at end of file \ No newline at end of file
/* pages/index/success.wxss */
\ No newline at end of file .textBackView{
width: 100%;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
}
.productTypeText{
font-size: 32rpx;
}
.countText{
font-size: 60rpx;
font-weight: bold;
}
.phoneText{
font-size: 32rpx;
text-decoration:underline;
}
.noticeView{
width: 100%;
margin-top: 500rpx;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
}
.noticeText{
color: #007AFF;
font-size: 24rpx;
}
.bottomView{
background-color: #FFFFFF;
width: 100%;
height: 110rpx;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-webkit-flex-direction: row;
flex-direction: row;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
border-top: 2rpx solid #999999;
position: fixed;
bottom: 0;
}
.bottomLeftView{
background-color: #FFFFFF;
width: 30%;
height: 100%;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
border-right: 2rpx solid #999999;
}
.bottomRightView{
background-color: #FFFFFF;
width: 70%;
height: 100%;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
}
.bottomTitle{
font-size: 32rpx;
}
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}
\ No newline at end of file
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}
\ No newline at end of file
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}
\ 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