sadjv3_jishi/pages/order/index.vue

1088 lines
31 KiB
Vue
Raw Normal View History

2024-06-05 19:14:51 +08:00
<!-- 菜单悬浮的原理: 通过给菜单添加position:sticky实现, 用法超简单, 仅APP端的低端机不兼容 https://caniuse.com/#feat=css-sticky -->
<template>
2024-06-26 16:58:53 +08:00
<view class="content">
2024-06-05 19:14:51 +08:00
<!-- 对于mescroll-body: 需设置:sticky="true", 此应避免在mescroll-body标签前面加其他非定位的元素, 否则下拉区域会被挤出, 无法会隐藏.-->
<!-- 对于mescroll-uni: 则无需设置:sticky="true", 无其他限制和要求 -->
<!-- sticky吸顶悬浮的菜单, 父元素必须是 mescroll -->
<view class="sticky-tabs">
2024-06-26 16:58:53 +08:00
<view class=" u-flex padding ding-view">
2024-06-05 19:14:51 +08:00
<view class="u-m-r-10">
<image :src="avatar" style="width: 100rpx;height: 100rpx;border-radius: 100rpx;"
@click="goNav('/pages/my/userinfo')"></image>
</view>
<view class="u-flex-1 u-m-l-10 " v-if="isLogin && userName">
<view class="u-font-18 text-bold">
2024-06-26 16:58:53 +08:00
<view class="flex align-center" style="justify-content: space-between;">
2024-06-05 19:14:51 +08:00
<view class="margin-left-sm " style="color: #ffffff;">{{ userName }}</view>
2024-06-26 16:58:53 +08:00
<view class="labe zhuangtai" @tap="stateSave">
2024-06-05 19:14:51 +08:00
<view v-if="isTrue">已上线</view>
<view v-if="!isTrue">已离线</view>
</view>
</view>
<view class="flex margin-left-sm margin-top-xs"
style="font-size: 22rpx;font-weight: 500;color: #ffffff;">
<view v-if="renzheng == 0" @click.stop="goNav('/my/renzheng/index?classify=' + 1)">
暂未实名认证
</view>
<view v-if="renzheng == 1" @click.stop="goNav('/my/renzheng/index?classify=' + 1)">
实名审核中
</view>
<view v-if="renzheng == 2">
已实名认证
</view>
<view v-if="renzheng == 3" @click.stop="goNav('/my/renzheng/index?classify=' + 1)">
实名已拒绝
</view>
</view>
</view>
</view>
<view v-else class="text-xl u-p-l-20 text-bold" @click="goLogin('/pages/public/login')"
style="color: #ffffff;">
登录
</view>
</view>
<!-- <view class="flex align-center padding-left bg">
<image src="../../static/images/data.png" style="width: 26upx;height: 26upx;"></image>
<view class="margin-left-xs flex align-center" style="color: #999999;">
<view @click="bindData(1)">{{startTime?startTime:'开始时间'}}</view>
<view @click="bindData(2)">{{endTime?endTime:'结束时间'}}</view>
</view>
</view> -->
<!-- <me-tabs v-model="tabIndex" nameKey='title' :tabs="tabs" @change="tabChange"></me-tabs> -->
<u-tabs :list="tabs" :is-scroll="true" :current="tabIndex" @change="tabChange" active-color="#000000"
inactive-color="#999999" :customStyle="{ 'background-color': '#050505' }" isShowImg textClass="">
</u-tabs>
</view>
<mescroll-body :sticky="true" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
2024-06-26 16:58:53 +08:00
style="padding: 0 16px;width: 100%;min-height: 100vh;">
2024-06-05 19:14:51 +08:00
<!-- 数据列表 -->
<!-- <view v-if="goods.length > 0" class="margin-sm padding-sm bg radius" v-for="(item,index) in goods"
:key='index' @click="clickItem(item)"> -->
2024-06-26 16:58:53 +08:00
<view class="bgwhite radius margin-bottom-sm padding-bottom-sm" v-for="(item, index) in goods" :key='index'
@click="goNav('/my/order/revenueDetails?ordersId=' + item.ordersId)">
2024-06-05 19:14:51 +08:00
<view class="flex justify-between padding-sm">
<view class="text-green" v-if="item.status == 1">待付款...</view>
<view class="text-green" v-if="item.status == 2">待服务</view>
2024-06-26 16:58:53 +08:00
<view class="text-green" v-if="item.status == 3">已完成</view>
2024-06-05 19:14:51 +08:00
<view class="text-green" v-if="item.status == 6">服务中</view>
<view class="text-green" v-if="item.status == 7">已出发</view>
<view class="text-green" v-if="item.status == 8">已到达</view>
2024-06-26 16:58:53 +08:00
<view class="text-green" v-if="item.status == 5">待评价</view>
2024-06-05 19:14:51 +08:00
<view class="text-green" v-if="item.status == 4" style="color: #999999;">已取消</view>
<view v-if="item.overTimeOrders == 1" style="color: red;font-size: 26rpx">(订单已超时)</view>
<!-- <view class="text-green" v-if="item.state ==1 ||item.state ==2">待完成</view>
<view class="text-green" v-if="item.state ==3||item.state ==4">已完成</view> -->
<view class="text-green">预约时间{{ item.serveTime }}</view>
2024-06-26 16:58:53 +08:00
<view v-if="item.status == 9&&item.refusalContent!=''" class="judan">
拒单审核中...
</view>
2024-06-05 19:14:51 +08:00
</view>
<view class="xian"></view>
<view class=" u-flex u-p-t-30 padding-sm">
<view class="u-m-r-10">
<u-avatar :src="item.massageImg ? item.massageImg : '../../static/logo.png'" mode="square"
size="100">
</u-avatar>
</view>
<view class="u-flex-1 margin-left-xs">
2024-06-26 16:58:53 +08:00
<view class="u-font-18 text-bold u-line-1 top-title">
<view class="margin-right-xs text-df margin-left-xs" style="margin-top: 0rpx;display: inline-block;width: 105px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
2024-06-05 19:14:51 +08:00
{{ item.title }}
</view>
2024-06-26 16:58:53 +08:00
<view class="flex-sub ">
实收<text class="text-df"></text><text class="text-xl text-bold">{{ item.sumArtificerMoney
}}</text>
</view>
2024-06-05 19:14:51 +08:00
</view>
<view class="margin-left-xs text-cut" style="width:550upx">{{ item.address }}</view>
</view>
</view>
<view class="flex u-p-t-20 justify-between align-center padding-sm">
2024-06-26 16:58:53 +08:00
<view class="flex text-right" style="width: 100%;flex-direction: column;">
2024-06-05 19:14:51 +08:00
<!-- <u-button v-if="item.status == 1" :custom-style="customStyle" shape="circle" :plain="true"
@click="cancelOrder(item)">取消订单</u-button> -->
<!-- <u-button v-if="item.status == 1" :custom-style="customStyle1" shape="circle" :plain="true"
2024-06-26 16:58:53 +08:00
@click="goNav('/my/order/pay?id=' + item.ordersId + '&isTrue=1')">查看详情</u-button> -->
<view class="showBtn">
<view class="gengduo" @click.stop="gengBtn(index)">更多</view>
<view class="showBtn-view">
<u-button :custom-style="customStyle" shape="circle" :plain="true"
@click="goChat">联系客服</u-button>
<u-button :custom-style="customStyle" v-if="item.status == 1||item.status == 7||item.status == 8||item.status == 9" shape="circle" :plain="true"
@click="bindphone(item.phone)">联系客户</u-button>
</view>
</view>
<view class="hideBtn" v-show="btnShow==index" style="justify-content: end;">
<u-button :custom-style="customStyle1" shape="circle" :plain="true"
@click="cxOrder(item)" v-show="item.status == 2">现在出发</u-button>
<u-button :custom-style="customStyle1" shape="circle" :plain="true"
@click="cxOrder(item)" v-if="item.status == 7">我已到达</u-button>
<u-button :custom-style="customStyle1" shape="circle" :plain="true"
@click="fuwuOrder(item)" v-if="item.status == 8">开始服务</u-button>
<u-button :custom-style="customStyle1" shape="circle" :plain="true"
@click="goChat">转待补单</u-button>
<u-button v-if="item.status == 6" :custom-style="customStyle1" shape="circle" :plain="true"
@click="cancel(item)">服务完成</u-button>
<u-button v-if="item.status == 9&&item.refusalContent==''||item.refusalContent==null" :custom-style="customStyle1" shape="circle" :plain="true"
@click="toggle('bottom',item.ordersId)">拒单申请</u-button>
<!-- refusalContent不等于空并且status == 9 就是拒单审核中 -->
<u-button v-if="item.status == 9&&item.refusalContent==''||item.refusalContent==null" :custom-style="customStyle1" shape="circle" :plain="true"
@click="nineState(item.ordersId)">确认接单</u-button>
</view>
2024-06-05 19:14:51 +08:00
</view>
</view>
<view class="xian" v-if="item.status == 6"></view>
<view class="pintuan_syrs flex justify-between" v-if="item.status == 6">
<view style="font-size: 28rpx;font-family: PingFang SC;font-weight: bold;color: #096f4b;">服务倒计时
</view>
<u-count-down :timestamp="endOfServiceTimer" separator-color="#20C675" color="#20C675"
font-size="30" separator-size="30"></u-count-down>
<!-- <uni-countdown ref="countDownEl" :title="'剩余'" :showDay="false" :fontSize="'14'"
:hour="item.endTime.hour" :minute="item.endTime.minute" :second="item.endTime.second"
color="#20C675" /> -->
<!-- <uni-countdown :day="item.endTime.day" :hour="item.endTime.hour" :minute="item.endTime.minute"
:second="item.endTime.second">
</uni-countdown> -->
</view>
</view>
<empty v-if="goods.length == 0"></empty>
<!-- 开始时间 -->
<u-picker v-model="startshow" mode="time" :params="paramsStart" @confirm="startData"></u-picker>
<!-- 结束时间 -->
<u-picker v-model="endshow" mode="time" :params="paramsEnd" @confirm="endData"></u-picker>
</mescroll-body>
2024-06-26 16:58:53 +08:00
<view>
<!-- 普通弹窗 -->
<uni-popup ref="popup" type="bottom" background-color="#fff">
<view class="popup-content">
<view class="popup-head">
<span></span>
<span @click="closePopup(type)">x</span>
</view>
<view class="popup-mian">
<view class="popup-view">
<view class="beizhu">
<view class="popup-title">拒绝申请原因</view>
<textarea class="beizhu-textarea" @input="refusa" placeholder="拒绝申请原因,请在此输入" name="" id="" cols="30" rows="10"></textarea>
</view>
</view>
<view class="popup-mian-btn">
<span @click="closePopup(type)">
取消
</span>
<span @click="juJueState()">
确定
</span>
</view>
</view>
</view>
</uni-popup>
</view>
2024-06-05 19:14:51 +08:00
</view>
</template>
<script>
import MescrollMixin from "@/components/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
import mescrollBody from "@/components/mescroll-uni/components/mescroll-body/mescroll-body.vue";
import meTabs from "@/components/mescroll-uni/me-tabs/me-tabs.vue";
import empty from '@/components/empty.vue'
import * as websocketUtils from 'utils/websocketUtils.js';
export default {
mixins: [MescrollMixin], // 使用mixin
components: {
mescrollBody,
meTabs,
empty
},
data() {
return {
2024-06-26 16:58:53 +08:00
btnShow:'',
refusalContent:'',
type:'center',
jordersId:'',
2024-06-05 19:14:51 +08:00
endOfServiceTimer: null,
goods: [], // 数据列表
num: 1,
game: [],
tabs: [{
//这四个都支持支持class,style,src,onClick,等html内容
//选中图片
activityImageProps: {
src: '../../static/images/order_01.png',
style: 'width: 26px;height: 26px;',
},
//未选中时的样式
noactivityImageProps: {
src: '../../static/images/order_011.png',
style: 'width: 26px;height: 26px;',
},
//选中时的文字
activityTitleTextProps: {
class: 'activityTitleTextProps',
},
//未选中时的文字
noactivityTitleTextProps: {
class: 'noactivityTitleTextProps',
},
name: '今日订单',
status: '1'
}, {
activityImageProps: {
src: '../../static/images/order_02.png',
style: 'width: 26px;height: 26px;',
},
noactivityImageProps: {
src: '../../static/images/order_022.png',
style: 'width: 26px;height: 26px;',
},
activityTitleTextProps: {
class: 'activityTitleTextProps',
},
noactivityTitleTextProps: {
class: 'noactivityTitleTextProps',
},
name: '待服务',
status: '2'
}, {
activityImageProps: {
src: '../../static/images/order_03.png',
style: 'width: 26px;height: 26px;',
},
noactivityImageProps: {
src: '../../static/images/order_033.png',
style: 'width: 26px;height: 26px;',
},
activityTitleTextProps: {
class: 'activityTitleTextProps',
},
noactivityTitleTextProps: {
class: 'noactivityTitleTextProps',
},
name: '已完成',
status: '3'
}, {
activityImageProps: {
src: '../../static/images/order_04.png',
style: 'width: 26px;height: 26px;',
},
noactivityImageProps: {
src: '../../static/images/order_044.png',
style: 'width: 26px;height: 26px;',
},
activityTitleTextProps: {
class: 'activityTitleTextProps',
},
noactivityTitleTextProps: {
class: 'noactivityTitleTextProps',
},
name: '历史订单',
status: '4'
}],
tabIndex: 0, // tab下标
isTrue: true,
page: 1,
limit: 10,
userId: 0,
status: 1,
nickName: '',
customStyle: {
color: '#999999',
border: '2rpx solid #999999',
// backgroundColor: '#1E1F31',
border: "8rpx",
width: '180rpx',
height: '54rpx',
margin: "0 0 0 20rpx"
},
customStyle1: {
color: '#096f4b',
border: '2rpx solid #096f4b',
border: "8rpx",
width: '180rpx',
height: '54rpx',
margin: "0 0 0 20rpx"
},
latitude: '',
longitude: '',
avatar: '../../static/logo.png',
isLogin: true,
userName: '',
renzheng: 0,
startshow: false,
endshow: false,
paramsStart: {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false
},
paramsEnd: {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false
},
startTime: '',
endTime: '',
}
},
onLoad() {
this.$queue.showLoading("加载中...");
this.userId = uni.getStorageSync('userId')
this.nickName = uni.getStorageSync('nickName')
let that = this;
uni.getLocation({
type: 'wgs84',
success: function(res) {
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
that.$queue.setData('longitude', res.longitude);
that.$queue.setData('latitude', res.latitude);
that.latitude = res.latitude
that.longitude = res.longitude
}
});
},
onShow() {
let that = this;
this.userId = uni.getStorageSync('userId')
if (this.userId) {
this.getArtificer()
this.isLogin = true
this.getUserInfo()
} else {
this.isLogin = false
this.userName = ''
this.browse = 0
this.fans = 0
this.follow = 0
this.visitor = 0
this.avatar = '../../static/logo.png'
}
setTimeout(d => {
this.mescroll.resetUpScroll()
}, 1000)
this.upCallback({
num: this.num
});
},
watch: {
isTrue(newValue) {
if (newValue) {
this.$queue.showToast('您已上线');
} else {
this.$queue.showToast('您已离线');
}
},
isLogin(newValue) {
if (!newValue) {
this.goods = [];
}
}
},
methods: {
2024-06-26 16:58:53 +08:00
goLogin(e) {//登录
uni.navigateTo({
url: e
})
},
fuwuOrder(e) {
uni.navigateTo({
url:'/my/order/revenueDetails?ordersId='+e.ordersId
})
},
cxOrder(e) {//开始出发
let contentName = '确认已经出发了吗?';
if (e.status == 7) {
contentName = '确认到达服务地点准备开始服务了吗?';
}
let that = this
uni.showModal({
title: '提示',
content: contentName,
success: function(res) {
if (res.confirm) {
let data = {
ordersId: e.ordersId
}
that.$queue.showLoading('提交中...')
that.$Request.post('/app/artificer/artificerStartOrEndTime', data).then(res => {
uni.hideLoading();
if (res.code == 0) {
that.mescroll.resetUpScroll()
uni.showToast({
title:'出发成功!'
})
} else {
that.$queue.showToast(res.msg);
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
gengBtn(index){
console.log(11)
this.btnShow=index
// this.btnShow=!this.btnShow
},
goChat() {//联系客服
let kefu = this.$queue.getData('kefu'); // 用户端联系方式 1 手机号 2企业微信
let kefuPhone = this.$queue.getData('kefuPhone');
if (uni.getStorageSync('token')) {
if (kefu == 1) {
uni.makePhoneCall({
phoneNumber: kefuPhone //仅为示例
});
} else {
// #ifdef MP-WEIXIN
let that = this
try {
wx.openCustomerServiceChat({
extInfo: {
url: that.$queue.getData('kefuUrl')
},
corpId: that.$queue.getData('kefuAppId'),
success(res) {},
fail(res) {
console.error(res)
}
})
} catch (error) {
console.error("catchcatch" + error)
uni.showToast({
title: '请更新至微信最新版本'
});
}
// #endif
// #ifndef MP-WEIXIN
let url = this.$queue.getData('kefuUrl');
if (url.indexOf('/pages/') !== -1 || url.indexOf('/my/') !== -1) {
uni.navigateTo({
url
});
} else {
//#ifndef H5
uni.navigateTo({
url: '/pages/index/webView?url=' + url
});
//#endif
//#ifdef H5
window.location.href = url;
//#endif
}
// #endif
}
} else {
uni.showModal({
title: '提示',
content: '您还未登录,请先登录',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
uni.navigateTo({
url: '/pages/public/login'
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
}
},
refusa(e){//拒绝接单 原因
this.refusalContent=e.detail.value
},
closePopup(type){// 关闭弹出框
this.type = type
this.$refs.popup.close(type);
},
toggle(type,ordersId) {// 弹出框
this.jordersId = ordersId;
this.type=type;
// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
this.$refs.popup.open(type)
},
juJueState(){
var that=this
if(that.refusalContent){
that.$Request.getT("/app/artificer/jishiJdsq",{
ordersId:that.jordersId,
refusalContent:that.refusalContent
}).then(res => {
if (res.code == 0) {
that.$queue.showToast(res.msg);
this.$refs.popup.close(this.type);
} else {
that.$queue.showToast(res.msg);
}
});
}else{
uni.showToast({
icon:"error",
title:'请填写拒单原因'
})
}
},
nineState(ordersId){//确认接单
this.$Request.getT("/app/artificer/jishiQueren",{
ordersId:ordersId
}).then(res => {
if (res.code == 0) {
that.$queue.showToast(res.msg);
} else {
that.$queue.showToast(res.msg);
}
});
},
2024-06-05 19:14:51 +08:00
//获取理疗师的信息
getArtificer() {
this.$Request.getT("/app/artificer/selectArtificer").then(res => {
if (res.code == 0) {
if (res.data) {
if (res.data.status == 1) {
this.isTrue = true
} else if (res.data.status == 2) {
this.isTrue = false
}
} else {
this.isTrue = false
}
websocketUtils.changeGoLiveFn(this.isTrue);
uni.setStorageSync('artificerId', res.data?.artificerId)
}
});
},
stateSave() {
this.$Request.postT('/app/artificer/updateArtificer').then(res => {
if (res.code == 0) {
this.getArtificer();
} else {
this.$queue.showToast(res.msg);
}
});
},
// 拨打电话
bindphone(phone) {
let that = this
uni.showModal({
title: '提示',
content: '是否拨打电话',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定', phone);
uni.makePhoneCall({
phoneNumber: phone //仅为示例
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
/*下拉刷新的回调 */
downCallback() {
// 这里加载你想下拉刷新的数据, 比如刷新轮播数据
// loadSwiper();
// 下拉刷新的回调,默认重置上拉加载列表为第一页 (自动执行 page.num=1, 再触发upCallback方法 )
this.mescroll.resetUpScroll()
},
timeFormat(param) {
return param < 10 ? '0' + param : param;
},
/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
upCallback(page) {
// debugger;
if (!this.isLogin) {
uni.hideLoading();
if (this.mescroll) this.mescroll.endSuccess(); // 隐藏加载状态栏
return;
}
// debugger;
let curTab = this.tabs[this.tabIndex].status
this.num = page.num;
let data = {
type: curTab,
page: page.num,
limit: page.size,
startTime: this.startTime,
endTime: this.endTime
}
this.$Request.get('/app/artificer/selectTodayOrder', data).then(res => {
uni.hideLoading();
this.mescroll.endBySize(res.data.list.length, res.data.totalCount)
if (page.num == 1) this.goods = []; //如果是第一页需手动制空列表
this.goods = [...this.goods, ...res.data.list]; //追加新数据
this.goods.forEach(ret => {
switch (ret.state) {
case '1':
ret.statusName = '今日订单'
break;
case '2':
ret.statusName = '待完成'
break;
case '3':
ret.statusName = '已完成'
break;
case '4':
ret.statusName = '历史订单'
break;
}
if (ret.status == 6 && ret.endTime) {
let afterTimeStamp = new Date(ret.endTime).getTime() / 1000;
let currentTimeStamp = new Date().getTime() / 1000;
let formatTimeStamp = Math.floor(afterTimeStamp - currentTimeStamp);
this.endOfServiceTimer = formatTimeStamp;
}
if (this.$refs.countDownEl) this.$refs.countDownEl.update();
})
this.mescroll.endSuccess(res.data.list.length); // 隐藏加载状态栏
}).catch(() => {
//联网失败, 结束加载
this.mescroll.endErr();
});
},
// 切换菜单
tabChange(index) {
this.tabIndex = index
this.goods = []; // 置空列表,显示加载进度条
this.mescroll.resetUpScroll()
},
// 取消订单
cancelOrder(e) {
let that = this
uni.showModal({
title: '提示',
content: '确认取消订单吗?取消订单将会被扣除信用分!',
success: function(res) {
if (res.confirm) {
let data = {
ordersId: e.ordersId,
}
that.$queue.showLoading('提交中...')
that.$Request.post('/app/artificer/deleteOrders', data).then(res => {
uni.hideLoading();
if (res.code == 0) {
that.mescroll.resetUpScroll()
} else {
that.$queue.showToast(res.msg);
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
// 完成订单
cancel(e) {
2024-06-26 16:58:53 +08:00
console.log(11)
2024-06-05 19:14:51 +08:00
let that = this
uni.showModal({
title: '提示',
content: '如果服务未完成点击完成订单会遭到平台违规处理,请确认服务是否完毕?',
success: function(res) {
if (res.confirm) {
let data = {
ordersId: e.ordersId,
accomplishLongitude: that.longitude,
accomplishLatitude: that.latitude
}
that.$queue.showLoading('提交中...')
that.$Request.post('/app/artificer/accomplishOrders', data).then(res => {
uni.hideLoading();
if (res.code == 0) {
that.mescroll.resetUpScroll()
websocketUtils.uploadAudioEnd(); //关闭音频上传
} else {
that.$queue.showToast(res.msg);
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
//时间弹框开关
bindData(index) {
console.log(index, 1111)
if (index == 1) {
this.startshow = true
} else if (index == 2) {
this.endshow = true
}
},
//开始时间
startData(e) {
// console.log(e)
this.startTime = e.year + ' ' + e.month + '-' + e.day
},
// 结束时间
endData(e) {
this.endTime = e.year + ' ' + e.month + '-' + e.day
// console.log(this.endTime)
this.mescroll.resetUpScroll()
},
goNav(e, name) {
console.log(e)
if (this.userId) {
uni.navigateTo({
url: e
})
} else {
uni.showModal({
title: '提示',
content: '您还未登录,请先登录',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
uni.navigateTo({
url: '/pages/public/login'
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
}
},
getUserInfo() {
this.$Request.get("/app/user/selectUserById").then(res => {
if (res.code == 0) {
this.userName = res.data.userName
this.invitationCode = res.data.invitationCode
this.avatar = res.data.avatar ? res.data.avatar : '../../static/logo.png'
this.isAuthentication = res.data.isAuthentication
// uni.setStorageSync('isAuthentication', res.data.isAuthentication)
uni.setStorageSync('avatar', res.data.avatar)
uni.setStorageSync('invitationCode', res.data.invitationCode)
uni.setStorageSync('zhiFuBao', res.data.zhiFuBao)
uni.setStorageSync('zhiFuBaoName', res.data.zhiFuBaoName)
if (res.data.isAuthentication == 0 || res.data.isAuthentication == null) {
this.renzheng = 0
uni.setStorageSync("renzheng", this.renzheng)
} else if (res.data.isAuthentication == 1) {
this.renzheng = 1
uni.setStorageSync("renzheng", this.renzheng)
} else if (res.data.isAuthentication == 2) {
this.renzheng = 2
uni.setStorageSync("renzheng", this.renzheng)
} else if (res.data.isAuthentication == 3) {
this.renzheng = 3
uni.setStorageSync("renzheng", this.renzheng)
} else if (res.data.isAuthentication == 4) {
this.renzheng = 4
uni.setStorageSync("renzheng", this.renzheng)
} else if (res.data.isAuthentication == 5) {
this.renzheng = 5
uni.setStorageSync("renzheng", this.renzheng)
} else if (res.data.isAuthentication == 6) {
this.renzheng = 6
uni.setStorageSync("renzheng", this.renzheng)
}
}
});
},
2024-06-26 16:58:53 +08:00
2024-06-05 19:14:51 +08:00
}
}
</script>
<style lang="scss">
2024-06-26 16:58:53 +08:00
/deep/.u-size-default{
margin-top: 5px !important;
}
.gengduo{
font-weight: 400;
font-size: 25rpx;
color: #7D7D7D;
}
.showBtn-view{
display: flex;
flex-direction: row;
align-items: center;
}
.showBtn{
justify-content: space-between;
}
.showBtn,.hideBtn{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
justify-content: space-between;
}
/deep/.text-xl{
font-size: 15px;
}
.flex-sub{
text-align: right;
font-size: 13px;
}
.top-title{
width: 95%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.judan{
color:#096f4b;
}
.beizhu-textarea{
width: 100%;
height: 199rpx;
background-color: rgba(226, 226, 226, 0.3);
border-radius: 14rpx;
padding: 10px;
}
.popup-title{
font-weight: bold;
font-size: 29rpx;
color: #333333;
margin-bottom: 10px;
}
.beizhu{
width: 100%;
display: flex;
margin-top: 20px;
flex-direction: column;
}
.popup-view{
width: 100%;
display: flex;
flex-direction: column;
}
.popup-mian-btn span:nth-child(1){
background: linear-gradient(90deg, #FE912E, #FF9970);
}
.popup-mian-btn span:nth-child(2){
background: linear-gradient(90deg, #019C88, #28BA92, #35C495);
}
.popup-mian-btn span{
width: 247rpx;
height: 77rpx;
line-height: 77rpx;
text-align: center;
font-weight: 400;
font-size: 32rpx;
color: #FFFEFE;
border-radius: 39rpx;
}
.popup-mian-btn{
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
margin-top: 10px;
}
.popup-mian{
width: 88%;
display: flex;
flex-direction: column;
margin: 5px auto 0px auto;
}
.popup-head span:nth-child(2){
width: 50rpx;
height: 50rpx;
line-height: 19px;
text-align: center;
font-size: 24px;
color: #15AB8D;
border-radius: 50%;
border: 3px solid #15AB8D;
}
.popup-head span:nth-child(1){
font-weight: bold;
font-size: 32rpx;
color: #333333;
}
.popup-head{
width: 100%;
height: 99.38rpx;
background-color: rgba(21, 171, 141, 0.09);
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 0 15px;
}
.popup-content{
width: 100%;
height: 255px;
background: #FFFFFF;
border-top-left-radius: 56rpx;
border-top-right-radius: 56rpx;
display: flex;
flex-direction: column;
}
2024-06-05 19:14:51 +08:00
/*
sticky生效条件
1父元素不能overflow:hidden或者overflow:auto属性(mescroll-body设置:sticky="true"即可, mescroll-uni本身没有设置overflow)
2必须指定topbottomleftright4个值之一否则只会处于相对定位
3父元素的高度不能低于sticky元素的高度
4sticky元素仅在其父元素内生效,所以父元素必须是 mescroll
*/
2024-06-26 16:58:53 +08:00
.ding-view{
width: 95%;
height: 290rpx;
background: linear-gradient(-90deg, #019C88, #1BB9A5, #029D88);
border-radius: 24rpx;
margin: 10px auto 0px auto;
align-items: end;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.content{
width: 100%;
min-height: 100vh;
background-image: url('../../static/index/swim.jpg');
background-repeat: no-repeat;
background-size: 100% 100%;
display: flex;
flex-direction: column;
align-items: center;
padding: 30px 0px;
}
2024-06-05 19:14:51 +08:00
.u-tabs {
padding: 16px;
2024-06-26 16:58:53 +08:00
width: 90%;
height: 199rpx;
// background: #F7F7F7 !important;
border-radius: 21rpx;
margin: -70px auto 10px auto;
2024-06-05 19:14:51 +08:00
}
/deep/.u-scroll-view {
padding: 10px 16px !important;
}
/deep/.u-tab-item {
height: auto !important;
line-height: normal !important;
width: 25% !important;
padding: 0 !important;
}
/deep/.u-tab-bar {
display: none !important;
}
.sticky-tabs {
2024-06-26 16:58:53 +08:00
width: 100%;
2024-06-05 19:14:51 +08:00
z-index: 990;
2024-06-26 16:58:53 +08:00
position: f;
2024-06-05 19:14:51 +08:00
top: var(--window-top);
// background-color: #fff;
}
/deep/.activityTitleTextProps {
color: #096f4b;
font-size: 14px;
}
/deep/.noactivityTitleTextProps {
color: #666666;
font-size: 14px;
}
// 使用mescroll-uni,则top为0
.mescroll-uni,
/deep/.mescroll-uni {
.sticky-tabs {
top: 300upx;
}
}
.demo-tip {
padding: 18upx;
font-size: 24upx;
text-align: center;
}
/deep/.page-box {
2024-06-26 16:58:53 +08:00
background: top !important;
2024-06-05 19:14:51 +08:00
}
.bg {
background-image: linear-gradient(to right, #223845, #00a85b);
padding: 16px 16px 36px 16px;
}
.bgwhite {
background-color: #FFFFFF;
}
.xian {
width: 100%;
height: 1rpx;
border: 1rpx solid #f8f8f8;
margin-top: 20rpx;
}
.pintuan_syrs {
color: #999999;
font-size: 20upx;
margin: 20rpx 20rpx 0rpx;
display: flex;
padding-right: 18upx;
}
.labe {
2024-06-26 16:58:53 +08:00
width: 42px;
background: #FFE45A;
border-radius: 15rpx 0rpx 15rpx 0rpx;
2024-06-05 19:14:51 +08:00
display: inline-flex;
align-items: center;
2024-06-26 16:58:53 +08:00
color: #7A3A00;
2024-06-05 19:14:51 +08:00
font-size: 22rpx;
font-weight: 400;
height: 36rpx;
margin-left: 20rpx;
2024-06-26 16:58:53 +08:00
justify-content: center;
2024-06-05 19:14:51 +08:00
text {
width: 12rpx;
height: 12rpx;
background: #20C675;
border-radius: 50%;
margin-right: 8rpx;
}
}
</style>