chenkainan 4 months ago
parent
commit
93e4139976
  1. 11
      package-lock.json
  2. 63
      pages.json
  3. 77
      pages/coupon/coupon.vue
  4. 655
      pages/user/user.vue
  5. 2
      static/js/CommonFunction.js
  6. 196
      static/js/mmmm-image-tools/index.js
  7. 11
      static/js/mmmm-image-tools/package.json
  8. 8
      subPackages/line/orders.vue
  9. 424
      subPackages/order/orderCoupon.vue
  10. 678
      subPackages/order/trades.vue
  11. 6
      subPackages/ticket/order.vue
  12. 89
      subPackages/user/changeNickname.vue
  13. 494
      subPackages/user/coupon.vue
  14. 168
      subPackages/user/logout.vue
  15. 417
      subPackages/user/myAddressAdd.vue
  16. 272
      subPackages/user/myContactsAdd.vue
  17. 30
      subPackages/user/privacyInfo.vue
  18. 408
      subPackages/user/profile.vue
  19. 357
      subPackages/user/travelerList.vue
  20. 2
      uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue

11
package-lock.json

@ -0,0 +1,11 @@
{
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"ydui-district": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/ydui-district/-/ydui-district-1.1.0.tgz",
"integrity": "sha512-MBhvfaR5Gkn6MUmEnrH1A7IFB5igALuDgtIF+gz3dRwNwW9+KOmih7z+xZFfGluMsEbWaT7C3lWOckYsLZQnFg=="
}
}
}

63
pages.json

@ -10,7 +10,8 @@
{
"path": "pages/user/user",
"style": {
"navigationBarTitleText": "uni-app"
"navigationBarTitleText": "我的",
"navigationStyle": "custom"
}
},
{
@ -90,6 +91,66 @@
"style" : {
"navigationBarTitleText" : "填写订单"
}
},
{
"path" : "user/profile",
"style" : {
"navigationBarTitleText" : "个人信息"
}
},
{
"path": "user/changeNickname",
"style": {
"navigationBarTitleText": "修改姓名"
}
},
{
"path": "user/logout",
"style": {
"navigationBarTitleText": "注销账号"
}
},
{
"path": "user/coupon",
"style": {
"navigationBarTitleText": "优惠券"
}
},
{
"path": "order/orderCoupon",
"style": {
"navigationBarTitleText": "选择优惠券"
}
},
{
"path": "user/travelerList",
"style": {
"navigationBarTitleText": "常用信息"
}
},
{
"path": "user/myContactsAdd",
"style": {
"navigationBarTitleText": "联系人信息"
}
},
{
"path": "user/myAddressAdd",
"style": {
"navigationBarTitleText": "收货地址"
}
},
{
"path": "user/privacyInfo",
"style": {
"navigationBarTitleText": "详情"
}
},
{
"path": "order/trades",
"style": {
"navigationBarTitleText": "全部订单"
}
}
]
}],

77
pages/coupon/coupon.vue

@ -1,5 +1,15 @@
<template>
<view class="bg bg-padding">
<image :src="headImg" class="topImg" mode="aspectFill"></image>
<view v-for="(item,index) in list" :key="index" class="item" @click="gotoPath(item.ext_link)">
<image :src="item.head_img" class="img"></image>
<view class="content flex-center">
<view class="title text-overflow">{{item.title}}</view>
<view class="btn">点击领取</view>
</view>
</view>
<CustomTabBar :currentTab="1" />
</view>
</template>
@ -12,20 +22,77 @@
},
data() {
return {
headImg: '',
list: []
}
},
onLoad() {
mounted() {
//
this.getHeadImg(2370).then(res => {this.headImg = res})
this.getList()
},
methods: {
getList() {
this.Post({
limit: 100,
page: 1,
class_id: 143,
type: 2,
}, '/api/multimedia/media_list').then(res => {
if (res) {
this.list = res.data.data
}
})
}
}
}
</script>
<style>
<style lang="scss" scoped>
.bg {
min-height: 100vh;
background: rgba(237, 245, 220, 1);
}
.topImg {
width: 100%;
height: 386.67rpx;
}
.item {
width: 697rpx;
height: 417rpx;
background: #FFFFFF;
border-radius: 13rpx;
margin: 32rpx auto 0;
.img {
width: 697rpx;
height: 300rpx;
border-radius: 13rpx 13rpx 0rpx 0rpx;
display: block;
}
.content {
height: 117rpx;
.title {
width: 500rpx;
font-weight: bold;
font-size: 31rpx;
color: #111111;
}
.btn {
width: 135rpx;
line-height: 47rpx;
background: linear-gradient(90deg, #00DB1F, #0A831C);
border-radius: 8rpx;
text-align: center;
font-weight: bold;
font-size: 24rpx;
color: #FFFFFF;
}
}
}
</style>

655
pages/user/user.vue

@ -1,5 +1,86 @@
<template>
<view class="content bg-padding">
<view class="bg bg-padding">
<view class="topBox flex-between" @click="gotoProfile">
<image src="https://static.ticket.sz-trip.com/shiweisuzhou/images/user/topIcon.png" class="topIcon"></image>
<view class="flex-center" style="position: relative;">
<view class="avatar-box">
<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"
class="headImg" v-else></image>
</view>
<view class="username" v-if="userInfo.nickname">{{userInfo.nickname}}</view>
<view class="username" v-else>请登录/注册 ></view>
</view>
<view class="top-right" v-if="userInfo.nickname">
个人信息 <image src="https://static.ticket.sz-trip.com/tongli/images/user/rightIcon1.png" mode=""></image>
</view>
</view>
<view class="orderBox">
<navigator :url="'/subPackages/order/trades'" class="moreBox flex-between">
我的订单
<span class="flex-between">
全部订单
<image src="https://static.ticket.sz-trip.com/tongli/images/user/rightIcon1.png" mode=""></image>
</span>
</navigator>
<view class="flex-around" style="margin-top: 20rpx;flex-wrap: wrap;justify-content: flex-start;">
<view class="orderItem" v-for="(item,index) in orderList" :key="index" @click="goTrades(item)">
<img :src="item.src" alt="">
<view>{{item.title}}</view>
</view>
</view>
<!-- 待付款轮播 -->
<!-- <swiper class="my-swipe" :autoplay="3000" indicator-color="white" v-if="dfkList && dfkList.length>0" circular>
<swiper-item v-for="(item,index) in dfkList" :key="item.id">
<div class="dfkBox" @click="goToOrderDetail(item)">
<image :src="showImg(item.order_child[0].specifications_image)" mode="aspectFill"></image>
<div class="contentBox">
<div style="width:300rpx;">
<div style="font-size: 27rpx;margin-bottom: 10rpx;">等待付款 </div>
<div style="display: flex;color: #8A8A8A;font-size: 27rpx;">剩余时间<uni-countdown class="countdown" @timeup="timeup(index)" :show-day="false" :hour="differTimeList[index].slice(0,2)" :minute="differTimeList[index].slice(3,5)" :second="differTimeList[index].slice(6,8)"/></div>
</div>
<div class="orderBtn" @click.stop="setOrderId(item.order_id)">去支付</div>
</div>
</div>
</swiper-item>
</swiper> -->
</view>
<view class="cygj">
<view v-for="(item,index) in cyList" :key="index"
@click="gotoUrl(item.path,index)" v-if="item.isShow">
<button id="contact" class="cyItem flex-between" open-type="contact" bindcontact="handleContact" session-from="sessionFrom" v-if="index == 2">
<view class="flex-center">
<img src="https://static.ticket.sz-trip.com/shiweisuzhou/images/user/lxkf.png" class="headIcon">
联系我们
</view>
<img src="https://static.ticket.sz-trip.com/dongtai/images/user/rightIcon-gray.png" class="rightIcon">
</button>
<view class="cyItem flex-between" v-else>
<view class="flex-center">
<img :src="item.src" class="headIcon">
{{item.title}}
</view>
<img src="https://static.ticket.sz-trip.com/yandu/images/user/rightIcon-gray.png" class="rightIcon">
</view>
</view>
</view>
<!-- 旅游咨询弹框 -->
<uni-popup ref="popup" type="center">
<view class="consult-popup">
即将拨打客服电话
<view class="consult-subtitle">服务时间周一至周五<br>8:30-11:3014:30-18:00</view>
<view class="consult-btns">
<view @click="$refs.popup.close()">取消</view>
<view @click="clickPhone('0515-69186109')">确定</view>
</view>
</view>
</uni-popup>
<CustomTabBar :currentTab="4" />
</view>
</template>
@ -12,23 +93,585 @@
},
data() {
return {
dfkList: [],
differTimeList: [],
nowDateTime: '', //
userInfo: {},
orderList: [{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/dfki.png',
title: '待付款',
status: 'WAIT_PAYMENT'
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/dfh.png',
title: '待发货',
status: 'WAIT_POST'
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/dsy.png',
title: '待使用',
status: ''
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/dcx.png',
title: '待出行',
status: 'WAIT_USE'
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/dsh.png',
title: '待收货',
status: 'WAIT_DELIVERY'
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/tksh.png',
title: '退款/售后',
status: 'NEED_REFUND'
},
],
cyList: [
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/yhq.png',
title: '优惠券',
path: '/subPackages/user/coupon',
isShow: true
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/cxr.png',
title: '出行人',
path: '/subPackages/user/travelerList?showType=0',
isShow: true
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/lxwm.png',
title: '联系客服',
path: '',
isShow: true
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/shdz.png',
title: '收货地址',
path: '/subPackages/user/travelerList?showType=1',
isShow: true
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/shhx.png',
title: '商户核销',
path: '',
isShow: true
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/yhxy.png',
title: '用户协议',
path: '/subPackages/user/privacyInfo?id=9',
isShow: true
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/yszc.png',
title: '隐私管理',
path: '/subPackages/user/privacyInfo?id=12',
isShow: true
}
],
}
},
onLoad() {
onShow() {
// token
this.Post({
token: ''
},'/api/uservice/user/getMyInfo').then(res => {
this.$store.commit('changeUserInfo', res.data);
})
this.userInfo = (uni.getStorageSync('userInfo') && JSON.parse(uni.getStorageSync('userInfo'))) || this.$store.state.user.userInfo || {}
console.log(this.userInfo)
uni.setStorageSync('isFlag', true)
// this.dfkList = []
// this.nowDateTime = parseInt(new Date().getTime() / 1000)
// this.Post({}, "/api/user/userInfo").then((res) => {
// if (res.data) {
// this.userInfo = res.data;
// // this.getDfk()
// //
// this.Post({},'/api/merchants/is_merchant').then(res => {
// this.cyList[6].isShow = res.data
// })
// }
// });
},
//
onTabItemTap() {
this.qdTracker('navButtonClick', {buttonName: '我的', buttonSort: '3'})
},
methods: {
//
gotoProfile() {
// token
if(this.userInfo.token) {
uni.navigateTo({
url: '/subPackages/user/profile'
})
}else {
uni.navigateTo({
url: '/pages/login/login'
})
}
},
timeup(index) {
// return this.dfkList.splice(index,1)
},
setOrderId(id) {
let that = this;
that.orderId = id;
that.Post({
order_id: id,
type: "miniprogram",
platform: 'miniprogram'
},
'/api/pay/unify'
).then(res => {
if (res.data) {
uni.requestPayment({
nonceStr: res.data.nonceStr,
package: res.data.package,
paySign: res.data.paySign,
signType: res.data.signType,
timeStamp: res.data.timeStamp
});
}
});
},
//
getDfk() {
this.differTimeList = []
let params = {
offset: this.dfkList.length,
limit: 10,
status: 'WAIT_PAYMENT',
}
this.Post(params, '/api/order/orderList').then(res => {
this.isLoading = false
if (res) {
this.dfkList = [...this.dfkList, ...res.data]
this.dfkList.forEach(item => {
// ,-differTimeList
let del;
if (moment(item.close_time).diff(moment()) > 0) {
del = moment.utc(moment(item.close_time).diff(moment())).format('HH:mm:ss')
} else {
del = '00:00:00'
}
this.differTimeList.push(del)
})
console.log(this.differTimeList);
console.log('this.differTimeList:' + this.differTimeList[0].slice(0, 2))
}
})
},
goToOrderDetail(item) {
uni.navigateTo({
url: '/subPackages/order/detail?id=' + item.order_id
});
},
getChild(list) {
let arr = []
for (let i = 0; i < list.length; i++) {
if (list[i].product_model == "ticket") {
console.log(list[i]);
arr.push(list[i])
break
}
}
console.log(arr);
if (arr.length > 0) {
return arr[0]
} else {
return list[0]
}
},
goCoupon() {
uni.navigateTo({
url: "/subPackages/user/coupon",
});
},
goKeFu() {
uni.navigateTo({
url: "/subPackages/publicservices/ServiceOnline",
});
},
// open(){
// this.$refs.popup.open('center')
// },
gotoUrl(path, index) {
if (index == 2) {
// this.$refs.popup.open()
return;
}
uni.navigateTo({
url: path
})
},
qidai() {
uni.showToast({
title: '功能建设中...',
icon: 'none'
})
},
goTrades(item) {
if (item) {
uni.navigateTo({
url: "/subPackages/order/trades?type=" + item.title,
});
} else {
uni.navigateTo({
url: "/subPackages/order/trades",
});
}
},
//
isGz(item) {
this.$refs.pop.openPop(
'https://yjks.oss-cn-shanghai.aliyuncs.com/uploads/20230517/db9eb60e0abfea8be1075b406fefe551.jpg');
// this.Post({}, '/api/wechat/getSubcribeInfo').then(res => {
// if (res.data) {
// uni.navigateTo({
// url:'/subPackages/webPage/webPage?url='+'https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzU2NjQwNTYxNg==#wechat_redirect'
// })
// } else {
// console.log(this.$refs.pop);
// }
// });
},
}
}
</script>
<style>
.content {
<style scoped lang="scss">
::v-deep .uni-countdown {
font-size: 20px !important;
::v-deep .uni-countdown__splitor {
font-size: 20px !important;
}
}
.bg {
min-height: 100vh;
overflow-x: hidden;
background-color: rgba(237, 245, 220, 1);
}
.topBox {
width: 750rpx;
height: 538rpx;
box-sizing: border-box;
display: flex;
background-image: url('https://static.ticket.sz-trip.com/shiweisuzhou/images/user/topBg.png');
background-size: 100% 100%;
padding: 0rpx 40rpx 65rpx 28rpx;
position: relative;
.topIcon {
width: 734.67rpx;
height: 538rpx;
position: absolute;
top: 0;
right: 0;
}
.avatar-box {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
overflow: hidden;
background: #FFFFFF;
}
.headImg {
width: 100%;
height: 100%;
}
.username {
margin-left: 20rpx;
font-size: 40rpx;
color: #000000;
}
.top-right {
font-weight: 500;
font-size: 25rpx;
color: #100E0E;
image {
width: 11.33rpx;
height: 20rpx;
margin-left: 18rpx;
}
}
}
.orderBox {
width: 697rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 23rpx 0rpx rgba(80, 80, 80, 0.12);
border-radius: 13rpx;
margin: -185rpx auto 0;
padding-bottom: 30.6rpx;
position: relative;
.moreBox {
height: 84rpx;
margin: auto;
font-size: 31rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
padding: 0 13rpx 0 26rpx;
span {
font-weight: 500;
font-size: 25rpx;
color: #100E0E;
box-sizing: border-box;
image {
width: 11.33rpx;
height: 20rpx;
margin-left: 18rpx;
}
}
}
.orderItem {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
width: 20%;
text-align: center;
img {
width: 62rpx;
height: 62rpx;
margin-bottom: 20rpx;
}
}
.orderItem:nth-child(n+6) {
margin-top: 28rpx;
}
}
.lxwm {
width: 696rpx;
height: 447rpx;
background: #FFFFFF;
box-shadow: 0px 4rpx 12rpx 0px rgba(150, 149, 149, 0.3);
border-radius: 20rpx;
margin: auto;
padding: 27rpx 19rpx 0 19rpx;
font-size: 31rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
.midBox {
padding: 26rpx 43rpx 21rpx 44rpx;
box-sizing: border-box;
img {
width: 265rpx;
height: 252rpx;
border-radius: 15rpx;
}
}
.botBox {
padding: 0 30rpx 0 51rpx;
font-size: 27rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
}
}
.cygj {
width: 697rpx;
background: #FFFFFF;
border-radius: 20rpx;
margin: 30rpx auto 0;
padding: 0 27rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #000000;
.cyItem {
height: 106rpx;
display: flex;
align-items: center;
border-bottom: 1rpx solid #D8D8D8;
.headIcon {
width: 42rpx;
height: 42rpx;
margin-right: 15rpx;
}
.rightIcon {
width: 20rpx;
height: 20rpx;
}
}
.cyItem:last-child {
border: none;
}
}
.my-swipe {
// width: 100%;
margin: 0 30rpx;
margin-top: 37.3rpx;
}
swiper {
height: 111rpx !important;
}
.dfkBox {
width: 100%;
height: 111rpx;
background: #F7F7F7;
margin: 0 auto 30.64rpx;
// padding: 0.25rem;
display: flex;
}
.dfkBox image {
width: 137rpx;
height: 111rpx;
border-radius: 13rpx;
flex-shrink: 0;
// margin-right: 16.7rpx;
}
.dfkBox .contentBox {
padding-left: 5rpx;
padding-right: 5rpx;
height: 111rpx;
width: 100%;
display: flex;
justify-content: space-around;
align-items: center;
}
// .van-count-down{
// font-size: 0.39rem;
// font-family: PingFang SC;
// font-weight: 400;
// color: #FB6E4D;
// }
.orderBtn {
width: 152rpx;
height: 56rpx;
background: linear-gradient(270deg, #FC5109, #FDC43A);
;
border-radius: 28rpx;
text-align: center;
line-height: 56rpx;
font-size: 27rpx;
font-family: PingFang SC;
font-weight: 400;
color: #FFFFFF;
// margin-left: 50rpx;
// margin-right: 20rpx;
}
#contact {
-webkit-tap-highlight-color: transparent;
background-color: rgba(0, 0, 0, 0);
border-radius: 0;
box-sizing: border-box;
color: transparent;
cursor: pointer;
overflow: hidden;
padding: 0;
position: relative;
text-align: center;
text-decoration: none;
border: transparent 0px solid;
display: flex;
align-items: center;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #000000;
}
button::after {
border: none;
background-color: rgba(0, 0, 0, 0);
}
.more {
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, .5);
position: fixed;
top: 0;
left: 0;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
justify-content: center;
image {
width: 646rpx;
height: 959rpx;
}
img {
width: 80rpx;
height: 80rpx;
}
}
.consult-popup {
width: 487rpx;
height: 367rpx;
background: #F0F0F0;
border-radius: 20rpx;
padding: 65rpx 0 23rpx;
font-weight: bold;
font-size: 32rpx;
color: #000000;
text-align: center;
.consult-subtitle {
font-weight: 500;
font-size: 27rpx;
color: #333333;
margin-top: 43rpx;
}
.consult-btns {
display: flex;
margin-top: 75rpx;
view {
width: 50%;
font-weight: bold;
font-size: 32rpx;
color: #71B580;
line-height: 54rpx;
}
view:first-child {
border-right: 1rpx solid #D8D8D8;
color: #000000;
}
}
}
</style>

