Parcourir la source

Merge branch 'master' of http://192.168.40.220/dmc/jz_applet into master

yxb
wq il y a 1 an
Parent
révision
25bae19db3

+ 5
- 4
composables/order/useOrderListItem.ts Voir le fichier

return; return;
} }


let res: any = null;
let res : any = null;
const options = { const options = {
type: 2, type: 2,
data: { data: {
"vehiclePlate": searchKeyWords.value, "vehiclePlate": searchKeyWords.value,
"tabIndex": props.index + '', "tabIndex": props.index + '',
"pageNo": params.pageNum, "pageNo": params.pageNum,
"pageSize": params.pageSize
"pageSize": params.pageSize,
"promotionModes": 1
}, },
method: 'POST', method: 'POST',
// showLoading: isLoading ? (params.pageNum === 1 ? true : false) : false , // showLoading: isLoading ? (params.pageNum === 1 ? true : false) : false ,
} }
uni.$emit('refreshFinish'); uni.$emit('refreshFinish');
} catch (e) { } catch (e) {
console.log('输出内容',e)
console.log('输出内容', e)
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
uni.$emit('refreshFinish'); uni.$emit('refreshFinish');
} }
doSearch, doSearch,
onKeyInput onKeyInput
}; };
}
}

+ 14
- 0
pages.json Voir le fichier

"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },
{
"path": "moreHighMsg/textDetails",
"style": {
"navigationBarTitleText": "文本详情",
"enablePullDownRefresh": true
}
},
{ {
"path": "invoicing-record", "path": "invoicing-record",
"style": { "style": {
{ {
"root": "subpackage/personal-center", //个人中心 "root": "subpackage/personal-center", //个人中心
"pages": [{ "pages": [{
"path": "webview",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "consumption-record", "path": "consumption-record",
"style": { "style": {
"navigationBarTitleText": "消费明细", "navigationBarTitleText": "消费明细",

+ 77
- 7
pages/index/index.vue Voir le fichier

</view> </view>
</view> </view>
<view v-else-if="state.tabActive === '办理条件'"> <view v-else-if="state.tabActive === '办理条件'">
<view class="flow-list as-gravity-center"> 办理条件 </view>
<view class="flow-list as-gravity-center"> {{state.processeConditionText}} </view>
</view> </view>
<view v-else-if="state.tabActive === '常见问题'"> <view v-else-if="state.tabActive === '常见问题'">
<view class="flow-list as-gravity-center"> 常见问题 </view>
<view class="flow-list as-gravity-center"> {{state.commonQuestionText}} </view>
</view> </view>
</view> </view>
</view> </view>
<view class="span">{{item.copywriting}}</view> <view class="span">{{item.copywriting}}</view>
</view> </view>
<view class="image-box"> <view class="image-box">
<image :src="fileURL + item.speedUrl" mode="aspectFill"></image>
<image :src="fileURL + item.imgUrl" mode="aspectFill"></image>
</view> </view>
</view> </view>
<view class="more" @click="$util.navTo('/subpackage/orders/moreHighMsg/moreHighMsg',true)">查看更多</view> <view class="more" @click="$util.navTo('/subpackage/orders/moreHighMsg/moreHighMsg',true)">查看更多</view>
desc: "支付完成订单", desc: "支付完成订单",
}, },
], ],
highMsgData: '' //高速快讯内容
highMsgData: '',//高速快讯内容
processeConditionText: "", //办理条件文本
commonQuestionText: "", //常见问题文本
}); });
const isShowMask = ref(false); const isShowMask = ref(false);
const isShowBar = ref(false) const isShowBar = ref(false)
// .catch((err) => {}); // .catch((err) => {});




getInfo()
getInfo();
quanKeyAction().then((val : any) => { quanKeyAction().then((val : any) => {
setItem('key', val.dictTypeAndItem) setItem('key', val.dictTypeAndItem)
}) })
highMsg(); //高速快讯 highMsg(); //高速快讯
processeCondition();//办理条件
commonQuestion();
}) })


