|
|
@@ -57,11 +57,11 @@ |
|
|
|
import { stringToJson } from "@/utils/network/encryption"; |
|
|
|
import { fileURL } from "@/datas/fileURL.js"; |
|
|
|
import { getItem, setItem } from "@/utils/storage"; |
|
|
|
import { msg } from "@/utils/utils"; |
|
|
|
import { msg, navTo } from "@/utils/utils"; |
|
|
|
import FixedFooter from '@/components/common/FixedFooter.vue' |
|
|
|
import { |
|
|
|
infoQuery, |
|
|
|
envs, channelSingQueryApi, userSign, getOpenId, reSign, getSignParams |
|
|
|
envs, channelSingQueryApi, userSign, getOpenId, reSign, getSignParams, reSignCheck |
|
|
|
} from "@/utils/network/api"; |
|
|
|
const imgURL = `${fileURL}image/`; |
|
|
|
import useOrderSkip from "@/composables/order/useOrderSkip"; |
|
|
@@ -99,7 +99,11 @@ |
|
|
|
|
|
|
|
onShow(() => { |
|
|
|
if (state.isTestSign >= 1) { |
|
|
|
isUserSign() |
|
|
|
if (state.from == '37') { // 恢复签约 |
|
|
|
isReSignCheck() |
|
|
|
} else { |
|
|
|
isUserSign() |
|
|
|
} |
|
|
|
} else { |
|
|
|
state.isTestSign += 1 |
|
|
|
} |
|
|
@@ -151,6 +155,37 @@ |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// 恢复签约检测 |
|
|
|
const isReSignCheck = () => { |
|
|
|
let options = { |
|
|
|
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) |
|
|
|
data: { |
|
|
|
subOpenId: state.openid, |
|
|
|
signChannelType: 1, |
|
|
|
vehicleId: state.vehicleId, |
|
|
|
}, //请求参数 |
|
|
|
method: "POST", //提交方式(默认POST) |
|
|
|
showLoading: true, //是否显示加载中(默认显示) |
|
|
|
}; |
|
|
|
|
|
|
|
requestNew(reSignCheck, options).then(res => { |
|
|
|
console.log(res) |
|
|
|
let { userState, step } = res |
|
|
|
if (userState === "NORMAL") { |
|
|
|
msg("已开通车主服务"); |
|
|
|
// 如果是等待激活 |
|
|
|
navTo('/pages/service/service') |
|
|
|
|
|
|
|
} else if (userState === "PAUSED") { |
|
|
|
msg("已暂停车主服务"); |
|
|
|
return; |
|
|
|
} else if (userState === "OVERDUE") { |
|
|
|
msg("用户已开通车主服务,但欠费状态。提示用户还款,请跳转到车主服务"); |
|
|
|
return; |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const getInfo = () => { |
|
|
|
//参数说明 |
|
|
|
let options = { |