2
static/js/CommonFunction.js

@ -91,7 +91,7 @@ Vue.prototype.showImg = img => {
return img;
} else {
// return Vue.prototype.NEWAPIURL + img;
return 'https://swsz.api.js-dyyj.com'+img;
return 'https://static.ticket.sz-trip.com'+img;
}
}

196
static/js/mmmm-image-tools/index.js

@ -0,0 +1,196 @@
function getLocalFilePath(path) {
if (path.indexOf('_www') === 0 || path.indexOf('_doc') === 0 || path.indexOf('_documents') === 0 || path.indexOf('_downloads') === 0) {
return path
}
if (path.indexOf('file://') === 0) {
return path
}
if (path.indexOf('/storage/emulated/0/') === 0) {
return path
}
if (path.indexOf('/') === 0) {
var localFilePath = plus.io.convertAbsoluteFileSystem(path)
if (localFilePath !== path) {
return localFilePath
} else {
path = path.substr(1)
}
}
return '_www/' + path
}
function dataUrlToBase64(str) {
var array = str.split(',')
return array[array.length - 1]
}
var index = 0
function getNewFileId() {
return Date.now() + String(index++)
}
function biggerThan(v1, v2) {
var v1Array = v1.split('.')
var v2Array = v2.split('.')
var update = false
for (var index = 0; index < v2Array.length; index++) {
var diff = v1Array[index] - v2Array[index]
if (diff !== 0) {
update = diff > 0
break
}
}
return update
}
export function pathToBase64(path) {
return new Promise(function(resolve, reject) {
if (typeof window === 'object' && 'document' in window) {
if (typeof FileReader === 'function') {
var xhr = new XMLHttpRequest()
xhr.open('GET', path, true)
xhr.responseType = 'blob'
xhr.onload = function() {
if (this.status === 200) {
let fileReader = new FileReader()
fileReader.onload = function(e) {
resolve(e.target.result)
}
fileReader.onerror = reject
fileReader.readAsDataURL(this.response)
}
}
xhr.onerror = reject
xhr.send()
return
}
var canvas = document.createElement('canvas')
var c2x = canvas.getContext('2d')
var img = new Image
img.onload = function() {
canvas.width = img.width
canvas.height = img.height
c2x.drawImage(img, 0, 0)
resolve(canvas.toDataURL())
canvas.height = canvas.width = 0
}
img.onerror = reject
img.src = path
return
}
if (typeof plus === 'object') {
plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), function(entry) {
entry.file(function(file) {
var fileReader = new plus.io.FileReader()
fileReader.onload = function(data) {
resolve(data.target.result)
}
fileReader.onerror = function(error) {
reject(error)
}
fileReader.readAsDataURL(file)
}, function(error) {
reject(error)
})
}, function(error) {
reject(error)
})
return
}
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) {
wx.getFileSystemManager().readFile({
filePath: path,
encoding: 'base64',
success: function(res) {
resolve('data:image/png;base64,' + res.data)
},
fail: function(error) {
reject(error)
}
})
return
}
reject(new Error('not support'))
})
}
export function base64ToPath(base64) {
return new Promise(function(resolve, reject) {
if (typeof window === 'object' && 'document' in window) {
base64 = base64.split(',')
var type = base64[0].match(/:(.*?);/)[1]
var str = atob(base64[1])
var n = str.length
var array = new Uint8Array(n)
while (n--) {
array[n] = str.charCodeAt(n)
}
return resolve((window.URL || window.webkitURL).createObjectURL(new Blob([array], { type: type })))
}
var extName = base64.split(',')[0].match(/data\:\S+\/(\S+);/)
if (extName) {
extName = extName[1]
} else {
reject(new Error('base64 error'))
}
var fileName = getNewFileId() + '.' + extName
if (typeof plus === 'object') {
var basePath = '_doc'
var dirPath = 'uniapp_temp'
var filePath = basePath + '/' + dirPath + '/' + fileName
if (!biggerThan(plus.os.name === 'Android' ? '1.9.9.80627' : '1.9.9.80472', plus.runtime.innerVersion)) {
plus.io.resolveLocalFileSystemURL(basePath, function(entry) {
entry.getDirectory(dirPath, {
create: true,
exclusive: false,
}, function(entry) {
entry.getFile(fileName, {
create: true,
exclusive: false,
}, function(entry) {
entry.createWriter(function(writer) {
writer.onwrite = function() {
resolve(filePath)
}
writer.onerror = reject
writer.seek(0)
writer.writeAsBinary(dataUrlToBase64(base64))
}, reject)
}, reject)
}, reject)
}, reject)
return
}
var bitmap = new plus.nativeObj.Bitmap(fileName)
bitmap.loadBase64Data(base64, function() {
bitmap.save(filePath, {}, function() {
bitmap.clear()
resolve(filePath)
}, function(error) {
bitmap.clear()
reject(error)
})
}, function(error) {
bitmap.clear()
reject(error)
})
return
}
if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) {
var filePath = wx.env.USER_DATA_PATH + '/' + fileName
wx.getFileSystemManager().writeFile({
filePath: filePath,
data: dataUrlToBase64(base64),
encoding: 'base64',
success: function() {
resolve(filePath)
},
fail: function(error) {
reject(error)
}
})
return
}
reject(new Error('not support'))
})
}

