24 changed files with 535 additions and 223 deletions
@ -0,0 +1,18 @@
|
||||
import request from "@/utils/request"; |
||||
import {host} from "@/config/host"; |
||||
|
||||
/** |
||||
* 权益卡订单 |
||||
* @param card_id |
||||
* @returns {Promise | Promise<unknown>} |
||||
*/ |
||||
export function cardOrder(card_id) |
||||
{ |
||||
return request({ |
||||
url:`${host}/order/create-cardorder`, |
||||
method: 'post', |
||||
data:{ |
||||
card_id |
||||
} |
||||
}) |
||||
} |
@ -0,0 +1,54 @@
|
||||
.wallpaper-container{ |
||||
position: fixed; |
||||
top:0; |
||||
left:0; |
||||
width:100%; |
||||
height:100vh; |
||||
padding:0 50rpx; |
||||
.login-container{ |
||||
position: relative; |
||||
width:100%; |
||||
height:100%; |
||||
align-items: center; |
||||
justify-content: center; |
||||
align-content: center; |
||||
.login-logo-container{ |
||||
position: absolute; |
||||
top:300rpx; |
||||
flex-direction: column; |
||||
//width:100%; |
||||
justify-content: center; |
||||
align-items: center; |
||||
.logo{ |
||||
//width:100%; |
||||
} |
||||
.login-title{ |
||||
justify-content: center; |
||||
} |
||||
} |
||||
.login-button-container{ |
||||
|
||||
width:100%; |
||||
.login-button{ |
||||
width:100%; |
||||
} |
||||
} |
||||
.privacy-container{ |
||||
position: absolute; |
||||
bottom:100rpx; |
||||
text-align: center; |
||||
} |
||||
.login-title{ |
||||
.title-background{ |
||||
position: relative; |
||||
bottom:12rpx; |
||||
width: 142rpx; |
||||
height: 12rpx; |
||||
background: linear-gradient(90deg, #FF9545 0%, rgba(255,149,69,0) 100%); |
||||
border-radius: 0rpx 0rpx 0rpx 0rpx; |
||||
opacity: 1; |
||||
z-index: -1; |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,212 @@
|
||||
<template> |
||||
<u-navbar |
||||
:title="title" |
||||
:auto-back="true" |
||||
left-icon-size="40rpx" |
||||
:safe-area-inset-top="true" |
||||
:placeholder="true" |
||||
bgColor="#ffffff" |
||||
></u-navbar> |
||||
|
||||
<view class="wallpaper-container row"> |
||||
<view class="login-container row"> |
||||
<view class="login-logo-container row"> |
||||
<view class="logo"> |
||||
<u-image mode="widthFix" width="188" height="188" :src="staticImage.loginLogo"></u-image> |
||||
</view> |
||||
<view class="login-title"> |
||||
<u-text text="欢迎登录宠物喂养" color="#020B18" size="36"></u-text> |
||||
<view class="title-background"></view> |
||||
</view> |
||||
</view> |
||||
<view class="login-button-container"> |
||||
<u-button |
||||
v-if="privateStatus" |
||||
type="success" |
||||
size="normal" |
||||
@getphonenumber="wxLogin" |
||||
open-type="getPhoneNumber" |
||||
shape="circle" |
||||
color="#45C55E" |
||||
height="88" |
||||
> |
||||
<!-- <u-icon name="weixin-fill" size="50" color="#fff" class="weixin-icon"></u-icon>--> |
||||
<u-text text="登录" color="#fff" size="32" align="center" prefix-icon="weixin-fill" :icon-style="{fontSize:'50rpx',color:'#ffffff',marginRight:'5rpx'}" custom-style="display:inline;"></u-text> |
||||
</u-button> |
||||
<u-button |
||||
v-else |
||||
type="success" |
||||
size="normal" |
||||
shape="circle" |
||||
color="#45C55E" |
||||
height="88" |
||||
@click="openPopup" |
||||
> |
||||
<!-- <u-icon name="weixin-fill" size="50" color="#fff" class="weixin-icon"></u-icon>--> |
||||
<u-text text="登录" color="#fff" size="32" align="center" prefix-icon="weixin-fill" :icon-style="{fontSize:'50rpx',color:'#ffffff',marginRight:'5rpx'}" custom-style="display:inline;"></u-text> |
||||
</u-button> |
||||
</view> |
||||
<view class="privacy-container row"> |
||||
<view class="text"> |
||||
<u-text text="登录/注册即视为你同意" color="#999999" size="24"></u-text> |
||||
</view> |
||||
<view class="text"> |
||||
<u-text text="《小程序隐私保护指引》" color="#178AF2" size="24" @click="openPrivacyContract"></u-text> |
||||
</view> |
||||
<!-- <view class="text">--> |
||||
<!-- <u-text text="和" color="#999999" size="24"></u-text>--> |
||||
<!-- </view>--> |
||||
<!-- <view class="text">--> |
||||
<!-- <u-text text="《隐私政策》" color="#178AF2" size="24"></u-text>--> |
||||
<!-- </view>--> |
||||
</view> |
||||
<!-- <u-button--> |
||||
<!-- type="success"--> |
||||
<!-- size="large"--> |
||||
<!-- @click="login"--> |
||||
<!-- >--> |
||||
<!-- <u-icon name="weixin-circle-fill" size="50" color="#fff" class="weixin-icon"></u-icon>--> |
||||
<!-- 登录--> |
||||
<!-- </u-button>--> |
||||
<uv-popup ref="popup" type="center" :is-mask-click="false" round="20" mode="bottom"> |
||||
<view class="popup-box" style="padding:40rpx"> |
||||
<view style="padding:20rpx 0;"> |
||||
<u-text bold text="用户隐私保护提示" color="#020b18" size="32"></u-text> |
||||
</view> |
||||
<view class="row"> |
||||
<view class=""> |
||||
<u-text color="#020b18" line-height="50" text="用户隐私保护提示" size="28"></u-text> |
||||
</view> |
||||
<view class=""> |
||||
<u-text color="#178AF2" size="28" line-height="50" text="《小程序隐私保护指引》" @click="openPrivacyContract"></u-text> |
||||
</view> |
||||
<view class=""> |
||||
<u-text color="#020b18" size="28" line-height="50" text="当您点击同意并开始使用产品服务时,即表示你已理解并同意该条款内容,该条款将对您产生法律约束力。如您拒绝,将无法更好的体验产品。"></u-text> |
||||
</view> |
||||
|
||||
|
||||
|
||||
</view> |
||||
<view class="row" style="padding:30rpx;"> |
||||
<view class="col-6" style="padding:15rpx;"> |
||||
<u-button @click="handleDisagree">拒绝</u-button> |
||||
</view> |
||||
|
||||
<view class="col-6" style="padding:15rpx;"> |
||||
<u-button id="agree-btn" open-type="agreePrivacyAuthorization" color="#45C55E" class="weui-btn agree" |
||||
@agreeprivacyauthorization="handleAgreePrivacyAuthorization">同意</u-button> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</uv-popup> |
||||
</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import { |
||||
imghost |
||||
} from '@/config/host.js' |
||||
import api from '@/utils/functions.js'; |
||||
import {appletLogin, testLogin, userDetail} from "@/api/user"; |
||||
|
||||
export default { |
||||
data() { |
||||
return { |
||||
title: ' 登录', |
||||
loading: true, |
||||
staticImage: { |
||||
bg: imghost + '/BG.png', |
||||
newIcon: imghost + '/new-icon.png', |
||||
loginLogo: imghost + '/login-logo.png', |
||||
}, |
||||
isTop: false, |
||||
fileList1:[], |
||||
userinfo:{}, |
||||
privateStatus:false |
||||
} |
||||
}, |
||||
onLoad() { |
||||
|
||||
}, |
||||
computed: { |
||||
api() { |
||||
return api |
||||
}, |
||||
}, |
||||
methods: { |
||||
login(){ |
||||
testLogin({ |
||||
user_id:1 |
||||
}).then((res) => { |
||||
uni.setStorageSync('token',res.data.token); |
||||
userDetail().then((res) => { |
||||
uni.setStorageSync('user',res.data); |
||||
this.$store.commit('userInfo',res.data); |
||||
}); |
||||
}); |
||||
}, |
||||
wxLogin(phoneCode) { |
||||
uni.login({ |
||||
success: ((res) => { |
||||
appletLogin(res.code).then(res => { |
||||
if(res.code === 200){ |
||||
uni.setStorageSync('token',res.data.token); |
||||
uni.setStorageSync('user',res.data.user); |
||||
this.$store.commit('userInfo', res.data.user); |
||||
uni.navigateBack({ |
||||
delta:1, |
||||
}) |
||||
}else{ |
||||
uni.$u.toast('登录失败'); |
||||
} |
||||
}).catch(err => { |
||||
uni.$u.toast('服务器错误'); |
||||
}) |
||||
}) |
||||
}); |
||||
}, |
||||
openPrivacyContract() { |
||||
uni.openPrivacyContract({}); |
||||
}, |
||||
handleAgreePrivacyAuthorization() { |
||||
this.$refs.popup.close(); |
||||
}, |
||||
openPopup(){ |
||||
this.$refs.popup.open(); |
||||
}, |
||||
handleDisagree(){ |
||||
this.$refs.popup.close(); |
||||
} |
||||
}, |
||||
onPageScroll(res) { |
||||
if (res.scrollTop <= 20) { |
||||
uni.$emit('isTop', true); |
||||
} else { |
||||
uni.$emit('isTop', false); |
||||
} |
||||
}, |
||||
created() { |
||||
|
||||
}, |
||||
mounted() { |
||||
uni.getPrivacySetting({ |
||||
success: res => { |
||||
console.log("是否需要授权:", res.needAuthorization, "隐私协议的名称为:", res.privacyContractName) |
||||
if (res.needAuthorization) { |
||||
this.privateStatus = false; |
||||
} else { |
||||
this.privateStatus = true; |
||||
} |
||||
}, |
||||
fail: () => { |
||||
}, |
||||
complete: () => {}, |
||||
}) |
||||
}, |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss"> |
||||
@import './components/index.scss'; |
||||
</style> |
@ -1 +1 @@
|
||||
<view class="app-wallpaper" style="{{'background-image:' + j}}"><view class="order-capsule-container row"><view class="order-capsule col-4 active"> 全部 </view><view class="order-capsule col-4"> 待服务 </view><view class="order-capsule col-4"> 已完成 </view></view><view class="order-screen-container row"><view class="order-screen active"> 全部 <view class="order-screen-active"><image mode="widthFix" class="img" src="{{a}}"/></view></view><view class="order-screen"> 明天 <view class="order-screen-active"><image mode="widthFix" class="img" src="{{b}}"/></view></view><view class="order-screen"> 后天 <view class="order-screen-active"><image mode="widthFix" class="img" src="{{c}}"/></view></view><view class="order-screen-time-container row"><view class="order-screen order-screen-time-title"> 05/06-08-03 </view><view class="order-screen order-screen-time-buttton-container"><view class="order-screen-time-buttton"> 时间 </view></view></view><view class="order-list-container"><view wx:for="{{d}}" wx:for-item="item" class="order-list-item"><view class="order-card-container row"><view class="order-card-container-background col-12"></view><view class="order-card-container-background-main row"><view class="order-card-col row" style="{{'background-image:' + i}}"><view class="order-card-left"><image class="img" src="{{e}}" mode="aspectFill"/></view><view class="order-card-right"><view class="order-card-title">{{item.a}}</view><view class="order-card-tag-container row"><view class="order-card-tag">刷毛</view><view class="order-card-tag">洗澡</view></view><view class="order-card-day"><text class="card-label">上门:</text>{{item.b}}</view><view class="order-card-pay-time"><text class="card-label">下单时间:</text>{{item.c}}</view></view><view class="order-card-bottom col-12 row"><view class="card-button"><mz-button wx:if="{{f}}" u-i="{{item.d}}" bind:__l="__l" u-p="{{f}}"></mz-button></view><view class="card-button" bindtap="{{h}}"><mz-button wx:if="{{g}}" u-i="{{item.e}}" bind:__l="__l" u-p="{{g}}"></mz-button></view></view></view></view></view></view></view></view></view> |
||||
<view class="app-wallpaper" style="{{'background-image:' + k}}"><view class="order-capsule-container row"><view class="order-capsule col-4 active"> 全部 </view><view class="order-capsule col-4"> 待服务 </view><view class="order-capsule col-4"> 已完成 </view></view><view class="order-screen-container row"><view class="order-screen active"> 全部 <view class="order-screen-active"><image mode="widthFix" class="img" src="{{a}}"/></view></view><view class="order-screen"> 明天 <view class="order-screen-active"><image mode="widthFix" class="img" src="{{b}}"/></view></view><view class="order-screen"> 后天 <view class="order-screen-active"><image mode="widthFix" class="img" src="{{c}}"/></view></view><view class="order-screen-time-container row"><view class="order-screen order-screen-time-title"> 05/06-08-03 </view><view class="order-screen order-screen-time-buttton-container"><view class="order-screen-time-buttton"> 时间 </view></view></view><view class="order-list-container"><view wx:for="{{d}}" wx:for-item="item" class="order-list-item"><view class="order-card-container row"><view class="order-card-container-background col-12"></view><view class="order-card-container-background-main row"><view class="order-card-col row" style="{{'background-image:' + j}}"><view class="order-card-left"><image class="img" src="{{e}}" mode="aspectFill"/></view><view class="order-card-right"><view class="order-card-title">{{item.a}}</view><view class="order-card-tag-container row"><view class="order-card-tag">刷毛</view><view class="order-card-tag">洗澡</view></view><view class="order-card-day"><text class="card-label">上门:</text>{{item.b}}</view><view class="order-card-pay-time"><text class="card-label">下单时间:</text>{{item.c}}</view></view><view class="order-card-bottom col-12 row"><view class="card-button" bindtap="{{g}}"><mz-button wx:if="{{f}}" u-i="{{item.d}}" bind:__l="__l" u-p="{{f}}"></mz-button></view><view class="card-button" bindtap="{{i}}"><mz-button wx:if="{{h}}" u-i="{{item.e}}" bind:__l="__l" u-p="{{h}}"></mz-button></view></view></view></view></view></view></view></view></view> |
@ -1 +1 @@
|
||||
<view class="user-background" style="{{'background-image:' + a}}"></view><view class="user-shadow" style="{{'background-image:' + b}}"></view><view class="app-wallpaper" style="{{'background-image:' + L}}"><view class="user-detail row"><view class="user-detail-avatar-container" bindtap="{{d}}"><image src="{{c}}" mode="aspectFill" class="img"/><view class="user-detail-avatar-border"></view></view><view class="user-detail-info"><view class="user-detail-title-container row"><image mode="widthFix" class="user-detail-img" src="{{e}}"/><view class="user-detail-title">{{f}}</view><view class="user-detail-coupons" style="{{'background-image:' + h}}" bindtap="{{i}}">{{g}}</view><view class="user-detail-id col-12">会员编号:{{j}}</view></view></view></view><view class="user-information .user-button-group-container"><view class="user-button-content"><image class="img gun1" src="{{k}}" mode="heightFix"/><view class="user-title-img"><image class="img" src="{{l}}" mode="heightFix"/></view><view class="user-button-group row"><view class="user-button col-4" bindtap="{{n}}"><image class="img" src="{{m}}" mode="aspectFit"/><view class="user-title">宝贝档案</view><view class="user-desc">2个萌宠</view></view><view class="user-button col-4" bindtap="{{p}}"><image class="img" src="{{o}}" mode="aspectFit"/><view class="user-title">信息档案</view><view class="user-desc">2个地址</view></view><view class="user-button col-4"><image class="img" src="{{q}}" mode="aspectFit"/><view class="user-title">喂养档案</view><view class="user-desc">2个档案</view></view></view></view><view class="user-button-group-background"><view class="user-button-group-container-background-color"></view><view class="user-button-group-container-background-border"></view></view></view><view class="user-baby-log .user-button-group-container"><view class="user-button-content"><image class="img gun2" src="{{r}}" mode="heightFix"/><view class="user-title-img row"><image class="img" src="{{s}}" mode="heightFix"/><view class="shop-car-container"><image class="img shop-car" src="{{t}}" mode="heightFix"/><view class="shop-car-number">2</view></view></view><view class="user-button-group row"><view class="user-button col-6" bindtap="{{w}}"><image class="img" src="{{v}}" mode="aspectFit"/><view class="user-title">待服务</view></view><view class="user-button col-6" bindtap="{{y}}"><image class="img" src="{{x}}" mode="aspectFit"/><view class="user-title">已完成</view></view></view></view><view class="user-button-group-background"><view class="user-button-group-container-background-color"></view><view class="user-button-group-container-background-border"></view></view></view><view class="user-big-service .user-button-group-container"><view class="user-button-content"><image class="img gun2" src="{{z}}" mode="heightFix"/><view class="user-title-img"><image class="img" src="{{A}}" mode="heightFix"/></view><view class="user-button-group row"><view class="user-button col-6" bindtap="{{C}}"><image class="img" src="{{B}}" mode="aspectFit"/><view class="user-title">待服务</view></view><view class="user-button col-6" bindtap="{{E}}"><image class="img" src="{{D}}" mode="aspectFit"/><view class="user-title">已完成</view></view></view></view><view class="user-button-group-background"><view class="user-button-group-container-background-color"></view><view class="user-button-group-container-background-border"></view></view></view><view class="user-more .user-button-group-container"><view class="user-button-content"><image class="img gun2" src="{{F}}" mode="heightFix"/><view class="user-title-img"><image class="img" src="{{G}}" mode="heightFix"/></view><view class="user-button-group row"><view class="user-button col-3"><image class="img" src="{{H}}" mode="aspectFit"/><view class="user-title">在线沟通</view></view><view class="user-button col-3"><image class="img" src="{{I}}" mode="aspectFit"/><view class="user-title">隐私协议</view></view><view class="user-button col-3"><image class="img" src="{{J}}" mode="aspectFit"/><view class="user-title">意见反馈</view></view><view class="user-button col-3"><image class="img" src="{{K}}" mode="aspectFit"/><view class="user-title">关于我们</view></view></view></view><view class="user-button-group-background"><view class="user-button-group-container-background-color"></view><view class="user-button-group-container-background-border"></view></view></view></view> |
||||
<view class="user-background" style="{{'background-image:' + a}}"></view><view class="user-shadow" style="{{'background-image:' + b}}"></view><view class="app-wallpaper" style="{{'background-image:' + P}}"><view class="user-detail row"><view class="user-detail-avatar-container" bindtap="{{d}}"><image src="{{c}}" mode="aspectFill" class="img"/><view class="user-detail-avatar-border"></view></view><view class="user-detail-info"><view class="user-detail-title-container row"><image mode="widthFix" class="user-detail-img" src="{{e}}"/><view class="user-detail-title">{{f}}</view><view class="user-detail-coupons" style="{{'background-image:' + h}}" bindtap="{{i}}">{{g}}</view><view class="user-detail-id col-12">会员编号:{{j}}</view></view></view></view><view class="user-information .user-button-group-container"><view class="user-button-content"><image class="img gun1" src="{{k}}" mode="heightFix"/><view class="user-title-img"><image class="img" src="{{l}}" mode="heightFix"/></view><view class="user-button-group row"><view class="user-button col-4" bindtap="{{o}}"><image class="img" src="{{m}}" mode="aspectFit"/><view class="user-title">宝贝档案</view><view class="user-desc">{{n}}个萌宠</view></view><view class="user-button col-4" bindtap="{{r}}"><image class="img" src="{{p}}" mode="aspectFit"/><view class="user-title">信息档案</view><view class="user-desc">{{q}}个地址</view></view><view class="user-button col-4"><image class="img" src="{{s}}" mode="aspectFit"/><view class="user-title">喂养档案</view><view class="user-desc">{{t}}个档案</view></view></view></view><view class="user-button-group-background"><view class="user-button-group-container-background-color"></view><view class="user-button-group-container-background-border"></view></view></view><view class="user-baby-log .user-button-group-container"><view class="user-button-content"><image class="img gun2" src="{{v}}" mode="heightFix"/><view class="user-title-img row"><image class="img" src="{{w}}" mode="heightFix"/><view class="shop-car-container"><image class="img shop-car" src="{{x}}" mode="heightFix"/><view class="shop-car-number">{{y}}</view></view></view><view class="user-button-group row"><view class="user-button col-6" bindtap="{{A}}"><image class="img" src="{{z}}" mode="aspectFit"/><view class="user-title">待服务</view></view><view class="user-button col-6" bindtap="{{C}}"><image class="img" src="{{B}}" mode="aspectFit"/><view class="user-title">已完成</view></view></view></view><view class="user-button-group-background"><view class="user-button-group-container-background-color"></view><view class="user-button-group-container-background-border"></view></view></view><view class="user-big-service .user-button-group-container"><view class="user-button-content"><image class="img gun2" src="{{D}}" mode="heightFix"/><view class="user-title-img"><image class="img" src="{{E}}" mode="heightFix"/></view><view class="user-button-group row"><view class="user-button col-6" bindtap="{{G}}"><image class="img" src="{{F}}" mode="aspectFit"/><view class="user-title">待服务</view></view><view class="user-button col-6" bindtap="{{I}}"><image class="img" src="{{H}}" mode="aspectFit"/><view class="user-title">已完成</view></view></view></view><view class="user-button-group-background"><view class="user-button-group-container-background-color"></view><view class="user-button-group-container-background-border"></view></view></view><view class="user-more .user-button-group-container"><view class="user-button-content"><image class="img gun2" src="{{J}}" mode="heightFix"/><view class="user-title-img"><image class="img" src="{{K}}" mode="heightFix"/></view><view class="user-button-group row"><view class="user-button col-3"><image class="img" src="{{L}}" mode="aspectFit"/><view class="user-title">在线沟通</view></view><view class="user-button col-3"><image class="img" src="{{M}}" mode="aspectFit"/><view class="user-title">隐私协议</view></view><view class="user-button col-3"><image class="img" src="{{N}}" mode="aspectFit"/><view class="user-title">意见反馈</view></view><view class="user-button col-3"><image class="img" src="{{O}}" mode="aspectFit"/><view class="user-title">关于我们</view></view></view></view><view class="user-button-group-background"><view class="user-button-group-container-background-color"></view><view class="user-button-group-container-background-border"></view></view></view></view> |
Loading…
Reference in new issue