ソースを参照

跳转到h5

yxb
DESKTOP-2IO5MST\huting 1年前
コミット
d038999c39

+ 2
- 5
App.vue ファイルの表示

@@ -38,11 +38,11 @@
if (res.uniPlatform === 'mp-weixin') {
console.log('当前为微信小程序', res, 1111);
setItem("loginSource", "69af303ba2eb4608a099163f0d2a5dbd");
setItem("environment","WX")
setItem("environment", "WX")
} else if (res.uniPlatform === 'mp-alipay') {
console.log('当前为支付宝小程序');
setItem("loginSource", "601052a249c04155831710b577cb796d");
setItem("environment","ZFB")
setItem("environment", "ZFB")
}
}
});
@@ -186,14 +186,11 @@
method: "POST",
showLoading: true,
};
// #ifdef MP-WEIXIN
request(getGlobalParam, options).then((res) => {
const result = stringToJson(res.bizContent);
setItem('globalParam', result.data)
console.log("配置", result);
});
// #endif

},



+ 5
- 6
pages/index/index.vue ファイルの表示

@@ -89,8 +89,7 @@
</view>
<view class="text">基础信息变更</view>
</view>
<view class="item-box"
@click="test">
<view class="item-box" @click="test">
<view class="item item-7">
<image :src="fileURL + 'image/index/item-7.png'" mode="aspectFill" />
</view>
@@ -381,7 +380,7 @@
});

};
//轮播跳转
const test = () => {
// let options = {
@@ -397,17 +396,17 @@
// method: "POST", //提交方式(默认POST)
// showLoading: true, //是否显示加载中(默认显示)
// };
// //调用方式
// request("25", options).then((res) => {
// console.log(res);
// })
// .catch((err) => {
// console.log(err);
// });
uni.navigateTo({
url: "/subpackage/orders/payment/payment?token=445dff5be89c4dcaa89386d1c390930a&openId=0e716af635634d749a981524cc6146a5&orderId=20230922185454016794294"
url: "/subpackage/orders/payment/payment?token=445dff5be89c4dcaa89386d1c390930a&openId=0e716af635634d749a981524cc6146a5&orderId=20231016175113823159477&qdOrderNo=20231016175113823159477"
})
};


+ 3
- 3
pages/zaweb/zaweb.vue ファイルの表示

@@ -7,13 +7,13 @@
import {
ref
} from 'vue'
let url = ref('https://qtzl.etcjz.cn/aliOrder')
let url = ref('https://qtzl.etcjz.cn/aliOrder/')
//获取微信小程序openid
// #ifdef MP-WEIXIN
url.value = 'https://qtzl.etcjz.cn/wxOrder'
url.value = 'https://qtzl.etcjz.cn/wxOrder/'
// #endif
// #ifdef MP-ALIPAY
url.value = 'https://qtzl.etcjz.cn/aliOrder'
url.value = 'https://qtzl.etcjz.cn/aliOrder/'
// #endif
</script>
<style lang='scss' scoped>

+ 59
- 57
subpackage/orders/components/layout-numberplate-color.vue ファイルの表示

@@ -1,7 +1,8 @@
<!-- 车牌颜色选择组件 -->
<template>
<view class="numberplates">
<view class="numberplate" v-for="(item,index) in state.numberplateColorList" @click="checkNumberplateColor(item)" :key="index">
<view class="numberplate" v-for="(item,index) in state.numberplateColorList"
@click="checkNumberplateColor(item)" :key="index">
<image :src="`${fileURL}/image/issueActivation/${item.src}.png`" class="numberplate-bg"></image>
<view class="numberplate-name" :style="`color:${item.color}`">{{numberplate}}</view>
<image :src="`${fileURL}image/issueActivation/${item.checkSrc}.png`" class="numberplate-icon-check"
@@ -11,116 +12,117 @@
</template>