onMounted(() => { onMounted(() => {
} }
const link = (item) => { const link = (item) => {
console.log("item", item) console.log("item", item)
if (item.hyperLink) {
navTo(`item.hyperLink`)
if (item.type == 1) {
const params = encodeURIComponent(JSON.stringify(item.hyperLink))
uni.navigateTo({
url: `/subpackage/personal-center/webview?url=` + params
})
} else if (item.type == 2) {
navTo(item.hyperLink)
} else if (item.type == 3) {
uni.navigateTo({
url: `/subpackage/orders/moreHighMsg/textDetails`
})
} else if (item.type == 4) {
uni.navigateToMiniProgram({
appId: item.hyperLink,
path: item.speedUrl,
success(res) {
console.log(res);
},
complete(res) {
console.log(res);
},
fail(res) {
console.log(res);
// 未成功跳转到车主小程序
},
});
} }
} }
const processeCondition = () => {
let options = {
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
data: {
businessType: 'PROCESSING_CONDITIONS' //办理条件
}, //请求参数
method: "POST", //提交方式(默认POST)
showLoading: true, //是否显示加载中(默认显示)
};

//调用方式
request(infoQuery, options)
.then((res) => {
let data = stringToJson(res.bizContent)
console.log("办理条件", data)
state.processeConditionText = data.text
})
.catch((err) => {
console.log(err);
});
}
const commonQuestion = () => {
let options = {
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
data: {
businessType: 'COMMON_PROBLEM' //常见问题
}, //请求参数
method: "POST", //提交方式(默认POST)
showLoading: true, //是否显示加载中(默认显示)
};

//调用方式
request(infoQuery, options)
.then((res) => {
let data = stringToJson(res.bizContent)
console.log("常见问题", data)
state.commonQuestionText = data.text
})
.catch((err) => {
console.log(err);
});
}
</script> </script>


<style> <style>

+ 4
- 6
pages/order/components/order-list-item-new.vue Voir le fichier

<!-- 已完成 --> <!-- 已完成 -->
<view class="btns" v-else-if="item.orderStep == OrderStatus.已完成"> <view class="btns" v-else-if="item.orderStep == OrderStatus.已完成">


<view class="btn btn-normal"
v-if="(item.promotionModes==1 && item.isProduct==1 && item.isEquity==1 && item.isService==1) || (item.promotionModes==2 && item.isProduct==1 && item.isEquity==1 && item.isService==1 &&item.isStaff==1)">
<view class="btn btn-normal" v-if="( item.isProduct==1 && item.isEquity==1 && item.isService==1) ">
已评价 已评价
</view> </view>
<view class='evaluation' v-else> <view class='evaluation' v-else>
<!-- <view class="btn btn-primary" @click.stop="gotoEvaluateOrder(item)">去评价最初的</view> --> <!-- <view class="btn btn-primary" @click.stop="gotoEvaluateOrder(item)">去评价最初的</view> -->
<view class="btn btn-primary" v-if="item.isProduct==0 && item.isEquity==0"
<view class="btn btn-primary" v-if="item.isProduct==0 || item.isEquity==0"
@click.stop="gotoEvaluateProduct(item)">去评价产品</view> @click.stop="gotoEvaluateProduct(item)">去评价产品</view>
<!-- promotionModes字段判断的,1-线上模式 ,2-线下模式 ,线上模式就是自主办理不展示业务员评价 --> <!-- promotionModes字段判断的,1-线上模式 ,2-线下模式 ,线上模式就是自主办理不展示业务员评价 -->
<view class="btn btn-primary"
v-if="(item.promotionModes==1 && item.isService==0) || (item.promotionModes==2&&item.isStaff==0 && item.isService==0)"
@click.stop="gotoEvaluateSalesman(item)">去评价业务员</view>
<view class="btn btn-primary" v-if="(item.isService==0) " @click.stop="gotoEvaluateSalesman(item)">
去评价业务员</view>
</view> </view>
</view> </view>



+ 74
- 41
subpackage/orders/moreHighMsg/moreHighMsg.vue Voir le fichier

<div class="description">{{item.title}}</div> <div class="description">{{item.title}}</div>
<div class="mark">{{item.copywriting}}</div> <div class="mark">{{item.copywriting}}</div>
</div> </div>
<image :src="fileURL + item.speedUrl"></image>
<image :src="fileURL + item.imgUrl"></image>
</div> </div>
<view style="text-align: center;margin: 20rpx;" v-if="state.flags">我是有底线的</view> <view style="text-align: center;margin: 20rpx;" v-if="state.flags">我是有底线的</view>
</div> </div>
</template> </template>


<script setup lang="ts"> <script setup lang="ts">
import {fileURL} from "@/datas/fileURL.js";
import {onPageScroll,onLoad,onPullDownRefresh,onReachBottom} from "@dcloudio/uni-app";
import {queryHighMsg} from "@/utils/network/api.js";
import {reactive} from "vue";
import {stringToJson} from "@/utils/network/encryption.js";
import {request} from "@/utils/network/request.js";
import {navTo} from "@/utils/utils";
import {getCodeName} from "@/datas/queryKey.js";
import { fileURL } from "@/datas/fileURL.js";
import { onPageScroll, onLoad, onPullDownRefresh, onReachBottom } from "@dcloudio/uni-app";
import { queryHighMsg } from "@/utils/network/api.js";
import { reactive } from "vue";
import { stringToJson } from "@/utils/network/encryption.js";
import { request } from "@/utils/network/request.js";
import { navTo } from "@/utils/utils";
import { getCodeName } from "@/datas/queryKey.js";
const state = reactive({ const state = reactive({
highMsgData:[],
flags:false,
page:1,
highMsgData: [],
flags: false,
page: 1,
}) })
onLoad(() => { onLoad(() => {
highMsg(); //高速快讯 highMsg(); //高速快讯
}) })
// 下拉刷新 // 下拉刷新
onPullDownRefresh(()=>{
state.page=1
state.highMsgData=[]
state.flags=false
onPullDownRefresh(() => {
state.page = 1
state.highMsgData = []
state.flags = false
console.log('refresh'); console.log('refresh');
setTimeout(()=>{
setTimeout(() => {
highMsg() highMsg()
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, 500); }, 500);
}) })
// 触底加载 // 触底加载
onReachBottom(()=>{
if(state.highMsgData.length<state.page*8) return state.flags = true
onReachBottom(() => {
if (state.highMsgData.length < state.page * 8) return state.flags = true
console.log("触底了") console.log("触底了")
state.page++ state.page++
highMsg() highMsg()
}) })
// 高速快讯查询接口 // 高速快讯查询接口
const highMsg =()=>{
const highMsg = () => {
let options = { let options = {
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) type: 2, //type: 2,JSON格式提交数据(默认表单形式提交)
data: { data: {
pageNo:state.page,
pageSize:8
pageNo: state.page,
pageSize: 8
}, //请求参数 }, //请求参数
method: "POST", //提交方式(默认POST) method: "POST", //提交方式(默认POST)
showLoading: true, //是否显示加载中(默认显示) showLoading: true, //是否显示加载中(默认显示)
}; };
//调用方式 //调用方式
request(queryHighMsg, options).then((res) => { request(queryHighMsg, options).then((res) => {
console.log("高速快讯查询接口",stringToJson(res.bizContent).data);
state.highMsgData=[...stringToJson(res.bizContent).data,...state.highMsgData]
console.log("state.highMsgData",state.highMsgData)
// state.highMsgData=stringToJson(res.bizContent).data
})
console.log("高速快讯查询接口", stringToJson(res.bizContent).data);
state.highMsgData = [...stringToJson(res.bizContent).data, ...state.highMsgData]
console.log("state.highMsgData", state.highMsgData)
for (var i = 0; i < state.highMsgData.length; i++) {
state.highMsgData[i]["copywriting"] = getCodeName('COPYWRITING', state.highMsgData[i]["copywriting"])
}
// state.highMsgData=stringToJson(res.bizContent).data
})
.catch((err) => { .catch((err) => {
}); });
} }
const link=(item)=>{
console.log("item",item)
navTo(`item.hyperLink`)
const link = (item) => {
if (item.type == 1) {
const params = encodeURIComponent(JSON.stringify(item.hyperLink))
uni.navigateTo({
url: `/subpackage/personal-center/webview?url=` + params
})
} else if (item.type == 2) {
navTo(item.hyperLink)
} else if (item.type == 3) {
uni.navigateTo({
url: `/subpackage/orders/moreHighMsg/textDetails`
})
} else if (item.type == 4) {
uni.navigateToMiniProgram({
appId: item.hyperLink,
path: item.speedUrl,
success(res) {
console.log(res);
},
complete(res) {
console.log(res);
},
fail(res) {
console.log(res);
// 未成功跳转到车主小程序
},
});
}
} }
</script> </script>


<style scoped> <style scoped>
.content{
.content {
background-color: #eef7f7; background-color: #eef7f7;
overflow: hidden; overflow: hidden;
min-height: 100vh; min-height: 100vh;
} }
.item{

.item {
width: 95%; width: 95%;
margin:0 auto;
margin: 0 auto;
margin-top: 30rpx; margin-top: 30rpx;
background-color: white; background-color: white;
display: flex; display: flex;
border-radius: 14rpx; border-radius: 14rpx;
font-size: 30rpx; font-size: 30rpx;
} }
.item>image{

.item>image {
width: 100rpx; width: 100rpx;
height: 100rpx;
height: 100rpx;
border-radius: 10rpx; border-radius: 10rpx;
} }
.mark{

.mark {
font-size: 22rpx; font-size: 22rpx;
display: inline-block; display: inline-block;
text-align: center; text-align: center;
padding: 4rpx 8rpx; padding: 4rpx 8rpx;
margin-top: 16rpx; margin-top: 16rpx;
} }
.left-content{

.left-content {
width: 70%; width: 70%;
} }
.description{

.description {
overflow: hidden; overflow: hidden;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-box-orient: vertical;
} }
</style> </style>

+ 11
- 0
subpackage/orders/moreHighMsg/textDetails.vue Voir le fichier

<template>
<view>
文本详情
</view>
</template>

<script>
</script>

<style>
</style>

+ 1
- 1
subpackage/orders/order-details-new.vue Voir le fichier

<!-- 订单完成 --> <!-- 订单完成 -->
<view v-if="state.orderInfo.orderStep == OrderStatus.已完成" class="btn-status"> <view v-if="state.orderInfo.orderStep == OrderStatus.已完成" class="btn-status">
<view class="btn space" <view class="btn space"
v-if="(state.orderInfo.promotionModes==1 && state.orderInfo.isProduct==1 && state.orderInfo.isEquity==1 && state.orderInfo.isService==1) || (state.orderInfo.promotionModes==2 && state.orderInfo.isProduct==1 && state.orderInfo.isEquity==1 && state.orderInfo.isService==1 &&state.orderInfo.isStaff==1)">
v-if="( state.orderInfo.isProduct==1 && state.orderInfo.isEquity==1 && state.orderInfo.isService==1) ">
已评价</view> 已评价</view>
<view class="btn space" v-else @click="gotoEvaluateOrder(state.orderInfo)">去评价</view> <view class="btn space" v-else @click="gotoEvaluateOrder(state.orderInfo)">去评价</view>
</view> </view>

+ 19
- 0
subpackage/personal-center/webview.vue Voir le fichier

<template>
<web-view :src="state.url"></web-view>
</template>

<script setup lang="ts">
import { reactive } from "vue";
import { onLoad } from "@dcloudio/uni-app";
const state = reactive({
url: ''
})
onLoad((option : any) => {
// 传入需要跳转的链接 使用web-view标签进行跳转
const params = JSON.parse(decodeURIComponent(option.url))
state.url = params
})
</script>

<style>
</style>

+ 4
- 4
utils/network/api.js Voir le fichier

export const envs = { export const envs = {
//开发环境配置 //开发环境配置
development: { development: {
baseUrl: "https://qtzl.etcjz.cn",
// baseUrl: "http://192.168.100.63:8087",
// baseUrl: "https://qtzl.etcjz.cn",
baseUrl: "http://192.168.100.63:8087",
// baseUrl: "https://testmedusa.etcjz.cn", // baseUrl: "https://testmedusa.etcjz.cn",
// baseUrl: "http://192.168.100.158:8085", // baseUrl: "http://192.168.100.158:8085",
}, },
//生产环境配置 //生产环境配置
production: { production: {
// baseUrl: "http://192.168.100.63:8087",
baseUrl: "http://192.168.100.63:8087",
// baseUrl: "http://222.85.144.89:19002", // baseUrl: "http://222.85.144.89:19002",
// baseUrl: "http://192.168.100.158:8085/html/", // baseUrl: "http://192.168.100.158:8085/html/",
baseUrl: "https://qtzl.etcjz.cn",
// baseUrl: "https://qtzl.etcjz.cn",
// baseUrl: "https://testmedusa.etcjz.cn", // baseUrl: "https://testmedusa.etcjz.cn",
}, },
} }

+ 34
- 12
utils/network/encryption.js Voir le fichier

SM4Util SM4Util
} from '../util/sm4.js' } from '../util/sm4.js'
import { import {
getItem,
StorageKeys
getItem
} from "@/utils/storage"; } from "@/utils/storage";
const s4 = new SM4Util() const s4 = new SM4Util()


//调用中台参数 //调用中台参数
export function encryption(ifCode, subdata, type) { export function encryption(ifCode, subdata, type) {
var requestData = new Array(); var requestData = new Array();
const key = 'WVdSdGFXNHdNREZmTWpBeU16QTRNRE09'
requestData["ifCode"] = ifCode; requestData["ifCode"] = ifCode;
// requestData["appId"] = "52030131"; // || "admin001" // requestData["appId"] = "52030131"; // || "admin001"
requestData["appId"] = "admin001"; // || "admin001" requestData["appId"] = "admin001"; // || "admin001"
requestData["signType"] = "SM3"; // || "NONE"
requestData["signType"] = "MD5"; // || "NONE"
// requestData["encryptType"] = "SM4"; // requestData["encryptType"] = "SM4";
requestData["encryptType"] = "NONE"; requestData["encryptType"] = "NONE";
requestData["reqId"] = requestData["appId"] + "_" + getDate() + "_" + generateMixed(5); requestData["reqId"] = requestData["appId"] + "_" + getDate() + "_" + generateMixed(5);
requestData["timestamp"] = formatTime(new Date()); requestData["timestamp"] = formatTime(new Date());
// requestData["bizContent"] = s4.encryptData_CBC(subdata, sm4Key) // requestData["bizContent"] = s4.encryptData_CBC(subdata, sm4Key)
requestData["bizContent"] = JSON.stringify(subdata) requestData["bizContent"] = JSON.stringify(subdata)
requestData["accessToken"] = getItem(StorageKeys.Token)
requestData["sign"] = sm3(
"appId=" + requestData["appId"] +
"&bizContent=" + requestData["bizContent"] +
requestData["sign"] = md5(
"bizContent=" + requestData["bizContent"] +
"&signType=" + requestData["signType"] + "&signType=" + requestData["signType"] +
"&encryptType=" + requestData["encryptType"] + "&encryptType=" + requestData["encryptType"] +
"&timestamp=" + requestData["timestamp"] + "&timestamp=" + requestData["timestamp"] +
"&ifCode=" + requestData["ifCode"] +
"&reqId=" + requestData["reqId"] +
"&accessToken=" + requestData["accessToken"], key
"&ifCode=" + requestData["ifCode"]
); );
let endData = arrayToJson(requestData); let endData = arrayToJson(requestData);
return endData; return endData;
}
}
//调用中台参数
// export function encryption(ifCode, subdata, type) {
// var requestData = new Array();
// const key = 'WVdSdGFXNHdNREZmTWpBeU16QTRNRE09'
// requestData["ifCode"] = ifCode;
// // requestData["appId"] = "52030131"; // || "admin001"
// requestData["appId"] = "admin001"; // || "admin001"
// requestData["signType"] = "SM3"; // || "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["accessToken"] = getItem(StorageKeys.Token)
// requestData["sign"] = sm3(
// "appId=" + requestData["appId"] +
// "&bizContent=" + requestData["bizContent"] +
// "&signType=" + requestData["signType"] +
// "&encryptType=" + requestData["encryptType"] +
// "&timestamp=" + requestData["timestamp"] +
// "&ifCode=" + requestData["ifCode"] +
// "&reqId=" + requestData["reqId"] +
// "&accessToken=" + requestData["accessToken"], key
// );
// let endData = arrayToJson(requestData);
// return endData;
// }

+ 2
- 2
utils/network/request.js Voir le fichier

rbacSource: 'MINI_PROGRAM', rbacSource: 'MINI_PROGRAM',
accessToken: getItem(StorageKeys.Token) accessToken: getItem(StorageKeys.Token)
} }
options.url = envs[process.env.NODE_ENV].baseUrl + '/api/interfaceMidGroundIn'
// options.url = envs[process.env.NODE_ENV].baseUrl + '/ifzt/api/interfaceMidGroundIn'
// options.url = envs[process.env.NODE_ENV].baseUrl + '/api/interfaceMidGroundIn'
options.url = envs[process.env.NODE_ENV].baseUrl + '/ifzt/api/interfaceMidGroundIn'
// options.url = envs[process.env.NODE_ENV].baseUrl + '/ifzt/api/interfaceMidGroundIn' // options.url = envs[process.env.NODE_ENV].baseUrl + '/ifzt/api/interfaceMidGroundIn'
//默认json数据格式提交` //默认json数据格式提交`
let contentType = 'application/x-www-form-urlencoded' let contentType = 'application/x-www-form-urlencoded'

Chargement…
Annuler
Enregistrer