@@ -84,7 +84,7 @@ export default function useOrderListItem(props) { | |||
return; | |||
} | |||
let res: any = null; | |||
let res : any = null; | |||
const options = { | |||
type: 2, | |||
data: { | |||
@@ -93,7 +93,8 @@ export default function useOrderListItem(props) { | |||
"vehiclePlate": searchKeyWords.value, | |||
"tabIndex": props.index + '', | |||
"pageNo": params.pageNum, | |||
"pageSize": params.pageSize | |||
"pageSize": params.pageSize, | |||
"promotionModes": 1 | |||
}, | |||
method: 'POST', | |||
// showLoading: isLoading ? (params.pageNum === 1 ? true : false) : false , | |||
@@ -124,7 +125,7 @@ export default function useOrderListItem(props) { | |||
} | |||
uni.$emit('refreshFinish'); | |||
} catch (e) { | |||
console.log('输出内容',e) | |||
console.log('输出内容', e) | |||
uni.stopPullDownRefresh(); | |||
uni.$emit('refreshFinish'); | |||
} | |||
@@ -158,4 +159,4 @@ export default function useOrderListItem(props) { | |||
doSearch, | |||
onKeyInput | |||
}; | |||
} | |||
} |
@@ -1208,6 +1208,13 @@ | |||
{ | |||
"root": "subpackage/personal-center", //个人中心 | |||
"pages": [{ | |||
"path": "webview", | |||
"style": { | |||
"navigationBarTitleText": "", | |||
"enablePullDownRefresh": false | |||
} | |||
}, | |||
{ | |||
"path": "consumption-record", | |||
"style": { | |||
"navigationBarTitleText": "消费明细", |
@@ -131,10 +131,10 @@ | |||
</view> | |||
</view> | |||
<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 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> | |||
@@ -149,7 +149,7 @@ | |||
<view class="span">{{item.copywriting}}</view> | |||
</view> | |||
<view class="image-box"> | |||
<image :src="fileURL + item.speedUrl" mode="aspectFill"></image> | |||
<image :src="fileURL + item.imgUrl" mode="aspectFill"></image> | |||
</view> | |||
</view> | |||
<view class="more" @click="$util.navTo('/subpackage/orders/moreHighMsg/moreHighMsg',true)">查看更多</view> | |||
@@ -314,7 +314,9 @@ | |||
desc: "支付完成订单", | |||
}, | |||
], | |||
highMsgData: '' //高速快讯内容 | |||
highMsgData: '',//高速快讯内容 | |||
processeConditionText: "", //办理条件文本 | |||
commonQuestionText: "", //常见问题文本 | |||
}); | |||
const isShowMask = ref(false); | |||
const isShowBar = ref(false) | |||
@@ -355,11 +357,13 @@ | |||
// .catch((err) => {}); | |||
getInfo() | |||
getInfo(); | |||
quanKeyAction().then((val : any) => { | |||
setItem('key', val.dictTypeAndItem) | |||
}) | |||
highMsg(); //高速快讯 | |||
processeCondition();//办理条件 | |||
commonQuestion(); | |||
}) | |||
onMounted(() => { | |||
@@ -555,10 +559,61 @@ | |||
} | |||
const link = (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) { | |||
} else if (item.type == 4) { | |||
} | |||
} | |||
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> | |||
<style> |
@@ -97,18 +97,16 @@ | |||
<!-- 已完成 --> | |||
<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 class='evaluation' v-else> | |||
<!-- <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> | |||
<!-- 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> | |||
@@ -12,78 +12,82 @@ | |||
</template> | |||
<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({ | |||
highMsgData:[], | |||
flags:false, | |||
page:1, | |||
highMsgData: [], | |||
flags: false, | |||
page: 1, | |||
}) | |||
onLoad(() => { | |||
highMsg(); //高速快讯 | |||
}) | |||
// 下拉刷新 | |||
onPullDownRefresh(()=>{ | |||
state.page=1 | |||
state.highMsgData=[] | |||
state.flags=false | |||
onPullDownRefresh(() => { | |||
state.page = 1 | |||
state.highMsgData = [] | |||
state.flags = false | |||
console.log('refresh'); | |||
setTimeout(()=>{ | |||
setTimeout(() => { | |||
highMsg() | |||
uni.stopPullDownRefresh() | |||
}, 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("触底了") | |||
state.page++ | |||
highMsg() | |||
}) | |||
// 高速快讯查询接口 | |||
const highMsg =()=>{ | |||
const highMsg = () => { | |||
let options = { | |||
type: 2, //type: 2,JSON格式提交数据(默认表单形式提交) | |||
data: { | |||
pageNo:state.page, | |||
pageSize:8 | |||
pageNo: state.page, | |||
pageSize: 8 | |||
}, //请求参数 | |||
method: "POST", //提交方式(默认POST) | |||
showLoading: true, //是否显示加载中(默认显示) | |||
}; | |||
//调用方式 | |||
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) => { | |||
}); | |||
} | |||
const link=(item)=>{ | |||
console.log("item",item) | |||
const link = (item) => { | |||
console.log("item", item) | |||
navTo(`item.hyperLink`) | |||
} | |||
</script> | |||
<style scoped> | |||
.content{ | |||
.content { | |||
background-color: #eef7f7; | |||
overflow: hidden; | |||
min-height: 100vh; | |||
} | |||
.item{ | |||
.item { | |||
width: 95%; | |||
margin:0 auto; | |||
margin: 0 auto; | |||
margin-top: 30rpx; | |||
background-color: white; | |||
display: flex; | |||
@@ -93,12 +97,14 @@ | |||
border-radius: 14rpx; | |||
font-size: 30rpx; | |||
} | |||
.item>image{ | |||
.item>image { | |||
width: 100rpx; | |||
height: 100rpx; | |||
height: 100rpx; | |||
border-radius: 10rpx; | |||
} | |||
.mark{ | |||
.mark { | |||
font-size: 22rpx; | |||
display: inline-block; | |||
text-align: center; | |||
@@ -108,14 +114,16 @@ | |||
padding: 4rpx 8rpx; | |||
margin-top: 16rpx; | |||
} | |||
.left-content{ | |||
.left-content { | |||
width: 70%; | |||
} | |||
.description{ | |||
.description { | |||
overflow: hidden; | |||
-webkit-line-clamp: 2; | |||
text-overflow: ellipsis; | |||
display: -webkit-box; | |||
-webkit-box-orient: vertical; | |||
-webkit-box-orient: vertical; | |||
} | |||
</style> |
@@ -430,7 +430,7 @@ | |||
<!-- 订单完成 --> | |||
<view v-if="state.orderInfo.orderStep == OrderStatus.已完成" class="btn-status"> | |||
<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 class="btn space" v-else @click="gotoEvaluateOrder(state.orderInfo)">去评价</view> | |||
</view> |
@@ -0,0 +1,19 @@ | |||
<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> |
@@ -7,17 +7,17 @@ export const URL = "testmedusa.etcjz.cn"; | |||
export const envs = { | |||
//开发环境配置 | |||
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: "http://192.168.100.158:8085", | |||
}, | |||
//生产环境配置 | |||
production: { | |||
// baseUrl: "http://192.168.100.63:8087", | |||
baseUrl: "http://192.168.100.63:8087", | |||
// baseUrl: "http://222.85.144.89:19002", | |||
// baseUrl: "http://192.168.100.158:8085/html/", | |||
baseUrl: "https://qtzl.etcjz.cn", | |||
// baseUrl: "https://qtzl.etcjz.cn", | |||
// baseUrl: "https://testmedusa.etcjz.cn", | |||
}, | |||
} |
@@ -17,8 +17,7 @@ import { | |||
SM4Util | |||
} from '../util/sm4.js' | |||
import { | |||
getItem, | |||
StorageKeys | |||
getItem | |||
} from "@/utils/storage"; | |||
const s4 = new SM4Util() | |||
@@ -172,28 +171,51 @@ function textToBase64(text, key, iv) { | |||
//调用中台参数 | |||
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["signType"] = "MD5"; // || "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"] + | |||
requestData["sign"] = md5( | |||
"bizContent=" + requestData["bizContent"] + | |||
"&signType=" + requestData["signType"] + | |||
"&encryptType=" + requestData["encryptType"] + | |||
"×tamp=" + requestData["timestamp"] + | |||
"&ifCode=" + requestData["ifCode"] + | |||
"&reqId=" + requestData["reqId"] + | |||
"&accessToken=" + requestData["accessToken"], key | |||
"&ifCode=" + requestData["ifCode"] | |||
); | |||
let endData = arrayToJson(requestData); | |||
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"] + | |||
// "×tamp=" + requestData["timestamp"] + | |||
// "&ifCode=" + requestData["ifCode"] + | |||
// "&reqId=" + requestData["reqId"] + | |||
// "&accessToken=" + requestData["accessToken"], key | |||
// ); | |||
// let endData = arrayToJson(requestData); | |||
// return endData; | |||
// } |
@@ -59,8 +59,8 @@ export function request(code, options = {}, start = false) { | |||
rbacSource: 'MINI_PROGRAM', | |||
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' | |||
//默认json数据格式提交` | |||
let contentType = 'application/x-www-form-urlencoded' |