jjj 4 years ago
parent 97778b3601
commit 700293e4d6

@ -0,0 +1,11 @@
{ // launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version": "0.0",
"configurations": [{
"type": "uniCloud",
"default": {
"launchtype": "remote"
}
}
]
}

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/recook-weapp.iml" filepath="$PROJECT_DIR$/.idea/recook-weapp.iml" />
</modules>
</component>
</project>

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="25cc1d84-530b-46ca-968a-663f03ba7b68" name="Default Changelist" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectId" id="1sBporjuXO2uueYx8FF4KVcz2TW" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="nodejs_package_manager_path" value="npm" />
<property name="vue.rearranger.settings.migration" value="true" />
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="25cc1d84-530b-46ca-968a-663f03ba7b68" name="Default Changelist" comment="" />
<created>1620356017127</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1620356017127</updated>
<workItem from="1620356020037" duration="14000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
</project>

@ -0,0 +1,159 @@
<template name="guideOrderGoods">
<view class="goods-box why">
<!-- 导购订单列表的商品信息 -->
<view v-for="(item,index) in goodsList" :key="index">
<view class="goods-item flex">
<navigator :url="'/pages/goodsDetail/goodsDetail?id='+item.goods_id" hover-stop-propagation @tap.stop="" class="goods-pic">
<u-lazy-load threshold="-100" :image="IMAGE_URL+item.mainPhotoUrl" :index="index" height="200" border-radius="10" :loading-img="IMAGE_URL + '/null05.png'" :error-img="IMAGE_URL + '/null05.png'" img-mode="aspectFill"></u-lazy-load>
</navigator>
<view class="goods-con flex-sub flex flex-direction justify-between">
<view class="">
<view class="goods-name two-line">{{item.goodsName}}</view>
<view class="goods-spec-con flex justify-between">
<view class="goods-spec text-hidden">{{item.skuName}}</view>
<!-- <view class="goods-num" style="color:#aaa;">×{{item.quantity}}</view> -->
</view>
<view class="flex align-center" style="margin:10rpx 0;">
<view class="align-center justify-start" v-if="item.isFerme">
<view class="tab_ferme">包税</view>
</view>
<view class="" style="font-size: 20rpx;color: #FA6400;" v-if="item.storehouse">
<text>不支持7天无理由退换货</text>
</view>
</view>
</view>
<view class="flex justify-between" style="font-size: 28rpx;color: #FA6400;">
<view class="flex">{{item.unitPrice | toFixed(2)}} </view>
<view>×{{item.quantity}}</view>
<view v-if="item.rStatus">{{item.rStatus}}</view>
</view>
</view>
</view>
<!-- 导购订单列表 不需要 -->
<!-- <view class="goods-bottom flex justify-end" style="margin: 10rpx 0;" v-if="item.orderType==1&&item.rStatus=='待发货'">
<button class="cu-btn lines-gray text-gray round" hover-stop-propagation @tap.stop="returnMoney(item.goodsDetailId)">申请退款</button>
</view>
<view class="goods-bottom flex justify-end" style="margin: 10rpx 0;" v-if="item.orderType==1&&item.rStatus=='已发货'">
<button class="cu-btn lines-gray text-gray round" hover-stop-propagation @tap.stop="toChooseType(item)">申请售后</button>
</view> -->
</view>
</view>
</template>
<script>
export default {
name: "orderGoodsReport",
data() {
return {
IMAGE_URL: this.IMAGE_URL
};
},
props: {
goodsList: {
type: Array,
value: null,
},
orderType:{
type:Number,
value:0
}
},
mounted() {
console.log(this.goodsList)
},
methods:{
//退
returnMoney(id){
uni.showModal({
title: '提示',
content: '确认申请退款吗?',
success: (res)=> {
if (res.confirm) {
console.log('用户点击确定');
this.$u.post('/api/v1/order/refund',{
userId: uni.getStorageSync("userInfo").id,
orderGoodsIDs:[id]
}).then(res => {
console.log(res.data);
if (res.data.code == "FAIL") {
this.$u.toast(res.data.msg);
return
}
uni.navigateTo({
url:"/pages/afterSaleDetail/afterSaleDetail?orderGoodsId="+id
})
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
toChooseType(obj){
this.$store.commit('setReturnGoodsMsg',obj);
uni.navigateTo({
url:"/pages/chooseAftersaleType/chooseAftersaleType"
})
}
}
}
</script>
<style lang="scss">
.tab_ferme{
display: flex;
justify-content: center;
align-items: center;
width: 64rpx;
height: 28rpx;
background: #FFE5ED;
border-radius: 15rpx;
margin-right: 20rpx;
font-size: 20rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #CC1B4F;
}
.goods-box {
border-bottom: 1rpx solid #EEEEEE;
padding: 10rpx 0;
.goods-item {
line-height: 40rpx;
padding: 10rpx 0;
.goods-pic {
width: 200rpx;
height: 200rpx;
border-radius: 10rpx;
overflow: hidden;
margin-right: 20rpx;
}
.goods-name {
color: #000;
font-size: 28rpx;
margin-bottom: 10rpx;
font-size: 32rpx;
color: #000;
}
.goods-spec {
background-color: #EFF1F6;
font-size: 20rpx;
padding: 0 10rpx;
border-radius: 10rpx;
color: #aaa;
}
}
.goods-bottom{
.cu-btn{
height: 50rpx;
line-height: 50rpx;
padding: 0 15rpx;
font-size: 26rpx;
}
}
}
</style>

16
package-lock.json generated

@ -1,8 +1,22 @@
{
"name": "recook-weapp",
"version": "1.0.0",
"lockfileVersion": 1,
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"wxmp-rsa": "^1.1.1"
}
},
"node_modules/wxmp-rsa": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/wxmp-rsa/-/wxmp-rsa-1.1.1.tgz",
"integrity": "sha512-H+IHQcmVqqGUSHp/a7qtSsH49YKHoU++WNziHIi2r/q6KlM+myKjXnQkH/2DR3ZzTbZXBfm17uCgjj/A31hmLg=="
}
},
"dependencies": {
"wxmp-rsa": {
"version": "1.1.1",

@ -34,7 +34,9 @@
<view class="order-item-top flex justify-between align-center">
<view class="flex align-center">
<view class="text-center text-white buy" style=""></view>
<view class="flex" style="font-size: 32rpx;color: #000000;">{{item2.createdAt}}<text class="cuIcon-right"
<view v-if="currentIndex === 0" class="flex" style="font-size: 32rpx;color: #000000;">{{item2.createdAt}}<text class="cuIcon-right"
style="color: #ccc;"></text></view>
<view v-else class="flex" style="font-size: 32rpx;color: #000000;">{{timeFormat(item2.createdAt, 'yyyy-mm-dd hh:MM:ss')}}<text class="cuIcon-right"
style="color: #ccc;"></text></view>
</view>
<view class="text-red" v-if="item2.status==0"></view>
@ -44,17 +46,19 @@
<view class="text-red" v-if="item2.status==4"></view>
<view class="text-red" v-if="item2.status==5"></view>
</view>
<order-goods :goodsList="item2.goodsList"></order-goods>
<order-goods v-if="currentIndex === 0" :goodsList="item2.goodsList"></order-goods>
<guide-order-goods v-else :goodsList="item2.goods" ></guide-order-goods >
<view class="flex justify-between order-btn">
<view class="">
<view class="" v-if="currentIndex === 0">
<button v-if="item2.status==1&&item2.expressStatus!=0" class="cu-btn lines-gray text-gray round" @tap.stop="checkExpress(item2.id)"></button>
<button v-if="item2.status==4" class="cu-btn lines-gray text-gray round" @tap.stop="checkExpress(index2,item2.id)"></button>
</view>
<view>{{item2.totalGoodsCount}}件商品 总计<text class="text-red">{{item2.goodsTotalAmount | toFixed(2)}}</text></view>
<view v-if="currentIndex === 0">共{{item2.totalGoodsCount}}件商品 总计<text class="text-red">{{item2.goodsTotalAmount | toFixed(2)}}</text></view>
<view v-else>{{item2.goods.length}} <text class="text-red">{{item2.goodsTotalAmount | toFixed(2)}}</text></view>
</view>
<view class="order-btn flex justify-end align-center" hover-stop-propagation>
<view class="order-btn flex justify-end align-center" hover-stop-propagation v-if="currentIndex === 0">
<view class="">
<view class="" v-if="item2.status==0">
<button class="cu-btn lines-gray text-gray round" @tap.stop="cancelOrder(index2,item2.id)" style="margin-right: 15rpx;">取消订单</button>
@ -80,8 +84,12 @@
</view>
</template>
<script>
export default {
<script>
import guideOrderGoods from '@/components/guideOrderGoods.vue'
export default {
components:{
guideOrderGoods
},
data() {
return {
show: true, //
@ -125,11 +133,40 @@
}
})
},
methods: {
OrdersDetails(id, index) {
uni.navigateTo({
url: "../orderDetail/orderDetail?orderId=" + id
})
methods: {
timeFormat(timestamp, fmt) {
// :
// yyyy:mm:dd|yyyy:mm|yyyymmdd|yyyymmdd hhMM,
timestamp = parseInt(timestamp);
// null,
if (!timestamp) timestamp = Number(new Date());
// ,js(13),(10)
if (timestamp.toString().length == 10) timestamp *= 1000;
let date = new Date(timestamp);
let ret;
let opt = {
"y+": date.getFullYear().toString(), //
"m+": (date.getMonth() + 1).toString(), //
"d+": date.getDate().toString(), //
"h+": date.getHours().toString(), //
"M+": date.getMinutes().toString(), //
"s+": date.getSeconds().toString() //
//
};
for (let k in opt) {
ret = new RegExp("(" + k + ")").exec(fmt);
if (ret) {
fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
};
};
return fmt;
},
OrdersDetails(id, index) {
if (this.currentIndex === 0) {
uni.navigateTo({
url: "../orderDetail/orderDetail?orderId=" + id
})
}
},
toOrderPay(id) {
//
@ -268,7 +305,7 @@
page: this.navs[index].page,
limit: 5,
status: index
}).then(res => {
}).then(res => {
if (res.data.code == "FAIL") {
this.$u.toast(res.data.msg);
return

Loading…
Cancel
Save