11
static/js/mmmm-image-tools/package.json

@ -0,0 +1,11 @@
{
"id": "mmmm-image-tools",
"name": "image-tools",
"version": "1.4.0",
"description": "图像转换工具,可用于图像和base64的转换",
"keywords": [
"base64",
"保存",
"图像"
]
}

8
subPackages/line/orders.vue

@ -46,7 +46,7 @@
<text>优惠券</text>
<view style="display: flex;align-items: center;">
<view class="add-btn" v-if="!coupon">选择优惠券</view>
<view style="display: flex;align-items: center;color: #C3282E;font-weight: bold;" v-if="coupon && coupon.CouponActivity">
<view style="display: flex;align-items: center;color: #6A8A2D;font-weight: bold;" v-if="coupon && coupon.CouponActivity">
<view>-{{coupon.CouponActivity.discounts/100}}</view>
</view>
<img src="https://static.ticket.sz-trip.com/changyoutaihu/images/user/rightIcon.png" class="icon-coupon">
@ -694,14 +694,14 @@
.order-all-text {
flex: 1;
font-size: 36rpx;
color: #C3282E;
color: #6A8A2D;
font-weight: bold;
}
}
.order-btn {
width: 293rpx;
background: #C3282E;
background: #6A8A2D;
border-radius: 43rpx;
text-align: center;
line-height: 87rpx;
@ -779,7 +779,7 @@
.add-btn {
width: 153rpx;
line-height: 40rpx;
background: #C3282E;
background: #6A8A2D;
border-radius: 9rpx;
text-align: center;
font-weight: 500;

424
subPackages/order/orderCoupon.vue

@ -0,0 +1,424 @@
<template>
<view class="bg">
<!-- 列表 -->
<view class="coupon-list" v-if="list.length>0">
<view class="coupon-item" v-for="(item, index) in list" :key="index">
<!-- 分割线上部分 -->
<view class="item-top">
<view class="top-left">
<view class="price" v-if="item.activity.discount_type == 'pricebreak'">
<span>{{item.activity.money/100}}</span>
</view>
<view class="price" v-else>
<span>{{item.activity.fold}}</span>
</view>
<view class="subtitle">
{{item.activity.mini_money/100}}元可用
</view>
</view>
<view class="top-right">
<view class="title">
{{item.activity.name}}
</view>
<view class="time">
{{item.get_date.slice(0,10)}}-{{item.end_time.slice(0,10)}}可用
</view>
</view>
<image class="selected" v-if="item.selected" @click="selectCoupon(item,index)" :src="showImg('/uploads/20241104/f304eab8fe780e63507c9a43c5135cb7.png')" mode=""></image>
<view v-else class="yuan" @click="selectCoupon(item,index)"></view>
</view>
<!-- 分割线 -->
<view class="item-circle">
<view class="circle left"></view>
<view class="line"></view>
<view class="circle right"></view>
</view>
<!-- 分割线下部分 -->
<view class="item-bottom">
<view class="rules" @click="changeRules(item,index)">
<span v-if="!item.openRules">使用规则{{item.activity.use_rule_text}}</span>
<view class="open" v-else>使用规则{{item.activity.use_rule_text}}</view>
<image v-if="!item.openRules" src="https://yjks.oss-cn-shanghai.aliyuncs.com/uploads/20230415/6a7630c176f976bb16674dde482779fb.png" mode=""></image>
<image v-else src="https://yjks.oss-cn-shanghai.aliyuncs.com/uploads/20230415/f0073b18b3ab88cac62de60411360fc1.png" mode=""></image>
</view>
</view>
</view>
</view>
<view v-else class="noCoupon">
<img src="https://static.ticket.sz-trip.com/tongli/images/user/couponNo.png" class="no-couPon">
<view>暂无优惠券</view>
</view>
<view class="bottom-btn" v-if="list.length>0">
<view class="left" v-if="item.percent == 0">
优惠
<span style="font-size: 24rpx;color:#6A8A2D;margin-left: 19.33rpx;"></span>
<span style="font-size: 48rpx;color:#6A8A2D;font-weight: bold;">{{reducePrice}}</span>
</view>
<view class="left" v-else>
优惠
<span style="font-size: 48rpx;color:#6A8A2D;font-weight: bold;">{{reducePrice}}</span>
</view>
<!-- <view class="sure" @click="setCoupon(reducePrice*100)"> -->
<view class="sure" @click="setCoupon(coupon)">
确定
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
openRules: false,
list:[],
couponSel:false,
allPrice:0,
sku_ids:'',
reducePrice: 0,
coupon:{},
needDefault:false
}
},
onShow() {
this.getList();
},
onLoad(options) {
this.allPrice = (options.allprice) /100
this.sku_ids = options.sku_ids
this.needDefault = options.needDefault
console.log('11111',options);
},
methods: {
getPecenet:function (percent) {
if(percent>=100 || percent<=0) return "";
percent = 100 - percent;
if(percent%10==0){
percent = percent/10;
}
return percent
},
//
selectCoupon(item,index) {
let list = this.list
list.forEach((Item, Index) => {
if (Index === index) {
Item.selected = !Item.selected
} else {
Item.selected = false
}
})
this.list = list
console.log('选中的',this.list[index].selected);
if(item.selected) {
if (item.activity.discount_type == 'pricebreak') {
this.reducePrice = item.activity.mini_money/100+'元'
this.coupon = item
} else{
this.coupon = item
this.reducePrice = item.activity.fold+'折'
}
}else {
this.reducePrice = 0
this.coupon = {}
}
this.$forceUpdate()
},
// 使
changeRules(item,index){
let coupons = this.list
coupons.forEach((Item, Index) => {
if (Index === index) {
Item.openRules = !Item.openRules
} else {
Item.openRules = false
}
})
this.list = coupons
this.$forceUpdate()
},
//
showNoPriceNew(price) {
if (price && price > 0) {
return (price / 100)
} else {
return '0'
}
},
getList:function () {
this.Post({
money:this.allPrice,
sku_ids:this.sku_ids
}, "/api/coupon/use_coupon_list").then((res) => {
this.list = res.data
this.list.forEach(item => {
item.selected = false
})
if (this.needDefault) {
this.calMaxCost()
}
})
},
setCoupon(item) {
if (item.id) {
console.log('选择的优惠券',item);
this.$store.commit("choseCoupon",item);
} else{
this.$store.commit("choseCoupon","");
}
uni.navigateBack({
delta: 1
})
},
//
calMaxCost () {
let maxCost = {}
let maxCostPrice = 0
let index = -1
this.list.forEach((item,i)=>{
let reducePrice = 0
if (item.activity.discount_type == 'pricebreak') {
reducePrice = item.activity.money/100
} else{
reducePrice = this.allPrice * item.activity.fold
}
if (reducePrice > maxCostPrice) {
maxCostPrice = reducePrice
maxCost = item
index = i
}
})
if (maxCost.id) {
this.selectCoupon(maxCost, index)
}
}
}
}
</script>
<style scoped>
.bg {
background: #F7F7F7;
min-height: 100vh;
}
.coupon-list .coupon-item .item-circle {
line-height: 1rpx;
height: 1rpx;
width: 652rpx;
}
.coupon-list .coupon-item .item-circle .line {
border-bottom: 1px dashed #ccc;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: .1rpx;
margin: auto;
z-index: 9;
}
.coupon-list .coupon-item .item-circle .circle {
position: absolute;
top: 0;
bottom: 0;
margin: auto;
border-radius: 50%;
background: #ccc;
width: .46rpx;
height: .46rpx;
z-index: 10;
}
.coupon-list .coupon-item .item-circle .circle.left{
left:-.23rpx;
}
.coupon-list .coupon-item .item-circle .circle.right{
right: -.23rpx;
}
.item-bottom {
padding: 16rpx 20rpx;
display: flex;
align-items: flex-start;
justify-content: space-between;
}
.item-bottom .rules {
font-size: 24rpx;
font-weight: 500;
color: #999;
display: flex;
line-height: 47rpx;
}
.item-bottom .rules span {
width: 570rpx;
overflow: hidden; //
white-space: nowrap; //
text-overflow: ellipsis;
}
.item-bottom .rules image {
width: 20rpx;
height: 20rpx;
margin-left: 20rpx;
margin-top: 15rpx;
}
.open {
width: 570rpx;
min-height: 30rpx;
flex-wrap: wrap;
}
.coupon-item {
margin: 20.67rpx 26.67rpx;
background: #fff;
}
.coupon-list .coupon-item .item-top {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx 16rpx 24rpx 36rpx;
}
.coupon-item .item-top .price {
font-size: 25rpx;
font-weight: bold;
color: #6A8A2D;
display: flex;
align-items: baseline;
justify-content: center;
}
.coupon-item .item-top .price span {
font-size: 67rpx;
margin-right: 6.67rpx;
}
.top-left .subtitle {
width: 100%;
font-size: 24rpx;
color: #6A8A2D;
padding-left: 6rpx;
overflow: hidden;
white-space: nowrap;
}
.top-right {
width: 336rpx;
margin-left: 46.67rpx;
font-size: 25rpx;
font-weight: 500;
color: #111;
}
.top-right .title {
margin-bottom: 26rpx;
font-size: 31rpx;
font-weight: bold;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item-bottom {
padding: 16rpx 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.item-bottom .use {
width: 133rpx;
height: 47rpx;
border: 1px solid #6A8A2D;
border-radius: 23rpx;
text-align: center;
font-size: 25rpx;
font-weight: 500;
color: #6A8A2D;
line-height: 47rpx;
}
.coupon-list{
background: #F7F7F7;
min-height: 100vh;
padding: 20rpx 20rpx 160rpx;
}
.coupon-list .coupon-item {
background: #ffffff;
border-radius: 13rpx;
}
.yuan {
width: 37rpx;
height: 37rpx;
border: 1px solid #999999;
border-radius: 20rpx;
margin-right: 16rpx;
}
.selected {
width: 40rpx;
height: 40rpx;
margin-right: 16rpx;
}
.bottom-btn {
/* width: 100%; */
position: fixed;
left: 0;
right: 0;
bottom: 0;
padding: 22rpx 50rpx 64rpx 50.67rpx;
background: #fff;
display: flex;
justify-content: space-between;
align-items: center;
}
.bottom-btn .left {
font-size: 28rpx;
font-weight: 500;
color: #393B3E;
}
.sure {
width: 250rpx;
height: 80rpx;
background: #6A8A2D;
color: #fff;
font-size: 32rpx;
font-weight: bold;
text-align: center;
line-height: 80rpx;
border-radius: 50rpx;
}
.top-left {
width: 136rpx;
}
.top-left .price {
width: 100%;
overflow: hidden;
white-space: nowrap;
}
.noCoupon{
padding-top: 524rpx;
text-align: center;
font-size: 31rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
}
.no-couPon{
width: 173rpx;
height: 173rpx;
margin-bottom: 15rpx;
}
</style>

678
subPackages/order/trades.vue

@ -0,0 +1,678 @@
<template>
<view class="bg">
<view class="top-bg">
<view class="search-box">
<view class="left">
<image src="https://static.ticket.sz-trip.com/yandu/images/eventCalendar/search.png"
mode="aspectFill"></image>
<input v-model="keywords" type="text" placeholder="请输入关键字" @confirm="search()" />
</view>
<!-- <view class="btn" @click="search()">搜索</view> -->
</view>
<view class="common-box">
<view class="common-types com-flex-tao">
<view @click="setType(index)" v-for="(item, index) in typeList" :key="item.id"
:class="['common-type', typeIndex == index ? 'active' : '']">
{{ item.name }}
</view>
</view>
</view>
</view>
<view class="list-common-empty" v-if="list.length == 0">
<img src="https://static.ticket.sz-trip.com/shiweisuzhou/images/user/noTrades.png" />
<p class="list-common-empty-tip">还没有订单赶快去下单吧~</p>
</view>
<view class="trade-list" v-if="list.length > 0">
<view v-for="(item, key) in list" :key="item.id" class="trade-items" v-if="showItem(item)"
@click="() => choseType(item)">
<view class="trade-item-head">
<view class="trade-item-head-tid">订单号:{{ item.order_id }}</view>
<view class="trade-item-head-state">{{ item.status_text }}</view>
</view>
<view class="trade-item-pros">
<view class="trade-item-pro" v-for="(pro, proIndex) in item.order_child" :key="pro.child_id">
<view class="trade-item-pro-img" v-if="pro.specifications_image">
<image :src="showImg(pro.specifications_image)" mode="aspectFill"></image>
</view>
<view style="flex: 1;">
<view class="trade-item-pro-title">{{ pro.goods_title }}</view>
<view class="trade-item-pro-subtitle">{{ pro.specifications_name }}</view>
</view>
<view class="trade-item-pro-price">
<view class="trade-item-pro-price-pri">{{ pro.pay_money / 100 }}</view>
<view class="trade-item-pro-num">x{{ pro.num }}</view>
</view>
</view>
</view>
<view class="trade-item-info">
合计
<text>{{ item.pay_money / 100 }}</text>
</view>
<view class="trade-item-btns">
<view @click.stop="() => refund(item.order_id, key)" v-if="item.status == 'PAYMENT_SUCCESSFULLY'">
申请退款</view>
<view @click.stop="() => closeOrder(item.order_id, item)" v-if="item.status == 'WAIT_PAYMENT'">关闭订单
</view>
<view @click.stop="confirmpost(item.order_id, key)" v-if="item.postFlag">确认收货</view>
<view class="pay-btn" @click.stop="setOrderId(item.order_id)" v-if="item.status == 'WAIT_PAYMENT'">
立即支付</view>
</view>
</view>
</view>
<!-- <view v-if="list.length === 0 && finished" class="noDate">
<view>暂无订单</view>
</view> -->
</view>
</template>
<script>
export default {
name: 'Trades',
data() {
return {
finished: false,
list: [],
typeList: [{
id: 'ALL',
name: '全部'
},
{
id: 'WAIT_PAYMENT',
name: '待付款'
},
{
id: 'PAYMENT_SUCCESSFULLY',
name: '待使用'
},
{
id: 'PAYMENT_SUCCESSFULLY',
name: '待发货'
},
{
id: 'POST',
name: '待收货'
},
// {
// id: 'WAIT_COMMENT',
// name: ''
// },
{
id: 'WAIT_REFUND,REFUND_SUCCESS,REFUND_REFUSAL,REFUND_ERROR,REFUND_PART',
name: '退款/售后'
}
],
typeIndex: 0,
ajaxFlag: true,
keywords: '',
orderId: null,
dateRange: [],
type: ''
};
},
onLoad(options) {
console.log(options);
if (options.type) this.typeIndex = this.typeList.findIndex(vm => vm.name === options.type);
uni.$on("updateDataByConnect", this.getDataByConnect)
},
onShow() {
this.getList();
},
onUnload() {
uni.$off("updateDataByConnect", this.getDataByConnect)
},
onReachBottom() {
if (this.finished) return false;
this.getList();
},
methods: {
getDataByConnect(data) {
if (data.msgType == "updateOrderTrades") {
this.list = [];
this.finished = false;
this.getList()
}
},
emptyFunc() {
},
showItem(item) {
let flag = true;
// if (this.typeIndex == 2 && item.order_child[0] && !item.order_child[0].consignee) flag = false
return flag;
},
onReload() {
this.list = [];
this.finished = false;
this.getList();
},
setType(index) {
this.typeIndex = index;
this.onReload();
},
setOrderId(id) {
let that = this;
that.orderId = id;
that.Post({
order_id: id,
type: "miniprogram",
platform: 'miniprogram'
},
'/api/pay/unify'
).then(res => {
if (res.data) {
uni.requestPayment({
nonceStr: res.data.nonceStr,
package: res.data.package,
paySign: res.data.paySign,
signType: res.data.signType,
timeStamp: res.data.timeStamp,
success: () => {
const templateIds = [
// 退
'hRZoiEES2BWtKb6Xgsnn8khLQH9un5j_11qu0bwlhfE',
//
'YyTCUIYBnrj9CyKks8cOjNX_Rk8a4yVdswMP-zXVbhc'
]
uni.requestSubscribeMessage({
tmplIds: templateIds,
complete (res) {
that.list = [];
that.finished = false;
that.getList()
}
})
}
});
}
});
},
//
confirmpost(id, index) {
let that = this;
uni.showModal({
title: '提示',
content: '是否确认收货?',
success: successRes => {
if (successRes.confirm) {
that.Post({
order_id: id
},
'/api/order/confirmPost'
).then(res => {
if (res.code == 1) {
list[index].order_child.map(item => {
item.status = 'WAIT_COMMENT';
});
list[index].status = 'WAIT_COMMENT';
list[index].postFlag = false;
that.list = list;
uni.showToast({
title: '操作成功'
});
that.$forceUpdate();
}
});
}
}
});
},
//
closeOrder(id, index) {
console.log(id);
console.log(index);
let that = this;
uni.showModal({
title: '提示',
content: '是否关闭订单?',
success: successRes => {
if (successRes.confirm) {
that.Post({
order_id: id
},
'/api/order/closeOrder'
).then(res => {
if (res.code == 1) {
uni.showToast({
title: '关闭成功',
icon: 'success'
});
that.list = [];
that.finished = false;
that.getList();
}
});
}
}
});
},
//
deletOrder(id) {
let that = this;
uni.showModal({
title: '提示',
content: '是否删除订单?',
success: successRes => {
if (successRes.confirm) {
that.Post({
order_id: id
},
'/api/order/delOrder'
).then(res => {
if (res.code == 1) {
uni.showToast({
title: '删除成功',
icon: 'success'
});
that.list = [];
that.finished = false;
that.getList();
}
});
}
}
});
},
// 退
refund(id, index) {
console.log(id);
let that = this;
uni.showModal({
title: '提示',
content: '是否申请退款?',
success: successRes => {
if (successRes.confirm) {
that.Post({
order_id: id
},
'/api/order/applyRefund'
).then(res => {
if (res.code == 1) {
uni.showToast({
title: '申请成功',
icon: 'success'
});
that.onReload();
}
});
}
}
});
},
search(e) {
this.list = [];
this.getList();
// if (e.keyCode == 13) {
// //
// this.keywords = e.target.value;
// }
},
getList() {
let data = {
status: this.typeList[this.typeIndex].id == 'ALL' ? '' : this.typeList[this.typeIndex].true_id ||
this.typeList[this.typeIndex].id,
offset: this.list.length,
limit: 5,
name: this.keywords,
type: this.typeList[this.typeIndex].name == '待使用' ? 1 : (this.typeList[this.typeIndex].name ==
'待发货' ? 2 : '')
};
this.Post(data, '/api/order/orderList').then(res => {
this.list = [...this.list, ...res.data]
if (res.data.length < 5) {
this.finished = true;
}
});
},
UpdateOrder(id) {
this.ajaxFlag = false;
let list = this.list;
this.Post({
order_id: id
},
'/api/order/orderDetail'
).then(res => {
this.ajaxFlag = true;
list.map(item => {
if (item.order_id == id) {
item = res.data;
}
});
this.list = list;
});
},
choseType(item) {
uni.navigateTo({
url: '/subPackages/order/detail?id=' + item.order_id
});
},
}
};
</script>
<style scoped lang="scss">
view {
box-sizing: border-box;
}
.common-box {
height: 90rpx;
}
.common-types {
background: white;
height: 90rpx;
font-size: 31rpx;
z-index: 10;
margin: auto;
color: #666;
overflow-x: scroll;
overflow-y: hidden;
padding: 0 27rpx;
}
.common-types::-webkit-scrollbar {
width: 0rpx;
height: 0;
display: none;
}
.common-type {
flex-shrink: 0;
margin: 0 26rpx;
line-height: 90rpx;
height: 90rpx;
position: relative;
}
.common-type.active {
font-size: 31rpx;
font-weight: bold;
color: #000;
}
.common-type.active:after {
display: block;
width: 60%;
font-size: 0;
content: '1';
margin: auto;
position: absolute;
left: 0;
right: 0;
bottom: 1rpx;
height: 4rpx;
background: #6A8A27;
border-radius: 2rpx;
}
.bg {
min-height: 100vh;
background-color: #f7f7f7;
}
.noDate {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-top: 200rpx;
}
.noDate img {
width: 514rpx;
height: auto;
}
.noDate view {
font-size: 24rpx;
color: #777777;
}
.trade-list {
padding: 28rpx 26rpx;
}
.trade-items {
background-color: white;
margin-bottom: 28rpx;
border-radius: 20rpx;
}
.trade-item-head {
display: flex;
justify-content: space-between;
padding: 28rpx 20rpx;
border-bottom: 1rpx solid #d8d8d8;
}
.trade-item-head-tid {
font-size: 24rpx;
display: flex;
align-items: center;
color: #666666;
}
.trade-item-head-state {
font-size: 27rpx;
font-family: PingFang SC;
font-weight: bold;
color: #C3282E;
}
.trade-item-head-name {
display: flex;
align-items: center;
font-size: 31rpx;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
image {
width: 33rpx;
height: 31rpx;
}
view {
margin-left: 13rpx;
}
}
.trade-item-pros {
display: flex;
/* background-color: #F2F2F2; */
flex-direction: column;
}
.trade-item-pro {
display: flex;
padding: 20rpx;
justify-content: space-between;
}
.trade-item-pro-img {
display: flex;
justify-content: center;
align-items: center;
}
.trade-item-pro-img image {
width: 180rpx;
height: 180rpx;
border-radius: 10rpx;
}
.trade-item-pro-price {
display: flex;
flex-direction: column;
}
.trade-item-pro-title {
text-align: left;
flex: 1;
padding: 0 20rpx;
font-size: 28rpx;
}
.trade-item-pro-subtitle {
text-align: left;
flex: 1;
padding: 0 20rpx;
font-weight: 500;
font-size: 24rpx;
color: #C3282E;
margin-top: 20rpx;
}
.trade-item-pro-price view {
display: flex;
flex-wrap: nowrap;
text-wrap: none;
white-space: nowrap;
justify-content: flex-end;
}
.trade-item-pro-price-pri {
font-size: 27rpx;
color: #C3282E;
font-weight: 500;
color: #333333;
}
.trade-item-pro-num {
font-size: 24rpx;
color: #666666;
margin-top: 24rpx;
}
.trade-item-info {
font-size: 28rpx;
display: flex;
justify-content: flex-end;
align-items: center;
background-color: white;
padding: 0rpx 20rpx;
margin-top: -6rpx;
/* border-bottom: 1px solid #B6B6B6; */
}
.trade-item-info text {
font-size: 36rpx;
font-weight: bold;
color: rgba(238, 0, 0, 1);
}
.trade-item-btns {
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
padding: 20rpx;
}
.trade-item-btns view {
margin-left: 20rpx;
background: rgba(237, 237, 237, 0);
border: 1rpx solid #999999;
border-radius: 27rpx;
padding: 8rpx 16rpx;
font-size: 27rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
}
.trade-item-btns .pay-btn {
color: #FFFFFF;
background: #C3282E;
border: none;
padding: 10rpx 16rpx;
}
.comment-btn {
width: 100rpx;
text-align: center;
line-height: 40rpx;
border-radius: 20rpx;
border: 1px solid #999999;
color: #333333;
justify-content: center !important;
font-size: 24rpx;
margin-top: 16rpx;
}
.list-common-empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 50vh;
}
.list-common-empty img {
width: 317.33rpx;
height: 282rpx;
}
.list-common-empty-tip {
margin-top: 36rpx;
font-weight: 500;
font-size: 32rpx;
color: #000000;
}
.com-flex-tao {
display: flex;
justify-content: space-between;
align-items: center;
}
.search-box {
width: 697rpx;
height: 67rpx;
background: #f2f2f2;
border-radius: 33rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 8rpx 0 28rpx;
margin: 0 auto;
margin-bottom: 20rpx;
.left {
display: flex;
align-items: center;
image {
width: 28rpx;
height: 30rpx;
}
input {
margin-left: 20rpx;
font-size: 31rpx;
font-weight: 400;
color: #333;
width: 450rpx;
}
}
.btn {
width: 107rpx;
height: 53rpx;
background: #71B580;
border-radius: 27rpx;
font-size: 28rpx;
font-weight: 400;
color: #ffffff;
line-height: 53rpx;
text-align: center;
}
}
.top-bg {
background: #fff;
padding-top: 20rpx;
}
</style>

6
subPackages/ticket/order.vue

@ -969,17 +969,17 @@
margin-left: 15rpx;
font-size: 48rpx;
font-weight: bold;
color: #C3282E;
color: #6A8A2D;
&:before {
content: '¥';
display: inline-block;
color: #C3282E;
color: #6A8A2D;
font-size: 24rpx;
}
}
.post-text {
margin-left: 15rpx;
color: #C3282E;
color: #6A8A2D;
font-size: 24rpx;
}
}

