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.shiguang = res.data[0]
} }
}) })
this.Post({
mobile: '18639595995',
captcha: '123456'
}, '/api/user/mobilelogin').then(res => {
this.$store.commit('changeUserInfo', res.data.userinfo);
})
}, },
// 234 // 234
gotoUrlNew(item) { gotoUrlNew(item) {

14
subPackages/order/detail.vue

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

34
subPackages/order/gwcOrder.vue

@ -1,8 +1,8 @@
<template> <template>
<view class="bg" v-if="info"> <view class="bg" v-if="info">
<view class="address box" @click="changeAddressPopup('open', '', key)" v-if="!contacts && info[0].is_post == 1"> <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> <!-- <image src="https://kunshan.xmainc.com/uploads/20230105/870e4ce1d5a661986d8a54e9f3c2b0b3.png" mode="aspectFill"></image> -->
<view class="text">添加邮寄地址</view> <view class="text">+ 添加邮寄地址</view>
</view> </view>
<view class="contacts box" v-if="contacts && info[0].is_post == 1"> <view class="contacts box" v-if="contacts && info[0].is_post == 1">
<view class="contacts-left"> <view class="contacts-left">
@ -12,7 +12,7 @@
</view> </view>
<view class="adds text-overflowRows">{{ contacts.province_text + contacts.city_text + contacts.district_text + contacts.detail_addr }}</view> <view class="adds text-overflowRows">{{ contacts.province_text + contacts.city_text + contacts.district_text + contacts.detail_addr }}</view>
</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>
<view class="commodity box"> <view class="commodity box">
<view class="merchant-name"> <view class="merchant-name">
@ -20,19 +20,19 @@
</view> </view>
<view style="margin-top: 20rpx;" class="" v-for="(item,index) in info" :key="item.id"> <view style="margin-top: 20rpx;" class="" v-for="(item,index) in info" :key="item.id">
<view class="goods"> <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="" style="display: flex;flex-direction: column;justify-content: space-between;">
<view class=""> <view class="">
{{item.good_name}} {{item.good_name}}
</view> </view>
<view> <!-- <view>
<span class="info-tags" v-for="(itemT,indexT) in item.goods_new_tag.split(',').splice(0,2)" :key="indexT">{{itemT}}</span> <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> </view>
<view class="sku-info"> <view class="sku-info">
<view class="title"> <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-list">
<view class="price-r">{{ item.Specifications_money / 100 }}</view> <view class="price-r">{{ item.Specifications_money / 100 }}</view>
<!-- <view class="price-g">¥{{ info.skuInfo.price / 100 }}</view> --> <!-- <view class="price-g">¥{{ info.skuInfo.price / 100 }}</view> -->
@ -200,10 +200,10 @@ export default {
}); });
}, },
getPost() { getPost() {
if (this.info[0].is_post == 0) { if (this.info[0].is_post == 0 || !this.contacts) {
return; return;
} }
console.log(this.info); console.log(this.info,55555555,this.contacts);
this.flag = false; this.flag = false;
let data = this.info.map((item) => { let data = this.info.map((item) => {
return { specifications_id:item.specifications_id, num: item.num, consignee_id: this.contacts.id } return { specifications_id:item.specifications_id, num: item.num, consignee_id: this.contacts.id }
@ -516,11 +516,11 @@ view {
font-size: 32rpx; font-size: 32rpx;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 500; font-weight: 500;
color: #fc5109; color: #FC5109;
&:before { &:before {
content: '¥'; content: '¥';
display: inline-block; display: inline-block;
color: #fc5109; color: #FC5109;
font-size: 24rpx; font-size: 24rpx;
} }
} }
@ -568,7 +568,7 @@ view {
.btn { .btn {
width: 250rpx; width: 250rpx;
height: 80rpx; height: 80rpx;
background: linear-gradient(270deg, #fc5109 0%, #fdc43a 100%); background: #60989E;
border-radius: 44rpx; border-radius: 44rpx;
text-align: center; text-align: center;
line-height: 80rpx; line-height: 80rpx;
@ -579,7 +579,7 @@ view {
} }
.price-box { .price-box {
display: flex; display: flex;
align-items: center; align-items: baseline;
.text { .text {
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
@ -591,17 +591,17 @@ view {
font-size: 48rpx; font-size: 48rpx;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #fc5109; color: #FC5109;
&:before { &:before {
content: '¥'; content: '¥';
display: inline-block; display: inline-block;
color: #fc5109; color: #FC5109;
font-size: 24rpx; font-size: 24rpx;
} }
} }
.post { .post {
margin-left: 15rpx; margin-left: 15rpx;
color: #fc5109; color: #FC5109;
font-size: 24rpx; font-size: 24rpx;
} }
} }
@ -611,7 +611,7 @@ view {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
image { image {
width: 31rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
} }
.contacts-left { .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)" <view v-for="(item, key) in list" :key="item.id" class="trade-items" v-if="showItem(item)"
@click="() => choseType(item)"> @click="() => choseType(item)">
<view class="trade-item-head"> <view class="trade-item-head">
<view class="trade-item-head-tid">订单号:{{ item.order_id }}</view> <view class="trade-item-head-tid">订单号:{{ item.f_order_id }}</view>
<view class="trade-item-head-state">{{ item.status_text }}</view> <view class="trade-item-head-state">{{ item.f_status_text }}</view>
</view> </view>
<view class="trade-item-pros"> <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"> <view class="trade-item-pro-img" v-if="pro.specifications_image">
<image :src="showImg(pro.specifications_image)" mode="aspectFill"></image> <image :src="showImg(pro.specifications_image)" mode="aspectFill"></image>
</view> </view>
@ -47,15 +47,15 @@
</view> </view>
<view class="trade-item-info"> <view class="trade-item-info">
合计 合计
<text>{{ item.pay_money / 100 }}</text> <text>{{ item.f_pay_money / 100 }}</text>
</view> </view>
<view class="trade-item-btns"> <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>
<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>
<view @click.stop="confirmpost(item.order_id, key)" v-if="item.postFlag">确认收货</view> <view @click.stop="confirmpost(item.f_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 class="pay-btn" @click.stop="setOrderId(item.f_order_id)" v-if="item.f_status == 'WAIT_PAYMENT'">
立即支付</view> 立即支付</view>
</view> </view>
</view> </view>
@ -318,7 +318,23 @@
'待发货' ? 2 : '') '待发货' ? 2 : '')
}; };
this.Post(data, '/api/order/orderList').then(res => { 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) { if (res.data.length < 5) {
this.finished = true; this.finished = true;
} }
@ -343,7 +359,7 @@
}, },
choseType(item) { choseType(item) {
uni.navigateTo({ 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 class="guanli" v-if="list && list.length>0" @click="guanli">{{operate}}</view>
<view v-for="(item,index) in list" :key="index"> <view v-for="(item,index) in list" :key="index">
<view class="goodBox" v-if="item.data && item.data.length > 0 "> <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" <view class="goodItem" v-for="(goodItem,goodIndex) in item.data" :key="goodIndex"
v-if="goodItem.flag != 0"> v-if="goodItem.flag != 0">
<view class="noSelect" v-if="!goodItem.is_select" @click="changeSelect(goodItem)"></view> <view class="noSelect" v-if="!goodItem.is_select" @click="changeSelect(goodItem)"></view>
<view class="selectBox flex-around" v-else @click="changeSelect(goodItem)"> <view class="selectBox flex-around" v-else @click="changeSelect(goodItem)">
<img src="https://static.ticket.sz-trip.com/cgc/images/order/dui.png"> <img src="https://static.ticket.sz-trip.com/cgc/images/order/dui.png">
</view> </view>
<image :src="showImg(goodItem.Specifications_image)" mode="aspectFill" <image :src="showImg(goodItem.specifications_image)" mode="aspectFill"
@click="goDetails(goodItem.good_id)"></image> @click="goDetails(goodItem.good_id)"></image>
<view class="contentBox"> <view class="contentBox">
<view class="title text-overflow">{{goodItem.good_name}}</view> <view class="title text-overflow">{{goodItem.good_name}}</view>
<view class="subTitle text-overflow">{{goodItem.Specifications_name}}</view> <view class="subTitle text-overflow">{{goodItem.Specifications_name}}</view>
<view class="priceBox flex-between"> <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="flex-between" style="width: 165rpx;font-size: 29rpx;">
<view :class="['jian', goodItem.num == 1 ? 'zhihui' : '']" @click="delNum(goodItem)">- <view :class="['jian', goodItem.num == 1 ? 'zhihui' : '']" @click="delNum(goodItem)">-
</view> </view>
@ -33,12 +33,12 @@
<view class="title flex-between">失效商品<span @click="delLoseGood('',1)">清空失效商品</span></view> <view class="title flex-between">失效商品<span @click="delLoseGood('',1)">清空失效商品</span></view>
<view class="goodItem" v-for="(goodItem,goodIndex) in loseList" :key="goodIndex"> <view class="goodItem" v-for="(goodItem,goodIndex) in loseList" :key="goodIndex">
<view class="noSelect"></view> <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="contentBox">
<view class="title text-overflow">{{goodItem.good_name}}</view> <view class="title text-overflow">{{goodItem.good_name}}</view>
<view class="subTitle text-overflow">{{goodItem.Specifications_name}}</view> <view class="subTitle text-overflow">{{goodItem.Specifications_name}}</view>
<view class="priceBox flex-between"> <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 class="btn" @click="delLoseGood(goodItem.id,0)">删除</view>
</view> </view>
</view> </view>
@ -48,10 +48,10 @@
<!-- 预定按钮 --> <!-- 预定按钮 -->
<view class="orderBox flex-between"> <view class="orderBox flex-between">
<view class="priceBox"> <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=""> <img src="https://static.ticket.sz-trip.com/cgc/images/order/dui.png" alt="">
</view> </view>
<view class="noSelect" v-else @click="changeAllSelect"></view>全选 <view class="noSelect" v-else @click="changeAllSelect"></view>全选 -->
<span v-if="operate == '管理'">在线付:</span> <span v-if="operate == '管理'">在线付:</span>
<p v-if="operate == '管理'">{{getAllPrice()}}</p> <p v-if="operate == '管理'">{{getAllPrice()}}</p>
</view> </view>
@ -82,11 +82,11 @@
methods: { methods: {
getShoppingList() { getShoppingList() {
this.Post({ this.Post({
is_post: 2, is_post: 1,
lon: this.$store.state.user.location.lon || '120.63132', // lon: this.$store.state.user.location.lon || '120.63132',
lat: this.$store.state.user.location.lat || '31.30227' // lat: this.$store.state.user.location.lat || '31.30227'
}, '/api/shopping/getShoppingList').then(res => { }, '/api/shopping/getShoppingList').then(res => {
this.list = res.data this.list = res.data.merchant
this.loseList = [] this.loseList = []
this.list.forEach(item => { this.list.forEach(item => {
item.data.forEach(items => { item.data.forEach(items => {
@ -153,7 +153,7 @@
// //
goDetails(id) { goDetails(id) {
uni.navigateTo({ uni.navigateTo({
url: '/subPackages/goods/goodsInfo?id=' + id url: '/subPackages/techan/detail?id=' + id
}); });
}, },
// //
@ -363,7 +363,7 @@
.jia { .jia {
width: 47rpx; width: 47rpx;
height: 47rpx; height: 47rpx;
background: #2791F7; background: #6CA5AA;
border-radius: 50%; border-radius: 50%;
text-align: center; text-align: center;
color: #FFFFFF; color: #FFFFFF;

4
subPackages/user/myAddressAdd.vue

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

Loading…
Cancel
Save