@@ -32,13 +32,14 @@ export default { | |||
uni.login({ | |||
provider: "weixin", | |||
success: function (e) { | |||
console.log(e); | |||
console.log("e",e); | |||
// auth.code2Session | |||
uni.request({ | |||
url: `https://api.weixin.qq.com/sns/jscode2session?appid=${wechatAppID}&secret=${wechatSecret}&js_code=${e.code}&grant_type=authorization_code`, | |||
success: (res) => { | |||
// state.openid = res.data.openid; | |||
setItem("QYorder", res.data.openid); | |||
console.log(res); | |||
console.log("获取微信小程序openid",res); | |||
}, | |||
fail: (err) => { | |||
uni.showToast({ |
@@ -3,7 +3,7 @@ | |||
<view class="title" :style="{paddingTop:searchMarginTop+'px',height:searchHeight+'px',lineHeight:searchHeight+'px'}"> | |||
<block v-if="isBack && !isAlipay"> | |||
<image :src="`/static/image/icon-back.png`" | |||
:style="{height:searchHeight+'px',width:searchHeight+'px'}" class="back" @click="back"></image> | |||
:style="{height:searchHeight+'px',width:searchHeight+'px'}" class="back" @click="back(title)"></image> | |||
</block> | |||
<text>{{title}}</text> | |||
</view> | |||
@@ -60,10 +60,17 @@ | |||
default:0 | |||
} | |||
}) | |||
const back = () => { | |||
uni.navigateBack({ | |||
delta: 1 | |||
}) | |||
const back = (title) => { | |||
console.log("555555555",title) | |||
if(title=="九州ETC"){ | |||
uni.switchTab({ | |||
url: "/pages/order/order" | |||
}) | |||
}else{ | |||
uni.navigateBack({ | |||
delta: 1 | |||
}) | |||
} | |||
} | |||
</script> | |||
@@ -1,7 +1,7 @@ | |||
/** | |||
* 订单列表业务逻辑 | |||
*/ | |||
import { onLoad,onShow,onUnload } from "@dcloudio/uni-app"; | |||
import { onLoad, onShow, onUnload } from "@dcloudio/uni-app"; | |||
import { reactive, ref } from 'vue'; | |||
import { hasLogin, msg } from "@/utils/utils"; | |||
export default function useOrderList() { | |||
@@ -9,45 +9,52 @@ export default function useOrderList() { | |||
const data = reactive({ | |||
//登录状态 | |||
login:hasLogin(), | |||
login: hasLogin(), | |||
//是否刷新 | |||
refresh:false, | |||
refresh: false, | |||
//当前切换的index 0-全部 1-待发货 2-待收货 3-待激活 xx-退款/换货 | |||
tabIndex: 0, | |||
//导航栏数据 | |||
tabsList: [ | |||
{ id: 0, name: '全部' }, | |||
{ id: 1, name: '待发货' }, | |||
{ id: 0, name: '全部' }, | |||
{ id: 1, name: '待发货' }, | |||
{ id: 2, name: '待收货' }, | |||
{ id: 3, name: '待激活' }, | |||
{ id: 4, name: '退款/换货' } | |||
{ id: 3, name: '待激活' }, | |||
{ id: 4, name: '退款/换货' } | |||
], | |||
}) | |||
onLoad(() => { | |||
onLoad((option) => { | |||
console.log("option", option) | |||
if (!option.index) { | |||
data.tabIndex = 0 | |||
} else { | |||
data.tabIndex = Number(option.index) | |||
} | |||
//监听订单刷新信息 | |||
uni.$on('refreshOrder',() => { | |||
uni.$on('refreshOrder', () => { | |||
data.refresh = true; | |||
}); | |||
uni.$on('refreshFinish',()=>{ | |||
uni.$on('refreshFinish', () => { | |||
data.refresh = false; | |||
}) | |||
uni.$on('loginOut',()=>{ | |||
uni.$on('loginOut', () => { | |||
data.login = false; | |||
data.refresh = false; | |||
}) | |||
}); | |||
onUnload(()=>{ | |||
onUnload(() => { | |||
uni.$off('refreshOrder'); | |||
}); | |||
onShow(()=>{ | |||
onShow(() => { | |||
data.login = hasLogin(); | |||
if(data.login){ | |||
if (data.login) { | |||
data.refresh = true; | |||
console.log("data.refresh", data.refresh) | |||
} | |||
}) | |||
@@ -74,12 +74,11 @@ | |||
import { reactive } from "vue"; | |||
import { checkStr, msg, navTo } from "@/utils/utils"; | |||
import { onLoad, onUnload } from "@dcloudio/uni-app"; | |||
import { login, loginCode, loginTime } from "@/utils/network/api.js"; | |||
import { login, loginCode, loginTime,wechatAppID } from "@/utils/network/api.js"; | |||
import { request } from "@/utils/network/request.js"; | |||
import { stringToJson } from "@/utils/network/encryption"; | |||
import { useUserStore } from "@/stores/user"; | |||
import { setItem } from "@/utils/storage"; | |||
const userStore = useUserStore(); | |||
const { fetchToken } = userStore; | |||
@@ -183,6 +182,7 @@ | |||
} | |||
}) | |||
} | |||
</script> | |||
<style lang="scss" scoped> |
@@ -21,7 +21,8 @@ | |||
</swiper> | |||
<view class="notice"> | |||
<image class="icon" :src="fileURL + 'image/index/icon-notice.png'" lazy-load="false" mode="aspectFill"> | |||
<image class="icon" :src="fileURL + 'image/index/icon-notice.png'" lazy-load="false" | |||
mode="aspectFill"> | |||
</image> | |||
<!-- <text class="notice-text">{{state.notice}}</text> --> | |||
<uni-notice-bar style="width: 100%;" scrollable single :text="state.notice"> | |||
@@ -33,26 +34,26 @@ | |||
<view class="nav"> | |||
<view class="item-box" @click="$util.navTo('/pages/recharge/select-car',true)"> | |||
<view class="item item-1"> | |||
<image :src="fileURL + 'image/index/item-1.png'" mode="aspectFill"/> | |||
<image :src="fileURL + 'image/index/item-1.png'" mode="aspectFill" /> | |||
</view> | |||
<view class="text">储值卡充值</view> | |||
</view> | |||
<view class="item-box" @click="$util.navTo('/subpackage/personal-center/search/select-car',true)"> | |||
<view class="item item-2"> | |||
<image :src="fileURL + 'image/index/item-2.png'" mode="aspectFill"/> | |||
<image :src="fileURL + 'image/index/item-2.png'" mode="aspectFill" /> | |||
</view> | |||
<view class="text">账单查询</view> | |||
</view> | |||
<view class="item-box" @click="$util.navTo('/subpackage/orders/Invoice-mannager',true)"> | |||
<view class="item item-3"> | |||
<image :src="fileURL + 'image/index/item-3.png'" mode="aspectFill"/> | |||
<image :src="fileURL + 'image/index/item-3.png'" mode="aspectFill" /> | |||
</view> | |||
<view class="text">通行发票</view> | |||
</view> | |||
<view class="item-box" | |||
@click="$util.navTo('/subpackage/personal-center/install-activation-order',true)"> | |||
<view class="item item-4"> | |||
<image :src="fileURL + 'image/index/item-4.png'" mode="aspectFill"/> | |||
<image :src="fileURL + 'image/index/item-4.png'" mode="aspectFill" /> | |||
</view> | |||
<view class="text">设备激活</view> | |||
</view> | |||
@@ -60,7 +61,7 @@ | |||
<view class="item-box" | |||
@click="$util.navTo('/subpackage/after-sale/card-loss-reporting/select-car',true)"> | |||
<view class="item item-5"> | |||
<image :src="fileURL + 'image/index/item-5.png'" mode="aspectFill"/> | |||
<image :src="fileURL + 'image/index/item-5.png'" mode="aspectFill" /> | |||
</view> | |||
<view class="text">设备遗失</view> | |||
</view> | |||
@@ -68,20 +69,20 @@ | |||
<view class="item-box" | |||
@click="$util.navTo('/subpackage/after-sale/rescind-carId/rescind-carId-select',true)"> | |||
<view class="item item-6"> | |||
<image :src="fileURL + 'image/index/item-6.png'" mode="aspectFill"/> | |||
<image :src="fileURL + 'image/index/item-6.png'" mode="aspectFill" /> | |||
</view> | |||
<view class="text">解除车牌占用</view> | |||
</view> | |||
<view class="item-box" | |||
@click="$util.navTo(`/subpackage/personal-center/setting/personal-information/corrections`,true)"> | |||
<view class="item item-7"> | |||
<image :src="fileURL + 'image/index/item-7.png'" mode="aspectFill"/> | |||
<image :src="fileURL + 'image/index/item-7.png'" mode="aspectFill" /> | |||
</view> | |||
<view class="text">基础信息变更</view> | |||
</view> | |||
<view class="item-box" @click="$util.navTo(`/pages/service/service`,true)"> | |||
<view class="item item-8"> | |||
<image :src="fileURL + 'image/index/item-more.png'" mode="aspectFill"/> | |||
<image :src="fileURL + 'image/index/item-more.png'" mode="aspectFill" /> | |||
</view> | |||
<view class="text">更多</view> | |||
</view> | |||
@@ -412,11 +413,11 @@ | |||
//调用方式 | |||
request(querySwiper, options).then((res) => { | |||
console.log(stringToJson(res.bizContent)); | |||
const data = stringToJson(res.bizContent) | |||
console.log("轮播图",data) | |||
state.swiperList = data.swipers ?data.swipers:[] | |||
}) | |||
console.log(stringToJson(res.bizContent)); | |||
const data = stringToJson(res.bizContent) | |||
console.log("轮播图", data) | |||
state.swiperList = data.swipers ? data.swipers : [] | |||
}) | |||
.catch((err) => { | |||
console.log(err); | |||
}); | |||
@@ -546,12 +547,17 @@ | |||
request(queryHighMsg, options).then((res) => { | |||
console.log("高速快讯查询接口", stringToJson(res.bizContent)); | |||
state.highMsgData = stringToJson(res.bizContent).data | |||
for (var i = 0; i < state.highMsgData.length; i++) { | |||
state.highMsgData[i]["copywriting"] = getCodeName('COPYWRITING', state.highMsgData[i]["copywriting"]) | |||
} | |||
}) | |||
.catch((err) => { console.log(err) }); | |||
} | |||
const link = (item) => { | |||
console.log("item", item) | |||
navTo(`item.hyperLink`) | |||
if (item.hyperLink) { | |||
navTo(`item.hyperLink`) | |||
} | |||
} | |||
</script> | |||
@@ -49,6 +49,7 @@ | |||
/* 改变tab refresh:点击同个tab是否刷新*/ | |||
const changeTab = (index,refresh?:boolean) => { | |||
console.log("index",index) | |||
if(refresh){ | |||
uni.$emit("refreshOrder"); | |||
return; |
@@ -20,11 +20,15 @@ | |||
import orderListItem from "./components/order-list-item"; | |||
import useOrderList from "@/composables/order/useOrderList"; | |||
import filter from '@/components/filter/filter.vue'; | |||
import { onLoad} from "@dcloudio/uni-app"; | |||
const { | |||
data, | |||
tabbarRef | |||
} = useOrderList(); | |||
onLoad((option)=>{ | |||
// console.log("option",option) | |||
// data.tabIndex=option.index | |||
}) | |||
</script> | |||
<style lang="scss"> |
@@ -93,25 +93,25 @@ | |||
<view class="order box"> | |||
<view class="right-head"> | |||
<view class="tit">我的订单</view> | |||
<view class="more"> | |||
<view class="more" @click="goOrder(0)"> | |||
<text class="more-text">查看全部</text> | |||
<image :src="`${$imgUrl}user/icon-arrow.png`" class="arrow"></image> | |||
</view> | |||
</view> | |||
<view class="order-items"> | |||
<view class="item"> | |||
<view class="item" @click="goOrder(1)"> | |||
<image :src="`${$imgUrl}user/icon-daifahuo.png`" class="icon"></image> | |||
<text class="tit">待发货</text> | |||
</view> | |||
<view class="item"> | |||
<view class="item" @click="goOrder(2)"> | |||
<image :src="`${$imgUrl}user/icon-daishouhuo.png`" class="icon"></image> | |||
<text class="tit">待收货</text> | |||
</view> | |||
<view class="item"> | |||
<view class="item" @click="goOrder(3)"> | |||
<image :src="`${$imgUrl}user/icon-daijihuo.png`" class="icon"></image> | |||
<text class="tit">待激活</text> | |||
</view> | |||
<view class="item"> | |||
<view class="item" @click="goOrder(4)"> | |||
<image :src="`${$imgUrl}user/icon-tuihuanhuo.png`" class="icon"></image> | |||
<text class="tit">退换货/退款</text> | |||
</view> | |||
@@ -237,7 +237,7 @@ | |||
mobile: '' | |||
}, | |||
monthFlowingVo: { | |||
duration: "", | |||
duration: 0, | |||
mileage: 0, | |||
flowingNum: 0, | |||
num: 0, | |||
@@ -374,6 +374,11 @@ | |||
} | |||
}); | |||
} | |||
const goOrder=(index)=>{ | |||
uni.reLaunch({ | |||
url:`../order/order?index=${index}` | |||
}) | |||
} | |||
</script> | |||
<style> | |||
page { | |||
@@ -601,7 +606,7 @@ | |||
.order .order-items { | |||
display: flex; | |||
justify-content: space-evenly; | |||
justify-content: space-around; | |||
padding: 30rpx 0; | |||
} | |||
@@ -140,7 +140,7 @@ | |||
} from "@dcloudio/uni-app"; | |||
import { | |||
navTo, | |||
checkStr | |||
checkStr,msg | |||
} from "@/utils/utils"; | |||
import { | |||
request | |||
@@ -266,11 +266,11 @@ | |||
onLoad((option) => { | |||
params.orderId = option.orderId | |||
params.applyId = option.applyId | |||
getexpresslist(); | |||
}); | |||
onShow(() => { | |||
getAddressList(); | |||
getexpresslist(); | |||
}) | |||
const getexpresslist = () => { | |||
@@ -345,6 +345,10 @@ | |||
}; | |||
const queryCckChangejzCardInfo = () => { | |||
if(!form.address){ | |||
msg("请编辑收货详细地址"); | |||
return; | |||
} | |||
var data = { | |||
applyId: params.applyId, | |||
orderId: params.orderId, |
@@ -343,7 +343,7 @@ | |||
idNum: state.form.userIdNum, | |||
idType: state.form.userIdType, | |||
mobile: state.form.tel, | |||
name: state.form.userName, | |||
userName: state.form.userName, | |||
gender: state.form.gender == '男' ? 'MALE' : 'FEMALE', | |||
certifyChannel: "BAIDUOCR", | |||
address: state.form.address, |
@@ -193,7 +193,7 @@ import { | |||
idNum: state.form.userIdNum, | |||
idType: state.form.userIdType, | |||
mobile: state.form.tel, | |||
name: state.form.userName, | |||
userName: state.form.userName, | |||
gender: 'UNKOWN', | |||
certifyChannel: "BAIDUOCR", | |||
address: state.form.address, |
@@ -1,7 +1,7 @@ | |||
<template> | |||
<view v-if="state.list.length!=0"> | |||
<view class="car-item" v-for="(item,index) in state.list"> | |||
<image :src="`${$imgUrl}user/icon-car.png`" class="car-pic"></image> | |||
<image :src="`${$imgUrl}che.png`" class="car-pic"></image> | |||
<view class="car-info"> | |||
<view class="car-no"><text class="no">{{item.vehiclePlate}}</text><text class="color">{{item.color}}</text></view> | |||
<view class="card-no">卡号:{{item.cardId}}</view> | |||
@@ -20,7 +20,7 @@ | |||
import { onLoad} from "@dcloudio/uni-app"; | |||
import {selectCarInfo,delCarInfo} from "@/utils/network/api.js"; | |||
import {getItem} from "@/utils/storage"; | |||
import {vehiclePlateColor} from "@/datas/vehiclePlateColor.js"; | |||
import {vehiclePlateColorPai} from "@/datas/vehiclePlateColor.js"; | |||
const state = reactive({ | |||
list:'' | |||
}) | |||
@@ -40,10 +40,17 @@ | |||
request(selectCarInfo, options).then((res) => { | |||
console.log("车辆信息:",res) | |||
const data = stringToJson(res.bizContent).vehicleManages | |||
for(var i=0;i<data.length;i++){ | |||
for(var j=0;j<vehiclePlateColor.length;j++){ | |||
if(data[i].vehiclePlateColor==vehiclePlateColor[j]['id']){ | |||
data[i].color=vehiclePlateColor[j]['color'] | |||
// for(var i=0;i<data.length;i++){ | |||
// for(var j=0;j<vehiclePlateColor.length;j++){ | |||
// if(data[i].vehiclePlateColor==vehiclePlateColor[j]['id']){ | |||
// data[i].color=vehiclePlateColor[j]['color'] | |||
// } | |||
// } | |||
// } | |||
for (var i = 0; i < data.length; i++) { | |||
for (var j = 0; j < vehiclePlateColorPai.length; j++) { | |||
if (data[i].vehiclePlateColor == vehiclePlateColorPai[j]['id']) { | |||
data[i].color = vehiclePlateColorPai[j]['color'] | |||
} | |||
} | |||
} | |||
@@ -142,4 +149,13 @@ | |||
text-align: center; | |||
margin: 50rpx auto; | |||
} | |||
.color{ | |||
padding: 4rpx 8rpx; | |||
border-radius: 10rpx; | |||
color: white; | |||
background-color: rgb(6, 112, 255); | |||
display: inline-block; | |||
margin-left: 20rpx; | |||
font-size: 24rpx; | |||
} | |||
</style> |
@@ -7,15 +7,16 @@ export const URL = "testmedusa.etcjz.cn"; | |||
export const envs = { | |||
//开发环境配置 | |||
development: { | |||
// baseUrl: "htttp://192.168.100.63:8087", | |||
baseUrl: "http://192.168.100.63:8087", | |||
// baseUrl: "https://qtzl.etcjz.cn", | |||
baseUrl: "https://testmedusa.etcjz.cn", | |||
// baseUrl: "https://testmedusa.etcjz.cn", | |||
// baseUrl: "http://192.168.100.158:8085", | |||
}, | |||
//生产环境配置 | |||
production: { | |||
// baseUrl: "htttp://222.85.144.89:19002", | |||
// baseUrl: "http://192.168.100.63:8087" | |||
baseUrl: "https://testmedusa.etcjz.cn", | |||
// baseUrl: "http://192.168.100.63:8087", | |||
baseUrl: "http://222.85.144.89:19002", | |||
// baseUrl: "https://testmedusa.etcjz.cn", | |||
} | |||
} | |||
@@ -58,11 +58,9 @@ export function request(code, options = {}, start = false) { | |||
loginSource: getItem("loginSource"), | |||
rbacSource: 'MINI_PROGRAM' | |||
} | |||
//Url 地址 /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数据格式提交` | |||
let contentType = 'application/x-www-form-urlencoded' | |||