@@ -71,7 +71,7 @@ export default function useOrderSkip() { | |||
console.log("******************", orderInfo.orderStep); | |||
console.log("********555555555555**********", orderInfo); | |||
let url = ''; | |||
if (orderInfo.orderStep == OrderStatus.完成填写基本信息) { | |||
if (orderInfo.orderStep == OrderStatus.完成填写基本信息 || orderInfo.orderStep == OrderStatus.待支付3) { | |||
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'; | |||
@@ -83,8 +83,8 @@ export default function useOrderSkip() { | |||
// uni.redirectTo({ | |||
// url: `/subpackage/orders/choice-product?orderId=${val.orderId}`, | |||
// }); | |||
} else { | |||
} else if (orderInfo.orderStep === OrderStatus["完成车辆信息上传/待支付"]) { | |||
url = '/subpackage/orders/order-payment'; | |||
} | |||
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'}`); |
@@ -20,7 +20,7 @@ export const OrderStatus = [{ | |||
}, | |||
{ | |||
key: 5, | |||
value: "已支付" | |||
value: "完成签约" | |||
}, | |||
{ | |||
key: 6, | |||
@@ -80,4 +80,4 @@ export const OrderStatus = [{ | |||
export const getOrderStatus = (id) => { | |||
let types = OrderStatus.filter(item => item.key == id); | |||
return types[0]?.value | |||
} | |||
} |
@@ -6,15 +6,38 @@ export enum PageData { | |||
} | |||
//订单状态 | |||
// export enum OrderStatus { | |||
// '已取消' = -1, //注意“已取消”判断字段未orderStatus,下面判断字段为orderStep | |||
// '完成填写基本信息' = 1, | |||
// '完成个人/单位信息上传' = 2, | |||
// '完成车辆信息上传' = 3, | |||
// '待加购权益' = 4, | |||
// '待支付2' = 26, //已经生成二维码但未支付 | |||
// '待支付3' = 27, //加购完权益但未支付 | |||
// '已支付' = 5, | |||
// '待审核' = 6, | |||
// '审核不通过' = 7, | |||
// '待发货' = 8, | |||
// '待收货' = 9, | |||
// '待激活' = 10, | |||
// '已完成' = 11, | |||
// '已申请-换货' = 12, | |||
// '已申请-退货' = 13, | |||
// '已结束' = 14, | |||
// '退款中' = 15, | |||
// '退款成功' = 16, | |||
// '退货成功' = 17, | |||
// '换货-设备已回收' = 18, | |||
// } | |||
export enum OrderStatus { | |||
'已取消' = -1, //注意“已取消”判断字段未orderStatus,下面判断字段为orderStep | |||
'完成填写基本信息' = 1, | |||
'完成个人/单位信息上传' = 2, | |||
'完成车辆信息上传' = 3, | |||
'待加购权益' = 4, | |||
'待支付2' = 26, | |||
'待支付3' = 27, | |||
'已支付' = 5, | |||
'已支付/待签约' = 3, | |||
'完成车辆信息上传/待支付' = 4, | |||
'待支付2' = 26, //已经生成二维码但未支付 | |||
'待支付3' = 27, //加购完权益但未支付 | |||
'完成签约' = 5, | |||
'待审核' = 6, | |||
'审核不通过' = 7, | |||
'待发货' = 8, |
@@ -172,7 +172,7 @@ | |||
@click="$util.navTo('/subpackage/orders/moreHighMsg/moreHighMsg',true)">查看更多</view> | |||
</view> | |||
</view> | |||
<!-- <button type="default" @click="qq">111111111111</button> --> | |||
<!-- 专区服务 --> | |||
<!-- <view class="service"> | |||
<view class="title">专区服务</view> | |||
@@ -344,7 +344,48 @@ | |||
// doSomething();//代办事项 | |||
}) | |||
const qq = () => { | |||
uni.navigateToMiniProgram({ | |||
appId: "wxbcad394b3d99dac9", | |||
path: "pages/route/index", | |||
extraData: { | |||
appid: "wxcb1388c809fe25a9", | |||
sub_appid: "wx008c60533388527a", | |||
mch_id: "1500877591", | |||
sub_mch_id: "1622652848", | |||
nonce_str: "e9eb7a02533947389f8f4e7cb9394fb5", | |||
sign_type: "HMAC-SHA256", | |||
trade_scene: "HIGHWAY", | |||
plate_number: "贵ZBYD09", | |||
sub_openid: "oHQtp5C8821AImJa1ibf6rZ6xc60", | |||
sign: "B926E47DF8DE6B5FE53FF7AC3CCB5FA7C5CDB3459A4C1AFC0CDC8B143EC68DDA", | |||
channel_type: "ETC" | |||
}, | |||
// extraData: { | |||
// appid: "wxe5572b2938f35c09", | |||
// channel_type: "ETC", //没有 | |||
// mch_id: "1641444218", | |||
// nonce_str: "e9eb7a02533947389f8f4e7cb9394fb5", | |||
// plate_number: "贵ZBYD09", | |||
// sign: "B926E47DF8DE6B5FE53FF7AC3CCB5FA7C5CDB3459A4C1AFC0CDC8B143EC68DDA", | |||
// sign_type: "HMAC-SHA256", | |||
// sub_appid: "wx008c60533388527a", | |||
// sub_mch_id: "1648725759", | |||
// sub_openid: "oHQtp5C8821AImJa1ibf6rZ6xc60", | |||
// trade_scene: "HIGHWAY" | |||
// }, | |||
success(res) { | |||
console.log(res); | |||
}, | |||
complete(res) { | |||
console.log(res); | |||
}, | |||
fail(res) { | |||
console.log(res); | |||
// 未成功跳转到车主小程序 | |||
}, | |||
}); | |||
} | |||
onMounted(() => { | |||
uni.getSystemInfo({ | |||
success: (e : any) => { |
@@ -43,7 +43,7 @@ | |||
<template v-if="item.orderStatus != OrderStatus.已取消"> | |||
<!-- 信息填写未完成 --> | |||
<view class="btns" | |||
v-if="item.orderStep == OrderStatus['完成个人/单位信息上传'] || item.orderStep == OrderStatus.完成填写基本信息 || item.orderStep == OrderStatus.完成车辆信息上传"> | |||
v-if="item.orderStep == OrderStatus['完成个人/单位信息上传'] || item.orderStep == OrderStatus.完成填写基本信息 || item.orderStep == OrderStatus.完成车辆信息上传 || item.orderStep == OrderStatus.待支付3"> | |||
<view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view> | |||
<view class="btn btn-primary" @click.stop="gotoEditUserOrUnitInfo(item)">继续申请</view> | |||
@@ -53,19 +53,19 @@ | |||
<view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view> | |||
<view class="btn btn-primary" @click.stop="gotoEditUserOrUnitInfo(item)">加购权益</view> | |||
</view> | |||
<!-- <view class="btns" v-if="item.orderStep == OrderStatus.待加购权益&& item.isValueCard != 1"> | |||
<view class="btns" v-if="item.orderStep == OrderStatus['完成车辆信息上传/待支付']"> | |||
<view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view> | |||
<view class="btn btn-primary" @click.stop="gotoOrderDetails(item)">支付</view> | |||
</view> --> | |||
</view> | |||
<view class="btns" v-if="item.orderStep == OrderStatus.待支付2"> | |||
<!-- <view class="btn btn-normal" @click.stop="gotoEditUserOrUnitInfo(item)">修改资料</view> --> | |||
<view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view> | |||
<view class="btn btn-primary" @click.stop="gotoOrderDetails(item)">支付</view> | |||
</view> | |||
<view class="btns" v-if="item.orderStep == OrderStatus.待支付3"> | |||
<!-- <view class="btns" v-if="item.orderStep == OrderStatus.待支付3"> | |||
<view class="btn btn-normal" @click.stop="gotoCancelOrder(item)">取消订单</view> | |||
<view class="btn btn-primary" @click.stop="gotoOrderDetails(item)">支付</view> | |||
</view> | |||
</view> --> | |||
<!-- 审核中/审核不通过 --> | |||
<view class="btns" v-if="item.orderStep == OrderStatus.待审核 || item.orderStep == OrderStatus.审核不通过"> | |||
@@ -127,7 +127,7 @@ | |||
<view class="btn btn-normal" @click.stop="gotoCheckLogistics(item)">查看物流</view> | |||
<view class="btn btn-primary" @click.stop="gotoConfirmReceipt(item)">确认收货</view> | |||
</view> | |||
<!-- '已支付' = 5, | |||
<!-- '完成签约' = 5, | |||
'已申请-退货' = 13, | |||
'退款中' = 15, | |||
'退款成功' = 16, |
@@ -150,9 +150,11 @@ | |||
state.orderId = option.orderId; | |||
state.applyId = option.applyId; | |||
state.type = option.type; | |||
state.agencyId = option.agencyId; | |||
var data = { | |||
type: state.type, | |||
source: state.sysType //请求方来源 | |||
source: state.sysType, //请求方来源 | |||
agencyId: state.agencyId,//渠道编号 | |||
}; | |||
const options = { | |||
type: 2, | |||
@@ -216,6 +218,7 @@ | |||
}; | |||
const state = reactive({ | |||
agencyId: "",//渠道编号id | |||
applyId: "", | |||
isValueCard: 1, //卡的类型 | |||
radiolist1: [], //选择卡的数据列表 |
@@ -108,6 +108,7 @@ | |||
/*视图进入后操作*/ | |||
onLoad((option) => { | |||
queryOrderDetail(option.id).then((val : any) => { | |||
console.log("订单详情", val) | |||
state.data = val | |||
}) | |||
}); | |||
@@ -118,7 +119,7 @@ | |||
// // `/subpackage/after-sale/to-bookkeeping-card/mailing_information?orderId=${state.data.orderId}&&applyId=${val.applyId}` | |||
// // ) | |||
navTo( | |||
`/subpackage/after-sale/to-bookkeeping-card/choice-product-new?orderId=${state.data.orderId}&&applyId=${val.applyId}&&type=${state.data.type}` | |||
`/subpackage/after-sale/to-bookkeeping-card/choice-product-new?orderId=${state.data.orderId}&&applyId=${val.applyId}&&type=${state.data.type}&&agencyId=${state.data.agencyId}` | |||
) | |||
}) | |||
// navTo( |
@@ -131,7 +131,8 @@ | |||
:disabled="state.isEnableChangeOCRCarInfo" /> | |||
</u-form-item> | |||
<u-form-item label="车轴数"> | |||
<u-input inputAlign="right" placeholder="请输入车轴数" v-model="state.form.axleCount" /> | |||
<u-input inputAlign="right" placeholder="请输入车轴数" v-model="state.form.axleCount" type="number" | |||
maxlength="2" /> | |||
</u-form-item> | |||
<view class="form-item"> | |||
<label>车辆用户类型</label> | |||
@@ -499,7 +500,11 @@ | |||
const data = stringToJson(res.bizContent); | |||
console.log(data); | |||
if (val === "1") { | |||
state.form.vehicleIdNum = data.plate_a; | |||
if (data.plate_a.length > 8) { | |||
state.form.vehicleIdNum = data.plate_a.substring(0, 8); | |||
} else { | |||
state.form.vehicleIdNum = data.plate_a; | |||
} | |||
state.form.man = data.man; | |||
state.form.vehicleType = data.vehicle; | |||
state.form.character = data.character; |
@@ -352,7 +352,7 @@ | |||
console.log("订单状态舔砖", val); | |||
//完成填写基本信息 | |||
if (val.orderStep === 1) { | |||
if (state.data.userType === 1) { | |||
if (state.data.userType === 1 || val.orderStep === 27) { | |||
uni.redirectTo({ | |||
url: `/subpackage/orders/opening-account-people?orderId=${val.orderId}&&vehiclePlateColor=${val.vehiclePlateColor}`, | |||
}); | |||
@@ -382,7 +382,7 @@ | |||
uni.redirectTo({ | |||
url: `/subpackage/orders/product-detail?orderId=${val.orderId}&&clientFee=${val.product.clientFee}&&id=${val.productId}`, | |||
}); | |||
} else if (val.orderStep === 26 || val.orderStep === 27) { | |||
} else if (val.orderStep === 26) { | |||
uni.redirectTo({ | |||
url: `/subpackage/orders/product-detail?orderId=${val.orderId}&&clientFee=${val.product.clientFee}&&id=${val.productId}`, | |||
}); |
@@ -1,6 +1,6 @@ | |||
<!-- 订单-评价 --> | |||
<template> | |||
<!-- 1,4 --> | |||
<!-- 1,4 --> | |||
<!-- 产品 --> | |||
<view class="card" style="padding: 40rpx 30rpx;"> | |||
<view class="title">{{state.orderInfo.productName}}</view> | |||
@@ -9,10 +9,11 @@ | |||
style="height: 260rpx;" placeholder="从多角度评价,可以帮助我们提升服务质量。"> | |||
</textarea> | |||
<view class="upload-img"> | |||
<form-image @backImg="backImg($event)" @removeImg="removeImg" :isUrl="false" style="width: 100%;" :retract="-15"></form-image> | |||
<form-image @backImg="backImg($event)" @removeImg="removeImg" :isUrl="false" style="width: 100%;" | |||
:retract="-15"></form-image> | |||
</view> | |||
</view> | |||
<!-- 权益产品评价 --> | |||
<!-- 权益产品评价 --> | |||
<view class="card" v-if='state.haveInterestsProduct' style="padding: 40rpx 30rpx;"> | |||
<view class="title">权益产品评价</view> | |||
<evaluate-star v-model="state.interest.score" title="评价得分"></evaluate-star> | |||
@@ -20,13 +21,14 @@ | |||
style="height: 260rpx;" placeholder="从多角度评价,可以帮助我们提升服务质量。"> | |||
</textarea> | |||
<view class="upload-img"> | |||
<form-image @backImg="backImgInterest($event)" @removeImg="removeImgInterest" :isUrl="false" style="width: 100%;" :retract="-15"></form-image> | |||
<form-image @backImg="backImgInterest($event)" @removeImg="removeImgInterest" :isUrl="false" | |||
style="width: 100%;" :retract="-15"></form-image> | |||
</view> | |||
</view> | |||
<view class="uni-list" style='font-size:32rpx'> | |||
<view class="uni-list" style='font-size:32rpx'> | |||
<view class="uni-list-cell uni-list-cell-pd"> | |||
<view class="uni-list-cell-db">是否匿名</view> | |||
<switch checked style="transform:scale(0.7)" @change="switchChange"/> | |||
<switch checked style="transform:scale(0.7)" @change="switchChange" /> | |||
</view> | |||
</view> | |||
<view class="btn"> | |||
@@ -36,24 +38,25 @@ | |||
<!-- 选择标签弹窗 --> | |||
<u-popup v-model="state.showTagPop" mode="bottom" height="60%"> | |||
<view v-if="state.showTagPop"> | |||
<tag-popup :selTags="state.user.tagList" :tagAllList="state.tagAllList" @cancel="state.showTagPop = !state.showTagPop" @confirm="confirmSelectTag"></tag-popup> | |||
<tag-popup :selTags="state.user.tagList" :tagAllList="state.tagAllList" | |||
@cancel="state.showTagPop = !state.showTagPop" @confirm="confirmSelectTag"></tag-popup> | |||
</view> | |||
</u-popup> | |||
</template> | |||
<script setup lang="ts"> | |||
import evaluateStar from "./components/evaluate-star.vue" | |||
import {reactive} from "vue"; | |||
import {confirm, isBlank, msg} from "@/utils/utils"; | |||
import { reactive } from "vue"; | |||
import { confirm, isBlank, msg } from "@/utils/utils"; | |||
import tagPopup from "./components/popup-order-evaluate-tag"; | |||
import { request } from "@/utils/network/request"; | |||
import { orderDetail, orderEvaluate,orderEvaluateTag,saleMessage,addEvaluation,judageQuanProduct } from "@/utils/network/api"; | |||
import {onLoad} from "@dcloudio/uni-app"; | |||
import { orderDetail, orderEvaluate, orderEvaluateTag, saleMessage, addEvaluation, judageQuanProduct } from "@/utils/network/api"; | |||
import { onLoad } from "@dcloudio/uni-app"; | |||
import { stringToJson } from "@/utils/network/encryption"; | |||
import { getItem, StorageKeys } from "@/utils/storage"; | |||
const state = reactive({ | |||
orderInfo:{} as any, //订单信息 | |||
orderInfo: {} as any, //订单信息 | |||
showTagPop: false, //显示标签选择弹窗 | |||
product: { //产品 | |||
score: 0, //星级得分 最高5分,0.5小数点 2.5分及以下为差评 2.5以上4.0以下为中评 4.0及4.0以上为好评(必选) | |||
@@ -70,10 +73,10 @@ | |||
content: '', //评价内容 | |||
tagList: [], //已选择的评价标签列表 | |||
}, | |||
tagAllList:[], | |||
orderId:"", | |||
haveInterestsProduct:false, //是否有权益产品 | |||
isAnonymity:1, //是否匿名 | |||
tagAllList: [], | |||
orderId: "", | |||
haveInterestsProduct: false, //是否有权益产品 | |||
isAnonymity: 1, //是否匿名 | |||
}) | |||
/* 确认选择tag */ | |||
@@ -83,25 +86,25 @@ | |||
} | |||
//选择图片 | |||
const backImg = (e: any) => { | |||
const backImg = (e : any) => { | |||
state.product.imageList = e; | |||
} | |||
//删除图片 | |||
const removeImg = (imgList) => { | |||
state.product.imageList = imgList | |||
} | |||
//选择图片权益产品 | |||
const backImgInterest = (e: any) => { | |||
//选择图片权益产品 | |||
const backImgInterest = (e : any) => { | |||
state.interest.imageList = e; | |||
} | |||
//删除图片 | |||
const removeImgInterest = (imgList) => { | |||
state.interest.imageList = imgList | |||
} | |||
/* 删除评价标签 */ | |||
const removeTag = (item: any) => { | |||
const removeTag = (item : any) => { | |||
state.user.tagList.map((tag, index) => { | |||
if (tag.id === item.id) { | |||
state.user.tagList.splice(index, 1) | |||
@@ -113,7 +116,7 @@ | |||
const publish = (e) => { | |||
addProduct(); | |||
} | |||
const addProduct=()=>{ | |||
const addProduct = () => { | |||
if (state.product.score === 0) { | |||
msg('请对产品进行打分!'); | |||
return; | |||
@@ -134,30 +137,30 @@ | |||
const options = { | |||
type: 2, | |||
data: { | |||
"orderId":state.orderId, | |||
"serviceType":"product", | |||
"score":state.product.score, | |||
"pictureUrl":state.product.imageList.join(";"), | |||
"message":'', | |||
"suggestion":state.product.content, | |||
"isAnonymity":state.isAnonymity | |||
"orderId": state.orderId, | |||
"serviceType": "product", | |||
"score": state.product.score, | |||
"pictureUrl": state.product.imageList.join(";"), | |||
"message": '', | |||
"suggestion": state.product.content, | |||
"isAnonymity": state.isAnonymity | |||
}, | |||
method: 'POST', | |||
showLoading: true, | |||
method: 'POST', | |||
showLoading: true, | |||
} | |||
console.log("options",options) | |||
request(addEvaluation,options).then((res)=>{ | |||
if(state.haveInterestsProduct){ | |||
console.log("options", options) | |||
request(addEvaluation, options).then((res) => { | |||
if (state.haveInterestsProduct) { | |||
addProductInterest(); | |||
}else{ | |||
confirm('您的评价已发布成功!',()=>{ | |||
} else { | |||
confirm('您的评价已发布成功!', () => { | |||
uni.$emit('refreshOrder'); | |||
uni.navigateBack(); | |||
},'发布成功',false); | |||
}, '发布成功', false); | |||
} | |||
}) | |||
} | |||
const addProductInterest=()=>{ | |||
const addProductInterest = () => { | |||
if (state.interest.score === 0) { | |||
msg('请对权益产品进行打分!'); | |||
return; | |||
@@ -178,43 +181,44 @@ | |||
const options = { | |||
type: 2, | |||
data: { | |||
"orderId":state.orderId, | |||
"serviceType":"equity", | |||
"score":state.interest.score, | |||
"pictureUrl":state.interest.imageList.join(";"), | |||
"message":'', | |||
"suggestion":state.interest.content, | |||
"isAnonymity":state.isAnonymity | |||
"orderId": state.orderId, | |||
"serviceType": "equity", | |||
"equityId": state.orderInfo.equityId,//权益产品id | |||
"score": state.interest.score, | |||
"pictureUrl": state.interest.imageList.join(";"), | |||
"message": '', | |||
"suggestion": state.interest.content, | |||
"isAnonymity": state.isAnonymity | |||
}, | |||
method: 'POST', | |||
showLoading: true, | |||
method: 'POST', | |||
showLoading: true, | |||
} | |||
console.log("options",options) | |||
request(addEvaluation,options).then((res)=>{ | |||
confirm('您的评价已发布成功!',()=>{ | |||
console.log("options", options) | |||
request(addEvaluation, options).then((res) => { | |||
confirm('您的评价已发布成功!', () => { | |||
uni.$emit('refreshOrder'); | |||
uni.navigateBack(); | |||
},'发布成功',false); | |||
}, '发布成功', false); | |||
}) | |||
} | |||
/* 获取业务员标签ID */ | |||
const getTagIds = () => { | |||
const list = []; | |||
state.user.tagList.map((tag)=>{ | |||
state.user.tagList.map((tag) => { | |||
list.push(tag.id); | |||
}); | |||
return list; | |||
} | |||
// 获取是否有权益产品 | |||
const isInterestsProduct=(orderId)=>{ | |||
// 获取是否有权益产品 | |||
const isInterestsProduct = (orderId) => { | |||
const options = { | |||
type: 2, | |||
data: {"orderId": orderId}, | |||
data: { "orderId": orderId }, | |||
method: 'POST', | |||
showLoading: true, | |||
} | |||
request(judageQuanProduct, options).then((res) => { | |||
console.log("获取是否有业务员",stringToJson(res.bizContent)) | |||
console.log("获取是否有业务员", stringToJson(res.bizContent)) | |||
state.haveInterestsProduct = stringToJson(res.bizContent); | |||
}) | |||
} | |||
@@ -222,27 +226,28 @@ | |||
const getOrderDetails = (id) => { | |||
const options = { | |||
type: 2, | |||
data: {"id": id}, | |||
data: { "id": id }, | |||
method: 'POST', | |||
showLoading: true, | |||
} | |||
request(orderDetail, options).then((res) => { | |||
console.log("获取订单详情",stringToJson(res.bizContent)) | |||
state.orderInfo = stringToJson(res.bizContent); | |||
console.log("获取订单详情", stringToJson(res.bizContent), state.orderInfo.equityId) | |||
}) | |||
} | |||
// 是否匿名 | |||
const switchChange=(e)=>{ | |||
const switchChange = (e) => { | |||
console.log('switch1 发生 change 事件,携带值为', e.detail.value); | |||
if(e.detail.value){ | |||
state.isAnonymity=1 | |||
}else{ | |||
state.isAnonymity=0 | |||
if (e.detail.value) { | |||
state.isAnonymity = 1 | |||
} else { | |||
state.isAnonymity = 0 | |||
} | |||
} | |||
onLoad((option) => { | |||
console.log("option11111", option) | |||
getOrderDetails(option.id); | |||
state.orderId=option.orderId | |||
state.orderId = option.orderId | |||
isInterestsProduct(option.orderId); //获取是否有权益产品 | |||
}) | |||
</script> | |||
@@ -335,6 +340,7 @@ | |||
margin-top: 40rpx; | |||
padding-bottom: 20rpx; | |||
border-bottom: 1rpx solid #DCDCDC; | |||
.tags { | |||
flex-wrap: wrap; | |||
@@ -371,11 +377,12 @@ | |||
.btn { | |||
margin: 60rpx 40rpx 0rpx; | |||
} | |||
.uni-list-cell{ | |||
.uni-list-cell { | |||
display: flex; | |||
margin: 10rpx auto; | |||
width: 90%; | |||
justify-content: space-between; | |||
align-items: center; | |||
} | |||
</style> | |||
</style> |
@@ -62,14 +62,14 @@ | |||
<view class="title"> 运费 </view> | |||
<view class="value"> ¥0.00 </view> | |||
</view> | |||
<view class="flex"> | |||
<!-- <view class="flex"> | |||
<view class="title"> 优惠券 </view> | |||
<view class="value"> 暂无优惠券 </view> | |||
</view> | |||
<view class="flex"> | |||
<view class="title"> 积分兑换 </view> | |||
<view class="value"> 暂无积分 </view> | |||
</view> | |||
</view> --> | |||
<view class="flex"> | |||
<view class="title"> 实付款 </view> | |||
<view class="money"> | |||
@@ -321,6 +321,7 @@ | |||
state.orderId = option.orderId; | |||
state.isValueCard = option.isValueCard; | |||
console.log("传递过来的参数", option) | |||
console.log("查协议", envs[process.env.NODE_ENV].baseUrl) | |||
// state.clientFee = option.clientFee / 100; | |||
state.id = option.id; | |||
getOpenID(); | |||
@@ -446,8 +447,7 @@ | |||
const options = { | |||
type: 2, | |||
data: { | |||
// orderId: state.orderId, //订单编号 | |||
orderId: "20231016180507480853307", //订单编号 | |||
orderId: state.orderId, //订单编号 | |||
}, | |||
method: "POST", | |||
showLoading: true, | |||
@@ -455,7 +455,7 @@ | |||
request(getAgreementApi, options).then((res) => { | |||
let data = stringToJson(res.bizContent); | |||
state.agreeURL = envs[process.env.NODE_ENV].baseUrl + data.supAgree | |||
console.log("查协议", data) | |||
console.log("查协议", envs[process.env.NODE_ENV].baseUrl) | |||
}); | |||
} | |||
const checkboxChange = (e) => { |
@@ -165,9 +165,9 @@ | |||
// #ifdef MP-WEIXIN | |||
request(getOpenidApi, options).then((res) => { | |||
const result = stringToJson(res.bizContent); | |||
console.log("获取微信小程序openid", result); | |||
const openidData = stringToJson(result.data); | |||
state.openid = openidData.openid; | |||
console.log("获取微信小程序openid", state.openid); | |||
setItem("QYorder", state); | |||
}); | |||
// #endif | |||
@@ -187,9 +187,9 @@ | |||
if (state.openid) { | |||
var data = { | |||
// orderId: state.orderId, | |||
orderId: "20231012114651162505354", | |||
// orderId: "20231121174825916656609", | |||
subOpenId: state.openid, | |||
// subOpenId: state.openid, | |||
orderId: "20231213200339195365136", | |||
subOpenId: "o_Ucm45wcKKt1W2Ah0OSVco81G_4", | |||
}; | |||
const options = { | |||
type: 2, | |||
@@ -215,20 +215,8 @@ | |||
plate_number: data.plateNumber, | |||
sub_openid: data.subOpenId, | |||
sign: data.sign, | |||
channel_type: "ETC" | |||
}, | |||
// extraData: { | |||
// appid: "wxe5572b2938f35c09", | |||
// channel_type: "ETC", //没有 | |||
// mch_id: "1641444218", | |||
// nonce_str: "e9eb7a02533947389f8f4e7cb9394fb5", | |||
// plate_number: "贵ZBYD09", | |||
// sign: "B926E47DF8DE6B5FE53FF7AC3CCB5FA7C5CDB3459A4C1AFC0CDC8B143EC68DDA", | |||
// sign_type: "HMAC-SHA256", | |||
// sub_appid: "wx008c60533388527a", | |||
// sub_mch_id: "1648725759", | |||
// sub_openid: "oHQtp5C8821AImJa1ibf6rZ6xc60", | |||
// trade_scene: "HIGHWAY" | |||
// }, | |||
success(res) { | |||
console.log(res); | |||
}, |
@@ -13,6 +13,7 @@ | |||
</view> | |||
<view class="phone"> | |||
{{ item.consigneeTel }} | |||
<text class="default" v-if="item.defaultAddress==1">默认</text> | |||
</view> | |||
</view> | |||
<view class="address"> | |||
@@ -80,7 +81,7 @@ | |||
}); | |||
}; | |||
const addressSelected = (val: any) => { | |||
const addressSelected = (val : any) => { | |||
if (state.fromOrder) { | |||
//来自订单-直接返回选中数据 | |||
uni.$emit("selectAddressSuccess", val); | |||
@@ -119,7 +120,7 @@ | |||
}); | |||
}); | |||
onLoad((option: any) => { | |||
onLoad((option : any) => { | |||
state.fromOrder = option.fromOrder; | |||
}); | |||
</script> | |||
@@ -290,4 +291,12 @@ | |||
line-height: 80rpx; | |||
} | |||
} | |||
</style> | |||
.default { | |||
border: 1rpx solid #00b38b; | |||
border-radius: 5rpx; | |||
padding: 2rpx 4rpx; | |||
color: #00b38b; | |||
margin-left: 4rpx; | |||
} | |||
</style> |
@@ -55,12 +55,12 @@ | |||
<u-input v-model="state.form.begindate" type="select" /> | |||
</u-form-item> --> | |||
<u-form-item label="手机号" class="phoneBox"> | |||
<u-input placeholder='手机号' type="number" v-model="state.form.tel" /> | |||
<u-input placeholder='手机号' type="number" v-model="state.form.tel" maxlength="11" /> | |||
<u-button type="success" size="mini" @click="getCode" v-if="waitTime==0">获取验证码</u-button> | |||
<text class="btn" v-else>{{waitTime}}后重试</text> | |||
</u-form-item> | |||
<u-form-item label="验证码"> | |||
<u-input placeholder='如果修改手机号请输入验证码' type="number" v-model="state.form.newMobileCode" /> | |||
<u-input placeholder='请输入验证码' type="number" v-model="state.form.newMobileCode" /> | |||
</u-form-item> | |||
</u-form> | |||
</view> | |||
@@ -124,13 +124,13 @@ | |||
// }); | |||
const state = reactive({ | |||
genderList: [{ | |||
value: '男', | |||
label: '男' | |||
}, | |||
{ | |||
value: '女', | |||
label: '女' | |||
} | |||
value: '男', | |||
label: '男' | |||
}, | |||
{ | |||
value: '女', | |||
label: '女' | |||
} | |||
], | |||
codeTips: "获取验证码", | |||
form: { | |||
@@ -162,7 +162,7 @@ | |||
// agentIdVld: '', | |||
} | |||
}) | |||
const strReplace = (str : string) => { | |||
const strReplace = (str : string) => { | |||
let imgUrl = str.replace("http://192.168.101.145:9000", envs[process.env.NODE_ENV].baseUrl); | |||
imgUrl = imgUrl.replace("http://100.64.2.113:9000", envs[process.env.NODE_ENV].baseUrl); | |||
return imgUrl; | |||
@@ -170,12 +170,12 @@ const strReplace = (str : string) => { | |||
const getCode = () => { | |||
console.log(123); | |||
if (state.form.tel) { | |||
if (checkStr(state.form.tel, "mobile")) { | |||
sendCodeApi() | |||
codeInterval() | |||
} else { | |||
uni.showToast({ | |||
title: '请输入手机号', | |||
title: '请输入正确的手机号', | |||
icon: 'none' | |||
}); | |||
} | |||
@@ -222,14 +222,14 @@ const strReplace = (str : string) => { | |||
//选择图片 | |||
//orc接口调用 | |||
const cardImageOcr = (val: any) => { | |||
const cardImageOcr = (val : any) => { | |||
console.log("点击了"); | |||
var imageType = val; | |||
uni.chooseImage({ | |||
count: 1, //只能选取一张照片 | |||
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有 | |||
sourceType: ["camera", "album"], //从相册选择 | |||
success: function(res) { | |||
success: function (res) { | |||
pathToBase64(res.tempFilePaths[0]) | |||
.then((path) => { | |||
console.log(path); | |||
@@ -261,7 +261,7 @@ const strReplace = (str : string) => { | |||
} | |||
}); | |||
}) | |||
.catch((error) => {}); | |||
.catch((error) => { }); | |||
}, | |||
}); | |||
}; | |||
@@ -269,6 +269,30 @@ const strReplace = (str : string) => { | |||
//下一步 | |||
const savaHandle = () => { | |||
console.log(state.form); | |||
if (!state.form.userPosImgUrl) { | |||
msg("请上传身份证正面") | |||
return; | |||
} | |||
if (!state.form.userNegImgUrl) { | |||
msg("请上传身份证反面") | |||
return; | |||
} | |||
if (!state.form.customerName) { | |||
msg("请输入姓名") | |||
return; | |||
} | |||
if (!state.form.address) { | |||
msg("请输入地址") | |||
return; | |||
} | |||
if (!checkStr(state.form.tel, "mobile")) { | |||
msg("请输入正确的手机号") | |||
return; | |||
} | |||
if (!state.form.newMobileCode) { | |||
msg("请输入验证码") | |||
return; | |||
} | |||
const options = { | |||
type: 2, | |||
data: state.form, | |||
@@ -282,7 +306,7 @@ const strReplace = (str : string) => { | |||
uni.navigateBack({ | |||
delta: 1 | |||
}); | |||
}); | |||
} | |||
@@ -298,9 +322,10 @@ const strReplace = (str : string) => { | |||
} | |||
</style> | |||
<style lang="scss" scoped> | |||
::v-deep .u-size-mini{ | |||
::v-deep .u-size-mini { | |||
white-space: nowrap; | |||
} | |||
.main { | |||
// overflow: hidden; | |||
@@ -401,7 +426,7 @@ const strReplace = (str : string) => { | |||
background: #fff; | |||
padding: 40rpx 30rpx; | |||
border-radius: 20rpx; | |||
box-shadow: 0 4rpx 13rpx 3rpx rgba(223,223,223,.8); | |||
box-shadow: 0 4rpx 13rpx 3rpx rgba(223, 223, 223, .8); | |||
.title { | |||
font-size: 30rpx; | |||
@@ -450,4 +475,4 @@ const strReplace = (str : string) => { | |||
} | |||
} | |||
} | |||
</style> | |||
</style> |
@@ -35,9 +35,9 @@ export const aliPayConfigId = "6a9a54bc01f6443123452b1234"; //支付配置编号 | |||
export const aliPayConfigIdTwo = "6a9a54bc01f644312543761234"; | |||
export const wechatAppID = "wx8fba957179c1329a"; //九州小程序APPid:wx008c60533388527a | |||
export const wechatSecret = "699c10826113ddb350fbe58a96e2b015"; //九州小程序AppSecret:95197718b43b497f02732bd9f8011080 | |||
export const sm4Key = | |||
"5dc11f854ceca1473e1a5075ed16eb226b4543a9a05fe50f7fba40f898099ce34abba69a07a20509f315f94d808a4d0e988935588858f65a"; | |||
// export const sm4Key = "5dc11f854ceca147"; | |||
// export const sm4Key = | |||
// "5dc11f854ceca1473e1a5075ed16eb226b4543a9a05fe50f7fba40f898099ce34abba69a07a20509f315f94d808a4d0e988935588858f65a"; | |||
export const sm4Key = "5dc11f854ceca147"; | |||
//字典 |
@@ -116,9 +116,10 @@ export function arrayToJsonString(array) { | |||
*json字符串转换成json对象 | |||
*/ | |||
export function stringToJson(data) { | |||
let index = data.lastIndexOf("}") | |||
let content = data.substring(0, index + 1); | |||
return JSON.parse(content); | |||
// let index = data.lastIndexOf("}") | |||
// let content = data.substring(0, index + 1); | |||
// console.log("content111111", content) | |||
return JSON.parse(data); | |||
} | |||
//array转json对象 | |||
@@ -195,18 +196,18 @@ function textToBase64(text, key, iv) { | |||
//调用中台参数 | |||
export function encryption(ifCode, subdata, type) { | |||
var requestData = new Array(); | |||
// const key = 'WVdSdGFXNHdNREZmTWpBeU16QTRNRE09' | |||
const key = 'TlRJd016QXhNekZmTWpBeU16QTRNekU9' | |||
const key = 'WVdSdGFXNHdNREZmTWpBeU16QTRNRE09' | |||
// const key = 'TlRJd016QXhNekZmTWpBeU16QTRNekU9' | |||
requestData["ifCode"] = ifCode; | |||
requestData["appId"] = "52030131"; // || "admin001" | |||
// requestData["appId"] = "admin001"; // || "admin001" | |||
// requestData["appId"] = "52030131"; // || "admin001" | |||
requestData["appId"] = "admin001"; // || "admin001" | |||
requestData["signType"] = "SM3"; // || "NONE" | |||
requestData["encryptType"] = "SM4"; | |||
// requestData["encryptType"] = "NONE"; | |||
// requestData["encryptType"] = "SM4"; | |||
requestData["encryptType"] = "NONE"; | |||
requestData["reqId"] = requestData["appId"] + "_" + getDate() + "_" + generateMixed(5); | |||
requestData["timestamp"] = formatTime(new Date()); | |||
requestData["bizContent"] = s4.encryptData_CBC(subdata, sm4Key) | |||
// requestData["bizContent"] = JSON.stringify(subdata) | |||
// requestData["bizContent"] = s4.encryptData_CBC(subdata, sm4Key) | |||
requestData["bizContent"] = JSON.stringify(subdata) | |||
requestData["accessToken"] = getItem(StorageKeys.Token) | |||
requestData["sign"] = sm3( | |||
"appId=" + requestData["appId"] + |
@@ -46,6 +46,9 @@ function updateGetToken() { | |||
//请求 | |||
export function request(code, options = {}, start = false) { | |||
// console.log("11111", s4.decryptData_CBC( | |||
// "bbc41fb5d44e797b1d7d1f3b666bea5d3d0ef0fb6f9564f0159d77eb4f69180ecec404d0ebbe3618249be4be775ae8bde73277c244154755bbf0fccea3c700a8e72e740154a3b57e65857940f5b39b9f7c8a8c8a52f6b3da134863aef333fbbebf145a5d7a7aca47f854bf075188954f14a02e1a71989cf01f6d9da860a0adb200584bdfe26b89429966953e2bd1b524623bb442576a4587cf8ad704eea13a7d26374d3f4144bafcaeb23463597eb0b430de26e170628f762da60fc658fcb9fb7f55322e8318fb9ea0da38ddadecb73ef212f2604eedebfd46bfd5053b5d2a60840340eaec1be389c06dce0d29c89655145e053684eb57d5e4447425197585251cf73fcaa82bc94bda3a84e36e169045e59bc900890eb360b9b37b25416e3a1a2c84d5b2fc6cd760135eb69c4d814dfd93cba9be9d9a3cd6835265aa7832c38da53e86e32b26161a2a059ec1bb19897300bb89283e7974c01ee3353f848120fa546284312976da4acfe21cce797a4c704aaedcfee2f1edf318dafadce822fa9b74f91c13dca3256e0a9a986a5e3ffe5d755ca622dea8631119c83b509965bf94034244250d1032f3ba8159ab51595d7769a208eee6a549d711dee82911ffb80284dd736672f68100a6dece1e9f9e55e523d188c67e55d1f6a8c9ac279381f95bbc90adadf1758f44bf16483e86024abe", | |||
// sm4Key)) | |||
//公参 | |||
const Common = { | |||
agentId: "52010106004", | |||
@@ -136,9 +139,9 @@ export function request(code, options = {}, start = false) { | |||
content: res.data.errorMsg, | |||
success: function(res) { | |||
if (res.confirm) { | |||
console.log('用户点击确定'); | |||
console.log('用户点击确定1'); | |||
} else if (res.cancel) { | |||
console.log('用户点击取消'); | |||
console.log('用户点击取消1'); | |||
} | |||
} | |||
}); | |||
@@ -149,9 +152,9 @@ export function request(code, options = {}, start = false) { | |||
content: res.data.errorMsg, | |||
success: function(res) { | |||
if (res.confirm) { | |||
console.log('用户点击确定'); | |||
console.log('用户点击确定2'); | |||
} else if (res.cancel) { | |||
console.log('用户点击取消'); | |||
console.log('用户点击取消2'); | |||
} | |||
} | |||
}); | |||
@@ -159,8 +162,8 @@ export function request(code, options = {}, start = false) { | |||
reject(res.data.errorMsg) | |||
return | |||
} else { | |||
// let content = res | |||
let content = s4.decryptData_CBC(res, sm4Key) | |||
// let content = s4.decryptData_CBC(res, sm4Key) | |||
let content = res | |||
// console.log(content); | |||
// content.data.bizContent = JSON.stringify(content.data.bizContent) | |||
resolve(content.data) |
@@ -14,7 +14,7 @@ | |||
sm4.encryptData_CBC(''); | |||
*/ | |||
import * as base64js from 'base64-js' | |||
console.log('base64js:',base64js) | |||
console.log('base64js:', base64js) | |||
/** | |||
* 国密SM4加密算法 | |||
@@ -395,10 +395,10 @@ function SM4Util() { | |||
sm4.sm4_setkey_dec(ctx, keyBytes) | |||
let decrypted = sm4.sm4_crypt_cbc(ctx, ivBytes, base64js.toByteArray(cipherText.data.bizContent)) | |||
let bizContent = utf8ByteToUnicodeStr(decrypted) | |||
// let begin = bizContent.indexOf('{'); | |||
// let end = bizContent.lastIndexOf('}'); | |||
// cipherText.data.bizContent = bizContent.substring(begin,end+1) | |||
cipherText.data.bizContent = bizContent; | |||
let begin = bizContent.indexOf('{'); | |||
let end = bizContent.lastIndexOf('}'); | |||
cipherText.data.bizContent = bizContent.substring(begin, end + 1) | |||
// cipherText.data.bizContent = bizContent; | |||
return cipherText | |||
} catch (e) { | |||
console.error(e) |
@@ -138,6 +138,7 @@ export function isBlank(val) { | |||
//根据订单状态获取订单状态文字 | |||
export const getOrderStatusName = (status) => { | |||
console.log(Number(OrderStatus["完成车辆信息上传/待支付"]), status) | |||
switch (Number(status)) { | |||
case Number(OrderStatus.完成填写基本信息): | |||
return '申请中'; | |||
@@ -152,13 +153,13 @@ export const getOrderStatusName = (status) => { | |||
return '待支付'; | |||
break; | |||
case Number(OrderStatus.待支付3): | |||
return '待支付'; | |||
return '申请中'; | |||
break; | |||
case Number(OrderStatus.待支付2): | |||
return '待支付'; | |||
break; | |||
case Number(OrderStatus.已支付): | |||
return '已支付'; | |||
case Number(OrderStatus.完成签约): | |||
return '完成签约'; | |||
break; | |||
case Number(OrderStatus.待审核): | |||
return '待审核'; | |||
@@ -202,6 +203,9 @@ export const getOrderStatusName = (status) => { | |||
case Number(OrderStatus.待加购权益): | |||
return '代加购权益'; | |||
break; | |||
case Number(OrderStatus["完成车辆信息上传/待支付"]): | |||
return '待支付'; | |||
break; | |||
default: | |||
break; | |||
} |