<script setup lang="ts">
import { onMounted, reactive,onLoad} from "vue";
import{fileURL} from '@/datas/fileURL.js';
import { getItem} from "@/utils/storage";
import { onMounted, reactive } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import { fileURL } from '@/datas/fileURL.js';
import { getItem } from "@/utils/storage";
import { getGlobalParam } from "@/utils/network/api.js";
import {getCodeName} from "@/datas/queryKey.js";
import { getCodeName } from "@/datas/queryKey.js";
import { msg } from "@/utils/utils";
const emit = defineEmits(['numberplateResult'])
const props = defineProps({
//显示的车牌
numberplate:{
type:String,
default:'贵A1234'
numberplate: {
type: String,
default: '贵A1234'
},
//当前选择的车牌
numberplateCor:{
type:Object,
default:()=>{return {id:-1}}
numberplateCor: {
type: Object,
default: () => { return { id: -1 } }
},
//客车1 货车2
type:{
type:String,
default:'1'
type: {
type: String,
default: '1'
},
})
const state = reactive({
curCheckId:-1, //当前选择的车牌
numberplateColorList:[],
allColorList:[//车牌颜色
{src:'bg-blue',checkSrc:'icon-select-blue',id:0,color:'#ffffff',title:'蓝色'},
{src:'bg-green',checkSrc:'icon-select-green',id:4,color:'#ffffff',title:'渐变绿色'},
{src:'bg-orange',checkSrc:'icon-select-orange',id:1,color:'#ffffff',title:'黄色'},
{src:'bg-yellow_green',checkSrc:'icon-select-yellow_green',id:5,color:'#ffffff',title:'黄绿双拼色'},
{src:'bg-black',checkSrc:'icon-select-black',id:2,color:'#ffffff',title:'黑色'},
{src:'bg-white',checkSrc:'icon-select-white',id:3,color:'#000000',title:'白色'},
{src:'bg-white_blue',checkSrc:'icon-select-blue',id:6,color:'#ffffff',title:'蓝白渐变'},
{src:'green',checkSrc:'icon-green',id:11,color:'#ffffff',title:'绿色'},
{src:'rad',checkSrc:'icon-select-red',id:12,color:'#ffffff',title:'红色'},
curCheckId: -1, //当前选择的车牌
numberplateColorList: [],
allColorList: [//车牌颜色
{ src: 'bg-blue', checkSrc: 'icon-select-blue', id: 0, color: '#ffffff', title: '蓝色' },
{ src: 'bg-green', checkSrc: 'icon-select-green', id: 4, color: '#ffffff', title: '渐变绿色' },
{ src: 'bg-orange', checkSrc: 'icon-select-orange', id: 1, color: '#ffffff', title: '黄色' },
{ src: 'bg-yellow_green', checkSrc: 'icon-select-yellow_green', id: 5, color: '#ffffff', title: '黄绿双拼色' },
{ src: 'bg-black', checkSrc: 'icon-select-black', id: 2, color: '#ffffff', title: '黑色' },
{ src: 'bg-white', checkSrc: 'icon-select-white', id: 3, color: '#000000', title: '白色' },
{ src: 'bg-white_blue', checkSrc: 'icon-select-blue', id: 6, color: '#ffffff', title: '蓝白渐变' },
{ src: 'green', checkSrc: 'icon-green', id: 11, color: '#ffffff', title: '绿色' },
{ src: 'rad', checkSrc: 'icon-select-red', id: 12, color: '#ffffff', title: '红色' },
]
})
/* 选择车牌颜色 */
const checkNumberplateColor = (item) => {
state.curCheckId = item.id;
emit('numberplateResult',item)
emit('numberplateResult', item)
}
const getCarColor = () => {
const data=getItem('globalParam')
if(props.type=="1"){
console.log("111111111111111111111111111",data)
for(var i=0;i<data.carPlateColorType.length;i++){
for(var j=0;j<state.allColorList.length;j++){
console.log("23",getCodeName('VEHICLE_COLOR_TYPE',data.trucksPlateColorType[i]))
if(state.allColorList[j].title==getCodeName('VEHICLE_COLOR_TYPE',data.carPlateColorType[i])){
const data = getItem('globalParam')
if (props.type == "1") {
console.log("props.type", props.type, data)
for (var i = 0; i < data.carPlateColorType.length; i++) {
for (var j = 0; j < state.allColorList.length; j++) {
console.log("23", getCodeName('VEHICLE_COLOR_TYPE', data.trucksPlateColorType[i]))
if (state.allColorList[j].title == getCodeName('VEHICLE_COLOR_TYPE', data.carPlateColorType[i])) {
state.numberplateColorList.push(state.allColorList[j])
}
}
}
}else{
for(var i=0;i<data.trucksPlateColorType.length;i++){
for(var j=0;j<state.allColorList.length;j++){
console.log("23",getCodeName('VEHICLE_COLOR_TYPE',data.trucksPlateColorType[i]))
if(state.allColorList[j].title==getCodeName('VEHICLE_COLOR_TYPE',data.trucksPlateColorType[i])){
} else {
for (var i = 0; i < data.trucksPlateColorType.length; i++) {
for (var j = 0; j < state.allColorList.length; j++) {
console.log("23", getCodeName('VEHICLE_COLOR_TYPE', data.trucksPlateColorType[i]))
if (state.allColorList[j].title == getCodeName('VEHICLE_COLOR_TYPE', data.trucksPlateColorType[i])) {
state.numberplateColorList.push(state.allColorList[j])
}
}
}
}
console.log("state.numberplateColorList",state.numberplateColorList)
console.log("state.numberplateColorList", state.numberplateColorList)
}
onMounted(()=>{
onMounted(() => {
state.curCheckId = props.numberplateCor.id;
getCarColor()
console.log("type",props.type)
console.log("type", props.type)
})
</script>

<style lang="scss" scoped>
.numberplates{
.numberplates {
display: flex;
flex-direction: row;
flex-wrap: wrap;
.numberplate{
.numberplate {
display: flex;
justify-content: center;
align-items: center;
margin-right: 60rpx;
margin-bottom: 40rpx;
position: relative;
&:nth-child(even){
&:nth-child(even) {
margin-right: 0rpx;
}
&-bg{

&-bg {
width: 230rpx;
height: 80rpx;
}
&-name{

&-name {
font-size: 30rpx;
color: white;
position: absolute;
line-height: 80rpx;
}
&-icon-check{

&-icon-check {
width: 40rpx;
height: 40rpx;
position: absolute;

+ 3
- 1
subpackage/orders/payment/payment.vue ファイルの表示

@@ -51,6 +51,7 @@
qdOrderNo: "", //渠道订单编号
});
onLoad((option : any) => {
console.log("option11111", option)
state.orderId = option.orderId;
state.qdOrderNo = option.qdOrderNo;
setItem('accessToken', option.token);
@@ -107,8 +108,9 @@
request(checkOrderStatus, optionsaliquery).then((res) => {
console.log('支付结果查询:', res)
// 支付完成跳转到h5
const param = `https://qtzl.etcjz.cn/order/#/pages/payment/signAContract?qdOrderNo=${state.qdOrderNo}&type=3`
const param = `https://qtzl.etcjz.cn/order/#/pages/payment/payment?qdOrderNo=${state.qdOrderNo}&type=3`
const params = encodeURIComponent(JSON.stringify(param))
console.log('支付结果查询params', params)
uni.navigateTo({
url: `/subpackage/personal-center/webview?url=` + params
})

+ 2
- 0
subpackage/orders/sign/sign-up-ali.vue ファイルの表示

@@ -59,6 +59,7 @@
qdOrderNo: "", //渠道订单编号
});
onLoad((option : any) => {
console.log("option22222", option)
state.orderId = option.orderId;
state.qdOrderNo = option.qdOrderNo;
setItem('accessToken', option.token);
@@ -128,6 +129,7 @@
// uni.navigateBack();
const param = `https://qtzl.etcjz.cn/order/#/pages/sigManage/signContract?qdOrderNo=${state.qdOrderNo}&type=3`
const params = encodeURIComponent(JSON.stringify(param))
console.log('支付结果查询params', params)
uni.navigateTo({
url: `/subpackage/personal-center/webview?url=` + params
})

+ 6
- 6
utils/network/api.js ファイルの表示

@@ -1,23 +1,23 @@
/* 接口中常量 */
// export const URL = "192.168.100.63";
export const URL = "trial.etcjz.cn";
// export const URL = "qtzl.etcjz.cn";
// export const URL = "trial.etcjz.cn";
export const URL = "qtzl.etcjz.cn";
/**
* 配置信息,针对不同的平台进行配置
*/
export const envs = {
//开发环境配置
development: {
// baseUrl: "https://qtzl.etcjz.cn",
baseUrl: "https://trial.etcjz.cn",
baseUrl: "https://qtzl.etcjz.cn",
// baseUrl: "https://trial.etcjz.cn",
// baseUrl: "http://192.168.100.158:8085",
},
//生产环境配置
production: {
// baseUrl: "http://192.168.124.6:8087",
// baseUrl: "http://222.85.144.89:19002",
// baseUrl: "https://qtzl.etcjz.cn",
baseUrl: "https://trial.etcjz.cn",
baseUrl: "https://qtzl.etcjz.cn",
// baseUrl: "https://trial.etcjz.cn",
// baseUrl: "http://192.168.100.158:8085",
},
}

読み込み中…
キャンセル
保存