Commit 020b57ec by 肖康

x

parent d15c6c0e
Showing with 181 additions and 148 deletions
......@@ -420,6 +420,10 @@ export const apis = {
/***取消订单**/
orderCancel: productionUrlApi + '/order/cancel',
/***历史浏览**/
getHistory: productionUrl + 'home/behavior/get_view_goods_history',
/**品牌分类**/
brandList: productionUrl + 'api/brandList',
/**品牌详细**/
......@@ -755,6 +759,10 @@ export const services = {
changeUserInfo(params) {
return axios.post(apis.changeUserInfo, params)
},
getHistory(params) {
return axios.post(apis.getHistory, params)
},
brandList(params) {
return axios.post(apis.brandList, params)
},
......
......@@ -47,6 +47,8 @@ const orderDetail = resolve => require(['@/views/user/orderDetail'], resolve);
const shipping = resolve => require(['@/views/user/shipping'], resolve);
const shiplist = resolve => require(['@/views/user/shiplist'], resolve);
const history = resolve => require(['@/views/history/history'], resolve);
const brand = resolve => require(['@/views/brand/brand'], resolve);
const brandList = resolve => require(['@/views/brand/brandList'], resolve);
const ranking = resolve => require(['@/views/rank/ranking'], resolve);
......@@ -363,6 +365,15 @@ const routes = [{
back: true
}
},
{
path: '/history',
component: history,
meta: {
title: '历史浏览',
back: true
}
},
{
path: '/brand',
component: brand,
......
import Vue from 'vue'
import {
services as Services
} from '../../../api/index'
var qs = require('qs');
import Util from '../../../util/index'
const state = {
loading: false,
}
const mutations = {
}
const actions = {
getHistory({commit}, payload) {
state.loading = true;
let params= Util.getParams({page_size:100,page:4})
Services.getHistory(params).then((res) => {
state.loading = false;
if (data.error_code == 0) {
} else {
state.loading = false;
}
}).catch(function (err) {
state.loading = false;
});
}
}
export default {
state,
actions,
mutations
}
\ No newline at end of file
......@@ -46,6 +46,7 @@ const actions = {
Services.sureSend(qs.stringify(params)).then((res) => {
state.loading = false;
Toast(res.data.err_msg)
setTimeout(()=>{
window.location.href=window.location.href.split("&status")[0]+'&status=10'
},1000)
......
......@@ -28,6 +28,7 @@ import orderDetail from './modules/user/orderDetail'
import shipping from './modules/user/shipping'
import address from './modules/user/address'
import history from './modules/history/history'
import brand from './modules/brand/brand'
import rank from './modules/rank/index'
import download from './modules/download/index'
......@@ -69,6 +70,7 @@ export default new Vuex.Store({
address,
userOrder,
orderDetail,
history,
brand,
rank,
download,
......
<template>
<section class="coupon">
<van-loading type="spinner" color="#000" class="loading-background" v-if="loading"/>
</section>
</template>
<script>
import Vue from 'vue';
import {mapState} from 'vuex'
import { Loading } from 'vant';
Vue.use(Loading);
export default {
name: 'history',
data() {
return {
}
},
computed: {
...mapState({
// loading: state => state.coupon.loading,
})
},
watch: {
},
created() {
this.getData()
},
methods: {
getData(){
this.$store.dispatch({
type: 'getHistory'
})
},
tabs(index){
},
},
components: {
}
}
</script>
<style scoped>
@import "../../assets/css/history/history.min.css";
</style>
\ No newline at end of file
......@@ -8,10 +8,11 @@
<van-count-down :time="orderDetailInfo.self_rest_time" format="还剩DD天HH时" />
</div>
</div>
<a class="t1-box wl" :href="'/h5/view/#/userShipping?order_id='+orderDetailInfo.order_id+'&order_sn='+orderDetailInfo.order_sn"
<a class="t1-box wl"
:href="'/h5/view/#/userShipping?order_id='+orderDetailInfo.order_id+'&order_sn='+orderDetailInfo.order_sn"
v-else-if="orderDetailInfo.status==7||orderDetailInfo.status==8||orderDetailInfo.status==10">
<img src="../../assets/images/user/wuliud.png" alt="猎芯网">
<div class="ordersta" v-if="wlInfo.info">{{wlInfo.info[0].AcceptStation}}</div>
<div class="ordersta" v-if="wlInfo">{{wlInfo.info[0].AcceptStation}}</div>
<i class="icon iconfont">&#xe67c;</i>
</a>
<div class="t1-box" v-else>
......@@ -49,8 +50,9 @@
</div>
<div class="t2-gro clr">
<span class="fl">优惠金额</span>
<span class="fr f-orange">{{orderDetailInfo.activity_price_format?orderDetailInfo.activity_price_format:orderDetailInfo.preferential_price_format}}</span>
<span
class="fr f-orange">{{orderDetailInfo.activity_price_format?orderDetailInfo.activity_price_format:orderDetailInfo.preferential_price_format}}</span>
</div>
<div class="t2-gro clr">
<span class="fl">应付金额</span>
......@@ -73,11 +75,14 @@
</div>
</div>
</div>
<div class="show-detail-btn" v-show="isShowMore" @click="isShowMore=!isShowMore">收起<i class="icon iconfont">&#xe61c;</i></div>
<div class="show-detail-btn" v-show="!isShowMore" @click="isShowMore=!isShowMore">展开<i class="icon iconfont">&#xe610;</i></div>
<div class="show-detail-btn" v-show="isShowMore" @click="isShowMore=!isShowMore">收起<i
class="icon iconfont">&#xe61c;</i></div>
<div class="show-detail-btn" v-show="!isShowMore" @click="isShowMore=!isShowMore">展开<i
class="icon iconfont">&#xe610;</i></div>
</div>
<div class="order-sec" v-if="orderDetailInfo.list">
<a class="oda-group" v-for="item in orderDetailInfo.list" :href="(item.goods_type==1||item.goods_type==2)?('/goods_'+item.goods_id+'.html'):('/item/'+item.goods_id+'.html')">
<a class="oda-group" v-for="item in orderDetailInfo.list"
:href="(item.goods_type==1||item.goods_type==2)?('/goods_'+item.goods_id+'.html'):('/item/'+item.goods_id+'.html')">
<div class="title-goods"><span>{{item.goods_name}}</span><i class="icon iconfont">&#xe67c;</i></div>
<div class="attrs">
<div class="group-trr clr">
......@@ -94,13 +99,15 @@
</div>
</div>
</a>
</div>
<div class="order-footer">
<div class="fl" v-if="orderDetailInfo.topay_amount_format">应付金额:<span>{{orderDetailInfo.topay_amount_format.substring(1)}}</span>
<font >{{orderDetailInfo.topay_amount_format.substring(0,1)!='$'?'元':'美元'}}</font>(含运费)
<div class="fl" v-if="orderDetailInfo.topay_amount_format">
应付金额:<span>{{orderDetailInfo.topay_amount_format.substring(1)}}</span>
<font>{{orderDetailInfo.topay_amount_format.substring(0,1)!='$'?'元':'美元'}}</font>(含运费)
</div>
<a class="fr" v-if="orderDetailInfo.status==2||orderDetailInfo.status==3" @click="nowPay(orderDetailInfo.order_id)">去支付</a>
<a class="fr" v-if="orderDetailInfo.status==2||orderDetailInfo.status==3"
@click="nowPay(orderDetailInfo.order_id)">去支付</a>
<a class="fr" v-if="orderDetailInfo.status==8" @click="sureSend(orderDetailInfo.order_id)">确认收货</a>
</div>
<van-loading type="spinner" color="#000" class="loading-background" v-if="loading" />
......@@ -127,7 +134,7 @@
return {
order_id: "",
status: "",
isShowMore:0
isShowMore: 0
}
},
computed: {
......@@ -140,34 +147,22 @@
}),
},
watch: {
$route(to, from) {
if (to.path == "/orderDetail" && to.query.status != from.query.status) {
this.getData()
}
},
},
created() {
this.order_id = this.$route.query.order_id;
this.status = this.$route.query.status;
this.$store.dispatch({
type: "getUserbase"
})
if (this.status == 7 || this.status == 8 || this.status == 10) {
this.$store.dispatch({
type: "shipping",
order_id: this.order_id
})
}
this.$store.dispatch({
type: "getOrderDetail",
order_id: this.order_id
})
this.getData()
},
methods: {
copy(order_sn) {
copy(order_sn) {
this.$nextTick(() => {
var copyobject = document.getElementById("domainxk");
copyobject.select();
......@@ -186,7 +181,7 @@
window.location.href = window.location.origin + "/v3/pay/online?id=" + order_id
},
//确认收货
//确认收货
sureSend(order_id) {
Dialog.confirm({
message: '您要确认收货吗?',
......@@ -205,6 +200,25 @@
});
},
getData(){
this.$store.dispatch({
type: "getUserbase"
})
if (this.status == 7 || this.status == 8 || this.status == 10) {
this.$store.dispatch({
type: "shipping",
order_id: this.order_id
})
}
this.$store.dispatch({
type: "getOrderDetail",
order_id: this.order_id
})
},
},
components: {
......
......@@ -5,7 +5,7 @@
<div class="fl c-6">订单编号</div>
<div class="fl"><span @click="copy(order_sn)">复制</span>{{order_sn}}</div>
<div class="fl c-6">快递公司</div>
<div class="fl">{{wlInfo.shipping_name}}</div>
<div class="fl" v-if="wlInfo">{{wlInfo.shipping_name}}</div>
</div>
<div class="ship-cp">
<div class="cp-t ">
......@@ -18,9 +18,9 @@
<p>{{userInfo.company_info.com_address}}</p>
</div>
</div>
<div class="wuliudanhao">快递单号:{{wlInfo.shipping_no}} <span @click="copy(wlInfo.shipping_no)">复制</span></div>
<div class="wuliudanhao" v-if="wlInfo">快递单号:{{wlInfo.shipping_no}} <span @click="copy(wlInfo.shipping_no)">复制</span></div>
</div>
<div class="ship-box">
<div class="ship-box" v-if="wlInfo">
<div class="wu-group " :class="{'act':index==0}" v-for="(item,index) in wlInfo.info">
<div class="time-gh">{{item.AcceptTime.substring(5,10)}}<span>{{item.AcceptTime.substring(11,16)}}</span></div>
<div class="g-te">
......
{"h":"90560ff6039f47ece920","c":{"58":true}}
\ No newline at end of file
{"h":"0f23f2a1a141f2369817","c":{"58":true}}
\ No newline at end of file
{"h":"df880c2eeb25edeebcf0","c":{"39":true}}
\ No newline at end of file
{"h":"f8705dc72c5f5a5f0609","c":{"58":true}}
\ No newline at end of file
{"h":"4dab0ce1cabb7ccf4a7a","c":{}}
\ No newline at end of file
{"h":"9a7cf76c603b636f2ffb","c":{"58":true}}
\ No newline at end of file
{"h":"ebaefe1774caea93caca","c":{"58":true}}
\ No newline at end of file
{"h":"485d0a79c85cf2abaca1","c":{"58":true}}
\ No newline at end of file
{"h":"2de744e89307503574fb","c":{}}
\ No newline at end of file
{"h":"833716da0b4658d04db9","c":{"58":true}}
\ No newline at end of file
{"h":"4d12cc17df296ff81a48","c":{"app":true}}
\ No newline at end of file
{"h":"0f3770463ad731f3bf67","c":{"58":true}}
\ No newline at end of file
{"h":"ce62125d9853f70b07e0","c":{"58":true}}
\ No newline at end of file
{"h":"d500ac3e3f27e4a6175c","c":{"58":true}}
\ No newline at end of file
{"h":"6aac0bcf4b7b0438aa20","c":{}}
\ No newline at end of file
{"h":"494ddff44839105ccb09","c":{"58":true}}
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
{"h":"9660a639e1649c0a98da","c":{"58":true}}
\ No newline at end of file
This diff could not be displayed because it is too large.
{"h":"d31691454701f5375446","c":{"app":true}}
\ No newline at end of file
This diff could not be displayed because it is too large.
{"h":"f60df0dad4bf2fcb5f47","c":{"58":true}}
\ No newline at end of file
{"h":"a8cf6edcd076898687fd","c":{"58":true}}
\ No newline at end of file
{"h":"3c32a72188fc52d55007","c":{"58":true}}
\ No newline at end of file
{"h":"61e66424d68ddd4c2b8a","c":{"58":true}}
\ No newline at end of file
{"h":"bf387ead14d53eac9a92","c":{"58":true}}
\ No newline at end of file
{"h":"7d028e8b46d74b398179","c":{"58":true}}
\ No newline at end of file
{"h":"906f2d95088eb37e70c6","c":{}}
\ No newline at end of file
This diff could not be displayed because it is too large.
{"h":"d4c6350b5e462498d9e8","c":{}}
\ No newline at end of file
This diff could not be displayed because it is too large.
{"h":"e304693d8349c0b3bc76","c":{"58":true}}
\ No newline at end of file
{"h":"d23be62dd51039985aa2","c":{"58":true}}
\ No newline at end of file
{"h":"e1489783f035c302307a","c":{"58":true}}
\ No newline at end of file
{"h":"ca95cae2ec2d515f2f0e","c":{"58":true}}
\ No newline at end of file
This diff could not be displayed because it is too large.
{"h":"06a3d6a757030d0e2c35","c":{"40":true}}
\ No newline at end of file
{"h":"edec13a2055674eacb7d","c":{"app":true}}
\ No newline at end of file
{"h":"18f552682ffc4bc41ed3","c":{"58":true}}
\ No newline at end of file
{"h":"5f410be7a6a4a4b93479","c":{"58":true}}
\ No newline at end of file
{"h":"b8511e0b81f8d69f501b","c":{"58":true}}
\ No newline at end of file
{"h":"cf8fe7c1452036ca41c1","c":{"58":true}}
\ No newline at end of file
{"h":"d34fc3c1d6c06f536672","c":{"40":true}}
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
{"h":"ca3898df29849695fa4f","c":{"39":true}}
\ No newline at end of file
{"h":"aa7a7819fb97096098c3","c":{"58":true}}
\ No newline at end of file
{"h":"c77d44f5fe1164ba7740","c":{"58":true}}
\ No newline at end of file
This diff could not be displayed because it is too large.
{"h":"37a5a87129319e1596fc","c":{"58":true}}
\ No newline at end of file
{"h":"0985fa6ece9889396536","c":{"22":true}}
\ No newline at end of file
{"h":"5bb2599fc53fde7629d3","c":{"58":true}}
\ No newline at end of file
This diff could not be displayed because it is too large.
{"h":"a975e87ff92d87e98380","c":{"58":true}}
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
{"h":"f054e524e36e2d8a32ca","c":{"40":true}}
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
{"h":"d470f0cb280a14045cf2","c":{"58":true}}
\ No newline at end of file
{"h":"85168a265641ff3c1f62","c":{"58":true}}
\ No newline at end of file
{"h":"9f09a2841c30d060ebab","c":{"58":true}}
\ No newline at end of file
{"h":"8c8574fa01e7c4118c12","c":{"58":true}}
\ No newline at end of file
{"h":"66a9bf04a271380cee45","c":{"39":true}}
\ No newline at end of file
{"h":"b8517fa04e4d6f38ad83","c":{"40":true}}
\ No newline at end of file
{"h":"891780dc1e825595b8a4","c":{"58":true}}
\ No newline at end of file
{"h":"fe6cfa14b61ebd2a28e5","c":{"39":true}}
\ No newline at end of file
{"h":"bd081fecba31d420dd82","c":{"39":true}}
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
{"h":"534c708b042069227635","c":{"58":true}}
\ No newline at end of file
{"h":"b6f90d89dd192c93f19f","c":{"58":true}}
\ No newline at end of file
This diff could not be displayed because it is too large.
{"h":"b56844ea06b5d20de3ac","c":{"58":true}}
\ No newline at end of file
This diff could not be displayed because it is too large.
{"h":"7b46994cbc46aedc3e94","c":{"58":true}}
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
{"h":"0f44c495d40e549bb3c0","c":{"22":true}}
\ No newline at end of file
This diff could not be displayed because it is too large.
{"h":"155dc8195cf542d7e503","c":{"58":true}}
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
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 sign in to comment