agreement.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <view class="content">
  3. <view class="page-content">
  4. <view class="page-care" v-if="!hideZysx">
  5. <view class="title">-注意事项-</view>
  6. <u-image width="750rpx" height="1200rpx" mode="aspectFit" src="/static/img/zysx.png"></u-image>
  7. </view>
  8. <view class="page-care agreement">
  9. <view class="title">-服务协议-</view>
  10. </view>
  11. </view>
  12. <view class="footer" @click="goBack" v-if="!hideZysx">
  13. 我已阅读并同意无人洗车《注意事项及服务协议》
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. export default {
  19. components: {
  20. },
  21. data() {
  22. return {
  23. hideZysx: false
  24. }
  25. },
  26. onLoad(option) {
  27. // 从个人中心打开的
  28. if(option.fromPage == 'usercenter'){
  29. this.hideZysx = true
  30. uni.setNavigationBarTitle({
  31. title: "服务协议"
  32. })
  33. }
  34. },
  35. methods: {
  36. // 点击已阅读返回上一页
  37. goBack () {
  38. // 出发已阅读事件
  39. uni.$emit('read',{msg:'read'})
  40. uni.navigateBack()
  41. }
  42. }
  43. }
  44. </script>
  45. <style lang="scss">
  46. page{
  47. width: 100%;
  48. height: 100%;
  49. }
  50. .content{
  51. padding: 0;
  52. width: 100%;
  53. height: 100%;
  54. display: flex;
  55. flex-direction: column;
  56. .page-content{
  57. flex: 1;
  58. overflow-y: scroll;
  59. }
  60. .title{
  61. font-size: 30rpx;
  62. font-weight: 600;
  63. }
  64. .page-care{
  65. width: 100%;
  66. display: flex;
  67. flex-direction: column;
  68. align-items: center;
  69. padding-top: 20rpx;
  70. }
  71. .footer{
  72. width: 100%;
  73. text-align: center;
  74. line-height: 100rpx;
  75. background-color: rgb(255,0,0);
  76. color: #fff;
  77. }
  78. }
  79. </style>