@@ -2,12 +2,13 @@ | |||
import { msg, navTo } from "@/utils/utils"; | |||
import { OrderStatus } from "@/datas/enum"; | |||
import { OrderTypes } from "@/datas/enum"; | |||
import { getItem, setItem } from "@/utils/storage"; | |||
export default function useOrderSkip() { | |||
//根据订单类型 跳转到不同的订单详情页面 | |||
const gotoOrderDetails = (orderInfo) => { | |||
console.log('输出内容=====',orderInfo.orderType) | |||
console.log('输出内容=====', orderInfo.orderType) | |||
if (orderInfo.orderType === 'ISSUE') { | |||
navTo(`/subpackage/orders/order-details-new?id=${orderInfo.id}&appraise=${orderInfo.appraise}`); | |||
@@ -69,11 +70,17 @@ export default function useOrderSkip() { | |||
url = orderInfo.userType === 'PERSONAL_USER' ? '/subpackage/orders/opening-account-people' : '/subpackage/orders/opening-account-unit'; | |||
} else if (orderInfo.orderStep === OrderStatus["完成个人/单位信息上传"]) { | |||
url = '/subpackage/orders/car-release'; | |||
} else if (orderInfo.orderStep === OrderStatus.完成车辆信息上传) { | |||
} else if (orderInfo.orderStep === OrderStatus.完成车辆信息上传 && orderInfo.isValueCard != 2) { | |||
url = `/subpackage/orders/release-products`; | |||
} else if (orderInfo.orderStep === OrderStatus.完成车辆信息上传 && orderInfo.isValueCard == 2) { | |||
url = `/subpackage/orders/interestsList?orderId=${orderInfo.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`; | |||
// uni.redirectTo({ | |||
// url: `/subpackage/orders/choice-product?orderId=${val.orderId}`, | |||
// }); | |||
} else { | |||
url = `/subpackage/orders/essential-information`; | |||
} | |||
console.log("url", url) | |||
navTo(`${url}?orderId=${orderInfo.orderId}&clientFee=${orderInfo.amount}&id=${orderInfo.productId}&vehiclePlateColor=${orderInfo.vehiclePlateColor}&fromOrder=true&type=${orderInfo.type}&userType=${orderInfo.userType === 'PERSONAL_USER' ? '1' : '2'}`); | |||
} | |||
@@ -1,353 +1,312 @@ | |||
<!-- 密码登录 --> | |||
<template> | |||
<view class="login-main as-gravity-center as-layout-vertical"> | |||
<image :src="`${$imgUrl}login/logo.png`" class="logo" mode="aspectFill"></image> | |||
<view class="title">九州ETC</view> | |||
<view class="form"> | |||
<view class="form-input"> | |||
<view> +86</view> | |||
<image :src="`${$imgUrl}common/arror_down_black.png`" class="arror" mode="aspectFill"/> | |||
<input | |||
class="input" | |||
v-model="state.username" | |||
focus | |||
placeholder="请输入手机号" | |||
placeholder-class="form-placeholder" | |||
type="number" | |||
maxlength="11" | |||
/> | |||
</view> | |||
<view class="form-input" v-if="state.loginType === 'pwd'"> | |||
<input | |||
class="input" | |||
v-model="state.password" | |||
type="text" | |||
placeholder="请输入密码" | |||
placeholder-class="form-placeholder" | |||
:password="state.isPwdType ? true : false" | |||
/> | |||
<image | |||
:src="`${$imgUrl}login/${ | |||
<view class="login-main as-gravity-center as-layout-vertical"> | |||
<image :src="`${$imgUrl}login/logo.png`" class="logo" mode="aspectFill"></image> | |||
<view class="title">九州ETC</view> | |||
<view class="form"> | |||
<view class="form-input"> | |||
<view> +86</view> | |||
<image :src="`${$imgUrl}common/arror_down_black.png`" class="arror" mode="aspectFill" /> | |||
<input class="input" v-model="state.username" focus placeholder="请输入手机号" | |||
placeholder-class="form-placeholder" type="number" maxlength="11" /> | |||
</view> | |||
<view class="form-input" v-if="state.loginType === 'pwd'"> | |||
<input class="input" v-model="state.password" type="text" placeholder="请输入密码" | |||
placeholder-class="form-placeholder" :password="state.isPwdType ? true : false" /> | |||
<image :src="`${$imgUrl}login/${ | |||
state.isPwdType ? 'icon_eye_close' : 'icon_eye_open' | |||
}.png`" | |||
class="eye" | |||
@click="state.isPwdType = !state.isPwdType" | |||
mode="aspectFill" | |||
></image> | |||
</view> | |||
<view class="form-input" v-if="state.loginType === 'code'"> | |||
<input | |||
class="input" | |||
v-model="state.code" | |||
placeholder="请输入验证码" | |||
placeholder-class="form-placeholder" | |||
maxlength="6" | |||
type="number" | |||
/> | |||
<verification-code | |||
:bg="false" | |||
:mobile="state.username" | |||
></verification-code> | |||
</view> | |||
</view> | |||
<view class="btn"> | |||
<submit-button title="登录" @submit="doLogin"></submit-button> | |||
</view> | |||
<view class="agreement"> | |||
<checkbox-group @change="checkboxChange" class="group"> | |||
<checkbox | |||
:checked="state.checked" | |||
color="#00B38B" | |||
size="30" | |||
icon-size="30" | |||
label-size="24" | |||
style="transform:scale(0.85)" | |||
> | |||
</checkbox> | |||
<label>我已阅读并同意</label> | |||
</checkbox-group> | |||
<!-- <view class="txt-grey">我已阅读并同意</view> --> | |||
<view class="txt-green" @click="toRead" | |||
>《平台用户服务隐私协议》</view | |||
> | |||
</view> | |||
<view class="btns as-layout-horizontal"> | |||
<view | |||
class="as-layout-vertical as-gravity-center" | |||
@click="navTo('/login/register-step1')" | |||
> | |||
<view class="bg blue as-gravity-center"> | |||
<image :src="`${$imgUrl}login/icon_register.png`" class="img" mode="aspectFill"/> | |||
</view> | |||
<view class="label">注册账号</view> | |||
</view> | |||
<view | |||
class="as-layout-vertical as-gravity-center" | |||
@click=" | |||
}.png`" class="eye" @click="state.isPwdType = !state.isPwdType" mode="aspectFill"></image> | |||
</view> | |||
<view class="form-input" v-if="state.loginType === 'code'"> | |||
<input class="input" v-model="state.code" placeholder="请输入验证码" placeholder-class="form-placeholder" | |||
maxlength="6" type="number" /> | |||
<verification-code :bg="false" :mobile="state.username"></verification-code> | |||
</view> | |||
</view> | |||
<view class="btn"> | |||
<submit-button title="登录" @submit="doLogin"></submit-button> | |||
</view> | |||
<view class="agreement"> | |||
<checkbox-group @change="checkboxChange" class="group"> | |||
<checkbox :checked="state.checked" color="#00B38B" size="30" icon-size="30" label-size="24" | |||
style="transform:scale(0.85)"> | |||
</checkbox> | |||
<label>我已阅读并同意</label> | |||
</checkbox-group> | |||
<!-- <view class="txt-grey">我已阅读并同意</view> --> | |||
<view class="txt-green" @click="toRead">《平台用户服务隐私协议》</view> | |||
</view> | |||
<view class="btns as-layout-horizontal"> | |||
<view class="as-layout-vertical as-gravity-center" @click="navTo('/login/register-step1')"> | |||
<view class="bg blue as-gravity-center"> | |||
<image :src="`${$imgUrl}login/icon_register.png`" class="img" mode="aspectFill" /> | |||
</view> | |||
<view class="label">注册账号</view> | |||
</view> | |||
<view class="as-layout-vertical as-gravity-center" @click=" | |||
state.loginType === 'pwd' | |||
? (state.loginType = 'code') | |||
: (state.loginType = 'pwd') | |||
" | |||
> | |||
<view class="bg orange as-gravity-center"> | |||
<image :src="`${$imgUrl}login/icon_code.png`" class="img" mode="aspectFill"/> | |||
</view> | |||
<view class="label">{{ | |||
"> | |||
<view class="bg orange as-gravity-center"> | |||
<image :src="`${$imgUrl}login/icon_code.png`" class="img" mode="aspectFill" /> | |||
</view> | |||
<view class="label">{{ | |||
state.loginType === "pwd" ? "验证码登录" : "密码登录" | |||
}}</view> | |||
</view> | |||
<view | |||
class="as-layout-vertical as-gravity-center" | |||
@click="navTo('/login/forget-pwd-step1')" | |||
> | |||
<view class="bg purple as-gravity-center"> | |||
<image :src="`${$imgUrl}login/icon_pwd.png`" class="img" mode="aspectFill"/> | |||
</view> | |||
<view class="label">忘记密码</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<view class="as-layout-vertical as-gravity-center" @click="navTo('/login/forget-pwd-step1')"> | |||
<view class="bg purple as-gravity-center"> | |||
<image :src="`${$imgUrl}login/icon_pwd.png`" class="img" mode="aspectFill" /> | |||
</view> | |||
<view class="label">忘记密码</view> | |||
</view> | |||
</view> | |||
</view> | |||
</template> | |||
<script setup lang="ts"> | |||
import { reactive } from "vue"; | |||
import { checkStr, msg, navTo } from "@/utils/utils"; | |||
import { onLoad, onUnload } from "@dcloudio/uni-app"; | |||
import { login, loginCode, loginTime } from "@/utils/network/api.js"; | |||
import { request } from "@/utils/network/request.js"; | |||
import { stringToJson } from "@/utils/network/encryption"; | |||
import { useUserStore } from "@/stores/user"; | |||
import { setItem } from "@/utils/storage"; | |||
const userStore = useUserStore(); | |||
const { fetchToken } = userStore; | |||
const state = reactive({ | |||
checked: false, //是否勾选协议 | |||
isPwdType: true, //是不是密码类型 | |||
loginType: "pwd", //pwd-密码登录 code-验证码登录 | |||
username: "", //用户名 | |||
password: "", //密码 | |||
code: "", //验证码 | |||
}); | |||
onLoad(() => { | |||
uni.$on("login", (data) => { | |||
state.username = data.phone; | |||
}); | |||
}); | |||
onUnload(() => { | |||
uni.$off("login"); | |||
}); | |||
const checkboxChange = (e) => { | |||
console.log(e); | |||
state.checked = !state.checked; | |||
}; | |||
// 去协议页面 | |||
const toRead=()=>{ | |||
navTo("/login/agreement") | |||
} | |||
/* 登录 */ | |||
const doLogin = () => { | |||
if (!state.username) { | |||
msg("请输入手机号!"); | |||
return; | |||
} | |||
if (state.loginType === "pwd" && !state.password) { | |||
msg("请输入密码!"); | |||
return; | |||
} | |||
if (state.loginType === "code" && !state.code) { | |||
msg("请输入验证码!"); | |||
return; | |||
} | |||
if (!checkStr(state.username, "mobile")) { | |||
msg("请输入正确的手机号!"); | |||
return; | |||
} | |||
if (!state.checked) { | |||
msg("请勾选我已阅读并同意《平台用户服务隐私协议》"); | |||
return; | |||
} | |||
//判断是验证码登录,还是账号密码登录 | |||
if (state.loginType === "code") { | |||
reqLogin(loginCode, { | |||
mobile: state.username, | |||
code: state.code, | |||
loginTime: loginTime, | |||
}); | |||
} else { | |||
reqLogin(login, { | |||
mobile: state.username, | |||
password: state.password, | |||
loginTime: loginTime, | |||
}); | |||
} | |||
}; | |||
/* 执行登录 */ | |||
const reqLogin = (code:string, data:object) => { | |||
console.log(code,data); | |||
const options = { | |||
type: 2, | |||
data: data, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(code, options).then((res) => { | |||
const result = stringToJson(res.bizContent); | |||
console.log(result); | |||
console.log(typeof(result)); | |||
fetchToken(result.code).then((data:any) => { | |||
console.log("登录",data); | |||
subscribeMessages(); | |||
msg("登录成功!"); | |||
uni.$emit("refreshOrder"); | |||
uni.navigateBack(); | |||
}); | |||
}); | |||
}; | |||
// 订阅消息 | |||
const subscribeMessages=()=>{ | |||
uni.requestSubscribeMessage({ | |||
tmplIds: ['aNr4T2JEtaLtR9dihM2w3NAznz4bFMkutVZCbaSTjxg'], | |||
success (res) { | |||
console.log("订阅消息",res) | |||
} | |||
}) | |||
} | |||
import { reactive } from "vue"; | |||
import { checkStr, msg, navTo } from "@/utils/utils"; | |||
import { onLoad, onUnload } from "@dcloudio/uni-app"; | |||
import { login, loginCode, loginTime } from "@/utils/network/api.js"; | |||
import { request } from "@/utils/network/request.js"; | |||
import { stringToJson } from "@/utils/network/encryption"; | |||
import { useUserStore } from "@/stores/user"; | |||
import { setItem } from "@/utils/storage"; | |||
const userStore = useUserStore(); | |||
const { fetchToken } = userStore; | |||
const state = reactive({ | |||
checked: false, //是否勾选协议 | |||
isPwdType: true, //是不是密码类型 | |||
loginType: "pwd", //pwd-密码登录 code-验证码登录 | |||
username: "", //用户名 | |||
password: "", //密码 | |||
code: "", //验证码 | |||
}); | |||
onLoad(() => { | |||
uni.$on("login", (data) => { | |||
state.username = data.phone; | |||
}); | |||
}); | |||
onUnload(() => { | |||
uni.$off("login"); | |||
}); | |||
const checkboxChange = (e) => { | |||
console.log(e); | |||
state.checked = !state.checked; | |||
}; | |||
// 去协议页面 | |||
const toRead = () => { | |||
navTo("/login/agreement") | |||
} | |||
/* 登录 */ | |||
const doLogin = () => { | |||
if (!state.username) { | |||
msg("请输入手机号!"); | |||
return; | |||
} | |||
if (state.loginType === "pwd" && !state.password) { | |||
msg("请输入密码!"); | |||
return; | |||
} | |||
if (state.loginType === "code" && !state.code) { | |||
msg("请输入验证码!"); | |||
return; | |||
} | |||
if (!checkStr(state.username, "mobile")) { | |||
msg("请输入正确的手机号!"); | |||
return; | |||
} | |||
if (!state.checked) { | |||
msg("请勾选我已阅读并同意《平台用户服务隐私协议》"); | |||
return; | |||
} | |||
//判断是验证码登录,还是账号密码登录 | |||
if (state.loginType === "code") { | |||
reqLogin(loginCode, { | |||
mobile: state.username, | |||
code: state.code, | |||
loginTime: loginTime, | |||
}); | |||
} else { | |||
reqLogin(login, { | |||
mobile: state.username, | |||
password: state.password, | |||
loginTime: loginTime, | |||
}); | |||
} | |||
}; | |||
/* 执行登录 */ | |||
const reqLogin = (code : string, data : object) => { | |||
console.log(code, data); | |||
const options = { | |||
type: 2, | |||
data: data, | |||
method: "POST", | |||
showLoading: true, | |||
}; | |||
request(code, options).then((res) => { | |||
const result = stringToJson(res.bizContent); | |||
console.log(result); | |||
console.log(typeof (result)); | |||
fetchToken(result.code).then((data : any) => { | |||
console.log("登录", data); | |||
setItem('mobile', state.username) | |||
subscribeMessages(); | |||
msg("登录成功!"); | |||
uni.$emit("refreshOrder"); | |||
uni.navigateBack(); | |||
}); | |||
}); | |||
}; | |||
// 订阅消息 | |||
const subscribeMessages = () => { | |||
uni.requestSubscribeMessage({ | |||
tmplIds: ['aNr4T2JEtaLtR9dihM2w3NAznz4bFMkutVZCbaSTjxg'], | |||
success(res) { | |||
console.log("订阅消息", res) | |||
} | |||
}) | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.login-main { | |||
border-top: 1rpx solid #dcdcdc; | |||
padding: 22rpx 30rpx 140rpx; | |||
.logo { | |||
width: 260rpx; | |||
height: 160rpx; | |||
} | |||
.group{ | |||
display: flex; | |||
align-items: center; | |||
} | |||
.title { | |||
font-size: 46rpx; | |||
color: #333333; | |||
margin-top: 30rpx; | |||
font-weight: 600; | |||
} | |||
.form { | |||
width: 100%; | |||
margin-top: 100rpx; | |||
.form-input { | |||
display: flex; | |||
flex-direction: row; | |||
align-items: center; | |||
height: 90rpx; | |||
border-bottom: 1rpx solid #dcdcdc; | |||
padding: 0rpx 12rpx; | |||
color: #333333; | |||
&:last-child { | |||
margin-top: 50rpx; | |||
} | |||
.input { | |||
flex: 1; | |||
padding-right: 48rpx; | |||
font-size: 28rpx; | |||
font-family: Microsoft YaHei; | |||
background-color: transparent; | |||
} | |||
.arror { | |||
width: 28rpx; | |||
height: 25rpx; | |||
margin-left: 16rpx; | |||
margin-right: 40rpx; | |||
} | |||
.eye { | |||
width: 48rpx; | |||
height: 48rpx; | |||
} | |||
} | |||
.form-placeholder { | |||
color: #999999; | |||
} | |||
} | |||
.btn { | |||
width: 100%; | |||
margin: 120rpx 40rpx 50rpx; | |||
} | |||
.agreement { | |||
font-size: 24rpx; | |||
display: flex; | |||
align-items: center; | |||
.txt-grey { | |||
color: #666666; | |||
} | |||
.txt-green { | |||
color: #00b38b; | |||
} | |||
:deep(.u-checkbox) { | |||
margin-right: -20rpx; | |||
} | |||
} | |||
.btns { | |||
width: 100%; | |||
margin-top: 125rpx; | |||
justify-content: space-around; | |||
padding: 0px 8rpx; | |||
.bg { | |||
width: 80rpx; | |||
height: 80rpx; | |||
border-radius: 50%; | |||
.img { | |||
width: 48rpx; | |||
height: 48rpx; | |||
} | |||
} | |||
.blue { | |||
background-color: #1d9cff; | |||
} | |||
.orange { | |||
background-color: #feb654; | |||
} | |||
.purple { | |||
background-color: #8060ff; | |||
} | |||
.label { | |||
font-size: 26rpx; | |||
color: #333333; | |||
margin-top: 30rpx; | |||
} | |||
} | |||
} | |||
</style> | |||
.login-main { | |||
border-top: 1rpx solid #dcdcdc; | |||
padding: 22rpx 30rpx 140rpx; | |||
.logo { | |||
width: 260rpx; | |||
height: 160rpx; | |||
} | |||
.group { | |||
display: flex; | |||
align-items: center; | |||
} | |||
.title { | |||
font-size: 46rpx; | |||
color: #333333; | |||
margin-top: 30rpx; | |||
font-weight: 600; | |||
} | |||
.form { | |||
width: 100%; | |||
margin-top: 100rpx; | |||
.form-input { | |||
display: flex; | |||
flex-direction: row; | |||
align-items: center; | |||
height: 90rpx; | |||
border-bottom: 1rpx solid #dcdcdc; | |||
padding: 0rpx 12rpx; | |||
color: #333333; | |||
&:last-child { | |||
margin-top: 50rpx; | |||
} | |||
.input { | |||
flex: 1; | |||
padding-right: 48rpx; | |||
font-size: 28rpx; | |||
font-family: Microsoft YaHei; | |||
background-color: transparent; | |||
} | |||
.arror { | |||
width: 28rpx; | |||
height: 25rpx; | |||
margin-left: 16rpx; | |||
margin-right: 40rpx; | |||
} | |||
.eye { | |||
width: 48rpx; | |||
height: 48rpx; | |||
} | |||
} | |||
.form-placeholder { | |||
color: #999999; | |||
} | |||
} | |||
.btn { | |||
width: 100%; | |||
margin: 120rpx 40rpx 50rpx; | |||
} | |||
.agreement { | |||
font-size: 24rpx; | |||
display: flex; | |||
align-items: center; | |||
.txt-grey { | |||
color: #666666; | |||
} | |||
.txt-green { | |||
color: #00b38b; | |||
} | |||
:deep(.u-checkbox) { | |||
margin-right: -20rpx; | |||
} | |||
} | |||
.btns { | |||
width: 100%; | |||
margin-top: 125rpx; | |||
justify-content: space-around; | |||
padding: 0px 8rpx; | |||
.bg { | |||
width: 80rpx; | |||
height: 80rpx; | |||
border-radius: 50%; | |||
.img { | |||
width: 48rpx; | |||
height: 48rpx; | |||
} | |||
} | |||
.blue { | |||
background-color: #1d9cff; | |||
} | |||
.orange { | |||
background-color: #feb654; | |||
} | |||
.purple { | |||
background-color: #8060ff; | |||
} | |||
.label { | |||
font-size: 26rpx; | |||
color: #333333; | |||
margin-top: 30rpx; | |||
} | |||
} | |||
} | |||
</style> |
@@ -46,7 +46,6 @@ | |||
<view class="btn btn-primary" @click.stop="gotoEditUserOrUnitInfo(item)">继续申请</view> | |||
</view> | |||
<!-- 待支付 --> | |||
<view class="btns" v-if="item.orderStep == OrderStatus.待支付1"> | |||
<view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view> | |||
@@ -115,6 +114,12 @@ | |||
<view class="btn btn-normal" @click.stop="gotoCheckLogistics(item)">查看物流</view> | |||
<view class="btn btn-primary" @click.stop="gotoConfirmReceipt(item)">确认收货</view> | |||
</view> | |||
<!-- '已支付' = 5, | |||
'已申请-退货' = 13, | |||
'退款中' = 15, | |||
'退款成功' = 16, | |||
'退货成功' = 17, | |||
'换货-设备已回收' = 18, --> | |||
</template> | |||
</view> | |||
@@ -16,7 +16,8 @@ | |||
<!-- 列表 --> | |||
<block v-for="(item,index) in ordersList" :key="index"> | |||
<!-- 新办订单 --> | |||
<order-list-item-new :item="item" v-if="item.orderType == 'ISSUE'" /> | |||
<!-- v-if="item.orderType == 'ISSUE'" --> | |||
<order-list-item-new :item="item" /> | |||
<!-- 卡签同时更换/更换卡/更换签订单 --> | |||
<!-- <order-list-item-card-sign :item="item" | |||
v-else-if="item.orderType == OrderTypes.同时换卡换签 || item.orderType == 'REPLACEMENT_CARD' |
@@ -63,8 +63,8 @@ | |||
tabIndex: '0', //0全部 | |||
orderStep: '11', //11 为已完成” | |||
title:'1', | |||
isValueCard:'3', | |||
// isValueCard:'1,3', | |||
// isValueCard:'3', | |||
isValueCard:'1,3', | |||
}; | |||
const options = { | |||
type: 2, |
@@ -13,7 +13,8 @@ import { | |||
import { | |||
appId, | |||
getToken, | |||
wechatAppID | |||
wechatAppID, | |||
updateToken | |||
} from "@/utils/network/api"; | |||
import { | |||
stringToJson | |||
@@ -56,7 +57,7 @@ export const useUserStore = defineStore("userStore", { | |||
deviceId: "", | |||
code: code, | |||
loginSource: getItem("loginSource"), | |||
'wxOpenid':getItem("QYorder"), | |||
wxOpenid: JSON.stringify(getItem("QYorder")) | |||
}, | |||
method: "POST", | |||
showLoading: false, | |||
@@ -65,7 +66,7 @@ export const useUserStore = defineStore("userStore", { | |||
return new Promise(async (resolve, reject) => { | |||
const res = await request(getToken, options); | |||
const data = stringToJson(res.bizContent); | |||
console.log("data",data) | |||
console.log("data", data) | |||
this.saveToken(data.accessToken); | |||
this.saveOpenId(data.openId); | |||
console.log('输出内容', data.openId) | |||
@@ -75,6 +76,8 @@ export const useUserStore = defineStore("userStore", { | |||
}); | |||
}, | |||
/*退出登录*/ | |||
loginOutNoConfirm() { | |||
msg("退出登录成功!"); | |||
@@ -83,6 +86,7 @@ export const useUserStore = defineStore("userStore", { | |||
// //移除本地缓存 | |||
removeItem(StorageKeys.Token); | |||
removeItem(StorageKeys.OpenId); | |||
removeItem(StorageKeys.QYorder); | |||
uni.$emit('loginOut'); | |||
uni.navigateTo({ | |||
url: "/login/login" | |||
@@ -101,4 +105,4 @@ export const useUserStore = defineStore("userStore", { | |||
); | |||
}, | |||
}, | |||
}); | |||
}); |
@@ -43,7 +43,7 @@ | |||
<text>储蓄卡</text> | |||
<text class="tips-card">{{getCodeName('CARD_STATE_TYPE',orderInfos.cardStatus)}}</text> | |||
</view> | |||
<view class="choose-item"> 有效期:xxxx-xx-xx </view> | |||
<!-- <view class="choose-item"> 有效期:xxxx-xx-xx </view> --> | |||
</view> | |||
</view> | |||
@@ -58,7 +58,7 @@ | |||
<!-- <text>储蓄卡</text> --> | |||
<text class="tips-card">{{getCodeName('OBU_STATE_TYPE',orderInfos.obuStatus)}}</text> | |||
</view> | |||
<view class="choose-item"> 有效期:xxxx-xx-xx </view> | |||
<!-- <view class="choose-item"> 有效期:xxxx-xx-xx </view> --> | |||
</view> | |||
</view> | |||
</view> | |||
@@ -200,7 +200,7 @@ | |||
const options = { | |||
type: 2, | |||
data: { | |||
id: id, | |||
id: "cebc78a8aa024a0c96c0d1b0da3752e5", | |||
}, | |||
method: "POST", | |||
showLoading: true, |
@@ -242,17 +242,25 @@ | |||
}&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`, | |||
}); | |||
} else { | |||
// uni.redirectTo({ | |||
// url: `/subpackage/orders/release-products?orderId=${state.form.orderId | |||
// }&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`, | |||
// }); | |||
uni.redirectTo({ | |||
// url: `/subpackage/orders/choice-product?orderId=${state.form.orderId}`, | |||
url: `/subpackage/orders/release-products?orderId=${state.form.orderId | |||
}&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`, | |||
url: `/subpackage/orders/sign-up?orderId=${state.form.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`, | |||
}); | |||
} | |||
}else{ | |||
// 不签约 | |||
// uni.redirectTo({ | |||
// url: `/subpackage/orders/sign-up?orderId=${state.form.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`, | |||
// }); | |||
uni.redirectTo({ | |||
url: `/subpackage/orders/sign-up?orderId=${state.form.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}`, | |||
url:`/subpackage/orders/interestsList?orderId=${state.form.orderId}&&clientFee=${getItem("clientFee")}&&id=${getItem("productId")}` | |||
}); | |||
// uni.redirectTo({ | |||
// url: `/subpackage/orders/release-products?orderId=${state.form.orderId}&clientFee=${getItem('clientFee')}&&id=${getItem('productId')}`, | |||
// }); | |||
} | |||
} | |||
}); |
@@ -33,13 +33,26 @@ | |||
</view> | |||
<view class="bottomTip"> 到底啦!敬请期待其他产品! </view> | |||
</view> | |||
<u-popup mode="center" v-model="state.choiceCardShow"> | |||
<u-popup mode="center" v-model="state.choiceCardShow" closeable> | |||
<view class="squire"> | |||
<u-radio-group> | |||
<u-radio :customStyle="{marginBottom: '8px'}" activeColor="#2CE242" | |||
<!-- <view class="mask-close"> | |||
<image :src="fileURL + 'image/index/icon-close.png'" class="icon-closed" @click="closeMask"></image> | |||
</view> --> | |||
<!-- <view class="mask-title" :style="{ '--color': color }">选择卡的类型</view> --> | |||
<u-radio-group wrap> | |||
<u-radio :customStyle="{marginBottom: '8px'}" activeColor="#2CE242" | |||
v-for="(item, index) in state.radiolist1" :key="index" :label="item.disabled" :name="item.name" | |||
@change="radioChange"> | |||
{{item.name}} | |||
<view style="width: 100%;display: flex;align-items: center;margin-bottom: 30rpx;"> | |||
<image | |||
style="width: 200rpx; height: 100rpx; border-radius: 20rpx;margin-right: 20rpx;" | |||
:src="`${$imgUrl}card2.png`" | |||
mode="aspectFill" | |||
></image> | |||
<!-- <image :src="`${$imgUrl}card2.png`" mode=""></image> --> | |||
{{item.name}} | |||
</view> | |||
</u-radio> | |||
</u-radio-group> | |||
</view> | |||
@@ -203,6 +216,11 @@ const state = reactive({ | |||
</script> | |||
<style lang="scss" scoped> | |||
::v-deep .u-radio{ | |||
display: flex !important; | |||
align-items: center !important; | |||
float: none !important; | |||
} | |||
::v-deep .u-icon__icon{ | |||
top: -4px !important; | |||
} | |||
@@ -362,6 +380,20 @@ const state = reactive({ | |||
border-radius: 10rpx; | |||
} | |||
.squire{ | |||
padding: 20rpx; | |||
padding: 30rpx 30rpx 30rpx 50rpx; | |||
} | |||
.mask-close { | |||
text-align: right; | |||
} | |||
.icon-closed { | |||
width: 48rpx; | |||
height: 48rpx; | |||
} | |||
.mask-title { | |||
text-align: center; | |||
font-size: 32rpx; | |||
color: $uni-text-color-black; | |||
margin-bottom: 50rpx; | |||
margin-top: 50rpx; | |||
} | |||
</style> |
@@ -300,7 +300,7 @@ const orderGoAction = () => { | |||
}; | |||
//订单状态舔砖 | |||
const orderStepGoActon = (val: any) => { | |||
console.log(val); | |||
console.log("订单状态舔砖",val); | |||
//完成填写基本信息 | |||
if (val.orderStep === 1) { | |||
if (state.data.userType === 1) { | |||
@@ -317,9 +317,18 @@ const orderStepGoActon = (val: any) => { | |||
url: `/subpackage/orders/car-release?orderId=${val.orderId}&&vehiclePlateColor=${val.vehiclePlateColor}`, | |||
}); | |||
} else if (val.orderStep === 3) { | |||
uni.redirectTo({ | |||
url: `/subpackage/orders/choice-product?orderId=${val.orderId}`, | |||
}); | |||
uni.redirectTo({ | |||
url: `/subpackage/orders/choice-product?orderId=${val.orderId}`, | |||
}); | |||
// if(val.isValueCard==2){ | |||
// uni.redirectTo({ | |||
// url:`/subpackage/orders/interestsList?orderId=${val.orderId}&&clientFee=${val.product.clientFee}&&id=${val.productId}` | |||
// }); | |||
// }else{ | |||
// uni.redirectTo({ | |||
// url: `/subpackage/orders/choice-product?orderId=${val.orderId}`, | |||
// }); | |||
// } | |||
}else if (val.orderStep === 4) { | |||
uni.redirectTo({ | |||
url: `/subpackage/orders/product-detail?orderId=${val.orderId}&&clientFee=${val.product.clientFee}&&id=${val.productId}`, |
@@ -20,8 +20,11 @@ | |||
</view> | |||
</view> | |||
</view> | |||
<button type="default" class="button" @click="savaHandle()"> | |||
<!-- <button type="default" class="button" @click="savaHandle()"> | |||
开通服务 | |||
</button> --> | |||
<button type="default" class="button" @click="addInterestsList()"> | |||
加购权益 | |||
</button> | |||
</view> | |||
</template> | |||
@@ -65,7 +68,16 @@ | |||
state.id = option.id; | |||
console.log("option", option) | |||
}) | |||
const addInterestsList=()=>{ | |||
state.choiceValueComplete = []; | |||
for (var i = 0; i < state.choiceValue.length; i++) { | |||
state.choiceValueComplete.push(state.list[state.choiceValue[i]]) | |||
} | |||
let items = encodeURIComponent(JSON.stringify(state.choiceValueComplete)); | |||
uni.navigateTo({ | |||
url: `/subpackage/orders/product-detail?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}&&data=${items}`, | |||
}); | |||
} | |||
const getList = (id) => { | |||
const options = { | |||
type: 2, |
@@ -439,7 +439,7 @@ | |||
request(orderDetail, options).then((res) => { | |||
state.orderInfo = stringToJson(res.bizContent); | |||
state.orderInfo.appraise = appraise; | |||
console.log("state.orderInfo",state.orderInfo) | |||
//测试 | |||
// state.orderInfo.orderStep = OrderStatus.待激活; | |||
}) | |||
@@ -478,7 +478,7 @@ | |||
//是否有售后信息 | |||
const isHaveAfterSaleInfo = () =>{ | |||
if(isBlank(state.orderInfo.orderInfoExt.returnMode ?state.orderInfo.orderInfoExt.returnMode: null) && isBlank(state.orderInfo.orderInfoExt.exchangeMode ?state.orderInfo.orderInfoExt.exchangeMode: null)){ | |||
if(isBlank(state.orderInfo.orderInfoExt ?state.orderInfo.orderInfoExt.returnMode: null) && isBlank(state.orderInfo.orderInfoExt ?state.orderInfo.orderInfoExt.exchangeMode: null)){ | |||
return false; | |||
} | |||
return true; |
@@ -16,7 +16,7 @@ | |||
</view> | |||
</view> | |||
</view> | |||
加购权益列表 | |||
<view style="margin: 20rpx 0 10rpx 20rpx;font-size: 32rpx;">加购权益列表</view> | |||
<view class="add_all"> | |||
<uni-swipe-action> | |||
<uni-swipe-action-item class="del_item" v-for="(item,index) in state.list" |
@@ -18,12 +18,12 @@ | |||
</view> | |||
</view> | |||
<view class="action"> | |||
<!-- <button type="default" class="button" @click="savaHandle()"> | |||
<button type="default" class="button" @click="savaHandle()"> | |||
开通服务 | |||
</button> --> | |||
<button type="default" class="button" @click="addInterestsList()"> | |||
</button> | |||
<!-- <button type="default" class="button" @click="addInterestsList()"> | |||
加购权益 | |||
</button> | |||
</button> --> | |||
</view> | |||
</template> | |||
@@ -137,9 +137,12 @@ const savaHandle = () => { | |||
}); | |||
} else if (data.userState === "NORMAL") { | |||
msg("已开通车主服务"); | |||
uni.navigateTo({ | |||
url: `/subpackage/orders/product-detail?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}`, | |||
}); | |||
// uni.navigateTo({ | |||
// url: `/subpackage/orders/product-detail?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}`, | |||
// }); | |||
uni.navigateTo({ | |||
url:`/subpackage/orders/interestsList?orderId=${state.orderId}&&clientFee=${state.clientFee}&&id=${state.id}` | |||
}); | |||
} else if (data.userState === "PAUSED") { | |||
msg("已暂停车主服务"); | |||
return; |
@@ -41,6 +41,7 @@ export const login = "1004"; //统一会员平台个人账号手机号密码登 | |||
export const loginCode = "1005"; //统一会员平台个人账号手机号验证码登录 | |||
export const resetPwd = "1009"; //会员平台个人账号修改密码手机号验证码接口 | |||
export const getToken = "1006"; //统一会员平台登录确认接口(用于换取openId和token) | |||
export const updateToken = "225aa780a91b40f0b44e7e5fe204fc9a"; //统一会员平台登录确认接口(用于换取openId和token) | |||
export const checkCode = "966"; //校验验证码 | |||
export const register = "52de4029940f4e03b18c3a0b8d64c2db";//USER-无感注册登录(个人/企业) | |||
export const obtainUserId = "58760acb637245729e971597a1fb92c4";//获取第三方用户标识 |
@@ -17,6 +17,32 @@ import { | |||
} from '../util/sm4.js' | |||
const s4 = new SM4Util() | |||
let toole = 0; | |||
/* 刷新token */ | |||
function updateToken() { | |||
const options = { | |||
type: 2, | |||
data: { | |||
openId: getItem("openId"), | |||
accessToken: getItem("accessToken") | |||
}, | |||
method: "POST", | |||
showLoading: false, | |||
}; | |||
//刷新token | |||
return new Promise(async (resolve, reject) => { | |||
const res = await request(updateToken, options); | |||
const data = stringToJson(res.bizContent); | |||
console.log("data", data) | |||
setItem('accessToken', data.accessToken); | |||
setItem('openId', data.openId); | |||
resolve(data); | |||
}).catch((error) => { | |||
reject(error); | |||
}); | |||
} | |||
//请求 | |||
export function request(code, options = {}) { | |||
//公参 | |||
@@ -89,6 +115,26 @@ export function request(code, options = {}) { | |||
} | |||
} | |||
}); | |||
} else if (res.data.statusCode == 34567) { | |||
toole++ | |||
if (toole > 2) { | |||
updateToken(result.code).then((data) => { | |||
console.log("token刷新", data); | |||
request(code, options) | |||
}); | |||
} else { | |||
uni.showModal({ | |||
title: '提示', | |||
content: res.data.errorMsg, | |||
success: function(res) { | |||
if (res.confirm) { | |||
console.log('用户点击确定'); | |||
} else if (res.cancel) { | |||
console.log('用户点击取消'); | |||
} | |||
} | |||
}); | |||
} | |||
} else { | |||
uni.showModal({ | |||
title: '提示', |