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

26
pages/user/user.vue

@ -5,7 +5,7 @@
<view class="topBox" @click="gotoProfile"> <view class="topBox" @click="gotoProfile">
<view class="avatar-box flex-center"> <view class="avatar-box flex-center">
<image :src="showImg(userInfo.avatar)" mode="aspectFill" class="headImg" v-if="userInfo.avatar"></image> <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> class="headImg" v-else></image>
</view> </view>
<view class="username" v-if="userInfo.nickname">{{userInfo.nickname}}</view> <view class="username" v-if="userInfo.nickname">{{userInfo.nickname}}</view>
@ -16,7 +16,7 @@
<navigator :url="'/subPackages/order/trades'" class="moreBox flex-between"> <navigator :url="'/subPackages/order/trades'" class="moreBox flex-between">
我的订单 我的订单
<span class="flex-between">全部订单 <img <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> </navigator>
<view class="flex-around" style="margin-top: 20rpx;"> <view class="flex-around" style="margin-top: 20rpx;">
@ -87,27 +87,27 @@
nowDateTime: '', // nowDateTime: '', //
userInfo: {}, userInfo: {},
orderList: [{ orderList: [{
src: 'https://static.ticket.sz-trip.com/yandu/images/user/dfk.png', src: 'https://changshu.js-dyyj.com/uploads/20250326/743ee959b04b9a1d2fce932271c06839.png',
title: '待付款', title: '待付款',
status: 'WAIT_PAYMENT' 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: '待发货', title: '待发货',
status: 'PAYMENT_SUCCESSFULLY' 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: '待收货', title: '待收货',
status: 'POST' 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: '', // title: '',
// status: 'WAIT_COMMENT' // 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: '退款/售后', title: '退款/售后',
status: 'WAIT_REFUND,REFUND_SUCCESS,REFUND_REFUSAL,REFUND_ERROR,REFUND_PART' status: 'WAIT_REFUND,REFUND_SUCCESS,REFUND_REFUSAL,REFUND_ERROR,REFUND_PART'
}, },
@ -120,31 +120,31 @@
// isShow: true // 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: '优惠券', title: '优惠券',
path: '/subPackages/user/coupon', path: '/subPackages/user/coupon',
isShow: true 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: '常用信息', title: '常用信息',
path: '/subPackages/user/travelerList', path: '/subPackages/user/travelerList',
isShow: true 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: '旅游咨询', title: '旅游咨询',
path: '', path: '',
isShow: true 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: '投诉建议', title: '投诉建议',
path: '/subPackages/service/service', path: '/subPackages/service/service',
isShow: true 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: '隐私管理', title: '隐私管理',
path: '/subPackages/user/privacy', path: '/subPackages/user/privacy',
isShow: true isShow: true
@ -328,7 +328,7 @@
.bg { .bg {
min-height: 100vh; min-height: 100vh;
overflow-x: hidden; 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-size: 100%;
background-color: #F7F7F7; background-color: #F7F7F7;
padding-bottom: 100rpx; padding-bottom: 100rpx;

2
static/js/request.js

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

2
subPackages/user/privacy.vue

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

Loading…
Cancel
Save