89
subPackages/user/changeNickname.vue

@ -0,0 +1,89 @@
<template>
<view class="bg">
<view class="nickname-box">
<input v-model="nickname" type="text" placeholder="请输入内容" />
</view>
<view class="btn" @click="save">保存</view>
</view>
</template>
<script>
export default {
name: "changeNickname",
data: function() {
return {
nickname: ""
}
},
methods: {
save: function() {
if (!this.nickname) {
uni.showToast({
title: '请输入昵称',
icon: 'none'
})
return;
}
this.Post({
nickname: this.nickname
}, '/api/uservice/user/profile').then(res => {
console.log(res)
if (res.code == 1) {
uni.showModal({
title: '提示',
content: '保存成功!',
success: res => {
if (res.confirm) {
this.goBack()
}
}
})
}
})
}
}
}
</script>
<style scoped>
.bg {
min-height: 100vh;
padding-top: 50rpx;
}
.nickname-box {
display: flex;
padding: 10rpx 0 30rpx;
margin: 0 30rpx;
align-items: center;
background: white;
margin-bottom: 100rpx;
font-size: 30rpx;
height: 70rpx;
border-bottom: 1rpx solid #D8D8D8;
}
.nickname-box span {
flex-shrink: 0;
}
.nickname-box input {
flex: 1;
font-size: 30rpx;
display: block;
}
.btn {
color: black;
margin: 0 auto;
line-height: 80rpx;
position: relative;
font-size: 34rpx;
text-align: center;
width: 333rpx;
height: 80rpx;
background: #6A8A2D;
border-radius: 40rpx;
color: #FFFFFF;
}
</style>

