优化代码
This commit is contained in:
parent
dec1fbbb39
commit
f285d03a39
|
@ -53,7 +53,7 @@ export default {
|
|||
},
|
||||
changeCount(e, id) {
|
||||
this.$emit("changeNumber", e, id);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -38,16 +38,20 @@ export default {
|
|||
list: {
|
||||
url: "/wxapp/Useraddress/getalladdress",
|
||||
showLoading: true,
|
||||
auth: true,
|
||||
},
|
||||
edit: {
|
||||
url: "/wxapp/Useraddress/applyaddress"
|
||||
url: "/wxapp/Useraddress/applyaddress",
|
||||
auth: true,
|
||||
},
|
||||
detail: {
|
||||
url: "/wxapp/Useraddress/addressinfo",
|
||||
showLoading: true,
|
||||
auth: true,
|
||||
},
|
||||
delete: {
|
||||
url: "/wxapp/Useraddress/deleteaddress"
|
||||
url: "/wxapp/Useraddress/deleteaddress",
|
||||
auth: true,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -55,23 +59,29 @@ export default {
|
|||
cart: {
|
||||
count: {
|
||||
url: "/wxapp/order/myshoppingcarcount",
|
||||
auth: true,
|
||||
},
|
||||
toCart: {
|
||||
url: "/wxapp/order/addshoppingcar",
|
||||
showLoading: true,
|
||||
auth: true,
|
||||
},
|
||||
add: {
|
||||
url: "/wxapp/order/shoppingcarpush",
|
||||
auth: true,
|
||||
},
|
||||
sub: {
|
||||
url: "/wxapp/order/shoppingcarsend",
|
||||
auth: true,
|
||||
},
|
||||
delete: {
|
||||
url: "/wxapp/order/deleteshoppingcar",
|
||||
auth: true,
|
||||
},
|
||||
list: {
|
||||
url: "/wxapp/order/myshoppingcar",
|
||||
showLoading: true,
|
||||
auth: true,
|
||||
},
|
||||
},
|
||||
insurance: {
|
||||
|
@ -96,14 +106,17 @@ export default {
|
|||
project: {
|
||||
url: "/wxapp/project/applyinfo",
|
||||
showLoading: true,
|
||||
auth: true,
|
||||
},
|
||||
business: {
|
||||
url: "/wxapp/project/applyinfob",
|
||||
showLoading: true,
|
||||
auth: true,
|
||||
},
|
||||
afterMarket: {
|
||||
url: "/wxapp/project/applyguarantee",
|
||||
showLoading: true,
|
||||
auth: true,
|
||||
},
|
||||
distribution: {
|
||||
config: {
|
||||
|
@ -113,10 +126,12 @@ export default {
|
|||
url: "/wxapp/index/getallcar"
|
||||
},
|
||||
submit: {
|
||||
url: "/wxapp/project/distribution"
|
||||
url: "/wxapp/project/distribution",
|
||||
auth: true,
|
||||
},
|
||||
pay: {
|
||||
url: "/wxapp/wxpay/payorderd"
|
||||
url: "/wxapp/wxpay/payorderd",
|
||||
auth: true,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -124,33 +139,40 @@ export default {
|
|||
pay: {
|
||||
url: "/wxapp/wxpay/payordera",
|
||||
showLoading: true,
|
||||
auth: true,
|
||||
},
|
||||
createOrder: {
|
||||
url: "/wxapp/order/submitordera",
|
||||
auth: true,
|
||||
},
|
||||
createDemandOrder: {
|
||||
url: "/wxapp/orderb/addorder"
|
||||
url: "/wxapp/orderb/addorder",
|
||||
auth: true,
|
||||
},
|
||||
list: {
|
||||
// 购买订单
|
||||
t1: {
|
||||
url: "/wxapp/order/getmyorder",
|
||||
showLoading: true,
|
||||
auth: true,
|
||||
},
|
||||
// 报/议价订单
|
||||
t2: {
|
||||
url: "/wxapp/orderb/getmyorderblist",
|
||||
showLoading: true,
|
||||
auth: true,
|
||||
},
|
||||
// 货运订单
|
||||
t3: {
|
||||
url: "/wxapp/project/freightorder",
|
||||
showLoading: true,
|
||||
auth: true,
|
||||
},
|
||||
// 退款订单
|
||||
t4: {
|
||||
url: "/wxapp/order/getmyorder",
|
||||
showLoading: true,
|
||||
auth: true,
|
||||
},
|
||||
},
|
||||
detail: {
|
||||
|
@ -158,6 +180,7 @@ export default {
|
|||
t1: {
|
||||
url: "/user/workerorderb/orderinfo",
|
||||
showLoading: true,
|
||||
auth: true,
|
||||
},
|
||||
// 报/议价订单
|
||||
t2: {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
</view>
|
||||
<view class="immerse-main" :style="{ paddingTop: safePt + utils.rpx2px(20) + 'px' }">
|
||||
<view class="head-title">
|
||||
<text class="title">熊熊建材安装<text class="color">师傅版</text></text>
|
||||
<text class="title">熊熊建材安装<text class="color">用户版</text></text>
|
||||
<text class="desc">将好师傅交给用户让好服务走进万家</text>
|
||||
</view>
|
||||
<view class="section">
|
||||
|
|
|
@ -57,11 +57,14 @@ export default {
|
|||
...mapState({
|
||||
indexCateId: (state) => state.system.indexCateId,
|
||||
cartCount: (state) => state.cart.count,
|
||||
isLogin: (state) => state.user.token.length > 0,
|
||||
}),
|
||||
},
|
||||
async onLoad() {
|
||||
let pageConfig = getApp().globalData.pageConfig;
|
||||
this.$store.dispatch("cart/updateCount");
|
||||
if (this.isLogin) {
|
||||
this.$store.dispatch("cart/updateCount");
|
||||
}
|
||||
|
||||
let x = pageConfig.windowWidth - this.$utils.rpx2px(94);
|
||||
let y = pageConfig.windowHeight - this.$utils.rpx2px(94);
|
||||
|
|
|
@ -48,12 +48,15 @@ export default {
|
|||
computed: {
|
||||
...mapState({
|
||||
cartCount: (state) => state.cart.count,
|
||||
isLogin: (state) => state.user.token.length > 0,
|
||||
}),
|
||||
},
|
||||
onLoad(e) {
|
||||
this.pageConfig = getApp().globalData.pageConfig;
|
||||
this.$store.dispatch("cart/updateCount");
|
||||
this.$store.dispatch("cart/briefCart");
|
||||
if (this.isLogin) {
|
||||
this.$store.dispatch("cart/updateCount");
|
||||
this.$store.dispatch("cart/briefCart");
|
||||
}
|
||||
|
||||
if (!e.id) {
|
||||
this.$utils.toast("参数错误");
|
||||
|
|
|
@ -4,7 +4,10 @@ export default {
|
|||
namespaced: true,
|
||||
state: {
|
||||
count: 0,
|
||||
briefCart: {},
|
||||
briefCart: {
|
||||
ids: [],
|
||||
list: {},
|
||||
},
|
||||
},
|
||||
getters: {},
|
||||
mutations: {
|
||||
|
|
Loading…
Reference in New Issue