jiazhipeng 7 months ago
parent
commit
959ef02e6e
  1. 176
      pages/login/login.vue
  2. 26
      pages/user/user.vue
  3. 2
      static/js/request.js
  4. 2
      subPackages/user/privacy.vue

176
pages/login/login.vue

@ -1,26 +1,40 @@
<template>
<view class="bg">
<image src="https://static.ticket.sz-trip.com/yandu/images/user/logo.png" class="logo"></image>
<view :class="['btn', 'flex-center', {'btns': flag}]" @click="getUserInfo()">快捷登录</view>
<image src="https://static.ticket.sz-trip.com/yandu/images/user/tips.png" class="tips" v-show="!flag"></image>
<footer class="flex-between">
<view @click="flag = !flag" :style="{border: flag ? 'none' : ''}"><image src="https://static.ticket.sz-trip.com/yandu/images/user/dui.png" v-show="flag"></image></view>
我已阅读并同意 <span @click="gotoPath('/subPackages/user/privacy')">用户服务协议隐私政策</span>
</footer>
<div style="padding-top: 88rpx;">
<div class="login-tip">玉见昆山 申请获得</div>
<div class="login-tip2">以下权限</div>
<div class="login-tip-box">
<text>获得你的公开信息昵称头像地区及性别</text>
</div>
<div class="btn-box">
<button bindtap="cancel" type="default" @click="redirectIndex()">取消</button>
<button type="primary" @click="getUserInfo()">同意</button>
</div>
<div class="flex-center article-box">
<radio-group @change="agree">
<radio value="1" :checked="checked" style="transform:scale(0.7)"></radio>
</radio-group>
<div>同意<text @click="gotoInfo">用户服务协议隐私政策</text></div>
</div>
<uni-popup ref="popup" type="bottom" background-color="#fff">
<button type="default" open-type="getPhoneNumber" @getphonenumber="decryptPhoneNumber" style="width: 100%;height: 12vh;line-height: 12vh;">点击授权手机号</button>
</uni-popup>
</view>
</div>
</template>
<script>
export default {
name: "login",
data() {
return {
flag: false
checked: false,
};
},
onLoad(options) {
//
if (options.needAuth == 1) {
setTimeout(()=>{
this.$refs.popup.open('bottom')
},400)
}
},
methods: {
@ -44,10 +58,28 @@
})
}
},
gotoInfo() {
uni.navigateTo({
url: '/subPackages/user/privacy'
})
},
agree(data) {
this.checked = true
},
redirectIndex() {
uni.switchTab({
url: '/pages/index/index',
})
},
getUserInfo() {
if(!this.flag) return;
var _this = this
if (!_this.checked) {
uni.showToast({
title: '请先勾选同意《用户服务协议》、《隐私政策》',
icon: 'none'
})
return
}
uni.login({
provider: 'weixin',
success(loginRes) {
@ -83,73 +115,69 @@
},
})
}
}
},
}
</script>
<style lang="scss" scoped>
.bg {
height: 100vh;
<style>
.login-tip {
font-size: 28rpx;
margin: 0 60rpx;
margin-top: 40rpx;
}
.logo {
width: 186rpx;
height: 132rpx;
position: absolute;
top: 79rpx;
left: 50%;
transform: translate(-50%, 0);
.login-tip2 {
font-size: 44rpx;
margin: 0rpx 60rpx;
margin-top: 20rpx;
font-weight: 400;
}
.btn {
width: 667rpx;
height: 93rpx;
background: #CCCCCC;
border-radius: 20rpx;
font-weight: 500;
font-size: 35rpx;
color: #FFFFFF;
position: absolute;
top: 301rpx;
left: 50%;
transform: translate(-50%,0)
.login-tip-box {
display: flex;
align-items: flex-start;
margin: 0 60rpx;
font-size: 28rpx;
margin-top: 40rpx;
line-height: 40rpx;
}
.btns {
background: #71B580;
.login-tip-box .icon-gou1 {
line-height: 80rpx;
margin-top: -20rpx;
margin-right: 30rpx;
color: #666;
}
.tips {
.btn-box {
display: flex;
position: absolute;
left: 54rpx;
bottom: 155rpx;
width: 293.33rpx;
height: 72.67rpx;
bottom: 100rpx;
left: 0;
right: 0;
}
footer {
padding: 0 68rpx;
.btn-box button {
width: 400rpx;
}
.article-box {
position: absolute;
bottom: 94rpx;
font-weight: 500;
font-size: 25rpx;
color: #333333;
width: 100%;
view {
width: 48rpx;
height: 48rpx;
border-radius: 50%;
overflow: hidden;
border: 1rpx solid #666666;
image {
width: 100%;
height: 100%;
}
}
span {
color: rgba(113, 181, 128, 1);
}
left: 0;
right: 0;
justify-content: center;
font-size: 24rpx;
color: #1aad19;
bottom: 40rpx;
}
.article-box .iconfont {
margin-right: 10rpx;
font-size: 26rpx;
}
.article-box text {
border-bottom: 1px solid;
}
</style>
</style>

26
pages/user/user.vue

@ -5,7 +5,7 @@
<view class="topBox" @click="gotoProfile">
<view class="avatar-box flex-center">
<image :src="showImg(userInfo.avatar)" mode="aspectFill" class="headImg" v-if="userInfo.avatar"></image>
<image src="https://static.ticket.sz-trip.com/yandu/images/user/grxx.png" mode="aspectFill"
<image src="https://changshu.js-dyyj.com/uploads/20250326/516242619f0772bee371a60684618c01.png" mode="aspectFill"
class="headImg" v-else></image>
</view>
<view class="username" v-if="userInfo.nickname">{{userInfo.nickname}}</view>
@ -16,7 +16,7 @@
<navigator :url="'/subPackages/order/trades'" class="moreBox flex-between">
我的订单
<span class="flex-between">全部订单 <img
src="https://static.ticket.sz-trip.com/yandu/images/user/rightIcon.png" alt=""></span>
src="https://changshu.js-dyyj.com/uploads/20250326/94ba23adacc8c05e3739e4b31a5039c1.png" alt=""></span>
</navigator>
<view class="flex-around" style="margin-top: 20rpx;">
@ -87,27 +87,27 @@
nowDateTime: '', //
userInfo: {},
orderList: [{
src: 'https://static.ticket.sz-trip.com/yandu/images/user/dfk.png',
src: 'https://changshu.js-dyyj.com/uploads/20250326/743ee959b04b9a1d2fce932271c06839.png',
title: '待付款',
status: 'WAIT_PAYMENT'
},
{
src: 'https://static.ticket.sz-trip.com/yandu/images/user/dfh.png',
src: 'https://changshu.js-dyyj.com/uploads/20250326/cb69c4cefdaa5f32dbb24d9157c9096a.png',
title: '待发货',
status: 'PAYMENT_SUCCESSFULLY'
},
{
src: 'https://static.ticket.sz-trip.com/yandu/images/user/dsh.png',
src: 'https://changshu.js-dyyj.com/uploads/20250326/52cf111a61d5be4c1c89eeea56dce450.png',
title: '待收货',
status: 'POST'
},
// {
// src: 'https://static.ticket.sz-trip.com/yandu/images/user/dpj.png',
// src: 'https://changshu.js-dyyj.com/uploads/20250326/3f13d3a10dd0f88e764e3ddf1157c108.png',
// title: '',
// status: 'WAIT_COMMENT'
// },
{
src: 'https://static.ticket.sz-trip.com/yandu/images/user/tksh.png',
src: 'https://changshu.js-dyyj.com/uploads/20250326/d4565ea4e7059274e086f109eb94467a.png',
title: '退款/售后',
status: 'WAIT_REFUND,REFUND_SUCCESS,REFUND_REFUSAL,REFUND_ERROR,REFUND_PART'
},
@ -120,31 +120,31 @@
// isShow: true
// },
{
src: 'https://static.ticket.sz-trip.com/yandu/images/user/yhq.png',
src: 'https://changshu.js-dyyj.com/uploads/20250326/961248c32dacf3f1ce7df77a4e36f547.png',
title: '优惠券',
path: '/subPackages/user/coupon',
isShow: true
},
{
src: 'https://static.ticket.sz-trip.com/yandu/images/user/cyxx.png',
src: 'https://changshu.js-dyyj.com/uploads/20250326/1132d38a217a1f47a13085c3f6b0e101.png',
title: '常用信息',
path: '/subPackages/user/travelerList',
isShow: true
},
{
src: 'https://static.ticket.sz-trip.com/yandu/images/user/lyzx.png',
src: 'https://changshu.js-dyyj.com/uploads/20250326/2d2eb26f9a9eddd8c5d0a55832f7bf8c.png',
title: '旅游咨询',
path: '',
isShow: true
},
{
src: 'https://static.ticket.sz-trip.com/yandu/images/user/tsjb.png',
src: 'https://changshu.js-dyyj.com/uploads/20250326/3e977f62b6cbfeec5a17d945b96b8c8c.png',
title: '投诉建议',
path: '/subPackages/service/service',
isShow: true
},
{
src: 'https://static.ticket.sz-trip.com/yandu/images/user/ysgl.png',
src: 'https://changshu.js-dyyj.com/uploads/20250326/f408663f7251085771d83ff13420eb33.png',
title: '隐私管理',
path: '/subPackages/user/privacy',
isShow: true
@ -328,7 +328,7 @@
.bg {
min-height: 100vh;
overflow-x: hidden;
background: url('https://static.ticket.sz-trip.com/yandu/images/user/topBg.png') no-repeat;
background: url('https://changshu.js-dyyj.com/uploads/20250326/ccc795773b7244a8f2512c9cc3e956db.png') no-repeat;
background-size: 100%;
background-color: #F7F7F7;
padding-bottom: 100rpx;

2
static/js/request.js

@ -2,7 +2,7 @@ import Vue from 'vue';
import store from '@/store';
// 定义 API URL
const CS_API_URL = 'https://api.cloud.sz-trip.com';
const CS_API_URL = 'https://changshu.js-dyyj.com';
const JDSZ_API_URL = 'https://api.cloud.sz-trip.com';
const NEWAPIURL = process.env.NODE_ENV === 'development' ? CS_API_URL : CS_API_URL;

2
subPackages/user/privacy.vue

@ -11,7 +11,7 @@
export default{
data(){
return {
list:[{name:'用户协议',id:'10001'},{name:'隐私协议',id:'9999'},{name:'个人信息收集清单',id:'9997'}],
list:[{name:'用户协议',id:'10001'},{name:'隐私协议',id:'9999'},{name:'个人信息收集清单',id:'10202 '}],
}
},
onShow() {

Loading…
Cancel
Save