494
subPackages/user/coupon.vue

@ -0,0 +1,494 @@
<template>
<view class="bg">
<!-- 导航栏 -->
<view class="nav-list">
<view :class="['nav-item',{active:index==navActive}]" v-for="(item,index) in navList" :key="index"
@click="changeNav(index)">{{ item.name }}
</view>
</view>
<!-- 列表 -->
<view class="coupon-list" v-if="coupon.length>0">
<view :class="['coupon-item',{'hasUse':navActive!=0}]" v-for="(item, index) in coupon" :key="index">
<!-- 分割线上部分 -->
<view class="item-top">
<view class="top-left">
<view class="price price-before" v-if="item.activity.discount_type == 'pricebreak'">
<span>{{(item.activity.money) / 100}}</span>
</view>
<view class="price" v-else>
<span>{{item.activity.fold}}</span>
</view>
<view class="subtitle">
{{item.activity.mini_money/100}}元可用
</view>
</view>
<view class="top-right">
<view class="title text-overflowRows">
{{item.activity.name}}
</view>
<view class="time">
{{item.get_date.slice(0,10)}}-{{item.end_time.slice(0,10)}}可用
</view>
</view>
</view>
<!-- 分割线 -->
<view class="item-circle">
<view class="circle left"></view>
<view class="line"></view>
<view class="circle right"></view>
</view>
<!-- 分割线下部分 -->
<view class="item-bottom">
<view class="rules" @click="changeRules(item,index)">
<span v-if="!item.openRules">使用规则{{item.note}}</span>
<view class="open" v-else>使用规则{{item.note}}</view>
<!-- <span v-if="!item.openRules">使用规则{{item.content}}</span>
<view class="open" v-else>使用规则{{item.content}}</view> -->
<image v-if="!item.openRules" src="https://yjks.oss-cn-shanghai.aliyuncs.com/uploads/20230415/6a7630c176f976bb16674dde482779fb.png" mode=""></image>
<image v-else src="https://yjks.oss-cn-shanghai.aliyuncs.com/uploads/20230415/f0073b18b3ab88cac62de60411360fc1.png" mode=""></image>
</view>
<!-- <view class="use" @click="use" v-if="navActive==0">
去使用
</view>
<view class="use" v-else>
已失效
</view> -->
</view>
</view>
</view>
<view v-else class="noCoupon">
<img src="https://static.ticket.sz-trip.com/tongli/images/user/couponNo.png" class="no-couPon">
<view>暂无优惠券</view>
</view>
<!-- 兑换优惠券 -->
<!-- <view class="duihuan" @click="open">
兑换优惠券 >
</view> -->
<!-- 弹框 -->
<uni-popup ref="popup" type="center">
<view class="popupBox">
<view class="name">
兑换优惠券
</view>
<input type="text" v-model="password" placeholder="请输入兑换码">
<view class="btns">
<view class="cancel" @click="cancel">
取消
</view>
<span></span>
<view class="sub" @click="submitPassword">
兑换
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
export default {
data() {
return {
navList: [
{name: '可使用', status:1},
{name: '已失效', status:3},
],
navActive:'', //
coupon:[],
// openRules: false,
password:''
}
},
onShow() {
this.getList(this.navList[0])
},
methods: {
getPecenet:function (percent) {
if(percent>=100 || percent<=0) return "";
percent = 100 - percent;
if(percent%10==0){
percent = percent/10;
}
return percent
},
use() {
uni.switchTab({
url: "/pages/index/index",
});
},
submitPassword() {
console.log('提交的兑换码',this.password);
let that = this
that.password = that.password.trim()
that.$refs.popup.close()
if (that.password== '') {
uni.showToast({
title: '请输入优惠券领取卡号',
icon: 'none'
})
return
}
that.Post({
card_key: that.password
}, "/api/coupon/getCoupon").then((res) => {
console.log(res.code);
if (res.code == 200) {
that.coupon = []
this.getList(this.navList[0])
uni.showToast({
title: '兑换成功',
icon: 'none'
})
} else{
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
that.password = ''
},
cancel() {
this.password = ''
this.$refs.popup.close()
},
open() {
this.$refs.popup.open('center')
},
// 使
changeRules(item,index){
let list = this.coupon
list.forEach((Item, Index) => {
if (Index === index) {
Item.openRules = !Item.openRules
} else {
Item.openRules = false
}
})
this.coupon = list
this.$forceUpdate()
},
//
showNoPriceNew(price) {
if (price && price > 0) {
return (price / 100)
} else {
return '0'
}
},
//
changeNav(index){
this.navActive=index
this.getList(this.navList[this.navActive])
},
//
getList(item) {
let that = this
that.Post({
status: item.status,
offset: 0,
limit: 100,
}, "/api/coupon/get_user_list").then((res) => {
if (res) {
console.log(res.data);
that.coupon = res.data
}
});
}
}
}
</script>
<style lang="scss" scoped>
.bg {
background: #F7F7F7;
min-height: 100vh;
}
/*导航*/
.nav-list {
width: 100%;
height: 107rpx;
display: flex;
justify-content: space-around;
align-items: center;
position: fixed;
background: #FFFFFF;
}
.nav-list .nav-item {
text-align: center;
line-height: 106rpx;
box-sizing: border-box;
font-size: 31rpx;
font-weight: bold;
padding: .23rpx 0;
color: #333333;
}
.nav-list .nav-item.active {
color: #000000;
border-bottom: 7rpx solid #6A8A27;
}
.coupon-list{
/* width: 100%; */
position: absolute;
top: 115rpx;
padding: 0 26.67rpx;
background: #F7F7F7;
min-height: 100vh;
padding-bottom: 30rpx;
}
.coupon-list .coupon-item {
width: 697rpx;
background: #ffffff;
margin-top: 20rpx;
border-radius: 13rpx;
}
.coupon-list .coupon-item .item-top {
display: flex;
padding: 30rpx 16rpx 24rpx 36rpx;
align-items: center;
}
.coupon-item .item-top .price {
font-size: 25rpx;
font-weight: bold;
color: #6A8A27;
display: flex;
align-items: baseline;
justify-content: center;
}
.coupon-item .item-top .price span {
font-size: 60rpx;
margin-right: 6.67rpx;
}
.top-left .subtitle {
width: 100%;
font-size: 24rpx;
color: #6A8A27;
padding-left: 6rpx;
overflow: hidden;
white-space: nowrap;
}
.top-left .price-before::before{
content: '¥';
font-size: 32rpx;
}
.top-right {
margin-left: 46.67rpx;
font-size: 25rpx;
font-weight: 500;
color: #111;
}
.top-right .title {
margin-bottom: 26rpx;
font-size: 31rpx;
font-weight: bold;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
.coupon-list .coupon-item .item-circle {
/* position: relative; */
line-height: 1rpx;
height: 1rpx;
width: 692rpx;
}
.coupon-list .coupon-item .item-circle .line {
border-bottom: 1px dashed #ccc;
/* position: absolute; */
top: 0;
bottom: 0;
left: 0;
right: 0;
/* width: calc(100% - 1rem); */
height: .1rpx;
margin: auto;
z-index: 9;
}
.coupon-list .coupon-item .item-circle .circle {
position: absolute;
top: 0;
bottom: 0;
margin: auto;
border-radius: 50%;
background: #ccc;
width: .46rpx;
height: .46rpx;
z-index: 10;
}
.coupon-list .coupon-item .item-circle .circle.left{
left:-.23rpx;
}
.coupon-list .coupon-item .item-circle .circle.right{
right: -.23rpx;
}
.item-bottom {
padding: 16rpx 20rpx;
display: flex;
align-items: flex-start;
justify-content: space-between;
}
.item-bottom .rules {
font-size: 24rpx;
font-weight: 500;
color: #999;
display: flex;
line-height: 47rpx;
}
.item-bottom .rules span {
width: 569rpx;
overflow: hidden; //
white-space: nowrap; //
text-overflow: ellipsis;
}
.item-bottom .rules image {
width: 20rpx;
height: 20rpx;
margin-left: 68rpx;
margin-top: 15rpx;
}
.item-bottom .use {
width: 133rpx;
height: 47rpx;
border: 1px solid #FC5209;
border-radius: 23rpx;
text-align: center;
font-size: 25rpx;
font-weight: 500;
color: #fc5209;
line-height: 47rpx;
}
.open {
width: 569rpx;
min-height: 30rpx;
flex-wrap: wrap;
}
.duihuan {
width: 293rpx;
height: 67rpx;
background: #fff;
box-shadow: 0rpx 0rpx 7rpx 0rpx rgba(153,153,153,0.18);
border-radius: 33rpx;
font-size: 31rpx;
font-weight: 500;
color: #07C49B;
text-align: center;
line-height: 67rpx;
margin-left: 228.67rpx;
position: fixed;
bottom: 52.67rpx;
}
.top-left {
width: 140rpx;
}
.top-left .price {
width: 100%;
/* overflow: hidden; */
white-space: nowrap;
}
.popupBox {
background: #fff;
border-radius: 20rpx;
padding: 40.67rpx 39.33rpx 35.33rpx 40rpx;
}
.popupBox .name {
font-size: 35rpx;
color: #111;
font-weight: bold;
margin-bottom: 57.33rpx;
text-align: center;
}
.popupBox input {
width: 454rpx;
height: 81rpx;
border: 1px solid #D8D8D8;
border-radius: 7rpx;
font-size: 31rpx;font-weight: 500;
color: #999999;
line-height: 81rpx;
margin: 0 39.33rpx 72.67rpx 40rpx;
text-align: center;
}
.popupBox .btns {
display: flex;
align-items: center;
font-size: 35rpx;
justify-content: space-around;
}
.popupBox .btns .cancel {
color: #111;
}
.popupBox .btns span {
width: 1rpx;
height: 53rpx;
background: #D8D8D8;
}
.popupBox .btns .sub {
color: #07C49B;
}
.hasUse {
color: #999 !important;
}
.hasUse .item-top .top-left .price{
color: #999 !important;
}
.hasUse .item-top .top-left .subtitle{
color: #999 !important;
}
.hasUse .item-top .top-right .title {
color: #999 !important;
}
.hasUse .item-top .top-right .time {
color: #999 !important;
}
.hasUse .item-bottom .use {
border: 1px solid #B3B3B3 !important;
color: #999999 !important;
}
.noCoupon{
padding-top: 524rpx;
text-align: center;
font-size: 31rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
.no-couPon{
width: 173rpx;
height: 173rpx;
margin-bottom: 15rpx;
}
}
</style>

168
subPackages/user/logout.vue

@ -0,0 +1,168 @@
<template>
<view class="bg">
<image src="https://static.ticket.sz-trip.com/tongli/images/user/logout.png" class="logoutImg"></image>
<view class="title">用户注销协议</view>
<view class="text" v-html="formateRichText(content)"></view>
<footer>
<view>
<view class="dui-box" :style="{backgroundImage: isTrue ? 'url(https://static.ticket.sz-trip.com/shiweisuzhou/images/user/logoutDui.png)' : '',
border: isTrue ? '' : '1rpx solid #515150'}"
@click="isTrue = !isTrue"></view>
您已经同意用户注销协议
</view>
<view class="flex-between">
<view class="btn flex-center" @click="goBack">取消</view>
<view class="btn flex-center" v-if="time != 0">查看协议({{time}}s)</view>
<view class="btn btns flex-center" v-else @click="confirmLogout">确认注销</view>
</view>
</footer>
</view>
</template>
<script>
export default {
data() {
return {
content: '',
isTrue: false,
time: 8
}
},
onShow() {
// this.Post({
// id: 10274
// },'/api/article/getArticleById').then(res => {
// if(res.code == 1) {
// this.content = res.data.content
// var countdown = setInterval(() => {
// this.time --
// if(this.time == 0) {
// clearInterval(countdown)
// }
// },1000)
// }
// })
var countdown = setInterval(() => {
this.time --
if(this.time == 0) {
clearInterval(countdown)
}
},1000)
},
methods: {
confirmLogout() {
if(!this.isTrue) {
uni.showToast({
title: '请先同意协议',
icon: 'none'
})
return;
}
uni.showModal({
title: '提示',
content: '确认注销账号?',
success: successRes => {
if (successRes.confirm) {
this.Post({
protocol: 1
},'/api/uservice/user/user_logout').then(res => {
if(res.code == 1) {
uni.showToast({
title: '注销成功',
icon: 'none'
})
this.$store.commit('changeUserInfo', {})
setTimeout(() => {
uni.switchTab({
url: '/pages/index/index'
})
},1000)
}
})
}
}
});
}
}
}
</script>
<style lang="scss" scoped>
.bg {
min-height: 100vh;
background-color: #fff;
padding: 88rpx 0 250rpx;
}
.logoutImg {
display: block;
width: 120rpx;
height: 120rpx;
margin: 0 auto;
}
.title {
font-weight: bold;
font-size: 40rpx;
color: #000000;
margin: 60rpx auto 50rpx;
text-align: center;
}
.text {
padding: 0 40rpx;
}
footer {
position: absolute;
bottom: 0;
left: 0;
padding: 0 68rpx;
width: 100%;
.dui-box {
width: 40rpx;
height: 40rpx;
margin-right: 19rpx;
background-size: 100% 100%;
border-radius: 50%;
}
&>view:first-child {
display: flex;
align-items: center;
font-weight: 500;
font-size: 24rpx;
color: #000000;
}
&>view:last-child {
margin: 53rpx 0 67rpx;
.btn {
width: 267rpx;
height: 80rpx;
background: #BFBFBF;
border-radius: 11rpx;
font-weight: 500;
font-size: 36rpx;
color: #FFFFFF;
}
&>view:nth-child(1) {
border: 3rpx solid #6A8A27;
font-weight: 500;
color: #6A8A27;
background: #fff;
}
.btns {
background: #6A8A27;
color: #FFFFFF;
}
}
}
</style>

417
subPackages/user/myAddressAdd.vue

@ -0,0 +1,417 @@
<template>
<view class="bg">
<view class="list-forms">
<view class="list-item">
<view class="list-item-title">姓名:</view>
<view class="list-item-input"><input type="text" v-model="username" placeholder="请输入姓名" /></view>
</view>
<view class="list-item">
<view class="list-item-title">手机号:</view>
<view class="list-item-input"><input type="number" v-model="mobile" placeholder="请输入手机号" maxlength="11"
/></view>
</view>
<view class="list-item" style="position: relative;">
<view class="list-item-title">选择地区:</view>
<view class="list-item-input" style="flex: 1;">
<picker mode="multiSelector" :range="newProvinceDataList" range-key="name" @change="changeArea" @columnchange="pickerColumnchange"
style="position: relative;z-index: 2;">
<input type="text" readonly style="text-align: right;font-size: 33rpx;position: relative;z-index: -1;"
v-model="citySeld" disabled="true" placeholder="请选择地区"/>
</picker>
</view>
</view>
<view class="list-item">
<view class="list-item-title">详细地址:</view>
<view class="list-item-input"><input type="text" v-model="detailAddr" placeholder="请输入详细地址" /></view>
</view>
<view class="list-item">
<view class="list-item-title">设为默认:</view>
<view class="list-item-switch">
<switch :checked="idDefault" @change="switchChange" color="#6A8A2D"/>
</view>
</view>
<view class="list-item-btn">
<view class="list-item-post" @click="postSave()">保存</view>
</view>
</view>
</view>
</template>
<script>
import District from 'ydui-district/dist/jd_province_city_area_id';
export default {
data() {
return {
username: '',
mobile: '',
citySeld: '',
detailAddr: '',
idDefault: false,
title: '新增收货地址',
show: false,
district: District, //
ready: false,
province: null,
city: null,
area: '',
provinceId: null,
cityId: null,
areaId: null,
columns: [],
id: '',
newProvinceDataList:[
[],[],[]
],
multiIndex: [0, 0, 0],
}
},
onLoad(option){
this.id = option.id
if (option.id > 0) {
this.title = '编辑收货地址'
this.getDetail()
}
else {
this.getSeldCityList()
}
},
methods: {
switchChange(e){
this.idDefault = e.detail.value
},
changeArea(e){
//
this.multiIndex = e.detail.value;
this.citySeld = this.newProvinceDataList[0][this.multiIndex[0]].name + this.newProvinceDataList[1][this.multiIndex[1]].name + this.newProvinceDataList[2][this.multiIndex[2]].name
this.provinceId = this.newProvinceDataList[0][this.multiIndex[0]].id
this.cityId = this.newProvinceDataList[1][this.multiIndex[1]].id
this.areaId = this.newProvinceDataList[2][this.multiIndex[2]].id
},
getSeldCityList() {
let that = this;
that.Post({}, '/api/uservice/user/getAreas').then(res => {
if (res.code === 1) {
var data = res.data;
var result = {};
//
for (var i = 0; i < data.length; i++) {
var item = data[i];
if (item.level === 0) {
continue; //
}
if (item.level === 1) {
//
result[item.id.toString()] = {
id: item.id,
name: item.name,
children: []
};
} else if (item.level === 2) {
//
var provinceId = item.pid.toString();
if (result[provinceId]) {
result[provinceId].children.push({
id: item.id,
name: item.name,
children: []
});
}
} else if (item.level === 3) {
//
var cityId = item.pid.toString();
for (var j = 0; j < Object.keys(result).length; j++) {
var province = result[Object.keys(result)[j]];
for (var k = 0; k < province.children.length; k++) {
var city = province.children[k];
if (city.id.toString() === cityId) {
city.children.push({
id: item.id,
name: item.name
});
break;
}
}
}
}
}
// Object Array
var r = [];
for (var i in result) {
r.push(result[i]);
}
//
that.district = r;
//
let arr = [];
let arr1 = [];
let arr2 = [];
that.district.forEach(item => {
arr.push(item);
});
if (that.district.length > 0 && that.district[0].children.length > 0) {
that.district[0].children.forEach(item => {
arr1.push(item);
});
if (that.district[0].children[0].children.length > 0) {
that.district[0].children[0].children.forEach(item => {
arr2.push(item);
});
}
}
that.columns = arr;
//
that.ready = true;
// newProvinceDataList
that.newProvinceDataList[0] = [];
that.newProvinceDataList[1] = [];
that.newProvinceDataList[2] = [];
for (let i = 0; i < that.columns.length; i++) {
that.newProvinceDataList[0].push({ name: that.columns[i].name, id: that.columns[i].id });
}
if (that.columns.length > 0 && that.columns[0].children.length > 0) {
for (let i = 0; i < that.columns[0].children.length; i++) {
that.newProvinceDataList[1].push({ name: that.columns[0].children[i].name, id: that.columns[0].children[i].id });
}
if (that.columns[0].children[0].children.length > 0) {
for (let i = 0; i < that.columns[0].children[0].children.length; i++) {
that.newProvinceDataList[2].push({ name: that.columns[0].children[0].children[i].name, id: that.columns[0].children[0].children[i].id });
}
}
}
}
});
},
//
pickerColumnchange(e){
//
// console.log(e.detail.column);
//
// console.log(e.detail.value)
//
if(e.detail.column === 0){
this.multiIndex[0] = e.detail.value
// console.log('');
// this.newProvinceDataList[1] = [];
this.newProvinceDataList[1] = this.columns[this.multiIndex[0]].children.map((item,index)=>{
// console.log(item)
return item
})
// console.log(this.multiIndex)
if(this.columns[this.multiIndex[0]].children.length === 1){
this.newProvinceDataList[2] = this.columns[this.multiIndex[0]].children[0].children.map((item,index)=>{
// console.log(item)
return item
})
}else{
this.newProvinceDataList[2] = this.columns[this.multiIndex[0]].children[this.multiIndex[1]].children.map((item,index)=>{
// console.log(item)
return item
})
}
//
this.multiIndex.splice(1, 1, 0)
this.multiIndex.splice(2, 1, 0)
}
//
if(e.detail.column === 1){
this.multiIndex[1] = e.detail.value
// console.log('');
// console.log(this.multiIndex)
this.newProvinceDataList[2] = this.columns[this.multiIndex[0]].children[this.multiIndex[1]].children.map((item,index)=>{
// console.log(item)
return item
})
//
this.multiIndex.splice(2, 1, 0)
}
//
if(e.detail.column === 2){
this.multiIndex[2] = e.detail.value
// console.log('')
// console.log(this.multiIndex)
}
},
getDetail() {
this.Post({
id: this.id
}, "/api/uservice/user/getContactInfoById").then(res => {
res = res.data;
if (res && res.id > 0) {
this.username = res.name
this.mobile = res.tel
this.idDefault = res.is_default == 1 ? true : false
this.provinceId = res.province_id
this.cityId = res.city_id
this.areaId = res.district_id
this.citySeld = res.seldAdd
this.detailAddr = res.detail_addr;
this.getSeldCityList();
}
})
},
postSave() {
this.username = this.username.trim()
this.mobile = this.mobile.trim()
this.detailAddr = this.detailAddr.trim()
if (this.username.length < 1) {
uni.showToast({
title: '请输入姓名',
icon: 'none'
})
return
}
if (this.username.length > 6) {
uni.showToast({
title: '姓名最多6个字',
icon: 'none'
})
return
}
if (!this.IsTel(this.mobile)) {
uni.showToast({
title: '请输入正确的手机号',
icon: 'none'
})
return
}
if (this.citySeld.length < 1) {
uni.showToast({
title: '请选择地区',
icon: 'none'
})
return
}
if (this.detailAddr.length < 2) {
uni.showToast({
title: '请输入具体地址',
icon: 'none'
})
return
}
this.Post({
username: this.username,
mobile: this.mobile,
is_default: this.idDefault ? '1' : '0',
province_id: this.provinceId,
city_id: this.cityId,
district_id: this.areaId,
detail_addr: this.detailAddr,
id: this.id || null
},'/api/uservice/user/' + (this.id > 0 ? 'edit' : 'add') + 'Consignee').then(res => {
if(res.code == 1){
uni.setStorageSync('addressNow',JSON.stringify(res.data))
uni.showModal({
title: '提示',
content: this.id>0?'编辑成功':'添加成功',
showCancel: false,
success: res => {
if(res.confirm){
uni.navigateBack({})
}
}
})
}else{
uni.showModal({
title: '提示',
content: res.msg,
showCancel: false,
success: res => {
}
})
}
})
}
}
}
</script>
<style scoped>
.bg {
min-height: 100vh;
background-color: white;
display: flex;
flex-direction: column;
}
.list-forms {
display: flex;
flex-direction: column;
border-top: 1rpx solid #D8D8D8;
padding: 20rpx 40rpx;
box-sizing: content-box
}
.list-item {
display: flex;
border-bottom: 1rpx solid #D8D8D8;
padding: 30rpx 0;
height: 60rpx;
align-items: center;
box-sizing: content-box
}
.list-item-title {
width: 150rpx;
font-size: 31rpx;
margin-right: 20rpx;
}
.list-item-input {
flex: 1;
}
.list-item-input input {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
border: 0;
background-color: transparent;
line-height: 34rpx;
font-size: 31rpx;
text-align: right;
font-weight: 500;
}
.list-item-input input::placeholder {
font-size: 26rpx;
}
.list-item-switch {
display: flex;
flex: 1;
justify-content: flex-end;
}
.list-item-btn {
display: flex;
justify-content: center;
margin-top: 20rpx;
}
.list-item-post {
display: flex;
color: #FFFFFF;
font-size: 36rpx;
width: 697rpx;
height: 73rpx;
background: #6A8A2D;
border-radius: 37rpx;
justify-content: center;
align-items: center;
margin-top: 650rpx;
}
</style>

272
subPackages/user/myContactsAdd.vue

@ -0,0 +1,272 @@
<template>
<view class="bg">
<view class="list-forms">
<view class="list-item">
<view class="list-item-title">姓名</view>
<view class="list-item-input"><input type="text" v-model="username" placeholder="请输入姓名" /></view>
</view>
<!-- <view class="list-item">
<picker mode="selector" :range="idcardTypeList" range-key="title" @change="changeIdType">
<view class="list-item-title flex-center"
style="border: 1rpx solid #999999;border-radius: 7rpx;padding: 18rpx 19rpx;">{{idcardTypeValue}}
<image src="https://static.ticket.sz-trip.com/yandu/images/user/dui.png" mode=""
style="width: 40rpx;height: 40rpx;margin-left: 48rpx;"></image>
</view>
</picker>
<view class="list-item-input"><input type="text" v-model="idNumber" placeholder="请输入正确的证件号" /></view>
</view> -->
<view class="list-item">
<view class="list-item-title">手机号</view>
<view class="list-item-input"><input type="number" v-model="mobile" placeholder="请输入手机号"
maxlength="11" /></view>
</view>
<view class="list-item">
<view class="list-item-title">身份证号</view>
<view class="list-item-input"><input type="text" v-model="idNumber" placeholder="请输入正确的证件号" /></view>
</view>
<view class="list-item">
<view class="list-item-title">设为默认</view>
<view class="list-item-switch">
<switch :checked="idDefault" @change="switchChange" color="#6A8A2D"/>
</view>
</view>
</view>
<view class="btn" @click="submit">保存</view>
</view>
</template>
<script>
export default {
data() {
return {
username: '',
mobile: '',
idNumber: '',
idcardTypeValue: '身份证',
show: false,
idcardTypeList: [],
document_type: 'DAM01001',
idCardType: 1,
id: '',
type: '',
idDefault: false,
}
},
onLoad(option) {
if (option) {
this.id = option.id
}
if(option && option.type){
this.type = option.type
}
},
onShow() {
this.getIdcardTypeList()
if (this.id) {
this.getDetail()
}
// uni.setNavigationBarTitle({
// title: ''
// })
var pages = getCurrentPages();//
var beforePage = pages[pages.length - 2];//
// if(beforePage.route == 'subPackages/scenic/scenicOrder' || beforePage.route == 'subPackages/venue/venueOrder'){
// uni.setStorageSync('route', 1)
// }
},
methods: {
switchChange(e){
this.idDefault = e.detail.value
},
getDetail() {
this.Post({
id: this.id
}, '/api/uservice/user/getContactInfoById').then(res => {
if (res.code === 1) {
res = res.data
if (res && res.id > 0) {
this.username = res.name
this.mobile = res.tel
this.idNumber = res.id_number
this.idDefault = res.is_default == 1 ? true : false
this.idcardType = res.idcard_type
this.idcardTypeValue = res.document_type_text
this.document_type = res.document_type
}
}
})
},
//
getIdcardTypeList() {
this.Post({}, '/api/uservice/user/getCardTypeList').then(res => {
this.idcardTypeList = res.data
})
},
//
changeIdType(e) {
this.idcardTypeValue = this.idcardTypeList[e.detail.value].title
this.document_type = this.idcardTypeList[e.detail.value].code
this.idCardType = this.idcardTypeList[e.detail.value].type
},
//
submit() {
this.username = this.username.trim()
this.mobile = this.mobile.trim()
this.idNumber = this.idNumber.trim()
if (this.username.length < 1) {
uni.showToast({
title: '请输入姓名',
icon: 'none'
})
return
}
if (!this.IsTel(this.mobile)) {
uni.showToast({
title: '请输入正确的手机号',
icon: 'none'
})
return
}
if (this.idcardTypeValue == '身份证') {
if (!this.idCardNumber(this.idNumber)) {
uni.showToast({
title: '请输入正确的身份证',
icon: 'none'
})
return
}
} else if (this.idcardTypeValue == '护照') {
if (!this.passportValid(this.idNumber)) {
uni.showToast({
title: '请输入正确的护照',
icon: 'none'
})
return
}
} else if (this.idcardTypeValue == '台胞证') {
if (!this.taiwanValid(this.idNumber)) {
uni.showToast({
title: '请输入正确的台胞证',
icon: 'none'
})
return
}
} else if (this.idcardTypeValue == '港澳通行证') {
if (!this.gangaoValid(this.idNumber)) {
uni.showToast({
title: '请输入正确的港澳通行证',
icon: 'none'
})
return
}
} else if (this.idcardTypeValue == '外国人永久居留证') {
if (!this.foreignerValid(this.idNumber)) {
uni.showToast({
title: '请输入正确的外国人永久居留证',
icon: 'none'
})
return
}
} else if (this.idcardTypeValue == '军官证') {
if (!this.officerValid(this.idNumber)) {
uni.showToast({
title: '请输入正确的军官证',
icon: 'none'
})
return
}
}
this.Post({
contactId: this.type == 'edit'?this.id:'',
id_number: this.idNumber,
username: this.username,
mobile: this.mobile,
document_type: this.document_type,
idcard_type: this.idCardType,
is_default: this.idDefault ? '1' : '0',
}, this.type=='edit'?'/api/uservice/user/editContactById':'/api/uservice/user/addNewContact').then(res => {
if (res.code == 1) {
uni.showModal({
title: '提示',
content: '成功',
showCancel: false,
success: res => {
if (res.confirm) {
uni.navigateBack({})
}
}
})
}
})
}
}
}
</script>
<style scoped lang="scss">
.bg {
min-height: 100vh;
background-color: #FFFFFF;
position: relative;
}
.list-forms {
padding: 0 33rpx;
.list-item {
display: flex;
border-bottom: 1rpx solid #D8D8D8;
padding: 30rpx 0;
height: 60rpx;
box-sizing: content-box;
align-items: center;
.list-item-title {
font-size: 34rpx;
margin-right: 20rpx;
}
.list-item-switch {
display: flex;
flex: 1;
justify-content: flex-end;
}
.list-item-input {
flex: 1;
input {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
border: 0;
background-color: transparent;
line-height: 34rpx;
font-size: 31rpx;
text-align: right;
font-weight: 500;
}
input::placeholder {
font-size: 26rpx;
}
}
}
}
.btn {
width: 333rpx;
height: 80rpx;
background: #6A8A2D;
border-radius: 40rpx;
text-align: center;
line-height: 80rpx;
font-size: 36rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FFFFFF;
margin: 271rpx auto 0;
}
</style>

30
subPackages/user/privacyInfo.vue

@ -0,0 +1,30 @@
<template>
<view class="bg">
<view class="text" v-html="formateRichText(content)">
</view>
</view>
</template>
<script>
export default {
data() {
return {
content:''
};
},
onLoad(option){
this.Post({
id:option.id
},'/api/pbservice/Other/getDictionary').then(res => {
this.content = res.data[0].content
})
}
}
</script>
<style lang="scss">
.text{
padding: 20rpx;
}
</style>

408
subPackages/user/profile.vue

@ -0,0 +1,408 @@
<template>
<view v-if="info">
<view class="user-other-info">
<div class="info-avatar-top">
<span>头像</span>
<view @click="uploadImg()">
<image :src="showImg(info.avatar)" mode="aspectFill"
style="width: 80rpx;height: 80rpx;border-radius: 50%;"></image>
</view>
</div>
<navigator url="/subPackages/user/changeNickname" tag="view" class="userinfo-item">
<span>姓名</span>
<view>{{nickname}}</view>
</navigator>
<view class="userinfo-item" @click="showSexSelect = true">
<span>性别</span>
<view @click="$refs.popup.open()">{{gender == 1 ? '' : (gender == 2 ? '' : '保密')}}</view>
</view>
<view class="userinfo-item">
<span>手机号</span>
<view>{{info.mobile}}</view>
</view>
<view class="userinfo-item">
<span>生日</span>
<picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange">
<view class="uni-input">{{birthday}}</view>
</picker>
</view>
<navigator url="/subPackages/user/logout" tag="view" class="userinfo-item">
<span>注销账号</span>
<i>注销后账号无法恢复请谨慎操作</i>
</navigator>
<view class="btn-tao" @click="submit">保存</view>
</view>
<!-- 性别弹框 -->
<uni-popup ref="popup" type="bottom">
<view class="popup-box">
<view class="popup-item flex-center" v-for="(item,index) in sexes" :key="index" @click="changesex(index)">{{item.text}}</view>
<view class="popup-items flex-center" @click="$refs.popup.close()">取消</view>
</view>
</uni-popup>
</view>
</template>
<script>
import {pathToBase64} from "@/static/js/mmmm-image-tools/index.js"
export default {
name: "Profile",
data() {
const currentDate = this.getDate({
format: true
})
return {
date: currentDate,
info: null,
showSexSelect: false,
sexes: [{
value: '1',
text: '男'
},
{
value: '2',
text: '女'
},
{
value: '0',
text: '保密'
}
],
today: null,
showCropper: false,
nickname: '',
gender: '',
birthday: '',
email: '',
fileList1: [],
startDate: '1900-1-1',
endDate: '2050-1-1'
}
},
onShow() {
console.log(this.$store.state.user.userInfo,uni.getStorageSync('userInfo'))
this.getList()
},
computed: {
// startDate() {
// return this.getDate('start');
// },
// endDate() {
// return this.getDate('end');
// }
},
methods: {
getFile(e) {
console.log(e)
},
getList() {
let today = new Date();
today = today.getFullYear() + "/" + (today.getMonth() + 1) + "/" + today.getDate();
this.today = today;
this.Post({}, "/api/uservice/user/getMyInfo").then(res => {
if (!res.data.birthday) {
let date = new Date();
res.data.birthday = date.getFullYear() + "/" + (date.getMonth() + 1) + "/" + date
.getDate();
}
this.info = res.data;
this.nickname = this.info.nickname
this.email = this.info.email
this.birthday = this.info.birthday
this.gender = this.info.gender
this.info.token = JSON.parse(uni.getStorageSync('userInfo')).token || this.$store.state.user.userInfo.token
console.log(this.info)
this.$store.commit('changeUserInfo', this.info)
})
},
uploadImg() {
uni.chooseImage({
success: (chooseImageRes) => {
const tempFilePaths = chooseImageRes.tempFilePaths;
// // #ifdef MP-WEIXIN
// uni.getFileSystemManager().readFile({
// filePath: tempFilePaths[0],
// encoding: 'base64',
// success: res => {
// this.Post({
// method: 'POST',
// base64: 'data:image/png;base64,' + res.data
// }, '/api/common/base64').then(res => {
// if (res.data) {
// this.Post({
// avatar: res.data
// }, '/api/uservice/user/profile').then(res => {
// uni.showModal({
// title: '',
// content: res.msg,
// showCancel: false,
// success: res => {
// if (res.confirm) {
// this.getList()
// }
// }
// })
// })
// }
// })
// }
// })
// // #endif
pathToBase64(tempFilePaths[0]).then(base64 => {
this.Post({
method: 'POST',
base64: base64
}, '/api/common/base64').then(res => {
if (res.data) {
this.Post({
avatar: res.data
}, '/api/uservice/user/profile').then(res => {
uni.showModal({
title: '提示',
content: res.msg,
showCancel: false,
success: res => {
if (res.confirm) {
this.getList()
}
}
})
})
}
})
})
}
});
},
//
bindDateChange: function(e) {
this.birthday = e.detail.value
},
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === 'start') {
year = year - 60;
} else if (type === 'end') {
year = year + 2;
}
month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day;
return `${year}/${month}/${day}`;
},
changesex(index) {
this.gender = this.sexes[index].value
this.$refs.popup.close()
},
submit() {
uni.showModal({
title: '提示',
content: '确认修改您的信息?',
success: res => {
if (res.confirm) {
this.Post({
nickname: this.nickname,
gender: this.gender,
birthday: this.birthday
}, '/api/uservice/user/profile').then(res => {
console.log(res)
if (res.code == 1) {
uni.showModal({
title: '提示',
content: res.msg,
showCancel: false,
success: res => {
if (res.confirm) {
this.getList()
}
}
})
}
})
}
}
})
},
}
}
</script>
<style scoped lang="scss">
view {
box-sizing: content-box;
}
.info-avatar-top {
display: flex;
justify-content: space-between;
font-size: 30rpx;
border-bottom: 1rpx solid #D8D8D8;
padding: 40rpx 0;
height: 48rpx;
color: #333;
align-items: center;
}
.info-avatar-top view{
display: flex;
align-items: center;
}
.info-avatar-top view:after{
content: "";
width: 20rpx;
height: 20rpx;
margin-left: 6rpx;
background-image: url('https://static.ticket.sz-trip.com/tongli/images/user/rightIcon-gray.png');
background-size: 100% 100%;
}
.info-avatar-top img {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
margin-right: 10rpx;
}
.change-avatar-btn {
color: #FFF;
width: 220rpx;
margin: 0 auto;
line-height: 70rpx;
border-radius: 20rpx;
background: #4C93FF;
position: relative;
font-size: 34rpx;
}
.change-avatar-btn input {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
opacity: 0;
}
.user-other-info {
margin: 30rpx;
}
.userinfo-item {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 30rpx;
border-bottom: 1rpx solid #D8D8D8;
padding: 40rpx 30rpx 40rpx 0;
height: 48rpx;
color: #333;
position: relative;
}
.info-avatar-top span {
font-weight: 500;
font-size: 31rpx;
flex-shrink: 0;
}
.userinfo-item span {
font-weight: 500;
font-size: 31rpx;
flex-shrink: 0;
color: #000;
}
.userinfo-item i {
font-weight: 500;
font-size: 24rpx;
color: #999999;
}
.userinfo-item {
& view::after {
content: "";
width: 20rpx;
height: 20rpx;
margin-left: 6rpx;
background-image: url('https://static.ticket.sz-trip.com/tongli/images/user/rightIcon-gray.png');
background-size: 100% 100%;
position: absolute;
right: 0;
margin: auto;
top: 0;
bottom: 0;
}
}
.birthday-box {
text-align: right;
}
.cropper {
width: auto;
height: 100%;
}
.cropper-content {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 1000;
}
.dialog-footer .change-avatar-btn {
position: fixed;
text-align: center;
bottom: 80rpx;
left: 50%;
margin-left: -110rpx;
}
.btn-tao {
text-align: center;
font-weight: 500;
font-size: 36rpx;
width: 697rpx;
height: 80rpx;
background: #6A8A27;
border-radius: 11rpx;
line-height: 80rpx;
color: #FFFFFF;
position: fixed;
left: 26rpx;
bottom: 100rpx;
}
.popup-box {
border-radius: 20rpx 20rpx 0rpx 0rpx;
background: #fff;
overflow: hidden;
.popup-item {
width: 697rpx;
height: 99rpx;
font-weight: 500;
font-size: 31rpx;
color: #12293C;
margin: auto;
}
.popup-item:nth-child(2) {
border: none;
border-bottom: 1rpx solid #D8D8D8;
border-top: 1rpx solid #D8D8D8;
}
.popup-items {
width: 100%;
height: 99rpx;
font-weight: 500;
font-size: 31rpx;
color: #12293C;
border-top: 13rpx solid #F2F2F2;
}
}
</style>

357
subPackages/user/travelerList.vue

@ -0,0 +1,357 @@
<template>
<view class="bg">
<view class="cancat-nav flex-around">
<view :class="['concat-nav-item',showType==0?'active':'']" @click="showType=0">
<view>出行人信息</view>
<view v-if="showType==0" class="active-bar"></view>
</view>
<view :class="['concat-nav-item',showType==1?'active':'']" @click="showType=1">
<view>收货地址</view>
<view v-if="showType==1" class="active-bar"></view>
</view>
</view>
<!-- 出行人信息 -->
<view v-if="showType==0">
<view class="item" v-for="(item,index) in travelList" :key="index">
<view class="name">
<view class="">
{{item.name}}
</view>
<view class="">
{{item.tel}}
<span v-if="item.is_default==1">默认</span>
</view>
</view>
<view class="idcard">
<view class="">
{{item.title}}:
</view>
<view class="">
{{item.id_number}}
</view>
</view>
<view class="item-btn">
<view class="choice">
<!-- <image src="https://static.ticket.sz-trip.com/yandu/images/user/dui.png" mode="aspectFill"
v-if="item.is_default==1">
</image>
<view class="yuan" v-else @click.stop="defaultC(item)">
</view>
<view class="">
默认出行人
</view> -->
</view>
<view class="btn-list">
<view class="btn-item" @click.stop="edit(item.id)">
修改
</view>
<view class="btn-item" @click.stop="delet(item)">
删除
</view>
</view>
</view>
</view>
</view>
<!-- 收货地址 -->
<view v-else>
<view class="item" v-for="(item,index) in addressList" :key="index">
<view class="name">
<view>
{{item.name}}
</view>
<view class="">
{{item.tel}}
<span v-if="item.is_default==1">默认</span>
</view>
</view>
<view class="idcard">
<view class="">
收货地址:
</view>
<view class="text-overflow">
{{item.address}}
</view>
</view>
<view class="item-btn" style="justify-content: flex-end;">
<view class="btn-list">
<view class="btn-item" @click.stop="edit(item.id)">
修改
</view>
<view class="btn-item" @click.stop="delet(item)">
删除
</view>
</view>
</view>
</view>
</view>
<view class="btn-box">
<navigator :url="showType ? '/subPackages/user/myAddressAdd' : '/subPackages/user/myContactsAdd'" class="btn">
{{showType ? '添加收货地址' : '添加联系人'}}
</navigator>
</view>
</view>
</template>
<script>
export default {
name: "travelerList",
data() {
return {
showType: 0,
travelList: [],
addressList: []
};
},
onLoad(option) {
this.showType = option.showType
console.log(this.showType)
},
onShow() {
this.init()
},
methods: {
init () {
//
this.Post({contactType: 'CONTACT',offset: 0,limit: 100}, "/api/uservice/user/getContactOrConsignee").then(res => {
if (res) this.travelList = res.data
})
//
this.Post({contactType: 'CONSIGNEE',offset: 0,limit: 100}, '/api/uservice/user/getContactOrConsignee').then(res => {
if(res) this.addressList = res.data
})
},
delet(item) {
let that = this
uni.showModal({
title: '提示',
content: '确定要删除该出行人吗?',
success: function(res) {
if (res.confirm) {
if(that.showType == 0) {
that.Post({
contactId: item.id
}, "/api/uservice/user/delContact").then(res => {
if (res) {
uni.showToast({
icon: "none",
title: res.msg
})
}
that.init()
})
}else {
that.Post({
id: item.id
}, "/api/uservice/user/delConsignee").then(res => {
if (res) {
uni.showToast({
icon: "none",
title: res.msg
})
}
that.init()
})
}
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
defaultC(item) {
this.Post({
id: item.id,
is_default: 1
}, "/api/user/editContact").then(res => {
if (res.code == 1) {
this.travelList.forEach(i => i.is_default = 0)
item.is_default = !item.is_default
}
})
},
//
edit(id){
let url = ''
if(this.showType) {
url = '/subPackages/user/myAddressAdd?id='+id
}else {
url = "/subPackages/user/myContactsAdd?type=edit&id="+id
}
uni.navigateTo({
url: url
});
}
}
}
</script>
<style lang="scss" scoped>
.bg {
position: relative;
background: #F7F7F7;
height: 100vh;
overflow-x: hidden;
padding-bottom: 200rpx;
}
.cancat-nav{
width: 100%;
display: flex;
height: 112rpx;
flex-shrink: 0;
background-color: #fff;
.concat-nav-item{
ffont-weight: 500;
font-size: 35rpx;
color: #000000;
height: 100%;
text-align: center;
position: relative;
padding-top: 35rpx;
}
.concat-nav-item.active{
color: #000000;
}
.active-bar{
width: 73rpx;
height: 7rpx;
background: #515150;
border-radius: 3rpx;
margin: auto;
position: absolute;
bottom: 0;
left: 0;
right: 0;
}
}
.item {
width: 697rpx;
background: #FFFFFF;
border-radius: 13rpx;
margin: 28rpx auto 0;
padding: 26rpx;
.name,
.idcard {
display: flex;
font-size: 31rpx;
font-weight: bold;
color: #333333;
}
.name {
view:last-child{
margin-left: 40rpx;
}
span {
padding: 3rpx 9rpx;
background: #515150;
border-radius: 7rpx;
font-weight: bold;
font-size: 24rpx;
color: #FFFFFF;
margin-left: 15rpx;
}
}
.idcard {
margin-top: 26rpx;
view:last-child {
margin-left: 14rpx;
font-weight: 400;
max-width: 492rpx;
}
}
.item-btn {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 40rpx;
.choice {
display: flex;
align-items: center;
view:last-child {
margin-left: 20rpx;
font-size: 27rpx;
font-weight: 500;
color: #333333;
}
image {
width: 40rpx;
height: 40rpx;
}
.yuan {
width: 40rpx;
height: 40rpx;
background: rgba(255, 200, 37, 0);
border: 1rpx solid #999999;
border-radius: 20rpx;
}
}
.btn-list {
display: flex;
align-items: center;
view {
width: 134rpx;
height: 54rpx;
background: #FFFFFF;
border: 1px solid #999999;
border-radius: 27rpx;
font-size: 27rpx;
font-weight: 500;
color: #333333;
line-height: 52rpx;
text-align: center;
}
view:last-child {
margin-left: 14rpx;
}
}
}
}
.btn-box {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 200rpx;
background-color: #fff;
.btn {
width: 697rpx;
line-height: 80rpx;
background: #6A8A2D;
border-radius: 37rpx;
font-weight: 500;
font-size: 36rpx;
color: #fff;
text-align: center;
position: fixed;
bottom: 53rpx;
left: 26.67rpx;
}
}
</style>

2
uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue

@ -152,7 +152,7 @@
.uni-calendar-item--isDay-text {
// color: $uni-primary;
color: #C3282E;
color: #6A8A2D;
}
.uni-calendar-item--isDay {

Loading…
Cancel
Save