Browse Source

提交

master
chenkainan 5 months ago
parent
commit
0865e99c87
  1. 7
      pages/index/index.vue
  2. 14
      subPackages/order/detail.vue
  3. 34
      subPackages/order/gwcOrder.vue
  4. 36
      subPackages/order/trades.vue
  5. 26
      subPackages/user/gwc.vue
  6. 4
      subPackages/user/myAddressAdd.vue

7
pages/index/index.vue

@ -184,6 +184,13 @@
this.shiguang = res.data[0]
}
})
this.Post({
mobile: '18639595995',
captcha: '123456'
}, '/api/user/mobilelogin').then(res => {
this.$store.commit('changeUserInfo', res.data.userinfo);
})
},
// 234
gotoUrlNew(item) {

14
subPackages/order/detail.vue

@ -134,17 +134,19 @@
</view>
<!-- 邮寄自提订单 -->
<view v-if="info.order_child[0].goods_genre == 'pgoods'">
<view class="shipping-address" v-if="info.order_child[0].consignee_id">
<!-- v-if="info.order_child[0].goods_genre == 'pgoods'" -->
<view>
<!-- v-if="info.order_child[0].consignee_id" -->
<view class="shipping-address">
收货地址
<view>{{info.order_child[0].consignee.name}} {{info.order_child[0].consignee.tel}}</view>
<view class="text-overflowRows">{{info.order_child[0].consignee.address}}</view>
<view>{{info.order_child[0].data[0].consignee.name}} {{info.order_child[0].data[0].consignee.tel}}</view>
<view class="text-overflowRows">{{info.order_child[0].data[0].consignee.address}}</view>
</view>
<!-- 产品详情 -->
<view class="pgoods-detail">
商家名称
<view class="pgoods-product" v-for="(item,index) in info.order_child" :key="index" :style="{paddingBottom: item.status == 'WAIT_COMMENT' ? '107rpx' : ''}">
{{info.order_child[0].data[0].list_merchant_name}}
<view class="pgoods-product" v-for="(item,index) in info.order_child[0].data" :key="index" :style="{paddingBottom: item.status == 'WAIT_COMMENT' ? '107rpx' : ''}">
<image :src="showImg(item.specifications_image)" mode="aspectFill" class="product-img"></image>
<view class="product-content flex-column">
<view class="product-title">{{item.goods_title}}</view>

34
subPackages/order/gwcOrder.vue

@ -1,8 +1,8 @@
<template>
<view class="bg" v-if="info">
<view class="address box" @click="changeAddressPopup('open', '', key)" v-if="!contacts && info[0].is_post == 1">
<image src="https://kunshan.xmainc.com/uploads/20230105/870e4ce1d5a661986d8a54e9f3c2b0b3.png" mode="aspectFill"></image>
<view class="text">添加邮寄地址</view>
<!-- <image src="https://kunshan.xmainc.com/uploads/20230105/870e4ce1d5a661986d8a54e9f3c2b0b3.png" mode="aspectFill"></image> -->
<view class="text">+ 添加邮寄地址</view>
</view>
<view class="contacts box" v-if="contacts && info[0].is_post == 1">
<view class="contacts-left">
@ -12,7 +12,7 @@
</view>
<view class="adds text-overflowRows">{{ contacts.province_text + contacts.city_text + contacts.district_text + contacts.detail_addr }}</view>
</view>
<image @click="changeAddressPopup('open', '', key)" src="https://kunshan.xmainc.com/uploads/20230105/327cfda2cc308fc01e34f40498dbe9b6.png" mode="aspectFill"></image>
<image @click="changeAddressPopup('open', '', key)" src="https://static.ticket.sz-trip.com/taizhou/images/detail/edit.png" mode="aspectFill"></image>
</view>
<view class="commodity box">
<view class="merchant-name">
@ -20,19 +20,19 @@
</view>
<view style="margin-top: 20rpx;" class="" v-for="(item,index) in info" :key="item.id">
<view class="goods">
<image class="img" :src="showImg(item.goods_image)" mode=""></image>
<image class="img" :src="showImg(item.specifications_image)" mode=""></image>
<view class="" style="display: flex;flex-direction: column;justify-content: space-between;">
<view class="">
{{item.good_name}}
</view>
<view>
<!-- <view>
<span class="info-tags" v-for="(itemT,indexT) in item.goods_new_tag.split(',').splice(0,2)" :key="indexT">{{itemT}}</span>
</view>
</view> -->
</view>
</view>
<view class="sku-info">
<view class="title">
<view class="text-overflowRows" style="font-size: 31rpx;font-weight: 500;color: #000;">{{ item.Specifications_name }}</view>
<view class="text-overflowRows" style="font-size: 31rpx;font-weight: 500;color: #000;">{{ item.specifications_name }}</view>
<view class="price-list">
<view class="price-r">{{ item.Specifications_money / 100 }}</view>
<!-- <view class="price-g">¥{{ info.skuInfo.price / 100 }}</view> -->
@ -200,10 +200,10 @@ export default {
});
},
getPost() {
if (this.info[0].is_post == 0) {
if (this.info[0].is_post == 0 || !this.contacts) {
return;
}
console.log(this.info);
console.log(this.info,55555555,this.contacts);
this.flag = false;
let data = this.info.map((item) => {
return { specifications_id:item.specifications_id, num: item.num, consignee_id: this.contacts.id }
@ -516,11 +516,11 @@ view {
font-size: 32rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 500;
color: #fc5109;
color: #FC5109;
&:before {
content: '¥';
display: inline-block;
color: #fc5109;
color: #FC5109;
font-size: 24rpx;
}
}
@ -568,7 +568,7 @@ view {
.btn {
width: 250rpx;
height: 80rpx;
background: linear-gradient(270deg, #fc5109 0%, #fdc43a 100%);
background: #60989E;
border-radius: 44rpx;
text-align: center;
line-height: 80rpx;
@ -579,7 +579,7 @@ view {
}
.price-box {
display: flex;
align-items: center;
align-items: baseline;
.text {
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
@ -591,17 +591,17 @@ view {
font-size: 48rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #fc5109;
color: #FC5109;
&:before {
content: '¥';
display: inline-block;
color: #fc5109;
color: #FC5109;
font-size: 24rpx;
}
}
.post {
margin-left: 15rpx;
color: #fc5109;
color: #FC5109;
font-size: 24rpx;
}
}
@ -611,7 +611,7 @@ view {
align-items: center;
justify-content: space-between;
image {
width: 31rpx;
width: 36rpx;
height: 36rpx;
}
.contacts-left {

36
subPackages/order/trades.vue

@ -27,11 +27,11 @@
<view v-for="(item, key) in list" :key="item.id" class="trade-items" v-if="showItem(item)"
@click="() => choseType(item)">
<view class="trade-item-head">
<view class="trade-item-head-tid">订单号:{{ item.order_id }}</view>
<view class="trade-item-head-state">{{ item.status_text }}</view>
<view class="trade-item-head-tid">订单号:{{ item.f_order_id }}</view>
<view class="trade-item-head-state">{{ item.f_status_text }}</view>
</view>
<view class="trade-item-pros">
<view class="trade-item-pro" v-for="(pro, proIndex) in item.order_child" :key="pro.child_id">
<view class="trade-item-pro" v-for="(pro, proIndex) in item.data" :key="pro.child_id">
<view class="trade-item-pro-img" v-if="pro.specifications_image">
<image :src="showImg(pro.specifications_image)" mode="aspectFill"></image>
</view>
@ -47,15 +47,15 @@
</view>
<view class="trade-item-info">
合计
<text>{{ item.pay_money / 100 }}</text>
<text>{{ item.f_pay_money / 100 }}</text>
</view>
<view class="trade-item-btns">
<view @click.stop="() => refund(item.order_id, key)" v-if="item.status == 'PAYMENT_SUCCESSFULLY'">
<view @click.stop="() => refund(item.f_order_id, key)" v-if="item.f_status == 'PAYMENT_SUCCESSFULLY'">
申请退款</view>
<view @click.stop="() => closeOrder(item.order_id, item)" v-if="item.status == 'WAIT_PAYMENT'">关闭订单
<view @click.stop="() => closeOrder(item.f_order_id, item)" v-if="item.f_status == 'WAIT_PAYMENT'">关闭订单
</view>
<view @click.stop="confirmpost(item.order_id, key)" v-if="item.postFlag">确认收货</view>
<view class="pay-btn" @click.stop="setOrderId(item.order_id)" v-if="item.status == 'WAIT_PAYMENT'">
<view @click.stop="confirmpost(item.f_order_id, key)" v-if="item.postFlag">确认收货</view>
<view class="pay-btn" @click.stop="setOrderId(item.f_order_id)" v-if="item.f_status == 'WAIT_PAYMENT'">
立即支付</view>
</view>
</view>
@ -318,7 +318,23 @@
'待发货' ? 2 : '')
};
this.Post(data, '/api/order/orderList').then(res => {
this.list = [...this.list, ...res.data]
let arr = res.data;
arr.forEach(item => {
item.order_child.forEach((itemX, index) => {
if (index > 0) {
item.order_child[0].data = [...item.order_child[0].data, ...itemX
.data
];
} else {
itemX.f_order_id = item.order_id;
itemX.f_status_text = item.status_text;
itemX.f_status = item.status;
itemX.f_pay_money = item.pay_money;
console.log('1',itemX);
this.list.push(itemX);
}
});
});
if (res.data.length < 5) {
this.finished = true;
}
@ -343,7 +359,7 @@
},
choseType(item) {
uni.navigateTo({
url: '/subPackages/order/detail?id=' + item.order_id
url: '/subPackages/order/detail?id=' + item.f_order_id
});
},
}

26
subPackages/user/gwc.vue

@ -3,20 +3,20 @@
<view class="guanli" v-if="list && list.length>0" @click="guanli">{{operate}}</view>
<view v-for="(item,index) in list" :key="index">
<view class="goodBox" v-if="item.data && item.data.length > 0 ">
<view class="title" v-if="item.data.some(v => v.flag === 1)">{{item.merchant_name}} ></view>
<view class="title" v-if="item.data.some(v => v.flag == 1)">{{item.merchant_name}} ></view>
<view class="goodItem" v-for="(goodItem,goodIndex) in item.data" :key="goodIndex"
v-if="goodItem.flag != 0">
<view class="noSelect" v-if="!goodItem.is_select" @click="changeSelect(goodItem)"></view>
<view class="selectBox flex-around" v-else @click="changeSelect(goodItem)">
<img src="https://static.ticket.sz-trip.com/cgc/images/order/dui.png">
</view>
<image :src="showImg(goodItem.Specifications_image)" mode="aspectFill"
<image :src="showImg(goodItem.specifications_image)" mode="aspectFill"
@click="goDetails(goodItem.good_id)"></image>
<view class="contentBox">
<view class="title text-overflow">{{goodItem.good_name}}</view>
<view class="subTitle text-overflow">{{goodItem.Specifications_name}}</view>
<view class="priceBox flex-between">
<view class="price">{{showPrice(goodItem.Specifications_money)}}</view>
<view class="price">{{goodItem.Specifications_money / 100}}</view>
<view class="flex-between" style="width: 165rpx;font-size: 29rpx;">
<view :class="['jian', goodItem.num == 1 ? 'zhihui' : '']" @click="delNum(goodItem)">-
</view>
@ -33,12 +33,12 @@
<view class="title flex-between">失效商品<span @click="delLoseGood('',1)">清空失效商品</span></view>
<view class="goodItem" v-for="(goodItem,goodIndex) in loseList" :key="goodIndex">
<view class="noSelect"></view>
<image :src="showImg(goodItem.Specifications_image)" mode="aspectFill"></image>
<image :src="showImg(goodItem.specifications_image)" mode="aspectFill"></image>
<view class="contentBox">
<view class="title text-overflow">{{goodItem.good_name}}</view>
<view class="subTitle text-overflow">{{goodItem.Specifications_name}}</view>
<view class="priceBox flex-between">
<view class="price">{{showPrice(goodItem.Specifications_money)}}</view>
<view class="price">{{goodItem.Specifications_money / 100}}</view>
<view class="btn" @click="delLoseGood(goodItem.id,0)">删除</view>
</view>
</view>
@ -48,10 +48,10 @@
<!-- 预定按钮 -->
<view class="orderBox flex-between">
<view class="priceBox">
<view class="selectBox flex-around" v-if="allSelect" @click="changeAllSelect">
<!-- <view class="selectBox flex-around" v-if="allSelect" @click="changeAllSelect">
<img src="https://static.ticket.sz-trip.com/cgc/images/order/dui.png" alt="">
</view>
<view class="noSelect" v-else @click="changeAllSelect"></view>全选
<view class="noSelect" v-else @click="changeAllSelect"></view>全选 -->
<span v-if="operate == '管理'">在线付:</span>
<p v-if="operate == '管理'">{{getAllPrice()}}</p>
</view>
@ -82,11 +82,11 @@
methods: {
getShoppingList() {
this.Post({
is_post: 2,
lon: this.$store.state.user.location.lon || '120.63132',
lat: this.$store.state.user.location.lat || '31.30227'
is_post: 1,
// lon: this.$store.state.user.location.lon || '120.63132',
// lat: this.$store.state.user.location.lat || '31.30227'
}, '/api/shopping/getShoppingList').then(res => {
this.list = res.data
this.list = res.data.merchant
this.loseList = []
this.list.forEach(item => {
item.data.forEach(items => {
@ -153,7 +153,7 @@
//
goDetails(id) {
uni.navigateTo({
url: '/subPackages/goods/goodsInfo?id=' + id
url: '/subPackages/techan/detail?id=' + id
});
},
//
@ -363,7 +363,7 @@
.jia {
width: 47rpx;
height: 47rpx;
background: #2791F7;
background: #6CA5AA;
border-radius: 50%;
text-align: center;
color: #FFFFFF;

4
subPackages/user/myAddressAdd.vue

@ -90,7 +90,7 @@
getSeldCityList() {
let that = this
that.Post({}, '/api/areas/getAll').then(res => {
if (res.code === 1) {
if (res) {
var data = res.data;
var result = {};
for (var i = 0; i < data.length; i++) {
@ -280,7 +280,7 @@
detail_addr: this.detailAddr,
id: this.id || null
},'/api/user/' + (this.id > 0 ? 'edit' : 'add') + 'Consignee').then(res => {
if(res.code == 1){
if(res){
uni.setStorageSync('addressNow',JSON.stringify(res.data))
uni.showModal({
title: '提示',

Loading…
Cancel
Save