Commit 28abc381 authored by lijiongliang's avatar lijiongliang

流程修改

parent 37156ead
const baseUrl = 'https://jduniapp.uzosp.com/test-api'; const baseUrl = 'https://jduniapp.uzosp.com//test-api';
// const baseUrl = 'http://64qycp.natappfree.cc'; // const baseUrl = 'http://nrucci.natappfree.cc';
const httpRequest = (opts, data) => { const httpRequest = (opts, data) => {
let httpDefaultOpts = { let httpDefaultOpts = {
url: baseUrl + opts.url, url: baseUrl + opts.url,
...@@ -64,7 +64,7 @@ const httpTokenRequest = (opts, data) => { ...@@ -64,7 +64,7 @@ const httpTokenRequest = (opts, data) => {
if(res[1].data.code == 401){ if(res[1].data.code == 401){
uni.removeStorageSync('userToken') uni.removeStorageSync('userToken')
uni.navigateTo({ uni.navigateTo({
url:"/pages/binding/index?failure=401" url:"/pages/login/index/index?failure=401"
}) })
return; return;
} }
......
...@@ -69,6 +69,12 @@ ...@@ -69,6 +69,12 @@
"style": { "style": {
"navigationBarTitleText": "获取挪车码" "navigationBarTitleText": "获取挪车码"
} }
},
{
"path": "pages/index/getCoupon",
"style": {
"navigationBarTitleText": "领取优惠券"
}
} }
] ]
}, },
...@@ -199,6 +205,12 @@ ...@@ -199,6 +205,12 @@
"navigationBarTitleText": "我的订单" "navigationBarTitleText": "我的订单"
} }
}, },
{
"path": "pages/personal/myJdOrder",
"style": {
"navigationBarTitleText": "我的订单"
}
},
{ {
"path": "pages/personal/orderDetail", "path": "pages/personal/orderDetail",
"style": { "style": {
......
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
list5: [], list5: [],
//免费挪车码 //免费挪车码
freeCode: {}, freeCode: {},
carList:[], // 爱车列表
}; };
}, },
methods: { methods: {
...@@ -79,11 +80,21 @@ ...@@ -79,11 +80,21 @@
let that = this let that = this
let token = uni.getStorageSync('userToken'); let token = uni.getStorageSync('userToken');
if (!token) { if (!token) {
uni.navigateTo({ uni.showModal({
url: '/pages/binding/index?url=/pages/main&index=0' title: "未绑定账号",
}) content: "您没有绑定京东账号,请绑定后再领取",
success:function(res){
if (res.confirm) {
that.goJdLogin()
}
}
});
// uni.navigateTo({
// url: '/pages/binding/index?url=/pages/main&index=0'
// })
return; return;
} }
let opts = { let opts = {
url: '/app/user/info', url: '/app/user/info',
method: 'get' method: 'get'
...@@ -91,33 +102,25 @@ ...@@ -91,33 +102,25 @@
that.http.httpTokenRequest(opts, {}).then(res => { that.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
let freeMoveFlag = res.data.data.freeMoveFlag let freeMoveFlag = res.data.data.freeMoveFlag
let bindPin = res.data.data.bindPin
if(!bindPin) { if (freeMoveFlag) {
uni.showModal({ uni.showToast({
title: "未绑定账号", title: "您的免费领取次数已用完",
content: "您没有绑定京东账号,请绑定后再领取", icon: 'none',
success:function(res){ duration: 2000,
if (res.confirm) { success:function(){
that.goJdLogin()
}
} }
}); });
// if (freeMoveFlag) { } else {
// uni.showToast({ //跳转到领取优惠卷页面
// title: "您的免费领取次数已用完", // uni.navigateTo({
// icon: 'none', // url: '/pagesA/pages/index/getPrice?orderId=' + this.freeCode.id
// duration: 2000, // });
// success:function(){ uni.showLoading({
title: '加载中'
// } });
// }); this.getCarList()
// } else {
// //跳转到领取优惠卷页面
// uni.navigateTo({
// url: '/pagesA/pages/index/getPrice?orderId=' + this.freeCode.id
// });
// }
} }
} }
}) })
...@@ -165,7 +168,25 @@ ...@@ -165,7 +168,25 @@
uni.navigateTo({ uni.navigateTo({
url: link url: link
}) })
} },
// 获取爱车列表
getCarList(){
let opts = { url: '/app/vehicleAdmin/list', method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.statusCode == 200) {
this.carList = res.data
uni.hideLoading()
if(res.data.length == 0){
let url = "car.m.jd.com/h5/list.html?source=managerprocedure"
util.redirectToH5({page:url})
}else{
uni.navigateTo({
url: '/pagesA/pages/index/getPrice?orderId=' + this.freeCode.id
});
}
}
})
},
}, },
created() { created() {
this.getMoveCode() this.getMoveCode()
......
...@@ -17,9 +17,7 @@ export default { ...@@ -17,9 +17,7 @@ export default {
onLoad: function (options = {}) { onLoad: function (options = {}) {
let { h5_url = '' } = options; let { h5_url = '' } = options;
util.h5Init(options); util.h5Init(options);
this.setData({ this.h5_url = h5_url
h5_url
});
util.setCustomNavigation(); util.setCustomNavigation();
this._genToken(); this._genToken();
...@@ -42,9 +40,7 @@ export default { ...@@ -42,9 +40,7 @@ export default {
let { isSuccess, err_code, url, tokenkey, err_msg } = res; let { isSuccess, err_code, url, tokenkey, err_msg } = res;
if (isSuccess && !err_code) { if (isSuccess && !err_code) {
this.setData({ this.url = `${url}?to=${h5_url}&tokenkey=${tokenkey}`
url: `${url}?to=${h5_url}&tokenkey=${tokenkey}`
});
} else { } else {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
......
This diff is collapsed.
...@@ -60,9 +60,12 @@ export default { ...@@ -60,9 +60,12 @@ export default {
goUrl(vo) { goUrl(vo) {
let token = uni.getStorageSync('userToken'); let token = uni.getStorageSync('userToken');
if(!token){ if(!token){
uni.navigateTo({ // uni.navigateTo({
url: '/pages/binding/index?url=/pages/main&index=1' // url: '/pages/binding/index?url=/pages/main&index=1'
}) // })
uni.navigateTo({
url: '/pages/login/index/index'
})
return; return;
} }
const that = this const that = this
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="ps__shop"> <!-- <div class="ps__shop">
<div class="shop__tab"> <div class="shop__tab">
<div class="tab__top"> <div class="tab__top">
<span>商品订单</span> <span>商品订单</span>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
<div class="ps__list"> <div class="ps__list">
<div class="list__item" v-for="(vo,inx) in menu" :key="inx" @click="goUrl(vo)"> <div class="list__item" v-for="(vo,inx) in menu" :key="inx" @click="goUrl(vo)">
...@@ -68,6 +68,10 @@ export default { ...@@ -68,6 +68,10 @@ export default {
show:false, show:false,
logoutFlag : true, logoutFlag : true,
menu: [{ menu: [{
icon: require("@/static/my/my01.png"),
title: "我的订单",
url: "/pagesD/pages/personal/myJdOrder"
},{
icon: require("@/static/my/my12.png"), icon: require("@/static/my/my12.png"),
title: "我的地址", title: "我的地址",
url: "/pagesD/pages/personal/myAddress" url: "/pagesD/pages/personal/myAddress"
...@@ -140,9 +144,12 @@ export default { ...@@ -140,9 +144,12 @@ export default {
goOrder(current) { goOrder(current) {
let token = uni.getStorageSync('userToken'); let token = uni.getStorageSync('userToken');
if(!token){ if(!token){
uni.navigateTo({ // uni.navigateTo({
url: '/pages/binding/index?url=/pages/main&index=4' // url: '/pages/binding/index?url=/pages/main&index=4'
}) // })
uni.navigateTo({
url: '/pages/login/index/index'
})
return; return;
} }
uni.navigateTo({ uni.navigateTo({
...@@ -152,9 +159,12 @@ export default { ...@@ -152,9 +159,12 @@ export default {
goUrl(vo) { goUrl(vo) {
let token = uni.getStorageSync('userToken'); let token = uni.getStorageSync('userToken');
if(!token){ if(!token){
uni.navigateTo({ // uni.navigateTo({
url: '/pages/binding/index?url=/pages/main&index=4' // url: '/pages/binding/index?url=/pages/main&index=4'
}) // })
uni.navigateTo({
url: '/pages/login/index/index'
})
return; return;
} }
if (vo.title != '微信通知设置') { if (vo.title != '微信通知设置') {
...@@ -169,9 +179,12 @@ export default { ...@@ -169,9 +179,12 @@ export default {
editInfo() { editInfo() {
let token = uni.getStorageSync('userToken'); let token = uni.getStorageSync('userToken');
if(!token){ if(!token){
uni.navigateTo({ // uni.navigateTo({
url: '/pages/binding/index?url=/pages/main&index=4' // url: '/pages/binding/index?url=/pages/main&index=4'
}) // })
uni.navigateTo({
url: '/pages/login/index/index'
})
return; return;
} }
uni.navigateTo({ uni.navigateTo({
...@@ -304,6 +317,7 @@ export default { ...@@ -304,6 +317,7 @@ export default {
background: url('http://euzhi.com/my15.png') no-repeat; background: url('http://euzhi.com/my15.png') no-repeat;
background-size: cover; background-size: cover;
z-index: 999; z-index: 999;
padding-bottom:50rpx;
.ps__title { .ps__title {
font-size: 40rpx; font-size: 40rpx;
...@@ -429,7 +443,9 @@ export default { ...@@ -429,7 +443,9 @@ export default {
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0rpx 0rpx 28rpx 1rpx rgba(232, 232, 232, 0.16); box-shadow: 0rpx 0rpx 28rpx 1rpx rgba(232, 232, 232, 0.16);
border-radius: 20rpx; border-radius: 20rpx;
margin-top: 20rpx; // margin-top: 20rpx;
position: relative;
top: -20rpx;
.list__item { .list__item {
position: relative; position: relative;
...@@ -472,7 +488,7 @@ export default { ...@@ -472,7 +488,7 @@ export default {
background: rgba(0, 0, 0, .1); background: rgba(0, 0, 0, .1);
} }
.list__item:nth-of-type(2) { .list__item:nth-of-type(3) {
.list__left { .list__left {
image { image {
width: 29rpx; width: 29rpx;
...@@ -482,7 +498,7 @@ export default { ...@@ -482,7 +498,7 @@ export default {
} }
} }
.list__item:nth-of-type(3) { .list__item:nth-of-type(4) {
.list__left { .list__left {
image { image {
width: 28rpx; width: 28rpx;
...@@ -492,7 +508,7 @@ export default { ...@@ -492,7 +508,7 @@ export default {
} }
} }
.list__item:nth-of-type(4) { .list__item:nth-of-type(5) {
.list__left { .list__left {
image { image {
width: 28rpx; width: 28rpx;
...@@ -501,6 +517,16 @@ export default { ...@@ -501,6 +517,16 @@ export default {
} }
} }
} }
.list__item:last-child {
.list__left {
image {
width: 28rpx;
height: 28rpx;
margin-right: 33rpx;
}
}
}
.list__item:nth-last-of-type(1)::before { .list__item:nth-last-of-type(1)::before {
content: ''; content: '';
......
<template>
<!-- 我的订单 -->
<view class="get-coupon">
<view class="box">
<view class="title">订单信息请前往京东查看</view>
<image src="../../../static/index/box.png"></image>
<view class="btn" @click="getCoupon">
点击领取优惠券
</view>
</view>
</view>
</template>
<script>
export default {
data(){
return{
}
},
methods:{
getCoupon(){
uni.showToast({
title: "领取成功!",
icon: 'none',
});
}
}
}
</script>
<style lang="scss" scoped>
.get-coupon{
width:100%;height:100vh;
display: flex;
align-items: center;
justify-content: center;
.box{
position: relative;
top:-120rpx;
text-align: center;
.title{
font-size:36rpx;
font-weight: bold;
}
image{
width:400rpx;height:300rpx;
margin-top:80rpx;
}
.btn{
width:660rpx;
line-height:80rpx;
margin:50rpx auto 0;
text-align: center;
color:#fff;
font-size: 32rpx;
border-radius:50rpx;
background: linear-gradient(to right, #E2241B , #E14A1B);
}
}
}
</style>
\ No newline at end of file
This diff is collapsed.
...@@ -14,14 +14,22 @@ ...@@ -14,14 +14,22 @@
<image src="@/static/move-car/love-car6.png" /> <image src="@/static/move-car/love-car6.png" />
</div> </div>
<div class="item__title" @click="goGetPrice(vo.id)"> <div class="item__title" @click="goGetPrice(vo.id)">
{{vo.carNo}} <view class="title">
{{vo.brand}}
</view>
<view class="type">
{{vo.carModel}}
</view>
<view class="route">
行驶里程 {{vo.mileage}}KM
</view>
</div> </div>
<div class="item__edit" @click="editCar(vo.id)"> <!-- <div class="item__edit" @click="editCar(vo.id)">
<image src="@/static/move-car/love-car2.png" /> <image src="@/static/move-car/love-car2.png" />
</div> </div>
<div class="item__del" @click="deleteModal(vo.id)"> <div class="item__del" @click="deleteModal(vo.id)">
<image src="@/static/move-car/love-car3.png" /> <image src="@/static/move-car/love-car3.png" />
</div> </div> -->
</div> </div>
</div> </div>
<div> <div>
...@@ -37,6 +45,7 @@ ...@@ -37,6 +45,7 @@
</template> </template>
<script> <script>
import util from '@/pages/login/util.js';
export default { export default {
data() { data() {
return { return {
...@@ -57,9 +66,11 @@ export default { ...@@ -57,9 +66,11 @@ export default {
}); });
}, },
addCar() { addCar() {
uni.navigateTo({ // uni.navigateTo({
url: '/pagesB/pages/move-car/addCar' // url: '/pagesB/pages/move-car/addCar'
}) // })
let url = "car.m.jd.com/h5/list.html?source=managerprocedure"
util.redirectToH5({page:url})
}, },
editCar(id) { editCar(id) {
uni.navigateTo({ uni.navigateTo({
...@@ -94,10 +105,14 @@ export default { ...@@ -94,10 +105,14 @@ export default {
this.deleteShow = false this.deleteShow = false
}, },
getCarList(){ getCarList(){
uni.showLoading({
title: '加载中'
});
let opts = { url: '/app/vehicleAdmin/list', method: 'get' }; let opts = { url: '/app/vehicleAdmin/list', method: 'get' };
this.http.httpTokenRequest(opts, {}).then(res => { this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.statusCode == 200) {
this.carList = res.data.rows uni.hideLoading()
this.carList = res.data
} }
}) })
}, },
...@@ -155,14 +170,14 @@ export default { ...@@ -155,14 +170,14 @@ export default {
.love__item { .love__item {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0rpx 0rpx 28rpx 1rpx rgba(232, 232, 232, 0.2); box-shadow: 0rpx 0rpx 28rpx 1rpx rgba(232, 232, 232, 0.2);
border-radius: 20rpx; border-radius: 20rpx;
padding: 30rpx; padding:20rpx 30rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
.itme__img { .itme__img {
margin-right:30rpx;
image { image {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
...@@ -170,12 +185,22 @@ export default { ...@@ -170,12 +185,22 @@ export default {
} }
.item__title { .item__title {
font-size: 32rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
line-height: 48rpx; line-height: 48rpx;
width: 350rpx; // width: 350rpx;
.title{
font-size: 34rpx;
font-weight: bold;
}
.type{
color: #666666;
font-size: 28rpx;
}
.route{
font-size: 30rpx;
}
} }
.item__edit { .item__edit {
......
...@@ -45,9 +45,12 @@ export default { ...@@ -45,9 +45,12 @@ export default {
pay(){ pay(){
let token = uni.getStorageSync('userToken'); let token = uni.getStorageSync('userToken');
if(!token){ if(!token){
uni.navigateTo({ // uni.navigateTo({
url: '/pages/binding/index?url=/pagesC/pages/shop/detail&id=' + this.id // url: '/pages/binding/index?url=/pagesC/pages/shop/detail&id=' + this.id
}) // })
uni.navigateTo({
url: '/pages/login/index/index'
})
return; return;
} }
uni.navigateTo({ uni.navigateTo({
......
<template>
<!-- 我的订单 -->
<view class="my-jd-order">
<view class="box">
<text>订单信息请前往京东查看</text>
<view class="btn">
前往京东查看
</view>
</view>
</view>
</template>
<script>
</script>
<style lang="scss" scoped>
.my-jd-order{
width:100%;height:100vh;
display: flex;
align-items: center;
justify-content: center;
.box{
position: relative;
top:-120rpx;
text-align: center;
text{
font-size:36rpx;
font-weight: bold;
}
.btn{
width:660rpx;
line-height:80rpx;
margin:50rpx auto 0;
text-align: center;
color:#fff;
font-size: 32rpx;
border-radius:50rpx;
background: linear-gradient(to right, #E2241B , #E14A1B);
}
}
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment