2.29(天天打卡,优化
This commit is contained in:
@@ -1,13 +1,34 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
import request from "@/utils/request.js";
|
||||
// 查询每日打卡列表
|
||||
export function clockList(data) {
|
||||
return request({
|
||||
url: '/api/front/daily/check/in/page/list',
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
}
|
||||
//报名
|
||||
|
||||
/**
|
||||
* 活动订单列表
|
||||
*/
|
||||
export function getCheckPageList(params) {
|
||||
return request({
|
||||
'url':`/api/front/daily/check/in/page/list`,
|
||||
'method': 'get',
|
||||
params
|
||||
})
|
||||
export function DailyJoin(data) {
|
||||
return request({
|
||||
url: '/api/front/daily/check/in/join',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
//支付
|
||||
export function prepay(data) {
|
||||
return request({
|
||||
url: '/api/front/pay/paydaily',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
//参加每日打卡活动创建订单
|
||||
export function DailyClock(dailyCheckId) {
|
||||
return request({
|
||||
url: '/api/front/daily/check/in/clock/' + dailyCheckId,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
@@ -10,6 +10,44 @@ export function dutyCategory() {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取邀请规则
|
||||
*/
|
||||
export function getInviteRule() {
|
||||
return request({
|
||||
'url': '/api/front/agreement/user/invite/rule',
|
||||
'method': 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取隐私协议
|
||||
*/
|
||||
export function getUserprivacyinfo() {
|
||||
return request({
|
||||
'url': '/api/front/agreement/userprivacyinfo',
|
||||
'method': 'get'
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 获取用户协议
|
||||
*/
|
||||
export function getAboutusinfo() {
|
||||
return request({
|
||||
'url': '/api/front/agreement/aboutusinfo',
|
||||
'method': 'get'
|
||||
})
|
||||
}
|
||||
///api/front/agreement/user/clock/rule
|
||||
/**
|
||||
* 获取天天打卡规则
|
||||
*/
|
||||
export function getClockRule() {
|
||||
return request({
|
||||
'url': '/api/front/agreement/user/clock/rule',
|
||||
'method': 'get'
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 获取保险公司
|
||||
*/
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// 应用全局配置
|
||||
module.exports = {
|
||||
//正式
|
||||
baseUrl: 'https://mall.lianxianke.cn/car_app_api',
|
||||
// baseUrl: 'https://mall.lianxianke.cn/car_app_api',
|
||||
TOKENNAME: 'Authori-zation',
|
||||
//薛磊测试
|
||||
// baseUrl: 'http://192.168.31.226:8081/car_app_api',
|
||||
baseUrl: 'http://192.168.31.226:8081/car_app_api',
|
||||
fileUploadUrl: 'https://mall.lianxianke.cn/car_app_api/api/front/upload/image',
|
||||
WebSocketUrl: 'ws://121.199.24.205:9107/lxk/websocket',
|
||||
WebSocketOpen: false,
|
||||
|
||||
@@ -17,7 +17,10 @@
|
||||
"modules" : {
|
||||
"Camera" : {},
|
||||
"Payment" : {},
|
||||
"Share" : {}
|
||||
"Share" : {},
|
||||
"Contacts" : {},
|
||||
"Barcode" : {},
|
||||
"Geolocation" : {}
|
||||
},
|
||||
"distribute" : {
|
||||
"android" : {
|
||||
@@ -60,6 +63,11 @@
|
||||
"appid" : "wx67c3ee9398603438",
|
||||
"UniversalLinks" : ""
|
||||
}
|
||||
},
|
||||
"geolocation" : {
|
||||
"system" : {
|
||||
"__platform__" : [ "ios", "android" ]
|
||||
}
|
||||
}
|
||||
},
|
||||
"splashscreen" : {
|
||||
|
||||
11
pages.json
11
pages.json
@@ -598,7 +598,8 @@
|
||||
}, {
|
||||
"path": "pages/common/textview/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "浏览文本"
|
||||
"navigationBarTitleText": "富文本解析页面",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1145,6 +1146,14 @@
|
||||
"enablePullDownRefresh" : false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/driver/mine/every_day_card/previous_list",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "往期开奖",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},{
|
||||
"path": "pages/driver/serve/repair/re_create/result",
|
||||
"style": {
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<u-navbar :title="title" :autoBack="true" safeAreaInsetTop placeholder>
|
||||
</u-navbar>
|
||||
<u-parse :content="content"></u-parse>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
userAgreement,
|
||||
privacyPolicy,
|
||||
aboutApp
|
||||
} from '@/api/system/system'
|
||||
import { articleInfo} from "@/api/message/message.js"
|
||||
getUserprivacyinfo,
|
||||
getInviteRule,
|
||||
getAboutusinfo,
|
||||
getClockRule
|
||||
} from '@/api/system/config.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -20,46 +22,43 @@
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.id) {
|
||||
articleInfo(options.id).then(res=>{
|
||||
uni.setNavigationBarTitle({
|
||||
title: res.data.title
|
||||
})
|
||||
this.content = res.data.content
|
||||
})
|
||||
} else {
|
||||
this.title = options.title
|
||||
this.content = options.content
|
||||
uni.setNavigationBarTitle({
|
||||
title: options.title
|
||||
})
|
||||
if (options.title == '用户协议') this.getUserAgreement()
|
||||
if (options.title == '隐私政策') this.getPrivacyPolicy()
|
||||
if (options.title == '关于APP') this.getAboutApp()
|
||||
}
|
||||
|
||||
console.log(options);
|
||||
this.title = options.title
|
||||
if (options.title == '邀请规则') this.getInviteRuleFn()
|
||||
if (options.title == '用户协议') this.getUserAgreement()
|
||||
if (options.title == '隐私政策') this.getPrivacyPolicy()
|
||||
//天天打卡
|
||||
if (options.title == '规则详情') this.getClockRuleFn()
|
||||
},
|
||||
methods: {
|
||||
//获取天天打卡规则
|
||||
getClockRuleFn() {
|
||||
getClockRule().then(res => {
|
||||
console.log(res.data);
|
||||
this.content = JSON.parse(res.data).agreement
|
||||
})
|
||||
},
|
||||
//获取邀请规则
|
||||
getInviteRuleFn() {
|
||||
getInviteRule().then(res => {
|
||||
console.log(res.data);
|
||||
this.content = JSON.parse(res.data).agreement
|
||||
})
|
||||
},
|
||||
// 获取用户协议
|
||||
getUserAgreement() {
|
||||
userAgreement().then(res => {
|
||||
this.type = 1
|
||||
this.content = res.data
|
||||
getAboutusinfo().then(res => {
|
||||
// console.log(JSON.parse(res.data) );
|
||||
this.content = JSON.parse(res.data).agreement
|
||||
})
|
||||
},
|
||||
// 获取隐私政策
|
||||
getPrivacyPolicy() {
|
||||
privacyPolicy().then(res => {
|
||||
this.type = 1
|
||||
this.content = res.data
|
||||
getUserprivacyinfo().then(res => {
|
||||
// console.log(res.data);
|
||||
this.content = JSON.parse(res.data).agreement
|
||||
})
|
||||
},
|
||||
getAboutApp() {
|
||||
aboutApp().then(res => {
|
||||
this.type = 1
|
||||
this.content = res.data
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
<view>应用介绍</view>
|
||||
<u-icon name="arrow-right" color="#999" size="16"></u-icon>
|
||||
</view>
|
||||
<view class="f-jcsb f-a-i operation-list-cont">
|
||||
<view class="f-jcsb f-a-i operation-list-cont" @click="navCommonFn('隐私政策')">
|
||||
<view>隐私协议</view>
|
||||
<u-icon name="arrow-right" color="#999" size="16"></u-icon>
|
||||
</view>
|
||||
<view class="f-jcsb f-a-i operation-list-cont">
|
||||
<view class="f-jcsb f-a-i operation-list-cont" @click="navCommonFn('用户协议')">
|
||||
<view>服务协议</view>
|
||||
<u-icon name="arrow-right" color="#999" size="16"></u-icon>
|
||||
</view>
|
||||
@@ -34,6 +34,13 @@
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
navCommonFn(type){
|
||||
uni.navigateTo({
|
||||
url:`/pages/common/textview/index?title=${type}`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -17,145 +17,615 @@
|
||||
<image :src="`${config.aliyunOssUrl}/static/images/app/activity/box_bj.png`" mode="">
|
||||
</image>
|
||||
<view class="header-expect-num f-24 c333">
|
||||
第20231023002期 | 2023-10-01 至 2023-10-11
|
||||
第{{topCheckSn}}期 | {{topDaySn[0] | date('yyyy-mm-dd')}} 至 {{topDaySn[1] | date('yyyy-mm-dd')}}
|
||||
</view>
|
||||
<view class="header-bj-jackpot">
|
||||
<image :src="`${config.aliyunOssUrl}/static/images/app/activity/jackpot_bj.png`" mode="">
|
||||
</image>
|
||||
<text class="header-bj-jackpo-num">26484</text>
|
||||
<text class="header-bj-jackpo-num">{{totalPrice?totalPrice:0}}</text>
|
||||
</view>
|
||||
<view class="header-bj-rule">
|
||||
<view class="header-bj-rule-box">
|
||||
<view class="header-bj-rule-box" @click="navCommonFn">
|
||||
<image :src="`${config.aliyunOssUrl}/static/images/app/activity/guize.png`" mode="">
|
||||
</image>
|
||||
<text>规则</text>
|
||||
</view>
|
||||
<view class="header-bj-rule-box" style="margin-top: 44rpx;">
|
||||
<view class="header-bj-rule-box" style="margin-top: 44rpx;"
|
||||
@click="$tab.navigateTo('/pages/driver/mine/every_day_card/previous_list')">
|
||||
<image :src="`${config.aliyunOssUrl}/static/images/app/activity/guize.png`" mode="">
|
||||
</image>
|
||||
<text>往期</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-box">
|
||||
<z-paging use-page-scroll ref="paging" v-model="dataList" @query="queryList">
|
||||
<view class="list-box-cont" :class="[index==0?'list-box-cont-bj':'']" v-for="(item,index) in dataList"
|
||||
:key="index">
|
||||
<view class="flex justify-between">
|
||||
<view class="flex flex-column justify-between" style="height: 108rpx;">
|
||||
<view class="f-32 c333">第{{item.dailyCheckSn}}期</view>
|
||||
<view class="c999 f-28">开奖时间:2023-06-06 00:00:00</view>
|
||||
<z-paging use-page-scroll ref="paging" v-model="dataList" @query="queryList">
|
||||
<view class="list-box">
|
||||
<view v-for="(items,indexs) in list" :key="items.id">
|
||||
<view :class="['content-list',indexs==0?'list-box-cont-bj':'']"
|
||||
v-if="(items.userDailyCheckOrder && items.userDailyCheckOrder.payStatus == 0) || items.userDailyCheckIn == null">
|
||||
<view class="flex justify-between align-center">
|
||||
<text class="c000 bold f-30">第{{items.dailyCheckSn}}期</text>
|
||||
<text v-if="items.status == 0" class="c4B f24">未开始</text>
|
||||
<text v-if="items.status == 3" class="c4B f24">已结束</text>
|
||||
<text v-if="items.status == 2" class="c4B f24">开奖中</text>
|
||||
<text
|
||||
v-if="items.status == 1 && items.userDailyCheckIn == null && newTime<items.applicationStopTime"
|
||||
class="c4B f24">未报名</text>
|
||||
<text
|
||||
v-if="items.status == 1 && items.userDailyCheckIn == null && newTime>items.applicationStopTime"
|
||||
class="c4B f24">不在参与时间</text>
|
||||
<text
|
||||
v-if="items.status == 1 && items.userDailyCheckOrder && items.userDailyCheckOrder.payStatus == 0"
|
||||
class="c4B f24">未支付</text>
|
||||
<text
|
||||
v-if="items.status == 1 && items.userDailyCheckIn && items.userDailyCheckOrder && items.userDailyCheckOrder.payStatus == 1"
|
||||
class="c4B f24">已报名</text>
|
||||
</view>
|
||||
<view class="flex flex-column justify-between">
|
||||
<view class="red f-28">未报名</view>
|
||||
<view class="c333 f-28">¥{{item.joinPrice}}</view>
|
||||
<view class="flex justify-between mt-4 align-center">
|
||||
<view class="right">
|
||||
<!-- 报名结束时间 -->
|
||||
<view
|
||||
v-if="(newTime<items.applicationStopTime && items.userDailyCheckIn == null && items.status == 1) || (items.userDailyCheckOrder && items.userDailyCheckOrder.payStatus == 0 && items.status != 2)">
|
||||
<text class="c777 f-26 bold mr-2">报名结束时间</text>
|
||||
<u-count-down :time="items.timeStart" format="HH:mm:ss"></u-count-down>
|
||||
<!-- <u-count-down :time="items.timeStart" :show-border="true" font-size="28"
|
||||
color="#fff" height="47" bg-color="#FF404B" border-color="#FF404B"
|
||||
separator-color="#FF404B"></u-count-down> -->
|
||||
</view>
|
||||
<view
|
||||
v-if="(items.status == 1 || items.status == 0 || items.status == 3) && (items.userDailyCheckIn != null && items.userDailyCheckOrder && items.userDailyCheckOrder.payStatus == 1)">
|
||||
<text class="f-28 c666 bold">支付{{items.joinPrice}}元参与报名</text>
|
||||
</view>
|
||||
<view
|
||||
v-if="items.status == 1 && items.userDailyCheckIn == null && newTime>items.applicationStopTime">
|
||||
<text class="f-28 c666 bold">支付{{items.joinPrice}}元参与报名</text>
|
||||
</view>
|
||||
<view v-if="items.status == 0">
|
||||
<text class="f-28 c666 bold">支付{{items.joinPrice}}元参与报名</text>
|
||||
</view>
|
||||
<view v-if="items.status == 2">
|
||||
<text class="f-28 c666 bold">开奖时间:{{items.lotteryTime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="left">
|
||||
<text
|
||||
v-if="items.userDailyCheckIn == null && newTime<items.applicationStopTime && items.status == 1"
|
||||
class="apply" @click="SignNow(items.id)">立即报名</text>
|
||||
<text
|
||||
v-if="newTime<items.applicationStopTime && ( items.userDailyCheckOrder && items.userDailyCheckOrder.payStatus == 0)"
|
||||
class="apply" @click="SignNowTo(items)">立即支付</text>
|
||||
<!-- <text v-else>立即支付</text> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 支付成功 显示-->
|
||||
<view v-if="items.userDailyCheckOrder && items.userDailyCheckOrder.payStatus == 1">
|
||||
<view class="content-list" v-for="(item,index) in items.userDailyCheckSign" :key="index">
|
||||
<view class="flex justify-between align-center">
|
||||
<view class="flex">
|
||||
<text class="c000 bold f-30 mr-2">第{{item.dailyCheckSn}}期</text>
|
||||
<text class="c000 bold f-30">第{{index + 1}}天</text>
|
||||
</view>
|
||||
<text v-if="item.clockStatus == 0 && Time>item.clockTime" class="c4B f24">未打卡</text>
|
||||
<text v-if="item.clockStatus == 0 && Time<item.clockTime" class="c4B f24">待打卡</text>
|
||||
<text v-if="item.clockStatus == 1" class="c4B f24">已打卡</text>
|
||||
<text v-if="items.status == 0" class="c4B f24">未开始</text>
|
||||
</view>
|
||||
<view class="flex justify-between mt-4 align-center">
|
||||
<!-- 左边部分 -->
|
||||
<view class="left">
|
||||
<view
|
||||
v-if="newTime<items.clockInStartTime && items.userDailyCheckIn && items.status == 1 && item.clockStatus == 0 && Time>item.clockTime">
|
||||
<text class="c777 f-26 bold mr-2">距离打卡时间{{items.time}}</text>
|
||||
<!-- <u-count-down :time="items.time" format="HH:mm:ss"></u-count-down> -->
|
||||
<u-count-down :time="items.time" :show-border="true" font-size="28" color="#fff"
|
||||
height="47" bg-color="#FF404B" border-color="#FF404B"
|
||||
separator-color="#FF404B"></u-count-down>
|
||||
</view>
|
||||
<!-- 剩余打卡时间 -->
|
||||
<view
|
||||
v-if="item.clockStatus == 0 && Time>item.clockTime && items.number == 1 && items.clockInStartTime<newTime">
|
||||
<text class="c777 f-26 bold mr-2">剩余打卡时间</text>
|
||||
<u-count-down :time="items.Clocktime" format="HH:mm:ss"></u-count-down>
|
||||
<!-- <u-count-down :time="items.Clocktime" :show-border="true" font-size="28"
|
||||
color="#fff" height="47" bg-color="#FF404B" border-color="#FF404B"
|
||||
separator-color="#FF404B"></u-count-down> -->
|
||||
</view>
|
||||
<!-- 剩余打卡时间 -->
|
||||
<view
|
||||
v-if="item.clockStatus == 0 && Time>item.clockTime && items.number >1 && items.clockInStartTime<newTime && item.dayTime == '今天'">
|
||||
<text class="c777 f-26 bold mr-2">剩余打卡时间</text>
|
||||
<u-count-down :time="surTime" :show-border="true" font-size="28" color="#fff"
|
||||
height="47" bg-color="#FF404B" border-color="#FF404B"
|
||||
separator-color="#FF404B"></u-count-down>
|
||||
</view>
|
||||
<!-- 等待开奖时间 -->
|
||||
<view
|
||||
v-if="items.userDailyCheckIn && items.userDailyCheckIn.openStatus == 0 && items.userDailyCheckIn.clockStatus == 1">
|
||||
<text class="c777 f-26 bold mr-2">等待开奖时间</text>
|
||||
<u-count-down :time="items.timeOut" format="HH:mm:ss"></u-count-down>
|
||||
<!-- <u-count-down :time="items.timeOut" :show-border="true" font-size="28"
|
||||
color="#fff" height="47" bg-color="#FF404B" border-color="#FF404B"
|
||||
separator-color="#FF404B"></u-count-down> -->
|
||||
</view>
|
||||
<!-- 开奖时间 -->
|
||||
<view v-if=" items.userDailyCheckIn && items.userDailyCheckIn.openStatus == 1 ">
|
||||
<text class="f-26 c777 bold">开奖时间:{{items.lotteryTime}}</text>
|
||||
</view>
|
||||
<!-- 打卡记录 -->
|
||||
<view class="f-28 c666 bold">
|
||||
<text v-if="item.length == 0">支付{{joinPrice}}元参与报名</text>
|
||||
<text v-if="item.clockStatus == 0 && item.dayTime == '昨天'">您忘记打卡了</text>
|
||||
<text v-if="item.clockStatus == 0 && Time<item.clockTime">还未到时间</text>
|
||||
<text v-if="item.clockStatus == 1 && items.number > 1">您今天已打卡</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- 右边部分 -->
|
||||
<view class="right">
|
||||
<!-- <text v-if="item.length == 0" class="apply" @click="SignNow(items.id)">立即报名</text> -->
|
||||
<text
|
||||
v-if="item.clockStatus == 0 && Time>item.clockTime && items.clockInStartTime<newTime && item.dayTime == '今天'"
|
||||
class="applyRed" @click="clockIn(items.id)">打卡</text>
|
||||
<!-- 瓜分奖池 -->
|
||||
<view class="flex column"
|
||||
v-if="newList.userDailyCheckIn && newList.userDailyCheckOrder && newList.userDailyCheckOrder.payStatus == 1 && newList.userDailyCheckIn.clockStatus == 1 && newList.userDailyCheckIn.openStatus == 1">
|
||||
<text class="c000 f-20 bold">¥ <text
|
||||
class="f-28">{{newList.userDailyCheckIn?newList.userDailyCheckIn.number:''}}</text>
|
||||
</text>
|
||||
<text class="c999 f-20 bold">(已存入余额)</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
<!-- 支付方式 -->
|
||||
<u-popup :show="topUpTypeShow" round="16" closeOnClickOverlay>
|
||||
<view class="top-up-popup">
|
||||
<view class="top-up-popup-allprice"> 合计:¥{{ payPrice }} </view>
|
||||
<view class="top-up-popup-title">选择支付方式</view>
|
||||
<view>
|
||||
<view class="top-up-popup-type f-jcsb f-a-i" @click="actTypeFn('ye')">
|
||||
<view class="f-a-i">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<image :src="`${config.aliyunOssUrl}/static/images/app/serve/ye.png`" mode=""></image>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP -->
|
||||
<image src="@/static/images/app/serve/ye.png" mode=""></image>
|
||||
<!-- #endif -->
|
||||
<view class="top-up-popup-type-wx">余额支付</view>
|
||||
</view>
|
||||
<view class="f-a-i">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<image v-if="topUpType=='ye'"
|
||||
:src="`${config.aliyunOssUrl}/static/images/app/serve/act.png`" mode=""></image>
|
||||
<image v-else :src="`${config.aliyunOssUrl}/static/images/app/serve/act_no.png`" mode="">
|
||||
</image>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP -->
|
||||
<image v-if="topUpType=='ye'" src="@/static/images/app/serve/act.png" mode=""></image>
|
||||
<image v-else src="@/static/images/app/serve/act_no.png" mode=""></image>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="top-up-popup-type f-jcsb f-a-i" @click="actTypeFn('wx')">
|
||||
<view class="f-a-i">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<image :src="`${config.aliyunOssUrl}/static/images/app/serve/wx.png`" mode=""></image>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP -->
|
||||
<image src="@/static/images/app/serve/wx.png" mode=""></image>
|
||||
<!-- #endif -->
|
||||
<view class="top-up-popup-type-wx">微信支付</view>
|
||||
</view>
|
||||
<view class="f-a-i">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<image v-if="topUpType=='wx'"
|
||||
:src="`${config.aliyunOssUrl}/static/images/app/serve/act.png`" mode=""></image>
|
||||
<image v-else :src="`${config.aliyunOssUrl}/static/images/app/serve/act_no.png`" mode="">
|
||||
</image>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP -->
|
||||
<image v-if="topUpType=='wx'" src="@/static/images/app/serve/act.png" mode=""></image>
|
||||
<image v-else src="@/static/images/app/serve/act_no.png" mode=""></image>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="top-up-popup-type f-jcsb f-a-i" @click="actTypeFn('zfb')">
|
||||
<view class="f-a-i">
|
||||
<!-- #ifdef APP -->
|
||||
<image src="@/static/images/app/serve/zfb.png" mode=""></image>
|
||||
<view class="top-up-popup-type-zfb">支付宝</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view class="f-a-i">
|
||||
<!-- #ifdef APP -->
|
||||
<image v-if="topUpType=='zfb'" src="@/static/images/app/serve/act.png" mode=""></image>
|
||||
<image v-else src="@/static/images/app/serve/act_no.png" mode=""></image>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="top-up-popup-button">
|
||||
<u-button color="#13AFA8" shape="circle"
|
||||
:customStyle="{height: '84rpx', lineHeight: '84rpx',marginTop: '48rpx'}"
|
||||
@click="payPopupBtn">立即支付</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import config from '@/config';
|
||||
import {
|
||||
getCheckPageList,
|
||||
clockList,
|
||||
DailyJoin,
|
||||
prepay,
|
||||
DailyClock
|
||||
} from "@/api/activity/activity.js";
|
||||
import {
|
||||
getTimeType,
|
||||
paymentFn
|
||||
} from "@/utils/index.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataList: [],
|
||||
config,
|
||||
navConfig: {
|
||||
title: " ",
|
||||
color: "#000",
|
||||
fixedAssist: {
|
||||
hide: true
|
||||
},
|
||||
transparent: {
|
||||
initColor: '#fff'
|
||||
}
|
||||
id: "",
|
||||
topUpTypeShow: false, //支付弹窗
|
||||
topUpType: 'ye',
|
||||
payData: {
|
||||
from: "",
|
||||
orderNo: "",
|
||||
payChannel: "yue",
|
||||
payType: "yue",
|
||||
scene: 0
|
||||
},
|
||||
Config: {},
|
||||
dataList: []
|
||||
Height: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
list: {}, //每日打卡活动列表
|
||||
newList: {}, //新数据每日打卡活动列表
|
||||
nowClock: {}, //当日打卡数据
|
||||
yetClock: [], //已经打卡数据
|
||||
surTime: '', //剩余打卡时间
|
||||
Time: new Date().getTime(), //当前时间戳
|
||||
newTime: getTimeType(new Date().getTime(), 0), //当前时间
|
||||
payType: 'yue', //支付方式
|
||||
payPrice: '', //支付余额
|
||||
submitInfo: {}, //订单信息
|
||||
totalPrice: '', //本期奖池
|
||||
joinPrice: '', //参加金额
|
||||
topCheckSn: '', //头部活动期
|
||||
topDaySn: [], //头部活动天数
|
||||
orderNo: '',
|
||||
dayTime: '', //判断是否是今天的时间
|
||||
timerId: null //定时器
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
// this.getConfig()
|
||||
uni.getSystemInfo({
|
||||
success: (e) => {
|
||||
this.Height = e.statusBarHeight + 70
|
||||
}
|
||||
})
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
this.pageNum = 1;
|
||||
// this.getList()
|
||||
},
|
||||
// onPullDownRefresh() {
|
||||
// this.pageNum = 1;
|
||||
// this.getList()
|
||||
// let time = getTimeType(new Date().getTime(), 0)
|
||||
// let Time = new Date().getTime()
|
||||
// this.newTime = time
|
||||
// this.Time = Time
|
||||
// },
|
||||
destroyed() {
|
||||
clearTimeout(this.timerId);
|
||||
},
|
||||
methods: {
|
||||
//初始化列表数据
|
||||
queryList(pageNo, pageSize) {
|
||||
getCheckPageList({
|
||||
page: pageNo,
|
||||
limit: pageSize,
|
||||
}).then(res => {
|
||||
console.log(res.data);
|
||||
this.$refs.paging.complete(res.data.list);
|
||||
});
|
||||
},
|
||||
getConfig() {
|
||||
actGetConfig().then(res => {
|
||||
this.Config = res.data;
|
||||
//打卡规则
|
||||
navCommonFn(){
|
||||
uni.navigateTo({
|
||||
url:`/pages/common/textview/index?title=规则详情`
|
||||
})
|
||||
},
|
||||
//点击事件
|
||||
handleClick(id, index) {
|
||||
switch (index) {
|
||||
case 1:
|
||||
//去报名
|
||||
payOneDollar(id).then(res => {
|
||||
this.$u.route('/pages/goods/order_payment/index', {
|
||||
orderNo: res.data.id,
|
||||
payPrice: res.data.payPrice,
|
||||
form: 'activity'
|
||||
});
|
||||
});
|
||||
break;
|
||||
case 3:
|
||||
//去打卡
|
||||
oneYuanClock(id).then(res => {
|
||||
this.$refs.paging.reload();
|
||||
});
|
||||
break;
|
||||
//定时器
|
||||
setTime() {
|
||||
this.timerId = setTimeout(() => {
|
||||
if (this.$refs.paging) {
|
||||
this.$refs.paging.refresh();
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
queryList(pageNum, pageSize) {
|
||||
clockList({
|
||||
pageNum: pageNum,
|
||||
pageSize: pageSize,
|
||||
type: 3
|
||||
}).then(res => {
|
||||
// 已经打卡数据
|
||||
this.yetClock = []
|
||||
res.data.list.forEach((i, index) => {
|
||||
let time = new Date().getTime()
|
||||
i.time = (new Date(i.clockInStartTime).getTime() - this.Time)
|
||||
i.timeOut = (new Date(i.lotteryTime).getTime() - this.Time)
|
||||
i.timeStart = (new Date(i.applicationStopTime).getTime() - this.Time)
|
||||
i.Clocktime = (new Date(i.clockInStopTime).getTime() - time)
|
||||
// console.log(i.Clocktime);
|
||||
// 奖金池、参与金额
|
||||
if (index == 0) {
|
||||
this.totalPrice = i.totalPrice
|
||||
this.joinPrice = Math.trunc(i.joinPrice)
|
||||
this.topCheckSn = i.dailyCheckSn
|
||||
this.topDaySn[0] = i.applicationStartTime
|
||||
this.topDaySn[1] = i.lotteryTime
|
||||
}
|
||||
if (i.userDailyCheckSign.length && i.status == 1) {
|
||||
i.userDailyCheckSign.forEach(v => {
|
||||
v.clockTime = new Date(v.clockTime).getTime() + 1000
|
||||
v.dayTime = this.showText(v.clockTime)
|
||||
// console.log(v.dayTime);
|
||||
})
|
||||
}
|
||||
// 今天打卡数据
|
||||
if (i.userDailyCheckSign != null && i.status == 1) {
|
||||
let arr = i.userDailyCheckSign;
|
||||
let times = new Date();
|
||||
times.setSeconds(59)
|
||||
times.setMinutes(59)
|
||||
times.setHours(23)
|
||||
this.surTime = (times.getTime() - new Date().getTime())
|
||||
}
|
||||
});
|
||||
this.list = res.data.list
|
||||
this.setTime()
|
||||
uni.hideLoading();
|
||||
uni.stopPullDownRefresh()
|
||||
})
|
||||
},
|
||||
// 判断时间是今天还是昨天
|
||||
showText(timeString) {
|
||||
let date = new Date(timeString);
|
||||
let today = new Date();
|
||||
today.setHours(0);
|
||||
today.setMinutes(0);
|
||||
today.setSeconds(0);
|
||||
// today 为今天凌晨的时间
|
||||
let dayTime = 24 * 60 * 60 * 1000;
|
||||
let delta = today - date; // 得到相差的时间 ms
|
||||
if (delta > 0) {
|
||||
if (delta <= dayTime) {
|
||||
return '昨天';
|
||||
} else if (delta <= 2 * dayTime) {
|
||||
return '前天';
|
||||
}
|
||||
} else if (-delta < dayTime) {
|
||||
return '今天';
|
||||
} else {
|
||||
return '明天';
|
||||
}
|
||||
// return timeString.slice(5, 11);
|
||||
},
|
||||
|
||||
// 打卡
|
||||
clockIn(id) {
|
||||
DailyClock(id).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: '打卡成功'
|
||||
})
|
||||
this.pageNum = 1;
|
||||
this.$refs.paging.refresh();
|
||||
}
|
||||
})
|
||||
},
|
||||
// 立即报名
|
||||
SignNow(id) {
|
||||
DailyJoin({
|
||||
dailyCheckId: id,
|
||||
payType: this.payType
|
||||
}).then(result => {
|
||||
this.topUpTypeShow = true
|
||||
this.orderNo = result.data.orderNo
|
||||
this.payData.orderNo = result.data.orderNo
|
||||
this.payPrice = result.data.payPrice
|
||||
this.$refs.paging.refresh();
|
||||
})
|
||||
},
|
||||
// 第二次支付报名
|
||||
SignNowTo(item) {
|
||||
console.log(item);
|
||||
this.topUpTypeShow = true
|
||||
this.orderNo = item.userDailyCheckOrder.orderNo
|
||||
this.payData.orderNo = item.userDailyCheckOrder.orderNo
|
||||
this.payPrice = item.userDailyCheckOrder.payPrice
|
||||
// this.$refs.paging.refresh();
|
||||
},
|
||||
//支付类型
|
||||
actTypeFn(type) {
|
||||
this.topUpType = type
|
||||
// 支付方式:weixin,alipay,yue
|
||||
// 支付渠道:yue-余额,wechatIos-微信Ios,wechatAndroid-微信Android, alipay-支付包,alipayApp-支付宝App
|
||||
if (type == 'ye') {
|
||||
this.payData.payType = 'yue'
|
||||
this.payData.payChannel = 'yue'
|
||||
}
|
||||
if (type == 'wx') {
|
||||
this.payData.payType = 'weixin'
|
||||
this.payData.payChannel = 'wechatAndroid'
|
||||
}
|
||||
if (type == 'zfb') {
|
||||
this.payData.payType = 'alipay'
|
||||
this.payData.payChannel = 'alipay'
|
||||
}
|
||||
},
|
||||
|
||||
// 去支付
|
||||
payPopupBtn(e) {
|
||||
uni.showLoading({
|
||||
title: '支付中'
|
||||
})
|
||||
if (this.topUpType == 'ye') {
|
||||
prepay(this.payData).then(res => {
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: '支付成功'
|
||||
})
|
||||
this.topUpTypeShow = false
|
||||
uni.hideLoading()
|
||||
this.$refs.paging.refresh();
|
||||
}).catch(err => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/serve/coupons/payresult?resultType=err`
|
||||
})
|
||||
})
|
||||
} else if (this.topUpType == 'zfb') {
|
||||
prepay(this.payData).then(res => {
|
||||
paymentFn(this.payData.payType, res.data.alipayRequest).then(res => {
|
||||
if (res.channel.serviceReady) {
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: '支付成功'
|
||||
})
|
||||
this.topUpTypeShow = false
|
||||
uni.hideLoading()
|
||||
this.$refs.paging.refresh();
|
||||
}
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/serve/coupons/payresult?resultType=err`
|
||||
})
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '目前不支持微信',
|
||||
duration: 2000,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
//返回
|
||||
navBackFb() {
|
||||
uni.navigateBack()
|
||||
}
|
||||
},
|
||||
// 关闭支付弹窗
|
||||
close() {
|
||||
this.topUpTypeShow = false
|
||||
},
|
||||
async Refresh() {
|
||||
this.pageNum = this.pageNum + 1;
|
||||
let res = await clockList({
|
||||
pageNum: this.pageNum,
|
||||
pageSize: this.pageSize
|
||||
});
|
||||
if (res.rows.length == 0) {
|
||||
return uni.showToast({
|
||||
icon: 'none',
|
||||
title: '没有更多数据了!'
|
||||
})
|
||||
} else {
|
||||
this.list.push(...res.rows);
|
||||
}
|
||||
},
|
||||
Back() {
|
||||
uni.navigateBack({
|
||||
delta: 1, //返回层数,2则上上页
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.top-up-popup {
|
||||
padding: 48rpx 24rpx 88rpx;
|
||||
|
||||
.top-up-popup-allprice {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
padding: 50rpx 0;
|
||||
border-bottom: 1rpx solid #E6E6E6;
|
||||
}
|
||||
|
||||
.top-up-popup-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
padding-top: 48rpx;
|
||||
}
|
||||
|
||||
.top-up-popup-type {
|
||||
margin-top: 48rpx;
|
||||
|
||||
.top-up-popup-type-zfb,
|
||||
.top-up-popup-type-wx {
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.top-up-popup-button {
|
||||
width: calc(100% - 48rpx);
|
||||
margin-left: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.list-box {
|
||||
width: 750rpx;
|
||||
position: relative;
|
||||
padding: 32rpx;
|
||||
top: -32rpx;
|
||||
border-radius: 32rpx 32rpx 0 0;
|
||||
background: #FFF;
|
||||
|
||||
.list-box-cont-image {
|
||||
width: 684rpx;
|
||||
height: 178rpx;
|
||||
}
|
||||
.content-list {
|
||||
margin: 14px 0 0 0;
|
||||
padding: 17px 13px;
|
||||
border-radius: 10px;
|
||||
background-color: #f7f7f7;
|
||||
|
||||
.list-box-cont {
|
||||
margin: 32rpx;
|
||||
background: #F7F7F7;
|
||||
padding: 36rpx 24rpx;
|
||||
height: 178rpx;
|
||||
border-radius: 8rpx;
|
||||
.list-box-cont-bj {
|
||||
background-image: linear-gradient(to bottom, rgb(240, 252, 255), rgb(172, 222, 228));
|
||||
}
|
||||
|
||||
.not-apply-view {
|
||||
height: 178rpx;
|
||||
.apply {
|
||||
padding: 18rpx 30rpx;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
background-color: #23C9C2;
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
|
||||
.applyRed {
|
||||
padding: 18rpx 56rpx;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
background-color: #FF6736;
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.list-box-cont-bj {
|
||||
background-image: linear-gradient(to bottom, rgb(240, 252, 255), rgb(172, 222, 228));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -236,4 +706,8 @@
|
||||
margin-top: 12rpx;
|
||||
padding-right: 16rpx;
|
||||
}
|
||||
|
||||
.c4B {
|
||||
color: #FF404B;
|
||||
}
|
||||
</style>
|
||||
@@ -36,7 +36,7 @@
|
||||
积分明细
|
||||
</view>
|
||||
<view class="f-a-i">
|
||||
<view style="margin-right: 8rpx;">2023-06</view>
|
||||
<view style="margin-right: 8rpx;" @click="timeShow=true">{{timeData}}</view>
|
||||
<u-icon name="arrow-down-fill" color="#aeaeae" size="16"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
@@ -62,6 +62,8 @@
|
||||
</z-paging>
|
||||
</view>
|
||||
</view>
|
||||
<u-datetime-picker ref="datetimePicker" :show="timeShow" v-model="timeValue" mode="year-month"
|
||||
:formatter="formatter" @confirm="confirmTimeFn"></u-datetime-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -84,18 +86,21 @@
|
||||
billList: [],
|
||||
//tabbar选择
|
||||
endTab: 1,
|
||||
timeShow: false,
|
||||
timeValue: Number(new Date()),
|
||||
timeData: parseTime(new Date(), '{y}-{m}'),
|
||||
integralDataNum: {}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//tabbar切换
|
||||
endTabFn(type) {
|
||||
this.endTab = type
|
||||
this.billList = []
|
||||
//选择时间
|
||||
confirmTimeFn(e) {
|
||||
this.timeShow = false
|
||||
console.log(e);
|
||||
this.timeData = parseTime(e.value, '{y}-{m}')
|
||||
this.$refs.paging.refresh();
|
||||
},
|
||||
//订单列表
|
||||
//明细列表
|
||||
queryList(page, limit) {
|
||||
let obj = {
|
||||
linkType: 'all',
|
||||
@@ -120,6 +125,15 @@
|
||||
back() {
|
||||
uni.navigateBack()
|
||||
},
|
||||
formatter(type, value) {
|
||||
if (type === 'year') {
|
||||
return `${value}年`
|
||||
}
|
||||
if (type === 'month') {
|
||||
return `${value}月`
|
||||
}
|
||||
return value
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<text v-if="refundDeta.orderRefund.refundStatus==1">审核未通过</text>
|
||||
<text v-if="refundDeta.orderRefund.refundStatus==2">退款中</text>
|
||||
<text v-if="refundDeta.orderRefund.refundStatus==3">已退款</text>
|
||||
<text v-if="refundDeta.orderRefund.refundStatus==4">已拒绝</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="f-a-i cont-explain">
|
||||
@@ -64,7 +65,7 @@
|
||||
<view v-if="type==2">
|
||||
<view class="refund-order">
|
||||
<view :class="['integral']">
|
||||
<view class="integral-shop">{{refundDeta.authorName}} ></view>
|
||||
<view class="integral-shop">{{refundDeta.carDealerName}} ></view>
|
||||
<view :class="['f-a-i','car-rental']">
|
||||
<image :src="refundDeta.image" mode=""></image>
|
||||
<view class="car-rental-cont">
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
@click="getInformationCancelFn"
|
||||
:customStyle="{width:'192rpx',height:'80rpx',marginLeft: '24rpx'}"></u-button>
|
||||
<u-button v-if="orderData.status==3" type="primary" text="查看合同" plain color="#333333" shape="circle"
|
||||
@click="" :customStyle="{width:'192rpx',height:'80rpx',marginLeft: '24rpx'}"></u-button>
|
||||
@click="examineContractFn" :customStyle="{width:'192rpx',height:'80rpx',marginLeft: '24rpx'}"></u-button>
|
||||
<u-button v-if="orderData.status==2&&orderData.giveStatus==0" type="primary" text="提前还车" color="#13AFA8"
|
||||
shape="circle" @click="navInAdvanceFn"
|
||||
:customStyle="{width:'192rpx',height:'80rpx',marginLeft: '24rpx'}"></u-button>
|
||||
@@ -104,6 +104,11 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
examineContractFn(item){
|
||||
uni.navigateTo({
|
||||
url: `/pages/carShop/order/examine_contract/examine_contract?id=${this.orderId}&type=1`
|
||||
})
|
||||
},
|
||||
//取消订单
|
||||
getInformationCancelFn() {
|
||||
getInformationCancel(this.orderId).then(res => {
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
</image>
|
||||
<image v-else @click="isAgreement=true" src="@/static/images/accessory/no_end.png" mode=""></image>
|
||||
|
||||
<text class="text-agree">请仔细阅读并勾选租车</text><text class="text-agree color-primary">《用户协议》</text>
|
||||
<text class="text-agree">请仔细阅读并勾选租车</text><text @click="navCommonFn" class="text-agree color-primary">《用户协议》</text>
|
||||
</view>
|
||||
<view class="btn" v-if="orderType == 2">
|
||||
<u-button shape="circle" color="#13AFA8" @click="submistOrderFn"
|
||||
@@ -458,6 +458,12 @@
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
//用户协议
|
||||
navCommonFn(type){
|
||||
uni.navigateTo({
|
||||
url:`/pages/common/textview/index?title=用户协议`
|
||||
})
|
||||
},
|
||||
// 取优惠券个数
|
||||
getCouponList() {
|
||||
getCouponListAPI(this.couponData).then(res => {
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</view>
|
||||
<!-- 奖励规则 -->
|
||||
<view class="reward-rules">
|
||||
<view class="flex align-center justify-between">
|
||||
<view class="flex align-center justify-between" @click="navInviteRuleFn">
|
||||
<text class="f-36 black">奖励规则</text>
|
||||
<u-icon name="arrow-right" size="12"></u-icon>
|
||||
</view>
|
||||
@@ -161,6 +161,12 @@
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
//邀请规则
|
||||
navInviteRuleFn() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/common/textview/index?title=邀请规则`
|
||||
})
|
||||
},
|
||||
//海报邀请
|
||||
navInPosterFn() {
|
||||
uni.navigateTo({
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<u-icon v-show="agree" name="checkmark" size="8" color="#fff"></u-icon>
|
||||
</view>
|
||||
<view class="f-26 c444" @click="agree = !agree">
|
||||
我已阅读并同意<text class="c-primary">{{' 用户协议 '}}</text>和<text class="c-primary">{{' 隐私政策 '}}</text>
|
||||
我已阅读并同意<text class="c-primary" @click.stop="navCommonFn('用户协议')">{{' 用户协议 '}}</text>和<text class="c-primary" @click.stop="navCommonFn('隐私政策')">{{' 隐私政策 '}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<u-button class="login-btn mt-8" color="#13AFA8" shape="circle" @click="loginSumbit">登录</u-button>
|
||||
@@ -81,6 +81,12 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//用户协议
|
||||
navCommonFn(type){
|
||||
uni.navigateTo({
|
||||
url:`/pages/common/textview/index?title=${type}`
|
||||
})
|
||||
},
|
||||
confirm() {
|
||||
this.tipShow = false
|
||||
},
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<u-icon v-show="agree" name="checkmark" size="8" color="#fff"></u-icon>
|
||||
</view>
|
||||
<view class="f-26 c444">
|
||||
我已阅读并同意<text class="c-primary">{{' 用户协议 '}}</text>和<text class="c-primary">{{' 隐私政策 '}}</text>
|
||||
我已阅读并同意<text class="c-primary" @click.stop="navCommonFn('用户协议')">{{' 用户协议 '}}</text>和<text class="c-primary" @click.stop="navCommonFn('隐私政策')">{{' 隐私政策 '}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<u-button class="login-btn mt-8" color="#13AFA8" shape="circle" @click="loginSumbit">登录</u-button>
|
||||
@@ -101,6 +101,12 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//用户协议
|
||||
navCommonFn(type){
|
||||
uni.navigateTo({
|
||||
url:`/pages/common/textview/index?title=${type}`
|
||||
})
|
||||
},
|
||||
confirm(e) {
|
||||
this.identityName = e.value[0].text
|
||||
this.form.sid = e.value[0].keyName
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="user">
|
||||
<view class="user-header">
|
||||
<view class="user-header" @click="navUserInfoFn">
|
||||
<view class="f-a-i f-jcsb">
|
||||
<view>
|
||||
<view>
|
||||
欢迎你
|
||||
</view>
|
||||
<view class="user-header-name">{{userInfo.name}}</view>
|
||||
<view class="user-header-name">{{userInfo.nickname}}</view>
|
||||
</view>
|
||||
<view class="user-header-avatar">
|
||||
<image style="width: 136rpx;height: 136rpx;"
|
||||
<image style="width: 136rpx;height: 136rpx;border-radius: 50%;"
|
||||
:src="userInfo.avatar?userInfo.avatar:'@/static/images/carshop/user/user_to.png'" mode="">
|
||||
</image>
|
||||
<image class="user-header-avatar-image" src="@/static/images/carshop/user/medal.png" mode="">
|
||||
@@ -48,6 +48,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {dialFn} from "@/utils/index.js"
|
||||
import {
|
||||
getUserInfo
|
||||
} from "@/api/system/user.js"
|
||||
@@ -69,15 +70,20 @@
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//个人信息
|
||||
navUserInfoFn() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/driver/mine/my_user/my_user"
|
||||
})
|
||||
},
|
||||
navigatorFn(item) {
|
||||
|
||||
if (item.text == '联系客服') {
|
||||
configGetuniq({
|
||||
key: 'consumer_hotline'
|
||||
}).then(res => {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: res.data, //仅为示例
|
||||
});
|
||||
dialFn(res.data).then(res=>{
|
||||
console.log(res);
|
||||
})
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
@@ -86,12 +92,14 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
onShow() {
|
||||
getUserInfo().then(res => {
|
||||
console.log(this.userInfo);
|
||||
this.userInfo = res.data
|
||||
uni.setStorageSync('userInfo', res.data);
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad() {}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -133,11 +141,14 @@
|
||||
margin: 0rpx 26rpx 96rpx 48rpx;
|
||||
|
||||
.user-header-avatar {
|
||||
width: 136rpx;
|
||||
height: 136rpx;
|
||||
position: relative;
|
||||
border-radius: 50%;
|
||||
background: #fff;
|
||||
|
||||
.user-header-avatar-image {
|
||||
border-radius: 50%;
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
position: absolute;
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
codeStatus: true,
|
||||
resendCodeTime: 60,
|
||||
form: {
|
||||
phone: '18739735805',
|
||||
phone: '',
|
||||
captcha: ''
|
||||
},
|
||||
//按钮开关
|
||||
@@ -82,6 +82,7 @@
|
||||
},
|
||||
onLoad() {
|
||||
this.userInfo = uni.getStorageSync('userInfo')
|
||||
this.form.phone=this.userInfo.phone
|
||||
},
|
||||
methods: {
|
||||
//更换手机号
|
||||
|
||||
@@ -9,7 +9,8 @@ const loginPage2 = "/pages/login/server-login"
|
||||
const whiteList = [
|
||||
'/pages/login/driver-login',
|
||||
'/pages/login/server-login',
|
||||
'/pages/repair/tabbar/repair'
|
||||
'/pages/repair/tabbar/repair',
|
||||
'/pages/common/textview/index'
|
||||
]
|
||||
|
||||
// 检查地址白名单
|
||||
|
||||
@@ -73,6 +73,31 @@ export function parseTime(time, pattern) {
|
||||
})
|
||||
return time_str
|
||||
}
|
||||
//获取固定格式时间
|
||||
export const getTimeType = (time, type) => {
|
||||
let date = new Date(parseInt(time));
|
||||
let y = date.getFullYear();
|
||||
let m = (date.getMonth() + 1 + '').padStart(2, '0');
|
||||
let tom = (date.getMonth() + 1 + '');
|
||||
let d = (date.getDate() + '').padStart(2, '0');
|
||||
let tod = (date.getDate() + '');
|
||||
let hh = (date.getHours() + '').padStart(2, '0');
|
||||
let mm = (date.getMinutes() + '').padStart(2, '0');
|
||||
let ss = (date.getSeconds() + '').padStart(2, '0');
|
||||
if (type === 0) {
|
||||
return `${y}-${m}-${d} ${hh}:${mm}:${ss}`;
|
||||
} else if (type === 1) {
|
||||
return `${y}-${m}-${d} ${hh}:${mm}`;
|
||||
} else if (type === 2) {
|
||||
return `${y}.${m} ${hh}:${mm}`;
|
||||
} else if (type === 3) {
|
||||
return `${y}-${m}-${d}`;
|
||||
} else if (type === 4) {
|
||||
return `${y}-${m}`;
|
||||
} else if (type === 5) {
|
||||
return `${hh}:${mm}:${ss}`;
|
||||
}
|
||||
}
|
||||
//金额格式化2 传入30000 输出3万
|
||||
export function convertToChineseNumber(number) {
|
||||
const units = ['万', '亿'];
|
||||
@@ -162,15 +187,15 @@ export function shareApi(type, data) {
|
||||
// type:分享类型 聊天:WXSceneSession 朋友圈:WXSceneTimeline
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.showLoading({
|
||||
title:'分享中',
|
||||
title: '分享中',
|
||||
})
|
||||
uni.share({
|
||||
provider: "weixin",
|
||||
scene: type,
|
||||
type: data.type,
|
||||
summary: data.summary,
|
||||
href:data.href,
|
||||
imageUrl:data.imageUrl,
|
||||
href: data.href,
|
||||
imageUrl: data.imageUrl,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
resolve(res)
|
||||
@@ -181,4 +206,18 @@ export function shareApi(type, data) {
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
//拨打电话
|
||||
export function dialFn(call) {
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: call,
|
||||
success: (res) => {
|
||||
resolve(res)
|
||||
},
|
||||
fail: (err) => {
|
||||
reject(err)
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user